From ab5f176f5802010ad8d6c487d1f5d5659ac1bb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9?= <34818054+XZVB12@users.noreply.github.com> Date: Mon, 20 Jan 2020 01:45:37 +0400 Subject: [PATCH 01/31] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3e05cd3..c5906262 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # About - +Fork of the project https://github.com/janeczku/calibre-web Calibre-Web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing [Calibre](https://calibre-ebook.com) database. *This software is a fork of [library](https://github.com/mutschler/calibreserver) and licensed under the GPL v3 License.* From 4c8f3f7bae1887bd0c8541eeb5d044f12b488e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9?= <34818054+XZVB12@users.noreply.github.com> Date: Mon, 20 Jan 2020 01:46:41 +0400 Subject: [PATCH 02/31] Add files via upload --- cps/translations/ru/LC_MESSAGES/messages.mo | Bin 51125 -> 48460 bytes cps/translations/ru/LC_MESSAGES/messages.po | 829 +++++++++----------- 2 files changed, 382 insertions(+), 447 deletions(-) diff --git a/cps/translations/ru/LC_MESSAGES/messages.mo b/cps/translations/ru/LC_MESSAGES/messages.mo index 90f8e1423cf36acc49003d152dfc3ee79b1c2c06..99a96df2d500112675c4730d6f4c222ea5a24d41 100644 GIT binary patch literal 48460 zcmcJY2Y_5vz5g#&482$3281M#-4sF#H4O+R5K}-Y;_U8Zvt%=~%a;vZCX_G2j{CNboXH7eRa z0`39c5uQH^ZcF-EP;~ktsPVi6s{J2=yMwQTTZ21|@^S4BDnADG-Z)Utr-bww0nZEh z-Js}kF{u7u4h{ov03mhs1UMRe8HBXaP9(;I$Ad?M3&F#|kAtG)H$jFReHR=7?!ct% z2_6lq-_t;izXRM4ygcN85Il7d4c0jPQ}0(Sv#0(S);04IQ-05$&Kfg0z5ox_%Q>KfVX<3BC%do-K~? zaqkLhJcocPHx5*Lr-0(a>7e>Q2iy+45ZoJ_2WmV^Kv*++6cm5F81lC~*2^CbYCewy z)z33Q&1V5r|E>o$&RfIt2SJTvBdGRX2Gzfxf||EKfg1O|$N9V;2x^{3fa>=NpyYBY zsCmePn%^?GFL({8{wxPYr*)v}e;E`X{W_%o0&4z;jQ4rp1)NBF3OEV8KHziUNu+l< z-rG3~)Od2B`qLBg-w$fMw}P-%ba%infrpX)d%#0ah@!WVo)+*T5EhTF2Su0lpyu%< z(D(`5i}XGxx;%~or;xq?JQREc+#CENsQ&x_6g_?oYQEHY(fJ5abR7qZ4#$D~A5G?u z+P?}Ee>??>AD#t`&%pyozXYoOKY{Ak)-bX7bR?+uMuU5R6T$t#a{`vZS)^|T_1=#_ z@#prZct7?BMYqF1(X|CsKTiPF&k3OVGYwR|XM@Twfok{tpvHeIC_ecJ_!e*-sCu6T zHI6TWOhNP_xI4Hz%0M^_)cB4E_XXbts=g9<2zVnX{&^hS2mBD4M}ZH3;)CbG!@-w9wZGjI_Y3v} z8ESMicnr806n&onw+5dFHSVv0>hG)I+rigC(e0p9y}dCYRY&7MjdwAq{#^~m;LV`u z^Ejw_J_|}7z7CECw>{1E!!e-R?*>PL*Mq~s)u8C}T@Y0f{S{Pyk2&4@Sp?NyFR1x{ zKd5mp4R}Ae9qEsPYX3=4^!f}aK6nw-cwPZT@7F<<+j^>(+a1)nhJmVgENF5FivP|5 zMc0eKZNWw1`Q-uc09Ec$Q0=V;Mc3!Rw}3wZ_5QCw(fxH$?fnCkz8G?bx4Rdp_YVWr zzhgl4<5W=caUOUGSO&KP?*YZ94}trEYrw<6uYtqBzkr(0q3`f^P6gGEnII&HE)4i6 z2+5=0fg1mD)0}Uof}&%4z(wE=q?dxC!@Z#9V|hq_9NeDtli&{Er$CMWc~JBI0;ux8 z1BZbB22h>1xD~hn#Kc4wgW`*if~xPQpvM1ea7XY@;KATFXS!St2bJFn zYCIT)ccQz^k=}GNxuN<{hxr6t6vA)dWQ4WexT|-5)@tE z0qz8LhWv$~=Is_xeE2Y^_SSAk)Xyo5fopX38E6ByFthG)IDDY39>K!)A<>6QmlN((K>b(cS-M|lnqro-ck>D$! z=I4Ofu20VZ4%A^NpbR z>N$`uM=yYym&4ET_QruKHv!bR&I;)qxHst{sPfl=s{eLS{r&`~cD@X1zFq_O2LBvz zmv?!3ICwbur+}(wK6pIX2dZCBfTGj7kbV}_Jbf9|{C*cy|9%0g+@C?sL-cOff7^o6 z8$-bpz(YZ`*9Hy;Zw5uzr@+I&&w#4`7XkkU?m>E&bDhqIf@*IZsQyj_)z4|5+MNSx zKF$MG?jlh3`4Uj{c^|0x_#mkF9t!ElK=DUEDEfUG)OcP7)&HM>>c`JP_51JOGh0C8 z^PInbd_KNA`FmX8>(2Lp((`wL;{SD^=>Ln5zvX*;{V@!@mHe~8`@x@rs^`iJUGAR) z)t?`N>fhf(dgu4LUv&hi`saY^-!-80?tP%-VgsoBAAv)`KZ6?oemS3qq2Nf;)4=1v z#o)2vDv%*XzXXp0r?&aHKLDOg`cd#0@D*?h7`HpW&jr<=8^ICaI#BxH$DsQ08&LDT zb%&SR6?_}%382bd2#OCb0*8XPgKB>jsP}#jN-z8|;Nf|H?>%5leitY@-3Xor-VaJo z{0N)`?ll))2hRl;gZG2o;GUg6Z&!lq$J5|R;AcbrR`Yy3<3aIp2RIR20iFW>7#t5C z+J(%6?*-M*$3gYyhv1&zYv360trt1{jtBK#89W?(9Q+RWE$~e6srfDs+t5kXw+|@! zmv9|v3st^l_wdA~mb zioYuXe+h1-@@1dz9l%pa?+c>3qH{r1Otcc*3EaNd{e=C%v82a=2ZEj8DDc{l{}iZs z_&K;M_&T^3xI>@gA>a_wE8uK!^g^GPYe2RC4N!Fc5qKi_)kAfco*Mg8Vdhh#K1AyNEnfmC0%aBFz zIq+@ZG4FSr1FC;za0GZODEdAPo&$afoCzL$xzn#N;EUi?@{fZVg;#-Rg3p7;fd?${ zah(mS-`9fTw`af$!S8{Zhm)`Hao!0YLV5sHfBpb!{&u|*839iKcLQ$#_X0lzwt%ZZ zSRncVcs_XcRW1jsK$Uv|+#CEQDEe-Fwa@by@GR2jfU@L=#Kp!&bv zHTX8*Nub_)8I-)XTbVotIM)UIB6tDmZ-N@{(Mtm#fV-2v z7Mus(2WlK!-Q@MW2RwoF)gk?9@EFoR3+aPyb~`);RQnf!LsTA=T;3YeD?riZW8hfu z+o0;%=@zH+so?gc3*bKBrQn|69pDb&W1z2P}~O7zoQm``_;JvI5k+z6!?R??Lrv_hsJyk)ZhCJa9{JF?cC> z8K`mp2~>Z#yu;%MJA*Ol+29DU51bD!2hRhyztiPm|sxzIXhq{D0*H3svoz22ZC$Cw}UT&D*snd^xg4Z zmyZ@u`KN=T!@EI^zZCGcfRBSak^dYhdH8m~KZBCjJwNDpEU5O+16A)epxV0|+zosR z914CB+#7rq6g{`P&*y&^P~#j2jt0*SxD=dA`WaB;Iplu#PfiENlD-W*3;Yat9Ju?3 z+z*=$?oaw!P~&3vfr$e+6fPLmqPbeF1nG=^Xfe@Vnq! z!1Gr)Uvz-#=K}EE;2ogm=U1TU_E)eKY$J`WB9UjYvUcX`C0 zj|w;*Jc9fwA$>6@KD!JY3N8aRk57WqFVBIZ$59{l{+$jULb?E+4=w}u0)G?oxBU;F zzr(?iO13VjS2e$*)fuq3BfU55`Q1cvp%5k$wj_4=jTk_jf>*{~h>taL*^455|M1kbWn447dzD6#No6 z0{ktg_xD@r{T>A#O!_Ra2$sN$z#oFUfzwwxz1|CUkiHF6yMF+82lssv-3+#Xs^@u7 za{t?q9irwQ z{lOKW+TQ@43_c5LKDKGsnTmy>Fz6hQK?zjOOfUJLi>Lv9Wac`t;_83E4=IF09z zhcYw3Uvgc`vpc!kxyF-z6&wnl!u4q`(PAvuPF$yvzMbnY+`j@o%QcHjpL@8(cVAb6 z&u_`U2K+MDceq{%<(S^+W-iIVRIa(?KN6m4{y)X_dD2^K>GUOO>usSvWv)N-{Jika zm%txzy)UFCyZZbu7pgZxZAE+V>^82SbAJjKB4E682zmE$ulW>@e3$v>$1G{sjISd_JUS z2Gp|~xEF7Uul2c;bbEL%nf?k_KiBJA-CQNE+qm>Oh;q}xheCPOQ8X{y>-l%MU&Ymv z$y-MLN4Q3E?ay^;cy!?rbAJxk zyF&g00Z$;W!u@=%t3%$2H5x&FZQGp?Pv{)0=Oqqueq_v5(VKHQH9_)GFcniE2LFYp&!7jXS2`TD%i z!Qv&o;XVe>q|E0-T7b!oE)VHHfwQ=dr_5Gd`o!Q|zl}~0dG7`nl6MjK$?$9?xC2)& zd6$H8XR937eDX1+_PLhy!(4}P9YM}-Kz)`wM3<3%ocsR=%0_&E3o{c%aep}1hqx{z{X;MhewFJME`3n@_BoEfzanpokiQ@4Z*zYD*SXw(AG{y@Dfn@& zPjTrpoa>$8{$Oxxh<_=#fvY3rw}Ric(yrTg=Ke3_oy+w#?l*$(4$sfv{vht301pUx zS@=2m`m}Jhh5MVqF0Nm5eJtd?1H6BeJ>>s4coWx-T<_(2iM&0*DO~U2`T^I2H0xIV}I zQ(P;!e?NF4*MD)1CjBtidhY+q^+&EbT>AWt>xbO04Qb2d&y}QmLShnlIq5^Wt_*qm zhw`tHUc>#?TnC1{7szkyn3wdKmFW@?p>$6G?$6>n zIizpk{$j3ex%BA_`AY--oxDZd{}%ikxHou2c*bqC1NVz{!zafzmUMr3{!`MIas4;x zuXDZ3eHr`)*QdGv9@m9j`n<~_`Y!lgo{!*K$#q7^|1tOzu0>qOkgw0K;A*bjxMq`{ z4Zh5!GpqV66A9r<( zj}INL+YuevH>yR8h4{2$v9miLPcC&W%&Yj^!iaLy!kLHNxk6_lw;)gJU1e)I7cb0p zcXh;i(wFPZQ-c>6R*rj0#kpPG%HnQeS4Y0YduL7P>zx-*>h8)HdgH0;-e3=B<=ad7 z-e^Kx$S;cfdOC8wd9|8bnCt4!wRPuPRZIK)n6dQE%g1efy}jJF<-3cE;@)EN26uYe z&D-VPcwxR&?kW~q{|&Wnhl-jlP^OS%T4610)vMbNhuC5uhGa!2 z7Z(+}i@A;@J*A_I-r6JGS|xpL%tt&+1W1a_>B+ui%(<{DzeuCeyL76TT=-sM-y}H^X-q=bY5{moU;$g)sCR)+v9q4{C7UlM?kvKC4R7>FQkfcfs=hMxM^`=>QnA#TD|B5-Gtx3H-ZrD< zk@3Q=au-Ti^vg2`i;IOoj<_dZa+NeuvX+k$s!g64cXXA~q)3T`#N}SpR2i8oCy!dr z$+u~0tHKbJc}Go&e4F^1QRcdfoi$HP)#qC@pUUrUL*RmIU3*_uK zj1qaMA?b0ON=C7W(#)ChP^sw6+f^n}%mC5cym}2XfbD3Gk_ak85HCO_NqUr_r;=5g zqy4B>`&mkk4%CZ%D&s}yEs3pOMs=5x{G1!lR#j2RGYxu0HbWV--iu}^mbyC8GrXDc zpmNleRQL{40qGm!t(t^&HP<^n&6F~%rh1F%{rH$Necc`IA7RW@mo;70hCvrp%gxRA z;^rk@PQi7UaZXwlT;5e^b@oC`Mb-|?W6Htp#X>Jk=%mTXKX4zw=%CVbW=@NTU)0k% zGE53OTNP+x5OE_$Z&6AGX-`z#$QUVMER@a7#WXLh3F*0{G$UEMf2d3RH?MdT<^()=YU)8u}xs6USZ_U6hsQK5tnv^+jZo2y_VT9ad5+~j<@ zz0}oXE?nkb@48u^+*NXBk0y7OP0Z4pc=$}F6JxC|l}ALAO<)pVXHgDnAqj5Vs&@M1 z&6P8Tkz*Q{`nqwKnpa!GBasUb^uDzDU`5Nl#h&_d&XCmYH?q+|EP7Dma&;${a-H!o zc(laZj00vUl`=YTN{fcAS%)Ry*>r-VDQ*)Sz|M*qj_+)VOb&JP$ILa*Ow> zBRodxy;`YjNj#p!6k$uXA9FECd0U&AdQu6w(fSh@+ivI35|tEK+=L=9zUdAx8q{H3 zfBadZV52Do)5t6=7-BpP3mI~9jlOVr5-hxX;lT?HkK_R&f2M-s;RhqM_^aJrh4}}M zNb2n~S6{C6ltO!Hu`}+Jg6QvbG}AK0^s@bp^I_p2Dpj?ZnI{^O4l#-B2>k9ZVR{SV ziM-~xH9l3PI*Lf9w2v*Su!N?7k_p8;Kms`{(Z60r>%XCn@pX0B)V4YYG#N{xSu?}9 zq`kYZ15YC?y5XacGt1q#Bsn{We=y||=Ae+no$V^*%)2|)_%L#i1hLSTdad=zhtJ5D z7NBBfPCFoazGFmd=AEEDY?`pC%)^LsyqR}`l@ot=VdH#3aavdJ>3wb4s+$)x|0`Pz zCXuPKwRU4AHBTGfMf2dVzp2hQd4=9UIF^p_q^!Fd8CRx68GLb5Th1j2!<5N(M*&@y zI21Cc<^lC$gw3J0(s?GiU{i&wM?#^7gmJ=3n|WqIlQg1fH}m6a#M=ypIMh&GAEp}3 z+VWD;bAE@C%H-E3+?BP*b?qB`C(A*QE!fLq$R+>dn5+D_ZV)oqlf%iqrCidS>vJr~J zj6#iWMGI=4VS-ppDIkXyTu}QAd)C)u+Oxg5fW;6a8EFv|=Bp#0u4?2Sriq%$Ez*+I zx%uIhiZsWv6~5DQ==9mFWlS$er{}vm=k-RX6DedR-5p$~(-j~&9sm7O`M2HN_PSeB zy^Du0D8futXLdw1wUCBjrWWu=x-q=**}+4cT5$VriZ?FzN$tBnBB#ZjGm7e&ApU%mTkfVr-S@LA#zL z`j*L)3up$@@^J9P@qO-6o~fAP@X2S6@JeRQnifw|6lAW)t!5BX2~T{Lka<{>f4Ycf zl_4opXT$^^%^$KRXZgD`AVkeeD3!A?!76id%>#NI)0Kw2*|_6Yqq#N3wu^9DrFda> z&o8&nBlHpv@9xO;NM?ojtch_;Z!+uP0q7Q@x;q@d;(O&HCTTrl)u#873#HiDl17;e7V=+Yao`n;$(%Ra}EpZ4LN{NZ) zO>1v=JmfSnTxQJEtujm~PDCzd*-~1}P@BD-zSf?zs8b88qD{R^gUJw*#ap#v9?mHc zZgC%AF%LT9X^LdnU1CJ5Zk=U!Ck3qgwHA&FEH^}RNfM5>zj5#4p1f`q*PhNgES^xd z5N4X7Cy+jxp2Pyq$!YDYFh(KY9Z#KHeNq$mOZ@HWvfOQpqcfp6OUpCa9gr_r=I)YS z`$Ie%gK=ii{oJ5dx_QAd9!|uJs52p_5z(1N{-=9o7J|deBbXR=Qij$9l2JQ^%91UZ z)@pfM4USjZR@)Xofw{Cmf-REuYw(jK&?=g)29zkVa8$rr&QKEUNcT5XAgp}Syw>>L z#H^DrqghXdQEGQLs4i$cs%SM%4AE)WygZM#Y|91D5n1d# zR#jR>%0UkSjN&4m6(BBJSpL8JBE(l@)=+kl@9)e?f>UR;u~;pj`5Je5h%_kHj!F-O zu` z-7z9)megW6<)KN19-N44thl=Y7US_{UQ&1-i_>yn+X4Xgq4QXxzPy_{dnqYsyDoU7 zbLSG7Cc;p*t;=Xev8S&a&Eu;}(~<~|Tq~O?^k$Cvixp4r(EKF}e|YK5zB-fI(Z{@p z(V9_$2iWpSZ(J+P@J-1eSsgqrc9wDrf}&sSX{>ZKqq?275cMCDHH%}*!->E%Qfw^t zLY5IEEX{%clAyc0#Az~P*3!JtTzQ_@3vHfH-cHg+z=q7;Vw8>hkPtlr#3!5xqib1T zAQGBnp42R}tqXY~Xp2Tp%5_7MY=(NB)FmTYN@`5ehdEQ4UVnm)w%eQ~JUe4gXXe|* zHz@;9KpAZL;F+*2s!gU9!jg*aWo`K6i4>k|8^PFwcoCa=aT&L=jegojjiLyxl=1z> z^oBT#f_q_MQO!2bKC8pRBT)dB4eJgWbt#g}jM9QJfBuplxmGHyQeB+|99rhqoegN# zyqxVCqy21)i$V+X3)+|%9AfU%fD8$9Ii!NA+yc{z_?JuVS_UGuBsz%7DV6n9%|lgh zgR7cUWR{(Yv3S70Qjz!nU+Pd#cdlKOQlCU8cK>|!7ffRk6vTvM2~3?Q3ZBy9%$i7~ z@-X$mbkEE$EY63RatuT#d6Uu1B0ExK8f3F#cQR+PQQyTBnC2cN7H7}q;a_WFyd+8v z7s(!^4!@_Qteyqf*sR$TX3oaf9udh2 z*He}*Hj&+lcR3tqgIz}yxySFti39^%RCt!zE!=J;+F4EfbFYq)x1V$+nx*EL7O9+a zZOXSBw3#!TNlF$}v+#8xm;P!xY{xrIh2>$I4*p-7KBudLg^wSY3E=DOp`>W28m>^? zVL@k4vPoN%LJbA`yE=H&@9MVoL$>YH`Mt!btitG4a&Q9bRv{tNY*V;LC3xr{^%rmm zwM}LxI%cJWvm+(x8Iri&HvH&YeLikAtM`zf>|nFkp#wtfmeD8Hx12o@-;kpWXro$c zb_iMhayBHaIr#x&8tY;?)isWnfOEr*E2At%=Drr!wT4e`!j# zJA^d-0nUMKVZ%f<)fjU!0-Shl3D!KDhi96pJE^d~7_Z6&lRtxv@#cC`6J1wl)(`fg z*&I2Z9;9YhJijO@U|e6{EK}rLZNB~tW!>;)dTpH4Ftp^IVu^5(4zJ`Gf$h3gLwp3k zuwtr8TrLk&7e0w585Y%zl#3xXSI-WR*^9F`t8Pch zGJ0e{ASvxfv&@wRES#RM^a#QAl@Riw3^eHzf`V0cEwmNxY?MMEMG-X zbKk{i;ww~{51_6N$R5twFt!Xm-rze#o9bI2D;VAMd=hQ2{o9qxDlJikqH+k#IpRK9 zHuvV{=L>a@r5|l`FxeGU^gMY1`KBIf#O!NHwP>E=Ia1zsjz+`?PACo@rF7D2HfvG} z6>qnr(6FXcZ3Yi06Fi9K_>s8; z;~*6wI~Jd^Q8}lerF#JJe7b%Q?qO@wXMu(F(A1do=$yi(T|FjYbskw*C_9+ZBD@oY zq`RTx(`1PHr-snn<+wOM=hiA~7p(@ypOz&+AR5+|ksYOWGpBw+!E~6Mp>B4L6*&q| zJBVjcSE*>*gqeC5<+^Mc9?H2c3vY>vR(Y^w7F&lMl7pSH3B3|$KjlO)h|@wk0xNR6 z0Z*bZecnkH9%-eFE>zE*A^~#<60uzOO@Snp9^XCLa?)tDr7Yx1pes4gD9%(Z7N4;@ z2%*z#9MlabsgiJqJ%zbl12?I|!VpEOma6|A%d5iL$VwapNmSd?~0TBdfi z1il-eHEBa;=5=bSWqP@@tD|LNUuU^xc5!?>ueZ0SJbu)uPR^XOkIpXMsEcw$L@u4* zH)>MViyt!MtQOY0NGD4^jz+N`HFosa(JiCLwBSpOK5G2vdA@2 z3x|#wed38@;=>M$bvt_KiDSmZC&!~>ijzL+#Iebv6HXkbTYF>l33TnU%ls9}j2^)| zV|Zumh~tM$pE`X?l}=+?M-Q3g&V0*kb|A*by@Y;7+3NXtY1|SE(G&Z6=e8VMEvG>e zt!&}MN>L_te0*$MSMLzt;>GH=Oyufm;TytE{f90uWi7P~`VEgJuTxh|q*tC-{dYYYUdt4c zyt$GIoqLiId~)Ebfhz{Cq(jdPEUi2p58PT=!_B&=vYdfzWI$`_^-VMt^iwu?<~E3p z9wQMY876i0LlUfT?H5HVD|ot&I#&-|Szo+zCoR#7fvceR22p%t5XcnNl&bnY=1Z3HBo#meP5mQadTbF^hZ<3f=A+xXKu{79wzD+`%rCv zWet7pcOq4uk=3q3bi1)luaUF*@a_ zSp-|dlTS(-25yQpPfScd?HNfMGGZ%1HI)rbo*_%(C8`v4`!$J@h$bb)>OoGPf~Bq+ zxWy(7W?-7>qV-$dNVy}b+{R?W8lr>E%@R<9OKH>eJ!qqur6$95> zonpuhCM{AAYEJU9Of^|SBuH$o!tkA1Fp8inDBo|**s!UyzUWm9qQ5$-gb1q!sTVF_ zw$@h1D4wVpQGe4n>7F&Tjyb5K(x#i-y3$|3Diw`Ii_OgX=pRB^knKpj3jZ=&}&Vvi+dO@Ql8yFRO>4# zgCWb@N(luEP<=kIG*f~OuSAc=12^ks>D1eeF7N|&spWN&4<^QFZK@t2LOTVMBeFjr zk>Glg@tH(Q_*3O=YGIXTgRz-fus6co(I!pEs@j`AdiZ~Z&GD0gN~r%Z^RgAjI1qqu zXSF~R8EdoaQRRLbzK*F~txn%(a}i87_x+4%eJH>j#nyu6QR-)vxUBg*D-i?JBAa=K zUN5JXC#l!%550(Gxf0)jJ~^o}+AZlMs#A>adfFAFxg(oUshZv78)NBUF)&$my&bBZIO=!X~>T4s>ZYg(>T`+TPE^F!48RrmJIIOQ*DPHKMF{8NcYBI#c3> zTDGl@pPH_qC8=PEf*Q5iuUZUf0kdv2Q)fC2JstRh&Pnu)eKeys2Z78oh%4!q76#R? zr`1sGUujulBE6t~ijy^BTB`{yW*WnX&;-e$s+%eJaE;{e&Sce*VaLqvo13jf{1ZCU zzdAnCEJN17BLi18O@BGLv%YKpFeqUfT!sgPE5r5R`R5x&8jeOXFSdH|_~@}~RW zY!$K+m~E?ug~FTeLr_??ZA+(YT7>!su7N;43u1400Por6KsCA!!sCL4<znRSi(oj$aU(=zL*(U(dB`D^Ht)#(Zd5;nNJQpAq4$nP$tN2bhyhEN?YlTSKON($K7`XN=Yc z>>)u(R=6URF^H|_jb$}Q>K`Rd_cUu?O*l<53v6G!`Z(~CG(Js-ti9UM62@0ZtE0+2 zBv|$%q?CCh?%HyyL;9qDaOIp_Pg1Xw`zdM9Wn&g>`rwcqw-KvvL zrOdGiBWEo*fIg?IdGLgoArWF5SNfe(GyT4KAfE(z%{Cv1urfK2;QB65IO9h+t=7>t zK_IPWO)m~o4s|KBL_o=-CiW7}*QVd1<~5ruvU1Y}c-l-ORt&y6 zf3vC@*oW!J3|9*iR{czf{h{`%Q3%}HsIV2YF*lru%nB1dt;m~GdUrX`tW*cF8w z<{VBkITiDvVWlAJ0}9ejQY2SJ`Ub9EOk|_7*1wNilLtApmhmO63_+@UZIQBZ;2Pt# z4JfAc3CdlL`x+^qRF2HhLoXNUM6H^|F)C_YR|E=a4&?u;tCiIwVEs%lc_<=CHD?%$ zoHJ&e1|@g~A8s@?D>W$RS<;ep)CIk1l`1CDWJFJ?SdiOlmPsW}iP_<7>j;vGn+smh zy(qHb^eG+{&p1N zN?%Q`=sD|iJ&h`=$hB=otw6nGK5a#unNjDBL^HCGM*C{kAYihPl`zR{qY3dLu7fQY zg@hsml1(Hsft7ljLVsk27`b$v{5jPRbH9oAhY!*T80!)0kymD#pe~uN;-uhe3Wjkr zqz!UQ8B%cNZP^bEFemk|WZ7k4DXOWqMnxPHE^=MeY?d3#(|%Qc>ItX$e2{@FvS&n> zUtE_#FP2kDb&2jv%n-v!R&j2Vh+ezUD4Il6MIvdp@o@OY0tvM9bV7-A{Q;4eZ6?Zd z4K)VE6~ii-88J1nDYBfr+1im9BD8c(c0HqQUH5ySN9slv6E{-I(EJa0O%vO{`4$GU z{fFYxAFH8FqBYkzcO{Dm{|fq>B8qc86}kcOu4g=d`nW>QvgAwB;U0_YY{HPTY0~qx z<_ED_?tO(Y{U`{km0k^kC57fB2=0Yx!{C8ZWm93V4LgVs{hX%M(G24>i*xpeucn)E z5~&8RNOMfF(=s~8bXFSeXX{Ea7`(meGD5>4Lu(bpuUUVl_#ql3KwWX?tC1GG>jgRS zQ2BUeJ$6@iN};uWc>oHOXwxF=f7u3m3#8TR&6TQ|RevKn!CZNWK8u}eV$?oE_onpq z=}h)Sq-+|VnT2eWaIGusFvDQ4NcA^)CUsw{ro*DLmQvB+{U5|pUIs;cn=uUPDW-9W z#Hg~~rp}tx8Xx|7h}_y;hQQ&nbA!i>o4i&VwAW4xjW&eD2UzvhcQ92qi4upQY>iGA zHq`&NK(iia#T;VGx+}<7Ww@yFD3WzG9kS&q&rOpq6W72SsnCU}KF@8-&emBqJXe$O z0XDFfYS;QH^=RQ`Y52w!d}evhwxS8XjXRAXr;0!VXZ&ZCQ<53B@Vtbt!QYkP%LOO@1+<@?qwjc(r*&4N?ykal)jNaW+F_+x;gxm9i33SJ$S@N!l3nXpFZo zCVHPG)4!`D4?v)L|I_SS;wIs{gmwq6VtU?iyO3WD^Jd1K=oI#YoezA^RW)sr)(uU; z)Tj~Ix>mfiyBPpN;D*D zu%4C@xECnP5Q!h2-N12QPVW-tAGp1;f!~#=;ouq-A?Zpu5kcqhLinkP%~na@tImxk z5k7FWo{2s*h?6{J{E?>mU&dOt(!a|uI{u%vV82+=yoGeRYAZ6LFp^8A)=!vt*X6d~ zfSS2wlYM=YHHALaD4TTYlTjG|@-)Hrb*sme1yTlpXYOpSCvC0RxG;)R!B2U}#F9Uo z+#pKSMfI(!1+sN#eZ?N|3;H#2uATpy3{0wviIg-1?=M|$S^!<{#69#d$P1-p?~u2u zvnzKq6%lM6nnu>D_UM6*+1N1;jz#HoAJnMEh|;$uU{=80zRYf*n62uWHGf&YTN3H2 zX@KQO+5{bpDk~5$_?8J=rzdGo$gn7bnJ6W)jqf$b*_l5OJ8>orjaEz|DAM9bYogP)xQKx zJtiu@E$Kh%kaom=wp=q+V+T zo=%Ixwlb_B#$K05c-4-8q48I&l& z!0?bLC(U5B^VC=(QD_>Tv%dMFVWbR2`+X1v2h-@VR>GR{Jxn6+KwhgUB@*HHZfaCR zRfB~uRHolTh+C`|kj*L1064`6zgK5XoSuI97=Ky8P>H6U{ZQv*PpUtegHlM2!Qsgb z8fRzt+Kkj9+&0cOUr>rn0ZH4EV&KVY%e+0+VVj%wi#wU~Cb7OME52e96id^YS7~Pj z6}5IAJ<$K=W5olxm~-L+gOI3AplM$N?cC#}X_Evw900VAL&$e229bRWRxGbP7*+00qZ!PX&W3A*bQF5a zD=;U8*<)9TL9(2@hsT)^rM_5Hc}P_7>3|NIJ#5Hf5s?s`Nuw01KD#FFulZpk)g;HI zZu0>J_s=vmToja|lPXFgH|^m&4dM5YHdS@aQKmsV@T665$4_ZS@%_|S?T`7cTh6A! zEfG_zW#s)JBn9a81;hDds@6P?NNX z8ApYs?^0O7gh1VsQHT8AoZ@H_Kv9!-xTT7WDZi8Uq_yy&65a8nCM)hz{VI-~+Z)?0sNU71pqYxhO9+(_JGm2}TLId((B;n?0I76^) zz^0ZhMeG^8r-{%363(;4ygSH#IPRf%M53*Ik96laSuqFh8b9MtVm=jCvys)t_ZVp)d999vWpr4~SxqzPei-A!Yq7nyCKi(hXooW;Ch&|^ z{AS-ts5)-9$lucPweGMTZHOgcHC{^N!ZJ&;q+-D8jyDscQ8N;?mj+?UcqSe`IzG_^ zA)RxlYHdOItZ6T5+hadZYi|g_+cmq7nS*pG$1*!A7p$d5PZARyeke@k>dmizHML>s z*W_D4{Qh_H+hGmGlaXqH7V$e`DxeOlKbhq@oFLvDMDk>F^?b(l-QJ20}XN(h`T@Tgm zdv98C&MphpJiC1b>C?#0`^QzXk%&2-MqrbV972MBiiQ3kwwXSim znDNO#o99P~Rbh-UCZ=1mg>J^vkR!pKzxAUoQ%m$l-$Jieze~v=Q%`4rT@zEGCbHg( z)!r6lQsvZk1>O&nt0ohcgeI(s&>U3d6w?&bw)$9&1co!#dSCP8XR}3RCnbgyMq%rI z(8pEo^}TR~0HitbUm|9v8vCVhnN#p0V#5pBh26b1r5VZ~Js9+XIEP6Y_!XW5@ z;91KWW%8+pN=&;2KN0?v#ej2RH=UoMcX$vymBNzqV4FRe?Fe(@SHH1RX+MnlgSP~W zQhnkIo5FLOhdHfTHzGso0sU~T2n7^qlkG_ZRk3mRI*G6;Z_1z))6hUbsB=Ul6Xd9Lc>ue5w}TrCnL)I;vv6nlX^cMy^zD3j+(k{?^iUHephfr zY+3szY{Xj>N#4_`dzl;4)yz}S{sXw$vc>9|PG1HKXI4v;eZ+We{Q!#9SBRNYDdJam zv2A;a5+d@_q-tr`;7QVdc`x=;8sX;`Dc!HH0VF@bNE-Q07CCaTkQ20EizGlilYB4K zzAKlWYchYj?ybb}&-6-qRqv?-AzJc~PO9Anh)|WEW`X1W<5gjy# z?rP9L7^PYas)?pGQ)-^vL~zsPnslB!(ema^MY%6&?CNex6TYo7fQ>R}DX*Yr+e-Sn zW}PnA%4C8y@`J|62}hz#(Z6CC@sV?@`iTc_`Z0_ovmYtCYH%Tol_$g=>;*kdYNx_w zyr+c=KD{{CI`lKJbOmb>|@3Qic`X7ds4P#o2K4Fu7 z9Ut_=azriZk*RA45{_d@`Jy)@EuzIz7SN%!8agl!Qss*6QT-<3kArOxFx~&Y)@h{n zS2tm+`oj~_LABE>=G%NJ(VSv6yT8&dxN=52aim3*f?+{2;k6H0W7kuPZ3|L}>LEHp!ZlQ`geRzRhBLoZ(g`D#^ujNLNVQ zH~qeRQWnP|y_NMPlwdzm+9dn}MYFPQJ{pEKuFv=SOciPPdPi<%;=Ng5ie;Jz(-;?M zEN^GEWfEQe*ji@bT6v5OIw=WLNxP>%S7OF9m;|XaCKuMGLmoN~Q{-DT=}W3fOG15F zMeCoSIm~QSzaH&EZaj|GW}I*bFW3f$YIn0j3&HELU1kNUm(u}jvF3MGEt@7pEMv2b z=?LD2ziMUNzi@V}Uy$H%tg!yW)0tNi?%mW8V0A6q2gb#`XDZ3Io346ddYwch!vemc zlhp-0zN6?0eN9kJT$=ydK|^nKUh|~`1ci4B5Pwc@{7n7$q*>|eQE=>ocj+$z+ z_@s4tGEJXmn$1wb$|q~fa0o)`pjMo+FI4Hw7^U)>b63-TFb%6cs-bVY*wP~evao$x zp5SKiVoa^o@IVYVqu7hyw+RMlJf?qv42F%&JSZIWSlTbd`dpLY2& ztC8RmS6h%Ii|3`xYJa=qUUvY@b>rLv<0Hf4l)l5wP+8Z;7M%!gDh!Ro(lhae^ zN`I1toLd45LhHNd3UG?Fn< zjpn)=Sw++qK&!=p>D>RPkp@45 z1uSJ`UG2w9hQ?-Wn%G~7P$0E?y}ag5T=07JJlVrwm=Bvi#ma=6bkgpjCWS7-amV|( z(QgEqq7vP-P!mldOqyWGw%W)Bo@5QZptWJNp@*jaJgQKWPcx{NjK9fRIy>^%+`_~M za|?|eNmA;65(N#doF~4013nB61-4K1?k+v5+C~f;`E)?M`tJFYMG^rb0gefKFt(Gp*D*?2L+D*H_6f8oTGa+D%XI)-j=GO2SZE zal(EGL2#3k!#(;+Vr#l>9uC@=rfqU43Woz#?IBXW_RZ)KOzRu&xpiBehf8HiT` zE(>qMrLM>QKo{p3?B_hh4B|X!CLT?u)HMN5TtoRNw2eb8h#wMRiz2lwohwOa3QQMB zm0%3&zw|{>g*hZzzPE6TJa9i?8w~dq;x-XVI~(aUV`{w|4j?qH3Ycw)m^fky*2QF1 zD(3-iVNEinr*!ZvxI41@>DPy)C>U4zqh4YSRabL(!1$%|1aphIsiTQEBq5UMNlQ?m zNv7#DdoJG}mDQvSw87k^`Vbyg*i}A(&dxd2&0Jtm(2$%%O9HiFSKV!UeQ;5%?jbWd z6`QU=J*%1#=jQ6Wfvh506F)4YJn6O7!zM69^Kf7j>OGAmYar=rv5y=R8NTq6m?vRF zy<{rXempNJp;kf(e*UFNz0%waj(ThOdSEGQRWVp~yOcIj`!K?rS*$)%Q+1~6nT}PS z9&}x7e4b%1CfE16RW0OJpZTRFzP}da4ZhY+NtjI&!EBb3Mb`N#+hLX?rvr3h2R2*Y z`YNU~+W}?8B|1G$cdTVUr%$m#doRT$PgOs&LXY?{LLDuvHc~z6TQP(!5R;(b_nSYcoDY+W~B0<2qu! z>W?qqWIy*5e(OHb!UOCmy`dMVGPN$7eaX)R4U+ZaQN!%d7}$y!ZxAcsh>YOSX(3$6+$e2q>2DD4ky-KShpCjWI;yCA)!Uz?!is zy40OSXc#tYROy|nY?(+L+z45nh42k{-&I$2q=Q875S#7FHjguMr=Dz{q`pvkb>TKYHhHpVc*cfR( zm^|`v%AmSiA#dIoUdmyxdgw%C;#L<8CkWQ(D2Ps zq2ox5`5;c1mBy}XHBuJTkWEW-)~){3{e#Be@i84)Rb!$>GP5)weSZzBVhCW=mS>T8 v@k#VcTEMqVnux~i=OXfz3kYfuoE z=->i~TQV9^Xh8%_G?{ssyiBT}lZi7EC!6y!Ni;K)#L4z1dEejvoO|n5b)#|eUOu6J z_ndo{|M{Q)cK+vf`_G5$b8n#k?HvTi0mmI>rR2wPV}syBl#U0-fn&hY;3q+~zXSX* z_yzC~@SEU#@CTsUpUaQ;fs4R>!7_LNxXhPVg8Ngx4TOYXEjR+a7d!~u;PGit{df5H zU-I~M@B`HUJ@`TJU%>sqx50hD{{w2iKO67p7y+vOFi`bJdprr$_@{$Mg5$tLz!{*% zy#^FrIq+C;3HW~SZtz5KBdB$J89W;N8p!{HAM!)=9C4-_?|4wJ4ygVULG_RP z`z&}E=eIC?&+rg3GtDxw38$1&H;JL^KI0{t%+d%PQEvSAEf|AE= z;342wLA84g6dm95_+#)e%0CCi&;8GH^Bo4N{n?=Q=OR%3F88>=zmGg-LD79JsP!%P z^`8X~rhFHu{*U_lr$Oz@0H}5U02ICd3bKX4e}bC#bT&y&C8KBzzIVd^JftqhA zD1P4n8b3hIw-y`)t^-d3Uk0xM{{u+d@Z2(bs?zrUk+-Wp9IB+ z9H{m6gQ9l@sBv!rB^P&sTJMwK7_bUT&i~-+PrJ~~KMz#DtH5Kxc2IPG3e>m{dEDgj z^Pt*410D@-2epp>1&WXV0IL7Lf?D?h7rFMMK&@jeC^?=8iccM&y{#fTHIOQ0w?TD1IM(v77e-Q1i?N)qVk}@jvO`Uk^&& z?f@r&FN2f8eJ?@g!5N_VaVsb}TMdd2_k)s$jiBgx4Aj0o1&SZLL9OQ-pz8k-RJ%7p zOm6TCkE13!zwj~e1nO6Vn(t{)^lkwqA1{LHKM0NjUjwItBKj0y8mN8Ffuip|Q2jT6 z;@^{?`0z9+y0?Q`-%b#h6#Nd<_+wbS`kw_#?k)ng?#n>Y)dubbUhT^t2W>w+c7xit zUQpv)2Ws3K!Q;SHp!o76D0&9Ky}>Vm8viSx`1LoS^!+=a_Uk`9zJH3Nry10^XM*ZC z0Xz!41Qfrn0=51EC_0vanr}I%_NzRu_3!TkHQok~Pk8(ysQnxO)&DD?`hOD?U%mxu zp6~klAAxH3mVf_iQ1tIL)wMqX+=p_L#};2d9^9My3w-@0;J%cnf*Nn8$16b58G+(c zH;5?(85CV#2W1yt1@{Gi3W`tv0m^TWnC9A@0E$nidOQQvKAj6{Kc|8k zw-wwE{J6(XQ1kToatRb2%Rt$)n?a5HIgjf>jq@ZZK0F8R2W|tU-@8GLHwcQ}e*o3~ zyWoD{k3o(1@4oySQ1k_t2EqBj2SCk#8K`lt05#8_gBq^`)HqpCHd8(kl>M9mN)E2}m;trkK2Un~6sUdu8mM`H03HFp>C1c1aPzz$)I2AHT355j zv7q>L4yb*<0MvXlK+)R^v&mw@W`Y5)F4P~)%m^`8T^uMdKv;~7x>xBB-lg0d4|_E`1rzYC6_{(t-O ze}L-$YfyCjmoM)>)2;U)P~#pB%FZ4Ko&lZ+N}nzVwLhN#B{w+`(;eIZ%FcWh)H=Qo zYMvi~BfvL7&G#!%cH_@xx%m$DcpRvHr+7RaRJ(DY=$Q}j z?NN_Ufudt8sQr8a6g@9{{D!Z84GgLOKB#r=HQVv?C{X@s6sU2p2GzeE91He>^4|}G zTK}uyXz<@a?fY?a+`1=#TE`Sn_HrgjC>`7kioV^T#(f18oqr3yAN)2bzWcGePn18c=-CgKD=FRJ&V1&G!KKLGW=<{_c5Da`tsl^!_ub zb^i;f_HTg)fxq_k`_6Uk-Vdt(VIG@7jdKzBA@HN1*4YkfoG$P{un2w-{51F>a5X48 z*Ml1Gi=h0+E8xlCKY`-UA3)ic13rq+08a!*fz!YbgLzQn-wlf1_26{yDezM8ZBX-G zIM4BMHYmPydAtr(zcrxv@F1vpH~I2Y9=Cv+X9uYEe+5b|Uj@atfAIKyQ1bC(Q2V-X ztK-9=pvotJ+NaUrW#HMM?Dh(fqeyTQD7kqF)VRL|MbBPsj=lpy)gJW31GRtq&UgGf4m_B06L=Un!Pj37YCk^)YCX$A$%dES{|Go0{0XRi z8oR*Fa|w7RL*PzO<9@@}zYd;4`3+wl zag|%&!Jx)D2GqWM7}Pw?pyodV)VSyP@@a3C9 z(R;fu-v?^^hde$CN+16cJOkVYYTO@z8s{xg>-#yV^T*y-yZ4ho?Zb3%Ech`{e7qf$ zTzv^V4g4869z6PEZhf;rjo$`p9an>=fE~X6HjisS>GQpy`0^K^);_hgT!gU3-m)0gLh;?n|9bbbO9J>8)Ak@N3A z<=@}v%Xfg9?;cR&KMcywJr0UbTYUW+pycdLkG})eZp6o(-W&;P{;{Ciodb%G(?Hqv ze*gX<@Oa9Pf@W7h(OU&Y$3K7?_lKbN^WQ=7@oiA;_y2R(|8P+6&jclB=X#v$u^ZHW zE(bO4UxMd@1EA*n4^aF1TTpxoKH-#w-UzDSZJ_MkgP`{DSx|ic5-5KBEvR*W8&v)4pyIZl zg2#hD1J&-J$jx^+DET`MJQi#Lwayu!=9vvPf$iWMf5y2PlwS9B&<5N9o(=v4{4hAO z)4iVtYTp-wYrxf@+Mked>*xlhPuGE(e=Vqed<4|Gp7!-SLDBUMuo?U@sQC|F=;)ga z%6~2ZPXVv<^&7#Fl%MzI*FdfNEl~6QCn$dI-{tC$0aZTP;CbLy z@Lcd`AgUIO>UR0y8^Mby?*K*5Z^3iGFzfuq0#NesFnBWfm!RnRCMbS?57azwgW|(U zi(LIUQ0txsiq6FzZv&5@{2PI2N1%eh6F!s{Jak4SX0BUB3V&M|&-C^&bXR?gvMK4}fQZuYl6` z-+&=_+)^jk7lIo9V;*zhQItOgUIu;+Yz4m$ejYpvVQ2!s3+@LVu*}KX2f@QA9|f8{ z1V!HraBpw{sC8ZA>$ASR)Zu^e+HK zM+VgXmca|bb)d$54Lkwc5ub7Q3a5f3mZzwo%Cb9V>;54)3k+{{{dz(1X*no)Sp&9!kAwSxe+QPqe*&)o=icVpJq;d3`77W^ z@O5AR2T*h!@mUv_j09Ca6+8eO=Wzlkd6^7~-j9J=cONLeuK-U0zX)oczXJ~h-vUQ~ zzX3(>KC7IZ91EUA`D{?@z6umy)__{yBcS>{3!Vn<1V0S^$iF}6cGvz`P;xp3RQpRj z&h+oE@a3$>GI$W}J_Cl}?V#54G^qYBgBtG};6dPbef^uDir=20q_k_ zeE9{a`A=Bm?#Isrn<;++RKMFm(X+whv!M3>Wl;O|2B`fSai<&SWKi>*3u>O3p!je# zcpTUTjskB4HSbfP+I<<+I8{)5_%Wz)ehx~1_Fe1r=44RozZlf}%Rr6)aqvUnB2fIg z4%B=%fLDX-L9OSvpyoaJE;rAqpvF4`)OZs>wVMrU+)hyRT?-xpE(bNw-JtqC3hMnc zpxW>D_;vsOHBjsMA$SP*rmz14sBuQz?dp#OMb{XQlR@!!0jTjm?ePxq7{12ykvQ1rh9O5Xkl zcqsTiQ1t&2l)u{dbFTl1p!WAPU!DgZLHXmL=q!Wc(=DL--vesjAM@qi9={15LH+kY z(e*3vFmSK?T)!hdHhDY`RJ+SS(LEoOoOb&1&Hnwp;5pQ907d6(pymngcjF%kioVgl zd>*KA=YVQ=6?h=n2Z}G(gR(<6f%}6`f=7XyLG}9@sD1i7P<;9&sPRAW7fwEp1+}ho zLDkO&PX@0BHU6hT^}ofJp8zG_o54lkHt;O)q;*a|7Jy?Zm%(en$G{ojkq7z5!|-Z+i?LbozK8C_XoXdx7VI%fRzN(fvHAelLMq*WZ9g zf#3G^{|>6%??BDB&qI!m!#$n`s^7)n6mS+8f@?w9r{};P@H?RBpZ>6yGw@@S%isdA z3Z4fxueVe|&;d@Q{0gXk`)+Xa9|QIW*g!A~J_d@u4{mh!^(av7&jh7c)4>zLJSh5C zdt48Wr@R?F9Q+|DdVd3+0G|Aa)3-^W`gMUCXDN6Lc)zdT0*YT>0gne?_xL+dd_8)T z!w-X!%QHZ=n+A$+ouKyTTJSh-M>jF^aOF{9c3)Hxa z!Gpnvzz>4Y`0`8O`za5C^T6+ddxPV@fbN55gP#Jofct~v{?f_Kd7$KF5~z8u1hsDq zLD7A!ufG9QyS1R!@i?e;zW`nZeiu~#^PX~ipAL?p+z);PeA3sy4oVI_@U)xf6j1Us z7S#ANLCN1ILCyaeQ1smC@d1yIgQrvftS`R~N{;^(90~p&lzfC=Ttzym0+0LO!$1vTC-a5VTWa5}ixW*3*v1l6t|)Ow!+PXoX2 z%LhH{`b`AYE)PooH-a<3{{qK?mpJa`Id75b&5S zj*l%KCxPmJrN>UNNcmb&^S=Qe3SP3+@w*M|qnrUX-rs{7|Hq*A;e7*cyu(28Ve>I=@E+zx({@>jvBs^8(p&4F6)XF#p@v*2X# z0bl=JQ1kx;)cpSiYJK~>=;ZcL@LDCo_Tvdq?fw?jx?lJB z6JP%;P;~6K)5-CX;1QH(fok6Yik?1D^sEF&fu9An56^l0Yf$aJh~BZJ=_6)82o2Y`nmUR=a-s6wQB`s@4LYQxC&eZ{tnc93tw__(GP08&x4Zh zZ-DCeeeh^-pD($6I{_45MuB=i2Rt9V7CZ`k8XOD$75EYGR~|=y+4 z`s+ZAe=B$?csHna{{*W48{j_R+o1ULTVH!5UI~5%6#u>rP6U4n zN}gK2>gb;es^2xB#?5-X-s2ijbUgx!j;BHKXE&&Q_-F7G@YkT|J>joh`%&Prl*fbn zfOEi$!B$XwyBpNFUjUB>2f$h2tDy8D{A+)11uvq!7!1PJOjPXX4tp~FOA5u#FgT@Y zVWHR?m77bUdkFJ|GLMyfrz*nsLZK(jc1{RSY0_hJXSzqNX(1n8S}1hoGU1eBc5z0{ z7v`Hw!!}O6%tiUGeAJs^_H4;!j>5%JF54OEO(p8eFoJ6^sucDW3k$QkOfWIbXO@JO zzRsweQNL($l+8u$xy+bwaxUA^6GBb7I}^57%4HtgGr7W&uw00H@T9jndY8)K;!LrW zE#${AYN?H)Y%_qmS#)k5a@k;FCu``X)Y++j;gmvel%*|?Mt><&v;y?l%oKX`K9F3dJ?@M)p^iJc4$z52?bg{Thk-ovi-tMTF?Fc63!%Ds<&tzeySVR^J9UYZo zrgO|5-sn|0Hw1jdEerIb+ARoH=%EIBD|KX0_~#x(mW3Q4f#_`wJD85an|HVF?m1 zrm{EVSX?S0Mv{qAxl%NySCGDZIol!WO)E_>kv9eQ&j7AD3|U0E8!?}iZ7)W}{$OG( z?unAncClmGVnkY7y(H@FMgaPIqaur5mMOMJ*+p!6Fe&Qj;YZF1>ZGW*T`eX>r6_Eg z45h_FA>XWWcTct`WEUqF@(Z(F6)$?OuDrAy&O;lJVJfbzWP(YVMGTb5Ma4=<>ztHf z?6B!-rpQJNnaOuCEm$hskC5?@f=MP=s`V94(k68m7WKifU{bcHkmILl&z5p*O`tCJ zBb<^cqxvORXp^40$L@#?&Sdgo)Y-`#v4+X=l$<$fXjjbi78cWTVX@Hbv~fsV85(Z@ z`l4bvEG#rDVXAA5CF|+I`yvd+pg)2{7>Ls72KRrkgmUZzD-pnBW@&eECT*#ENJ z?80oOb9C6}Ea}36*?f$1Ur7wH2K`B|eAwmuekYvD6~rGXEEUki$)bS8gW4;xzV;0?#klicC4f~~7UbZG@+AC2Wwsm9JQF}e~7H|xD$aiJJ*4b@y!&0U!Wnn5;X|hyT zkm8zOnjq)y1|LO>Ob2G!u*Wpd#TTk57J4!)r#sW1$s-AqyR+>b-I36?StyP#ii&s; zRrh6<^lRbWg^qHxL|DKlMdryhAvKjsk4ZvzWihrkaB+*mk`C-pQH++e40|zf(nVG1 ztu&v;3>VZ}Wh*I=BRUA(7Kcl)f-(Z?jE5@5^-)I$@m+b0hRA0+To-v*RWN(mynS84 zCXUJzl1drMTB%$}o+pH~=|gORA`uH~D-dCIh#!SYj@XCz68U!#g-EMe(0Helb_+9Q zg4HL2N)`%BDJt?LfN2YD%=19gpp{ z1upLB*spU!=zv*O3n3M`1b_Mv6B@>_ogCvf zd>A^0BVk!TQe7e>K(`A#5hKZVPF(_hOA6S6VCvG2T%|J;&O$|W+DEi}O{Y`t#FjHBLEtl(7}Mt z@#w)^ z7E*o({#sfo<$h>WPQtt3(rm6>Rv#g_v@nu?9NqX?z|@mx2`A2-5zfr?H`KId5cjew zlf+x>xZqb#XY;yum~_NSX*5hkFYk(lybcLG!P<`C(jrF({mk^7A9~XpHnF|qK62KX z&GC!b1qQ})s1~AJW`Ba|Q5J4Zk18eoToPr)o9P)2m`i|c zS9cjG5?=??vseL6Bt9&ePJGi9^<&<7BUVh$7PH~(Lb<{d0X{BZdM|!6n9jKZ2g)jV zEW6O6_7pbt77)f-OxPSuuaJhYGuiY?UlhzB6Bf+qAZx)a9l;E2(u^*cFe6v!;b%UK zlP)tbS48_-zzl2^eqctPkRpd?46kr0L~5{4coIxm*kpyg#pB4w#L7~Zq+?xd>cWYo zQi1G}d`okxYli1a4@)F7$5UT6x)yYv-E44(MeVRNS}>z1hh#r%?&v&uqw(@a{>9}) zyV^xwPzTLg#AW2L?DTRO*;Ds`AuhB`blI@WtbpCL70)CWP_)z`PyM);nNbIa9w48O z*kMqqnwbbd%giX(M^;SF9FqE5$Tjtll%$-oiDz=$>18*mDRoy!4QZGqDlUt9x&x%V zy})ERnnJPMQ7M;HW%8z`YXZAY;QZ+YCR~$;US#bG8^aMOI@Ub zTo~i@(78wKn%r}9X-qhqh$`x`yfr6uJrct(V1L8`K`K8pTkPuQQ_-1)UT8q{3j9Pl zp}tTmM)uH`K^%gaoKpLhrkYvl?S~N+IL9u56|Jv=Vdn5Ui&QL!*;!GyMxUiT96x=| zJAO!=e&ebVt<(+UsGp0)zgd}O(545UI;i&_vrN%uA(s*HCfK8}wDXKgUSN3!@}USw zoPi*FUEynMwM4pIK0@Ah7MXDtXESj)Wxz3G#ssqp9VWzf-jW^G0Xq(BnmQu&&$KMb zw2z_E9au=KBQ)g5S<(Cl#)Y zbi7ukB%jHJGp5wu)TJZc8K*OtP1wa*1!Dj$S*(7it*6i(E$InnlWgM@Guu?deww<^ zMoCEIQ4b}-Y|gh?5=*Jf^_)>N3&9*DXmJKWNrE|@8Ln(H=ZAB!0Nu4>E4!s4Gep6h zOw`9Ei;~@QGJOacz!&rS!3_rC#GGtY;)e?jc&JE4=P*@)ymbjWno7+`BilH#?$Q8f zLdGY)ARAL_Z-?y(D&t4p5lscN_m-zqJ<1Ic$yHP8X6h=g2;vl~MMp~K)ZamortmI> zA;w6J#A9L*of}L;OWlPfyyIenpQNJTPzgq1;q|zLOB7qAe+uW|L5roHU=H?ZNe21m zAx}D;j{P|QV9v5EcIxtW&h4bi^GTR-`J!w)S&Peig3GyNvfGVL@-&6f_GpRYs8Z(o zMz?DArklfdOfQ-$Di+16lg)SZhKXTe;AMG>md zi%(*2=jtbSGxh=p$W;pGhvZ%=elT02lmr2)fT&#xR;HzH@KXC!E);SB&P?%aIN$CK z<03|kLu#e07(pC&;cxAbrqm4fg>6`(F6IvBb{9BB;JYE*B}v(N3)o2+v#XYf?8W=k zPTdQ$#Zp<;a!3bD%(?7*d_<08+r~~*76lQR#D8E_d9G z8{6#|N#}(NiN46Ylr+9EC+mxokJ3vevJM=RtTaZK}~MNz4Y0nhSiwnEv0 z5(QMLqDryVLwLc3sEUI0d>7%3dlz0bTxEL}WhM>H$Z@+I?DQ3c4Z%Fc4t_E{MlQ{0 z)z|>LUgZEXFVi6jOC-ZrU^6D_YObM}42VK0MVgLErc9#oLc7YBkzYc#J}hx;AT)Jp zR3%Kt(8k>)Cl64jB&t71`f4$umMCW{EjORqDuyx9&n)ee9I3HdWxKGb+9Vev!NlR) z**61NOuMeFrnTI>y8d^@>B~hOTA;!vEswiMcM@;NbmBxY`euG(gG}ooSyt8IY`ycGms!kR zN-z)CVPT{_^i$@pOVt8GyM^WWd7j0t^YGHhGIthPanORAd|+nQrvseXPVB9F*UjNi z{BWe>da3z_X9Uwasd64tS$~IH^2G)ZIt+rGP;5I|qY_8ARuLKJi|b3aV!KjmW2@sc zRx3dOqwA++)^7Ndl0WAsWgqG#%zJY9&@ocqkijt3rLe9k8RYG86J!dh}M7}=0nV#WLdWEaLRF7JS+fD+lfNQI?H{ z`?ouIWTkEx4(RFrai_*+M32gK#zC_U+2_0@jMk*dZbX%CE`+5saI|MDo}- z6G=7>88pvm$#uevR)P-2jjbHZIH`7qZQXc26=h+a&NwtfPEGuUgB}U;S{v@(tfEiu zh;3rFptaJ@1rT6Y9m&a!G-!pKBn-1~+8sP-)l=bo(^}!PCPlTaI6X{$M5nTBX@P?_1 z&%)XwI}=E7C8yX(5jkWGHqx>eCe^7m|B-#T!)Tm=Djx(SUwttLSM%8@&ME1-cMQbP zQ~`^{Tr#TlR|&k059m028qy`(j#M=mam@AlOy zuTJ_Ztu4DaXj7^H;cerfOt(A-U_N9avZSUboXa;y_Czik0U=DvbBn^-miA@&gu&M& z*FKavB!^9$=u0Gce96HKK9kFL5=*p|vb~%!w1ARjP1;IiGoimi$`q5N{22}2a(-uT1zn%79J{^&nNR#y zDF*Xz|-H^>CA0ISTLq12vZWq926hn74pR3sW0)$7&X5CwSu>%2l1s?h4xh~SXqL7RFUfIbA1&QvJBxu=95a*1N zUWtt_1XpHqD2xkQuPo#W3xg}ofNBA;U6~snFBWhDiGr)59@5NLk+#1o>QheRDwci~ z9}h_Nt|}BsGXwvfV8DCuJ#-$9<1{UXt;7&wzZJX@9J*mH6M|s4W|q(LnW^CFsEQ>uI3O+*6wQE4RrBmM=%msS4c=$q^e{QpL3(wS-he|a8j;P92x41sL(kYe`g$}GXYlQIrej%8<&4Qr ziRIBo%)Pv=WilpCD`}Y$mASqeKX&}sma*fw01U^SIpM5xP9Mw1DKu>1#uiRXfw8%KI7;!zInv# z8MCL>I6ZF6*b!*BBDR*c{yw-_nqmsfXIH;2_-)dBt3Tz#Rsm7cpo;Kji; z8f{l~dv!~7JEQFJH*tpP&RBIWK@nEt@8k^WmTDx;a|Xr}x0MyVG`Mnb#o!GPv~zG( z^@VV7O?4X&JA&$Z7P6ZKZHMaHnabOy>OIubV{j$B*(L7mu0E>=c=MvxNr!&{k31AfT*#;Q12Pnc)NMxdc!R1tL zuWla$olN~AOx-MY(qwaW8!a|FLaICE0WFIrmj=<#Lk+{P9K4NDv~u>4ryCgQPH4GF z{k8Rs{sO< zp;a(yb=NTOkUnvr6^Xr@#Y)N0FfAnZE-rP{Df=c##In|;R z(bMv5J5X(ig%k)jo)6P>rEPY?(s&29*y@Ll3xx>E_8NmFvdmXw=jLI1LY_^u0|98* zqIaJ19Xq1>FbLK{6Pq)5Q#_Ug$ciR@ET6p^x_E?gv($o7wn@lL_v%*T#I)YRU0=EoF~Il%V@&)wxGGf-Tb{$_hl6*hojAJI_7K6PnI$)K|-jV01*n3trZ2XSbQ2%B0AnKM$r@BX=i- z*cw0{djoN)VO6zL)=2wgEyPEJd7ZtGJ6l=Zg(%Yy5k=I~v@*6WO_t~dy{ywR4Y-kU zF%fFTy6~D_t>j{5d&PEs!LNm#5cL+i#AKvIWUU6#%JdG=(6+FV+H`M0Rc#A__WS&z z7~Ck=L|dpsqG}x;p#Lo_X+V3l&NRbEK0I%ROE3BcXiR9Ukc!DCNgwbn!}WO%^JK1N z4}I234QwScK9~xvM;dD0v__mNVUE3}7R#aiuFc7#qKmBz;es4iff0%AB%Vt~q%Pn{ zb#|7HO=nA-i?FEh9sIO{wfNT=lZ6x4q}_}QbDU*nQ-tP8c?_+y>M3A zys(0%0qdViK@;}LKi*zj<93MZi|kh(VHWGxz9lg&g$9L=H%xTH)R&n1R{Fp-h&BnW zV+gvv+rlX)!AzWl$ugv7lOz$g2R<^9DSr;KbdIb2?qnUu{*;+zRb;hAr?gEgX12O) zZE7-1xi*LxvT>&nuWccscTapqtVzdv+@d)6j+qNla-%8X($>ODFBpR>hZBrH!i**p zjMly=P?8O(=f5+rnkuZBZ$+8!wX=MJ3>2ykyUpXj*CFJ;3Ak+-4r%Y11{SF3tA1`7 zqIcFC94!oTyC9iH0?h5eVU6evmz@YqwiCO&16kti7spBp2$)F*`eqrEwJ>6ZHAy=U zwP6Cn+_gL+XY72+^{l5--FEWR0*tjZ#>mz?AQ7{LaZ)~zb`;mxE+_U~iiQzPPar3? zRq`fts4#>)^Ab<2v zA1uu>YaaPmj%0)cW>^V}#RA$QnYA!>i<^$KKe?5l`UsrUJ`he=VCM5=tV^fz)WjAT z)>K(G3#;T}Ko=spgMv6B)2gFAq(Xvd6T!%{1Ys4jX{RYfMS7`_0e9yEu+7w}jni0( z0ICpTD-{ZwWLdT#J+B#~WL7a5jh9!GG?=t`$rUXyPx7GihW5inUBs*GCNqhJjhie2 zL_58`KB#4_iqPv_!!S2`tq;z%p=xlAOjB&oHZs2Kr<4HsdV+^7p1_m}s9NH^T>BhU z?{_|pE`BF4(58iw0v93a^NwK}!fc7WZ5^kY#(``P<+H?0ZI}g5a(b>x8$dq65kE@g z4oJV#%3|8++?LaWMk%(Fs5**R2DDM2T2rCoPe^ST)P!9!fwN_Iy?*K~r+a0lkS2yu zl;nHiX_=g?OB`I2^)=x@crV3OEWwIvzRP397RRax7Mm2V#3Bm zkJjuMm`e4qEPRwP5}ijbkxmp#!HHJs(kA9x0*ftoF!?IAu^_8qf0@7T)V$t|&+U>D zqGLDBR>pM-`#hujtt4cWUL+3QMP|}hXyBcEy)zADf6zvMTx3u;>M)?SB!;Xrl8Bt45q8AdO^VOlGX^7hgT+l9K%!23MiF^&=`fq8yx4xZ$K{XnW?biD)A~wapL159MlYFBG3PR6xag2C1Eo zjp?HO9uo}W4)uAKbzxOfk7N%vx|2U+zYwo}oyily5B$beY3ufwt>S=h2G?SymFZnD z?RzIyT>P%1o8#AR%QK~{oHJ@J5hX2_agfKw)rnXi4OTb5`wU7@B=o~&`LY4q{w?Nm zw>gPQho$dzP`4M_I$0e@dMe6gxO*f3OpJ?@O0!$iJ86w`z%ePj7|zI|ZtET4tYk9= zhdG>8w7^v-GmDN{m{i%t8LUpxmr2GwsJq3XvIo*zalyh;rLt&ap%S7*JE{?ydq^#< z*0X7(qHFR*E!ev|hBYasVJx0;MVj`DPh2OFH88=o8>r3x?a0Q&< zu_bjEM%)G}pYlR_*TrWlj3^~Ahnl#l?(-y;CQ@8vGL*CQbq)DKr22IA#W5DlI9e4s zE9t?PSardP`wI_nEFERYk#AOy_?z*eC0wmtrktDaNAp6TC16#2BBF!7Z4Ft&nY`6``FwwubO zyynxANOo?Ph_BEp9-0aAji~QrbS{ z%&P%oMMHzSzoNlXkapOcScuqEiiM_QoI~nG+PE@ASVfX7NfKA09dbcKkJhPkGe*M< zlQApFfhUoH47U?c4Nglulii7k!9$|X>h^j%%?)r|mpS(V4xJETnHi{i6z-65*TF(T zV7(o|5D@a){iePhsI`PwE`U*9iT##2abF+EsA|1%u5Qv==txH8z07Mn*f8CghBekL zPW%_ol|SC@`LAb8*}JWA$XuvC+QwdQ!!4vv9Z#eB&MTs3aF#a&bp z;u)65Jcs*U!|P4z9%z`i&Kg_7W0F(RRO{9IT{os)|KFCX}^3D$a-@_Gs%)#ocgb zIGuGyafs*D5Q;B!O`A%lXbP!jJgbvm_CwW{Fi=gLI&*&r*F{EtAB@+CeVt*YL%be{ zBw@xCKaQBS>k9+Hekn|R(t$_Q~Si(hIABHNQd7(pmGC_RByp(SGpijET5c<}{BF15>HJ>6P%Z@q{ zw0K*vtlB-;+BKnzsNG>CiNeIkA^BZ~!YE^{6%Xl%;A|($(^*D`QC&M}q7dr*2~bBZ z%oFtp6r%OC?1&6+GS?q5Q#>krZJStg*h$u>x=V5^wldMpbVz+jq-qz(HYDiojH6Cx z%_UiOsDMT}qBXJ}wQN=5pEQw0#e+8m)w^Xy`N8rrDDLqE8J@dg!X4FZjKL20j6mue z2pYtvjr0b~)ksKgmVvJl=1Zac$-tzB07f3cjtY|R)Um<>Yk#zJ%I)M$yfy-Tg70qa z9B$Uqk!)oW?r*e#iPuMpd}r3N0qbbZCwTT7?WD5ZpV0}DC#$b2nT!vH^c(a_ALZ*L zs=;F#B|QEL15#=0azt7%l0yOm2{O6S8wH~hI6s#CC2XV0`pG)!_+os9AGI~WRVaZ; z^^qq!3TYhp`(TvVVs#5$J~bYPmac=g4qsP%XHFG zf4WC`B4^N$3?9)}PV`!aWi!$S@qR8OB&Ii*VmftFL+QExu^x_zh>WFWF+z-lqRIR@ zZ^!hHX=C}f#U@pJhnlNWvgzJyjCP@yVyd-y(~Q5FUVt31V{%Qnd6jIRO~S1 z?0P?IhH3XRj7h`&W~dMFNmfOO$&PdWlHfJU zXFJL*^G8?OX%DqGTGn&OJ0DZgpTxHNqR4-rBZWnzwz5$h=BH8EoIMS9XWt)lEF5?f&?k0f?tvE7bglV=A@@B z%4}b4pVFrj+2@9x37cwvRH^DM4kHfR(p1#`)Dlyf#_O}Q^wvLP3`xntGvaQ##l5Cj zmduh#X)(6eeFHY6g+;$Ch`6P;taS{F+_4~ZDLsLEVJ5Y%HG)2*9T{teF-M_pa^NVW zOsq33JE(k7QqB$~X4$`#;@DoW1}T8;L0UmvJ3B(vcfJ*g5r6$ex3b&1A+BQ+o#C8o zq0LW!Vv8?eo;9{0Yz{|b*H}?i;vO7niaDi>W=@qa*C&KBqJ-Ec|GUYYfPHEx9eenf$?xQZEheaRcE%8u8Er15W|8Ggl6(wDC*{!<9NEV? z%x$0J)c#(T(PLjZvUGPx>bFgtRJ@alFxD{=EY>2-fXc}5NW)m}%$KWb1(o{tDkZY( z*l=aIF(Hl(HZ22U>((*1z79`|g9%MqGF8Dpq7j;#RgjcH&I5o+s|cdNZul@oZ|q~T zp!$q68p%WYirBx4#}fI8SZX{xM|vf$N@>|tsQ&ZD#U(~4%Z{96svY!9EnuxKEGRi(ys~rYN^6;4}zfe})poN-| zl2W8@wOKI&FK=N1bdno^h9=Q2FQSly{S!m@8{~C={0lF+$D!-KdfH>F)G?ZA%zyY} z3nbXz2on>uL70Dbnfsgvtf3S@m13xQxVtFYr-ST(c?vdMX+is%!m3~q%qHK4{J1?+ z^wBW7@j)9qjBqsaNc^Ng79qGIo}35th`JWkQc^3@k)u?-8t4NN zU#Gy;7HyhiiSL0H>h$@0DmSTKu}1N@o2^@?e&P%J8&)5&sT8GI9lJ&s>?ToRKp3Xu zk&<&*jhYy#8Vi^@jafZZw}JH7&W6La~wynZB9#k!giR##Id{nVFIR$)oH zI-ONDr%-K@J(^i<7+C9e`iOCHt;p?)Zlj6A&#tuDQVUr`M=uZTL$V&#*K7t{++e2C z?oQzueQANjshuloE4BwSri9v2X0mmK{x@fm53-PCI_oOQye{qR##lo%R7&A=9!W)W z$|pT&OLXD_izP#jDN+Je$98x?ZAq@^y`m@ztX>;kx3h_R(0j=smIwAHCgfgan4m;) znVR4~OwqBRMmZWpoub6r?+b|~4~;^S*oTM3A%@k)z!C-RO3XN&l1QZ4h>J`SMGd3uvx^43eXXrSFBQhrE$$v)!6(Tc6md8MWpI%sPP$GsjN@+Bax_&KPzt*|JBubexMr9C|?6^OS_K58I zxXo`>gJp-K7!8+#Qj#Nyv*00qTT1F;1QCVV7ZuVvcMjIqqoP|fjzDKA1Y$IyM2Z*lIh0~@1*?^d|LMX+nTP$2bibrxZm7Bftf@Fvhg-&xjLiQVJun8^*qC*X2cxEK_FK zWwQ&Vh$2vi5{tnN0S$FXOC4)8Y@K&=^E4#JYKbqYvimivoswKBzEn-tZvfFT&T2u3 zi`e0$yWYmK=#AD@nFV%1)XTTO+srIBp4+@s{p^g|Fu5BT9>|T>ekaJ;K!gbg%anRB zAKBpLrB-t6tIWCcX^N59P&vH6H;purhO_8lEgl=>+D+D2iK%$y1F;IbmsngoCNK+L9q1(r5O%v9y#uP_V}r zGJtIH9=h4Oj6WnpEs4yDM@I$u$PF;s<;11F1j7pKZWgO<}VP94RL(0|!#24m=fB&Cl0O;i3JQxfm!Yz84> z0{>!Tp=^OMNaja*C|>Z#KGQvA3uJMVeikh6>A&*oD2}a)hnAH4$dyKlLDGL9N!H$dG*uY|PjeCs~hzYxj-_k!BbrkyDw7$0=@MiK(jfMvL}8^<9C;OI2}zgz?H3SWG+2+m|F7?!Bh9 zB#|<7k}At~N}x<_Bq02=P@JX+ND=|#=cNvG(qTxFuIN?yH__rK+H8Mjwyw_A)XTFA z1{6+M0BqxEe(92L?@L4l>?El~`*KKsu@+U)Clcy2+WuB;T+uoUQ4aOjYU7%^KUiDc zAo~3((@9_baoR+fNJhpcRw-X;h#bmu7&HrleM&(YHSuB<@wT6>jt}gCtfx}04F3*k zVVm4IXjViA2OkLjKb)OO>i=wRb)zZL?s{2Mr9?xLG9YD9(Q+B~$O3hYLh$`NOKUKuVa&J%cKOBCh{%>vw?Cb zWyxnpM)+d}8a?vlxF=s@=C?7$MWuS2uIc+lY+XWexFiqUo|# zvB~g;Qhp@9{G$)7O8vbKS3#wX$2bC%U2<g{9n`1 z0&M{?HMK!BLh9>{m>olwo1&3-(tH`sSPPN~(#w(#>U>)FxlS_kyYeE*Lhoq@o?}BW zX6)jNOpB(uw3J9A2bdZ^UUg~>b>~_Ir^BtlMowjq6@|VF{qNWXxfR14h;GcaDHY?o zw5t4nAbJbG&_<*U zqn9>6GAvu5q=7g~e$(DYl8TEWa&5|9C?_oghY(>SWjv&&iht}(p#U@fg%BANUgP25 zjG_t2xp^-yBZDhVKND-^fBiN6XIF+!38URy5)K(_ky5i@-ci+NkP(ogS?&-_EO`S-C3Nr)5-5tF00PYvxS?9n*lYuy)f zs&rRXsc2c15-g?l5lB~T_@qrIVo3*E>{1M}E>cqrcU`(tVU9JlfmpWWCRwi*p<5Ha zrnIHm8jt~3kVvpG=1N?yrLLZLnCVoYjZ!jnvf(E2NkHjh4LBqB+W1F=paa(EV4Nb& zzM8@dQK!!Cx2&0QofhggL2R&y)m**ok`A_Veeubz(R2_K#b50; z{xba^JB3W4v5xie-AhO@eS|V0uI(-BVBb=+)SoR_HB>ha$+$zwvtK&kFkpL{`inI~ zrAa#_g{mJomLo*p2lDQdcK7FP#sszBYS7%GfE>2mm9yhMXNaufNvJe|wM39|INYww zI-^97&|cryaOK&z)Cp{kpbgx4d~$ssE%it}jv-ALZZ@k%|C-=BO$1IYMlvGmm- zihgCS>~eV>HbB2q-~%Ro6{(;K!gS2=?@Sdmy8oKOjbb;?q%7>(p5gTi$r?SbM|oi( z<3SWMl)R$Zr`X$5=90~{Z>Xp#rdI6y0IIggK;e+ zs{7mj8kA9XFmPRfq`5RPM$t`d;ZHmSRbuYYgC0whC`g5tV|jFI0xxiY?6JP$SPl~s z%eKij2aTz(d_h(?ZJhb`8xnPzNx892o)wB1A@L#RQfR3~;L@1e;?J1ltl!5uYKT=~ ze7Pxoa&8wBa$n+-FUTMup0!Um(P~X!i+1b}lA@8-XYB`F>qI-INO7YxC+1BYnW;)= zqb=ru3%HHpI@-ZDabTDq*GNPT6ZEIt!Up78j!0khi9CfXBDsND!oP=yR1PSTiPPc3 zb#rOm#(ugqP=L{(?t`l=XiooSAp1`&$XpK1MC>`Uu&Hk7J*{VtNeolo6a$Dtbd`+N zcj_q-up9>V(`*lNl4QGwsdC(ub$VWr7{f@AWM520YeOj7OS$AEW*%ltcDL5gzS(uL z0)xuXTb!A0Vna)X2G`g}51VLYI&r`4y|?MM|Ac#__R_z-gwNhnv*bJWJvTA2s{2$d z{vtU3Z&0{X=FnRO?zD8S9_EGpJuUxVsDSrUOS>5QqdKI8dyw0tckJXo<{70OlStS> zO$KDoosbTEWpeyd6y$D3hx`Er6AZg=WN;HM{|5mzKyoSzs&z4{)i++iFa!Fz2WFX| z)qf>`?8{cmrz!%pfW|Qz8z7IXpqhiO&Y;6isLQ(hdCy60`1iQ^O$2sI@28^myBHXc zaF;l!U9(3sL4qJnhJU?JcL##MP%jW?D)J6!iWBqKLgRi?e}4wn)GCppVm2-trld`Ha?> zCP}}TN9+5w--EXX)xV&>Ocvtomb%jg{><^bgVa|SVytlJ9eHg8{nt(SH7hKmq)8v;7%L?wbz&^jyN!P~`+c^D%8w^O z%MNU6qwu6@WOI+WC4+`2#iWjZKf zU?@A3Nxu{_-EJR;K))SqskGQdGUES(4GNg;L#cq5*nwf(vSf-;1Jm?|jD!;$#z?}2 zJ$lPvIOgj(AmYs%1};x1F?6IqXHxHe-|Ge~TCtnr@Kl~m$*K6uU*5^V(kx|8wZM4) znZT0v7c-c%TrwWFq0_51e1j$NCo*pYd5`w(!JHerS&NB1JjGxr5oUIb, 2017. # msgid "" msgstr "" -"Project-Id-Version: Calibre-Web\n" +"Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2020-01-12 13:57+0100\n" -"PO-Revision-Date: 2018-12-14 16:26+0300\n" -"Last-Translator: Pavel Korovin \n" +"POT-Creation-Date: 2019-12-08 10:07+0100\n" +"PO-Revision-Date: 2020-01-10 05:09+0400\n" +"Last-Translator: ZIZA\n" "Language: ru\n" "Language-Team: \n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.7.0\n" +"X-Generator: Poedit 2.2.4\n" -#: cps/about.py:42 +#: cps/about.py:41 msgid "installed" -msgstr "" +msgstr "установлено" -#: cps/about.py:44 +#: cps/about.py:43 msgid "not installed" msgstr "не установлено" -#: cps/about.py:84 +#: cps/about.py:81 msgid "Statistics" msgstr "Статистика" -#: cps/admin.py:89 +#: cps/admin.py:90 msgid "Server restarted, please reload page" msgstr "Сервер перезагружен, пожалуйста, перезагрузите страницу" -#: cps/admin.py:91 +#: cps/admin.py:92 msgid "Performing shutdown of server, please close window" msgstr "Производится остановка сервера, пожалуйста, закройте окно" -#: cps/admin.py:110 cps/editbooks.py:410 cps/editbooks.py:419 -#: cps/editbooks.py:539 cps/editbooks.py:541 cps/editbooks.py:594 -#: cps/updater.py:446 cps/uploader.py:97 cps/uploader.py:108 +#: cps/admin.py:111 cps/updater.py:446 msgid "Unknown" msgstr "Неизвестно" -#: cps/admin.py:129 +#: cps/admin.py:130 msgid "Admin page" msgstr "Администрирование" -#: cps/admin.py:148 cps/templates/admin.html:115 +#: cps/admin.py:149 cps/templates/admin.html:102 msgid "UI Configuration" msgstr "Настройка интерфейса" -#: cps/admin.py:185 cps/admin.py:412 +#: cps/admin.py:181 cps/admin.py:403 msgid "Calibre-Web configuration updated" msgstr "Конфигурация Calibre-Web обновлена" -#: cps/admin.py:442 cps/templates/admin.html:114 +#: cps/admin.py:432 cps/templates/admin.html:101 msgid "Basic Configuration" msgstr "Настройки сервера" -#: cps/admin.py:465 cps/web.py:1093 +#: cps/admin.py:455 cps/web.py:1056 msgid "Please fill out all fields!" msgstr "Пожалуйста, заполните все поля!" -#: cps/admin.py:467 cps/admin.py:478 cps/admin.py:484 cps/admin.py:499 -#: cps/templates/admin.html:38 +#: cps/admin.py:457 cps/admin.py:468 cps/admin.py:474 cps/admin.py:489 +#: cps/templates/admin.html:35 msgid "Add new user" msgstr "Добавить пользователя" -#: cps/admin.py:476 cps/web.py:1318 +#: cps/admin.py:466 cps/web.py:1259 msgid "E-mail is not from valid domain" msgstr "E-mail не из существующей доменной зоны" -#: cps/admin.py:482 cps/admin.py:493 +#: cps/admin.py:472 cps/admin.py:483 msgid "Found an existing account for this e-mail address or nickname." msgstr "Для этого адреса электронной почты или логина уже есть аккаунт." -#: cps/admin.py:489 +#: cps/admin.py:479 #, python-format msgid "User '%(user)s' created" msgstr "Пользователь '%(user)s' добавлен" -#: cps/admin.py:509 +#: cps/admin.py:499 msgid "Edit e-mail server settings" msgstr "Изменить настройки e-mail сервера" -#: cps/admin.py:535 +#: cps/admin.py:525 #, python-format msgid "Test e-mail successfully send to %(kindlemail)s" msgstr "Тестовое письмо успешно отправлено на %(kindlemail)s" -#: cps/admin.py:538 +#: cps/admin.py:528 #, python-format msgid "There was an error sending the Test e-mail: %(res)s" msgstr "Произошла ошибка при отправке тестового письма на: %(res)s" -#: cps/admin.py:540 -msgid "Please configure your e-mail address first..." -msgstr "" +#: cps/admin.py:530 cps/web.py:1039 +msgid "Please configure your kindle e-mail address first..." +msgstr "Пожалуйста, сначала настройте e-mail на вашем kindle..." -#: cps/admin.py:542 +#: cps/admin.py:532 msgid "E-mail server settings updated" msgstr "Настройки E-mail сервера обновлены" -#: cps/admin.py:571 +#: cps/admin.py:561 #, python-format msgid "User '%(nick)s' deleted" msgstr "Пользователь '%(nick)s' удалён" -#: cps/admin.py:574 +#: cps/admin.py:564 msgid "No admin user remaining, can't delete user" -msgstr "" +msgstr "Это последний администратор, невозможно удалить пользователя" -#: cps/admin.py:612 cps/web.py:1359 +#: cps/admin.py:602 cps/web.py:1300 msgid "Found an existing account for this e-mail address." msgstr "Этот адрес электронной почты уже зарегистрирован." -#: cps/admin.py:616 cps/admin.py:630 cps/admin.py:644 cps/web.py:1334 +#: cps/admin.py:605 cps/admin.py:618 cps/admin.py:632 cps/web.py:1275 #, python-format msgid "Edit User %(nick)s" msgstr "Изменить пользователя %(nick)s" -#: cps/admin.py:622 cps/web.py:1327 +#: cps/admin.py:611 cps/web.py:1268 msgid "This username is already taken" -msgstr "" +msgstr "Это имя пользователя уже занято" -#: cps/admin.py:637 +#: cps/admin.py:626 #, python-format msgid "User '%(nick)s' updated" msgstr "Пользователь '%(nick)s' обновлён" -#: cps/admin.py:640 +#: cps/admin.py:629 msgid "An unknown error occured." msgstr "Произошла неизвестная ошибка." -#: cps/admin.py:657 +#: cps/admin.py:648 #, python-format msgid "Password for user %(user)s reset" msgstr "Пароль для пользователя %(user)s сброшен" -#: cps/admin.py:660 cps/web.py:1118 cps/web.py:1174 +#: cps/admin.py:651 cps/web.py:1081 msgid "An unknown error occurred. Please try again later." msgstr "Неизвестная ошибка. Попробуйте позже." -#: cps/admin.py:663 cps/web.py:1062 -msgid "Please configure the SMTP mail settings first..." -msgstr "Пожалуйста, сначала сконфигурируйте параметры SMTP" - -#: cps/admin.py:674 +#: cps/admin.py:662 msgid "Logfile viewer" -msgstr "" +msgstr "Просмотр лога" -#: cps/admin.py:710 +#: cps/admin.py:697 msgid "Requesting update package" msgstr "Проверка обновлений" -#: cps/admin.py:711 +#: cps/admin.py:698 msgid "Downloading update package" msgstr "Загрузка обновлений" -#: cps/admin.py:712 +#: cps/admin.py:699 msgid "Unzipping update package" msgstr "Распаковка обновлений" -#: cps/admin.py:713 +#: cps/admin.py:700 msgid "Replacing files" msgstr "Замена файлов" -#: cps/admin.py:714 +#: cps/admin.py:701 msgid "Database connections are closed" msgstr "Соеднинения с базой данных закрыты" -#: cps/admin.py:715 +#: cps/admin.py:702 msgid "Stopping server" msgstr "Остановка сервера" -#: cps/admin.py:716 +#: cps/admin.py:703 msgid "Update finished, please press okay and reload page" -msgstr "Обновления установлены, нажмите okay и перезагрузите страницу" +msgstr "Обновления установлены, нажмите ок и перезагрузите страницу" -#: cps/admin.py:717 cps/admin.py:718 cps/admin.py:719 cps/admin.py:720 +#: cps/admin.py:704 cps/admin.py:705 cps/admin.py:706 cps/admin.py:707 msgid "Update failed:" msgstr "Ошибка обновления:" -#: cps/admin.py:717 cps/updater.py:272 cps/updater.py:457 cps/updater.py:459 +#: cps/admin.py:704 cps/updater.py:272 cps/updater.py:457 cps/updater.py:459 msgid "HTTP Error" msgstr "Ошибка HTTP" -#: cps/admin.py:718 cps/updater.py:274 cps/updater.py:461 +#: cps/admin.py:705 cps/updater.py:274 cps/updater.py:461 msgid "Connection error" msgstr "Ошибка соединения" -#: cps/admin.py:719 cps/updater.py:276 cps/updater.py:463 +#: cps/admin.py:706 cps/updater.py:276 cps/updater.py:463 msgid "Timeout while establishing connection" msgstr "Таймаут при установлении соединения" -#: cps/admin.py:720 cps/updater.py:278 cps/updater.py:465 +#: cps/admin.py:707 cps/updater.py:278 cps/updater.py:465 msgid "General error" msgstr "Общая ошибка" #: cps/converter.py:31 msgid "not configured" -msgstr "" +msgstr "не настроено" -#: cps/editbooks.py:214 cps/editbooks.py:396 +#: cps/editbooks.py:214 cps/editbooks.py:393 msgid "Error opening eBook. File does not exist or file is not accessible" msgstr "Ошибка при открытии eBook. Файл не существует или файл недоступен" @@ -212,16 +208,16 @@ msgstr "Ошибка при открытии eBook. Файл не существ msgid "edit metadata" msgstr "изменить метаданные" -#: cps/editbooks.py:321 cps/editbooks.py:569 +#: cps/editbooks.py:321 cps/editbooks.py:551 #, python-format msgid "File extension '%(ext)s' is not allowed to be uploaded to this server" msgstr "Запрещена загрузка файлов с расширением '%(ext)s'" -#: cps/editbooks.py:325 cps/editbooks.py:573 +#: cps/editbooks.py:325 cps/editbooks.py:555 msgid "File to be uploaded must have an extension" msgstr "Загружаемый файл должен иметь расширение" -#: cps/editbooks.py:337 cps/editbooks.py:607 +#: cps/editbooks.py:337 cps/editbooks.py:589 #, python-format msgid "Failed to create path %(path)s (Permission denied)." msgstr "Ошибка при создании пути %(path)s (Доступ запрещён)." @@ -236,333 +232,337 @@ msgstr "Не удалось сохранить файл %(file)s." msgid "File format %(ext)s added to %(book)s" msgstr "Формат файла %(ext)s добавлен в %(book)s" -#: cps/editbooks.py:376 +#: cps/editbooks.py:373 msgid "Cover is not a supported imageformat (jpg/png/webp), can't save" -msgstr "" +msgstr "Обложка не содержит поддерживаемый формат изображения (JPG / PNG / WebP), невозможно сохранить" -#: cps/editbooks.py:451 +#: cps/editbooks.py:406 cps/editbooks.py:415 +msgid "unknown" +msgstr "неизвестно" + +#: cps/editbooks.py:447 msgid "Cover is not a jpg file, can't save" -msgstr "" +msgstr "Обложка не в формате JPG, невозможно сохранить" -#: cps/editbooks.py:494 +#: cps/editbooks.py:490 #, python-format msgid "%(langname)s is not a valid language" msgstr "%(langname)s не допустимый язык" -#: cps/editbooks.py:525 +#: cps/editbooks.py:521 msgid "Metadata successfully updated" msgstr "Метаданные обновлены" -#: cps/editbooks.py:534 +#: cps/editbooks.py:530 msgid "Error editing book, please check logfile for details" msgstr "Ошибка редактирования книги. Пожалуйста, проверьте лог-файл для дополнительной информации" -#: cps/editbooks.py:581 +#: cps/editbooks.py:563 #, python-format msgid "File %(filename)s could not saved to temp dir" -msgstr "" +msgstr "Файл %(filename)s не удалось сохранить во временную папку" -#: cps/editbooks.py:598 +#: cps/editbooks.py:580 msgid "Uploaded book probably exists in the library, consider to change before upload new: " -msgstr "" +msgstr "Загруженная книга, вероятно, существует в библиотеке, перед изменением добавьте новую:" -#: cps/editbooks.py:613 +#: cps/editbooks.py:595 #, python-format msgid "Failed to store file %(file)s (Permission denied)." msgstr "Ошибка записи файла %(file)s (Доступ запрещён)." -#: cps/editbooks.py:619 +#: cps/editbooks.py:601 #, python-format msgid "Failed to delete file %(file)s (Permission denied)." msgstr "Ошибка удаления файла %(file)s (Доступ запрещён)." -#: cps/editbooks.py:710 +#: cps/editbooks.py:684 #, python-format msgid "File %(file)s uploaded" -msgstr "" +msgstr "Файл %(file)s загружен" -#: cps/editbooks.py:739 +#: cps/editbooks.py:713 msgid "Source or destination format for conversion missing" msgstr "Исходный или целевой формат для конвертирования отсутствует" -#: cps/editbooks.py:747 +#: cps/editbooks.py:721 #, python-format msgid "Book successfully queued for converting to %(book_format)s" msgstr "Книга успешно поставлена в очередь для конвертирования в %(book_format)s" -#: cps/editbooks.py:751 +#: cps/editbooks.py:725 #, python-format msgid "There was an error converting this book: %(res)s" msgstr "Произошла ошибка при конвертирования этой книги: %(res)s" -#: cps/gdrive.py:62 +#: cps/gdrive.py:61 msgid "Google Drive setup not completed, try to deactivate and activate Google Drive again" -msgstr "" +msgstr "Настройка Google Drive не завершена, попробуйте деактивировать и снова активировать Google Drive" -#: cps/gdrive.py:104 +#: cps/gdrive.py:103 msgid "Callback domain is not verified, please follow steps to verify domain in google developer console" msgstr "Не удалось проверить домен обратного вызова, пожалуйста, выполните шаги для проверки домена в консоли разработчика Google." -#: cps/helper.py:80 +#: cps/helper.py:79 #, python-format msgid "%(format)s format not found for book id: %(book)d" msgstr "%(format)s форма не найден для книги с id: %(book)d" -#: cps/helper.py:92 +#: cps/helper.py:91 #, python-format msgid "%(format)s not found on Google Drive: %(fn)s" msgstr "%(format)s не найден на Google Drive: %(fn)s" -#: cps/helper.py:99 cps/helper.py:211 cps/templates/detail.html:41 +#: cps/helper.py:98 cps/helper.py:206 cps/templates/detail.html:41 #: cps/templates/detail.html:45 msgid "Send to Kindle" msgstr "Отправить на Kindle" -#: cps/helper.py:100 cps/helper.py:118 cps/helper.py:213 +#: cps/helper.py:99 cps/helper.py:117 cps/helper.py:208 msgid "This e-mail has been sent via Calibre-Web." msgstr "Это электронное письмо было отправлено через Caliber-Web." -#: cps/helper.py:111 +#: cps/helper.py:110 #, python-format msgid "%(format)s not found: %(fn)s" msgstr "%(format)s не найден: %(fn)s" -#: cps/helper.py:116 +#: cps/helper.py:115 msgid "Calibre-Web test e-mail" msgstr "Тестовый e-mail для Calibre-Web" -#: cps/helper.py:118 +#: cps/helper.py:117 msgid "Test e-mail" msgstr "Тестовый e-mail" -#: cps/helper.py:133 +#: cps/helper.py:132 msgid "Get Started with Calibre-Web" msgstr "Начать работать с Calibre-Web" -#: cps/helper.py:135 +#: cps/helper.py:134 #, python-format msgid "Registration e-mail for user: %(name)s" msgstr "Регистрационный e-mail для пользователя: %(name)s" -#: cps/helper.py:149 cps/helper.py:151 cps/helper.py:153 cps/helper.py:161 -#: cps/helper.py:163 cps/helper.py:165 +#: cps/helper.py:148 cps/helper.py:150 cps/helper.py:152 cps/helper.py:160 +#: cps/helper.py:162 cps/helper.py:164 #, python-format msgid "Send %(format)s to Kindle" -msgstr "" +msgstr "Отправить %(format)s в Kindle" -#: cps/helper.py:169 cps/helper.py:173 +#: cps/helper.py:168 #, python-format msgid "Convert %(orig)s to %(format)s and send to Kindle" -msgstr "" +msgstr "Преобразовать %(orig)s в %(format)s и отправить в Kindle" -#: cps/helper.py:213 +#: cps/helper.py:208 #, python-format msgid "E-mail: %(book)s" msgstr "Эл. почта: %(book)s" -#: cps/helper.py:215 +#: cps/helper.py:210 msgid "The requested file could not be read. Maybe wrong permissions?" msgstr "Запрашиваемый файл не может быть прочитан. Возможно не верные разрешения?" -#: cps/helper.py:322 +#: cps/helper.py:317 #, python-format msgid "Rename title from: '%(src)s' to '%(dest)s' failed with error: %(error)s" msgstr "Переименовывание заголовка с: '%(src)s' на '%(dest)s' не удалось из-за ошибки: %(error)s" -#: cps/helper.py:332 +#: cps/helper.py:327 #, python-format msgid "Rename author from: '%(src)s' to '%(dest)s' failed with error: %(error)s" msgstr "Переименовывание автора с: '%(src)s' на '%(dest)s' не удалось из-за ошибки: %(error)s" -#: cps/helper.py:346 +#: cps/helper.py:341 #, python-format msgid "Rename file in path '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "" +msgstr "Не удалось переименовать файл по пути '%(src)s' to '%(dest)s' из-за ошибки: %(error)s" -#: cps/helper.py:372 cps/helper.py:382 cps/helper.py:390 +#: cps/helper.py:367 cps/helper.py:377 cps/helper.py:385 #, python-format msgid "File %(file)s not found on Google Drive" msgstr "Файл %(file)s не найден на Google Drive" -#: cps/helper.py:411 +#: cps/helper.py:406 #, python-format msgid "Book path %(path)s not found on Google Drive" msgstr "Путь книги %(path)s не найден на Google Drive" -#: cps/helper.py:643 +#: cps/helper.py:623 msgid "Waiting" msgstr "Ожидание" -#: cps/helper.py:645 +#: cps/helper.py:625 msgid "Failed" msgstr "Неудачно" -#: cps/helper.py:647 +#: cps/helper.py:627 msgid "Started" msgstr "Начало" -#: cps/helper.py:649 +#: cps/helper.py:629 msgid "Finished" msgstr "Закончено" -#: cps/helper.py:651 +#: cps/helper.py:631 msgid "Unknown Status" msgstr "Неизвестный статус" -#: cps/helper.py:656 +#: cps/helper.py:636 msgid "E-mail: " msgstr "E-mail: " -#: cps/helper.py:658 cps/helper.py:662 +#: cps/helper.py:638 cps/helper.py:642 msgid "Convert: " msgstr "Конвертировать:" -#: cps/helper.py:660 +#: cps/helper.py:640 msgid "Upload: " msgstr "Загрузить:" -#: cps/helper.py:664 +#: cps/helper.py:644 msgid "Unknown Task: " msgstr "Неизвестная задача:" #: cps/oauth_bb.py:75 #, python-format msgid "Register with %(provider)s" -msgstr "" +msgstr "Зарегистрируйтесь с %(provider)s" #: cps/oauth_bb.py:155 msgid "Failed to log in with GitHub." -msgstr "" +msgstr "Не удалось войти в систему с помощью GitHub" #: cps/oauth_bb.py:160 msgid "Failed to fetch user info from GitHub." -msgstr "" +msgstr "Не удалось получить информацию о пользователе из GitHub" #: cps/oauth_bb.py:171 msgid "Failed to log in with Google." -msgstr "" +msgstr "Не удалось войти в систему с помощью Google" #: cps/oauth_bb.py:176 msgid "Failed to fetch user info from Google." -msgstr "" +msgstr "Не удалось получить информацию о пользователе из Google" #: cps/oauth_bb.py:274 #, python-format msgid "Unlink to %(oauth)s success." -msgstr "" +msgstr "Связь с %(oauth)s успешно отменена" #: cps/oauth_bb.py:278 #, python-format msgid "Unlink to %(oauth)s failed." -msgstr "" +msgstr "Связь с %(oauth)s не удалось отмененить" #: cps/oauth_bb.py:281 #, python-format msgid "Not linked to %(oauth)s." -msgstr "" +msgstr "Не связано с %(oauth)s" #: cps/oauth_bb.py:309 msgid "GitHub Oauth error, please retry later." -msgstr "" +msgstr "Ошибка GitHub Oauth, пожалуйста попробуйте позже" #: cps/oauth_bb.py:328 msgid "Google Oauth error, please retry later." -msgstr "" +msgstr "Ошибка Google Oauth, пожалуйста попробуйте позже" -#: cps/shelf.py:47 cps/shelf.py:99 +#: cps/shelf.py:46 cps/shelf.py:98 msgid "Invalid shelf specified" msgstr "Указана неверная полка" -#: cps/shelf.py:54 +#: cps/shelf.py:53 #, python-format msgid "Sorry you are not allowed to add a book to the the shelf: %(shelfname)s" msgstr "Извините, но вам не разрешено добавлять книгу на полку: %(shelfname)s" -#: cps/shelf.py:62 +#: cps/shelf.py:61 msgid "You are not allowed to edit public shelves" msgstr "Вы не можете редактировать общедоступные полки" -#: cps/shelf.py:71 +#: cps/shelf.py:70 #, python-format msgid "Book is already part of the shelf: %(shelfname)s" msgstr "Книги уже размещены на полке: %(shelfname)s" -#: cps/shelf.py:85 +#: cps/shelf.py:84 #, python-format msgid "Book has been added to shelf: %(sname)s" msgstr "Книга добавлена на книжную полку: %(sname)s" -#: cps/shelf.py:104 +#: cps/shelf.py:103 #, python-format msgid "You are not allowed to add a book to the the shelf: %(name)s" msgstr "Вам не разрешено добавлять книгу на полку: %(name)s" -#: cps/shelf.py:109 +#: cps/shelf.py:108 msgid "User is not allowed to edit public shelves" msgstr "Пользователь не может редактировать общедоступные полки" -#: cps/shelf.py:127 +#: cps/shelf.py:126 #, python-format msgid "Books are already part of the shelf: %(name)s" msgstr "Книги уже размещены на полке: %(name)s" -#: cps/shelf.py:141 +#: cps/shelf.py:140 #, python-format msgid "Books have been added to shelf: %(sname)s" msgstr "Книги добавлены в полку: %(sname)s" -#: cps/shelf.py:143 +#: cps/shelf.py:142 #, python-format msgid "Could not add books to shelf: %(sname)s" msgstr "Не удалось добавить книги на полку: %(sname)s" -#: cps/shelf.py:180 +#: cps/shelf.py:179 #, python-format msgid "Book has been removed from shelf: %(sname)s" msgstr "Книга удалена с полки: %(sname)s" -#: cps/shelf.py:186 +#: cps/shelf.py:185 #, python-format msgid "Sorry you are not allowed to remove a book from this shelf: %(sname)s" msgstr "Извините, вы не можете удалить книгу с полки: %(sname)s" -#: cps/shelf.py:207 cps/shelf.py:231 +#: cps/shelf.py:206 cps/shelf.py:230 #, python-format msgid "A shelf with the name '%(title)s' already exists." msgstr "Полка с названием '%(title)s' уже существует." -#: cps/shelf.py:212 +#: cps/shelf.py:211 #, python-format msgid "Shelf %(title)s created" msgstr "Создана полка %(title)s" -#: cps/shelf.py:214 cps/shelf.py:242 +#: cps/shelf.py:213 cps/shelf.py:241 msgid "There was an error" msgstr "Произошла ошибка" -#: cps/shelf.py:215 cps/shelf.py:217 +#: cps/shelf.py:214 cps/shelf.py:216 msgid "create a shelf" msgstr "создать полку" -#: cps/shelf.py:240 +#: cps/shelf.py:239 #, python-format msgid "Shelf %(title)s changed" msgstr "Колка %(title)s изменена" -#: cps/shelf.py:243 cps/shelf.py:245 +#: cps/shelf.py:242 cps/shelf.py:244 msgid "Edit a shelf" msgstr "Изменить полку" -#: cps/shelf.py:289 +#: cps/shelf.py:294 #, python-format msgid "Shelf: '%(name)s'" msgstr "Полка: '%(name)s'" -#: cps/shelf.py:292 +#: cps/shelf.py:297 msgid "Error opening shelf. Shelf does not exist or is not accessible" msgstr "Ошибка открытия Полки. Полка не существует или недоступна" -#: cps/shelf.py:323 +#: cps/shelf.py:329 #, python-format msgid "Change order of Shelf: '%(name)s'" msgstr "Изменить расположение полки '%(name)s'" @@ -592,7 +592,7 @@ msgid "Show best rated books" msgstr "Показывать книги с наивысшим рейтингом" #: cps/templates/index.xml:46 cps/templates/index.xml:50 cps/ub.py:67 -#: cps/web.py:1011 +#: cps/web.py:976 msgid "Read Books" msgstr "Прочитанные Книги" @@ -601,13 +601,13 @@ msgid "Show read and unread" msgstr "Показывать прочитанные и непрочитанные" #: cps/templates/index.xml:53 cps/templates/index.xml:57 cps/ub.py:71 -#: cps/web.py:1015 +#: cps/web.py:980 msgid "Unread Books" msgstr "Непрочитанные Книги" #: cps/ub.py:73 msgid "Show unread" -msgstr "" +msgstr "Показать непрочитанное" #: cps/ub.py:74 msgid "Discover" @@ -617,7 +617,7 @@ msgstr "Обзор" msgid "Show random books" msgstr "Показывать случайные книги" -#: cps/templates/index.xml:75 cps/ub.py:77 +#: cps/ub.py:77 msgid "Categories" msgstr "Категории" @@ -625,8 +625,8 @@ msgstr "Категории" msgid "Show category selection" msgstr "Показывать выбор категории" -#: cps/templates/book_edit.html:71 cps/templates/index.xml:82 -#: cps/templates/search_form.html:53 cps/ub.py:80 +#: cps/templates/book_edit.html:71 cps/templates/search_form.html:53 +#: cps/ub.py:80 msgid "Series" msgstr "Серии" @@ -650,7 +650,7 @@ msgstr "Издатели" msgid "Show publisher selection" msgstr "Показать выбор издателя" -#: cps/templates/index.xml:89 cps/templates/search_form.html:74 cps/ub.py:90 +#: cps/templates/search_form.html:74 cps/ub.py:90 msgid "Languages" msgstr "Языки" @@ -660,19 +660,19 @@ msgstr "Показывать выбор языка" #: cps/ub.py:94 msgid "Ratings" -msgstr "" +msgstr "Рейтинги" #: cps/ub.py:96 msgid "Show ratings selection" -msgstr "" +msgstr "Показать выбор рейтинга" -#: cps/templates/index.xml:96 cps/ub.py:97 +#: cps/ub.py:97 msgid "File formats" -msgstr "" +msgstr "Форматы файлов" #: cps/ub.py:99 msgid "Show file formats selection" -msgstr "" +msgstr "Показать выбор форматов файлов" #: cps/updater.py:252 cps/updater.py:359 cps/updater.py:372 msgid "Unexpected data while reading update information" @@ -680,7 +680,7 @@ msgstr "Некорректные данные при чтении информа #: cps/updater.py:259 cps/updater.py:365 msgid "No update available. You already have the latest version installed" -msgstr "Обновление недоступно. Вы используете самую последнюю версию" +msgstr "Нет доступных обнавлений. Вы используете самую новую версию" #: cps/updater.py:285 msgid "A new update is available. Click on the button below to update to the latest version." @@ -692,229 +692,217 @@ msgstr "Не удалось получить информацию об обно #: cps/updater.py:352 msgid "No release information available" -msgstr "" +msgstr "Информация о выпуске недоступна" #: cps/updater.py:405 cps/updater.py:414 #, python-format msgid "A new update is available. Click on the button below to update to version: %(version)s" -msgstr "" +msgstr "Новое обновление доступно. Нажмите на кнопку ниже, чтобы обновиться до версии: %(version)s" #: cps/updater.py:424 msgid "Click on the button below to update to the latest stable version." -msgstr "" +msgstr "Нажмите на кнопку ниже для обновления до последней стабильной версии" -#: cps/web.py:486 +#: cps/web.py:459 msgid "Recently Added Books" msgstr "Недавно Добавленные Книги" -#: cps/web.py:514 +#: cps/web.py:487 msgid "Best rated books" msgstr "Книги с наивысшим рейтингом" -#: cps/templates/index.xml:38 cps/web.py:522 +#: cps/templates/index.xml:38 cps/web.py:495 msgid "Random Books" msgstr "Случайный выбор" -#: cps/web.py:548 +#: cps/web.py:521 msgid "Books" -msgstr "" +msgstr "Книги" -#: cps/web.py:575 +#: cps/web.py:548 msgid "Hot Books (most downloaded)" msgstr "Популярные книги (часто загружаемые)" -#: cps/web.py:586 cps/web.py:1382 cps/web.py:1478 +#: cps/web.py:559 cps/web.py:1321 cps/web.py:1409 msgid "Error opening eBook. File does not exist or file is not accessible:" -msgstr "Невозможно открыть книгу. Файл не существует или недоступен." +msgstr "Невозможно открыть книгу. Файл не существует или недоступен" -#: cps/web.py:599 +#: cps/web.py:572 #, python-format msgid "Author: %(name)s" -msgstr "" +msgstr "Автор: %(name)s" -#: cps/web.py:611 +#: cps/web.py:584 #, python-format msgid "Publisher: %(name)s" msgstr "Издатель: %(name)s" -#: cps/web.py:622 +#: cps/web.py:595 #, python-format msgid "Series: %(serie)s" msgstr "Серии: %(serie)s" -#: cps/web.py:633 +#: cps/web.py:606 #, python-format msgid "Rating: %(rating)s stars" -msgstr "" +msgstr "Оценка: %(rating)s звезды(а)" -#: cps/web.py:644 +#: cps/web.py:617 #, python-format msgid "File format: %(format)s" -msgstr "" +msgstr "Формат файла: %(format)s" -#: cps/web.py:656 +#: cps/web.py:629 #, python-format msgid "Category: %(name)s" msgstr "Категория: %(name)s" -#: cps/web.py:673 +#: cps/web.py:646 #, python-format msgid "Language: %(name)s" msgstr "Язык: %(name)s" -#: cps/web.py:705 +#: cps/web.py:678 msgid "Publisher list" msgstr "Список издателей" -#: cps/web.py:721 +#: cps/templates/index.xml:82 cps/web.py:694 msgid "Series list" msgstr "Серии" -#: cps/web.py:735 +#: cps/web.py:708 msgid "Ratings list" -msgstr "" +msgstr "Список рейтингов" -#: cps/web.py:748 +#: cps/web.py:721 msgid "File formats list" -msgstr "" +msgstr "Список форматов файлов" -#: cps/web.py:776 +#: cps/web.py:749 msgid "Available languages" msgstr "Доступные языки" -#: cps/web.py:793 +#: cps/templates/index.xml:75 cps/web.py:766 msgid "Category list" msgstr "Категории" -#: cps/templates/layout.html:73 cps/web.py:807 +#: cps/templates/layout.html:73 cps/web.py:780 msgid "Tasks" msgstr "Задания" #: cps/templates/feed.xml:33 cps/templates/layout.html:44 -#: cps/templates/layout.html:45 cps/web.py:829 cps/web.py:831 +#: cps/templates/layout.html:45 cps/web.py:802 cps/web.py:804 msgid "Search" msgstr "Поиск" -#: cps/web.py:881 +#: cps/web.py:851 msgid "Published after " msgstr "Опубликовано до " -#: cps/web.py:888 +#: cps/web.py:858 msgid "Published before " msgstr "Опубликовано после " -#: cps/web.py:902 +#: cps/web.py:872 #, python-format msgid "Rating <= %(rating)s" msgstr "Рейтинг <= %(rating)s" -#: cps/web.py:904 +#: cps/web.py:874 #, python-format msgid "Rating >= %(rating)s" msgstr "Рейтинг >= %(rating)s" -#: cps/web.py:970 cps/web.py:982 +#: cps/web.py:934 cps/web.py:944 msgid "search" msgstr "поиск" -#: cps/web.py:1067 +#: cps/web.py:1028 +msgid "Please configure the SMTP mail settings first..." +msgstr "Пожалуйста, сначала сконфигурируйте параметры SMTP" + +#: cps/web.py:1033 #, python-format msgid "Book successfully queued for sending to %(kindlemail)s" msgstr "Книга успешно поставлена в очередь для отправки на %(kindlemail)s" -#: cps/web.py:1071 +#: cps/web.py:1037 #, python-format msgid "There was an error sending this book: %(res)s" msgstr "Ошибка при отправке книги: %(res)s" -#: cps/web.py:1073 -msgid "Please configure your kindle e-mail address first..." -msgstr "Пожалуйста, сначала настройте e-mail на вашем kindle..." - -#: cps/web.py:1087 -msgid "E-Mail server is not configured, please contact your administrator!" -msgstr "" - -#: cps/web.py:1088 cps/web.py:1094 cps/web.py:1119 cps/web.py:1123 -#: cps/web.py:1128 cps/web.py:1132 +#: cps/web.py:1057 cps/web.py:1082 cps/web.py:1086 cps/web.py:1091 +#: cps/web.py:1095 msgid "register" msgstr "регистрация" -#: cps/web.py:1121 +#: cps/web.py:1084 msgid "Your e-mail is not allowed to register" msgstr "Ваш e-mail не подходит для регистрации" -#: cps/web.py:1124 +#: cps/web.py:1087 msgid "Confirmation e-mail was send to your e-mail account." msgstr "Письмо с подтверждением отправлено вам на e-mail" -#: cps/web.py:1127 +#: cps/web.py:1090 msgid "This username or e-mail address is already in use." msgstr "Этот никнейм или e-mail уже используются" -#: cps/web.py:1144 +#: cps/web.py:1105 msgid "Cannot activate LDAP authentication" -msgstr "" +msgstr "Не удается активировать LDAP аутентификацию" -#: cps/web.py:1154 cps/web.py:1281 +#: cps/web.py:1114 cps/web.py:1220 #, python-format msgid "you are now logged in as: '%(nickname)s'" msgstr "Вы вошли как пользователь '%(nickname)s'" -#: cps/web.py:1159 +#: cps/web.py:1118 msgid "Could not login. LDAP server down, please contact your administrator" -msgstr "" +msgstr "Не удалось войти. Сервер LDAP не работает, обратитесь к администратору" -#: cps/web.py:1163 cps/web.py:1186 +#: cps/web.py:1122 cps/web.py:1130 msgid "Wrong Username or Password" msgstr "Ошибка в имени пользователя или пароле" -#: cps/web.py:1170 -msgid "New Password was send to your email address" -msgstr "" - -#: cps/web.py:1176 -msgid "Please enter valid username to reset password" -msgstr "" - -#: cps/web.py:1182 +#: cps/web.py:1126 #, python-format msgid "You are now logged in as: '%(nickname)s'" -msgstr "" +msgstr "Вы вошли как: '%(nickname)s'" -#: cps/web.py:1189 cps/web.py:1213 +#: cps/web.py:1134 cps/web.py:1156 msgid "login" msgstr "войти" -#: cps/web.py:1225 cps/web.py:1259 +#: cps/web.py:1168 cps/web.py:1199 msgid "Token not found" msgstr "Ключ не найден" -#: cps/web.py:1234 cps/web.py:1267 +#: cps/web.py:1176 cps/web.py:1207 msgid "Token has expired" msgstr "Ключ просрочен" -#: cps/web.py:1243 +#: cps/web.py:1184 msgid "Success! Please return to your device" msgstr "Успешно! Пожалуйста, проверьте свое устройство" -#: cps/web.py:1320 cps/web.py:1363 cps/web.py:1369 +#: cps/web.py:1261 cps/web.py:1303 cps/web.py:1307 #, python-format msgid "%(name)s's profile" msgstr "Профиль %(name)s" -#: cps/web.py:1365 +#: cps/web.py:1305 msgid "Profile updated" msgstr "Профиль обновлён" -#: cps/web.py:1394 cps/web.py:1397 cps/web.py:1400 cps/web.py:1407 -#: cps/web.py:1412 +#: cps/web.py:1331 cps/web.py:1333 cps/web.py:1335 cps/web.py:1341 +#: cps/web.py:1345 msgid "Read a Book" msgstr "Читать Книгу" -#: cps/web.py:1423 +#: cps/web.py:1355 msgid "Error opening eBook. File does not exist or file is not accessible." -msgstr "" +msgstr "Ошибка открытия электронной книги. Файл не существует или файл недоступен" #: cps/worker.py:335 #, python-format @@ -926,188 +914,180 @@ msgstr "Ошибка Ebook-конвертора: %(error)s" msgid "Kindlegen failed with Error %(error)s. Message: %(message)s" msgstr "Kindlegen - неудачно, с Ошибкой %(error)s. Сообщение: %(message)s" -#: cps/templates/admin.html:9 +#: cps/templates/admin.html:6 msgid "User list" msgstr "Список пользователей" -#: cps/templates/admin.html:12 +#: cps/templates/admin.html:9 msgid "Nickname" msgstr "Имя пользователя" -#: cps/templates/admin.html:13 +#: cps/templates/admin.html:10 msgid "E-mail" msgstr "Почта" -#: cps/templates/admin.html:14 +#: cps/templates/admin.html:11 msgid "Kindle" msgstr "Kindle" -#: cps/templates/admin.html:15 +#: cps/templates/admin.html:12 msgid "DLS" msgstr "DLS" -#: cps/templates/admin.html:16 cps/templates/layout.html:76 +#: cps/templates/admin.html:13 cps/templates/layout.html:76 msgid "Admin" msgstr "Управление" -#: cps/templates/admin.html:17 cps/templates/detail.html:18 +#: cps/templates/admin.html:14 cps/templates/detail.html:18 #: cps/templates/detail.html:27 cps/templates/shelf.html:6 #: cps/templates/shelfdown.html:62 msgid "Download" msgstr "Скачать" -#: cps/templates/admin.html:18 +#: cps/templates/admin.html:15 msgid "View Ebooks" -msgstr "" +msgstr "Посмотреть электронные книги" -#: cps/templates/admin.html:19 cps/templates/layout.html:65 +#: cps/templates/admin.html:16 cps/templates/layout.html:65 msgid "Upload" msgstr "Загрузить" -#: cps/templates/admin.html:20 +#: cps/templates/admin.html:17 msgid "Edit" msgstr "Редактировать" -#: cps/templates/admin.html:44 +#: cps/templates/admin.html:41 msgid "SMTP e-mail server settings" msgstr "Настройки SMTP-сервера" -#: cps/templates/admin.html:47 cps/templates/email_edit.html:11 +#: cps/templates/admin.html:44 cps/templates/email_edit.html:11 msgid "SMTP hostname" msgstr "SMTP-сервер" -#: cps/templates/admin.html:48 +#: cps/templates/admin.html:45 msgid "SMTP port" msgstr "SMTP-порт" -#: cps/templates/admin.html:49 +#: cps/templates/admin.html:46 msgid "SSL" msgstr "SSL" -#: cps/templates/admin.html:50 cps/templates/email_edit.html:27 +#: cps/templates/admin.html:47 cps/templates/email_edit.html:27 msgid "SMTP login" msgstr "SMTP-логин" -#: cps/templates/admin.html:51 +#: cps/templates/admin.html:48 msgid "From mail" msgstr "Отправитель" -#: cps/templates/admin.html:61 +#: cps/templates/admin.html:58 msgid "Change SMTP settings" msgstr "Изменить настройки SMTP" -#: cps/templates/admin.html:67 +#: cps/templates/admin.html:64 msgid "Configuration" msgstr "Настройки сервера" -#: cps/templates/admin.html:70 +#: cps/templates/admin.html:67 msgid "Calibre DB dir" msgstr "Папка Calibre DB" -#: cps/templates/admin.html:74 +#: cps/templates/admin.html:71 msgid "Log level" -msgstr "Уровень лога" +msgstr "Уровень логирования" -#: cps/templates/admin.html:78 +#: cps/templates/admin.html:75 msgid "Port" msgstr "Порт" -#: cps/templates/admin.html:84 cps/templates/config_view_edit.html:23 +#: cps/templates/admin.html:81 cps/templates/config_view_edit.html:23 msgid "Books per page" msgstr "Количество книг на странице" -#: cps/templates/admin.html:88 +#: cps/templates/admin.html:85 msgid "Uploading" msgstr "Загрузка на сервер" -#: cps/templates/admin.html:92 +#: cps/templates/admin.html:89 msgid "Anonymous browsing" msgstr "Анонимный просмотр" -#: cps/templates/admin.html:96 +#: cps/templates/admin.html:93 msgid "Public registration" msgstr "Публичная регистрация" -#: cps/templates/admin.html:100 cps/templates/remote_login.html:4 +#: cps/templates/admin.html:97 cps/templates/remote_login.html:4 msgid "Remote login" msgstr "Удалённый логин" -#: cps/templates/admin.html:104 -msgid "Reverse proxy login" -msgstr "" - -#: cps/templates/admin.html:109 -msgid "Reverse proxy header name" -msgstr "" - -#: cps/templates/admin.html:121 +#: cps/templates/admin.html:108 msgid "Administration" msgstr "Управление" -#: cps/templates/admin.html:122 +#: cps/templates/admin.html:109 msgid "View Logfiles" -msgstr "" +msgstr "Просмотреть лог файл" -#: cps/templates/admin.html:123 +#: cps/templates/admin.html:110 msgid "Reconnect to Calibre DB" msgstr "Переподключиться к БД Calibre" -#: cps/templates/admin.html:124 +#: cps/templates/admin.html:111 msgid "Restart Calibre-Web" msgstr "Перезагрузить Calibre-Web" -#: cps/templates/admin.html:125 +#: cps/templates/admin.html:112 msgid "Stop Calibre-Web" msgstr "Остановить Calibre-Web" -#: cps/templates/admin.html:131 +#: cps/templates/admin.html:118 msgid "Update" msgstr "Обновление" -#: cps/templates/admin.html:135 +#: cps/templates/admin.html:122 msgid "Version" msgstr "Версия" -#: cps/templates/admin.html:136 +#: cps/templates/admin.html:123 msgid "Details" msgstr "Подробности" -#: cps/templates/admin.html:142 +#: cps/templates/admin.html:129 msgid "Current version" msgstr "Текущая версия" -#: cps/templates/admin.html:148 +#: cps/templates/admin.html:135 msgid "Check for update" msgstr "Проверка обновлений" -#: cps/templates/admin.html:149 +#: cps/templates/admin.html:136 msgid "Perform Update" msgstr "Установить обновления" -#: cps/templates/admin.html:161 +#: cps/templates/admin.html:148 msgid "Do you really want to restart Calibre-Web?" msgstr "Вы действительно хотите перезагрузить Calibre-Web?" -#: cps/templates/admin.html:166 cps/templates/admin.html:180 -#: cps/templates/admin.html:200 cps/templates/shelf.html:72 +#: cps/templates/admin.html:153 cps/templates/admin.html:167 +#: cps/templates/admin.html:187 cps/templates/shelf.html:72 msgid "Ok" msgstr "Ok" -#: cps/templates/admin.html:167 cps/templates/admin.html:181 +#: cps/templates/admin.html:154 cps/templates/admin.html:168 #: cps/templates/book_edit.html:174 cps/templates/book_edit.html:196 -#: cps/templates/config_edit.html:331 cps/templates/config_view_edit.html:147 -#: cps/templates/email_edit.html:40 cps/templates/email_edit.html:92 +#: cps/templates/config_edit.html:321 cps/templates/config_view_edit.html:147 +#: cps/templates/email_edit.html:40 cps/templates/email_edit.html:74 #: cps/templates/layout.html:28 cps/templates/shelf.html:73 #: cps/templates/shelf_edit.html:19 cps/templates/shelf_order.html:32 -#: cps/templates/user_edit.html:131 +#: cps/templates/user_edit.html:132 msgid "Back" msgstr "Назад" -#: cps/templates/admin.html:179 +#: cps/templates/admin.html:166 msgid "Do you really want to stop Calibre-Web?" msgstr "Вы действительно хотите остановить Calibre-Web?" -#: cps/templates/admin.html:191 +#: cps/templates/admin.html:178 msgid "Updating, please do not reload page" msgstr "Установка обновлений, пожалуйста, не обновляйте страницу." @@ -1122,14 +1102,14 @@ msgstr "В библиотеке" #: cps/templates/author.html:34 cps/templates/list.html:14 #: cps/templates/search.html:41 msgid "All" -msgstr "" +msgstr "Все" #: cps/templates/author.html:58 cps/templates/author.html:110 #: cps/templates/discover.html:27 cps/templates/index.html:26 #: cps/templates/index.html:89 cps/templates/search.html:67 #: cps/templates/shelf.html:36 msgid "reduce" -msgstr "" +msgstr "уменьшить" #: cps/templates/author.html:94 msgid "More by" @@ -1144,7 +1124,7 @@ msgid "Delete formats:" msgstr "Удалить форматы:" #: cps/templates/book_edit.html:18 cps/templates/book_edit.html:195 -#: cps/templates/email_edit.html:91 +#: cps/templates/email_edit.html:73 msgid "Delete" msgstr "Удалить" @@ -1178,7 +1158,7 @@ msgid "Author" msgstr "Автор" #: cps/templates/book_edit.html:63 cps/templates/book_edit.html:260 -#: cps/templates/book_edit.html:275 cps/templates/search_form.html:126 +#: cps/templates/book_edit.html:275 cps/templates/search_form.html:106 msgid "Description" msgstr "Описание" @@ -1212,15 +1192,15 @@ msgstr "Опубликовано" msgid "Publisher" msgstr "Издатель" -#: cps/templates/book_edit.html:103 cps/templates/user_edit.html:30 +#: cps/templates/book_edit.html:103 cps/templates/user_edit.html:31 msgid "Language" msgstr "Язык" -#: cps/templates/book_edit.html:113 cps/templates/search_form.html:137 +#: cps/templates/book_edit.html:113 cps/templates/search_form.html:117 msgid "Yes" msgstr "Да" -#: cps/templates/book_edit.html:114 cps/templates/search_form.html:138 +#: cps/templates/book_edit.html:114 cps/templates/search_form.html:118 msgid "No" msgstr "Нет" @@ -1236,10 +1216,10 @@ msgstr "смотреть книгу после редактирования" msgid "Get metadata" msgstr "Получить метаданные" -#: cps/templates/book_edit.html:173 cps/templates/config_edit.html:329 +#: cps/templates/book_edit.html:173 cps/templates/config_edit.html:319 #: cps/templates/config_view_edit.html:146 cps/templates/login.html:20 -#: cps/templates/search_form.html:170 cps/templates/shelf_edit.html:17 -#: cps/templates/user_edit.html:129 +#: cps/templates/search_form.html:150 cps/templates/shelf_edit.html:17 +#: cps/templates/user_edit.html:130 msgid "Submit" msgstr "Отправить" @@ -1314,7 +1294,7 @@ msgstr "Аутентификация Google Drive" #: cps/templates/config_edit.html:41 msgid "Please hit submit to continue with setup" -msgstr "" +msgstr "Пожалуйста, нажмите «Отправить», чтобы продолжить настройку" #: cps/templates/config_edit.html:44 msgid "Please finish Google Drive setup after login" @@ -1350,23 +1330,23 @@ msgstr "Расположение SSL файла-ключа (оставьте е #: cps/templates/config_edit.html:99 msgid "Update channel" -msgstr "" +msgstr "Ветка обнавлений" #: cps/templates/config_edit.html:101 msgid "Stable" -msgstr "" +msgstr "Стабильная" #: cps/templates/config_edit.html:102 msgid "Stable (Automatic)" -msgstr "" +msgstr "Стабильная (Автоматически)" #: cps/templates/config_edit.html:103 msgid "Nightly" -msgstr "" +msgstr "Теставая" #: cps/templates/config_edit.html:104 msgid "Nightly (Automatic)" -msgstr "" +msgstr "Теставая (Автоматически)" #: cps/templates/config_edit.html:115 msgid "Logfile Configuration" @@ -1382,11 +1362,11 @@ msgstr "Расположение и имя лог-файла (не вводит #: cps/templates/config_edit.html:136 msgid "Enable Access Log" -msgstr "" +msgstr "Включить журнал доступа" #: cps/templates/config_edit.html:139 msgid "Location and name of access logfile (access.log for no entry)" -msgstr "" +msgstr "Расположение и имя лог-файла доступа (access.log по умолчанию)" #: cps/templates/config_edit.html:150 msgid "Feature Configuration" @@ -1410,7 +1390,7 @@ msgstr "Включить удаленный логин (\"magic link\")" #: cps/templates/config_edit.html:175 msgid "Use Goodreads" -msgstr "" +msgstr "Использовать Goodreads" #: cps/templates/config_edit.html:176 msgid "Obtain an API Key" @@ -1426,120 +1406,112 @@ msgstr "Goodreads API Секрет" #: cps/templates/config_edit.html:191 msgid "Login type" -msgstr "" +msgstr "Тип входа" #: cps/templates/config_edit.html:193 msgid "Use standard Authentication" -msgstr "" +msgstr "Использовать стандартную аутентификацию" #: cps/templates/config_edit.html:195 msgid "Use LDAP Authentication" -msgstr "" +msgstr "Использовать LDAP аутентификацию" #: cps/templates/config_edit.html:198 msgid "Use OAuth" -msgstr "" +msgstr "Использовать OAuth" #: cps/templates/config_edit.html:205 msgid "LDAP Server Host Name or IP Address" -msgstr "" +msgstr "Имя хоста или IP-адрес сервера LDAP" #: cps/templates/config_edit.html:209 msgid "LDAP Server Port" -msgstr "" +msgstr "Порт сервера LDAP" #: cps/templates/config_edit.html:213 msgid "LDAP schema (ldap or ldaps)" -msgstr "" +msgstr "Схема LDAP (ldap или ldaps)" #: cps/templates/config_edit.html:217 msgid "LDAP Admin username" -msgstr "" +msgstr "Имя администратора LDAP" #: cps/templates/config_edit.html:221 msgid "LDAP Admin password" -msgstr "" +msgstr "Пароль администратора LDAP" #: cps/templates/config_edit.html:226 msgid "LDAP Server use SSL" -msgstr "" +msgstr "Сервер LDAP использует SSL" #: cps/templates/config_edit.html:230 msgid "LDAP Server use TLS" -msgstr "" +msgstr "Сервер LDAP использует TLS" #: cps/templates/config_edit.html:234 msgid "LDAP Server Certificate" -msgstr "" +msgstr "Сертификат сервера LDAP" #: cps/templates/config_edit.html:238 msgid "LDAP SSL Certificate Path" -msgstr "" +msgstr "Путь к SSL сертификату LDAP" #: cps/templates/config_edit.html:243 msgid "LDAP Distinguished Name (DN)" -msgstr "" +msgstr "Отличительное имя LDAP (DN)" #: cps/templates/config_edit.html:247 msgid "LDAP User object filter" -msgstr "" +msgstr "Фильтр объектов пользователя LDAP" #: cps/templates/config_edit.html:252 msgid "LDAP Server is OpenLDAP?" -msgstr "" +msgstr "Сервер LDAP - это OpenLDAP ?" #: cps/templates/config_edit.html:260 #, python-format msgid "Obtain %(provider)s OAuth Credential" -msgstr "" +msgstr "Получить %(provider)s OAuth Credential" #: cps/templates/config_edit.html:263 #, python-format msgid "%(provider)s OAuth Client Id" -msgstr "" +msgstr "%(provider)s OAuth ID клиента" #: cps/templates/config_edit.html:267 #, python-format msgid "%(provider)s OAuth Client Secret" -msgstr "" +msgstr "%(provider)s OAuth Секрет клиента" -#: cps/templates/config_edit.html:276 -msgid "Allow Reverse Proxy Authentication" -msgstr "" - -#: cps/templates/config_edit.html:280 -msgid "Reverse Proxy Header Name" -msgstr "" - -#: cps/templates/config_edit.html:292 +#: cps/templates/config_edit.html:282 msgid "External binaries" -msgstr "Внешние двоичные файлы" +msgstr "Настройки конвертации" -#: cps/templates/config_edit.html:300 +#: cps/templates/config_edit.html:290 msgid "No converter" msgstr "Нет конвертера" -#: cps/templates/config_edit.html:302 +#: cps/templates/config_edit.html:292 msgid "Use Kindlegen" msgstr "Использовать Kindlegen" -#: cps/templates/config_edit.html:304 +#: cps/templates/config_edit.html:294 msgid "Use calibre's ebook converter" msgstr "Использовать конвертер calibre's ebook" -#: cps/templates/config_edit.html:308 +#: cps/templates/config_edit.html:298 msgid "E-Book converter settings" msgstr "Настройки конвертера E-Book" -#: cps/templates/config_edit.html:312 +#: cps/templates/config_edit.html:302 msgid "Path to convertertool" msgstr "Путь к конвертеру" -#: cps/templates/config_edit.html:318 +#: cps/templates/config_edit.html:308 msgid "Location of Unrar binary" msgstr "Расположение двоичного файла Unrar" -#: cps/templates/config_edit.html:334 cps/templates/layout.html:84 +#: cps/templates/config_edit.html:324 cps/templates/layout.html:84 #: cps/templates/login.html:4 msgid "Login" msgstr "Логин" @@ -1558,7 +1530,7 @@ msgstr "Количество отображаемых случайных кни #: cps/templates/config_view_edit.html:31 msgid "No. of authors to show before hiding (0=disable hiding)" -msgstr "" +msgstr "Количество авторов для отображения перед скрытием (0 = отключить скрытие)" #: cps/templates/config_view_edit.html:35 cps/templates/readcbr.html:112 msgid "Theme" @@ -1592,35 +1564,35 @@ msgstr "Теги для Зрелого Контента" msgid "Default settings for new users" msgstr "Настройки по умолчанию для новых пользователей" -#: cps/templates/config_view_edit.html:81 cps/templates/user_edit.html:82 +#: cps/templates/config_view_edit.html:81 cps/templates/user_edit.html:83 msgid "Admin user" msgstr "Управление сервером" -#: cps/templates/config_view_edit.html:85 cps/templates/user_edit.html:91 +#: cps/templates/config_view_edit.html:85 cps/templates/user_edit.html:92 msgid "Allow Downloads" msgstr "Разрешить скачивание с сервера" -#: cps/templates/config_view_edit.html:89 cps/templates/user_edit.html:95 +#: cps/templates/config_view_edit.html:89 cps/templates/user_edit.html:96 msgid "Allow book viewer" -msgstr "" +msgstr "Разрешить чтение книг" -#: cps/templates/config_view_edit.html:93 cps/templates/user_edit.html:99 +#: cps/templates/config_view_edit.html:93 cps/templates/user_edit.html:100 msgid "Allow Uploads" msgstr "Разрешить загрузку на сервер" -#: cps/templates/config_view_edit.html:97 cps/templates/user_edit.html:103 +#: cps/templates/config_view_edit.html:97 cps/templates/user_edit.html:104 msgid "Allow Edit" msgstr "Разрешить редактирование книг" -#: cps/templates/config_view_edit.html:101 cps/templates/user_edit.html:107 +#: cps/templates/config_view_edit.html:101 cps/templates/user_edit.html:108 msgid "Allow Delete books" msgstr "Разрешить удаление книг" -#: cps/templates/config_view_edit.html:105 cps/templates/user_edit.html:112 +#: cps/templates/config_view_edit.html:105 cps/templates/user_edit.html:113 msgid "Allow Changing Password" msgstr "Разрешить смену пароля" -#: cps/templates/config_view_edit.html:109 cps/templates/user_edit.html:116 +#: cps/templates/config_view_edit.html:109 cps/templates/user_edit.html:117 msgid "Allow Editing Public Shelfs" msgstr "Разрешить редактирование публичных книжных полок" @@ -1628,21 +1600,21 @@ msgstr "Разрешить редактирование публичных кн msgid "Default visibilities for new users" msgstr "Видимость для новых пользователей(по умолчанию)" -#: cps/templates/config_view_edit.html:135 cps/templates/user_edit.html:74 +#: cps/templates/config_view_edit.html:135 cps/templates/user_edit.html:75 msgid "Show random books in detail view" msgstr "Показывать случайные книги при просмотре деталей" -#: cps/templates/config_view_edit.html:139 cps/templates/user_edit.html:87 +#: cps/templates/config_view_edit.html:139 cps/templates/user_edit.html:88 msgid "Show mature content" msgstr "Показывать взрослый контент" #: cps/templates/detail.html:59 msgid "Read in browser" -msgstr "Открыть в браузере" +msgstr "Читать" #: cps/templates/detail.html:72 msgid "Listen in browser" -msgstr "" +msgstr "Ждите сигнала от браузера" #: cps/templates/detail.html:117 msgid "Book" @@ -1658,11 +1630,11 @@ msgstr "Язык" #: cps/templates/detail.html:200 msgid "Mark As Unread" -msgstr "" +msgstr "Отметить как непрочитанное" #: cps/templates/detail.html:200 msgid "Mark As Read" -msgstr "" +msgstr "Отметить как прочитанное" #: cps/templates/detail.html:201 msgid "Read" @@ -1720,23 +1692,19 @@ msgstr "Сохранить настройки и отправить тестов msgid "Allowed domains for registering" msgstr "Допустимые домены для регистрации" -#: cps/templates/email_edit.html:46 cps/templates/email_edit.html:72 +#: cps/templates/email_edit.html:47 +msgid "Enter domainname" +msgstr "Введите доменное имя" + +#: cps/templates/email_edit.html:55 msgid "Add Domain" msgstr "Добавить Домен" -#: cps/templates/email_edit.html:49 cps/templates/email_edit.html:75 +#: cps/templates/email_edit.html:58 msgid "Add" msgstr "Добавить" -#: cps/templates/email_edit.html:54 cps/templates/email_edit.html:64 -msgid "Enter domainname" -msgstr "Введите доменное имя" - -#: cps/templates/email_edit.html:60 -msgid "Denied domains for registering" -msgstr "" - -#: cps/templates/email_edit.html:90 +#: cps/templates/email_edit.html:72 msgid "Do you really want to delete this domain rule?" msgstr "Вы действительно желаете удалить это правило домена?" @@ -1746,11 +1714,11 @@ msgstr "Дальше" #: cps/templates/http_error.html:37 msgid "Create issue" -msgstr "" +msgstr "Создать запись" #: cps/templates/http_error.html:44 msgid "Back to home" -msgstr "" +msgstr "Вернуться на главную" #: cps/templates/index.html:5 msgid "Discover (Random Books)" @@ -1758,7 +1726,7 @@ msgstr "Обзор (Случайные Книги)" #: cps/templates/index.html:64 msgid "Group by series" -msgstr "" +msgstr "Сгрупировать по серии" #: cps/templates/index.xml:6 msgid "Start" @@ -1773,8 +1741,8 @@ msgid "Popular publications from this catalog based on Rating." msgstr "Популярные книги из этого каталога на основании Рейтинга" #: cps/templates/index.xml:31 -msgid "Recently added Books" -msgstr "" +msgid "New Books" +msgstr "Новые Книги" #: cps/templates/index.xml:35 msgid "The latest Books" @@ -1800,33 +1768,25 @@ msgstr "Книги, отсортированные по категории" msgid "Books ordered by series" msgstr "Книги, отсортированные по серии" -#: cps/templates/index.xml:93 -msgid "Books ordered by Languages" -msgstr "" - -#: cps/templates/index.xml:100 -msgid "Books ordered by file formats" -msgstr "" - -#: cps/templates/index.xml:103 cps/templates/layout.html:137 +#: cps/templates/index.xml:89 cps/templates/layout.html:137 msgid "Public Shelves" msgstr "Общие полки" -#: cps/templates/index.xml:107 +#: cps/templates/index.xml:93 msgid "Books organized in public shelfs, visible to everyone" msgstr "Книги размещены на полках, и доступны всем" -#: cps/templates/index.xml:111 cps/templates/layout.html:141 +#: cps/templates/index.xml:97 cps/templates/layout.html:141 msgid "Your Shelves" msgstr "Ваши полки" -#: cps/templates/index.xml:115 +#: cps/templates/index.xml:101 msgid "User's own shelfs, only visible to the current user himself" msgstr "Пользовательские полки, видимые только самому пользователю" #: cps/templates/layout.html:28 msgid "Home" -msgstr "" +msgstr "Главная" #: cps/templates/layout.html:34 msgid "Toggle navigation" @@ -1843,7 +1803,7 @@ msgstr "Настройки" #: cps/templates/layout.html:78 msgid "Account" -msgstr "" +msgstr "Учетная запись" #: cps/templates/layout.html:80 msgid "Logout" @@ -1883,11 +1843,11 @@ msgstr "Подробнее о книге" #: cps/templates/layout.html:222 msgid "Upload done, processing, please wait..." -msgstr "" +msgstr "Загрузка завершена, обработка, пожалуйста, подождите..." #: cps/templates/layout.html:225 msgid "Error" -msgstr "" +msgstr "Ошибка" #: cps/templates/login.html:8 cps/templates/login.html:9 #: cps/templates/register.html:7 cps/templates/user_edit.html:8 @@ -1904,20 +1864,16 @@ msgid "Remember me" msgstr "Запомнить меня" #: cps/templates/login.html:22 -msgid "Forgot password" -msgstr "" - -#: cps/templates/login.html:25 msgid "Log in with magic link" msgstr "Войти через магическую ссылку" #: cps/templates/logviewer.html:5 msgid "Show Calibre-Web log" -msgstr "" +msgstr "Показать Calibre-Web лог" #: cps/templates/logviewer.html:8 msgid "Show access log" -msgstr "" +msgstr "Показать журнал доступа" #: cps/templates/osd.xml:5 msgid "Calibre-Web ebook catalog" @@ -2013,19 +1969,19 @@ msgstr "Вертикально" #: cps/templates/readcbr.html:152 msgid "Direction" -msgstr "" +msgstr "Направление" #: cps/templates/readcbr.html:155 msgid "Left to Right" -msgstr "" +msgstr "Слева направо" #: cps/templates/readcbr.html:156 msgid "Right to Left" -msgstr "" +msgstr "Справа налево" #: cps/templates/readpdf.html:29 msgid "PDF reader" -msgstr "" +msgstr "PDF reader" #: cps/templates/readtxt.html:6 msgid "Basic txt Reader" @@ -2049,7 +2005,7 @@ msgstr "Ваш email-адрес" #: cps/templates/remote_login.html:6 msgid "Use your other device, login and visit " -msgstr "" +msgstr "Используйте другое устройство, войдите и посетите" #: cps/templates/remote_login.html:9 msgid "Once you do so, you will automatically get logged in on this device." @@ -2057,7 +2013,7 @@ msgstr "После этого вы автоматически войдете в #: cps/templates/remote_login.html:12 msgid "The link will expire after 10 minutes." -msgstr "" +msgstr "Срок действия ссылки истекает через 10 минут" #: cps/templates/search.html:5 msgid "No Results for:" @@ -2065,7 +2021,7 @@ msgstr "Ничего не найдено по запросу:" #: cps/templates/search.html:6 msgid "Please try a different search" -msgstr "Попробуйте изменить критерии поиск" +msgstr "Попробуйте изменить критерии поиска" #: cps/templates/search.html:8 msgid "Results for:" @@ -2091,19 +2047,11 @@ msgstr "Исключить серии" msgid "Exclude Languages" msgstr "Исключить языки" -#: cps/templates/search_form.html:95 -msgid "Extensions" -msgstr "" - -#: cps/templates/search_form.html:105 -msgid "Exclude Extensions" -msgstr "" - -#: cps/templates/search_form.html:117 +#: cps/templates/search_form.html:97 msgid "Rating bigger than" msgstr "Рейтинг больше чем" -#: cps/templates/search_form.html:121 +#: cps/templates/search_form.html:101 msgid "Rating less than" msgstr "Рейтинг меньше чем" @@ -2207,37 +2155,37 @@ msgstr "Скрыть все задачи" msgid "Reset user Password" msgstr "Сбросить пароль пользователя" -#: cps/templates/user_edit.html:26 +#: cps/templates/user_edit.html:27 msgid "Kindle E-Mail" msgstr "Адрес почты Kindle" -#: cps/templates/user_edit.html:39 +#: cps/templates/user_edit.html:40 msgid "Show books with language" msgstr "Показать книги на языках" -#: cps/templates/user_edit.html:41 +#: cps/templates/user_edit.html:42 msgid "Show all" msgstr "Показать все" -#: cps/templates/user_edit.html:51 +#: cps/templates/user_edit.html:52 msgid "OAuth Settings" -msgstr "" +msgstr "Настройки OAuth" -#: cps/templates/user_edit.html:53 +#: cps/templates/user_edit.html:54 msgid "Link" -msgstr "" +msgstr "Связать" -#: cps/templates/user_edit.html:55 +#: cps/templates/user_edit.html:56 msgid "Unlink" -msgstr "" +msgstr "Разъединить" -#: cps/templates/user_edit.html:123 +#: cps/templates/user_edit.html:124 msgid "Delete this user" msgstr "Удалить этого пользователя" -#: cps/templates/user_edit.html:138 +#: cps/templates/user_edit.html:139 msgid "Recent Downloads" -msgstr "Недавние скачивания" +msgstr "Последние загрузки" #~ msgid "Afar" #~ msgstr "Афар" @@ -3502,9 +3450,6 @@ msgstr "Недавние скачивания" #~ msgid "Cover-file is not a valid image file" #~ msgstr "" -#~ msgid "Cover is not a jpg file, can't save" -#~ msgstr "Обложка не jpg файл, невозможно сохранить" - #~ msgid "Preparing document for printing..." #~ msgstr "" @@ -3610,9 +3555,6 @@ msgstr "Недавние скачивания" #~ msgid "Excecution permissions missing" #~ msgstr "Отсутствуют разрешения на выполнение" -#~ msgid "not configured" -#~ msgstr "не настроен" - #~ msgid "Error excecuting UnRar" #~ msgstr "Ошибка извлечения UnRar" @@ -3651,10 +3593,3 @@ msgstr "Недавние скачивания" #~ msgid "volume" #~ msgstr "" - -#~ msgid "unknown" -#~ msgstr "неизвестно" - -#~ msgid "New Books" -#~ msgstr "Новые Книги" - From 8150f934fdd89ea776f4082481615e6ff564b505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9?= <34818054+XZVB12@users.noreply.github.com> Date: Mon, 20 Jan 2020 01:48:57 +0400 Subject: [PATCH 03/31] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c5906262..e480f76f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # About + Fork of the project https://github.com/janeczku/calibre-web + Calibre-Web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing [Calibre](https://calibre-ebook.com) database. *This software is a fork of [library](https://github.com/mutschler/calibreserver) and licensed under the GPL v3 License.* From a17c1c063e7e29b5c6851a8a1a582a1767936de3 Mon Sep 17 00:00:00 2001 From: ElQuimm <50202052+ElQuimm@users.noreply.github.com> Date: Mon, 20 Jan 2020 22:05:11 +0100 Subject: [PATCH 04/31] Update messages.po :-) Thank you --- cps/translations/it/LC_MESSAGES/messages.po | 246 ++++++++++---------- 1 file changed, 123 insertions(+), 123 deletions(-) diff --git a/cps/translations/it/LC_MESSAGES/messages.po b/cps/translations/it/LC_MESSAGES/messages.po index eb2de1fd..78c1546b 100644 --- a/cps/translations/it/LC_MESSAGES/messages.po +++ b/cps/translations/it/LC_MESSAGES/messages.po @@ -19,7 +19,7 @@ msgstr "" #: cps/about.py:42 msgid "installed" -msgstr "" +msgstr "installato" #: cps/about.py:44 msgid "not installed" @@ -97,7 +97,7 @@ msgstr "Si è verificato un errore nell'invio dell'e-mail di test: %(res)s" #: cps/admin.py:540 msgid "Please configure your e-mail address first..." -msgstr "" +msgstr "Per favore prima configura il tuo indirizzo e-mail..." #: cps/admin.py:542 msgid "E-mail server settings updated" @@ -110,7 +110,7 @@ msgstr "Utente '%(nick)s' eliminato" #: cps/admin.py:574 msgid "No admin user remaining, can't delete user" -msgstr "" +msgstr "Non rimarrebbe nessun utente amministratore, non posso eliminare l'utente." #: cps/admin.py:612 cps/web.py:1359 msgid "Found an existing account for this e-mail address." @@ -123,7 +123,7 @@ msgstr "Modifica utente %(nick)s" #: cps/admin.py:622 cps/web.py:1327 msgid "This username is already taken" -msgstr "" +msgstr "Questo nome di utente è già utilizzato" #: cps/admin.py:637 #, python-format @@ -149,11 +149,11 @@ msgstr "Configurare dapprima le impostazioni del server SMTP..." #: cps/admin.py:674 msgid "Logfile viewer" -msgstr "" +msgstr "Visualizzatore del Logfile" #: cps/admin.py:710 msgid "Requesting update package" -msgstr "Richiesta del pacchetto di aggiornamento" +msgstr "Richiedo del pacchetto di aggiornamento" #: cps/admin.py:711 msgid "Downloading update package" @@ -201,7 +201,7 @@ msgstr "Errore generale" #: cps/converter.py:31 msgid "not configured" -msgstr "" +msgstr "non configurato" #: cps/editbooks.py:214 cps/editbooks.py:396 msgid "Error opening eBook. File does not exist or file is not accessible" @@ -237,11 +237,11 @@ msgstr "Ho aggiunto l'estensione %(ext)s al libro %(book)s" #: cps/editbooks.py:376 msgid "Cover is not a supported imageformat (jpg/png/webp), can't save" -msgstr "" +msgstr "La copertina non è in un formato immagine supportato (jpg/png/webp), non posso salvare" #: cps/editbooks.py:451 msgid "Cover is not a jpg file, can't save" -msgstr "" +msgstr "La copertina non è un file jpg, non posso salvare" #: cps/editbooks.py:494 #, python-format @@ -259,11 +259,11 @@ msgstr "Errore nella modifica del libro. Per favore verifica i dettagli nel file #: cps/editbooks.py:581 #, python-format msgid "File %(filename)s could not saved to temp dir" -msgstr "" +msgstr "Il file %(filename)s non può essere salvato nella cartella temporanea" #: cps/editbooks.py:598 msgid "Uploaded book probably exists in the library, consider to change before upload new: " -msgstr "" +msgstr "Probabilmnete il libro caricato esiste già nella libreria; considera di cambiare prima di caricare nuovamente: " #: cps/editbooks.py:613 #, python-format @@ -278,7 +278,7 @@ msgstr "Impossibile eliminare il file %(file)s (autorizzazione negata)" #: cps/editbooks.py:710 #, python-format msgid "File %(file)s uploaded" -msgstr "" +msgstr "Il file %(file)s è stato caricato" #: cps/editbooks.py:739 msgid "Source or destination format for conversion missing" @@ -427,46 +427,46 @@ msgstr "Processo sconosciuto: " #: cps/oauth_bb.py:75 #, python-format msgid "Register with %(provider)s" -msgstr "" +msgstr "Registra con %(provider)s" #: cps/oauth_bb.py:155 msgid "Failed to log in with GitHub." -msgstr "" +msgstr "Fallito l'accesso con GitHub." #: cps/oauth_bb.py:160 msgid "Failed to fetch user info from GitHub." -msgstr "" +msgstr "Fallito il recupero delle informazioni dell'utente da GitHub." #: cps/oauth_bb.py:171 msgid "Failed to log in with Google." -msgstr "" +msgstr "Fallito l'accesso con Google." #: cps/oauth_bb.py:176 msgid "Failed to fetch user info from Google." -msgstr "" +msgstr "Fallito il recupero delle informazioni da Google." #: cps/oauth_bb.py:274 #, python-format msgid "Unlink to %(oauth)s success." -msgstr "" +msgstr "Scollegato da %(oauth)s con successo." #: cps/oauth_bb.py:278 #, python-format msgid "Unlink to %(oauth)s failed." -msgstr "" +msgstr "Scollegamento da %(oauth)s fallito."" #: cps/oauth_bb.py:281 #, python-format msgid "Not linked to %(oauth)s." -msgstr "" +msgstr "Non collegato a %(oauth)s." #: cps/oauth_bb.py:309 msgid "GitHub Oauth error, please retry later." -msgstr "" +msgstr "GitHub Oauth error, per favore riprova più tardi." #: cps/oauth_bb.py:328 msgid "Google Oauth error, please retry later." -msgstr "" +msgstr "Google Oauth error, per favore riprova più tardi." #: cps/shelf.py:47 cps/shelf.py:99 msgid "Invalid shelf specified" @@ -576,11 +576,11 @@ msgstr "Mostra i libri recenti" #: cps/templates/index.xml:17 cps/ub.py:60 msgid "Hot Books" -msgstr "Hot Ebook" +msgstr "Libri popolari" #: cps/ub.py:61 msgid "Show hot books" -msgstr "Mostra libri popolari" +msgstr "Mostra i libri più popolari" #: cps/templates/index.xml:24 cps/ub.py:64 msgid "Best rated Books" @@ -606,7 +606,7 @@ msgstr "Libri non letti" #: cps/ub.py:73 msgid "Show unread" -msgstr "" +msgstr "Mostra non letti" #: cps/ub.py:74 msgid "Discover" @@ -659,19 +659,19 @@ msgstr "Mostra la selezione della lingua" #: cps/ub.py:94 msgid "Ratings" -msgstr "" +msgstr "Valutazione" #: cps/ub.py:96 msgid "Show ratings selection" -msgstr "" +msgstr "Mostra la selezione della valutazione" #: cps/templates/index.xml:96 cps/ub.py:97 msgid "File formats" -msgstr "" +msgstr "Formati dei file" #: cps/ub.py:99 msgid "Show file formats selection" -msgstr "" +msgstr "Mostra la selezione dei formati dei file" #: cps/updater.py:252 cps/updater.py:359 cps/updater.py:372 msgid "Unexpected data while reading update information" @@ -687,7 +687,7 @@ msgstr "Nuovo aggiornamento disponibile. Clicca sul pulsante sottostante per agg #: cps/updater.py:338 msgid "Could not fetch update information" -msgstr "Impossibile recuperare informazioni di aggiornamento" +msgstr "Impossibile recuperare le informazioni di aggiornamento" #: cps/updater.py:352 msgid "No release information available" @@ -700,7 +700,7 @@ msgstr "Nuovo aggiornamento disponibile. Clicca sul pulsante sottostante per agg #: cps/updater.py:424 msgid "Click on the button below to update to the latest stable version." -msgstr "" +msgstr "Clicca sul pulsante per aggiornare all'ultima versione stabile." #: cps/web.py:486 msgid "Recently Added Books" @@ -716,7 +716,7 @@ msgstr "Libri a caso" #: cps/web.py:548 msgid "Books" -msgstr "" +msgstr "Libri" #: cps/web.py:575 msgid "Hot Books (most downloaded)" @@ -729,7 +729,7 @@ msgstr "Errore durante l'apertura del libro. Il file non esiste o il file non è #: cps/web.py:599 #, python-format msgid "Author: %(name)s" -msgstr "" +msgstr "Autore: %(name)s" #: cps/web.py:611 #, python-format @@ -744,12 +744,12 @@ msgstr "Serie: %(serie)s" #: cps/web.py:633 #, python-format msgid "Rating: %(rating)s stars" -msgstr "" +msgstr "Valutazione: %(rating)s stelle" #: cps/web.py:644 #, python-format msgid "File format: %(format)s" -msgstr "" +msgstr "Formato del file: %(format)s" #: cps/web.py:656 #, python-format @@ -771,11 +771,11 @@ msgstr "Lista delle serie" #: cps/web.py:735 msgid "Ratings list" -msgstr "" +msgstr "Lista delle valutazioni" #: cps/web.py:748 msgid "File formats list" -msgstr "" +msgstr "Lista dei formati di file" #: cps/web.py:776 msgid "Available languages" @@ -832,7 +832,7 @@ msgstr "Per favore configura dapprima il tuo indirizzo e-mail di Kindle..." #: cps/web.py:1087 msgid "E-Mail server is not configured, please contact your administrator!" -msgstr "" +msgstr "Il server e-mail non è configurato, per favore contatta l'amministratore" #: cps/web.py:1088 cps/web.py:1094 cps/web.py:1119 cps/web.py:1123 #: cps/web.py:1128 cps/web.py:1132 @@ -853,7 +853,7 @@ msgstr "Questo nome di utente o questo e-mail sono già utilizzati." #: cps/web.py:1144 msgid "Cannot activate LDAP authentication" -msgstr "" +msgstr "Non posso attivare l'autenticazione LDAP" #: cps/web.py:1154 cps/web.py:1281 #, python-format @@ -862,7 +862,7 @@ msgstr "ora sei connesso come: '%(nickname)s'" #: cps/web.py:1159 msgid "Could not login. LDAP server down, please contact your administrator" -msgstr "" +msgstr "Non posso collegarmi. Il server LDAP non è raggiungibile, per favore contatta l'amministratore" #: cps/web.py:1163 cps/web.py:1186 msgid "Wrong Username or Password" @@ -870,16 +870,16 @@ msgstr "Nome utente o password errati" #: cps/web.py:1170 msgid "New Password was send to your email address" -msgstr "" +msgstr "Una nuova password è stata inviata al tuo recapito e-mail" #: cps/web.py:1176 msgid "Please enter valid username to reset password" -msgstr "" +msgstr "Per favore digita un nome di utente valido per resettare la password" #: cps/web.py:1182 #, python-format msgid "You are now logged in as: '%(nickname)s'" -msgstr "" +msgstr "Ora sei connesso come '%(nickname)s" #: cps/web.py:1189 cps/web.py:1213 msgid "login" @@ -913,7 +913,7 @@ msgstr "Leggere un libro" #: cps/web.py:1423 msgid "Error opening eBook. File does not exist or file is not accessible." -msgstr "" +msgstr "Errore nell'aprire il libro. Il file non esiste o il file non è accessibile." #: cps/worker.py:335 #, python-format @@ -957,7 +957,7 @@ msgstr "Download" #: cps/templates/admin.html:18 msgid "View Ebooks" -msgstr "" +msgstr "Vedi libri" #: cps/templates/admin.html:19 cps/templates/layout.html:65 msgid "Upload" @@ -1033,11 +1033,11 @@ msgstr "Login remoto" #: cps/templates/admin.html:104 msgid "Reverse proxy login" -msgstr "" +msgstr "Login reverse proxy" #: cps/templates/admin.html:109 msgid "Reverse proxy header name" -msgstr "" +msgstr "Nome intestazione reverse proxy" #: cps/templates/admin.html:121 msgid "Administration" @@ -1045,7 +1045,7 @@ msgstr "Amministrazione" #: cps/templates/admin.html:122 msgid "View Logfiles" -msgstr "" +msgstr "Visualizza LogFiles" #: cps/templates/admin.html:123 msgid "Reconnect to Calibre DB" @@ -1121,7 +1121,7 @@ msgstr "Nella libreria" #: cps/templates/author.html:34 cps/templates/list.html:14 #: cps/templates/search.html:41 msgid "All" -msgstr "" +msgstr "Tutti" #: cps/templates/author.html:58 cps/templates/author.html:110 #: cps/templates/discover.html:27 cps/templates/index.html:26 @@ -1381,11 +1381,11 @@ msgstr "Percorso e nome del logfile (senza indicazioni sarà calibre-web.log)" #: cps/templates/config_edit.html:136 msgid "Enable Access Log" -msgstr "" +msgstr "Abilita l'Access Log" #: cps/templates/config_edit.html:139 msgid "Location and name of access logfile (access.log for no entry)" -msgstr "" +msgstr "Percorso e nome del logfile di accesso (senza indicazioni sarà access.log)" #: cps/templates/config_edit.html:150 msgid "Feature Configuration" @@ -1409,7 +1409,7 @@ msgstr "Attiva login remoto (\"magic link\")" #: cps/templates/config_edit.html:175 msgid "Use Goodreads" -msgstr "" +msgstr "Utilizza Goodreads" #: cps/templates/config_edit.html:176 msgid "Obtain an API Key" @@ -1429,86 +1429,86 @@ msgstr "" #: cps/templates/config_edit.html:193 msgid "Use standard Authentication" -msgstr "" +msgstr "Utilizza l'autenticazione standard" #: cps/templates/config_edit.html:195 msgid "Use LDAP Authentication" -msgstr "" +msgstr "Utilizza l'autenticazione LDAP" #: cps/templates/config_edit.html:198 msgid "Use OAuth" -msgstr "" +msgstr "Utilizza OAuth" #: cps/templates/config_edit.html:205 msgid "LDAP Server Host Name or IP Address" -msgstr "" +msgstr "Nome o indirizzo IP del server LDAP" #: cps/templates/config_edit.html:209 msgid "LDAP Server Port" -msgstr "" +msgstr "Porta del server LDAP" #: cps/templates/config_edit.html:213 msgid "LDAP schema (ldap or ldaps)" -msgstr "" +msgstr "Schema LDAP (ldap o ldaps)" #: cps/templates/config_edit.html:217 msgid "LDAP Admin username" -msgstr "" +msgstr "Nome di utente dell'amministratore LDAP" #: cps/templates/config_edit.html:221 msgid "LDAP Admin password" -msgstr "" +msgstr "Password dell'amministratore LDAP" #: cps/templates/config_edit.html:226 msgid "LDAP Server use SSL" -msgstr "" +msgstr "Il server LDAP utilizza SSL" #: cps/templates/config_edit.html:230 msgid "LDAP Server use TLS" -msgstr "" +msgstr "Il server LDAP utilizza TLS" #: cps/templates/config_edit.html:234 msgid "LDAP Server Certificate" -msgstr "" +msgstr "Certificato del server LDAP" #: cps/templates/config_edit.html:238 msgid "LDAP SSL Certificate Path" -msgstr "" +msgstr "Percorso del certificato SSL del server LDAP" #: cps/templates/config_edit.html:243 msgid "LDAP Distinguished Name (DN)" -msgstr "" +msgstr "LDAP Distinguished Name (DN)" #: cps/templates/config_edit.html:247 msgid "LDAP User object filter" -msgstr "" +msgstr "LDAP User object filter" #: cps/templates/config_edit.html:252 msgid "LDAP Server is OpenLDAP?" -msgstr "" +msgstr "Il server LDAP e un server OpenLDAP?" #: cps/templates/config_edit.html:260 #, python-format msgid "Obtain %(provider)s OAuth Credential" -msgstr "" +msgstr "Ottieni le credenziali OAuth di %(provider)s" #: cps/templates/config_edit.html:263 #, python-format msgid "%(provider)s OAuth Client Id" -msgstr "" +msgstr "%(provider)s OAuth Client Id" #: cps/templates/config_edit.html:267 #, python-format msgid "%(provider)s OAuth Client Secret" -msgstr "" +msgstr "%(provider)s OAuth Client Secret" #: cps/templates/config_edit.html:276 msgid "Allow Reverse Proxy Authentication" -msgstr "" +msgstr "Permetti l'autenticazione Reverse Proxy" #: cps/templates/config_edit.html:280 msgid "Reverse Proxy Header Name" -msgstr "" +msgstr "Nome dell'intestazione Reverse Proxy" #: cps/templates/config_edit.html:292 msgid "External binaries" @@ -1597,31 +1597,31 @@ msgstr "Utente amministratore" #: cps/templates/config_view_edit.html:85 cps/templates/user_edit.html:91 msgid "Allow Downloads" -msgstr "Consenti download" +msgstr "Permetti il download" #: cps/templates/config_view_edit.html:89 cps/templates/user_edit.html:95 msgid "Allow book viewer" -msgstr "" +msgstr "Permetti il visualizzatore di libri" #: cps/templates/config_view_edit.html:93 cps/templates/user_edit.html:99 msgid "Allow Uploads" -msgstr "Consenti caricamenti" +msgstr "Permetti i caricamenti" #: cps/templates/config_view_edit.html:97 cps/templates/user_edit.html:103 msgid "Allow Edit" -msgstr "Consenti modifica" +msgstr "Permetti la modifica" #: cps/templates/config_view_edit.html:101 cps/templates/user_edit.html:107 msgid "Allow Delete books" -msgstr "Consenti l'eliminazione di libri" +msgstr "Permetti l'eliminazione di libri" #: cps/templates/config_view_edit.html:105 cps/templates/user_edit.html:112 msgid "Allow Changing Password" -msgstr "Consenti la modifica della password" +msgstr "Permetti la modifica della password" #: cps/templates/config_view_edit.html:109 cps/templates/user_edit.html:116 msgid "Allow Editing Public Shelfs" -msgstr "Consenti la modifica degli scaffali pubblici" +msgstr "Permetti la modifica degli scaffali pubblici" #: cps/templates/config_view_edit.html:119 msgid "Default visibilities for new users" @@ -1641,7 +1641,7 @@ msgstr "Leggere nel browser" #: cps/templates/detail.html:72 msgid "Listen in browser" -msgstr "" +msgstr "Ascoltare nel navigatore" #: cps/templates/detail.html:117 msgid "Book" @@ -1733,7 +1733,7 @@ msgstr "Digita il nome di dominio" #: cps/templates/email_edit.html:60 msgid "Denied domains for registering" -msgstr "" +msgstr "Dominii bloccati per la registrazione" #: cps/templates/email_edit.html:90 msgid "Do you really want to delete this domain rule?" @@ -1745,7 +1745,7 @@ msgstr "Prossimo" #: cps/templates/http_error.html:37 msgid "Create issue" -msgstr "" +msgstr "Crea un problema" #: cps/templates/http_error.html:44 msgid "Back to home" @@ -1757,7 +1757,7 @@ msgstr "Scoprire (libri casuali)" #: cps/templates/index.html:64 msgid "Group by series" -msgstr "" +msgstr "Raggruppa per serie" #: cps/templates/index.xml:6 msgid "Start" @@ -1773,7 +1773,7 @@ msgstr "Pubblicazioni popolari di questo catalogo basate sui voti." #: cps/templates/index.xml:31 msgid "Recently added Books" -msgstr "" +msgstr "Libri aggiunti di recente" #: cps/templates/index.xml:35 msgid "The latest Books" @@ -1801,11 +1801,11 @@ msgstr "Libri ordinati per serie" #: cps/templates/index.xml:93 msgid "Books ordered by Languages" -msgstr "" +msgstr "Libri ordinati per lingua" #: cps/templates/index.xml:100 msgid "Books ordered by file formats" -msgstr "" +msgstr "Libri ordinati per formato" #: cps/templates/index.xml:103 cps/templates/layout.html:137 msgid "Public Shelves" @@ -1904,7 +1904,7 @@ msgstr "Ricordami" #: cps/templates/login.html:22 msgid "Forgot password" -msgstr "" +msgstr "Password dimenticata" #: cps/templates/login.html:25 msgid "Log in with magic link" @@ -1912,11 +1912,11 @@ msgstr "Accedi con magic link" #: cps/templates/logviewer.html:5 msgid "Show Calibre-Web log" -msgstr "" +msgstr "Mostra il log Calibre-Web" #: cps/templates/logviewer.html:8 msgid "Show access log" -msgstr "" +msgstr "Mostra il log di accesso" #: cps/templates/osd.xml:5 msgid "Calibre-Web ebook catalog" @@ -2012,19 +2012,19 @@ msgstr "Verticale" #: cps/templates/readcbr.html:152 msgid "Direction" -msgstr "" +msgstr "Orientamento" #: cps/templates/readcbr.html:155 msgid "Left to Right" -msgstr "" +msgstr "Da sinistra a destra" #: cps/templates/readcbr.html:156 msgid "Right to Left" -msgstr "" +msgstr "Da destra a sinistra" #: cps/templates/readpdf.html:29 msgid "PDF reader" -msgstr "" +msgstr "Lettore PDF" #: cps/templates/readtxt.html:6 msgid "Basic txt Reader" @@ -2048,7 +2048,7 @@ msgstr "Il tuo indirizzo e-mail" #: cps/templates/remote_login.html:6 msgid "Use your other device, login and visit " -msgstr "" +msgstr "Utilizza il tuo altro apparecchio, accedi e visita" #: cps/templates/remote_login.html:9 msgid "Once you do so, you will automatically get logged in on this device." @@ -2056,7 +2056,7 @@ msgstr "Una volta fatto questo, verrai automaticamente connesso con questo dispo #: cps/templates/remote_login.html:12 msgid "The link will expire after 10 minutes." -msgstr "" +msgstr "Il link scadrà tra 10 minuti." #: cps/templates/search.html:5 msgid "No Results for:" @@ -2092,11 +2092,11 @@ msgstr "Elimina lingue" #: cps/templates/search_form.html:95 msgid "Extensions" -msgstr "" +msgstr "Estensioni" #: cps/templates/search_form.html:105 msgid "Exclude Extensions" -msgstr "" +msgstr "Escludi estensioni" #: cps/templates/search_form.html:117 msgid "Rating bigger than" @@ -2220,15 +2220,15 @@ msgstr "Mostra tutto" #: cps/templates/user_edit.html:51 msgid "OAuth Settings" -msgstr "" +msgstr "Configurazione OAuth" #: cps/templates/user_edit.html:53 msgid "Link" -msgstr "" +msgstr "Collega" #: cps/templates/user_edit.html:55 msgid "Unlink" -msgstr "" +msgstr "Scollega" #: cps/templates/user_edit.html:123 msgid "Delete this user" @@ -3493,13 +3493,13 @@ msgstr "Download Recenti" #~ msgstr "Zaza" #~ msgid "Failed to create path for cover %(path)s (Permission denied)." -#~ msgstr "" +#~ msgstr "La creazione del percorso per la copertina %(path)s è fallita (permesso negato)." #~ msgid "Failed to store cover-file %(cover)s." -#~ msgstr "" +#~ msgstr "Fallito il salvataggio della copertina %(cover)s." #~ msgid "Cover-file is not a valid image file" -#~ msgstr "" +#~ msgstr "Il file della copertina non è un file di immagine valido" #~ msgid "Cover is not a jpg file, can't save" #~ msgstr "La copertina non è un file in formato jpg: non posso salvare" @@ -3514,7 +3514,7 @@ msgstr "Download Recenti" #~ msgstr "e accedi" #~ msgid "Using your another device, login and visit " -#~ msgstr "" +#~ msgstr "Utilizza il tuo altro apparecchio, collegati e visita" #~ msgid "Newest Books" #~ msgstr "I libri più nuovi" @@ -3529,7 +3529,7 @@ msgstr "Download Recenti" #~ msgstr "Libri (Z-A)" #~ msgid "Error opening eBook. Fileformat is not supported." -#~ msgstr "" +#~ msgstr "Errore nell'aprire il libro. Il formato del file non è supportato." #~ msgid "File %(title)s" #~ msgstr "File %(title)s" @@ -3559,16 +3559,16 @@ msgstr "Download Recenti" #~ msgstr "Visore PDF.js" #~ msgid "Please enter a LDAP provider and a DN" -#~ msgstr "" +#~ msgstr "Per favore digita il provider LDAP e un DN" #~ msgid "successfully deleted shelf %(name)s" #~ msgstr "lo scaffale %(name)s è stato eliminato con successo" #~ msgid "LDAP Provider URL" -#~ msgstr "" +#~ msgstr "URL del provider LDAP" #~ msgid "Register with %s, " -#~ msgstr "" +#~ msgstr "Registra con %s, " #~ msgid "Import of optional Google Drive requirements missing" #~ msgstr "Importa parametri mancanti per Google Drive" @@ -3586,22 +3586,22 @@ msgstr "Download Recenti" #~ msgstr "La posizione del Cerfile non è corretta: per favore indica il percorso corretto" #~ msgid "Please enter a LDAP provider, port, DN and user object identifier" -#~ msgstr "" +#~ msgstr "Per favore digita un provider LDAP, DN e un user object identifier" #~ msgid "Please enter a LDAP service account and password" -#~ msgstr "" +#~ msgstr "Per favore digita il nome utente e la password LDAP" #~ msgid "Please enter Github oauth credentials" -#~ msgstr "" +#~ msgstr "Per favore digita le credenziali Github oauth" #~ msgid "Please enter Google oauth credentials" -#~ msgstr "" +#~ msgstr "Per favore digita le credenziali Google oauth" #~ msgid "Logfile location is not valid, please enter correct path" #~ msgstr "La posizione del Logfile non è corretta: per favore indica il percorso corretto" #~ msgid "Access Logfile location is not valid, please enter correct path" -#~ msgstr "" +#~ msgstr "Il percorso per l'Acces Logfile non è corretto: per favore indica il percorso corretto" #~ msgid "DB location is not valid, please enter correct path" #~ msgstr "La posizione DB non è corretta: per favore indica il percorso corretto" @@ -3619,37 +3619,37 @@ msgstr "Download Recenti" #~ msgstr "Non ho trovato il file binario di UnRar" #~ msgid "Use GitHub OAuth" -#~ msgstr "" +#~ msgstr "Utilizza GitHub OAuth" #~ msgid "Use Google OAuth" -#~ msgstr "" +#~ msgstr "Utilizza Google OAuth" #~ msgid "Obtain GitHub OAuth Credential" -#~ msgstr "" +#~ msgstr "Ottieni le credenziali GitHub OAuth" #~ msgid "GitHub OAuth Client Id" -#~ msgstr "" +#~ msgstr "GitHub OAuth Client Id" #~ msgid "GitHub OAuth Client Secret" -#~ msgstr "" +#~ msgstr "GitHub OAuth Client Secret" #~ msgid "Obtain Google OAuth Credential" -#~ msgstr "" +#~ msgstr "Ottieni le credenziali Google OAuth" #~ msgid "Google OAuth Client Id" -#~ msgstr "" +#~ msgstr "Google OAuth Client Id" #~ msgid "Google OAuth Client Secret" -#~ msgstr "" +#~ msgstr "Google OAuth Client Secret" #~ msgid "Use" #~ msgstr "Uso" #~ msgid "Play / pause" -#~ msgstr "" +#~ msgstr "Play / pausa" #~ msgid "volume" -#~ msgstr "" +#~ msgstr "valume" #~ msgid "unknown" #~ msgstr "sconosciuto" From 8c4052e884a05489f81848fe6b67671c4c076535 Mon Sep 17 00:00:00 2001 From: ZIzA <34818054+XZVB12@users.noreply.github.com> Date: Tue, 21 Jan 2020 22:22:10 +0400 Subject: [PATCH 05/31] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index e480f76f..a3e05cd3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # About -Fork of the project https://github.com/janeczku/calibre-web - Calibre-Web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing [Calibre](https://calibre-ebook.com) database. *This software is a fork of [library](https://github.com/mutschler/calibreserver) and licensed under the GPL v3 License.* From 155795a18e0ce0ec7d7ed060a32ca1727a628bf6 Mon Sep 17 00:00:00 2001 From: ZIzA <34818054+XZVB12@users.noreply.github.com> Date: Tue, 21 Jan 2020 22:29:23 +0400 Subject: [PATCH 06/31] Russian language update --- cps/translations/ru/LC_MESSAGES/messages.mo | Bin 48460 -> 48521 bytes cps/translations/ru/LC_MESSAGES/messages.po | 283 +------------------- 2 files changed, 2 insertions(+), 281 deletions(-) diff --git a/cps/translations/ru/LC_MESSAGES/messages.mo b/cps/translations/ru/LC_MESSAGES/messages.mo index 99a96df2d500112675c4730d6f4c222ea5a24d41..74781e37092880fd8d17866fb1e90d517a3b860c 100644 GIT binary patch delta 594 zcmYk&O)G>^6u|M5q)CV&F9}ZyCBmdpGa*?_O;!?$FEAD?u(FuJN=-yb@&T}$=EaPe zXDpSnICo>^B^x{0%!&p7Yb-3De&?L$oO@6A{7mT(wrvm&E7@#i{5$S<-Il|BM*PGl7W*oBu^ zgLl}B4>*MH=*N!h@?vvXPrik=KaL?h#Y%j|d3?hK9M6~MjQ9^6E`&>4C#iPcy@JAaGq_>6XePn^VW^x~vjo}WcK7a1n#AlN|rgh$wf zFW7)3oW`mm&xheu#PJ6`z7fag3;4!T=S!uRCE89-X?_}<`n4x69oH+=Hp8UIjJ5x{T GHO~($8M03R delta 515 zcmXZYJxc>Y5P;z^SRBEC-!X{s5Y$HT1dW@36Pz5>smfr1yc&qZXsEHZ>I7{T}dJm`pw z=sN29D#q~uqgccQ`nZgtJCQVQVjsF_p~5L_aht|4L%!pREu#bt4)*XH2XVI|(uR5L z#WS410>EmpFhDSa`U}^v8!xc~ zU0lQ`Ok${%F=Gj1(lV{-xHVV0-ug&cs-j%wDM!`*R)yU&Raw>5ttzOZpZAZHV^Xb? L9Q!9F!^s-IK>~Vw diff --git a/cps/translations/ru/LC_MESSAGES/messages.po b/cps/translations/ru/LC_MESSAGES/messages.po index ea1c8ed6..c4cc6717 100644 --- a/cps/translations/ru/LC_MESSAGES/messages.po +++ b/cps/translations/ru/LC_MESSAGES/messages.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" "POT-Creation-Date: 2019-12-08 10:07+0100\n" -"PO-Revision-Date: 2020-01-10 05:09+0400\n" +"PO-Revision-Date: 2020-01-21 22:27+0400\n" "Last-Translator: ZIZA\n" "Language: ru\n" "Language-Team: \n" @@ -264,7 +264,7 @@ msgstr "Файл %(filename)s не удалось сохранить во вре #: cps/editbooks.py:580 msgid "Uploaded book probably exists in the library, consider to change before upload new: " -msgstr "Загруженная книга, вероятно, существует в библиотеке, перед изменением добавьте новую:" +msgstr "Загруженная книга, вероятно, существует в библиотеке, перед тем как загрузить новую, рассмотрите возможность изменения:" #: cps/editbooks.py:595 #, python-format @@ -2211,9 +2211,6 @@ msgstr "Последние загрузки" #~ msgid "Afrikaans" #~ msgstr "Африкаанс" -#~ msgid "Ainu (Japan)" -#~ msgstr "" - #~ msgid "Akan" #~ msgstr "Акан" @@ -2223,15 +2220,9 @@ msgstr "Последние загрузки" #~ msgid "Aleut" #~ msgstr "Алеутский" -#~ msgid "Altai; Southern" -#~ msgstr "" - #~ msgid "Amharic" #~ msgstr "Амхарский (Амаринья)" -#~ msgid "English; Old (ca. 450-1100)" -#~ msgstr "" - #~ msgid "Angika" #~ msgstr "Анжика" @@ -2244,9 +2235,6 @@ msgstr "Последние загрузки" #~ msgid "Aragonese" #~ msgstr "Арагонский" -#~ msgid "Mapudungun" -#~ msgstr "" - #~ msgid "Arapaho" #~ msgstr "Арапахо" @@ -2277,9 +2265,6 @@ msgstr "Последние загрузки" #~ msgid "Bashkir" #~ msgstr "Башкирский" -#~ msgid "Baluchi" -#~ msgstr "" - #~ msgid "Bambara" #~ msgstr "Бамбара" @@ -2337,15 +2322,9 @@ msgstr "Последние загрузки" #~ msgid "Bulgarian" #~ msgstr "Болгарский" -#~ msgid "Bilin" -#~ msgstr "" - #~ msgid "Caddo" #~ msgstr "Каддо" -#~ msgid "Carib; Galibi" -#~ msgstr "" - #~ msgid "Catalan" #~ msgstr "Каталанский" @@ -2385,9 +2364,6 @@ msgstr "Последние загрузки" #~ msgid "Cherokee" #~ msgstr "Чероки" -#~ msgid "Slavonic; Old" -#~ msgstr "" - #~ msgid "Chuvash" #~ msgstr "Чувашский" @@ -2406,9 +2382,6 @@ msgstr "Последние загрузки" #~ msgid "Cree" #~ msgstr "Кри" -#~ msgid "Turkish; Crimean" -#~ msgstr "" - #~ msgid "Kashubian" #~ msgstr "Кашубианский" @@ -2439,21 +2412,9 @@ msgstr "Последние загрузки" #~ msgid "Dinka" #~ msgstr "Динка" -#~ msgid "Dhivehi" -#~ msgstr "" - -#~ msgid "Dogri (macrolanguage)" -#~ msgstr "" - -#~ msgid "Sorbian; Lower" -#~ msgstr "" - #~ msgid "Duala" #~ msgstr "Дуала" -#~ msgid "Dutch; Middle (ca. 1050-1350)" -#~ msgstr "" - #~ msgid "Dyula" #~ msgstr "Диула (Дьюла)" @@ -2496,9 +2457,6 @@ msgstr "Последние загрузки" #~ msgid "Ewondo" #~ msgstr "Эвондо" -#~ msgid "Fang (Equatorial Guinea)" -#~ msgstr "" - #~ msgid "Faroese" #~ msgstr "Фарерский" @@ -2511,9 +2469,6 @@ msgstr "Последние загрузки" #~ msgid "Fijian" #~ msgstr "Фиджийский" -#~ msgid "Filipino" -#~ msgstr "" - #~ msgid "Finnish" #~ msgstr "Финский" @@ -2523,21 +2478,6 @@ msgstr "Последние загрузки" #~ msgid "French" #~ msgstr "Французский" -#~ msgid "French; Middle (ca. 1400-1600)" -#~ msgstr "" - -#~ msgid "French; Old (842-ca. 1400)" -#~ msgstr "" - -#~ msgid "Frisian; Northern" -#~ msgstr "" - -#~ msgid "Frisian; Eastern" -#~ msgstr "" - -#~ msgid "Frisian; Western" -#~ msgstr "" - #~ msgid "Fulah" #~ msgstr "Фулах" @@ -2550,33 +2490,18 @@ msgstr "Последние загрузки" #~ msgid "Gayo" #~ msgstr "Гайо" -#~ msgid "Gbaya (Central African Republic)" -#~ msgstr "" - #~ msgid "Geez" #~ msgstr "Геэз" #~ msgid "Gilbertese" #~ msgstr "Гильбертский" -#~ msgid "Gaelic; Scottish" -#~ msgstr "" - #~ msgid "Irish" #~ msgstr "Ирландский" -#~ msgid "Galician" -#~ msgstr "" - #~ msgid "Manx" #~ msgstr "Мэнкский" -#~ msgid "German; Middle High (ca. 1050-1500)" -#~ msgstr "" - -#~ msgid "German; Old High (ca. 750-1050)" -#~ msgstr "" - #~ msgid "Gondi" #~ msgstr "Гонди" @@ -2595,21 +2520,12 @@ msgstr "Последние загрузки" #~ msgid "Guarani" #~ msgstr "Гуарани" -#~ msgid "German; Swiss" -#~ msgstr "" - #~ msgid "Gujarati" #~ msgstr "Гуджарати" -#~ msgid "Gwichʼin" -#~ msgstr "" - #~ msgid "Haida" #~ msgstr "Хайда" -#~ msgid "Creole; Haitian" -#~ msgstr "" - #~ msgid "Hausa" #~ msgstr "Хауса" @@ -2640,9 +2556,6 @@ msgstr "Последние загрузки" #~ msgid "Croatian" #~ msgstr "Хорватский" -#~ msgid "Sorbian; Upper" -#~ msgstr "" - #~ msgid "Hungarian" #~ msgstr "Венгерский" @@ -2661,9 +2574,6 @@ msgstr "Последние загрузки" #~ msgid "Ido" #~ msgstr "Идо" -#~ msgid "Yi; Sichuan" -#~ msgstr "" - #~ msgid "Inuktitut" #~ msgstr "Инуктитут" @@ -2715,12 +2625,6 @@ msgstr "Последние загрузки" #~ msgid "Kachin" #~ msgstr "Качинский" -#~ msgid "Kalaallisut" -#~ msgstr "" - -#~ msgid "Kamba (Kenya)" -#~ msgstr "" - #~ msgid "Kannada" #~ msgstr "Каннада" @@ -2745,9 +2649,6 @@ msgstr "Последние загрузки" #~ msgid "Khasi" #~ msgstr "Кхаси" -#~ msgid "Khmer; Central" -#~ msgstr "" - #~ msgid "Khotanese" #~ msgstr "Хотанский" @@ -2763,9 +2664,6 @@ msgstr "Последние загрузки" #~ msgid "Kimbundu" #~ msgstr "Кимбунду" -#~ msgid "Konkani (macrolanguage)" -#~ msgstr "" - #~ msgid "Komi" #~ msgstr "Коми" @@ -2823,9 +2721,6 @@ msgstr "Последние загрузки" #~ msgid "Lezghian" #~ msgstr "Лезгинский" -#~ msgid "Limburgan" -#~ msgstr "" - #~ msgid "Lingala" #~ msgstr "Лингала" @@ -2838,9 +2733,6 @@ msgstr "Последние загрузки" #~ msgid "Lozi" #~ msgstr "Лози" -#~ msgid "Luxembourgish" -#~ msgstr "" - #~ msgid "Luba-Lulua" #~ msgstr "Луба-Лулуа" @@ -2868,9 +2760,6 @@ msgstr "Последние загрузки" #~ msgid "Magahi" #~ msgstr "Магахи" -#~ msgid "Marshallese" -#~ msgstr "" - #~ msgid "Maithili" #~ msgstr "Майтхили" @@ -2895,21 +2784,12 @@ msgstr "Последние загрузки" #~ msgid "Mandar" #~ msgstr "Мандарский" -#~ msgid "Mende (Sierra Leone)" -#~ msgstr "" - #~ msgid "Irish; Middle (900-1200)" #~ msgstr "Среднеирландский (900-1200)" -#~ msgid "Mi'kmaq" -#~ msgstr "" - #~ msgid "Minangkabau" #~ msgstr "Минангкабау" -#~ msgid "Uncoded languages" -#~ msgstr "" - #~ msgid "Macedonian" #~ msgstr "Македонский" @@ -2937,9 +2817,6 @@ msgstr "Последние загрузки" #~ msgid "Maori" #~ msgstr "Маори" -#~ msgid "Malay (macrolanguage)" -#~ msgstr "" - #~ msgid "Multiple languages" #~ msgstr "Разных семей языки" @@ -2964,9 +2841,6 @@ msgstr "Последние загрузки" #~ msgid "Nauru" #~ msgstr "Науру" -#~ msgid "Navajo" -#~ msgstr "" - #~ msgid "Ndebele; South" #~ msgstr "Ндебеле южный" @@ -2976,15 +2850,9 @@ msgstr "Последние загрузки" #~ msgid "Ndonga" #~ msgstr "Ндунга" -#~ msgid "German; Low" -#~ msgstr "" - #~ msgid "Nepali" #~ msgstr "Непальский" -#~ msgid "Bhasa; Nepal" -#~ msgstr "" - #~ msgid "Nias" #~ msgstr "Ниас" @@ -2997,9 +2865,6 @@ msgstr "Последние загрузки" #~ msgid "Norwegian Nynorsk" #~ msgstr "Норвежский Нюнорск" -#~ msgid "Norwegian Bokmål" -#~ msgstr "" - #~ msgid "Nogai" #~ msgstr "Ногайский" @@ -3012,15 +2877,6 @@ msgstr "Последние загрузки" #~ msgid "N'Ko" #~ msgstr "Н'ко" -#~ msgid "Sotho; Northern" -#~ msgstr "" - -#~ msgid "Newari; Old" -#~ msgstr "" - -#~ msgid "Nyanja" -#~ msgstr "" - #~ msgid "Nyamwezi" #~ msgstr "Ньямвези" @@ -3033,9 +2889,6 @@ msgstr "Последние загрузки" #~ msgid "Nzima" #~ msgstr "Нзима" -#~ msgid "Occitan (post 1500)" -#~ msgstr "" - #~ msgid "Ojibwa" #~ msgstr "Оджибва" @@ -3048,9 +2901,6 @@ msgstr "Последние загрузки" #~ msgid "Osage" #~ msgstr "Оседжи" -#~ msgid "Ossetian" -#~ msgstr "" - #~ msgid "Turkish; Ottoman (1500-1928)" #~ msgstr "Турецкий; Отомангский (1500-1928)" @@ -3063,18 +2913,12 @@ msgstr "Последние загрузки" #~ msgid "Pampanga" #~ msgstr "Пампанга" -#~ msgid "Panjabi" -#~ msgstr "" - #~ msgid "Papiamento" #~ msgstr "Папьяменто" #~ msgid "Palauan" #~ msgstr "Палау" -#~ msgid "Persian; Old (ca. 600-400 B.C.)" -#~ msgstr "" - #~ msgid "Phoenician" #~ msgstr "Финикийский" @@ -3105,12 +2949,6 @@ msgstr "Последние загрузки" #~ msgid "Rapanui" #~ msgstr "Рапаню" -#~ msgid "Maori; Cook Islands" -#~ msgstr "" - -#~ msgid "Romansh" -#~ msgstr "" - #~ msgid "Romany" #~ msgstr "Цыганский" @@ -3120,9 +2958,6 @@ msgstr "Последние загрузки" #~ msgid "Rundi" #~ msgstr "Рунди" -#~ msgid "Romanian; Macedo-" -#~ msgstr "" - #~ msgid "Russian" #~ msgstr "Русский" @@ -3135,9 +2970,6 @@ msgstr "Последние загрузки" #~ msgid "Yakut" #~ msgstr "Якутский" -#~ msgid "Aramaic; Samaritan" -#~ msgstr "" - #~ msgid "Sanskrit" #~ msgstr "Санскрит" @@ -3174,24 +3006,12 @@ msgstr "Последние загрузки" #~ msgid "Slovenian" #~ msgstr "Словенский" -#~ msgid "Sami; Southern" -#~ msgstr "" - -#~ msgid "Sami; Northern" -#~ msgstr "" - #~ msgid "Lule Sami" #~ msgstr "Люле-саамский" -#~ msgid "Sami; Inari" -#~ msgstr "" - #~ msgid "Samoan" #~ msgstr "Самоанский" -#~ msgid "Sami; Skolt" -#~ msgstr "" - #~ msgid "Shona" #~ msgstr "Шона" @@ -3219,9 +3039,6 @@ msgstr "Последние загрузки" #~ msgid "Sardinian" #~ msgstr "Сардинский" -#~ msgid "Sranan Tongo" -#~ msgstr "" - #~ msgid "Serbian" #~ msgstr "Сербский" @@ -3243,15 +3060,9 @@ msgstr "Последние загрузки" #~ msgid "Sumerian" #~ msgstr "Шумерский" -#~ msgid "Swahili (macrolanguage)" -#~ msgstr "" - #~ msgid "Swedish" #~ msgstr "Шведский" -#~ msgid "Syriac; Classical" -#~ msgstr "" - #~ msgid "Syriac" #~ msgstr "Сирийский" @@ -3297,9 +3108,6 @@ msgstr "Последние загрузки" #~ msgid "Tokelau" #~ msgstr "Токелау" -#~ msgid "Klingon" -#~ msgstr "" - #~ msgid "Tlingit" #~ msgstr "Тлингит" @@ -3381,12 +3189,6 @@ msgstr "Последние загрузки" #~ msgid "Votic" #~ msgstr "Вотик" -#~ msgid "Wolaytta" -#~ msgstr "" - -#~ msgid "Waray (Philippines)" -#~ msgstr "" - #~ msgid "Washo" #~ msgstr "Вашо" @@ -3396,9 +3198,6 @@ msgstr "Последние загрузки" #~ msgid "Wolof" #~ msgstr "Волоф" -#~ msgid "Kalmyk" -#~ msgstr "" - #~ msgid "Xhosa" #~ msgstr "Коса" @@ -3417,9 +3216,6 @@ msgstr "Последние загрузки" #~ msgid "Zapotec" #~ msgstr "Сапотекский" -#~ msgid "Blissymbols" -#~ msgstr "" - #~ msgid "Zenaga" #~ msgstr "Зенагский" @@ -3441,27 +3237,12 @@ msgstr "Последние загрузки" #~ msgid "Zaza" #~ msgstr "Зазаки" -#~ msgid "Failed to create path for cover %(path)s (Permission denied)." -#~ msgstr "" - -#~ msgid "Failed to store cover-file %(cover)s." -#~ msgstr "" - -#~ msgid "Cover-file is not a valid image file" -#~ msgstr "" - -#~ msgid "Preparing document for printing..." -#~ msgstr "" - #~ msgid "Using your another device, visit" #~ msgstr "Используйте другое устройство, посетите" #~ msgid "and log in" #~ msgstr "и войти" -#~ msgid "Using your another device, login and visit " -#~ msgstr "" - #~ msgid "Newest Books" #~ msgstr "Новые Книги" @@ -3474,12 +3255,6 @@ msgstr "Последние загрузки" #~ msgid "Books (Z-A)" #~ msgstr "Книги (Я-А)" -#~ msgid "Error opening eBook. Fileformat is not supported." -#~ msgstr "" - -#~ msgid "File %(title)s" -#~ msgstr "" - #~ msgid "Show sorted books" #~ msgstr "Показывать отсортированные книги" @@ -3504,18 +3279,9 @@ msgstr "Последние загрузки" #~ msgid "PDF.js viewer" #~ msgstr "Просмотровщик PDF.js" -#~ msgid "Please enter a LDAP provider and a DN" -#~ msgstr "" - #~ msgid "successfully deleted shelf %(name)s" #~ msgstr "удачно удалена полка %(name)s" -#~ msgid "LDAP Provider URL" -#~ msgstr "" - -#~ msgid "Register with %s, " -#~ msgstr "" - #~ msgid "Import of optional Google Drive requirements missing" #~ msgstr "Импорт дополнительных требований к Google Диску отсутствует" @@ -3531,24 +3297,9 @@ msgstr "Последние загрузки" #~ msgid "Certfile location is not valid, please enter correct path" #~ msgstr "Неверное расположение сертификата, введите правильный путь" -#~ msgid "Please enter a LDAP provider, port, DN and user object identifier" -#~ msgstr "" - -#~ msgid "Please enter a LDAP service account and password" -#~ msgstr "" - -#~ msgid "Please enter Github oauth credentials" -#~ msgstr "" - -#~ msgid "Please enter Google oauth credentials" -#~ msgstr "" - #~ msgid "Logfile location is not valid, please enter correct path" #~ msgstr "Неверное расположение лог-файла, введите правильный путь" -#~ msgid "Access Logfile location is not valid, please enter correct path" -#~ msgstr "" - #~ msgid "DB location is not valid, please enter correct path" #~ msgstr "Неверное расположение базы данных, введите правильный путь" @@ -3561,35 +3312,5 @@ msgstr "Последние загрузки" #~ msgid "Unrar binary file not found" #~ msgstr "Unrar двочиный файл не найден" -#~ msgid "Use GitHub OAuth" -#~ msgstr "" - -#~ msgid "Use Google OAuth" -#~ msgstr "" - -#~ msgid "Obtain GitHub OAuth Credential" -#~ msgstr "" - -#~ msgid "GitHub OAuth Client Id" -#~ msgstr "" - -#~ msgid "GitHub OAuth Client Secret" -#~ msgstr "" - -#~ msgid "Obtain Google OAuth Credential" -#~ msgstr "" - -#~ msgid "Google OAuth Client Id" -#~ msgstr "" - -#~ msgid "Google OAuth Client Secret" -#~ msgstr "" - #~ msgid "Use" #~ msgstr "Использовать" - -#~ msgid "Play / pause" -#~ msgstr "" - -#~ msgid "volume" -#~ msgstr "" From e1d6aec682efb618cd4847c77c9847417520b80b Mon Sep 17 00:00:00 2001 From: ZIzA <34818054+XZVB12@users.noreply.github.com> Date: Tue, 21 Jan 2020 23:06:22 +0400 Subject: [PATCH 07/31] quick fix sorry --- cps/translations/ru/LC_MESSAGES/messages.mo | Bin 48521 -> 48535 bytes cps/translations/ru/LC_MESSAGES/messages.po | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cps/translations/ru/LC_MESSAGES/messages.mo b/cps/translations/ru/LC_MESSAGES/messages.mo index 74781e37092880fd8d17866fb1e90d517a3b860c..a74e8417cba36e17774cb6f045e7e7f5cd3173c7 100644 GIT binary patch delta 2377 zcmXZd3rv+|7{KwjgCjyfZgRNF5fm~rOpx0t%Cw0~(y>q!LPJH7g+*IZ={~^BIZ#f9 zVSs`X5;aZ$pr_^jL!N;)9%FkjN`AsWN+^5tm@*Ir73iOrdF$f#2 zybB*8@872kwSeF!3er*7ex+nU&*D^k6~nOxr(-kvVK2tx7{=m{7>KrdrRHG>dgCJ8 zirKgjJy?OiViXp-45gd|l`f^qu^)G1{M$+`!!DGL{z3=dK^aig0X>5hj3M8EHmt_i z@lBMO-$NO&?>kB@K|4CI5a-}dgP@F{6ALh;L8*M)h8g%3u0z{FYFLbm@gly4Vecwc ziZ1lQI~a;yje5(%QC27mgRux@rC!GAXw(qMNDko)JdLu4*H9kxKBPOaVbX<=z;x?2KpTe2=4chTG%98pw z=`#?CayYYaK5n!;h$ZA-qD*LBvr}Rn?%l?0FciITGw#4L+=;*7{aA8TpN(>qmD-ML@Gu&(M}HH@(s>`#r#cN& z$V*V_%_yh&JVxSWlxsSHGcdAUf1Y8v1m{v;VdZb29JaS`Cbpn#LG#&s}R$vJIqBnBnB2>pH&a|K))B9C@ZrYrTrkvjIUt@`giGeRVaIZ6<@*|DA%*- zL!}GbpFqM48d|C=G5~b>D9N0vNa!^itJFdjfa1RE5q&sXv8E88e37RLALvyhEXlCQ%wY{S|3 z9nQhKDD5BY(*u7T_Qn(7s{bLg}!(erTw=fs_6e$?H?3m06r&q2cSR7 zmgJyxupXu1c9cU}gR+Ee7>YMA2yLVKu!Uk4dA_IAk?EY0oH;+)(^=q3N;qovjn|t) zrrR7fN5^Z;0f*UZ4)Z(0-?8x;bHF@d4tw%yZGJ(m<5lLE>EW;2JjsvSQ_@%-`oIBm ONIn>^_FU<92mJ>FBegdG delta 2363 zcmXZddrZ}37{Kvoh~$tv%2h6k$|Uh1OO!*2MG8?)Gos{xX;BI-G>jHXoosnYP`QMJ zs05TkkP(Mlg3Zh3(%CxHmYbH%+S0|GX0{rz)%WrJ{q=dC=lp)}?|q;5{ryhExW@Xvaty~}^w#S! z5D!>+3oan<+9ys)Cb&vL2lCr55|1lzDwbdvZo}zVhd$VWaoCT#fGZe)W0;6j4~TeS zDi-51T!fuiiq|m`bE=&pX#`uUc^G!#PK>M(c>-Hd2O7m#yo)-a;99eS`4~m+Ko2a( zZCHW2@_$e#>`^E3IQnBO=HNUma}vBt(2Ne8`k~14xDiwFG`@gixEb^6MKbUrmZRT6 zks{oKQ}8ZM!*SFt3urJMN}{i=`k}c*L0huu z6Enjsj3Y0>e5}O~ylvIJJ~exofb*#rpbog#%3Cpu{5#a|LD(^K{R-5rE=OIU>zGp{ zf#9Z92tIBG%tAdRW$3_mtM1uuz6%RcJF^}2{w~xNU&d0L)M4&>6Ls&u$1V69>g$>F znaDycauUQ4G@&;Rp`PyZs4Myb^@dTaE}iBB;)~kK1*n}{jk)*|PQjCC!*i(P{e`;K z(q+c=w{*r6JWD+t^|aUHYINal^!(fmScN*#dVCT4@MR1;Vcwc|a6S0|+O_@#`;X6H z1~#Hj^k>wqy@R}EPMOwi4pkDy^TU(43AduI{3p~K{>0fh{Y!He?6{2lXM$P?>|2z>+XMQuTjtmjA1(dhq@){!)Aar zs5cg&9?~~ZTUd*_$G>18-a|cXUZ+HsVz#R&)}H2>Y)@Y7I_{{pMYoOY7bt4JFeiH;lYXc%!pB@P8a(tQ7zN diff --git a/cps/translations/ru/LC_MESSAGES/messages.po b/cps/translations/ru/LC_MESSAGES/messages.po index c4cc6717..b7e81f9f 100644 --- a/cps/translations/ru/LC_MESSAGES/messages.po +++ b/cps/translations/ru/LC_MESSAGES/messages.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" "POT-Creation-Date: 2019-12-08 10:07+0100\n" -"PO-Revision-Date: 2020-01-21 22:27+0400\n" +"PO-Revision-Date: 2020-01-21 23:03+0400\n" "Last-Translator: ZIZA\n" "Language: ru\n" "Language-Team: \n" @@ -1558,7 +1558,7 @@ msgstr "Regexp для сортировки по названию" #: cps/templates/config_view_edit.html:59 msgid "Tags for Mature Content" -msgstr "Теги для Зрелого Контента" +msgstr "Теги для Взрослого Контента" #: cps/templates/config_view_edit.html:73 msgid "Default settings for new users" @@ -2105,11 +2105,11 @@ msgstr "Серий в этой Библиотеке" #: cps/templates/stats.html:28 msgid "Linked libraries" -msgstr "Установленное ПО" +msgstr "Связанные библиотеки" #: cps/templates/stats.html:32 msgid "Program library" -msgstr "Название" +msgstr "Программа" #: cps/templates/stats.html:33 msgid "Installed Version" From 594c8aad91960b98f0f8733f6e6832d89c237221 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 26 Jan 2020 19:36:15 +0100 Subject: [PATCH 08/31] Update Version Info --- cps/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/constants.py b/cps/constants.py index 76b203a4..50c34968 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -126,7 +126,7 @@ def selected_roles(dictionary): BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, ' 'series_id, languages') -STABLE_VERSION = {'version': '0.6.5'} +STABLE_VERSION = {'version': '0.6.6 Beta'} NIGHTLY_VERSION = {} NIGHTLY_VERSION[0] = '$Format:%H$' From 647e954e8afddbcc3401a0f8ba4ad675769edfe1 Mon Sep 17 00:00:00 2001 From: Ghighi Eftimie Date: Sun, 26 Jan 2020 20:53:03 +0200 Subject: [PATCH 09/31] fix admin view of error log --- cps/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/admin.py b/cps/admin.py index d338da42..b7f6165a 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -672,7 +672,7 @@ def view_logfile(): logfiles[0] = logger.get_logfile(config.config_logfile) logfiles[1] = logger.get_accesslogfile(config.config_access_logfile) return render_title_template("logviewer.html",title=_(u"Logfile viewer"), accesslog_enable=config.config_access_log, - logfiles=logfiles, page="logfile") + log_enable=True, logfiles=logfiles, page="logfile") @admi.route("/ajax/log/") From fc79cdfaa259effd9989e4f0d35efb02065df9b8 Mon Sep 17 00:00:00 2001 From: Ghighi Eftimie Date: Mon, 27 Jan 2020 15:24:11 +0200 Subject: [PATCH 10/31] fix mismerge --- cps/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/admin.py b/cps/admin.py index b7f6165a..4a7a28a7 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -672,7 +672,7 @@ def view_logfile(): logfiles[0] = logger.get_logfile(config.config_logfile) logfiles[1] = logger.get_accesslogfile(config.config_access_logfile) return render_title_template("logviewer.html",title=_(u"Logfile viewer"), accesslog_enable=config.config_access_log, - log_enable=True, logfiles=logfiles, page="logfile") + log_enable=bool(config.config_logfile != logger.LOG_TO_STDOUT), logfiles=logfiles, page="logfile") @admi.route("/ajax/log/") From 7803ffb99557526233ea5f907c19773d192e38a0 Mon Sep 17 00:00:00 2001 From: ElQuimm <50202052+ElQuimm@users.noreply.github.com> Date: Mon, 27 Jan 2020 15:07:00 +0100 Subject: [PATCH 11/31] Update italian message.po Thank you. --- cps/translations/it/LC_MESSAGES/messages.po | 78 ++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/cps/translations/it/LC_MESSAGES/messages.po b/cps/translations/it/LC_MESSAGES/messages.po index 3e435abe..2974e7cd 100644 --- a/cps/translations/it/LC_MESSAGES/messages.po +++ b/cps/translations/it/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" "POT-Creation-Date: 2020-01-26 19:32+0100\n" "PO-Revision-Date: 2017-04-04 15:09+0200\n" -"Last-Translator: Marco Picone \n" +"Last-Translator: ElQuimm \n" "Language: it\n" "Language-Team: \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -153,7 +153,7 @@ msgstr "Visualizzatore del Logfile" #: cps/admin.py:710 msgid "Requesting update package" -msgstr "Richiedo del pacchetto di aggiornamento" +msgstr "Richiedo il pacchetto di aggiornamento" #: cps/admin.py:711 msgid "Downloading update package" @@ -366,12 +366,12 @@ msgstr "Il file richiesto non può essere letto. I permessi sono corretti?" #: cps/helper.py:322 #, python-format msgid "Rename title from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "La modifica del titolo da: '%(src)s' a '%(dest)s' è terminata con l'errore: %(error)s" +msgstr "La modifica del titolo da '%(src)s' a '%(dest)s' è terminata con l'errore: %(error)s" #: cps/helper.py:332 #, python-format msgid "Rename author from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "La modifica dell'autore da: '%(src)s' a '%(dest)s' è terminata con l'errore: %(error)s" +msgstr "La modifica dell'autore da '%(src)s' a '%(dest)s' è terminata con l'errore: %(error)s" #: cps/helper.py:346 #, python-format @@ -470,7 +470,7 @@ msgstr "Google Oauth error, per favore riprova più tardi." #: cps/shelf.py:47 cps/shelf.py:99 msgid "Invalid shelf specified" -msgstr "Lo scaffale specificato non è valevole" +msgstr "Lo scaffale specificato non è valido" #: cps/shelf.py:54 #, python-format @@ -564,7 +564,7 @@ msgstr "Errore durante l'apertura dello scaffale. Lo scaffale non esiste o non #: cps/shelf.py:323 #, python-format msgid "Change order of Shelf: '%(name)s'" -msgstr "Modificare l'ordine dello scaffale: '%(name)s'" +msgstr "Modifica l'ordine dello scaffale: '%(name)s'" #: cps/ub.py:57 msgid "Recently Added" @@ -588,7 +588,7 @@ msgstr "Libri più votati" #: cps/ub.py:66 msgid "Show best rated books" -msgstr "Mostra la sezione dei libri più votati" +msgstr "Mostra i libri più votati" #: cps/templates/index.xml:46 cps/templates/index.xml:50 cps/ub.py:67 #: cps/web.py:1009 @@ -909,7 +909,7 @@ msgstr "Profilo aggiornato" #: cps/web.py:1391 cps/web.py:1394 cps/web.py:1397 cps/web.py:1404 #: cps/web.py:1409 msgid "Read a Book" -msgstr "Leggere un libro" +msgstr "Leggi un libro" #: cps/web.py:1420 msgid "Error opening eBook. File does not exist or file is not accessible." @@ -1229,7 +1229,7 @@ msgstr "Carica formato" #: cps/templates/book_edit.html:169 msgid "view book after edit" -msgstr "visualizzare il libro dopo la modifica" +msgstr "visualizza il libro dopo la modifica" #: cps/templates/book_edit.html:172 cps/templates/book_edit.html:208 msgid "Get metadata" @@ -1301,7 +1301,7 @@ msgstr "Posizione del database di Calibre" #: cps/templates/config_edit.html:25 msgid "Use Google Drive?" -msgstr "Usa Google Drive?" +msgstr "Utilizzo Google Drive?" #: cps/templates/config_edit.html:31 msgid "Google Drive config problem" @@ -1341,7 +1341,7 @@ msgstr "Porta del server" #: cps/templates/config_edit.html:91 msgid "SSL certfile location (leave it empty for non-SSL Servers)" -msgstr "Percorso del certfile SSL (lascia vuoto per una configurazione del server senza SSL)" +msgstr "Percorso del Certfile SSL (lascia vuoto per una configurazione del server senza SSL)" #: cps/templates/config_edit.html:95 msgid "SSL Keyfile location (leave it empty for non-SSL Servers)" @@ -1413,7 +1413,7 @@ msgstr "Utilizza Goodreads" #: cps/templates/config_edit.html:176 msgid "Obtain an API Key" -msgstr "Ottenere una chiave API" +msgstr "Otteni una chiave API" #: cps/templates/config_edit.html:180 msgid "Goodreads API Key" @@ -1425,7 +1425,7 @@ msgstr "Goodreads API Secret" #: cps/templates/config_edit.html:191 msgid "Login type" -msgstr "" +msgstr "Tipo di login" #: cps/templates/config_edit.html:193 msgid "Use standard Authentication" @@ -1485,7 +1485,7 @@ msgstr "LDAP User object filter" #: cps/templates/config_edit.html:252 msgid "LDAP Server is OpenLDAP?" -msgstr "Il server LDAP e un server OpenLDAP?" +msgstr "Il server LDAP è un server OpenLDAP?" #: cps/templates/config_edit.html:260 #, python-format @@ -1581,11 +1581,11 @@ msgstr "Collega lo stato letto/non letto nella colonna di Calibre" #: cps/templates/config_view_edit.html:55 msgid "Regular expression for title sorting" -msgstr "Espressione regolare per 'ordine di visualizzazione del titolo" +msgstr "Espressione regolare per ordinare la visualizzazione del titolo" #: cps/templates/config_view_edit.html:59 msgid "Tags for Mature Content" -msgstr "Tags per libri per adulti" +msgstr "Tags per i libri per adulti" #: cps/templates/config_view_edit.html:73 msgid "Default settings for new users" @@ -1601,7 +1601,7 @@ msgstr "Permetti il download" #: cps/templates/config_view_edit.html:89 cps/templates/user_edit.html:97 msgid "Allow book viewer" -msgstr "Permetti il visualizzatore di libri" +msgstr "Permetti l'utilizzo del visualizzatore di libri" #: cps/templates/config_view_edit.html:93 cps/templates/user_edit.html:101 msgid "Allow Uploads" @@ -1633,15 +1633,15 @@ msgstr "Mostra libri a caso nella vista dettagliata" #: cps/templates/config_view_edit.html:139 cps/templates/user_edit.html:89 msgid "Show mature content" -msgstr "Mostra sezione adulti" +msgstr "Mostra sezione per adulti" #: cps/templates/detail.html:59 msgid "Read in browser" -msgstr "Leggere nel browser" +msgstr "Leggi nel navigatore" #: cps/templates/detail.html:72 msgid "Listen in browser" -msgstr "Ascoltare nel navigatore" +msgstr "Ascolta nel navigatore" #: cps/templates/detail.html:117 msgid "Book" @@ -1713,7 +1713,7 @@ msgstr "Salva le impostazioni" #: cps/templates/email_edit.html:39 msgid "Save settings and send Test E-Mail" -msgstr "Salvare le impostazioni e inviare e-mail di test" +msgstr "Salva le impostazioni e invia e-mail di test" #: cps/templates/email_edit.html:43 msgid "Allowed domains for registering" @@ -1745,7 +1745,7 @@ msgstr "Prossimo" #: cps/templates/http_error.html:37 msgid "Create issue" -msgstr "Crea un problema" +msgstr "Crea-segnala un problema" #: cps/templates/http_error.html:44 msgid "Back to home" @@ -1753,7 +1753,7 @@ msgstr "Ritorno alla pagina principale" #: cps/templates/index.html:5 msgid "Discover (Random Books)" -msgstr "Scoprire (libri casuali)" +msgstr "Scopri (libri casuali)" #: cps/templates/index.html:64 msgid "Group by series" @@ -1769,7 +1769,7 @@ msgstr "Pubblicazioni popolari di questo catalogo in base ai download." #: cps/templates/index.xml:28 msgid "Popular publications from this catalog based on Rating." -msgstr "Pubblicazioni popolari di questo catalogo basate sui voti." +msgstr "Pubblicazioni popolari di questo catalogo in base ai voti." #: cps/templates/index.xml:31 msgid "Recently added Books" @@ -1777,7 +1777,7 @@ msgstr "Libri aggiunti di recente" #: cps/templates/index.xml:35 msgid "The latest Books" -msgstr "Gli ultimi Libri" +msgstr "Gli ultimi libri" #: cps/templates/index.xml:42 msgid "Show Random Books" @@ -1789,7 +1789,7 @@ msgstr "Libri ordinati per autore" #: cps/templates/index.xml:72 msgid "Books ordered by publisher" -msgstr "Libri ordinati per editori" +msgstr "Libri ordinati per editore" #: cps/templates/index.xml:79 msgid "Books ordered by category" @@ -1850,11 +1850,11 @@ msgstr "Logout" #: cps/templates/layout.html:85 cps/templates/register.html:14 msgid "Register" -msgstr "Registrare" +msgstr "Registra" #: cps/templates/layout.html:116 cps/templates/layout.html:223 msgid "Uploading..." -msgstr "Caricare" +msgstr "Carica" #: cps/templates/layout.html:117 msgid "please don't refresh the page" @@ -1862,7 +1862,7 @@ msgstr "per favore non aggiornare la pagina" #: cps/templates/layout.html:127 msgid "Browse" -msgstr "Navigare" +msgstr "Naviga" #: cps/templates/layout.html:146 msgid "Create a Shelf" @@ -1878,7 +1878,7 @@ msgstr "Precedente" #: cps/templates/layout.html:188 msgid "Book Details" -msgstr "Dettagli ebook" +msgstr "Dettagli libro" #: cps/templates/layout.html:222 msgid "Upload done, processing, please wait..." @@ -1916,15 +1916,15 @@ msgstr "" #: cps/templates/logviewer.html:8 msgid "Calibre-Web log: " -msgstr "" +msgstr "Mostra il log Calibre-Web" #: cps/templates/logviewer.html:8 msgid "Stream output, can't be displayed" -msgstr "" +msgstr "Flusso attivo, non può essere visualizzato" #: cps/templates/logviewer.html:12 msgid "Show access log: " -msgstr "" +msgstr "Mostra il log di accesso" #: cps/templates/osd.xml:5 msgid "Calibre-Web ebook catalog" @@ -1996,7 +1996,7 @@ msgstr "Larghezza" #: cps/templates/readcbr.html:126 msgid "Height" -msgstr "Alteszza" +msgstr "Altezza" #: cps/templates/readcbr.html:127 msgid "Native" @@ -2244,7 +2244,7 @@ msgstr "Elimina questo utente" #: cps/templates/user_edit.html:140 msgid "Recent Downloads" -msgstr "Download Recenti" +msgstr "Download recenti" #~ msgid "Afar" #~ msgstr "Afar" @@ -3507,7 +3507,7 @@ msgstr "Download Recenti" #~ msgstr "Fallito il salvataggio della copertina %(cover)s." #~ msgid "Cover-file is not a valid image file" -#~ msgstr "Il file della copertina non è un file di immagine valido" +#~ msgstr "Il file della copertina non è un file d'immagine valido" #~ msgid "Cover is not a jpg file, can't save" #~ msgstr "La copertina non è un file in formato jpg: non posso salvare" @@ -3516,7 +3516,7 @@ msgstr "Download Recenti" #~ msgstr "Preparo documento per la stampa..." #~ msgid "Using your another device, visit" -#~ msgstr "Utilizzando il tuo altro dispositivo, visita" +#~ msgstr "Utilizza il tuo altro dispositivo, visita" #~ msgid "and log in" #~ msgstr "e accedi" @@ -3612,7 +3612,7 @@ msgstr "Download Recenti" #~ msgstr "Il percorso per l'Acces Logfile non è corretto: per favore indica il percorso corretto" #~ msgid "DB location is not valid, please enter correct path" -#~ msgstr "La posizione DB non è corretta: per favore indica il percorso corretto" +#~ msgstr "La posizione del DB non è corretta: per favore indica il percorso corretto" #~ msgid "Excecution permissions missing" #~ msgstr "Mancano le autorizzazioni di esecuzione" @@ -3657,7 +3657,7 @@ msgstr "Download Recenti" #~ msgstr "Play / pausa" #~ msgid "volume" -#~ msgstr "valume" +#~ msgstr "volume" #~ msgid "unknown" #~ msgstr "sconosciuto" From e44494aad0147c278c603777a8c8e0f5376c0459 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Mon, 27 Jan 2020 20:32:37 +0100 Subject: [PATCH 12/31] Kobo sync enable/disable working --- cps.py | 4 ++-- cps/admin.py | 18 ++++++++++-------- cps/kobo.py | 2 ++ cps/services/__init__.py | 1 + cps/templates/user_edit.html | 2 +- cps/web.py | 12 +++++++----- optional-requirements.txt | 3 ++- 7 files changed, 25 insertions(+), 17 deletions(-) diff --git a/cps.py b/cps.py index 7da3f790..3601e4b6 100755 --- a/cps.py +++ b/cps.py @@ -43,9 +43,9 @@ from cps.gdrive import gdrive from cps.editbooks import editbook try: - from cps.kobo import kobo + from cps.kobo import kobo, get_kobo_activated from cps.kobo_auth import kobo_auth - kobo_available = True + kobo_available = get_kobo_activated() except ImportError: kobo_available = False diff --git a/cps/admin.py b/cps/admin.py index 141241b4..5d2b3812 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -532,7 +532,7 @@ def _configuration_update_helper(): _config_checkbox_int("config_uploading") _config_checkbox_int("config_anonbrowse") _config_checkbox_int("config_public_reg") - _config_checkbox_int("config_kobo_sync") + reboot_required |= _config_checkbox_int("config_kobo_sync") _config_checkbox_int("config_kobo_proxy") @@ -679,6 +679,7 @@ def new_user(): content = ub.User() languages = speaking_language() translations = [LC('en')] + babel.list_translations() + kobo_support = feature_support['kobo'] and config.config_kobo_sync if request.method == "POST": to_save = request.form.to_dict() content.default_language = to_save["default_language"] @@ -694,7 +695,7 @@ def new_user(): if not to_save["nickname"] or not to_save["email"] or not to_save["password"]: flash(_(u"Please fill out all fields!"), category="error") return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, - registered_oauth=oauth_check, feature_support=feature_support, + registered_oauth=oauth_check, kobo_support=kobo_support, title=_(u"Add new user")) content.password = generate_password_hash(to_save["password"]) existing_user = ub.session.query(ub.User).filter(func.lower(ub.User.nickname) == to_save["nickname"].lower())\ @@ -706,7 +707,7 @@ def new_user(): if config.config_public_reg and not check_valid_domain(to_save["email"]): flash(_(u"E-mail is not from valid domain"), category="error") return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, - registered_oauth=oauth_check, feature_support=feature_support, + registered_oauth=oauth_check, kobo_support=kobo_support, title=_(u"Add new user")) else: content.email = to_save["email"] @@ -714,7 +715,7 @@ def new_user(): flash(_(u"Found an existing account for this e-mail address or nickname."), category="error") return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, languages=languages, title=_(u"Add new user"), page="newuser", - feature_support=feature_support, registered_oauth=oauth_check) + kobo_support=kobo_support, registered_oauth=oauth_check) try: ub.session.add(content) ub.session.commit() @@ -732,7 +733,7 @@ def new_user(): # content.mature_content = bool(config.config_default_show & constants.MATURE_CONTENT) return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, languages=languages, title=_(u"Add new user"), page="newuser", - feature_support=feature_support, registered_oauth=oauth_check) + kobo_support=kobo_support, registered_oauth=oauth_check) @admi.route("/admin/mailsettings") @@ -787,6 +788,7 @@ def edit_user(user_id): downloads = list() languages = speaking_language() translations = babel.list_translations() + [LC('en')] + kobo_support = feature_support['kobo'] and config.config_kobo_sync for book in content.downloads: downloadbook = db.session.query(db.Books).filter(db.Books.id == book.book_id).first() if downloadbook: @@ -855,7 +857,7 @@ def edit_user(user_id): translations=translations, languages=languages, mail_configured = config.get_mail_server_configured(), - feature_support=feature_support, + kobo_support=kobo_support, new_user=0, content=content, downloads=downloads, @@ -874,7 +876,7 @@ def edit_user(user_id): new_user=0, content=content, downloads=downloads, registered_oauth=oauth_check, - feature_support=feature_support, + kobo_support=kobo_support, title=_(u"Edit User %(nick)s", nick=content.nickname), page="edituser") @@ -894,7 +896,7 @@ def edit_user(user_id): downloads=downloads, registered_oauth=oauth_check, mail_configured=config.get_mail_server_configured(), - feature_support=feature_support, + kobo_support=kobo_support, title=_(u"Edit User %(nick)s", nick=content.nickname), page="edituser") diff --git a/cps/kobo.py b/cps/kobo.py index 1ad9ebca..85337fb3 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -69,6 +69,8 @@ CONNECTION_SPECIFIC_HEADERS = [ "transfer-encoding", ] +def get_kobo_activated(): + return config.config_kobo_sync def redirect_or_proxy_request(): if config.config_kobo_proxy: diff --git a/cps/services/__init__.py b/cps/services/__init__.py index 18b49b88..2eb82f0d 100644 --- a/cps/services/__init__.py +++ b/cps/services/__init__.py @@ -41,3 +41,4 @@ try: except ImportError as err: log.debug("cannot import SyncToken, syncing books with Kobo Devices will not work: %s", err) kobo = None + SyncToken = None diff --git a/cps/templates/user_edit.html b/cps/templates/user_edit.html index 4b57b110..7457e5f6 100644 --- a/cps/templates/user_edit.html +++ b/cps/templates/user_edit.html @@ -58,7 +58,7 @@ {% endfor %} {% endif %} - {% if feature_support['kobo'] and not new_user %} + {% if kobo_support and not new_user %} - {{_('Back')}} + {{_('Back')}} {% endblock %} From 2535bbbcf17bb43db8878f5bb94f335e66074456 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 8 Feb 2020 13:24:01 +0100 Subject: [PATCH 21/31] Fix #1180 working on windows with tornado and python <3.8 again --- cps/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/server.py b/cps/server.py index 43792ecd..8f060719 100755 --- a/cps/server.py +++ b/cps/server.py @@ -146,7 +146,7 @@ class WebServer(object): self.unix_socket_file = None def _start_tornado(self): - if os.name == 'nt': + if os.name == 'nt' and sys.version_info > (3, 7): import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) log.info('Starting Tornado server on %s', _readable_listen_address(self.listen_address, self.listen_port)) From 482e977af496d14b1cce0eac4ae0435280ac0cdd Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 8 Feb 2020 13:27:51 +0100 Subject: [PATCH 22/31] Clarified installation procedure --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3e05cd3..91b3eb16 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d ## Quick start -1. Install dependencies by running `pip3 install --target vendor -r requirements.txt`. +1. Install dependencies by running `pip3 install --target vendor -r requirements.txt` (python3.x) or `pip install --target vendor -r requirements.txt` (python2.7). 2. Execute the command: `python cps.py` (or `nohup python cps.py` - recommended if you want to exit the terminal window) 3. Point your browser to `http://localhost:8083` or `http://localhost:8083/opds` for the OPDS catalog 4. Set `Location of Calibre database` to the path of the folder where your Calibre library (metadata.db) lives, push "submit" button\ From e04aa80fd602ef0969ad15f62133a96f6968ce26 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 8 Feb 2020 14:39:46 +0100 Subject: [PATCH 23/31] Fix #1181 and Fix #1182 handle removed "is_xhr" on werkzeug version 1.0.0 --- README.md | 2 +- cps/oauth_bb.py | 2 +- cps/shelf.py | 20 +++++++++++--------- cps/web.py | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a3e05cd3..91b3eb16 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d ## Quick start -1. Install dependencies by running `pip3 install --target vendor -r requirements.txt`. +1. Install dependencies by running `pip3 install --target vendor -r requirements.txt` (python3.x) or `pip install --target vendor -r requirements.txt` (python2.7). 2. Execute the command: `python cps.py` (or `nohup python cps.py` - recommended if you want to exit the terminal window) 3. Point your browser to `http://localhost:8083` or `http://localhost:8083/opds` for the OPDS catalog 4. Set `Location of Calibre database` to the path of the folder where your Calibre library (metadata.db) lives, push "submit" button\ diff --git a/cps/oauth_bb.py b/cps/oauth_bb.py index 092473da..5fdb95d8 100644 --- a/cps/oauth_bb.py +++ b/cps/oauth_bb.py @@ -50,7 +50,7 @@ def oauth_required(f): def inner(*args, **kwargs): if config.config_login_type == constants.LOGIN_OAUTH: return f(*args, **kwargs) - if request.is_xhr: + if request.headers.get('X-Requested-With') == 'XMLHttpRequest': data = {'status': 'error', 'message': 'Not Found'} response = make_response(json.dumps(data, ensure_ascii=False)) response.headers["Content-Type"] = "application/json; charset=utf-8" diff --git a/cps/shelf.py b/cps/shelf.py index ff58395d..9d52434d 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -40,17 +40,18 @@ log = logger.create() @shelf.route("/shelf/add//") @login_required def add_to_shelf(shelf_id, book_id): + xhr = request.headers.get('X-Requested-With') == 'XMLHttpRequest' shelf = ub.session.query(ub.Shelf).filter(ub.Shelf.id == shelf_id).first() if shelf is None: log.error("Invalid shelf specified: %s", shelf_id) - if not request.is_xhr: + if not xhr: flash(_(u"Invalid shelf specified"), category="error") return redirect(url_for('web.index')) return "Invalid shelf specified", 400 if not shelf.is_public and not shelf.user_id == int(current_user.id): log.error("User %s not allowed to add a book to %s", current_user, shelf) - if not request.is_xhr: + if not xhr: flash(_(u"Sorry you are not allowed to add a book to the the shelf: %(shelfname)s", shelfname=shelf.name), category="error") return redirect(url_for('web.index')) @@ -58,7 +59,7 @@ def add_to_shelf(shelf_id, book_id): if shelf.is_public and not current_user.role_edit_shelfs(): log.info("User %s not allowed to edit public shelves", current_user) - if not request.is_xhr: + if not xhr: flash(_(u"You are not allowed to edit public shelves"), category="error") return redirect(url_for('web.index')) return "User is not allowed to edit public shelves", 403 @@ -67,7 +68,7 @@ def add_to_shelf(shelf_id, book_id): ub.BookShelf.book_id == book_id).first() if book_in_shelf: log.error("Book %s is already part of %s", book_id, shelf) - if not request.is_xhr: + if not xhr: flash(_(u"Book is already part of the shelf: %(shelfname)s", shelfname=shelf.name), category="error") return redirect(url_for('web.index')) return "Book is already part of the shelf: %s" % shelf.name, 400 @@ -81,7 +82,7 @@ def add_to_shelf(shelf_id, book_id): ins = ub.BookShelf(shelf=shelf.id, book_id=book_id, order=maxOrder + 1) ub.session.add(ins) ub.session.commit() - if not request.is_xhr: + if not xhr: flash(_(u"Book has been added to shelf: %(sname)s", sname=shelf.name), category="success") if "HTTP_REFERER" in request.environ: return redirect(request.environ["HTTP_REFERER"]) @@ -147,10 +148,11 @@ def search_to_shelf(shelf_id): @shelf.route("/shelf/remove//") @login_required def remove_from_shelf(shelf_id, book_id): + xhr = request.headers.get('X-Requested-With') == 'XMLHttpRequest' shelf = ub.session.query(ub.Shelf).filter(ub.Shelf.id == shelf_id).first() if shelf is None: log.error("Invalid shelf specified: %s", shelf_id) - if not request.is_xhr: + if not xhr: return redirect(url_for('web.index')) return "Invalid shelf specified", 400 @@ -169,20 +171,20 @@ def remove_from_shelf(shelf_id, book_id): if book_shelf is None: log.error("Book %s already removed from %s", book_id, shelf) - if not request.is_xhr: + if not xhr: return redirect(url_for('web.index')) return "Book already removed from shelf", 410 ub.session.delete(book_shelf) ub.session.commit() - if not request.is_xhr: + if not xhr: flash(_(u"Book has been removed from shelf: %(sname)s", sname=shelf.name), category="success") return redirect(request.environ["HTTP_REFERER"]) return "", 204 else: log.error("User %s not allowed to remove a book from %s", current_user, shelf) - if not request.is_xhr: + if not xhr: flash(_(u"Sorry you are not allowed to remove a book from this shelf: %(sname)s", sname=shelf.name), category="error") return redirect(url_for('web.index')) diff --git a/cps/web.py b/cps/web.py index 1a78cc52..ab38f3d4 100644 --- a/cps/web.py +++ b/cps/web.py @@ -172,7 +172,7 @@ def remote_login_required(f): def inner(*args, **kwargs): if config.config_remote_login: return f(*args, **kwargs) - if request.is_xhr: + if request.headers.get('X-Requested-With') == 'XMLHttpRequest': data = {'status': 'error', 'message': 'Forbidden'} response = make_response(json.dumps(data, ensure_ascii=False)) response.headers["Content-Type"] = "application/json; charset=utf-8" @@ -1468,7 +1468,7 @@ def show_book(book_id): audioentries.append(media_format.format.lower()) return render_title_template('detail.html', entry=entries, audioentries=audioentries, cc=cc, - is_xhr=request.is_xhr, title=entries.title, books_shelfs=book_in_shelfs, + is_xhr=request.headers.get('X-Requested-With')=='XMLHttpRequest', title=entries.title, books_shelfs=book_in_shelfs, have_read=have_read, kindle_list=kindle_list, reader_list=reader_list, page="book") else: log.debug(u"Error opening eBook. File does not exist or file is not accessible:") From ab24ed8088ded066d3ad8e1913a8b255cb02af87 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 9 Feb 2020 14:31:42 +0100 Subject: [PATCH 24/31] Handle sorting of hidden books #1123 Prevent downloading of covers from hidden books --- cps/helper.py | 2 +- cps/shelf.py | 23 +++++++++++++++++------ cps/templates/shelf_order.html | 12 ++++++------ 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/cps/helper.py b/cps/helper.py index 6e6c1895..ec5628b3 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -455,7 +455,7 @@ def get_cover_on_failure(use_generic_cover): return None def get_book_cover(book_id): - book = db.session.query(db.Books).filter(db.Books.id == book_id).first() + book = db.session.query(db.Books).filter(db.Books.id == book_id).filter(common_filters()).first() return get_book_cover_internal(book, use_generic_cover_on_failure=True) def get_book_cover_with_uuid(book_uuid, diff --git a/cps/shelf.py b/cps/shelf.py index 9d52434d..75789367 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -291,9 +291,11 @@ def show_shelf(shelf_type, shelf_id): if cur_book: result.append(cur_book) else: - log.info('Not existing book %s in %s deleted', book.book_id, shelf) - ub.session.query(ub.BookShelf).filter(ub.BookShelf.book_id == book.book_id).delete() - ub.session.commit() + cur_book = db.session.query(db.Books).filter(db.Books.id == book.book_id).first() + if not cur_book: + log.info('Not existing book %s in %s deleted', book.book_id, shelf) + ub.session.query(ub.BookShelf).filter(ub.BookShelf.book_id == book.book_id).delete() + ub.session.commit() return render_title_template(page, entries=result, title=_(u"Shelf: '%(name)s'", name=shelf.name), shelf=shelf, page="shelf") else: @@ -327,9 +329,18 @@ def order_shelf(shelf_id): .order_by(ub.BookShelf.order.asc()).all() for book in books_in_shelf2: cur_book = db.session.query(db.Books).filter(db.Books.id == book.book_id).filter(common_filters()).first() - result.append(cur_book) - #books_list = [ b.book_id for b in books_in_shelf2] - #result = db.session.query(db.Books).filter(db.Books.id.in_(books_list)).filter(common_filters()).all() + if cur_book: + result.append({'title':cur_book.title, + 'id':cur_book.id, + 'author':cur_book.authors, + 'series':cur_book.series, + 'series_index':cur_book.series_index}) + else: + cur_book = db.session.query(db.Books).filter(db.Books.id == book.book_id).first() + result.append({'title':_('Hidden Book'), + 'id':cur_book.id, + 'author':[], + 'series':[]}) return render_title_template('shelf_order.html', entries=result, title=_(u"Change order of Shelf: '%(name)s'", name=shelf.name), shelf=shelf, page="shelforder") diff --git a/cps/templates/shelf_order.html b/cps/templates/shelf_order.html index 77192c8c..0094fb31 100644 --- a/cps/templates/shelf_order.html +++ b/cps/templates/shelf_order.html @@ -5,19 +5,19 @@
{{_('Drag \'n drop to rearrange order')}}
{% for entry in entries %} -
+
- {{entry.title}} - {% if entry.series|length > 0 %} + {{entry['title']}} + {% if entry['series']|length > 0 %}
- {{entry.series_index}} - {{entry.series[0].name}} + {{entry['series_index']}} - {{entry['series'][0].name}} {% endif %}
- {% for author in entry.authors %} + {% for author in entry['authors'] %} {{author.name.replace('|',',')}} {% if not loop.last %} & From 814ad87a425a4de522af2f28aac2cd8193fdf5a6 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 9 Feb 2020 17:02:47 +0100 Subject: [PATCH 25/31] Updated pdf viewer to 2.2.228 (#1184) --- cps/static/css/libs/viewer.css | 116 +- cps/static/js/libs/pdf.js | 5673 ++++++++++++--------- cps/static/js/libs/pdf.worker.js | 4779 ++++++++++------- cps/static/js/libs/viewer.js | 1841 +++---- cps/static/locale/ar/viewer.properties | 4 + cps/static/locale/be/viewer.properties | 4 + cps/static/locale/br/viewer.properties | 4 + cps/static/locale/cak/viewer.properties | 4 + cps/static/locale/cs/viewer.properties | 4 + cps/static/locale/cy/viewer.properties | 4 + cps/static/locale/da/viewer.properties | 4 + cps/static/locale/de/viewer.properties | 4 + cps/static/locale/el/viewer.properties | 4 + cps/static/locale/en-CA/viewer.properties | 4 + cps/static/locale/en-GB/viewer.properties | 4 + cps/static/locale/en-US/viewer.properties | 4 + cps/static/locale/eo/viewer.properties | 4 + cps/static/locale/es-AR/viewer.properties | 4 + cps/static/locale/es-CL/viewer.properties | 4 + cps/static/locale/es-ES/viewer.properties | 4 + cps/static/locale/et/viewer.properties | 4 + cps/static/locale/eu/viewer.properties | 4 + cps/static/locale/fi/viewer.properties | 4 + cps/static/locale/fr/viewer.properties | 4 + cps/static/locale/fy-NL/viewer.properties | 4 + cps/static/locale/gn/viewer.properties | 4 + cps/static/locale/he/viewer.properties | 8 +- cps/static/locale/hi-IN/viewer.properties | 4 + cps/static/locale/hr/viewer.properties | 40 +- cps/static/locale/hsb/viewer.properties | 4 + cps/static/locale/hu/viewer.properties | 4 + cps/static/locale/ia/viewer.properties | 4 + cps/static/locale/id/viewer.properties | 4 + cps/static/locale/is/viewer.properties | 23 +- cps/static/locale/it/viewer.properties | 1 + cps/static/locale/ja/viewer.properties | 4 + cps/static/locale/ka/viewer.properties | 24 +- cps/static/locale/kab/viewer.properties | 4 + cps/static/locale/kk/viewer.properties | 4 + cps/static/locale/ko/viewer.properties | 54 +- cps/static/locale/lij/viewer.properties | 16 +- cps/static/locale/lt/viewer.properties | 4 + cps/static/locale/mr/viewer.properties | 21 + cps/static/locale/nb-NO/viewer.properties | 4 + cps/static/locale/nl/viewer.properties | 4 + cps/static/locale/nn-NO/viewer.properties | 4 + cps/static/locale/pa-IN/viewer.properties | 11 + cps/static/locale/pl/viewer.properties | 87 +- cps/static/locale/pt-BR/viewer.properties | 8 +- cps/static/locale/pt-PT/viewer.properties | 6 +- cps/static/locale/ro/viewer.properties | 10 +- cps/static/locale/ru/viewer.properties | 4 + cps/static/locale/si/viewer.properties | 36 + cps/static/locale/sk/viewer.properties | 4 + cps/static/locale/sl/viewer.properties | 16 +- cps/static/locale/sq/viewer.properties | 4 + cps/static/locale/sv-SE/viewer.properties | 4 + cps/static/locale/te/viewer.properties | 4 + cps/static/locale/th/viewer.properties | 4 + cps/static/locale/tr/viewer.properties | 10 +- cps/static/locale/uk/viewer.properties | 4 + cps/static/locale/ur/viewer.properties | 4 + cps/static/locale/vi/viewer.properties | 15 +- cps/static/locale/zh-CN/viewer.properties | 6 +- cps/static/locale/zh-TW/viewer.properties | 4 + cps/templates/readpdf.html | 25 +- 66 files changed, 7718 insertions(+), 5280 deletions(-) diff --git a/cps/static/css/libs/viewer.css b/cps/static/css/libs/viewer.css index 82766d66..5835b309 100644 --- a/cps/static/css/libs/viewer.css +++ b/cps/static/css/libs/viewer.css @@ -230,36 +230,46 @@ z-index: 200; max-width: 20em; background-color: #FFFF99; - box-shadow: 0px 2px 5px #333; + box-shadow: 0px 2px 5px #888; border-radius: 2px; - padding: 0.6em; + padding: 6px; margin-left: 5px; cursor: pointer; font: message-box; + font-size: 9px; word-wrap: break-word; } +.annotationLayer .popup > * { + font-size: 9px; +} + .annotationLayer .popup h1 { - font-size: 1em; - border-bottom: 1px solid #000000; - margin: 0; - padding-bottom: 0.2em; + display: inline-block; +} + +.annotationLayer .popup span { + display: inline-block; + margin-left: 5px; } .annotationLayer .popup p { - margin: 0; - padding-top: 0.2em; + border-top: 1px solid #333; + margin-top: 2px; + padding-top: 2px; } .annotationLayer .highlightAnnotation, .annotationLayer .underlineAnnotation, .annotationLayer .squigglyAnnotation, .annotationLayer .strikeoutAnnotation, +.annotationLayer .freeTextAnnotation, .annotationLayer .lineAnnotation svg line, .annotationLayer .squareAnnotation svg rect, .annotationLayer .circleAnnotation svg ellipse, .annotationLayer .polylineAnnotation svg polyline, .annotationLayer .polygonAnnotation svg polygon, +.annotationLayer .caretAnnotation, .annotationLayer .inkAnnotation svg polyline, .annotationLayer .stampAnnotation, .annotationLayer .fileAttachmentAnnotation { @@ -279,8 +289,9 @@ overflow: visible; border: 9px solid transparent; background-clip: content-box; - -o-border-image: url(images/shadow.png) 9 9 repeat; - border-image: url(images/shadow.png) 9 9 repeat; + -webkit-border-image: url(images/shadow.png) 9 9 repeat; + -o-border-image: url(images/shadow.png) 9 9 repeat; + border-image: url(images/shadow.png) 9 9 repeat; background-color: white; } @@ -543,15 +554,20 @@ select { z-index: 100; border-top: 1px solid #333; - transition-duration: 200ms; - transition-timing-function: ease; + -webkit-transition-duration: 200ms; + + transition-duration: 200ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } html[dir='ltr'] #sidebarContainer { + -webkit-transition-property: left; transition-property: left; left: -200px; left: calc(-1 * var(--sidebar-width)); } html[dir='rtl'] #sidebarContainer { + -webkit-transition-property: right; transition-property: right; right: -200px; right: calc(-1 * var(--sidebar-width)); @@ -563,7 +579,8 @@ html[dir='rtl'] #sidebarContainer { #outerContainer.sidebarResizing #sidebarContainer { /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */ - transition-duration: 0s; + -webkit-transition-duration: 0s; + transition-duration: 0s; /* Prevent e.g. the thumbnails being selected when the sidebar is resized. */ -webkit-user-select: none; -moz-user-select: none; @@ -620,8 +637,10 @@ html[dir='rtl'] #sidebarContent { outline: none; } #viewerContainer:not(.pdfPresentationMode) { - transition-duration: 200ms; - transition-timing-function: ease; + -webkit-transition-duration: 200ms; + transition-duration: 200ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } html[dir='ltr'] #viewerContainer { box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05); @@ -632,15 +651,18 @@ html[dir='rtl'] #viewerContainer { #outerContainer.sidebarResizing #viewerContainer { /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */ - transition-duration: 0s; + -webkit-transition-duration: 0s; + transition-duration: 0s; } html[dir='ltr'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentationMode) { + -webkit-transition-property: left; transition-property: left; left: 200px; left: var(--sidebar-width); } html[dir='rtl'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentationMode) { + -webkit-transition-property: right; transition-property: right; right: 200px; right: var(--sidebar-width); @@ -662,6 +684,8 @@ html[dir='rtl'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentatio width: 100%; height: 32px; background-color: #424242; /* fallback */ + background-image: url(images/texture.png), + -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,30%,.99)), to(hsla(0,0%,25%,.95))); background-image: url(images/texture.png), linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95)); } @@ -697,6 +721,8 @@ html[dir='rtl'] #sidebarResizer { position: relative; height: 32px; background-color: #474747; /* fallback */ + background-image: url(images/texture.png), + -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,32%,.99)), to(hsla(0,0%,27%,.95))); background-image: url(images/texture.png), linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95)); } @@ -733,6 +759,7 @@ html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar { height: 100%; background-color: #ddd; overflow: hidden; + -webkit-transition: width 200ms; transition: width 200ms; } @@ -748,6 +775,7 @@ html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar { #loadingBar .progress.indeterminate { background-color: #999; + -webkit-transition: none; transition: none; } @@ -815,6 +843,9 @@ html[dir='rtl'] .findbar { #findInput::-webkit-input-placeholder { color: hsl(0, 0%, 75%); } +#findInput::-moz-placeholder { + font-style: italic; +} #findInput:-ms-input-placeholder { font-style: italic; } @@ -1006,6 +1037,7 @@ html[dir='rtl'] .splitToolbarButton > .toolbarButton { .splitToolbarButton.toggled > .toolbarButton, .toolbarButton.textButton { background-color: hsla(0,0%,0%,.12); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; border: 1px solid hsla(0,0%,0%,.35); @@ -1013,9 +1045,12 @@ html[dir='rtl'] .splitToolbarButton > .toolbarButton { box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, 0 0 1px hsla(0,0%,100%,.15) inset, 0 1px 0 hsla(0,0%,100%,.05); + -webkit-transition-property: background-color, border-color, box-shadow; transition-property: background-color, border-color, box-shadow; - transition-duration: 150ms; - transition-timing-function: ease; + -webkit-transition-duration: 150ms; + transition-duration: 150ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } .splitToolbarButton > .toolbarButton:hover, @@ -1072,9 +1107,12 @@ html[dir='rtl'] .splitToolbarButtonSeparator { padding: 12px 0; margin: 1px 0; box-shadow: 0 0 0 1px hsla(0,0%,100%,.03); + -webkit-transition-property: padding; transition-property: padding; - transition-duration: 10ms; - transition-timing-function: ease; + -webkit-transition-duration: 10ms; + transition-duration: 10ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } .toolbarButton, @@ -1094,9 +1132,12 @@ html[dir='rtl'] .splitToolbarButtonSeparator { user-select: none; /* Opera does not support user-select, use <... unselectable="on"> instead */ cursor: default; + -webkit-transition-property: background-color, border-color, box-shadow; transition-property: background-color, border-color, box-shadow; - transition-duration: 150ms; - transition-timing-function: ease; + -webkit-transition-duration: 150ms; + transition-duration: 150ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } html[dir='ltr'] .toolbarButton, @@ -1117,6 +1158,7 @@ html[dir='rtl'] .dropdownToolbarButton { .secondaryToolbarButton:hover, .secondaryToolbarButton:focus { background-color: hsla(0,0%,0%,.12); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; border: 1px solid hsla(0,0%,0%,.35); @@ -1131,28 +1173,36 @@ html[dir='rtl'] .dropdownToolbarButton { .dropdownToolbarButton:hover:active, .secondaryToolbarButton:hover:active { background-color: hsla(0,0%,0%,.2); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); border-color: hsla(0,0%,0%,.35) hsla(0,0%,0%,.4) hsla(0,0%,0%,.45); box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset, 0 0 1px hsla(0,0%,0%,.2) inset, 0 1px 0 hsla(0,0%,100%,.05); + -webkit-transition-property: background-color, border-color, box-shadow; transition-property: background-color, border-color, box-shadow; - transition-duration: 10ms; - transition-timing-function: linear; + -webkit-transition-duration: 10ms; + transition-duration: 10ms; + -webkit-transition-timing-function: linear; + transition-timing-function: linear; } .toolbarButton.toggled, .splitToolbarButton.toggled > .toolbarButton.toggled, .secondaryToolbarButton.toggled { background-color: hsla(0,0%,0%,.3); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.45) hsla(0,0%,0%,.5); box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset, 0 0 1px hsla(0,0%,0%,.2) inset, 0 1px 0 hsla(0,0%,100%,.05); + -webkit-transition-property: background-color, border-color, box-shadow; transition-property: background-color, border-color, box-shadow; - transition-duration: 10ms; - transition-timing-function: linear; + -webkit-transition-duration: 10ms; + transition-duration: 10ms; + -webkit-transition-timing-function: linear; + transition-timing-function: linear; } .toolbarButton.toggled:hover:active, @@ -1493,6 +1543,7 @@ html[dir='rtl'] .verticalToolbarSeparator { border: 1px solid transparent; border-radius: 2px; background-color: hsla(0,0%,100%,.09); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; border: 1px solid hsla(0,0%,0%,.35); @@ -1503,9 +1554,12 @@ html[dir='rtl'] .verticalToolbarSeparator { font-size: 12px; line-height: 14px; outline-style: none; + -webkit-transition-property: background-color, border-color, box-shadow; transition-property: background-color, border-color, box-shadow; - transition-duration: 150ms; - transition-timing-function: ease; + -webkit-transition-duration: 150ms; + transition-duration: 150ms; + -webkit-transition-timing-function: ease; + transition-timing-function: ease; } .toolbarField[type=checkbox] { @@ -1619,6 +1673,7 @@ a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage, a:focus > .thumbnail > .thumbnailSelectionRing, .thumbnail:hover > .thumbnailSelectionRing { background-color: hsla(0,0%,100%,.15); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, @@ -1634,6 +1689,7 @@ a:focus > .thumbnail > .thumbnailSelectionRing, .thumbnail.selected > .thumbnailSelectionRing { background-color: hsla(0,0%,100%,.3); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, @@ -1755,6 +1811,7 @@ html[dir='rtl'] .outlineItemToggler::before { .outlineItem > a:hover, .attachmentsItem > button:hover { background-color: hsla(0,0%,100%,.02); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, @@ -1766,6 +1823,7 @@ html[dir='rtl'] .outlineItemToggler::before { .outlineItem.selected { background-color: hsla(0,0%,100%,.08); + background-image: -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,100%,.05)), to(hsla(0,0%,100%,0))); background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, @@ -1850,6 +1908,8 @@ html[dir='rtl'] .outlineItemToggler::before { font-size: 12px; line-height: 14px; background-color: #474747; /* fallback */ + background-image: url(images/texture.png), + -webkit-gradient(linear, left top, left bottom, from(hsla(0,0%,32%,.99)), to(hsla(0,0%,27%,.95))); background-image: url(images/texture.png), linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95)); box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08), diff --git a/cps/static/js/libs/pdf.js b/cps/static/js/libs/pdf.js index 42250bb7..dcefe070 100644 --- a/cps/static/js/libs/pdf.js +++ b/cps/static/js/libs/pdf.js @@ -2,7 +2,7 @@ * @licstart The following is the entire license notice for the * Javascript code in this page * - * Copyright 2018 Mozilla Foundation + * Copyright 2019 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -123,18 +123,18 @@ return /******/ (function(modules) { // webpackBootstrap "use strict"; -var pdfjsVersion = '2.1.266'; -var pdfjsBuild = '81f5835c'; +var pdfjsVersion = '2.2.228'; +var pdfjsBuild = 'd7afb74a'; var pdfjsSharedUtil = __w_pdfjs_require__(1); -var pdfjsDisplayAPI = __w_pdfjs_require__(146); +var pdfjsDisplayAPI = __w_pdfjs_require__(147); var pdfjsDisplayTextLayer = __w_pdfjs_require__(162); var pdfjsDisplayAnnotationLayer = __w_pdfjs_require__(163); -var pdfjsDisplayDOMUtils = __w_pdfjs_require__(151); +var pdfjsDisplayDisplayUtils = __w_pdfjs_require__(151); var pdfjsDisplaySVG = __w_pdfjs_require__(164); @@ -151,16 +151,20 @@ var pdfjsDisplayAPICompatibility = __w_pdfjs_require__(153); pdfjsDisplayAPI.setPDFNetworkStreamFactory(function (params) { return new PDFNodeStream(params); }); - } else if (typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined') { - var PDFFetchStream = __w_pdfjs_require__(168).PDFFetchStream; - - pdfjsDisplayAPI.setPDFNetworkStreamFactory(function (params) { - return new PDFFetchStream(params); - }); } else { - var PDFNetworkStream = __w_pdfjs_require__(169).PDFNetworkStream; + var PDFNetworkStream = __w_pdfjs_require__(168).PDFNetworkStream; + + var PDFFetchStream; + + if (pdfjsDisplayDisplayUtils.isFetchSupported()) { + PDFFetchStream = __w_pdfjs_require__(169).PDFFetchStream; + } pdfjsDisplayAPI.setPDFNetworkStreamFactory(function (params) { + if (PDFFetchStream && pdfjsDisplayDisplayUtils.isValidFetchUrl(params.url)) { + return new PDFFetchStream(params); + } + return new PDFNetworkStream(params); }); } @@ -192,11 +196,12 @@ exports.shadow = pdfjsSharedUtil.shadow; exports.Util = pdfjsSharedUtil.Util; exports.ReadableStream = pdfjsSharedUtil.ReadableStream; exports.URL = pdfjsSharedUtil.URL; -exports.RenderingCancelledException = pdfjsDisplayDOMUtils.RenderingCancelledException; -exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl; -exports.LinkTarget = pdfjsDisplayDOMUtils.LinkTarget; -exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes; -exports.loadScript = pdfjsDisplayDOMUtils.loadScript; +exports.RenderingCancelledException = pdfjsDisplayDisplayUtils.RenderingCancelledException; +exports.getFilenameFromUrl = pdfjsDisplayDisplayUtils.getFilenameFromUrl; +exports.LinkTarget = pdfjsDisplayDisplayUtils.LinkTarget; +exports.addLinkAttributes = pdfjsDisplayDisplayUtils.addLinkAttributes; +exports.loadScript = pdfjsDisplayDisplayUtils.loadScript; +exports.PDFDateString = pdfjsDisplayDisplayUtils.PDFDateString; exports.GlobalWorkerOptions = pdfjsDisplayWorkerOptions.GlobalWorkerOptions; exports.apiCompatibilityParams = pdfjsDisplayAPICompatibility.apiCompatibilityParams; @@ -210,18 +215,15 @@ exports.apiCompatibilityParams = pdfjsDisplayAPICompatibility.apiCompatibilityPa Object.defineProperty(exports, "__esModule", { value: true }); -exports.toRomanNumerals = toRomanNumerals; exports.arrayByteLength = arrayByteLength; exports.arraysToBytes = arraysToBytes; exports.assert = assert; exports.bytesToString = bytesToString; exports.createPromiseCapability = createPromiseCapability; -exports.deprecated = deprecated; -exports.getInheritableProperty = getInheritableProperty; -exports.getLookupTableFactory = getLookupTableFactory; exports.getVerbosityLevel = getVerbosityLevel; exports.info = info; exports.isArrayBuffer = isArrayBuffer; +exports.isArrayEqual = isArrayEqual; exports.isBool = isBool; exports.isEmptyObj = isEmptyObj; exports.isNum = isNum; @@ -257,13 +259,13 @@ Object.defineProperty(exports, "URL", { return _url_polyfill.URL; } }); -exports.createObjectURL = exports.FormatError = exports.XRefParseException = exports.XRefEntryException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = void 0; +exports.createObjectURL = exports.FormatError = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = void 0; __w_pdfjs_require__(2); -var _streams_polyfill = __w_pdfjs_require__(142); +var _streams_polyfill = __w_pdfjs_require__(143); -var _url_polyfill = __w_pdfjs_require__(144); +var _url_polyfill = __w_pdfjs_require__(145); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -550,10 +552,6 @@ function warn(msg) { } } -function deprecated(details) { - console.log('Deprecated API usage: ' + details); -} - function unreachable(msg) { throw new Error(msg); } @@ -623,19 +621,6 @@ function shadow(obj, prop, value) { return value; } -function getLookupTableFactory(initializer) { - var lookup; - return function () { - if (initializer) { - lookup = Object.create(null); - initializer(lookup); - initializer = null; - } - - return lookup; - }; -} - var PasswordException = function PasswordExceptionClosure() { function PasswordException(msg, code) { this.name = 'PasswordException'; @@ -704,47 +689,6 @@ var UnexpectedResponseException = function UnexpectedResponseExceptionClosure() exports.UnexpectedResponseException = UnexpectedResponseException; -var MissingDataException = function MissingDataExceptionClosure() { - function MissingDataException(begin, end) { - this.begin = begin; - this.end = end; - this.message = 'Missing data [' + begin + ', ' + end + ')'; - } - - MissingDataException.prototype = new Error(); - MissingDataException.prototype.name = 'MissingDataException'; - MissingDataException.constructor = MissingDataException; - return MissingDataException; -}(); - -exports.MissingDataException = MissingDataException; - -var XRefEntryException = function XRefEntryExceptionClosure() { - function XRefEntryException(msg) { - this.message = msg; - } - - XRefEntryException.prototype = new Error(); - XRefEntryException.prototype.name = 'XRefEntryException'; - XRefEntryException.constructor = XRefEntryException; - return XRefEntryException; -}(); - -exports.XRefEntryException = XRefEntryException; - -var XRefParseException = function XRefParseExceptionClosure() { - function XRefParseException(msg) { - this.message = msg; - } - - XRefParseException.prototype = new Error(); - XRefParseException.prototype.name = 'XRefParseException'; - XRefParseException.constructor = XRefParseException; - return XRefParseException; -}(); - -exports.XRefParseException = XRefParseException; - var FormatError = function FormatErrorClosure() { function FormatError(msg) { this.message = msg; @@ -900,43 +844,6 @@ function isEvalSupported() { } } -function getInheritableProperty(_ref) { - var dict = _ref.dict, - key = _ref.key, - _ref$getArray = _ref.getArray, - getArray = _ref$getArray === void 0 ? false : _ref$getArray, - _ref$stopWhenFound = _ref.stopWhenFound, - stopWhenFound = _ref$stopWhenFound === void 0 ? true : _ref$stopWhenFound; - var LOOP_LIMIT = 100; - var loopCount = 0; - var values; - - while (dict) { - var value = getArray ? dict.getArray(key) : dict.get(key); - - if (value !== undefined) { - if (stopWhenFound) { - return value; - } - - if (!values) { - values = []; - } - - values.push(value); - } - - if (++loopCount > LOOP_LIMIT) { - warn("getInheritableProperty: maximum loop count exceeded for \"".concat(key, "\"")); - break; - } - - dict = dict.get('Parent'); - } - - return values; -} - var Util = function UtilClosure() { function Util() {} @@ -1044,30 +951,6 @@ var Util = function UtilClosure() { }(); exports.Util = Util; -var ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX']; - -function toRomanNumerals(number) { - var lowerCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - assert(Number.isInteger(number) && number > 0, 'The number should be a positive integer.'); - var pos, - romanBuf = []; - - while (number >= 1000) { - number -= 1000; - romanBuf.push('M'); - } - - pos = number / 100 | 0; - number %= 100; - romanBuf.push(ROMAN_NUMBER_MAP[pos]); - pos = number / 10 | 0; - number %= 10; - romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); - romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); - var romanStr = romanBuf.join(''); - return lowerCase ? romanStr.toLowerCase() : romanStr; -} - var PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC]; function stringToPDFString(str) { @@ -1121,6 +1004,16 @@ function isArrayBuffer(v) { return _typeof(v) === 'object' && v !== null && v.byteLength !== undefined; } +function isArrayEqual(arr1, arr2) { + if (arr1.length !== arr2.length) { + return false; + } + + return arr1.every(function (element, index) { + return element === arr2[index]; + }); +} + function isSpace(ch) { return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; } @@ -1252,8 +1145,8 @@ if (!globalScope._pdfjsCompatibilityChecked) { tokens[_key] = arguments[_key]; } - for (var _i = 0; _i < tokens.length; _i++) { - var token = tokens[_i]; + for (var _i = 0, _tokens = tokens; _i < _tokens.length; _i++) { + var token = _tokens[_i]; OriginalDOMTokenListAdd.call(this, token); } }; @@ -1263,8 +1156,8 @@ if (!globalScope._pdfjsCompatibilityChecked) { tokens[_key2] = arguments[_key2]; } - for (var _i2 = 0; _i2 < tokens.length; _i2++) { - var token = tokens[_i2]; + for (var _i2 = 0, _tokens2 = tokens; _i2 < _tokens2.length; _i2++) { + var token = _tokens2[_i2]; OriginalDOMTokenListRemove.call(this, token); } }; @@ -1300,7 +1193,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(35); + __w_pdfjs_require__(36); })(); (function checkStringIncludes() { @@ -1308,7 +1201,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(37); + __w_pdfjs_require__(38); })(); (function checkArrayIncludes() { @@ -1316,7 +1209,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(39); + __w_pdfjs_require__(40); })(); (function checkArrayFrom() { @@ -1324,7 +1217,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(46); + __w_pdfjs_require__(47); })(); (function checkObjectAssign() { @@ -1332,7 +1225,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(69); + __w_pdfjs_require__(70); })(); (function checkMathLog2() { @@ -1340,7 +1233,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - Math.log2 = __w_pdfjs_require__(74); + Math.log2 = __w_pdfjs_require__(75); })(); (function checkNumberIsNaN() { @@ -1348,7 +1241,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - Number.isNaN = __w_pdfjs_require__(76); + Number.isNaN = __w_pdfjs_require__(77); })(); (function checkNumberIsInteger() { @@ -1356,15 +1249,15 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - Number.isInteger = __w_pdfjs_require__(78); + Number.isInteger = __w_pdfjs_require__(79); })(); (function checkPromise() { - if (globalScope.Promise && globalScope.Promise.prototype && globalScope.Promise.prototype.finally) { + if (globalScope.Promise && globalScope.Promise.prototype && globalScope.Promise.prototype["finally"]) { return; } - globalScope.Promise = __w_pdfjs_require__(81); + globalScope.Promise = __w_pdfjs_require__(82); })(); (function checkWeakMap() { @@ -1372,7 +1265,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - globalScope.WeakMap = __w_pdfjs_require__(101); + globalScope.WeakMap = __w_pdfjs_require__(102); })(); (function checkWeakSet() { @@ -1380,7 +1273,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - globalScope.WeakSet = __w_pdfjs_require__(118); + globalScope.WeakSet = __w_pdfjs_require__(119); })(); (function checkStringCodePointAt() { @@ -1388,7 +1281,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - String.codePointAt = __w_pdfjs_require__(122); + String.codePointAt = __w_pdfjs_require__(123); })(); (function checkStringFromCodePoint() { @@ -1396,7 +1289,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - String.fromCodePoint = __w_pdfjs_require__(124); + String.fromCodePoint = __w_pdfjs_require__(125); })(); (function checkSymbol() { @@ -1404,7 +1297,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(126); + __w_pdfjs_require__(127); })(); (function checkStringPadStart() { @@ -1412,7 +1305,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(133); + __w_pdfjs_require__(134); })(); (function checkStringPadEnd() { @@ -1420,7 +1313,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(137); + __w_pdfjs_require__(138); })(); (function checkObjectValues() { @@ -1428,7 +1321,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - Object.values = __w_pdfjs_require__(139); + Object.values = __w_pdfjs_require__(140); })(); } @@ -1451,7 +1344,7 @@ module.exports = typeof window !== 'undefined' && window.Math === Math ? window function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } module.exports = function isNodeJS() { - return (typeof process === "undefined" ? "undefined" : _typeof(process)) === 'object' && process + '' === '[object process]' && !process.versions['nw']; + return (typeof process === "undefined" ? "undefined" : _typeof(process)) === 'object' && process + '' === '[object process]' && !process.versions['nw'] && !process.versions['electron']; }; /***/ }), @@ -1474,13 +1367,13 @@ module.exports = __w_pdfjs_require__(9).String.startsWith; var $export = __w_pdfjs_require__(7); -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var context = __w_pdfjs_require__(27); +var context = __w_pdfjs_require__(30); var STARTS_WITH = 'startsWith'; var $startsWith = ''[STARTS_WITH]; -$export($export.P + $export.F * __w_pdfjs_require__(34)(STARTS_WITH), 'String', { +$export($export.P + $export.F * __w_pdfjs_require__(35)(STARTS_WITH), 'String', { startsWith: function startsWith(searchString) { var that = context(this, searchString, STARTS_WITH); var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); @@ -1504,7 +1397,7 @@ var hide = __w_pdfjs_require__(10); var redefine = __w_pdfjs_require__(20); -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); var PROTOTYPE = 'prototype'; @@ -1559,7 +1452,7 @@ if (typeof __g == 'number') __g = global; var core = module.exports = { - version: '2.6.2' + version: '2.6.9' }; if (typeof __e == 'number') __e = core; @@ -1745,8 +1638,9 @@ var has = __w_pdfjs_require__(21); var SRC = __w_pdfjs_require__(22)('src'); +var $toString = __w_pdfjs_require__(23); + var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; var TPL = ('' + $toString).split(TO_STRING); __w_pdfjs_require__(9).inspectSource = function (it) { @@ -1807,7 +1701,46 @@ module.exports = function (key) { "use strict"; -var aFunction = __w_pdfjs_require__(24); +module.exports = __w_pdfjs_require__(24)('native-function-to-string', Function.toString); + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +var core = __w_pdfjs_require__(9); + +var global = __w_pdfjs_require__(8); + +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __w_pdfjs_require__(25) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +module.exports = false; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +var aFunction = __w_pdfjs_require__(27); module.exports = function (fn, that, length) { aFunction(fn); @@ -1836,7 +1769,7 @@ module.exports = function (fn, that, length) { }; /***/ }), -/* 24 */ +/* 27 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1848,13 +1781,13 @@ module.exports = function (it) { }; /***/ }), -/* 25 */ +/* 28 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toInteger = __w_pdfjs_require__(26); +var toInteger = __w_pdfjs_require__(29); var min = Math.min; @@ -1863,7 +1796,7 @@ module.exports = function (it) { }; /***/ }), -/* 26 */ +/* 29 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1877,15 +1810,15 @@ module.exports = function (it) { }; /***/ }), -/* 27 */ +/* 30 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var isRegExp = __w_pdfjs_require__(28); +var isRegExp = __w_pdfjs_require__(31); -var defined = __w_pdfjs_require__(33); +var defined = __w_pdfjs_require__(34); module.exports = function (that, searchString, NAME) { if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); @@ -1893,7 +1826,7 @@ module.exports = function (that, searchString, NAME) { }; /***/ }), -/* 28 */ +/* 31 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1901,9 +1834,9 @@ module.exports = function (that, searchString, NAME) { var isObject = __w_pdfjs_require__(13); -var cof = __w_pdfjs_require__(29); +var cof = __w_pdfjs_require__(32); -var MATCH = __w_pdfjs_require__(30)('match'); +var MATCH = __w_pdfjs_require__(33)('match'); module.exports = function (it) { var isRegExp; @@ -1911,7 +1844,7 @@ module.exports = function (it) { }; /***/ }), -/* 29 */ +/* 32 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1924,13 +1857,13 @@ module.exports = function (it) { }; /***/ }), -/* 30 */ +/* 33 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var store = __w_pdfjs_require__(31)('wks'); +var store = __w_pdfjs_require__(24)('wks'); var uid = __w_pdfjs_require__(22); @@ -1945,37 +1878,7 @@ var $exports = module.exports = function (name) { $exports.store = store; /***/ }), -/* 31 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var core = __w_pdfjs_require__(9); - -var global = __w_pdfjs_require__(8); - -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __w_pdfjs_require__(32) ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' -}); - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = false; - -/***/ }), -/* 33 */ +/* 34 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1987,13 +1890,13 @@ module.exports = function (it) { }; /***/ }), -/* 34 */ +/* 35 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var MATCH = __w_pdfjs_require__(30)('match'); +var MATCH = __w_pdfjs_require__(33)('match'); module.exports = function (KEY) { var re = /./; @@ -2011,18 +1914,18 @@ module.exports = function (KEY) { }; /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(36); +__w_pdfjs_require__(37); module.exports = __w_pdfjs_require__(9).String.endsWith; /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2030,13 +1933,13 @@ module.exports = __w_pdfjs_require__(9).String.endsWith; var $export = __w_pdfjs_require__(7); -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var context = __w_pdfjs_require__(27); +var context = __w_pdfjs_require__(30); var ENDS_WITH = 'endsWith'; var $endsWith = ''[ENDS_WITH]; -$export($export.P + $export.F * __w_pdfjs_require__(34)(ENDS_WITH), 'String', { +$export($export.P + $export.F * __w_pdfjs_require__(35)(ENDS_WITH), 'String', { endsWith: function endsWith(searchString) { var that = context(this, searchString, ENDS_WITH); var endPosition = arguments.length > 1 ? arguments[1] : undefined; @@ -2048,18 +1951,18 @@ $export($export.P + $export.F * __w_pdfjs_require__(34)(ENDS_WITH), 'String', { }); /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(38); +__w_pdfjs_require__(39); module.exports = __w_pdfjs_require__(9).String.includes; /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2067,28 +1970,28 @@ module.exports = __w_pdfjs_require__(9).String.includes; var $export = __w_pdfjs_require__(7); -var context = __w_pdfjs_require__(27); +var context = __w_pdfjs_require__(30); var INCLUDES = 'includes'; -$export($export.P + $export.F * __w_pdfjs_require__(34)(INCLUDES), 'String', { +$export($export.P + $export.F * __w_pdfjs_require__(35)(INCLUDES), 'String', { includes: function includes(searchString) { return !!~context(this, searchString, INCLUDES).indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(40); +__w_pdfjs_require__(41); module.exports = __w_pdfjs_require__(9).Array.includes; /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2096,7 +1999,7 @@ module.exports = __w_pdfjs_require__(9).Array.includes; var $export = __w_pdfjs_require__(7); -var $includes = __w_pdfjs_require__(41)(true); +var $includes = __w_pdfjs_require__(42)(true); $export($export.P, 'Array', { includes: function includes(el) { @@ -2104,20 +2007,20 @@ $export($export.P, 'Array', { } }); -__w_pdfjs_require__(45)('includes'); +__w_pdfjs_require__(46)('includes'); /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toIObject = __w_pdfjs_require__(42); +var toIObject = __w_pdfjs_require__(43); -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var toAbsoluteIndex = __w_pdfjs_require__(44); +var toAbsoluteIndex = __w_pdfjs_require__(45); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { @@ -2138,41 +2041,41 @@ module.exports = function (IS_INCLUDES) { }; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var IObject = __w_pdfjs_require__(43); +var IObject = __w_pdfjs_require__(44); -var defined = __w_pdfjs_require__(33); +var defined = __w_pdfjs_require__(34); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var cof = __w_pdfjs_require__(29); +var cof = __w_pdfjs_require__(32); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toInteger = __w_pdfjs_require__(26); +var toInteger = __w_pdfjs_require__(29); var max = Math.max; var min = Math.min; @@ -2183,13 +2086,13 @@ module.exports = function (index, length) { }; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var UNSCOPABLES = __w_pdfjs_require__(30)('unscopables'); +var UNSCOPABLES = __w_pdfjs_require__(33)('unscopables'); var ArrayProto = Array.prototype; if (ArrayProto[UNSCOPABLES] == undefined) __w_pdfjs_require__(10)(ArrayProto, UNSCOPABLES, {}); @@ -2199,28 +2102,28 @@ module.exports = function (key) { }; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(47); +__w_pdfjs_require__(48); -__w_pdfjs_require__(62); +__w_pdfjs_require__(63); module.exports = __w_pdfjs_require__(9).Array.from; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var $at = __w_pdfjs_require__(48)(true); +var $at = __w_pdfjs_require__(49)(true); -__w_pdfjs_require__(49)(String, 'String', function (iterated) { +__w_pdfjs_require__(50)(String, 'String', function (iterated) { this._t = String(iterated); this._i = 0; }, function () { @@ -2240,15 +2143,15 @@ __w_pdfjs_require__(49)(String, 'String', function (iterated) { }); /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toInteger = __w_pdfjs_require__(26); +var toInteger = __w_pdfjs_require__(29); -var defined = __w_pdfjs_require__(33); +var defined = __w_pdfjs_require__(34); module.exports = function (TO_STRING) { return function (that, pos) { @@ -2263,13 +2166,13 @@ module.exports = function (TO_STRING) { }; /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var LIBRARY = __w_pdfjs_require__(32); +var LIBRARY = __w_pdfjs_require__(25); var $export = __w_pdfjs_require__(7); @@ -2277,15 +2180,15 @@ var redefine = __w_pdfjs_require__(20); var hide = __w_pdfjs_require__(10); -var Iterators = __w_pdfjs_require__(50); +var Iterators = __w_pdfjs_require__(51); -var $iterCreate = __w_pdfjs_require__(51); +var $iterCreate = __w_pdfjs_require__(52); -var setToStringTag = __w_pdfjs_require__(59); +var setToStringTag = __w_pdfjs_require__(60); -var getPrototypeOf = __w_pdfjs_require__(60); +var getPrototypeOf = __w_pdfjs_require__(61); -var ITERATOR = __w_pdfjs_require__(30)('iterator'); +var ITERATOR = __w_pdfjs_require__(33)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); var FF_ITERATOR = '@@iterator'; @@ -2368,7 +2271,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE }; /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2377,21 +2280,21 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE module.exports = {}; /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var create = __w_pdfjs_require__(52); +var create = __w_pdfjs_require__(53); var descriptor = __w_pdfjs_require__(19); -var setToStringTag = __w_pdfjs_require__(59); +var setToStringTag = __w_pdfjs_require__(60); var IteratorPrototype = {}; -__w_pdfjs_require__(10)(IteratorPrototype, __w_pdfjs_require__(30)('iterator'), function () { +__w_pdfjs_require__(10)(IteratorPrototype, __w_pdfjs_require__(33)('iterator'), function () { return this; }); @@ -2403,7 +2306,7 @@ module.exports = function (Constructor, NAME, next) { }; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2411,11 +2314,11 @@ module.exports = function (Constructor, NAME, next) { var anObject = __w_pdfjs_require__(12); -var dPs = __w_pdfjs_require__(53); +var dPs = __w_pdfjs_require__(54); -var enumBugKeys = __w_pdfjs_require__(57); +var enumBugKeys = __w_pdfjs_require__(58); -var IE_PROTO = __w_pdfjs_require__(56)('IE_PROTO'); +var IE_PROTO = __w_pdfjs_require__(57)('IE_PROTO'); var Empty = function Empty() {}; @@ -2430,7 +2333,7 @@ var _createDict = function createDict() { var iframeDocument; iframe.style.display = 'none'; - __w_pdfjs_require__(58).appendChild(iframe); + __w_pdfjs_require__(59).appendChild(iframe); iframe.src = 'javascript:'; iframeDocument = iframe.contentWindow.document; @@ -2460,7 +2363,7 @@ module.exports = Object.create || function create(O, Properties) { }; /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2470,7 +2373,7 @@ var dP = __w_pdfjs_require__(11); var anObject = __w_pdfjs_require__(12); -var getKeys = __w_pdfjs_require__(54); +var getKeys = __w_pdfjs_require__(55); module.exports = __w_pdfjs_require__(15) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); @@ -2487,22 +2390,22 @@ module.exports = __w_pdfjs_require__(15) ? Object.defineProperties : function de }; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var $keys = __w_pdfjs_require__(55); +var $keys = __w_pdfjs_require__(56); -var enumBugKeys = __w_pdfjs_require__(57); +var enumBugKeys = __w_pdfjs_require__(58); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2510,11 +2413,11 @@ module.exports = Object.keys || function keys(O) { var has = __w_pdfjs_require__(21); -var toIObject = __w_pdfjs_require__(42); +var toIObject = __w_pdfjs_require__(43); -var arrayIndexOf = __w_pdfjs_require__(41)(false); +var arrayIndexOf = __w_pdfjs_require__(42)(false); -var IE_PROTO = __w_pdfjs_require__(56)('IE_PROTO'); +var IE_PROTO = __w_pdfjs_require__(57)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); @@ -2536,13 +2439,13 @@ module.exports = function (object, names) { }; /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var shared = __w_pdfjs_require__(31)('keys'); +var shared = __w_pdfjs_require__(24)('keys'); var uid = __w_pdfjs_require__(22); @@ -2551,7 +2454,7 @@ module.exports = function (key) { }; /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2560,7 +2463,7 @@ module.exports = function (key) { module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(','); /***/ }), -/* 58 */ +/* 59 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2571,7 +2474,7 @@ var document = __w_pdfjs_require__(8).document; module.exports = document && document.documentElement; /***/ }), -/* 59 */ +/* 60 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2581,7 +2484,7 @@ var def = __w_pdfjs_require__(11).f; var has = __w_pdfjs_require__(21); -var TAG = __w_pdfjs_require__(30)('toStringTag'); +var TAG = __w_pdfjs_require__(33)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { @@ -2591,7 +2494,7 @@ module.exports = function (it, tag, stat) { }; /***/ }), -/* 60 */ +/* 61 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2599,9 +2502,9 @@ module.exports = function (it, tag, stat) { var has = __w_pdfjs_require__(21); -var toObject = __w_pdfjs_require__(61); +var toObject = __w_pdfjs_require__(62); -var IE_PROTO = __w_pdfjs_require__(56)('IE_PROTO'); +var IE_PROTO = __w_pdfjs_require__(57)('IE_PROTO'); var ObjectProto = Object.prototype; @@ -2617,42 +2520,42 @@ module.exports = Object.getPrototypeOf || function (O) { }; /***/ }), -/* 61 */ +/* 62 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var defined = __w_pdfjs_require__(33); +var defined = __w_pdfjs_require__(34); module.exports = function (it) { return Object(defined(it)); }; /***/ }), -/* 62 */ +/* 63 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); var $export = __w_pdfjs_require__(7); -var toObject = __w_pdfjs_require__(61); +var toObject = __w_pdfjs_require__(62); -var call = __w_pdfjs_require__(63); +var call = __w_pdfjs_require__(64); -var isArrayIter = __w_pdfjs_require__(64); +var isArrayIter = __w_pdfjs_require__(65); -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var createProperty = __w_pdfjs_require__(65); +var createProperty = __w_pdfjs_require__(66); -var getIterFn = __w_pdfjs_require__(66); +var getIterFn = __w_pdfjs_require__(67); -$export($export.S + $export.F * !__w_pdfjs_require__(68)(function (iter) { +$export($export.S + $export.F * !__w_pdfjs_require__(69)(function (iter) { Array.from(iter); }), 'Array', { from: function from(arrayLike) { @@ -2684,7 +2587,7 @@ $export($export.S + $export.F * !__w_pdfjs_require__(68)(function (iter) { }); /***/ }), -/* 63 */ +/* 64 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2703,15 +2606,15 @@ module.exports = function (iterator, fn, value, entries) { }; /***/ }), -/* 64 */ +/* 65 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var Iterators = __w_pdfjs_require__(50); +var Iterators = __w_pdfjs_require__(51); -var ITERATOR = __w_pdfjs_require__(30)('iterator'); +var ITERATOR = __w_pdfjs_require__(33)('iterator'); var ArrayProto = Array.prototype; @@ -2720,7 +2623,7 @@ module.exports = function (it) { }; /***/ }), -/* 65 */ +/* 66 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2735,32 +2638,32 @@ module.exports = function (object, index, value) { }; /***/ }), -/* 66 */ +/* 67 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var classof = __w_pdfjs_require__(67); +var classof = __w_pdfjs_require__(68); -var ITERATOR = __w_pdfjs_require__(30)('iterator'); +var ITERATOR = __w_pdfjs_require__(33)('iterator'); -var Iterators = __w_pdfjs_require__(50); +var Iterators = __w_pdfjs_require__(51); module.exports = __w_pdfjs_require__(9).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), -/* 67 */ +/* 68 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var cof = __w_pdfjs_require__(29); +var cof = __w_pdfjs_require__(32); -var TAG = __w_pdfjs_require__(30)('toStringTag'); +var TAG = __w_pdfjs_require__(33)('toStringTag'); var ARG = cof(function () { return arguments; @@ -2778,13 +2681,13 @@ module.exports = function (it) { }; /***/ }), -/* 68 */ +/* 69 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var ITERATOR = __w_pdfjs_require__(30)('iterator'); +var ITERATOR = __w_pdfjs_require__(33)('iterator'); var SAFE_CLOSING = false; @@ -2825,18 +2728,18 @@ module.exports = function (exec, skipClosing) { }; /***/ }), -/* 69 */ +/* 70 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(70); +__w_pdfjs_require__(71); module.exports = __w_pdfjs_require__(9).Object.assign; /***/ }), -/* 70 */ +/* 71 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2845,25 +2748,27 @@ module.exports = __w_pdfjs_require__(9).Object.assign; var $export = __w_pdfjs_require__(7); $export($export.S + $export.F, 'Object', { - assign: __w_pdfjs_require__(71) + assign: __w_pdfjs_require__(72) }); /***/ }), -/* 71 */ +/* 72 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var getKeys = __w_pdfjs_require__(54); +var DESCRIPTORS = __w_pdfjs_require__(15); + +var getKeys = __w_pdfjs_require__(55); -var gOPS = __w_pdfjs_require__(72); +var gOPS = __w_pdfjs_require__(73); -var pIE = __w_pdfjs_require__(73); +var pIE = __w_pdfjs_require__(74); -var toObject = __w_pdfjs_require__(61); +var toObject = __w_pdfjs_require__(62); -var IObject = __w_pdfjs_require__(43); +var IObject = __w_pdfjs_require__(44); var $assign = Object.assign; module.exports = !$assign || __w_pdfjs_require__(16)(function () { @@ -2891,7 +2796,8 @@ module.exports = !$assign || __w_pdfjs_require__(16)(function () { var key; while (length > j) { - if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } } @@ -2899,7 +2805,7 @@ module.exports = !$assign || __w_pdfjs_require__(16)(function () { } : $assign; /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2908,7 +2814,7 @@ module.exports = !$assign || __w_pdfjs_require__(16)(function () { exports.f = Object.getOwnPropertySymbols; /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2917,18 +2823,18 @@ exports.f = Object.getOwnPropertySymbols; exports.f = {}.propertyIsEnumerable; /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(75); +__w_pdfjs_require__(76); module.exports = __w_pdfjs_require__(9).Math.log2; /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2943,18 +2849,18 @@ $export($export.S, 'Math', { }); /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(77); +__w_pdfjs_require__(78); module.exports = __w_pdfjs_require__(9).Number.isNaN; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2969,18 +2875,18 @@ $export($export.S, 'Number', { }); /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(79); +__w_pdfjs_require__(80); module.exports = __w_pdfjs_require__(9).Number.isInteger; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2989,11 +2895,11 @@ module.exports = __w_pdfjs_require__(9).Number.isInteger; var $export = __w_pdfjs_require__(7); $export($export.S, 'Number', { - isInteger: __w_pdfjs_require__(80) + isInteger: __w_pdfjs_require__(81) }); /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3008,37 +2914,37 @@ module.exports = function isInteger(it) { }; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(82); - -__w_pdfjs_require__(47); - __w_pdfjs_require__(83); -__w_pdfjs_require__(86); +__w_pdfjs_require__(48); + +__w_pdfjs_require__(84); -__w_pdfjs_require__(99); +__w_pdfjs_require__(87); __w_pdfjs_require__(100); +__w_pdfjs_require__(101); + module.exports = __w_pdfjs_require__(9).Promise; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var classof = __w_pdfjs_require__(67); +var classof = __w_pdfjs_require__(68); var test = {}; -test[__w_pdfjs_require__(30)('toStringTag')] = 'z'; +test[__w_pdfjs_require__(33)('toStringTag')] = 'z'; if (test + '' != '[object z]') { __w_pdfjs_require__(20)(Object.prototype, 'toString', function toString() { @@ -3047,15 +2953,15 @@ if (test + '' != '[object z]') { } /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var $iterators = __w_pdfjs_require__(84); +var $iterators = __w_pdfjs_require__(85); -var getKeys = __w_pdfjs_require__(54); +var getKeys = __w_pdfjs_require__(55); var redefine = __w_pdfjs_require__(20); @@ -3063,9 +2969,9 @@ var global = __w_pdfjs_require__(8); var hide = __w_pdfjs_require__(10); -var Iterators = __w_pdfjs_require__(50); +var Iterators = __w_pdfjs_require__(51); -var wks = __w_pdfjs_require__(30); +var wks = __w_pdfjs_require__(33); var ITERATOR = wks('iterator'); var TO_STRING_TAG = wks('toStringTag'); @@ -3122,21 +3028,21 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++ } /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var addToUnscopables = __w_pdfjs_require__(45); +var addToUnscopables = __w_pdfjs_require__(46); -var step = __w_pdfjs_require__(85); +var step = __w_pdfjs_require__(86); -var Iterators = __w_pdfjs_require__(50); +var Iterators = __w_pdfjs_require__(51); -var toIObject = __w_pdfjs_require__(42); +var toIObject = __w_pdfjs_require__(43); -module.exports = __w_pdfjs_require__(49)(Array, 'Array', function (iterated, kind) { +module.exports = __w_pdfjs_require__(50)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); this._i = 0; this._k = kind; @@ -3160,7 +3066,7 @@ addToUnscopables('values'); addToUnscopables('entries'); /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3174,43 +3080,43 @@ module.exports = function (done, value) { }; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var LIBRARY = __w_pdfjs_require__(32); +var LIBRARY = __w_pdfjs_require__(25); var global = __w_pdfjs_require__(8); -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); -var classof = __w_pdfjs_require__(67); +var classof = __w_pdfjs_require__(68); var $export = __w_pdfjs_require__(7); var isObject = __w_pdfjs_require__(13); -var aFunction = __w_pdfjs_require__(24); +var aFunction = __w_pdfjs_require__(27); -var anInstance = __w_pdfjs_require__(87); +var anInstance = __w_pdfjs_require__(88); -var forOf = __w_pdfjs_require__(88); +var forOf = __w_pdfjs_require__(89); -var speciesConstructor = __w_pdfjs_require__(89); +var speciesConstructor = __w_pdfjs_require__(90); -var task = __w_pdfjs_require__(90).set; +var task = __w_pdfjs_require__(91).set; -var microtask = __w_pdfjs_require__(92)(); +var microtask = __w_pdfjs_require__(93)(); -var newPromiseCapabilityModule = __w_pdfjs_require__(93); +var newPromiseCapabilityModule = __w_pdfjs_require__(94); -var perform = __w_pdfjs_require__(94); +var perform = __w_pdfjs_require__(95); -var userAgent = __w_pdfjs_require__(95); +var userAgent = __w_pdfjs_require__(96); -var promiseResolve = __w_pdfjs_require__(96); +var promiseResolve = __w_pdfjs_require__(97); var PROMISE = 'Promise'; var TypeError = global.TypeError; @@ -3228,7 +3134,7 @@ var USE_NATIVE = !!function () { try { var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__w_pdfjs_require__(30)('species')] = function (exec) { + var FakePromise = (promise.constructor = {})[__w_pdfjs_require__(33)('species')] = function (exec) { exec(empty, empty); }; @@ -3412,7 +3318,7 @@ if (!USE_NATIVE) { this._n = false; }; - Internal.prototype = __w_pdfjs_require__(97)($Promise.prototype, { + Internal.prototype = __w_pdfjs_require__(98)($Promise.prototype, { then: function then(onFulfilled, onRejected) { var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; @@ -3446,9 +3352,9 @@ $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__w_pdfjs_require__(59)($Promise, PROMISE); +__w_pdfjs_require__(60)($Promise, PROMISE); -__w_pdfjs_require__(98)(PROMISE); +__w_pdfjs_require__(99)(PROMISE); Wrapper = __w_pdfjs_require__(9)[PROMISE]; $export($export.S + $export.F * !USE_NATIVE, PROMISE, { @@ -3464,7 +3370,7 @@ $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); } }); -$export($export.S + $export.F * !(USE_NATIVE && __w_pdfjs_require__(68)(function (iter) { +$export($export.S + $export.F * !(USE_NATIVE && __w_pdfjs_require__(69)(function (iter) { $Promise.all(iter)['catch'](empty); })), PROMISE, { all: function all(iterable) { @@ -3508,7 +3414,7 @@ $export($export.S + $export.F * !(USE_NATIVE && __w_pdfjs_require__(68)(function }); /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3523,23 +3429,23 @@ module.exports = function (it, Constructor, name, forbiddenField) { }; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); -var call = __w_pdfjs_require__(63); +var call = __w_pdfjs_require__(64); -var isArrayIter = __w_pdfjs_require__(64); +var isArrayIter = __w_pdfjs_require__(65); var anObject = __w_pdfjs_require__(12); -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var getIterFn = __w_pdfjs_require__(66); +var getIterFn = __w_pdfjs_require__(67); var BREAK = {}; var RETURN = {}; @@ -3565,7 +3471,7 @@ _exports.BREAK = BREAK; _exports.RETURN = RETURN; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3573,9 +3479,9 @@ _exports.RETURN = RETURN; var anObject = __w_pdfjs_require__(12); -var aFunction = __w_pdfjs_require__(24); +var aFunction = __w_pdfjs_require__(27); -var SPECIES = __w_pdfjs_require__(30)('species'); +var SPECIES = __w_pdfjs_require__(33)('species'); module.exports = function (O, D) { var C = anObject(O).constructor; @@ -3584,17 +3490,17 @@ module.exports = function (O, D) { }; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); -var invoke = __w_pdfjs_require__(91); +var invoke = __w_pdfjs_require__(92); -var html = __w_pdfjs_require__(58); +var html = __w_pdfjs_require__(59); var cel = __w_pdfjs_require__(17); @@ -3645,7 +3551,7 @@ if (!setTask || !clearTask) { delete queue[id]; }; - if (__w_pdfjs_require__(29)(process) == 'process') { + if (__w_pdfjs_require__(32)(process) == 'process') { defer = function defer(id) { process.nextTick(ctx(run, id, 1)); }; @@ -3684,7 +3590,7 @@ module.exports = { }; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3714,7 +3620,7 @@ module.exports = function (fn, args, that) { }; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3722,12 +3628,12 @@ module.exports = function (fn, args, that) { var global = __w_pdfjs_require__(8); -var macrotask = __w_pdfjs_require__(90).set; +var macrotask = __w_pdfjs_require__(91).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; -var isNode = __w_pdfjs_require__(29)(process) == 'process'; +var isNode = __w_pdfjs_require__(32)(process) == 'process'; module.exports = function () { var head, last, notify; @@ -3795,13 +3701,13 @@ module.exports = function () { }; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var aFunction = __w_pdfjs_require__(24); +var aFunction = __w_pdfjs_require__(27); function PromiseCapability(C) { var resolve, reject; @@ -3819,7 +3725,7 @@ module.exports.f = function (C) { }; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3840,7 +3746,7 @@ module.exports = function (exec) { }; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3852,7 +3758,7 @@ var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3862,7 +3768,7 @@ var anObject = __w_pdfjs_require__(12); var isObject = __w_pdfjs_require__(13); -var newPromiseCapability = __w_pdfjs_require__(93); +var newPromiseCapability = __w_pdfjs_require__(94); module.exports = function (C, x) { anObject(C); @@ -3874,7 +3780,7 @@ module.exports = function (C, x) { }; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3891,7 +3797,7 @@ module.exports = function (target, src, safe) { }; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3903,7 +3809,7 @@ var dP = __w_pdfjs_require__(11); var DESCRIPTORS = __w_pdfjs_require__(15); -var SPECIES = __w_pdfjs_require__(30)('species'); +var SPECIES = __w_pdfjs_require__(33)('species'); module.exports = function (KEY) { var C = global[KEY]; @@ -3916,7 +3822,7 @@ module.exports = function (KEY) { }; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3928,9 +3834,9 @@ var core = __w_pdfjs_require__(9); var global = __w_pdfjs_require__(8); -var speciesConstructor = __w_pdfjs_require__(89); +var speciesConstructor = __w_pdfjs_require__(90); -var promiseResolve = __w_pdfjs_require__(96); +var promiseResolve = __w_pdfjs_require__(97); $export($export.P + $export.R, 'Promise', { 'finally': function _finally(onFinally) { @@ -3949,7 +3855,7 @@ $export($export.P + $export.R, 'Promise', { }); /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3957,9 +3863,9 @@ $export($export.P + $export.R, 'Promise', { var $export = __w_pdfjs_require__(7); -var newPromiseCapability = __w_pdfjs_require__(93); +var newPromiseCapability = __w_pdfjs_require__(94); -var perform = __w_pdfjs_require__(94); +var perform = __w_pdfjs_require__(95); $export($export.S, 'Promise', { 'try': function _try(callbackfn) { @@ -3971,52 +3877,54 @@ $export($export.S, 'Promise', { }); /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(82); - __w_pdfjs_require__(83); -__w_pdfjs_require__(102); +__w_pdfjs_require__(84); -__w_pdfjs_require__(114); +__w_pdfjs_require__(103); -__w_pdfjs_require__(116); +__w_pdfjs_require__(115); + +__w_pdfjs_require__(117); module.exports = __w_pdfjs_require__(9).WeakMap; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var each = __w_pdfjs_require__(103)(0); +var global = __w_pdfjs_require__(8); + +var each = __w_pdfjs_require__(104)(0); var redefine = __w_pdfjs_require__(20); -var meta = __w_pdfjs_require__(107); +var meta = __w_pdfjs_require__(108); -var assign = __w_pdfjs_require__(71); +var assign = __w_pdfjs_require__(72); -var weak = __w_pdfjs_require__(108); +var weak = __w_pdfjs_require__(109); var isObject = __w_pdfjs_require__(13); -var fails = __w_pdfjs_require__(16); +var validate = __w_pdfjs_require__(110); -var validate = __w_pdfjs_require__(109); +var NATIVE_WEAK_MAP = __w_pdfjs_require__(110); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; var WEAK_MAP = 'WeakMap'; var getWeak = meta.getWeak; var isExtensible = Object.isExtensible; var uncaughtFrozenStore = weak.ufstore; -var tmp = {}; var InternalMap; var wrapper = function wrapper(get) { @@ -4038,11 +3946,9 @@ var methods = { } }; -var $WeakMap = module.exports = __w_pdfjs_require__(110)(WEAK_MAP, wrapper, methods, weak, true, true); +var $WeakMap = module.exports = __w_pdfjs_require__(111)(WEAK_MAP, wrapper, methods, weak, true, true); -if (fails(function () { - return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; -})) { +if (NATIVE_WEAK_MAP && IS_IE11) { InternalMap = weak.getConstructor(wrapper, WEAK_MAP); assign(InternalMap.prototype, methods); meta.NEED = true; @@ -4064,21 +3970,21 @@ if (fails(function () { } /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); -var IObject = __w_pdfjs_require__(43); +var IObject = __w_pdfjs_require__(44); -var toObject = __w_pdfjs_require__(61); +var toObject = __w_pdfjs_require__(62); -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var asc = __w_pdfjs_require__(104); +var asc = __w_pdfjs_require__(105); module.exports = function (TYPE, $create) { var IS_MAP = TYPE == 1; @@ -4125,20 +4031,20 @@ module.exports = function (TYPE, $create) { }; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var speciesConstructor = __w_pdfjs_require__(105); +var speciesConstructor = __w_pdfjs_require__(106); module.exports = function (original, length) { return new (speciesConstructor(original))(length); }; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4146,9 +4052,9 @@ module.exports = function (original, length) { var isObject = __w_pdfjs_require__(13); -var isArray = __w_pdfjs_require__(106); +var isArray = __w_pdfjs_require__(107); -var SPECIES = __w_pdfjs_require__(30)('species'); +var SPECIES = __w_pdfjs_require__(33)('species'); module.exports = function (original) { var C; @@ -4167,20 +4073,20 @@ module.exports = function (original) { }; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var cof = __w_pdfjs_require__(29); +var cof = __w_pdfjs_require__(32); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4251,29 +4157,29 @@ var meta = module.exports = { }; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var redefineAll = __w_pdfjs_require__(97); +var redefineAll = __w_pdfjs_require__(98); -var getWeak = __w_pdfjs_require__(107).getWeak; +var getWeak = __w_pdfjs_require__(108).getWeak; var anObject = __w_pdfjs_require__(12); var isObject = __w_pdfjs_require__(13); -var anInstance = __w_pdfjs_require__(87); +var anInstance = __w_pdfjs_require__(88); -var forOf = __w_pdfjs_require__(88); +var forOf = __w_pdfjs_require__(89); -var createArrayMethod = __w_pdfjs_require__(103); +var createArrayMethod = __w_pdfjs_require__(104); var $has = __w_pdfjs_require__(21); -var validate = __w_pdfjs_require__(109); +var validate = __w_pdfjs_require__(110); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); @@ -4347,7 +4253,7 @@ module.exports = { }; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4361,7 +4267,7 @@ module.exports = function (it, TYPE) { }; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4373,23 +4279,23 @@ var $export = __w_pdfjs_require__(7); var redefine = __w_pdfjs_require__(20); -var redefineAll = __w_pdfjs_require__(97); +var redefineAll = __w_pdfjs_require__(98); -var meta = __w_pdfjs_require__(107); +var meta = __w_pdfjs_require__(108); -var forOf = __w_pdfjs_require__(88); +var forOf = __w_pdfjs_require__(89); -var anInstance = __w_pdfjs_require__(87); +var anInstance = __w_pdfjs_require__(88); var isObject = __w_pdfjs_require__(13); var fails = __w_pdfjs_require__(16); -var $iterDetect = __w_pdfjs_require__(68); +var $iterDetect = __w_pdfjs_require__(69); -var setToStringTag = __w_pdfjs_require__(59); +var setToStringTag = __w_pdfjs_require__(60); -var inheritIfRequired = __w_pdfjs_require__(111); +var inheritIfRequired = __w_pdfjs_require__(112); module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { var Base = global[NAME]; @@ -4470,7 +4376,7 @@ module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { }; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4478,7 +4384,7 @@ module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { var isObject = __w_pdfjs_require__(13); -var setPrototypeOf = __w_pdfjs_require__(112).set; +var setPrototypeOf = __w_pdfjs_require__(113).set; module.exports = function (that, target, C) { var S = target.constructor; @@ -4492,7 +4398,7 @@ module.exports = function (that, target, C) { }; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4510,7 +4416,7 @@ var check = function check(O, proto) { module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? function (test, buggy, set) { try { - set = __w_pdfjs_require__(23)(Function.call, __w_pdfjs_require__(113).f(Object.prototype, '__proto__').set, 2); + set = __w_pdfjs_require__(26)(Function.call, __w_pdfjs_require__(114).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { @@ -4527,17 +4433,17 @@ module.exports = { }; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var pIE = __w_pdfjs_require__(73); +var pIE = __w_pdfjs_require__(74); var createDesc = __w_pdfjs_require__(19); -var toIObject = __w_pdfjs_require__(42); +var toIObject = __w_pdfjs_require__(43); var toPrimitive = __w_pdfjs_require__(18); @@ -4556,16 +4462,16 @@ exports.f = __w_pdfjs_require__(15) ? gOPD : function getOwnPropertyDescriptor(O }; /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(115)('WeakMap'); +__w_pdfjs_require__(116)('WeakMap'); /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4589,16 +4495,16 @@ module.exports = function (COLLECTION) { }; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(117)('WeakMap'); +__w_pdfjs_require__(118)('WeakMap'); /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4606,11 +4512,11 @@ __w_pdfjs_require__(117)('WeakMap'); var $export = __w_pdfjs_require__(7); -var aFunction = __w_pdfjs_require__(24); +var aFunction = __w_pdfjs_require__(27); -var ctx = __w_pdfjs_require__(23); +var ctx = __w_pdfjs_require__(26); -var forOf = __w_pdfjs_require__(88); +var forOf = __w_pdfjs_require__(89); module.exports = function (COLLECTION) { $export($export.S, COLLECTION, { @@ -4639,38 +4545,38 @@ module.exports = function (COLLECTION) { }; /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(82); - __w_pdfjs_require__(83); -__w_pdfjs_require__(119); +__w_pdfjs_require__(84); __w_pdfjs_require__(120); __w_pdfjs_require__(121); +__w_pdfjs_require__(122); + module.exports = __w_pdfjs_require__(9).WeakSet; /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var weak = __w_pdfjs_require__(108); +var weak = __w_pdfjs_require__(109); -var validate = __w_pdfjs_require__(109); +var validate = __w_pdfjs_require__(110); var WEAK_SET = 'WeakSet'; -__w_pdfjs_require__(110)(WEAK_SET, function (get) { +__w_pdfjs_require__(111)(WEAK_SET, function (get) { return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; @@ -4681,36 +4587,36 @@ __w_pdfjs_require__(110)(WEAK_SET, function (get) { }, weak, false, true); /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(115)('WeakSet'); +__w_pdfjs_require__(116)('WeakSet'); /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(117)('WeakSet'); +__w_pdfjs_require__(118)('WeakSet'); /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(123); +__w_pdfjs_require__(124); module.exports = __w_pdfjs_require__(9).String.codePointAt; /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4718,7 +4624,7 @@ module.exports = __w_pdfjs_require__(9).String.codePointAt; var $export = __w_pdfjs_require__(7); -var $at = __w_pdfjs_require__(48)(false); +var $at = __w_pdfjs_require__(49)(false); $export($export.P, 'String', { codePointAt: function codePointAt(pos) { @@ -4727,18 +4633,18 @@ $export($export.P, 'String', { }); /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(125); +__w_pdfjs_require__(126); module.exports = __w_pdfjs_require__(9).String.fromCodePoint; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4746,7 +4652,7 @@ module.exports = __w_pdfjs_require__(9).String.fromCodePoint; var $export = __w_pdfjs_require__(7); -var toAbsoluteIndex = __w_pdfjs_require__(44); +var toAbsoluteIndex = __w_pdfjs_require__(45); var fromCharCode = String.fromCharCode; var $fromCodePoint = String.fromCodePoint; @@ -4768,20 +4674,20 @@ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1) }); /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(127); +__w_pdfjs_require__(128); -__w_pdfjs_require__(82); +__w_pdfjs_require__(83); module.exports = __w_pdfjs_require__(9).Symbol; /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -4799,45 +4705,49 @@ var $export = __w_pdfjs_require__(7); var redefine = __w_pdfjs_require__(20); -var META = __w_pdfjs_require__(107).KEY; +var META = __w_pdfjs_require__(108).KEY; var $fails = __w_pdfjs_require__(16); -var shared = __w_pdfjs_require__(31); +var shared = __w_pdfjs_require__(24); -var setToStringTag = __w_pdfjs_require__(59); +var setToStringTag = __w_pdfjs_require__(60); var uid = __w_pdfjs_require__(22); -var wks = __w_pdfjs_require__(30); +var wks = __w_pdfjs_require__(33); -var wksExt = __w_pdfjs_require__(128); +var wksExt = __w_pdfjs_require__(129); -var wksDefine = __w_pdfjs_require__(129); +var wksDefine = __w_pdfjs_require__(130); -var enumKeys = __w_pdfjs_require__(130); +var enumKeys = __w_pdfjs_require__(131); -var isArray = __w_pdfjs_require__(106); +var isArray = __w_pdfjs_require__(107); var anObject = __w_pdfjs_require__(12); var isObject = __w_pdfjs_require__(13); -var toIObject = __w_pdfjs_require__(42); +var toObject = __w_pdfjs_require__(62); + +var toIObject = __w_pdfjs_require__(43); var toPrimitive = __w_pdfjs_require__(18); var createDesc = __w_pdfjs_require__(19); -var _create = __w_pdfjs_require__(52); +var _create = __w_pdfjs_require__(53); -var gOPNExt = __w_pdfjs_require__(131); +var gOPNExt = __w_pdfjs_require__(132); -var $GOPD = __w_pdfjs_require__(113); +var $GOPD = __w_pdfjs_require__(114); + +var $GOPS = __w_pdfjs_require__(73); var $DP = __w_pdfjs_require__(11); -var $keys = __w_pdfjs_require__(54); +var $keys = __w_pdfjs_require__(55); var gOPD = $GOPD.f; var dP = $DP.f; @@ -4855,7 +4765,7 @@ var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; var QObject = global.QObject; var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; var setSymbolDesc = DESCRIPTORS && $fails(function () { @@ -4992,11 +4902,11 @@ if (!USE_NATIVE) { }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; - __w_pdfjs_require__(132).f = gOPNExt.f = $getOwnPropertyNames; - __w_pdfjs_require__(73).f = $propertyIsEnumerable; - __w_pdfjs_require__(72).f = $getOwnPropertySymbols; + __w_pdfjs_require__(133).f = gOPNExt.f = $getOwnPropertyNames; + __w_pdfjs_require__(74).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; - if (DESCRIPTORS && !__w_pdfjs_require__(32)) { + if (DESCRIPTORS && !__w_pdfjs_require__(25)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } @@ -5043,6 +4953,14 @@ $export($export.S + $export.F * !USE_NATIVE, 'Object', { getOwnPropertyNames: $getOwnPropertyNames, getOwnPropertySymbols: $getOwnPropertySymbols }); +var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); +}); +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); return _stringify([S]) != '[null]' || _stringify({ @@ -5074,16 +4992,16 @@ setToStringTag(Math, 'Math', true); setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -exports.f = __w_pdfjs_require__(30); +exports.f = __w_pdfjs_require__(33); /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -5093,9 +5011,9 @@ var global = __w_pdfjs_require__(8); var core = __w_pdfjs_require__(9); -var LIBRARY = __w_pdfjs_require__(32); +var LIBRARY = __w_pdfjs_require__(25); -var wksExt = __w_pdfjs_require__(128); +var wksExt = __w_pdfjs_require__(129); var defineProperty = __w_pdfjs_require__(11).f; @@ -5107,17 +5025,17 @@ module.exports = function (name) { }; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var getKeys = __w_pdfjs_require__(54); +var getKeys = __w_pdfjs_require__(55); -var gOPS = __w_pdfjs_require__(72); +var gOPS = __w_pdfjs_require__(73); -var pIE = __w_pdfjs_require__(73); +var pIE = __w_pdfjs_require__(74); module.exports = function (it) { var result = getKeys(it); @@ -5138,7 +5056,7 @@ module.exports = function (it) { }; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -5146,9 +5064,9 @@ module.exports = function (it) { function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -var toIObject = __w_pdfjs_require__(42); +var toIObject = __w_pdfjs_require__(43); -var gOPN = __w_pdfjs_require__(132).f; +var gOPN = __w_pdfjs_require__(133).f; var toString = {}.toString; var windowNames = (typeof window === "undefined" ? "undefined" : _typeof(window)) == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; @@ -5166,33 +5084,33 @@ module.exports.f = function getOwnPropertyNames(it) { }; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var $keys = __w_pdfjs_require__(55); +var $keys = __w_pdfjs_require__(56); -var hiddenKeys = __w_pdfjs_require__(57).concat('length', 'prototype'); +var hiddenKeys = __w_pdfjs_require__(58).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(134); +__w_pdfjs_require__(135); module.exports = __w_pdfjs_require__(9).String.padStart; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -5200,28 +5118,29 @@ module.exports = __w_pdfjs_require__(9).String.padStart; var $export = __w_pdfjs_require__(7); -var $pad = __w_pdfjs_require__(135); +var $pad = __w_pdfjs_require__(136); -var userAgent = __w_pdfjs_require__(95); +var userAgent = __w_pdfjs_require__(96); -$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); +$export($export.P + $export.F * WEBKIT_BUG, 'String', { padStart: function padStart(maxLength) { return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } }); /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toLength = __w_pdfjs_require__(25); +var toLength = __w_pdfjs_require__(28); -var repeat = __w_pdfjs_require__(136); +var repeat = __w_pdfjs_require__(137); -var defined = __w_pdfjs_require__(33); +var defined = __w_pdfjs_require__(34); module.exports = function (that, maxLength, fillString, left) { var S = String(defined(that)); @@ -5236,15 +5155,15 @@ module.exports = function (that, maxLength, fillString, left) { }; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toInteger = __w_pdfjs_require__(26); +var toInteger = __w_pdfjs_require__(29); -var defined = __w_pdfjs_require__(33); +var defined = __w_pdfjs_require__(34); module.exports = function repeat(count) { var str = String(defined(this)); @@ -5260,18 +5179,18 @@ module.exports = function repeat(count) { }; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(138); +__w_pdfjs_require__(139); module.exports = __w_pdfjs_require__(9).String.padEnd; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -5279,29 +5198,30 @@ module.exports = __w_pdfjs_require__(9).String.padEnd; var $export = __w_pdfjs_require__(7); -var $pad = __w_pdfjs_require__(135); +var $pad = __w_pdfjs_require__(136); -var userAgent = __w_pdfjs_require__(95); +var userAgent = __w_pdfjs_require__(96); -$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); +$export($export.P + $export.F * WEBKIT_BUG, 'String', { padEnd: function padEnd(maxLength) { return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } }); /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(140); +__w_pdfjs_require__(141); module.exports = __w_pdfjs_require__(9).Object.values; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -5309,7 +5229,7 @@ module.exports = __w_pdfjs_require__(9).Object.values; var $export = __w_pdfjs_require__(7); -var $values = __w_pdfjs_require__(141)(false); +var $values = __w_pdfjs_require__(142)(false); $export($export.S, 'Object', { values: function values(it) { @@ -5318,17 +5238,19 @@ $export($export.S, 'Object', { }); /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var getKeys = __w_pdfjs_require__(54); +var DESCRIPTORS = __w_pdfjs_require__(15); + +var getKeys = __w_pdfjs_require__(55); -var toIObject = __w_pdfjs_require__(42); +var toIObject = __w_pdfjs_require__(43); -var isEnum = __w_pdfjs_require__(73).f; +var isEnum = __w_pdfjs_require__(74).f; module.exports = function (isEntries) { return function (it) { @@ -5340,7 +5262,9 @@ module.exports = function (isEntries) { var key; while (length > i) { - if (isEnum.call(O, key = keys[i++])) { + key = keys[i++]; + + if (!DESCRIPTORS || isEnum.call(O, key)) { result.push(isEntries ? [key, O[key]] : O[key]); } } @@ -5350,7 +5274,7 @@ module.exports = function (isEntries) { }; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -5373,12 +5297,12 @@ module.exports = function (isEntries) { if (isReadableStreamSupported) { exports.ReadableStream = ReadableStream; } else { - exports.ReadableStream = __w_pdfjs_require__(143).ReadableStream; + exports.ReadableStream = __w_pdfjs_require__(144).ReadableStream; } } /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -6015,7 +5939,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (writer !== undefined) { defaultWriterClosedPromiseReject(writer, stream._storedError); - writer._closedPromise.catch(function () {}); + writer._closedPromise["catch"](function () {}); } } @@ -6063,7 +5987,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera } else if (state === 'erroring') { defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); - this._readyPromise.catch(function () {}); + this._readyPromise["catch"](function () {}); defaultWriterClosedPromiseInitialize(this); } else if (state === 'closed') { @@ -6074,11 +5998,11 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera var storedError = stream._storedError; defaultWriterReadyPromiseInitializeAsRejected(this, storedError); - this._readyPromise.catch(function () {}); + this._readyPromise["catch"](function () {}); defaultWriterClosedPromiseInitializeAsRejected(this, storedError); - this._closedPromise.catch(function () {}); + this._closedPromise["catch"](function () {}); } } @@ -6248,7 +6172,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultWriterClosedPromiseResetToRejected(writer, error); } - writer._closedPromise.catch(function () {}); + writer._closedPromise["catch"](function () {}); } function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { @@ -6258,7 +6182,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultWriterReadyPromiseResetToRejected(writer, error); } - writer._readyPromise.catch(function () {}); + writer._readyPromise["catch"](function () {}); } function WritableStreamDefaultWriterGetDesiredSize(writer) { @@ -6382,7 +6306,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera assert(stream._state === 'writable' || stream._state === 'erroring'); _this._started = true; WritableStreamDealWithRejection(stream, r); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } }]); @@ -6498,7 +6422,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera WritableStreamFinishInFlightClose(stream); }, function (reason) { WritableStreamFinishInFlightCloseWithError(stream, reason); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } function WritableStreamDefaultControllerProcessWrite(controller, chunk) { @@ -6519,7 +6443,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); }, function (reason) { WritableStreamFinishInFlightWriteWithError(stream, reason); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } function WritableStreamDefaultControllerGetBackpressure(controller) { @@ -6902,7 +6826,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera return; } - currentWrite = WritableStreamDefaultWriterWrite(writer, value).catch(function () {}); + currentWrite = WritableStreamDefaultWriterWrite(writer, value)["catch"](function () {}); }); }).then(pipeLoop); } @@ -6947,7 +6871,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera } } - pipeLoop().catch(function (err) { + pipeLoop()["catch"](function (err) { currentWrite = Promise.resolve(); rethrowAssertionErrorRejection(err); }); @@ -6963,7 +6887,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (stream._state === 'errored') { action(stream._storedError); } else { - promise.catch(action).catch(rethrowAssertionErrorRejection); + promise["catch"](action)["catch"](rethrowAssertionErrorRejection); } } @@ -6971,7 +6895,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (stream._state === 'closed') { action(); } else { - promise.then(action).catch(rethrowAssertionErrorRejection); + promise.then(action)["catch"](rethrowAssertionErrorRejection); } } @@ -6993,7 +6917,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera return finalize(originalIsError, originalError); }, function (newError) { return finalize(true, newError); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } } @@ -7007,7 +6931,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) { waitForWritesToFinish().then(function () { return finalize(isError, error); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } else { finalize(isError, error); } @@ -7128,7 +7052,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera pull._branch1 = branch1Stream._readableStreamController; pull._branch2 = branch2Stream._readableStreamController; - reader._closedPromise.catch(function (r) { + reader._closedPromise["catch"](function (r) { if (teeState.closedOrErrored === true) { return; } @@ -7329,7 +7253,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultReaderClosedPromiseReject(reader, e); - reader._closedPromise.catch(function () {}); + reader._closedPromise["catch"](function () {}); } function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { @@ -7580,7 +7504,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera assert(stream._state === 'errored', 'state must be errored'); defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); - reader._closedPromise.catch(function () {}); + reader._closedPromise["catch"](function () {}); } } @@ -7600,7 +7524,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultReaderClosedPromiseResetToRejected(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\'s closedness')); } - reader._closedPromise.catch(function () {}); + reader._closedPromise["catch"](function () {}); reader._ownerReadableStream._reader = undefined; reader._ownerReadableStream = undefined; @@ -7668,7 +7592,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera ReadableStreamDefaultControllerCallPullIfNeeded(controller); }, function (r) { ReadableStreamDefaultControllerErrorIfNeeded(controller, r); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } _createClass(ReadableStreamDefaultController, [{ @@ -7803,7 +7727,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera return undefined; }, function (e) { ReadableStreamDefaultControllerErrorIfNeeded(controller, e); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); return undefined; } @@ -7998,7 +7922,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (stream._state === 'readable') { ReadableByteStreamControllerError(controller, r); } - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } _createClass(ReadableByteStreamController, [{ @@ -8200,7 +8124,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (controller._controlledReadableStream._state === 'readable') { ReadableByteStreamControllerError(controller, e); } - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); return undefined; } @@ -8931,7 +8855,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera } return Promise.resolve(); - }).catch(function (r) { + })["catch"](function (r) { TransformStreamErrorIfNeeded(transformStream, r); return Promise.reject(transformStream._storedError); }); @@ -9080,7 +9004,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera var transformStream = this; var startResult = InvokeOrNoop(transformer, 'start', [transformStream._transformStreamController]); startPromise_resolve(startResult); - startPromise.catch(function (e) { + startPromise["catch"](function (e) { if (transformStream._errored === false) { transformStream._errored = true; transformStream._storedError = e; @@ -9127,7 +9051,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera }])); /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -9149,7 +9073,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat if (isURLSupported) { exports.URL = URL; } else { - var PolyfillURL = __w_pdfjs_require__(145).URL; + var PolyfillURL = __w_pdfjs_require__(146).URL; var OriginalURL = __w_pdfjs_require__(3).URL; @@ -9168,7 +9092,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat } /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -9838,7 +9762,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat })(); /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -9851,11 +9775,11 @@ exports.getDocument = getDocument; exports.setPDFNetworkStreamFactory = setPDFNetworkStreamFactory; exports.build = exports.version = exports.PDFPageProxy = exports.PDFDocumentProxy = exports.PDFWorker = exports.PDFDataRangeTransport = exports.LoopbackPort = void 0; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); -var _dom_utils = __w_pdfjs_require__(151); +var _display_utils = __w_pdfjs_require__(151); var _font_loader = __w_pdfjs_require__(152); @@ -10029,7 +9953,7 @@ function getDocument(src) { } params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE; - params.CMapReaderFactory = params.CMapReaderFactory || _dom_utils.DOMCMapReaderFactory; + params.CMapReaderFactory = params.CMapReaderFactory || _display_utils.DOMCMapReaderFactory; params.ignoreErrors = params.stopAtErrors !== true; params.pdfBug = params.pdfBug === true; var NativeImageDecoderValues = Object.values(_util.NativeImageDecoding); @@ -10095,6 +10019,7 @@ function getDocument(src) { networkStream = new _transport_stream.PDFDataTransportStream({ length: params.length, initialData: params.initialData, + progressiveDone: params.progressiveDone, disableRange: params.disableRange, disableStream: params.disableStream }, rangeTransport); @@ -10116,7 +10041,7 @@ function getDocument(src) { task._transport = transport; messageHandler.send('Ready', null); }); - }).catch(task._capability.reject); + })["catch"](task._capability.reject); return task; } @@ -10128,11 +10053,12 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { if (pdfDataRangeTransport) { source.length = pdfDataRangeTransport.length; source.initialData = pdfDataRangeTransport.initialData; + source.progressiveDone = pdfDataRangeTransport.progressiveDone; } return worker.messageHandler.sendWithPromise('GetDocRequest', { docId: docId, - apiVersion: '2.1.266', + apiVersion: '2.2.228', source: { data: source.data, url: source.url, @@ -10197,7 +10123,7 @@ var PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() { }, { key: "then", value: function then(onFulfilled, onRejected) { - (0, _util.deprecated)('PDFDocumentLoadingTask.then method, ' + 'use the `promise` getter instead.'); + (0, _display_utils.deprecated)('PDFDocumentLoadingTask.then method, ' + 'use the `promise` getter instead.'); return this.promise.then.apply(this.promise, arguments); } }, { @@ -10217,13 +10143,17 @@ var PDFDataRangeTransport = /*#__PURE__*/ function () { function PDFDataRangeTransport(length, initialData) { + var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + _classCallCheck(this, PDFDataRangeTransport); this.length = length; this.initialData = initialData; + this.progressiveDone = progressiveDone; this._rangeListeners = []; this._progressListeners = []; this._progressiveReadListeners = []; + this._progressiveDoneListeners = []; this._readyCapability = (0, _util.createPromiseCapability)(); } @@ -10242,6 +10172,11 @@ function () { value: function addProgressiveReadListener(listener) { this._progressiveReadListeners.push(listener); } + }, { + key: "addProgressiveDoneListener", + value: function addProgressiveDoneListener(listener) { + this._progressiveDoneListeners.push(listener); + } }, { key: "onDataRange", value: function onDataRange(begin, chunk) { @@ -10259,8 +10194,8 @@ function () { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -10271,7 +10206,7 @@ function () { } }, { key: "onDataProgress", - value: function onDataProgress(loaded) { + value: function onDataProgress(loaded, total) { var _this2 = this; this._readyCapability.promise.then(function () { @@ -10282,15 +10217,15 @@ function () { try { for (var _iterator2 = _this2._progressListeners[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { var listener = _step2.value; - listener(loaded); + listener(loaded, total); } } catch (err) { _didIteratorError2 = true; _iteratorError2 = err; } finally { try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); + if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { + _iterator2["return"](); } } finally { if (_didIteratorError2) { @@ -10320,8 +10255,8 @@ function () { _iteratorError3 = err; } finally { try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); + if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) { + _iterator3["return"](); } } finally { if (_didIteratorError3) { @@ -10331,6 +10266,37 @@ function () { } }); } + }, { + key: "onDataProgressiveDone", + value: function onDataProgressiveDone() { + var _this4 = this; + + this._readyCapability.promise.then(function () { + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; + + try { + for (var _iterator4 = _this4._progressiveDoneListeners[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var listener = _step4.value; + listener(); + } + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) { + _iterator4["return"](); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } + } + }); + } }, { key: "transportReady", value: function transportReady() { @@ -10354,10 +10320,9 @@ exports.PDFDataRangeTransport = PDFDataRangeTransport; var PDFDocumentProxy = /*#__PURE__*/ function () { - function PDFDocumentProxy(pdfInfo, transport, loadingTask) { + function PDFDocumentProxy(pdfInfo, transport) { _classCallCheck(this, PDFDocumentProxy); - this.loadingTask = loadingTask; this._pdfInfo = pdfInfo; this._transport = transport; } @@ -10387,11 +10352,21 @@ function () { value: function getPageLabels() { return this._transport.getPageLabels(); } + }, { + key: "getPageLayout", + value: function getPageLayout() { + return this._transport.getPageLayout(); + } }, { key: "getPageMode", value: function getPageMode() { return this._transport.getPageMode(); } + }, { + key: "getViewerPreferences", + value: function getViewerPreferences() { + return this._transport.getViewerPreferences(); + } }, { key: "getOpenActionDestination", value: function getOpenActionDestination() { @@ -10462,6 +10437,11 @@ function () { get: function get() { return this._transport.loadingParams; } + }, { + key: "loadingTask", + get: function get() { + return this._transport.loadingTask; + } }]); return PDFDocumentProxy; @@ -10480,7 +10460,7 @@ function () { this.pageIndex = pageIndex; this._pageInfo = pageInfo; this._transport = transport; - this._stats = pdfBug ? new _dom_utils.StatTimer() : _dom_utils.DummyStatTimer; + this._stats = pdfBug ? new _display_utils.StatTimer() : _display_utils.DummyStatTimer; this._pdfBug = pdfBug; this.commonObjs = transport.commonObjs; this.objs = new PDFObjects(); @@ -10501,13 +10481,13 @@ function () { dontFlip = _ref$dontFlip === void 0 ? false : _ref$dontFlip; if (arguments.length > 1 || typeof arguments[0] === 'number') { - (0, _util.deprecated)('getViewport is called with obsolete arguments.'); + (0, _display_utils.deprecated)('getViewport is called with obsolete arguments.'); scale = arguments[0]; rotation = typeof arguments[1] === 'number' ? arguments[1] : this.rotate; dontFlip = typeof arguments[2] === 'boolean' ? arguments[2] : false; } - return new _dom_utils.PageViewport({ + return new _display_utils.PageViewport({ viewBox: this.view, scale: scale, rotation: rotation, @@ -10531,7 +10511,7 @@ function () { }, { key: "render", value: function render(_ref3) { - var _this4 = this; + var _this5 = this; var canvasContext = _ref3.canvasContext, viewport = _ref3.viewport, @@ -10553,7 +10533,7 @@ function () { stats.time('Overall'); this.pendingCleanup = false; var renderingIntent = intent === 'print' ? 'print' : 'display'; - var canvasFactoryInstance = canvasFactory || new _dom_utils.DOMCanvasFactory(); + var canvasFactoryInstance = canvasFactory || new _display_utils.DOMCanvasFactory(); var webGLContext = new _webgl.WebGLContext({ enable: enableWebGL }); @@ -10588,11 +10568,11 @@ function () { intentState.renderTasks.splice(i, 1); } - if (_this4.cleanupAfterRender) { - _this4.pendingCleanup = true; + if (_this5.cleanupAfterRender || renderingIntent === 'print') { + _this5.pendingCleanup = true; } - _this4._tryCleanup(); + _this5._tryCleanup(); if (error) { internalRenderTask.capability.reject(error); @@ -10630,7 +10610,7 @@ function () { intentState.renderTasks.push(internalRenderTask); var renderTask = internalRenderTask.task; intentState.displayReadyCapability.promise.then(function (transparency) { - if (_this4.pendingCleanup) { + if (_this5.pendingCleanup) { complete(); return; } @@ -10638,7 +10618,7 @@ function () { stats.time('Rendering'); internalRenderTask.initializeGraphics(transparency); internalRenderTask.operatorListChanged(); - }).catch(complete); + })["catch"](complete); return renderTask; } }, { @@ -10755,7 +10735,7 @@ function () { var intentState = this.intentStates[intent]; intentState.renderTasks.forEach(function (renderTask) { - var renderCompleted = renderTask.capability.promise.catch(function () {}); + var renderCompleted = renderTask.capability.promise["catch"](function () {}); waitOn.push(renderCompleted); renderTask.cancel(); }); @@ -10791,8 +10771,8 @@ function () { this.objs.clear(); this.annotationsPromise = null; - if (resetStats && this._stats instanceof _dom_utils.StatTimer) { - this._stats = new _dom_utils.StatTimer(); + if (resetStats && this._stats instanceof _display_utils.StatTimer) { + this._stats = new _display_utils.StatTimer(); } this.pendingCleanup = false; @@ -10856,7 +10836,7 @@ function () { }, { key: "stats", get: function get() { - return this._stats instanceof _dom_utils.StatTimer ? this._stats : null; + return this._stats instanceof _display_utils.StatTimer ? this._stats : null; } }]); @@ -10881,7 +10861,7 @@ function () { _createClass(LoopbackPort, [{ key: "postMessage", value: function postMessage(obj, transfers) { - var _this5 = this; + var _this6 = this; function cloneValue(value) { if (_typeof(value) !== 'object' || value === null) { @@ -10946,9 +10926,9 @@ function () { }; this._deferred.then(function () { - _this5._listeners.forEach(function (listener) { + _this6._listeners.forEach(function (listener) { listener.call(this, e); - }, _this5); + }, _this6); }); } }, { @@ -10966,7 +10946,7 @@ function () { }, { key: "terminate", value: function terminate() { - this._listeners = []; + this._listeners.length = 0; } }]); @@ -11016,7 +10996,7 @@ var PDFWorker = function PDFWorkerClosure() { } var loader = fakeWorkerFilesLoader || function () { - return (0, _dom_utils.loadScript)(_getWorkerSrc()).then(function () { + return (0, _display_utils.loadScript)(_getWorkerSrc()).then(function () { return window.pdfjsWorker.WorkerMessageHandler; }); }; @@ -11083,7 +11063,7 @@ var PDFWorker = function PDFWorkerClosure() { }, { key: "_initialize", value: function _initialize() { - var _this6 = this; + var _this7 = this; if (typeof Worker !== 'undefined' && !isWorkerDisabled && !getMainThreadWorkerMessageHandler()) { var workerSrc = _getWorkerSrc(); @@ -11101,15 +11081,15 @@ var PDFWorker = function PDFWorkerClosure() { messageHandler.destroy(); worker.terminate(); - if (_this6.destroyed) { - _this6._readyCapability.reject(new Error('Worker was destroyed')); + if (_this7.destroyed) { + _this7._readyCapability.reject(new Error('Worker was destroyed')); } else { - _this6._setupFakeWorker(); + _this7._setupFakeWorker(); } }; var onWorkerError = function onWorkerError() { - if (!_this6._webWorker) { + if (!_this7._webWorker) { terminateEarly(); } }; @@ -11118,27 +11098,27 @@ var PDFWorker = function PDFWorkerClosure() { messageHandler.on('test', function (data) { worker.removeEventListener('error', onWorkerError); - if (_this6.destroyed) { + if (_this7.destroyed) { terminateEarly(); return; } if (data && data.supportTypedArray) { - _this6._messageHandler = messageHandler; - _this6._port = worker; - _this6._webWorker = worker; + _this7._messageHandler = messageHandler; + _this7._port = worker; + _this7._webWorker = worker; if (!data.supportTransfers) { - _this6.postMessageTransfers = false; + _this7.postMessageTransfers = false; } - _this6._readyCapability.resolve(); + _this7._readyCapability.resolve(); messageHandler.send('configure', { - verbosity: _this6.verbosity + verbosity: _this7.verbosity }); } else { - _this6._setupFakeWorker(); + _this7._setupFakeWorker(); messageHandler.destroy(); worker.terminate(); @@ -11147,7 +11127,7 @@ var PDFWorker = function PDFWorkerClosure() { messageHandler.on('ready', function (data) { worker.removeEventListener('error', onWorkerError); - if (_this6.destroyed) { + if (_this7.destroyed) { terminateEarly(); return; } @@ -11155,12 +11135,12 @@ var PDFWorker = function PDFWorkerClosure() { try { sendTest(); } catch (e) { - _this6._setupFakeWorker(); + _this7._setupFakeWorker(); } }); var sendTest = function sendTest() { - var testObj = new Uint8Array([_this6.postMessageTransfers ? 255 : 0]); + var testObj = new Uint8Array([_this7.postMessageTransfers ? 255 : 0]); try { messageHandler.send('test', testObj, [testObj.buffer]); @@ -11183,7 +11163,7 @@ var PDFWorker = function PDFWorkerClosure() { }, { key: "_setupFakeWorker", value: function _setupFakeWorker() { - var _this7 = this; + var _this8 = this; if (!isWorkerDisabled) { (0, _util.warn)('Setting up fake worker.'); @@ -11191,23 +11171,23 @@ var PDFWorker = function PDFWorkerClosure() { } setupFakeWorkerGlobal().then(function (WorkerMessageHandler) { - if (_this7.destroyed) { - _this7._readyCapability.reject(new Error('Worker was destroyed')); + if (_this8.destroyed) { + _this8._readyCapability.reject(new Error('Worker was destroyed')); return; } var port = new LoopbackPort(); - _this7._port = port; + _this8._port = port; var id = 'fake' + nextFakeWorkerId++; var workerHandler = new _message_handler.MessageHandler(id + '_worker', id, port); WorkerMessageHandler.setup(workerHandler, port); var messageHandler = new _message_handler.MessageHandler(id, id + '_worker', port); - _this7._messageHandler = messageHandler; + _this8._messageHandler = messageHandler; - _this7._readyCapability.resolve(); - }).catch(function (reason) { - _this7._readyCapability.reject(new Error("Setting up fake worker failed: \"".concat(reason.message, "\"."))); + _this8._readyCapability.resolve(); + })["catch"](function (reason) { + _this8._readyCapability.reject(new Error("Setting up fake worker failed: \"".concat(reason.message, "\"."))); }); } }, { @@ -11221,7 +11201,7 @@ var PDFWorker = function PDFWorkerClosure() { this._webWorker = null; } - pdfWorkerPorts.delete(this._port); + pdfWorkerPorts["delete"](this._port); this._port = null; if (this._messageHandler) { @@ -11306,7 +11286,7 @@ function () { _createClass(WorkerTransport, [{ key: "destroy", value: function destroy() { - var _this8 = this; + var _this9 = this; if (this.destroyCapability) { return this.destroyCapability.promise; @@ -11325,24 +11305,24 @@ function () { waitOn.push(page._destroy()); } }); - this.pageCache = []; - this.pagePromises = []; + this.pageCache.length = 0; + this.pagePromises.length = 0; var terminated = this.messageHandler.sendWithPromise('Terminate', null); waitOn.push(terminated); Promise.all(waitOn).then(function () { - _this8.fontLoader.clear(); + _this9.fontLoader.clear(); - if (_this8._networkStream) { - _this8._networkStream.cancelAllRequests(); + if (_this9._networkStream) { + _this9._networkStream.cancelAllRequests(); } - if (_this8.messageHandler) { - _this8.messageHandler.destroy(); + if (_this9.messageHandler) { + _this9.messageHandler.destroy(); - _this8.messageHandler = null; + _this9.messageHandler = null; } - _this8.destroyCapability.resolve(); + _this9.destroyCapability.resolve(); }, this.destroyCapability.reject); return this.destroyCapability.promise; } @@ -11352,20 +11332,20 @@ function () { var messageHandler = this.messageHandler, loadingTask = this.loadingTask; messageHandler.on('GetReader', function (data, sink) { - var _this9 = this; + var _this10 = this; (0, _util.assert)(this._networkStream); this._fullReader = this._networkStream.getFullReader(); this._fullReader.onProgress = function (evt) { - _this9._lastProgress = { + _this10._lastProgress = { loaded: evt.loaded, total: evt.total }; }; sink.onPull = function () { - _this9._fullReader.read().then(function (_ref7) { + _this10._fullReader.read().then(function (_ref7) { var value = _ref7.value, done = _ref7.done; @@ -11376,24 +11356,24 @@ function () { (0, _util.assert)((0, _util.isArrayBuffer)(value)); sink.enqueue(new Uint8Array(value), 1, [value]); - }).catch(function (reason) { + })["catch"](function (reason) { sink.error(reason); }); }; sink.onCancel = function (reason) { - _this9._fullReader.cancel(reason); + _this10._fullReader.cancel(reason); }; }, this); messageHandler.on('ReaderHeadersReady', function (data) { - var _this10 = this; + var _this11 = this; var headersCapability = (0, _util.createPromiseCapability)(); var fullReader = this._fullReader; fullReader.headersReady.then(function () { if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) { - if (_this10._lastProgress && loadingTask.onProgress) { - loadingTask.onProgress(_this10._lastProgress); + if (_this11._lastProgress && loadingTask.onProgress) { + loadingTask.onProgress(_this11._lastProgress); } fullReader.onProgress = function (evt) { @@ -11419,6 +11399,11 @@ function () { var rangeReader = this._networkStream.getRangeReader(data.begin, data.end); + if (!rangeReader) { + sink.close(); + return; + } + sink.onPull = function () { rangeReader.read().then(function (_ref8) { var value = _ref8.value, @@ -11431,7 +11416,7 @@ function () { (0, _util.assert)((0, _util.isArrayBuffer)(value)); sink.enqueue(new Uint8Array(value), 1, [value]); - }).catch(function (reason) { + })["catch"](function (reason) { sink.error(reason); }); }; @@ -11442,19 +11427,18 @@ function () { }, this); messageHandler.on('GetDoc', function (_ref9) { var pdfInfo = _ref9.pdfInfo; - this.numPages = pdfInfo.numPages; - this.pdfDocument = new PDFDocumentProxy(pdfInfo, this, loadingTask); + this._numPages = pdfInfo.numPages; - loadingTask._capability.resolve(this.pdfDocument); + loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this)); }, this); messageHandler.on('PasswordRequest', function (exception) { - var _this11 = this; + var _this12 = this; this._passwordCapability = (0, _util.createPromiseCapability)(); if (loadingTask.onPassword) { var updatePassword = function updatePassword(password) { - _this11._passwordCapability.resolve({ + _this12._passwordCapability.resolve({ password: password }); }; @@ -11516,7 +11500,7 @@ function () { page._renderPageChunk(data.operatorList, data.intent); }, this); messageHandler.on('commonobj', function (data) { - var _this12 = this; + var _this13 = this; if (this.destroyed) { return; @@ -11544,10 +11528,10 @@ function () { var fontRegistry = null; - if (params.pdfBug && _global_scope.default.FontInspector && _global_scope.default.FontInspector.enabled) { + if (params.pdfBug && _global_scope["default"].FontInspector && _global_scope["default"].FontInspector.enabled) { fontRegistry = { registerFont: function registerFont(font, url) { - _global_scope.default['FontInspector'].fontAdded(font, url); + _global_scope["default"]['FontInspector'].fontAdded(font, url); } }; } @@ -11560,17 +11544,18 @@ function () { fontRegistry: fontRegistry }); this.fontLoader.bind(font).then(function () { - _this12.commonObjs.resolve(id, font); + _this13.commonObjs.resolve(id, font); }, function (reason) { messageHandler.sendWithPromise('FontFallback', { id: id - }).finally(function () { - _this12.commonObjs.resolve(id, font); + })["finally"](function () { + _this13.commonObjs.resolve(id, font); }); }); break; case 'FontPath': + case 'FontType3Res': this.commonObjs.resolve(id, exportedData); break; @@ -11580,7 +11565,7 @@ function () { }, this); messageHandler.on('obj', function (data) { if (this.destroyed) { - return; + return undefined; } var _data2 = _slicedToArray(data, 4), @@ -11592,7 +11577,7 @@ function () { var pageProxy = this.pageCache[pageIndex]; if (pageProxy.objs.has(id)) { - return; + return undefined; } switch (type) { @@ -11606,6 +11591,7 @@ function () { img.onerror = function () { reject(new Error('Error during JPEG image loading')); + (0, _display_utils.releaseImageResources)(img); }; img.src = imageData; @@ -11626,6 +11612,8 @@ function () { default: throw new Error("Got unknown object type ".concat(type)); } + + return undefined; }, this); messageHandler.on('DocProgress', function (data) { if (this.destroyed) { @@ -11644,11 +11632,11 @@ function () { return; } - var page = this.pageCache[data.pageNum - 1]; + var page = this.pageCache[data.pageIndex]; var intentState = page.intentStates[data.intent]; if (intentState.displayReadyCapability) { - intentState.displayReadyCapability.reject(data.error); + intentState.displayReadyCapability.reject(new Error(data.error)); } else { throw new Error(data.error); } @@ -11683,8 +11671,8 @@ function () { var img = new Image(); img.onload = function () { - var width = img.width; - var height = img.height; + var width = img.width, + height = img.height; var size = width * height; var rgbaLength = size * 4; var buf = new Uint8ClampedArray(size * components); @@ -11712,10 +11700,16 @@ function () { width: width, height: height }); + (0, _display_utils.releaseImageResources)(img); + tmpCanvas.width = 0; + tmpCanvas.height = 0; + tmpCanvas = null; + tmpCtx = null; }; img.onerror = function () { reject(new Error('JpegDecode failed to load image')); + (0, _display_utils.releaseImageResources)(img); }; img.src = imageUrl; @@ -11752,9 +11746,9 @@ function () { }, { key: "getPage", value: function getPage(pageNumber) { - var _this13 = this; + var _this14 = this; - if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this.numPages) { + if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) { return Promise.reject(new Error('Invalid page request')); } @@ -11767,12 +11761,12 @@ function () { var promise = this.messageHandler.sendWithPromise('GetPage', { pageIndex: pageIndex }).then(function (pageInfo) { - if (_this13.destroyed) { + if (_this14.destroyed) { throw new Error('Transport destroyed'); } - var page = new PDFPageProxy(pageIndex, pageInfo, _this13, _this13._params.pdfBug); - _this13.pageCache[pageIndex] = page; + var page = new PDFPageProxy(pageIndex, pageInfo, _this14, _this14._params.pdfBug); + _this14.pageCache[pageIndex] = page; return page; }); this.pagePromises[pageIndex] = promise; @@ -11783,7 +11777,7 @@ function () { value: function getPageIndex(ref) { return this.messageHandler.sendWithPromise('GetPageIndex', { ref: ref - }).catch(function (reason) { + })["catch"](function (reason) { return Promise.reject(new Error(reason)); }); } @@ -11816,15 +11810,25 @@ function () { value: function getPageLabels() { return this.messageHandler.sendWithPromise('GetPageLabels', null); } + }, { + key: "getPageLayout", + value: function getPageLayout() { + return this.messageHandler.sendWithPromise('GetPageLayout', null); + } }, { key: "getPageMode", value: function getPageMode() { return this.messageHandler.sendWithPromise('GetPageMode', null); } + }, { + key: "getViewerPreferences", + value: function getViewerPreferences() { + return this.messageHandler.sendWithPromise('GetViewerPreferences', null); + } }, { key: "getOpenActionDestination", value: function getOpenActionDestination() { - return this.messageHandler.sendWithPromise('getOpenActionDestination', null); + return this.messageHandler.sendWithPromise('GetOpenActionDestination', null); } }, { key: "getAttachments", @@ -11849,13 +11853,13 @@ function () { }, { key: "getMetadata", value: function getMetadata() { - var _this14 = this; + var _this15 = this; return this.messageHandler.sendWithPromise('GetMetadata', null).then(function (results) { return { info: results[0], metadata: results[1] ? new _metadata.Metadata(results[1]) : null, - contentDispositionFilename: _this14._fullReader ? _this14._fullReader.filename : null + contentDispositionFilename: _this15._fullReader ? _this15._fullReader.filename : null }; }); } @@ -11867,20 +11871,20 @@ function () { }, { key: "startCleanup", value: function startCleanup() { - var _this15 = this; + var _this16 = this; this.messageHandler.sendWithPromise('Cleanup', null).then(function () { - for (var i = 0, ii = _this15.pageCache.length; i < ii; i++) { - var page = _this15.pageCache[i]; + for (var i = 0, ii = _this16.pageCache.length; i < ii; i++) { + var page = _this16.pageCache[i]; if (page) { page.cleanup(); } } - _this15.commonObjs.clear(); + _this16.commonObjs.clear(); - _this15.fontLoader.clear(); + _this16.fontLoader.clear(); }); } }, { @@ -11958,6 +11962,14 @@ function () { }, { key: "clear", value: function clear() { + for (var objId in this._objs) { + var data = this._objs[objId].data; + + if (typeof Image !== 'undefined' && data instanceof Image) { + (0, _display_utils.releaseImageResources)(data); + } + } + this._objs = Object.create(null); } }]); @@ -11983,7 +11995,7 @@ function () { }, { key: "then", value: function then(onFulfilled, onRejected) { - (0, _util.deprecated)('RenderTask.then method, use the `promise` getter instead.'); + (0, _display_utils.deprecated)('RenderTask.then method, use the `promise` getter instead.'); return this.promise.then.apply(this.promise, arguments); } }, { @@ -12058,8 +12070,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { canvasInRendering.add(this._canvas); } - if (this._pdfBug && _global_scope.default.StepperManager && _global_scope.default.StepperManager.enabled) { - this.stepper = _global_scope.default.StepperManager.create(this.pageNumber - 1); + if (this._pdfBug && _global_scope["default"].StepperManager && _global_scope["default"].StepperManager.enabled) { + this.stepper = _global_scope["default"].StepperManager.create(this.pageNumber - 1); this.stepper.init(this.operatorList); this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint(); } @@ -12096,10 +12108,10 @@ var InternalRenderTask = function InternalRenderTaskClosure() { } if (this._canvas) { - canvasInRendering.delete(this._canvas); + canvasInRendering["delete"](this._canvas); } - this.callback(error || new _dom_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this.pageNumber), 'canvas')); + this.callback(error || new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this.pageNumber), 'canvas')); } }, { key: "operatorListChanged", @@ -12140,14 +12152,14 @@ var InternalRenderTask = function InternalRenderTaskClosure() { }, { key: "_scheduleNext", value: function _scheduleNext() { - var _this16 = this; + var _this17 = this; if (this._useRequestAnimationFrame) { window.requestAnimationFrame(function () { - _this16._nextBound().catch(_this16.cancel.bind(_this16)); + _this17._nextBound()["catch"](_this17.cancel.bind(_this17)); }); } else { - Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this)); + Promise.resolve().then(this._nextBound)["catch"](this.cancel.bind(this)); } } }, { @@ -12155,8 +12167,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { value: function () { var _next2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee() { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -12177,7 +12189,7 @@ var InternalRenderTask = function InternalRenderTaskClosure() { this.gfx.endDrawing(); if (this._canvas) { - canvasInRendering.delete(this._canvas); + canvasInRendering["delete"](this._canvas); } this.callback(); @@ -12206,20 +12218,11 @@ var InternalRenderTask = function InternalRenderTaskClosure() { return InternalRenderTask; }(); -var version = '2.1.266'; +var version = '2.2.228'; exports.version = version; -var build = '81f5835c'; +var build = 'd7afb74a'; exports.build = build; -/***/ }), -/* 147 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = __w_pdfjs_require__(148); - /***/ }), /* 148 */ /***/ (function(module, exports, __w_pdfjs_require__) { @@ -12227,27 +12230,8 @@ module.exports = __w_pdfjs_require__(148); "use strict"; -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var g = function () { - return this || (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self; -}() || Function("return this")(); - -var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; -var oldRuntime = hadRuntime && g.regeneratorRuntime; -g.regeneratorRuntime = undefined; module.exports = __w_pdfjs_require__(149); -if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; -} else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } -} - /***/ }), /* 149 */ /***/ (function(module, exports, __w_pdfjs_require__) { @@ -12257,7 +12241,7 @@ if (hadRuntime) { function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -!function (global) { +var runtime = function (exports) { "use strict"; var Op = Object.prototype; @@ -12267,18 +12251,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - var inModule = ( false ? undefined : _typeof(module)) === "object"; - var runtime = global.regeneratorRuntime; - - if (runtime) { - if (inModule) { - module.exports = runtime; - } - - return; - } - - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; @@ -12288,7 +12260,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return generator; } - runtime.wrap = wrap; + exports.wrap = wrap; function tryCatch(fn, obj, arg) { try { @@ -12342,12 +12314,12 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat }); } - runtime.isGeneratorFunction = function (genFun) { + exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; - runtime.mark = function (genFun) { + exports.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { @@ -12362,7 +12334,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return genFun; }; - runtime.awrap = function (arg) { + exports.awrap = function (arg) { return { __await: arg }; @@ -12416,11 +12388,11 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return this; }; - runtime.AsyncIterator = AsyncIterator; + exports.AsyncIterator = AsyncIterator; - runtime.async = function (innerFn, outerFn, self, tryLocsList) { + exports.async = function (innerFn, outerFn, self, tryLocsList) { var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; @@ -12498,7 +12470,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat context.delegate = null; if (context.method === "throw") { - if (delegate.iterator.return) { + if (delegate.iterator["return"]) { context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); @@ -12592,7 +12564,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat this.reset(true); } - runtime.keys = function (object) { + exports.keys = function (object) { var keys = []; for (var key in object) { @@ -12653,7 +12625,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat }; } - runtime.values = values; + exports.values = values; function doneResult() { return { @@ -12831,9 +12803,14 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return ContinueSentinel; } }; -}(function () { - return this || (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self; -}() || Function("return this")()); + return exports; +}(( false ? undefined : _typeof(module)) === "object" ? module.exports : {}); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + Function("r", "regeneratorRuntime = r")(runtime); +} /* WEBPACK VAR INJECTION */}.call(this, __w_pdfjs_require__(150)(module))) /***/ }), @@ -12879,11 +12856,23 @@ Object.defineProperty(exports, "__esModule", { }); exports.addLinkAttributes = addLinkAttributes; exports.getFilenameFromUrl = getFilenameFromUrl; +exports.isFetchSupported = isFetchSupported; +exports.isValidFetchUrl = isValidFetchUrl; exports.loadScript = loadScript; -exports.DummyStatTimer = exports.StatTimer = exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.LinkTarget = exports.RenderingCancelledException = exports.PageViewport = void 0; +exports.deprecated = deprecated; +exports.releaseImageResources = releaseImageResources; +exports.PDFDateString = exports.DummyStatTimer = exports.StatTimer = exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.LinkTarget = exports.RenderingCancelledException = exports.PageViewport = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } @@ -12905,7 +12894,7 @@ function () { key: "create", value: function create(width, height) { if (width <= 0 || height <= 0) { - throw new Error('invalid canvas size'); + throw new Error('Invalid canvas size'); } var canvas = document.createElement('canvas'); @@ -12921,11 +12910,11 @@ function () { key: "reset", value: function reset(canvasAndContext, width, height) { if (!canvasAndContext.canvas) { - throw new Error('canvas is not specified'); + throw new Error('Canvas is not specified'); } if (width <= 0 || height <= 0) { - throw new Error('invalid canvas size'); + throw new Error('Invalid canvas size'); } canvasAndContext.canvas.width = width; @@ -12935,7 +12924,7 @@ function () { key: "destroy", value: function destroy(canvasAndContext) { if (!canvasAndContext.canvas) { - throw new Error('canvas is not specified'); + throw new Error('Canvas is not specified'); } canvasAndContext.canvas.width = 0; @@ -12967,58 +12956,172 @@ function () { _createClass(DOMCMapReaderFactory, [{ key: "fetch", - value: function fetch(_ref2) { - var _this = this; - - var name = _ref2.name; - - if (!this.baseUrl) { - return Promise.reject(new Error('The CMap "baseUrl" parameter must be specified, ensure that ' + 'the "cMapUrl" and "cMapPacked" API parameters are provided.')); + value: function (_fetch) { + function fetch(_x) { + return _fetch.apply(this, arguments); } - if (!name) { - return Promise.reject(new Error('CMap name must be specified.')); - } + fetch.toString = function () { + return _fetch.toString(); + }; - return new Promise(function (resolve, reject) { - var url = _this.baseUrl + name + (_this.isCompressed ? '.bcmap' : ''); - var request = new XMLHttpRequest(); - request.open('GET', url, true); + return fetch; + }( + /*#__PURE__*/ + function () { + var _ref3 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee2(_ref2) { + var _this = this; - if (_this.isCompressed) { - request.responseType = 'arraybuffer'; - } + var name, url, compressionType; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + name = _ref2.name; - request.onreadystatechange = function () { - if (request.readyState !== XMLHttpRequest.DONE) { - return; - } + if (this.baseUrl) { + _context2.next = 3; + break; + } - if (request.status === 200 || request.status === 0) { - var data; + throw new Error('The CMap "baseUrl" parameter must be specified, ensure that ' + 'the "cMapUrl" and "cMapPacked" API parameters are provided.'); - if (_this.isCompressed && request.response) { - data = new Uint8Array(request.response); - } else if (!_this.isCompressed && request.responseText) { - data = (0, _util.stringToBytes)(request.responseText); - } + case 3: + if (name) { + _context2.next = 5; + break; + } - if (data) { - resolve({ - cMapData: data, - compressionType: _this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE - }); - return; - } - } + throw new Error('CMap name must be specified.'); - reject(new Error('Unable to load ' + (_this.isCompressed ? 'binary ' : '') + 'CMap at: ' + url)); - }; + case 5: + url = this.baseUrl + name + (this.isCompressed ? '.bcmap' : ''); + compressionType = this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE; - request.send(null); - }); - } - }]); + if (!(isFetchSupported() && isValidFetchUrl(url, document.baseURI))) { + _context2.next = 9; + break; + } + + return _context2.abrupt("return", fetch(url).then( + /*#__PURE__*/ + function () { + var _ref4 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee(response) { + var cMapData; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (response.ok) { + _context.next = 2; + break; + } + + throw new Error(response.statusText); + + case 2: + if (!_this.isCompressed) { + _context.next = 10; + break; + } + + _context.t0 = Uint8Array; + _context.next = 6; + return response.arrayBuffer(); + + case 6: + _context.t1 = _context.sent; + cMapData = new _context.t0(_context.t1); + _context.next = 15; + break; + + case 10: + _context.t2 = _util.stringToBytes; + _context.next = 13; + return response.text(); + + case 13: + _context.t3 = _context.sent; + cMapData = (0, _context.t2)(_context.t3); + + case 15: + return _context.abrupt("return", { + cMapData: cMapData, + compressionType: compressionType + }); + + case 16: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x3) { + return _ref4.apply(this, arguments); + }; + }())["catch"](function (reason) { + throw new Error("Unable to load ".concat(_this.isCompressed ? 'binary ' : '') + "CMap at: ".concat(url)); + })); + + case 9: + return _context2.abrupt("return", new Promise(function (resolve, reject) { + var request = new XMLHttpRequest(); + request.open('GET', url, true); + + if (_this.isCompressed) { + request.responseType = 'arraybuffer'; + } + + request.onreadystatechange = function () { + if (request.readyState !== XMLHttpRequest.DONE) { + return; + } + + if (request.status === 200 || request.status === 0) { + var cMapData; + + if (_this.isCompressed && request.response) { + cMapData = new Uint8Array(request.response); + } else if (!_this.isCompressed && request.responseText) { + cMapData = (0, _util.stringToBytes)(request.responseText); + } + + if (cMapData) { + resolve({ + cMapData: cMapData, + compressionType: compressionType + }); + return; + } + } + + reject(new Error(request.statusText)); + }; + + request.send(null); + })["catch"](function (reason) { + throw new Error("Unable to load ".concat(_this.isCompressed ? 'binary ' : '') + "CMap at: ".concat(url)); + })); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function (_x2) { + return _ref3.apply(this, arguments); + }; + }()) + }]); return DOMCMapReaderFactory; }(); @@ -13060,16 +13163,16 @@ exports.DOMSVGFactory = DOMSVGFactory; var PageViewport = /*#__PURE__*/ function () { - function PageViewport(_ref3) { - var viewBox = _ref3.viewBox, - scale = _ref3.scale, - rotation = _ref3.rotation, - _ref3$offsetX = _ref3.offsetX, - offsetX = _ref3$offsetX === void 0 ? 0 : _ref3$offsetX, - _ref3$offsetY = _ref3.offsetY, - offsetY = _ref3$offsetY === void 0 ? 0 : _ref3$offsetY, - _ref3$dontFlip = _ref3.dontFlip, - dontFlip = _ref3$dontFlip === void 0 ? false : _ref3$dontFlip; + function PageViewport(_ref5) { + var viewBox = _ref5.viewBox, + scale = _ref5.scale, + rotation = _ref5.rotation, + _ref5$offsetX = _ref5.offsetX, + offsetX = _ref5$offsetX === void 0 ? 0 : _ref5$offsetX, + _ref5$offsetY = _ref5.offsetY, + offsetY = _ref5$offsetY === void 0 ? 0 : _ref5$offsetY, + _ref5$dontFlip = _ref5.dontFlip, + dontFlip = _ref5$dontFlip === void 0 ? false : _ref5$dontFlip; _classCallCheck(this, PageViewport); @@ -13142,13 +13245,13 @@ function () { _createClass(PageViewport, [{ key: "clone", value: function clone() { - var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref4$scale = _ref4.scale, - scale = _ref4$scale === void 0 ? this.scale : _ref4$scale, - _ref4$rotation = _ref4.rotation, - rotation = _ref4$rotation === void 0 ? this.rotation : _ref4$rotation, - _ref4$dontFlip = _ref4.dontFlip, - dontFlip = _ref4$dontFlip === void 0 ? false : _ref4$dontFlip; + var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref6$scale = _ref6.scale, + scale = _ref6$scale === void 0 ? this.scale : _ref6$scale, + _ref6$rotation = _ref6.rotation, + rotation = _ref6$rotation === void 0 ? this.rotation : _ref6$rotation, + _ref6$dontFlip = _ref6.dontFlip, + dontFlip = _ref6$dontFlip === void 0 ? false : _ref6$dontFlip; return new PageViewport({ viewBox: this.viewBox.slice(), @@ -13167,11 +13270,11 @@ function () { }, { key: "convertToViewportRectangle", value: function convertToViewportRectangle(rect) { - var tl = _util.Util.applyTransform([rect[0], rect[1]], this.transform); + var topLeft = _util.Util.applyTransform([rect[0], rect[1]], this.transform); - var br = _util.Util.applyTransform([rect[2], rect[3]], this.transform); + var bottomRight = _util.Util.applyTransform([rect[2], rect[3]], this.transform); - return [tl[0], tl[1], br[0], br[1]]; + return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]]; } }, { key: "convertToPdfPoint", @@ -13209,10 +13312,10 @@ exports.LinkTarget = LinkTarget; var LinkTargetStringMap = ['', '_self', '_blank', '_parent', '_top']; function addLinkAttributes(link) { - var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - url = _ref5.url, - target = _ref5.target, - rel = _ref5.rel; + var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + url = _ref7.url, + target = _ref7.target, + rel = _ref7.rel; link.href = link.title = url ? (0, _util.removeNullCharacters)(url) : ''; @@ -13278,22 +13381,59 @@ function () { }, { key: "toString", value: function toString() { - var times = this.times; var out = '', longest = 0; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - for (var i = 0, ii = times.length; i < ii; ++i) { - var name = times[i]['name']; + try { + for (var _iterator = this.times[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var time = _step.value; + var name = time.name; - if (name.length > longest) { - longest = name.length; + if (name.length > longest) { + longest = name.length; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } } } - for (var _i = 0, _ii = times.length; _i < _ii; ++_i) { - var span = times[_i]; - var duration = span.end - span.start; - out += "".concat(span['name'].padEnd(longest), " ").concat(duration, "ms\n"); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = this.times[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var _time = _step2.value; + var duration = _time.end - _time.start; + out += "".concat(_time.name.padEnd(longest), " ").concat(duration, "ms\n"); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { + _iterator2["return"](); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } } return out; @@ -13332,6 +13472,21 @@ function () { exports.DummyStatTimer = DummyStatTimer; +function isFetchSupported() { + return typeof fetch !== 'undefined' && typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream !== 'undefined'; +} + +function isValidFetchUrl(url, baseUrl) { + try { + var _ref8 = baseUrl ? new _util.URL(url, baseUrl) : new _util.URL(url), + protocol = _ref8.protocol; + + return protocol === 'http:' || protocol === 'https:'; + } catch (ex) { + return false; + } +} + function loadScript(src) { return new Promise(function (resolve, reject) { var script = document.createElement('script'); @@ -13346,6 +13501,81 @@ function loadScript(src) { }); } +function deprecated(details) { + console.log('Deprecated API usage: ' + details); +} + +function releaseImageResources(img) { + (0, _util.assert)(img instanceof Image, 'Invalid `img` parameter.'); + var url = img.src; + + if (typeof url === 'string' && url.startsWith('blob:') && _util.URL.revokeObjectURL) { + _util.URL.revokeObjectURL(url); + } + + img.removeAttribute('src'); +} + +var pdfDateStringRegex; + +var PDFDateString = +/*#__PURE__*/ +function () { + function PDFDateString() { + _classCallCheck(this, PDFDateString); + } + + _createClass(PDFDateString, null, [{ + key: "toDateObject", + value: function toDateObject(input) { + if (!input || !(0, _util.isString)(input)) { + return null; + } + + if (!pdfDateStringRegex) { + pdfDateStringRegex = new RegExp('^D:' + '(\\d{4})' + '(\\d{2})?' + '(\\d{2})?' + '(\\d{2})?' + '(\\d{2})?' + '(\\d{2})?' + '([Z|+|-])?' + '(\\d{2})?' + '\'?' + '(\\d{2})?' + '\'?'); + } + + var matches = pdfDateStringRegex.exec(input); + + if (!matches) { + return null; + } + + var year = parseInt(matches[1], 10); + var month = parseInt(matches[2], 10); + month = month >= 1 && month <= 12 ? month - 1 : 0; + var day = parseInt(matches[3], 10); + day = day >= 1 && day <= 31 ? day : 1; + var hour = parseInt(matches[4], 10); + hour = hour >= 0 && hour <= 23 ? hour : 0; + var minute = parseInt(matches[5], 10); + minute = minute >= 0 && minute <= 59 ? minute : 0; + var second = parseInt(matches[6], 10); + second = second >= 0 && second <= 59 ? second : 0; + var universalTimeRelation = matches[7] || 'Z'; + var offsetHour = parseInt(matches[8], 10); + offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0; + var offsetMinute = parseInt(matches[9], 10) || 0; + offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0; + + if (universalTimeRelation === '-') { + hour += offsetHour; + minute += offsetMinute; + } else if (universalTimeRelation === '+') { + hour -= offsetHour; + minute -= offsetMinute; + } + + return new Date(Date.UTC(year, month, day, hour, minute, second)); + } + }]); + + return PDFDateString; +}(); + +exports.PDFDateString = PDFDateString; + /***/ }), /* 152 */ /***/ (function(module, exports, __w_pdfjs_require__) { @@ -13358,11 +13588,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.FontLoader = exports.FontFaceObject = void 0; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -13429,7 +13659,7 @@ function () { key: "clear", value: function clear() { this.nativeFontFaces.forEach(function (nativeFontFace) { - document.fonts.delete(nativeFontFace); + document.fonts["delete"](nativeFontFace); }); this.nativeFontFaces.length = 0; @@ -13443,11 +13673,11 @@ function () { value: function () { var _bind = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(font) { + _regenerator["default"].mark(function _callee(font) { var _this = this; var nativeFontFace, rule; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -13456,7 +13686,7 @@ function () { break; } - return _context.abrupt("return"); + return _context.abrupt("return", undefined); case 2: font.attached = true; @@ -13495,7 +13725,7 @@ function () { throw _context.t0; case 18: - return _context.abrupt("return"); + return _context.abrupt("return", undefined); case 19: rule = font.createFontFaceRule(); @@ -13512,7 +13742,7 @@ function () { break; } - return _context.abrupt("return"); + return _context.abrupt("return", undefined); case 24: return _context.abrupt("return", new Promise(function (resolve) { @@ -13522,6 +13752,9 @@ function () { })); case 25: + return _context.abrupt("return", undefined); + + case 26: case "end": return _context.stop(); } @@ -14207,7 +14440,10 @@ function compileType3Glyph(imgData) { coords.push(p % width1); coords.push(p / width1 | 0); - --count; + + if (!points[p]) { + --count; + } } while (p0 !== p); outlines.push(coords); @@ -14651,16 +14887,32 @@ var CanvasGraphics = function CanvasGraphicsClosure() { if (fnId !== _util.OPS.dependency) { this[fnId].apply(this, argsArray[i]); } else { - var deps = argsArray[i]; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - for (var n = 0, nn = deps.length; n < nn; n++) { - var depObjId = deps[n]; - var common = depObjId[0] === 'g' && depObjId[1] === '_'; - var objsPool = common ? commonObjs : objs; + try { + for (var _iterator = argsArray[i][Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var depObjId = _step.value; + var objsPool = depObjId.startsWith('g_') ? commonObjs : objs; - if (!objsPool.has(depObjId)) { - objsPool.get(depObjId, continueCallback); - return i; + if (!objsPool.has(depObjId)) { + objsPool.get(depObjId, continueCallback); + return i; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } } } } @@ -14725,8 +14977,8 @@ var CanvasGraphics = function CanvasGraphicsClosure() { ctx.lineDashOffset = dashPhase; } }, - setRenderingIntent: function CanvasGraphics_setRenderingIntent(intent) {}, - setFlatness: function CanvasGraphics_setFlatness(flatness) {}, + setRenderingIntent: function setRenderingIntent(intent) {}, + setFlatness: function setFlatness(flatness) {}, setGState: function CanvasGraphics_setGState(states) { for (var i = 0, ii = states.length; i < ii; i++) { var state = states[i]; @@ -15207,7 +15459,9 @@ var CanvasGraphics = function CanvasGraphicsClosure() { }, get isFontSubpixelAAEnabled() { - var ctx = this.canvasFactory.create(10, 10).context; + var _this$cachedCanvases$ = this.cachedCanvases.getCanvas('isFontSubpixelAAEnabled', 10, 10), + ctx = _this$cachedCanvases$.context; + ctx.scale(1.5, 1); ctx.fillText('I', 0, 10); var data = ctx.getImageData(0, 0, 10, 10).data; @@ -15234,7 +15488,7 @@ var CanvasGraphics = function CanvasGraphicsClosure() { var fontSize = current.fontSize; if (fontSize === 0) { - return; + return undefined; } var ctx = this.ctx; @@ -15660,7 +15914,7 @@ var CanvasGraphics = function CanvasGraphicsClosure() { this.restore(); }, paintJpegXObject: function CanvasGraphics_paintJpegXObject(objId, w, h) { - var domImage = this.objs.get(objId); + var domImage = this.processingType3 ? this.commonObjs.get(objId) : this.objs.get(objId); if (!domImage) { (0, _util.warn)('Dependent image isn\'t ready yet'); @@ -15769,7 +16023,7 @@ var CanvasGraphics = function CanvasGraphicsClosure() { } }, paintImageXObject: function CanvasGraphics_paintImageXObject(objId) { - var imgData = this.objs.get(objId); + var imgData = this.processingType3 ? this.commonObjs.get(objId) : this.objs.get(objId); if (!imgData) { (0, _util.warn)('Dependent image isn\'t ready yet'); @@ -15779,7 +16033,7 @@ var CanvasGraphics = function CanvasGraphicsClosure() { this.paintInlineImageXObject(imgData); }, paintImageXObjectRepeat: function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY, positions) { - var imgData = this.objs.get(objId); + var imgData = this.processingType3 ? this.commonObjs.get(objId) : this.objs.get(objId); if (!imgData) { (0, _util.warn)('Dependent image isn\'t ready yet'); @@ -16296,42 +16550,42 @@ var TilingPattern = function TilingPatternClosure() { y0 = bbox[1], x1 = bbox[2], y1 = bbox[3]; - var topLeft = [x0, y0]; - var botRight = [x0 + xstep, y0 + ystep]; - var width = botRight[0] - topLeft[0]; - var height = botRight[1] - topLeft[1]; var matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix); var curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform); var combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]]; - width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])), MAX_PATTERN_SIZE); - height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])), MAX_PATTERN_SIZE); - var tmpCanvas = owner.cachedCanvases.getCanvas('pattern', width, height, true); + var dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]); + var dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]); + var tmpCanvas = owner.cachedCanvases.getCanvas('pattern', dimx.size, dimy.size, true); var tmpCtx = tmpCanvas.context; var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx); graphics.groupLevel = owner.groupLevel; this.setFillAndStrokeStyleToContext(graphics, paintType, color); - this.setScale(width, height, xstep, ystep); - this.transformToScale(graphics); - var tmpTranslate = [1, 0, 0, 1, -topLeft[0], -topLeft[1]]; - graphics.transform.apply(graphics, tmpTranslate); + graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0); + graphics.transform(1, 0, 0, 1, -x0, -y0); this.clipBbox(graphics, bbox, x0, y0, x1, y1); graphics.executeOperatorList(operatorList); + this.ctx.transform(1, 0, 0, 1, x0, y0); + this.ctx.scale(1 / dimx.scale, 1 / dimy.scale); return tmpCanvas.canvas; }, - setScale: function TilingPattern_setScale(width, height, xstep, ystep) { - this.scale = [width / xstep, height / ystep]; - }, - transformToScale: function TilingPattern_transformToScale(graphics) { - var scale = this.scale; - var tmpScale = [scale[0], 0, 0, scale[1], 0, 0]; - graphics.transform.apply(graphics, tmpScale); - }, - scaleToContext: function TilingPattern_scaleToContext() { - var scale = this.scale; - this.ctx.scale(1 / scale[0], 1 / scale[1]); + getSizeAndScale: function TilingPattern_getSizeAndScale(step, realOutputSize, scale) { + step = Math.abs(step); + var maxSize = Math.max(MAX_PATTERN_SIZE, realOutputSize); + var size = Math.ceil(step * scale); + + if (size >= maxSize) { + size = maxSize; + } else { + scale = size / step; + } + + return { + scale: scale, + size: size + }; }, clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) { if (Array.isArray(bbox) && bbox.length === 4) { @@ -16369,11 +16623,10 @@ var TilingPattern = function TilingPatternClosure() { } }, getPattern: function TilingPattern_getPattern(ctx, owner) { - var temporaryPatternCanvas = this.createPatternCanvas(owner); ctx = this.ctx; ctx.setTransform.apply(ctx, this.baseTransform); ctx.transform.apply(ctx, this.matrix); - this.scaleToContext(); + var temporaryPatternCanvas = this.createPatternCanvas(owner); return ctx.createPattern(temporaryPatternCanvas, 'repeat'); } }; @@ -16410,11 +16663,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.MessageHandler = MessageHandler; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -16429,10 +16682,10 @@ function resolveCall(_x, _x2) { function _resolveCall() { _resolveCall = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(fn, args) { + _regenerator["default"].mark(function _callee(fn, args) { var thisArg, _args = arguments; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -16443,7 +16696,7 @@ function _resolveCall() { break; } - return _context.abrupt("return"); + return _context.abrupt("return", undefined); case 3: return _context.abrupt("return", fn.apply(thisArg, args)); @@ -16453,7 +16706,7 @@ function _resolveCall() { return _context.stop(); } } - }, _callee, this); + }, _callee); })); return _resolveCall.apply(this, arguments); } @@ -16495,7 +16748,7 @@ function resolveOrReject(capability, success, reason) { } function finalize(promise) { - return Promise.resolve(promise).catch(function () {}); + return Promise.resolve(promise)["catch"](function () {}); } function MessageHandler(sourceName, targetName, comObj) { @@ -17588,7 +17841,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFDataTransportStream = void 0; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); @@ -17598,12 +17851,23 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -var PDFDataTransportStream = function PDFDataTransportStreamClosure() { +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PDFDataTransportStream = +/*#__PURE__*/ +function () { function PDFDataTransportStream(params, pdfDataRangeTransport) { var _this = this; + _classCallCheck(this, PDFDataTransportStream); + (0, _util.assert)(pdfDataRangeTransport); this._queuedChunks = []; + this._progressiveDone = params.progressiveDone || false; var initialData = params.initialData; if (initialData && initialData.length > 0) { @@ -17626,9 +17890,10 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { }); }); - this._pdfDataRangeTransport.addProgressListener(function (loaded) { + this._pdfDataRangeTransport.addProgressListener(function (loaded, total) { _this._onProgress({ - loaded: loaded + loaded: loaded, + total: total }); }); @@ -17638,11 +17903,16 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { }); }); + this._pdfDataRangeTransport.addProgressiveDoneListener(function () { + _this._onProgressiveDone(); + }); + this._pdfDataRangeTransport.transportReady(); } - PDFDataTransportStream.prototype = { - _onReceiveData: function PDFDataTransportStream_onReceiveData(args) { + _createClass(PDFDataTransportStream, [{ + key: "_onReceiveData", + value: function _onReceiveData(args) { var buffer = new Uint8Array(args.chunk).buffer; if (args.begin === undefined) { @@ -17664,32 +17934,62 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { (0, _util.assert)(found); } - }, - _onProgress: function PDFDataTransportStream_onDataProgress(evt) { - if (this._rangeReaders.length > 0) { + } + }, { + key: "_onProgress", + value: function _onProgress(evt) { + if (evt.total === undefined) { var firstReader = this._rangeReaders[0]; - if (firstReader.onProgress) { + if (firstReader && firstReader.onProgress) { firstReader.onProgress({ loaded: evt.loaded }); } + } else { + var fullReader = this._fullRequestReader; + + if (fullReader && fullReader.onProgress) { + fullReader.onProgress({ + loaded: evt.loaded, + total: evt.total + }); + } } - }, - _removeRangeReader: function PDFDataTransportStream_removeRangeReader(reader) { + } + }, { + key: "_onProgressiveDone", + value: function _onProgressiveDone() { + if (this._fullRequestReader) { + this._fullRequestReader.progressiveDone(); + } + + this._progressiveDone = true; + } + }, { + key: "_removeRangeReader", + value: function _removeRangeReader(reader) { var i = this._rangeReaders.indexOf(reader); if (i >= 0) { this._rangeReaders.splice(i, 1); } - }, - getFullReader: function PDFDataTransportStream_getFullReader() { + } + }, { + key: "getFullReader", + value: function getFullReader() { (0, _util.assert)(!this._fullRequestReader); var queuedChunks = this._queuedChunks; this._queuedChunks = null; - return new PDFDataTransportStreamReader(this, queuedChunks); - }, - getRangeReader: function PDFDataTransportStream_getRangeReader(begin, end) { + return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone); + } + }, { + key: "getRangeReader", + value: function getRangeReader(begin, end) { + if (end <= this._progressiveDataLength) { + return null; + } + var reader = new PDFDataTransportStreamRangeReader(this, begin, end); this._pdfDataRangeTransport.requestDataRange(begin, end); @@ -17697,8 +17997,10 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { this._rangeReaders.push(reader); return reader; - }, - cancelAllRequests: function PDFDataTransportStream_cancelAllRequests(reason) { + } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { if (this._fullRequestReader) { this._fullRequestReader.cancel(reason); } @@ -17711,21 +18013,64 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { this._pdfDataRangeTransport.abort(); } - }; + }, { + key: "_progressiveDataLength", + get: function get() { + return this._fullRequestReader ? this._fullRequestReader._loaded : 0; + } + }]); + + return PDFDataTransportStream; +}(); +exports.PDFDataTransportStream = PDFDataTransportStream; + +var PDFDataTransportStreamReader = +/*#__PURE__*/ +function () { function PDFDataTransportStreamReader(stream, queuedChunks) { + var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + _classCallCheck(this, PDFDataTransportStreamReader); + this._stream = stream; - this._done = false; + this._done = progressiveDone || false; this._filename = null; this._queuedChunks = queuedChunks || []; + this._loaded = 0; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = this._queuedChunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var chunk = _step.value; + this._loaded += chunk.byteLength; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + this._requests = []; this._headersReady = Promise.resolve(); stream._fullRequestReader = this; this.onProgress = null; } - PDFDataTransportStreamReader.prototype = { - _enqueue: function PDFDataTransportStreamReader_enqueue(chunk) { + _createClass(PDFDataTransportStreamReader, [{ + key: "_enqueue", + value: function _enqueue(chunk) { if (this._done) { return; } @@ -17737,38 +18082,20 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { value: chunk, done: false }); - return; + } else { + this._queuedChunks.push(chunk); } - this._queuedChunks.push(chunk); - }, - - get headersReady() { - return this._headersReady; - }, - - get filename() { - return this._filename; - }, - - get isRangeSupported() { - return this._stream._isRangeSupported; - }, - - get isStreamingSupported() { - return this._stream._isStreamingSupported; - }, - - get contentLength() { - return this._stream._contentLength; - }, - - read: function () { + this._loaded += chunk.byteLength; + } + }, { + key: "read", + value: function () { var _read = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { + _regenerator["default"].mark(function _callee() { var chunk, requestCapability; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -17814,8 +18141,10 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { } return read; - }(), - cancel: function PDFDataTransportStreamReader_cancel(reason) { + }() + }, { + key: "cancel", + value: function cancel(reason) { this._done = true; this._requests.forEach(function (requestCapability) { @@ -17827,59 +18156,99 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { this._requests = []; } - }; - - function PDFDataTransportStreamRangeReader(stream, begin, end) { - this._stream = stream; - this._begin = begin; - this._end = end; - this._queuedChunk = null; - this._requests = []; - this._done = false; - this.onProgress = null; - } - - PDFDataTransportStreamRangeReader.prototype = { - _enqueue: function PDFDataTransportStreamRangeReader_enqueue(chunk) { + }, { + key: "progressiveDone", + value: function progressiveDone() { if (this._done) { return; } - if (this._requests.length === 0) { - this._queuedChunk = chunk; - } else { - var requestsCapability = this._requests.shift(); - - requestsCapability.resolve({ - value: chunk, - done: false - }); - - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - - this._requests = []; - } - this._done = true; + } + }, { + key: "headersReady", + get: function get() { + return this._headersReady; + } + }, { + key: "filename", + get: function get() { + return this._filename; + } + }, { + key: "isRangeSupported", + get: function get() { + return this._stream._isRangeSupported; + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._stream._isStreamingSupported; + } + }, { + key: "contentLength", + get: function get() { + return this._stream._contentLength; + } + }]); - this._stream._removeRangeReader(this); - }, - - get isStreamingSupported() { - return false; - }, + return PDFDataTransportStreamReader; +}(); + +var PDFDataTransportStreamRangeReader = +/*#__PURE__*/ +function () { + function PDFDataTransportStreamRangeReader(stream, begin, end) { + _classCallCheck(this, PDFDataTransportStreamRangeReader); + + this._stream = stream; + this._begin = begin; + this._end = end; + this._queuedChunk = null; + this._requests = []; + this._done = false; + this.onProgress = null; + } + + _createClass(PDFDataTransportStreamRangeReader, [{ + key: "_enqueue", + value: function _enqueue(chunk) { + if (this._done) { + return; + } + + if (this._requests.length === 0) { + this._queuedChunk = chunk; + } else { + var requestsCapability = this._requests.shift(); + + requestsCapability.resolve({ + value: chunk, + done: false + }); + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + } + + this._done = true; - read: function () { + this._stream._removeRangeReader(this); + } + }, { + key: "read", + value: function () { var _read2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { + _regenerator["default"].mark(function _callee2() { var chunk, requestCapability; - return _regenerator.default.wrap(function _callee2$(_context2) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -17926,8 +18295,10 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { } return read; - }(), - cancel: function PDFDataTransportStreamRangeReader_cancel(reason) { + }() + }, { + key: "cancel", + value: function cancel(reason) { this._done = true; this._requests.forEach(function (requestCapability) { @@ -17941,11 +18312,15 @@ var PDFDataTransportStream = function PDFDataTransportStreamClosure() { this._stream._removeRangeReader(this); } - }; - return PDFDataTransportStream; -}(); + }, { + key: "isStreamingSupported", + get: function get() { + return false; + } + }]); -exports.PDFDataTransportStream = PDFDataTransportStream; + return PDFDataTransportStreamRangeReader; +}(); /***/ }), /* 161 */ @@ -18423,7 +18798,7 @@ var _util = __w_pdfjs_require__(1); var _global_scope = _interopRequireDefault(__w_pdfjs_require__(3)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var renderTextLayer = function renderTextLayerClosure() { var MAX_TEXT_DIVS_TO_RENDER = 100000; @@ -18842,6 +19217,8 @@ var renderTextLayer = function renderTextLayerClosure() { } function TextLayerRenderTask(_ref) { + var _this = this; + var textContent = _ref.textContent, textContentStream = _ref.textContentStream, container = _ref.container, @@ -18856,7 +19233,7 @@ var renderTextLayer = function renderTextLayerClosure() { this._textDivs = textDivs || []; this._textContentItemsStr = textContentItemsStr || []; this._enhanceTextSelection = !!enhanceTextSelection; - this._fontInspectorEnabled = !!(_global_scope.default.FontInspector && _global_scope.default.FontInspector.enabled); + this._fontInspectorEnabled = !!(_global_scope["default"].FontInspector && _global_scope["default"].FontInspector.enabled); this._reader = null; this._layoutTextLastFontSize = null; this._layoutTextLastFontFamily = null; @@ -18867,6 +19244,14 @@ var renderTextLayer = function renderTextLayerClosure() { this._capability = (0, _util.createPromiseCapability)(); this._renderTimer = null; this._bounds = []; + + this._capability.promise["finally"](function () { + if (_this._layoutTextCtx) { + _this._layoutTextCtx.canvas.width = 0; + _this._layoutTextCtx.canvas.height = 0; + _this._layoutTextCtx = null; + } + }); } TextLayerRenderTask.prototype = { @@ -18875,20 +19260,20 @@ var renderTextLayer = function renderTextLayerClosure() { }, cancel: function TextLayer_cancel() { + this._canceled = true; + if (this._reader) { - this._reader.cancel(new _util.AbortException('text layer task cancelled')); + this._reader.cancel(new _util.AbortException('TextLayer task cancelled.')); this._reader = null; } - this._canceled = true; - if (this._renderTimer !== null) { clearTimeout(this._renderTimer); this._renderTimer = null; } - this._capability.reject('canceled'); + this._capability.reject(new Error('TextLayer task cancelled.')); }, _processItems: function _processItems(items, styleCache) { for (var i = 0, len = items.length; i < len; i++) { @@ -18938,7 +19323,7 @@ var renderTextLayer = function renderTextLayerClosure() { textLayerFrag.appendChild(textDiv); }, _render: function TextLayer_render(timeout) { - var _this = this; + var _this2 = this; var capability = (0, _util.createPromiseCapability)(); var styleCache = Object.create(null); @@ -18957,7 +19342,7 @@ var renderTextLayer = function renderTextLayerClosure() { capability.resolve(); } else if (this._textContentStream) { var pump = function pump() { - _this._reader.read().then(function (_ref2) { + _this2._reader.read().then(function (_ref2) { var value = _ref2.value, done = _ref2.done; @@ -18968,7 +19353,7 @@ var renderTextLayer = function renderTextLayerClosure() { Object.assign(styleCache, value.styles); - _this._processItems(value.items, styleCache); + _this2._processItems(value.items, styleCache); pump(); }, capability.reject); @@ -18984,11 +19369,11 @@ var renderTextLayer = function renderTextLayerClosure() { styleCache = null; if (!timeout) { - render(_this); + render(_this2); } else { - _this._renderTimer = setTimeout(function () { - render(_this); - _this._renderTimer = null; + _this2._renderTimer = setTimeout(function () { + render(_this2); + _this2._renderTimer = null; }, timeout); } }, this._capability.reject); @@ -19090,7 +19475,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.AnnotationLayer = void 0; -var _dom_utils = __w_pdfjs_require__(151); +var _display_utils = __w_pdfjs_require__(151); var _util = __w_pdfjs_require__(1); @@ -19160,6 +19545,9 @@ function () { case _util.AnnotationType.POPUP: return new PopupAnnotationElement(parameters); + case _util.AnnotationType.FREETEXT: + return new FreeTextAnnotationElement(parameters); + case _util.AnnotationType.LINE: return new LineAnnotationElement(parameters); @@ -19172,6 +19560,9 @@ function () { case _util.AnnotationType.POLYLINE: return new PolylineAnnotationElement(parameters); + case _util.AnnotationType.CARET: + return new CaretAnnotationElement(parameters); + case _util.AnnotationType.INK: return new InkAnnotationElement(parameters); @@ -19316,6 +19707,7 @@ function () { trigger: trigger, color: data.color, title: data.title, + modificationDate: data.modificationDate, contents: data.contents, hideWrapper: true }); @@ -19352,9 +19744,9 @@ function (_AnnotationElement) { var data = this.data, linkService = this.linkService; var link = document.createElement('a'); - (0, _dom_utils.addLinkAttributes)(link, { + (0, _display_utils.addLinkAttributes)(link, { url: data.url, - target: data.newWindow ? _dom_utils.LinkTarget.BLANK : linkService.externalLinkTarget, + target: data.newWindow ? _display_utils.LinkTarget.BLANK : linkService.externalLinkTarget, rel: linkService.externalLinkRel }); @@ -19719,6 +20111,7 @@ function (_AnnotationElement4) { trigger: parentElement, color: this.data.color, title: this.data.title, + modificationDate: this.data.modificationDate, contents: this.data.contents }); var parentLeft = parseFloat(parentElement.style.left); @@ -19743,6 +20136,7 @@ function () { this.trigger = parameters.trigger; this.color = parameters.color; this.title = parameters.title; + this.modificationDate = parameters.modificationDate; this.contents = parameters.contents; this.hideWrapper = parameters.hideWrapper || false; this.pinned = false; @@ -19767,16 +20161,30 @@ function () { popup.style.backgroundColor = _util.Util.makeCssRgb(r | 0, g | 0, b | 0); } - var contents = this._formatContents(this.contents); - var title = document.createElement('h1'); title.textContent = this.title; + popup.appendChild(title); + + var dateObject = _display_utils.PDFDateString.toDateObject(this.modificationDate); + + if (dateObject) { + var modificationDate = document.createElement('span'); + modificationDate.textContent = '{{date}}, {{time}}'; + modificationDate.dataset.l10nId = 'annotation_date_string'; + modificationDate.dataset.l10nArgs = JSON.stringify({ + date: dateObject.toLocaleDateString(), + time: dateObject.toLocaleTimeString() + }); + popup.appendChild(modificationDate); + } + + var contents = this._formatContents(this.contents); + + popup.appendChild(contents); this.trigger.addEventListener('click', this._toggle.bind(this)); this.trigger.addEventListener('mouseover', this._show.bind(this, false)); this.trigger.addEventListener('mouseout', this._hide.bind(this, false)); popup.addEventListener('click', this._hide.bind(this, true)); - popup.appendChild(title); - popup.appendChild(contents); wrapper.appendChild(popup); return wrapper; } @@ -19839,10 +20247,38 @@ function () { return PopupElement; }(); -var LineAnnotationElement = +var FreeTextAnnotationElement = /*#__PURE__*/ function (_AnnotationElement5) { - _inherits(LineAnnotationElement, _AnnotationElement5); + _inherits(FreeTextAnnotationElement, _AnnotationElement5); + + function FreeTextAnnotationElement(parameters) { + _classCallCheck(this, FreeTextAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _possibleConstructorReturn(this, _getPrototypeOf(FreeTextAnnotationElement).call(this, parameters, isRenderable, true)); + } + + _createClass(FreeTextAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = 'freeTextAnnotation'; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + }]); + + return FreeTextAnnotationElement; +}(AnnotationElement); + +var LineAnnotationElement = +/*#__PURE__*/ +function (_AnnotationElement6) { + _inherits(LineAnnotationElement, _AnnotationElement6); function LineAnnotationElement(parameters) { _classCallCheck(this, LineAnnotationElement); @@ -19880,8 +20316,8 @@ function (_AnnotationElement5) { var SquareAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement6) { - _inherits(SquareAnnotationElement, _AnnotationElement6); +function (_AnnotationElement7) { + _inherits(SquareAnnotationElement, _AnnotationElement7); function SquareAnnotationElement(parameters) { _classCallCheck(this, SquareAnnotationElement); @@ -19921,8 +20357,8 @@ function (_AnnotationElement6) { var CircleAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement7) { - _inherits(CircleAnnotationElement, _AnnotationElement7); +function (_AnnotationElement8) { + _inherits(CircleAnnotationElement, _AnnotationElement8); function CircleAnnotationElement(parameters) { _classCallCheck(this, CircleAnnotationElement); @@ -19962,8 +20398,8 @@ function (_AnnotationElement7) { var PolylineAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement8) { - _inherits(PolylineAnnotationElement, _AnnotationElement8); +function (_AnnotationElement9) { + _inherits(PolylineAnnotationElement, _AnnotationElement9); function PolylineAnnotationElement(parameters) { var _this3; @@ -20032,10 +20468,38 @@ function (_PolylineAnnotationEl) { return PolygonAnnotationElement; }(PolylineAnnotationElement); +var CaretAnnotationElement = +/*#__PURE__*/ +function (_AnnotationElement10) { + _inherits(CaretAnnotationElement, _AnnotationElement10); + + function CaretAnnotationElement(parameters) { + _classCallCheck(this, CaretAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _possibleConstructorReturn(this, _getPrototypeOf(CaretAnnotationElement).call(this, parameters, isRenderable, true)); + } + + _createClass(CaretAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = 'caretAnnotation'; + + if (!this.data.hasPopup) { + this._createPopup(this.container, null, this.data); + } + + return this.container; + } + }]); + + return CaretAnnotationElement; +}(AnnotationElement); + var InkAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement9) { - _inherits(InkAnnotationElement, _AnnotationElement9); +function (_AnnotationElement11) { + _inherits(InkAnnotationElement, _AnnotationElement11); function InkAnnotationElement(parameters) { var _this5; @@ -20092,8 +20556,8 @@ function (_AnnotationElement9) { var HighlightAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement10) { - _inherits(HighlightAnnotationElement, _AnnotationElement10); +function (_AnnotationElement12) { + _inherits(HighlightAnnotationElement, _AnnotationElement12); function HighlightAnnotationElement(parameters) { _classCallCheck(this, HighlightAnnotationElement); @@ -20120,8 +20584,8 @@ function (_AnnotationElement10) { var UnderlineAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement11) { - _inherits(UnderlineAnnotationElement, _AnnotationElement11); +function (_AnnotationElement13) { + _inherits(UnderlineAnnotationElement, _AnnotationElement13); function UnderlineAnnotationElement(parameters) { _classCallCheck(this, UnderlineAnnotationElement); @@ -20148,8 +20612,8 @@ function (_AnnotationElement11) { var SquigglyAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement12) { - _inherits(SquigglyAnnotationElement, _AnnotationElement12); +function (_AnnotationElement14) { + _inherits(SquigglyAnnotationElement, _AnnotationElement14); function SquigglyAnnotationElement(parameters) { _classCallCheck(this, SquigglyAnnotationElement); @@ -20176,8 +20640,8 @@ function (_AnnotationElement12) { var StrikeOutAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement13) { - _inherits(StrikeOutAnnotationElement, _AnnotationElement13); +function (_AnnotationElement15) { + _inherits(StrikeOutAnnotationElement, _AnnotationElement15); function StrikeOutAnnotationElement(parameters) { _classCallCheck(this, StrikeOutAnnotationElement); @@ -20204,8 +20668,8 @@ function (_AnnotationElement13) { var StampAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement14) { - _inherits(StampAnnotationElement, _AnnotationElement14); +function (_AnnotationElement16) { + _inherits(StampAnnotationElement, _AnnotationElement16); function StampAnnotationElement(parameters) { _classCallCheck(this, StampAnnotationElement); @@ -20232,8 +20696,8 @@ function (_AnnotationElement14) { var FileAttachmentAnnotationElement = /*#__PURE__*/ -function (_AnnotationElement15) { - _inherits(FileAttachmentAnnotationElement, _AnnotationElement15); +function (_AnnotationElement17) { + _inherits(FileAttachmentAnnotationElement, _AnnotationElement17); function FileAttachmentAnnotationElement(parameters) { var _this6; @@ -20244,12 +20708,12 @@ function (_AnnotationElement15) { var _this6$data$file = _this6.data.file, filename = _this6$data$file.filename, content = _this6$data$file.content; - _this6.filename = (0, _dom_utils.getFilenameFromUrl)(filename); + _this6.filename = (0, _display_utils.getFilenameFromUrl)(filename); _this6.content = content; if (_this6.linkService.eventBus) { _this6.linkService.eventBus.dispatch('fileattachmentannotation', { - source: _assertThisInitialized(_assertThisInitialized(_this6)), + source: _assertThisInitialized(_this6), id: (0, _util.stringToPDFString)(filename), filename: filename, content: content @@ -20316,7 +20780,7 @@ function () { downloadManager: parameters.downloadManager, imageResourcesPath: parameters.imageResourcesPath || '', renderInteractiveForms: parameters.renderInteractiveForms || false, - svgFactory: new _dom_utils.DOMSVGFactory() + svgFactory: new _display_utils.DOMSVGFactory() }); if (element.isRenderable) { @@ -20359,11 +20823,33 @@ exports.SVGGraphics = void 0; var _util = __w_pdfjs_require__(1); -var _dom_utils = __w_pdfjs_require__(151); +var _display_utils = __w_pdfjs_require__(151); var _is_node = _interopRequireDefault(__w_pdfjs_require__(4)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var SVGGraphics = function SVGGraphics() { throw new Error('Not implemented: SVGGraphics'); @@ -20371,13 +20857,105 @@ var SVGGraphics = function SVGGraphics() { exports.SVGGraphics = SVGGraphics; { + var opListToTree = function opListToTree(opList) { + var opTree = []; + var tmp = []; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = opList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var opListElement = _step.value; + + if (opListElement.fn === 'save') { + opTree.push({ + 'fnId': 92, + 'fn': 'group', + 'items': [] + }); + tmp.push(opTree); + opTree = opTree[opTree.length - 1].items; + continue; + } + + if (opListElement.fn === 'restore') { + opTree = tmp.pop(); + } else { + opTree.push(opListElement); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return opTree; + }; + + var pf = function pf(value) { + if (Number.isInteger(value)) { + return value.toString(); + } + + var s = value.toFixed(10); + var i = s.length - 1; + + if (s[i] !== '0') { + return s; + } + + do { + i--; + } while (s[i] === '0'); + + return s.substring(0, s[i] === '.' ? i : i + 1); + }; + + var pm = function pm(m) { + if (m[4] === 0 && m[5] === 0) { + if (m[1] === 0 && m[2] === 0) { + if (m[0] === 1 && m[3] === 1) { + return ''; + } + + return "scale(".concat(pf(m[0]), " ").concat(pf(m[3]), ")"); + } + + if (m[0] === m[3] && m[1] === -m[2]) { + var a = Math.acos(m[0]) * 180 / Math.PI; + return "rotate(".concat(pf(a), ")"); + } + } else { + if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) { + return "translate(".concat(pf(m[4]), " ").concat(pf(m[5]), ")"); + } + } + + return "matrix(".concat(pf(m[0]), " ").concat(pf(m[1]), " ").concat(pf(m[2]), " ").concat(pf(m[3]), " ").concat(pf(m[4]), " ") + "".concat(pf(m[5]), ")"); + }; + var SVG_DEFAULTS = { fontStyle: 'normal', fontWeight: 'normal', fillColor: '#000000' }; + var XML_NS = 'http://www.w3.org/XML/1998/namespace'; + var XLINK_NS = 'http://www.w3.org/1999/xlink'; + var LINE_CAP_STYLES = ['butt', 'round', 'square']; + var LINE_JOIN_STYLES = ['miter', 'round', 'bevel']; - var convertImgDataToPng = function convertImgDataToPngClosure() { + var convertImgDataToPng = function () { var PNG_HEADER = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]); var CHUNK_WRAPPER_SIZE = 12; var crcTable = new Int32Array(256); @@ -20399,8 +20977,8 @@ exports.SVGGraphics = SVGGraphics; function crc32(data, start, end) { var crc = -1; - for (var i = start; i < end; i++) { - var a = (crc ^ data[i]) & 0xff; + for (var _i = start; _i < end; _i++) { + var a = (crc ^ data[_i]) & 0xff; var b = crcTable[a]; crc = crc >>> 8 ^ b; } @@ -20434,8 +21012,8 @@ exports.SVGGraphics = SVGGraphics; var a = 1; var b = 0; - for (var i = start; i < end; ++i) { - a = (a + (data[i] & 0xff)) % 65521; + for (var _i2 = start; _i2 < end; ++_i2) { + a = (a + (data[_i2] & 0xff)) % 65521; b = (b + a) % 65521; } @@ -20443,7 +21021,7 @@ exports.SVGGraphics = SVGGraphics; } function deflateSync(literals) { - if (!(0, _is_node.default)()) { + if (!(0, _is_node["default"])()) { return deflateSyncUncompressed(literals); } @@ -20537,9 +21115,8 @@ exports.SVGGraphics = SVGGraphics; var literals = new Uint8Array((1 + lineSize) * height); var offsetLiterals = 0, offsetBytes = 0; - var y, i; - for (y = 0; y < height; ++y) { + for (var y = 0; y < height; ++y) { literals[offsetLiterals++] = 0; literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals); offsetBytes += lineSize; @@ -20549,10 +21126,10 @@ exports.SVGGraphics = SVGGraphics; if (kind === _util.ImageKind.GRAYSCALE_1BPP && isMask) { offsetLiterals = 0; - for (y = 0; y < height; y++) { + for (var _y = 0; _y < height; _y++) { offsetLiterals++; - for (i = 0; i < lineSize; i++) { + for (var _i3 = 0; _i3 < lineSize; _i3++) { literals[offsetLiterals++] ^= 0xFF; } } @@ -20579,8 +21156,12 @@ exports.SVGGraphics = SVGGraphics; }; }(); - var SVGExtraState = function SVGExtraStateClosure() { + var SVGExtraState = + /*#__PURE__*/ + function () { function SVGExtraState() { + _classCallCheck(this, SVGExtraState); + this.fontSizeScale = 1; this.fontWeight = SVG_DEFAULTS.fontWeight; this.fontSize = 0; @@ -20588,6 +21169,7 @@ exports.SVGGraphics = SVGGraphics; this.fontMatrix = _util.FONT_IDENTITY_MATRIX; this.leading = 0; this.textRenderingMode = _util.TextRenderingMode.FILL; + this.textMatrixScale = 1; this.x = 0; this.y = 0; this.lineX = 0; @@ -20612,90 +21194,33 @@ exports.SVGGraphics = SVGGraphics; this.maskId = ''; } - SVGExtraState.prototype = { - clone: function SVGExtraState_clone() { + _createClass(SVGExtraState, [{ + key: "clone", + value: function clone() { return Object.create(this); - }, - setCurrentPoint: function SVGExtraState_setCurrentPoint(x, y) { + } + }, { + key: "setCurrentPoint", + value: function setCurrentPoint(x, y) { this.x = x; this.y = y; } - }; + }]); + return SVGExtraState; }(); - exports.SVGGraphics = SVGGraphics = function SVGGraphicsClosure() { - function opListToTree(opList) { - var opTree = []; - var tmp = []; - var opListLen = opList.length; - - for (var x = 0; x < opListLen; x++) { - if (opList[x].fn === 'save') { - opTree.push({ - 'fnId': 92, - 'fn': 'group', - 'items': [] - }); - tmp.push(opTree); - opTree = opTree[opTree.length - 1].items; - continue; - } - - if (opList[x].fn === 'restore') { - opTree = tmp.pop(); - } else { - opTree.push(opList[x]); - } - } - - return opTree; - } - - function pf(value) { - if (Number.isInteger(value)) { - return value.toString(); - } - - var s = value.toFixed(10); - var i = s.length - 1; - - if (s[i] !== '0') { - return s; - } - - do { - i--; - } while (s[i] === '0'); - - return s.substring(0, s[i] === '.' ? i : i + 1); - } - - function pm(m) { - if (m[4] === 0 && m[5] === 0) { - if (m[1] === 0 && m[2] === 0) { - if (m[0] === 1 && m[3] === 1) { - return ''; - } - - return 'scale(' + pf(m[0]) + ' ' + pf(m[3]) + ')'; - } - - if (m[0] === m[3] && m[1] === -m[2]) { - var a = Math.acos(m[0]) * 180 / Math.PI; - return 'rotate(' + pf(a) + ')'; - } - } else { - if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) { - return 'translate(' + pf(m[4]) + ' ' + pf(m[5]) + ')'; - } - } - - return 'matrix(' + pf(m[0]) + ' ' + pf(m[1]) + ' ' + pf(m[2]) + ' ' + pf(m[3]) + ' ' + pf(m[4]) + ' ' + pf(m[5]) + ')'; - } + var clipCount = 0; + var maskCount = 0; + var shadingCount = 0; + exports.SVGGraphics = SVGGraphics = + /*#__PURE__*/ + function () { function SVGGraphics(commonObjs, objs, forceDataSchema) { - this.svgFactory = new _dom_utils.DOMSVGFactory(); + _classCallCheck(this, SVGGraphics); + + this.svgFactory = new _display_utils.DOMSVGFactory(); this.current = new SVGExtraState(); this.transformMatrix = _util.IDENTITY_MATRIX; this.transformStack = []; @@ -20708,71 +21233,95 @@ exports.SVGGraphics = SVGGraphics; this.embeddedFonts = Object.create(null); this.cssStyle = null; this.forceDataSchema = !!forceDataSchema; + this._operatorIdMapping = []; + + for (var op in _util.OPS) { + this._operatorIdMapping[_util.OPS[op]] = op; + } } - var XML_NS = 'http://www.w3.org/XML/1998/namespace'; - var XLINK_NS = 'http://www.w3.org/1999/xlink'; - var LINE_CAP_STYLES = ['butt', 'round', 'square']; - var LINE_JOIN_STYLES = ['miter', 'round', 'bevel']; - var clipCount = 0; - var maskCount = 0; - SVGGraphics.prototype = { - save: function SVGGraphics_save() { + _createClass(SVGGraphics, [{ + key: "save", + value: function save() { this.transformStack.push(this.transformMatrix); var old = this.current; this.extraStack.push(old); this.current = old.clone(); - }, - restore: function SVGGraphics_restore() { + } + }, { + key: "restore", + value: function restore() { this.transformMatrix = this.transformStack.pop(); this.current = this.extraStack.pop(); this.pendingClip = null; this.tgrp = null; - }, - group: function SVGGraphics_group(items) { + } + }, { + key: "group", + value: function group(items) { this.save(); this.executeOpTree(items); this.restore(); - }, - loadDependencies: function SVGGraphics_loadDependencies(operatorList) { + } + }, { + key: "loadDependencies", + value: function loadDependencies(operatorList) { var _this = this; var fnArray = operatorList.fnArray; - var fnArrayLen = fnArray.length; var argsArray = operatorList.argsArray; - for (var i = 0; i < fnArrayLen; i++) { - if (_util.OPS.dependency === fnArray[i]) { - var deps = argsArray[i]; + for (var i = 0, ii = fnArray.length; i < ii; i++) { + if (fnArray[i] !== _util.OPS.dependency) { + continue; + } + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; - for (var n = 0, nn = deps.length; n < nn; n++) { - var obj = deps[n]; - var common = obj.substring(0, 2) === 'g_'; - var promise; + try { + var _loop = function _loop() { + var obj = _step2.value; + var objsPool = obj.startsWith('g_') ? _this.commonObjs : _this.objs; + var promise = new Promise(function (resolve) { + objsPool.get(obj, resolve); + }); - if (common) { - promise = new Promise(function (resolve) { - _this.commonObjs.get(obj, resolve); - }); - } else { - promise = new Promise(function (resolve) { - _this.objs.get(obj, resolve); - }); - } + _this.current.dependencies.push(promise); + }; - this.current.dependencies.push(promise); + for (var _iterator2 = argsArray[i][Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + _loop(); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { + _iterator2["return"](); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } } } } return Promise.all(this.current.dependencies); - }, - transform: function SVGGraphics_transform(a, b, c, d, e, f) { + } + }, { + key: "transform", + value: function transform(a, b, c, d, e, f) { var transformMatrix = [a, b, c, d, e, f]; this.transformMatrix = _util.Util.transform(this.transformMatrix, transformMatrix); this.tgrp = null; - }, - getSVG: function SVGGraphics_getSVG(operatorList, viewport) { + } + }, { + key: "getSVG", + value: function getSVG(operatorList, viewport) { var _this2 = this; this.viewport = viewport; @@ -20782,276 +21331,328 @@ exports.SVGGraphics = SVGGraphics; return this.loadDependencies(operatorList).then(function () { _this2.transformMatrix = _util.IDENTITY_MATRIX; - var opTree = _this2.convertOpList(operatorList); - - _this2.executeOpTree(opTree); + _this2.executeOpTree(_this2.convertOpList(operatorList)); return svgElement; }); - }, - convertOpList: function SVGGraphics_convertOpList(operatorList) { + } + }, { + key: "convertOpList", + value: function convertOpList(operatorList) { + var operatorIdMapping = this._operatorIdMapping; var argsArray = operatorList.argsArray; var fnArray = operatorList.fnArray; - var fnArrayLen = fnArray.length; - var REVOPS = []; var opList = []; - for (var op in _util.OPS) { - REVOPS[_util.OPS[op]] = op; - } - - for (var x = 0; x < fnArrayLen; x++) { - var fnId = fnArray[x]; + for (var i = 0, ii = fnArray.length; i < ii; i++) { + var fnId = fnArray[i]; opList.push({ 'fnId': fnId, - 'fn': REVOPS[fnId], - 'args': argsArray[x] + 'fn': operatorIdMapping[fnId], + 'args': argsArray[i] }); } return opListToTree(opList); - }, - executeOpTree: function SVGGraphics_executeOpTree(opTree) { - var opTreeLen = opTree.length; + } + }, { + key: "executeOpTree", + value: function executeOpTree(opTree) { + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; - for (var x = 0; x < opTreeLen; x++) { - var fn = opTree[x].fn; - var fnId = opTree[x].fnId; - var args = opTree[x].args; + try { + for (var _iterator3 = opTree[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var opTreeElement = _step3.value; + var fn = opTreeElement.fn; + var fnId = opTreeElement.fnId; + var args = opTreeElement.args; + + switch (fnId | 0) { + case _util.OPS.beginText: + this.beginText(); + break; - switch (fnId | 0) { - case _util.OPS.beginText: - this.beginText(); - break; + case _util.OPS.dependency: + break; - case _util.OPS.dependency: - break; + case _util.OPS.setLeading: + this.setLeading(args); + break; - case _util.OPS.setLeading: - this.setLeading(args); - break; + case _util.OPS.setLeadingMoveText: + this.setLeadingMoveText(args[0], args[1]); + break; - case _util.OPS.setLeadingMoveText: - this.setLeadingMoveText(args[0], args[1]); - break; + case _util.OPS.setFont: + this.setFont(args); + break; - case _util.OPS.setFont: - this.setFont(args); - break; + case _util.OPS.showText: + this.showText(args[0]); + break; - case _util.OPS.showText: - this.showText(args[0]); - break; + case _util.OPS.showSpacedText: + this.showText(args[0]); + break; - case _util.OPS.showSpacedText: - this.showText(args[0]); - break; + case _util.OPS.endText: + this.endText(); + break; - case _util.OPS.endText: - this.endText(); - break; + case _util.OPS.moveText: + this.moveText(args[0], args[1]); + break; - case _util.OPS.moveText: - this.moveText(args[0], args[1]); - break; + case _util.OPS.setCharSpacing: + this.setCharSpacing(args[0]); + break; - case _util.OPS.setCharSpacing: - this.setCharSpacing(args[0]); - break; + case _util.OPS.setWordSpacing: + this.setWordSpacing(args[0]); + break; - case _util.OPS.setWordSpacing: - this.setWordSpacing(args[0]); - break; + case _util.OPS.setHScale: + this.setHScale(args[0]); + break; - case _util.OPS.setHScale: - this.setHScale(args[0]); - break; + case _util.OPS.setTextMatrix: + this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); + break; - case _util.OPS.setTextMatrix: - this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); - break; + case _util.OPS.setTextRise: + this.setTextRise(args[0]); + break; - case _util.OPS.setTextRise: - this.setTextRise(args[0]); - break; + case _util.OPS.setTextRenderingMode: + this.setTextRenderingMode(args[0]); + break; - case _util.OPS.setTextRenderingMode: - this.setTextRenderingMode(args[0]); - break; + case _util.OPS.setLineWidth: + this.setLineWidth(args[0]); + break; - case _util.OPS.setLineWidth: - this.setLineWidth(args[0]); - break; + case _util.OPS.setLineJoin: + this.setLineJoin(args[0]); + break; - case _util.OPS.setLineJoin: - this.setLineJoin(args[0]); - break; + case _util.OPS.setLineCap: + this.setLineCap(args[0]); + break; - case _util.OPS.setLineCap: - this.setLineCap(args[0]); - break; + case _util.OPS.setMiterLimit: + this.setMiterLimit(args[0]); + break; - case _util.OPS.setMiterLimit: - this.setMiterLimit(args[0]); - break; + case _util.OPS.setFillRGBColor: + this.setFillRGBColor(args[0], args[1], args[2]); + break; - case _util.OPS.setFillRGBColor: - this.setFillRGBColor(args[0], args[1], args[2]); - break; + case _util.OPS.setStrokeRGBColor: + this.setStrokeRGBColor(args[0], args[1], args[2]); + break; - case _util.OPS.setStrokeRGBColor: - this.setStrokeRGBColor(args[0], args[1], args[2]); - break; + case _util.OPS.setStrokeColorN: + this.setStrokeColorN(args); + break; - case _util.OPS.setDash: - this.setDash(args[0], args[1]); - break; + case _util.OPS.setFillColorN: + this.setFillColorN(args); + break; - case _util.OPS.setGState: - this.setGState(args[0]); - break; + case _util.OPS.shadingFill: + this.shadingFill(args[0]); + break; - case _util.OPS.fill: - this.fill(); - break; + case _util.OPS.setDash: + this.setDash(args[0], args[1]); + break; - case _util.OPS.eoFill: - this.eoFill(); - break; + case _util.OPS.setRenderingIntent: + this.setRenderingIntent(args[0]); + break; - case _util.OPS.stroke: - this.stroke(); - break; + case _util.OPS.setFlatness: + this.setFlatness(args[0]); + break; - case _util.OPS.fillStroke: - this.fillStroke(); - break; + case _util.OPS.setGState: + this.setGState(args[0]); + break; - case _util.OPS.eoFillStroke: - this.eoFillStroke(); - break; + case _util.OPS.fill: + this.fill(); + break; - case _util.OPS.clip: - this.clip('nonzero'); - break; + case _util.OPS.eoFill: + this.eoFill(); + break; - case _util.OPS.eoClip: - this.clip('evenodd'); - break; + case _util.OPS.stroke: + this.stroke(); + break; - case _util.OPS.paintSolidColorImageMask: - this.paintSolidColorImageMask(); - break; + case _util.OPS.fillStroke: + this.fillStroke(); + break; - case _util.OPS.paintJpegXObject: - this.paintJpegXObject(args[0], args[1], args[2]); - break; + case _util.OPS.eoFillStroke: + this.eoFillStroke(); + break; - case _util.OPS.paintImageXObject: - this.paintImageXObject(args[0]); - break; + case _util.OPS.clip: + this.clip('nonzero'); + break; - case _util.OPS.paintInlineImageXObject: - this.paintInlineImageXObject(args[0]); - break; + case _util.OPS.eoClip: + this.clip('evenodd'); + break; - case _util.OPS.paintImageMaskXObject: - this.paintImageMaskXObject(args[0]); - break; + case _util.OPS.paintSolidColorImageMask: + this.paintSolidColorImageMask(); + break; - case _util.OPS.paintFormXObjectBegin: - this.paintFormXObjectBegin(args[0], args[1]); - break; + case _util.OPS.paintJpegXObject: + this.paintJpegXObject(args[0], args[1], args[2]); + break; - case _util.OPS.paintFormXObjectEnd: - this.paintFormXObjectEnd(); - break; + case _util.OPS.paintImageXObject: + this.paintImageXObject(args[0]); + break; - case _util.OPS.closePath: - this.closePath(); - break; + case _util.OPS.paintInlineImageXObject: + this.paintInlineImageXObject(args[0]); + break; - case _util.OPS.closeStroke: - this.closeStroke(); - break; + case _util.OPS.paintImageMaskXObject: + this.paintImageMaskXObject(args[0]); + break; - case _util.OPS.closeFillStroke: - this.closeFillStroke(); - break; + case _util.OPS.paintFormXObjectBegin: + this.paintFormXObjectBegin(args[0], args[1]); + break; - case _util.OPS.closeEOFillStroke: - this.closeEOFillStroke(); - break; + case _util.OPS.paintFormXObjectEnd: + this.paintFormXObjectEnd(); + break; - case _util.OPS.nextLine: - this.nextLine(); - break; + case _util.OPS.closePath: + this.closePath(); + break; - case _util.OPS.transform: - this.transform(args[0], args[1], args[2], args[3], args[4], args[5]); - break; + case _util.OPS.closeStroke: + this.closeStroke(); + break; - case _util.OPS.constructPath: - this.constructPath(args[0], args[1]); - break; + case _util.OPS.closeFillStroke: + this.closeFillStroke(); + break; - case _util.OPS.endPath: - this.endPath(); - break; + case _util.OPS.closeEOFillStroke: + this.closeEOFillStroke(); + break; - case 92: - this.group(opTree[x].items); - break; + case _util.OPS.nextLine: + this.nextLine(); + break; - default: - (0, _util.warn)('Unimplemented operator ' + fn); - break; + case _util.OPS.transform: + this.transform(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + + case _util.OPS.constructPath: + this.constructPath(args[0], args[1]); + break; + + case _util.OPS.endPath: + this.endPath(); + break; + + case 92: + this.group(opTreeElement.items); + break; + + default: + (0, _util.warn)("Unimplemented operator ".concat(fn)); + break; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) { + _iterator3["return"](); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } } } - }, - setWordSpacing: function SVGGraphics_setWordSpacing(wordSpacing) { + } + }, { + key: "setWordSpacing", + value: function setWordSpacing(wordSpacing) { this.current.wordSpacing = wordSpacing; - }, - setCharSpacing: function SVGGraphics_setCharSpacing(charSpacing) { + } + }, { + key: "setCharSpacing", + value: function setCharSpacing(charSpacing) { this.current.charSpacing = charSpacing; - }, - nextLine: function SVGGraphics_nextLine() { + } + }, { + key: "nextLine", + value: function nextLine() { this.moveText(0, this.current.leading); - }, - setTextMatrix: function SVGGraphics_setTextMatrix(a, b, c, d, e, f) { + } + }, { + key: "setTextMatrix", + value: function setTextMatrix(a, b, c, d, e, f) { var current = this.current; - this.current.textMatrix = this.current.lineMatrix = [a, b, c, d, e, f]; - this.current.x = this.current.lineX = 0; - this.current.y = this.current.lineY = 0; + current.textMatrix = current.lineMatrix = [a, b, c, d, e, f]; + current.textMatrixScale = Math.sqrt(a * a + b * b); + current.x = current.lineX = 0; + current.y = current.lineY = 0; current.xcoords = []; current.tspan = this.svgFactory.createElement('svg:tspan'); current.tspan.setAttributeNS(null, 'font-family', current.fontFamily); - current.tspan.setAttributeNS(null, 'font-size', pf(current.fontSize) + 'px'); + current.tspan.setAttributeNS(null, 'font-size', "".concat(pf(current.fontSize), "px")); current.tspan.setAttributeNS(null, 'y', pf(-current.y)); current.txtElement = this.svgFactory.createElement('svg:text'); current.txtElement.appendChild(current.tspan); - }, - beginText: function SVGGraphics_beginText() { - this.current.x = this.current.lineX = 0; - this.current.y = this.current.lineY = 0; - this.current.textMatrix = _util.IDENTITY_MATRIX; - this.current.lineMatrix = _util.IDENTITY_MATRIX; - this.current.tspan = this.svgFactory.createElement('svg:tspan'); - this.current.txtElement = this.svgFactory.createElement('svg:text'); - this.current.txtgrp = this.svgFactory.createElement('svg:g'); - this.current.xcoords = []; - }, - moveText: function SVGGraphics_moveText(x, y) { + } + }, { + key: "beginText", + value: function beginText() { + var current = this.current; + current.x = current.lineX = 0; + current.y = current.lineY = 0; + current.textMatrix = _util.IDENTITY_MATRIX; + current.lineMatrix = _util.IDENTITY_MATRIX; + current.textMatrixScale = 1; + current.tspan = this.svgFactory.createElement('svg:tspan'); + current.txtElement = this.svgFactory.createElement('svg:text'); + current.txtgrp = this.svgFactory.createElement('svg:g'); + current.xcoords = []; + } + }, { + key: "moveText", + value: function moveText(x, y) { var current = this.current; - this.current.x = this.current.lineX += x; - this.current.y = this.current.lineY += y; + current.x = current.lineX += x; + current.y = current.lineY += y; current.xcoords = []; current.tspan = this.svgFactory.createElement('svg:tspan'); current.tspan.setAttributeNS(null, 'font-family', current.fontFamily); - current.tspan.setAttributeNS(null, 'font-size', pf(current.fontSize) + 'px'); + current.tspan.setAttributeNS(null, 'font-size', "".concat(pf(current.fontSize), "px")); current.tspan.setAttributeNS(null, 'y', pf(-current.y)); - }, - showText: function SVGGraphics_showText(glyphs) { + } + }, { + key: "showText", + value: function showText(glyphs) { var current = this.current; var font = current.font; var fontSize = current.fontSize; @@ -21064,36 +21665,52 @@ exports.SVGGraphics = SVGGraphics; var wordSpacing = current.wordSpacing; var fontDirection = current.fontDirection; var textHScale = current.textHScale * fontDirection; - var glyphsLength = glyphs.length; var vertical = font.vertical; var widthAdvanceScale = fontSize * current.fontMatrix[0]; - var x = 0, - i; + var x = 0; + var _iteratorNormalCompletion4 = true; + var _didIteratorError4 = false; + var _iteratorError4 = undefined; - for (i = 0; i < glyphsLength; ++i) { - var glyph = glyphs[i]; + try { + for (var _iterator4 = glyphs[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { + var glyph = _step4.value; + + if (glyph === null) { + x += fontDirection * wordSpacing; + continue; + } else if ((0, _util.isNum)(glyph)) { + x += -glyph * fontSize * 0.001; + continue; + } - if (glyph === null) { - x += fontDirection * wordSpacing; - continue; - } else if ((0, _util.isNum)(glyph)) { - x += -glyph * fontSize * 0.001; - continue; - } + var width = glyph.width; + var character = glyph.fontChar; + var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + var charWidth = width * widthAdvanceScale + spacing * fontDirection; - var width = glyph.width; - var character = glyph.fontChar; - var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; - var charWidth = width * widthAdvanceScale + spacing * fontDirection; + if (!glyph.isInFont && !font.missingFile) { + x += charWidth; + continue; + } - if (!glyph.isInFont && !font.missingFile) { + current.xcoords.push(current.x + x * textHScale); + current.tspan.textContent += character; x += charWidth; - continue; } - - current.xcoords.push(current.x + x * textHScale); - current.tspan.textContent += character; - x += charWidth; + } catch (err) { + _didIteratorError4 = true; + _iteratorError4 = err; + } finally { + try { + if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) { + _iterator4["return"](); + } + } finally { + if (_didIteratorError4) { + throw _iteratorError4; + } + } } if (vertical) { @@ -21105,7 +21722,7 @@ exports.SVGGraphics = SVGGraphics; current.tspan.setAttributeNS(null, 'x', current.xcoords.map(pf).join(' ')); current.tspan.setAttributeNS(null, 'y', pf(-current.y)); current.tspan.setAttributeNS(null, 'font-family', current.fontFamily); - current.tspan.setAttributeNS(null, 'font-size', pf(current.fontSize) + 'px'); + current.tspan.setAttributeNS(null, 'font-size', "".concat(pf(current.fontSize), "px")); if (current.fontStyle !== SVG_DEFAULTS.fontStyle) { current.tspan.setAttributeNS(null, 'font-style', current.fontStyle); @@ -21132,7 +21749,9 @@ exports.SVGGraphics = SVGGraphics; } if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { - this._setStrokeAttributes(current.tspan); + var lineWidthScale = 1 / (current.textMatrixScale || 1); + + this._setStrokeAttributes(current.tspan, lineWidthScale); } var textMatrix = current.textMatrix; @@ -21142,18 +21761,22 @@ exports.SVGGraphics = SVGGraphics; textMatrix[5] += current.textRise; } - current.txtElement.setAttributeNS(null, 'transform', pm(textMatrix) + ' scale(1, -1)'); + current.txtElement.setAttributeNS(null, 'transform', "".concat(pm(textMatrix), " scale(1, -1)")); current.txtElement.setAttributeNS(XML_NS, 'xml:space', 'preserve'); current.txtElement.appendChild(current.tspan); current.txtgrp.appendChild(current.txtElement); this._ensureTransformGroup().appendChild(current.txtElement); - }, - setLeadingMoveText: function SVGGraphics_setLeadingMoveText(x, y) { + } + }, { + key: "setLeadingMoveText", + value: function setLeadingMoveText(x, y) { this.setLeading(-y); this.moveText(x, y); - }, - addFontStyle: function SVGGraphics_addFontStyle(fontObj) { + } + }, { + key: "addFontStyle", + value: function addFontStyle(fontObj) { if (!this.cssStyle) { this.cssStyle = this.svgFactory.createElement('svg:style'); this.cssStyle.setAttributeNS(null, 'type', 'text/css'); @@ -21161,13 +21784,15 @@ exports.SVGGraphics = SVGGraphics; } var url = (0, _util.createObjectURL)(fontObj.data, fontObj.mimetype, this.forceDataSchema); - this.cssStyle.textContent += '@font-face { font-family: "' + fontObj.loadedName + '";' + ' src: url(' + url + '); }\n'; - }, - setFont: function SVGGraphics_setFont(details) { + this.cssStyle.textContent += "@font-face { font-family: \"".concat(fontObj.loadedName, "\";") + " src: url(".concat(url, "); }\n"); + } + }, { + key: "setFont", + value: function setFont(details) { var current = this.current; var fontObj = this.commonObjs.get(details[0]); var size = details[1]; - this.current.font = fontObj; + current.font = fontObj; if (this.embedFonts && fontObj.data && !this.embeddedFonts[fontObj.loadedName]) { this.addFontStyle(fontObj); @@ -21192,8 +21817,10 @@ exports.SVGGraphics = SVGGraphics; current.tspan = this.svgFactory.createElement('svg:tspan'); current.tspan.setAttributeNS(null, 'y', pf(-current.y)); current.xcoords = []; - }, - endText: function endText() { + } + }, { + key: "endText", + value: function endText() { var current = this.current; if (current.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG && current.txtElement && current.txtElement.hasChildNodes()) { @@ -21201,118 +21828,365 @@ exports.SVGGraphics = SVGGraphics; this.clip('nonzero'); this.endPath(); } - }, - setLineWidth: function SVGGraphics_setLineWidth(width) { + } + }, { + key: "setLineWidth", + value: function setLineWidth(width) { if (width > 0) { this.current.lineWidth = width; } - }, - setLineCap: function SVGGraphics_setLineCap(style) { + } + }, { + key: "setLineCap", + value: function setLineCap(style) { this.current.lineCap = LINE_CAP_STYLES[style]; - }, - setLineJoin: function SVGGraphics_setLineJoin(style) { + } + }, { + key: "setLineJoin", + value: function setLineJoin(style) { this.current.lineJoin = LINE_JOIN_STYLES[style]; - }, - setMiterLimit: function SVGGraphics_setMiterLimit(limit) { + } + }, { + key: "setMiterLimit", + value: function setMiterLimit(limit) { this.current.miterLimit = limit; - }, - setStrokeAlpha: function SVGGraphics_setStrokeAlpha(strokeAlpha) { + } + }, { + key: "setStrokeAlpha", + value: function setStrokeAlpha(strokeAlpha) { this.current.strokeAlpha = strokeAlpha; - }, - setStrokeRGBColor: function SVGGraphics_setStrokeRGBColor(r, g, b) { - var color = _util.Util.makeCssRgb(r, g, b); - - this.current.strokeColor = color; - }, - setFillAlpha: function SVGGraphics_setFillAlpha(fillAlpha) { + } + }, { + key: "setStrokeRGBColor", + value: function setStrokeRGBColor(r, g, b) { + this.current.strokeColor = _util.Util.makeCssRgb(r, g, b); + } + }, { + key: "setFillAlpha", + value: function setFillAlpha(fillAlpha) { this.current.fillAlpha = fillAlpha; - }, - setFillRGBColor: function SVGGraphics_setFillRGBColor(r, g, b) { - var color = _util.Util.makeCssRgb(r, g, b); - - this.current.fillColor = color; + } + }, { + key: "setFillRGBColor", + value: function setFillRGBColor(r, g, b) { + this.current.fillColor = _util.Util.makeCssRgb(r, g, b); this.current.tspan = this.svgFactory.createElement('svg:tspan'); this.current.xcoords = []; - }, - setDash: function SVGGraphics_setDash(dashArray, dashPhase) { + } + }, { + key: "setStrokeColorN", + value: function setStrokeColorN(args) { + this.current.strokeColor = this._makeColorN_Pattern(args); + } + }, { + key: "setFillColorN", + value: function setFillColorN(args) { + this.current.fillColor = this._makeColorN_Pattern(args); + } + }, { + key: "shadingFill", + value: function shadingFill(args) { + var width = this.viewport.width; + var height = this.viewport.height; + + var inv = _util.Util.inverseTransform(this.transformMatrix); + + var bl = _util.Util.applyTransform([0, 0], inv); + + var br = _util.Util.applyTransform([0, height], inv); + + var ul = _util.Util.applyTransform([width, 0], inv); + + var ur = _util.Util.applyTransform([width, height], inv); + + var x0 = Math.min(bl[0], br[0], ul[0], ur[0]); + var y0 = Math.min(bl[1], br[1], ul[1], ur[1]); + var x1 = Math.max(bl[0], br[0], ul[0], ur[0]); + var y1 = Math.max(bl[1], br[1], ul[1], ur[1]); + var rect = this.svgFactory.createElement('svg:rect'); + rect.setAttributeNS(null, 'x', x0); + rect.setAttributeNS(null, 'y', y0); + rect.setAttributeNS(null, 'width', x1 - x0); + rect.setAttributeNS(null, 'height', y1 - y0); + rect.setAttributeNS(null, 'fill', this._makeShadingPattern(args)); + + this._ensureTransformGroup().appendChild(rect); + } + }, { + key: "_makeColorN_Pattern", + value: function _makeColorN_Pattern(args) { + if (args[0] === 'TilingPattern') { + return this._makeTilingPattern(args); + } + + return this._makeShadingPattern(args); + } + }, { + key: "_makeTilingPattern", + value: function _makeTilingPattern(args) { + var color = args[1]; + var operatorList = args[2]; + var matrix = args[3] || _util.IDENTITY_MATRIX; + + var _args$ = _slicedToArray(args[4], 4), + x0 = _args$[0], + y0 = _args$[1], + x1 = _args$[2], + y1 = _args$[3]; + + var xstep = args[5]; + var ystep = args[6]; + var paintType = args[7]; + var tilingId = "shading".concat(shadingCount++); + + var _Util$applyTransform = _util.Util.applyTransform([x0, y0], matrix), + _Util$applyTransform2 = _slicedToArray(_Util$applyTransform, 2), + tx0 = _Util$applyTransform2[0], + ty0 = _Util$applyTransform2[1]; + + var _Util$applyTransform3 = _util.Util.applyTransform([x1, y1], matrix), + _Util$applyTransform4 = _slicedToArray(_Util$applyTransform3, 2), + tx1 = _Util$applyTransform4[0], + ty1 = _Util$applyTransform4[1]; + + var _Util$singularValueDe = _util.Util.singularValueDecompose2dScale(matrix), + _Util$singularValueDe2 = _slicedToArray(_Util$singularValueDe, 2), + xscale = _Util$singularValueDe2[0], + yscale = _Util$singularValueDe2[1]; + + var txstep = xstep * xscale; + var tystep = ystep * yscale; + var tiling = this.svgFactory.createElement('svg:pattern'); + tiling.setAttributeNS(null, 'id', tilingId); + tiling.setAttributeNS(null, 'patternUnits', 'userSpaceOnUse'); + tiling.setAttributeNS(null, 'width', txstep); + tiling.setAttributeNS(null, 'height', tystep); + tiling.setAttributeNS(null, 'x', "".concat(tx0)); + tiling.setAttributeNS(null, 'y', "".concat(ty0)); + var svg = this.svg; + var transformMatrix = this.transformMatrix; + var fillColor = this.current.fillColor; + var strokeColor = this.current.strokeColor; + var bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0); + this.svg = bbox; + this.transformMatrix = matrix; + + if (paintType === 2) { + var cssColor = _util.Util.makeCssRgb.apply(_util.Util, _toConsumableArray(color)); + + this.current.fillColor = cssColor; + this.current.strokeColor = cssColor; + } + + this.executeOpTree(this.convertOpList(operatorList)); + this.svg = svg; + this.transformMatrix = transformMatrix; + this.current.fillColor = fillColor; + this.current.strokeColor = strokeColor; + tiling.appendChild(bbox.childNodes[0]); + this.defs.appendChild(tiling); + return "url(#".concat(tilingId, ")"); + } + }, { + key: "_makeShadingPattern", + value: function _makeShadingPattern(args) { + switch (args[0]) { + case 'RadialAxial': + var shadingId = "shading".concat(shadingCount++); + var colorStops = args[2]; + var gradient; + + switch (args[1]) { + case 'axial': + var point0 = args[3]; + var point1 = args[4]; + gradient = this.svgFactory.createElement('svg:linearGradient'); + gradient.setAttributeNS(null, 'id', shadingId); + gradient.setAttributeNS(null, 'gradientUnits', 'userSpaceOnUse'); + gradient.setAttributeNS(null, 'x1', point0[0]); + gradient.setAttributeNS(null, 'y1', point0[1]); + gradient.setAttributeNS(null, 'x2', point1[0]); + gradient.setAttributeNS(null, 'y2', point1[1]); + break; + + case 'radial': + var focalPoint = args[3]; + var circlePoint = args[4]; + var focalRadius = args[5]; + var circleRadius = args[6]; + gradient = this.svgFactory.createElement('svg:radialGradient'); + gradient.setAttributeNS(null, 'id', shadingId); + gradient.setAttributeNS(null, 'gradientUnits', 'userSpaceOnUse'); + gradient.setAttributeNS(null, 'cx', circlePoint[0]); + gradient.setAttributeNS(null, 'cy', circlePoint[1]); + gradient.setAttributeNS(null, 'r', circleRadius); + gradient.setAttributeNS(null, 'fx', focalPoint[0]); + gradient.setAttributeNS(null, 'fy', focalPoint[1]); + gradient.setAttributeNS(null, 'fr', focalRadius); + break; + + default: + throw new Error("Unknown RadialAxial type: ".concat(args[1])); + } + + var _iteratorNormalCompletion5 = true; + var _didIteratorError5 = false; + var _iteratorError5 = undefined; + + try { + for (var _iterator5 = colorStops[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { + var colorStop = _step5.value; + var stop = this.svgFactory.createElement('svg:stop'); + stop.setAttributeNS(null, 'offset', colorStop[0]); + stop.setAttributeNS(null, 'stop-color', colorStop[1]); + gradient.appendChild(stop); + } + } catch (err) { + _didIteratorError5 = true; + _iteratorError5 = err; + } finally { + try { + if (!_iteratorNormalCompletion5 && _iterator5["return"] != null) { + _iterator5["return"](); + } + } finally { + if (_didIteratorError5) { + throw _iteratorError5; + } + } + } + + this.defs.appendChild(gradient); + return "url(#".concat(shadingId, ")"); + + case 'Mesh': + (0, _util.warn)('Unimplemented pattern Mesh'); + return null; + + case 'Dummy': + return 'hotpink'; + + default: + throw new Error("Unknown IR type: ".concat(args[0])); + } + } + }, { + key: "setDash", + value: function setDash(dashArray, dashPhase) { this.current.dashArray = dashArray; this.current.dashPhase = dashPhase; - }, - constructPath: function SVGGraphics_constructPath(ops, args) { + } + }, { + key: "constructPath", + value: function constructPath(ops, args) { var current = this.current; var x = current.x, y = current.y; - current.path = this.svgFactory.createElement('svg:path'); var d = []; - var opLength = ops.length; - - for (var i = 0, j = 0; i < opLength; i++) { - switch (ops[i] | 0) { - case _util.OPS.rectangle: - x = args[j++]; - y = args[j++]; - var width = args[j++]; - var height = args[j++]; - var xw = x + width; - var yh = y + height; - d.push('M', pf(x), pf(y), 'L', pf(xw), pf(y), 'L', pf(xw), pf(yh), 'L', pf(x), pf(yh), 'Z'); - break; + var j = 0; + var _iteratorNormalCompletion6 = true; + var _didIteratorError6 = false; + var _iteratorError6 = undefined; - case _util.OPS.moveTo: - x = args[j++]; - y = args[j++]; - d.push('M', pf(x), pf(y)); - break; + try { + for (var _iterator6 = ops[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { + var op = _step6.value; + + switch (op | 0) { + case _util.OPS.rectangle: + x = args[j++]; + y = args[j++]; + var width = args[j++]; + var height = args[j++]; + var xw = x + width; + var yh = y + height; + d.push('M', pf(x), pf(y), 'L', pf(xw), pf(y), 'L', pf(xw), pf(yh), 'L', pf(x), pf(yh), 'Z'); + break; - case _util.OPS.lineTo: - x = args[j++]; - y = args[j++]; - d.push('L', pf(x), pf(y)); - break; + case _util.OPS.moveTo: + x = args[j++]; + y = args[j++]; + d.push('M', pf(x), pf(y)); + break; - case _util.OPS.curveTo: - x = args[j + 4]; - y = args[j + 5]; - d.push('C', pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y)); - j += 6; - break; + case _util.OPS.lineTo: + x = args[j++]; + y = args[j++]; + d.push('L', pf(x), pf(y)); + break; - case _util.OPS.curveTo2: - x = args[j + 2]; - y = args[j + 3]; - d.push('C', pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3])); - j += 4; - break; + case _util.OPS.curveTo: + x = args[j + 4]; + y = args[j + 5]; + d.push('C', pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y)); + j += 6; + break; - case _util.OPS.curveTo3: - x = args[j + 2]; - y = args[j + 3]; - d.push('C', pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y)); - j += 4; - break; + case _util.OPS.curveTo2: + x = args[j + 2]; + y = args[j + 3]; + d.push('C', pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3])); + j += 4; + break; - case _util.OPS.closePath: - d.push('Z'); - break; + case _util.OPS.curveTo3: + x = args[j + 2]; + y = args[j + 3]; + d.push('C', pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y)); + j += 4; + break; + + case _util.OPS.closePath: + d.push('Z'); + break; + } + } + } catch (err) { + _didIteratorError6 = true; + _iteratorError6 = err; + } finally { + try { + if (!_iteratorNormalCompletion6 && _iterator6["return"] != null) { + _iterator6["return"](); + } + } finally { + if (_didIteratorError6) { + throw _iteratorError6; + } } } - current.path.setAttributeNS(null, 'd', d.join(' ')); - current.path.setAttributeNS(null, 'fill', 'none'); + d = d.join(' '); - this._ensureTransformGroup().appendChild(current.path); + if (current.path && ops.length > 0 && ops[0] !== _util.OPS.rectangle && ops[0] !== _util.OPS.moveTo) { + d = current.path.getAttributeNS(null, 'd') + d; + } else { + current.path = this.svgFactory.createElement('svg:path'); + + this._ensureTransformGroup().appendChild(current.path); + } + current.path.setAttributeNS(null, 'd', d); + current.path.setAttributeNS(null, 'fill', 'none'); current.element = current.path; current.setCurrentPoint(x, y); - }, - endPath: function SVGGraphics_endPath() { + } + }, { + key: "endPath", + value: function endPath() { + var current = this.current; + current.path = null; + if (!this.pendingClip) { return; } - var current = this.current; - var clipId = 'clippath' + clipCount; - clipCount++; + if (!current.element) { + this.pendingClip = null; + return; + } + + var clipId = "clippath".concat(clipCount++); var clipPath = this.svgFactory.createElement('svg:clipPath'); clipPath.setAttributeNS(null, 'id', clipId); clipPath.setAttributeNS(null, 'transform', pm(this.transformMatrix)); @@ -21336,79 +22210,127 @@ exports.SVGGraphics = SVGGraphics; clipPath.setAttributeNS(null, 'clip-path', current.activeClipUrl); } - current.activeClipUrl = 'url(#' + clipId + ')'; + current.activeClipUrl = "url(#".concat(clipId, ")"); this.tgrp = null; - }, - clip: function SVGGraphics_clip(type) { + } + }, { + key: "clip", + value: function clip(type) { this.pendingClip = type; - }, - closePath: function SVGGraphics_closePath() { + } + }, { + key: "closePath", + value: function closePath() { var current = this.current; if (current.path) { - var d = current.path.getAttributeNS(null, 'd'); - d += 'Z'; + var d = "".concat(current.path.getAttributeNS(null, 'd'), "Z"); current.path.setAttributeNS(null, 'd', d); } - }, - setLeading: function SVGGraphics_setLeading(leading) { + } + }, { + key: "setLeading", + value: function setLeading(leading) { this.current.leading = -leading; - }, - setTextRise: function SVGGraphics_setTextRise(textRise) { + } + }, { + key: "setTextRise", + value: function setTextRise(textRise) { this.current.textRise = textRise; - }, - setTextRenderingMode: function setTextRenderingMode(textRenderingMode) { + } + }, { + key: "setTextRenderingMode", + value: function setTextRenderingMode(textRenderingMode) { this.current.textRenderingMode = textRenderingMode; - }, - setHScale: function SVGGraphics_setHScale(scale) { + } + }, { + key: "setHScale", + value: function setHScale(scale) { this.current.textHScale = scale / 100; - }, - setGState: function SVGGraphics_setGState(states) { - for (var i = 0, ii = states.length; i < ii; i++) { - var state = states[i]; - var key = state[0]; - var value = state[1]; - - switch (key) { - case 'LW': - this.setLineWidth(value); - break; + } + }, { + key: "setRenderingIntent", + value: function setRenderingIntent(intent) {} + }, { + key: "setFlatness", + value: function setFlatness(flatness) {} + }, { + key: "setGState", + value: function setGState(states) { + var _iteratorNormalCompletion7 = true; + var _didIteratorError7 = false; + var _iteratorError7 = undefined; - case 'LC': - this.setLineCap(value); - break; + try { + for (var _iterator7 = states[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) { + var _step7$value = _slicedToArray(_step7.value, 2), + key = _step7$value[0], + value = _step7$value[1]; + + switch (key) { + case 'LW': + this.setLineWidth(value); + break; - case 'LJ': - this.setLineJoin(value); - break; + case 'LC': + this.setLineCap(value); + break; - case 'ML': - this.setMiterLimit(value); - break; + case 'LJ': + this.setLineJoin(value); + break; - case 'D': - this.setDash(value[0], value[1]); - break; + case 'ML': + this.setMiterLimit(value); + break; - case 'Font': - this.setFont(value); - break; + case 'D': + this.setDash(value[0], value[1]); + break; - case 'CA': - this.setStrokeAlpha(value); - break; + case 'RI': + this.setRenderingIntent(value); + break; - case 'ca': - this.setFillAlpha(value); - break; + case 'FL': + this.setFlatness(value); + break; - default: - (0, _util.warn)('Unimplemented graphic state ' + key); - break; + case 'Font': + this.setFont(value); + break; + + case 'CA': + this.setStrokeAlpha(value); + break; + + case 'ca': + this.setFillAlpha(value); + break; + + default: + (0, _util.warn)("Unimplemented graphic state operator ".concat(key)); + break; + } + } + } catch (err) { + _didIteratorError7 = true; + _iteratorError7 = err; + } finally { + try { + if (!_iteratorNormalCompletion7 && _iterator7["return"] != null) { + _iterator7["return"](); + } + } finally { + if (_didIteratorError7) { + throw _iteratorError7; + } } } - }, - fill: function SVGGraphics_fill() { + } + }, { + key: "fill", + value: function fill() { var current = this.current; if (current.element) { @@ -21416,8 +22338,10 @@ exports.SVGGraphics = SVGGraphics; current.element.setAttributeNS(null, 'fill-opacity', current.fillAlpha); this.endPath(); } - }, - stroke: function SVGGraphics_stroke() { + } + }, { + key: "stroke", + value: function stroke() { var current = this.current; if (current.element) { @@ -21426,60 +22350,86 @@ exports.SVGGraphics = SVGGraphics; current.element.setAttributeNS(null, 'fill', 'none'); this.endPath(); } - }, - _setStrokeAttributes: function _setStrokeAttributes(element) { + } + }, { + key: "_setStrokeAttributes", + value: function _setStrokeAttributes(element) { + var lineWidthScale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var current = this.current; + var dashArray = current.dashArray; + + if (lineWidthScale !== 1 && dashArray.length > 0) { + dashArray = dashArray.map(function (value) { + return lineWidthScale * value; + }); + } + element.setAttributeNS(null, 'stroke', current.strokeColor); element.setAttributeNS(null, 'stroke-opacity', current.strokeAlpha); element.setAttributeNS(null, 'stroke-miterlimit', pf(current.miterLimit)); element.setAttributeNS(null, 'stroke-linecap', current.lineCap); element.setAttributeNS(null, 'stroke-linejoin', current.lineJoin); - element.setAttributeNS(null, 'stroke-width', pf(current.lineWidth) + 'px'); - element.setAttributeNS(null, 'stroke-dasharray', current.dashArray.map(pf).join(' ')); - element.setAttributeNS(null, 'stroke-dashoffset', pf(current.dashPhase) + 'px'); - }, - eoFill: function SVGGraphics_eoFill() { + element.setAttributeNS(null, 'stroke-width', pf(lineWidthScale * current.lineWidth) + 'px'); + element.setAttributeNS(null, 'stroke-dasharray', dashArray.map(pf).join(' ')); + element.setAttributeNS(null, 'stroke-dashoffset', pf(lineWidthScale * current.dashPhase) + 'px'); + } + }, { + key: "eoFill", + value: function eoFill() { if (this.current.element) { this.current.element.setAttributeNS(null, 'fill-rule', 'evenodd'); } this.fill(); - }, - fillStroke: function SVGGraphics_fillStroke() { + } + }, { + key: "fillStroke", + value: function fillStroke() { this.stroke(); this.fill(); - }, - eoFillStroke: function SVGGraphics_eoFillStroke() { + } + }, { + key: "eoFillStroke", + value: function eoFillStroke() { if (this.current.element) { this.current.element.setAttributeNS(null, 'fill-rule', 'evenodd'); } this.fillStroke(); - }, - closeStroke: function SVGGraphics_closeStroke() { + } + }, { + key: "closeStroke", + value: function closeStroke() { this.closePath(); this.stroke(); - }, - closeFillStroke: function SVGGraphics_closeFillStroke() { + } + }, { + key: "closeFillStroke", + value: function closeFillStroke() { this.closePath(); this.fillStroke(); - }, - closeEOFillStroke: function closeEOFillStroke() { + } + }, { + key: "closeEOFillStroke", + value: function closeEOFillStroke() { this.closePath(); this.eoFillStroke(); - }, - paintSolidColorImageMask: function SVGGraphics_paintSolidColorImageMask() { - var current = this.current; + } + }, { + key: "paintSolidColorImageMask", + value: function paintSolidColorImageMask() { var rect = this.svgFactory.createElement('svg:rect'); rect.setAttributeNS(null, 'x', '0'); rect.setAttributeNS(null, 'y', '0'); rect.setAttributeNS(null, 'width', '1px'); rect.setAttributeNS(null, 'height', '1px'); - rect.setAttributeNS(null, 'fill', current.fillColor); + rect.setAttributeNS(null, 'fill', this.current.fillColor); this._ensureTransformGroup().appendChild(rect); - }, - paintJpegXObject: function SVGGraphics_paintJpegXObject(objId, w, h) { + } + }, { + key: "paintJpegXObject", + value: function paintJpegXObject(objId, w, h) { var imgObj = this.objs.get(objId); var imgEl = this.svgFactory.createElement('svg:image'); imgEl.setAttributeNS(XLINK_NS, 'xlink:href', imgObj.src); @@ -21487,21 +22437,25 @@ exports.SVGGraphics = SVGGraphics; imgEl.setAttributeNS(null, 'height', pf(h)); imgEl.setAttributeNS(null, 'x', '0'); imgEl.setAttributeNS(null, 'y', pf(-h)); - imgEl.setAttributeNS(null, 'transform', 'scale(' + pf(1 / w) + ' ' + pf(-1 / h) + ')'); + imgEl.setAttributeNS(null, 'transform', "scale(".concat(pf(1 / w), " ").concat(pf(-1 / h), ")")); this._ensureTransformGroup().appendChild(imgEl); - }, - paintImageXObject: function SVGGraphics_paintImageXObject(objId) { + } + }, { + key: "paintImageXObject", + value: function paintImageXObject(objId) { var imgData = this.objs.get(objId); if (!imgData) { - (0, _util.warn)('Dependent image isn\'t ready yet'); + (0, _util.warn)("Dependent image with object ID ".concat(objId, " is not ready yet")); return; } this.paintInlineImageXObject(imgData); - }, - paintInlineImageXObject: function SVGGraphics_paintInlineImageXObject(imgData, mask) { + } + }, { + key: "paintInlineImageXObject", + value: function paintInlineImageXObject(imgData, mask) { var width = imgData.width; var height = imgData.height; var imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask); @@ -21518,20 +22472,22 @@ exports.SVGGraphics = SVGGraphics; imgEl.setAttributeNS(null, 'y', pf(-height)); imgEl.setAttributeNS(null, 'width', pf(width) + 'px'); imgEl.setAttributeNS(null, 'height', pf(height) + 'px'); - imgEl.setAttributeNS(null, 'transform', 'scale(' + pf(1 / width) + ' ' + pf(-1 / height) + ')'); + imgEl.setAttributeNS(null, 'transform', "scale(".concat(pf(1 / width), " ").concat(pf(-1 / height), ")")); if (mask) { mask.appendChild(imgEl); } else { this._ensureTransformGroup().appendChild(imgEl); } - }, - paintImageMaskXObject: function SVGGraphics_paintImageMaskXObject(imgData) { + } + }, { + key: "paintImageMaskXObject", + value: function paintImageMaskXObject(imgData) { var current = this.current; var width = imgData.width; var height = imgData.height; var fillColor = current.fillColor; - current.maskId = 'mask' + maskCount++; + current.maskId = "mask".concat(maskCount++); var mask = this.svgFactory.createElement('svg:mask'); mask.setAttributeNS(null, 'id', current.maskId); var rect = this.svgFactory.createElement('svg:rect'); @@ -21540,14 +22496,16 @@ exports.SVGGraphics = SVGGraphics; rect.setAttributeNS(null, 'width', pf(width)); rect.setAttributeNS(null, 'height', pf(height)); rect.setAttributeNS(null, 'fill', fillColor); - rect.setAttributeNS(null, 'mask', 'url(#' + current.maskId + ')'); + rect.setAttributeNS(null, 'mask', "url(#".concat(current.maskId, ")")); this.defs.appendChild(mask); this._ensureTransformGroup().appendChild(rect); this.paintInlineImageXObject(imgData, mask); - }, - paintFormXObjectBegin: function SVGGraphics_paintFormXObjectBegin(matrix, bbox) { + } + }, { + key: "paintFormXObjectBegin", + value: function paintFormXObjectBegin(matrix, bbox) { if (Array.isArray(matrix) && matrix.length === 6) { this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); } @@ -21564,9 +22522,13 @@ exports.SVGGraphics = SVGGraphics; this.clip('nonzero'); this.endPath(); } - }, - paintFormXObjectEnd: function SVGGraphics_paintFormXObjectEnd() {}, - _initialize: function _initialize(viewport) { + } + }, { + key: "paintFormXObjectEnd", + value: function paintFormXObjectEnd() {} + }, { + key: "_initialize", + value: function _initialize(viewport) { var svg = this.svgFactory.create(viewport.width, viewport.height); var definitions = this.svgFactory.createElement('svg:defs'); svg.appendChild(definitions); @@ -21576,8 +22538,10 @@ exports.SVGGraphics = SVGGraphics; svg.appendChild(rootGroup); this.svg = rootGroup; return svg; - }, - _ensureClipGroup: function SVGGraphics_ensureClipGroup() { + } + }, { + key: "_ensureClipGroup", + value: function _ensureClipGroup() { if (!this.current.clipGroup) { var clipGroup = this.svgFactory.createElement('svg:g'); clipGroup.setAttributeNS(null, 'clip-path', this.current.activeClipUrl); @@ -21586,8 +22550,10 @@ exports.SVGGraphics = SVGGraphics; } return this.current.clipGroup; - }, - _ensureTransformGroup: function SVGGraphics_ensureTransformGroup() { + } + }, { + key: "_ensureTransformGroup", + value: function _ensureTransformGroup() { if (!this.tgrp) { this.tgrp = this.svgFactory.createElement('svg:g'); this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix)); @@ -21601,7 +22567,8 @@ exports.SVGGraphics = SVGGraphics; return this.tgrp; } - }; + }]); + return SVGGraphics; }(); } @@ -21618,13 +22585,13 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFNodeStream = void 0; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); var _network_utils = __w_pdfjs_require__(166); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -21687,20 +22654,24 @@ function () { this.isHttp = this.url.protocol === 'http:' || this.url.protocol === 'https:'; this.isFsUrl = this.url.protocol === 'file:'; this.httpHeaders = this.isHttp && source.httpHeaders || {}; - this._fullRequest = null; + this._fullRequestReader = null; this._rangeRequestReaders = []; } _createClass(PDFNodeStream, [{ key: "getFullReader", value: function getFullReader() { - (0, _util.assert)(!this._fullRequest); - this._fullRequest = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this); - return this._fullRequest; + (0, _util.assert)(!this._fullRequestReader); + this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this); + return this._fullRequestReader; } }, { key: "getRangeReader", value: function getRangeReader(start, end) { + if (end <= this._progressiveDataLength) { + return null; + } + var rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end); this._rangeRequestReaders.push(rangeReader); @@ -21710,8 +22681,8 @@ function () { }, { key: "cancelAllRequests", value: function cancelAllRequests(reason) { - if (this._fullRequest) { - this._fullRequest.cancel(reason); + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); } var readers = this._rangeRequestReaders.slice(0); @@ -21720,6 +22691,11 @@ function () { reader.cancel(reason); }); } + }, { + key: "_progressiveDataLength", + get: function get() { + return this._fullRequestReader ? this._fullRequestReader._loaded : 0; + } }]); return PDFNodeStream; @@ -21760,9 +22736,9 @@ function () { value: function () { var _read = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { + _regenerator["default"].mark(function _callee() { var chunk, buffer; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -21926,9 +22902,9 @@ function () { value: function () { var _read2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { + _regenerator["default"].mark(function _callee2() { var chunk, buffer; - return _regenerator.default.wrap(function _callee2$(_context2) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -22550,9 +23526,9 @@ function getFilenameFromContentDispositionHeader(contentDisposition) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.PDFFetchStream = void 0; +exports.PDFNetworkStream = void 0; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); @@ -22570,41 +23546,256 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -function createFetchOptions(headers, withCredentials, abortController) { - return { - method: 'GET', - headers: headers, - signal: abortController && abortController.signal, - mode: 'cors', - credentials: withCredentials ? 'include' : 'same-origin', - redirect: 'follow' - }; +; +var OK_RESPONSE = 200; +var PARTIAL_CONTENT_RESPONSE = 206; + +function getArrayBuffer(xhr) { + var data = xhr.response; + + if (typeof data !== 'string') { + return data; + } + + var array = (0, _util.stringToBytes)(data); + return array.buffer; } -var PDFFetchStream = +var NetworkManager = /*#__PURE__*/ function () { - function PDFFetchStream(source) { - _classCallCheck(this, PDFFetchStream); + function NetworkManager(url, args) { + _classCallCheck(this, NetworkManager); - this.source = source; - this.isHttp = /^https?:/i.test(source.url); - this.httpHeaders = this.isHttp && source.httpHeaders || {}; + this.url = url; + args = args || {}; + this.isHttp = /^https?:/i.test(url); + this.httpHeaders = this.isHttp && args.httpHeaders || {}; + this.withCredentials = args.withCredentials || false; + + this.getXhr = args.getXhr || function NetworkManager_getXhr() { + return new XMLHttpRequest(); + }; + + this.currXhrId = 0; + this.pendingRequests = Object.create(null); + } + + _createClass(NetworkManager, [{ + key: "requestRange", + value: function requestRange(begin, end, listeners) { + var args = { + begin: begin, + end: end + }; + + for (var prop in listeners) { + args[prop] = listeners[prop]; + } + + return this.request(args); + } + }, { + key: "requestFull", + value: function requestFull(listeners) { + return this.request(listeners); + } + }, { + key: "request", + value: function request(args) { + var xhr = this.getXhr(); + var xhrId = this.currXhrId++; + var pendingRequest = this.pendingRequests[xhrId] = { + xhr: xhr + }; + xhr.open('GET', this.url); + xhr.withCredentials = this.withCredentials; + + for (var property in this.httpHeaders) { + var value = this.httpHeaders[property]; + + if (typeof value === 'undefined') { + continue; + } + + xhr.setRequestHeader(property, value); + } + + if (this.isHttp && 'begin' in args && 'end' in args) { + xhr.setRequestHeader('Range', "bytes=".concat(args.begin, "-").concat(args.end - 1)); + pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE; + } else { + pendingRequest.expectedStatus = OK_RESPONSE; + } + + xhr.responseType = 'arraybuffer'; + + if (args.onError) { + xhr.onerror = function (evt) { + args.onError(xhr.status); + }; + } + + xhr.onreadystatechange = this.onStateChange.bind(this, xhrId); + xhr.onprogress = this.onProgress.bind(this, xhrId); + pendingRequest.onHeadersReceived = args.onHeadersReceived; + pendingRequest.onDone = args.onDone; + pendingRequest.onError = args.onError; + pendingRequest.onProgress = args.onProgress; + xhr.send(null); + return xhrId; + } + }, { + key: "onProgress", + value: function onProgress(xhrId, evt) { + var pendingRequest = this.pendingRequests[xhrId]; + + if (!pendingRequest) { + return; + } + + if (pendingRequest.onProgress) { + pendingRequest.onProgress(evt); + } + } + }, { + key: "onStateChange", + value: function onStateChange(xhrId, evt) { + var pendingRequest = this.pendingRequests[xhrId]; + + if (!pendingRequest) { + return; + } + + var xhr = pendingRequest.xhr; + + if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) { + pendingRequest.onHeadersReceived(); + delete pendingRequest.onHeadersReceived; + } + + if (xhr.readyState !== 4) { + return; + } + + if (!(xhrId in this.pendingRequests)) { + return; + } + + delete this.pendingRequests[xhrId]; + + if (xhr.status === 0 && this.isHttp) { + if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + + return; + } + + var xhrStatus = xhr.status || OK_RESPONSE; + var ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE; + + if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { + if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + + return; + } + + var chunk = getArrayBuffer(xhr); + + if (xhrStatus === PARTIAL_CONTENT_RESPONSE) { + var rangeHeader = xhr.getResponseHeader('Content-Range'); + var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader); + pendingRequest.onDone({ + begin: parseInt(matches[1], 10), + chunk: chunk + }); + } else if (chunk) { + pendingRequest.onDone({ + begin: 0, + chunk: chunk + }); + } else if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + } + }, { + key: "hasPendingRequests", + value: function hasPendingRequests() { + for (var xhrId in this.pendingRequests) { + return true; + } + + return false; + } + }, { + key: "getRequestXhr", + value: function getRequestXhr(xhrId) { + return this.pendingRequests[xhrId].xhr; + } + }, { + key: "isPendingRequest", + value: function isPendingRequest(xhrId) { + return xhrId in this.pendingRequests; + } + }, { + key: "abortAllRequests", + value: function abortAllRequests() { + for (var xhrId in this.pendingRequests) { + this.abortRequest(xhrId | 0); + } + } + }, { + key: "abortRequest", + value: function abortRequest(xhrId) { + var xhr = this.pendingRequests[xhrId].xhr; + delete this.pendingRequests[xhrId]; + xhr.abort(); + } + }]); + + return NetworkManager; +}(); + +var PDFNetworkStream = +/*#__PURE__*/ +function () { + function PDFNetworkStream(source) { + _classCallCheck(this, PDFNetworkStream); + + this._source = source; + this._manager = new NetworkManager(source.url, { + httpHeaders: source.httpHeaders, + withCredentials: source.withCredentials + }); + this._rangeChunkSize = source.rangeChunkSize; this._fullRequestReader = null; this._rangeRequestReaders = []; } - _createClass(PDFFetchStream, [{ + _createClass(PDFNetworkStream, [{ + key: "_onRangeRequestReaderClosed", + value: function _onRangeRequestReaderClosed(reader) { + var i = this._rangeRequestReaders.indexOf(reader); + + if (i >= 0) { + this._rangeRequestReaders.splice(i, 1); + } + } + }, { key: "getFullReader", value: function getFullReader() { (0, _util.assert)(!this._fullRequestReader); - this._fullRequestReader = new PDFFetchStreamReader(this); + this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source); return this._fullRequestReader; } }, { key: "getRangeReader", value: function getRangeReader(begin, end) { - var reader = new PDFFetchStreamRangeReader(this, begin, end); + var reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end); + reader.onClosed = this._onRangeRequestReaderClosed.bind(this); this._rangeRequestReaders.push(reader); @@ -22625,137 +23816,184 @@ function () { } }]); - return PDFFetchStream; + return PDFNetworkStream; }(); -exports.PDFFetchStream = PDFFetchStream; +exports.PDFNetworkStream = PDFNetworkStream; -var PDFFetchStreamReader = +var PDFNetworkStreamFullRequestReader = /*#__PURE__*/ function () { - function PDFFetchStreamReader(stream) { - var _this = this; - - _classCallCheck(this, PDFFetchStreamReader); + function PDFNetworkStreamFullRequestReader(manager, source) { + _classCallCheck(this, PDFNetworkStreamFullRequestReader); - this._stream = stream; - this._reader = null; - this._loaded = 0; - this._filename = null; - var source = stream.source; - this._withCredentials = source.withCredentials; - this._contentLength = source.length; - this._headersCapability = (0, _util.createPromiseCapability)(); + this._manager = manager; + var args = { + onHeadersReceived: this._onHeadersReceived.bind(this), + onDone: this._onDone.bind(this), + onError: this._onError.bind(this), + onProgress: this._onProgress.bind(this) + }; + this._url = source.url; + this._fullRequestId = manager.requestFull(args); + this._headersReceivedCapability = (0, _util.createPromiseCapability)(); this._disableRange = source.disableRange || false; + this._contentLength = source.length; this._rangeChunkSize = source.rangeChunkSize; if (!this._rangeChunkSize && !this._disableRange) { this._disableRange = true; } - if (typeof AbortController !== 'undefined') { - this._abortController = new AbortController(); - } - - this._isStreamingSupported = !source.disableStream; - this._isRangeSupported = !source.disableRange; - this._headers = new Headers(); - - for (var property in this._stream.httpHeaders) { - var value = this._stream.httpHeaders[property]; - - if (typeof value === 'undefined') { - continue; - } - - this._headers.append(property, value); - } - - var url = source.url; - fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) { - if (!(0, _network_utils.validateResponseStatus)(response.status)) { - throw (0, _network_utils.createResponseStatusError)(response.status, url); - } + this._isStreamingSupported = false; + this._isRangeSupported = false; + this._cachedChunks = []; + this._requests = []; + this._done = false; + this._storedError = undefined; + this._filename = null; + this.onProgress = null; + } - _this._reader = response.body.getReader(); + _createClass(PDFNetworkStreamFullRequestReader, [{ + key: "_onHeadersReceived", + value: function _onHeadersReceived() { + var fullRequestXhrId = this._fullRequestId; - _this._headersCapability.resolve(); + var fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId); var getResponseHeader = function getResponseHeader(name) { - return response.headers.get(name); + return fullRequestXhr.getResponseHeader(name); }; var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({ getResponseHeader: getResponseHeader, - isHttp: _this._stream.isHttp, - rangeChunkSize: _this._rangeChunkSize, - disableRange: _this._disableRange + isHttp: this._manager.isHttp, + rangeChunkSize: this._rangeChunkSize, + disableRange: this._disableRange }), allowRangeRequests = _validateRangeRequest.allowRangeRequests, suggestedLength = _validateRangeRequest.suggestedLength; - _this._isRangeSupported = allowRangeRequests; - _this._contentLength = suggestedLength || _this._contentLength; - _this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + if (allowRangeRequests) { + this._isRangeSupported = true; + } - if (!_this._isStreamingSupported && _this._isRangeSupported) { - _this.cancel(new _util.AbortException('streaming is disabled')); + this._contentLength = suggestedLength || this._contentLength; + this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + + if (this._isRangeSupported) { + this._manager.abortRequest(fullRequestXhrId); } - }).catch(this._headersCapability.reject); - this.onProgress = null; - } - _createClass(PDFFetchStreamReader, [{ + this._headersReceivedCapability.resolve(); + } + }, { + key: "_onDone", + value: function _onDone(args) { + if (args) { + if (this._requests.length > 0) { + var requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: args.chunk, + done: false + }); + } else { + this._cachedChunks.push(args.chunk); + } + } + + this._done = true; + + if (this._cachedChunks.length > 0) { + return; + } + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + } + }, { + key: "_onError", + value: function _onError(status) { + var url = this._url; + var exception = (0, _network_utils.createResponseStatusError)(status, url); + this._storedError = exception; + + this._headersReceivedCapability.reject(exception); + + this._requests.forEach(function (requestCapability) { + requestCapability.reject(exception); + }); + + this._requests = []; + this._cachedChunks = []; + } + }, { + key: "_onProgress", + value: function _onProgress(data) { + if (this.onProgress) { + this.onProgress({ + loaded: data.loaded, + total: data.lengthComputable ? data.total : this._contentLength + }); + } + } + }, { key: "read", value: function () { var _read = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { - var _ref, value, done, buffer; - - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee() { + var chunk, requestCapability; + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - _context.next = 2; - return this._headersCapability.promise; - - case 2: - _context.next = 4; - return this._reader.read(); + if (!this._storedError) { + _context.next = 2; + break; + } - case 4: - _ref = _context.sent; - value = _ref.value; - done = _ref.done; + throw this._storedError; - if (!done) { - _context.next = 9; + case 2: + if (!(this._cachedChunks.length > 0)) { + _context.next = 5; break; } + chunk = this._cachedChunks.shift(); return _context.abrupt("return", { - value: value, - done: done + value: chunk, + done: false }); - case 9: - this._loaded += value.byteLength; - - if (this.onProgress) { - this.onProgress({ - loaded: this._loaded, - total: this._contentLength - }); + case 5: + if (!this._done) { + _context.next = 7; + break; } - buffer = new Uint8Array(value).buffer; return _context.abrupt("return", { - value: buffer, - done: false + value: undefined, + done: true }); - case 13: + case 7: + requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return _context.abrupt("return", requestCapability.promise); + + case 10: case "end": return _context.stop(); } @@ -22772,29 +24010,30 @@ function () { }, { key: "cancel", value: function cancel(reason) { - if (this._reader) { - this._reader.cancel(reason); - } + this._done = true; - if (this._abortController) { - this._abortController.abort(); + this._headersReceivedCapability.reject(reason); + + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + + if (this._manager.isPendingRequest(this._fullRequestId)) { + this._manager.abortRequest(this._fullRequestId); } - } - }, { - key: "headersReady", - get: function get() { - return this._headersCapability.promise; + + this._fullRequestReader = null; } }, { key: "filename", get: function get() { return this._filename; } - }, { - key: "contentLength", - get: function get() { - return this._contentLength; - } }, { key: "isRangeSupported", get: function get() { @@ -22805,110 +24044,127 @@ function () { get: function get() { return this._isStreamingSupported; } + }, { + key: "contentLength", + get: function get() { + return this._contentLength; + } + }, { + key: "headersReady", + get: function get() { + return this._headersReceivedCapability.promise; + } }]); - return PDFFetchStreamReader; + return PDFNetworkStreamFullRequestReader; }(); -var PDFFetchStreamRangeReader = +var PDFNetworkStreamRangeRequestReader = /*#__PURE__*/ function () { - function PDFFetchStreamRangeReader(stream, begin, end) { - var _this2 = this; - - _classCallCheck(this, PDFFetchStreamRangeReader); + function PDFNetworkStreamRangeRequestReader(manager, begin, end) { + _classCallCheck(this, PDFNetworkStreamRangeRequestReader); - this._stream = stream; - this._reader = null; - this._loaded = 0; - var source = stream.source; - this._withCredentials = source.withCredentials; - this._readCapability = (0, _util.createPromiseCapability)(); - this._isStreamingSupported = !source.disableStream; + this._manager = manager; + var args = { + onDone: this._onDone.bind(this), + onProgress: this._onProgress.bind(this) + }; + this._requestId = manager.requestRange(begin, end, args); + this._requests = []; + this._queuedChunk = null; + this._done = false; + this.onProgress = null; + this.onClosed = null; + } - if (typeof AbortController !== 'undefined') { - this._abortController = new AbortController(); + _createClass(PDFNetworkStreamRangeRequestReader, [{ + key: "_close", + value: function _close() { + if (this.onClosed) { + this.onClosed(this); + } } + }, { + key: "_onDone", + value: function _onDone(data) { + var chunk = data.chunk; - this._headers = new Headers(); - - for (var property in this._stream.httpHeaders) { - var value = this._stream.httpHeaders[property]; + if (this._requests.length > 0) { + var requestCapability = this._requests.shift(); - if (typeof value === 'undefined') { - continue; + requestCapability.resolve({ + value: chunk, + done: false + }); + } else { + this._queuedChunk = chunk; } - this._headers.append(property, value); - } + this._done = true; - var rangeStr = begin + '-' + (end - 1); + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); - this._headers.append('Range', 'bytes=' + rangeStr); + this._requests = []; - var url = source.url; - fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) { - if (!(0, _network_utils.validateResponseStatus)(response.status)) { - throw (0, _network_utils.createResponseStatusError)(response.status, url); + this._close(); + } + }, { + key: "_onProgress", + value: function _onProgress(evt) { + if (!this.isStreamingSupported && this.onProgress) { + this.onProgress({ + loaded: evt.loaded + }); } - - _this2._readCapability.resolve(); - - _this2._reader = response.body.getReader(); - }); - this.onProgress = null; - } - - _createClass(PDFFetchStreamRangeReader, [{ + } + }, { key: "read", value: function () { var _read2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { - var _ref2, value, done, buffer; - - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2() { + var chunk, requestCapability; + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: - _context2.next = 2; - return this._readCapability.promise; + if (!(this._queuedChunk !== null)) { + _context2.next = 4; + break; + } - case 2: - _context2.next = 4; - return this._reader.read(); + chunk = this._queuedChunk; + this._queuedChunk = null; + return _context2.abrupt("return", { + value: chunk, + done: false + }); case 4: - _ref2 = _context2.sent; - value = _ref2.value; - done = _ref2.done; - - if (!done) { - _context2.next = 9; + if (!this._done) { + _context2.next = 6; break; } return _context2.abrupt("return", { - value: value, - done: done + value: undefined, + done: true }); - case 9: - this._loaded += value.byteLength; + case 6: + requestCapability = (0, _util.createPromiseCapability)(); - if (this.onProgress) { - this.onProgress({ - loaded: this._loaded - }); - } + this._requests.push(requestCapability); - buffer = new Uint8Array(value).buffer; - return _context2.abrupt("return", { - value: buffer, - done: false - }); + return _context2.abrupt("return", requestCapability.promise); - case 13: + case 9: case "end": return _context2.stop(); } @@ -22925,22 +24181,31 @@ function () { }, { key: "cancel", value: function cancel(reason) { - if (this._reader) { - this._reader.cancel(reason); - } + this._done = true; - if (this._abortController) { - this._abortController.abort(); + this._requests.forEach(function (requestCapability) { + requestCapability.resolve({ + value: undefined, + done: true + }); + }); + + this._requests = []; + + if (this._manager.isPendingRequest(this._requestId)) { + this._manager.abortRequest(this._requestId); } + + this._close(); } }, { key: "isStreamingSupported", get: function get() { - return this._isStreamingSupported; + return false; } }]); - return PDFFetchStreamRangeReader; + return PDFNetworkStreamRangeRequestReader; }(); /***/ }), @@ -22953,645 +24218,405 @@ function () { Object.defineProperty(exports, "__esModule", { value: true }); -exports.PDFNetworkStream = PDFNetworkStream; -exports.NetworkManager = NetworkManager; +exports.PDFFetchStream = void 0; -var _regenerator = _interopRequireDefault(__w_pdfjs_require__(147)); +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(148)); var _util = __w_pdfjs_require__(1); var _network_utils = __w_pdfjs_require__(166); -var _global_scope = _interopRequireDefault(__w_pdfjs_require__(3)); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -; -var OK_RESPONSE = 200; -var PARTIAL_CONTENT_RESPONSE = 206; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function NetworkManager(url, args) { - this.url = url; - args = args || {}; - this.isHttp = /^https?:/i.test(url); - this.httpHeaders = this.isHttp && args.httpHeaders || {}; - this.withCredentials = args.withCredentials || false; +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); } } - this.getXhr = args.getXhr || function NetworkManager_getXhr() { - return new XMLHttpRequest(); - }; +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - this.currXhrId = 0; - this.pendingRequests = Object.create(null); - this.loadedRequests = Object.create(null); +function createFetchOptions(headers, withCredentials, abortController) { + return { + method: 'GET', + headers: headers, + signal: abortController && abortController.signal, + mode: 'cors', + credentials: withCredentials ? 'include' : 'same-origin', + redirect: 'follow' + }; } -function getArrayBuffer(xhr) { - var data = xhr.response; +var PDFFetchStream = +/*#__PURE__*/ +function () { + function PDFFetchStream(source) { + _classCallCheck(this, PDFFetchStream); - if (typeof data !== 'string') { - return data; + this.source = source; + this.isHttp = /^https?:/i.test(source.url); + this.httpHeaders = this.isHttp && source.httpHeaders || {}; + this._fullRequestReader = null; + this._rangeRequestReaders = []; } - var array = (0, _util.stringToBytes)(data); - return array.buffer; -} + _createClass(PDFFetchStream, [{ + key: "getFullReader", + value: function getFullReader() { + (0, _util.assert)(!this._fullRequestReader); + this._fullRequestReader = new PDFFetchStreamReader(this); + return this._fullRequestReader; + } + }, { + key: "getRangeReader", + value: function getRangeReader(begin, end) { + if (end <= this._progressiveDataLength) { + return null; + } -var supportsMozChunked = function supportsMozChunkedClosure() { - try { - var x = new XMLHttpRequest(); - x.open('GET', _global_scope.default.location.href); - x.responseType = 'moz-chunked-arraybuffer'; - return x.responseType === 'moz-chunked-arraybuffer'; - } catch (e) { - return false; - } -}(); + var reader = new PDFFetchStreamRangeReader(this, begin, end); -NetworkManager.prototype = { - requestRange: function NetworkManager_requestRange(begin, end, listeners) { - var args = { - begin: begin, - end: end - }; + this._rangeRequestReaders.push(reader); - for (var prop in listeners) { - args[prop] = listeners[prop]; + return reader; } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } - return this.request(args); - }, - requestFull: function NetworkManager_requestFull(listeners) { - return this.request(listeners); - }, - request: function NetworkManager_request(args) { - var xhr = this.getXhr(); - var xhrId = this.currXhrId++; - var pendingRequest = this.pendingRequests[xhrId] = { - xhr: xhr - }; - xhr.open('GET', this.url); - xhr.withCredentials = this.withCredentials; - - for (var property in this.httpHeaders) { - var value = this.httpHeaders[property]; + var readers = this._rangeRequestReaders.slice(0); - if (typeof value === 'undefined') { - continue; - } - - xhr.setRequestHeader(property, value); - } - - if (this.isHttp && 'begin' in args && 'end' in args) { - var rangeStr = args.begin + '-' + (args.end - 1); - xhr.setRequestHeader('Range', 'bytes=' + rangeStr); - pendingRequest.expectedStatus = 206; - } else { - pendingRequest.expectedStatus = 200; + readers.forEach(function (reader) { + reader.cancel(reason); + }); } - - var useMozChunkedLoading = supportsMozChunked && !!args.onProgressiveData; - - if (useMozChunkedLoading) { - xhr.responseType = 'moz-chunked-arraybuffer'; - pendingRequest.onProgressiveData = args.onProgressiveData; - pendingRequest.mozChunked = true; - } else { - xhr.responseType = 'arraybuffer'; + }, { + key: "_progressiveDataLength", + get: function get() { + return this._fullRequestReader ? this._fullRequestReader._loaded : 0; } + }]); - if (args.onError) { - xhr.onerror = function (evt) { - args.onError(xhr.status); - }; - } + return PDFFetchStream; +}(); - xhr.onreadystatechange = this.onStateChange.bind(this, xhrId); - xhr.onprogress = this.onProgress.bind(this, xhrId); - pendingRequest.onHeadersReceived = args.onHeadersReceived; - pendingRequest.onDone = args.onDone; - pendingRequest.onError = args.onError; - pendingRequest.onProgress = args.onProgress; - xhr.send(null); - return xhrId; - }, - onProgress: function NetworkManager_onProgress(xhrId, evt) { - var pendingRequest = this.pendingRequests[xhrId]; +exports.PDFFetchStream = PDFFetchStream; - if (!pendingRequest) { - return; - } +var PDFFetchStreamReader = +/*#__PURE__*/ +function () { + function PDFFetchStreamReader(stream) { + var _this = this; - if (pendingRequest.mozChunked) { - var chunk = getArrayBuffer(pendingRequest.xhr); - pendingRequest.onProgressiveData(chunk); - } + _classCallCheck(this, PDFFetchStreamReader); - var onProgress = pendingRequest.onProgress; + this._stream = stream; + this._reader = null; + this._loaded = 0; + this._filename = null; + var source = stream.source; + this._withCredentials = source.withCredentials || false; + this._contentLength = source.length; + this._headersCapability = (0, _util.createPromiseCapability)(); + this._disableRange = source.disableRange || false; + this._rangeChunkSize = source.rangeChunkSize; - if (onProgress) { - onProgress(evt); + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; } - }, - onStateChange: function NetworkManager_onStateChange(xhrId, evt) { - var pendingRequest = this.pendingRequests[xhrId]; - if (!pendingRequest) { - return; + if (typeof AbortController !== 'undefined') { + this._abortController = new AbortController(); } - var xhr = pendingRequest.xhr; + this._isStreamingSupported = !source.disableStream; + this._isRangeSupported = !source.disableRange; + this._headers = new Headers(); - if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) { - pendingRequest.onHeadersReceived(); - delete pendingRequest.onHeadersReceived; - } + for (var property in this._stream.httpHeaders) { + var value = this._stream.httpHeaders[property]; - if (xhr.readyState !== 4) { - return; - } + if (typeof value === 'undefined') { + continue; + } - if (!(xhrId in this.pendingRequests)) { - return; + this._headers.append(property, value); } - delete this.pendingRequests[xhrId]; - - if (xhr.status === 0 && this.isHttp) { - if (pendingRequest.onError) { - pendingRequest.onError(xhr.status); + var url = source.url; + fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) { + if (!(0, _network_utils.validateResponseStatus)(response.status)) { + throw (0, _network_utils.createResponseStatusError)(response.status, url); } - return; - } - - var xhrStatus = xhr.status || OK_RESPONSE; - var ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE; + _this._reader = response.body.getReader(); - if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { - if (pendingRequest.onError) { - pendingRequest.onError(xhr.status); - } + _this._headersCapability.resolve(); - return; - } + var getResponseHeader = function getResponseHeader(name) { + return response.headers.get(name); + }; - this.loadedRequests[xhrId] = true; - var chunk = getArrayBuffer(xhr); + var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader: getResponseHeader, + isHttp: _this._stream.isHttp, + rangeChunkSize: _this._rangeChunkSize, + disableRange: _this._disableRange + }), + allowRangeRequests = _validateRangeRequest.allowRangeRequests, + suggestedLength = _validateRangeRequest.suggestedLength; - if (xhrStatus === PARTIAL_CONTENT_RESPONSE) { - var rangeHeader = xhr.getResponseHeader('Content-Range'); - var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader); - var begin = parseInt(matches[1], 10); - pendingRequest.onDone({ - begin: begin, - chunk: chunk - }); - } else if (pendingRequest.onProgressiveData) { - pendingRequest.onDone(null); - } else if (chunk) { - pendingRequest.onDone({ - begin: 0, - chunk: chunk - }); - } else if (pendingRequest.onError) { - pendingRequest.onError(xhr.status); - } - }, - hasPendingRequests: function NetworkManager_hasPendingRequests() { - for (var xhrId in this.pendingRequests) { - return true; - } + _this._isRangeSupported = allowRangeRequests; + _this._contentLength = suggestedLength || _this._contentLength; + _this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); - return false; - }, - getRequestXhr: function NetworkManager_getXhr(xhrId) { - return this.pendingRequests[xhrId].xhr; - }, - isStreamingRequest: function NetworkManager_isStreamingRequest(xhrId) { - return !!this.pendingRequests[xhrId].onProgressiveData; - }, - isPendingRequest: function NetworkManager_isPendingRequest(xhrId) { - return xhrId in this.pendingRequests; - }, - isLoadedRequest: function NetworkManager_isLoadedRequest(xhrId) { - return xhrId in this.loadedRequests; - }, - abortAllRequests: function NetworkManager_abortAllRequests() { - for (var xhrId in this.pendingRequests) { - this.abortRequest(xhrId | 0); - } - }, - abortRequest: function NetworkManager_abortRequest(xhrId) { - var xhr = this.pendingRequests[xhrId].xhr; - delete this.pendingRequests[xhrId]; - xhr.abort(); + if (!_this._isStreamingSupported && _this._isRangeSupported) { + _this.cancel(new _util.AbortException('Streaming is disabled.')); + } + })["catch"](this._headersCapability.reject); + this.onProgress = null; } -}; -function PDFNetworkStream(source) { - this._source = source; - this._manager = new NetworkManager(source.url, { - httpHeaders: source.httpHeaders, - withCredentials: source.withCredentials - }); - this._rangeChunkSize = source.rangeChunkSize; - this._fullRequestReader = null; - this._rangeRequestReaders = []; -} + _createClass(PDFFetchStreamReader, [{ + key: "read", + value: function () { + var _read = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee() { + var _ref, value, done, buffer; -PDFNetworkStream.prototype = { - _onRangeRequestReaderClosed: function PDFNetworkStream_onRangeRequestReaderClosed(reader) { - var i = this._rangeRequestReaders.indexOf(reader); + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this._headersCapability.promise; - if (i >= 0) { - this._rangeRequestReaders.splice(i, 1); - } - }, - getFullReader: function PDFNetworkStream_getFullReader() { - (0, _util.assert)(!this._fullRequestReader); - this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source); - return this._fullRequestReader; - }, - getRangeReader: function PDFNetworkStream_getRangeReader(begin, end) { - var reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end); - reader.onClosed = this._onRangeRequestReaderClosed.bind(this); + case 2: + _context.next = 4; + return this._reader.read(); - this._rangeRequestReaders.push(reader); + case 4: + _ref = _context.sent; + value = _ref.value; + done = _ref.done; - return reader; - }, - cancelAllRequests: function PDFNetworkStream_cancelAllRequests(reason) { - if (this._fullRequestReader) { - this._fullRequestReader.cancel(reason); - } + if (!done) { + _context.next = 9; + break; + } - var readers = this._rangeRequestReaders.slice(0); + return _context.abrupt("return", { + value: value, + done: done + }); - readers.forEach(function (reader) { - reader.cancel(reason); - }); - } -}; + case 9: + this._loaded += value.byteLength; -function PDFNetworkStreamFullRequestReader(manager, source) { - this._manager = manager; - var args = { - onHeadersReceived: this._onHeadersReceived.bind(this), - onProgressiveData: source.disableStream ? null : this._onProgressiveData.bind(this), - onDone: this._onDone.bind(this), - onError: this._onError.bind(this), - onProgress: this._onProgress.bind(this) - }; - this._url = source.url; - this._fullRequestId = manager.requestFull(args); - this._headersReceivedCapability = (0, _util.createPromiseCapability)(); - this._disableRange = source.disableRange || false; - this._contentLength = source.length; - this._rangeChunkSize = source.rangeChunkSize; - - if (!this._rangeChunkSize && !this._disableRange) { - this._disableRange = true; - } - - this._isStreamingSupported = false; - this._isRangeSupported = false; - this._cachedChunks = []; - this._requests = []; - this._done = false; - this._storedError = undefined; - this._filename = null; - this.onProgress = null; -} + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded, + total: this._contentLength + }); + } -PDFNetworkStreamFullRequestReader.prototype = { - _onHeadersReceived: function PDFNetworkStreamFullRequestReader_onHeadersReceived() { - var fullRequestXhrId = this._fullRequestId; + buffer = new Uint8Array(value).buffer; + return _context.abrupt("return", { + value: buffer, + done: false + }); - var fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId); + case 13: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); - var getResponseHeader = function getResponseHeader(name) { - return fullRequestXhr.getResponseHeader(name); - }; + function read() { + return _read.apply(this, arguments); + } - var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({ - getResponseHeader: getResponseHeader, - isHttp: this._manager.isHttp, - rangeChunkSize: this._rangeChunkSize, - disableRange: this._disableRange - }), - allowRangeRequests = _validateRangeRequest.allowRangeRequests, - suggestedLength = _validateRangeRequest.suggestedLength; + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + if (this._reader) { + this._reader.cancel(reason); + } - if (allowRangeRequests) { - this._isRangeSupported = true; + if (this._abortController) { + this._abortController.abort(); + } } - - this._contentLength = suggestedLength || this._contentLength; - this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); - var networkManager = this._manager; - - if (networkManager.isStreamingRequest(fullRequestXhrId)) { - this._isStreamingSupported = true; - } else if (this._isRangeSupported) { - networkManager.abortRequest(fullRequestXhrId); + }, { + key: "headersReady", + get: function get() { + return this._headersCapability.promise; } - - this._headersReceivedCapability.resolve(); - }, - _onProgressiveData: function PDFNetworkStreamFullRequestReader_onProgressiveData(chunk) { - if (this._requests.length > 0) { - var requestCapability = this._requests.shift(); - - requestCapability.resolve({ - value: chunk, - done: false - }); - } else { - this._cachedChunks.push(chunk); + }, { + key: "filename", + get: function get() { + return this._filename; } - }, - _onDone: function PDFNetworkStreamFullRequestReader_onDone(args) { - if (args) { - this._onProgressiveData(args.chunk); + }, { + key: "contentLength", + get: function get() { + return this._contentLength; } - - this._done = true; - - if (this._cachedChunks.length > 0) { - return; + }, { + key: "isRangeSupported", + get: function get() { + return this._isRangeSupported; } - - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - - this._requests = []; - }, - _onError: function PDFNetworkStreamFullRequestReader_onError(status) { - var url = this._url; - var exception = (0, _network_utils.createResponseStatusError)(status, url); - this._storedError = exception; - - this._headersReceivedCapability.reject(exception); - - this._requests.forEach(function (requestCapability) { - requestCapability.reject(exception); - }); - - this._requests = []; - this._cachedChunks = []; - }, - _onProgress: function PDFNetworkStreamFullRequestReader_onProgress(data) { - if (this.onProgress) { - this.onProgress({ - loaded: data.loaded, - total: data.lengthComputable ? data.total : this._contentLength - }); + }, { + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; } - }, - - get filename() { - return this._filename; - }, - - get isRangeSupported() { - return this._isRangeSupported; - }, - - get isStreamingSupported() { - return this._isStreamingSupported; - }, - - get contentLength() { - return this._contentLength; - }, - - get headersReady() { - return this._headersReceivedCapability.promise; - }, - - read: function () { - var _read = _asyncToGenerator( - /*#__PURE__*/ - _regenerator.default.mark(function _callee() { - var chunk, requestCapability; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!this._storedError) { - _context.next = 2; - break; - } - - throw this._storedError; - - case 2: - if (!(this._cachedChunks.length > 0)) { - _context.next = 5; - break; - } - - chunk = this._cachedChunks.shift(); - return _context.abrupt("return", { - value: chunk, - done: false - }); - - case 5: - if (!this._done) { - _context.next = 7; - break; - } - - return _context.abrupt("return", { - value: undefined, - done: true - }); + }]); - case 7: - requestCapability = (0, _util.createPromiseCapability)(); + return PDFFetchStreamReader; +}(); - this._requests.push(requestCapability); +var PDFFetchStreamRangeReader = +/*#__PURE__*/ +function () { + function PDFFetchStreamRangeReader(stream, begin, end) { + var _this2 = this; - return _context.abrupt("return", requestCapability.promise); + _classCallCheck(this, PDFFetchStreamRangeReader); - case 10: - case "end": - return _context.stop(); - } - } - }, _callee, this); - })); + this._stream = stream; + this._reader = null; + this._loaded = 0; + var source = stream.source; + this._withCredentials = source.withCredentials || false; + this._readCapability = (0, _util.createPromiseCapability)(); + this._isStreamingSupported = !source.disableStream; - function read() { - return _read.apply(this, arguments); + if (typeof AbortController !== 'undefined') { + this._abortController = new AbortController(); } - return read; - }(), - cancel: function PDFNetworkStreamFullRequestReader_cancel(reason) { - this._done = true; - - this._headersReceivedCapability.reject(reason); - - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); - - this._requests = []; - - if (this._manager.isPendingRequest(this._fullRequestId)) { - this._manager.abortRequest(this._fullRequestId); - } + this._headers = new Headers(); - this._fullRequestReader = null; - } -}; + for (var property in this._stream.httpHeaders) { + var value = this._stream.httpHeaders[property]; -function PDFNetworkStreamRangeRequestReader(manager, begin, end) { - this._manager = manager; - var args = { - onDone: this._onDone.bind(this), - onProgress: this._onProgress.bind(this) - }; - this._requestId = manager.requestRange(begin, end, args); - this._requests = []; - this._queuedChunk = null; - this._done = false; - this.onProgress = null; - this.onClosed = null; -} + if (typeof value === 'undefined') { + continue; + } -PDFNetworkStreamRangeRequestReader.prototype = { - _close: function PDFNetworkStreamRangeRequestReader_close() { - if (this.onClosed) { - this.onClosed(this); + this._headers.append(property, value); } - }, - _onDone: function PDFNetworkStreamRangeRequestReader_onDone(data) { - var chunk = data.chunk; - if (this._requests.length > 0) { - var requestCapability = this._requests.shift(); + this._headers.append('Range', "bytes=".concat(begin, "-").concat(end - 1)); - requestCapability.resolve({ - value: chunk, - done: false - }); - } else { - this._queuedChunk = chunk; - } + var url = source.url; + fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) { + if (!(0, _network_utils.validateResponseStatus)(response.status)) { + throw (0, _network_utils.createResponseStatusError)(response.status, url); + } - this._done = true; + _this2._readCapability.resolve(); - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); + _this2._reader = response.body.getReader(); }); + this.onProgress = null; + } - this._requests = []; - - this._close(); - }, - _onProgress: function PDFNetworkStreamRangeRequestReader_onProgress(evt) { - if (!this.isStreamingSupported && this.onProgress) { - this.onProgress({ - loaded: evt.loaded - }); - } - }, + _createClass(PDFFetchStreamRangeReader, [{ + key: "read", + value: function () { + var _read2 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee2() { + var _ref2, value, done, buffer; - get isStreamingSupported() { - return false; - }, + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this._readCapability.promise; - read: function () { - var _read2 = _asyncToGenerator( - /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { - var chunk, requestCapability; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (!(this._queuedChunk !== null)) { + case 2: _context2.next = 4; - break; - } + return this._reader.read(); - chunk = this._queuedChunk; - this._queuedChunk = null; - return _context2.abrupt("return", { - value: chunk, - done: false - }); + case 4: + _ref2 = _context2.sent; + value = _ref2.value; + done = _ref2.done; - case 4: - if (!this._done) { - _context2.next = 6; - break; - } + if (!done) { + _context2.next = 9; + break; + } - return _context2.abrupt("return", { - value: undefined, - done: true - }); + return _context2.abrupt("return", { + value: value, + done: done + }); - case 6: - requestCapability = (0, _util.createPromiseCapability)(); + case 9: + this._loaded += value.byteLength; - this._requests.push(requestCapability); + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded + }); + } - return _context2.abrupt("return", requestCapability.promise); + buffer = new Uint8Array(value).buffer; + return _context2.abrupt("return", { + value: buffer, + done: false + }); - case 9: - case "end": - return _context2.stop(); + case 13: + case "end": + return _context2.stop(); + } } - } - }, _callee2, this); - })); - - function read() { - return _read2.apply(this, arguments); - } - - return read; - }(), - cancel: function PDFNetworkStreamRangeRequestReader_cancel(reason) { - this._done = true; + }, _callee2, this); + })); - this._requests.forEach(function (requestCapability) { - requestCapability.resolve({ - value: undefined, - done: true - }); - }); + function read() { + return _read2.apply(this, arguments); + } - this._requests = []; + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + if (this._reader) { + this._reader.cancel(reason); + } - if (this._manager.isPendingRequest(this._requestId)) { - this._manager.abortRequest(this._requestId); + if (this._abortController) { + this._abortController.abort(); + } + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; } + }]); - this._close(); - } -}; + return PDFFetchStreamRangeReader; +}(); /***/ }) /******/ ]); diff --git a/cps/static/js/libs/pdf.worker.js b/cps/static/js/libs/pdf.worker.js index 8a362bd7..211fbbdc 100644 --- a/cps/static/js/libs/pdf.worker.js +++ b/cps/static/js/libs/pdf.worker.js @@ -2,7 +2,7 @@ * @licstart The following is the entire license notice for the * Javascript code in this page * - * Copyright 2018 Mozilla Foundation + * Copyright 2019 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap "use strict"; -var pdfjsVersion = '2.1.266'; -var pdfjsBuild = '81f5835c'; +var pdfjsVersion = '2.2.228'; +var pdfjsBuild = 'd7afb74a'; var pdfjsCoreWorker = __w_pdfjs_require__(1); @@ -144,17 +144,21 @@ exports.WorkerMessageHandler = exports.WorkerTask = void 0; var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _pdf_manager = __w_pdfjs_require__(151); +var _primitives = __w_pdfjs_require__(151); -var _is_node = _interopRequireDefault(__w_pdfjs_require__(9)); +var _pdf_manager = __w_pdfjs_require__(152); -var _message_handler = __w_pdfjs_require__(189); +var _is_node = _interopRequireDefault(__w_pdfjs_require__(8)); -var _primitives = __w_pdfjs_require__(155); +var _message_handler = __w_pdfjs_require__(191); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _worker_stream = __w_pdfjs_require__(192); + +var _core_utils = __w_pdfjs_require__(154); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -198,141 +202,6 @@ var WorkerTask = function WorkerTaskClosure() { }(); exports.WorkerTask = WorkerTask; - -var PDFWorkerStream = function PDFWorkerStreamClosure() { - function PDFWorkerStream(msgHandler) { - this._msgHandler = msgHandler; - this._contentLength = null; - this._fullRequestReader = null; - this._rangeRequestReaders = []; - } - - PDFWorkerStream.prototype = { - getFullReader: function getFullReader() { - (0, _util.assert)(!this._fullRequestReader); - this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); - return this._fullRequestReader; - }, - getRangeReader: function getRangeReader(begin, end) { - var reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler); - - this._rangeRequestReaders.push(reader); - - return reader; - }, - cancelAllRequests: function cancelAllRequests(reason) { - if (this._fullRequestReader) { - this._fullRequestReader.cancel(reason); - } - - var readers = this._rangeRequestReaders.slice(0); - - readers.forEach(function (reader) { - reader.cancel(reason); - }); - } - }; - - function PDFWorkerStreamReader(msgHandler) { - var _this = this; - - this._msgHandler = msgHandler; - this._contentLength = null; - this._isRangeSupported = false; - this._isStreamingSupported = false; - - var readableStream = this._msgHandler.sendWithStream('GetReader'); - - this._reader = readableStream.getReader(); - this._headersReady = this._msgHandler.sendWithPromise('ReaderHeadersReady').then(function (data) { - _this._isStreamingSupported = data.isStreamingSupported; - _this._isRangeSupported = data.isRangeSupported; - _this._contentLength = data.contentLength; - }); - } - - PDFWorkerStreamReader.prototype = { - get headersReady() { - return this._headersReady; - }, - - get contentLength() { - return this._contentLength; - }, - - get isStreamingSupported() { - return this._isStreamingSupported; - }, - - get isRangeSupported() { - return this._isRangeSupported; - }, - - read: function read() { - return this._reader.read().then(function (_ref) { - var value = _ref.value, - done = _ref.done; - - if (done) { - return { - value: undefined, - done: true - }; - } - - return { - value: value.buffer, - done: false - }; - }); - }, - cancel: function cancel(reason) { - this._reader.cancel(reason); - } - }; - - function PDFWorkerStreamRangeReader(begin, end, msgHandler) { - this._msgHandler = msgHandler; - this.onProgress = null; - - var readableStream = this._msgHandler.sendWithStream('GetRangeReader', { - begin: begin, - end: end - }); - - this._reader = readableStream.getReader(); - } - - PDFWorkerStreamRangeReader.prototype = { - get isStreamingSupported() { - return false; - }, - - read: function read() { - return this._reader.read().then(function (_ref2) { - var value = _ref2.value, - done = _ref2.done; - - if (done) { - return { - value: undefined, - done: true - }; - } - - return { - value: value.buffer, - done: false - }; - }); - }, - cancel: function cancel(reason) { - this._reader.cancel(reason); - } - }; - return PDFWorkerStream; -}(); - var WorkerMessageHandler = { setup: function setup(handler, port) { var testMessageProcessed = false; @@ -381,8 +250,9 @@ var WorkerMessageHandler = { var terminated = false; var cancelXHRs = null; var WorkerTasks = []; + var verbosity = (0, _util.getVerbosityLevel)(); var apiVersion = docParams.apiVersion; - var workerVersion = '2.1.266'; + var workerVersion = '2.2.228'; if (apiVersion !== workerVersion) { throw new Error("The API version \"".concat(apiVersion, "\" does not match ") + "the Worker version \"".concat(workerVersion, "\".")); @@ -417,10 +287,10 @@ var WorkerMessageHandler = { function _loadDocument() { _loadDocument = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(recoveryMode) { - var _ref6, _ref7, numPages, fingerprint; + _regenerator["default"].mark(function _callee(recoveryMode) { + var _ref4, _ref5, numPages, fingerprint; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -449,10 +319,10 @@ var WorkerMessageHandler = { return Promise.all([pdfManager.ensureDoc('numPages'), pdfManager.ensureDoc('fingerprint')]); case 11: - _ref6 = _context.sent; - _ref7 = _slicedToArray(_ref6, 2); - numPages = _ref7[0]; - fingerprint = _ref7[1]; + _ref4 = _context.sent; + _ref5 = _slicedToArray(_ref4, 2); + numPages = _ref5[0]; + fingerprint = _ref5[1]; return _context.abrupt("return", { numPages: numPages, fingerprint: fingerprint @@ -463,7 +333,7 @@ var WorkerMessageHandler = { return _context.stop(); } } - }, _callee, this); + }, _callee); })); return _loadDocument.apply(this, arguments); } @@ -488,7 +358,7 @@ var WorkerMessageHandler = { cachedChunks = []; try { - pdfStream = new PDFWorkerStream(handler); + pdfStream = new _worker_stream.PDFWorkerStream(handler); } catch (ex) { pdfManagerCapability.reject(ex); return pdfManagerCapability.promise; @@ -516,7 +386,7 @@ var WorkerMessageHandler = { cachedChunks = []; pdfManagerCapability.resolve(pdfManager); cancelXHRs = null; - }).catch(function (reason) { + })["catch"](function (reason) { pdfManagerCapability.reject(reason); cancelXHRs = null; }); @@ -577,7 +447,7 @@ var WorkerMessageHandler = { fullRequest.read().then(readChunk, reject); }); - readPromise.catch(function (e) { + readPromise["catch"](function (e) { pdfManagerCapability.reject(e); cancelXHRs = null; }); @@ -607,7 +477,7 @@ var WorkerMessageHandler = { finishWorkerTask(task); pdfManager.updatePassword(data.password); pdfManagerReady(); - }).catch(function (boundException) { + })["catch"](function (boundException) { finishWorkerTask(task); handler.send('PasswordException', boundException); }.bind(null, e)); @@ -627,7 +497,7 @@ var WorkerMessageHandler = { loadDocument(false).then(onSuccess, function loadFailure(ex) { ensureNotTerminated(); - if (!(ex instanceof _util.XRefParseException)) { + if (!(ex instanceof _core_utils.XRefParseException)) { onFailure(ex); return; } @@ -666,12 +536,12 @@ var WorkerMessageHandler = { handler.on('GetPage', function wphSetupGetPage(data) { return pdfManager.getPage(data.pageIndex).then(function (page) { - return Promise.all([pdfManager.ensure(page, 'rotate'), pdfManager.ensure(page, 'ref'), pdfManager.ensure(page, 'userUnit'), pdfManager.ensure(page, 'view')]).then(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 4), - rotate = _ref4[0], - ref = _ref4[1], - userUnit = _ref4[2], - view = _ref4[3]; + return Promise.all([pdfManager.ensure(page, 'rotate'), pdfManager.ensure(page, 'ref'), pdfManager.ensure(page, 'userUnit'), pdfManager.ensure(page, 'view')]).then(function (_ref) { + var _ref2 = _slicedToArray(_ref, 4), + rotate = _ref2[0], + ref = _ref2[1], + userUnit = _ref2[2], + view = _ref2[3]; return { rotate: rotate, @@ -683,7 +553,8 @@ var WorkerMessageHandler = { }); }); handler.on('GetPageIndex', function wphSetupGetPageIndex(data) { - var ref = new _primitives.Ref(data.ref.num, data.ref.gen); + var ref = _primitives.Ref.get(data.ref.num, data.ref.gen); + var catalog = pdfManager.pdfDocument.catalog; return catalog.getPageIndex(ref); }); @@ -696,10 +567,16 @@ var WorkerMessageHandler = { handler.on('GetPageLabels', function wphSetupGetPageLabels(data) { return pdfManager.ensureCatalog('pageLabels'); }); + handler.on('GetPageLayout', function wphSetupGetPageLayout(data) { + return pdfManager.ensureCatalog('pageLayout'); + }); handler.on('GetPageMode', function wphSetupGetPageMode(data) { return pdfManager.ensureCatalog('pageMode'); }); - handler.on('getOpenActionDestination', function (data) { + handler.on('GetViewerPreferences', function (data) { + return pdfManager.ensureCatalog('viewerPreferences'); + }); + handler.on('GetOpenActionDestination', function (data) { return pdfManager.ensureCatalog('openActionDestination'); }); handler.on('GetAttachments', function wphSetupGetAttachments(data) { @@ -726,9 +603,9 @@ var WorkerMessageHandler = { handler.on('GetStats', function wphSetupGetStats(data) { return pdfManager.pdfDocument.xref.stats; }); - handler.on('GetAnnotations', function (_ref5) { - var pageIndex = _ref5.pageIndex, - intent = _ref5.intent; + handler.on('GetAnnotations', function (_ref3) { + var pageIndex = _ref3.pageIndex, + intent = _ref3.intent; return pdfManager.getPage(pageIndex).then(function (page) { return page.getAnnotationsData(intent); }); @@ -738,8 +615,7 @@ var WorkerMessageHandler = { pdfManager.getPage(pageIndex).then(function (page) { var task = new WorkerTask('RenderPageRequest: page ' + pageIndex); startWorkerTask(task); - var pageNum = pageIndex + 1; - var start = Date.now(); + var start = verbosity >= _util.VerbosityLevel.INFOS ? Date.now() : 0; page.getOperatorList({ handler: handler, task: task, @@ -747,7 +623,10 @@ var WorkerMessageHandler = { renderInteractiveForms: data.renderInteractiveForms }).then(function (operatorList) { finishWorkerTask(task); - (0, _util.info)('page=' + pageNum + ' - getOperatorList: time=' + (Date.now() - start) + 'ms, len=' + operatorList.totalLength); + + if (start) { + (0, _util.info)("page=".concat(pageIndex + 1, " - getOperatorList: time=") + "".concat(Date.now() - start, "ms, len=").concat(operatorList.totalLength)); + } }, function (e) { finishWorkerTask(task); @@ -779,7 +658,7 @@ var WorkerMessageHandler = { } handler.send('PageError', { - pageNum: pageNum, + pageIndex: pageIndex, error: wrappedException, intent: data.intent }); @@ -796,8 +675,7 @@ var WorkerMessageHandler = { pdfManager.getPage(pageIndex).then(function (page) { var task = new WorkerTask('GetTextContent: page ' + pageIndex); startWorkerTask(task); - var pageNum = pageIndex + 1; - var start = Date.now(); + var start = verbosity >= _util.VerbosityLevel.INFOS ? Date.now() : 0; page.extractTextContent({ handler: handler, task: task, @@ -806,7 +684,11 @@ var WorkerMessageHandler = { combineTextItems: data.combineTextItems }).then(function () { finishWorkerTask(task); - (0, _util.info)('text indexing: page=' + pageNum + ' - time=' + (Date.now() - start) + 'ms'); + + if (start) { + (0, _util.info)("page=".concat(pageIndex + 1, " - getTextContent: time=") + "".concat(Date.now() - start, "ms")); + } + sink.close(); }, function (reason) { finishWorkerTask(task); @@ -838,6 +720,7 @@ var WorkerMessageHandler = { cancelXHRs(); } + (0, _primitives.clearPrimitiveCaches)(); var waitOn = []; WorkerTasks.forEach(function (task) { waitOn.push(task.finished); @@ -866,7 +749,7 @@ function isMessagePort(maybePort) { return typeof maybePort.postMessage === 'function' && 'onmessage' in maybePort; } -if (typeof window === 'undefined' && !(0, _is_node.default)() && typeof self !== 'undefined' && isMessagePort(self)) { +if (typeof window === 'undefined' && !(0, _is_node["default"])() && typeof self !== 'undefined' && isMessagePort(self)) { WorkerMessageHandler.initializeFromPort(self); } @@ -883,40 +766,12 @@ module.exports = __w_pdfjs_require__(3); /* 3 */ /***/ (function(module, exports, __w_pdfjs_require__) { -"use strict"; - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var g = function () { - return this || (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self; -}() || Function("return this")(); - -var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; -var oldRuntime = hadRuntime && g.regeneratorRuntime; -g.regeneratorRuntime = undefined; -module.exports = __w_pdfjs_require__(4); - -if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; -} else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } -} - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - "use strict"; /* WEBPACK VAR INJECTION */(function(module) { function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -!function (global) { +var runtime = function (exports) { "use strict"; var Op = Object.prototype; @@ -926,18 +781,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - var inModule = ( false ? undefined : _typeof(module)) === "object"; - var runtime = global.regeneratorRuntime; - - if (runtime) { - if (inModule) { - module.exports = runtime; - } - - return; - } - - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; @@ -947,7 +790,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return generator; } - runtime.wrap = wrap; + exports.wrap = wrap; function tryCatch(fn, obj, arg) { try { @@ -1001,12 +844,12 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat }); } - runtime.isGeneratorFunction = function (genFun) { + exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; - runtime.mark = function (genFun) { + exports.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { @@ -1021,7 +864,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return genFun; }; - runtime.awrap = function (arg) { + exports.awrap = function (arg) { return { __await: arg }; @@ -1075,11 +918,11 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return this; }; - runtime.AsyncIterator = AsyncIterator; + exports.AsyncIterator = AsyncIterator; - runtime.async = function (innerFn, outerFn, self, tryLocsList) { + exports.async = function (innerFn, outerFn, self, tryLocsList) { var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; @@ -1157,7 +1000,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat context.delegate = null; if (context.method === "throw") { - if (delegate.iterator.return) { + if (delegate.iterator["return"]) { context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); @@ -1251,7 +1094,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat this.reset(true); } - runtime.keys = function (object) { + exports.keys = function (object) { var keys = []; for (var key in object) { @@ -1312,7 +1155,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat }; } - runtime.values = values; + exports.values = values; function doneResult() { return { @@ -1490,13 +1333,18 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return ContinueSentinel; } }; -}(function () { - return this || (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self; -}() || Function("return this")()); -/* WEBPACK VAR INJECTION */}.call(this, __w_pdfjs_require__(5)(module))) + return exports; +}(( false ? undefined : _typeof(module)) === "object" ? module.exports : {}); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + Function("r", "regeneratorRuntime = r")(runtime); +} +/* WEBPACK VAR INJECTION */}.call(this, __w_pdfjs_require__(4)(module))) /***/ }), -/* 5 */ +/* 4 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1527,7 +1375,7 @@ module.exports = function (module) { }; /***/ }), -/* 6 */ +/* 5 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -1536,18 +1384,15 @@ module.exports = function (module) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.toRomanNumerals = toRomanNumerals; exports.arrayByteLength = arrayByteLength; exports.arraysToBytes = arraysToBytes; exports.assert = assert; exports.bytesToString = bytesToString; exports.createPromiseCapability = createPromiseCapability; -exports.deprecated = deprecated; -exports.getInheritableProperty = getInheritableProperty; -exports.getLookupTableFactory = getLookupTableFactory; exports.getVerbosityLevel = getVerbosityLevel; exports.info = info; exports.isArrayBuffer = isArrayBuffer; +exports.isArrayEqual = isArrayEqual; exports.isBool = isBool; exports.isEmptyObj = isEmptyObj; exports.isNum = isNum; @@ -1583,9 +1428,9 @@ Object.defineProperty(exports, "URL", { return _url_polyfill.URL; } }); -exports.createObjectURL = exports.FormatError = exports.XRefParseException = exports.XRefEntryException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = void 0; +exports.createObjectURL = exports.FormatError = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = void 0; -__w_pdfjs_require__(7); +__w_pdfjs_require__(6); var _streams_polyfill = __w_pdfjs_require__(147); @@ -1876,10 +1721,6 @@ function warn(msg) { } } -function deprecated(details) { - console.log('Deprecated API usage: ' + details); -} - function unreachable(msg) { throw new Error(msg); } @@ -1949,19 +1790,6 @@ function shadow(obj, prop, value) { return value; } -function getLookupTableFactory(initializer) { - var lookup; - return function () { - if (initializer) { - lookup = Object.create(null); - initializer(lookup); - initializer = null; - } - - return lookup; - }; -} - var PasswordException = function PasswordExceptionClosure() { function PasswordException(msg, code) { this.name = 'PasswordException'; @@ -2030,47 +1858,6 @@ var UnexpectedResponseException = function UnexpectedResponseExceptionClosure() exports.UnexpectedResponseException = UnexpectedResponseException; -var MissingDataException = function MissingDataExceptionClosure() { - function MissingDataException(begin, end) { - this.begin = begin; - this.end = end; - this.message = 'Missing data [' + begin + ', ' + end + ')'; - } - - MissingDataException.prototype = new Error(); - MissingDataException.prototype.name = 'MissingDataException'; - MissingDataException.constructor = MissingDataException; - return MissingDataException; -}(); - -exports.MissingDataException = MissingDataException; - -var XRefEntryException = function XRefEntryExceptionClosure() { - function XRefEntryException(msg) { - this.message = msg; - } - - XRefEntryException.prototype = new Error(); - XRefEntryException.prototype.name = 'XRefEntryException'; - XRefEntryException.constructor = XRefEntryException; - return XRefEntryException; -}(); - -exports.XRefEntryException = XRefEntryException; - -var XRefParseException = function XRefParseExceptionClosure() { - function XRefParseException(msg) { - this.message = msg; - } - - XRefParseException.prototype = new Error(); - XRefParseException.prototype.name = 'XRefParseException'; - XRefParseException.constructor = XRefParseException; - return XRefParseException; -}(); - -exports.XRefParseException = XRefParseException; - var FormatError = function FormatErrorClosure() { function FormatError(msg) { this.message = msg; @@ -2226,43 +2013,6 @@ function isEvalSupported() { } } -function getInheritableProperty(_ref) { - var dict = _ref.dict, - key = _ref.key, - _ref$getArray = _ref.getArray, - getArray = _ref$getArray === void 0 ? false : _ref$getArray, - _ref$stopWhenFound = _ref.stopWhenFound, - stopWhenFound = _ref$stopWhenFound === void 0 ? true : _ref$stopWhenFound; - var LOOP_LIMIT = 100; - var loopCount = 0; - var values; - - while (dict) { - var value = getArray ? dict.getArray(key) : dict.get(key); - - if (value !== undefined) { - if (stopWhenFound) { - return value; - } - - if (!values) { - values = []; - } - - values.push(value); - } - - if (++loopCount > LOOP_LIMIT) { - warn("getInheritableProperty: maximum loop count exceeded for \"".concat(key, "\"")); - break; - } - - dict = dict.get('Parent'); - } - - return values; -} - var Util = function UtilClosure() { function Util() {} @@ -2370,30 +2120,6 @@ var Util = function UtilClosure() { }(); exports.Util = Util; -var ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX']; - -function toRomanNumerals(number) { - var lowerCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - assert(Number.isInteger(number) && number > 0, 'The number should be a positive integer.'); - var pos, - romanBuf = []; - - while (number >= 1000) { - number -= 1000; - romanBuf.push('M'); - } - - pos = number / 100 | 0; - number %= 100; - romanBuf.push(ROMAN_NUMBER_MAP[pos]); - pos = number / 10 | 0; - number %= 10; - romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); - romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); - var romanStr = romanBuf.join(''); - return lowerCase ? romanStr.toLowerCase() : romanStr; -} - var PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC]; function stringToPDFString(str) { @@ -2447,6 +2173,16 @@ function isArrayBuffer(v) { return _typeof(v) === 'object' && v !== null && v.byteLength !== undefined; } +function isArrayEqual(arr1, arr2) { + if (arr1.length !== arr2.length) { + return false; + } + + return arr1.every(function (element, index) { + return element === arr2[index]; + }); +} + function isSpace(ch) { return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; } @@ -2505,7 +2241,7 @@ var createObjectURL = function createObjectURLClosure() { exports.createObjectURL = createObjectURL; /***/ }), -/* 7 */ +/* 6 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2513,12 +2249,12 @@ exports.createObjectURL = createObjectURL; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -var globalScope = __w_pdfjs_require__(8); +var globalScope = __w_pdfjs_require__(7); if (!globalScope._pdfjsCompatibilityChecked) { globalScope._pdfjsCompatibilityChecked = true; - var isNodeJS = __w_pdfjs_require__(9); + var isNodeJS = __w_pdfjs_require__(8); var hasDOM = (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object'; @@ -2578,8 +2314,8 @@ if (!globalScope._pdfjsCompatibilityChecked) { tokens[_key] = arguments[_key]; } - for (var _i = 0; _i < tokens.length; _i++) { - var token = tokens[_i]; + for (var _i = 0, _tokens = tokens; _i < _tokens.length; _i++) { + var token = _tokens[_i]; OriginalDOMTokenListAdd.call(this, token); } }; @@ -2589,8 +2325,8 @@ if (!globalScope._pdfjsCompatibilityChecked) { tokens[_key2] = arguments[_key2]; } - for (var _i2 = 0; _i2 < tokens.length; _i2++) { - var token = tokens[_i2]; + for (var _i2 = 0, _tokens2 = tokens; _i2 < _tokens2.length; _i2++) { + var token = _tokens2[_i2]; OriginalDOMTokenListRemove.call(this, token); } }; @@ -2618,7 +2354,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { return; } - __w_pdfjs_require__(10); + __w_pdfjs_require__(9); })(); (function checkStringEndsWith() { @@ -2686,7 +2422,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { })(); (function checkPromise() { - if (globalScope.Promise && globalScope.Promise.prototype && globalScope.Promise.prototype.finally) { + if (globalScope.Promise && globalScope.Promise.prototype && globalScope.Promise.prototype["finally"]) { return; } @@ -2759,7 +2495,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { } /***/ }), -/* 8 */ +/* 7 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2768,7 +2504,7 @@ if (!globalScope._pdfjsCompatibilityChecked) { module.exports = typeof window !== 'undefined' && window.Math === Math ? window : typeof global !== 'undefined' && global.Math === Math ? global : typeof self !== 'undefined' && self.Math === Math ? self : {}; /***/ }), -/* 9 */ +/* 8 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2777,32 +2513,32 @@ module.exports = typeof window !== 'undefined' && window.Math === Math ? window function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } module.exports = function isNodeJS() { - return (typeof process === "undefined" ? "undefined" : _typeof(process)) === 'object' && process + '' === '[object process]' && !process.versions['nw']; + return (typeof process === "undefined" ? "undefined" : _typeof(process)) === 'object' && process + '' === '[object process]' && !process.versions['nw'] && !process.versions['electron']; }; /***/ }), -/* 10 */ +/* 9 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -__w_pdfjs_require__(11); +__w_pdfjs_require__(10); -module.exports = __w_pdfjs_require__(14).String.startsWith; +module.exports = __w_pdfjs_require__(13).String.startsWith; /***/ }), -/* 11 */ +/* 10 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); -var context = __w_pdfjs_require__(32); +var context = __w_pdfjs_require__(34); var STARTS_WITH = 'startsWith'; var $startsWith = ''[STARTS_WITH]; @@ -2816,21 +2552,21 @@ $export($export.P + $export.F * __w_pdfjs_require__(39)(STARTS_WITH), 'String', }); /***/ }), -/* 12 */ +/* 11 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var core = __w_pdfjs_require__(14); +var core = __w_pdfjs_require__(13); -var hide = __w_pdfjs_require__(15); +var hide = __w_pdfjs_require__(14); -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); var PROTOTYPE = 'prototype'; @@ -2868,7 +2604,7 @@ $export.R = 128; module.exports = $export; /***/ }), -/* 13 */ +/* 12 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2878,29 +2614,29 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat if (typeof __g == 'number') __g = global; /***/ }), -/* 14 */ +/* 13 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; var core = module.exports = { - version: '2.6.2' + version: '2.6.9' }; if (typeof __e == 'number') __e = core; /***/ }), -/* 15 */ +/* 14 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var dP = __w_pdfjs_require__(16); +var dP = __w_pdfjs_require__(15); -var createDesc = __w_pdfjs_require__(24); +var createDesc = __w_pdfjs_require__(23); -module.exports = __w_pdfjs_require__(20) ? function (object, key, value) { +module.exports = __w_pdfjs_require__(19) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; @@ -2908,20 +2644,20 @@ module.exports = __w_pdfjs_require__(20) ? function (object, key, value) { }; /***/ }), -/* 16 */ +/* 15 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); -var IE8_DOM_DEFINE = __w_pdfjs_require__(19); +var IE8_DOM_DEFINE = __w_pdfjs_require__(18); -var toPrimitive = __w_pdfjs_require__(23); +var toPrimitive = __w_pdfjs_require__(22); var dP = Object.defineProperty; -exports.f = __w_pdfjs_require__(20) ? Object.defineProperty : function defineProperty(O, P, Attributes) { +exports.f = __w_pdfjs_require__(19) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); @@ -2934,13 +2670,13 @@ exports.f = __w_pdfjs_require__(20) ? Object.defineProperty : function definePro }; /***/ }), -/* 17 */ +/* 16 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); @@ -2948,7 +2684,7 @@ module.exports = function (it) { }; /***/ }), -/* 18 */ +/* 17 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -2961,14 +2697,14 @@ module.exports = function (it) { }; /***/ }), -/* 19 */ +/* 18 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -module.exports = !__w_pdfjs_require__(20) && !__w_pdfjs_require__(21)(function () { - return Object.defineProperty(__w_pdfjs_require__(22)('div'), 'a', { +module.exports = !__w_pdfjs_require__(19) && !__w_pdfjs_require__(20)(function () { + return Object.defineProperty(__w_pdfjs_require__(21)('div'), 'a', { get: function get() { return 7; } @@ -2976,13 +2712,13 @@ module.exports = !__w_pdfjs_require__(20) && !__w_pdfjs_require__(21)(function ( }); /***/ }), -/* 20 */ +/* 19 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -module.exports = !__w_pdfjs_require__(21)(function () { +module.exports = !__w_pdfjs_require__(20)(function () { return Object.defineProperty({}, 'a', { get: function get() { return 7; @@ -2991,7 +2727,7 @@ module.exports = !__w_pdfjs_require__(21)(function () { }); /***/ }), -/* 21 */ +/* 20 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3006,15 +2742,15 @@ module.exports = function (exec) { }; /***/ }), -/* 22 */ +/* 21 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); -var document = __w_pdfjs_require__(13).document; +var document = __w_pdfjs_require__(12).document; var is = isObject(document) && isObject(document.createElement); @@ -3023,13 +2759,13 @@ module.exports = function (it) { }; /***/ }), -/* 23 */ +/* 22 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); module.exports = function (it, S) { if (!isObject(it)) return it; @@ -3041,7 +2777,7 @@ module.exports = function (it, S) { }; /***/ }), -/* 24 */ +/* 23 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3057,25 +2793,26 @@ module.exports = function (bitmap, value) { }; /***/ }), -/* 25 */ +/* 24 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); + +var hide = __w_pdfjs_require__(14); -var hide = __w_pdfjs_require__(15); +var has = __w_pdfjs_require__(25); -var has = __w_pdfjs_require__(26); +var SRC = __w_pdfjs_require__(26)('src'); -var SRC = __w_pdfjs_require__(27)('src'); +var $toString = __w_pdfjs_require__(27); var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; var TPL = ('' + $toString).split(TO_STRING); -__w_pdfjs_require__(14).inspectSource = function (it) { +__w_pdfjs_require__(13).inspectSource = function (it) { return $toString.call(it); }; @@ -3100,7 +2837,7 @@ __w_pdfjs_require__(14).inspectSource = function (it) { }); /***/ }), -/* 26 */ +/* 25 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3113,7 +2850,7 @@ module.exports = function (it, key) { }; /***/ }), -/* 27 */ +/* 26 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3126,6 +2863,15 @@ module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; +/***/ }), +/* 27 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +module.exports = __w_pdfjs_require__(28)('native-function-to-string', Function.toString); + /***/ }), /* 28 */ /***/ (function(module, exports, __w_pdfjs_require__) { @@ -3133,7 +2879,37 @@ module.exports = function (key) { "use strict"; -var aFunction = __w_pdfjs_require__(29); +var core = __w_pdfjs_require__(13); + +var global = __w_pdfjs_require__(12); + +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __w_pdfjs_require__(29) ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +module.exports = false; + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +var aFunction = __w_pdfjs_require__(31); module.exports = function (fn, that, length) { aFunction(fn); @@ -3162,7 +2938,7 @@ module.exports = function (fn, that, length) { }; /***/ }), -/* 29 */ +/* 31 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3174,13 +2950,13 @@ module.exports = function (it) { }; /***/ }), -/* 30 */ +/* 32 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var toInteger = __w_pdfjs_require__(31); +var toInteger = __w_pdfjs_require__(33); var min = Math.min; @@ -3189,7 +2965,7 @@ module.exports = function (it) { }; /***/ }), -/* 31 */ +/* 33 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3203,13 +2979,13 @@ module.exports = function (it) { }; /***/ }), -/* 32 */ +/* 34 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var isRegExp = __w_pdfjs_require__(33); +var isRegExp = __w_pdfjs_require__(35); var defined = __w_pdfjs_require__(38); @@ -3219,17 +2995,17 @@ module.exports = function (that, searchString, NAME) { }; /***/ }), -/* 33 */ +/* 35 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); -var cof = __w_pdfjs_require__(34); +var cof = __w_pdfjs_require__(36); -var MATCH = __w_pdfjs_require__(35)('match'); +var MATCH = __w_pdfjs_require__(37)('match'); module.exports = function (it) { var isRegExp; @@ -3237,7 +3013,7 @@ module.exports = function (it) { }; /***/ }), -/* 34 */ +/* 36 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -3250,17 +3026,17 @@ module.exports = function (it) { }; /***/ }), -/* 35 */ +/* 37 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; -var store = __w_pdfjs_require__(36)('wks'); +var store = __w_pdfjs_require__(28)('wks'); -var uid = __w_pdfjs_require__(27); +var uid = __w_pdfjs_require__(26); -var _Symbol = __w_pdfjs_require__(13).Symbol; +var _Symbol = __w_pdfjs_require__(12).Symbol; var USE_SYMBOL = typeof _Symbol == 'function'; @@ -3270,36 +3046,6 @@ var $exports = module.exports = function (name) { $exports.store = store; -/***/ }), -/* 36 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var core = __w_pdfjs_require__(14); - -var global = __w_pdfjs_require__(13); - -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __w_pdfjs_require__(37) ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' -}); - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = false; - /***/ }), /* 38 */ /***/ (function(module, exports, __w_pdfjs_require__) { @@ -3319,7 +3065,7 @@ module.exports = function (it) { "use strict"; -var MATCH = __w_pdfjs_require__(35)('match'); +var MATCH = __w_pdfjs_require__(37)('match'); module.exports = function (KEY) { var re = /./; @@ -3345,7 +3091,7 @@ module.exports = function (KEY) { __w_pdfjs_require__(41); -module.exports = __w_pdfjs_require__(14).String.endsWith; +module.exports = __w_pdfjs_require__(13).String.endsWith; /***/ }), /* 41 */ @@ -3354,11 +3100,11 @@ module.exports = __w_pdfjs_require__(14).String.endsWith; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); -var context = __w_pdfjs_require__(32); +var context = __w_pdfjs_require__(34); var ENDS_WITH = 'endsWith'; var $endsWith = ''[ENDS_WITH]; @@ -3382,7 +3128,7 @@ $export($export.P + $export.F * __w_pdfjs_require__(39)(ENDS_WITH), 'String', { __w_pdfjs_require__(43); -module.exports = __w_pdfjs_require__(14).String.includes; +module.exports = __w_pdfjs_require__(13).String.includes; /***/ }), /* 43 */ @@ -3391,9 +3137,9 @@ module.exports = __w_pdfjs_require__(14).String.includes; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var context = __w_pdfjs_require__(32); +var context = __w_pdfjs_require__(34); var INCLUDES = 'includes'; $export($export.P + $export.F * __w_pdfjs_require__(39)(INCLUDES), 'String', { @@ -3411,7 +3157,7 @@ $export($export.P + $export.F * __w_pdfjs_require__(39)(INCLUDES), 'String', { __w_pdfjs_require__(45); -module.exports = __w_pdfjs_require__(14).Array.includes; +module.exports = __w_pdfjs_require__(13).Array.includes; /***/ }), /* 45 */ @@ -3420,7 +3166,7 @@ module.exports = __w_pdfjs_require__(14).Array.includes; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var $includes = __w_pdfjs_require__(46)(true); @@ -3441,7 +3187,7 @@ __w_pdfjs_require__(50)('includes'); var toIObject = __w_pdfjs_require__(47); -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); var toAbsoluteIndex = __w_pdfjs_require__(49); @@ -3485,7 +3231,7 @@ module.exports = function (it) { "use strict"; -var cof = __w_pdfjs_require__(34); +var cof = __w_pdfjs_require__(36); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); @@ -3498,7 +3244,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { "use strict"; -var toInteger = __w_pdfjs_require__(31); +var toInteger = __w_pdfjs_require__(33); var max = Math.max; var min = Math.min; @@ -3515,10 +3261,10 @@ module.exports = function (index, length) { "use strict"; -var UNSCOPABLES = __w_pdfjs_require__(35)('unscopables'); +var UNSCOPABLES = __w_pdfjs_require__(37)('unscopables'); var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __w_pdfjs_require__(15)(ArrayProto, UNSCOPABLES, {}); +if (ArrayProto[UNSCOPABLES] == undefined) __w_pdfjs_require__(14)(ArrayProto, UNSCOPABLES, {}); module.exports = function (key) { ArrayProto[UNSCOPABLES][key] = true; @@ -3535,7 +3281,7 @@ __w_pdfjs_require__(52); __w_pdfjs_require__(67); -module.exports = __w_pdfjs_require__(14).Array.from; +module.exports = __w_pdfjs_require__(13).Array.from; /***/ }), /* 52 */ @@ -3572,7 +3318,7 @@ __w_pdfjs_require__(54)(String, 'String', function (iterated) { "use strict"; -var toInteger = __w_pdfjs_require__(31); +var toInteger = __w_pdfjs_require__(33); var defined = __w_pdfjs_require__(38); @@ -3595,13 +3341,13 @@ module.exports = function (TO_STRING) { "use strict"; -var LIBRARY = __w_pdfjs_require__(37); +var LIBRARY = __w_pdfjs_require__(29); -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); -var hide = __w_pdfjs_require__(15); +var hide = __w_pdfjs_require__(14); var Iterators = __w_pdfjs_require__(55); @@ -3611,7 +3357,7 @@ var setToStringTag = __w_pdfjs_require__(64); var getPrototypeOf = __w_pdfjs_require__(65); -var ITERATOR = __w_pdfjs_require__(35)('iterator'); +var ITERATOR = __w_pdfjs_require__(37)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); var FF_ITERATOR = '@@iterator'; @@ -3711,13 +3457,13 @@ module.exports = {}; var create = __w_pdfjs_require__(57); -var descriptor = __w_pdfjs_require__(24); +var descriptor = __w_pdfjs_require__(23); var setToStringTag = __w_pdfjs_require__(64); var IteratorPrototype = {}; -__w_pdfjs_require__(15)(IteratorPrototype, __w_pdfjs_require__(35)('iterator'), function () { +__w_pdfjs_require__(14)(IteratorPrototype, __w_pdfjs_require__(37)('iterator'), function () { return this; }); @@ -3735,7 +3481,7 @@ module.exports = function (Constructor, NAME, next) { "use strict"; -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); var dPs = __w_pdfjs_require__(58); @@ -3748,7 +3494,7 @@ var Empty = function Empty() {}; var PROTOTYPE = 'prototype'; var _createDict = function createDict() { - var iframe = __w_pdfjs_require__(22)('iframe'); + var iframe = __w_pdfjs_require__(21)('iframe'); var i = enumBugKeys.length; var lt = '<'; @@ -3792,13 +3538,13 @@ module.exports = Object.create || function create(O, Properties) { "use strict"; -var dP = __w_pdfjs_require__(16); +var dP = __w_pdfjs_require__(15); -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); var getKeys = __w_pdfjs_require__(59); -module.exports = __w_pdfjs_require__(20) ? Object.defineProperties : function defineProperties(O, Properties) { +module.exports = __w_pdfjs_require__(19) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; @@ -3834,7 +3580,7 @@ module.exports = Object.keys || function keys(O) { "use strict"; -var has = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(25); var toIObject = __w_pdfjs_require__(47); @@ -3868,9 +3614,9 @@ module.exports = function (object, names) { "use strict"; -var shared = __w_pdfjs_require__(36)('keys'); +var shared = __w_pdfjs_require__(28)('keys'); -var uid = __w_pdfjs_require__(27); +var uid = __w_pdfjs_require__(26); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); @@ -3892,7 +3638,7 @@ module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable, "use strict"; -var document = __w_pdfjs_require__(13).document; +var document = __w_pdfjs_require__(12).document; module.exports = document && document.documentElement; @@ -3903,11 +3649,11 @@ module.exports = document && document.documentElement; "use strict"; -var def = __w_pdfjs_require__(16).f; +var def = __w_pdfjs_require__(15).f; -var has = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(25); -var TAG = __w_pdfjs_require__(35)('toStringTag'); +var TAG = __w_pdfjs_require__(37)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { @@ -3923,7 +3669,7 @@ module.exports = function (it, tag, stat) { "use strict"; -var has = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(25); var toObject = __w_pdfjs_require__(66); @@ -3962,9 +3708,9 @@ module.exports = function (it) { "use strict"; -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var toObject = __w_pdfjs_require__(66); @@ -3972,7 +3718,7 @@ var call = __w_pdfjs_require__(68); var isArrayIter = __w_pdfjs_require__(69); -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); var createProperty = __w_pdfjs_require__(70); @@ -4016,7 +3762,7 @@ $export($export.S + $export.F * !__w_pdfjs_require__(73)(function (iter) { "use strict"; -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); module.exports = function (iterator, fn, value, entries) { try { @@ -4037,7 +3783,7 @@ module.exports = function (iterator, fn, value, entries) { var Iterators = __w_pdfjs_require__(55); -var ITERATOR = __w_pdfjs_require__(35)('iterator'); +var ITERATOR = __w_pdfjs_require__(37)('iterator'); var ArrayProto = Array.prototype; @@ -4052,9 +3798,9 @@ module.exports = function (it) { "use strict"; -var $defineProperty = __w_pdfjs_require__(16); +var $defineProperty = __w_pdfjs_require__(15); -var createDesc = __w_pdfjs_require__(24); +var createDesc = __w_pdfjs_require__(23); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value));else object[index] = value; @@ -4069,11 +3815,11 @@ module.exports = function (object, index, value) { var classof = __w_pdfjs_require__(72); -var ITERATOR = __w_pdfjs_require__(35)('iterator'); +var ITERATOR = __w_pdfjs_require__(37)('iterator'); var Iterators = __w_pdfjs_require__(55); -module.exports = __w_pdfjs_require__(14).getIteratorMethod = function (it) { +module.exports = __w_pdfjs_require__(13).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; @@ -4084,9 +3830,9 @@ module.exports = __w_pdfjs_require__(14).getIteratorMethod = function (it) { "use strict"; -var cof = __w_pdfjs_require__(34); +var cof = __w_pdfjs_require__(36); -var TAG = __w_pdfjs_require__(35)('toStringTag'); +var TAG = __w_pdfjs_require__(37)('toStringTag'); var ARG = cof(function () { return arguments; @@ -4110,7 +3856,7 @@ module.exports = function (it) { "use strict"; -var ITERATOR = __w_pdfjs_require__(35)('iterator'); +var ITERATOR = __w_pdfjs_require__(37)('iterator'); var SAFE_CLOSING = false; @@ -4159,7 +3905,7 @@ module.exports = function (exec, skipClosing) { __w_pdfjs_require__(75); -module.exports = __w_pdfjs_require__(14).Object.assign; +module.exports = __w_pdfjs_require__(13).Object.assign; /***/ }), /* 75 */ @@ -4168,7 +3914,7 @@ module.exports = __w_pdfjs_require__(14).Object.assign; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); $export($export.S + $export.F, 'Object', { assign: __w_pdfjs_require__(76) @@ -4181,6 +3927,8 @@ $export($export.S + $export.F, 'Object', { "use strict"; +var DESCRIPTORS = __w_pdfjs_require__(19); + var getKeys = __w_pdfjs_require__(59); var gOPS = __w_pdfjs_require__(77); @@ -4192,7 +3940,7 @@ var toObject = __w_pdfjs_require__(66); var IObject = __w_pdfjs_require__(48); var $assign = Object.assign; -module.exports = !$assign || __w_pdfjs_require__(21)(function () { +module.exports = !$assign || __w_pdfjs_require__(20)(function () { var A = {}; var B = {}; var S = Symbol(); @@ -4217,7 +3965,8 @@ module.exports = !$assign || __w_pdfjs_require__(21)(function () { var key; while (length > j) { - if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } } @@ -4251,7 +4000,7 @@ exports.f = {}.propertyIsEnumerable; __w_pdfjs_require__(80); -module.exports = __w_pdfjs_require__(14).Math.log2; +module.exports = __w_pdfjs_require__(13).Math.log2; /***/ }), /* 80 */ @@ -4260,7 +4009,7 @@ module.exports = __w_pdfjs_require__(14).Math.log2; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); $export($export.S, 'Math', { log2: function log2(x) { @@ -4277,7 +4026,7 @@ $export($export.S, 'Math', { __w_pdfjs_require__(82); -module.exports = __w_pdfjs_require__(14).Number.isNaN; +module.exports = __w_pdfjs_require__(13).Number.isNaN; /***/ }), /* 82 */ @@ -4286,7 +4035,7 @@ module.exports = __w_pdfjs_require__(14).Number.isNaN; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); $export($export.S, 'Number', { isNaN: function isNaN(number) { @@ -4303,7 +4052,7 @@ $export($export.S, 'Number', { __w_pdfjs_require__(84); -module.exports = __w_pdfjs_require__(14).Number.isInteger; +module.exports = __w_pdfjs_require__(13).Number.isInteger; /***/ }), /* 84 */ @@ -4312,7 +4061,7 @@ module.exports = __w_pdfjs_require__(14).Number.isInteger; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); $export($export.S, 'Number', { isInteger: __w_pdfjs_require__(85) @@ -4325,7 +4074,7 @@ $export($export.S, 'Number', { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); var floor = Math.floor; @@ -4352,7 +4101,7 @@ __w_pdfjs_require__(104); __w_pdfjs_require__(105); -module.exports = __w_pdfjs_require__(14).Promise; +module.exports = __w_pdfjs_require__(13).Promise; /***/ }), /* 87 */ @@ -4364,10 +4113,10 @@ module.exports = __w_pdfjs_require__(14).Promise; var classof = __w_pdfjs_require__(72); var test = {}; -test[__w_pdfjs_require__(35)('toStringTag')] = 'z'; +test[__w_pdfjs_require__(37)('toStringTag')] = 'z'; if (test + '' != '[object z]') { - __w_pdfjs_require__(25)(Object.prototype, 'toString', function toString() { + __w_pdfjs_require__(24)(Object.prototype, 'toString', function toString() { return '[object ' + classof(this) + ']'; }, true); } @@ -4383,15 +4132,15 @@ var $iterators = __w_pdfjs_require__(89); var getKeys = __w_pdfjs_require__(59); -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var hide = __w_pdfjs_require__(15); +var hide = __w_pdfjs_require__(14); var Iterators = __w_pdfjs_require__(55); -var wks = __w_pdfjs_require__(35); +var wks = __w_pdfjs_require__(37); var ITERATOR = wks('iterator'); var TO_STRING_TAG = wks('toStringTag'); @@ -4506,19 +4255,19 @@ module.exports = function (done, value) { "use strict"; -var LIBRARY = __w_pdfjs_require__(37); +var LIBRARY = __w_pdfjs_require__(29); -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); var classof = __w_pdfjs_require__(72); -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); -var aFunction = __w_pdfjs_require__(29); +var aFunction = __w_pdfjs_require__(31); var anInstance = __w_pdfjs_require__(92); @@ -4554,7 +4303,7 @@ var USE_NATIVE = !!function () { try { var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__w_pdfjs_require__(35)('species')] = function (exec) { + var FakePromise = (promise.constructor = {})[__w_pdfjs_require__(37)('species')] = function (exec) { exec(empty, empty); }; @@ -4776,7 +4525,7 @@ __w_pdfjs_require__(64)($Promise, PROMISE); __w_pdfjs_require__(103)(PROMISE); -Wrapper = __w_pdfjs_require__(14)[PROMISE]; +Wrapper = __w_pdfjs_require__(13)[PROMISE]; $export($export.S + $export.F * !USE_NATIVE, PROMISE, { reject: function reject(r) { var capability = newPromiseCapability(this); @@ -4855,15 +4604,15 @@ module.exports = function (it, Constructor, name, forbiddenField) { "use strict"; -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); var call = __w_pdfjs_require__(68); var isArrayIter = __w_pdfjs_require__(69); -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); var getIterFn = __w_pdfjs_require__(71); @@ -4897,11 +4646,11 @@ _exports.RETURN = RETURN; "use strict"; -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); -var aFunction = __w_pdfjs_require__(29); +var aFunction = __w_pdfjs_require__(31); -var SPECIES = __w_pdfjs_require__(35)('species'); +var SPECIES = __w_pdfjs_require__(37)('species'); module.exports = function (O, D) { var C = anObject(O).constructor; @@ -4916,15 +4665,15 @@ module.exports = function (O, D) { "use strict"; -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); var invoke = __w_pdfjs_require__(96); var html = __w_pdfjs_require__(63); -var cel = __w_pdfjs_require__(22); +var cel = __w_pdfjs_require__(21); -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); var process = global.process; var setTask = global.setImmediate; @@ -4971,7 +4720,7 @@ if (!setTask || !clearTask) { delete queue[id]; }; - if (__w_pdfjs_require__(34)(process) == 'process') { + if (__w_pdfjs_require__(36)(process) == 'process') { defer = function defer(id) { process.nextTick(ctx(run, id, 1)); }; @@ -5046,14 +4795,14 @@ module.exports = function (fn, args, that) { "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); var macrotask = __w_pdfjs_require__(95).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; -var isNode = __w_pdfjs_require__(34)(process) == 'process'; +var isNode = __w_pdfjs_require__(36)(process) == 'process'; module.exports = function () { var head, last, notify; @@ -5127,7 +4876,7 @@ module.exports = function () { "use strict"; -var aFunction = __w_pdfjs_require__(29); +var aFunction = __w_pdfjs_require__(31); function PromiseCapability(C) { var resolve, reject; @@ -5172,7 +4921,7 @@ module.exports = function (exec) { "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; @@ -5184,9 +4933,9 @@ module.exports = navigator && navigator.userAgent || ''; "use strict"; -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); var newPromiseCapability = __w_pdfjs_require__(98); @@ -5206,7 +4955,7 @@ module.exports = function (C, x) { "use strict"; -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); module.exports = function (target, src, safe) { for (var key in src) { @@ -5223,13 +4972,13 @@ module.exports = function (target, src, safe) { "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var dP = __w_pdfjs_require__(16); +var dP = __w_pdfjs_require__(15); -var DESCRIPTORS = __w_pdfjs_require__(20); +var DESCRIPTORS = __w_pdfjs_require__(19); -var SPECIES = __w_pdfjs_require__(35)('species'); +var SPECIES = __w_pdfjs_require__(37)('species'); module.exports = function (KEY) { var C = global[KEY]; @@ -5248,11 +4997,11 @@ module.exports = function (KEY) { "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var core = __w_pdfjs_require__(14); +var core = __w_pdfjs_require__(13); -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); var speciesConstructor = __w_pdfjs_require__(94); @@ -5281,7 +5030,7 @@ $export($export.P + $export.R, 'Promise', { "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var newPromiseCapability = __w_pdfjs_require__(98); @@ -5313,7 +5062,7 @@ __w_pdfjs_require__(119); __w_pdfjs_require__(121); -module.exports = __w_pdfjs_require__(14).WeakMap; +module.exports = __w_pdfjs_require__(13).WeakMap; /***/ }), /* 107 */ @@ -5322,9 +5071,11 @@ module.exports = __w_pdfjs_require__(14).WeakMap; "use strict"; +var global = __w_pdfjs_require__(12); + var each = __w_pdfjs_require__(108)(0); -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); var meta = __w_pdfjs_require__(112); @@ -5332,17 +5083,17 @@ var assign = __w_pdfjs_require__(76); var weak = __w_pdfjs_require__(113); -var isObject = __w_pdfjs_require__(18); - -var fails = __w_pdfjs_require__(21); +var isObject = __w_pdfjs_require__(17); var validate = __w_pdfjs_require__(114); +var NATIVE_WEAK_MAP = __w_pdfjs_require__(114); + +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; var WEAK_MAP = 'WeakMap'; var getWeak = meta.getWeak; var isExtensible = Object.isExtensible; var uncaughtFrozenStore = weak.ufstore; -var tmp = {}; var InternalMap; var wrapper = function wrapper(get) { @@ -5366,9 +5117,7 @@ var methods = { var $WeakMap = module.exports = __w_pdfjs_require__(115)(WEAK_MAP, wrapper, methods, weak, true, true); -if (fails(function () { - return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; -})) { +if (NATIVE_WEAK_MAP && IS_IE11) { InternalMap = weak.getConstructor(wrapper, WEAK_MAP); assign(InternalMap.prototype, methods); meta.NEED = true; @@ -5396,13 +5145,13 @@ if (fails(function () { "use strict"; -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); var IObject = __w_pdfjs_require__(48); var toObject = __w_pdfjs_require__(66); -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); var asc = __w_pdfjs_require__(109); @@ -5470,11 +5219,11 @@ module.exports = function (original, length) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); var isArray = __w_pdfjs_require__(111); -var SPECIES = __w_pdfjs_require__(35)('species'); +var SPECIES = __w_pdfjs_require__(37)('species'); module.exports = function (original) { var C; @@ -5499,7 +5248,7 @@ module.exports = function (original) { "use strict"; -var cof = __w_pdfjs_require__(34); +var cof = __w_pdfjs_require__(36); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; @@ -5514,13 +5263,13 @@ module.exports = Array.isArray || function isArray(arg) { function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -var META = __w_pdfjs_require__(27)('meta'); +var META = __w_pdfjs_require__(26)('meta'); -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); -var has = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(25); -var setDesc = __w_pdfjs_require__(16).f; +var setDesc = __w_pdfjs_require__(15).f; var id = 0; @@ -5528,7 +5277,7 @@ var isExtensible = Object.isExtensible || function () { return true; }; -var FREEZE = !__w_pdfjs_require__(21)(function () { +var FREEZE = !__w_pdfjs_require__(20)(function () { return isExtensible(Object.preventExtensions({})); }); @@ -5587,9 +5336,9 @@ var redefineAll = __w_pdfjs_require__(102); var getWeak = __w_pdfjs_require__(112).getWeak; -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); var anInstance = __w_pdfjs_require__(92); @@ -5597,7 +5346,7 @@ var forOf = __w_pdfjs_require__(93); var createArrayMethod = __w_pdfjs_require__(108); -var $has = __w_pdfjs_require__(26); +var $has = __w_pdfjs_require__(25); var validate = __w_pdfjs_require__(114); @@ -5679,7 +5428,7 @@ module.exports = { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); module.exports = function (it, TYPE) { if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); @@ -5693,11 +5442,11 @@ module.exports = function (it, TYPE) { "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); var redefineAll = __w_pdfjs_require__(102); @@ -5707,9 +5456,9 @@ var forOf = __w_pdfjs_require__(93); var anInstance = __w_pdfjs_require__(92); -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); -var fails = __w_pdfjs_require__(21); +var fails = __w_pdfjs_require__(20); var $iterDetect = __w_pdfjs_require__(73); @@ -5802,7 +5551,7 @@ module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); var setPrototypeOf = __w_pdfjs_require__(117).set; @@ -5824,9 +5573,9 @@ module.exports = function (that, target, C) { "use strict"; -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); var check = function check(O, proto) { anObject(O); @@ -5836,7 +5585,7 @@ var check = function check(O, proto) { module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? function (test, buggy, set) { try { - set = __w_pdfjs_require__(28)(Function.call, __w_pdfjs_require__(118).f(Object.prototype, '__proto__').set, 2); + set = __w_pdfjs_require__(30)(Function.call, __w_pdfjs_require__(118).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { @@ -5861,18 +5610,18 @@ module.exports = { var pIE = __w_pdfjs_require__(78); -var createDesc = __w_pdfjs_require__(24); +var createDesc = __w_pdfjs_require__(23); var toIObject = __w_pdfjs_require__(47); -var toPrimitive = __w_pdfjs_require__(23); +var toPrimitive = __w_pdfjs_require__(22); -var has = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(25); -var IE8_DOM_DEFINE = __w_pdfjs_require__(19); +var IE8_DOM_DEFINE = __w_pdfjs_require__(18); var gOPD = Object.getOwnPropertyDescriptor; -exports.f = __w_pdfjs_require__(20) ? gOPD : function getOwnPropertyDescriptor(O, P) { +exports.f = __w_pdfjs_require__(19) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { @@ -5897,7 +5646,7 @@ __w_pdfjs_require__(120)('WeakMap'); "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); module.exports = function (COLLECTION) { $export($export.S, COLLECTION, { @@ -5930,11 +5679,11 @@ __w_pdfjs_require__(122)('WeakMap'); "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var aFunction = __w_pdfjs_require__(29); +var aFunction = __w_pdfjs_require__(31); -var ctx = __w_pdfjs_require__(28); +var ctx = __w_pdfjs_require__(30); var forOf = __w_pdfjs_require__(93); @@ -5981,7 +5730,7 @@ __w_pdfjs_require__(125); __w_pdfjs_require__(126); -module.exports = __w_pdfjs_require__(14).WeakSet; +module.exports = __w_pdfjs_require__(13).WeakSet; /***/ }), /* 124 */ @@ -6033,7 +5782,7 @@ __w_pdfjs_require__(122)('WeakSet'); __w_pdfjs_require__(128); -module.exports = __w_pdfjs_require__(14).String.codePointAt; +module.exports = __w_pdfjs_require__(13).String.codePointAt; /***/ }), /* 128 */ @@ -6042,7 +5791,7 @@ module.exports = __w_pdfjs_require__(14).String.codePointAt; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var $at = __w_pdfjs_require__(53)(false); @@ -6061,7 +5810,7 @@ $export($export.P, 'String', { __w_pdfjs_require__(130); -module.exports = __w_pdfjs_require__(14).String.fromCodePoint; +module.exports = __w_pdfjs_require__(13).String.fromCodePoint; /***/ }), /* 130 */ @@ -6070,7 +5819,7 @@ module.exports = __w_pdfjs_require__(14).String.fromCodePoint; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var toAbsoluteIndex = __w_pdfjs_require__(49); @@ -6104,7 +5853,7 @@ __w_pdfjs_require__(132); __w_pdfjs_require__(87); -module.exports = __w_pdfjs_require__(14).Symbol; +module.exports = __w_pdfjs_require__(13).Symbol; /***/ }), /* 132 */ @@ -6115,27 +5864,27 @@ module.exports = __w_pdfjs_require__(14).Symbol; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var has = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(25); -var DESCRIPTORS = __w_pdfjs_require__(20); +var DESCRIPTORS = __w_pdfjs_require__(19); -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); -var redefine = __w_pdfjs_require__(25); +var redefine = __w_pdfjs_require__(24); var META = __w_pdfjs_require__(112).KEY; -var $fails = __w_pdfjs_require__(21); +var $fails = __w_pdfjs_require__(20); -var shared = __w_pdfjs_require__(36); +var shared = __w_pdfjs_require__(28); var setToStringTag = __w_pdfjs_require__(64); -var uid = __w_pdfjs_require__(27); +var uid = __w_pdfjs_require__(26); -var wks = __w_pdfjs_require__(35); +var wks = __w_pdfjs_require__(37); var wksExt = __w_pdfjs_require__(133); @@ -6145,15 +5894,17 @@ var enumKeys = __w_pdfjs_require__(135); var isArray = __w_pdfjs_require__(111); -var anObject = __w_pdfjs_require__(17); +var anObject = __w_pdfjs_require__(16); -var isObject = __w_pdfjs_require__(18); +var isObject = __w_pdfjs_require__(17); + +var toObject = __w_pdfjs_require__(66); var toIObject = __w_pdfjs_require__(47); -var toPrimitive = __w_pdfjs_require__(23); +var toPrimitive = __w_pdfjs_require__(22); -var createDesc = __w_pdfjs_require__(24); +var createDesc = __w_pdfjs_require__(23); var _create = __w_pdfjs_require__(57); @@ -6161,7 +5912,9 @@ var gOPNExt = __w_pdfjs_require__(136); var $GOPD = __w_pdfjs_require__(118); -var $DP = __w_pdfjs_require__(16); +var $GOPS = __w_pdfjs_require__(77); + +var $DP = __w_pdfjs_require__(15); var $keys = __w_pdfjs_require__(59); @@ -6181,7 +5934,7 @@ var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; var QObject = global.QObject; var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; var setSymbolDesc = DESCRIPTORS && $fails(function () { @@ -6320,9 +6073,9 @@ if (!USE_NATIVE) { $DP.f = $defineProperty; __w_pdfjs_require__(137).f = gOPNExt.f = $getOwnPropertyNames; __w_pdfjs_require__(78).f = $propertyIsEnumerable; - __w_pdfjs_require__(77).f = $getOwnPropertySymbols; + $GOPS.f = $getOwnPropertySymbols; - if (DESCRIPTORS && !__w_pdfjs_require__(37)) { + if (DESCRIPTORS && !__w_pdfjs_require__(29)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } @@ -6369,6 +6122,14 @@ $export($export.S + $export.F * !USE_NATIVE, 'Object', { getOwnPropertyNames: $getOwnPropertyNames, getOwnPropertySymbols: $getOwnPropertySymbols }); +var FAILS_ON_PRIMITIVES = $fails(function () { + $GOPS.f(1); +}); +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); return _stringify([S]) != '[null]' || _stringify({ @@ -6394,7 +6155,7 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { return _stringify.apply($JSON, args); } }); -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __w_pdfjs_require__(15)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __w_pdfjs_require__(14)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); setToStringTag($Symbol, 'Symbol'); setToStringTag(Math, 'Math', true); setToStringTag(global.JSON, 'JSON', true); @@ -6406,7 +6167,7 @@ setToStringTag(global.JSON, 'JSON', true); "use strict"; -exports.f = __w_pdfjs_require__(35); +exports.f = __w_pdfjs_require__(37); /***/ }), /* 134 */ @@ -6415,15 +6176,15 @@ exports.f = __w_pdfjs_require__(35); "use strict"; -var global = __w_pdfjs_require__(13); +var global = __w_pdfjs_require__(12); -var core = __w_pdfjs_require__(14); +var core = __w_pdfjs_require__(13); -var LIBRARY = __w_pdfjs_require__(37); +var LIBRARY = __w_pdfjs_require__(29); var wksExt = __w_pdfjs_require__(133); -var defineProperty = __w_pdfjs_require__(16).f; +var defineProperty = __w_pdfjs_require__(15).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); @@ -6515,7 +6276,7 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { __w_pdfjs_require__(139); -module.exports = __w_pdfjs_require__(14).String.padStart; +module.exports = __w_pdfjs_require__(13).String.padStart; /***/ }), /* 139 */ @@ -6524,13 +6285,14 @@ module.exports = __w_pdfjs_require__(14).String.padStart; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var $pad = __w_pdfjs_require__(140); var userAgent = __w_pdfjs_require__(100); -$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); +$export($export.P + $export.F * WEBKIT_BUG, 'String', { padStart: function padStart(maxLength) { return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } @@ -6543,7 +6305,7 @@ $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAge "use strict"; -var toLength = __w_pdfjs_require__(30); +var toLength = __w_pdfjs_require__(32); var repeat = __w_pdfjs_require__(141); @@ -6568,7 +6330,7 @@ module.exports = function (that, maxLength, fillString, left) { "use strict"; -var toInteger = __w_pdfjs_require__(31); +var toInteger = __w_pdfjs_require__(33); var defined = __w_pdfjs_require__(38); @@ -6594,7 +6356,7 @@ module.exports = function repeat(count) { __w_pdfjs_require__(143); -module.exports = __w_pdfjs_require__(14).String.padEnd; +module.exports = __w_pdfjs_require__(13).String.padEnd; /***/ }), /* 143 */ @@ -6603,13 +6365,14 @@ module.exports = __w_pdfjs_require__(14).String.padEnd; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var $pad = __w_pdfjs_require__(140); var userAgent = __w_pdfjs_require__(100); -$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); +$export($export.P + $export.F * WEBKIT_BUG, 'String', { padEnd: function padEnd(maxLength) { return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } @@ -6624,7 +6387,7 @@ $export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAge __w_pdfjs_require__(145); -module.exports = __w_pdfjs_require__(14).Object.values; +module.exports = __w_pdfjs_require__(13).Object.values; /***/ }), /* 145 */ @@ -6633,7 +6396,7 @@ module.exports = __w_pdfjs_require__(14).Object.values; "use strict"; -var $export = __w_pdfjs_require__(12); +var $export = __w_pdfjs_require__(11); var $values = __w_pdfjs_require__(146)(false); @@ -6650,6 +6413,8 @@ $export($export.S, 'Object', { "use strict"; +var DESCRIPTORS = __w_pdfjs_require__(19); + var getKeys = __w_pdfjs_require__(59); var toIObject = __w_pdfjs_require__(47); @@ -6666,7 +6431,9 @@ module.exports = function (isEntries) { var key; while (length > i) { - if (isEnum.call(O, key = keys[i++])) { + key = keys[i++]; + + if (!DESCRIPTORS || isEnum.call(O, key)) { result.push(isEntries ? [key, O[key]] : O[key]); } } @@ -7341,7 +7108,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (writer !== undefined) { defaultWriterClosedPromiseReject(writer, stream._storedError); - writer._closedPromise.catch(function () {}); + writer._closedPromise["catch"](function () {}); } } @@ -7389,7 +7156,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera } else if (state === 'erroring') { defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); - this._readyPromise.catch(function () {}); + this._readyPromise["catch"](function () {}); defaultWriterClosedPromiseInitialize(this); } else if (state === 'closed') { @@ -7400,11 +7167,11 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera var storedError = stream._storedError; defaultWriterReadyPromiseInitializeAsRejected(this, storedError); - this._readyPromise.catch(function () {}); + this._readyPromise["catch"](function () {}); defaultWriterClosedPromiseInitializeAsRejected(this, storedError); - this._closedPromise.catch(function () {}); + this._closedPromise["catch"](function () {}); } } @@ -7574,7 +7341,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultWriterClosedPromiseResetToRejected(writer, error); } - writer._closedPromise.catch(function () {}); + writer._closedPromise["catch"](function () {}); } function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { @@ -7584,7 +7351,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultWriterReadyPromiseResetToRejected(writer, error); } - writer._readyPromise.catch(function () {}); + writer._readyPromise["catch"](function () {}); } function WritableStreamDefaultWriterGetDesiredSize(writer) { @@ -7708,7 +7475,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera assert(stream._state === 'writable' || stream._state === 'erroring'); _this._started = true; WritableStreamDealWithRejection(stream, r); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } }]); @@ -7824,7 +7591,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera WritableStreamFinishInFlightClose(stream); }, function (reason) { WritableStreamFinishInFlightCloseWithError(stream, reason); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } function WritableStreamDefaultControllerProcessWrite(controller, chunk) { @@ -7845,7 +7612,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); }, function (reason) { WritableStreamFinishInFlightWriteWithError(stream, reason); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } function WritableStreamDefaultControllerGetBackpressure(controller) { @@ -8228,7 +7995,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera return; } - currentWrite = WritableStreamDefaultWriterWrite(writer, value).catch(function () {}); + currentWrite = WritableStreamDefaultWriterWrite(writer, value)["catch"](function () {}); }); }).then(pipeLoop); } @@ -8273,7 +8040,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera } } - pipeLoop().catch(function (err) { + pipeLoop()["catch"](function (err) { currentWrite = Promise.resolve(); rethrowAssertionErrorRejection(err); }); @@ -8289,7 +8056,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (stream._state === 'errored') { action(stream._storedError); } else { - promise.catch(action).catch(rethrowAssertionErrorRejection); + promise["catch"](action)["catch"](rethrowAssertionErrorRejection); } } @@ -8297,7 +8064,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (stream._state === 'closed') { action(); } else { - promise.then(action).catch(rethrowAssertionErrorRejection); + promise.then(action)["catch"](rethrowAssertionErrorRejection); } } @@ -8319,7 +8086,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera return finalize(originalIsError, originalError); }, function (newError) { return finalize(true, newError); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } } @@ -8333,7 +8100,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) { waitForWritesToFinish().then(function () { return finalize(isError, error); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } else { finalize(isError, error); } @@ -8454,7 +8221,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera pull._branch1 = branch1Stream._readableStreamController; pull._branch2 = branch2Stream._readableStreamController; - reader._closedPromise.catch(function (r) { + reader._closedPromise["catch"](function (r) { if (teeState.closedOrErrored === true) { return; } @@ -8655,7 +8422,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultReaderClosedPromiseReject(reader, e); - reader._closedPromise.catch(function () {}); + reader._closedPromise["catch"](function () {}); } function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { @@ -8906,7 +8673,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera assert(stream._state === 'errored', 'state must be errored'); defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); - reader._closedPromise.catch(function () {}); + reader._closedPromise["catch"](function () {}); } } @@ -8926,7 +8693,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera defaultReaderClosedPromiseResetToRejected(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\'s closedness')); } - reader._closedPromise.catch(function () {}); + reader._closedPromise["catch"](function () {}); reader._ownerReadableStream._reader = undefined; reader._ownerReadableStream = undefined; @@ -8994,7 +8761,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera ReadableStreamDefaultControllerCallPullIfNeeded(controller); }, function (r) { ReadableStreamDefaultControllerErrorIfNeeded(controller, r); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } _createClass(ReadableStreamDefaultController, [{ @@ -9129,7 +8896,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera return undefined; }, function (e) { ReadableStreamDefaultControllerErrorIfNeeded(controller, e); - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); return undefined; } @@ -9324,7 +9091,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (stream._state === 'readable') { ReadableByteStreamControllerError(controller, r); } - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); } _createClass(ReadableByteStreamController, [{ @@ -9526,7 +9293,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera if (controller._controlledReadableStream._state === 'readable') { ReadableByteStreamControllerError(controller, e); } - }).catch(rethrowAssertionErrorRejection); + })["catch"](rethrowAssertionErrorRejection); return undefined; } @@ -10257,7 +10024,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera } return Promise.resolve(); - }).catch(function (r) { + })["catch"](function (r) { TransformStreamErrorIfNeeded(transformStream, r); return Promise.reject(transformStream._storedError); }); @@ -10406,7 +10173,7 @@ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.itera var transformStream = this; var startResult = InvokeOrNoop(transformer, 'start', [transformStream._transformStreamController]); startPromise_resolve(startResult); - startPromise.catch(function (e) { + startPromise["catch"](function (e) { if (transformStream._errored === false) { transformStream._errored = true; transformStream._storedError = e; @@ -10477,7 +10244,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat } else { var PolyfillURL = __w_pdfjs_require__(150).URL; - var OriginalURL = __w_pdfjs_require__(8).URL; + var OriginalURL = __w_pdfjs_require__(7).URL; if (OriginalURL) { PolyfillURL.createObjectURL = function (blob) { @@ -11170,6 +10937,331 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.clearPrimitiveCaches = clearPrimitiveCaches; +exports.isEOF = isEOF; +exports.isCmd = isCmd; +exports.isDict = isDict; +exports.isName = isName; +exports.isRef = isRef; +exports.isRefsEqual = isRefsEqual; +exports.isStream = isStream; +exports.RefSetCache = exports.RefSet = exports.Ref = exports.Name = exports.Dict = exports.Cmd = exports.EOF = void 0; + +var _util = __w_pdfjs_require__(5); + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var EOF = {}; +exports.EOF = EOF; + +var Name = function NameClosure() { + var nameCache = Object.create(null); + + function Name(name) { + this.name = name; + } + + Name.prototype = {}; + + Name.get = function Name_get(name) { + var nameValue = nameCache[name]; + return nameValue ? nameValue : nameCache[name] = new Name(name); + }; + + Name._clearCache = function () { + nameCache = Object.create(null); + }; + + return Name; +}(); + +exports.Name = Name; + +var Cmd = function CmdClosure() { + var cmdCache = Object.create(null); + + function Cmd(cmd) { + this.cmd = cmd; + } + + Cmd.prototype = {}; + + Cmd.get = function Cmd_get(cmd) { + var cmdValue = cmdCache[cmd]; + return cmdValue ? cmdValue : cmdCache[cmd] = new Cmd(cmd); + }; + + Cmd._clearCache = function () { + cmdCache = Object.create(null); + }; + + return Cmd; +}(); + +exports.Cmd = Cmd; + +var Dict = function DictClosure() { + var nonSerializable = function nonSerializableClosure() { + return nonSerializable; + }; + + function Dict(xref) { + this._map = Object.create(null); + this.xref = xref; + this.objId = null; + this.suppressEncryption = false; + this.__nonSerializable__ = nonSerializable; + } + + Dict.prototype = { + assignXref: function Dict_assignXref(newXref) { + this.xref = newXref; + }, + get: function Dict_get(key1, key2, key3) { + var value; + var xref = this.xref, + suppressEncryption = this.suppressEncryption; + + if (typeof (value = this._map[key1]) !== 'undefined' || key1 in this._map || typeof key2 === 'undefined') { + return xref ? xref.fetchIfRef(value, suppressEncryption) : value; + } + + if (typeof (value = this._map[key2]) !== 'undefined' || key2 in this._map || typeof key3 === 'undefined') { + return xref ? xref.fetchIfRef(value, suppressEncryption) : value; + } + + value = this._map[key3] || null; + return xref ? xref.fetchIfRef(value, suppressEncryption) : value; + }, + getAsync: function Dict_getAsync(key1, key2, key3) { + var value; + var xref = this.xref, + suppressEncryption = this.suppressEncryption; + + if (typeof (value = this._map[key1]) !== 'undefined' || key1 in this._map || typeof key2 === 'undefined') { + if (xref) { + return xref.fetchIfRefAsync(value, suppressEncryption); + } + + return Promise.resolve(value); + } + + if (typeof (value = this._map[key2]) !== 'undefined' || key2 in this._map || typeof key3 === 'undefined') { + if (xref) { + return xref.fetchIfRefAsync(value, suppressEncryption); + } + + return Promise.resolve(value); + } + + value = this._map[key3] || null; + + if (xref) { + return xref.fetchIfRefAsync(value, suppressEncryption); + } + + return Promise.resolve(value); + }, + getArray: function Dict_getArray(key1, key2, key3) { + var value = this.get(key1, key2, key3); + var xref = this.xref, + suppressEncryption = this.suppressEncryption; + + if (!Array.isArray(value) || !xref) { + return value; + } + + value = value.slice(); + + for (var i = 0, ii = value.length; i < ii; i++) { + if (!isRef(value[i])) { + continue; + } + + value[i] = xref.fetch(value[i], suppressEncryption); + } + + return value; + }, + getRaw: function Dict_getRaw(key) { + return this._map[key]; + }, + getKeys: function Dict_getKeys() { + return Object.keys(this._map); + }, + set: function Dict_set(key, value) { + this._map[key] = value; + }, + has: function Dict_has(key) { + return key in this._map; + }, + forEach: function Dict_forEach(callback) { + for (var key in this._map) { + callback(key, this.get(key)); + } + } + }; + Dict.empty = new Dict(null); + + Dict.merge = function (xref, dictArray) { + var mergedDict = new Dict(xref); + + for (var i = 0, ii = dictArray.length; i < ii; i++) { + var dict = dictArray[i]; + + if (!isDict(dict)) { + continue; + } + + for (var keyName in dict._map) { + if (mergedDict._map[keyName] !== undefined) { + continue; + } + + mergedDict._map[keyName] = dict._map[keyName]; + } + } + + return mergedDict; + }; + + return Dict; +}(); + +exports.Dict = Dict; + +var Ref = function RefClosure() { + var refCache = Object.create(null); + + function Ref(num, gen) { + this.num = num; + this.gen = gen; + } + + Ref.prototype = { + toString: function Ref_toString() { + if (this.gen === 0) { + return "".concat(this.num, "R"); + } + + return "".concat(this.num, "R").concat(this.gen); + } + }; + + Ref.get = function (num, gen) { + var key = gen === 0 ? "".concat(num, "R") : "".concat(num, "R").concat(gen); + var refValue = refCache[key]; + return refValue ? refValue : refCache[key] = new Ref(num, gen); + }; + + Ref._clearCache = function () { + refCache = Object.create(null); + }; + + return Ref; +}(); + +exports.Ref = Ref; + +var RefSet = function RefSetClosure() { + function RefSet() { + this.dict = Object.create(null); + } + + RefSet.prototype = { + has: function RefSet_has(ref) { + return ref.toString() in this.dict; + }, + put: function RefSet_put(ref) { + this.dict[ref.toString()] = true; + }, + remove: function RefSet_remove(ref) { + delete this.dict[ref.toString()]; + } + }; + return RefSet; +}(); + +exports.RefSet = RefSet; + +var RefSetCache = function RefSetCacheClosure() { + function RefSetCache() { + this.dict = Object.create(null); + } + + RefSetCache.prototype = { + get: function RefSetCache_get(ref) { + return this.dict[ref.toString()]; + }, + has: function RefSetCache_has(ref) { + return ref.toString() in this.dict; + }, + put: function RefSetCache_put(ref, obj) { + this.dict[ref.toString()] = obj; + }, + putAlias: function RefSetCache_putAlias(ref, aliasRef) { + this.dict[ref.toString()] = this.get(aliasRef); + }, + forEach: function RefSetCache_forEach(fn, thisArg) { + for (var i in this.dict) { + fn.call(thisArg, this.dict[i]); + } + }, + clear: function RefSetCache_clear() { + this.dict = Object.create(null); + } + }; + return RefSetCache; +}(); + +exports.RefSetCache = RefSetCache; + +function isEOF(v) { + return v === EOF; +} + +function isName(v, name) { + return v instanceof Name && (name === undefined || v.name === name); +} + +function isCmd(v, cmd) { + return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); +} + +function isDict(v, type) { + return v instanceof Dict && (type === undefined || isName(v.get('Type'), type)); +} + +function isRef(v) { + return v instanceof Ref; +} + +function isRefsEqual(v1, v2) { + return v1.num === v2.num && v1.gen === v2.gen; +} + +function isStream(v) { + return _typeof(v) === 'object' && v !== null && v.getBytes !== undefined; +} + +function clearPrimitiveCaches() { + Cmd._clearCache(); + + Name._clearCache(); + + Ref._clearCache(); +} + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); @@ -11177,15 +11269,17 @@ exports.NetworkPdfManager = exports.LocalPdfManager = void 0; var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _chunked_stream = __w_pdfjs_require__(152); +var _chunked_stream = __w_pdfjs_require__(153); -var _document = __w_pdfjs_require__(153); +var _core_utils = __w_pdfjs_require__(154); -var _stream = __w_pdfjs_require__(157); +var _document = __w_pdfjs_require__(155); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _stream = __w_pdfjs_require__(158); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -11193,12 +11287,12 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } @@ -11260,8 +11354,8 @@ function () { value: function () { var _ensure = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(obj, prop, args) { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee(obj, prop, args) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -11272,7 +11366,7 @@ function () { return _context.stop(); } } - }, _callee, this); + }, _callee); })); function ensure(_x, _x2, _x3) { @@ -11354,7 +11448,7 @@ function (_BasePdfManager) { _this._docBaseUrl = docBaseUrl; _this.evaluatorOptions = evaluatorOptions; var stream = new _stream.Stream(data); - _this.pdfDocument = new _document.PDFDocument(_assertThisInitialized(_assertThisInitialized(_this)), stream); + _this.pdfDocument = new _document.PDFDocument(_assertThisInitialized(_this), stream); _this._loadedStreamPromise = Promise.resolve(stream); return _this; } @@ -11364,9 +11458,9 @@ function (_BasePdfManager) { value: function () { var _ensure2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2(obj, prop, args) { + _regenerator["default"].mark(function _callee2(obj, prop, args) { var value; - return _regenerator.default.wrap(function _callee2$(_context2) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -11387,7 +11481,7 @@ function (_BasePdfManager) { return _context2.stop(); } } - }, _callee2, this); + }, _callee2); })); function ensure(_x4, _x5, _x6) { @@ -11441,7 +11535,7 @@ function (_BasePdfManager2) { disableAutoFetch: args.disableAutoFetch, rangeChunkSize: args.rangeChunkSize }); - _this2.pdfDocument = new _document.PDFDocument(_assertThisInitialized(_assertThisInitialized(_this2)), _this2.streamManager.getStream()); + _this2.pdfDocument = new _document.PDFDocument(_assertThisInitialized(_this2), _this2.streamManager.getStream()); return _this2; } @@ -11450,9 +11544,9 @@ function (_BasePdfManager2) { value: function () { var _ensure3 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3(obj, prop, args) { + _regenerator["default"].mark(function _callee3(obj, prop, args) { var value; - return _regenerator.default.wrap(function _callee3$(_context3) { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -11473,7 +11567,7 @@ function (_BasePdfManager2) { _context3.prev = 7; _context3.t0 = _context3["catch"](0); - if (_context3.t0 instanceof _util.MissingDataException) { + if (_context3.t0 instanceof _core_utils.MissingDataException) { _context3.next = 11; break; } @@ -11536,7 +11630,7 @@ function (_BasePdfManager2) { exports.NetworkPdfManager = NetworkPdfManager; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -11547,7 +11641,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.ChunkedStreamManager = exports.ChunkedStream = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); + +var _core_utils = __w_pdfjs_require__(154); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -11643,6 +11739,10 @@ function () { }, { key: "ensureByte", value: function ensureByte(pos) { + if (pos < this.progressiveDataLength) { + return; + } + var chunk = Math.floor(pos / this.chunkSize); if (chunk === this.lastSuccessfulEnsureByteChunk) { @@ -11650,7 +11750,7 @@ function () { } if (!this.loadedChunks[chunk]) { - throw new _util.MissingDataException(pos, pos + 1); + throw new _core_utils.MissingDataException(pos, pos + 1); } this.lastSuccessfulEnsureByteChunk = chunk; @@ -11672,7 +11772,7 @@ function () { for (var chunk = beginChunk; chunk < endChunk; ++chunk) { if (!this.loadedChunks[chunk]) { - throw new _util.MissingDataException(begin, end); + throw new _core_utils.MissingDataException(begin, end); } } } @@ -11799,7 +11899,11 @@ function () { }, { key: "makeSubStream", value: function makeSubStream(start, length, dict) { - this.ensureRange(start, start + length); + if (length) { + this.ensureRange(start, start + length); + } else { + this.ensureByte(start); + } function ChunkedStreamSubstream() {} @@ -11953,8 +12057,8 @@ function () { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -12003,8 +12107,8 @@ function () { _iteratorError2 = err; } finally { try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); + if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { + _iterator2["return"](); } } finally { if (_didIteratorError2) { @@ -12060,8 +12164,8 @@ function () { _iteratorError3 = err; } finally { try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); + if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) { + _iterator3["return"](); } } finally { if (_didIteratorError3) { @@ -12167,8 +12271,8 @@ function () { _iteratorError4 = err; } finally { try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); + if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) { + _iterator4["return"](); } } finally { if (_didIteratorError4) { @@ -12196,8 +12300,8 @@ function () { } } - for (var _i = 0; _i < loadedRequests.length; _i++) { - var _requestId = loadedRequests[_i]; + for (var _i = 0, _loadedRequests = loadedRequests; _i < _loadedRequests.length; _i++) { + var _requestId = _loadedRequests[_i]; var capability = this.promisesByRequest[_requestId]; delete this.promisesByRequest[_requestId]; capability.resolve(); @@ -12244,7 +12348,139 @@ function () { exports.ChunkedStreamManager = ChunkedStreamManager; /***/ }), -/* 153 */ +/* 154 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getLookupTableFactory = getLookupTableFactory; +exports.getInheritableProperty = getInheritableProperty; +exports.toRomanNumerals = toRomanNumerals; +exports.XRefParseException = exports.XRefEntryException = exports.MissingDataException = void 0; + +var _util = __w_pdfjs_require__(5); + +function getLookupTableFactory(initializer) { + var lookup; + return function () { + if (initializer) { + lookup = Object.create(null); + initializer(lookup); + initializer = null; + } + + return lookup; + }; +} + +var MissingDataException = function MissingDataExceptionClosure() { + function MissingDataException(begin, end) { + this.begin = begin; + this.end = end; + this.message = "Missing data [".concat(begin, ", ").concat(end, ")"); + } + + MissingDataException.prototype = new Error(); + MissingDataException.prototype.name = 'MissingDataException'; + MissingDataException.constructor = MissingDataException; + return MissingDataException; +}(); + +exports.MissingDataException = MissingDataException; + +var XRefEntryException = function XRefEntryExceptionClosure() { + function XRefEntryException(msg) { + this.message = msg; + } + + XRefEntryException.prototype = new Error(); + XRefEntryException.prototype.name = 'XRefEntryException'; + XRefEntryException.constructor = XRefEntryException; + return XRefEntryException; +}(); + +exports.XRefEntryException = XRefEntryException; + +var XRefParseException = function XRefParseExceptionClosure() { + function XRefParseException(msg) { + this.message = msg; + } + + XRefParseException.prototype = new Error(); + XRefParseException.prototype.name = 'XRefParseException'; + XRefParseException.constructor = XRefParseException; + return XRefParseException; +}(); + +exports.XRefParseException = XRefParseException; + +function getInheritableProperty(_ref) { + var dict = _ref.dict, + key = _ref.key, + _ref$getArray = _ref.getArray, + getArray = _ref$getArray === void 0 ? false : _ref$getArray, + _ref$stopWhenFound = _ref.stopWhenFound, + stopWhenFound = _ref$stopWhenFound === void 0 ? true : _ref$stopWhenFound; + var LOOP_LIMIT = 100; + var loopCount = 0; + var values; + + while (dict) { + var value = getArray ? dict.getArray(key) : dict.get(key); + + if (value !== undefined) { + if (stopWhenFound) { + return value; + } + + if (!values) { + values = []; + } + + values.push(value); + } + + if (++loopCount > LOOP_LIMIT) { + (0, _util.warn)("getInheritableProperty: maximum loop count exceeded for \"".concat(key, "\"")); + break; + } + + dict = dict.get('Parent'); + } + + return values; +} + +var ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX']; + +function toRomanNumerals(number) { + var lowerCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + (0, _util.assert)(Number.isInteger(number) && number > 0, 'The number should be a positive integer.'); + var pos, + romanBuf = []; + + while (number >= 1000) { + number -= 1000; + romanBuf.push('M'); + } + + pos = number / 100 | 0; + number %= 100; + romanBuf.push(ROMAN_NUMBER_MAP[pos]); + pos = number / 10 | 0; + number %= 10; + romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); + romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); + var romanStr = romanBuf.join(''); + return lowerCase ? romanStr.toLowerCase() : romanStr; +} + +/***/ }), +/* 155 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -12255,25 +12491,27 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFDocument = exports.Page = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); + +var _obj = __w_pdfjs_require__(156); -var _obj = __w_pdfjs_require__(154); +var _primitives = __w_pdfjs_require__(151); -var _primitives = __w_pdfjs_require__(155); +var _core_utils = __w_pdfjs_require__(154); -var _stream2 = __w_pdfjs_require__(157); +var _stream2 = __w_pdfjs_require__(158); -var _annotation = __w_pdfjs_require__(169); +var _annotation = __w_pdfjs_require__(170); -var _crypto = __w_pdfjs_require__(167); +var _crypto = __w_pdfjs_require__(168); -var _parser = __w_pdfjs_require__(156); +var _parser = __w_pdfjs_require__(157); -var _operator_list = __w_pdfjs_require__(170); +var _operator_list = __w_pdfjs_require__(171); -var _evaluator = __w_pdfjs_require__(171); +var _evaluator = __w_pdfjs_require__(172); -var _function = __w_pdfjs_require__(185); +var _function = __w_pdfjs_require__(186); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -12321,13 +12559,15 @@ function () { this.pdfFunctionFactory = pdfFunctionFactory; this.evaluatorOptions = pdfManager.evaluatorOptions; this.resourcesPromise = null; - var uniquePrefix = "p".concat(this.pageIndex, "_"); var idCounters = { obj: 0 }; this.idFactory = { createObjId: function createObjId() { - return uniquePrefix + ++idCounters.obj; + return "p".concat(pageIndex, "_").concat(++idCounters.obj); + }, + getDocId: function getDocId() { + return "g_".concat(pdfManager.docId); } }; } @@ -12336,7 +12576,7 @@ function () { key: "_getInheritableProperty", value: function _getInheritableProperty(key) { var getArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var value = (0, _util.getInheritableProperty)({ + var value = (0, _core_utils.getInheritableProperty)({ dict: this.pageDict, key: key, getArray: getArray, @@ -12376,8 +12616,8 @@ function () { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -12421,7 +12661,6 @@ function () { var contentStreamPromise = this.pdfManager.ensure(this, 'getContentStream'); var resourcesPromise = this.loadResources(['ExtGState', 'ColorSpace', 'Pattern', 'Shading', 'XObject', 'Font']); var partialEvaluator = new _evaluator.PartialEvaluator({ - pdfManager: this.pdfManager, xref: this.xref, handler: handler, pageIndex: this.pageIndex, @@ -12479,8 +12718,8 @@ function () { _iteratorError2 = err; } finally { try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); + if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { + _iterator2["return"](); } } finally { if (_didIteratorError2) { @@ -12505,8 +12744,8 @@ function () { _iteratorError3 = err; } finally { try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); + if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) { + _iterator3["return"](); } } finally { if (_didIteratorError3) { @@ -12539,7 +12778,6 @@ function () { contentStream = _ref9[0]; var partialEvaluator = new _evaluator.PartialEvaluator({ - pdfManager: _this3.pdfManager, xref: _this3.xref, handler: handler, pageIndex: _this3.pageIndex, @@ -12684,22 +12922,10 @@ exports.Page = Page; var FINGERPRINT_FIRST_BYTES = 1024; var EMPTY_FINGERPRINT = '\x00\x00\x00\x00\x00\x00\x00' + '\x00\x00\x00\x00\x00\x00\x00\x00\x00'; -function find(stream, needle, limit, backwards) { - var pos = stream.pos; - var end = stream.end; - - if (pos + limit > end) { - limit = end - pos; - } - - var strBuf = []; - - for (var i = 0; i < limit; ++i) { - strBuf.push(String.fromCharCode(stream.getByte())); - } - - var str = strBuf.join(''); - stream.pos = pos; +function find(stream, needle, limit) { + var backwards = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + (0, _util.assert)(limit > 0, 'The "limit" must be a positive integer.'); + var str = (0, _util.bytesToString)(stream.peekBytes(limit)); var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); if (index === -1) { @@ -12757,18 +12983,32 @@ function () { this.xfa = this.acroForm.get('XFA'); var fields = this.acroForm.get('Fields'); - if ((!fields || !Array.isArray(fields) || fields.length === 0) && !this.xfa) { + if ((!Array.isArray(fields) || fields.length === 0) && !this.xfa) { this.acroForm = null; } } } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } (0, _util.info)('Cannot fetch AcroForm entry; assuming no AcroForms are present'); this.acroForm = null; } + + try { + var collection = this.catalog.catDict.get('Collection'); + + if ((0, _primitives.isDict)(collection) && collection.getKeys().length > 0) { + this.collection = collection; + } + } catch (ex) { + if (ex instanceof _core_utils.MissingDataException) { + throw ex; + } + + (0, _util.info)('Cannot fetch Collection dictionary.'); + } } }, { key: "checkHeader", @@ -12814,7 +13054,9 @@ function () { var catalog = this.catalog, linearization = this.linearization; (0, _util.assert)(linearization && linearization.pageFirst === pageIndex); - var ref = new _primitives.Ref(linearization.objectNumberFirst, 0); + + var ref = _primitives.Ref.get(linearization.objectNumberFirst, 0); + return this.xref.fetchAsync(ref).then(function (obj) { if ((0, _primitives.isDict)(obj, 'Page') || (0, _primitives.isDict)(obj) && !obj.has('Type') && obj.has('Contents')) { if (ref && !catalog.pageKidsCountCache.has(ref)) { @@ -12825,7 +13067,7 @@ function () { } throw new _util.FormatError('The Linearization dictionary doesn\'t point ' + 'to a valid Page dictionary.'); - }).catch(function (reason) { + })["catch"](function (reason) { (0, _util.info)(reason); return catalog.getPageDict(pageIndex); }); @@ -12864,13 +13106,13 @@ function () { value: function checkFirstPage() { var _this6 = this; - return this.getPage(0).catch(function (reason) { - if (reason instanceof _util.XRefEntryException) { + return this.getPage(0)["catch"](function (reason) { + if (reason instanceof _core_utils.XRefEntryException) { _this6._pagePromises.length = 0; _this6.cleanup(); - throw new _util.XRefParseException(); + throw new _core_utils.XRefParseException(); } }); } @@ -12892,7 +13134,7 @@ function () { try { linearization = _parser.Linearization.create(this.stream); } catch (err) { - if (err instanceof _util.MissingDataException) { + if (err instanceof _core_utils.MissingDataException) { throw err; } @@ -12980,14 +13222,15 @@ function () { PDFFormatVersion: this.pdfFormatVersion, IsLinearized: !!this.linearization, IsAcroFormPresent: !!this.acroForm, - IsXFAPresent: !!this.xfa + IsXFAPresent: !!this.xfa, + IsCollectionPresent: !!this.collection }; var infoDict; try { infoDict = this.xref.trailer.get('Info'); } catch (err) { - if (err instanceof _util.MissingDataException) { + if (err instanceof _core_utils.MissingDataException) { throw err; } @@ -13034,8 +13277,8 @@ function () { _iteratorError4 = err; } finally { try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); + if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) { + _iterator4["return"](); } } finally { if (_didIteratorError4) { @@ -13080,7 +13323,7 @@ function () { exports.PDFDocument = PDFDocument; /***/ }), -/* 154 */ +/* 156 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -13093,19 +13336,21 @@ exports.FileSpec = exports.XRef = exports.ObjectLoader = exports.Catalog = void var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _parser = __w_pdfjs_require__(156); +var _parser = __w_pdfjs_require__(157); -var _chunked_stream = __w_pdfjs_require__(152); +var _core_utils = __w_pdfjs_require__(154); -var _crypto = __w_pdfjs_require__(167); +var _chunked_stream = __w_pdfjs_require__(153); -var _colorspace = __w_pdfjs_require__(168); +var _crypto = __w_pdfjs_require__(168); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _colorspace = __w_pdfjs_require__(169); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } @@ -13211,6 +13456,7 @@ function () { var title = outlineDict.get('Title'); var flags = outlineDict.get('F') || 0; var color = outlineDict.getArray('C'); + var count = outlineDict.get('Count'); var rgbColor = blackColor; if (Array.isArray(color) && color.length === 3 && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) { @@ -13224,7 +13470,7 @@ function () { newWindow: data.newWindow, title: (0, _util.stringToPDFString)(title), color: rgbColor, - count: outlineDict.get('Count'), + count: Number.isInteger(count) ? count : undefined, bold: !!(flags & 2), italic: !!(flags & 1), items: [] @@ -13302,6 +13548,8 @@ function () { } else if (this.catDict.has('Dests')) { return this.catDict.get('Dests'); } + + return undefined; } }, { key: "_readPageLabels", @@ -13376,7 +13624,7 @@ function () { case 'R': case 'r': - currentLabel = (0, _util.toRomanNumerals)(currentIndex, style === 'r'); + currentLabel = (0, _core_utils.toRomanNumerals)(currentIndex, style === 'r'); break; case 'A': @@ -13436,8 +13684,8 @@ function () { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -13452,6 +13700,7 @@ function () { value: function cleanup() { var _this = this; + (0, _primitives.clearPrimitiveCaches)(); this.pageKidsCountCache.clear(); var promises = []; this.fontCache.forEach(function (promise) { @@ -13696,7 +13945,7 @@ function () { try { metadata = (0, _util.stringToUTF8String)((0, _util.bytesToString)(stream.getBytes())); } catch (e) { - if (e instanceof _util.MissingDataException) { + if (e instanceof _core_utils.MissingDataException) { throw e; } @@ -13726,7 +13975,7 @@ function () { try { obj = this._readDocumentOutline(); } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -13743,7 +13992,7 @@ function () { try { permissions = this._readPermissions(); } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -13793,7 +14042,7 @@ function () { try { obj = this._readPageLabels(); } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -13802,6 +14051,26 @@ function () { return (0, _util.shadow)(this, 'pageLabels', obj); } + }, { + key: "pageLayout", + get: function get() { + var obj = this.catDict.get('PageLayout'); + var pageLayout = ''; + + if ((0, _primitives.isName)(obj)) { + switch (obj.name) { + case 'SinglePage': + case 'OneColumn': + case 'TwoColumnLeft': + case 'TwoColumnRight': + case 'TwoPageLeft': + case 'TwoPageRight': + pageLayout = obj.name; + } + } + + return (0, _util.shadow)(this, 'pageLayout', pageLayout); + } }, { key: "pageMode", get: function get() { @@ -13822,6 +14091,162 @@ function () { return (0, _util.shadow)(this, 'pageMode', pageMode); } + }, { + key: "viewerPreferences", + get: function get() { + var _this2 = this; + + var ViewerPreferencesValidators = { + HideToolbar: _util.isBool, + HideMenubar: _util.isBool, + HideWindowUI: _util.isBool, + FitWindow: _util.isBool, + CenterWindow: _util.isBool, + DisplayDocTitle: _util.isBool, + NonFullScreenPageMode: _primitives.isName, + Direction: _primitives.isName, + ViewArea: _primitives.isName, + ViewClip: _primitives.isName, + PrintArea: _primitives.isName, + PrintClip: _primitives.isName, + PrintScaling: _primitives.isName, + Duplex: _primitives.isName, + PickTrayByPDFSize: _util.isBool, + PrintPageRange: Array.isArray, + NumCopies: Number.isInteger + }; + var obj = this.catDict.get('ViewerPreferences'); + var prefs = Object.create(null); + + if ((0, _primitives.isDict)(obj)) { + for (var key in ViewerPreferencesValidators) { + if (!obj.has(key)) { + continue; + } + + var value = obj.get(key); + + if (!ViewerPreferencesValidators[key](value)) { + (0, _util.info)("Bad value in ViewerPreferences for \"".concat(key, "\".")); + continue; + } + + var prefValue = void 0; + + switch (key) { + case 'NonFullScreenPageMode': + switch (value.name) { + case 'UseNone': + case 'UseOutlines': + case 'UseThumbs': + case 'UseOC': + prefValue = value.name; + break; + + default: + prefValue = 'UseNone'; + } + + break; + + case 'Direction': + switch (value.name) { + case 'L2R': + case 'R2L': + prefValue = value.name; + break; + + default: + prefValue = 'L2R'; + } + + break; + + case 'ViewArea': + case 'ViewClip': + case 'PrintArea': + case 'PrintClip': + switch (value.name) { + case 'MediaBox': + case 'CropBox': + case 'BleedBox': + case 'TrimBox': + case 'ArtBox': + prefValue = value.name; + break; + + default: + prefValue = 'CropBox'; + } + + break; + + case 'PrintScaling': + switch (value.name) { + case 'None': + case 'AppDefault': + prefValue = value.name; + break; + + default: + prefValue = 'AppDefault'; + } + + break; + + case 'Duplex': + switch (value.name) { + case 'Simplex': + case 'DuplexFlipShortEdge': + case 'DuplexFlipLongEdge': + prefValue = value.name; + break; + + default: + prefValue = 'None'; + } + + break; + + case 'PrintPageRange': + var length = value.length; + + if (length % 2 !== 0) { + break; + } + + var isValid = value.every(function (page, i, arr) { + return Number.isInteger(page) && page > 0 && (i === 0 || page >= arr[i - 1]) && page <= _this2.numPages; + }); + + if (isValid) { + prefValue = value; + } + + break; + + case 'NumCopies': + if (value > 0) { + prefValue = value; + } + + break; + + default: + (0, _util.assert)(typeof value === 'boolean'); + prefValue = value; + } + + if (prefValue !== undefined) { + prefs[key] = prefValue; + } else { + (0, _util.info)("Bad value in ViewerPreferences for \"".concat(key, "\".")); + } + } + } + + return (0, _util.shadow)(this, 'viewerPreferences', prefs); + } }, { key: "openActionDestination", get: function get() { @@ -14140,7 +14565,7 @@ var XRef = function XRefClosure() { try { encrypt = trailerDict.get('Encrypt'); } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -14159,7 +14584,7 @@ var XRef = function XRefClosure() { try { root = trailerDict.get('Root'); } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -14170,7 +14595,7 @@ var XRef = function XRefClosure() { this.root = root; } else { if (!recoveryMode) { - throw new _util.XRefParseException(); + throw new _core_utils.XRefParseException(); } throw new _util.FormatError('Invalid root reference'); @@ -14240,10 +14665,16 @@ var XRef = function XRefClosure() { entry.gen = parser.getObj(); var type = parser.getObj(); - if ((0, _primitives.isCmd)(type, 'f')) { - entry.free = true; - } else if ((0, _primitives.isCmd)(type, 'n')) { - entry.uncompressed = true; + if (type instanceof _primitives.Cmd) { + switch (type.cmd) { + case 'f': + entry.free = true; + break; + + case 'n': + entry.uncompressed = true; + break; + } } if (!Number.isInteger(entry.offset) || !Number.isInteger(entry.gen) || !(entry.free || entry.uncompressed)) { @@ -14527,7 +14958,12 @@ var XRef = function XRefClosure() { for (i = 0, ii = trailers.length; i < ii; ++i) { stream.pos = trailers[i]; - var parser = new _parser.Parser(new _parser.Lexer(stream), true, this, true); + var parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true, + recoveryMode: true + }); var obj = parser.getObj(); if (!(0, _primitives.isCmd)(obj, 'trailer')) { @@ -14545,7 +14981,7 @@ var XRef = function XRefClosure() { try { rootDict = dict.get('Root'); } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -14585,7 +15021,11 @@ var XRef = function XRefClosure() { startXRefParsedCache[startXRef] = true; stream.pos = startXRef + stream.start; - var parser = new _parser.Parser(new _parser.Lexer(stream), true, this); + var parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true + }); var obj = parser.getObj(); var dict; @@ -14637,7 +15077,7 @@ var XRef = function XRefClosure() { return this.topDict; } catch (e) { - if (e instanceof _util.MissingDataException) { + if (e instanceof _core_utils.MissingDataException) { throw e; } @@ -14645,10 +15085,10 @@ var XRef = function XRefClosure() { } if (recoveryMode) { - return; + return undefined; } - throw new _util.XRefParseException(); + throw new _core_utils.XRefParseException(); }, getEntry: function XRef_getEntry(i) { var xrefEntry = this.entries[i]; @@ -14709,11 +15149,15 @@ var XRef = function XRefClosure() { var num = ref.num; if (xrefEntry.gen !== gen) { - throw new _util.XRefEntryException("Inconsistent generation in XRef: ".concat(ref)); + throw new _core_utils.XRefEntryException("Inconsistent generation in XRef: ".concat(ref)); } var stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start); - var parser = new _parser.Parser(new _parser.Lexer(stream), true, this); + var parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true + }); var obj1 = parser.getObj(); var obj2 = parser.getObj(); var obj3 = parser.getObj(); @@ -14726,8 +15170,8 @@ var XRef = function XRefClosure() { obj2 = parseInt(obj2, 10); } - if (obj1 !== num || obj2 !== gen || !(0, _primitives.isCmd)(obj3)) { - throw new _util.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(ref)); + if (obj1 !== num || obj2 !== gen || !(obj3 instanceof _primitives.Cmd)) { + throw new _core_utils.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(ref)); } if (obj3.cmd !== 'obj') { @@ -14739,7 +15183,7 @@ var XRef = function XRefClosure() { } } - throw new _util.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(ref)); + throw new _core_utils.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(ref)); } if (this.encrypt && !suppressEncryption) { @@ -14757,7 +15201,7 @@ var XRef = function XRefClosure() { fetchCompressed: function fetchCompressed(ref, xrefEntry) { var suppressEncryption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var tableOffset = xrefEntry.offset; - var stream = this.fetch(new _primitives.Ref(tableOffset, 0)); + var stream = this.fetch(_primitives.Ref.get(tableOffset, 0)); if (!(0, _primitives.isStream)(stream)) { throw new _util.FormatError('bad ObjStm stream'); @@ -14770,8 +15214,11 @@ var XRef = function XRefClosure() { throw new _util.FormatError('invalid first and n parameters for ObjStm stream'); } - var parser = new _parser.Parser(new _parser.Lexer(stream), false, this); - parser.allowStreams = true; + var parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream), + xref: this, + allowStreams: true + }); var i, entries = [], num, @@ -14810,7 +15257,7 @@ var XRef = function XRefClosure() { xrefEntry = entries[xrefEntry.gen]; if (xrefEntry === undefined) { - throw new _util.XRefEntryException("Bad (compressed) XRef entry: ".concat(ref)); + throw new _core_utils.XRefEntryException("Bad (compressed) XRef entry: ".concat(ref)); } return xrefEntry; @@ -14818,8 +15265,8 @@ var XRef = function XRefClosure() { fetchIfRefAsync: function () { var _fetchIfRefAsync = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(obj, suppressEncryption) { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee(obj, suppressEncryption) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -14850,8 +15297,8 @@ var XRef = function XRefClosure() { fetchAsync: function () { var _fetchAsync = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2(ref, suppressEncryption) { - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2(ref, suppressEncryption) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -14862,7 +15309,7 @@ var XRef = function XRefClosure() { _context2.prev = 4; _context2.t0 = _context2["catch"](0); - if (_context2.t0 instanceof _util.MissingDataException) { + if (_context2.t0 instanceof _core_utils.MissingDataException) { _context2.next = 8; break; } @@ -15234,7 +15681,7 @@ var ObjectLoader = function () { return this.capability.promise; }, _walk: function _walk(nodesToVisit) { - var _this2 = this; + var _this3 = this; var nodesToRevisit = []; var pendingRequests = []; @@ -15251,7 +15698,7 @@ var ObjectLoader = function () { this.refSet.put(currentNode); currentNode = this.xref.fetch(currentNode); } catch (ex) { - if (!(ex instanceof _util.MissingDataException)) { + if (!(ex instanceof _core_utils.MissingDataException)) { throw ex; } @@ -15293,11 +15740,11 @@ var ObjectLoader = function () { var node = nodesToRevisit[_i4]; if ((0, _primitives.isRef)(node)) { - _this2.refSet.remove(node); + _this3.refSet.remove(node); } } - _this2._walk(nodesToRevisit); + _this3._walk(nodesToRevisit); }, this.capability.reject); return; } @@ -15312,7 +15759,7 @@ var ObjectLoader = function () { exports.ObjectLoader = ObjectLoader; /***/ }), -/* 155 */ +/* 157 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -15321,312 +15768,29 @@ exports.ObjectLoader = ObjectLoader; Object.defineProperty(exports, "__esModule", { value: true }); -exports.isEOF = isEOF; -exports.isCmd = isCmd; -exports.isDict = isDict; -exports.isName = isName; -exports.isRef = isRef; -exports.isRefsEqual = isRefsEqual; -exports.isStream = isStream; -exports.RefSetCache = exports.RefSet = exports.Ref = exports.Name = exports.Dict = exports.Cmd = exports.EOF = void 0; - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var EOF = {}; -exports.EOF = EOF; - -var Name = function NameClosure() { - function Name(name) { - this.name = name; - } - - Name.prototype = {}; - var nameCache = Object.create(null); - - Name.get = function Name_get(name) { - var nameValue = nameCache[name]; - return nameValue ? nameValue : nameCache[name] = new Name(name); - }; - - return Name; -}(); - -exports.Name = Name; - -var Cmd = function CmdClosure() { - function Cmd(cmd) { - this.cmd = cmd; - } - - Cmd.prototype = {}; - var cmdCache = Object.create(null); - - Cmd.get = function Cmd_get(cmd) { - var cmdValue = cmdCache[cmd]; - return cmdValue ? cmdValue : cmdCache[cmd] = new Cmd(cmd); - }; - - return Cmd; -}(); - -exports.Cmd = Cmd; - -var Dict = function DictClosure() { - var nonSerializable = function nonSerializableClosure() { - return nonSerializable; - }; - - function Dict(xref) { - this._map = Object.create(null); - this.xref = xref; - this.objId = null; - this.suppressEncryption = false; - this.__nonSerializable__ = nonSerializable; - } - - Dict.prototype = { - assignXref: function Dict_assignXref(newXref) { - this.xref = newXref; - }, - get: function Dict_get(key1, key2, key3) { - var value; - var xref = this.xref, - suppressEncryption = this.suppressEncryption; - - if (typeof (value = this._map[key1]) !== 'undefined' || key1 in this._map || typeof key2 === 'undefined') { - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - } - - if (typeof (value = this._map[key2]) !== 'undefined' || key2 in this._map || typeof key3 === 'undefined') { - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - } - - value = this._map[key3] || null; - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - }, - getAsync: function Dict_getAsync(key1, key2, key3) { - var value; - var xref = this.xref, - suppressEncryption = this.suppressEncryption; - - if (typeof (value = this._map[key1]) !== 'undefined' || key1 in this._map || typeof key2 === 'undefined') { - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - - return Promise.resolve(value); - } - - if (typeof (value = this._map[key2]) !== 'undefined' || key2 in this._map || typeof key3 === 'undefined') { - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - - return Promise.resolve(value); - } - - value = this._map[key3] || null; - - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - - return Promise.resolve(value); - }, - getArray: function Dict_getArray(key1, key2, key3) { - var value = this.get(key1, key2, key3); - var xref = this.xref, - suppressEncryption = this.suppressEncryption; - - if (!Array.isArray(value) || !xref) { - return value; - } - - value = value.slice(); - - for (var i = 0, ii = value.length; i < ii; i++) { - if (!isRef(value[i])) { - continue; - } - - value[i] = xref.fetch(value[i], suppressEncryption); - } - - return value; - }, - getRaw: function Dict_getRaw(key) { - return this._map[key]; - }, - getKeys: function Dict_getKeys() { - return Object.keys(this._map); - }, - set: function Dict_set(key, value) { - this._map[key] = value; - }, - has: function Dict_has(key) { - return key in this._map; - }, - forEach: function Dict_forEach(callback) { - for (var key in this._map) { - callback(key, this.get(key)); - } - } - }; - Dict.empty = new Dict(null); - - Dict.merge = function (xref, dictArray) { - var mergedDict = new Dict(xref); - - for (var i = 0, ii = dictArray.length; i < ii; i++) { - var dict = dictArray[i]; - - if (!isDict(dict)) { - continue; - } - - for (var keyName in dict._map) { - if (mergedDict._map[keyName] !== undefined) { - continue; - } - - mergedDict._map[keyName] = dict._map[keyName]; - } - } - - return mergedDict; - }; - - return Dict; -}(); - -exports.Dict = Dict; - -var Ref = function RefClosure() { - function Ref(num, gen) { - this.num = num; - this.gen = gen; - } - - Ref.prototype = { - toString: function Ref_toString() { - if (this.gen !== 0) { - return "".concat(this.num, "R").concat(this.gen); - } - - return "".concat(this.num, "R"); - } - }; - return Ref; -}(); - -exports.Ref = Ref; - -var RefSet = function RefSetClosure() { - function RefSet() { - this.dict = Object.create(null); - } - - RefSet.prototype = { - has: function RefSet_has(ref) { - return ref.toString() in this.dict; - }, - put: function RefSet_put(ref) { - this.dict[ref.toString()] = true; - }, - remove: function RefSet_remove(ref) { - delete this.dict[ref.toString()]; - } - }; - return RefSet; -}(); - -exports.RefSet = RefSet; - -var RefSetCache = function RefSetCacheClosure() { - function RefSetCache() { - this.dict = Object.create(null); - } - - RefSetCache.prototype = { - get: function RefSetCache_get(ref) { - return this.dict[ref.toString()]; - }, - has: function RefSetCache_has(ref) { - return ref.toString() in this.dict; - }, - put: function RefSetCache_put(ref, obj) { - this.dict[ref.toString()] = obj; - }, - putAlias: function RefSetCache_putAlias(ref, aliasRef) { - this.dict[ref.toString()] = this.get(aliasRef); - }, - forEach: function RefSetCache_forEach(fn, thisArg) { - for (var i in this.dict) { - fn.call(thisArg, this.dict[i]); - } - }, - clear: function RefSetCache_clear() { - this.dict = Object.create(null); - } - }; - return RefSetCache; -}(); - -exports.RefSetCache = RefSetCache; - -function isEOF(v) { - return v === EOF; -} - -function isName(v, name) { - return v instanceof Name && (name === undefined || v.name === name); -} - -function isCmd(v, cmd) { - return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); -} - -function isDict(v, type) { - return v instanceof Dict && (type === undefined || isName(v.get('Type'), type)); -} - -function isRef(v) { - return v instanceof Ref; -} - -function isRefsEqual(v1, v2) { - return v1.num === v2.num && v1.gen === v2.gen; -} - -function isStream(v) { - return _typeof(v) === 'object' && v !== null && v.getBytes !== undefined; -} +exports.Parser = exports.Linearization = exports.Lexer = void 0; -/***/ }), -/* 156 */ -/***/ (function(module, exports, __w_pdfjs_require__) { +var _stream = __w_pdfjs_require__(158); -"use strict"; +var _util = __w_pdfjs_require__(5); +var _primitives = __w_pdfjs_require__(151); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Parser = exports.Linearization = exports.Lexer = void 0; +var _ccitt_stream = __w_pdfjs_require__(159); -var _stream = __w_pdfjs_require__(157); +var _jbig2_stream = __w_pdfjs_require__(161); -var _util = __w_pdfjs_require__(6); +var _jpeg_stream = __w_pdfjs_require__(164); -var _primitives = __w_pdfjs_require__(155); +var _jpx_stream = __w_pdfjs_require__(166); -var _ccitt_stream = __w_pdfjs_require__(158); +var _core_utils = __w_pdfjs_require__(154); -var _jbig2_stream = __w_pdfjs_require__(160); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var _jpeg_stream = __w_pdfjs_require__(163); +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); } } -var _jpx_stream = __w_pdfjs_require__(165); +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var MAX_LENGTH_TO_CACHE = 1000; var MAX_ADLER32_LENGTH = 5552; @@ -15644,22 +15808,36 @@ function computeAdler32(bytes) { return b % 65521 << 16 | a % 65521; } -var Parser = function ParserClosure() { - function Parser(lexer, allowStreams, xref, recoveryMode) { +var Parser = +/*#__PURE__*/ +function () { + function Parser(_ref) { + var lexer = _ref.lexer, + xref = _ref.xref, + _ref$allowStreams = _ref.allowStreams, + allowStreams = _ref$allowStreams === void 0 ? false : _ref$allowStreams, + _ref$recoveryMode = _ref.recoveryMode, + recoveryMode = _ref$recoveryMode === void 0 ? false : _ref$recoveryMode; + + _classCallCheck(this, Parser); + this.lexer = lexer; - this.allowStreams = allowStreams; this.xref = xref; - this.recoveryMode = recoveryMode || false; + this.allowStreams = allowStreams; + this.recoveryMode = recoveryMode; this.imageCache = Object.create(null); this.refill(); } - Parser.prototype = { - refill: function Parser_refill() { + _createClass(Parser, [{ + key: "refill", + value: function refill() { this.buf1 = this.lexer.getObj(); this.buf2 = this.lexer.getObj(); - }, - shift: function Parser_shift() { + } + }, { + key: "shift", + value: function shift() { if ((0, _primitives.isCmd)(this.buf2, 'ID')) { this.buf1 = this.buf2; this.buf2 = null; @@ -15667,20 +15845,24 @@ var Parser = function ParserClosure() { this.buf1 = this.buf2; this.buf2 = this.lexer.getObj(); } - }, - tryShift: function Parser_tryShift() { + } + }, { + key: "tryShift", + value: function tryShift() { try { this.shift(); return true; } catch (e) { - if (e instanceof _util.MissingDataException) { + if (e instanceof _core_utils.MissingDataException) { throw e; } return false; } - }, - getObj: function Parser_getObj(cipherTransform) { + } + }, { + key: "getObj", + value: function getObj(cipherTransform) { var buf1 = this.buf1; this.shift(); @@ -15751,7 +15933,8 @@ var Parser = function ParserClosure() { var num = buf1; if (Number.isInteger(this.buf1) && (0, _primitives.isCmd)(this.buf2, 'R')) { - var ref = new _primitives.Ref(num, this.buf1); + var ref = _primitives.Ref.get(num, this.buf1); + this.shift(); this.shift(); return ref; @@ -15771,8 +15954,10 @@ var Parser = function ParserClosure() { } return buf1; - }, - findDefaultInlineStreamEnd: function findDefaultInlineStreamEnd(stream) { + } + }, { + key: "findDefaultInlineStreamEnd", + value: function findDefaultInlineStreamEnd(stream) { var E = 0x45, I = 0x49, SPACE = 0x20, @@ -15838,8 +16023,10 @@ var Parser = function ParserClosure() { } return stream.pos - endOffset - startPos; - }, - findDCTDecodeInlineStreamEnd: function Parser_findDCTDecodeInlineStreamEnd(stream) { + } + }, { + key: "findDCTDecodeInlineStreamEnd", + value: function findDCTDecodeInlineStreamEnd(stream) { var startPos = stream.pos, foundEOI = false, b, @@ -15927,8 +16114,10 @@ var Parser = function ParserClosure() { this.inlineStreamSkipEI(stream); return length; - }, - findASCII85DecodeInlineStreamEnd: function Parser_findASCII85DecodeInlineStreamEnd(stream) { + } + }, { + key: "findASCII85DecodeInlineStreamEnd", + value: function findASCII85DecodeInlineStreamEnd(stream) { var TILDE = 0x7E, GT = 0x3E; var startPos = stream.pos, @@ -15936,9 +16125,18 @@ var Parser = function ParserClosure() { length; while ((ch = stream.getByte()) !== -1) { - if (ch === TILDE && stream.peekByte() === GT) { - stream.skip(); - break; + if (ch === TILDE) { + ch = stream.peekByte(); + + while ((0, _util.isSpace)(ch)) { + stream.skip(); + ch = stream.peekByte(); + } + + if (ch === GT) { + stream.skip(); + break; + } } } @@ -15952,8 +16150,10 @@ var Parser = function ParserClosure() { this.inlineStreamSkipEI(stream); return length; - }, - findASCIIHexDecodeInlineStreamEnd: function Parser_findASCIIHexDecodeInlineStreamEnd(stream) { + } + }, { + key: "findASCIIHexDecodeInlineStreamEnd", + value: function findASCIIHexDecodeInlineStreamEnd(stream) { var GT = 0x3E; var startPos = stream.pos, ch, @@ -15975,8 +16175,10 @@ var Parser = function ParserClosure() { this.inlineStreamSkipEI(stream); return length; - }, - inlineStreamSkipEI: function Parser_inlineStreamSkipEI(stream) { + } + }, { + key: "inlineStreamSkipEI", + value: function inlineStreamSkipEI(stream) { var E = 0x45, I = 0x49; var state = 0, @@ -15991,12 +16193,14 @@ var Parser = function ParserClosure() { break; } } - }, - makeInlineImage: function Parser_makeInlineImage(cipherTransform) { + } + }, { + key: "makeInlineImage", + value: function makeInlineImage(cipherTransform) { var lexer = this.lexer; var stream = lexer.stream; - var dict = new _primitives.Dict(this.xref), - dictLength; + var dict = new _primitives.Dict(this.xref); + var dictLength; while (!(0, _primitives.isCmd)(this.buf1, 'ID') && !(0, _primitives.isEOF)(this.buf1)) { if (!(0, _primitives.isName)(this.buf1)) { @@ -16017,8 +16221,8 @@ var Parser = function ParserClosure() { dictLength = stream.pos - lexer.beginInlineImagePos; } - var filter = dict.get('Filter', 'F'), - filterName; + var filter = dict.get('Filter', 'F'); + var filterName; if ((0, _primitives.isName)(filter)) { filterName = filter.name; @@ -16030,8 +16234,8 @@ var Parser = function ParserClosure() { } } - var startPos = stream.pos, - length; + var startPos = stream.pos; + var length; if (filterName === 'DCTDecode' || filterName === 'DCT') { length = this.findDCTDecodeInlineStreamEnd(stream); @@ -16072,15 +16276,17 @@ var Parser = function ParserClosure() { imageStream.dict = dict; if (cacheKey !== undefined) { - imageStream.cacheKey = 'inline_' + length + '_' + cacheKey; + imageStream.cacheKey = "inline_".concat(length, "_").concat(cacheKey); this.imageCache[cacheKey] = imageStream; } this.buf2 = _primitives.Cmd.get('EI'); this.shift(); return imageStream; - }, - _findStreamLength: function _findStreamLength(startPos, signature) { + } + }, { + key: "_findStreamLength", + value: function _findStreamLength(startPos, signature) { var stream = this.lexer.stream; stream.pos = startPos; var SCAN_BLOCK_LENGTH = 2048; @@ -16115,8 +16321,10 @@ var Parser = function ParserClosure() { } return -1; - }, - makeStream: function Parser_makeStream(dict, cipherTransform) { + } + }, { + key: "makeStream", + value: function makeStream(dict, cipherTransform) { var lexer = this.lexer; var stream = lexer.stream; lexer.skipToNextLine(); @@ -16124,7 +16332,7 @@ var Parser = function ParserClosure() { var length = dict.get('Length'); if (!Number.isInteger(length)) { - (0, _util.info)('Bad ' + length + ' attribute in stream'); + (0, _util.info)("Bad length \"".concat(length, "\" in stream")); length = 0; } @@ -16181,8 +16389,10 @@ var Parser = function ParserClosure() { stream = this.filter(stream, dict, length); stream.dict = dict; return stream; - }, - filter: function Parser_filter(stream, dict, length) { + } + }, { + key: "filter", + value: function filter(stream, dict, length) { var filter = dict.get('Filter', 'F'); var params = dict.get('DecodeParms', 'DP'); @@ -16204,7 +16414,7 @@ var Parser = function ParserClosure() { filter = this.xref.fetchIfRef(filterArray[i]); if (!(0, _primitives.isName)(filter)) { - throw new _util.FormatError('Bad filter name: ' + filter); + throw new _util.FormatError("Bad filter name \"".concat(filter, "\"")); } params = null; @@ -16219,10 +16429,12 @@ var Parser = function ParserClosure() { } return stream; - }, - makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) { + } + }, { + key: "makeFilter", + value: function makeFilter(stream, name, maybeLength, params) { if (maybeLength === 0) { - (0, _util.warn)('Empty "' + name + '" stream.'); + (0, _util.warn)("Empty \"".concat(name, "\" stream.")); return new _stream.NullStream(); } @@ -16289,54 +16501,65 @@ var Parser = function ParserClosure() { return new _jbig2_stream.Jbig2Stream(stream, maybeLength, stream.dict, params); } - (0, _util.warn)('filter "' + name + '" not supported yet'); + (0, _util.warn)("Filter \"".concat(name, "\" is not supported.")); return stream; } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } - (0, _util.warn)('Invalid stream: \"' + ex + '\"'); + (0, _util.warn)("Invalid stream: \"".concat(ex, "\"")); return new _stream.NullStream(); } } - }; + }]); + return Parser; }(); exports.Parser = Parser; +var specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 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, 0, 0, 2, 0, 2, 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, 0, 0, 0, 2, 0, 2, 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, 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, 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, 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, 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]; -var Lexer = function LexerClosure() { - function Lexer(stream, knownCommands) { - this.stream = stream; - this.nextChar(); - this.strBuf = []; - this.knownCommands = knownCommands; - this.beginInlineImagePos = -1; +function toHexDigit(ch) { + if (ch >= 0x30 && ch <= 0x39) { + return ch & 0x0F; } - var specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 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, 0, 0, 2, 0, 2, 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, 0, 0, 0, 2, 0, 2, 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, 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, 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, 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, 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]; + if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { + return (ch & 0x0F) + 9; + } - function toHexDigit(ch) { - if (ch >= 0x30 && ch <= 0x39) { - return ch & 0x0F; - } + return -1; +} - if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { - return (ch & 0x0F) + 9; - } +var Lexer = +/*#__PURE__*/ +function () { + function Lexer(stream) { + var knownCommands = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + _classCallCheck(this, Lexer); - return -1; + this.stream = stream; + this.nextChar(); + this.strBuf = []; + this.knownCommands = knownCommands; + this.beginInlineImagePos = -1; } - Lexer.prototype = { - nextChar: function Lexer_nextChar() { + _createClass(Lexer, [{ + key: "nextChar", + value: function nextChar() { return this.currentChar = this.stream.getByte(); - }, - peekChar: function Lexer_peekChar() { + } + }, { + key: "peekChar", + value: function peekChar() { return this.stream.peekByte(); - }, - getNumber: function Lexer_getNumber() { + } + }, { + key: "getNumber", + value: function getNumber() { var ch = this.currentChar; var eNotation = false; var divideBy = 0; @@ -16399,7 +16622,7 @@ var Lexer = function LexerClosure() { break; } } else if (ch === 0x2D) { - (0, _util.warn)('Badly formatted number'); + (0, _util.warn)('Badly formatted number: minus sign in the middle'); } else if (ch === 0x45 || ch === 0x65) { ch = this.peekChar(); @@ -16425,8 +16648,10 @@ var Lexer = function LexerClosure() { } return sign * baseValue; - }, - getString: function Lexer_getString() { + } + }, { + key: "getString", + value: function getString() { var numParen = 1; var done = false; var strBuf = this.strBuf; @@ -16549,8 +16774,10 @@ var Lexer = function LexerClosure() { } return strBuf.join(''); - }, - getName: function Lexer_getName() { + } + }, { + key: "getName", + value: function getName() { var ch, previousCh; var strBuf = this.strBuf; strBuf.length = 0; @@ -16573,7 +16800,7 @@ var Lexer = function LexerClosure() { var x2 = toHexDigit(ch); if (x2 === -1) { - (0, _util.warn)('Lexer_getName: Illegal digit (' + String.fromCharCode(ch) + ') in hexadecimal number.'); + (0, _util.warn)("Lexer_getName: Illegal digit (".concat(String.fromCharCode(ch), ") ") + 'in hexadecimal number.'); strBuf.push('#', String.fromCharCode(previousCh)); if (specialChars[ch]) { @@ -16594,18 +16821,19 @@ var Lexer = function LexerClosure() { } if (strBuf.length > 127) { - (0, _util.warn)('name token is longer than allowed by the spec: ' + strBuf.length); + (0, _util.warn)("Name token is longer than allowed by the spec: ".concat(strBuf.length)); } return _primitives.Name.get(strBuf.join('')); - }, - getHexString: function Lexer_getHexString() { + } + }, { + key: "getHexString", + value: function getHexString() { var strBuf = this.strBuf; strBuf.length = 0; var ch = this.currentChar; var isFirstHex = true; - var firstDigit; - var secondDigit; + var firstDigit, secondDigit; while (true) { if (ch < 0) { @@ -16622,7 +16850,7 @@ var Lexer = function LexerClosure() { firstDigit = toHexDigit(ch); if (firstDigit === -1) { - (0, _util.warn)('Ignoring invalid character "' + ch + '" in hex string'); + (0, _util.warn)("Ignoring invalid character \"".concat(ch, "\" in hex string")); ch = this.nextChar(); continue; } @@ -16630,7 +16858,7 @@ var Lexer = function LexerClosure() { secondDigit = toHexDigit(ch); if (secondDigit === -1) { - (0, _util.warn)('Ignoring invalid character "' + ch + '" in hex string'); + (0, _util.warn)("Ignoring invalid character \"".concat(ch, "\" in hex string")); ch = this.nextChar(); continue; } @@ -16644,8 +16872,10 @@ var Lexer = function LexerClosure() { } return strBuf.join(''); - }, - getObj: function Lexer_getObj() { + } + }, { + key: "getObj", + value: function getObj() { var comment = false; var ch = this.currentChar; @@ -16766,8 +16996,10 @@ var Lexer = function LexerClosure() { } return _primitives.Cmd.get(str); - }, - skipToNextLine: function Lexer_skipToNextLine() { + } + }, { + key: "skipToNextLine", + value: function skipToNextLine() { var ch = this.currentChar; while (ch >= 0) { @@ -16787,69 +17019,88 @@ var Lexer = function LexerClosure() { ch = this.nextChar(); } } - }; + }]); + return Lexer; }(); exports.Lexer = Lexer; -var Linearization = { - create: function LinearizationCreate(stream) { - function getInt(name, allowZeroValue) { - var obj = linDict.get(name); - if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { - return obj; +var Linearization = +/*#__PURE__*/ +function () { + function Linearization() { + _classCallCheck(this, Linearization); + } + + _createClass(Linearization, null, [{ + key: "create", + value: function create(stream) { + function getInt(linDict, name) { + var allowZeroValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var obj = linDict.get(name); + + if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { + return obj; + } + + throw new Error("The \"".concat(name, "\" parameter in the linearization ") + 'dictionary is invalid.'); } - throw new Error('The "' + name + '" parameter in the linearization ' + 'dictionary is invalid.'); - } + function getHints(linDict) { + var hints = linDict.get('H'); + var hintsLength; - function getHints() { - var hints = linDict.get('H'), - hintsLength, - item; + if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { + for (var index = 0; index < hintsLength; index++) { + var hint = hints[index]; - if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { - for (var index = 0; index < hintsLength; index++) { - if (!(Number.isInteger(item = hints[index]) && item > 0)) { - throw new Error('Hint (' + index + ') in the linearization dictionary is invalid.'); + if (!(Number.isInteger(hint) && hint > 0)) { + throw new Error("Hint (".concat(index, ") in the linearization dictionary ") + 'is invalid.'); + } } + + return hints; } - return hints; + throw new Error('Hint array in the linearization dictionary is invalid.'); } - throw new Error('Hint array in the linearization dictionary is invalid.'); - } + var parser = new Parser({ + lexer: new Lexer(stream), + xref: null + }); + var obj1 = parser.getObj(); + var obj2 = parser.getObj(); + var obj3 = parser.getObj(); + var linDict = parser.getObj(); + var obj, length; - var parser = new Parser(new Lexer(stream), false, null); - var obj1 = parser.getObj(); - var obj2 = parser.getObj(); - var obj3 = parser.getObj(); - var linDict = parser.getObj(); - var obj, length; + if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && (0, _primitives.isCmd)(obj3, 'obj') && (0, _primitives.isDict)(linDict) && (0, _util.isNum)(obj = linDict.get('Linearized')) && obj > 0)) { + return null; + } else if ((length = getInt(linDict, 'L')) !== stream.length) { + throw new Error('The "L" parameter in the linearization dictionary ' + 'does not equal the stream length.'); + } - if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && (0, _primitives.isCmd)(obj3, 'obj') && (0, _primitives.isDict)(linDict) && (0, _util.isNum)(obj = linDict.get('Linearized')) && obj > 0)) { - return null; - } else if ((length = getInt('L')) !== stream.length) { - throw new Error('The "L" parameter in the linearization dictionary ' + 'does not equal the stream length.'); + return { + length: length, + hints: getHints(linDict), + objectNumberFirst: getInt(linDict, 'O'), + endFirst: getInt(linDict, 'E'), + numPages: getInt(linDict, 'N'), + mainXRefEntriesOffset: getInt(linDict, 'T'), + pageFirst: linDict.has('P') ? getInt(linDict, 'P', true) : 0 + }; } + }]); + + return Linearization; +}(); - return { - length: length, - hints: getHints(), - objectNumberFirst: getInt('O'), - endFirst: getInt('E'), - numPages: getInt('N'), - mainXRefEntriesOffset: getInt('T'), - pageFirst: linDict.has('P') ? getInt('P', true) : 0 - }; - } -}; exports.Linearization = Linearization; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -16860,9 +17111,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.LZWStream = exports.StringStream = exports.StreamsSequenceStream = exports.Stream = exports.RunLengthStream = exports.PredictorStream = exports.NullStream = exports.FlateStream = exports.DecodeStream = exports.DecryptStream = exports.AsciiHexStream = exports.Ascii85Stream = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } @@ -18131,7 +18382,7 @@ var NullStream = function NullStreamClosure() { exports.NullStream = NullStream; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -18142,11 +18393,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.CCITTFaxStream = void 0; -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _ccitt = __w_pdfjs_require__(159); +var _ccitt = __w_pdfjs_require__(160); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); var CCITTFaxStream = function CCITTFaxStreamClosure() { function CCITTFaxStream(str, maybeLength, params) { @@ -18197,7 +18448,7 @@ var CCITTFaxStream = function CCITTFaxStreamClosure() { exports.CCITTFaxStream = CCITTFaxStream; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -18208,7 +18459,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.CCITTFaxDecoder = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); var CCITTFaxDecoder = function CCITTFaxDecoder() { var ccittEOL = -2; @@ -18895,7 +19146,7 @@ var CCITTFaxDecoder = function CCITTFaxDecoder() { exports.CCITTFaxDecoder = CCITTFaxDecoder; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -18906,13 +19157,13 @@ Object.defineProperty(exports, "__esModule", { }); exports.Jbig2Stream = void 0; -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); -var _jbig = __w_pdfjs_require__(161); +var _jbig = __w_pdfjs_require__(162); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); var Jbig2Stream = function Jbig2StreamClosure() { function Jbig2Stream(stream, maybeLength, dict, params) { @@ -18978,7 +19229,7 @@ var Jbig2Stream = function Jbig2StreamClosure() { exports.Jbig2Stream = Jbig2Stream; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -18989,11 +19240,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.Jbig2Image = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _arithmetic_decoder = __w_pdfjs_require__(162); +var _arithmetic_decoder = __w_pdfjs_require__(163); -var _ccitt = __w_pdfjs_require__(159); +var _ccitt = __w_pdfjs_require__(160); var Jbig2Error = function Jbig2ErrorClosure() { function Jbig2Error(msg) { @@ -21177,7 +21428,7 @@ var Jbig2Image = function Jbig2ImageClosure() { exports.Jbig2Image = Jbig2Image; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -21547,7 +21798,7 @@ function () { exports.ArithmeticDecoder = ArithmeticDecoder; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -21558,13 +21809,13 @@ Object.defineProperty(exports, "__esModule", { }); exports.JpegStream = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _jpg = __w_pdfjs_require__(164); +var _jpg = __w_pdfjs_require__(165); var JpegStream = function JpegStreamClosure() { function JpegStream(stream, maybeLength, dict, params) { @@ -21659,7 +21910,7 @@ var JpegStream = function JpegStreamClosure() { exports.JpegStream = JpegStream; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -21670,7 +21921,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.JpegImage = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -22660,6 +22911,7 @@ var JpegImage = function JpegImageClosure() { } this.numComponents = this.components.length; + return undefined; }, _getLinearizedBlockData: function _getLinearizedBlockData(width, height) { var isSourcePDF = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; @@ -22848,7 +23100,7 @@ var JpegImage = function JpegImageClosure() { exports.JpegImage = JpegImage; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -22859,11 +23111,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.JpxStream = void 0; -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); -var _jpx = __w_pdfjs_require__(166); +var _jpx = __w_pdfjs_require__(167); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); var JpxStream = function JpxStreamClosure() { function JpxStream(stream, maybeLength, dict, params) { @@ -22935,7 +23187,7 @@ var JpxStream = function JpxStreamClosure() { exports.JpxStream = JpxStream; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -22946,9 +23198,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.JpxImage = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _arithmetic_decoder = __w_pdfjs_require__(162); +var _arithmetic_decoder = __w_pdfjs_require__(163); var JpxError = function JpxErrorClosure() { function JpxError(msg) { @@ -25253,7 +25505,7 @@ var JpxImage = function JpxImageClosure() { exports.JpxImage = JpxImage; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -25264,11 +25516,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.calculateSHA512 = exports.calculateSHA384 = exports.calculateSHA256 = exports.calculateMD5 = exports.PDF20 = exports.PDF17 = exports.CipherTransformFactory = exports.ARCFourCipher = exports.AES256Cipher = exports.AES128Cipher = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -26901,7 +27153,7 @@ var CipherTransformFactory = function CipherTransformFactoryClosure() { exports.CipherTransformFactory = CipherTransformFactory; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -26912,9 +27164,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.ColorSpace = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -28111,7 +28363,7 @@ var LabCS = function LabCSClosure() { }(); /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -28120,19 +28372,25 @@ var LabCS = function LabCSClosure() { Object.defineProperty(exports, "__esModule", { value: true }); -exports.AnnotationFactory = exports.AnnotationBorderStyle = exports.Annotation = void 0; +exports.MarkupAnnotation = exports.AnnotationFactory = exports.AnnotationBorderStyle = exports.Annotation = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _obj = __w_pdfjs_require__(154); +var _obj = __w_pdfjs_require__(156); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _colorspace = __w_pdfjs_require__(168); +var _colorspace = __w_pdfjs_require__(169); -var _operator_list = __w_pdfjs_require__(170); +var _core_utils = __w_pdfjs_require__(154); -var _stream = __w_pdfjs_require__(157); +var _operator_list = __w_pdfjs_require__(171); + +var _stream = __w_pdfjs_require__(158); + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -28140,10 +28398,6 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } - -function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } - function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } @@ -28174,16 +28428,15 @@ function () { var dict = xref.fetchIfRef(ref); if (!(0, _primitives.isDict)(dict)) { - return; + return undefined; } - var id = (0, _primitives.isRef)(ref) ? ref.toString() : 'annot_' + idFactory.createObjId(); + var id = (0, _primitives.isRef)(ref) ? ref.toString() : "annot_".concat(idFactory.createObjId()); var subtype = dict.get('Subtype'); subtype = (0, _primitives.isName)(subtype) ? subtype.name : null; var parameters = { xref: xref, dict: dict, - ref: (0, _primitives.isRef)(ref) ? ref : null, subtype: subtype, id: id, pdfManager: pdfManager @@ -28197,7 +28450,7 @@ function () { return new TextAnnotation(parameters); case 'Widget': - var fieldType = (0, _util.getInheritableProperty)({ + var fieldType = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'FT' }); @@ -28220,6 +28473,9 @@ function () { case 'Popup': return new PopupAnnotation(parameters); + case 'FreeText': + return new FreeTextAnnotation(parameters); + case 'Line': return new LineAnnotation(parameters); @@ -28235,6 +28491,9 @@ function () { case 'Polygon': return new PolygonAnnotation(parameters); + case 'Caret': + return new CaretAnnotation(parameters); + case 'Ink': return new InkAnnotation(parameters); @@ -28297,6 +28556,8 @@ function () { _classCallCheck(this, Annotation); var dict = params.dict; + this.setContents(dict.get('Contents')); + this.setModificationDate(dict.get('M')); this.setFlags(dict.get('F')); this.setRectangle(dict.getArray('Rect')); this.setColor(dict.getArray('C')); @@ -28306,8 +28567,10 @@ function () { annotationFlags: this.flags, borderStyle: this.borderStyle, color: this.color, + contents: this.contents, hasAppearance: !!this.appearance, id: params.id, + modificationDate: this.modificationDate, rect: this.rectangle, subtype: params.subtype }; @@ -28328,6 +28591,16 @@ function () { value: function _isPrintable(flags) { return this._hasFlag(flags, _util.AnnotationFlag.PRINT) && !this._hasFlag(flags, _util.AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, _util.AnnotationFlag.HIDDEN); } + }, { + key: "setContents", + value: function setContents(contents) { + this.contents = (0, _util.stringToPDFString)(contents || ''); + } + }, { + key: "setModificationDate", + value: function setModificationDate(modificationDate) { + this.modificationDate = (0, _util.isString)(modificationDate) ? modificationDate : null; + } }, { key: "setFlags", value: function setFlags(flags) { @@ -28399,7 +28672,7 @@ function () { var dictType = dict.get('Type'); if (!dictType || (0, _primitives.isName)(dictType, 'Border')) { - this.borderStyle.setWidth(dict.get('W')); + this.borderStyle.setWidth(dict.get('W'), this.rectangle); this.borderStyle.setStyle(dict.get('S')); this.borderStyle.setDashArray(dict.getArray('D')); } @@ -28409,7 +28682,7 @@ function () { if (Array.isArray(array) && array.length >= 3) { this.borderStyle.setHorizontalCornerRadius(array[0]); this.borderStyle.setVerticalCornerRadius(array[1]); - this.borderStyle.setWidth(array[2]); + this.borderStyle.setWidth(array[2], this.rectangle); if (array.length === 4) { this.borderStyle.setDashArray(array[3]); @@ -28448,23 +28721,12 @@ function () { this.appearance = normalAppearanceState.get(as.name); } - }, { - key: "_preparePopup", - value: function _preparePopup(dict) { - if (!dict.has('C')) { - this.data.color = null; - } - - this.data.hasPopup = dict.has('Popup'); - this.data.title = (0, _util.stringToPDFString)(dict.get('T') || ''); - this.data.contents = (0, _util.stringToPDFString)(dict.get('Contents') || ''); - } }, { key: "loadResources", value: function loadResources(keys) { return this.appearance.dict.getAsync('Resources').then(function (resources) { if (!resources) { - return; + return undefined; } var objectLoader = new _obj.ObjectLoader(resources, keys, resources.xref); @@ -28546,12 +28808,24 @@ function () { _createClass(AnnotationBorderStyle, [{ key: "setWidth", value: function setWidth(width) { + var rect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0, 0]; + if ((0, _primitives.isName)(width)) { this.width = 0; return; } if (Number.isInteger(width)) { + if (width > 0) { + var maxWidth = (rect[2] - rect[0]) / 2; + var maxHeight = (rect[3] - rect[1]) / 2; + + if (maxWidth > 0 && maxHeight > 0 && (width > maxWidth || width > maxHeight)) { + (0, _util.warn)("AnnotationBorderStyle.setWidth - ignoring width: ".concat(width)); + width = 1; + } + } + this.width = width; } } @@ -28636,41 +28910,78 @@ function () { exports.AnnotationBorderStyle = AnnotationBorderStyle; -var WidgetAnnotation = +var MarkupAnnotation = /*#__PURE__*/ function (_Annotation) { - _inherits(WidgetAnnotation, _Annotation); + _inherits(MarkupAnnotation, _Annotation); - function WidgetAnnotation(params) { + function MarkupAnnotation(parameters) { var _this2; + _classCallCheck(this, MarkupAnnotation); + + _this2 = _possibleConstructorReturn(this, _getPrototypeOf(MarkupAnnotation).call(this, parameters)); + var dict = parameters.dict; + + if (!dict.has('C')) { + _this2.data.color = null; + } + + _this2.setCreationDate(dict.get('CreationDate')); + + _this2.data.creationDate = _this2.creationDate; + _this2.data.hasPopup = dict.has('Popup'); + _this2.data.title = (0, _util.stringToPDFString)(dict.get('T') || ''); + return _this2; + } + + _createClass(MarkupAnnotation, [{ + key: "setCreationDate", + value: function setCreationDate(creationDate) { + this.creationDate = (0, _util.isString)(creationDate) ? creationDate : null; + } + }]); + + return MarkupAnnotation; +}(Annotation); + +exports.MarkupAnnotation = MarkupAnnotation; + +var WidgetAnnotation = +/*#__PURE__*/ +function (_Annotation2) { + _inherits(WidgetAnnotation, _Annotation2); + + function WidgetAnnotation(params) { + var _this3; + _classCallCheck(this, WidgetAnnotation); - _this2 = _possibleConstructorReturn(this, _getPrototypeOf(WidgetAnnotation).call(this, params)); + _this3 = _possibleConstructorReturn(this, _getPrototypeOf(WidgetAnnotation).call(this, params)); var dict = params.dict; - var data = _this2.data; + var data = _this3.data; data.annotationType = _util.AnnotationType.WIDGET; - data.fieldName = _this2._constructFieldName(dict); - data.fieldValue = (0, _util.getInheritableProperty)({ + data.fieldName = _this3._constructFieldName(dict); + data.fieldValue = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'V', getArray: true }); data.alternativeText = (0, _util.stringToPDFString)(dict.get('TU') || ''); - data.defaultAppearance = (0, _util.getInheritableProperty)({ + data.defaultAppearance = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'DA' }) || ''; - var fieldType = (0, _util.getInheritableProperty)({ + var fieldType = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'FT' }); data.fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; - _this2.fieldResources = (0, _util.getInheritableProperty)({ + _this3.fieldResources = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'DR' }) || _primitives.Dict.empty; - data.fieldFlags = (0, _util.getInheritableProperty)({ + data.fieldFlags = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'Ff' }); @@ -28679,15 +28990,15 @@ function (_Annotation) { data.fieldFlags = 0; } - data.readOnly = _this2.hasFieldFlag(_util.AnnotationFieldFlag.READONLY); + data.readOnly = _this3.hasFieldFlag(_util.AnnotationFieldFlag.READONLY); if (data.fieldType === 'Sig') { data.fieldValue = null; - _this2.setFlags(_util.AnnotationFlag.HIDDEN); + _this3.setFlags(_util.AnnotationFlag.HIDDEN); } - return _this2; + return _this3; } _createClass(WidgetAnnotation, [{ @@ -28749,14 +29060,14 @@ function (_WidgetAnnotation) { _inherits(TextWidgetAnnotation, _WidgetAnnotation); function TextWidgetAnnotation(params) { - var _this3; + var _this4; _classCallCheck(this, TextWidgetAnnotation); - _this3 = _possibleConstructorReturn(this, _getPrototypeOf(TextWidgetAnnotation).call(this, params)); + _this4 = _possibleConstructorReturn(this, _getPrototypeOf(TextWidgetAnnotation).call(this, params)); var dict = params.dict; - _this3.data.fieldValue = (0, _util.stringToPDFString)(_this3.data.fieldValue || ''); - var alignment = (0, _util.getInheritableProperty)({ + _this4.data.fieldValue = (0, _util.stringToPDFString)(_this4.data.fieldValue || ''); + var alignment = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'Q' }); @@ -28765,8 +29076,8 @@ function (_WidgetAnnotation) { alignment = null; } - _this3.data.textAlignment = alignment; - var maximumLength = (0, _util.getInheritableProperty)({ + _this4.data.textAlignment = alignment; + var maximumLength = (0, _core_utils.getInheritableProperty)({ dict: dict, key: 'MaxLen' }); @@ -28775,10 +29086,10 @@ function (_WidgetAnnotation) { maximumLength = null; } - _this3.data.maxLen = maximumLength; - _this3.data.multiLine = _this3.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE); - _this3.data.comb = _this3.hasFieldFlag(_util.AnnotationFieldFlag.COMB) && !_this3.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE) && !_this3.hasFieldFlag(_util.AnnotationFieldFlag.PASSWORD) && !_this3.hasFieldFlag(_util.AnnotationFieldFlag.FILESELECT) && _this3.data.maxLen !== null; - return _this3; + _this4.data.maxLen = maximumLength; + _this4.data.multiLine = _this4.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE); + _this4.data.comb = _this4.hasFieldFlag(_util.AnnotationFieldFlag.COMB) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.PASSWORD) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.FILESELECT) && _this4.data.maxLen !== null; + return _this4; } _createClass(TextWidgetAnnotation, [{ @@ -28815,26 +29126,26 @@ function (_WidgetAnnotation2) { _inherits(ButtonWidgetAnnotation, _WidgetAnnotation2); function ButtonWidgetAnnotation(params) { - var _this4; + var _this5; _classCallCheck(this, ButtonWidgetAnnotation); - _this4 = _possibleConstructorReturn(this, _getPrototypeOf(ButtonWidgetAnnotation).call(this, params)); - _this4.data.checkBox = !_this4.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); - _this4.data.radioButton = _this4.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); - _this4.data.pushButton = _this4.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); - - if (_this4.data.checkBox) { - _this4._processCheckBox(params); - } else if (_this4.data.radioButton) { - _this4._processRadioButton(params); - } else if (_this4.data.pushButton) { - _this4._processPushButton(params); + _this5 = _possibleConstructorReturn(this, _getPrototypeOf(ButtonWidgetAnnotation).call(this, params)); + _this5.data.checkBox = !_this5.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !_this5.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); + _this5.data.radioButton = _this5.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !_this5.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); + _this5.data.pushButton = _this5.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); + + if (_this5.data.checkBox) { + _this5._processCheckBox(params); + } else if (_this5.data.radioButton) { + _this5._processRadioButton(params); + } else if (_this5.data.pushButton) { + _this5._processPushButton(params); } else { (0, _util.warn)('Invalid field flags for button widget annotation'); } - return _this4; + return _this5; } _createClass(ButtonWidgetAnnotation, [{ @@ -28925,13 +29236,13 @@ function (_WidgetAnnotation3) { _inherits(ChoiceWidgetAnnotation, _WidgetAnnotation3); function ChoiceWidgetAnnotation(params) { - var _this5; + var _this6; _classCallCheck(this, ChoiceWidgetAnnotation); - _this5 = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceWidgetAnnotation).call(this, params)); - _this5.data.options = []; - var options = (0, _util.getInheritableProperty)({ + _this6 = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceWidgetAnnotation).call(this, params)); + _this6.data.options = []; + var options = (0, _core_utils.getInheritableProperty)({ dict: params.dict, key: 'Opt' }); @@ -28942,20 +29253,20 @@ function (_WidgetAnnotation3) { for (var i = 0, ii = options.length; i < ii; i++) { var option = xref.fetchIfRef(options[i]); var isOptionArray = Array.isArray(option); - _this5.data.options[i] = { + _this6.data.options[i] = { exportValue: isOptionArray ? xref.fetchIfRef(option[0]) : option, displayValue: (0, _util.stringToPDFString)(isOptionArray ? xref.fetchIfRef(option[1]) : option) }; } } - if (!Array.isArray(_this5.data.fieldValue)) { - _this5.data.fieldValue = [_this5.data.fieldValue]; + if (!Array.isArray(_this6.data.fieldValue)) { + _this6.data.fieldValue = [_this6.data.fieldValue]; } - _this5.data.combo = _this5.hasFieldFlag(_util.AnnotationFieldFlag.COMBO); - _this5.data.multiSelect = _this5.hasFieldFlag(_util.AnnotationFieldFlag.MULTISELECT); - return _this5; + _this6.data.combo = _this6.hasFieldFlag(_util.AnnotationFieldFlag.COMBO); + _this6.data.multiSelect = _this6.hasFieldFlag(_util.AnnotationFieldFlag.MULTISELECT); + return _this6; } return ChoiceWidgetAnnotation; @@ -28963,33 +29274,31 @@ function (_WidgetAnnotation3) { var TextAnnotation = /*#__PURE__*/ -function (_Annotation2) { - _inherits(TextAnnotation, _Annotation2); +function (_MarkupAnnotation) { + _inherits(TextAnnotation, _MarkupAnnotation); function TextAnnotation(parameters) { - var _this6; + var _this7; _classCallCheck(this, TextAnnotation); var DEFAULT_ICON_SIZE = 22; - _this6 = _possibleConstructorReturn(this, _getPrototypeOf(TextAnnotation).call(this, parameters)); - _this6.data.annotationType = _util.AnnotationType.TEXT; + _this7 = _possibleConstructorReturn(this, _getPrototypeOf(TextAnnotation).call(this, parameters)); + _this7.data.annotationType = _util.AnnotationType.TEXT; - if (_this6.data.hasAppearance) { - _this6.data.name = 'NoIcon'; + if (_this7.data.hasAppearance) { + _this7.data.name = 'NoIcon'; } else { - _this6.data.rect[1] = _this6.data.rect[3] - DEFAULT_ICON_SIZE; - _this6.data.rect[2] = _this6.data.rect[0] + DEFAULT_ICON_SIZE; - _this6.data.name = parameters.dict.has('Name') ? parameters.dict.get('Name').name : 'Note'; + _this7.data.rect[1] = _this7.data.rect[3] - DEFAULT_ICON_SIZE; + _this7.data.rect[2] = _this7.data.rect[0] + DEFAULT_ICON_SIZE; + _this7.data.name = parameters.dict.has('Name') ? parameters.dict.get('Name').name : 'Note'; } - _this6._preparePopup(parameters.dict); - - return _this6; + return _this7; } return TextAnnotation; -}(Annotation); +}(MarkupAnnotation); var LinkAnnotation = /*#__PURE__*/ @@ -28997,20 +29306,20 @@ function (_Annotation3) { _inherits(LinkAnnotation, _Annotation3); function LinkAnnotation(params) { - var _this7; + var _this8; _classCallCheck(this, LinkAnnotation); - _this7 = _possibleConstructorReturn(this, _getPrototypeOf(LinkAnnotation).call(this, params)); - _this7.data.annotationType = _util.AnnotationType.LINK; + _this8 = _possibleConstructorReturn(this, _getPrototypeOf(LinkAnnotation).call(this, params)); + _this8.data.annotationType = _util.AnnotationType.LINK; _obj.Catalog.parseDestDictionary({ destDict: params.dict, - resultObj: _this7.data, + resultObj: _this8.data, docBaseUrl: params.pdfManager.docBaseUrl }); - return _this7; + return _this8; } return LinkAnnotation; @@ -29022,143 +29331,158 @@ function (_Annotation4) { _inherits(PopupAnnotation, _Annotation4); function PopupAnnotation(parameters) { - var _this8; + var _this9; _classCallCheck(this, PopupAnnotation); - _this8 = _possibleConstructorReturn(this, _getPrototypeOf(PopupAnnotation).call(this, parameters)); - _this8.data.annotationType = _util.AnnotationType.POPUP; + _this9 = _possibleConstructorReturn(this, _getPrototypeOf(PopupAnnotation).call(this, parameters)); + _this9.data.annotationType = _util.AnnotationType.POPUP; var dict = parameters.dict; var parentItem = dict.get('Parent'); if (!parentItem) { (0, _util.warn)('Popup annotation has a missing or invalid parent annotation.'); - return _possibleConstructorReturn(_this8); + return _possibleConstructorReturn(_this9); } var parentSubtype = parentItem.get('Subtype'); - _this8.data.parentType = (0, _primitives.isName)(parentSubtype) ? parentSubtype.name : null; - _this8.data.parentId = dict.getRaw('Parent').toString(); - _this8.data.title = (0, _util.stringToPDFString)(parentItem.get('T') || ''); - _this8.data.contents = (0, _util.stringToPDFString)(parentItem.get('Contents') || ''); + _this9.data.parentType = (0, _primitives.isName)(parentSubtype) ? parentSubtype.name : null; + _this9.data.parentId = dict.getRaw('Parent').toString(); + _this9.data.title = (0, _util.stringToPDFString)(parentItem.get('T') || ''); + _this9.data.contents = (0, _util.stringToPDFString)(parentItem.get('Contents') || ''); + + if (!parentItem.has('M')) { + _this9.data.modificationDate = null; + } else { + _this9.setModificationDate(parentItem.get('M')); + + _this9.data.modificationDate = _this9.modificationDate; + } if (!parentItem.has('C')) { - _this8.data.color = null; + _this9.data.color = null; } else { - _this8.setColor(parentItem.getArray('C')); + _this9.setColor(parentItem.getArray('C')); - _this8.data.color = _this8.color; + _this9.data.color = _this9.color; } - if (!_this8.viewable) { + if (!_this9.viewable) { var parentFlags = parentItem.get('F'); - if (_this8._isViewable(parentFlags)) { - _this8.setFlags(parentFlags); + if (_this9._isViewable(parentFlags)) { + _this9.setFlags(parentFlags); } } - return _this8; + return _this9; } return PopupAnnotation; }(Annotation); +var FreeTextAnnotation = +/*#__PURE__*/ +function (_MarkupAnnotation2) { + _inherits(FreeTextAnnotation, _MarkupAnnotation2); + + function FreeTextAnnotation(parameters) { + var _this10; + + _classCallCheck(this, FreeTextAnnotation); + + _this10 = _possibleConstructorReturn(this, _getPrototypeOf(FreeTextAnnotation).call(this, parameters)); + _this10.data.annotationType = _util.AnnotationType.FREETEXT; + return _this10; + } + + return FreeTextAnnotation; +}(MarkupAnnotation); + var LineAnnotation = /*#__PURE__*/ -function (_Annotation5) { - _inherits(LineAnnotation, _Annotation5); +function (_MarkupAnnotation3) { + _inherits(LineAnnotation, _MarkupAnnotation3); function LineAnnotation(parameters) { - var _this9; + var _this11; _classCallCheck(this, LineAnnotation); - _this9 = _possibleConstructorReturn(this, _getPrototypeOf(LineAnnotation).call(this, parameters)); - _this9.data.annotationType = _util.AnnotationType.LINE; + _this11 = _possibleConstructorReturn(this, _getPrototypeOf(LineAnnotation).call(this, parameters)); + _this11.data.annotationType = _util.AnnotationType.LINE; var dict = parameters.dict; - _this9.data.lineCoordinates = _util.Util.normalizeRect(dict.getArray('L')); - - _this9._preparePopup(dict); - - return _this9; + _this11.data.lineCoordinates = _util.Util.normalizeRect(dict.getArray('L')); + return _this11; } return LineAnnotation; -}(Annotation); +}(MarkupAnnotation); var SquareAnnotation = /*#__PURE__*/ -function (_Annotation6) { - _inherits(SquareAnnotation, _Annotation6); +function (_MarkupAnnotation4) { + _inherits(SquareAnnotation, _MarkupAnnotation4); function SquareAnnotation(parameters) { - var _this10; + var _this12; _classCallCheck(this, SquareAnnotation); - _this10 = _possibleConstructorReturn(this, _getPrototypeOf(SquareAnnotation).call(this, parameters)); - _this10.data.annotationType = _util.AnnotationType.SQUARE; - - _this10._preparePopup(parameters.dict); - - return _this10; + _this12 = _possibleConstructorReturn(this, _getPrototypeOf(SquareAnnotation).call(this, parameters)); + _this12.data.annotationType = _util.AnnotationType.SQUARE; + return _this12; } return SquareAnnotation; -}(Annotation); +}(MarkupAnnotation); var CircleAnnotation = /*#__PURE__*/ -function (_Annotation7) { - _inherits(CircleAnnotation, _Annotation7); +function (_MarkupAnnotation5) { + _inherits(CircleAnnotation, _MarkupAnnotation5); function CircleAnnotation(parameters) { - var _this11; + var _this13; _classCallCheck(this, CircleAnnotation); - _this11 = _possibleConstructorReturn(this, _getPrototypeOf(CircleAnnotation).call(this, parameters)); - _this11.data.annotationType = _util.AnnotationType.CIRCLE; - - _this11._preparePopup(parameters.dict); - - return _this11; + _this13 = _possibleConstructorReturn(this, _getPrototypeOf(CircleAnnotation).call(this, parameters)); + _this13.data.annotationType = _util.AnnotationType.CIRCLE; + return _this13; } return CircleAnnotation; -}(Annotation); +}(MarkupAnnotation); var PolylineAnnotation = /*#__PURE__*/ -function (_Annotation8) { - _inherits(PolylineAnnotation, _Annotation8); +function (_MarkupAnnotation6) { + _inherits(PolylineAnnotation, _MarkupAnnotation6); function PolylineAnnotation(parameters) { - var _this12; + var _this14; _classCallCheck(this, PolylineAnnotation); - _this12 = _possibleConstructorReturn(this, _getPrototypeOf(PolylineAnnotation).call(this, parameters)); - _this12.data.annotationType = _util.AnnotationType.POLYLINE; + _this14 = _possibleConstructorReturn(this, _getPrototypeOf(PolylineAnnotation).call(this, parameters)); + _this14.data.annotationType = _util.AnnotationType.POLYLINE; var dict = parameters.dict; var rawVertices = dict.getArray('Vertices'); - _this12.data.vertices = []; + _this14.data.vertices = []; for (var i = 0, ii = rawVertices.length; i < ii; i += 2) { - _this12.data.vertices.push({ + _this14.data.vertices.push({ x: rawVertices[i], y: rawVertices[i + 1] }); } - _this12._preparePopup(dict); - - return _this12; + return _this14; } return PolylineAnnotation; -}(Annotation); +}(MarkupAnnotation); var PolygonAnnotation = /*#__PURE__*/ @@ -29166,184 +29490,182 @@ function (_PolylineAnnotation) { _inherits(PolygonAnnotation, _PolylineAnnotation); function PolygonAnnotation(parameters) { - var _this13; + var _this15; _classCallCheck(this, PolygonAnnotation); - _this13 = _possibleConstructorReturn(this, _getPrototypeOf(PolygonAnnotation).call(this, parameters)); - _this13.data.annotationType = _util.AnnotationType.POLYGON; - return _this13; + _this15 = _possibleConstructorReturn(this, _getPrototypeOf(PolygonAnnotation).call(this, parameters)); + _this15.data.annotationType = _util.AnnotationType.POLYGON; + return _this15; } return PolygonAnnotation; }(PolylineAnnotation); +var CaretAnnotation = +/*#__PURE__*/ +function (_MarkupAnnotation7) { + _inherits(CaretAnnotation, _MarkupAnnotation7); + + function CaretAnnotation(parameters) { + var _this16; + + _classCallCheck(this, CaretAnnotation); + + _this16 = _possibleConstructorReturn(this, _getPrototypeOf(CaretAnnotation).call(this, parameters)); + _this16.data.annotationType = _util.AnnotationType.CARET; + return _this16; + } + + return CaretAnnotation; +}(MarkupAnnotation); + var InkAnnotation = /*#__PURE__*/ -function (_Annotation9) { - _inherits(InkAnnotation, _Annotation9); +function (_MarkupAnnotation8) { + _inherits(InkAnnotation, _MarkupAnnotation8); function InkAnnotation(parameters) { - var _this14; + var _this17; _classCallCheck(this, InkAnnotation); - _this14 = _possibleConstructorReturn(this, _getPrototypeOf(InkAnnotation).call(this, parameters)); - _this14.data.annotationType = _util.AnnotationType.INK; + _this17 = _possibleConstructorReturn(this, _getPrototypeOf(InkAnnotation).call(this, parameters)); + _this17.data.annotationType = _util.AnnotationType.INK; var dict = parameters.dict; var xref = parameters.xref; var originalInkLists = dict.getArray('InkList'); - _this14.data.inkLists = []; + _this17.data.inkLists = []; for (var i = 0, ii = originalInkLists.length; i < ii; ++i) { - _this14.data.inkLists.push([]); + _this17.data.inkLists.push([]); for (var j = 0, jj = originalInkLists[i].length; j < jj; j += 2) { - _this14.data.inkLists[i].push({ + _this17.data.inkLists[i].push({ x: xref.fetchIfRef(originalInkLists[i][j]), y: xref.fetchIfRef(originalInkLists[i][j + 1]) }); } } - _this14._preparePopup(dict); - - return _this14; + return _this17; } return InkAnnotation; -}(Annotation); +}(MarkupAnnotation); var HighlightAnnotation = /*#__PURE__*/ -function (_Annotation10) { - _inherits(HighlightAnnotation, _Annotation10); +function (_MarkupAnnotation9) { + _inherits(HighlightAnnotation, _MarkupAnnotation9); function HighlightAnnotation(parameters) { - var _this15; + var _this18; _classCallCheck(this, HighlightAnnotation); - _this15 = _possibleConstructorReturn(this, _getPrototypeOf(HighlightAnnotation).call(this, parameters)); - _this15.data.annotationType = _util.AnnotationType.HIGHLIGHT; - - _this15._preparePopup(parameters.dict); - - return _this15; + _this18 = _possibleConstructorReturn(this, _getPrototypeOf(HighlightAnnotation).call(this, parameters)); + _this18.data.annotationType = _util.AnnotationType.HIGHLIGHT; + return _this18; } return HighlightAnnotation; -}(Annotation); +}(MarkupAnnotation); var UnderlineAnnotation = /*#__PURE__*/ -function (_Annotation11) { - _inherits(UnderlineAnnotation, _Annotation11); +function (_MarkupAnnotation10) { + _inherits(UnderlineAnnotation, _MarkupAnnotation10); function UnderlineAnnotation(parameters) { - var _this16; + var _this19; _classCallCheck(this, UnderlineAnnotation); - _this16 = _possibleConstructorReturn(this, _getPrototypeOf(UnderlineAnnotation).call(this, parameters)); - _this16.data.annotationType = _util.AnnotationType.UNDERLINE; - - _this16._preparePopup(parameters.dict); - - return _this16; + _this19 = _possibleConstructorReturn(this, _getPrototypeOf(UnderlineAnnotation).call(this, parameters)); + _this19.data.annotationType = _util.AnnotationType.UNDERLINE; + return _this19; } return UnderlineAnnotation; -}(Annotation); +}(MarkupAnnotation); var SquigglyAnnotation = /*#__PURE__*/ -function (_Annotation12) { - _inherits(SquigglyAnnotation, _Annotation12); +function (_MarkupAnnotation11) { + _inherits(SquigglyAnnotation, _MarkupAnnotation11); function SquigglyAnnotation(parameters) { - var _this17; + var _this20; _classCallCheck(this, SquigglyAnnotation); - _this17 = _possibleConstructorReturn(this, _getPrototypeOf(SquigglyAnnotation).call(this, parameters)); - _this17.data.annotationType = _util.AnnotationType.SQUIGGLY; - - _this17._preparePopup(parameters.dict); - - return _this17; + _this20 = _possibleConstructorReturn(this, _getPrototypeOf(SquigglyAnnotation).call(this, parameters)); + _this20.data.annotationType = _util.AnnotationType.SQUIGGLY; + return _this20; } return SquigglyAnnotation; -}(Annotation); +}(MarkupAnnotation); var StrikeOutAnnotation = /*#__PURE__*/ -function (_Annotation13) { - _inherits(StrikeOutAnnotation, _Annotation13); +function (_MarkupAnnotation12) { + _inherits(StrikeOutAnnotation, _MarkupAnnotation12); function StrikeOutAnnotation(parameters) { - var _this18; + var _this21; _classCallCheck(this, StrikeOutAnnotation); - _this18 = _possibleConstructorReturn(this, _getPrototypeOf(StrikeOutAnnotation).call(this, parameters)); - _this18.data.annotationType = _util.AnnotationType.STRIKEOUT; - - _this18._preparePopup(parameters.dict); - - return _this18; + _this21 = _possibleConstructorReturn(this, _getPrototypeOf(StrikeOutAnnotation).call(this, parameters)); + _this21.data.annotationType = _util.AnnotationType.STRIKEOUT; + return _this21; } return StrikeOutAnnotation; -}(Annotation); +}(MarkupAnnotation); var StampAnnotation = /*#__PURE__*/ -function (_Annotation14) { - _inherits(StampAnnotation, _Annotation14); +function (_MarkupAnnotation13) { + _inherits(StampAnnotation, _MarkupAnnotation13); function StampAnnotation(parameters) { - var _this19; + var _this22; _classCallCheck(this, StampAnnotation); - _this19 = _possibleConstructorReturn(this, _getPrototypeOf(StampAnnotation).call(this, parameters)); - _this19.data.annotationType = _util.AnnotationType.STAMP; - - _this19._preparePopup(parameters.dict); - - return _this19; + _this22 = _possibleConstructorReturn(this, _getPrototypeOf(StampAnnotation).call(this, parameters)); + _this22.data.annotationType = _util.AnnotationType.STAMP; + return _this22; } return StampAnnotation; -}(Annotation); +}(MarkupAnnotation); var FileAttachmentAnnotation = /*#__PURE__*/ -function (_Annotation15) { - _inherits(FileAttachmentAnnotation, _Annotation15); +function (_MarkupAnnotation14) { + _inherits(FileAttachmentAnnotation, _MarkupAnnotation14); function FileAttachmentAnnotation(parameters) { - var _this20; + var _this23; _classCallCheck(this, FileAttachmentAnnotation); - _this20 = _possibleConstructorReturn(this, _getPrototypeOf(FileAttachmentAnnotation).call(this, parameters)); + _this23 = _possibleConstructorReturn(this, _getPrototypeOf(FileAttachmentAnnotation).call(this, parameters)); var file = new _obj.FileSpec(parameters.dict.get('FS'), parameters.xref); - _this20.data.annotationType = _util.AnnotationType.FILEATTACHMENT; - _this20.data.file = file.serializable; - - _this20._preparePopup(parameters.dict); - - return _this20; + _this23.data.annotationType = _util.AnnotationType.FILEATTACHMENT; + _this23.data.file = file.serializable; + return _this23; } return FileAttachmentAnnotation; -}(Annotation); +}(MarkupAnnotation); /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -29354,7 +29676,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.OperatorList = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); var QueueOptimizer = function QueueOptimizerClosure() { function addState(parentState, pattern, checkFn, iterateFn, processFn) { @@ -29409,6 +29731,8 @@ var QueueOptimizer = function QueueOptimizerClosure() { case 3: return fnArray[i] === _util.OPS.restore; } + + throw new Error("iterateInlineImageGroup - invalid pos: ".concat(pos)); }, function foundInlineImageGroup(context, i) { var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10; var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200; @@ -29515,6 +29839,8 @@ var QueueOptimizer = function QueueOptimizerClosure() { case 3: return fnArray[i] === _util.OPS.restore; } + + throw new Error("iterateImageMaskGroup - invalid pos: ".concat(pos)); }, function foundImageMaskGroup(context, i) { var MIN_IMAGES_IN_MASKS_BLOCK = 10; var MAX_IMAGES_IN_MASKS_BLOCK = 100; @@ -29597,7 +29923,7 @@ var QueueOptimizer = function QueueOptimizerClosure() { var argsArray = context.argsArray; var iFirstTransform = context.iCurr - 2; return argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0; - }, function (context, i) { + }, function iterateImageGroup(context, i) { var fnArray = context.fnArray, argsArray = context.argsArray; var iFirstSave = context.iCurr - 3; @@ -29639,6 +29965,8 @@ var QueueOptimizer = function QueueOptimizerClosure() { case 3: return fnArray[i] === _util.OPS.restore; } + + throw new Error("iterateImageGroup - invalid pos: ".concat(pos)); }, function (context, i) { var MIN_IMAGES_IN_BLOCK = 3; var MAX_IMAGES_IN_BLOCK = 1000; @@ -29671,7 +29999,7 @@ var QueueOptimizer = function QueueOptimizerClosure() { argsArray.splice(iFirstSave, count * 4, args); return iFirstSave + 1; }); - addState(InitialState, [_util.OPS.beginText, _util.OPS.setFont, _util.OPS.setTextMatrix, _util.OPS.showText, _util.OPS.endText], null, function (context, i) { + addState(InitialState, [_util.OPS.beginText, _util.OPS.setFont, _util.OPS.setTextMatrix, _util.OPS.showText, _util.OPS.endText], null, function iterateShowTextGroup(context, i) { var fnArray = context.fnArray, argsArray = context.argsArray; var iFirstSave = context.iCurr - 4; @@ -29705,6 +30033,8 @@ var QueueOptimizer = function QueueOptimizerClosure() { case 4: return fnArray[i] === _util.OPS.endText; } + + throw new Error("iterateShowTextGroup - invalid pos: ".concat(pos)); }, function (context, i) { var MIN_CHARS_IN_BLOCK = 3; var MAX_CHARS_IN_BLOCK = 1000; @@ -29846,7 +30176,8 @@ var NullOptimizer = function NullOptimizerClosure() { this.queue.fnArray.push(fn); this.queue.argsArray.push(args); }, - flush: function flush() {} + flush: function flush() {}, + reset: function reset() {} }; return NullOptimizer; }(); @@ -29855,36 +30186,12 @@ var OperatorList = function OperatorListClosure() { var CHUNK_SIZE = 1000; var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; - function getTransfers(queue) { - var transfers = []; - var fnArray = queue.fnArray, - argsArray = queue.argsArray; - - for (var i = 0, ii = queue.length; i < ii; i++) { - switch (fnArray[i]) { - case _util.OPS.paintInlineImageXObject: - case _util.OPS.paintInlineImageXObjectGroup: - case _util.OPS.paintImageMaskXObject: - var arg = argsArray[i][0]; - ; - - if (!arg.cached) { - transfers.push(arg.data.buffer); - } - - break; - } - } - - return transfers; - } - function OperatorList(intent, messageHandler, pageIndex) { this.messageHandler = messageHandler; this.fnArray = []; this.argsArray = []; - if (messageHandler && this.intent !== 'oplist') { + if (messageHandler && intent !== 'oplist') { this.optimizer = new QueueOptimizer(this); } else { this.optimizer = new NullOptimizer(this); @@ -29945,9 +30252,35 @@ var OperatorList = function OperatorListClosure() { length: this.length }; }, - flush: function flush(lastChunk) { + + get _transfers() { + var transfers = []; + var fnArray = this.fnArray, + argsArray = this.argsArray, + length = this.length; + + for (var i = 0; i < length; i++) { + switch (fnArray[i]) { + case _util.OPS.paintInlineImageXObject: + case _util.OPS.paintInlineImageXObjectGroup: + case _util.OPS.paintImageMaskXObject: + var arg = argsArray[i][0]; + ; + + if (!arg.cached) { + transfers.push(arg.data.buffer); + } + + break; + } + } + + return transfers; + }, + + flush: function flush() { + var lastChunk = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.optimizer.flush(); - var transfers = getTransfers(this); var length = this.length; this._totalLength += length; this.messageHandler.send('RenderPageChunk', { @@ -29959,7 +30292,7 @@ var OperatorList = function OperatorListClosure() { }, pageIndex: this.pageIndex, intent: this.intent - }, transfers); + }, this._transfers); this.dependencies = Object.create(null); this.fnArray.length = 0; this.argsArray.length = 0; @@ -29973,7 +30306,7 @@ var OperatorList = function OperatorListClosure() { exports.OperatorList = OperatorList; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -29986,45 +30319,49 @@ exports.PartialEvaluator = void 0; var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _cmap = __w_pdfjs_require__(172); +var _cmap = __w_pdfjs_require__(173); -var _stream = __w_pdfjs_require__(157); +var _primitives = __w_pdfjs_require__(151); -var _primitives = __w_pdfjs_require__(155); +var _fonts = __w_pdfjs_require__(174); -var _fonts = __w_pdfjs_require__(173); +var _encodings = __w_pdfjs_require__(177); -var _encodings = __w_pdfjs_require__(176); +var _unicode = __w_pdfjs_require__(180); -var _unicode = __w_pdfjs_require__(179); +var _standard_fonts = __w_pdfjs_require__(179); -var _standard_fonts = __w_pdfjs_require__(178); +var _pattern = __w_pdfjs_require__(183); -var _pattern = __w_pdfjs_require__(182); +var _parser = __w_pdfjs_require__(157); -var _parser = __w_pdfjs_require__(156); +var _bidi = __w_pdfjs_require__(184); -var _bidi = __w_pdfjs_require__(183); +var _colorspace = __w_pdfjs_require__(169); -var _colorspace = __w_pdfjs_require__(168); +var _stream = __w_pdfjs_require__(158); -var _glyphlist = __w_pdfjs_require__(177); +var _glyphlist = __w_pdfjs_require__(178); -var _metrics = __w_pdfjs_require__(184); +var _core_utils = __w_pdfjs_require__(154); -var _function = __w_pdfjs_require__(185); +var _metrics = __w_pdfjs_require__(185); -var _jpeg_stream = __w_pdfjs_require__(163); +var _function = __w_pdfjs_require__(186); -var _murmurhash = __w_pdfjs_require__(187); +var _jpeg_stream = __w_pdfjs_require__(164); -var _operator_list = __w_pdfjs_require__(170); +var _murmurhash = __w_pdfjs_require__(188); -var _image = __w_pdfjs_require__(188); +var _image_utils = __w_pdfjs_require__(189); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _operator_list = __w_pdfjs_require__(171); + +var _image = __w_pdfjs_require__(190); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } @@ -30040,77 +30377,19 @@ var PartialEvaluator = function PartialEvaluatorClosure() { isEvalSupported: true }; - function NativeImageDecoder(_ref) { + function PartialEvaluator(_ref) { + var _this = this; + var xref = _ref.xref, - resources = _ref.resources, handler = _ref.handler, - _ref$forceDataSchema = _ref.forceDataSchema, - forceDataSchema = _ref$forceDataSchema === void 0 ? false : _ref$forceDataSchema, + pageIndex = _ref.pageIndex, + idFactory = _ref.idFactory, + fontCache = _ref.fontCache, + builtInCMapCache = _ref.builtInCMapCache, + _ref$options = _ref.options, + options = _ref$options === void 0 ? null : _ref$options, pdfFunctionFactory = _ref.pdfFunctionFactory; this.xref = xref; - this.resources = resources; - this.handler = handler; - this.forceDataSchema = forceDataSchema; - this.pdfFunctionFactory = pdfFunctionFactory; - } - - NativeImageDecoder.prototype = { - canDecode: function canDecode(image) { - return image instanceof _jpeg_stream.JpegStream && NativeImageDecoder.isDecodable(image, this.xref, this.resources, this.pdfFunctionFactory); - }, - decode: function decode(image) { - var dict = image.dict; - var colorSpace = dict.get('ColorSpace', 'CS'); - colorSpace = _colorspace.ColorSpace.parse(colorSpace, this.xref, this.resources, this.pdfFunctionFactory); - return this.handler.sendWithPromise('JpegDecode', [image.getIR(this.forceDataSchema), colorSpace.numComps]).then(function (_ref2) { - var data = _ref2.data, - width = _ref2.width, - height = _ref2.height; - return new _stream.Stream(data, 0, data.length, image.dict); - }); - } - }; - - NativeImageDecoder.isSupported = function (image, xref, res, pdfFunctionFactory) { - var dict = image.dict; - - if (dict.has('DecodeParms') || dict.has('DP')) { - return false; - } - - var cs = _colorspace.ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res, pdfFunctionFactory); - - return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && cs.isDefaultDecode(dict.getArray('Decode', 'D')); - }; - - NativeImageDecoder.isDecodable = function (image, xref, res, pdfFunctionFactory) { - var dict = image.dict; - - if (dict.has('DecodeParms') || dict.has('DP')) { - return false; - } - - var cs = _colorspace.ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res, pdfFunctionFactory); - - var bpc = dict.get('BitsPerComponent', 'BPC') || 1; - return (cs.numComps === 1 || cs.numComps === 3) && cs.isDefaultDecode(dict.getArray('Decode', 'D'), bpc); - }; - - function PartialEvaluator(_ref3) { - var _this = this; - - var pdfManager = _ref3.pdfManager, - xref = _ref3.xref, - handler = _ref3.handler, - pageIndex = _ref3.pageIndex, - idFactory = _ref3.idFactory, - fontCache = _ref3.fontCache, - builtInCMapCache = _ref3.builtInCMapCache, - _ref3$options = _ref3.options, - options = _ref3$options === void 0 ? null : _ref3$options, - pdfFunctionFactory = _ref3.pdfFunctionFactory; - this.pdfManager = pdfManager; - this.xref = xref; this.handler = handler; this.pageIndex = pageIndex; this.idFactory = idFactory; @@ -30118,15 +30397,16 @@ var PartialEvaluator = function PartialEvaluatorClosure() { this.builtInCMapCache = builtInCMapCache; this.options = options || DefaultPartialEvaluatorOptions; this.pdfFunctionFactory = pdfFunctionFactory; + this.parsingType3Font = false; this.fetchBuiltInCMap = /*#__PURE__*/ function () { - var _ref4 = _asyncToGenerator( + var _ref2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(name) { + _regenerator["default"].mark(function _callee(name) { var data; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -30157,11 +30437,11 @@ var PartialEvaluator = function PartialEvaluatorClosure() { return _context.stop(); } } - }, _callee, this); + }, _callee); })); return function (_x) { - return _ref4.apply(this, arguments); + return _ref2.apply(this, arguments); }; }(); } @@ -30393,154 +30673,213 @@ var PartialEvaluator = function PartialEvaluatorClosure() { } }); }, - buildPaintImageXObject: function buildPaintImageXObject(_ref5) { - var _this2 = this; + buildPaintImageXObject: function () { + var _buildPaintImageXObject = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee2(_ref3) { + var _this2 = this; - var resources = _ref5.resources, - image = _ref5.image, - _ref5$isInline = _ref5.isInline, - isInline = _ref5$isInline === void 0 ? false : _ref5$isInline, - operatorList = _ref5.operatorList, - cacheKey = _ref5.cacheKey, - imageCache = _ref5.imageCache, - _ref5$forceDisableNat = _ref5.forceDisableNativeImageDecoder, - forceDisableNativeImageDecoder = _ref5$forceDisableNat === void 0 ? false : _ref5$forceDisableNat; - var dict = image.dict; - var w = dict.get('Width', 'W'); - var h = dict.get('Height', 'H'); + var resources, image, _ref3$isInline, isInline, operatorList, cacheKey, imageCache, _ref3$forceDisableNat, forceDisableNativeImageDecoder, dict, w, h, maxImageSize, imageMask, imgData, args, width, height, bitStrideLength, imgArray, decode, softMask, mask, SMALL_IMAGE_DIMENSIONS, imageObj, nativeImageDecoderSupport, objId, nativeImageDecoder, imgPromise; - if (!(w && (0, _util.isNum)(w)) || !(h && (0, _util.isNum)(h))) { - (0, _util.warn)('Image dimensions are missing, or not numbers.'); - return Promise.resolve(); - } + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + resources = _ref3.resources, image = _ref3.image, _ref3$isInline = _ref3.isInline, isInline = _ref3$isInline === void 0 ? false : _ref3$isInline, operatorList = _ref3.operatorList, cacheKey = _ref3.cacheKey, imageCache = _ref3.imageCache, _ref3$forceDisableNat = _ref3.forceDisableNativeImageDecoder, forceDisableNativeImageDecoder = _ref3$forceDisableNat === void 0 ? false : _ref3$forceDisableNat; + dict = image.dict; + w = dict.get('Width', 'W'); + h = dict.get('Height', 'H'); - var maxImageSize = this.options.maxImageSize; + if (!(!(w && (0, _util.isNum)(w)) || !(h && (0, _util.isNum)(h)))) { + _context2.next = 7; + break; + } - if (maxImageSize !== -1 && w * h > maxImageSize) { - (0, _util.warn)('Image exceeded maximum allowed size and was removed.'); - return Promise.resolve(); - } + (0, _util.warn)('Image dimensions are missing, or not numbers.'); + return _context2.abrupt("return", undefined); - var imageMask = dict.get('ImageMask', 'IM') || false; - var imgData, args; + case 7: + maxImageSize = this.options.maxImageSize; - if (imageMask) { - var width = dict.get('Width', 'W'); - var height = dict.get('Height', 'H'); - var bitStrideLength = width + 7 >> 3; - var imgArray = image.getBytes(bitStrideLength * height, true); - var decode = dict.getArray('Decode', 'D'); - imgData = _image.PDFImage.createMask({ - imgArray: imgArray, - width: width, - height: height, - imageIsFromDecodeStream: image instanceof _stream.DecodeStream, - inverseDecode: !!decode && decode[0] > 0 - }); - imgData.cached = true; - args = [imgData]; - operatorList.addOp(_util.OPS.paintImageMaskXObject, args); - - if (cacheKey) { - imageCache[cacheKey] = { - fn: _util.OPS.paintImageMaskXObject, - args: args - }; - } + if (!(maxImageSize !== -1 && w * h > maxImageSize)) { + _context2.next = 11; + break; + } - return Promise.resolve(); - } + (0, _util.warn)('Image exceeded maximum allowed size and was removed.'); + return _context2.abrupt("return", undefined); - var softMask = dict.get('SMask', 'SM') || false; - var mask = dict.get('Mask') || false; - var SMALL_IMAGE_DIMENSIONS = 200; + case 11: + imageMask = dict.get('ImageMask', 'IM') || false; - if (isInline && !softMask && !mask && !(image instanceof _jpeg_stream.JpegStream) && w + h < SMALL_IMAGE_DIMENSIONS) { - var imageObj = new _image.PDFImage({ - xref: this.xref, - res: resources, - image: image, - isInline: isInline, - pdfFunctionFactory: this.pdfFunctionFactory - }); - imgData = imageObj.createImageData(true); - operatorList.addOp(_util.OPS.paintInlineImageXObject, [imgData]); - return Promise.resolve(); - } + if (!imageMask) { + _context2.next = 24; + break; + } - var nativeImageDecoderSupport = forceDisableNativeImageDecoder ? _util.NativeImageDecoding.NONE : this.options.nativeImageDecoderSupport; - var objId = 'img_' + this.idFactory.createObjId(); + width = dict.get('Width', 'W'); + height = dict.get('Height', 'H'); + bitStrideLength = width + 7 >> 3; + imgArray = image.getBytes(bitStrideLength * height, true); + decode = dict.getArray('Decode', 'D'); + imgData = _image.PDFImage.createMask({ + imgArray: imgArray, + width: width, + height: height, + imageIsFromDecodeStream: image instanceof _stream.DecodeStream, + inverseDecode: !!decode && decode[0] > 0 + }); + imgData.cached = !!cacheKey; + args = [imgData]; + operatorList.addOp(_util.OPS.paintImageMaskXObject, args); + + if (cacheKey) { + imageCache[cacheKey] = { + fn: _util.OPS.paintImageMaskXObject, + args: args + }; + } - if (nativeImageDecoderSupport !== _util.NativeImageDecoding.NONE && !softMask && !mask && image instanceof _jpeg_stream.JpegStream && NativeImageDecoder.isSupported(image, this.xref, resources, this.pdfFunctionFactory)) { - return this.handler.sendWithPromise('obj', [objId, this.pageIndex, 'JpegStream', image.getIR(this.options.forceDataSchema)]).then(function () { - operatorList.addDependency(objId); - args = [objId, w, h]; - operatorList.addOp(_util.OPS.paintJpegXObject, args); + return _context2.abrupt("return", undefined); - if (cacheKey) { - imageCache[cacheKey] = { - fn: _util.OPS.paintJpegXObject, - args: args - }; - } - }, function (reason) { - (0, _util.warn)('Native JPEG decoding failed -- trying to recover: ' + (reason && reason.message)); - return _this2.buildPaintImageXObject({ - resources: resources, - image: image, - isInline: isInline, - operatorList: operatorList, - cacheKey: cacheKey, - imageCache: imageCache, - forceDisableNativeImageDecoder: true - }); - }); - } + case 24: + softMask = dict.get('SMask', 'SM') || false; + mask = dict.get('Mask') || false; + SMALL_IMAGE_DIMENSIONS = 200; - var nativeImageDecoder = null; + if (!(isInline && !softMask && !mask && !(image instanceof _jpeg_stream.JpegStream) && w + h < SMALL_IMAGE_DIMENSIONS)) { + _context2.next = 32; + break; + } - if (nativeImageDecoderSupport === _util.NativeImageDecoding.DECODE && (image instanceof _jpeg_stream.JpegStream || mask instanceof _jpeg_stream.JpegStream || softMask instanceof _jpeg_stream.JpegStream)) { - nativeImageDecoder = new NativeImageDecoder({ - xref: this.xref, - resources: resources, - handler: this.handler, - forceDataSchema: this.options.forceDataSchema, - pdfFunctionFactory: this.pdfFunctionFactory - }); - } + imageObj = new _image.PDFImage({ + xref: this.xref, + res: resources, + image: image, + isInline: isInline, + pdfFunctionFactory: this.pdfFunctionFactory + }); + imgData = imageObj.createImageData(true); + operatorList.addOp(_util.OPS.paintInlineImageXObject, [imgData]); + return _context2.abrupt("return", undefined); - operatorList.addDependency(objId); - args = [objId, w, h]; + case 32: + nativeImageDecoderSupport = forceDisableNativeImageDecoder ? _util.NativeImageDecoding.NONE : this.options.nativeImageDecoderSupport; + objId = "img_".concat(this.idFactory.createObjId()); - _image.PDFImage.buildImage({ - handler: this.handler, - xref: this.xref, - res: resources, - image: image, - isInline: isInline, - nativeDecoder: nativeImageDecoder, - pdfFunctionFactory: this.pdfFunctionFactory - }).then(function (imageObj) { - var imgData = imageObj.createImageData(false); + if (this.parsingType3Font) { + (0, _util.assert)(nativeImageDecoderSupport === _util.NativeImageDecoding.NONE, 'Type3 image resources should be completely decoded in the worker.'); + objId = "".concat(this.idFactory.getDocId(), "_type3res_").concat(objId); + } + + if (!(nativeImageDecoderSupport !== _util.NativeImageDecoding.NONE && !softMask && !mask && image instanceof _jpeg_stream.JpegStream && _image_utils.NativeImageDecoder.isSupported(image, this.xref, resources, this.pdfFunctionFactory))) { + _context2.next = 37; + break; + } - _this2.handler.send('obj', [objId, _this2.pageIndex, 'Image', imgData], [imgData.data.buffer]); - }).catch(function (reason) { - (0, _util.warn)('Unable to decode image: ' + reason); + return _context2.abrupt("return", this.handler.sendWithPromise('obj', [objId, this.pageIndex, 'JpegStream', image.getIR(this.options.forceDataSchema)]).then(function () { + operatorList.addDependency(objId); + args = [objId, w, h]; + operatorList.addOp(_util.OPS.paintJpegXObject, args); - _this2.handler.send('obj', [objId, _this2.pageIndex, 'Image', null]); - }); + if (cacheKey) { + imageCache[cacheKey] = { + fn: _util.OPS.paintJpegXObject, + args: args + }; + } + }, function (reason) { + (0, _util.warn)('Native JPEG decoding failed -- trying to recover: ' + (reason && reason.message)); + return _this2.buildPaintImageXObject({ + resources: resources, + image: image, + isInline: isInline, + operatorList: operatorList, + cacheKey: cacheKey, + imageCache: imageCache, + forceDisableNativeImageDecoder: true + }); + })); - operatorList.addOp(_util.OPS.paintImageXObject, args); + case 37: + nativeImageDecoder = null; - if (cacheKey) { - imageCache[cacheKey] = { - fn: _util.OPS.paintImageXObject, - args: args - }; + if (nativeImageDecoderSupport === _util.NativeImageDecoding.DECODE && (image instanceof _jpeg_stream.JpegStream || mask instanceof _jpeg_stream.JpegStream || softMask instanceof _jpeg_stream.JpegStream)) { + nativeImageDecoder = new _image_utils.NativeImageDecoder({ + xref: this.xref, + resources: resources, + handler: this.handler, + forceDataSchema: this.options.forceDataSchema, + pdfFunctionFactory: this.pdfFunctionFactory + }); + } + + operatorList.addDependency(objId); + args = [objId, w, h]; + imgPromise = _image.PDFImage.buildImage({ + handler: this.handler, + xref: this.xref, + res: resources, + image: image, + isInline: isInline, + nativeDecoder: nativeImageDecoder, + pdfFunctionFactory: this.pdfFunctionFactory + }).then(function (imageObj) { + var imgData = imageObj.createImageData(false); + + if (_this2.parsingType3Font) { + return _this2.handler.sendWithPromise('commonobj', [objId, 'FontType3Res', imgData], [imgData.data.buffer]); + } + + _this2.handler.send('obj', [objId, _this2.pageIndex, 'Image', imgData], [imgData.data.buffer]); + + return undefined; + })["catch"](function (reason) { + (0, _util.warn)('Unable to decode image: ' + reason); + + if (_this2.parsingType3Font) { + return _this2.handler.sendWithPromise('commonobj', [objId, 'FontType3Res', null]); + } + + _this2.handler.send('obj', [objId, _this2.pageIndex, 'Image', null]); + + return undefined; + }); + + if (!this.parsingType3Font) { + _context2.next = 45; + break; + } + + _context2.next = 45; + return imgPromise; + + case 45: + operatorList.addOp(_util.OPS.paintImageXObject, args); + + if (cacheKey) { + imageCache[cacheKey] = { + fn: _util.OPS.paintImageXObject, + args: args + }; + } + + return _context2.abrupt("return", undefined); + + case 48: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function buildPaintImageXObject(_x2) { + return _buildPaintImageXObject.apply(this, arguments); } - return Promise.resolve(); - }, + return buildPaintImageXObject; + }(), handleSMask: function PartialEvaluator_handleSmask(smask, resources, operatorList, task, stateManager) { var smaskContent = smask.get('G'); var smaskOptions = { @@ -30616,7 +30955,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { return translated.loadType3Data(_this4, resources, operatorList, task).then(function () { return translated; - }).catch(function (reason) { + })["catch"](function (reason) { _this4.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.font }); @@ -30781,7 +31120,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() { var fontCapability = (0, _util.createPromiseCapability)(); var preEvaluatedFont = this.preEvaluateFont(font); - var descriptor = preEvaluatedFont.descriptor; + var descriptor = preEvaluatedFont.descriptor, + hash = preEvaluatedFont.hash; var fontRefIsRef = (0, _primitives.isRef)(fontRef), fontID; @@ -30789,13 +31129,12 @@ var PartialEvaluator = function PartialEvaluatorClosure() { fontID = fontRef.toString(); } - if ((0, _primitives.isDict)(descriptor)) { + if (hash && (0, _primitives.isDict)(descriptor)) { if (!descriptor.fontAliases) { descriptor.fontAliases = Object.create(null); } var fontAliases = descriptor.fontAliases; - var hash = preEvaluatedFont.hash; if (fontAliases[hash]) { var aliasFontRef = fontAliases[hash].aliasRef; @@ -30824,11 +31163,11 @@ var PartialEvaluator = function PartialEvaluatorClosure() { fontID = this.idFactory.createObjId(); } - this.fontCache.put('id_' + fontID, fontCapability.promise); + this.fontCache.put("id_".concat(fontID), fontCapability.promise); } (0, _util.assert)(fontID, 'The "fontID" must be defined.'); - font.loadedName = 'g_' + this.pdfManager.docId + '_f' + fontID; + font.loadedName = "".concat(this.idFactory.getDocId(), "_f").concat(fontID); font.translated = fontCapability.promise; var translatedPromise; @@ -30845,13 +31184,12 @@ var PartialEvaluator = function PartialEvaluatorClosure() { } fontCapability.resolve(new TranslatedFont(font.loadedName, translatedFont, font)); - }).catch(function (reason) { + })["catch"](function (reason) { _this6.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.font }); try { - var descriptor = preEvaluatedFont.descriptor; var fontFile3 = descriptor && descriptor.get('FontFile3'); var subtype = fontFile3 && fontFile3.get('Subtype'); var fontType = (0, _fonts.getFontType)(preEvaluatedFont.type, subtype && subtype.name); @@ -30863,7 +31201,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() { }); return fontCapability.promise; }, - buildPath: function PartialEvaluator_buildPath(operatorList, fn, args) { + buildPath: function buildPath(operatorList, fn, args) { + var parsingText = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; var lastIndex = operatorList.length - 1; if (!args) { @@ -30871,47 +31210,90 @@ var PartialEvaluator = function PartialEvaluatorClosure() { } if (lastIndex < 0 || operatorList.fnArray[lastIndex] !== _util.OPS.constructPath) { + if (parsingText) { + (0, _util.warn)("Encountered path operator \"".concat(fn, "\" inside of a text object.")); + operatorList.addOp(_util.OPS.save, null); + } + operatorList.addOp(_util.OPS.constructPath, [[fn], args]); + + if (parsingText) { + operatorList.addOp(_util.OPS.restore, null); + } } else { var opArgs = operatorList.argsArray[lastIndex]; opArgs[0].push(fn); Array.prototype.push.apply(opArgs[1], args); } }, - handleColorN: function PartialEvaluator_handleColorN(operatorList, fn, args, cs, patterns, resources, task) { - var patternName = args[args.length - 1]; - var pattern; + handleColorN: function () { + var _handleColorN = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee3(operatorList, fn, args, cs, patterns, resources, task) { + var patternName, pattern, dict, typeNum, color, shading, matrix; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + patternName = args[args.length - 1]; - if ((0, _primitives.isName)(patternName) && (pattern = patterns.get(patternName.name))) { - var dict = (0, _primitives.isStream)(pattern) ? pattern.dict : pattern; - var typeNum = dict.get('PatternType'); + if (!((0, _primitives.isName)(patternName) && (pattern = patterns.get(patternName.name)))) { + _context3.next = 16; + break; + } - if (typeNum === TILING_PATTERN) { - var color = cs.base ? cs.base.getRgb(args, 0) : null; - return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task); - } else if (typeNum === SHADING_PATTERN) { - var shading = dict.get('Shading'); - var matrix = dict.getArray('Matrix'); - pattern = _pattern.Pattern.parseShading(shading, matrix, this.xref, resources, this.handler, this.pdfFunctionFactory); - operatorList.addOp(fn, pattern.getIR()); - return Promise.resolve(); - } + dict = (0, _primitives.isStream)(pattern) ? pattern.dict : pattern; + typeNum = dict.get('PatternType'); + + if (!(typeNum === TILING_PATTERN)) { + _context3.next = 9; + break; + } + + color = cs.base ? cs.base.getRgb(args, 0) : null; + return _context3.abrupt("return", this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task)); - return Promise.reject(new Error('Unknown PatternType: ' + typeNum)); + case 9: + if (!(typeNum === SHADING_PATTERN)) { + _context3.next = 15; + break; + } + + shading = dict.get('Shading'); + matrix = dict.getArray('Matrix'); + pattern = _pattern.Pattern.parseShading(shading, matrix, this.xref, resources, this.handler, this.pdfFunctionFactory); + operatorList.addOp(fn, pattern.getIR()); + return _context3.abrupt("return", undefined); + + case 15: + throw new _util.FormatError("Unknown PatternType: ".concat(typeNum)); + + case 16: + throw new _util.FormatError("Unknown PatternName: ".concat(patternName)); + + case 17: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function handleColorN(_x3, _x4, _x5, _x6, _x7, _x8, _x9) { + return _handleColorN.apply(this, arguments); } - operatorList.addOp(fn, args); - return Promise.resolve(); - }, - getOperatorList: function getOperatorList(_ref6) { + return handleColorN; + }(), + getOperatorList: function getOperatorList(_ref4) { var _this7 = this; - var stream = _ref6.stream, - task = _ref6.task, - resources = _ref6.resources, - operatorList = _ref6.operatorList, - _ref6$initialState = _ref6.initialState, - initialState = _ref6$initialState === void 0 ? null : _ref6$initialState; + var stream = _ref4.stream, + task = _ref4.task, + resources = _ref4.resources, + operatorList = _ref4.operatorList, + _ref4$initialState = _ref4.initialState, + initialState = _ref4$initialState === void 0 ? null : _ref4$initialState; resources = resources || _primitives.Dict.empty; initialState = initialState || new EvalState(); @@ -30921,6 +31303,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { var self = this; var xref = this.xref; + var parsingText = false; var imageCache = Object.create(null); var xobjs = resources.get('XObject') || _primitives.Dict.empty; @@ -31022,7 +31405,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { } resolveXObject(); - }).catch(function (reason) { + })["catch"](function (reason) { if (self.options.ignoreErrors) { self.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.unknown @@ -31043,6 +31426,14 @@ var PartialEvaluator = function PartialEvaluatorClosure() { })); return; + case _util.OPS.beginText: + parsingText = true; + break; + + case _util.OPS.endText: + parsingText = false; + break; + case _util.OPS.endInlineImage: var cacheKey = args[0].cacheKey; @@ -31224,11 +31615,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() { case _util.OPS.curveTo2: case _util.OPS.curveTo3: case _util.OPS.closePath: - self.buildPath(operatorList, fn, args); - continue; - case _util.OPS.rectangle: - self.buildPath(operatorList, fn, args); + self.buildPath(operatorList, fn, args, parsingText); continue; case _util.OPS.markPoint: @@ -31266,7 +31654,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { closePendingRestoreOPS(); resolve(); - }).catch(function (reason) { + })["catch"](function (reason) { if (_this7.options.ignoreErrors) { _this7.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.unknown @@ -31280,21 +31668,21 @@ var PartialEvaluator = function PartialEvaluatorClosure() { throw reason; }); }, - getTextContent: function getTextContent(_ref7) { + getTextContent: function getTextContent(_ref5) { var _this8 = this; - var stream = _ref7.stream, - task = _ref7.task, - resources = _ref7.resources, - _ref7$stateManager = _ref7.stateManager, - stateManager = _ref7$stateManager === void 0 ? null : _ref7$stateManager, - _ref7$normalizeWhites = _ref7.normalizeWhitespace, - normalizeWhitespace = _ref7$normalizeWhites === void 0 ? false : _ref7$normalizeWhites, - _ref7$combineTextItem = _ref7.combineTextItems, - combineTextItems = _ref7$combineTextItem === void 0 ? false : _ref7$combineTextItem, - sink = _ref7.sink, - _ref7$seenStyles = _ref7.seenStyles, - seenStyles = _ref7$seenStyles === void 0 ? Object.create(null) : _ref7$seenStyles; + var stream = _ref5.stream, + task = _ref5.task, + resources = _ref5.resources, + _ref5$stateManager = _ref5.stateManager, + stateManager = _ref5$stateManager === void 0 ? null : _ref5$stateManager, + _ref5$normalizeWhites = _ref5.normalizeWhitespace, + normalizeWhitespace = _ref5$normalizeWhites === void 0 ? false : _ref5$normalizeWhites, + _ref5$combineTextItem = _ref5.combineTextItems, + combineTextItems = _ref5$combineTextItem === void 0 ? false : _ref5$combineTextItem, + sink = _ref5.sink, + _ref5$seenStyles = _ref5.seenStyles, + seenStyles = _ref5$seenStyles === void 0 ? Object.create(null) : _ref5$seenStyles; resources = resources || _primitives.Dict.empty; stateManager = stateManager || new StateManager(new TextState()); var WhitespaceRegexp = /\s/g; @@ -31349,12 +31737,11 @@ var PartialEvaluator = function PartialEvaluatorClosure() { textContentItem.fontName = font.loadedName; var tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; - if (font.isType3Font && textState.fontMatrix !== _util.FONT_IDENTITY_MATRIX && textState.fontSize === 1) { + if (font.isType3Font && textState.fontSize <= 1 && !(0, _util.isArrayEqual)(textState.fontMatrix, _util.FONT_IDENTITY_MATRIX)) { var glyphHeight = font.bbox[3] - font.bbox[1]; if (glyphHeight > 0) { - glyphHeight = glyphHeight * textState.fontMatrix[3]; - tsm[3] *= glyphHeight; + tsm[3] *= glyphHeight * textState.fontMatrix[3]; } } @@ -31804,7 +32191,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { resolveXObject(); }, rejectXObject); - }).catch(function (reason) { + })["catch"](function (reason) { if (reason instanceof _util.AbortException) { return; } @@ -31859,7 +32246,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { flushTextContentItem(); enqueueChunk(); resolve(); - }).catch(function (reason) { + })["catch"](function (reason) { if (reason instanceof _util.AbortException) { return; } @@ -31877,7 +32264,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() { extractDataStructures: function PartialEvaluator_extractDataStructures(dict, baseDict, properties) { var _this9 = this; - var xref = this.xref; + var xref = this.xref, + cidToGidBytes; var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode'); var toUnicodePromise = toUnicode ? this.readToUnicode(toUnicode) : Promise.resolve(undefined); @@ -31895,7 +32283,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { var cidToGidMap = dict.get('CIDToGIDMap'); if ((0, _primitives.isStream)(cidToGidMap)) { - properties.cidToGidMap = this.readCidToGidMap(cidToGidMap); + cidToGidBytes = cidToGidMap.getBytes(); } } @@ -31972,6 +32360,11 @@ var PartialEvaluator = function PartialEvaluatorClosure() { return _this9.buildToUnicode(properties); }).then(function (toUnicode) { properties.toUnicode = toUnicode; + + if (cidToGidBytes) { + properties.cidToGidMap = _this9.readCidToGidMap(cidToGidBytes, toUnicode); + } + return properties; }); }, @@ -32152,18 +32545,17 @@ var PartialEvaluator = function PartialEvaluatorClosure() { return Promise.resolve(null); }, - readCidToGidMap: function PartialEvaluator_readCidToGidMap(cidToGidStream) { - var glyphsData = cidToGidStream.getBytes(); + readCidToGidMap: function readCidToGidMap(glyphsData, toUnicode) { var result = []; for (var j = 0, jj = glyphsData.length; j < jj; j++) { var glyphID = glyphsData[j++] << 8 | glyphsData[j]; + var code = j >> 1; - if (glyphID === 0) { + if (glyphID === 0 && !toUnicode.has(code)) { continue; } - var code = j >> 1; result[code] = glyphID; } @@ -32398,6 +32790,9 @@ var PartialEvaluator = function PartialEvaluatorClosure() { } } + var firstChar = dict.get('FirstChar') || 0; + var lastChar = dict.get('LastChar') || (composite ? 0xFFFF : 0xFF); + hash.update("".concat(firstChar, "-").concat(lastChar)); var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode'); if ((0, _primitives.isStream)(toUnicode)) { @@ -32603,8 +32998,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -32657,7 +33052,9 @@ var TranslatedFont = function TranslatedFontClosure() { var type3Options = Object.create(evaluator.options); type3Options.ignoreErrors = false; + type3Options.nativeImageDecoderSupport = _util.NativeImageDecoding.NONE; var type3Evaluator = evaluator.clone(type3Options); + type3Evaluator.parsingType3Font = true; var translatedFont = this.font; var loadCharProcsPromise = Promise.resolve(); var charProcs = this.dict.get('CharProcs'); @@ -32678,7 +33075,7 @@ var TranslatedFont = function TranslatedFontClosure() { }).then(function () { charProcOperatorList[key] = operatorList.getIR(); parentOperatorList.addDependencies(operatorList.dependencies); - }).catch(function (reason) { + })["catch"](function (reason) { (0, _util.warn)("Type3 font resource \"".concat(key, "\" is not available.")); var operatorList = new _operator_list.OperatorList(); charProcOperatorList[key] = operatorList.getIR(); @@ -32845,7 +33242,7 @@ var EvalState = function EvalStateClosure() { }(); var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() { - var getOPMap = (0, _util.getLookupTableFactory)(function (t) { + var getOPMap = (0, _core_utils.getLookupTableFactory)(function (t) { t['w'] = { id: _util.OPS.setLineWidth, numArgs: 1, @@ -33226,7 +33623,10 @@ var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() { function EvaluatorPreprocessor(stream, xref, stateManager) { this.opMap = getOPMap(); - this.parser = new _parser.Parser(new _parser.Lexer(stream, this.opMap), false, xref); + this.parser = new _parser.Parser({ + lexer: new _parser.Lexer(stream, this.opMap), + xref: xref + }); this.stateManager = stateManager; this.nonProcessedArgs = []; this._numInvalidPathOPS = 0; @@ -33337,7 +33737,7 @@ var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() { }(); /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -33348,13 +33748,15 @@ Object.defineProperty(exports, "__esModule", { }); exports.CMapFactory = exports.IdentityCMap = exports.CMap = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); + +var _primitives = __w_pdfjs_require__(151); -var _primitives = __w_pdfjs_require__(155); +var _parser = __w_pdfjs_require__(157); -var _parser = __w_pdfjs_require__(156); +var _core_utils = __w_pdfjs_require__(154); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -33774,7 +34176,9 @@ var BinaryCMapReader = function BinaryCMapReaderClosure() { var useCMap = null; var start = new Uint8Array(MAX_NUM_SIZE); var end = new Uint8Array(MAX_NUM_SIZE); - var char = new Uint8Array(MAX_NUM_SIZE); + + var _char = new Uint8Array(MAX_NUM_SIZE); + var charCode = new Uint8Array(MAX_NUM_SIZE); var tmp = new Uint8Array(MAX_NUM_SIZE); var code; @@ -33844,20 +34248,20 @@ var BinaryCMapReader = function BinaryCMapReaderClosure() { break; case 2: - stream.readHex(char, dataSize); + stream.readHex(_char, dataSize); code = stream.readNumber(); - cMap.mapOne(hexToInt(char, dataSize), code); + cMap.mapOne(hexToInt(_char, dataSize), code); for (i = 1; i < subitemsCount; i++) { - incHex(char, dataSize); + incHex(_char, dataSize); if (!sequence) { stream.readHexNumber(tmp, dataSize); - addHex(char, tmp, dataSize); + addHex(_char, tmp, dataSize); } code = stream.readSigned() + (code + 1); - cMap.mapOne(hexToInt(char, dataSize), code); + cMap.mapOne(hexToInt(_char, dataSize), code); } break; @@ -33888,22 +34292,22 @@ var BinaryCMapReader = function BinaryCMapReaderClosure() { break; case 4: - stream.readHex(char, ucs2DataSize); + stream.readHex(_char, ucs2DataSize); stream.readHex(charCode, dataSize); - cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); + cMap.mapOne(hexToInt(_char, ucs2DataSize), hexToStr(charCode, dataSize)); for (i = 1; i < subitemsCount; i++) { - incHex(char, ucs2DataSize); + incHex(_char, ucs2DataSize); if (!sequence) { stream.readHexNumber(tmp, ucs2DataSize); - addHex(char, tmp, ucs2DataSize); + addHex(_char, tmp, ucs2DataSize); } incHex(charCode, dataSize); stream.readHexSigned(tmp, dataSize); addHex(charCode, tmp, dataSize); - cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); + cMap.mapOne(hexToInt(_char, ucs2DataSize), hexToStr(charCode, dataSize)); } break; @@ -34183,7 +34587,7 @@ var CMapFactory = function CMapFactoryClosure() { } } } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -34289,7 +34693,7 @@ var CMapFactory = function CMapFactoryClosure() { exports.CMapFactory = CMapFactory; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -34301,25 +34705,27 @@ Object.defineProperty(exports, "__esModule", { exports.getFontType = getFontType; exports.IdentityToUnicodeMap = exports.ToUnicodeMap = exports.FontFlags = exports.Font = exports.ErrorFont = exports.SEAC_ANALYSIS_ENABLED = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _cff_parser = __w_pdfjs_require__(174); +var _cff_parser = __w_pdfjs_require__(175); -var _glyphlist = __w_pdfjs_require__(177); +var _glyphlist = __w_pdfjs_require__(178); -var _encodings = __w_pdfjs_require__(176); +var _encodings = __w_pdfjs_require__(177); -var _standard_fonts = __w_pdfjs_require__(178); +var _standard_fonts = __w_pdfjs_require__(179); -var _unicode = __w_pdfjs_require__(179); +var _unicode = __w_pdfjs_require__(180); -var _font_renderer = __w_pdfjs_require__(180); +var _font_renderer = __w_pdfjs_require__(181); -var _cmap = __w_pdfjs_require__(172); +var _cmap = __w_pdfjs_require__(173); -var _stream = __w_pdfjs_require__(157); +var _core_utils = __w_pdfjs_require__(154); -var _type1_parser = __w_pdfjs_require__(181); +var _stream = __w_pdfjs_require__(158); + +var _type1_parser = __w_pdfjs_require__(182); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -35696,7 +36102,7 @@ var Font = function FontClosure() { }; } - function sanitizeMetrics(font, header, metrics, numGlyphs) { + function sanitizeMetrics(font, header, metrics, numGlyphs, dupFirstEntry) { if (!header) { if (metrics) { metrics.data = null; @@ -35734,6 +36140,12 @@ var Font = function FontClosure() { if (numMissing > 0) { var entries = new Uint8Array(metrics.length + numMissing * 2); entries.set(metrics.data); + + if (dupFirstEntry) { + entries[metrics.length] = metrics.data[2]; + entries[metrics.length + 1] = metrics.data[3]; + } + metrics.data = entries; } } @@ -36489,7 +36901,7 @@ var Font = function FontClosure() { delete tables['cvt ']; } - sanitizeMetrics(font, tables['hhea'], tables['hmtx'], numGlyphsOut); + sanitizeMetrics(font, tables['hhea'], tables['hmtx'], numGlyphsOut, dupFirstEntry); if (!tables['head']) { throw new _util.FormatError('Required "head" table is not found'); @@ -37105,7 +37517,7 @@ var Type1Font = function Type1FontClosure() { headerBytes = stream.getBytes(suggestedLength); headerBytesLength = headerBytes.length; } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } } @@ -37329,20 +37741,22 @@ var Type1Font = function Type1FontClosure() { cff.strings = strings; cff.globalSubrIndex = new _cff_parser.CFFIndex(); var count = glyphs.length; - var charsetArray = [0]; + var charsetArray = ['.notdef']; var i, ii; for (i = 0; i < count; i++) { - var index = _cff_parser.CFFStandardStrings.indexOf(charstrings[i].glyphName); + var glyphName = charstrings[i].glyphName; + + var index = _cff_parser.CFFStandardStrings.indexOf(glyphName); if (index === -1) { - index = 0; + strings.add(glyphName); } - charsetArray.push(index >> 8 & 0xff, index & 0xff); + charsetArray.push(glyphName); } - cff.charset = new _cff_parser.CFFCharset(false, 0, [], charsetArray); + cff.charset = new _cff_parser.CFFCharset(false, 0, charsetArray); var charStringsIndex = new _cff_parser.CFFIndex(); charStringsIndex.add([0x8B, 0x0E]); @@ -37422,16 +37836,18 @@ var CFFFont = function CFFFontClosure() { if (properties.composite) { charCodeToGlyphId = Object.create(null); + var charCode; if (cff.isCIDFont) { for (glyphId = 0; glyphId < charsets.length; glyphId++) { var cid = charsets[glyphId]; - var charCode = properties.cMap.charCodeOf(cid); + charCode = properties.cMap.charCodeOf(cid); charCodeToGlyphId[charCode] = glyphId; } } else { for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) { - charCodeToGlyphId[glyphId] = glyphId; + charCode = properties.cMap.charCodeOf(glyphId); + charCodeToGlyphId[charCode] = glyphId; } } @@ -37450,7 +37866,7 @@ var CFFFont = function CFFFontClosure() { }(); /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -37461,15 +37877,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.CFFFDSelect = exports.CFFCompiler = exports.CFFPrivateDict = exports.CFFTopDict = exports.CFFCharset = exports.CFFIndex = exports.CFFStrings = exports.CFFHeader = exports.CFF = exports.CFFParser = exports.CFFStandardStrings = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _charsets = __w_pdfjs_require__(175); +var _charsets = __w_pdfjs_require__(176); -var _encodings = __w_pdfjs_require__(176); +var _encodings = __w_pdfjs_require__(177); var MAX_SUBR_NESTING = 10; var CFFStandardStrings = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall', '001.000', '001.001', '001.002', '001.003', 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold']; exports.CFFStandardStrings = CFFStandardStrings; +var NUM_STANDARD_CFF_STRINGS = 391; var CFFParser = function CFFParserClosure() { var CharstringValidationData = [null, { @@ -38466,16 +38883,31 @@ var CFFStrings = function CFFStringsClosure() { CFFStrings.prototype = { get: function CFFStrings_get(index) { - if (index >= 0 && index <= 390) { + if (index >= 0 && index <= NUM_STANDARD_CFF_STRINGS - 1) { return CFFStandardStrings[index]; } - if (index - 391 <= this.strings.length) { - return this.strings[index - 391]; + if (index - NUM_STANDARD_CFF_STRINGS <= this.strings.length) { + return this.strings[index - NUM_STANDARD_CFF_STRINGS]; } return CFFStandardStrings[0]; }, + getSID: function CFFStrings_getSID(str) { + var index = CFFStandardStrings.indexOf(str); + + if (index !== -1) { + return index; + } + + index = this.strings.indexOf(str); + + if (index !== -1) { + return index + NUM_STANDARD_CFF_STRINGS; + } + + return -1; + }, add: function CFFStrings_add(value) { this.strings.push(value); }, @@ -38812,7 +39244,7 @@ var CFFCompiler = function CFFCompilerClosure() { } } - var charset = this.compileCharset(cff.charset); + var charset = this.compileCharset(cff.charset, cff.charStrings.count, cff.strings, cff.isCIDFont); topDictTracker.setEntryLocation('charset', [output.length], output); output.add(charset); var charStrings = this.compileCharStrings(cff.charStrings); @@ -38907,13 +39339,13 @@ var CFFCompiler = function CFFCompilerClosure() { var sanitizedName = new Array(length); for (var j = 0; j < length; j++) { - var char = name[j]; + var _char = name[j]; - if (char < '!' || char > '~' || char === '[' || char === ']' || char === '(' || char === ')' || char === '{' || char === '}' || char === '<' || char === '>' || char === '/' || char === '%') { - char = '_'; + if (_char < '!' || _char > '~' || _char === '[' || _char === ']' || _char === '(' || _char === ')' || _char === '{' || _char === '}' || _char === '<' || _char === '>' || _char === '/' || _char === '%') { + _char = '_'; } - sanitizedName[j] = char; + sanitizedName[j] = _char; } sanitizedName = sanitizedName.join(''); @@ -39078,9 +39510,42 @@ var CFFCompiler = function CFFCompilerClosure() { return this.compileIndex(charStringsIndex); }, - compileCharset: function CFFCompiler_compileCharset(charset) { - var length = 1 + (this.cff.charStrings.count - 1) * 2; - var out = new Uint8Array(length); + compileCharset: function CFFCompiler_compileCharset(charset, numGlyphs, strings, isCIDFont) { + var out; + var numGlyphsLessNotDef = numGlyphs - 1; + + if (isCIDFont) { + out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xFF, numGlyphsLessNotDef & 0xFF]); + } else { + var length = 1 + numGlyphsLessNotDef * 2; + out = new Uint8Array(length); + out[0] = 0; + var charsetIndex = 0; + var numCharsets = charset.charset.length; + var warned = false; + + for (var i = 1; i < out.length; i += 2) { + var sid = 0; + + if (charsetIndex < numCharsets) { + var name = charset.charset[charsetIndex++]; + sid = strings.getSID(name); + + if (sid === -1) { + sid = 0; + + if (!warned) { + warned = true; + (0, _util.warn)("Couldn't find ".concat(name, " in CFF strings")); + } + } + } + + out[i] = sid >> 8 & 0xFF; + out[i + 1] = sid & 0xFF; + } + } + return this.compileTypedArray(out); }, compileEncoding: function CFFCompiler_compileEncoding(encoding) { @@ -39201,7 +39666,7 @@ var CFFCompiler = function CFFCompilerClosure() { exports.CFFCompiler = CFFCompiler; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -39219,7 +39684,7 @@ var ExpertSubsetCharset = ['.notdef', 'space', 'dollaroldstyle', 'dollarsuperior exports.ExpertSubsetCharset = ExpertSubsetCharset; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -39273,10 +39738,10 @@ function getEncoding(encodingName) { } /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __w_pdfjs_require__) { -var getLookupTableFactory = __w_pdfjs_require__(6).getLookupTableFactory; +var getLookupTableFactory = __w_pdfjs_require__(154).getLookupTableFactory; var getGlyphsUnicode = getLookupTableFactory(function (t) { t['A'] = 0x0041; t['AE'] = 0x00C6; @@ -43809,7 +44274,7 @@ exports.getGlyphsUnicode = getGlyphsUnicode; exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -43820,9 +44285,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getGlyphMapForStandardFonts = exports.getSymbolsFonts = exports.getSerifFonts = exports.getNonStdFontMap = exports.getStdFontMap = void 0; -var _util = __w_pdfjs_require__(6); +var _core_utils = __w_pdfjs_require__(154); -var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) { +var getStdFontMap = (0, _core_utils.getLookupTableFactory)(function (t) { t['ArialNarrow'] = 'Helvetica'; t['ArialNarrow-Bold'] = 'Helvetica-Bold'; t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique'; @@ -43881,7 +44346,7 @@ var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) { t['TimesNewRomanPSMT-Italic'] = 'Times-Italic'; }); exports.getStdFontMap = getStdFontMap; -var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) { +var getNonStdFontMap = (0, _core_utils.getLookupTableFactory)(function (t) { t['Calibri'] = 'Helvetica'; t['Calibri-Bold'] = 'Helvetica-Bold'; t['Calibri-BoldItalic'] = 'Helvetica-BoldOblique'; @@ -43919,7 +44384,7 @@ var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) { t['Wingdings'] = 'ZapfDingbats'; }); exports.getNonStdFontMap = getNonStdFontMap; -var getSerifFonts = (0, _util.getLookupTableFactory)(function (t) { +var getSerifFonts = (0, _core_utils.getLookupTableFactory)(function (t) { t['Adobe Jenson'] = true; t['Adobe Text'] = true; t['Albertus'] = true; @@ -44055,13 +44520,13 @@ var getSerifFonts = (0, _util.getLookupTableFactory)(function (t) { t['XITS'] = true; }); exports.getSerifFonts = getSerifFonts; -var getSymbolsFonts = (0, _util.getLookupTableFactory)(function (t) { +var getSymbolsFonts = (0, _core_utils.getLookupTableFactory)(function (t) { t['Dingbats'] = true; t['Symbol'] = true; t['ZapfDingbats'] = true; }); exports.getSymbolsFonts = getSymbolsFonts; -var getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t) { +var getGlyphMapForStandardFonts = (0, _core_utils.getLookupTableFactory)(function (t) { t[2] = 10; t[3] = 32; t[4] = 33; @@ -44457,13 +44922,13 @@ var getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t) t[3416] = 8377; }); exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts; -var getSupplementalGlyphMapForArialBlack = (0, _util.getLookupTableFactory)(function (t) { +var getSupplementalGlyphMapForArialBlack = (0, _core_utils.getLookupTableFactory)(function (t) { t[227] = 322; t[264] = 261; t[291] = 346; }); exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack; -var getSupplementalGlyphMapForCalibri = (0, _util.getLookupTableFactory)(function (t) { +var getSupplementalGlyphMapForCalibri = (0, _core_utils.getLookupTableFactory)(function (t) { t[1] = 32; t[4] = 65; t[17] = 66; @@ -44552,10 +45017,10 @@ var getSupplementalGlyphMapForCalibri = (0, _util.getLookupTableFactory)(functio exports.getSupplementalGlyphMapForCalibri = getSupplementalGlyphMapForCalibri; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __w_pdfjs_require__) { -var getLookupTableFactory = __w_pdfjs_require__(6).getLookupTableFactory; +var getLookupTableFactory = __w_pdfjs_require__(154).getLookupTableFactory; var getSpecialPUASymbols = getLookupTableFactory(function (t) { t[63721] = 0x00A9; t[63193] = 0x00A9; @@ -46529,7 +46994,7 @@ exports.getNormalizedUnicodes = getNormalizedUnicodes; exports.getUnicodeForGlyph = getUnicodeForGlyph; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -46540,15 +47005,15 @@ Object.defineProperty(exports, "__esModule", { }); exports.FontRendererFactory = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _cff_parser = __w_pdfjs_require__(174); +var _cff_parser = __w_pdfjs_require__(175); -var _glyphlist = __w_pdfjs_require__(177); +var _glyphlist = __w_pdfjs_require__(178); -var _encodings = __w_pdfjs_require__(176); +var _encodings = __w_pdfjs_require__(177); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -47538,7 +48003,7 @@ var FontRendererFactory = function FontRendererFactoryClosure() { exports.FontRendererFactory = FontRendererFactory; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -47549,11 +48014,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.Type1Parser = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _encodings = __w_pdfjs_require__(176); +var _encodings = __w_pdfjs_require__(177); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); var HINTING_ENABLED = false; @@ -48231,7 +48696,7 @@ var Type1Parser = function Type1ParserClosure() { exports.Type1Parser = Type1Parser; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -48243,11 +48708,13 @@ Object.defineProperty(exports, "__esModule", { exports.getTilingPatternIR = getTilingPatternIR; exports.Pattern = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); + +var _colorspace = __w_pdfjs_require__(169); -var _colorspace = __w_pdfjs_require__(168); +var _primitives = __w_pdfjs_require__(151); -var _primitives = __w_pdfjs_require__(155); +var _core_utils = __w_pdfjs_require__(154); var ShadingType = { FUNCTION_BASED: 1, @@ -48290,7 +48757,7 @@ var Pattern = function PatternClosure() { throw new _util.FormatError('Unsupported ShadingType: ' + type); } } catch (ex) { - if (ex instanceof _util.MissingDataException) { + if (ex instanceof _core_utils.MissingDataException) { throw ex; } @@ -49153,7 +49620,7 @@ function getTilingPatternIR(operatorList, dict, args) { } /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -49164,7 +49631,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.bidi = bidi; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); var baseTypes = ['BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'ON', 'ES', 'CS', 'ES', 'CS', 'CS', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'CS', 'ON', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON', 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'CS', 'ON', 'ET', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON', 'ON', 'BN', 'ON', 'ON', 'ET', 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON', 'EN', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L']; var arabicTypes = ['AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ON', 'ON', 'AL', 'ET', 'ET', 'AL', 'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', '', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AN', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'NSM', 'NSM', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL']; @@ -49457,7 +49924,7 @@ function bidi(str, startLevel, vertical) { } /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -49468,14 +49935,14 @@ Object.defineProperty(exports, "__esModule", { }); exports.getMetrics = void 0; -var _util = __w_pdfjs_require__(6); +var _core_utils = __w_pdfjs_require__(154); -var getMetrics = (0, _util.getLookupTableFactory)(function (t) { +var getMetrics = (0, _core_utils.getLookupTableFactory)(function (t) { t['Courier'] = 600; t['Courier-Bold'] = 600; t['Courier-BoldOblique'] = 600; t['Courier-Oblique'] = 600; - t['Helvetica'] = (0, _util.getLookupTableFactory)(function (t) { + t['Helvetica'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 278; t['exclam'] = 278; t['quotedbl'] = 355; @@ -49792,7 +50259,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 556; }); - t['Helvetica-Bold'] = (0, _util.getLookupTableFactory)(function (t) { + t['Helvetica-Bold'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 278; t['exclam'] = 333; t['quotedbl'] = 474; @@ -50109,7 +50576,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 556; }); - t['Helvetica-BoldOblique'] = (0, _util.getLookupTableFactory)(function (t) { + t['Helvetica-BoldOblique'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 278; t['exclam'] = 333; t['quotedbl'] = 474; @@ -50426,7 +50893,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 556; }); - t['Helvetica-Oblique'] = (0, _util.getLookupTableFactory)(function (t) { + t['Helvetica-Oblique'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 278; t['exclam'] = 278; t['quotedbl'] = 355; @@ -50743,7 +51210,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 556; }); - t['Symbol'] = (0, _util.getLookupTableFactory)(function (t) { + t['Symbol'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 250; t['exclam'] = 333; t['universal'] = 713; @@ -50935,7 +51402,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['bracerightbt'] = 494; t['apple'] = 790; }); - t['Times-Roman'] = (0, _util.getLookupTableFactory)(function (t) { + t['Times-Roman'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 250; t['exclam'] = 333; t['quotedbl'] = 408; @@ -51252,7 +51719,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 500; }); - t['Times-Bold'] = (0, _util.getLookupTableFactory)(function (t) { + t['Times-Bold'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 250; t['exclam'] = 333; t['quotedbl'] = 555; @@ -51569,7 +52036,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 500; }); - t['Times-BoldItalic'] = (0, _util.getLookupTableFactory)(function (t) { + t['Times-BoldItalic'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 250; t['exclam'] = 389; t['quotedbl'] = 555; @@ -51886,7 +52353,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 500; }); - t['Times-Italic'] = (0, _util.getLookupTableFactory)(function (t) { + t['Times-Italic'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 250; t['exclam'] = 333; t['quotedbl'] = 420; @@ -52203,7 +52670,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { t['imacron'] = 278; t['Euro'] = 500; }); - t['ZapfDingbats'] = (0, _util.getLookupTableFactory)(function (t) { + t['ZapfDingbats'] = (0, _core_utils.getLookupTableFactory)(function (t) { t['space'] = 278; t['a1'] = 974; t['a2'] = 961; @@ -52411,7 +52878,7 @@ var getMetrics = (0, _util.getLookupTableFactory)(function (t) { exports.getMetrics = getMetrics; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -52423,11 +52890,11 @@ Object.defineProperty(exports, "__esModule", { exports.isPDFFunction = isPDFFunction; exports.PostScriptCompiler = exports.PostScriptEvaluator = exports.PDFFunctionFactory = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _ps_parser = __w_pdfjs_require__(186); +var _ps_parser = __w_pdfjs_require__(187); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -53758,7 +54225,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { exports.PostScriptCompiler = PostScriptCompiler; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -53769,9 +54236,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.PostScriptParser = exports.PostScriptLexer = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -54051,7 +54518,7 @@ function () { exports.PostScriptLexer = PostScriptLexer; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -54062,20 +54529,31 @@ Object.defineProperty(exports, "__esModule", { }); exports.MurmurHash3_64 = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { - var MASK_HIGH = 0xffff0000; - var MASK_LOW = 0xffff; +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var SEED = 0xc3d2e1f0; +var MASK_HIGH = 0xffff0000; +var MASK_LOW = 0xffff; + +var MurmurHash3_64 = +/*#__PURE__*/ +function () { function MurmurHash3_64(seed) { - var SEED = 0xc3d2e1f0; + _classCallCheck(this, MurmurHash3_64); + this.h1 = seed ? seed & 0xffffffff : SEED; this.h2 = seed ? seed & 0xffffffff : SEED; } - MurmurHash3_64.prototype = { - update: function MurmurHash3_64_update(input) { + _createClass(MurmurHash3_64, [{ + key: "update", + value: function update(input) { var data, length; if ((0, _util.isString)(input)) { @@ -54102,14 +54580,14 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { var blockCounts = length >> 2; var tailLength = length - blockCounts * 4; var dataUint32 = new Uint32Array(data.buffer, 0, blockCounts); - var k1 = 0; - var k2 = 0; - var h1 = this.h1; - var h2 = this.h2; - var C1 = 0xcc9e2d51; - var C2 = 0x1b873593; - var C1_LOW = C1 & MASK_LOW; - var C2_LOW = C2 & MASK_LOW; + var k1 = 0, + k2 = 0; + var h1 = this.h1, + h2 = this.h2; + var C1 = 0xcc9e2d51, + C2 = 0x1b873593; + var C1_LOW = C1 & MASK_LOW, + C2_LOW = C2 & MASK_LOW; for (var _i = 0; _i < blockCounts; _i++) { if (_i & 1) { @@ -54156,11 +54634,12 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { this.h1 = h1; this.h2 = h2; - return this; - }, - hexdigest: function MurmurHash3_64_hexdigest() { - var h1 = this.h1; - var h2 = this.h2; + } + }, { + key: "hexdigest", + value: function hexdigest() { + var h1 = this.h1, + h2 = this.h2; h1 ^= h2 >>> 1; h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW; h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16; @@ -54168,27 +54647,115 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW; h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16; h1 ^= h2 >>> 1; + var hex1 = (h1 >>> 0).toString(16), + hex2 = (h2 >>> 0).toString(16); + return hex1.padStart(8, '0') + hex2.padStart(8, '0'); + } + }]); - for (var i = 0, arr = [h1, h2], str = ''; i < arr.length; i++) { - var hex = (arr[i] >>> 0).toString(16); + return MurmurHash3_64; +}(); - while (hex.length < 8) { - hex = '0' + hex; - } +exports.MurmurHash3_64 = MurmurHash3_64; + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __w_pdfjs_require__) { - str += hex; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NativeImageDecoder = void 0; + +var _colorspace = __w_pdfjs_require__(169); + +var _jpeg_stream = __w_pdfjs_require__(164); + +var _stream = __w_pdfjs_require__(158); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var NativeImageDecoder = +/*#__PURE__*/ +function () { + function NativeImageDecoder(_ref) { + var xref = _ref.xref, + resources = _ref.resources, + handler = _ref.handler, + _ref$forceDataSchema = _ref.forceDataSchema, + forceDataSchema = _ref$forceDataSchema === void 0 ? false : _ref$forceDataSchema, + pdfFunctionFactory = _ref.pdfFunctionFactory; + + _classCallCheck(this, NativeImageDecoder); + + this.xref = xref; + this.resources = resources; + this.handler = handler; + this.forceDataSchema = forceDataSchema; + this.pdfFunctionFactory = pdfFunctionFactory; + } + + _createClass(NativeImageDecoder, [{ + key: "canDecode", + value: function canDecode(image) { + return image instanceof _jpeg_stream.JpegStream && NativeImageDecoder.isDecodable(image, this.xref, this.resources, this.pdfFunctionFactory); + } + }, { + key: "decode", + value: function decode(image) { + var dict = image.dict; + var colorSpace = dict.get('ColorSpace', 'CS'); + colorSpace = _colorspace.ColorSpace.parse(colorSpace, this.xref, this.resources, this.pdfFunctionFactory); + return this.handler.sendWithPromise('JpegDecode', [image.getIR(this.forceDataSchema), colorSpace.numComps]).then(function (_ref2) { + var data = _ref2.data, + width = _ref2.width, + height = _ref2.height; + return new _stream.Stream(data, 0, data.length, dict); + }); + } + }], [{ + key: "isSupported", + value: function isSupported(image, xref, res, pdfFunctionFactory) { + var dict = image.dict; + + if (dict.has('DecodeParms') || dict.has('DP')) { + return false; } - return str; + var cs = _colorspace.ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res, pdfFunctionFactory); + + return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && cs.isDefaultDecode(dict.getArray('Decode', 'D')); } - }; - return MurmurHash3_64; + }, { + key: "isDecodable", + value: function isDecodable(image, xref, res, pdfFunctionFactory) { + var dict = image.dict; + + if (dict.has('DecodeParms') || dict.has('DP')) { + return false; + } + + var cs = _colorspace.ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res, pdfFunctionFactory); + + var bpc = dict.get('BitsPerComponent', 'BPC') || 1; + return (cs.numComps === 1 || cs.numComps === 3) && cs.isDefaultDecode(dict.getArray('Decode', 'D'), bpc); + } + }]); + + return NativeImageDecoder; }(); -exports.MurmurHash3_64 = MurmurHash3_64; +exports.NativeImageDecoder = NativeImageDecoder; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -54199,17 +54766,17 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFImage = void 0; -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -var _primitives = __w_pdfjs_require__(155); +var _primitives = __w_pdfjs_require__(151); -var _colorspace = __w_pdfjs_require__(168); +var _colorspace = __w_pdfjs_require__(169); -var _stream = __w_pdfjs_require__(157); +var _stream = __w_pdfjs_require__(158); -var _jpeg_stream = __w_pdfjs_require__(163); +var _jpeg_stream = __w_pdfjs_require__(164); -var _jpx = __w_pdfjs_require__(166); +var _jpx = __w_pdfjs_require__(167); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -54222,7 +54789,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var PDFImage = function PDFImageClosure() { function handleImageData(image, nativeDecoder) { if (nativeDecoder && nativeDecoder.canDecode(image)) { - return nativeDecoder.decode(image).catch(function (reason) { + return nativeDecoder.decode(image)["catch"](function (reason) { (0, _util.warn)('Native image decoding failed -- trying to recover: ' + (reason && reason.message)); return image; }); @@ -54859,7 +55426,7 @@ var PDFImage = function PDFImageClosure() { exports.PDFImage = PDFImage; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports, __w_pdfjs_require__) { "use strict"; @@ -54872,9 +55439,9 @@ exports.MessageHandler = MessageHandler; var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); -var _util = __w_pdfjs_require__(6); +var _util = __w_pdfjs_require__(5); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -54889,10 +55456,10 @@ function resolveCall(_x, _x2) { function _resolveCall() { _resolveCall = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(fn, args) { + _regenerator["default"].mark(function _callee(fn, args) { var thisArg, _args = arguments; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -54903,7 +55470,7 @@ function _resolveCall() { break; } - return _context.abrupt("return"); + return _context.abrupt("return", undefined); case 3: return _context.abrupt("return", fn.apply(thisArg, args)); @@ -54913,7 +55480,7 @@ function _resolveCall() { return _context.stop(); } } - }, _callee, this); + }, _callee); })); return _resolveCall.apply(this, arguments); } @@ -54955,7 +55522,7 @@ function resolveOrReject(capability, success, reason) { } function finalize(promise) { - return Promise.resolve(promise).catch(function () {}); + return Promise.resolve(promise)["catch"](function () {}); } function MessageHandler(sourceName, targetName, comObj) { @@ -55364,6 +55931,268 @@ MessageHandler.prototype = { } }; +/***/ }), +/* 192 */ +/***/ (function(module, exports, __w_pdfjs_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFWorkerStream = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(5); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PDFWorkerStream = +/*#__PURE__*/ +function () { + function PDFWorkerStream(msgHandler) { + _classCallCheck(this, PDFWorkerStream); + + this._msgHandler = msgHandler; + this._contentLength = null; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + _createClass(PDFWorkerStream, [{ + key: "getFullReader", + value: function getFullReader() { + (0, _util.assert)(!this._fullRequestReader); + this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); + return this._fullRequestReader; + } + }, { + key: "getRangeReader", + value: function getRangeReader(begin, end) { + var reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler); + + this._rangeRequestReaders.push(reader); + + return reader; + } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + var readers = this._rangeRequestReaders.slice(0); + + readers.forEach(function (reader) { + reader.cancel(reason); + }); + } + }]); + + return PDFWorkerStream; +}(); + +exports.PDFWorkerStream = PDFWorkerStream; + +var PDFWorkerStreamReader = +/*#__PURE__*/ +function () { + function PDFWorkerStreamReader(msgHandler) { + var _this = this; + + _classCallCheck(this, PDFWorkerStreamReader); + + this._msgHandler = msgHandler; + this.onProgress = null; + this._contentLength = null; + this._isRangeSupported = false; + this._isStreamingSupported = false; + + var readableStream = this._msgHandler.sendWithStream('GetReader'); + + this._reader = readableStream.getReader(); + this._headersReady = this._msgHandler.sendWithPromise('ReaderHeadersReady').then(function (data) { + _this._isStreamingSupported = data.isStreamingSupported; + _this._isRangeSupported = data.isRangeSupported; + _this._contentLength = data.contentLength; + }); + } + + _createClass(PDFWorkerStreamReader, [{ + key: "read", + value: function () { + var _read = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee() { + var _ref, value, done; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this._reader.read(); + + case 2: + _ref = _context.sent; + value = _ref.value; + done = _ref.done; + + if (!done) { + _context.next = 7; + break; + } + + return _context.abrupt("return", { + value: undefined, + done: true + }); + + case 7: + return _context.abrupt("return", { + value: value.buffer, + done: false + }); + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function read() { + return _read.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + this._reader.cancel(reason); + } + }, { + key: "headersReady", + get: function get() { + return this._headersReady; + } + }, { + key: "contentLength", + get: function get() { + return this._contentLength; + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; + } + }, { + key: "isRangeSupported", + get: function get() { + return this._isRangeSupported; + } + }]); + + return PDFWorkerStreamReader; +}(); + +var PDFWorkerStreamRangeReader = +/*#__PURE__*/ +function () { + function PDFWorkerStreamRangeReader(begin, end, msgHandler) { + _classCallCheck(this, PDFWorkerStreamRangeReader); + + this._msgHandler = msgHandler; + this.onProgress = null; + + var readableStream = this._msgHandler.sendWithStream('GetRangeReader', { + begin: begin, + end: end + }); + + this._reader = readableStream.getReader(); + } + + _createClass(PDFWorkerStreamRangeReader, [{ + key: "read", + value: function () { + var _read2 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee2() { + var _ref2, value, done; + + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this._reader.read(); + + case 2: + _ref2 = _context2.sent; + value = _ref2.value; + done = _ref2.done; + + if (!done) { + _context2.next = 7; + break; + } + + return _context2.abrupt("return", { + value: undefined, + done: true + }); + + case 7: + return _context2.abrupt("return", { + value: value.buffer, + done: false + }); + + case 8: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function read() { + return _read2.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + this._reader.cancel(reason); + } + }, { + key: "isStreamingSupported", + get: function get() { + return false; + } + }]); + + return PDFWorkerStreamRangeReader; +}(); + /***/ }) /******/ ]); }); diff --git a/cps/static/js/libs/viewer.js b/cps/static/js/libs/viewer.js index 387eea34..1adf130b 100644 --- a/cps/static/js/libs/viewer.js +++ b/cps/static/js/libs/viewer.js @@ -2,7 +2,7 @@ * @licstart The following is the entire license notice for the * Javascript code in this page * - * Copyright 2018 Mozilla Foundation + * Copyright 2019 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,15 +117,15 @@ var pdfjsWebApp, pdfjsWebAppOptions; { pdfjsWebApp = __webpack_require__(1); - pdfjsWebAppOptions = __webpack_require__(12); + pdfjsWebAppOptions = __webpack_require__(6); } ; { - __webpack_require__(37); + __webpack_require__(36); } ; { - __webpack_require__(42); + __webpack_require__(41); } function getViewerConfiguration() { @@ -281,51 +281,51 @@ exports.PDFPrintServiceFactory = exports.DefaultExternalServices = exports.PDFVi var _regenerator = _interopRequireDefault(__webpack_require__(2)); -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdfjsLib = __webpack_require__(7); +var _app_options = __webpack_require__(6); -var _pdf_cursor_tools = __webpack_require__(8); +var _pdfjsLib = __webpack_require__(7); -var _pdf_rendering_queue = __webpack_require__(10); +var _pdf_cursor_tools = __webpack_require__(9); -var _pdf_sidebar = __webpack_require__(11); +var _pdf_rendering_queue = __webpack_require__(11); -var _app_options = __webpack_require__(12); +var _pdf_sidebar = __webpack_require__(12); -var _overlay_manager = __webpack_require__(14); +var _overlay_manager = __webpack_require__(13); -var _password_prompt = __webpack_require__(15); +var _password_prompt = __webpack_require__(14); -var _pdf_attachment_viewer = __webpack_require__(16); +var _pdf_attachment_viewer = __webpack_require__(15); -var _pdf_document_properties = __webpack_require__(17); +var _pdf_document_properties = __webpack_require__(16); -var _pdf_find_bar = __webpack_require__(18); +var _pdf_find_bar = __webpack_require__(17); -var _pdf_find_controller = __webpack_require__(19); +var _pdf_find_controller = __webpack_require__(18); -var _pdf_history = __webpack_require__(21); +var _pdf_history = __webpack_require__(20); -var _pdf_link_service = __webpack_require__(22); +var _pdf_link_service = __webpack_require__(21); -var _pdf_outline_viewer = __webpack_require__(23); +var _pdf_outline_viewer = __webpack_require__(22); -var _pdf_presentation_mode = __webpack_require__(24); +var _pdf_presentation_mode = __webpack_require__(23); -var _pdf_sidebar_resizer = __webpack_require__(25); +var _pdf_sidebar_resizer = __webpack_require__(24); -var _pdf_thumbnail_viewer = __webpack_require__(26); +var _pdf_thumbnail_viewer = __webpack_require__(25); -var _pdf_viewer = __webpack_require__(28); +var _pdf_viewer = __webpack_require__(27); -var _secondary_toolbar = __webpack_require__(33); +var _secondary_toolbar = __webpack_require__(32); -var _toolbar = __webpack_require__(35); +var _toolbar = __webpack_require__(34); -var _view_history = __webpack_require__(36); +var _view_history = __webpack_require__(35); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -411,11 +411,11 @@ var PDFViewerApplication = { initialize: function () { var _initialize = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(appConfig) { + _regenerator["default"].mark(function _callee(appConfig) { var _this = this; var appContainer; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -468,9 +468,9 @@ var PDFViewerApplication = { _readPreferences: function () { var _readPreferences2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { + _regenerator["default"].mark(function _callee2() { var prefs, name; - return _regenerator.default.wrap(function _callee2$(_context2) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -493,14 +493,15 @@ var PDFViewerApplication = { _app_options.AppOptions.set(name, prefs[name]); } - _context2.next = 11; + _context2.next = 12; break; case 9: _context2.prev = 9; _context2.t0 = _context2["catch"](2); + console.error("_readPreferences: \"".concat(_context2.t0.message, "\".")); - case 11: + case 12: case "end": return _context2.stop(); } @@ -517,9 +518,9 @@ var PDFViewerApplication = { _parseHashParameters: function () { var _parseHashParameters2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3() { + _regenerator["default"].mark(function _callee3() { var waitOn, hash, hashParams, viewer, enabled; - return _regenerator.default.wrap(function _callee3$(_context3) { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -528,7 +529,7 @@ var PDFViewerApplication = { break; } - return _context3.abrupt("return"); + return _context3.abrupt("return", undefined); case 2: waitOn = []; @@ -602,7 +603,7 @@ var PDFViewerApplication = { _app_options.AppOptions.set('locale', hashParams['locale']); } - return _context3.abrupt("return", Promise.all(waitOn).catch(function (reason) { + return _context3.abrupt("return", Promise.all(waitOn)["catch"](function (reason) { console.error("_parseHashParameters: \"".concat(reason.message, "\".")); })); @@ -623,9 +624,9 @@ var PDFViewerApplication = { _initializeL10n: function () { var _initializeL10n2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee4() { + _regenerator["default"].mark(function _callee4() { var dir; - return _regenerator.default.wrap(function _callee4$(_context4) { + return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: @@ -656,16 +657,15 @@ var PDFViewerApplication = { _initializeViewerComponents: function () { var _initializeViewerComponents2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee5() { - var appConfig, dispatchToDOM, eventBus, pdfRenderingQueue, pdfLinkService, downloadManager, findController, container, viewer, thumbnailContainer, sidebarConfig; - return _regenerator.default.wrap(function _callee5$(_context5) { + _regenerator["default"].mark(function _callee5() { + var appConfig, eventBus, pdfRenderingQueue, pdfLinkService, downloadManager, findController, container, viewer; + return _regenerator["default"].wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: appConfig = this.appConfig; this.overlayManager = new _overlay_manager.OverlayManager(); - dispatchToDOM = _app_options.AppOptions.get('eventBusDispatchToDOM'); - eventBus = appConfig.eventBus || (0, _ui_utils.getGlobalEventBus)(dispatchToDOM); + eventBus = appConfig.eventBus || (0, _ui_utils.getGlobalEventBus)(_app_options.AppOptions.get('eventBusDispatchToDOM')); this.eventBus = eventBus; pdfRenderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); pdfRenderingQueue.onIdle = this.cleanup.bind(this); @@ -707,9 +707,8 @@ var PDFViewerApplication = { }); pdfRenderingQueue.setViewer(this.pdfViewer); pdfLinkService.setViewer(this.pdfViewer); - thumbnailContainer = appConfig.sidebar.thumbnailView; this.pdfThumbnailViewer = new _pdf_thumbnail_viewer.PDFThumbnailViewer({ - container: thumbnailContainer, + container: appConfig.sidebar.thumbnailView, renderingQueue: pdfRenderingQueue, linkService: pdfLinkService, l10n: this.l10n @@ -751,14 +750,17 @@ var PDFViewerApplication = { eventBus: eventBus, downloadManager: downloadManager }); - sidebarConfig = Object.create(appConfig.sidebar); - sidebarConfig.pdfViewer = this.pdfViewer; - sidebarConfig.pdfThumbnailViewer = this.pdfThumbnailViewer; - this.pdfSidebar = new _pdf_sidebar.PDFSidebar(sidebarConfig, eventBus, this.l10n); + this.pdfSidebar = new _pdf_sidebar.PDFSidebar({ + elements: appConfig.sidebar, + pdfViewer: this.pdfViewer, + pdfThumbnailViewer: this.pdfThumbnailViewer, + eventBus: eventBus, + l10n: this.l10n + }); this.pdfSidebar.onToggled = this.forceRendering.bind(this); this.pdfSidebarResizer = new _pdf_sidebar_resizer.PDFSidebarResizer(appConfig.sidebarResizer, eventBus, this.l10n); - case 39: + case 34: case "end": return _context5.stop(); } @@ -797,6 +799,17 @@ var PDFViewerApplication = { this.pdfViewer.currentScaleValue = newScale; }, + zoomReset: function zoomReset() { + var ignoreDuplicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.pdfViewer.isInPresentationMode) { + return; + } else if (ignoreDuplicate && this.pdfViewer.currentScaleValue === _ui_utils.DEFAULT_SCALE_VALUE) { + return; + } + + this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + }, get pagesCount() { return this.pdfDocument ? this.pdfDocument.numPages : 0; @@ -880,9 +893,9 @@ var PDFViewerApplication = { close: function () { var _close = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee6() { + _regenerator["default"].mark(function _callee6() { var errorWrapper, promise; - return _regenerator.default.wrap(function _callee6$(_context6) { + return _regenerator["default"].wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { case 0: @@ -894,7 +907,7 @@ var PDFViewerApplication = { break; } - return _context6.abrupt("return"); + return _context6.abrupt("return", undefined); case 4: promise = this.pdfLoadingTask.destroy(); @@ -944,12 +957,12 @@ var PDFViewerApplication = { open: function () { var _open = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee7(file, args) { + _regenerator["default"].mark(function _callee7(file, args) { var _this2 = this; var workerParameters, key, parameters, apiParameters, _key, prop, loadingTask; - return _regenerator.default.wrap(function _callee7$(_context7) { + return _regenerator["default"].wrap(function _callee7$(_context7) { while (1) { switch (_context7.prev = _context7.next) { case 0: @@ -962,7 +975,7 @@ var PDFViewerApplication = { return this.close(); case 3: - workerParameters = _app_options.AppOptions.getAll('worker'); + workerParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.WORKER); for (key in workerParameters) { _pdfjsLib.GlobalWorkerOptions[key] = workerParameters[key]; @@ -980,7 +993,7 @@ var PDFViewerApplication = { parameters.url = file.url; } - apiParameters = _app_options.AppOptions.getAll('api'); + apiParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.API); for (_key in apiParameters) { parameters[_key] = apiParameters[_key]; @@ -1017,7 +1030,7 @@ var PDFViewerApplication = { _this2.load(pdfDocument); }, function (exception) { if (loadingTask !== _this2.pdfLoadingTask) { - return; + return undefined; } var message = exception && exception.message; @@ -1081,7 +1094,7 @@ var PDFViewerApplication = { type: 'application/pdf' }); downloadManager.download(blob, url, filename); - }).catch(downloadByUrl); + })["catch"](downloadByUrl); }, fallback: function fallback(featureId) {}, error: function error(message, moreInfo) { @@ -1194,8 +1207,9 @@ var PDFViewerApplication = { }); }); }); - var pageModePromise = pdfDocument.getPageMode().catch(function () {}); - var openActionDestPromise = pdfDocument.getOpenActionDestination().catch(function () {}); + var pageLayoutPromise = pdfDocument.getPageLayout()["catch"](function () {}); + var pageModePromise = pdfDocument.getPageMode()["catch"](function () {}); + var openActionDestPromise = pdfDocument.getOpenActionDestination()["catch"](function () {}); this.toolbar.setPagesCount(pdfDocument.numPages, false); this.secondaryToolbar.setPagesCount(pdfDocument.numPages); var store = this.store = new _view_history.ViewHistory(pdfDocument.fingerprint); @@ -1222,20 +1236,20 @@ var PDFViewerApplication = { sidebarView: _pdf_sidebar.SidebarView.UNKNOWN, scrollMode: _ui_utils.ScrollMode.UNKNOWN, spreadMode: _ui_utils.SpreadMode.UNKNOWN - }).catch(function () {}); - Promise.all([storePromise, pageModePromise, openActionDestPromise]).then( + })["catch"](function () {}); + Promise.all([storePromise, pageLayoutPromise, pageModePromise, openActionDestPromise]).then( /*#__PURE__*/ function () { var _ref3 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee8(_ref2) { - var _ref4, _ref4$, values, pageMode, openActionDest, viewOnLoad, initialBookmark, zoom, hash, rotation, sidebarView, scrollMode, spreadMode; + _regenerator["default"].mark(function _callee8(_ref2) { + var _ref4, _ref4$, values, pageLayout, pageMode, openActionDest, viewOnLoad, initialBookmark, zoom, hash, rotation, sidebarView, scrollMode, spreadMode; - return _regenerator.default.wrap(function _callee8$(_context8) { + return _regenerator["default"].wrap(function _callee8$(_context8) { while (1) { switch (_context8.prev = _context8.next) { case 0: - _ref4 = _slicedToArray(_ref2, 3), _ref4$ = _ref4[0], values = _ref4$ === void 0 ? {} : _ref4$, pageMode = _ref4[1], openActionDest = _ref4[2]; + _ref4 = _slicedToArray(_ref2, 4), _ref4$ = _ref4[0], values = _ref4$ === void 0 ? {} : _ref4$, pageLayout = _ref4[1], pageMode = _ref4[2], openActionDest = _ref4[3]; viewOnLoad = _app_options.AppOptions.get('viewOnLoad'); _this5._initializePdfHistory({ @@ -1273,6 +1287,10 @@ var PDFViewerApplication = { sidebarView = apiPageModeToSidebarView(pageMode); } + if (pageLayout && spreadMode === _ui_utils.SpreadMode.UNKNOWN) { + spreadMode = apiPageLayoutToSpreadMode(pageLayout); + } + _this5.setInitialView(hash, { rotation: rotation, sidebarView: sidebarView, @@ -1288,45 +1306,45 @@ var PDFViewerApplication = { pdfViewer.focus(); } - _context8.next = 17; + _context8.next = 18; return Promise.race([pagesPromise, new Promise(function (resolve) { setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT); })]); - case 17: + case 18: if (!(!initialBookmark && !hash)) { - _context8.next = 19; + _context8.next = 20; break; } return _context8.abrupt("return"); - case 19: + case 20: if (!pdfViewer.hasEqualPageSizes) { - _context8.next = 21; + _context8.next = 22; break; } return _context8.abrupt("return"); - case 21: + case 22: _this5.initialBookmark = initialBookmark; pdfViewer.currentScaleValue = pdfViewer.currentScaleValue; _this5.setInitialView(hash); - case 24: + case 25: case "end": return _context8.stop(); } } - }, _callee8, this); + }, _callee8); })); return function (_x4) { return _ref3.apply(this, arguments); }; - }()).catch(function () { + }())["catch"](function () { _this5.setInitialView(); }).then(function () { pdfViewer.update(); @@ -1614,6 +1632,7 @@ var PDFViewerApplication = { eventBus.on('previouspage', webViewerPreviousPage); eventBus.on('zoomin', webViewerZoomIn); eventBus.on('zoomout', webViewerZoomOut); + eventBus.on('zoomreset', webViewerZoomReset); eventBus.on('pagenumberchanged', webViewerPageNumberChanged); eventBus.on('scalechanged', webViewerScaleChanged); eventBus.on('rotatecw', webViewerRotateCw); @@ -1659,7 +1678,9 @@ var PDFViewerApplication = { }; window.addEventListener('visibilitychange', webViewerVisibilityChange); - window.addEventListener('wheel', webViewerWheel); + window.addEventListener('wheel', webViewerWheel, { + passive: false + }); window.addEventListener('click', webViewerClick); window.addEventListener('keydown', webViewerKeyDown); window.addEventListener('resize', _boundEvents.windowResize); @@ -1694,6 +1715,7 @@ var PDFViewerApplication = { eventBus.off('previouspage', webViewerPreviousPage); eventBus.off('zoomin', webViewerZoomIn); eventBus.off('zoomout', webViewerZoomOut); + eventBus.off('zoomreset', webViewerZoomReset); eventBus.off('pagenumberchanged', webViewerPageNumberChanged); eventBus.off('scalechanged', webViewerScaleChanged); eventBus.off('rotatecw', webViewerRotateCw); @@ -1979,7 +2001,7 @@ function webViewerSidebarViewChanged(evt) { var store = PDFViewerApplication.store; if (store && PDFViewerApplication.isInitialViewSet) { - store.set('sidebarView', evt.view).catch(function () {}); + store.set('sidebarView', evt.view)["catch"](function () {}); } } @@ -1994,7 +2016,7 @@ function webViewerUpdateViewarea(evt) { 'scrollLeft': location.left, 'scrollTop': location.top, 'rotation': location.rotation - }).catch(function () {}); + })["catch"](function () {}); } var href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams); @@ -2009,7 +2031,7 @@ function webViewerScrollModeChanged(evt) { var store = PDFViewerApplication.store; if (store && PDFViewerApplication.isInitialViewSet) { - store.set('scrollMode', evt.mode).catch(function () {}); + store.set('scrollMode', evt.mode)["catch"](function () {}); } } @@ -2017,7 +2039,7 @@ function webViewerSpreadModeChanged(evt) { var store = PDFViewerApplication.store; if (store && PDFViewerApplication.isInitialViewSet) { - store.set('spreadMode', evt.mode).catch(function () {}); + store.set('spreadMode', evt.mode)["catch"](function () {}); } } @@ -2137,6 +2159,10 @@ function webViewerZoomOut() { PDFViewerApplication.zoomOut(); } +function webViewerZoomReset(evt) { + PDFViewerApplication.zoomReset(evt && evt.ignoreDuplicate); +} + function webViewerPageNumberChanged(evt) { var pdfViewer = PDFViewerApplication.pdfViewer; @@ -2392,7 +2418,7 @@ function webViewerKeyDown(evt) { case 96: if (!isViewerInPresentationMode) { setTimeout(function () { - pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + PDFViewerApplication.zoomReset(); }); handled = false; } @@ -2619,6 +2645,24 @@ function webViewerKeyDown(evt) { } } +function apiPageLayoutToSpreadMode(layout) { + switch (layout) { + case 'SinglePage': + case 'OneColumn': + return _ui_utils.SpreadMode.NONE; + + case 'TwoColumnLeft': + case 'TwoPageLeft': + return _ui_utils.SpreadMode.ODD; + + case 'TwoColumnRight': + case 'TwoPageRight': + return _ui_utils.SpreadMode.EVEN; + } + + return _ui_utils.SpreadMode.NONE; +} + function apiPageModeToSidebarView(mode) { switch (mode) { case 'UseNone': @@ -2662,40 +2706,12 @@ module.exports = __webpack_require__(3); /* 3 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var g = function () { - return this || (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self; -}() || Function("return this")(); - -var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; -var oldRuntime = hadRuntime && g.regeneratorRuntime; -g.regeneratorRuntime = undefined; -module.exports = __webpack_require__(4); - -if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; -} else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } -} - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; /* WEBPACK VAR INJECTION */(function(module) { function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -!function (global) { +var runtime = function (exports) { "use strict"; var Op = Object.prototype; @@ -2705,18 +2721,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - var inModule = ( false ? undefined : _typeof(module)) === "object"; - var runtime = global.regeneratorRuntime; - - if (runtime) { - if (inModule) { - module.exports = runtime; - } - - return; - } - - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; @@ -2726,7 +2730,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return generator; } - runtime.wrap = wrap; + exports.wrap = wrap; function tryCatch(fn, obj, arg) { try { @@ -2780,12 +2784,12 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat }); } - runtime.isGeneratorFunction = function (genFun) { + exports.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; - runtime.mark = function (genFun) { + exports.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { @@ -2800,7 +2804,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return genFun; }; - runtime.awrap = function (arg) { + exports.awrap = function (arg) { return { __await: arg }; @@ -2854,11 +2858,11 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return this; }; - runtime.AsyncIterator = AsyncIterator; + exports.AsyncIterator = AsyncIterator; - runtime.async = function (innerFn, outerFn, self, tryLocsList) { + exports.async = function (innerFn, outerFn, self, tryLocsList) { var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; @@ -2936,7 +2940,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat context.delegate = null; if (context.method === "throw") { - if (delegate.iterator.return) { + if (delegate.iterator["return"]) { context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); @@ -3030,7 +3034,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat this.reset(true); } - runtime.keys = function (object) { + exports.keys = function (object) { var keys = []; for (var key in object) { @@ -3091,7 +3095,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat }; } - runtime.values = values; + exports.values = values; function doneResult() { return { @@ -3269,13 +3273,18 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat return ContinueSentinel; } }; -}(function () { - return this || (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" && self; -}() || Function("return this")()); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) + return exports; +}(( false ? undefined : _typeof(module)) === "object" ? module.exports : {}); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + Function("r", "regeneratorRuntime = r")(runtime); +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)(module))) /***/ }), -/* 5 */ +/* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3306,7 +3315,7 @@ module.exports = function (module) { }; /***/ }), -/* 6 */ +/* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3339,7 +3348,7 @@ exports.WaitOnType = exports.animationStarted = exports.ProgressBar = exports.Ev var _regenerator = _interopRequireDefault(__webpack_require__(2)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -3426,8 +3435,8 @@ var NullL10n = { getLanguage: function () { var _getLanguage = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee() { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -3438,7 +3447,7 @@ var NullL10n = { return _context.stop(); } } - }, _callee, this); + }, _callee); })); function getLanguage() { @@ -3450,8 +3459,8 @@ var NullL10n = { getDirection: function () { var _getDirection = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2() { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -3462,7 +3471,7 @@ var NullL10n = { return _context2.stop(); } } - }, _callee2, this); + }, _callee2); })); function getDirection() { @@ -3474,8 +3483,8 @@ var NullL10n = { get: function () { var _get = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3(property, args, fallback) { - return _regenerator.default.wrap(function _callee3$(_context3) { + _regenerator["default"].mark(function _callee3(property, args, fallback) { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -3486,7 +3495,7 @@ var NullL10n = { return _context3.stop(); } } - }, _callee3, this); + }, _callee3); })); function get(_x, _x2, _x3) { @@ -3498,8 +3507,8 @@ var NullL10n = { translate: function () { var _translate = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee4(element) { - return _regenerator.default.wrap(function _callee4$(_context4) { + _regenerator["default"].mark(function _callee4(element) { + return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: @@ -3507,7 +3516,7 @@ var NullL10n = { return _context4.stop(); } } - }, _callee4, this); + }, _callee4); })); function translate(_x4) { @@ -4189,24 +4198,7 @@ function moveToEndOfArray(arr, condition) { } /***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var pdfjsLib; - -if (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) { - pdfjsLib = window['pdfjs-dist/build/pdf']; -} else { - pdfjsLib = require('../build/pdf.js'); -} - -module.exports = pdfjsLib; - -/***/ }), -/* 8 */ +/* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4215,9 +4207,13 @@ module.exports = pdfjsLib; Object.defineProperty(exports, "__esModule", { value: true }); -exports.PDFCursorTools = exports.CursorTool = void 0; +exports.OptionKind = exports.AppOptions = void 0; + +var _pdfjsLib = __webpack_require__(7); + +var _viewer_compatibility = __webpack_require__(8); -var _grab_to_pan = __webpack_require__(9); +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -4225,39 +4221,344 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -var CursorTool = { - SELECT: 0, - HAND: 1, - ZOOM: 2 +var OptionKind = { + VIEWER: 0x02, + API: 0x04, + WORKER: 0x08, + PREFERENCE: 0x80 }; -exports.CursorTool = CursorTool; +exports.OptionKind = OptionKind; +var defaultOptions = { + cursorToolOnLoad: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + defaultUrl: { + value: 'compressed.tracemonkey-pldi-09.pdf', + kind: OptionKind.VIEWER + }, + defaultZoomValue: { + value: '', + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + disableHistory: { + value: false, + kind: OptionKind.VIEWER + }, + disablePageLabels: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enablePrintAutoRotate: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enableWebGL: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + eventBusDispatchToDOM: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + externalLinkRel: { + value: 'noopener noreferrer nofollow', + kind: OptionKind.VIEWER + }, + externalLinkTarget: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + historyUpdateUrl: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + imageResourcesPath: { + value: './images/', + kind: OptionKind.VIEWER + }, + maxCanvasPixels: { + value: 16777216, + compatibility: _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels, + kind: OptionKind.VIEWER + }, + pdfBugEnabled: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + renderer: { + value: 'canvas', + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + renderInteractiveForms: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + sidebarViewOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + scrollModeOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + spreadModeOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + textLayerMode: { + value: 1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + useOnlyCssZoom: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + viewOnLoad: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + cMapPacked: { + value: true, + kind: OptionKind.API + }, + cMapUrl: { + value: '../web/cmaps/', + kind: OptionKind.API + }, + disableAutoFetch: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableCreateObjectURL: { + value: false, + compatibility: _pdfjsLib.apiCompatibilityParams.disableCreateObjectURL, + kind: OptionKind.API + }, + disableFontFace: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableRange: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableStream: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + isEvalSupported: { + value: true, + kind: OptionKind.API + }, + maxImageSize: { + value: -1, + kind: OptionKind.API + }, + pdfBug: { + value: false, + kind: OptionKind.API + }, + postMessageTransfers: { + value: true, + kind: OptionKind.API + }, + verbosity: { + value: 1, + kind: OptionKind.API + }, + workerPort: { + value: null, + kind: OptionKind.WORKER + }, + workerSrc: { + value: '../build/pdf.worker.js', + kind: OptionKind.WORKER + } +}; +{ + defaultOptions.disablePreferences = { + value: false, + kind: OptionKind.VIEWER + }; + defaultOptions.locale = { + value: typeof navigator !== 'undefined' ? navigator.language : 'en-US', + kind: OptionKind.VIEWER + }; + defaultOptions.printResolution = { + value: 150, + kind: OptionKind.VIEWER + }; +} +var userOptions = Object.create(null); -var PDFCursorTools = +var AppOptions = /*#__PURE__*/ function () { - function PDFCursorTools(_ref) { - var _this = this; + function AppOptions() { + _classCallCheck(this, AppOptions); - var container = _ref.container, - eventBus = _ref.eventBus, - _ref$cursorToolOnLoad = _ref.cursorToolOnLoad, - cursorToolOnLoad = _ref$cursorToolOnLoad === void 0 ? CursorTool.SELECT : _ref$cursorToolOnLoad; + throw new Error('Cannot initialize AppOptions.'); + } - _classCallCheck(this, PDFCursorTools); + _createClass(AppOptions, null, [{ + key: "get", + value: function get(name) { + var userOption = userOptions[name]; - this.container = container; - this.eventBus = eventBus; - this.active = CursorTool.SELECT; - this.activeBeforePresentationMode = null; - this.handTool = new _grab_to_pan.GrabToPan({ - element: this.container - }); + if (userOption !== undefined) { + return userOption; + } - this._addEventListeners(); + var defaultOption = defaultOptions[name]; - Promise.resolve().then(function () { - _this.switchTool(cursorToolOnLoad); - }); + if (defaultOption !== undefined) { + return defaultOption.compatibility || defaultOption.value; + } + + return undefined; + } + }, { + key: "getAll", + value: function getAll() { + var kind = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var options = Object.create(null); + + for (var name in defaultOptions) { + var defaultOption = defaultOptions[name]; + + if (kind) { + if ((kind & defaultOption.kind) === 0) { + continue; + } + + if (kind === OptionKind.PREFERENCE) { + var value = defaultOption.value, + valueType = _typeof(value); + + if (valueType === 'boolean' || valueType === 'string' || valueType === 'number' && Number.isInteger(value)) { + options[name] = value; + continue; + } + + throw new Error("Invalid type for preference: ".concat(name)); + } + } + + var userOption = userOptions[name]; + options[name] = userOption !== undefined ? userOption : defaultOption.compatibility || defaultOption.value; + } + + return options; + } + }, { + key: "set", + value: function set(name, value) { + userOptions[name] = value; + } + }, { + key: "remove", + value: function remove(name) { + delete userOptions[name]; + } + }]); + + return AppOptions; +}(); + +exports.AppOptions = AppOptions; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var pdfjsLib; + +if (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) { + pdfjsLib = window['pdfjs-dist/build/pdf']; +} else { + pdfjsLib = require('../build/pdf.js'); +} + +module.exports = pdfjsLib; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var compatibilityParams = Object.create(null); +{ + var userAgent = typeof navigator !== 'undefined' && navigator.userAgent || ''; + var isAndroid = /Android/.test(userAgent); + var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); + + (function checkCanvasSizeLimitation() { + if (isIOS || isAndroid) { + compatibilityParams.maxCanvasPixels = 5242880; + } + })(); +} +exports.viewerCompatibilityParams = Object.freeze(compatibilityParams); + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PDFCursorTools = exports.CursorTool = void 0; + +var _grab_to_pan = __webpack_require__(10); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var CursorTool = { + SELECT: 0, + HAND: 1, + ZOOM: 2 +}; +exports.CursorTool = CursorTool; + +var PDFCursorTools = +/*#__PURE__*/ +function () { + function PDFCursorTools(_ref) { + var _this = this; + + var container = _ref.container, + eventBus = _ref.eventBus, + _ref$cursorToolOnLoad = _ref.cursorToolOnLoad, + cursorToolOnLoad = _ref$cursorToolOnLoad === void 0 ? CursorTool.SELECT : _ref$cursorToolOnLoad; + + _classCallCheck(this, PDFCursorTools); + + this.container = container; + this.eventBus = eventBus; + this.active = CursorTool.SELECT; + this.activeBeforePresentationMode = null; + this.handTool = new _grab_to_pan.GrabToPan({ + element: this.container + }); + + this._addEventListeners(); + + Promise.resolve().then(function () { + _this.switchTool(cursorToolOnLoad); + }); } _createClass(PDFCursorTools, [{ @@ -4357,7 +4658,7 @@ function () { exports.PDFCursorTools = PDFCursorTools; /***/ }), -/* 9 */ +/* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4517,10 +4818,12 @@ function isLeftMouseReleased(event) { if (isChrome15OrOpera15plus || isSafari6plus) { return event.which === 0; } + + return false; } /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4609,7 +4912,7 @@ function () { var numVisible = visibleViews.length; if (numVisible === 0) { - return false; + return null; } for (var i = 0; i < numVisible; ++i) { @@ -4661,12 +4964,9 @@ function () { case RenderingStates.INITIAL: this.highestPriorityPage = view.renderingId; - - var continueRendering = function continueRendering() { + view.draw()["finally"](function () { _this.renderHighestPriority(); - }; - - view.draw().then(continueRendering, continueRendering); + }); break; } @@ -4680,7 +4980,7 @@ function () { exports.PDFRenderingQueue = PDFRenderingQueue; /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4691,9 +4991,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFSidebar = exports.SidebarView = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_rendering_queue = __webpack_require__(10); +var _pdf_rendering_queue = __webpack_require__(11); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -4715,8 +5015,15 @@ exports.SidebarView = SidebarView; var PDFSidebar = /*#__PURE__*/ function () { - function PDFSidebar(options, eventBus) { - var l10n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ui_utils.NullL10n; + function PDFSidebar(_ref) { + var elements = _ref.elements, + pdfViewer = _ref.pdfViewer, + pdfThumbnailViewer = _ref.pdfThumbnailViewer, + eventBus = _ref.eventBus, + _ref$l10n = _ref.l10n, + l10n = _ref$l10n === void 0 ? _ui_utils.NullL10n : _ref$l10n, + _ref$disableNotificat = _ref.disableNotification, + disableNotification = _ref$disableNotificat === void 0 ? false : _ref$disableNotificat; _classCallCheck(this, PDFSidebar); @@ -4724,20 +5031,20 @@ function () { this.active = SidebarView.THUMBS; this.isInitialViewSet = false; this.onToggled = null; - this.pdfViewer = options.pdfViewer; - this.pdfThumbnailViewer = options.pdfThumbnailViewer; - this.outerContainer = options.outerContainer; - this.viewerContainer = options.viewerContainer; - this.toggleButton = options.toggleButton; - this.thumbnailButton = options.thumbnailButton; - this.outlineButton = options.outlineButton; - this.attachmentsButton = options.attachmentsButton; - this.thumbnailView = options.thumbnailView; - this.outlineView = options.outlineView; - this.attachmentsView = options.attachmentsView; - this.disableNotification = options.disableNotification || false; + this.pdfViewer = pdfViewer; + this.pdfThumbnailViewer = pdfThumbnailViewer; + this.outerContainer = elements.outerContainer; + this.viewerContainer = elements.viewerContainer; + this.toggleButton = elements.toggleButton; + this.thumbnailButton = elements.thumbnailButton; + this.outlineButton = elements.outlineButton; + this.attachmentsButton = elements.attachmentsButton; + this.thumbnailView = elements.thumbnailView; + this.outlineView = elements.outlineView; + this.attachmentsView = elements.attachmentsView; this.eventBus = eventBus; this.l10n = l10n; + this._disableNotification = disableNotification; this._addEventListeners(); } @@ -4937,7 +5244,7 @@ function () { value: function _showUINotification(view) { var _this = this; - if (this.disableNotification) { + if (this._disableNotification) { return; } @@ -4966,7 +5273,7 @@ function () { value: function _hideUINotification(view) { var _this2 = this; - if (this.disableNotification) { + if (this._disableNotification) { return; } @@ -5091,255 +5398,6 @@ function () { exports.PDFSidebar = PDFSidebar; -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.OptionKind = exports.AppOptions = void 0; - -var _pdfjsLib = __webpack_require__(7); - -var _viewer_compatibility = __webpack_require__(13); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var OptionKind = { - VIEWER: 'viewer', - API: 'api', - WORKER: 'worker' -}; -exports.OptionKind = OptionKind; -var defaultOptions = { - cursorToolOnLoad: { - value: 0, - kind: OptionKind.VIEWER - }, - defaultUrl: { - kind: OptionKind.VIEWER - }, - defaultZoomValue: { - value: '', - kind: OptionKind.VIEWER - }, - disableHistory: { - value: false, - kind: OptionKind.VIEWER - }, - disablePageLabels: { - value: false, - kind: OptionKind.VIEWER - }, - enablePrintAutoRotate: { - value: false, - kind: OptionKind.VIEWER - }, - enableWebGL: { - value: false, - kind: OptionKind.VIEWER - }, - eventBusDispatchToDOM: { - value: false, - kind: OptionKind.VIEWER - }, - externalLinkRel: { - value: 'noopener noreferrer nofollow', - kind: OptionKind.VIEWER - }, - externalLinkTarget: { - value: 0, - kind: OptionKind.VIEWER - }, - historyUpdateUrl: { - value: false, - kind: OptionKind.VIEWER - }, - imageResourcesPath: { - value: '../images/', - kind: OptionKind.VIEWER - }, - maxCanvasPixels: { - value: 16777216, - compatibility: _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels, - kind: OptionKind.VIEWER - }, - pdfBugEnabled: { - value: false, - kind: OptionKind.VIEWER - }, - renderer: { - value: 'canvas', - kind: OptionKind.VIEWER - }, - renderInteractiveForms: { - value: false, - kind: OptionKind.VIEWER - }, - sidebarViewOnLoad: { - value: -1, - kind: OptionKind.VIEWER - }, - scrollModeOnLoad: { - value: -1, - kind: OptionKind.VIEWER - }, - spreadModeOnLoad: { - value: -1, - kind: OptionKind.VIEWER - }, - textLayerMode: { - value: 1, - kind: OptionKind.VIEWER - }, - useOnlyCssZoom: { - value: false, - kind: OptionKind.VIEWER - }, - viewOnLoad: { - value: 0, - kind: OptionKind.VIEWER - }, - cMapPacked: { - value: true, - kind: OptionKind.API - }, - cMapUrl: { - value: '../web/cmaps/', - kind: OptionKind.API - }, - disableAutoFetch: { - value: false, - kind: OptionKind.API - }, - disableCreateObjectURL: { - value: false, - compatibility: _pdfjsLib.apiCompatibilityParams.disableCreateObjectURL, - kind: OptionKind.API - }, - disableFontFace: { - value: false, - kind: OptionKind.API - }, - disableRange: { - value: false, - kind: OptionKind.API - }, - disableStream: { - value: false, - kind: OptionKind.API - }, - isEvalSupported: { - value: true, - kind: OptionKind.API - }, - maxImageSize: { - value: -1, - kind: OptionKind.API - }, - pdfBug: { - value: false, - kind: OptionKind.API - }, - postMessageTransfers: { - value: true, - kind: OptionKind.API - }, - verbosity: { - value: 1, - kind: OptionKind.API - }, - workerPort: { - value: null, - kind: OptionKind.WORKER - }, - workerSrc: { - value: '../build/pdf.worker.js', - kind: OptionKind.WORKER - } -}; -{ - defaultOptions.disablePreferences = { - value: false, - kind: OptionKind.VIEWER - }; - defaultOptions.locale = { - value: typeof navigator !== 'undefined' ? navigator.language : 'en-US', - kind: OptionKind.VIEWER - }; -} -var userOptions = Object.create(null); - -var AppOptions = -/*#__PURE__*/ -function () { - function AppOptions() { - _classCallCheck(this, AppOptions); - - throw new Error('Cannot initialize AppOptions.'); - } - - _createClass(AppOptions, null, [{ - key: "get", - value: function get(name) { - var userOption = userOptions[name]; - - if (userOption !== undefined) { - return userOption; - } - - var defaultOption = defaultOptions[name]; - - if (defaultOption !== undefined) { - return defaultOption.compatibility || defaultOption.value; - } - - return undefined; - } - }, { - key: "getAll", - value: function getAll() { - var kind = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var options = Object.create(null); - - for (var name in defaultOptions) { - var defaultOption = defaultOptions[name]; - - if (kind && kind !== defaultOption.kind) { - continue; - } - - var userOption = userOptions[name]; - options[name] = userOption !== undefined ? userOption : defaultOption.compatibility || defaultOption.value; - } - - return options; - } - }, { - key: "set", - value: function set(name, value) { - userOptions[name] = value; - } - }, { - key: "remove", - value: function remove(name) { - delete userOptions[name]; - } - }]); - - return AppOptions; -}(); - -exports.AppOptions = AppOptions; - /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { @@ -5347,27 +5405,6 @@ exports.AppOptions = AppOptions; "use strict"; -var compatibilityParams = Object.create(null); -{ - var userAgent = typeof navigator !== 'undefined' && navigator.userAgent || ''; - var isAndroid = /Android/.test(userAgent); - var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); - - (function checkCanvasSizeLimitation() { - if (isIOS || isAndroid) { - compatibilityParams.maxCanvasPixels = 5242880; - } - })(); -} -exports.viewerCompatibilityParams = Object.freeze(compatibilityParams); - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5375,7 +5412,7 @@ exports.OverlayManager = void 0; var _regenerator = _interopRequireDefault(__webpack_require__(2)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } @@ -5403,12 +5440,12 @@ function () { value: function () { var _register = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(name, element) { + _regenerator["default"].mark(function _callee(name, element) { var callerCloseMethod, canForceClose, container, _args = arguments; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -5457,8 +5494,8 @@ function () { value: function () { var _unregister = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2(name) { - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2(name) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -5499,8 +5536,8 @@ function () { value: function () { var _open = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3(name) { - return _regenerator.default.wrap(function _callee3$(_context3) { + _regenerator["default"].mark(function _callee3(name) { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -5566,8 +5603,8 @@ function () { value: function () { var _close = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee4(name) { - return _regenerator.default.wrap(function _callee4$(_context4) { + _regenerator["default"].mark(function _callee4(name) { + return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: @@ -5649,7 +5686,7 @@ function () { exports.OverlayManager = OverlayManager; /***/ }), -/* 15 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5660,7 +5697,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.PasswordPrompt = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); var _pdfjsLib = __webpack_require__(7); @@ -5737,7 +5774,7 @@ function () { if (password && password.length > 0) { this.close(); - return this.updateCallback(password); + this.updateCallback(password); } } }, { @@ -5754,7 +5791,7 @@ function () { exports.PasswordPrompt = PasswordPrompt; /***/ }), -/* 16 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5928,7 +5965,7 @@ function () { exports.PDFAttachmentViewer = PDFAttachmentViewer; /***/ }), -/* 17 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5939,9 +5976,17 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFDocumentProperties = void 0; -var _ui_utils = __webpack_require__(6); +var _regenerator = _interopRequireDefault(__webpack_require__(2)); + +var _pdfjsLib = __webpack_require__(7); + +var _ui_utils = __webpack_require__(5); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _pdfjsLib = __webpack_require__(7); +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -6165,136 +6210,197 @@ function () { } }, { key: "_parseFileSize", - value: function _parseFileSize() { - var fileSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var kb = fileSize / 1024; + value: function () { + var _parseFileSize2 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee() { + var fileSize, + kb, + _args = arguments; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + fileSize = _args.length > 0 && _args[0] !== undefined ? _args[0] : 0; + kb = fileSize / 1024; - if (!kb) { - return Promise.resolve(undefined); - } else if (kb < 1024) { - return this.l10n.get('document_properties_kb', { - size_kb: (+kb.toPrecision(3)).toLocaleString(), - size_b: fileSize.toLocaleString() - }, '{{size_kb}} KB ({{size_b}} bytes)'); + if (kb) { + _context.next = 6; + break; + } + + return _context.abrupt("return", undefined); + + case 6: + if (!(kb < 1024)) { + _context.next = 8; + break; + } + + return _context.abrupt("return", this.l10n.get('document_properties_kb', { + size_kb: (+kb.toPrecision(3)).toLocaleString(), + size_b: fileSize.toLocaleString() + }, '{{size_kb}} KB ({{size_b}} bytes)')); + + case 8: + return _context.abrupt("return", this.l10n.get('document_properties_mb', { + size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(), + size_b: fileSize.toLocaleString() + }, '{{size_mb}} MB ({{size_b}} bytes)')); + + case 9: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function _parseFileSize() { + return _parseFileSize2.apply(this, arguments); } - return this.l10n.get('document_properties_mb', { - size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(), - size_b: fileSize.toLocaleString() - }, '{{size_mb}} MB ({{size_b}} bytes)'); - } + return _parseFileSize; + }() }, { key: "_parsePageSize", - value: function _parsePageSize(pageSizeInches, pagesRotation) { - var _this3 = this; + value: function () { + var _parsePageSize2 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee2(pageSizeInches, pagesRotation) { + var _this3 = this; - if (!pageSizeInches) { - return Promise.resolve(undefined); - } + var isPortrait, sizeInches, sizeMillimeters, pageName, name, exactMillimeters, intMillimeters; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (pageSizeInches) { + _context2.next = 2; + break; + } - if (pagesRotation % 180 !== 0) { - pageSizeInches = { - width: pageSizeInches.height, - height: pageSizeInches.width - }; - } + return _context2.abrupt("return", undefined); - var isPortrait = (0, _ui_utils.isPortraitOrientation)(pageSizeInches); - var sizeInches = { - width: Math.round(pageSizeInches.width * 100) / 100, - height: Math.round(pageSizeInches.height * 100) / 100 - }; - var sizeMillimeters = { - width: Math.round(pageSizeInches.width * 25.4 * 10) / 10, - height: Math.round(pageSizeInches.height * 25.4 * 10) / 10 - }; - var pageName = null; - var name = getPageName(sizeInches, isPortrait, US_PAGE_NAMES) || getPageName(sizeMillimeters, isPortrait, METRIC_PAGE_NAMES); + case 2: + if (pagesRotation % 180 !== 0) { + pageSizeInches = { + width: pageSizeInches.height, + height: pageSizeInches.width + }; + } - if (!name && !(Number.isInteger(sizeMillimeters.width) && Number.isInteger(sizeMillimeters.height))) { - var exactMillimeters = { - width: pageSizeInches.width * 25.4, - height: pageSizeInches.height * 25.4 - }; - var intMillimeters = { - width: Math.round(sizeMillimeters.width), - height: Math.round(sizeMillimeters.height) - }; + isPortrait = (0, _ui_utils.isPortraitOrientation)(pageSizeInches); + sizeInches = { + width: Math.round(pageSizeInches.width * 100) / 100, + height: Math.round(pageSizeInches.height * 100) / 100 + }; + sizeMillimeters = { + width: Math.round(pageSizeInches.width * 25.4 * 10) / 10, + height: Math.round(pageSizeInches.height * 25.4 * 10) / 10 + }; + pageName = null; + name = getPageName(sizeInches, isPortrait, US_PAGE_NAMES) || getPageName(sizeMillimeters, isPortrait, METRIC_PAGE_NAMES); + + if (!name && !(Number.isInteger(sizeMillimeters.width) && Number.isInteger(sizeMillimeters.height))) { + exactMillimeters = { + width: pageSizeInches.width * 25.4, + height: pageSizeInches.height * 25.4 + }; + intMillimeters = { + width: Math.round(sizeMillimeters.width), + height: Math.round(sizeMillimeters.height) + }; + + if (Math.abs(exactMillimeters.width - intMillimeters.width) < 0.1 && Math.abs(exactMillimeters.height - intMillimeters.height) < 0.1) { + name = getPageName(intMillimeters, isPortrait, METRIC_PAGE_NAMES); + + if (name) { + sizeInches = { + width: Math.round(intMillimeters.width / 25.4 * 100) / 100, + height: Math.round(intMillimeters.height / 25.4 * 100) / 100 + }; + sizeMillimeters = intMillimeters; + } + } + } + + if (name) { + pageName = this.l10n.get('document_properties_page_size_name_' + name.toLowerCase(), null, name); + } - if (Math.abs(exactMillimeters.width - intMillimeters.width) < 0.1 && Math.abs(exactMillimeters.height - intMillimeters.height) < 0.1) { - name = getPageName(intMillimeters, isPortrait, METRIC_PAGE_NAMES); + return _context2.abrupt("return", Promise.all([this._isNonMetricLocale ? sizeInches : sizeMillimeters, this.l10n.get('document_properties_page_size_unit_' + (this._isNonMetricLocale ? 'inches' : 'millimeters'), null, this._isNonMetricLocale ? 'in' : 'mm'), pageName, this.l10n.get('document_properties_page_size_orientation_' + (isPortrait ? 'portrait' : 'landscape'), null, isPortrait ? 'portrait' : 'landscape')]).then(function (_ref6) { + var _ref7 = _slicedToArray(_ref6, 4), + _ref7$ = _ref7[0], + width = _ref7$.width, + height = _ref7$.height, + unit = _ref7[1], + name = _ref7[2], + orientation = _ref7[3]; + + return _this3.l10n.get('document_properties_page_size_dimension_' + (name ? 'name_' : '') + 'string', { + width: width.toLocaleString(), + height: height.toLocaleString(), + unit: unit, + name: name, + orientation: orientation + }, '{{width}} × {{height}} {{unit}} (' + (name ? '{{name}}, ' : '') + '{{orientation}})'); + })); - if (name) { - sizeInches = { - width: Math.round(intMillimeters.width / 25.4 * 100) / 100, - height: Math.round(intMillimeters.height / 25.4 * 100) / 100 - }; - sizeMillimeters = intMillimeters; + case 11: + case "end": + return _context2.stop(); + } } - } - } + }, _callee2, this); + })); - if (name) { - pageName = this.l10n.get('document_properties_page_size_name_' + name.toLowerCase(), null, name); + function _parsePageSize(_x, _x2) { + return _parsePageSize2.apply(this, arguments); } - return Promise.all([this._isNonMetricLocale ? sizeInches : sizeMillimeters, this.l10n.get('document_properties_page_size_unit_' + (this._isNonMetricLocale ? 'inches' : 'millimeters'), null, this._isNonMetricLocale ? 'in' : 'mm'), pageName, this.l10n.get('document_properties_page_size_orientation_' + (isPortrait ? 'portrait' : 'landscape'), null, isPortrait ? 'portrait' : 'landscape')]).then(function (_ref6) { - var _ref7 = _slicedToArray(_ref6, 4), - _ref7$ = _ref7[0], - width = _ref7$.width, - height = _ref7$.height, - unit = _ref7[1], - name = _ref7[2], - orientation = _ref7[3]; - - return _this3.l10n.get('document_properties_page_size_dimension_' + (name ? 'name_' : '') + 'string', { - width: width.toLocaleString(), - height: height.toLocaleString(), - unit: unit, - name: name, - orientation: orientation - }, '{{width}} × {{height}} {{unit}} (' + (name ? '{{name}}, ' : '') + '{{orientation}})'); - }); - } + return _parsePageSize; + }() }, { key: "_parseDate", - value: function _parseDate(inputDate) { - if (!inputDate) { - return; - } + value: function () { + var _parseDate2 = _asyncToGenerator( + /*#__PURE__*/ + _regenerator["default"].mark(function _callee3(inputDate) { + var dateObject; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + dateObject = _pdfjsLib.PDFDateString.toDateObject(inputDate); + + if (dateObject) { + _context3.next = 3; + break; + } - var dateToParse = inputDate; + return _context3.abrupt("return", undefined); - if (dateToParse.substring(0, 2) === 'D:') { - dateToParse = dateToParse.substring(2); - } + case 3: + return _context3.abrupt("return", this.l10n.get('document_properties_date_string', { + date: dateObject.toLocaleDateString(), + time: dateObject.toLocaleTimeString() + }, '{{date}}, {{time}}')); - var year = parseInt(dateToParse.substring(0, 4), 10); - var month = parseInt(dateToParse.substring(4, 6), 10) - 1; - var day = parseInt(dateToParse.substring(6, 8), 10); - var hours = parseInt(dateToParse.substring(8, 10), 10); - var minutes = parseInt(dateToParse.substring(10, 12), 10); - var seconds = parseInt(dateToParse.substring(12, 14), 10); - var utRel = dateToParse.substring(14, 15); - var offsetHours = parseInt(dateToParse.substring(15, 17), 10); - var offsetMinutes = parseInt(dateToParse.substring(18, 20), 10); + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); - if (utRel === '-') { - hours += offsetHours; - minutes += offsetMinutes; - } else if (utRel === '+') { - hours -= offsetHours; - minutes -= offsetMinutes; + function _parseDate(_x3) { + return _parseDate2.apply(this, arguments); } - var date = new Date(Date.UTC(year, month, day, hours, minutes, seconds)); - var dateString = date.toLocaleDateString(); - var timeString = date.toLocaleTimeString(); - return this.l10n.get('document_properties_date_string', { - date: dateString, - time: timeString - }, '{{date}}, {{time}}'); - } + return _parseDate; + }() }, { key: "_parseLinearization", value: function _parseLinearization(isLinearized) { @@ -6308,7 +6414,7 @@ function () { exports.PDFDocumentProperties = PDFDocumentProperties; /***/ }), -/* 18 */ +/* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6319,9 +6425,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFFindBar = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_find_controller = __webpack_require__(19); +var _pdf_find_controller = __webpack_require__(18); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -6553,7 +6659,7 @@ function () { exports.PDFFindBar = PDFFindBar; /***/ }), -/* 19 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6564,11 +6670,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFFindController = exports.FindState = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); var _pdfjsLib = __webpack_require__(7); -var _pdf_find_utils = __webpack_require__(20); +var _pdf_find_utils = __webpack_require__(19); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -6774,8 +6880,8 @@ function () { var pageNumber = this._selected.pageIdx + 1; var linkService = this._linkService; - if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && linkService.page !== pageNumber && linkService.isPageVisible && !linkService.isPageVisible(pageNumber)) { - break; + if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && pageNumber !== linkService.page && !linkService.isPageVisible(pageNumber)) { + return true; } return false; @@ -7291,7 +7397,7 @@ function () { exports.PDFFindController = PDFFindController; /***/ }), -/* 20 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7387,7 +7493,7 @@ function getCharacterType(charCode) { } /***/ }), -/* 21 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7400,7 +7506,7 @@ exports.isDestHashesEqual = isDestHashesEqual; exports.isDestArraysEqual = isDestArraysEqual; exports.PDFHistory = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -7984,7 +8090,7 @@ function isDestArraysEqual(firstDest, secondDest) { } /***/ }), -/* 22 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7995,7 +8101,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.SimpleLinkService = exports.PDFLinkService = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -8068,7 +8174,7 @@ function () { namedDest: namedDest, explicitDest: explicitDest }); - }).catch(function () { + })["catch"](function () { console.error("PDFLinkService.navigateTo: \"".concat(destRef, "\" is not ") + "a valid page reference, for dest=\"".concat(dest, "\".")); }); @@ -8467,7 +8573,7 @@ function () { exports.SimpleLinkService = SimpleLinkService; /***/ }), -/* 23 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8569,12 +8675,18 @@ function () { } }, { key: "_addToggleButton", - value: function _addToggleButton(div) { + value: function _addToggleButton(div, _ref4) { var _this = this; + var count = _ref4.count, + items = _ref4.items; var toggler = document.createElement('div'); toggler.className = 'outlineItemToggler'; + if (count < 0 && Math.abs(count) === items.length) { + toggler.classList.add('outlineItemsHidden'); + } + toggler.onclick = function (evt) { evt.stopPropagation(); toggler.classList.toggle('outlineItemsHidden'); @@ -8607,8 +8719,8 @@ function () { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -8628,8 +8740,8 @@ function () { } }, { key: "render", - value: function render(_ref4) { - var outline = _ref4.outline; + value: function render(_ref5) { + var outline = _ref5.outline; var outlineCount = 0; if (this.outline) { @@ -8653,41 +8765,60 @@ function () { while (queue.length > 0) { var levelData = queue.shift(); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; - for (var i = 0, len = levelData.items.length; i < len; i++) { - var item = levelData.items[i]; - var div = document.createElement('div'); - div.className = 'outlineItem'; - var element = document.createElement('a'); + try { + for (var _iterator2 = levelData.items[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var item = _step2.value; + var div = document.createElement('div'); + div.className = 'outlineItem'; + var element = document.createElement('a'); - this._bindLink(element, item); + this._bindLink(element, item); - this._setStyles(element, item); + this._setStyles(element, item); - element.textContent = (0, _pdfjsLib.removeNullCharacters)(item.title) || DEFAULT_TITLE; - div.appendChild(element); + element.textContent = (0, _pdfjsLib.removeNullCharacters)(item.title) || DEFAULT_TITLE; + div.appendChild(element); - if (item.items.length > 0) { - hasAnyNesting = true; + if (item.items.length > 0) { + hasAnyNesting = true; - this._addToggleButton(div); + this._addToggleButton(div, item); - var itemsDiv = document.createElement('div'); - itemsDiv.className = 'outlineItems'; - div.appendChild(itemsDiv); - queue.push({ - parent: itemsDiv, - items: item.items - }); - } + var itemsDiv = document.createElement('div'); + itemsDiv.className = 'outlineItems'; + div.appendChild(itemsDiv); + queue.push({ + parent: itemsDiv, + items: item.items + }); + } - levelData.parent.appendChild(div); - outlineCount++; + levelData.parent.appendChild(div); + outlineCount++; + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) { + _iterator2["return"](); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } } } if (hasAnyNesting) { this.container.classList.add('outlineWithDeepNesting'); + this.lastToggleIsShow = fragment.querySelectorAll('.outlineItemsHidden').length === 0; } this.container.appendChild(fragment); @@ -8702,7 +8833,7 @@ function () { exports.PDFOutlineViewer = PDFOutlineViewer; /***/ }), -/* 24 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8713,7 +8844,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFPresentationMode = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -9160,7 +9291,7 @@ function () { exports.PDFPresentationMode = PDFPresentationMode; /***/ }), -/* 25 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9171,7 +9302,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFSidebarResizer = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -9336,7 +9467,7 @@ function () { exports.PDFSidebarResizer = PDFSidebarResizer; /***/ }), -/* 26 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9347,9 +9478,9 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFThumbnailViewer = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_thumbnail_view = __webpack_require__(27); +var _pdf_thumbnail_view = __webpack_require__(26); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -9501,7 +9632,7 @@ function () { var thumbnailView = _this._thumbnails[_this._currentPageNumber - 1]; thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS); - }).catch(function (reason) { + })["catch"](function (reason) { console.error('Unable to initialize thumbnail viewer', reason); }); } @@ -9555,7 +9686,7 @@ function () { thumbView.setPdfPage(pdfPage); _this2._pagesRequests[pageNumber] = null; return pdfPage; - }).catch(function (reason) { + })["catch"](function (reason) { console.error('Unable to get page for thumb view', reason); _this2._pagesRequests[pageNumber] = null; }); @@ -9613,7 +9744,7 @@ function () { exports.PDFThumbnailViewer = PDFThumbnailViewer; /***/ }), -/* 27 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9626,9 +9757,9 @@ exports.PDFThumbnailView = void 0; var _pdfjsLib = __webpack_require__(7); -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_rendering_queue = __webpack_require__(10); +var _pdf_rendering_queue = __webpack_require__(11); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -9757,6 +9888,7 @@ function () { key: "reset", value: function reset() { this.cancelRendering(); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; this.pageWidth = this.viewport.width; this.pageHeight = this.viewport.height; this.pageRatio = this.pageWidth / this.pageHeight; @@ -9807,7 +9939,6 @@ function () { this.renderTask = null; } - this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; this.resume = null; } }, { @@ -10044,7 +10175,7 @@ function () { exports.PDFThumbnailView = PDFThumbnailView; /***/ }), -/* 28 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10055,7 +10186,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFViewer = void 0; -var _base_viewer = __webpack_require__(29); +var _base_viewer = __webpack_require__(28); var _pdfjsLib = __webpack_require__(7); @@ -10162,8 +10293,8 @@ function (_BaseViewer) { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); } } finally { if (_didIteratorError) { @@ -10191,7 +10322,7 @@ function (_BaseViewer) { exports.PDFViewer = PDFViewer; /***/ }), -/* 29 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -10202,19 +10333,19 @@ Object.defineProperty(exports, "__esModule", { }); exports.BaseViewer = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_rendering_queue = __webpack_require__(10); +var _pdf_rendering_queue = __webpack_require__(11); -var _annotation_layer_builder = __webpack_require__(30); +var _annotation_layer_builder = __webpack_require__(29); var _pdfjsLib = __webpack_require__(7); -var _pdf_page_view = __webpack_require__(31); +var _pdf_page_view = __webpack_require__(30); -var _pdf_link_service = __webpack_require__(22); +var _pdf_link_service = __webpack_require__(21); -var _text_layer_builder = __webpack_require__(32); +var _text_layer_builder = __webpack_require__(31); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -10453,6 +10584,10 @@ function () { } onePageRenderedCapability.promise.then(function () { + if (_this2.findController) { + _this2.findController.setDocument(pdfDocument); + } + if (pdfDocument.loadingParams['disableAutoFetch']) { pagesCapability.resolve(); return; @@ -10491,14 +10626,10 @@ function () { source: _this2 }); - if (_this2.findController) { - _this2.findController.setDocument(pdfDocument); - } - if (_this2.defaultRenderingQueue) { _this2.update(); } - }).catch(function (reason) { + })["catch"](function (reason) { console.error('Unable to initialize viewer', reason); }); } @@ -10957,7 +11088,7 @@ function () { _this3._pagesRequests[pageNumber] = null; return pdfPage; - }).catch(function (reason) { + })["catch"](function (reason) { console.error('Unable to get page for page view', reason); _this3._pagesRequests[pageNumber] = null; }); @@ -11325,7 +11456,7 @@ function () { exports.BaseViewer = BaseViewer; /***/ }), -/* 30 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11338,9 +11469,9 @@ exports.DefaultAnnotationLayerFactory = exports.AnnotationLayerBuilder = void 0; var _pdfjsLib = __webpack_require__(7); -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_link_service = __webpack_require__(22); +var _pdf_link_service = __webpack_require__(21); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -11473,7 +11604,7 @@ function () { exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory; /***/ }), -/* 31 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -11486,15 +11617,15 @@ exports.PDFPageView = void 0; var _regenerator = _interopRequireDefault(__webpack_require__(2)); -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); var _pdfjsLib = __webpack_require__(7); -var _pdf_rendering_queue = __webpack_require__(10); +var _pdf_rendering_queue = __webpack_require__(11); -var _viewer_compatibility = __webpack_require__(13); +var _viewer_compatibility = __webpack_require__(8); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } @@ -11588,7 +11719,7 @@ function () { } var zoomLayerCanvas = this.zoomLayer.firstChild; - this.paintedViewportMap.delete(zoomLayerCanvas); + this.paintedViewportMap["delete"](zoomLayerCanvas); zoomLayerCanvas.width = 0; zoomLayerCanvas.height = 0; @@ -11604,6 +11735,7 @@ function () { var keepZoomLayer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var keepAnnotations = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; this.cancelRendering(keepAnnotations); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; var div = this.div; div.style.width = Math.floor(this.viewport.width) + 'px'; div.style.height = Math.floor(this.viewport.height) + 'px'; @@ -11632,7 +11764,7 @@ function () { if (!currentZoomLayerNode) { if (this.canvas) { - this.paintedViewportMap.delete(this.canvas); + this.paintedViewportMap["delete"](this.canvas); this.canvas.width = 0; this.canvas.height = 0; delete this.canvas; @@ -11642,7 +11774,7 @@ function () { } if (this.svg) { - this.paintedViewportMap.delete(this.svg); + this.paintedViewportMap["delete"](this.svg); delete this.svg; } @@ -11712,14 +11844,12 @@ function () { key: "cancelRendering", value: function cancelRendering() { var keepAnnotations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var renderingState = this.renderingState; if (this.paintTask) { this.paintTask.cancel(); this.paintTask = null; } - this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; this.resume = null; if (this.textLayer) { @@ -11731,14 +11861,6 @@ function () { this.annotationLayer.cancel(); this.annotationLayer = null; } - - if (renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { - this.eventBus.dispatch('pagecancelled', { - source: this, - pageNumber: this.id, - renderingState: renderingState - }); - } } }, { key: "cssTransform", @@ -11884,8 +12006,8 @@ function () { function () { var _ref = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(error) { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee(error) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -11936,7 +12058,7 @@ function () { return _context.stop(); } } - }, _callee, this); + }, _callee); })); return function finishPaintTask(_x) { @@ -12142,7 +12264,7 @@ function () { exports.PDFPageView = PDFPageView; /***/ }), -/* 32 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12153,7 +12275,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.DefaultTextLayerFactory = exports.TextLayerBuilder = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); var _pdfjsLib = __webpack_require__(7); @@ -12194,9 +12316,7 @@ function () { this.findController = findController; this.textLayerRenderTask = null; this.enhanceTextSelection = enhanceTextSelection; - this._boundEvents = Object.create(null); - - this._bindEvents(); + this._onUpdateTextLayerMatches = null; this._bindMouse(); } @@ -12249,6 +12369,16 @@ function () { _this._updateMatches(); }, function (reason) {}); + + if (!this._onUpdateTextLayerMatches) { + this._onUpdateTextLayerMatches = function (evt) { + if (evt.pageIndex === _this.pageIdx || evt.pageIndex === -1) { + _this._updateMatches(); + } + }; + + this.eventBus.on('updatetextlayermatches', this._onUpdateTextLayerMatches); + } } }, { key: "cancel", @@ -12257,6 +12387,11 @@ function () { this.textLayerRenderTask.cancel(); this.textLayerRenderTask = null; } + + if (this._onUpdateTextLayerMatches) { + this.eventBus.off('updatetextlayermatches', this._onUpdateTextLayerMatches); + this._onUpdateTextLayerMatches = null; + } } }, { key: "setTextContentStream", @@ -12457,51 +12592,16 @@ function () { this._renderMatches(this.matches); } - }, { - key: "_bindEvents", - value: function _bindEvents() { - var _this2 = this; - - var eventBus = this.eventBus, - _boundEvents = this._boundEvents; - - _boundEvents.pageCancelled = function (evt) { - if (evt.pageNumber !== _this2.pageNumber) { - return; - } - - if (_this2.textLayerRenderTask) { - console.error('TextLayerBuilder._bindEvents: `this.cancel()` should ' + 'have been called when the page was reset, or rendering cancelled.'); - return; - } - - for (var name in _boundEvents) { - eventBus.off(name.toLowerCase(), _boundEvents[name]); - delete _boundEvents[name]; - } - }; - - _boundEvents.updateTextLayerMatches = function (evt) { - if (evt.pageIndex !== _this2.pageIdx && evt.pageIndex !== -1) { - return; - } - - _this2._updateMatches(); - }; - - eventBus.on('pagecancelled', _boundEvents.pageCancelled); - eventBus.on('updatetextlayermatches', _boundEvents.updateTextLayerMatches); - } }, { key: "_bindMouse", value: function _bindMouse() { - var _this3 = this; + var _this2 = this; var div = this.textLayerDiv; var expandDivsTimer = null; div.addEventListener('mousedown', function (evt) { - if (_this3.enhanceTextSelection && _this3.textLayerRenderTask) { - _this3.textLayerRenderTask.expandTextDivs(true); + if (_this2.enhanceTextSelection && _this2.textLayerRenderTask) { + _this2.textLayerRenderTask.expandTextDivs(true); if (expandDivsTimer) { clearTimeout(expandDivsTimer); @@ -12529,10 +12629,10 @@ function () { end.classList.add('active'); }); div.addEventListener('mouseup', function () { - if (_this3.enhanceTextSelection && _this3.textLayerRenderTask) { + if (_this2.enhanceTextSelection && _this2.textLayerRenderTask) { expandDivsTimer = setTimeout(function () { - if (_this3.textLayerRenderTask) { - _this3.textLayerRenderTask.expandTextDivs(false); + if (_this2.textLayerRenderTask) { + _this2.textLayerRenderTask.expandTextDivs(false); } expandDivsTimer = null; @@ -12583,7 +12683,7 @@ function () { exports.DefaultTextLayerFactory = DefaultTextLayerFactory; /***/ }), -/* 33 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12594,11 +12694,11 @@ Object.defineProperty(exports, "__esModule", { }); exports.SecondaryToolbar = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); -var _pdf_cursor_tools = __webpack_require__(8); +var _pdf_cursor_tools = __webpack_require__(9); -var _pdf_single_page_viewer = __webpack_require__(34); +var _pdf_single_page_viewer = __webpack_require__(33); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -12792,23 +12892,25 @@ function () { eventName = _this2$buttons$button.eventName, close = _this2$buttons$button.close, eventDetails = _this2$buttons$button.eventDetails; - element.addEventListener('click', function (evt) { - if (eventName !== null) { - var details = { - source: _this2 - }; - - for (var property in eventDetails) { - details[property] = eventDetails[property]; - } + if (element) { + element.addEventListener('click', function (evt) { + if (eventName !== null) { + var details = { + source: _this2 + }; + + for (var property in eventDetails) { + details[property] = eventDetails[property]; + } - _this2.eventBus.dispatch(eventName, details); - } + _this2.eventBus.dispatch(eventName, details); + } - if (close) { - _this2.close(); - } - }); + if (close) { + _this2.close(); + } + }); + } }; for (var button in this.buttons) { @@ -12933,7 +13035,7 @@ function () { exports.SecondaryToolbar = SecondaryToolbar; /***/ }), -/* 34 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -12944,7 +13046,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFSinglePageViewer = void 0; -var _base_viewer = __webpack_require__(29); +var _base_viewer = __webpack_require__(28); var _pdfjsLib = __webpack_require__(7); @@ -13104,7 +13206,7 @@ function (_BaseViewer) { exports.PDFSinglePageViewer = PDFSinglePageViewer; /***/ }), -/* 35 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13115,7 +13217,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.Toolbar = void 0; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -13238,16 +13340,20 @@ function () { source: self }); }); - items.print.addEventListener('click', function () { - eventBus.dispatch('print', { - source: self - }); - }); - items.download.addEventListener('click', function () { - eventBus.dispatch('download', { - source: self - }); - }); + if (items.print) { + items.print.addEventListener('click', function () { + eventBus.dispatch('print', { + source: self + }); + }); + } + if (items.download) { + items.download.addEventListener('click', function () { + eventBus.dispatch('download', { + source: self + }); + }); + } items.scaleSelect.oncontextmenu = _ui_utils.noContextMenuHandler; eventBus.on('localized', function () { _this._localized(); @@ -13367,7 +13473,7 @@ function () { exports.Toolbar = Toolbar; /***/ }), -/* 36 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13380,7 +13486,7 @@ exports.ViewHistory = void 0; var _regenerator = _interopRequireDefault(__webpack_require__(2)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } @@ -13444,9 +13550,9 @@ function () { value: function () { var _writeToStorage2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { + _regenerator["default"].mark(function _callee() { var databaseStr; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -13472,8 +13578,8 @@ function () { value: function () { var _readFromStorage2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2() { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -13484,7 +13590,7 @@ function () { return _context2.stop(); } } - }, _callee2, this); + }, _callee2); })); function _readFromStorage() { @@ -13498,8 +13604,8 @@ function () { value: function () { var _set = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3(name, val) { - return _regenerator.default.wrap(function _callee3$(_context3) { + _regenerator["default"].mark(function _callee3(name, val) { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -13529,9 +13635,9 @@ function () { value: function () { var _setMultiple = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee4(properties) { + _regenerator["default"].mark(function _callee4(properties) { var name; - return _regenerator.default.wrap(function _callee4$(_context4) { + return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: @@ -13564,9 +13670,9 @@ function () { value: function () { var _get = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee5(name, defaultValue) { + _regenerator["default"].mark(function _callee5(name, defaultValue) { var val; - return _regenerator.default.wrap(function _callee5$(_context5) { + return _regenerator["default"].wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: @@ -13596,9 +13702,9 @@ function () { value: function () { var _getMultiple = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee6(properties) { + _regenerator["default"].mark(function _callee6(properties) { var values, name, val; - return _regenerator.default.wrap(function _callee6$(_context6) { + return _regenerator["default"].wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { case 0: @@ -13637,7 +13743,7 @@ function () { exports.ViewHistory = ViewHistory; /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13652,13 +13758,13 @@ var _regenerator = _interopRequireDefault(__webpack_require__(2)); var _app = __webpack_require__(1); -var _preferences = __webpack_require__(38); +var _preferences = __webpack_require__(37); -var _download_manager = __webpack_require__(39); +var _download_manager = __webpack_require__(38); -var _genericl10n = __webpack_require__(40); +var _genericl10n = __webpack_require__(39); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -13702,8 +13808,8 @@ function (_BasePreferences) { value: function () { var _writeToStorage2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(prefObj) { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee(prefObj) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -13714,7 +13820,7 @@ function (_BasePreferences) { return _context.stop(); } } - }, _callee, this); + }, _callee); })); function _writeToStorage(_x) { @@ -13728,8 +13834,8 @@ function (_BasePreferences) { value: function () { var _readFromStorage2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2(prefObj) { - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2(prefObj) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -13740,7 +13846,7 @@ function (_BasePreferences) { return _context2.stop(); } } - }, _callee2, this); + }, _callee2); })); function _readFromStorage(_x2) { @@ -13773,7 +13879,7 @@ GenericExternalServices.createL10n = function (_ref) { _app.PDFViewerApplication.externalServices = GenericExternalServices; /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -13786,7 +13892,7 @@ exports.BasePreferences = void 0; var _regenerator = _interopRequireDefault(__webpack_require__(2)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } @@ -13805,27 +13911,27 @@ var defaultPreferences = null; function getDefaultPreferences() { if (!defaultPreferences) { defaultPreferences = Promise.resolve({ - "viewOnLoad": 0, - "defaultZoomValue": "", - "sidebarViewOnLoad": -1, "cursorToolOnLoad": 0, + "defaultZoomValue": "", + "disablePageLabels": false, + "enablePrintAutoRotate": false, "enableWebGL": false, "eventBusDispatchToDOM": false, - "pdfBugEnabled": false, - "disableRange": false, - "disableStream": false, - "disableAutoFetch": false, - "disableFontFace": false, - "textLayerMode": 1, - "useOnlyCssZoom": false, "externalLinkTarget": 0, + "historyUpdateUrl": false, + "pdfBugEnabled": false, "renderer": "canvas", "renderInteractiveForms": false, - "enablePrintAutoRotate": false, - "disablePageLabels": false, - "historyUpdateUrl": false, + "sidebarViewOnLoad": -1, "scrollModeOnLoad": -1, - "spreadModeOnLoad": -1 + "spreadModeOnLoad": -1, + "textLayerMode": 1, + "useOnlyCssZoom": false, + "viewOnLoad": 0, + "disableAutoFetch": false, + "disableFontFace": false, + "disableRange": false, + "disableStream": false }); } @@ -13877,8 +13983,8 @@ function () { value: function () { var _writeToStorage2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee(prefObj) { - return _regenerator.default.wrap(function _callee$(_context) { + _regenerator["default"].mark(function _callee(prefObj) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -13889,7 +13995,7 @@ function () { return _context.stop(); } } - }, _callee, this); + }, _callee); })); function _writeToStorage(_x) { @@ -13903,8 +14009,8 @@ function () { value: function () { var _readFromStorage2 = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2(prefObj) { - return _regenerator.default.wrap(function _callee2$(_context2) { + _regenerator["default"].mark(function _callee2(prefObj) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -13915,7 +14021,7 @@ function () { return _context2.stop(); } } - }, _callee2, this); + }, _callee2); })); function _readFromStorage(_x2) { @@ -13929,8 +14035,8 @@ function () { value: function () { var _reset = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3() { - return _regenerator.default.wrap(function _callee3$(_context3) { + _regenerator["default"].mark(function _callee3() { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -13960,9 +14066,9 @@ function () { value: function () { var _set = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee4(name, value) { + _regenerator["default"].mark(function _callee4(name, value) { var defaultValue, valueType, defaultType; - return _regenerator.default.wrap(function _callee4$(_context4) { + return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: @@ -14043,9 +14149,9 @@ function () { value: function () { var _get = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee5(name) { + _regenerator["default"].mark(function _callee5(name) { var defaultValue, prefValue; - return _regenerator.default.wrap(function _callee5$(_context5) { + return _regenerator["default"].wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: @@ -14094,8 +14200,8 @@ function () { value: function () { var _getAll = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee6() { - return _regenerator.default.wrap(function _callee6$(_context6) { + _regenerator["default"].mark(function _callee6() { + return _regenerator["default"].wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { case 0: @@ -14127,7 +14233,7 @@ function () { exports.BasePreferences = BasePreferences; /***/ }), -/* 39 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14193,9 +14299,10 @@ function () { key: "downloadData", value: function downloadData(data, filename, contentType) { if (navigator.msSaveBlob) { - return navigator.msSaveBlob(new Blob([data], { + navigator.msSaveBlob(new Blob([data], { type: contentType }), filename); + return; } var blobUrl = (0, _pdfjsLib.createObjectURL)(data, contentType, this.disableCreateObjectURL); @@ -14230,7 +14337,7 @@ function () { exports.DownloadManager = DownloadManager; /***/ }), -/* 40 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14243,9 +14350,9 @@ exports.GenericL10n = void 0; var _regenerator = _interopRequireDefault(__webpack_require__(2)); -__webpack_require__(41); +__webpack_require__(40); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } @@ -14278,9 +14385,9 @@ function () { value: function () { var _getLanguage = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee() { + _regenerator["default"].mark(function _callee() { var l10n; - return _regenerator.default.wrap(function _callee$(_context) { + return _regenerator["default"].wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: @@ -14310,9 +14417,9 @@ function () { value: function () { var _getDirection = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee2() { + _regenerator["default"].mark(function _callee2() { var l10n; - return _regenerator.default.wrap(function _callee2$(_context2) { + return _regenerator["default"].wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: @@ -14342,9 +14449,9 @@ function () { value: function () { var _get = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee3(property, args, fallback) { + _regenerator["default"].mark(function _callee3(property, args, fallback) { var l10n; - return _regenerator.default.wrap(function _callee3$(_context3) { + return _regenerator["default"].wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: @@ -14374,9 +14481,9 @@ function () { value: function () { var _translate = _asyncToGenerator( /*#__PURE__*/ - _regenerator.default.mark(function _callee4(element) { + _regenerator["default"].mark(function _callee4(element) { var l10n; - return _regenerator.default.wrap(function _callee4$(_context4) { + return _regenerator["default"].wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: @@ -14409,7 +14516,7 @@ function () { exports.GenericL10n = GenericL10n; /***/ }), -/* 41 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15241,7 +15348,7 @@ document.webL10n = function (window, document, undefined) { }(window, document); /***/ }), -/* 42 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -15252,10 +15359,12 @@ Object.defineProperty(exports, "__esModule", { }); exports.PDFPrintService = PDFPrintService; -var _ui_utils = __webpack_require__(6); +var _ui_utils = __webpack_require__(5); var _app = __webpack_require__(1); +var _app_options = __webpack_require__(6); + var _pdfjsLib = __webpack_require__(7); var activeService = null; @@ -15263,7 +15372,7 @@ var overlayManager = null; function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) { var scratchCanvas = activeService.scratchCanvas; - var PRINT_RESOLUTION = 150; + var PRINT_RESOLUTION = _app_options.AppOptions.get('printResolution') || 150; var PRINT_UNITS = PRINT_RESOLUTION / 72.0; scratchCanvas.width = Math.floor(size.width * PRINT_UNITS); scratchCanvas.height = Math.floor(size.height * PRINT_UNITS); @@ -15447,7 +15556,7 @@ window.print = function print() { var activeServiceOnEntry = activeService; activeService.renderPages().then(function () { return activeServiceOnEntry.performPrint(); - }).catch(function () {}).then(function () { + })["catch"](function () {}).then(function () { if (activeServiceOnEntry.active) { abort(); } diff --git a/cps/static/locale/ar/viewer.properties b/cps/static/locale/ar/viewer.properties index f4b53ede..b42ba74c 100644 --- a/cps/static/locale/ar/viewer.properties +++ b/cps/static/locale/ar/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=ملف PDF تالف أو غير صحيح. missing_file_error=ملف PDF غير موجود. unexpected_response_error=استجابة خادوم غير متوقعة. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}، {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/be/viewer.properties b/cps/static/locale/be/viewer.properties index f606dc32..d3f81887 100644 --- a/cps/static/locale/be/viewer.properties +++ b/cps/static/locale/be/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Няспраўны або пашкоджаны файл PDF. missing_file_error=Адсутны файл PDF. unexpected_response_error=Нечаканы адказ сервера. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/br/viewer.properties b/cps/static/locale/br/viewer.properties index ae721dd6..ac2558e1 100644 --- a/cps/static/locale/br/viewer.properties +++ b/cps/static/locale/br/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Restr PDF didalvoudek pe kontronet. missing_file_error=Restr PDF o vankout. unexpected_response_error=Respont dic'hortoz a-berzh an dafariad +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/cak/viewer.properties b/cps/static/locale/cak/viewer.properties index 780ccf5c..8086f32a 100644 --- a/cps/static/locale/cak/viewer.properties +++ b/cps/static/locale/cak/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Man oke ta o yujtajinäq ri PDF yakb'äl. missing_file_error=Man xilitäj ta ri PDF yakb'äl. unexpected_response_error=Man oyob'en ta tz'olin rutzij ruk'u'x samaj. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/cs/viewer.properties b/cps/static/locale/cs/viewer.properties index 7ba084e9..1dd8a36c 100644 --- a/cps/static/locale/cs/viewer.properties +++ b/cps/static/locale/cs/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Neplatný nebo chybný soubor PDF. missing_file_error=Chybí soubor PDF. unexpected_response_error=Neočekávaná odpověď serveru. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/cy/viewer.properties b/cps/static/locale/cy/viewer.properties index 44a3fee5..45493a54 100644 --- a/cps/static/locale/cy/viewer.properties +++ b/cps/static/locale/cy/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ffeil PDF annilys neu llwgr. missing_file_error=Ffeil PDF coll. unexpected_response_error=Ymateb annisgwyl gan y gweinydd. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/da/viewer.properties b/cps/static/locale/da/viewer.properties index 62db0930..dce46725 100644 --- a/cps/static/locale/da/viewer.properties +++ b/cps/static/locale/da/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=PDF-filen er ugyldig eller ødelagt. missing_file_error=Manglende PDF-fil. unexpected_response_error=Uventet svar fra serveren. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/de/viewer.properties b/cps/static/locale/de/viewer.properties index 50464d86..cea73190 100644 --- a/cps/static/locale/de/viewer.properties +++ b/cps/static/locale/de/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ungültige oder beschädigte PDF-Datei missing_file_error=Fehlende PDF-Datei unexpected_response_error=Unerwartete Antwort des Servers +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/el/viewer.properties b/cps/static/locale/el/viewer.properties index 725c547d..d7a6abc1 100644 --- a/cps/static/locale/el/viewer.properties +++ b/cps/static/locale/el/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Μη έγκυρο ή κατεστραμμένο αρχείο missing_file_error=Λείπει αρχείο PDF. unexpected_response_error=Μη αναμενόμενη απόκριση από το διακομιστή. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/en-CA/viewer.properties b/cps/static/locale/en-CA/viewer.properties index ddc42138..e52573b1 100644 --- a/cps/static/locale/en-CA/viewer.properties +++ b/cps/static/locale/en-CA/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Invalid or corrupted PDF file. missing_file_error=Missing PDF file. unexpected_response_error=Unexpected server response. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/en-GB/viewer.properties b/cps/static/locale/en-GB/viewer.properties index ddc42138..e52573b1 100644 --- a/cps/static/locale/en-GB/viewer.properties +++ b/cps/static/locale/en-GB/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Invalid or corrupted PDF file. missing_file_error=Missing PDF file. unexpected_response_error=Unexpected server response. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/en-US/viewer.properties b/cps/static/locale/en-US/viewer.properties index 22045e11..2dd7751a 100644 --- a/cps/static/locale/en-US/viewer.properties +++ b/cps/static/locale/en-US/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Invalid or corrupted PDF file. missing_file_error=Missing PDF file. unexpected_response_error=Unexpected server response. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/eo/viewer.properties b/cps/static/locale/eo/viewer.properties index 04272e4a..eb294955 100644 --- a/cps/static/locale/eo/viewer.properties +++ b/cps/static/locale/eo/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Nevalida aŭ difektita PDF dosiero. missing_file_error=Mankas dosiero PDF. unexpected_response_error=Neatendita respondo de servilo. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/es-AR/viewer.properties b/cps/static/locale/es-AR/viewer.properties index 4ba3ddc1..6f3662c7 100644 --- a/cps/static/locale/es-AR/viewer.properties +++ b/cps/static/locale/es-AR/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Archivo PDF no válido o cocrrupto. missing_file_error=Archivo PDF faltante. unexpected_response_error=Respuesta del servidor inesperada. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/es-CL/viewer.properties b/cps/static/locale/es-CL/viewer.properties index b73dab4c..7691ed7f 100644 --- a/cps/static/locale/es-CL/viewer.properties +++ b/cps/static/locale/es-CL/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Archivo PDF inválido o corrupto. missing_file_error=Falta el archivo PDF. unexpected_response_error=Respuesta del servidor inesperada. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/es-ES/viewer.properties b/cps/static/locale/es-ES/viewer.properties index e1af4d0b..0a632ece 100644 --- a/cps/static/locale/es-ES/viewer.properties +++ b/cps/static/locale/es-ES/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Fichero PDF no válido o corrupto. missing_file_error=No hay fichero PDF. unexpected_response_error=Respuesta inesperada del servidor. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/et/viewer.properties b/cps/static/locale/et/viewer.properties index 46dd2da6..11f47c1c 100644 --- a/cps/static/locale/et/viewer.properties +++ b/cps/static/locale/et/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Vigane või rikutud PDF-fail. missing_file_error=PDF-fail puudub. unexpected_response_error=Ootamatu vastus serverilt. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/eu/viewer.properties b/cps/static/locale/eu/viewer.properties index c40b884b..a3f230a5 100644 --- a/cps/static/locale/eu/viewer.properties +++ b/cps/static/locale/eu/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=PDF fitxategi baliogabe edo hondatua. missing_file_error=PDF fitxategia falta da. unexpected_response_error=Espero gabeko zerbitzariaren erantzuna. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/fi/viewer.properties b/cps/static/locale/fi/viewer.properties index 89efd773..bb4d44ae 100644 --- a/cps/static/locale/fi/viewer.properties +++ b/cps/static/locale/fi/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Virheellinen tai vioittunut PDF-tiedosto. missing_file_error=Puuttuva PDF-tiedosto. unexpected_response_error=Odottamaton vastaus palvelimelta. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/fr/viewer.properties b/cps/static/locale/fr/viewer.properties index 7cc00b93..10559f70 100644 --- a/cps/static/locale/fr/viewer.properties +++ b/cps/static/locale/fr/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Fichier PDF invalide ou corrompu. missing_file_error=Fichier PDF manquant. unexpected_response_error=Réponse inattendue du serveur. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} à {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/fy-NL/viewer.properties b/cps/static/locale/fy-NL/viewer.properties index 0c74953d..ddba4cc0 100644 --- a/cps/static/locale/fy-NL/viewer.properties +++ b/cps/static/locale/fy-NL/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ynfalide of korruptearre PDF-bestân. missing_file_error=PDF-bestân ûntbrekt. unexpected_response_error=Unferwacht serverantwurd. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/gn/viewer.properties b/cps/static/locale/gn/viewer.properties index 41377566..692d1d72 100644 --- a/cps/static/locale/gn/viewer.properties +++ b/cps/static/locale/gn/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=PDF marandurenda ndoikóiva térã ivaipyréva. missing_file_error=Ndaipóri PDF marandurenda unexpected_response_error=Mohendahavusu mbohovái ñeha'arõ'ỹva. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/he/viewer.properties b/cps/static/locale/he/viewer.properties index 55a79cd5..f0259f79 100644 --- a/cps/static/locale/he/viewer.properties +++ b/cps/static/locale/he/viewer.properties @@ -173,6 +173,7 @@ find_reached_bottom=הגיע לסוף הדף, ממשיך מלמעלה # "{{current}}" and "{{total}}" will be replaced by a number representing the # index of the currently active find result, respectively a number representing # the total number of matches in the document. +find_match_count={[ plural(total) ]} find_match_count[one]=תוצאה {{current}} מתוך {{total}} find_match_count[two]={{current}} מתוך {{total}} תוצאות find_match_count[few]={{current}} מתוך {{total}} תוצאות @@ -181,13 +182,14 @@ find_match_count[other]={{current}} מתוך {{total}} תוצאות # LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are # [zero|one|two|few|many|other], with [other] as the default value. # "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} find_match_count_limit[zero]=יותר מ־{{limit}} תוצאות find_match_count_limit[one]=יותר מתוצאה אחת find_match_count_limit[two]=יותר מ־{{limit}} תוצאות find_match_count_limit[few]=יותר מ־{{limit}} תוצאות find_match_count_limit[many]=יותר מ־{{limit}} תוצאות find_match_count_limit[other]=יותר מ־{{limit}} תוצאות -find_not_found=ביטוי לא נמצא +find_not_found=הביטוי לא נמצא # Error panel labels error_more_info=מידע נוסף @@ -224,6 +226,10 @@ invalid_file_error=קובץ PDF פגום או לא תקין. missing_file_error=קובץ PDF חסר. unexpected_response_error=תגובת שרת לא צפויה. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/hi-IN/viewer.properties b/cps/static/locale/hi-IN/viewer.properties index a27bfe44..67d00053 100644 --- a/cps/static/locale/hi-IN/viewer.properties +++ b/cps/static/locale/hi-IN/viewer.properties @@ -208,6 +208,10 @@ invalid_file_error=अमान्य या भ्रष्ट PDF फ़ाइ missing_file_error=\u0020अनुपस्थित PDF फ़ाइल. unexpected_response_error=अप्रत्याशित सर्वर प्रतिक्रिया. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/hr/viewer.properties b/cps/static/locale/hr/viewer.properties index 07d19b2d..4f1f3c49 100644 --- a/cps/static/locale/hr/viewer.properties +++ b/cps/static/locale/hr/viewer.properties @@ -65,7 +65,19 @@ cursor_text_select_tool_label=Alat za označavanje teksta cursor_hand_tool.title=Omogući ručni alat cursor_hand_tool_label=Ručni alat - +scroll_vertical.title=Koristi okomito pomicanje +scroll_vertical_label=Okomito pomicanje +scroll_horizontal.title=Koristi vodoravno pomicanje +scroll_horizontal_label=Vodoravno pomicanje +scroll_wrapped.title=Koristi omotano pomicanje +scroll_wrapped_label=Omotano pomicanje + +spread_none.title=Ne pridružuj razmake stranica +spread_none_label=Bez razmaka +spread_odd.title=Pridruži razmake stranica počinjući od neparnih stranica +spread_odd_label=Neparni razmaci +spread_even.title=Pridruži razmake stranica počinjući od parnih stranica +spread_even_label=Parni razmaci # Document properties dialog box document_properties.title=Svojstva dokumenta... @@ -91,8 +103,15 @@ document_properties_creator=Stvaratelj: document_properties_producer=PDF stvaratelj: document_properties_version=PDF inačica: document_properties_page_count=Broj stranica: +document_properties_page_size=Dimenzije stranice: +document_properties_page_size_unit_inches=in +document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portret +document_properties_page_size_orientation_landscape=pejzaž document_properties_page_size_name_a3=A3 document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Pismo +document_properties_page_size_name_legal=Pravno # LOCALIZATION NOTE (document_properties_page_size_dimension_string): # "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by # the size, respectively their unit of measurement and orientation, of the (current) page. @@ -103,6 +122,7 @@ document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) # LOCALIZATION NOTE (document_properties_linearized): The linearization status of # the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=Brzi web pregled: document_properties_linearized_yes=Da document_properties_linearized_no=Ne document_properties_close=Zatvori @@ -145,6 +165,7 @@ find_next.title=Pronađi iduće javljanje ovog izraza find_next_label=Sljedeće find_highlight=Istankni sve find_match_case_label=Slučaj podudaranja +find_entire_word_label=Cijele riječi find_reached_top=Dosegnut vrh dokumenta, nastavak od dna find_reached_bottom=Dosegnut vrh dokumenta, nastavak od vrha # LOCALIZATION NOTE (find_match_count): The supported plural forms are @@ -152,9 +173,22 @@ find_reached_bottom=Dosegnut vrh dokumenta, nastavak od vrha # "{{current}}" and "{{total}}" will be replaced by a number representing the # index of the currently active find result, respectively a number representing # the total number of matches in the document. +find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} od {{total}} se podudara +find_match_count[two]={{current}} od {{total}} se podudara +find_match_count[few]={{current}} od {{total}} se podudara +find_match_count[many]={{current}} od {{total}} se podudara +find_match_count[other]={{current}} od {{total}} se podudara # LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are # [zero|one|two|few|many|other], with [other] as the default value. # "{{limit}}" will be replaced by a numerical value. +find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Više od {{limit}} podudaranja +find_match_count_limit[one]=Više od {{limit}} podudaranja +find_match_count_limit[two]=Više od {{limit}} podudaranja +find_match_count_limit[few]=Više od {{limit}} podudaranja +find_match_count_limit[many]=Više od {{limit}} podudaranja +find_match_count_limit[other]=Više od {{limit}} podudaranja find_not_found=Izraz nije pronađen # Error panel labels @@ -192,6 +226,10 @@ invalid_file_error=Kriva ili oštećena PDF datoteka. missing_file_error=Nedostaje PDF datoteka. unexpected_response_error=Neočekivani odgovor poslužitelja. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/hsb/viewer.properties b/cps/static/locale/hsb/viewer.properties index 679ef593..790f7235 100644 --- a/cps/static/locale/hsb/viewer.properties +++ b/cps/static/locale/hsb/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Njepłaćiwa abo wobškodźena PDF-dataja. missing_file_error=Falowaca PDF-dataja. unexpected_response_error=Njewočakowana serwerowa wotmołwa. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/hu/viewer.properties b/cps/static/locale/hu/viewer.properties index 9c9ec846..fb5e35f4 100644 --- a/cps/static/locale/hu/viewer.properties +++ b/cps/static/locale/hu/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Érvénytelen vagy sérült PDF fájl. missing_file_error=Hiányzó PDF fájl. unexpected_response_error=Váratlan kiszolgálóválasz. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/ia/viewer.properties b/cps/static/locale/ia/viewer.properties index 4a5b005c..ee8842cf 100644 --- a/cps/static/locale/ia/viewer.properties +++ b/cps/static/locale/ia/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=File PDF corrumpite o non valide. missing_file_error=File PDF mancante. unexpected_response_error=Responsa del servitor inexpectate. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/id/viewer.properties b/cps/static/locale/id/viewer.properties index b6f7080b..58ebc40d 100644 --- a/cps/static/locale/id/viewer.properties +++ b/cps/static/locale/id/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Berkas PDF tidak valid atau rusak. missing_file_error=Berkas PDF tidak ada. unexpected_response_error=Balasan server yang tidak diharapkan. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/is/viewer.properties b/cps/static/locale/is/viewer.properties index 59d94b44..d24c2adf 100644 --- a/cps/static/locale/is/viewer.properties +++ b/cps/static/locale/is/viewer.properties @@ -65,7 +65,17 @@ cursor_text_select_tool_label=Textavalsáhald cursor_hand_tool.title=Virkja handarverkfæri cursor_hand_tool_label=Handarverkfæri - +scroll_vertical.title=Nota lóðrétt skrun +scroll_vertical_label=Lóðrétt skrun +scroll_horizontal.title=Nota lárétt skrun +scroll_horizontal_label=Lárétt skrun + +spread_none.title=Ekki taka þátt í dreifingu síðna +spread_none_label=Engin dreifing +spread_odd.title=Taka þátt í dreifingu síðna með oddatölum +spread_odd_label=Oddatöludreifing +spread_even.title=Taktu þátt í dreifingu síðna með jöfnuntölum +spread_even_label=Jafnatöludreifing # Document properties dialog box document_properties.title=Eiginleikar skjals… @@ -161,10 +171,21 @@ find_reached_bottom=Náði enda skjals, held áfram efst # index of the currently active find result, respectively a number representing # the total number of matches in the document. find_match_count={[ plural(total) ]} +find_match_count[one]={{current}} af {{total}} niðurstöðu +find_match_count[two]={{current}} af {{total}} niðurstöðum +find_match_count[few]={{current}} af {{total}} niðurstöðum +find_match_count[many]={{current}} af {{total}} niðurstöðum +find_match_count[other]={{current}} af {{total}} niðurstöðum # LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are # [zero|one|two|few|many|other], with [other] as the default value. # "{{limit}}" will be replaced by a numerical value. find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[one]=Fleiri en {{limit}} niðurstaða +find_match_count_limit[two]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[few]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[many]=Fleiri en {{limit}} niðurstöður +find_match_count_limit[other]=Fleiri en {{limit}} niðurstöður find_not_found=Fann ekki orðið # Error panel labels diff --git a/cps/static/locale/it/viewer.properties b/cps/static/locale/it/viewer.properties index 754ea18a..cff0258b 100644 --- a/cps/static/locale/it/viewer.properties +++ b/cps/static/locale/it/viewer.properties @@ -146,6 +146,7 @@ loading_error = Si è verificato un errore durante il caricamento del PDF. invalid_file_error = File PDF non valido o danneggiato. missing_file_error = File PDF non disponibile. unexpected_response_error = Risposta imprevista del server +annotation_date_string = {{date}}, {{time}} text_annotation_type.alt = [Annotazione: {{type}}] password_label = Inserire la password per aprire questo file PDF. password_invalid = Password non corretta. Riprovare. diff --git a/cps/static/locale/ja/viewer.properties b/cps/static/locale/ja/viewer.properties index d2fe56bd..3a90b47b 100644 --- a/cps/static/locale/ja/viewer.properties +++ b/cps/static/locale/ja/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=無効または破損した PDF ファイル。 missing_file_error=PDF ファイルが見つかりません。 unexpected_response_error=サーバーから予期せぬ応答がありました。 +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/ka/viewer.properties b/cps/static/locale/ka/viewer.properties index e1321374..c7b2da8d 100644 --- a/cps/static/locale/ka/viewer.properties +++ b/cps/static/locale/ka/viewer.properties @@ -100,8 +100,8 @@ document_properties_modification_date=ჩასწორების თარ # will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=გამომშვები: -document_properties_producer=PDF გამომშვები: -document_properties_version=PDF ვერსია: +document_properties_producer=PDF-გამომშვები: +document_properties_version=PDF-ვერსია: document_properties_page_count=გვერდების რაოდენობა: document_properties_page_size=გვერდის ზომა: document_properties_page_size_unit_inches=დუიმი @@ -122,7 +122,7 @@ document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) # LOCALIZATION NOTE (document_properties_linearized): The linearization status of # the document; usually called "Fast Web View" in English locales of Adobe software. -document_properties_linearized=Fast Web View: +document_properties_linearized=სწრაფი შეთვალიერება: document_properties_linearized_yes=დიახ document_properties_linearized_no=არა document_properties_close=დახურვა @@ -154,7 +154,7 @@ findbar_label=ძიება thumb_page_title=გვერდი {{page}} # LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page # number. -thumb_page_canvas=გვერდის ესკიზი {{page}} +thumb_page_canvas=გვერდის შეთვალიერება {{page}} # Find panel button title and messages find_input.title=ძიება @@ -221,22 +221,26 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=შეცდომა -loading_error=შეცდომა, PDF ფაილის ჩატვირთვისას. -invalid_file_error=არამართებული ან დაზიანებული PDF ფაილი. -missing_file_error=ნაკლული PDF ფაილი. +loading_error=შეცდომა, PDF-ფაილის ჩატვირთვისას. +invalid_file_error=არამართებული ან დაზიანებული PDF-ფაილი. +missing_file_error=ნაკლული PDF-ფაილი. unexpected_response_error=სერვერის მოულოდნელი პასუხი. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} შენიშვნა] -password_label=შეიყვანეთ პაროლი PDF ფაილის გასახსნელად. +password_label=შეიყვანეთ პაროლი PDF-ფაილის გასახსნელად. password_invalid=არასწორი პაროლი. გთხოვთ, სცადოთ ხელახლა. password_ok=კარგი password_cancel=გაუქმება printing_not_supported=გაფრთხილება: ამობეჭდვა ამ ბრაუზერში არაა სრულად მხარდაჭერილი. printing_not_ready=გაფრთხილება: PDF სრულად ჩატვირთული არაა, ამობეჭდვის დასაწყებად. -web_fonts_disabled=ვებშრიფტები გამორთულია: ჩაშენებული PDF შრიფტების გამოყენება ვერ ხერხდება. -document_colors_not_allowed=PDF დოკუმენტებს არ აქვს საკუთარი ფერების გამოყენების ნებართვა: ბრაუზერში გამორთულია “გვერდებისთვის საკუთარი ფერების გამოყენების უფლება”. +web_fonts_disabled=ვებშრიფტები გამორთულია: ჩაშენებული PDF-შრიფტების გამოყენება ვერ ხერხდება. +document_colors_not_allowed=PDF-დოკუმენტებს არ აქვს საკუთარი ფერების გამოყენების ნებართვა: ბრაუზერში გამორთულია “გვერდებისთვის საკუთარი ფერების გამოყენების უფლება”. diff --git a/cps/static/locale/kab/viewer.properties b/cps/static/locale/kab/viewer.properties index 52ac0a55..db59ef71 100644 --- a/cps/static/locale/kab/viewer.properties +++ b/cps/static/locale/kab/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Afaylu PDF arameɣtu neɣ yexṣeṛ. missing_file_error=Ulac afaylu PDF. unexpected_response_error=Aqeddac yerra-d yir tiririt ur nettwaṛǧi ara. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/kk/viewer.properties b/cps/static/locale/kk/viewer.properties index 3f1e51a5..cc1b4f6a 100644 --- a/cps/static/locale/kk/viewer.properties +++ b/cps/static/locale/kk/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Зақымдалған немесе қате PDF файл. missing_file_error=PDF файлы жоқ. unexpected_response_error=Сервердің күтпеген жауабы. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/ko/viewer.properties b/cps/static/locale/ko/viewer.properties index db7da192..d173a242 100644 --- a/cps/static/locale/ko/viewer.properties +++ b/cps/static/locale/ko/viewer.properties @@ -26,23 +26,23 @@ of_pages=전체 {{pagesCount}} # LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" # will be replaced by a number representing the currently visible page, # respectively a number representing the total number of pages in the document. -page_of_pages=({{pagesCount}} 중 {{pageNumber}}) +page_of_pages=({{pageNumber}} / {{pagesCount}}) zoom_out.title=축소 zoom_out_label=축소 zoom_in.title=확대 zoom_in_label=확대 -zoom.title=크기 -presentation_mode.title=발표 모드로 전환 -presentation_mode_label=발표 모드 +zoom.title=확대/축소 +presentation_mode.title=프레젠테이션 모드로 전환 +presentation_mode_label=프레젠테이션 모드 open_file.title=파일 열기 open_file_label=열기 print.title=인쇄 print_label=인쇄 download.title=다운로드 download_label=다운로드 -bookmark.title=지금 보이는 그대로 (복사하거나 새 창에 열기) -bookmark_label=지금 보이는 그대로 +bookmark.title=현재 뷰 (복사하거나 새 창에 열기) +bookmark_label=현재 뷰 # Secondary toolbar and context menu tools.title=도구 @@ -83,7 +83,7 @@ spread_even_label=짝수 펼쳐짐 document_properties.title=문서 속성… document_properties_label=문서 속성… document_properties_file_name=파일 이름: -document_properties_file_size=파일 사이즈: +document_properties_file_size=파일 크기: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}}바이트) @@ -91,18 +91,18 @@ document_properties_kb={{size_kb}} KB ({{size_b}}바이트) # will be replaced by the PDF file size in megabytes, respectively in bytes. document_properties_mb={{size_mb}} MB ({{size_b}}바이트) document_properties_title=제목: -document_properties_author=저자: +document_properties_author=작성자: document_properties_subject=주제: document_properties_keywords=키워드: -document_properties_creation_date=생성일: -document_properties_modification_date=수정일: +document_properties_creation_date=작성 날짜: +document_properties_modification_date=수정 날짜: # LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" # will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} -document_properties_creator=생성자: -document_properties_producer=PDF 생성기: +document_properties_creator=작성 프로그램: +document_properties_producer=PDF 변환 소프트웨어: document_properties_version=PDF 버전: -document_properties_page_count=총 페이지: +document_properties_page_count=페이지 수: document_properties_page_size=페이지 크기: document_properties_page_size_unit_inches=in document_properties_page_size_unit_millimeters=mm @@ -127,7 +127,7 @@ document_properties_linearized_yes=예 document_properties_linearized_no=아니오 document_properties_close=닫기 -print_progress_message=문서 출력 준비중… +print_progress_message=인쇄 문서 준비중… # LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by # a numerical per cent value. print_progress_percent={{progress}}% @@ -151,10 +151,10 @@ findbar_label=검색 # Thumbnails panel item (tooltip and alt text for images) # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page # number. -thumb_page_title={{page}}쪽 +thumb_page_title={{page}} 페이지 # LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page # number. -thumb_page_canvas={{page}}쪽 미리보기 +thumb_page_canvas={{page}} 페이지 미리보기 # Find panel button title and messages find_input.title=찾기 @@ -164,7 +164,7 @@ find_previous_label=이전 find_next.title=지정 문자열에 일치하는 다음 부분을 검색 find_next_label=다음 find_highlight=모두 강조 표시 -find_match_case_label=대문자/소문자 구별 +find_match_case_label=대/소문자 구분 find_entire_word_label=전체 단어 find_reached_top=문서 처음까지 검색하고 끝으로 돌아와 검색했습니다. find_reached_bottom=문서 끝까지 검색하고 앞으로 돌아와 검색했습니다. @@ -208,12 +208,12 @@ error_stack=스택: {{stack}} error_file=파일: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=줄 번호: {{line}} -rendering_error=페이지를 렌더링하다 오류가 났습니다. +rendering_error=페이지를 렌더링하는 중 오류가 발생했습니다. # Predefined zoom values page_scale_width=페이지 너비에 맞춤 page_scale_fit=페이지에 맞춤 -page_scale_auto=알아서 맞춤 +page_scale_auto=자동 맞춤 page_scale_actual=실제 크기에 맞춤 # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. @@ -221,22 +221,26 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=오류 -loading_error=PDF를 읽는 중 오류가 생겼습니다. +loading_error=PDF를 로드하는 중 오류가 발생했습니다. invalid_file_error=유효하지 않거나 파손된 PDF 파일 missing_file_error=PDF 파일이 없습니다. -unexpected_response_error=알 수 없는 서버 응답입니다. +unexpected_response_error=예상치 못한 서버 응답입니다. + +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[{{type}} 주석] -password_label=이 PDF 파일을 열 수 있는 암호를 입력하십시오. -password_invalid=잘못된 암호입니다. 다시 시도해 주십시오. +password_label=이 PDF 파일을 열 수 있는 비밀번호를 입력하십시오. +password_invalid=잘못된 비밀번호입니다. 다시 시도해 주십시오. password_ok=확인 password_cancel=취소 printing_not_supported=경고: 이 브라우저는 인쇄를 완전히 지원하지 않습니다. printing_not_ready=경고: 이 PDF를 인쇄를 할 수 있을 정도로 읽어들이지 못했습니다. -web_fonts_disabled=웹 폰트가 꺼져있음: 내장된 PDF 글꼴을 쓸 수 없습니다. -document_colors_not_allowed=PDF 문서의 색상을 쓰지 못하게 되어 있음: '웹 페이지 자체 색상 사용 허용'이 브라우저에서 꺼져 있습니다. +web_fonts_disabled=웹 폰트가 비활성화됨: 내장된 PDF 글꼴을 사용할 수 없습니다. +document_colors_not_allowed=PDF 문서의 자체 색상 허용 안됨: “페이지 자체 색상 허용”이 브라우저에서 비활성화 되어 있습니다. diff --git a/cps/static/locale/lij/viewer.properties b/cps/static/locale/lij/viewer.properties index f0a7771b..71a53062 100644 --- a/cps/static/locale/lij/viewer.properties +++ b/cps/static/locale/lij/viewer.properties @@ -45,8 +45,8 @@ bookmark.title=Vixon corente (còpia ò arvi inte 'n neuvo barcon) bookmark_label=Vixon corente # Secondary toolbar and context menu -tools.title=Strumenti -tools_label=Strumenti +tools.title=Atressi +tools_label=Atressi first_page.title=Vanni a-a primma pagina first_page.label=Vanni a-a primma pagina first_page_label=Vanni a-a primma pagina @@ -82,8 +82,8 @@ spread_even_label=Difuxon pari # Document properties dialog box document_properties.title=Propietæ do documento… document_properties_label=Propietæ do documento… -document_properties_file_name=Nomme file: -document_properties_file_size=Dimenscion file: +document_properties_file_name=Nomme schedaio: +document_properties_file_size=Dimenscion schedaio: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} kB ({{size_b}} byte) @@ -205,7 +205,7 @@ error_message=Mesaggio: {{message}} # trace. error_stack=Stack: {{stack}} # LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename -error_file=File: {{file}} +error_file=Schedaio: {{file}} # LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Linia: {{line}} rendering_error=Gh'é stæto 'n'erô itno rendering da pagina. @@ -222,8 +222,8 @@ page_scale_percent={{scale}}% # Loading indicator messages loading_error_indicator=Erô loading_error=S'é verificou 'n'erô itno caregamento do PDF. -invalid_file_error=O file PDF o l'é no valido ò aroinou. -missing_file_error=O file PDF o no gh'é. +invalid_file_error=O schedaio PDF o l'é no valido ò aroinou. +missing_file_error=O schedaio PDF o no gh'é. unexpected_response_error=Risposta inprevista do-u server # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. @@ -231,7 +231,7 @@ unexpected_response_error=Risposta inprevista do-u server # the PDF spec (32000-1:2008 Table 169 – Annotation types). # Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[Anotaçion: {{type}}] -password_label=Dimme a paròlla segreta pe arvî sto file PDF. +password_label=Dimme a paròlla segreta pe arvî sto schedaio PDF. password_invalid=Paròlla segreta sbalia. Preuva torna. password_ok=Va ben password_cancel=Anulla diff --git a/cps/static/locale/lt/viewer.properties b/cps/static/locale/lt/viewer.properties index 3cb76ed6..45ec3035 100644 --- a/cps/static/locale/lt/viewer.properties +++ b/cps/static/locale/lt/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Tai nėra PDF failas arba jis yra sugadintas. missing_file_error=PDF failas nerastas. unexpected_response_error=Netikėtas serverio atsakas. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/mr/viewer.properties b/cps/static/locale/mr/viewer.properties index c8069296..67e419ec 100644 --- a/cps/static/locale/mr/viewer.properties +++ b/cps/static/locale/mr/viewer.properties @@ -65,6 +65,10 @@ cursor_text_select_tool_label=मजकूर निवड साधन cursor_hand_tool.title=हात साधन कार्यान्वित करा cursor_hand_tool_label=हस्त साधन +scroll_vertical.title=अनुलंब स्क्रोलिंग वापरा +scroll_vertical_label=अनुलंब स्क्रोलिंग +scroll_horizontal.title=क्षैतिज स्क्रोलिंग वापरा +scroll_horizontal_label=क्षैतिज स्क्रोलिंग # Document properties dialog box @@ -95,6 +99,7 @@ document_properties_page_size=पृष्ठ आकार: document_properties_page_size_unit_inches=इंच document_properties_page_size_unit_millimeters=मीमी document_properties_page_size_orientation_portrait=उभी मांडणी +document_properties_page_size_orientation_landscape=आडवे document_properties_page_size_name_a3=A3 document_properties_page_size_name_a4=A4 document_properties_page_size_name_letter=Letter @@ -109,6 +114,7 @@ document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}}) # LOCALIZATION NOTE (document_properties_linearized): The linearization status of # the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=जलद वेब दृष्य: document_properties_linearized_yes=हो document_properties_linearized_no=नाही document_properties_close=बंद करा @@ -151,8 +157,23 @@ find_next.title=वाकप्रयोगची पुढील घटना find_next_label=पुढील find_highlight=सर्व ठळक करा find_match_case_label=आकार जुळवा +find_entire_word_label=संपूर्ण शब्द find_reached_top=दस्तऐवजाच्या शीर्षकास पोहचले, तळपासून पुढे find_reached_bottom=दस्तऐवजाच्या तळाला पोहचले, शीर्षकापासून पुढे +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +find_match_count={[ plural(total) ]} +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit[zero]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[two]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[few]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[many]={{limit}} पेक्षा अधिक जुळण्या +find_match_count_limit[other]={{limit}} पेक्षा अधिक जुळण्या find_not_found=वाकप्रयोग आढळले नाही # Error panel labels diff --git a/cps/static/locale/nb-NO/viewer.properties b/cps/static/locale/nb-NO/viewer.properties index fc989828..8656cb4f 100644 --- a/cps/static/locale/nb-NO/viewer.properties +++ b/cps/static/locale/nb-NO/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ugyldig eller skadet PDF-fil. missing_file_error=Manglende PDF-fil. unexpected_response_error=Uventet serverrespons. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/nl/viewer.properties b/cps/static/locale/nl/viewer.properties index 7422f849..c62110a4 100644 --- a/cps/static/locale/nl/viewer.properties +++ b/cps/static/locale/nl/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ongeldig of beschadigd PDF-bestand. missing_file_error=PDF-bestand ontbreekt. unexpected_response_error=Onverwacht serverantwoord. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/nn-NO/viewer.properties b/cps/static/locale/nn-NO/viewer.properties index 27b4abb3..f0feeb40 100644 --- a/cps/static/locale/nn-NO/viewer.properties +++ b/cps/static/locale/nn-NO/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ugyldig eller korrupt PDF-fil. missing_file_error=Manglande PDF-fil. unexpected_response_error=Uventa tenarrespons. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/pa-IN/viewer.properties b/cps/static/locale/pa-IN/viewer.properties index 436be51a..8c624375 100644 --- a/cps/static/locale/pa-IN/viewer.properties +++ b/cps/static/locale/pa-IN/viewer.properties @@ -168,10 +168,21 @@ find_reached_bottom=ਦਸਤਾਵੇਜ਼ ਦੇ ਅੰਤ ਉੱਤੇ ਆ ਗ # index of the currently active find result, respectively a number representing # the total number of matches in the document. find_match_count={[ plural(total) ]} +find_match_count[one]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[two]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[few]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[many]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ +find_match_count[other]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ # LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are # [zero|one|two|few|many|other], with [other] as the default value. # "{{limit}}" will be replaced by a numerical value. find_match_count_limit={[ plural(limit) ]} +find_match_count_limit[zero]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[one]={{limit}} ਮੇਲ ਤੋਂ ਵੱਧ +find_match_count_limit[two]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[few]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[many]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ +find_match_count_limit[other]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ find_not_found=ਵਾਕ ਨਹੀਂ ਲੱਭਿਆ # Error panel labels diff --git a/cps/static/locale/pl/viewer.properties b/cps/static/locale/pl/viewer.properties index 50faadf2..64a6504f 100644 --- a/cps/static/locale/pl/viewer.properties +++ b/cps/static/locale/pl/viewer.properties @@ -12,13 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Main toolbar buttons (tooltips and alt text for images) previous.title=Poprzednia strona previous_label=Poprzednia next.title=Następna strona next_label=Następna -page.title==Strona: +# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input. +page.title=Strona +# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number +# representing the total number of pages in the document. of_pages=z {{pagesCount}} +# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}" +# will be replaced by a number representing the currently visible page, +# respectively a number representing the total number of pages in the document. page_of_pages=({{pageNumber}} z {{pagesCount}}) zoom_out.title=Pomniejszenie @@ -37,6 +44,7 @@ download_label=Pobierz bookmark.title=Bieżąca pozycja (skopiuj lub otwórz jako odnośnik w nowym oknie) bookmark_label=Bieżąca pozycja +# Secondary toolbar and context menu tools.title=Narzędzia tools_label=Narzędzia first_page.title=Przechodzenie do pierwszej strony @@ -59,30 +67,37 @@ cursor_hand_tool_label=Narzędzie rączka scroll_vertical.title=Przewijaj dokument w pionie scroll_vertical_label=Przewijanie pionowe -scroll_horizontal_label=Przewijanie poziome scroll_horizontal.title=Przewijaj dokument w poziomie -scroll_wrapped_label=Widok dwóch stron +scroll_horizontal_label=Przewijanie poziome scroll_wrapped.title=Strony dokumentu wyświetlaj i przewijaj w kolumnach +scroll_wrapped_label=Widok dwóch stron -spread_none_label=Brak kolumn spread_none.title=Nie ustawiaj stron obok siebie -spread_odd_label=Nieparzyste po lewej +spread_none_label=Brak kolumn spread_odd.title=Strony nieparzyste ustawiaj na lewo od parzystych -spread_even_label=Parzyste po lewej +spread_odd_label=Nieparzyste po lewej spread_even.title=Strony parzyste ustawiaj na lewo od nieparzystych +spread_even_label=Parzyste po lewej +# Document properties dialog box document_properties.title=Właściwości dokumentu… document_properties_label=Właściwości dokumentu… document_properties_file_name=Nazwa pliku: document_properties_file_size=Rozmiar pliku: -document_properties_kb={{size_kb}} KB ({{size_b}} b) -document_properties_mb={{size_mb}} MB ({{size_b}} b) +# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" +# will be replaced by the PDF file size in kilobytes, respectively in bytes. +document_properties_kb={{size_kb}} KB ({{size_b}} B) +# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}" +# will be replaced by the PDF file size in megabytes, respectively in bytes. +document_properties_mb={{size_mb}} MB ({{size_b}} B) document_properties_title=Tytuł: document_properties_author=Autor: document_properties_subject=Temat: document_properties_keywords=Słowa kluczowe: document_properties_creation_date=Data utworzenia: document_properties_modification_date=Data modyfikacji: +# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}" +# will be replaced by the creation/modification date, and time, of the PDF file. document_properties_date_string={{date}}, {{time}} document_properties_creator=Utworzony przez: document_properties_producer=PDF wyprodukowany przez: @@ -97,17 +112,30 @@ document_properties_page_size_name_a3=A3 document_properties_page_size_name_a4=A4 document_properties_page_size_name_letter=US Letter document_properties_page_size_name_legal=US Legal -document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} (orientacja {{orientation}}) -document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, orientacja {{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}}×{{height}} {{unit}} (orientacja {{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}}×{{height}} {{unit}} ({{name}}, orientacja {{orientation}}) +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. document_properties_linearized=Szybki podgląd w Internecie: document_properties_linearized_yes=tak document_properties_linearized_no=nie document_properties_close=Zamknij print_progress_message=Przygotowywanie dokumentu do druku… +# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by +# a numerical per cent value. print_progress_percent={{progress}}% print_progress_close=Anuluj +# Tooltips and alt text for side panel toolbar buttons +# (the _label strings are alt text for the buttons, the .title strings are +# tooltips) toggle_sidebar.title=Przełączanie panelu bocznego toggle_sidebar_notification.title=Przełączanie panelu bocznego (dokument zawiera konspekt/załączniki) toggle_sidebar_label=Przełącz panel boczny @@ -120,26 +148,40 @@ thumbs_label=Miniaturki findbar.title=Znajdź w dokumencie findbar_label=Znajdź +# Thumbnails panel item (tooltip and alt text for images) +# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page +# number. thumb_page_title=Strona {{page}} +# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page +# number. thumb_page_canvas=Miniaturka strony {{page}} +# Find panel button title and messages find_input.title=Wyszukiwanie -find_input.placeholder=Szukaj w dokumencie… +find_input.placeholder=Znajdź w dokumencie… find_previous.title=Znajdź poprzednie wystąpienie tekstu find_previous_label=Poprzednie find_next.title=Znajdź następne wystąpienie tekstu find_next_label=Następne -find_highlight=Podświetl wszystkie +find_highlight=Wyróżnianie wszystkich find_match_case_label=Rozróżnianie wielkości liter find_entire_word_label=Całe słowa find_reached_top=Początek dokumentu. Wyszukiwanie od końca. find_reached_bottom=Koniec dokumentu. Wyszukiwanie od początku. +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. find_match_count={[ plural(total) ]} find_match_count[one]=Pierwsze z {{total}} trafień find_match_count[two]=Drugie z {{total}} trafień find_match_count[few]={{current}}. z {{total}} trafień find_match_count[many]={{current}}. z {{total}} trafień find_match_count[other]={{current}}. z {{total}} trafień +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. find_match_count_limit={[ plural(limit) ]} find_match_count_limit[zero]=Brak trafień. find_match_count_limit[one]=Więcej niż jedno trafienie. @@ -149,28 +191,49 @@ find_match_count_limit[many]=Więcej niż {{limit}} trafień. find_match_count_limit[other]=Więcej niż {{limit}} trafień. find_not_found=Nie znaleziono tekstu +# Error panel labels error_more_info=Więcej informacji error_less_info=Mniej informacji error_close=Zamknij +# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be +# replaced by the PDF.JS version and build ID. error_version_info=PDF.js v{{version}} (kompilacja: {{build}}) +# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an +# english string describing the error. error_message=Wiadomość: {{message}} +# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack +# trace. error_stack=Stos: {{stack}} +# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename error_file=Plik: {{file}} +# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number error_line=Wiersz: {{line}} rendering_error=Podczas renderowania strony wystąpił błąd. +# Predefined zoom values page_scale_width=Szerokość strony page_scale_fit=Dopasowanie strony page_scale_auto=Skala automatyczna page_scale_actual=Rozmiar rzeczywisty +# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a +# numerical scale value. page_scale_percent={{scale}}% +# Loading indicator messages loading_error_indicator=Błąd loading_error=Podczas wczytywania dokumentu PDF wystąpił błąd. invalid_file_error=Nieprawidłowy lub uszkodzony plik PDF. missing_file_error=Brak pliku PDF. unexpected_response_error=Nieoczekiwana odpowiedź serwera. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + +# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. +# "{{type}}" will be replaced with an annotation type from a list defined in +# the PDF spec (32000-1:2008 Table 169 – Annotation types). +# Some common types are e.g.: "Check", "Text", "Comment", "Note" text_annotation_type.alt=[Adnotacja: {{type}}] password_label=Wprowadź hasło, aby otworzyć ten dokument PDF. password_invalid=Nieprawidłowe hasło. Proszę spróbować ponownie. diff --git a/cps/static/locale/pt-BR/viewer.properties b/cps/static/locale/pt-BR/viewer.properties index 078e5ada..d62dd5f9 100644 --- a/cps/static/locale/pt-BR/viewer.properties +++ b/cps/static/locale/pt-BR/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Arquivo PDF corrompido ou inválido. missing_file_error=Arquivo PDF ausente. unexpected_response_error=Resposta inesperada do servidor. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). @@ -238,5 +242,5 @@ password_cancel=Cancelar printing_not_supported=Aviso: a impressão não é totalmente suportada neste navegador. printing_not_ready=Aviso: o PDF não está totalmente carregado para impressão. -web_fonts_disabled=As fontes web estão desabilitadas: não foi possível usar fontes incorporadas do PDF. -document_colors_not_allowed=Os documentos em PDF não estão autorizados a usar suas próprias cores: “Permitir que as páginas escolham suas próprias cores” está desabilitado no navegador. +web_fonts_disabled=As fontes web estão desativadas: não foi possível usar fontes incorporadas do PDF. +document_colors_not_allowed=Documentos PDF não estão autorizados a usar as próprias cores: a opção “Permitir que as páginas escolham suas próprias cores” está desativada no navegador. diff --git a/cps/static/locale/pt-PT/viewer.properties b/cps/static/locale/pt-PT/viewer.properties index 591c0eff..6fec54d9 100644 --- a/cps/static/locale/pt-PT/viewer.properties +++ b/cps/static/locale/pt-PT/viewer.properties @@ -140,7 +140,7 @@ toggle_sidebar.title=Alternar barra lateral toggle_sidebar_notification.title=Alternar barra lateral (documento contém contorno/anexos) toggle_sidebar_label=Alternar barra lateral document_outline.title=Mostrar esquema do documento (duplo clique para expandir/colapsar todos os itens) -document_outline_label=Estrutura do documento +document_outline_label=Esquema do documento attachments.title=Mostrar anexos attachments_label=Anexos thumbs.title=Mostrar miniaturas @@ -226,6 +226,10 @@ invalid_file_error=Ficheiro PDF inválido ou danificado. missing_file_error=Ficheiro PDF inexistente. unexpected_response_error=Resposta inesperada do servidor. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/ro/viewer.properties b/cps/static/locale/ro/viewer.properties index 72a4a069..f3a6b83c 100644 --- a/cps/static/locale/ro/viewer.properties +++ b/cps/static/locale/ro/viewer.properties @@ -83,7 +83,7 @@ spread_even_label=Broșare pagini pare document_properties.title=Proprietățile documentului… document_properties_label=Proprietățile documentului… document_properties_file_name=Numele fișierului: -document_properties_file_size=Dimensiunea fișierului: +document_properties_file_size=Mărimea fișierului: # LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}" # will be replaced by the PDF file size in kilobytes, respectively in bytes. document_properties_kb={{size_kb}} KB ({{size_b}} byți) @@ -103,7 +103,7 @@ document_properties_creator=Autor: document_properties_producer=Producător PDF: document_properties_version=Versiune PDF: document_properties_page_count=Număr de pagini: -document_properties_page_size=Dimensiunea paginii: +document_properties_page_size=Mărimea paginii: document_properties_page_size_unit_inches=in document_properties_page_size_unit_millimeters=mm document_properties_page_size_orientation_portrait=portret @@ -214,7 +214,7 @@ rendering_error=A intervenit o eroare la randarea paginii. page_scale_width=Lățimea paginii page_scale_fit=Potrivire la pagină page_scale_auto=Zoom automat -page_scale_actual=Dimensiune reală +page_scale_actual=Mărime reală # LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a # numerical scale value. page_scale_percent={{scale}}% @@ -226,6 +226,10 @@ invalid_file_error=Fișier PDF nevalid sau corupt. missing_file_error=Fișier PDF lipsă. unexpected_response_error=Răspuns neașteptat de la server. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/ru/viewer.properties b/cps/static/locale/ru/viewer.properties index 65eb8768..be8aa5b0 100644 --- a/cps/static/locale/ru/viewer.properties +++ b/cps/static/locale/ru/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Некорректный или повреждённый PDF- missing_file_error=PDF-файл отсутствует. unexpected_response_error=Неожиданный ответ сервера. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/si/viewer.properties b/cps/static/locale/si/viewer.properties index 4137ec1c..9a1d1e8b 100644 --- a/cps/static/locale/si/viewer.properties +++ b/cps/static/locale/si/viewer.properties @@ -58,6 +58,9 @@ page_rotate_ccw.title=වාමාවර්තව භ්‍රමණය page_rotate_ccw.label=වාමාවර්තව භ්‍රමණය page_rotate_ccw_label=වාමාවර්තව භ්‍රමණය +cursor_hand_tool_label=අත් මෙවලම + + # Document properties dialog box document_properties.title=ලේඛන වත්කම්... @@ -83,11 +86,32 @@ document_properties_creator=නිර්මාපක: document_properties_producer=PDF නිශ්පාදක: document_properties_version=PDF නිකුතුව: document_properties_page_count=පිටු ගණන: +document_properties_page_size=පිටුවේ විශාලත්වය: +document_properties_page_size_unit_inches=අඟල් +document_properties_page_size_unit_millimeters=මිමි +document_properties_page_size_orientation_portrait=සිරස් +document_properties_page_size_orientation_landscape=තිරස් +document_properties_page_size_name_a3=A3 +document_properties_page_size_name_a4=A4 +# LOCALIZATION NOTE (document_properties_page_size_dimension_string): +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) +# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string): +# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement, name, and orientation, of the (current) page. +document_properties_page_size_dimension_name_string={{width}}×{{height}}{{unit}}{{name}}{{orientation}} +# LOCALIZATION NOTE (document_properties_linearized): The linearization status of +# the document; usually called "Fast Web View" in English locales of Adobe software. +document_properties_linearized=වේගවත් ජාල දසුන: +document_properties_linearized_yes=ඔව් +document_properties_linearized_no=නැහැ document_properties_close=වසන්න print_progress_message=ලේඛනය මුද්‍රණය සඳහා සූදානම් කරමින්… # LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by # a numerical per cent value. +print_progress_percent={{progress}}% print_progress_close=අවලංගු කරන්න # Tooltips and alt text for side panel toolbar buttons @@ -95,6 +119,7 @@ print_progress_close=අවලංගු කරන්න # tooltips) toggle_sidebar.title=පැති තීරුවට මාරුවන්න toggle_sidebar_label=පැති තීරුවට මාරුවන්න +document_outline_label=ලේඛනයේ පිට මායිම attachments.title=ඇමිණුම් පෙන්වන්න attachments_label=ඇමිණුම් thumbs.title=සිඟිති රූ පෙන්වන්න @@ -111,14 +136,25 @@ thumb_page_title=පිටුව {{page}} thumb_page_canvas=පිටුවෙ සිඟිත රූව {{page}} # Find panel button title and messages +find_input.title=සොයන්න find_previous.title=මේ වාක්‍ය ඛණ්ඩය මීට පෙර යෙදුණු ස්ථානය සොයන්න find_previous_label=පෙර: find_next.title=මේ වාක්‍ය ඛණ්ඩය මීළඟට යෙදෙන ස්ථානය සොයන්න find_next_label=මීළඟ find_highlight=සියල්ල උද්දීපනය find_match_case_label=අකුරු ගළපන්න +find_entire_word_label=සම්පූර්ණ වචන find_reached_top=පිටුවේ ඉහළ කෙළවරට ලගාවිය, පහළ සිට ඉදිරියට යමින් find_reached_bottom=පිටුවේ පහළ කෙළවරට ලගාවිය, ඉහළ සිට ඉදිරියට යමින් +# LOCALIZATION NOTE (find_match_count): The supported plural forms are +# [one|two|few|many|other], with [other] as the default value. +# "{{current}}" and "{{total}}" will be replaced by a number representing the +# index of the currently active find result, respectively a number representing +# the total number of matches in the document. +# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are +# [zero|one|two|few|many|other], with [other] as the default value. +# "{{limit}}" will be replaced by a numerical value. +find_match_count_limit[zero]=ගැලපුම් {{limit}} ට වඩා find_not_found=ඔබ සෙව් වචන හමු නොවීය # Error panel labels diff --git a/cps/static/locale/sk/viewer.properties b/cps/static/locale/sk/viewer.properties index f18c6334..00cf62e3 100644 --- a/cps/static/locale/sk/viewer.properties +++ b/cps/static/locale/sk/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Neplatný alebo poškodený súbor PDF. missing_file_error=Chýbajúci súbor PDF. unexpected_response_error=Neočakávaná odpoveď zo servera. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/sl/viewer.properties b/cps/static/locale/sl/viewer.properties index 073ea3a3..790205de 100644 --- a/cps/static/locale/sl/viewer.properties +++ b/cps/static/locale/sl/viewer.properties @@ -53,12 +53,12 @@ first_page_label=Pojdi na prvo stran last_page.title=Pojdi na zadnjo stran last_page.label=Pojdi na zadnjo stran last_page_label=Pojdi na zadnjo stran -page_rotate_cw.title=Zavrti v smeri urninega kazalca -page_rotate_cw.label=Zavrti v smeri urninega kazalca -page_rotate_cw_label=Zavrti v smeri urninega kazalca -page_rotate_ccw.title=Zavrti v nasprotni smeri urninega kazalca -page_rotate_ccw.label=Zavrti v nasprotni smeri urninega kazalca -page_rotate_ccw_label=Zavrti v nasprotni smeri urninega kazalca +page_rotate_cw.title=Zavrti v smeri urnega kazalca +page_rotate_cw.label=Zavrti v smeri urnega kazalca +page_rotate_cw_label=Zavrti v smeri urnega kazalca +page_rotate_ccw.title=Zavrti v nasprotni smeri urnega kazalca +page_rotate_ccw.label=Zavrti v nasprotni smeri urnega kazalca +page_rotate_ccw_label=Zavrti v nasprotni smeri urnega kazalca cursor_text_select_tool.title=Omogoči orodje za izbor besedila cursor_text_select_tool_label=Orodje za izbor besedila @@ -226,6 +226,10 @@ invalid_file_error=Neveljavna ali pokvarjena datoteka PDF. missing_file_error=Ni datoteke PDF. unexpected_response_error=Nepričakovan odgovor strežnika. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/sq/viewer.properties b/cps/static/locale/sq/viewer.properties index f4b91d1b..153ab56e 100644 --- a/cps/static/locale/sq/viewer.properties +++ b/cps/static/locale/sq/viewer.properties @@ -219,6 +219,10 @@ invalid_file_error=Kartelë PDF e pavlefshme ose e dëmtuar. missing_file_error=Kartelë PDF që mungon. unexpected_response_error=Përgjigje shërbyesi e papritur. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/sv-SE/viewer.properties b/cps/static/locale/sv-SE/viewer.properties index d0da9147..b1b60bd4 100644 --- a/cps/static/locale/sv-SE/viewer.properties +++ b/cps/static/locale/sv-SE/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Ogiltig eller korrupt PDF-fil. missing_file_error=Saknad PDF-fil. unexpected_response_error=Oväntat svar från servern. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/te/viewer.properties b/cps/static/locale/te/viewer.properties index c7bd7855..56f954d4 100644 --- a/cps/static/locale/te/viewer.properties +++ b/cps/static/locale/te/viewer.properties @@ -202,6 +202,10 @@ invalid_file_error=చెల్లని లేదా పాడైన PDF ఫై missing_file_error=దొరకని PDF ఫైలు. unexpected_response_error=అనుకోని సర్వర్ స్పందన. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/th/viewer.properties b/cps/static/locale/th/viewer.properties index 2f401e90..34d46147 100644 --- a/cps/static/locale/th/viewer.properties +++ b/cps/static/locale/th/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=ไฟล์ PDF ไม่ถูกต้องหรือ missing_file_error=ไฟล์ PDF หายไป unexpected_response_error=การตอบสนองของเซิร์ฟเวอร์ที่ไม่คาดคิด +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/tr/viewer.properties b/cps/static/locale/tr/viewer.properties index c1ed154c..792ea052 100644 --- a/cps/static/locale/tr/viewer.properties +++ b/cps/static/locale/tr/viewer.properties @@ -137,10 +137,10 @@ print_progress_close=İptal # (the _label strings are alt text for the buttons, the .title strings are # tooltips) toggle_sidebar.title=Kenar çubuğunu aç/kapat -toggle_sidebar_notification.title=Kenar çubuğunu aç/kapat (Belge anahat/ekler içeriyor) +toggle_sidebar_notification.title=Kenar çubuğunu aç/kapat (Belge ana hat/ekler içeriyor) toggle_sidebar_label=Kenar çubuğunu aç/kapat -document_outline.title=Belge şemasını göster (Tüm öğeleri genişletmek/daraltmak için çift tıklayın) -document_outline_label=Belge şeması +document_outline.title=Belge ana hatlarını göster (Tüm öğeleri genişletmek/daraltmak için çift tıklayın) +document_outline_label=Belge ana hatları attachments.title=Ekleri göster attachments_label=Ekler thumbs.title=Küçük resimleri göster @@ -226,6 +226,10 @@ invalid_file_error=Geçersiz veya bozulmuş PDF dosyası. missing_file_error=PDF dosyası eksik. unexpected_response_error=Beklenmeyen sunucu yanıtı. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/uk/viewer.properties b/cps/static/locale/uk/viewer.properties index 01d02882..6eb22772 100644 --- a/cps/static/locale/uk/viewer.properties +++ b/cps/static/locale/uk/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=Недійсний або пошкоджений PDF-файл missing_file_error=Відсутній PDF-файл. unexpected_response_error=Неочікувана відповідь сервера. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/ur/viewer.properties b/cps/static/locale/ur/viewer.properties index ea6ba27c..31928bcb 100644 --- a/cps/static/locale/ur/viewer.properties +++ b/cps/static/locale/ur/viewer.properties @@ -93,6 +93,7 @@ document_properties_page_size_unit_millimeters=mm document_properties_page_size_orientation_portrait=عمودی انداز document_properties_page_size_name_a3=A3 document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=خط document_properties_page_size_name_legal=قانونی # LOCALIZATION NOTE (document_properties_page_size_dimension_string): # "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by @@ -191,6 +192,9 @@ invalid_file_error=ناجائز یا خراب PDF مسل missing_file_error=PDF مسل غائب ہے۔ unexpected_response_error=غیرمتوقع پیش کار جواب +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/vi/viewer.properties b/cps/static/locale/vi/viewer.properties index 0800f710..39d4b2bd 100644 --- a/cps/static/locale/vi/viewer.properties +++ b/cps/static/locale/vi/viewer.properties @@ -13,7 +13,7 @@ # limitations under the License. # Main toolbar buttons (tooltips and alt text for images) -previous.title=Trang Trước +previous.title=Trang trước previous_label=Trước next.title=Trang Sau next_label=Tiếp @@ -69,7 +69,15 @@ scroll_vertical.title=Sử dụng cuộn dọc scroll_vertical_label=Cuộn dọc scroll_horizontal.title=Sử dụng cuộn ngang scroll_horizontal_label=Cuộn ngang +scroll_wrapped.title=Sử dụng cuộn ngắt dòng +scroll_wrapped_label=Cuộn ngắt dòng +spread_none.title=Không nối rộng trang +spread_none_label=Không có phân cách +spread_odd.title=Nối trang bài bắt đầu với các trang được đánh số lẻ +spread_odd_label=Phân cách theo số lẻ +spread_even.title=Nối trang bài bắt đầu với các trang được đánh số chẵn +spread_even_label=Phân cách theo số chẵn # Document properties dialog box document_properties.title=Thuộc tính của tài liệu… @@ -102,6 +110,7 @@ document_properties_page_size_orientation_portrait=khổ dọc document_properties_page_size_orientation_landscape=khổ ngang document_properties_page_size_name_a3=A3 document_properties_page_size_name_a4=A4 +document_properties_page_size_name_letter=Thư document_properties_page_size_name_legal=Pháp lý # LOCALIZATION NOTE (document_properties_page_size_dimension_string): # "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by @@ -217,6 +226,10 @@ invalid_file_error=Tập tin PDF hỏng hoặc không hợp lệ. missing_file_error=Thiếu tập tin PDF. unexpected_response_error=Máy chủ có phản hồi lạ. +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}}, {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/static/locale/zh-CN/viewer.properties b/cps/static/locale/zh-CN/viewer.properties index 463d9faa..5c4c5367 100644 --- a/cps/static/locale/zh-CN/viewer.properties +++ b/cps/static/locale/zh-CN/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=无效或损坏的 PDF 文件。 missing_file_error=缺少 PDF 文件。 unexpected_response_error=意外的服务器响应。 +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}},{{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). @@ -237,6 +241,6 @@ password_ok=确定 password_cancel=取消 printing_not_supported=警告:此浏览器尚未完整支持打印功能。 -printing_not_ready=警告:该 PDF 未完全载入以供打印。 +printing_not_ready=警告:此 PDF 未完成载入,无法打印。 web_fonts_disabled=Web 字体已被禁用:无法使用嵌入的 PDF 字体。 document_colors_not_allowed=PDF 文档无法使用自己的颜色:浏览器中“允许页面选择自己的颜色”的选项未被勾选。 diff --git a/cps/static/locale/zh-TW/viewer.properties b/cps/static/locale/zh-TW/viewer.properties index 79b8a5cb..70e7a456 100644 --- a/cps/static/locale/zh-TW/viewer.properties +++ b/cps/static/locale/zh-TW/viewer.properties @@ -226,6 +226,10 @@ invalid_file_error=無效或毀損的 PDF 檔案。 missing_file_error=找不到 PDF 檔案。 unexpected_response_error=伺服器回應未預期的內容。 +# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be +# replaced by the modification date, and time, of the annotation. +annotation_date_string={{date}} {{time}} + # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. # "{{type}}" will be replaced with an annotation type from a list defined in # the PDF spec (32000-1:2008 Table 169 – Annotation types). diff --git a/cps/templates/readpdf.html b/cps/templates/readpdf.html index cb415b12..3e74a5a3 100644 --- a/cps/templates/readpdf.html +++ b/cps/templates/readpdf.html @@ -31,20 +31,21 @@ See https://github.com/adobe-type-tools/cmap-resources - + - - + + + - + @@ -52,7 +53,7 @@ See https://github.com/adobe-type-tools/cmap-resources
-
+
- +{% if g.user.role_download() %} - +{% endif %} Current View @@ -219,15 +221,14 @@ See https://github.com/adobe-type-tools/cmap-resources - +{% if g.user.role_download() %} - - - +{% endif %} Current View From 726595e117128b3b373b3ab7a660f7921a58d345 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Mon, 10 Feb 2020 18:34:10 +0100 Subject: [PATCH 26/31] Update for testability --- cps/admin.py | 1 - cps/templates/modal_restriction.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 5d2b3812..d6cf0183 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) diff --git a/cps/templates/modal_restriction.html b/cps/templates/modal_restriction.html index bd13e315..73fd5777 100644 --- a/cps/templates/modal_restriction.html +++ b/cps/templates/modal_restriction.html @@ -31,7 +31,7 @@
From 8b1444ebc218367212a321dbe1013f9ded710ddc Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sat, 15 Feb 2020 09:08:39 +0100 Subject: [PATCH 27/31] Improved testability Less content exposed with restricted content Tornado restart and stop working with systemd --- cps/helper.py | 3 ++- cps/server.py | 5 +++-- cps/templates/layout.html | 4 ++-- cps/templates/search_form.html | 2 +- cps/web.py | 10 ++++++---- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/cps/helper.py b/cps/helper.py index ec5628b3..d446630b 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -723,7 +723,8 @@ def tags_filters(): # Creates for all stored languages a translated speaking name in the array for the UI def speaking_language(languages=None): if not languages: - languages = db.session.query(db.Languages).all() + languages = db.session.query(db.Languages).join(db.books_languages_link).join(db.Books).filter(common_filters())\ + .group_by(text('books_languages_link.lang_code')).all() for lang in languages: try: cur_l = LC.parse(lang.lang_code) diff --git a/cps/server.py b/cps/server.py index 8f060719..17422f35 100755 --- a/cps/server.py +++ b/cps/server.py @@ -55,6 +55,7 @@ class WebServer(object): def __init__(self): signal.signal(signal.SIGINT, self._killServer) signal.signal(signal.SIGTERM, self._killServer) + signal.signal(signal.SIGQUIT, self._killServer) self.wsgiserver = None self.access_logger = None @@ -156,7 +157,7 @@ class WebServer(object): max_buffer_size=209700000, ssl_options=self.ssl_args) http_server.listen(self.listen_port, self.listen_address) - self.wsgiserver = IOLoop.instance() + self.wsgiserver = IOLoop.current() self.wsgiserver.start() # wait for stop signal self.wsgiserver.close(True) @@ -197,4 +198,4 @@ class WebServer(object): if _GEVENT: self.wsgiserver.close() else: - self.wsgiserver.add_callback(self.wsgiserver.stop) + self.wsgiserver.add_callback_from_signal(self.wsgiserver.stop) diff --git a/cps/templates/layout.html b/cps/templates/layout.html index fc0009f9..07a9b5b6 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -44,7 +44,7 @@ - +
@@ -52,7 +52,7 @@ {% endblock %} diff --git a/cps/web.py b/cps/web.py index 848ee9b3..9cb2f808 100644 --- a/cps/web.py +++ b/cps/web.py @@ -962,11 +962,13 @@ def advanced_search(): return render_title_template('search.html', searchterm=searchterm, entries=q, title=_(u"search"), page="search") # prepare data for search-form - # tags = db.session.query(db.Tags).order_by(db.Tags.name).all() - tags = db.session.query(db.Tags).filter(tags_filters()).order_by(db.Tags.name).all() - series = db.session.query(db.Series).order_by(db.Series.name).all() - extensions = db.session.query(db.Data) \ + tags = db.session.query(db.Tags).join(db.books_tags_link).join(db.Books).filter(common_filters())\ + .group_by(text('books_tags_link.tag')).order_by(db.Tags.name).all() + series = db.session.query(db.Series).join(db.books_series_link).join(db.Books).filter(common_filters())\ + .group_by(text('books_series_link.series')).order_by(db.Series.name).filter(common_filters()).all() + extensions = db.session.query(db.Data).join(db.Books).filter(common_filters())\ .group_by(db.Data.format).order_by(db.Data.format).all() + if current_user.filter_language() == u"all": languages = speaking_language() else: From a9a6f5b97e2b4fbc9303feda4c376f2fd62878e8 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sat, 15 Feb 2020 10:21:45 +0100 Subject: [PATCH 28/31] Renamed restrict -> deny --- cps/admin.py | 61 ++++++++++++---------------- cps/config_sql.py | 16 ++++---- cps/helper.py | 11 ++--- cps/templates/modal_restriction.html | 10 ++--- cps/ub.py | 22 +++++----- 5 files changed, 53 insertions(+), 67 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index d6cf0183..c051089d 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -171,10 +171,7 @@ def update_view_configuration(): _config_int("config_random_books") _config_int("config_books_per_page") _config_int("config_authors_max") - - _config_string("config_restricted_tags") _config_int("config_restricted_column") - _config_string("config_restricted_column_value") if config.config_google_drive_watch_changes_response: config.config_google_drive_watch_changes_response = json.dumps(config.config_google_drive_watch_changes_response) @@ -289,14 +286,14 @@ def edit_restriction(type): ub.session.commit() if element['id'].startswith('d'): if type == 0: # Tags as template - elementlist = config.list_restricted_tags() + elementlist = config.list_denied_tags() elementlist[int(element['id'][1:])]=element['Element'] - config.config_restricted_tags = ','.join(elementlist) + config.config_denied_tags = ','.join(elementlist) config.save() if type == 1: # CustomC - elementlist = config.list_restricted_column_values() + elementlist = config.list_denied_column_values() elementlist[int(element['id'][1:])]=element['Element'] - config.config_restricted_column_value = ','.join(elementlist) + config.config_denied_column_value = ','.join(elementlist) config.save() pass if type == 2: # Tags per user @@ -305,9 +302,9 @@ def edit_restriction(type): usr = ub.session.query(ub.User).filter(ub.User.id == int(usr_id)).first() else: usr = current_user - elementlist = usr.list_restricted_tags() + elementlist = usr.list_denied_tags() elementlist[int(element['id'][1:])]=element['Element'] - usr.restricted_tags = ','.join(elementlist) + usr.denied_tags = ','.join(elementlist) ub.session.commit() if type == 3: # CColumn per user usr_id = os.path.split(request.referrer)[-1] @@ -315,9 +312,9 @@ def edit_restriction(type): usr = ub.session.query(ub.User).filter(ub.User.id == int(usr_id)).first() else: usr = current_user - elementlist = usr.list_restricted_column_values() + elementlist = usr.list_denied_column_values() elementlist[int(element['id'][1:])]=element['Element'] - usr.restricted_column_value = ','.join(elementlist) + usr.denied_column_value = ','.join(elementlist) ub.session.commit() return "" @@ -348,14 +345,14 @@ def add_restriction(type): config.config_allowed_tags = restriction_addition(element, config.list_allowed_tags) config.save() elif 'submit_deny' in element: - config.config_restricted_tags = restriction_addition(element, config.list_restricted_tags) + config.config_denied_tags = restriction_addition(element, config.list_denied_tags) config.save() if type == 1: # CCustom as template if 'submit_allow' in element: - config.config_allowed_column_value = restriction_addition(element, config.list_restricted_column_values) + config.config_allowed_column_value = restriction_addition(element, config.list_denied_column_values) config.save() elif 'submit_deny' in element: - config.config_restricted_column_value = restriction_addition(element, config.list_allowed_column_values) + config.config_denied_column_value = restriction_addition(element, config.list_allowed_column_values) config.save() if type == 2: # Tags per user usr_id = os.path.split(request.referrer)[-1] @@ -367,7 +364,7 @@ def add_restriction(type): usr.allowed_tags = restriction_addition(element, usr.list_allowed_tags) ub.session.commit() elif 'submit_deny' in element: - usr.restricted_tags = restriction_addition(element, usr.list_restricted_tags) + usr.denied_tags = restriction_addition(element, usr.list_denied_tags) ub.session.commit() if type == 3: # CustomC per user usr_id = os.path.split(request.referrer)[-1] @@ -379,7 +376,7 @@ def add_restriction(type): usr.allowed_column_value = restriction_addition(element, usr.list_allowed_column_values) ub.session.commit() elif 'submit_deny' in element: - usr.restricted_column_value = restriction_addition(element, usr.list_restricted_column_values) + usr.denied_column_value = restriction_addition(element, usr.list_denied_column_values) ub.session.commit() return "" @@ -393,14 +390,14 @@ def delete_restriction(type): config.config_allowed_tags = restriction_deletion(element, config.list_allowed_tags) config.save() elif element['id'].startswith('d'): - config.config_restricted_tags = restriction_deletion(element, config.list_restricted_tags) + config.config_denied_tags = restriction_deletion(element, config.list_denied_tags) config.save() elif type == 1: # CustomC as template if element['id'].startswith('a'): config.config_allowed_column_value = restriction_deletion(element, config.list_allowed_column_values) config.save() elif element['id'].startswith('d'): - config.config_restricted_column_value = restriction_deletion(element, config.list_restricted_column_values) + config.config_denied_column_value = restriction_deletion(element, config.list_denied_column_values) config.save() elif type == 2: # Tags per user usr_id = os.path.split(request.referrer)[-1] @@ -412,7 +409,7 @@ def delete_restriction(type): usr.allowed_tags = restriction_deletion(element, usr.list_allowed_tags) ub.session.commit() elif element['id'].startswith('d'): - usr.restricted_tags = restriction_deletion(element, usr.list_restricted_tags) + usr.denied_tags = restriction_deletion(element, usr.list_denied_tags) ub.session.commit() elif type == 3: # Columns per user usr_id = os.path.split(request.referrer)[-1] @@ -424,7 +421,7 @@ def delete_restriction(type): usr.allowed_column_value = restriction_deletion(element, usr.list_allowed_column_values) ub.session.commit() elif element['id'].startswith('d'): - usr.restricted_column_value = restriction_deletion(element, usr.list_restricted_column_values) + usr.denied_column_value = restriction_deletion(element, usr.list_denied_column_values) ub.session.commit() return "" @@ -436,13 +433,13 @@ def delete_restriction(type): def list_restriction(type): if type == 0: # Tags as template restrict = [{'Element': x, 'type':_('deny'), 'id': 'd'+str(i) } - for i,x in enumerate(config.list_restricted_tags()) if x != '' ] + for i,x in enumerate(config.list_denied_tags()) if x != '' ] allow = [{'Element': x, 'type':_('allow'), 'id': 'a'+str(i) } for i,x in enumerate(config.list_allowed_tags()) if x != ''] json_dumps = restrict + allow elif type == 1: # CustomC as template restrict = [{'Element': x, 'type':_('deny'), 'id': 'd'+str(i) } - for i,x in enumerate(config.list_restricted_column_values()) if x != '' ] + for i,x in enumerate(config.list_denied_column_values()) if x != '' ] allow = [{'Element': x, 'type':_('allow'), 'id': 'a'+str(i) } for i,x in enumerate(config.list_allowed_column_values()) if x != ''] json_dumps = restrict + allow @@ -453,7 +450,7 @@ def list_restriction(type): else: usr = current_user restrict = [{'Element': x, 'type':_('deny'), 'id': 'd'+str(i) } - for i,x in enumerate(usr.list_restricted_tags()) if x != '' ] + for i,x in enumerate(usr.list_denied_tags()) if x != '' ] allow = [{'Element': x, 'type':_('allow'), 'id': 'a'+str(i) } for i,x in enumerate(usr.list_allowed_tags()) if x != ''] json_dumps = restrict + allow @@ -464,7 +461,7 @@ def list_restriction(type): else: usr = current_user restrict = [{'Element': x, 'type':_('deny'), 'id': 'd'+str(i) } - for i,x in enumerate(usr.list_restricted_column_values()) if x != '' ] + for i,x in enumerate(usr.list_denied_column_values()) if x != '' ] allow = [{'Element': x, 'type':_('allow'), 'id': 'a'+str(i) } for i,x in enumerate(usr.list_allowed_column_values()) if x != ''] json_dumps = restrict + allow @@ -726,10 +723,10 @@ def new_user(): else: content.role = config.config_default_role content.sidebar_view = config.config_default_show - content.restricted_tags = config.config_restricted_tags - content.restricted_column = config.config_restricted_column - content.restricted_column_value = config.config_restricted_column_value - # content.mature_content = bool(config.config_default_show & constants.MATURE_CONTENT) + content.allowed_tags = config.config_allowed_tags + content.denied_tags = config.config_denied_tags + content.allowed_column_value = config.config_allowed_column_value + content.allowed_column_value = config.config_denied_column_value return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, languages=languages, title=_(u"Add new user"), page="newuser", kobo_support=kobo_support, registered_oauth=oauth_check) @@ -833,14 +830,6 @@ def edit_user(user_id): else: content.sidebar_view &= ~constants.DETAIL_RANDOM - # content.mature_content = "Show_mature_content" in to_save - if "restricted_tags" in to_save: - content.restricted_tags = to_save["restricted_tags"] - if "config_restricted_column" in to_save: - content.restricted_tags = to_save["config_restricted_column"] - if "config_restricted_column_value" in to_save: - content.restricted_tags = to_save["config_restricted_column_value"] - if "default_language" in to_save: content.default_language = to_save["default_language"] if "locale" in to_save and to_save["locale"]: diff --git a/cps/config_sql.py b/cps/config_sql.py index f887f706..d6edcaf0 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -74,10 +74,10 @@ class _Settings(_Base): config_default_show = Column(SmallInteger, default=6143) config_columns_to_ignore = Column(String) - config_restricted_tags = Column(String, default="") + config_denied_tags = Column(String, default="") config_allowed_tags = Column(String, default="") config_restricted_column = Column(SmallInteger, default=0) - config_restricted_column_value = Column(String, default="") + config_denied_column_value = Column(String, default="") config_allowed_column_value = Column(String, default="") config_use_google_drive = Column(Boolean, default=False) @@ -186,16 +186,16 @@ class _ConfigSQL(object): def show_detail_random(self): return self.show_element_new_user(constants.DETAIL_RANDOM) - def list_restricted_tags(self): - mct = self.config_restricted_tags.split(",") + def list_denied_tags(self): + mct = self.config_denied_tags.split(",") return [t.strip() for t in mct] def list_allowed_tags(self): mct = self.config_allowed_tags.split(",") return [t.strip() for t in mct] - def list_restricted_column_values(self): - mct = self.config_restricted_column_value.split(",") + def list_denied_column_values(self): + mct = self.config_denied_column_value.split(",") return [t.strip() for t in mct] def list_allowed_column_values(self): @@ -341,8 +341,8 @@ def load_configuration(session): session.commit() conf = _ConfigSQL(session) # Migrate from global restrictions to user based restrictions - if bool(conf.config_default_show & constants.MATURE_CONTENT) and conf.config_restricted_tags == "": - conf.config_restricted_tags = conf.config_mature_content_tags + if bool(conf.config_default_show & constants.MATURE_CONTENT) and conf.config_denied_tags == "": + conf.config_denied_tags = conf.config_mature_content_tags conf.save() session.query(ub.User).filter(ub.User.mature_content != True). \ update({"restricted_tags": conf.config_mature_content_tags}, synchronize_session=False) diff --git a/cps/helper.py b/cps/helper.py index d446630b..923ab312 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -688,20 +688,17 @@ def common_filters(): lang_filter = db.Books.languages.any(db.Languages.lang_code == current_user.filter_language()) else: lang_filter = true() - negtags_list = current_user.list_restricted_tags() + negtags_list = current_user.list_denied_tags() postags_list = current_user.list_allowed_tags() neg_content_tags_filter = false() if negtags_list == [''] else db.Books.tags.any(db.Tags.name.in_(negtags_list)) pos_content_tags_filter = true() if postags_list == [''] else db.Books.tags.any(db.Tags.name.in_(postags_list)) - # db.session.query(db.Books).filter(db.Books.custom_column_5.any(db.cc_classes[5].value == 'nikto')).first() - # db.session.query(db.Books).filter( - # getattr(db.Books, 'custom_column_' + str(5)).any(db.cc_classes[5].value == 'nikto').first()) if config.config_restricted_column: pos_cc_list = current_user.allowed_column_value.split(',') pos_content_cc_filter = true() if pos_cc_list == [''] else \ getattr(db.Books, 'custom_column_' + str(config.config_restricted_column)).\ any(db.cc_classes[config.config_restricted_column].value.in_(pos_cc_list)) - neg_cc_list = current_user.restricted_column_value.split(',') - neg_content_cc_filter = true() if neg_cc_list == [''] else \ + neg_cc_list = current_user.denied_column_value.split(',') + neg_content_cc_filter = false() if neg_cc_list == [''] else \ getattr(db.Books, 'custom_column_' + str(config.config_restricted_column)).\ any(db.cc_classes[config.config_restricted_column].value.in_(neg_cc_list)) else: @@ -712,7 +709,7 @@ def common_filters(): def tags_filters(): - negtags_list = current_user.list_restricted_tags() + negtags_list = current_user.list_denied_tags() postags_list = current_user.list_allowed_tags() neg_content_tags_filter = false() if negtags_list == [''] else db.Tags.name.in_(negtags_list) pos_content_tags_filter = true() if postags_list == [''] else db.Tags.name.in_(postags_list) diff --git a/cps/templates/modal_restriction.html b/cps/templates/modal_restriction.html index 73fd5777..ede585d7 100644 --- a/cps/templates/modal_restriction.html +++ b/cps/templates/modal_restriction.html @@ -3,10 +3,10 @@
{{_('Create/View')}} diff --git a/cps/web.py b/cps/web.py index 5c535e8d..bd168e53 100644 --- a/cps/web.py +++ b/cps/web.py @@ -43,7 +43,7 @@ from werkzeug.exceptions import default_exceptions from werkzeug.datastructures import Headers from werkzeug.security import generate_password_hash, check_password_hash -from . import constants, config, logger, isoLanguages, services, worker +from . import constants, logger, isoLanguages, services, worker from . import searched_ids, lm, babel, db, ub, config, get_locale, app from .gdriveutils import getFileFromEbooksFolder, do_gdrive_download from .helper import common_filters, get_search_results, fill_indexpage, speaking_language, check_valid_domain, \ @@ -1287,10 +1287,12 @@ def profile(): downloads = list() languages = speaking_language() translations = babel.list_translations() + [LC('en')] + kobo_support = feature_support['kobo'] and config.config_kobo_sync if feature_support['oauth']: oauth_status = get_oauth_status() else: oauth_status = None + for book in current_user.downloads: downloadBook = db.session.query(db.Books).filter(db.Books.id == book.book_id).first() if downloadBook: @@ -1312,7 +1314,7 @@ def profile(): flash(_(u"E-mail is not from valid domain"), category="error") return render_title_template("user_edit.html", content=current_user, downloads=downloads, title=_(u"%(name)s's profile", name=current_user.nickname), page="me", - feature_support=feature_support, + kobo_support=kobo_support, registered_oauth=oauth_check, oauth_status=oauth_status) if "nickname" in to_save and to_save["nickname"] != current_user.nickname: # Query User nickname, if not existing, change @@ -1323,7 +1325,7 @@ def profile(): return render_title_template("user_edit.html", translations=translations, languages=languages, - feature_support=feature_support, + kobo_support=kobo_support, new_user=0, content=current_user, downloads=downloads, registered_oauth=oauth_check, @@ -1355,13 +1357,13 @@ def profile(): flash(_(u"Found an existing account for this e-mail address."), category="error") log.debug(u"Found an existing account for this e-mail address.") return render_title_template("user_edit.html", content=current_user, downloads=downloads, - translations=translations, feature_support=feature_support, + translations=translations, kobo_support=kobo_support, title=_(u"%(name)s's profile", name=current_user.nickname), page="me", registered_oauth=oauth_check, oauth_status=oauth_status) flash(_(u"Profile updated"), category="success") log.debug(u"Profile updated") return render_title_template("user_edit.html", translations=translations, profile=1, languages=languages, - content=current_user, downloads=downloads, feature_support=feature_support, + content=current_user, downloads=downloads, kobo_support=kobo_support, title= _(u"%(name)s's profile", name=current_user.nickname), page="me", registered_oauth=oauth_check, oauth_status=oauth_status) diff --git a/optional-requirements.txt b/optional-requirements.txt index a1024626..2598c526 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -32,6 +32,7 @@ rarfile>=2.7 # other natsort>=2.2.0 git+https://github.com/OzzieIsaacs/comicapi.git@ad8bfe5a1c31db882480433f86db2c5c57634a3f#egg=comicapi -#kobo integration + +#Kobo integration jsonschema>=3.2.0 From 00dafe3121ce7b7f36f7b8d52182da0d3225fa71 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Mon, 27 Jan 2020 20:34:36 +0100 Subject: [PATCH 13/31] Fix restrict columns --- cps/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/helper.py b/cps/helper.py index 93ce1b07..6e6c1895 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -810,7 +810,7 @@ def get_cc_columns(): cc = [] for col in tmpcc: r = re.compile(config.config_columns_to_ignore) - if r.match(col.label): + if not r.match(col.name): cc.append(col) else: cc = tmpcc From 0f7d272e13ac8c90afdaedb7cdf2d44f770e649c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Heroudek?= Date: Tue, 28 Jan 2020 10:03:40 +0000 Subject: [PATCH 14/31] Update messages.po --- cps/translations/cs/LC_MESSAGES/messages.po | 46 ++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/cps/translations/cs/LC_MESSAGES/messages.po b/cps/translations/cs/LC_MESSAGES/messages.po index 4e8bf425..6708e822 100644 --- a/cps/translations/cs/LC_MESSAGES/messages.po +++ b/cps/translations/cs/LC_MESSAGES/messages.po @@ -79,7 +79,7 @@ msgstr "Byl nalezen existující účet pro tuto e-mailovou adresu nebo přezdí #: cps/admin.py:489 #, python-format msgid "User '%(user)s' created" -msgstr "Uživatel ‘%(user)s’ vytvořen" +msgstr "Uživatel '%(user)s' vytvořen" #: cps/admin.py:509 msgid "Edit e-mail server settings" @@ -205,7 +205,7 @@ msgstr "není nakonfigurováno" #: cps/editbooks.py:214 cps/editbooks.py:396 msgid "Error opening eBook. File does not exist or file is not accessible" -msgstr "Chyba otevírání eKnihy. Soubor neexistuje nebo není přístupný" +msgstr "Chyba otevírání eknihy. Soubor neexistuje nebo není přístupný" #: cps/editbooks.py:242 msgid "edit metadata" @@ -214,11 +214,11 @@ msgstr "upravit metadata" #: cps/editbooks.py:321 cps/editbooks.py:569 #, python-format msgid "File extension '%(ext)s' is not allowed to be uploaded to this server" -msgstr "Soubor s příponou ‘%(ext)s’ nelze odeslat na tento server" +msgstr "Soubor s příponou '%(ext)s' nelze odeslat na tento server" #: cps/editbooks.py:325 cps/editbooks.py:573 msgid "File to be uploaded must have an extension" -msgstr "Soubor, který má být odeslán, musí mít příponu" +msgstr "Soubor, který má být odeslán musí mít příponu" #: cps/editbooks.py:337 cps/editbooks.py:607 #, python-format @@ -296,7 +296,7 @@ msgstr "Při převodu této knihy došlo k chybě: %(res)s" #: cps/gdrive.py:62 msgid "Google Drive setup not completed, try to deactivate and activate Google Drive again" -msgstr "Google Drive nastavení nebylo dokončeno, zkuste znovu deaktivovat a aktivovat Google Drive" +msgstr "Google Drive nastavení nebylo dokončeno, zkuste znovu deaktivovat a aktivovat Google Drive" #: cps/gdrive.py:104 msgid "Callback domain is not verified, please follow steps to verify domain in google developer console" @@ -366,17 +366,17 @@ msgstr "Požadovaný soubor nelze přečíst. Možná nesprávná oprávnění?" #: cps/helper.py:322 #, python-format msgid "Rename title from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "Přejmenování názvu z: ‘%(src)s‘ na ‘%(dest)s' selhalo chybou: %(error)s" +msgstr "Přejmenování názvu z: '%(src)s' na '%(dest)s' selhalo chybou: %(error)s" #: cps/helper.py:332 #, python-format msgid "Rename author from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "Přejmenovat autora z: ‘%(src)s‘ na ‘%(dest)s’ selhalo chybou: %(error)s" +msgstr "Přejmenovat autora z: '%(src)s' na '%(dest)s' selhalo chybou: %(error)s" #: cps/helper.py:346 #, python-format msgid "Rename file in path '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "Přejmenování souboru v cestě ‘%(src)s‘ na ‘%(dest)s‘ selhalo chybou: %(error)s" +msgstr "Přejmenování souboru v cestě '%(src)s' na '%(dest)s' selhalo chybou: %(error)s" #: cps/helper.py:372 cps/helper.py:382 cps/helper.py:390 #, python-format @@ -528,7 +528,7 @@ msgstr "Lituji, nejste oprávněni odebrat knihu z této police: %(sname)s" #: cps/shelf.py:207 cps/shelf.py:231 #, python-format msgid "A shelf with the name '%(title)s' already exists." -msgstr "Police s názvem ‘%(title)s’ již existuje." +msgstr "Police s názvem '%(title)s' již existuje." #: cps/shelf.py:212 #, python-format @@ -555,7 +555,7 @@ msgstr "Upravit polici" #: cps/shelf.py:289 #, python-format msgid "Shelf: '%(name)s'" -msgstr "Police: ’%(name)s’" +msgstr "Police: '%(name)s'" #: cps/shelf.py:292 msgid "Error opening shelf. Shelf does not exist or is not accessible" @@ -564,7 +564,7 @@ msgstr "Chyba otevírání police. Police neexistuje nebo není přístupná" #: cps/shelf.py:323 #, python-format msgid "Change order of Shelf: '%(name)s'" -msgstr "Změnit pořadí Police: ‘%(name)s’" +msgstr "Změnit pořadí Police: '%(name)s'" #: cps/ub.py:57 msgid "Recently Added" @@ -858,7 +858,7 @@ msgstr "Nelze aktivovat ověření LDAP" #: cps/web.py:1151 cps/web.py:1278 #, python-format msgid "you are now logged in as: '%(nickname)s'" -msgstr "nyní jste přihlášeni jako: ‘%(nickname)s’" +msgstr "nyní jste přihlášeni jako: '%(nickname)s'" #: cps/web.py:1156 msgid "Could not login. LDAP server down, please contact your administrator" @@ -1153,7 +1153,7 @@ msgstr "Převést formát knihy:" #: cps/templates/book_edit.html:30 msgid "Convert from:" -msgstr "Převest z:" +msgstr "Převést z:" #: cps/templates/book_edit.html:32 cps/templates/book_edit.html:39 msgid "select an option" @@ -1165,7 +1165,7 @@ msgstr "Převést do:" #: cps/templates/book_edit.html:46 msgid "Convert book" -msgstr "Převest knihu" +msgstr "Převést knihu" #: cps/templates/book_edit.html:55 cps/templates/search_form.html:6 msgid "Book Title" @@ -1341,7 +1341,7 @@ msgstr "Server port" #: cps/templates/config_edit.html:91 msgid "SSL certfile location (leave it empty for non-SSL Servers)" -msgstr "Umístění certifikátu SSL (ponechejte prázdné u serverů jiných než SSL)" +msgstr "Umístění certifikátu SSL (ponechte prázdné pro servery jiné než SSL)" #: cps/templates/config_edit.html:95 msgid "SSL Keyfile location (leave it empty for non-SSL Servers)" @@ -1405,7 +1405,7 @@ msgstr "Povolit veřejnou registraci" #: cps/templates/config_edit.html:170 msgid "Enable remote login (\"magic link\")" -msgstr "Povolit vzdálené přihlášení (\\“magic link\\”)" +msgstr "Povolit vzdálené přihlášení (\\"magic link\\")" #: cps/templates/config_edit.html:175 msgid "Use Goodreads" @@ -1495,12 +1495,12 @@ msgstr "Obtain %(provider)s OAuth Credential" #: cps/templates/config_edit.html:263 #, python-format msgid "%(provider)s OAuth Client Id" -msgstr "%(provider)s OAuth Client Id" +msgstr "%(provider)s OAuth Klient Id" #: cps/templates/config_edit.html:267 #, python-format msgid "%(provider)s OAuth Client Secret" -msgstr "%(provider)s OAuth Client Secret" +msgstr "%(provider)s OAuth Klient Tajemství" #: cps/templates/config_edit.html:276 msgid "Allow Reverse Proxy Authentication" @@ -1532,7 +1532,7 @@ msgstr "Nastavení převaděče eknih" #: cps/templates/config_edit.html:312 msgid "Path to convertertool" -msgstr "Cesta k převáděči" +msgstr "Cesta k převaděči" #: cps/templates/config_edit.html:318 msgid "Location of Unrar binary" @@ -1577,7 +1577,7 @@ msgstr "Regulární výraz pro ignorování sloupců" #: cps/templates/config_view_edit.html:46 msgid "Link read/unread status to Calibre column" -msgstr "Propojit stav čtení/nepřečtení do sloupce Calibre" +msgstr "Propojit stav čtení/nepřečtení do sloupce Calibre" #: cps/templates/config_view_edit.html:55 msgid "Regular expression for title sorting" @@ -1625,7 +1625,7 @@ msgstr "Povolit úpravy veřejných polic" #: cps/templates/config_view_edit.html:119 msgid "Default visibilities for new users" -msgstr "Výchozí viditelnosti pro nové uživatele" +msgstr "Výchozí zobrazení pro nové uživatele" #: cps/templates/config_view_edit.html:135 cps/templates/user_edit.html:76 msgid "Show random books in detail view" @@ -2337,7 +2337,7 @@ msgstr "Nedávná stahování" #~ msgstr "Prohlížeč PDF.js" #~ msgid "Preparing document for printing..." -#~ msgstr "Příprava dokumentu pro tisk …" +#~ msgstr "Příprava dokumentu pro tisk..." #~ msgid "Using your another device, visit" #~ msgstr "Pomocí jiného zařízení navštivte" @@ -3315,7 +3315,7 @@ msgstr "Nedávná stahování" #~ msgstr "Selkup" #~ msgid "Irish; Old (to 900)" -#~ msgstr "Irlandese antico (fino al ’900)" +#~ msgstr "Irlandese antico (fino al 900)" #~ msgid "Shan" #~ msgstr "Shan" From 0bb0cbaef02f65f058d782a14faadbf88d851f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jerzy=20Pi=C4=85tek?= Date: Tue, 28 Jan 2020 22:28:58 +0100 Subject: [PATCH 15/31] Updated polish translations --- cps/translations/pl/LC_MESSAGES/messages.po | 196 ++++++++++---------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/cps/translations/pl/LC_MESSAGES/messages.po b/cps/translations/pl/LC_MESSAGES/messages.po index 3ab96c1d..45646953 100644 --- a/cps/translations/pl/LC_MESSAGES/messages.po +++ b/cps/translations/pl/LC_MESSAGES/messages.po @@ -10,7 +10,7 @@ msgstr "" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2020-01-27 18:16+0100\n" "PO-Revision-Date: 2019-08-18 22:06+0200\n" -"Last-Translator: Radosław Kierznowski \n" +"Last-Translator: Jerzy Piątek \n" "Language: pl\n" "Language-Team: \n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" @@ -48,7 +48,7 @@ msgstr "Nieznany" #: cps/admin.py:129 msgid "Admin page" -msgstr " Panel administratora" +msgstr "Panel administratora" #: cps/admin.py:148 cps/templates/admin.html:115 msgid "UI Configuration" @@ -100,7 +100,7 @@ msgstr "Wystąpił błąd podczas wysyłania e-maila testowego: %(res)s" #: cps/admin.py:540 msgid "Please configure your e-mail address first..." -msgstr "" +msgstr "Najpierw skonfiguruj swój adres e-mail..." #: cps/admin.py:542 msgid "E-mail server settings updated" @@ -126,7 +126,7 @@ msgstr "Edytuj użytkownika %(nick)s" #: cps/admin.py:622 cps/web.py:1324 msgid "This username is already taken" -msgstr "" +msgstr "Nazwa użytkownika jest już zajęta" #: cps/admin.py:637 #, python-format @@ -194,7 +194,7 @@ msgstr "" #: cps/admin.py:722 cps/updater.py:274 cps/updater.py:461 msgid "Connection error" -msgstr "" +msgstr "Błąd połączenia" #: cps/admin.py:723 cps/updater.py:276 cps/updater.py:463 msgid "Timeout while establishing connection" @@ -206,7 +206,7 @@ msgstr "" #: cps/converter.py:31 msgid "not configured" -msgstr "" +msgstr "nie skonfigurowane" #: cps/editbooks.py:214 cps/editbooks.py:396 msgid "Error opening eBook. File does not exist or file is not accessible" @@ -265,11 +265,11 @@ msgstr "Błąd podczas edycji książki, sprawdź plik logu, aby uzyskać szczeg #: cps/editbooks.py:581 #, python-format msgid "File %(filename)s could not saved to temp dir" -msgstr "" +msgstr "Nie można zapisać pliku %(filename)s w katalogu tymczasowym" #: cps/editbooks.py:598 msgid "Uploaded book probably exists in the library, consider to change before upload new: " -msgstr "" +msgstr "Przesłana książka prawdopodobnie istnieje w bibliotece, rozważ zmianę przed przesłaniem nowej: " #: cps/editbooks.py:613 #, python-format @@ -479,7 +479,7 @@ msgstr "" #: cps/shelf.py:47 cps/shelf.py:99 msgid "Invalid shelf specified" -msgstr "" +msgstr "Podano niewłaściwą półkę" #: cps/shelf.py:54 #, python-format @@ -488,12 +488,12 @@ msgstr "" #: cps/shelf.py:62 msgid "You are not allowed to edit public shelves" -msgstr "" +msgstr "Nie masz uprawnień do edytowania publicznej półki" #: cps/shelf.py:71 #, python-format msgid "Book is already part of the shelf: %(shelfname)s" -msgstr "" +msgstr "Książka jest już dodana do półki" #: cps/shelf.py:85 #, python-format @@ -503,26 +503,26 @@ msgstr "Książka została dodana do półki: %(sname)s" #: cps/shelf.py:104 #, python-format msgid "You are not allowed to add a book to the the shelf: %(name)s" -msgstr "" +msgstr "Nie masz uprawnień do dodania ksiażki do półki: %(name)s" #: cps/shelf.py:109 msgid "User is not allowed to edit public shelves" -msgstr "" +msgstr "Użytkownik nie ma uprawnień do edytowania publicznych półek" #: cps/shelf.py:127 #, python-format msgid "Books are already part of the shelf: %(name)s" -msgstr "" +msgstr "Książki są już dodane do półki: %(name)s" #: cps/shelf.py:141 #, python-format msgid "Books have been added to shelf: %(sname)s" -msgstr "" +msgstr "Książki zostały dodane do półki %(sname)s" #: cps/shelf.py:143 #, python-format msgid "Could not add books to shelf: %(sname)s" -msgstr "" +msgstr "Nie można dodać książek do półki: %(sname)s" #: cps/shelf.py:180 #, python-format @@ -532,7 +532,7 @@ msgstr "Książka została usunięta z półki: %(sname)s" #: cps/shelf.py:186 #, python-format msgid "Sorry you are not allowed to remove a book from this shelf: %(sname)s" -msgstr "" +msgstr "Niestety nie możesz usunąć książki z tej półki %(sname)s" #: cps/shelf.py:207 cps/shelf.py:231 #, python-format @@ -568,7 +568,7 @@ msgstr "Półka: '%(name)s'" #: cps/shelf.py:292 msgid "Error opening shelf. Shelf does not exist or is not accessible" -msgstr "" +msgstr "Błąd otwierania półki. Półka nie istnieje lub jest niedostępna" #: cps/shelf.py:323 #, python-format @@ -615,7 +615,7 @@ msgstr "Nieprzeczytane książki" #: cps/ub.py:73 msgid "Show unread" -msgstr "" +msgstr "Pokaż nieprzeczytane" #: cps/ub.py:74 msgid "Discover" @@ -688,28 +688,28 @@ msgstr "" #: cps/updater.py:259 cps/updater.py:365 msgid "No update available. You already have the latest version installed" -msgstr "" +msgstr "Brak dostępnej aktualizacji. Masz już zainstalowaną najnowszą wersję" #: cps/updater.py:285 msgid "A new update is available. Click on the button below to update to the latest version." -msgstr "" +msgstr "Dostępna jest nowa aktualizacja. Kliknij przycisk poniżej, aby zaktualizować do najnowszej wersji." #: cps/updater.py:338 msgid "Could not fetch update information" -msgstr "" +msgstr "Nie można pobrać informacji o aktualizacji" #: cps/updater.py:352 msgid "No release information available" -msgstr "" +msgstr "Brak dostępnych informacji o wersji" #: cps/updater.py:405 cps/updater.py:414 #, python-format msgid "A new update is available. Click on the button below to update to version: %(version)s" -msgstr "" +msgstr "Dostępna jest nowa aktualizacja. Kliknij przycisk poniżej, aby zaktualizować do wersji: %(version)s" #: cps/updater.py:424 msgid "Click on the button below to update to the latest stable version." -msgstr "" +msgstr "Kliknij przycisk poniżej, aby zaktualizować do najnowszej stabilnej wersji." #: cps/web.py:486 msgid "Recently Added Books" @@ -796,7 +796,7 @@ msgstr "Lista kategorii" #: cps/templates/layout.html:73 cps/web.py:807 msgid "Tasks" -msgstr " Zadania" +msgstr "Zadania" #: cps/templates/feed.xml:33 cps/templates/layout.html:44 #: cps/templates/layout.html:45 cps/web.py:827 cps/web.py:829 @@ -841,7 +841,7 @@ msgstr "Najpierw skonfiguruj adres e-mail Kindla..." #: cps/web.py:1084 msgid "E-Mail server is not configured, please contact your administrator!" -msgstr "" +msgstr "Serwer e-mail nie jest skonfigurowany, skontaktuj się z administratorem!" #: cps/web.py:1085 cps/web.py:1091 cps/web.py:1116 cps/web.py:1120 #: cps/web.py:1125 cps/web.py:1129 @@ -879,11 +879,11 @@ msgstr "Błędna nazwa użytkownika lub hasło" #: cps/web.py:1167 msgid "New Password was send to your email address" -msgstr "" +msgstr "Nowe hasło zostało wysłane na Twój adres e-mail" #: cps/web.py:1173 msgid "Please enter valid username to reset password" -msgstr "" +msgstr "Wprowadź prawidłową nazwę użytkownika, aby zresetować hasło" #: cps/web.py:1179 #, python-format @@ -957,7 +957,7 @@ msgstr "DLS" # ??? #: cps/templates/admin.html:16 cps/templates/layout.html:76 msgid "Admin" -msgstr " Panel administratora" +msgstr "Panel administratora" # ??? #: cps/templates/admin.html:17 cps/templates/detail.html:18 @@ -1040,7 +1040,7 @@ msgstr "Publiczna rejestracja" #: cps/templates/admin.html:100 cps/templates/remote_login.html:4 msgid "Remote login" -msgstr "" +msgstr "Zdalne logowanie" #: cps/templates/admin.html:104 msgid "Reverse proxy login" @@ -1048,7 +1048,7 @@ msgstr "" #: cps/templates/admin.html:109 msgid "Reverse proxy header name" -msgstr "" +msgstr "Nazwa nagłówka reverse proxy" #: cps/templates/admin.html:121 msgid "Administration" @@ -1127,7 +1127,7 @@ msgstr "" #: cps/templates/author.html:23 msgid "In Library" -msgstr "" +msgstr "W Bibliotece" # ??? #: cps/templates/author.html:34 cps/templates/list.html:14 @@ -1144,7 +1144,7 @@ msgstr "" #: cps/templates/author.html:94 msgid "More by" -msgstr "" +msgstr "Więcej według" #: cps/templates/book_edit.html:12 msgid "Delete Book" @@ -1213,7 +1213,7 @@ msgstr "" #: cps/templates/book_edit.html:87 msgid "Upload Cover from local drive" -msgstr "" +msgstr "Prześlij okładkę z dysku lokalnego" #: cps/templates/book_edit.html:92 cps/templates/detail.html:165 msgid "Publishing date" @@ -1320,15 +1320,15 @@ msgstr "Użyć dysku Google?" #: cps/templates/config_edit.html:31 msgid "Google Drive config problem" -msgstr "" +msgstr "Problem z konfiguracją Dysku Google" #: cps/templates/config_edit.html:37 msgid "Authenticate Google Drive" -msgstr "" +msgstr "Uwierzytelnij Dysk Google" #: cps/templates/config_edit.html:41 msgid "Please hit submit to continue with setup" -msgstr "" +msgstr "Kliknij przycisk, aby kontynuować instalację" #: cps/templates/config_edit.html:44 msgid "Please finish Google Drive setup after login" @@ -1369,11 +1369,11 @@ msgstr "Kanał aktualizacji" #: cps/templates/config_edit.html:101 msgid "Stable" -msgstr "" +msgstr "Stabilna" #: cps/templates/config_edit.html:102 msgid "Stable (Automatic)" -msgstr "" +msgstr "Stablina (Automatycznie)" #: cps/templates/config_edit.html:103 msgid "Nightly" @@ -1425,15 +1425,15 @@ msgstr "Włącz zdalne logowanie (\"magic link\")" #: cps/templates/config_edit.html:175 msgid "Use Goodreads" -msgstr "" +msgstr "Użyj Goodreads" #: cps/templates/config_edit.html:176 msgid "Obtain an API Key" -msgstr "" +msgstr "Uzyskaj klucz API" #: cps/templates/config_edit.html:180 msgid "Goodreads API Key" -msgstr "" +msgstr "Klucz API Goodreads " #: cps/templates/config_edit.html:184 msgid "Goodreads API Secret" @@ -1441,55 +1441,55 @@ msgstr "" #: cps/templates/config_edit.html:191 msgid "Login type" -msgstr "" +msgstr "Rodzaj logowania" #: cps/templates/config_edit.html:193 msgid "Use standard Authentication" -msgstr "" +msgstr "Użyj standardowego uwierzytelnienia" #: cps/templates/config_edit.html:195 msgid "Use LDAP Authentication" -msgstr "" +msgstr "Użyj uwierzytelniania LDAP" #: cps/templates/config_edit.html:198 msgid "Use OAuth" -msgstr "" +msgstr "Uzyj OAuth" #: cps/templates/config_edit.html:205 msgid "LDAP Server Host Name or IP Address" -msgstr "" +msgstr "Nazwa hosta lub adres IP serwera LDAP" #: cps/templates/config_edit.html:209 msgid "LDAP Server Port" -msgstr "" +msgstr "Port serwera LDAP" #: cps/templates/config_edit.html:213 msgid "LDAP schema (ldap or ldaps)" -msgstr "" +msgstr "Schemat LDAP (ldap lub ldaps)" #: cps/templates/config_edit.html:217 msgid "LDAP Admin username" -msgstr "" +msgstr "Nazwa administratora LDAP" #: cps/templates/config_edit.html:221 msgid "LDAP Admin password" -msgstr "" +msgstr "Hasło administratora LDAP" #: cps/templates/config_edit.html:226 msgid "LDAP Server use SSL" -msgstr "" +msgstr "Serwer LDAP korzysta z protokołu SSL" #: cps/templates/config_edit.html:230 msgid "LDAP Server use TLS" -msgstr "" +msgstr "Serwer LDAP korzysta z TLS" #: cps/templates/config_edit.html:234 msgid "LDAP Server Certificate" -msgstr "" +msgstr "Certyfikat serwera LDAP" #: cps/templates/config_edit.html:238 msgid "LDAP SSL Certificate Path" -msgstr "" +msgstr "Ścieżka certyfikatu SSL LDAP" #: cps/templates/config_edit.html:243 msgid "LDAP Distinguished Name (DN)" @@ -1501,7 +1501,7 @@ msgstr "" #: cps/templates/config_edit.html:252 msgid "LDAP Server is OpenLDAP?" -msgstr "" +msgstr "Serwer LDAP to OpenLDAP?" #: cps/templates/config_edit.html:260 #, python-format @@ -1524,7 +1524,7 @@ msgstr "" #: cps/templates/config_edit.html:280 msgid "Reverse Proxy Header Name" -msgstr "" +msgstr "Nazwa nagłowka reverse proxy" #: cps/templates/config_edit.html:292 msgid "External binaries" @@ -1552,7 +1552,7 @@ msgstr "Lokalizacja do pliku konwertera" #: cps/templates/config_edit.html:318 msgid "Location of Unrar binary" -msgstr "" +msgstr "Lokalizacja pliku binarnego Unrar" #: cps/templates/config_edit.html:334 cps/templates/layout.html:84 #: cps/templates/login.html:4 @@ -1565,7 +1565,7 @@ msgstr "Konfiguracja Widoku" #: cps/templates/config_view_edit.html:19 cps/templates/shelf_edit.html:7 msgid "Title" -msgstr "Nazwa serwera" +msgstr "Nazwa" #: cps/templates/config_view_edit.html:27 msgid "No. of random books to show" @@ -1573,7 +1573,7 @@ msgstr "Liczba losowych książek do pokazania" #: cps/templates/config_view_edit.html:31 msgid "No. of authors to show before hiding (0=disable hiding)" -msgstr "" +msgstr "Liczba autorów do pokazania przed ukryciem (0=wyłącza ukrywanie)" #: cps/templates/config_view_edit.html:35 cps/templates/readcbr.html:112 msgid "Theme" @@ -1657,7 +1657,7 @@ msgstr "Czytaj w przeglądarce" #: cps/templates/detail.html:72 msgid "Listen in browser" -msgstr "" +msgstr "Słuchaj w przeglądarce" #: cps/templates/detail.html:117 msgid "Book" @@ -1733,27 +1733,27 @@ msgstr "Zapisz ustawienia i wyślij testową wiadomość e-mail" #: cps/templates/email_edit.html:43 msgid "Allowed domains for registering" -msgstr "" +msgstr "Domeny dozwolone do rejestracji" #: cps/templates/email_edit.html:46 cps/templates/email_edit.html:72 msgid "Add Domain" -msgstr "" +msgstr "Dodaj domenę" #: cps/templates/email_edit.html:49 cps/templates/email_edit.html:75 msgid "Add" -msgstr "" +msgstr "Dodaj" #: cps/templates/email_edit.html:54 cps/templates/email_edit.html:64 msgid "Enter domainname" -msgstr "" +msgstr "Podaj nazwę domeny" #: cps/templates/email_edit.html:60 msgid "Denied domains for registering" -msgstr "" +msgstr "Nie można zarejestrowac domen" #: cps/templates/email_edit.html:90 msgid "Do you really want to delete this domain rule?" -msgstr "" +msgstr "Czy naprawdę chcesz usunąć tę regułę domeny?" #: cps/templates/feed.xml:21 cps/templates/layout.html:176 msgid "Next" @@ -1792,7 +1792,7 @@ msgstr "Popularne publikacje z tego katalogu bazujące na ocenach." #: cps/templates/index.xml:31 msgid "Recently added Books" -msgstr "" +msgstr "Ostatnio dodane książki" #: cps/templates/index.xml:35 msgid "The latest Books" @@ -1820,11 +1820,11 @@ msgstr "Książki sortowane według serii" #: cps/templates/index.xml:93 msgid "Books ordered by Languages" -msgstr "" +msgstr "Ksiązki posortowane według języka" #: cps/templates/index.xml:100 msgid "Books ordered by file formats" -msgstr "" +msgstr "Ksiązki posortowane według formatu" #: cps/templates/index.xml:103 cps/templates/layout.html:137 msgid "Public Shelves" @@ -1925,7 +1925,7 @@ msgstr "Zapamiętaj mnie" #: cps/templates/login.html:22 msgid "Forgot password" -msgstr "" +msgstr "Zapomniałem hasła" #: cps/templates/login.html:25 msgid "Log in with magic link" @@ -1933,19 +1933,19 @@ msgstr "Zaloguj się za pomocą \"magic link\"" #: cps/templates/logviewer.html:6 msgid "Show Calibre-Web log: " -msgstr "" +msgstr "Pokaż log Calibre-Web" #: cps/templates/logviewer.html:8 msgid "Calibre-Web log: " -msgstr "" +msgstr "Log Calibre-Web" #: cps/templates/logviewer.html:8 msgid "Stream output, can't be displayed" -msgstr "" +msgstr "Nie można wyświetlić wyjścia" #: cps/templates/logviewer.html:12 msgid "Show access log: " -msgstr "" +msgstr "Pokaż log dostępu" #: cps/templates/osd.xml:5 msgid "Calibre-Web ebook catalog" @@ -1958,27 +1958,27 @@ msgstr "Tekst pływający, gdy paski boczne są otwarte." #: cps/templates/readcbr.html:88 msgid "Keyboard Shortcuts" -msgstr "" +msgstr "Skróty klawiaturowe" #: cps/templates/readcbr.html:91 msgid "Previous Page" -msgstr "" +msgstr "Poprzednia strona" #: cps/templates/readcbr.html:92 msgid "Next Page" -msgstr "" +msgstr "Następna strona" #: cps/templates/readcbr.html:93 msgid "Scale to Best" -msgstr "" +msgstr "Skaluj do najlepszego" #: cps/templates/readcbr.html:94 msgid "Scale to Width" -msgstr "" +msgstr "Skaluj do szerokości" #: cps/templates/readcbr.html:95 msgid "Scale to Height" -msgstr "" +msgstr "Skaluj do wysokości" #: cps/templates/readcbr.html:96 msgid "Scale to Native" @@ -1986,11 +1986,11 @@ msgstr "" #: cps/templates/readcbr.html:97 msgid "Rotate Right" -msgstr "" +msgstr "Obróć w prawo" #: cps/templates/readcbr.html:98 msgid "Rotate Left" -msgstr "" +msgstr "Obróć w lewo" #: cps/templates/readcbr.html:99 msgid "Flip Image" @@ -1998,27 +1998,27 @@ msgstr "" #: cps/templates/readcbr.html:115 msgid "Light" -msgstr "" +msgstr "Jasny" #: cps/templates/readcbr.html:116 msgid "Dark" -msgstr "" +msgstr "Ciemny" #: cps/templates/readcbr.html:121 msgid "Scale" -msgstr "" +msgstr "Skaluj" #: cps/templates/readcbr.html:124 msgid "Best" -msgstr "" +msgstr "Najlepszy" #: cps/templates/readcbr.html:125 msgid "Width" -msgstr "" +msgstr "Szerokość" #: cps/templates/readcbr.html:126 msgid "Height" -msgstr "" +msgstr "Wysokość" #: cps/templates/readcbr.html:127 msgid "Native" @@ -2026,7 +2026,7 @@ msgstr "" #: cps/templates/readcbr.html:132 msgid "Rotate" -msgstr "" +msgstr "Obrót" #: cps/templates/readcbr.html:143 msgid "Flip" @@ -2042,7 +2042,7 @@ msgstr "Pionowo" #: cps/templates/readcbr.html:152 msgid "Direction" -msgstr "" +msgstr "Kierunek" #: cps/templates/readcbr.html:155 msgid "Left to Right" @@ -2050,11 +2050,11 @@ msgstr "od lewej do prawej" #: cps/templates/readcbr.html:156 msgid "Right to Left" -msgstr "od prawej do lewej" +msgstr "Od prawej do lewej" #: cps/templates/readpdf.html:29 msgid "PDF reader" -msgstr "czytnik PDF" +msgstr "Czytnik PDF" #: cps/templates/readtxt.html:6 msgid "Basic txt Reader" @@ -2078,11 +2078,11 @@ msgstr "Twój adres e-mail" #: cps/templates/remote_login.html:6 msgid "Use your other device, login and visit " -msgstr "" +msgstr "Użyj innego urządzenia, zaloguj się i odwiedź" #: cps/templates/remote_login.html:9 msgid "Once you do so, you will automatically get logged in on this device." -msgstr "" +msgstr "Gdy to zrobisz, automatycznie zalogujesz się na tym urządzeniu." #: cps/templates/remote_login.html:12 msgid "The link will expire after 10 minutes." @@ -2122,11 +2122,11 @@ msgstr "Wyklucz języki" #: cps/templates/search_form.html:95 msgid "Extensions" -msgstr "" +msgstr "Rozszerzenia" #: cps/templates/search_form.html:105 msgid "Exclude Extensions" -msgstr "" +msgstr "Wyklucz rozszerzenia" #: cps/templates/search_form.html:117 msgid "Rating bigger than" From 9247ded71078a7f257d631c9f5fb0433ea73d282 Mon Sep 17 00:00:00 2001 From: ElQuimm <50202052+ElQuimm@users.noreply.github.com> Date: Wed, 29 Jan 2020 21:41:54 +0100 Subject: [PATCH 16/31] Update - italian version of message.po --- cps/translations/it/LC_MESSAGES/messages.po | 102 ++++++++++---------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/cps/translations/it/LC_MESSAGES/messages.po b/cps/translations/it/LC_MESSAGES/messages.po index 0d20414d..2fb50cf4 100644 --- a/cps/translations/it/LC_MESSAGES/messages.po +++ b/cps/translations/it/LC_MESSAGES/messages.po @@ -165,7 +165,7 @@ msgstr "Decomprimo il pacchetto di aggiornamento" #: cps/admin.py:717 msgid "Replacing files" -msgstr "Sostituzione files" +msgstr "Sostituisco i file" #: cps/admin.py:718 msgid "Database connections are closed" @@ -177,7 +177,7 @@ msgstr "Arresta il server" #: cps/admin.py:720 msgid "Update finished, please press okay and reload page" -msgstr "Aggiornamento completato, prego premere ok e ricaricare la pagina" +msgstr "Aggiornamento completato, prego premi ok e ricarica la pagina" #: cps/admin.py:721 cps/admin.py:722 cps/admin.py:723 cps/admin.py:724 msgid "Update failed:" @@ -268,7 +268,7 @@ msgstr "Probabilmnete il libro caricato esiste già nella libreria; considera di #: cps/editbooks.py:613 #, python-format msgid "Failed to store file %(file)s (Permission denied)." -msgstr "Impossibile salvare il file %(file)s (autorizzazione negata)" +msgstr "Impossibile salvare il file %(file)s (autorizzazione negata)." #: cps/editbooks.py:619 #, python-format @@ -305,7 +305,7 @@ msgstr "Callback domain non è stato verificato. Per favore intraprendi il neces #: cps/helper.py:80 #, python-format msgid "%(format)s format not found for book id: %(book)d" -msgstr "%(format)s formato non trovato per il libro: %(book)d" +msgstr "Formato %(format)s non trovato per il libro: %(book)d" #: cps/helper.py:92 #, python-format @@ -341,7 +341,7 @@ msgstr "Inizia con Calibre-Web" #: cps/helper.py:135 #, python-format msgid "Registration e-mail for user: %(name)s" -msgstr "E-mail di registrazione per l'utente: %(name)s" +msgstr "E-mail di registrazione dell'utente: %(name)s" #: cps/helper.py:149 cps/helper.py:151 cps/helper.py:153 cps/helper.py:161 #: cps/helper.py:163 cps/helper.py:165 @@ -386,15 +386,15 @@ msgstr "File %(file)s non trovato su Google Drive" #: cps/helper.py:411 #, python-format msgid "Book path %(path)s not found on Google Drive" -msgstr "Non ho trovato la cartella %(path)s su Google Drive" +msgstr "Non ho trovato la cartella %(path)s del libro su Google Drive" #: cps/helper.py:643 msgid "Waiting" -msgstr "Attendere" +msgstr "Attendi" #: cps/helper.py:645 msgid "Failed" -msgstr "Fallito" +msgstr "Non riuscito" #: cps/helper.py:647 msgid "Started" @@ -431,19 +431,19 @@ msgstr "Registra con %(provider)s" #: cps/oauth_bb.py:155 msgid "Failed to log in with GitHub." -msgstr "Fallito l'accesso con GitHub." +msgstr "Accesso con GitHub non riuscito." #: cps/oauth_bb.py:160 msgid "Failed to fetch user info from GitHub." -msgstr "Fallito il recupero delle informazioni dell'utente da GitHub." +msgstr "Il recupero delle informazioni dell'utente da GitHub non è riuscito." #: cps/oauth_bb.py:171 msgid "Failed to log in with Google." -msgstr "Fallito l'accesso con Google." +msgstr "Accesso con Google non riuscito." #: cps/oauth_bb.py:176 msgid "Failed to fetch user info from Google." -msgstr "Fallito il recupero delle informazioni da Google." +msgstr "Il recupero delle informazioni dell'utente da Google non è riuscito." #: cps/oauth_bb.py:274 #, python-format @@ -453,7 +453,7 @@ msgstr "Scollegato da %(oauth)s con successo." #: cps/oauth_bb.py:278 #, python-format msgid "Unlink to %(oauth)s failed." -msgstr "Scollegamento da %(oauth)s fallito.\"" +msgstr "Scollegamento da %(oauth)s fallito." #: cps/oauth_bb.py:281 #, python-format @@ -462,11 +462,11 @@ msgstr "Non collegato a %(oauth)s." #: cps/oauth_bb.py:309 msgid "GitHub Oauth error, please retry later." -msgstr "GitHub Oauth error, per favore riprova più tardi." +msgstr "GitHub errore Oauth, per favore riprova più tardi." #: cps/oauth_bb.py:328 msgid "Google Oauth error, please retry later." -msgstr "Google Oauth error, per favore riprova più tardi." +msgstr "Google errore Oauth, per favore riprova più tardi." #: cps/shelf.py:47 cps/shelf.py:99 msgid "Invalid shelf specified" @@ -572,7 +572,7 @@ msgstr "Aggiunto recentemente" #: cps/ub.py:59 msgid "Show recent books" -msgstr "Mostra i libri recenti" +msgstr "Mostra i libri più recenti" #: cps/templates/index.xml:17 cps/ub.py:60 msgid "Hot Books" @@ -614,7 +614,7 @@ msgstr "Per scoprire" #: cps/ub.py:76 msgid "Show random books" -msgstr "Mostra libro a caso" +msgstr "Mostra libri a caso" #: cps/templates/index.xml:75 cps/ub.py:77 msgid "Categories" @@ -667,11 +667,11 @@ msgstr "Mostra la selezione della valutazione" #: cps/templates/index.xml:96 cps/ub.py:97 msgid "File formats" -msgstr "Formati dei file" +msgstr "Formato file" #: cps/ub.py:99 msgid "Show file formats selection" -msgstr "Mostra la selezione dei formati dei file" +msgstr "Mostra la selezione del formato dei file" #: cps/updater.py:252 cps/updater.py:359 cps/updater.py:372 msgid "Unexpected data while reading update information" @@ -708,11 +708,11 @@ msgstr "Libri aggiunti di recente" #: cps/web.py:514 msgid "Best rated books" -msgstr "I libri con le migliori valutazioni" +msgstr "Libri con le migliori valutazioni" #: cps/templates/index.xml:38 cps/web.py:522 msgid "Random Books" -msgstr "Libri a caso" +msgstr "Libri casuali" #: cps/web.py:548 msgid "Books" @@ -763,19 +763,19 @@ msgstr "Lingua: %(name)s" #: cps/web.py:705 msgid "Publisher list" -msgstr "Lista degli editori" +msgstr "Elenco degli editori" #: cps/web.py:721 msgid "Series list" -msgstr "Lista delle serie" +msgstr "Elenco delle serie" #: cps/web.py:735 msgid "Ratings list" -msgstr "Lista delle valutazioni" +msgstr "Elenco delle valutazioni" #: cps/web.py:748 msgid "File formats list" -msgstr "Lista dei formati di file" +msgstr "Elenco dei formati" #: cps/web.py:776 msgid "Available languages" @@ -783,7 +783,7 @@ msgstr "Lingue disponibili" #: cps/web.py:793 msgid "Category list" -msgstr "Elenco categorie" +msgstr "Elenco delle categorie" #: cps/templates/layout.html:73 cps/web.py:807 msgid "Tasks" @@ -895,7 +895,7 @@ msgstr "Il token è scaduto" #: cps/web.py:1240 msgid "Success! Please return to your device" -msgstr "Successo! Torna al tuo dispositivo" +msgstr "Riuscito! Torna al tuo dispositivo" #: cps/web.py:1317 cps/web.py:1360 cps/web.py:1366 #, python-format @@ -1045,7 +1045,7 @@ msgstr "Amministrazione" #: cps/templates/admin.html:122 msgid "View Logfiles" -msgstr "Visualizza LogFiles" +msgstr "Visualizza LogFile" #: cps/templates/admin.html:123 msgid "Reconnect to Calibre DB" @@ -1217,7 +1217,7 @@ msgstr "Lingua" #: cps/templates/book_edit.html:113 cps/templates/search_form.html:137 msgid "Yes" -msgstr "Si" +msgstr "Sì" #: cps/templates/book_edit.html:114 cps/templates/search_form.html:138 msgid "No" @@ -1377,7 +1377,7 @@ msgstr "Livello di Log" #: cps/templates/config_edit.html:131 msgid "Location and name of logfile (calibre-web.log for no entry)" -msgstr "Percorso e nome del logfile (senza indicazioni sarà calibre-web.log)" +msgstr "Percorso e nome del Logfile (senza indicazioni sarà calibre-web.log)" #: cps/templates/config_edit.html:136 msgid "Enable Access Log" @@ -1385,11 +1385,11 @@ msgstr "Abilita l'Access Log" #: cps/templates/config_edit.html:139 msgid "Location and name of access logfile (access.log for no entry)" -msgstr "Percorso e nome del logfile di accesso (senza indicazioni sarà access.log)" +msgstr "Percorso e nome del Logfile di accesso (senza indicazioni sarà access.log)" #: cps/templates/config_edit.html:150 msgid "Feature Configuration" -msgstr "Configurazione della caratteristica" +msgstr "Ulteriori opzioni" #: cps/templates/config_edit.html:158 msgid "Enable uploading" @@ -1528,7 +1528,7 @@ msgstr "Utilizza il convertitore di Calibre" #: cps/templates/config_edit.html:308 msgid "E-Book converter settings" -msgstr "Configurazione del convertitore di e-book" +msgstr "Configurazione del convertitore di libri" #: cps/templates/config_edit.html:312 msgid "Path to convertertool" @@ -1585,7 +1585,7 @@ msgstr "Espressione regolare per ordinare la visualizzazione del titolo" #: cps/templates/config_view_edit.html:59 msgid "Tags for Mature Content" -msgstr "Tags per i libri per adulti" +msgstr "Tags dei libri per adulti" #: cps/templates/config_view_edit.html:73 msgid "Default settings for new users" @@ -1629,7 +1629,7 @@ msgstr "Visibilità di base per i nuovi utenti" #: cps/templates/config_view_edit.html:135 cps/templates/user_edit.html:76 msgid "Show random books in detail view" -msgstr "Mostra libri a caso nella vista dettagliata" +msgstr "Mostra libri scelti alleatoriamente nella vista dettagliata" #: cps/templates/config_view_edit.html:139 cps/templates/user_edit.html:89 msgid "Show mature content" @@ -1705,7 +1705,7 @@ msgstr "password SMTP" #: cps/templates/email_edit.html:35 msgid "From e-mail" -msgstr "Dall'email" +msgstr "E-mail mittente" #: cps/templates/email_edit.html:38 msgid "Save settings" @@ -1717,7 +1717,7 @@ msgstr "Salva le impostazioni e invia e-mail di test" #: cps/templates/email_edit.html:43 msgid "Allowed domains for registering" -msgstr "Dominii autorizzti alla registrazione" +msgstr "Dominii autorizzati alla registrazione" #: cps/templates/email_edit.html:46 cps/templates/email_edit.html:72 msgid "Add Domain" @@ -1749,7 +1749,7 @@ msgstr "Crea-segnala un problema" #: cps/templates/http_error.html:44 msgid "Back to home" -msgstr "Ritorno alla pagina principale" +msgstr "Ritorna alla pagina principale" #: cps/templates/index.html:5 msgid "Discover (Random Books)" @@ -1781,7 +1781,7 @@ msgstr "Gli ultimi libri" #: cps/templates/index.xml:42 msgid "Show Random Books" -msgstr "Mostra libri casuali" +msgstr "Mostra libri casualmente" #: cps/templates/index.xml:65 msgid "Books ordered by Author" @@ -1854,7 +1854,7 @@ msgstr "Registra" #: cps/templates/layout.html:116 cps/templates/layout.html:223 msgid "Uploading..." -msgstr "Carica" +msgstr "Carico..." #: cps/templates/layout.html:117 msgid "please don't refresh the page" @@ -1912,11 +1912,11 @@ msgstr "Accedi con magic link" #: cps/templates/logviewer.html:6 msgid "Show Calibre-Web log: " -msgstr "" +msgstr "Mostra il log di Calibre-Web: " #: cps/templates/logviewer.html:8 msgid "Calibre-Web log: " -msgstr "Mostra il log Calibre-Web" +msgstr "Calibre-Web" log: " #: cps/templates/logviewer.html:8 msgid "Stream output, can't be displayed" @@ -1924,7 +1924,7 @@ msgstr "Flusso attivo, non può essere visualizzato" #: cps/templates/logviewer.html:12 msgid "Show access log: " -msgstr "Mostra il log di accesso" +msgstr "Mostra il log di accesso: " #: cps/templates/osd.xml:5 msgid "Calibre-Web ebook catalog" @@ -2072,7 +2072,7 @@ msgstr "Nessun risultato per:" #: cps/templates/search.html:6 msgid "Please try a different search" -msgstr "Prova una ricerca diversa" +msgstr "Prova una ricerca differente" #: cps/templates/search.html:8 msgid "Results for:" @@ -2116,7 +2116,7 @@ msgstr "Valutazione inferiore a" #: cps/templates/shelf.html:10 msgid "Delete this Shelf" -msgstr "Cancellare questo scaffale" +msgstr "Cancella questo scaffale" #: cps/templates/shelf.html:11 msgid "Edit Shelf" @@ -2144,7 +2144,7 @@ msgstr "Riordina tramite drag and drop" #: cps/templates/stats.html:7 msgid "Calibre library statistics" -msgstr "Statistiche libreria Calibre" +msgstr "Statistiche della libreria di Calibre" #: cps/templates/stats.html:12 msgid "Books in this Library" @@ -2220,11 +2220,11 @@ msgstr "E-mail di Kindle" #: cps/templates/user_edit.html:41 msgid "Show books with language" -msgstr "Mostra libri per lingua" +msgstr "Mostra libri in " #: cps/templates/user_edit.html:43 msgid "Show all" -msgstr "Mostra tutto" +msgstr "Mostra libri in tutte le lingue presenti" #: cps/templates/user_edit.html:53 msgid "OAuth Settings" @@ -3513,7 +3513,7 @@ msgstr "Download recenti" #~ msgstr "La copertina non è un file in formato jpg: non posso salvare" #~ msgid "Preparing document for printing..." -#~ msgstr "Preparo documento per la stampa..." +#~ msgstr "Preparo il documento per la stampa..." #~ msgid "Using your another device, visit" #~ msgstr "Utilizza il tuo altro dispositivo, visita" @@ -3522,10 +3522,10 @@ msgstr "Download recenti" #~ msgstr "e accedi" #~ msgid "Using your another device, login and visit " -#~ msgstr "Utilizza il tuo altro apparecchio, collegati e visita" +#~ msgstr "Utilizza il tuo altro apparecchio, collegati e visita " #~ msgid "Newest Books" -#~ msgstr "I libri più nuovi" +#~ msgstr "I libri più recenti" #~ msgid "Oldest Books" #~ msgstr "I libri più vecchi" From 5255085de1541ad93ed3801e584d89613d05cfde Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sat, 1 Feb 2020 13:38:11 +0100 Subject: [PATCH 17/31] Fix auto detection of locale --- cps/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cps/__init__.py b/cps/__init__.py index abcc4cbb..6c241d4f 100755 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -116,14 +116,13 @@ def get_locale(): if user.nickname != 'Guest': # if the account is the guest account bypass the config lang settings return user.locale - preferred = set() + preferred = list() if request.accept_languages: for x in request.accept_languages.values(): try: - preferred.add(str(LC.parse(x.replace('-', '_')))) + preferred.append(str(LC.parse(x.replace('-', '_')))) except (UnknownLocaleError, ValueError) as e: - log.warning('Could not parse locale "%s": %s', x, e) - # preferred.append('en') + log.debug('Could not parse locale "%s": %s', x, e) return negotiate_locale(preferred or ['en'], _BABEL_TRANSLATIONS) From 4087e685f4fb5568410831dd312eec286a0e7067 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sat, 1 Feb 2020 13:40:29 +0100 Subject: [PATCH 18/31] Fix auto detection of locale --- cps/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cps/__init__.py b/cps/__init__.py index abcc4cbb..6c241d4f 100755 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -116,14 +116,13 @@ def get_locale(): if user.nickname != 'Guest': # if the account is the guest account bypass the config lang settings return user.locale - preferred = set() + preferred = list() if request.accept_languages: for x in request.accept_languages.values(): try: - preferred.add(str(LC.parse(x.replace('-', '_')))) + preferred.append(str(LC.parse(x.replace('-', '_')))) except (UnknownLocaleError, ValueError) as e: - log.warning('Could not parse locale "%s": %s', x, e) - # preferred.append('en') + log.debug('Could not parse locale "%s": %s', x, e) return negotiate_locale(preferred or ['en'], _BABEL_TRANSLATIONS) From b33a2ac90d2964075d3bc8ef21d49005a81de46d Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 2 Feb 2020 07:47:27 +0100 Subject: [PATCH 19/31] Fix #1170 Auth-digest Header no longer crashs calibre-web Fix #1161 Shelfs are reordering again Update Sortable.js to 2.10.1 Code cosmetics --- cps/shelf.py | 17 +++++++--- cps/static/js/get_meta.js | 51 ++++++++++++++++-------------- cps/static/js/libs/Sortable.min.js | 4 +-- cps/static/js/shelforder.js | 2 +- cps/web.py | 2 +- 5 files changed, 44 insertions(+), 32 deletions(-) diff --git a/cps/shelf.py b/cps/shelf.py index 1d24c4f1..ff58395d 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -284,8 +284,14 @@ def show_shelf(shelf_type, shelf_id): books_in_shelf = ub.session.query(ub.BookShelf).filter(ub.BookShelf.shelf == shelf_id)\ .order_by(ub.BookShelf.order.asc()).all() - books_list = [ b.book_id for b in books_in_shelf] - result = db.session.query(db.Books).filter(db.Books.id.in_(books_list)).filter(common_filters()).all() + for book in books_in_shelf: + cur_book = db.session.query(db.Books).filter(db.Books.id == book.book_id).filter(common_filters()).first() + if cur_book: + result.append(cur_book) + else: + log.info('Not existing book %s in %s deleted', book.book_id, shelf) + ub.session.query(ub.BookShelf).filter(ub.BookShelf.book_id == book.book_id).delete() + ub.session.commit() return render_title_template(page, entries=result, title=_(u"Shelf: '%(name)s'", name=shelf.name), shelf=shelf, page="shelf") else: @@ -317,8 +323,11 @@ def order_shelf(shelf_id): if shelf: books_in_shelf2 = ub.session.query(ub.BookShelf).filter(ub.BookShelf.shelf == shelf_id) \ .order_by(ub.BookShelf.order.asc()).all() - books_list = [ b.book_id for b in books_in_shelf2] - result = db.session.query(db.Books).filter(db.Books.id.in_(books_list)).filter(common_filters()).all() + for book in books_in_shelf2: + cur_book = db.session.query(db.Books).filter(db.Books.id == book.book_id).filter(common_filters()).first() + result.append(cur_book) + #books_list = [ b.book_id for b in books_in_shelf2] + #result = db.session.query(db.Books).filter(db.Books.id.in_(books_list)).filter(common_filters()).all() return render_title_template('shelf_order.html', entries=result, title=_(u"Change order of Shelf: '%(name)s'", name=shelf.name), shelf=shelf, page="shelforder") diff --git a/cps/static/js/get_meta.js b/cps/static/js/get_meta.js index a453b092..77c53f51 100644 --- a/cps/static/js/get_meta.js +++ b/cps/static/js/get_meta.js @@ -19,7 +19,7 @@ * Google Books api document: https://developers.google.com/books/docs/v1/using * Douban Books api document: https://developers.douban.com/wiki/?title=book_v2 (Chinese Only) */ -/* global _, i18nMsg, tinymce */ +/* global _, i18nMsg, tinymce */ var dbResults = []; var ggResults = []; @@ -55,9 +55,9 @@ $(function () { $(".cover img").attr("src", book.cover); $("#cover_url").val(book.cover); $("#pubdate").val(book.publishedDate); - $("#publisher").val(book.publisher) - if (book.series != undefined) { - $("#series").val(book.series) + $("#publisher").val(book.publisher); + if (typeof book.series !== "undefined") { + $("#series").val(book.series); } } @@ -72,16 +72,18 @@ $(function () { } function formatDate (date) { var d = new Date(date), - month = '' + (d.getMonth() + 1), - day = '' + d.getDate(), + month = "" + (d.getMonth() + 1), + day = "" + d.getDate(), year = d.getFullYear(); - - if (month.length < 2) - month = '0' + month; - if (day.length < 2) - day = '0' + day; - - return [year, month, day].join('-'); + + if (month.length < 2) { + month = "0" + month; + } + if (day.length < 2) { + day = "0" + day; + } + + return [year, month, day].join("-"); } if (ggDone && ggResults.length > 0) { @@ -116,16 +118,17 @@ $(function () { } if (dbDone && dbResults.length > 0) { dbResults.forEach(function(result) { - if (result.series){ - var series_title = result.series.title + var seriesTitle = ""; + if (result.series) { + seriesTitle = result.series.title; } - var date_fomers = result.pubdate.split("-") - var publishedYear = parseInt(date_fomers[0]) - var publishedMonth = parseInt(date_fomers[1]) - var publishedDate = new Date(publishedYear, publishedMonth-1, 1) + var dateFomers = result.pubdate.split("-"); + var publishedYear = parseInt(dateFomers[0]); + var publishedMonth = parseInt(dateFomers[1]); + var publishedDate = new Date(publishedYear, publishedMonth - 1, 1); + + publishedDate = formatDate(publishedDate); - publishedDate = formatDate(publishedDate) - var book = { id: result.id, title: result.title, @@ -137,7 +140,7 @@ $(function () { return tag.title.toLowerCase().replace(/,/g, "_"); }), rating: result.rating.average || 0, - series: series_title || "", + series: seriesTitle || "", cover: result.image, url: "https://book.douban.com/subject/" + result.id, source: { @@ -183,7 +186,7 @@ $(function () { } function dbSearchBook (title) { - apikey="0df993c66c0c636e29ecbb5344252a4a" + var apikey = "0df993c66c0c636e29ecbb5344252a4a"; $.ajax({ url: douban + dbSearch + "?apikey=" + apikey + "&q=" + title + "&fields=all&count=10", type: "GET", @@ -193,7 +196,7 @@ $(function () { dbResults = data.books; }, error: function error() { - $("#meta-info").html("

" + msg.search_error + "!

"+ $("#meta-info")[0].innerHTML) + $("#meta-info").html("

" + msg.search_error + "!

" + $("#meta-info")[0].innerHTML); }, complete: function complete() { dbDone = true; diff --git a/cps/static/js/libs/Sortable.min.js b/cps/static/js/libs/Sortable.min.js index e95d2a30..eba06149 100644 --- a/cps/static/js/libs/Sortable.min.js +++ b/cps/static/js/libs/Sortable.min.js @@ -1,2 +1,2 @@ -/*! Sortable 1.4.2 - MIT | git://github.com/rubaxa/Sortable.git */ -!function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),(J.vx!==f||J.vy!==g||J.el!==d)&&(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,D),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,D),!0):void 0})))return void a.preventDefault();(!e.handle||c(i,e.handle,d))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!s&&c.parentNode===h&&(G=a,w=h,s=c,t=s.parentNode,x=s.nextSibling,F=j.group,d=function(){f._disableDelayedDrag(),s.draggable=!0,g(s,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(s,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(G={target:s,clientX:a.clientX,clientY:a.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(e(s,"dragend",this),e(w,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{N.selection?N.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&s&&(g(s,this.options.ghostClass,!0),a.active=this,j(this,w,"start",s,w,D))},_emulateDragOver:function(){if(H){if(this._lastX===H.clientX&&this._lastY===H.clientY)return;this._lastX=H.clientX,this._lastY=H.clientY,Q||h(u,"display","none");var a=N.elementFromPoint(H.clientX,H.clientY),b=a,c=" "+this.options.group.name,d=T.length;if(b)do{if(b[L]&&b[L].options.groups.indexOf(c)>-1){for(;d--;)T[d]({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);Q||h(u,"display","")}},_onTouchMove:function(b){if(G){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-G.clientX,e=c.clientY-G.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";I=!0,H=c,h(u,"webkitTransform",f),h(u,"mozTransform",f),h(u,"msTransform",f),h(u,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!u){var a,b=s.getBoundingClientRect(),c=h(s),d=this.options;u=s.cloneNode(!0),g(u,d.ghostClass,!1),g(u,d.fallbackClass,!0),h(u,"top",b.top-O(c.marginTop,10)),h(u,"left",b.left-O(c.marginLeft,10)),h(u,"width",b.width),h(u,"height",b.height),h(u,"opacity","0.8"),h(u,"position","fixed"),h(u,"zIndex","100000"),h(u,"pointerEvents","none"),d.fallbackOnBody&&N.body.appendChild(u)||w.appendChild(u),a=u.getBoundingClientRect(),h(u,"width",2*b.width-a.width),h(u,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==F.pull&&(v=s.cloneNode(!0),h(v,"display","none"),w.insertBefore(v,s)),b?("touch"===b?(e(N,"touchmove",this._onTouchMove),e(N,"touchend",this._onDrop),e(N,"touchcancel",this._onDrop)):(e(N,"mousemove",this._onTouchMove),e(N,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,s)),e(N,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=F===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),I=!0,F&&!i.disabled&&(o?p||(f=!w.contains(s)):F.pull&&l&&(F.name===j.name||l.indexOf&&~l.indexOf(F.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(U(a,i,this.el),R)return;if(d=c(a.target,i.draggable,g),e=s.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(s,v||x):p||w.appendChild(s));if(0===g.children.length||g.children[0]===u||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(w,g,s,e,d,r)!==!1&&(s.contains(g)||(g.appendChild(s),t=g),this._animate(e,s),d&&this._animate(r,d))}else if(d&&!d.animated&&d!==s&&void 0!==d.parentNode[L]){A!==d&&(A=d,B=h(d),C=h(d.parentNode));var q,r=d.getBoundingClientRect(),y=r.right-r.left,z=r.bottom-r.top,D=/left|right|inline/.test(B.cssFloat+B.display)||"flex"==C.display&&0===C["flex-direction"].indexOf("row"),E=d.offsetWidth>s.offsetWidth,G=d.offsetHeight>s.offsetHeight,H=(D?(a.clientX-r.left)/y:(a.clientY-r.top)/z)>.5,J=d.nextElementSibling,K=k(w,g,s,e,d,r);if(K!==!1){if(R=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(D){var M=s.offsetTop,N=d.offsetTop;q=M===N?d.previousElementSibling===s&&!E||H&&E:N>M}else q=J!==s&&!G||H&&G;s.contains(g)||(q&&!J?g.appendChild(s):d.parentNode.insertBefore(s,q?J:d)),t=s.parentNode,this._animate(e,s),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(N,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(J.pid),clearTimeout(this._dragStartTimer),f(N,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(N,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(I&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),u&&u.parentNode.removeChild(u),s&&(this.nativeDraggable&&f(s,"dragend",this),l(s),g(s,this.options.ghostClass,!1),g(s,this.options.chosenClass,!1),w!==t?(E=p(s),E>=0&&(j(null,t,"sort",s,w,D,E),j(this,w,"sort",s,w,D,E),j(null,t,"add",s,w,D,E),j(this,w,"remove",s,w,D,E))):(v&&v.parentNode.removeChild(v),s.nextSibling!==x&&(E=p(s),E>=0&&(j(this,w,"update",s,w,D,E),j(this,w,"sort",s,w,D,E)))),a.active&&((null===E||-1===E)&&(E=D),j(this,w,"end",s,w,D,E),this.save())),w=s=t=u=x=v=y=z=G=H=I=E=A=B=F=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?s&&(this._onDragOver(a),d(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&V(c)))},destroy:function(){var a=this.el;a[L]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),T.splice(T.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:r,throttle:q,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.4.2",a}); \ No newline at end of file +/*! Sortable 1.10.2 - MIT | git://github.com/SortableJS/Sortable.git */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&h(t,e):h(t,e))||o&&t===n)return t;if(t===n)break}while(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode)}var i;return null}var f,p=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(p," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(p," ")}}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function g(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=e.left-n&&r<=e.right+n,i=a>=e.top-n&&a<=e.bottom+n;return n&&o&&i?l=t:void 0}}),l}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[j]._onDragOver(n)}}}function kt(t){z&&z.parentNode[j]._isOutsideThisEl(t.target)}function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[j]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ot(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in O.initializePlugins(this,t,n),n)o in e||(e[o]=n[o]);for(var i in At(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&xt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?u(t,"pointerdown",this._onTapStart):(u(t,"mousedown",this._onTapStart),u(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(u(t,"dragover",this),u(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,T())}function Xt(t,e,n,o,i,r,a,l){var s,c,u=t[j],d=u.options.onMove;return!window.CustomEvent||w||E?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Yt(t){t.draggable=!1}function Bt(){Dt=!1}function Ft(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Ht(t){return setTimeout(t,0)}function Lt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(function(t){St.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&St.push(o)}}(o),!z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled||s.isContentEditable||(l=P(l,t.draggable,o,!1))&&l.animated||Z===l)){if(J=F(l),et=F(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return W({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),K("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return W({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),K("filter",n,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!z&&n.parentNode===r){var s=X(n);if(q=r,G=(z=n).parentNode,V=z.nextSibling,Z=n,ot=a.group,rt={target:Rt.dragged=z,clientX:(e||t).clientX,clientY:(e||t).clientY},ct=rt.clientX-s.left,ut=rt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,z.style["will-change"]="all",o=function(){K("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!c&&i.nativeDraggable&&(z.draggable=!0),i._triggerDragStart(t,e),W({sortable:i,name:"choose",originalEvent:t}),k(z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){g(z,t.trim(),Yt)}),u(l,"dragover",Pt),u(l,"mousemove",Pt),u(l,"touchmove",Pt),u(l,"mouseup",i._onDrop),u(l,"touchend",i._onDrop),u(l,"touchcancel",i._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),K("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(E||w))o();else{if(Rt.eventCanceled)return void this._onDrop();u(l,"mouseup",i._disableDelayedDrag),u(l,"touchend",i._disableDelayedDrag),u(l,"touchcancel",i._disableDelayedDrag),u(l,"mousemove",i._delayedDragTouchMoveHandler),u(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&u(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Yt(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;d(t,"mouseup",this._disableDelayedDrag),d(t,"touchend",this._disableDelayedDrag),d(t,"touchcancel",this._disableDelayedDrag),d(t,"mousemove",this._delayedDragTouchMoveHandler),d(t,"touchmove",this._delayedDragTouchMoveHandler),d(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?u(document,"pointermove",this._onTouchMove):u(document,e?"touchmove":"mousemove",this._onTouchMove):(u(z,"dragend",this),u(q,"dragstart",this._onDragStart));try{document.selection?Ht(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(vt=!1,q&&z){K("dragStarted",this,{evt:e}),this.nativeDraggable&&u(document,"dragover",kt);var n=this.options;t||k(z,n.dragClass,!1),k(z,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Nt();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(z.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j]){if(e[j]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);It()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&v(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=Ct&>&&b(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!vt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(n,a,this)&&!g.animated){if(g===z)return A(!1);if(g&&l===n.target&&(s=g),s&&(i=X(s)),!1!==Xt(q,l,z,o,s,i,n,!!s))return O(),l.appendChild(z),G=l,N(),A(!0)}else if(s.parentNode===l){i=X(s);var v,m,b,y=z.parentNode!==l,w=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}(z.animated&&z.toRect||o,s.animated&&s.toRect||i,a),E=a?"top":"left",D=Y(s,"top","top")||Y(z,"top","top"),S=D?D.scrollTop:void 0;if(ht!==s&&(m=i[E],yt=!1,wt=!w&&e.invertSwap||y),0!==(v=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt Date: Sat, 8 Feb 2020 11:33:31 +0100 Subject: [PATCH 20/31] Improved testability --- cps/templates/shelf_order.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/templates/shelf_order.html b/cps/templates/shelf_order.html index 26fa2e35..77192c8c 100644 --- a/cps/templates/shelf_order.html +++ b/cps/templates/shelf_order.html @@ -29,7 +29,7 @@ {% endfor %}