Ë
    F<kTK ã                   ón  — d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZm	Z	m
Z
mZ d dlmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZmZmZmZmZ ej:                  d	k\  rd d
lmZ nd d
lmZ ddl m!Z! ddl"m#Z#m$Z$ ddl%m&Z&m'Z' ddl(m)Z)m*Z* ddl+m,Z,m-Z-m.Z. ddl/m0Z0 ddl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl9m:Z: ddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZH ddlImJZJmKZKmLZL ddlMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZg ddlhmiZi ddljmkZkmlZl ddlmmZmmnZnmoZompZpmqZqmrZr ddlsmtZt  eHjê                  «       Zv G d„ dejî                  «      ZxdZydZz G d„ d «      Z{ G d!„ d"e$«      Z|d#e}e~ef   e~z  ez  e€e   z  d$e]fd%„Z�d&eXdz  d'e~d(e‚eeef   e~z  dz  d)eƒd*eƒd$ebfd+„Z„y),é    N)ÚCallableÚIterableÚMappingÚSequence)ÚBytesIOÚFileIOÚIOBase)Úpairwise)ÚPath)ÚPattern)ÚTracebackType)ÚIOÚAnyÚLiteralÚNoReturnÚcast)é   é   )ÚSelfé   )Úget_configuration)ÚDocumentInformationÚPdfDocCommon)ÚEncryptAlgorithmÚ
Encryption)Ú
PageObjectÚTransformation)Únums_clear_rangeÚnums_insertÚ	nums_next)Ú	PdfReader)ÚStrByteTypeÚ
StreamTypeÚ_get_max_pdf_version_headerÚdeprecate_positional_argumentsÚdeprecate_with_replacementÚdeprecation_with_replacementÚlogger_warning)ÚAction)ÚAnnotationDictionaryAttributesÚCatalogAttributesÚCoreÚFieldDictionaryAttributesÚGoToActionArgumentsÚ	ImageTypeÚInteractiveFormDictEntriesÚOutlineFontFlagÚPageAttributesÚPageLabelStyleÚPagesAttributesÚTrailerKeysÚUserAccessPermissions)ÚLimitReachedErrorÚPdfReadErrorÚ
PyPdfError)ÚPAGE_FITÚArrayObjectÚBooleanObjectÚByteStringObjectÚContentStreamÚDestinationÚDictionaryObjectÚEmbeddedFileÚFitÚFloatObjectÚIndirectObjectÚNamedReferenceLinkÚ
NameObjectÚ
NullObjectÚNumberObjectÚ	PdfObjectÚRectangleObjectÚReferenceLinkÚStreamObjectÚTextStringObjectÚ
TreeObjectÚViewerPreferencesÚcreate_string_objectÚextract_linksÚ
hex_to_rgbÚis_null_or_none)ÚTextStreamAppearance)Ú	PageRangeÚPageRangeSpec)ÚAnnotationSubtypeÚBorderArrayTypeÚ
LayoutTypeÚOutlineItemTypeÚOutlineTypeÚPagemodeType)ÚXmpInformationc                   ó0  — e Zd ZdZ ej
                  «       Z ej
                  «       Z ej
                  «       Z ej
                  «       Z	 ej
                  «       Z
 ej
                  «       Z ej
                  «       Z ej
                  «       Zeez  ez  Zy)ÚObjectDeletionFlagr   N)Ú__name__Ú
__module__Ú__qualname__ÚNONEÚenumÚautoÚTEXTÚLINKSÚATTACHMENTSÚ
OBJECTS_3DÚALL_ANNOTATIONSÚXOBJECT_IMAGESÚINLINE_IMAGESÚDRAWING_IMAGESÚIMAGES© ó    úP/var/www/tapir-food/flask_app/venv/lib/python3.12/site-packages/pypdf/_writer.pyr_   r_   ƒ   s~   „ Ø€DØˆ4�9‰9‹;€DØˆD�I‰I‹K€EØ�$—)‘)“+€KØ�—‘“€JØ�d—i‘i“k€OØ�T—Y‘Y“[€NØ�D—I‘I“K€MØ�T—Y‘Y“[€NØ˜mÑ+¨nÑ<�Frp   r_   )s   Tjs   TJó   'ó   "é    c                   óŠ   — e Zd ZdZdeddfd„Zdee   ddfd„Zded	edefd
„Z	dee   d	ededefd„Z
dee   d	eddfd„Zdd„Zy)Ú_NamedDestinationIndexaa  
    Look up and insert named destinations in a ``/Names`` array without scanning it.

    ``PdfWriter.merge`` adds the named destinations of a document one by one, and both
    looking each one up in the growing array and inserting it there take quadratic time.
    The string entries are kept in a set instead, as only strings compare equal to a title.
    If the keys are sorted strings, the new destinations are collected and sorted into the
    array once by ``flush``: inserting each one before the first greater key gives the same
    order as this stable sort. Other arrays are scanned as before.
    Ú
is_enabledÚreturnNc                óh   — || _         d | _        d| _        t        «       | _        d| _        g | _        y )Nr   F)Ú_is_enabledÚ_namesÚ_lengthÚsetÚ_stringsÚ
_is_sortedÚ_pending)Úselfrw   s     rq   Ú__init__z_NamedDestinationIndex.__init__¤   s/   € Ø%ˆÔØ(,ˆŒØˆŒÜ"%£%ˆŒØˆŒØ/1ˆ�rp   Únamesc                 ó–  — || j                   u rt        |«      | j                  k(  ry | j                  «        || _         t        |«      | _        |D �ch c]  }t	        |t
        «      sŒ|’Œ c}| _        |d d d…   }| j                  dz  dk(  xr/ t        d„ |D «       «      xr t        d„ t        |«      D «       «      | _	        y c c}w )Né   r   c              3   ó<   K  — | ]  }t        |t        «      –— Œ y ­w©N)Ú
isinstanceÚstr)Ú.0Úkeys     rq   ú	<genexpr>z1_NamedDestinationIndex._update.<locals>.<genexpr>¶   s   è ø€ Ò9¨S”J˜s¤C×(Ñ9ùs   ‚c              3   ó,   K  — | ]  \  }}||k  –— Œ y ­wr‡   ro   )rŠ   Úpreviousr‹   s      rq   rŒ   z1_NamedDestinationIndex._update.<locals>.<genexpr>·   s   è ø€ ÒH©¨°#�H •OÑHùs   ‚)
r{   Úlenr|   Úflushrˆ   r‰   r~   Úallr
   r   )r�   rƒ   ÚentryÚkeyss       rq   Ú_updatez_NamedDestinationIndex._update¬   s­   € Ø�D—K‘KÑ¤C¨£J°$·,±,Ò$>ØØ�
‰
ŒØˆŒÜ˜5“zˆŒØ,1ÖL 5´ZÀÄsÕ5KšÒLˆŒØ‘S�q�S‰zˆà�L‰L˜1Ñ Ñ!ò IÜÑ9°DÔ9Ó9òIäÑH¼À$»ÔHÓHð 	�ùò Ms   ÁCÁ)CÚ	containerÚtitlec                 óà   — t        |t        «      r|j                  «       }| j                  r t        |t        «      rt        |t
        «      s||v S | j                  |«       || j                  v S r‡   )rˆ   rD   Ú
get_objectrz   Úlistr‰   r”   r~   )r�   r•   r–   s      rq   Úcontainsz_NamedDestinationIndex.containsº   s]   € Ü�i¤Ô0Ø!×,Ñ,Ó.ˆIØ×Ò¤z°)¼TÔ'BÌ*ÐUZÔ\_ÔJ`Ø˜IÐ%Ð%Ø�‰�YÔØ˜Ÿ™Ð%Ð%rp   Údestinationc                 ó
  — | j                   sy| j                  |«       | j                  rt        |t        «      s| j                  «        y| j                  j                  ||f«       | j                  j                  |«       y)zcInsert like ``PdfWriter.add_named_destination_array``; return False if the array has to be scanned.FT)
rz   r”   r   rˆ   r‰   r�   r€   Úappendr~   Úadd)r�   rƒ   r–   r›   s       rq   Úinsertz_NamedDestinationIndex.insertÂ   sb   € à×ÒØØ�‰�UÔØ�Š¤j°¼Ô&<Ø�J‰JŒLØØ�‰×Ñ˜e [Ð1Ô2Ø�‰×Ñ˜%Ô Ørp   c                 óš   — || j                   u r=t        |t        «      r,| j                  j	                  |«       t        |«      | _        yyy)zYUpdate the index after ``add_named_destination_array`` inserted ``title`` into ``names``.N)r{   rˆ   r‰   r~   rž   r�   r|   )r�   rƒ   r–   s      rq   Úrecord_insertionz'_NamedDestinationIndex.record_insertionÎ   s<   € à�D—K‘KÑ¤J¨u´cÔ$:Ø�M‰M×Ñ˜eÔ$Ü˜u›:ˆD�Lð %;Ðrp   c                 ó¬  — | j                   sy | j                  }|€J d«       ‚t        dt        |«      d«      D �cg c]  }||   ||dz      f‘Œ }}|| j                   D ��cg c]  \  }}t	        |«      |f‘Œ c}}z  }|j                  d„ ¬«       |D ��cg c]  }|D ]  }|‘Œ Œ c}}|d d  g | _         t        |«      | _        y c c}w c c}}w c c}}w )NÚmypyr   r…   r   c                 ó   — | d   S )Nr   ro   )Úpairs    rq   ú<lambda>z._NamedDestinationIndex.flush.<locals>.<lambda>Û   s
   €  D¨¡G€ rp   )r‹   )r€   r{   Úranger�   rM   Úsortr|   )r�   rƒ   ÚiÚpairsr–   r›   r¥   r’   s           rq   r�   z_NamedDestinationIndex.flushÔ   sÐ   € Ø�}Š}ØØ—‘ˆØÐ Ð( &Ó(Ð Ü38¸¼CÀ»JÈÓ3JÖK¨a�%˜‘(˜E ! a¡%™LÒ)ÐKˆÐKØÐSW×S`ÑS`×aÑ=O¸UÀKÔ# EÓ*¨KÒ8ÓaÑaˆØ�
‰
Ñ+ˆ
Ô,Ø&+×>˜d¸Ò>°’EÐ>�EÓ>ˆ‰aˆØˆŒÜ˜5“zˆ�ùò LùÛaùã>s   »CÁ!C
ÂC©rx   N)r`   ra   rb   Ú__doc__Úboolr‚   r™   r   r”   rš   rŸ   r¡   r�   ro   rp   rq   rv   rv   ˜   s“   „ ñ	ð2 dð 2¨tó 2ð
˜T #™Yð 
¨4ó 
ð& #ð &¨cð &°dó &ð
˜D ™Ið 
¨cð 
Àð 
Èó 
ð& d¨3¡ið &¸ð &Àó &ô
"rp   rv   c                   óD  ‡ — e Zd ZU dZeed<   	 eedz     ed<   	 ee	ee	e
d   z  ef   f   ed<   	 edz  ed<   	 	 	 	 	 	 dßdd	d
dœdeez  ez  dz  deez  ez  dz  dedededede	dz  de	dz  ddfd„Zedefd„«       Zedefd„«       Zededz  fd„«       Zej*                  deez  dz  ddfd„«       Zededz  fd„«       Zej*                  deez  dz  ddfd„«       Zdefd„Zdee   dz  dedz  dedz  ddfd „Zede fd!„«       Z!e!j*                  d"e ez  ddfd#„«       Z!d$edefd%„Z"d&e	ez  defd'„Z#d&e	ez  d$edefd(„Z$	 dàd)e%d*e	d+e&e    de%fd,„Z'dád.eddfd/„Z(de)fd0„Z*	 dàd)e%d+e&e    de%fd1„Z+	 	 dâd)e%d*e	d+e&e    de%fd3„Z,d&e	e-z  ez  dz  de	dz  fd4„Z.	 dãd5e/dz  d6e/dz  de%fd7„Z0	 	 	 däd5e/e1jd                  z  dz  d6e/e1jd                  z  dz  d*e	de%fd8„Z3ede4e5z  e6z  dz  fˆ fd9„«       Z7e7j*                  d:e e4z  e%z  dz  ddfd;„«       Z7d<e de8fd=„Z9d>e:ddfd?„Z;d@e dAe ez  ddBfdC„Z<	 dådDedEe=e%gdf   dz  ddfdF„Z>d)e%dGeddfdH„Z?d)e%dIe@dJe dKe/dLe/ddfdM„ZA eBj†                  d2«      ZDeDd-dfd)e%ee%   z  dz  dNeEe e ee    z  eFe e e/f   z  f   dOeBj†                  dPedz  dQeddfdR„ZG	 dåd)e%dz  dee   fdS„ZHdDedee	   fdT„ZIdDeddfdU„ZJ	 dådDedEe=e%gdf   dz  ddfdV„ZKdædW„ZLdd-eMfddXœdYe dZe dz  d[ed\eNd]e dz  ddfd^„ZOdæd_„ZPd`eQddfda„ZRd`eez  deFeeSe   f   fdb„ZTdee   fdc„ZUd`eQddfdd„ZVd`eQdeFee	   ee	   f   fde„ZWd`eQdfee	   dgee	   de	fdh„ZXd`eQdie	ddfdj„ZYedeZdz  fˆ fdk„«       Z[e[j*                  deZez  eeef   z  dz  ddfdl„«       Z[dmee ef   ddfdn„Z\ e]«       Z^e^e^fd-d-doœdpedqedredseddf
dt„Z_de`e	   fdu„Zad$edefdv„Zbdecfdw„Zddeefdx„Zfedeefdy„«       Zg	 	 	 dçdzee%z  ecz  d{ecez  dz  d|ecez  dz  d}edef
d~„Zh	 	 	 dçdeid{ecez  dz  d|ecez  dz  d}edef
d€„Zj ekd�«      dddddeld-d‚œdƒe d„e%ez  e	z  dz  d{ecez  dz  d|ecez  dz  d…eFe/e/e/f   e z  dz  d†ed‡edˆemd}edefd‰„«       ZndædŠ„Zodƒe5d‹eeez  ddfdŒ„Zpdzedefd�„Zqd„e	defdŽ„Zr	 dådƒe d„e	dˆemdz  defd�„Zsdæd�„Ztd‘eue&eu   z  dz  ddfd’„Zvd)ee%z  ez  d‘e&e    dz  ddfd“„Zw	 dåd)e%ez  d”exe&ex   z  d•ee ef   dz  ddfd–„Zy	 dåd—ezd˜ee    d™ee    dšee   d”exd•ee ef   dz  ddfd›„Z{	 dådœed�ee   dšee   d”exd•ee ef   dz  deFee    ee    f   fdž„Z|e}jü                  fd”e}ddfdŸ„Zdåd ee    dz  ddfd¡„Z€	 dåd„e	d¢e d£e�d¤e‚e   dz  ddf
d¥„Zƒd¦Z„de…dz  fd§„Z†d¨e‡e…z  ddfd©„Zˆd¨e…ddfdª„Z‰ede…dz  fd«„«       ZŠeŠj*                  d¨e…ddfd¬„«       ZŠd­Z‹deŒdz  fd®„Z�edeŒdz  fd¯„«       ZŽeŽj*                  d°eŒddfd±„«       ZŽd„e	e%z  d²ee ef   defd³„Z�d)e%ez  de%fd´„Z�deez  de‘fdµ„Z’	 	 	 	 dèdeez  ez  de e“z  eFe	e	f   z  eFe	e	e	f   z  ee	   z  dz  d¶e“eFe	e	f   z  eFe	e	e	f   z  ee	   z  ee%   z  dz  d·ed¸ee    eFe d¹f   z  dz  ddfdº„Z”	 	 	 	 déd»e	dz  deez  ez  de dz  d¶e•ee%   z  dz  d·ed¸ee    eFe d¹f   z  dz  ddfd¼„Z–d:edDe—d½ee	e%f   d¾e˜ddf
d¿„Z™dƒed‹ed¾e˜ddfdÀ„ZšdÁed¶ee	e%f   dDedefdÂ„Z›dÃeœe   e z  d¶ee	e%f   dDeddfdÄ„Z�d)ee%z  e-z  e	z  dz  d¶ee	e%f   dDededz  fdÅ„ZžddÆœdÇeee   z  dz  d)e%d¶ee	e%f   dDedÈee	ef   dz  dee4   fdÉ„ZŸd²edÈee	ef   defdÊ„Z dÈee	ef   dDeddfdË„Z¡ddÌœdÍed¶ee	e%f   dDedÎe`e	   dz  dee4   f
dÏ„Z¢d:e4decfdÐ„Z£	 dådÑee4   d{ecez  d|edz  ddfdÒ„Z¤dædÓ„Z¥	 dåddÌœdee z  dÔe¦dz  dÎe`e	   dz  dee	   dz  fdÕ„Z§	 dådDeez  dz  ddfdÖ„Z¨	 	 	 däd×e	dØe	dÙe©dz  dÚe dz  dÛe	dz  ddfdÜ„Zª	 	 	 däd×e	dØe	dÙe©dz  dÚe dz  dÛe	dz  ddfdÝ„Z«defdÞ„Z¬ˆ xZ­S )êÚ	PdfWriteraô  
    Write a PDF file out, given pages produced by another class or through
    cloning a PDF file during initialization.

    Typically data is added from a :class:`PdfReader<pypdf.PdfReader>`.

    Args:
        clone_from: identical to fileobj (for compatibility)

        incremental: If true, loads the document and set the PdfWriter in incremental mode.

            When writing incrementally, the original document is written first and new/modified
            content is appended. To be used for signed document/forms to keep signature valid.
            Encryption is not supported in this mode: calling ``encrypt`` or writing changes to an
            encrypted document raises a ``NotImplementedError``.

        full: If true, loads all the objects (always full if incremental = True).
            This parameter may allow loading large PDFs.

        strict: If true, pypdf will raise an exception if a PDF does not follow the specification.
            If false, pypdf will try to be forgiving and do something reasonable, but it will log
            a warning message. It is a best-effort approach.

        keep_initial_header: If true, the PDF header of the cloned document is kept
            when using ``clone_from`` in non-incremental mode.

    ÚincrementalNÚ_objectsÚ	PreventGCÚ_id_translatedÚ_readerFi ¡ i@B )Úkeep_initial_headerÚ$incremental_clone_object_count_limitÚ!incremental_clone_object_id_limitÚfileobjÚ
clone_fromÚfullÚstrictrµ   r¶   r·   rx   c          	      ó	  — || _         	 |xs || _        g | _        g | _        	 i | _        	 i | _        |  	 d | _        d | _        	 g | _        	 i | _	        	 t        |t        «      r|nt        j                  | _        t        |t        «      r|nt        j                  | _        | j                  r©t        |t         t"        f«      r/t%        |d«      5 }	t'        |	j)                  d«      «      }d d d «       t        |t&        «      rt+        |«      }t        |t*        «      st-        d«      ‚|| _        |j.                  j1                  «       | _        d| _        n:d| _        | j7                  t9        t;        d«      t=        d«      i«      «      | _        dt*        t         z  t"        z  t@        tB           z  t&        z  d z  d	t*        t         z  t"        z  t@        tB           z  t&        z  d z  d
t*        t         z  t"        z  t@        tB           z  t&        z  d z  fd„}
 |
||«      }|| _"        d| _#        d| _$        |d uxr ||u | _%        t9        t;        tL        jN                  «      t;        d«      t;        tL        jP                  «      tS        d«      t;        tL        jT                  «      tW        «       i«      }g | _,        i | _-        d | _.        d | _/        |�Zt        |t*        «      st+        |«      }| ja                  |«       |rÀ| j                  s´|j.                  j1                  «       | _        n”| j7                  |«      | _1        t9        t;        tL        jN                  «      t;        td        jf                  «      t;        td        jh                  «      | jb                  i«      | _5        | j7                  | jj                  «       |r	|sd| _        t        | j                  tl        «      ršt        | j                  d   tn        «      r/tq        | j                  d   jr                  «      | j                  d<   t        | j                  d   tn        «      r0tq        | j                  d   jr                  «      | j                  d<   y y y # 1 sw Y   �Œ™xY w)NÚrbéÿÿÿÿz!Invalid type for incremental modeTs   %PDF-1.3z	/ProducerÚpypdfr¸   r¹   rx   c                 ó¤  — t        | t        t        t        t        f«      r	| dk(  s|�|S d}t        | t        t        f«      r;t        | «      }|j                  «       r|j                  «       j                  dk(  rRd}nOt        | t        t        f«      r9| j                  «       }| j                  dd«      dk(  rd}| j                  |d«       |r| }|S )NÚ Tr   Fr…   )rˆ   r‰   r   r   r   ÚexistsÚstatÚst_sizer	   ÚtellÚseek)r¸   r¹   ÚcloningÚfileobj_pathÚts        rq   Ú_get_clone_fromz+PdfWriter.__init__.<locals>._get_clone_frome  sº   € ô ˜'¤C¬¬r´7Ð#;Ô<Ø˜2’ Ð!7à!Ð!ØˆGÜ˜'¤C¬ ;Ô/Ü# G›}�Ø#×*Ñ*Ô,°×0AÑ0AÓ0C×0KÑ0KÈqÒ0PØ#‘GÜ˜G¤f¬gÐ%6Ô7Ø—L‘L“N�Ø—<‘<  1Ó%¨Ò*Ø#�GØ—‘˜Q Ô"ÙØ$�
ØÐrp   rÁ   Fú/Pagesr   r   ):r»   r°   r±   Ú_original_hashÚ_idnum_hashr³   r´   Ú_file_identifiersÚ_unresolved_linksÚ_merged_in_pagesrˆ   ÚintÚsysÚmaxsizeÚ%_incremental_clone_object_count_limitÚ"_incremental_clone_object_id_limitr‰   r   Úopenr   Úreadr!   r9   Ú
pdf_headerÚencodeÚ_headerÚ	_readonlyÚ_add_objectr@   rF   rP   Ú	_info_objr   r   Útemp_fileobjr¸   Ú_with_as_usageÚ_is_cloned_from_fileobjr4   ÚTYPEÚCOUNTrH   ÚKIDSr;   Úflattened_pagesÚ_page_id2numÚ_encryptionÚ_encrypt_entryÚclone_document_from_readerÚ_pagesr,   ÚCATALOGÚPAGESÚ_root_objectr™   rM   r=   Úoriginal_bytes)r�   r¸   r¹   r°   rº   r»   rµ   r¶   r·   ÚfrÊ   Úpagess               rq   r‚   zPdfWriter.__init__  s  € ð ˆŒð	ð 'Ò.¨$ˆÔàˆŒà)+ˆÔð	ð VXˆÔð	ð
 !ˆÔáð	Að ˆŒà59ˆÔð	Cð MOˆÔØHØTVˆÔØJô
 Ð>ÄÔDñ 1ä—‘ð 	Ô2ô 2<Ð<]Ô_bÔ1cÑ-Ôil×itÑitð 	Ô/ð ×ÒÜ˜'¤C¬ ;Ô/Ü˜' 4Ó(ð 2¨AÜ% a§f¡f¨R£jÓ1�G÷2ä˜'¤7Ô+Ü# GÓ,�Ü˜g¤yÔ1Ü Ð!DÓEÐEØ"ˆDŒLØ"×-Ñ-×4Ñ4Ó6ˆDŒLØ!ˆD�Nà&ˆDŒLØ!×-Ñ-Ü Ü Ó,Ô.BÀ7Ó.KÐLóóˆDŒNð	Ü¤‘_¤tÑ+¬b´©gÑ5¼Ñ?À$ÑFð	ä!¤C™¬$Ñ.´´C±Ñ8¼7ÑBÀTÑIð	ô œ‰_œtÑ#¤b¬¡gÑ-´Ñ7¸$Ñ>ó	ñ, % W¨jÓ9ˆ
à#ˆÔØˆŒØ#ˆÔà'1¸Ð'=Ò'WÀ*ÐPWÐBWˆÔ$ä äœ?×/Ñ/Ó0´*¸XÓ2FÜœ?×0Ñ0Ó1´<À³?Üœ?×/Ñ/Ó0´+³-ðó
ˆð  "ˆÔØ,.ˆÔØ.2ˆÔØ7;ˆÔàÐ!Ü˜j¬)Ô4Ü& zÓ2�
Ø×+Ñ+¨JÔ7Ù"¨4×+;Ò+;Ø)×4Ñ4×;Ñ;Ó=�•à×*Ñ*¨5Ó1ˆDŒKÜ 0äœ×3Ñ3Ó4´jÄÇÁÓ6NÜœtŸz™zÓ*¨D¯K©Kðó!ˆDÔð ×Ñ˜T×.Ñ.Ô/Ù™Ø$ˆDÔÜ�d×,Ñ,¬dÔ3Ü˜$×0Ñ0°Ñ3Ô5EÔFÜ,<¸T×=SÑ=SÐTUÑ=V×=eÑ=eÓ,f�×&Ñ& qÑ)Ü˜$×0Ñ0°Ñ3Ô5EÔFÜ,<¸T×=SÑ=SÐTUÑ=V×=eÑ=eÓ,f�×&Ñ& qÒ)ð Gð 4÷Y2ñ 2ús   ÃRÒRc                  ó   — y)zè
        Read-only boolean property showing whether this PDF file is encrypted.

        Note that this property, if true, will remain true even after the
        :meth:`decrypt()<pypdf.PdfReader.decrypt>` method is called.
        Fro   ©r�   s    rq   Úis_encryptedzPdfWriter.is_encrypted§  s   € ð rp   c                 ó   — | j                   S )zw
        Provide direct access to PDF Structure.

        Note:
            Recommended only for read access.

        )rì   rñ   s    rq   Úroot_objectzPdfWriter.root_object±  s   € ð × Ñ Ð rp   c                 ón   — | j                   €dS t        t        | j                   j                  «       «      S )z›
        Provide access to "/Info". Standardized with PdfReader.

        Returns:
            /Info Dictionary; None if the entry does not exist

        N)rÝ   r   r@   r˜   rñ   s    rq   Ú_infozPdfWriter._info¼  s7   € ð �~‰~Ð%ð ð	
ô Ô&¨¯©×(AÑ(AÓ(CÓDð	
rp   Úvaluec                 ó
  — |€_t        j                  t        t        «      5  d | j                  | j
                  j                  j                  dz
  <   d d d «       d | _        y | j
                  €| j                  t        «       «      | _        t        t        | j
                  j                  «       «      }|j                  «        |j                  t        t        |j                  «       «      «       y # 1 sw Y   d | _        y xY w)Nr   )Ú
contextlibÚsuppressÚKeyErrorÚAttributeErrorr±   rÝ   Úindirect_referenceÚidnumrÜ   r@   r   r˜   ÚclearÚupdate)r�   r÷   Úobjs      rq   rö   zPdfWriter._infoË  s»   € àˆ=Ü×$Ñ$¤X¬~Ó>ñ RØMQ�—‘˜dŸn™n×?Ñ?×EÑEÈÑIÑJ÷Rà!ˆD�Nà�~‰~Ð%Ø!%×!1Ñ!1Ô2BÓ2DÓ!E�”ÜÔ'¨¯©×)BÑ)BÓ)DÓEˆCØ�I‰IŒKØ�J‰J”tÔ,¨e×.>Ñ.>Ó.@ÓAÕB÷Rà!ˆD�Nús   ¡1C2Ã2Dc                 óJ   — t        t        | j                  j                  «      S )ú(XMP (Extensible Metadata Platform) data.)r   r]   rô   Úxmp_metadatarñ   s    rq   r  zPdfWriter.xmp_metadataØ  s   € ô ”N D×$4Ñ$4×$AÑ$AÓBÐBrp   c                 óÖ  — |€d| j                   v r| j                   d= y| j                   j                  dd«      }t        |t        «      sC|�| j                   d= t	        «       }| j                  |«      }|| j                   t        d«      <   nt        t        |j                  «       «      }t        |t        «      r|j                  j                  «       }n|}|j                  |«       y)r  Nz	/Metadata)rô   Úgetrˆ   rD   rL   rÜ   rF   r   r˜   r]   ÚstreamÚget_dataÚset_data)r�   r÷   ÚmetadataÚmetadata_streamÚstream_referenceÚ
bytes_datas         rq   r  zPdfWriter.xmp_metadataÝ  sÏ   € ð ˆ=Ø˜d×.Ñ.Ñ.Ø×$Ñ$ [Ð1Øà×#Ñ#×'Ñ'¨°TÓ:ˆÜ˜(¤NÔ3ØÐ#Ø×$Ñ$ [Ð1Ü*›nˆOØ#×/Ñ/°Ó@ÐØ8HˆD×ÑœZ¨Ó4Ò5ä"¤<°×1DÑ1DÓ1FÓGˆOä�eœ^Ô,ØŸ™×.Ñ.Ó0‰JàˆJØ× Ñ  Õ,rp   c                 ó6   — d| _         | j                  | _        | S )zLStore that the writer is used by 'with', so that __exit__ writes to fileobj.T)rß   rÞ   r¸   rñ   s    rq   Ú	__enter__zPdfWriter.__enter__õ  s   € à"ˆÔØ×(Ñ(ˆŒØˆrp   Úexc_typeÚexcÚ	tracebackc                 ón   — | j                   r)| j                  s| j                  | j                   «       yyy)zWrite data to the fileobj.N)r¸   rà   Úwrite)r�   r  r  r  s       rq   Ú__exit__zPdfWriter.__exit__û  s*   € ð �<Š< × <Ò <Ø�J‰J�t—|‘|Õ$ð !=ˆ<rp   c                 ó6   — | j                   j                  «       S )aL  
        Read/Write property of the PDF header that is written.

        This should be something like ``'%PDF-1.5'``. It is recommended to set
        the lowest version that supports all features which are used within the
        PDF file.

        Note: `pdf_header` returns a string but accepts bytes or str for writing
        )rÚ   Údecoderñ   s    rq   rØ   zPdfWriter.pdf_header  s   € ð �|‰|×"Ñ"Ó$Ð$rp   Ú
new_headerc                 óR   — t        |t        «      r|j                  «       }|| _        y r‡   )rˆ   r‰   rÙ   rÚ   )r�   r  s     rq   rØ   zPdfWriter.pdf_header  s!   € ä�j¤#Ô&Ø#×*Ñ*Ó,ˆJØ!ˆ�rp   r  c                 óþ  — t        |dd «      �%|j                  j                  | k(  r|j                  S t        |t        «      rpt        |j                  t        j                  d «      t        t        f«      r<| j                  |t        j                     «      |t        t        j                  «      <   | j                  j                  |«       t        t        | j                  «      d| «      |_        |j                  S )Nrý   r   )Úgetattrrý   Úpdfrˆ   r@   r  r2   ÚCONTENTSr;   rÜ   rF   r±   r�   rD   r�   )r�   r  s     rq   rÜ   zPdfWriter._add_object  sÅ   € ä�CÐ-¨tÓ4Ð@Ø×&Ñ&×*Ñ*¨dÒ2à×)Ñ)Ð)ä�cÔ+Ô,´Ø�G‰G”N×+Ñ+¨TÓ2´[ÔBRÐ4Sô2
ð 8<×7GÑ7GÈÌN×LcÑLcÑHdÓ7eˆC”
œ>×2Ñ2Ó3Ñ4Ø�‰×Ñ˜SÔ!Ü!/´°D·M±MÓ0BÀAÀtÓ!LˆÔØ×%Ñ%Ð%rp   rý   c                 óÚ   — t        |t        «      r| j                  |dz
     }n6|j                  | k7  rt	        d«      ‚| j                  |j
                  dz
     }|€t        d|›d�«      ‚|S )Nr   úPDF must be selfzObject z not found!)rˆ   rÑ   r±   r  Ú
ValueErrorrþ   r8   )r�   rý   r  s      rq   r˜   zPdfWriter.get_object'  sw   € ô Ð(¬#Ô.Ø—-‘-Ð 2°QÑ 6Ñ7‰CØ×#Ñ# tÒ+ÜÐ/Ó0Ð0à—-‘-Ð 2× 8Ñ 8¸1Ñ <Ñ=ˆCØˆ;Ü Ð);Ð(>¸kÐJÓKÐKØˆ
rp   c                 ó¢  — t        |t        «      r&|j                  | k7  rt        d«      ‚|j                  }| j
                  |dz
     j                  j                  }t        |dd «      �*|j                  j                  | k7  r|j                  | «      }|| j
                  |dz
  <   t        ||| «      |_        t        |t        «      sJ d«       ‚|S )Nr  r   rý   r£   )rˆ   rD   r  r   rþ   r±   rý   Ú
generationr  ÚclonerI   )r�   rý   r  Úgens       rq   Ú_replace_objectzPdfWriter._replace_object5  sÆ   € ô
 Ð(¬.Ô9Ø!×%Ñ%¨Ò-Ü Ð!3Ó4Ð4Ø!3×!9Ñ!9ÐØ�m‰mÐ.°Ñ2Ñ3×FÑF×QÑQˆä�CÐ-¨tÓ4Ð@Ø×&Ñ&×*Ñ*¨dÒ2à—)‘)˜D“/ˆCØ03ˆ�‰Ð(¨1Ñ,Ñ-Ü!/Ð0BÀCÈÓ!NˆÔä˜#œyÔ)Ð1¨6Ó1Ð)Øˆ
rp   ÚpageÚindexÚexcluded_keysc                 ó’  — t        |t        «      r1|j                  t        j                  d «      t
        j                  k7  rt        d«      ‚| j                  €J d«       ‚|}t        |«      }|t        j                  dgz  }	 | j                  t        |j                  j                  «         |j                  j                  = t%        d|j'                  | d|«      j)                  «       «      }|j                  �1|j                  j*                  }t-        | j*                  |«      | _        | j/                  |«      \  }}|j                  |t1        t        j                  «      <   |dk\  rXt%        t2        |t        j4                     «      j7                  ||j                  «       | j                  j7                  ||«       nUt%        t2        |t        j4                     «      j9                  |j                  «       | j                  j9                  |«       |}d}	t;        |«      s¯|€J d«       ‚t%        t<        |j)                  «       «      }
t?        t%        t@        |
t        jB                     «      dz   «      |
t1        t        jB                  «      <   |
j                  t        j                  d «      }|	dz  }	|	dkD  rtE        d	«      ‚t;        |«      sŒ¯|j                  �Ld
|vr%| jF                  jI                  tK        ||«      «       |j                  | jL                  |j                  <   |S # t         $ r ‚ t"        $ r Y �Œ�w xY w)NzInvalid page objectr£   z/StructParentsr   Fr   r   iè  zToo many recursive calls!ú/Annots)'rˆ   r   r  r4   rá   r,   ÚPAGEr   rä   r™   ÚPARENTr³   Úidrý   r  rþ   ÚMemoryErrorÚ	Exceptionr   r#  r˜   rØ   r$   Ú_get_page_in_noderF   r;   rã   rŸ   r�   rS   r@   rH   rÑ   râ   r9   rÏ   ÚextendrQ   rÐ   )r�   r&  r'  r(  Úpage_orgÚotherÚnodeÚidxÚcurrentÚrecurseÚ	node_dicts              rq   Ú	_add_pagezPdfWriter._add_pageJ  sÊ  € ô ˜$¤
Ô+¨t¯x©x¼×8LÑ8LÈdÓ/SÔW[×W`ÑW`Ò/`ÜÐ2Ó3Ð3Ø×#Ñ#Ð/Ð7°Ó7Ð/ØˆÜ˜]Ó+ˆØœ/×0Ñ0Ð2BÐCÑCˆð
	Ø×#Ñ#¤B x×'BÑ'B×'FÑ'FÓ$GÑHØ×+Ñ+×1Ñ1ðô Ø˜(Ÿ.™.¨¨u°mÓD×OÑOÓQó
ˆð �<‰<Ð#Ø—L‘L×+Ñ+ˆEÜ9¸$¿/¹/È5ÓQˆDŒOà×*Ñ*¨5Ó1‰	ˆˆcØ37×3JÑ3JˆŒZœ×.Ñ.Ó/Ñ0à�!Š8Ü”˜d¤?×#7Ñ#7Ñ8Ó9×@Ñ@ÀÀd×F]ÑF]Ô^Ø× Ñ ×'Ñ'¨¨tÕ4ä”˜d¤?×#7Ñ#7Ñ8Ó9×@Ñ@À×AXÑAXÔYØ× Ñ ×'Ñ'¨Ô-Ø$(ˆØˆÜ! 'Ô*ØÐ&Ð.¨Ó.Ð&ÜÔ-¨w×/AÑ/AÓ/CÓDˆIÜ;GÌÌSÐR[Ô\k×\qÑ\qÑRrÓHsÐvwÑHwÓ;xˆI”j¤×!6Ñ!6Ó7Ñ8Ø—m‘m¤O×$:Ñ$:¸DÓAˆGØ�q‰LˆGØ˜Š~Ü Ð!<Ó=Ð=ô " 'Õ*ð �<‰<Ð#ð
  Ñ-Ø×&Ñ&×-Ñ-¬m¸DÀ(Ó.KÔLØAE×AXÑAXˆD×!Ñ! (×"=Ñ"=Ñ>àˆøôS ò 	ØÜò 	Úð	ús   ÂAL0 Ì0MÍMTÚstatec                 ó¼  — 	 t         j                  | j                  vr=| j                  t	        «       «      | j                  t        t         j                  «      <   t        t        j                  «      }t        |«      t        t        | j                  t         j                     «      |<   y# t        $ r ‚ t        $ r}t        dt        ||¬«       Y d}~yd}~ww xY w)aŠ  
        Sets the "NeedAppearances" flag in the PDF writer.

        The "NeedAppearances" flag indicates whether the appearance dictionary
        for form fields should be automatically generated by the PDF viewer or
        if the embedded appearance should be used.

        Args:
            state: The actual value of the NeedAppearances flag.

        Returns:
            None

        z6set_need_appearances_writer(%(state)s) catch : %(exc)s)Úsourcer:  r  N)r+   Ú	ACRO_FORMrì   rÜ   r@   rF   r0   ÚNeedAppearancesr<   r   r.  r/  r(   r`   )r�   r:  Úneed_appearancesr  s       rq   Úset_need_appearances_writerz%PdfWriter.set_need_appearances_writer‰  sÉ   € ð"	ä ×*Ñ*°$×2CÑ2CÑCð ×$Ñ$Ô%5Ó%7Ó8ð ×!Ñ!ÜÔ0×:Ñ:Ó;ñô  *Ô*D×*TÑ*TÓUÐô ˜eÓ$ô Ô! 4×#4Ñ#4Ô5F×5PÑ5PÑ#QÓRØ òøô ò 	ØÜò 	ÜØHÜØØ÷	ò ûð	ús   ‚B)B, Â,CÂ>CÃCc                 ó„   — t        «       }| j                  |«      | j                  t        t        j
                  «      <   |S r‡   )rO   rÜ   rì   rF   r+   ÚVIEWER_PREFERENCES)r�   Úos     rq   Úcreate_viewer_preferencesz#PdfWriter.create_viewer_preferences¯  s@   € ÜÓˆð ×Ñ˜QÓð 	×ÑÜÔ(×;Ñ;Ó<ñ	
ð ˆrp   c                 ót   — | j                   €J d«       ‚| j                  |t        | j                   «      |«      S )aÆ  
        Add a page to this PDF file.

        Recommended for advanced usage including the adequate excluded_keys.

        The page is usually acquired from a :class:`PdfReader<pypdf.PdfReader>`
        instance.

        Args:
            page: The page to add to the document. Should be
                an instance of :class:`PageObject<pypdf._page.PageObject>`
            excluded_keys:

        Returns:
            The added PageObject.

        r£   )rä   r9  r�   )r�   r&  r(  s      rq   Úadd_pagezPdfWriter.add_page¶  s9   € ð, ×#Ñ#Ð/Ð7°Ó7Ð/Ø�~‰~˜d¤C¨×(<Ñ(<Ó$=¸}ÓMÐMrp   r   c                 óü   — | j                   €J d«       ‚|dk  r|t        | j                   «      z  }|dk  rt        d«      ‚|t        | j                   «      k\  r| j                  ||«      S | j	                  |||«      S )a]  
        Insert a page in this PDF file. The page is usually acquired from a
        :class:`PdfReader<pypdf.PdfReader>` instance.

        Args:
            page: The page to add to the document.
            index: Position at which the page will be inserted.
            excluded_keys:

        Returns:
            The added PageObject.

        r£   r   zInvalid index value)rä   r�   r   rF  r9  )r�   r&  r'  r(  s       rq   Úinsert_pagezPdfWriter.insert_pageÏ  s�   € ð& ×#Ñ#Ð/Ð7°Ó7Ð/Ø�1Š9Ø”S˜×-Ñ-Ó.Ñ.ˆEØ�1Š9ÜÐ2Ó3Ð3Ø”C˜×,Ñ,Ó-Ò-Ø—=‘=  }Ó5Ð5Ø�~‰~˜d E¨=Ó9Ð9rp   c                 óv  — t        |«      ry|€J d«       ‚t        |t        «      r|j                  | ury|j                  }nt        t        |«      }| j                  €J d«       ‚| j                  }| j                  j                  |«      }|�:|t        |«      k  r,t        t        ||   j                  «      j                  |k(  r|S i | _        t        |«      D ]C  \  }}| j                  j                  t        t        |j                  «      j                  |«       ŒE | j                  j                  |«      S )a›  
        Retrieve the page number from an indirect reference.

        The index of every page is remembered. As pages are added, inserted and
        removed, an index is only trusted after checking the page at that
        position; otherwise the index is rebuilt.

        Args:
            indirect_reference: The indirect reference to locate.

        Returns:
            The page number or None

        Nr£   )rS   rˆ   rD   r  rþ   r   rÑ   rä   rå   r  r�   rý   Ú	enumerateÚ
setdefault)r�   rý   rþ   rï   Únumberr'  r&  s          rq   Ú_get_page_number_by_indirectz&PdfWriter._get_page_number_by_indirectë  s-  € ô$ Ð-Ô.ØØ!Ð-Ð5¨vÓ5Ð-ÜÐ(¬.Ô9Ø!×%Ñ%¨TÑ1àØ&×,Ñ,‰EäœÐ0Ó1ˆEð ×#Ñ#Ð/Ð7°Ó7Ð/Ø×$Ñ$ˆð ×"Ñ"×&Ñ& uÓ-ˆàÐØœ˜U›Ò#Ü”^ U¨6¡]×%EÑ%EÓF×LÑLÐPUÒUàˆMð
 ˆÔÜ$ UÓ+ò 	e‰KˆE�4Ø×Ñ×(Ñ(¬¬n¸d×>UÑ>UÓ)V×)\Ñ)\Ð^cÕdð	eà× Ñ ×$Ñ$ UÓ+Ð+rp   ÚwidthÚheightc                 óR   — t        j                  | ||«      }| j                  |«      S )a(  
        Append a blank page to this PDF file and return it.

        If no page size is specified, use the size of the last page.

        Args:
            width: The width of the new page expressed in default user
                space units.
            height: The height of the new page expressed in default
                user space units.

        Returns:
            The newly appended page.

        Raises:
            PageSizeNotDefinedError: if width and height are not defined
                and previous page does not exist.

        )r   Úcreate_blank_pagerF  )r�   rN  rO  r&  s       rq   Úadd_blank_pagezPdfWriter.add_blank_page  s'   € ô, ×+Ñ+¨D°%¸Ó@ˆØ�}‰}˜TÓ"Ð"rp   c                 óX  — | j                  «       }t        |«      |kD  rt        d|› d|› d�«      ‚|rNt        ||dz
  «      }| j                  |   j
                  }|�|dk  r|j                  }|�|dk  r|j                  }t        j                  | ||«      }| j                  ||«       |S )aŠ  
        Insert a blank page to this PDF file and return it.

        If no page size is specified for a dimension, use the size of the last page.

        Args:
            width: The width of the new page in default user space units.
            height: The height of the new page in default user space units.
            index: Position to add the page.

        Returns:
            The newly inserted page.

        Raises:
            PageSizeNotDefinedError: if width and height are not defined
                and previous page does not exist.
            IndexError: Index is outside of [-self.get_num_pages(), self.get_num_pages()]
        zIndex should be in range [-ú, ú]r   r   )Úget_num_pagesÚabsÚ
IndexErrorÚminrï   ÚmediaboxrN  rO  r   rQ  rH  )r�   rN  rO  r'  Ú	num_pagesÚfixed_indexrZ  r&  s           rq   Úinsert_blank_pagezPdfWriter.insert_blank_page8  s²   € ð0 ×&Ñ&Ó(ˆ	Üˆu‹:˜	Ò!ÜÐ:¸9¸+ÀRÈ	À{ÐRSÐTÓUÐUáä˜e Y°¡]Ó3ˆKØ—z‘z +Ñ.×7Ñ7ˆHØˆ} ¨¢
Ø Ÿ™�Øˆ~ ¨1¢Ø!Ÿ™�ä×+Ñ+¨D°%¸Ó@ˆØ×Ñ˜˜uÔ%Øˆrp   c                 ó   •— t         ‰| �  S r‡   )ÚsuperÚopen_destination©r�   Ú	__class__s    €rq   r`  zPdfWriter.open_destinationa  s   ø€ ô ‰wÑ'Ð'rp   Údestc                 ó  — |€0t        j                  t        «      5  | j                  d= d d d «       y t	        |t
        «      r"t        |«      | j                  t        d«      <   y t	        |t        «      r#|j                  | j                  t        d«      <   y t	        |t        «      rRt        d|j                  �|j                  n	t        «       t        «      j                  | j                  t        d«      <   y y # 1 sw Y   y xY w)Nz/OpenActionÚOpening)rù   rú   rû   rì   rˆ   r‰   rM   rF   r?   Ú
dest_arrayr   rý   rG   r:   )r�   rc  s     rq   r`  zPdfWriter.open_destinationg  sÙ   € àˆ<Ü×$Ñ$¤XÓ.ñ 5Ø×%Ñ% mÐ4÷5ð 5ä˜œcÔ"Ü;KÈDÓ;QˆD×Ñœj¨Ó7Ò8Ü˜œkÔ*Ø;?¿?¹?ˆD×Ñœj¨Ó7Ò8Ü˜œjÔ)Ü;FØà×*Ñ*Ð6ð ×'Ò'ä“\Üó<÷ ‰jð ×Ñœj¨Ó7Ò8ð *÷5ð 5ús   œC;Ã;DÚ
javascriptc                 ó   — t        ddd«       y)z�
        Add JavaScript which will launch upon opening this PDF.

        Args:
            javascript: Your JavaScript.
        Úadd_jsÚadd_open_actionú7.0.0N)r'   )r�   rg  s     rq   ri  zPdfWriter.add_jsy  s   € ô 	% XÐ/@À'ÕJrp   Úactionc                 ó.   — t        j                  | |«      S )aÎ  
        Add an action to the document-level JavaScript name tree.

        Args:
            action: The action to add.

        Example:
            This will launch the print window when the PDF is opened.

            >>> from pypdf import PdfWriter
            >>> from pypdf.actions import JavaScript
            >>> output = PdfWriter()
            >>> output.add_open_action(JavaScript("this.print({bUI:true,bSilent:false,bShrinkToFit:true});"))
        )r)   Ú_create_open_action)r�   rl  s     rq   rj  zPdfWriter.add_open_action‚  s   € ô ×)Ñ)¨$°Ó7Ð7rp   ÚfilenameÚdatarA   c                 ó0   — t        j                  | ||«      S )aq  
        Embed a file inside the PDF.

        Reference:
        https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf
        Section 7.11.3

        Args:
            filename: The filename to display.
            data: The data in the file.

        Returns:
            EmbeddedFile instance for the newly created embedded file.

        )rA   Ú_create_new)r�   ro  rp  s      rq   Úadd_attachmentzPdfWriter.add_attachment“  s   € ô  ×'Ñ'¨¨h¸Ó=Ð=rp   ÚreaderÚafter_page_appendc                 ó¶   — t        |j                  «      }t        |«      D ]6  }|j                  |   }| j                  |«      }t	        |«      sŒ/ ||«       Œ8 y)aù  
        Copy pages from reader to writer. Includes an optional callback
        parameter which is invoked after pages are appended to the writer.

        ``append`` should be preferred.

        Args:
            reader: a PdfReader object from which to copy page
                annotations to this writer object. The writer's annots
                will then be updated.
            after_page_append:
                Callback function that is invoked after each page is appended to
                the writer. Signature includes a reference to the appended page
                (delegates to append_pages_from_reader). The single parameter of
                the callback is a reference to the page just appended to the
                document.

        N)r�   rï   r§   rF  Úcallable)r�   rt  ru  Úreader_num_pagesÚreader_page_numberÚreader_pageÚwriter_pages          rq   Úappend_pages_from_readerz"PdfWriter.append_pages_from_reader¥  sW   € ô. ˜vŸ|™|Ó,Ðä"'Ð(8Ó"9ò 	/ÐØ Ÿ,™,Ð'9Ñ:ˆKØŸ-™-¨Ó4ˆKäÐ)Õ*Ù! +Õ.ñ	/rp   Únew_content_datac                 óZ  — t        d«      |v ræ|t        d«         }|j                  «       }t        |t        «      rXt	        «       }|j                  |«       |j                  | j                  |«      «       | j                  |«      |t        d«      <   t        |t        «      rO|j                  «       dz   |z   }t	        «       }|j                  |«       | j                  |«      |t        d«      <   yyt	        «       }|j                  |«       | j                  |«      |t        d«      <   y)a*  
        Combines existing content stream(s) with new content (as bytes).

        Args:
            page: The page to which the new content data will be added.
            new_content_data: A binary-encoded new content stream, for
                instance the commands to draw an XObject.
        ú	/Contentsó   
N)	rF   r˜   rˆ   r;   rL   r	  r�   rÜ   r  )r�   r&  r}  Úexisting_content_refÚexisting_contentÚnew_stream_objÚmerged_dataÚ
new_streams           rq   Ú_merge_content_stream_to_pagez'PdfWriter._merge_content_stream_to_pageÅ  s  € ô  �kÓ" dÑ*Ø#'¬
°;Ó(?Ñ#@Ð Ø3×>Ñ>Ó@ÐäÐ*¬KÔ8ä!-£�Ø×'Ñ'Ð(8Ô9Ø ×'Ñ'¨×(8Ñ(8¸Ó(HÔIØ04×0@Ñ0@ÐAQÓ0R�”Z Ó,Ñ-ÜÐ*¬LÔ9à.×7Ñ7Ó9¸EÑAÐDTÑT�Ü)›^�
Ø×#Ñ# KÔ0Ø04×0@Ñ0@ÀÓ0L�”Z Ó,Ò-ð :ô &›ˆJØ×ÑÐ 0Ô1Ø,0×,<Ñ,<¸ZÓ,HˆD”˜KÓ(Ò)rp   Úappearance_stream_objÚobject_nameÚx_offsetÚy_offsetc                 óÔ  — t        t        |t        j                     «      }| j	                  |«      }t        d|› �«      j                  «       }d|vrt        «       |t        d«      <   t        t        |d   «      }	||	vr||	|<   nt        dt        |¬«       t        «       j                  ||«      }
d|
j                  «       › d|› d�j                  «       }| j                  ||«       y)	aµ  
        Adds an appearance stream to the page content in the form of
        an XObject.

        Args:
            page: The page to which to add the appearance stream.
            appearance_stream_obj: The appearance stream.
            object_name: The name of the appearance stream.
            x_offset: The horizontal offset for the appearance stream.
            y_offset: The vertical offset for the appearance stream.
        z/Fm_ú/XObjectzQXObject %(xobject_name)r already added to page resources. This might be an issue.)r<  Úxobject_namezq
ú
z Do
QN)r   r@   r2   Ú	RESOURCESrÜ   rF   Ú	_sanitizer(   r`   r   Ú	translateÚ_to_cmrÙ   r†  )r�   r&  r‡  rˆ  r‰  rŠ  Úpg_resÚxobject_refr�  Ú	pg_xo_resÚ
xobject_cmÚxobject_drawing_commandss               rq   Ú_add_apstream_objectzPdfWriter._add_apstream_objectì  sè   € ô& Ô&¨¬^×-EÑ-EÑ(FÓGˆð ×&Ñ&Ð'<Ó=ˆÜ! D¨¨Ð"6Ó7×AÑAÓCˆØ˜VÑ#Ü-=Ó-?ˆF”:˜jÓ)Ñ*ÜÔ*¨F°:Ñ,>Ó?ˆ	Ø˜yÑ(Ø&1ˆI�lÒ#äØcÜØ)õô
 $Ó%×/Ñ/°¸(ÓCˆ
Ø%(¨×):Ñ):Ó)<Ð(=¸RÀ¸~ÈVÐ#T×#[Ñ#[Ó#]Ð Ø×*Ñ*¨4Ð1IÕJrp   ÚfieldsÚflagsÚauto_regenerateÚflattenc                 ó  — t         j                  | j                  vrt        d«      ‚t	        t
        | j                  t         j                     «      }t        j                  |vrt        d«      ‚t        |t        «      r| j                  |«       |€t        | j                  «      }t        |t        «      r1|D ]+  }t        j                  |v sŒ| j                  |||d|¬«       Œ- yt        j                  |vrt!        dt"        ¬«       yd}|t        j                     D �]h  }	t	        t
        |	j%                  «       «      }	|	j'                  dd«      d	k7  rŒ8d
|	v rd|	v r|	}
n6|	j'                  t        j(                  t        «       «      j%                  «       }
|j+                  «       D �]Ü  \  }}t	        t,        |	t.        j0                     «      }| j3                  |
¬«      |k(  s|
j'                  dd«      |k(  sŒS|
j'                  d
d«      dk(  rd|
v r|
d= |r%t5        |«      |	t7        t8        j:                  «      <   |€|s�t        |t        «      r/t=        d„ |D «       «      }||
t7        t8        j>                  «      <   n^t        |t@        «      r)tC        |d   «      |
t7        t8        j>                  «      <   n%tC        |«      |
t7        t8        j>                  «      <   |
j'                  t8        jD                  «      dk(  r¢t7        |«      }t	        t
        |	t7        t.        jF                  «         «      }t	        t
        |d   «      }||vrt7        d«      }|j'                  |«      }||	t7        t.        jH                  «      <   ||	t7        t8        j>                  «      <   �n¿|
j'                  t8        jD                  «      dk(  s#|
j'                  t8        jD                  «      dk(  �rGt        |t@        «      r#tK        jL                  | ||||
|	|d   |d   «      }ntK        jL                  | ||||
|	«      }t.        jF                  |	vr@t        t7        d«      | jO                  |«      i«      |	t7        t.        jF                  «      <   nÛdt	        t
        |	t.        jF                     «      x}vrF| jO                  |«      t	        t
        |	t7        t.        jF                  «         «      t7        d«      <   np|	t.        jF                     d   jP                  jR                  }| jU                  ||«       n3|	j'                  t8        jD                  «      dk(  rt!        dt"        ¬«       |s�Œ¾|s�ŒÂ| jW                  ||||d   |d   «       �Œß �Œk y)ai  
        Update the form field values for a given page from a fields dictionary.

        Copy field texts and values from fields to page.
        If the field links to a parent object, add the information to the parent.

        Args:
            page: `PageObject` - references **PDF writer's page** where the
                annotations and field data will be updated.
                `List[Pageobject]` - provides list of pages to be processed.
                `None` - all pages.
            fields: a Python dictionary of:

                * field names (/T) as keys and text values (/V) as value
                * field names (/T) as keys and list of text values (/V) for multiple choice list
                * field names (/T) as keys and tuple of:
                    * text values (/V)
                    * font id (e.g. /F1, the font id must exist)
                    * font size (0 for autosize)

            flags: A set of flags from :class:`~pypdf.constants.FieldDictionaryAttributes.FfBits`.

            auto_regenerate: Set/unset the need_appearances flag;
                the flag is unchanged if auto_regenerate is None.

            flatten: Whether or not to flatten the annotation. If True, this adds the annotation's
                appearance stream to the page contents. Note that this option does not remove the
                annotation itself.

        z2No /AcroForm dictionary in PDF of PdfWriter Objectz0No /Fields dictionary in PDF of PdfWriter ObjectN)rœ  z No fields to update on this page©r<  ú/SubtyperÁ   ú/Widgetú/FTú/T)Úparentz/Chú/Ic              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr‡   )rM   )rŠ   Úvs     rq   rŒ   z:PdfWriter.update_page_form_field_values.<locals>.<genexpr>k  s   è ø€ Ò)MÀ!Ô*:¸1×*=Ñ)Mùó   ‚r   z/Btnú/Nz/Offz/Txr   r…   z/Sigz#Signature forms not implemented yet),r+   r=  rì   r9   r   r@   r0   ÚFieldsrˆ   r­   r@  r™   rï   r2   ÚANNOTSÚupdate_page_form_field_valuesr(   r`   r˜   r  r,  ÚitemsrJ   r*   ÚRectÚ_get_qualified_field_namerH   rF   r-   ÚFfr;   ÚVÚtuplerM   ÚFTÚAPÚASrT   Úfrom_text_annotationrÜ   rý   rþ   r%  r˜  )r�   r&  r™  rš  r›  rœ  Ú	acro_formÚpr‡  Ú
annotationÚparent_annotationÚfieldr÷   Ú	rectangleÚlstr¦  ÚapÚ	normal_apÚns                      rq   r«  z'PdfWriter.update_page_form_field_values  s	  € ôL ×&Ñ&¨d×.?Ñ.?Ñ?ÜÐQÓRÐRÜÔ)¨4×+<Ñ+<Ô=N×=XÑ=XÑ+YÓZˆ	Ü%×,Ñ,°IÑ=ÜÐOÓPÐPÜ�o¤tÔ,Ø×,Ñ,¨_Ô=àˆ<Ü˜Ÿ
™
Ó#ˆDÜ�dœDÔ!Øò `�Ü!×(Ñ(¨AÒ-Ø×6Ñ6°q¸&À%ÈÐW^Ð6Õ_ð`ð Ü× Ñ ¨Ñ,ÜÐ=ÄhÕOØØ59Ðàœ~×4Ñ4Ñ5ó Q	nˆJÜÔ.°
×0EÑ0EÓ0GÓHˆJØ�~‰~˜j¨"Ó-°Ò:ØØ˜
Ñ" t¨zÑ'9Ø$.Ñ!à$.§N¡NÜ"×)Ñ)Ô+;Ó+=ó%ç‘*“,ð "ð !'§¡£ó Fn‘��uÜ ¤°*Ô=[×=`Ñ=`Ñ2aÓb�	à×2Ñ2Ð:KÐ2ÓLÐPUÒUØ(×,Ñ,¨T°4Ó8¸EÒAàà%×)Ñ)¨%°Ó6¸%Ò?ØÐ 1Ñ1à)¨$Ð/ÙÜKWÐX]ÓK^�JœzÔ*C×*FÑ*FÓGÑHà˜©'Ü! %¬Ô.Ü)Ñ)MÀuÔ)MÓM˜ØUXÐ)¬*Ô5N×5PÑ5PÓ*QÒRÜ# E¬5Ô1ÜUeØ! !™HóVÐ)¬*Ô5N×5PÑ5PÓ*QÒRô VfÐfkÓUlÐ)¬*Ô5N×5PÑ5PÓ*QÑRà$×(Ñ(Ô)B×)EÑ)EÓFÈ&ÒPô # 5Ó)�AÜÔ.°
¼:ÔFd×FgÑFgÓ;hÑ0iÓj�BÜ $Ô%5°r¸$±xÓ @�IØ 	Ñ)Ü& vÓ.˜Ø,5¯M©M¸!Ó,<Ð)àPQ�JœzÔ*H×*KÑ*KÓLÑMØJK�JœzÔ*C×*EÑ*EÓFÓGà%×)Ñ)Ô*C×*FÑ*FÓGÈ5ÒPØ(×,Ñ,Ô-F×-IÑ-IÓJÈeÓSô " %¬Ô/Ü0D×0YÑ0YØ  $¨°Ð<MÈzÐ[`ÐabÑ[cÐejÐklÑemó1Ñ-ô 1E×0YÑ0YØ  $¨°Ð<MÈzó1Ð-ô 6×8Ñ8À
ÑJÜTdÜ'¨Ó-¨t×/?Ñ/?Ð@UÓ/VÐWóU˜
¤:Ô.L×.OÑ.OÓ#PÒQð ¬4Ô0@À*ÔMk×MnÑMnÑBoÓ+pÐ&p bÑqð !×,Ñ,Ð-BÓCô Ô-¨z¼*ÔEc×EfÑEfÓ:gÑ/hÓiÜ& tÓ,òð 'Ô'E×'HÑ'HÑIÈ$ÑO×bÑb×hÑh˜Ø×,Ñ,¨QÐ0EÕFà—N‘NÔ#<×#?Ñ#?Ó@ÀFÒJä"Ð#HÔQYÕZã(«WØ×-Ñ-¨dÐ4IÈ5ÐR[Ð\]ÑR^Ð`iÐjkÑ`lÖmòMFnñQ	nrp   c                 óŒ  — g }|€'| j                   D ]  }|| j                  |«      z  }Œ |S 	 t        t        | j                  t
        j                     «      }	 t        t        |t        j                     «      }d|vr|S t        t        |d   «      }t        |«      D ]­  \  }}t        |t        «      }	t        t        |j                  «       «      }|j!                  dd«      dk(  sŒJd|v sŒOd|j"                  v r|j$                  |v rŒl|	s| j'                  |«      ||<   |j)                  |j$                  «       |j)                  |«       Œ¯ |S # t        $ r4 t        «       }|| j                  t        t
        j                  «      <   Y �Œ4w xY w# t        $ r* t        «       }||t        t        j                  «      <   Y �ŒHw xY w)a1  
        Parse annotations within the page looking for orphan fields and
        reattach then into the Fields Structure.

        Args:
            page: page to analyze.
                  If none is provided, all pages will be analyzed.

        Returns:
            list of reattached fields.

        r*  rŸ  rÁ   r   r¡  rý   )rï   Úreattach_fieldsr   r@   rì   r+   r=  rû   rF   r;   r0   r©  rJ  rˆ   rD   r˜   r  Ú__dict__rý   rÜ   r�   )
r�   r&  r¼  r·  Úafr™  Úannotationsr5  r¸  Úis_indirects
             rq   rÁ  zPdfWriter.reattach_fields¢  s³  € ð ˆØˆ<Ø—Z‘Zò /�Ø�t×+Ñ+¨AÓ.Ñ.‘ð/àˆJð	LÜÔ&¨×(9Ñ(9Ô:K×:UÑ:UÑ(VÓWˆBð	GÜœ+ rÔ*D×*KÑ*KÑ'LÓMˆFð
 ˜DÑ ØˆJÜœ;¨¨Y©Ó8ˆÜ(¨Ó5ò 	'‰OˆC�Ü$ Z´Ó@ˆKÜÔ.°
×0EÑ0EÓ0GÓHˆJØ�~‰~˜j¨"Ó-°Ó:¸uÈ
Ò?Rà(¨J×,?Ñ,?Ñ?Ø"×5Ñ5¸Ñ?àÙ"Ø'+×'7Ñ'7¸
Ó'C�K Ñ$Ø—‘˜j×;Ñ;Ô<Ø—
‘
˜:Õ&ð	'ð ˆ
øô3 ò 	LÜ!Ó#ˆBØIKˆD×ÑœjÔ):×)DÑ)DÓEÔFð	Lûô
 ò 	GÜ “]ˆFØ@FˆBŒzÔ4×;Ñ;Ó<Ô=ð	Gús#   ­+E Á!F Å9FÆFÆ/GÇGc                 óÆ  — t        «       }|j                  j                  «       D ]  }|j                  t	        d |«      «       Œ |j                  t	        d |j
                  «      «       t        |«      }|| j                  kD  rt        d|› d| j                  › d�«      ‚t        |d¬«      }|| j                  kD  rt        d|› d| j                  › d�«      ‚t        |«      S )NzIncremental clone object count z exceeds maximum allowed count ú.r   ©ÚdefaultzIncremental clone object ID z exceeds maximum allowed ID )r}   ÚxrefÚvaluesr   ÚfilterÚxref_objStmr�   rÔ   r7   ÚmaxrÕ   Úsorted)r�   rt  Ú
object_idsÚ
xref_entryÚobject_countÚmax_object_ids         rq   Ú%_collect_incremental_clone_object_idsz/PdfWriter._collect_incremental_clone_object_idsÔ  sñ   € Ü"›uˆ
Ø Ÿ+™+×,Ñ,Ó.ò 	8ˆJØ×Ñœf T¨:Ó6Õ7ð	8à×Ñœ&  v×'9Ñ'9Ó:Ô;ä˜:“ˆØ˜$×DÑDÒDÜ#Ø1°,°ð @)Ø)-×)SÑ)SÐ(TÐTUðWóð ô
 ˜J°Ô2ˆØ˜4×BÑBÒBÜ#Ø.¨}¨oð >&Ø&*×&MÑ&MÐ%NÈaðQóð ô
 �jÓ!Ð!rp   c                 óÚ  ‡	— d| _         | j                  r™| j                  |«      }dg|r|d   ndz  | _        |D ]p  Š	t	        ˆ	fd„|j
                  j                  «       D «       d¬«      }|j                  t        ‰	||«      «      }|€ŒP|j                  | «      | j                  ‰	dz
  <   Œr n| j                  j                  «        |j                  j                  | «      | _        | j                  j                  d«      | _        t!        t"        |j$                  d   «      }t'        | j                  «      |kD  rV| j(                  r$t+        d	t'        | j                  «      › d
|› �«      ‚t-        dt.        t'        | j                  «      |¬«       | j                  r1| j                  D �cg c]  }|�|j1                  «       nd‘Œ c}| _        	 | j5                  «        | j8                  €J ‚| j8                  D ][  }| j;                  t!        t        |j<                  «      j>                  |«       | j                  rŒD| j                  |tA        d«      <   Œ] | j                  s`tC        | j8                  D �cg c]  }|j<                  ‘Œ c}«      t!        tD        | j                  j                  «       «      tA        d«      <   yyc c}w # t6        $ r}t+        d«      |‚d}~ww xY wc c}w )a  
        Copy the reader document root to the writer and all sub-elements,
        including pages, threads, outlines,... For partial insertion, ``append``
        should be considered.

        Args:
            reader: PdfReader from which the document root should be copied.

        Nr¾   r   c              3   ó2   •K  — | ]  \  }}‰|v sŒ|–— Œ y ­wr‡   ro   )rŠ   r"  ÚentriesÚ	object_ids      €rq   rŒ   z7PdfWriter.clone_reader_document_root.<locals>.<genexpr>ü  s   øè ø€ ÒgÑ$7 J°ÐR[Ð_fÒRf”ZÑgùs   ƒ�rÈ  r   rË   ú/SizezObject count z exceeds defined trailer size zKObject count %(object_count)d exceeds defined trailer size %(trailer_size)d)r<  rÒ  Útrailer_sizez!Got index error while flattening.ú/Parentú/Kids)#rÝ   r°   rÔ  r±   rÎ  rÊ  r¬  r˜   rD   Ú	replicaterÿ   rô   r#  rì   Úraw_getré   r   rÑ   Útrailerr�   r»   r8   r(   r`   Úhash_binrÌ   Ú_flattenrX  rä   r%  rý   rþ   rF   r;   r@   )
r�   rt  rÐ  r"  Úreader_objectrÚ  r  Ú	exceptionr·  rØ  s
            @rq   Úclone_reader_document_rootz$PdfWriter.clone_reader_document_rootê  sš  ø€ ð ˆŒØ×ÒØ×CÑCÀFÓKˆJØ!˜F¹
 j°¢nÈÑJˆDŒMØ'ò 	Q�	ô !Ûg¸6¿;¹;×;LÑ;LÓ;NÔgØô�
ð !'× 1Ñ 1´.ÀÈJÐX^Ó2_Ó `�Ø Ñ,Ø3@×3JÑ3JÈ4Ó3P�D—M‘M )¨a¡-Ò0ñ	Qð �M‰M×ÑÔ!Ø"×.Ñ.×4Ñ4°TÓ:ˆÔØ×'Ñ'×/Ñ/°Ó9ˆŒäœC §¡°Ñ!8Ó9ˆÜˆt�}‰}Ó Ò,Ø�{Š{Ü"Ø#¤C¨¯©Ó$6Ð#7Ð7UÐVbÐUcÐdóð ô Ø]ÜÜ  §¡Ó/Ø)õ	ð ×ÒàFJÇmÁmö#Ø?B 3 ?�—‘”¸Ñ9ò#ˆDÔð	SØ�M‰MŒOð ×#Ñ#Ð/Ð/Ð/Ø×%Ñ%ò 	7ˆAØ× Ñ ¤¤n°a×6JÑ6JÓ!K×!QÑ!QÐSTÔUØ×#Ó#Ø+/¯;©;�”*˜YÓ'Ò(ð	7ð ×Òô ¸4×;OÑ;OÖP°a˜Q×1Ó1ÒPÓQô Ô! 4§;¡;×#9Ñ#9Ó#;Ó<Ü˜7Ó#òð  ùò#øô ò 	SÜÐBÓCÈÐRûð	Süò Qs$   Æ-KÇK É8K(Ë	K%ËK Ë K%c                 óP  — | j                  |«       |j                  }| j                  rš|�¿t        t        |j                  | «      j                  «      | _        t        | j                  t        «      sJ d«       ‚| j                  j                  «       | j                  | j                  j                  j                  dz
  <   n'|�%| j                  |j                  | «      «      | _        t        j                  t         «      5  t        t"        |j$                  «      j                  | «      | _        ddd«       t'        |«      rUt        t"        t        t        | j(                  j+                  «       «      d   «      D ]  } ||j+                  «       «       Œ yy# 1 sw Y   ŒjxY w)a{  
        Create a copy (clone) of a document from a PDF file reader cloning
        section '/Root' and '/Info' and '/ID' of the pdf.

        Args:
            reader: PDF file reader instance from which the clone
                should be created.
            after_page_append:
                Callback function that is invoked after each page is appended to
                the writer. Signature includes a reference to the appended page
                (delegates to append_pages_from_reader). The single parameter of
                the callback is a reference to the page just appended to the
                document.

        Nr£   r   rÜ  )rä  rö   r°   r   rD   r#  rý   rÝ   rˆ   r@   rà  rÌ   rþ   rÜ   rù   rú   rü   r;   rÎ   rw  ré   r˜   )r�   rt  ru  Úinfr&  s        rq   rè   z$PdfWriter.clone_document_from_reader)  s]  € ð( 	×'Ñ'¨Ô/Ø�l‰lˆØ×ÒØˆÜ!%Ü" C§I¡I¨d£O×$FÑ$Fó"�”ô " $§*¡*Ô.>Ô?ÐGÀÓGÐ?ð —J‘J×'Ñ'Ó)ð ×#Ñ#Ø—N‘N×5Ñ5×;Ñ;¸aÑ?òð ˆ_Ø!×-Ñ-¨c¯i©i¸«oÓ>ˆDŒNô × Ñ ¤Ó0ñ 	]Ü%)¬+°v×7OÑ7OÓ%P×%VÑ%VÐW[Ó%\ˆDÔ"÷	]ô Ð%Ô&ÜÜœTÔ"2°D·K±K×4JÑ4JÓ4LÓMÈgÑVóò 5�ñ " $§/¡/Ó"3Õ4ñ5ð '÷	]ð 	]ús   Ä/FÆF%c                 óÜ   — | j                   r.| j                   d   }t        t        j                  d«      «      }n t        t        j                  d«      «      }|}t	        ||f«      | _         y)u"  
        Generate an identifier for the PDF that will be written.

        The only point of this is ensuring uniqueness. Reproducibility is not
        required.
        When a file is first written, both identifiers shall be set to the same value.
        If both identifiers match when a file reference is resolved, it is very
        likely that the correct and unchanged file has been found. If only the first
        identifier matches, a different version of the correct file has been found.
        see Â§14.4 "File Identifiers".
        r   é   N)rÎ   r=   ÚsecretsÚtoken_bytesr;   )r�   Úid1Úid2s      rq   Úgenerate_file_identifiersz#PdfWriter.generate_file_identifiersU  s]   € ð ×!Ò!Ø×(Ñ(¨Ñ+ˆCÜ"¤7×#6Ñ#6°rÓ#:Ó;‰Cä"¤7×#6Ñ#6°rÓ#:Ó;ˆCØˆCÜ!,¨c°3¨ZÓ!8ˆÕrp   )Ú	algorithmÚuser_passwordÚowner_passwordÚ
use_128bitÚpermissions_flagrî  c                óð  — | j                   rt        d«      ‚|€|}|�"	 t        t        |j	                  dd«      «      }n"t        j                  }|st        j                  }| j                  «        | j                  sJ ‚t        j                  ||| j                  d   «      | _        | j                  j                  ||| j                  ¬«      }| j                   ra| j                   j"                  €J ‚| j                   j"                  |_        || j$                  |j"                  j&                  d	z
  <   || _        y| j)                  |«       || _        y# t
        $ r}t        d|› d�«      |‚d}~ww xY w)
aã  
        Encrypt this PDF file with the PDF Standard encryption handler.

        Args:
            user_password: The password which allows for opening
                and reading the PDF file with the restrictions provided.
            owner_password: The password which allows for
                opening the PDF files without any restrictions. By default,
                the owner password is the same as the user password.
            use_128bit: flag as to whether to use 128bit
                encryption. When false, 40bit encryption will be used.
                By default, this flag is on.
            permissions_flag: permissions as described in
                Table 3.20 of the PDF 1.7 specification. A bit value of 1 means
                the permission is granted.
                Hence an integer value of -1 will set all flags.
                Bit position 3 is for printing, 4 is for modifying content,
                5 and 6 control annotations, 9 for form fields,
                10 for extraction of text and graphics.
            algorithm: encrypt algorithm. Values may be one of "RC4-40", "RC4-128",
                "AES-128", "AES-256-R5", "AES-256". If it is valid,
                `use_128bit` will be ignored.

        z<Encrypting incremental PDF files is currently not supported.Nú-Ú_zAlgorithm 'z' NOT supportedr   ©r»   r   )r°   ÚNotImplementedErrorr  r   Úreplacerü   r   ÚRC4_128ÚRC4_40rí  rÎ   r   Úmakeræ   Úwrite_entryr»   rç   rý   r±   rþ   rÜ   )	r�   rï  rð  rñ  rò  rî  Úalgrã  r’   s	            rq   ÚencryptzPdfWriter.encrypti  sh  € ðB ×ÒÜ%Ð&dÓeÐeàÐ!Ø*ˆNàÐ ðZÜÔ.°	×0AÑ0AÀ#ÀsÓ0KÓL‘ô #×*Ñ*ˆCÙÜ&×-Ñ-�Ø×&Ñ&Ô(Ø×%Ò%Ð%Ð%Ü%Ÿ?™?¨3Ð0@À$×BXÑBXÐYZÑB[Ó\ˆÔà× Ñ ×,Ñ,¨]¸NÐSW×S^ÑS^Ð,Ó_ˆØ×Òà×&Ñ&×9Ñ9ÐEÐEÐEØ'+×':Ñ':×'MÑ'MˆEÔ$Ø@EˆD�M‰M˜%×2Ñ2×8Ñ8¸1Ñ<Ñ=ð $ˆÕð ×Ñ˜UÔ#Ø#ˆÕøô% "ò ZÜ  ;¨y¨k¸Ð!IÓJÐPYÐYûðZús   Ÿ E Å	E5Å E0Å0E5c                 ó.  — d}| j                   D ]„  \  }}|j                  «       }|sŒ| j                  j                  |«      }|€Œ7t	        |t
        «      r,|€t        | j                  «      }|j                  | ||¬«       Œs|j                  | |«       Œ† y)zyPatch up links that were added to the document earlier, to
        make sure they still point to the same pages.
        N)Úknown_names)	rÏ   Úfind_referenced_pagerÐ   r  rˆ   rE   r}   Únamed_destinationsÚpatch_reference)r�   r   Únew_linkÚold_linkÚold_pageÚnew_pages         rq   Ú_resolve_linkszPdfWriter._resolve_links§  sœ   € ð (,ˆØ$(×$:Ñ$:ò 	9Ñ ˆX�xØ×4Ñ4Ó6ˆHÙØØ×,Ñ,×0Ñ0°Ó:ˆHØÐØÜ˜(Ô$6Ô7ØÐ&Ü"% d×&=Ñ&=Ó">�KØ×(Ñ(¨¨xÀ[Ð(ÕQà×(Ñ(¨¨xÕ8ñ	9rp   r  c                 óš  — t        |d«      r*d|j                  vrt        dt        |j                  ¬«       | j                  «        | j                  rÀ| j                  €J d«       ‚t        | j                  «       «      dkD  }|r!| j                  j                  rt        d«      ‚| j                  j                  j                  d«       |j                  | j                  j                  j                  d«      «       |r| j!                  |«       y y | j#                  |«      \  }}| j%                  |||«      }| j'                  ||«       y )	NÚmodeÚbz]File <%(stream_name)s> to write to is not in binary mode. It may not be written to correctly.)r<  Ústream_namer£   r   úNWriting incremental updates of encrypted PDF files is currently not supported.r¾   )Úhasattrr
  r(   r`   Únamer  r°   r´   r�   Úlist_objects_in_incrementrò   r÷  r  rÆ   r  r×   Ú_write_incrementÚ_write_pdf_structureÚ_write_xref_tableÚ_write_trailer)r�   r  Úhas_incrementÚobject_positionsÚfree_objectsÚxref_locations         rq   Úwrite_streamzPdfWriter.write_streamº  s$  € Ü�6˜6Ô" s°&·+±+Ñ'=Üð6äØ"ŸK™Kõ	ð 	×ÑÔà×ÒØ—<‘<Ð+Ð3¨VÓ3Ð+Ü × >Ñ >Ó @ÓAÀAÑEˆMÙ §¡×!:Ò!:Ü)Ødóð ð �L‰L×Ñ×$Ñ$ QÔ'Ø�L‰L˜Ÿ™×,Ñ,×1Ñ1°"Ó5Ô6ÙØ×%Ñ% fÕ-ð ð .2×-FÑ-FÀvÓ-NÑ*Ð˜lØ ×2Ñ2ØÐ(¨,óˆMð ×Ñ ¨Õ6rp   c                 óì   — d}|dk(  rt        d|›d�«      ‚t        |t        t        f«      rt	        |d«      }d}| j                  |«       |r|j                  «        ||fS |j                  «        ||fS )a®  
        Write the collection of pages added to this object out as a PDF file.

        Args:
            stream: An object to write the file to. The object can support
                the write method and the tell method, similar to a file object, or
                be a file path, just like the fileobj, just named it stream to keep
                existing workflow.

        Returns:
            A tuple (bool, IO).

        FrÁ   zOutput(stream=z) is empty.ÚwbT)r   rˆ   r‰   r   r   r  Úcloser�   )r�   r  Úmy_files      rq   r  zPdfWriter.writeÖ  s~   € ð ˆà�RŠ<Ü˜ v i¨{Ð;Ó<Ð<ä�fœs¤D˜kÔ*Ü˜F DÓ)ˆFØˆGà×Ñ˜&Ô!áØ�L‰LŒNð ˜ˆÐð �L‰LŒNà˜ˆÐrp   c                 ó  — t        | j                  «      }t        | j                  «      D ��cg c]F  \  }}|�?||k\  s |j	                  «       | j                  |   k7  rt        t        |«      j                  ‘ŒH c}}S c c}}w )a  
        For analysis or debugging.
        Provides the list of new or modified objects that will be written
        in the increment.
        Deleted objects will not be freed but will become orphans.

        Returns:
            List of new or modified IndirectObjects

        )r�   rÌ   rJ  r±   rà  r   rD   rý   )r�   Úoriginal_hash_countr©   r  s       rq   r  z#PdfWriter.list_objects_in_incrementö  sx   € ô " $×"5Ñ"5Ó6Ðô $ D§M¡MÓ2÷

á��3à�àÐ,Ò,Ø—|‘|“~¨×)<Ñ)<¸QÑ)?Ò?ô ” Ó%×8Ó8ó

ð 
	
ùó 

s   ®AA=c                 óø  — | j                   €J d«       ‚| j                   j                  rt        d«      ‚i }g }d}d}t        | j                  «      }t        | j                  «      D ]ø  \  }}|€Œ	||k\  s!|j                  «       | j                  |   k7  sŒ/|dz   }	t        |t        «      sJ d«       ‚t        |dd «      }
t        |
t        «      r|
j                  nd}|j                  «       |f||	<   |j                  |	› d|› d	�j                  «       «       |j!                  |«       |j                  d
«       |	|k7  r|dkD  r|j#                  |||z
  g«       |	}|	dz   }Œú |dkD  sJ d«       ‚|j#                  |||z
  g«       |j                  «       }t        | j                  «      dz   }|j                  |› d�j                  «       «       t%        d«      t%        d«      t%        d«      t'        |dz   «      t%        d«      | j(                  j*                  t%        d«      t%        d«      t%        d«      t-        |D ��cg c]  }|D ]  }t'        |«      ‘Œ Œ c}}«      t%        d«      t-        t'        d«      t'        d«      t'        d«      g«      ddi}| j.                  �Â| j.                  j*                  j0                  dz
  t        | j                  «      k\  sYt3        t        | j.                  «      j                  «       | j                  | j.                  j*                  j0                  dz
     k7  r0| j.                  j*                  |t%        t4        j6                  «      <   t'        | j                   j8                  «      |t%        t4        j:                  «      <   | j<                  r&| j<                  |t%        t4        j>                  «      <   tA        jB                  |«      }|jE                  djG                  |jI                  «       D ��cg c]  \  }}tK        jL                  dd||«      ‘Œ c}}«      «       |j!                  |«       |j                  d|› d�j                  «       «       y c c}}w c c}}w )Nr£   r  r¾   éþÿÿÿr   rý   r   ú z obj
ó   
endobj
zfor pytest onlyz 0 objú/Typez/XRefrÙ  z/Rootú/Filterz/FlateDecodez/Indexz/Wé   r…   Ú__streamdata__rp   s   >BIHz
endobj
startxref
ú
%%EOF
)'r´   rò   r÷  r�   rÌ   rJ  r±   rà  rˆ   rI   r  rD   r"  rÅ   r  rÙ   Úwrite_to_streamr�   rF   rH   rô   rý   r;   rö   rþ   r   r5   ÚINFOÚ
_startxrefÚPREVrÎ   ÚIDrL   Úinitialize_from_dictionaryr	  ÚjoinrË  ÚstructÚpack)r�   r  r  Úobject_blocksÚcurrent_startÚcurrent_stopr  r©   r  rþ   Ú	referencer"  r  Úxr_idÚ_suÚ_itÚ	init_dataÚxrÚ_posÚ_gens                       rq   r  zPdfWriter._write_increment  sì  € à�|‰|Ð'Ð/¨Ó/Ð'Ø�<‰<×$Ò$Ü%Ð&vÓwÐwØÐØˆØˆØˆÜ! $×"5Ñ"5Ó6ÐÜ §¡Ó.ò 	)‰FˆAˆsØ‰ØÐ(Ò(Ø—<‘<“> T×%8Ñ%8¸Ñ%;Ó;à˜A™�Ü! #¤yÔ1Ð9°6Ó9Ð1Ü# CÐ)=¸tÓD�	Ü5?À	Ì>Ô5Z˜Y×1Ò1Ð`a�
à+1¯;©;«=¸*Ð*EÐ  Ñ'Ø—‘ ˜w a¨
 |°6Ð:×AÑAÓCÔDØ×#Ñ# FÔ+Ø—‘˜]Ô+ð ˜LÒ(Ø$ qÒ(Ø%×,Ñ,Ø*¨L¸=Ñ,HÐIôð %*�MØ$ q™y‘ð-	)ð. ˜qÒ Ð3Ð"3Ó3Ð Ø×Ñ˜m¨\¸MÑ-IÐJÔKàŸ™›ˆÜ�D—M‘MÓ" QÑ&ˆØ�‰˜�w˜fÐ%×,Ñ,Ó.Ô/ä�wÓ¤¨GÓ!4Ü�wÓ¤¨e°a©iÓ!8Ü�wÓ ×!1Ñ!1×!DÑ!DÜ�yÓ!¤:¨nÓ#=Ü�xÓ ¤+Ø.;×K sÀsÒKÀ”˜cÕ"ÐKÐ"ÓKó#ô �tÓœkÜ˜a“¤,¨q£/´<À³?ÐCóð ˜cð
ˆ	ð �:‰:Ð!Ø�J‰J×)Ñ)×/Ñ/°!Ñ3Ü�4×&Ñ&Ó'ò(ä”N D§J¡JÓ/×8Ñ8Ó:Ø×"Ñ"Ø—
‘
×-Ñ-×3Ñ3°aÑ7ñòð
 7;·j±j×6SÑ6SˆI”j¤×!1Ñ!1Ó2Ñ3Ü2>¸t¿|¹|×?VÑ?VÓ2Wˆ	”*œ[×-Ñ-Ó.Ñ/Ø×!Ò!Ø48×4JÑ4JˆI”j¤§¡Ó0Ñ1Ü×4Ñ4°YÓ?ˆØ
�‰Ø�H‰HØGW×G^ÑG^ÓG`×a¹¸¸t”—‘˜W a¨¨tÕ4Óaóô	
ð
 	×Ñ˜6Ô"Ø�‰Ð,¨]¨O¸9ÐE×LÑLÓNÕOùó5 Lùó, bs   É Q0Ð"Q6c                 ól  — g }g }|j                  | j                  j                  «       dz   «       |j                  d«       t        | j                  d¬«      D ]Å  \  }}|�œ|j                  |j                  «       «       |j                  |› d�j                  «       «       | j                  r,|| j                  k7  r| j                  j                  ||d«      }|j                  |«       |j                  d«       Œ¤|j                  d«       |j                  |«       ŒÇ |j                  d«       ||fS )	Nr€  s   %âãÏÓ
r   )Ústartz 0 obj
r   r#  r¾   )r  rØ   rÙ   rJ  r±   r�   rÅ   ræ   rç   Úencrypt_objectr)  )r�   r  r  r  rþ   r  s         rq   r  zPdfWriter._write_pdf_structureW  s  € ØÐØˆØ�‰�T—_‘_×+Ñ+Ó-°Ñ5Ô6Ø�‰Ð+Ô,ä# D§M¡M¸Ô;ò 
	+‰JˆE�3ØˆØ ×'Ñ'¨¯©«Ô6Ø—‘ ˜w hÐ/×6Ñ6Ó8Ô9Ø×#Ò#¨¨t×/BÑ/BÒ(BØ×*Ñ*×9Ñ9¸#¸uÀaÓH�CØ×#Ñ# FÔ+Ø—‘˜]Õ+à ×'Ñ'¨Ô+Ø×#Ñ# EÕ*ð
	+ð 	×Ñ˜AÔØ Ð-Ð-rp   r  r  c                 óØ  — |j                  «       }|j                  d«       |j                  dt        | j                  «      dz   › d�j	                  «       «       |j                  |d   d›ddd	›d
�j	                  «       «       d}|D ]^  }|dkD  r(|j                  |d›ddd	›d�j	                  «       «       Œ0|j                  ||   d›ddd	›d
�j	                  «       «       |dz  }Œ` |S )Ns   xref
z0 r   rŽ  r   z0>10r"  iÿÿ  z0>5z f 
z n 
)rÅ   r  r�   r±   rÙ   )r�   r  r  r  r  Úfree_idxÚoffsets          rq   r  zPdfWriter._write_xref_tablek  sñ   € ð Ÿ™›ˆØ�‰�YÔØ�‰�rœ#˜dŸm™mÓ,¨qÑ0Ð1°Ð4×;Ñ;Ó=Ô>Ø�‰˜ Q™¨Ð-¨Q¨u°S¨k¸Ð?×FÑFÓHÔIØˆØ&ò 	ˆFØ˜ŠzØ—‘  t˜}¨A¨a°¨W°EÐ:×AÑAÓCÕDà—‘ ¨XÑ 6°tÐ<¸A¸aÀ¸WÀEÐJ×QÑQÓSÔTØ˜A‘‘ð	ð Ðrp   r  c                 óÂ  — |j                  d«       t        t        t        j                  «      t        t        | j                  «      dz   «      t        t        j                  «      | j                  j                  i«      }| j                  �0| j                  j                  |t        t        j                  «      <   | j                  �&| j                  |t        t        j                  «      <   | j                  r0| j                  j                  |t        t        j                   «      <   |j#                  |«       |j                  d|› d�j%                  «       «       y)zó
        Write the PDF trailer to the stream.

        To quote the PDF specification:
            [The] trailer [gives] the location of the cross-reference table and
            of certain special objects within the body of the file.
        s   trailer
r   Nz
startxref
r(  )r  r@   rF   r5   ÚSIZErH   r�   r±   ÚROOTrô   rý   rö   r*  rÎ   r-  rç   ÚENCRYPTr)  rÙ   )r�   r  r  rß  s       rq   r  zPdfWriter._write_trailer{  s  € ð 	�‰�\Ô"Ü"äœ;×+Ñ+Ó,¬l¼3¸t¿}¹}Ó;MÐPQÑ;QÓ.RÜœ;×+Ñ+Ó,¨d×.>Ñ.>×.QÑ.Qðó
ˆð �:‰:Ð!Ø48·J±J×4QÑ4QˆG”Jœ{×/Ñ/Ó0Ñ1Ø×!Ñ!Ð-Ø26×2HÑ2HˆG”Jœ{Ÿ~™~Ó.Ñ/Ø×ÒØ7;×7JÑ7J×7]Ñ7]ˆG”Jœ{×2Ñ2Ó3Ñ4Ø×Ñ Ô'Ø�‰�} ] O°9Ð=×DÑDÓFÕGrp   c                 ó   •— t         ‰| �  S )aª  
        Retrieve/set the PDF file's document information dictionary, if it exists.

        Args:
            value: dict with the entries to be set. if None : remove the /Info entry from the pdf.

        Note that some PDF files use (XMP) metadata streams instead of document
        information dictionaries, and these metadata streams will not be
        accessed by this function, but by :meth:`~xmp_metadata`.

        )r_  r
  ra  s    €rq   r
  zPdfWriter.metadata“  s   ø€ ô ‰wÑÐrp   c                 ó†   — |€d | _         y | j                   �| j                   j                  «        | j                  |«       y r‡   )rö   rÿ   Úadd_metadata)r�   r÷   s     rq   r
  zPdfWriter.metadata¢  s8   € ð
 ˆ=ØˆD�Jà�z‰zÐ%Ø—
‘
× Ñ Ô"à×Ñ˜eÕ$rp   Úinfosc                 ó’  — i }t        |t        «      rt        t        |j	                  «       «      }t        |j                  «       «      D ]E  \  }}t        |t        «      r|j	                  «       }t        t        |«      «      |t        |«      <   ŒG | j                  €t        «       | _
        | j                  j                  |«       y)zº
        Add custom metadata to the output.

        Args:
            infos: a Python dictionary where each key is a field
                and each value is your new metadata.

        N)rˆ   rI   r   r@   r˜   r™   r¬  rP   r‰   rF   rö   r   )r�   rJ  Úargsr‹   r÷   s        rq   rI  zPdfWriter.add_metadata¯  s    € ð ˆÜ�eœYÔ'ÜÔ)¨5×+;Ñ+;Ó+=Ó>ˆEÜ˜uŸ{™{›}Ó-ò 	E‰JˆC�Ü˜%¤Ô+Ø×(Ñ(Ó*�Ü$8¼¸U»Ó$DˆD”˜C“Ò!ð	Eð �:‰:ÐÜ)Ó+ˆDŒJØ�
‰
×Ñ˜$Õrp   )Úremove_duplicatesÚremove_unreferencedÚremove_identicalsÚremove_orphansrM  rN  c          
      ó`  ‡— || j                   k7  rt        ddd«       || j                   k7  rt        ddd«       dt        dt        t        t        f   dd	fˆfd
„Ši | _        t        | j                  «      D ]¬  \  }}t        |«      rŒ|€J d«       ‚t        |j                  t        «      sJ ‚|j                  «       }|rI|| j
                  v r;| j
                  |   d   j                  |j                  «       d	| j                  |<   Œ’|j                  g f| j
                  |<   Œ® | j
                  j                  «       D �ci c]  }t        |d   «      dkD  sŒ|d   |d   “Œ }	}i }
|	j                  «       D ]-  \  }}|
j!                  t#        ||ft        |«      z  «      «       Œ/ | j                  D ]"  }t        |t$        t&        f«      sŒ ‰||
«       Œ$ |rO| j)                  «       }t+        dt        | j                  «      dz   «      D ]  }||vsŒd	| j                  |dz
  <   Œ y	y	c c}w )a�  
        Parse the PDF file and merge objects that have the same hash.
        This will make objects common to multiple pages.
        Recommended to be used just before writing output.

        Args:
            remove_identicals: Deprecated.
            remove_orphans: Deprecated.
            remove_duplicates: Remove duplicate objects.
            remove_unreferenced: Remove unreferenced objects.

        rO  rM  rk  rP  rN  r  Úcrossrefrx   Nc                 ó  •— t        | t        «      r| j                  «       }nt        | t        «      rt	        | «      }ny t        | t        t        f«      sJ ‚|D ]-  \  }}t        |t
        «      r||v sŒ||   | |<   Œ$	  ‰||«       Œ/ y r‡   )rˆ   r@   r¬  r;   rJ  rD   )r  rR  Úkey_valÚkr¦  Úreplace_in_objs        €rq   rV  z<PdfWriter.compress_identical_objects.<locals>.replace_in_objÞ  s‡   ø€ ô ˜#Ô/Ô0ØŸ)™)›+‘Ü˜C¤Ô-Ü# C›.‘àÜ˜cÔ$4´kÐ#BÔCÐCÐCØò 0‘��1Ü˜a¤Ô0Ø˜H’}Ø!)¨!¡˜˜Ašð?á" 1 hÕ/ñ0rp   r£   r   r   )Ú_UNSETr'   rI   ÚdictrD   rÍ   rJ  r±   rS   rˆ   rý   Ú
hash_valuer�   rË  r�   r¬  r   Úzipr@   r;   Ú_find_reachable_objectsr§   )r�   rO  rP  rM  rN  r5  r  Úhr¦  ÚcnvÚcnv_revrU  Ú	reachablerþ   rV  s                 @rq   Úcompress_identical_objectsz$PdfWriter.compress_identical_objectsÅ  s'  ø€ ð(  §¡Ò+Ü(Ð)<Ð>QÐSZÔ[Ø˜TŸ[™[Ò(Ü(Ð)9Ð;PÐRYÔZð	0Üð	0Ü&*¬>¼>Ð+IÑ&Jð	0àõ	0ð( ˆÔä! $§-¡-Ó0ò 
	C‰HˆC�Ü˜sÔ#ØØ�?Ð* FÓ*�?Ü˜c×4Ñ4´nÔEÐEÐEØ—‘Ó ˆAÙ  Q¨$×*:Ñ*:Ñ%:Ø× Ñ  Ñ# AÑ&×-Ñ-¨c×.DÑ.DÔEØ%)�—‘˜cÒ"à'*×'=Ñ'=¸rÐ&B�× Ñ  Ò#ð
	Cð $(×#3Ñ#3×#:Ñ#:Ó#<ÖN˜aÄÀAÀaÁDÃ	ÈAÃˆq�‰t�Q�q‘T‰zÐNˆÐNØ8:ˆØ—I‘I“Kò 	2‰DˆAˆqØ�N‰Nœ3˜q 1 $¬¨Q«¡-Ó0Õ1ð	2ð —=‘=ò 	-ˆCÜ˜#Ô 0´+Ð>Õ?Ù˜s GÕ,ð	-ñ Ø×4Ñ4Ó6ˆIÜ˜q¤# d§m¡mÓ"4°qÑ"8Ó9ò 4�Ø 	Ò)Ø/3�D—M‘M %¨!¡)Ò,ñ4ð ùò Os   ÅH+ÅH+c                 óÔ  — t        «       }t        | j                  «      }g }| j                  | j                  | j
                  | j                  fD ]$  }t        |dd«      }|j                  |€|n|«       Œ& |rï|j                  «       }t        |t        «      r{|j                  | u r¾|j                  |vr°d|j                  cxk  r|k  r›n n˜|j                  |j                  «       |j                  | j                  |j                  dz
     «       nQt        |t        «      r |j!                  |j#                  «       «       n!t        |t$        «      r|j!                  |«       |rŒï|S )z:Get the numbers of all objects which the trailer leads to.rý   Nr   r   )r}   r�   r±   rô   rö   rÎ   rç   r  r�   Úpoprˆ   rD   r  rþ   rž   r@   r1  rË  r;   )r�   r_  rÒ  Úobjects_to_visitr  r5  s         rq   r[  z!PdfWriter._find_reachable_objects  s(  € ä!›eˆ	Ü˜4Ÿ=™=Ó)ˆØ&(ÐØ×$Ñ$ d§j¡j°$×2HÑ2HÈ$×J]ÑJ]Ð^ò 	MˆCÜ Ð%9¸4Ó@ˆIØ×#Ñ#¨9Ð+<¡CÀ)ÕLð	Mñ Ø"×&Ñ&Ó(ˆCÜ˜#œ~Ô.Ø—7‘7˜d‘? s§y¡y¸	Ñ'AÀaÈ#Ï)É)ÔFcÐWcÕFcØ—M‘M #§)¡)Ô,Ø$×+Ñ+¨D¯M©M¸#¿)¹)Àa¹-Ñ,HÕIÜ˜CÔ!1Ô2Ø ×'Ñ'¨¯
©
«Õ5Ü˜C¤Ô-Ø ×'Ñ'¨Ô,ò ð Ðrp   c                 ó†   — | j                   j                  |«      dz   }t        |d| «      }|j                  «       |k(  sJ ‚|S )Nr   r   )r±   r'  rD   r˜   )r�   r  rþ   Úrefs       rq   Úget_referencezPdfWriter.get_reference%  sC   € Ø—‘×#Ñ# CÓ(¨1Ñ,ˆÜ˜U A tÓ,ˆØ�~‰~Ó 3Ò&Ð&Ð&Øˆ
rp   c                 ó~  — d }t         j                  | j                  v rÊ| j                  t         j                     }t        |t        «      r|}nšt        |t
        «      rmt	        |«      }t        |dd «      }|€6| j                  |«      | j                  t        t         j                  «      <   n:| j                  |j                  |«       nt        |«      st        dt        |¬«       |€Rt	        «       }|j                  i «       | j                  |«      }|| j                  t        t         j                  «      <   |S )Nrý   z(Outlines are not a dictionary: %(entry)s)r<  r’   )r,   ÚOUTLINESrì   rˆ   rN   r@   r  rÜ   rF   r%  rþ   rS   r(   r`   r   )r�   Úoutliner’   r5  Úoutline_refs        rq   Úget_outline_rootzPdfWriter.get_outline_root+  s   € Ø%)ˆÜ�=‰=˜D×-Ñ-Ñ-à×%Ñ%¤d§m¡mÑ4ˆEÜ˜%¤Ô,Ø‘Ü˜EÔ#3Ô4Ü$ UÓ+�Ü# EÐ+?ÀÓF�	ØÐ$àCG×CSÑCSÐT[ÓC\�D×%Ñ%¤j´·±Ó&?Ò@à×(Ñ(¨¯©¸'ÕBÜ$ UÔ+ÜØ>Ü#Øõð
 ˆ?Ü “lˆGØ�N‰N˜2ÔØ×*Ñ*¨7Ó3ˆKØ;FˆD×Ñœj¬¯©Ó7Ñ8àˆrp   c                 óø   — t         j                  | j                  v r-t        t        | j                  t         j                     «      }|S t	        «       }|| j                  t        t         j                  «      <   |S )u  
        The list of threads.

        See Â§12.4.3 of the PDF 1.7 or PDF 2.0 specification.

        Returns:
            An array (possibly empty) of Dictionaries with an ``/F`` key,
            and optionally information about the thread in ``/I`` or ``/Metadata`` keys.

        )r,   ÚTHREADSrì   r   r;   rF   )r�   Úthreadss     rq   Úget_threads_rootzPdfWriter.get_threads_rootH  s_   € ô �<‰<˜4×,Ñ,Ñ,äœ;¨×(9Ñ(9¼$¿,¹,Ñ(GÓHˆGð ˆô "“mˆGØ:AˆD×Ñœj¬¯©Ó6Ñ7Øˆrp   c                 ó"   — | j                  «       S )u  
        Read-only property for the list of threads.

        See Â§12.4.3 of the PDF 1.7 or PDF 2.0 specification.

        Each element is a dictionary with an ``/F`` key, and optionally
        information about the thread in ``/I`` or ``/Metadata`` keys.
        )ro  rñ   s    rq   rn  zPdfWriter.threads[  s   € ð ×$Ñ$Ó&Ð&rp   Úpage_destinationr£  ÚbeforeÚis_openc           	      óF  — t        t        |j                  «       «      }t        |t        «      rS| j	                  t        d|j                  › �t        t        |j                  «      t        j                  «       «      «      S |€| j                  «       }t        |«      |t        d«      <   t        t        |j                  «       «      }| j                  |«      }|�|j                  }|j!                  ||| |j"                  «       d|vrt%        d«      |t        d«      <   |S )Nzpage #z
/%is_open%z/Countr   )r   r   r˜   rˆ   Úadd_outline_item_destinationr?   Úpage_numberrD   rý   rB   Úfitrk  r<   rF   rN   rÜ   Úinsert_childÚinc_parent_counter_outlinerH   )r�   rq  r£  rr  rs  Úpage_destination_refs         rq   ru  z&PdfWriter.add_outline_item_destinationg  s  € ô  ¤
Ð,<×,GÑ,GÓ,IÓJÐÜÐ&¬
Ô3Ø×4Ñ4ÜØÐ-×9Ñ9Ð:Ð;ÜœÐ)9×)LÑ)LÓMÜ—G‘G“Ióóð ð ˆ>Ø×*Ñ*Ó,ˆFä5BÀ7Ó5KÐœ LÓ1Ñ2Ü”j &×"3Ñ"3Ó"5Ó6ˆØ#×/Ñ/Ð0@ÓAÐØÐØ×.Ñ.ˆFØ×ÑØ ØØØ×7Ñ7ô		
ð Ð+Ñ+Ü5AÀ!³_ÐœZ¨Ó1Ñ2à#Ð#rp   Úoutline_itemc                 ób   — t        «       }|j                  |«       	 | j                  ||||«      S r‡   )rN   r   ru  )r�   r{  r£  rr  rs  Úoutline_item_objects         rq   Úadd_outline_item_dictzPdfWriter.add_outline_item_dict‹  s=   € ô )›lÐØ×"Ñ" <Ô0ð	ð ×0Ñ0Ø ¨°ó
ð 	
rp   ú8.0.0)r£  rr  ÚcolorÚboldÚitalicrw  rs  r–   rv  r€  r�  r‚  rw  c       	   
      óà  — |€d}
�nt        |t        «      r|}n_t        |t        «      r|j                  }nBt        |t        «      r	 | j
                  |   j                  }nt        dt        |«      › �«      ‚|€t        dt        |¬«       t        «       }t        t        d|z   dz   «      ||«      }| j                  t!        t        t"        j$                  «      |j&                  t        t"        j(                  «      t        d«      i«      «      }
| j                  t+        |
||||«      «      }|€| j-                  «       }| j/                  ||||	«      S # t        $ r t        |«      }Y Œów xY w)a<  
        Add an outline item (commonly referred to as a "Bookmark") to the PDF file.

        Args:
            title: Title to use for this outline item.
            page_number: Page number this outline item will point to.
            parent: A reference to a parent outline item to create nested
                outline items.
            before: The outline item in front of which the new outline item
                is inserted. If None, the new outline item is appended.
            color: Color of the outline item's font as a red, green, blue tuple
                from 0.0 to 1.0 or as a Hex String (#RRGGBB)
            bold: Outline item font is bold
            italic: Outline item font is italic
            fit: The fit of the destination page.
            is_open: Whether the children of the outline item are shown.

        Returns:
            The added outline item as an indirect object.

        .. deprecated:: 7.1.0
            Passing positional arguments is deprecated and will be removed
            in pypdf 8.0.0. Use keyword arguments instead.

        Nzpage_number: invalid type z.can not find reference of page %(page_number)s)r<  rv  ú/z outline itemú/GoTo)rˆ   rD   r   rý   rÑ   rï   rX  rH   Ú	TypeErrorÚtyper(   r`   rG   r?   rF   rÜ   r@   r.   ÚDrf  ÚSÚ_create_outline_itemrk  ru  )r�   r–   rv  r£  rr  r€  r�  r‚  rw  rs  Ú
action_refÚpage_refrc  r{  s                 rq   Úadd_outline_itemzPdfWriter.add_outline_item¢  sf  € ðP ÐØŠJä˜+¤~Ô6Ø&‘Ü˜K¬Ô4Ø&×9Ñ9‘Ü˜K¬Ô-ð9Ø#Ÿz™z¨+Ñ6×IÑI‘Hô  Ð"<¼TÀ+Ó=NÐ<OÐ PÓQÐQØÐÜØDÜ#Ø +õô
 &›<�ÜÜ˜3 ™;¨Ñ8Ó9ØØóˆDð ×)Ñ)Ü ä"Ô#6×#8Ñ#8Ó9¸4¿?¹?Ü"Ô#6×#8Ñ#8Ó9¼:ÀgÓ;NðóóˆJð ×'Ñ'Ü  ¨U°E¸6À4ÓHó
ˆð ˆ>Ø×*Ñ*Ó,ˆFØ×0Ñ0°¸vÀvÈwÓWÐWøô? "ò 9Ü+¨KÓ8’Hð9ús   ÁE ÅE-Å,E-c                 ó   — t        d«      ‚)NzIThis method is not yet implemented. Use :meth:`add_outline_item` instead.)r÷  rñ   s    rq   Úadd_outlinezPdfWriter.add_outlineõ  s   € Ü!ØWó
ð 	
rp   r›   c                 ó  — | j                  «       }d}|t        |«      k  rJ|||   k  r.|j                  ||«       |j                  |t        |«      «       y |dz  }|t        |«      k  rŒJ|j	                  t        |«      |g«       y )Nr   r…   )Úget_named_dest_rootr�   rŸ   rM   r1  )r�   r–   r›   Ú
named_destr©   s        rq   Úadd_named_destination_arrayz%PdfWriter.add_named_destination_arrayú  s�   € ð ×-Ñ-Ó/ˆ
ØˆØ”#�j“/Ò!Ø�z !‘}Ò$Ø×!Ñ! ! [Ô1Ø×!Ñ! !Ô%5°eÓ%<Ô=ØØ�‰FˆAð ”#�j“/Ó!ð 	×ÑÔ+¨EÓ2°KÐ@ÔAØrp   c                 óz   — | j                  |j                  «      }| j                  t        d|d   «      |«       |S )NrM   ú/Title)rÜ   rf  r“  r   )r�   rq  rz  s      rq   Úadd_named_destination_objectz&PdfWriter.add_named_destination_object  sF   € ð  $×/Ñ/Ð0@×0KÑ0KÓLÐØ×(Ñ(ÜÐ#Ð%5°hÑ%?Ó@ÐBVô	
ð $Ð#rp   c                 ó¤   — | j                   }t        |«      }| |cxk  r|k  sn t        d|› d�«      ‚t        t        ||   j
                  «      S )z^Look up a page by number, reporting a bad index rather than an IndexError from the kids array.zPage number z is out of range)rï   r�   rX  r   rD   rý   )r�   rv  rï   Úcounts       rq   Ú_get_page_referencezPdfWriter._get_page_reference  sP   € à—
‘
ˆÜ�E“
ˆØ�˜+Ô-¨Ô-Ü˜|¨K¨=Ð8HÐIÓJÐJÜ”N E¨+Ñ$6×$IÑ$IÓJÐJrp   c                 ód  — | j                  |«      }|€jt        t        |j                  «       «      j	                  t
        j                  «      }|�t        |«      j                  nd}t        j                  |¬«      }t        |t        «      st        t        |«      «      }t        «       }|j                  t        t         j"                  «      t%        |||«      j&                  t        t         j(                  «      t        d«      i«       | j+                  |«      }| j-                  ||«       |S )a»  
        Add a named destination to a page in this PDF.

        Args:
            title: Name of the destination.
            page_number: Index of the destination page, starting at zero.
            fit: How the destination is displayed.
                Defaults to fitting the page horizontally with its
                top edge at the top of the window.

        Returns:
            A reference to the destination's GoTo action.

        r   )Útopr…  )r™  r   r@   r˜   r  r2   ÚMEDIABOXrJ   r›  rB   Úfit_horizontallyrˆ   rM   r‰   r   rF   r.   rˆ  r?   rf  r‰  rÜ   r“  )r�   r–   rv  rw  rŒ  r›  rc  Údest_refs           rq   Úadd_named_destinationzPdfWriter.add_named_destination  sö   € ð( ×+Ñ+¨KÓ8ˆØˆ;ÜÔ'¨×)<Ñ)<Ó)>Ó?×CÑCÄN×D[ÑD[Ó\ˆCØ.1¨o”/ #Ó&×*Ò*À1ˆCÜ×&Ñ&¨3Ô/ˆCÜ˜%Ô!1Ô2Ü$¤S¨£ZÓ0ˆEÜÓ!ˆØ�‰äÔ.×0Ñ0Ó1´;¸uÀhÐPSÓ3T×3_Ñ3_ÜÔ.×0Ñ0Ó1´:¸gÓ3Fðô	
ð ×#Ñ# DÓ)ˆØ×(Ñ(¨°Ô9Øˆrp   c                 óf   — | j                   D ]"  }| j                  |t        j                  «       Œ$ y)z.Remove links and annotations from this output.N)rï   Úremove_objects_from_pager_   rj   )r�   r&  s     rq   Úremove_linkszPdfWriter.remove_linksB  s.   € à—J‘Jò 	TˆDØ×)Ñ)¨$Ô0B×0RÑ0RÕSñ	Trp   Úsubtypesc                 óJ   — | j                   D ]  }| j                  ||«       Œ y)aC  
        Remove annotations by annotation subtype.

        Args:
            subtypes: subtype or list of subtypes to be removed.
                Examples are: "/Link", "/FileAttachment", "/Sound",
                "/Movie", "/Screen", ...
                If you want to remove all annotations, use subtypes=None.

        N)rï   Ú_remove_annots_from_page)r�   r£  r&  s      rq   Úremove_annotationszPdfWriter.remove_annotationsG  s'   € ð —J‘Jò 	:ˆDØ×)Ñ)¨$°Õ9ñ	:rp   c                 ó  — t        t        |j                  «       «      }t        j                  |v rÔ|t        j                     }t        |t        «      st        dt        |¬«       y d}|t        |«      k  r�||   }|j                  «       }t        |t        «      r|j                  d«      nd }|�|�<||v r8t        |t        «      r$t        «       | j                  |j                  dz
  <   ||= n|dz  }|t        |«      k  rŒŒy y y )Nz-Annotations are not an array: %(annotations)s)r<  rÄ  r   rŸ  r   )r   r@   r˜   r2   rª  rˆ   r;   r(   r`   r�   r  rD   rG   r±   rþ   )r�   r&  r£  rÄ  r©   Úanr  Úsubtypes           rq   r¥  z"PdfWriter._remove_annots_from_pageW  sï   € ô
 Ô$ d§o¡oÓ&7Ó8ˆÜ× Ñ  DÑ(Øœ~×4Ñ4Ñ5ˆKÜ˜k¬;Ô7ÜØCÜ#Ø +õð
 ØˆAØ”c˜+Ó&Ò&Ø  ‘^�Ø—m‘m“o�ä1;¸CÔAQÔ1R˜#Ÿ'™' *Ô-ÐX\�ØÐ#¨Ð(;ÀÈ8Ñ@SÜ! "¤nÔ5Ü6@³l˜Ÿ™ b§h¡h°¡lÑ3Ø# A™à˜‘F�Að ”c˜+Ó&Õ&ð )rp   Ú	to_deleteÚtext_filtersc                 ó�  — t        |t        t        f«      r|D ]  }| j                  |||«       Œ yt        |t        «      sJ ‚|t        j
                  z  r| j                  |d«       |t        j                  z  r| j                  |d«       |t        j                  z  r| j                  |d«       |t        j                  z  r| j                  |d«       |t        j                  t        j                  z  z  syg }|t        j                  z  r|g d¢z  }|t        j                  z  r|t        t        «      z  }t        |t        «      st        | |j                  «      }d|v r_t!        t"        |j%                  «       «      }| j'                  |g |||¬«      \  }}| j)                  ||||||¬«       |j+                  |«       y)	a  
        Remove objects specified by ``to_delete`` from the given page.

        Args:
            page: Page object to clean up.
            to_delete: Objects to be deleted; can be a ``ObjectDeletionFlag``
                or a list of ObjectDeletionFlag
            text_filters: Properties of text to be deleted, if applicable. Optional.
                This is a Python dictionary with the following properties:

                * font_ids: List of font resource IDs (such as /F1 or /T1_0) to be deleted.

        N)ú/Link)z/FileAttachmentz/Soundz/Moviez/Screen)z/3D)ó   wó   Jó   jó   Mó   dó   ió   Ws   W*ó   bs   b*ó   Bs   B*ó   Só   só   fs   f*ó   Fó   nó   mó   ló   có   vó   yó   hs   res   shr  ©ÚeltÚstackÚjump_operatorsrª  r«  ©ÚcontentÚimagesÚformsrÅ  rª  r«  )rˆ   r™   r±  r¡  r_   rg   r¥  rh   ri   rj   rf   rn   rm   Ú_TEXT_SHOWING_OPERATORSr   rý   r   r>   Úget_contentsÚ&_remove_objects_from_page__clean_formsÚ _remove_objects_from_page__cleanÚreplace_contents)	r�   r&  rª  r«  Úto_drÅ  rÇ  rÈ  rÉ  s	            rq   r¡  z"PdfWriter.remove_objects_from_pages  sÃ  € ô& �i¤$¬ Ô/Ø!ò H�Ø×-Ñ-¨d°D¸,ÕGðHàÜ˜)Ô%7Ô8Ð8Ð8ØÔ)×/Ñ/Ò/Ø×)Ñ)¨$°
Ô;ØÔ)×5Ñ5Ò5Ø×)Ñ)ØÐHôð Ô)×4Ñ4Ò4Ø×)Ñ)¨$°Ô9ØÔ)×9Ñ9Ò9Ø×)Ñ)¨$°Ô5ØÔ.×3Ñ3Ô6H×6OÑ6OÑOÒPØàˆØÔ)×8Ñ8Ò8Øò ñ ˆNð Ô)×.Ñ.Ò.ØœdÔ#:Ó;Ñ;ˆNä˜$¤
Ô+Ü˜d D×$;Ñ$;Ó<ˆDØ˜$ÑÜœ=¨$×*;Ñ*;Ó*=Ó>ˆGà ×GÑGØ °>ÈYÐeqð Hó ‰MˆF�Eð ×1Ñ1Ø¨°eØ-¸Ø)ð 2ô ð
 ×!Ñ! 'Ô*Ørp   rÇ  rÈ  rÉ  rÅ  c                 óÜ  — d }g }|r%|t         j                  z  r|j                  dg «      }d}	|	t        |j                  «      k  r—|j                  |	   \  }
}|dk(  r|
d   }|dk(  r|t         j
                  z  s#||v s|dk(  r<|t         j                  z  r)|
d   |v r"|t        v r|r
||vr|	dz  }	n|j                  |	= n|	dz  }	|	t        |j                  «      k  rŒ—|j                  «        y )NÚfont_idsr   s   Tfs   INLINE IMAGEs   Dor   )	r_   rf   r  r�   Ú
operationsrl   rk   rÊ  r  )r�   rÇ  rÈ  rÉ  rÅ  rª  r«  Úfont_idÚfont_ids_to_deleter©   ÚoperandsÚoperators               rq   rÍ  z*PdfWriter._remove_objects_from_page__cleanµ  s  € ð ˆØÐÙ˜IÔ(:×(?Ñ(?Ò?Ø!-×!1Ñ!1°*¸bÓ!AÐàˆØ”#�g×(Ñ(Ó)Ò)Ø!(×!3Ñ!3°AÑ!6ÑˆH�hØ˜5Ò Ø" 1™+�ð  Ò/Ø"Ô%7×%EÑ%EÒEà Ñ.à Ò%Ø"Ô%7×%FÑ%FÒFØ! !™¨Ñ.ð Ô 7Ñ7Ù$ØÐ'9Ñ9à˜‘F‘Aà×*Ñ*¨1Ñ-à�Q‘�ð3 ”#�g×(Ñ(Ó)Ó)ð4 	×ÑÕrp   rÃ  rÄ  c           	      óÚ  ‡— ‰|v s t        ‰d«      rt        ˆfd„|D «       «      rg g fS ‰j                  dt        «       «      j	                  «       }t        |t        «      s't        |«      st        dt        |¬«       t        «       }|j                  dt        «       «      j	                  «       }t        |t        «      st        |«      st        dt        |¬«       i }g }g }	|j                  «       D �][  \  }
}|j	                  «       }	 d }|t        j                  z  r#|d	   d
k(  rt        «       }|j                  |
«       |d	   dk(  rÁ|	j                  |
«       t        |t        «      r|}nvt        || «      }|j                  |j                  «       D ��ci c]  \  }}|dvr||“Œ c}}«       t!        j"                  t$        «      5  |j&                  |_        d d d «       |j                  ‰«       | j)                  |||||¬«       |�At        |t*        «      r|| j,                  |j.                  dz
  <   n| j1                  |«      ||
<   �Œ^ |D ]  }||= Œ t        ‰t6        «      rTt        ‰t        «      s-t        ‰| «      }|j                  ‰j                  «       «       |Š| j9                  ‰||	|||¬«       ||	fS c c}}w # 1 sw Y   ŒîxY w# t2        t4        f$ r Y �Œõw xY w)Nrý   c              3   óR   •K  — | ]  }‰j                   t        |d d«      k(  –— Œ  y­w)rý   r¾   N)rý   r  )rŠ   ÚxrÃ  s     €rq   rŒ   zCPdfWriter._remove_objects_from_page__clean_forms.<locals>.<genexpr>ê  s.   øè ø€ ò ;àð ×*Ñ*¬g°aÐ9MÈrÓ.RÕRñ;ùs   ƒ$'ú
/Resourcesz-Resources are not a dictionary: %(resources)s)r<  Ú	resourcesrŒ  z4XObject resources are not a dictionary: %(x_object)s)r<  Úx_objectrŸ  z/Imagez/Form)z/Lengthr%  z/DecodeParmsrÂ  r   rÆ  )r  Úanyr  rG   r˜   rˆ   r@   rS   r(   r`   r¬  r_   rk   r�   r>   r   rù   rú   rü   rý   rÌ  rD   r±   rþ   rÜ   r†  rû   rL   rÍ  )r�   rÃ  rÄ  rÅ  rª  r«  rÛ  ÚdrÈ  rÉ  rU  r¦  rC  rÇ  Úk1Úv1ÚimÚes    `                rq   rÌ  z0PdfWriter._remove_objects_from_page__clean_formsà  sÛ  ø€ ð �5‰LÜ˜Ð1Ô2´só ;à"ô;ô 8ð �r�6ˆMØ—G‘G˜L¬*«,Ó7×BÑBÓDˆ	Ü˜)Ô%5Ô6Ü" 9Ô-ÜØCÜ#Ø'õô
 )Ó*ˆIØ%ŸM™M¨*Ô6FÓ6HÓI×TÑTÓVˆÜ˜!Ô-Ô.Ü" 1Ô%ÜØJÜ#Øõð
 ˆAØˆØˆØ—G‘G“Ió (	‰DˆAˆqØ—‘“ˆAð&Ø#�à!Ô$6×$EÑ$EÒEØ˜j™M¨XÒ5ä(›l�GØ—M‘M !Ô$Ø�Z‘= GÒ+Ø—L‘L ”OÜ! !¤]Ô3Ø"#™ä"/°°4Ó"8˜ØŸ™ð /0¯g©g«i÷á$* B¨Ø#%Ð-SÑ#Sð !# B¡óôô (×0Ñ0´Ó@ñ NØ9:×9MÑ9M˜GÔ6÷Nà—L‘L Ô%ð ×?Ñ?Ø#¨5ÀÐ[dØ%1ð @ô ð Ð&Ü! !¤^Ô4Ø5<˜Ÿ™ a§g¡g°¡kÒ2ð  $×/Ñ/°Ó8˜˜!™ùðM(	ðR ò 	ˆBØ�"‘ð	ä�cœ<Ô(Ü˜c¤=Ô1Ü! # tÓ,�Ø—‘˜Ÿ™›Ô%Ø�à×1Ñ1Ø F°%ÈØ#°,ð 2ô ð �uˆ}ÐùóI÷Nð Nûô  œxÐ(ò Úðús>   ÄBKÆKÆ+!KÇKÇA2KËKËK	ËKËK*Ë)K*c                 ó  — t        |t        «      rt        ddd«       t        j                  }t
        j                  }dD ]  }|t        |   z  sŒ|t
        |   z  }Œ | j                  D ]  }| j                  ||«       Œ y)aQ  
        Remove images from this output.

        Args:
            to_delete: The type of images to be deleted
                (default = all images types)

        .. deprecated:: 7.1.0
            Passing a boolean as ``to_delete`` is deprecated and will be
            removed in pypdf 8.0.0. Use ``ImageType.ALL`` instead.

        z"Passing a boolean to remove_imageszImageType.ALLr  )rk   rl   rm   N)	rˆ   r­   r&   r/   ÚALLr_   rc   rï   r¡  )r�   rª  r©   Úimager&  s        rq   Úremove_imageszPdfWriter.remove_images<	  s�   € ô  �i¤Ô&Ü&Ð'KÈ_Ð^eÔfÜ!Ÿ™ˆIä×#Ñ#ˆàJò 	/ˆEØœ9 UÑ+Ó+ØÔ'¨Ñ.Ñ.‘ð	/ð —J‘Jò 	3ˆDØ×)Ñ)¨$°Õ2ñ	3rp   Ú
font_namesc                 ó„  ‡— |sg }| j                   D ]¬  }g }|r{	 	 ddt        dt        t        t        f   dz  dt        dz  dt        t        t        f   fˆfd„Š ‰|j	                  d«      «      }|D ]  }||v sŒ|j                  ||   d   «       Œ  i }|r||d	<   | j                  |t        j                  |¬
«       Œ® y)zÐ
        Remove text from the PDF.

        Args:
            font_names: List of font names to remove, such as "Helvetica-Bold".
                Optional. If not specified, all text will be removed.
        Nr  Ú	font_infor‹   rx   c                 óÔ  •— |€i }t        | t        «      r| j                  «       } t        | t        «      rŒ| j	                  d«      dk(  rb| j	                  dd«      }|j                  d«      j                  d«      d   }||vr|g dœ||<   |||   d	   vr||   d	   j                  |«       | D ]  } ‰| |   ||«      }Œ |S t        | t        t        f«      r| D ]  } ‰||«      }Œ |S )
Nr$  z/Fontz	/BaseFontrÁ   r„  ú+r¾   )Únormalized_font_nameÚresource_idsrí  )
rˆ   rD   r˜   rX  r  ÚlstripÚsplitr�   r™   r;   )r  ré  r‹   Ú	font_namerì  rU  Ú	child_objÚget_font_infos          €rq   rò  z,PdfWriter.remove_text.<locals>.get_font_infok	  s  ø€ ð
 !Ð(Ø$&˜	Ü! #¤~Ô6Ø!Ÿn™nÓ.˜Ü! #¤tÔ,ØŸ7™7 7Ó+¨wÒ6Ø(+¯©°¸RÓ(@˜Ià3<×3CÑ3CÀCÓ3H×3NÑ3NÈsÓ3SÐTVÑ3WÐ0Ø3¸9ÑDà<PØ46ñC" 	Ð*>Ñ ?ð  #¨)Ð4HÑ*IÈ.Ñ*YÑYØ )Ð*>Ñ ?ÀÑ O× VÑ VÐWZÔ [Ø!$ò L˜AÙ(5°c¸!±f¸iÈÓ(K™IðLð
 %Ð$ô $ C¬$´Ð)<Ô=Ø),ò L˜IÙ(5°iÀÓ(K™IðLà$Ð$rp   rÚ  rí  rÑ  )r«  ©NN)	rï   r   rX  r‰   r  r1  r¡  r_   rf   )r�   rç  r&  Úresource_ids_to_removeré  rð  r«  rò  s          @rq   Úremove_textzPdfWriter.remove_textY	  sï   ø€ ñ ØˆJà—J‘Jò ,	dˆDØ%'Ð"ñ ð 8<Ø&*ñ%Üð%ä#¤C¬ H™~°Ñ4ð%ô ˜t™ð%ô œ#œs˜(‘^õ	%ñ: *¨$¯(©(°<Ó*@ÓA�	Ø!+ò \�IØ  IÒ-Ø.×5Ñ5°iÀ	Ñ6JÈ>Ñ6ZÕ[ð\ð ˆLÙØ+A�˜ZÑ(Ø×)Ñ)¨$Ô0B×0GÑ0GÐVbÐ)ÕcñY,	drp   ÚuriÚrectÚborderc                 ó˜  — | j                  |«      }t        t        t        t        f   | j                  |«      «      }|�`|dd D �cg c]  }t        |«      ‘Œ }}t        |«      dk(  rWt        |d   D �cg c]  }t        |«      ‘Œ c}«      }	|j                  |	«       n t        d«      t        d«      t        d«      g}t        |t        «      rO|j                  «       j                  d«      j                  «       D �cg c]  }t        |«      ‘Œ }
}t        |
«      }nt        |t        «      rnt        |«      }t        «       }|j!                  t#        d«      t#        d«      t#        d«      t%        |«      i«       t        «       }|j!                  t#        t&        j(                  «      t#        d«      t#        t&        j*                  «      t#        d	«      t#        t&        j,                  «      |t#        t&        j.                  «      |t#        d
«      t#        d«      t#        t&        j0                  «      t        |«      t#        d«      |i«       | j3                  |«      }t4        j6                  |v r#|t4        j6                     j                  |«       yt        |g«      |t#        t4        j6                  «      <   yc c}w c c}w c c}w )a¡  
        Add an URI from a rectangular area to the specified page.

        Args:
            page_number: index of the page on which to place the URI action.
            uri: URI of resource to link to.
            rect: :class:`RectangleObject<pypdf.generic.RectangleObject>` or
                array of four integers specifying the clickable rectangular area
                ``[xLL, yLL, xUR, yUR]``, or string in the form
                ``"[ xLL yLL xUR yUR ]"``.
            border: if provided, an array describing border-drawing
                properties. See the PDF spec for details. No border will be
                drawn if this argument is omitted.

        Nr   r&  r…   z[]ú/Sz/URIz/Annotr­  z/Hr¤  ú/A)r™  r   rX  r‰   r   r˜   rH   r�   r;   r�   rˆ   Ústriprï  ÚfloatrJ   r@   r   rF   rM   r*   ÚTypeÚSubtypeÚPr­  ÚBorderrÜ   r2   rª  )r�   rv  rö  r÷  rø  Ú	page_linkrŒ  r¿  Ú
border_arrÚdash_patternÚcoordsÚlnk2ÚlnkÚlnk_refs                 rq   Úadd_urizPdfWriter.add_uri’	  s5  € ð, ×,Ñ,¨[Ó9ˆ	ÜœœS¤#˜X™¨¯©¸	Ó(BÓCˆð ÐØ39¸"¸1°:Ö>¨aœ, q�/Ð>ˆJÐ>Ü�6‹{˜aÒÜ*ÀVÈAÁYÖ+OÀ¬L¸­OÒ+OÓP�Ø×!Ñ! ,Õ/ä& q›/¬<¸«?¼LÈ»OÐLˆJä�dœCÔ Ø(,¯
©
«×(:Ñ(:¸4Ó(@×(FÑ(FÓ(HÖI 1”e˜A•hÐIˆFÐIÜ" 6Ó*‰DÜ˜œoÔ.Øä" 4Ó(ˆDäÓ!ˆØ�‰ä˜4Ó ¤*¨VÓ"4Ü˜6Ó"Ô$4°SÓ$9ðô	
ô Ó ˆØ�
‰
äÔ9×>Ñ>Ó?ÄÈHÓAUÜÔ9×AÑAÓBÄJÈwÓDWÜÔ9×;Ñ;Ó<¸iÜÔ9×>Ñ>Ó?ÀÜ˜4Ó ¤*¨TÓ"2ÜÔ9×@Ñ@ÓAÄ;ÈzÓCZÜ˜4Ó  $ðô
	
ð ×"Ñ" 3Ó'ˆä× Ñ  HÑ,Ø”^×*Ñ*Ñ+×2Ñ2°7Õ;ä:EÀwÀiÓ:PˆH”Z¤× 5Ñ 5Ó6Ò7ùòO ?ùâ+Oùò Js   ÁJ=Á5KÃ?K)z	/NoLayoutz/SinglePagez
/OneColumnz/TwoColumnLeftz/TwoColumnRightz/TwoPageLeftz/TwoPageRightc                 óx   — 	 t        t        | j                  t        j                     «      S # t
        $ r Y y w xY wr‡   )r   rY   rì   r+   ÚPAGE_LAYOUTrû   rñ   s    rq   Ú_get_page_layoutzPdfWriter._get_page_layoutà	  s8   € ð	Üœ
 D×$5Ñ$5Ô6G×6SÑ6SÑ$TÓUÐUøÜò 	Ùð	úó   ‚*- ­	9¸9Úlayoutc                 ó  — t        |t        «      sD|| j                  vr+t        dt        dj                  | j                  «      ¬«       t        |«      }| j                  j                  t        t        j                  «      |i«       y)a  
        Set the page layout.

        Args:
            layout: The page layout to be used.

        .. list-table:: Valid ``layout`` arguments
           :widths: 50 200

           * - /NoLayout
             - Layout explicitly not specified
           * - /SinglePage
             - Show one page at a time
           * - /OneColumn
             - Show one column at a time
           * - /TwoColumnLeft
             - Show pages in two columns, odd-numbered pages on the left
           * - /TwoColumnRight
             - Show pages in two columns, odd-numbered pages on the right
           * - /TwoPageLeft
             - Show two pages at a time, odd-numbered pages on the left
           * - /TwoPageRight
             - Show two pages at a time, odd-numbered pages on the right

        z$Layout should be one of: %(layouts)srT  )r<  ÚlayoutsN)
rˆ   rF   Ú_valid_layoutsr(   r`   r/  rì   r   r+   r  ©r�   r  s     rq   Ú_set_page_layoutzPdfWriter._set_page_layoutæ	  sm   € ô4 ˜&¤*Ô-Ø˜T×0Ñ0Ñ0ÜØ:Ü#Ø ŸI™I d×&9Ñ&9Ó:õô
   Ó'ˆFØ×Ñ× Ñ ¤*Ô->×-JÑ-JÓ"KÈVÐ!TÕUrp   c                 ó&   — | j                  |«       y)a  
        Set the page layout.

        Args:
            layout: The page layout to be used

        .. list-table:: Valid ``layout`` arguments
           :widths: 50 200

           * - /NoLayout
             - Layout explicitly not specified
           * - /SinglePage
             - Show one page at a time
           * - /OneColumn
             - Show one column at a time
           * - /TwoColumnLeft
             - Show pages in two columns, odd-numbered pages on the left
           * - /TwoColumnRight
             - Show pages in two columns, odd-numbered pages on the right
           * - /TwoPageLeft
             - Show two pages at a time, odd-numbered pages on the left
           * - /TwoPageRight
             - Show two pages at a time, odd-numbered pages on the right

        N©r  r  s     rq   Úset_page_layoutzPdfWriter.set_page_layout

  s   € ð4 	×Ñ˜fÕ%rp   c                 ó"   — | j                  «       S )aÛ  
        Page layout property.

        .. list-table:: Valid ``layout`` values
           :widths: 50 200

           * - /NoLayout
             - Layout explicitly not specified
           * - /SinglePage
             - Show one page at a time
           * - /OneColumn
             - Show one column at a time
           * - /TwoColumnLeft
             - Show pages in two columns, odd-numbered pages on the left
           * - /TwoColumnRight
             - Show pages in two columns, odd-numbered pages on the right
           * - /TwoPageLeft
             - Show two pages at a time, odd-numbered pages on the left
           * - /TwoPageRight
             - Show two pages at a time, odd-numbered pages on the right
        )r  rñ   s    rq   Úpage_layoutzPdfWriter.page_layout&
  s   € ð. ×$Ñ$Ó&Ð&rp   c                 ó&   — | j                  |«       y r‡   r  r  s     rq   r  zPdfWriter.page_layout?
  s   € à×Ñ˜fÕ%rp   )z/UseNonez/UseOutlinesz
/UseThumbsz/FullScreenz/UseOCz/UseAttachmentsc                 óx   — 	 t        t        | j                  t        j                     «      S # t
        $ r Y y w xY wr‡   )r   r\   rì   r+   Ú	PAGE_MODErû   rñ   s    rq   Ú_get_page_modezPdfWriter._get_page_modeL
  s8   € ð	Üœ d×&7Ñ&7Ô8I×8SÑ8SÑ&TÓUÐUøÜò 	Ùð	úr  c                 ó"   — | j                  «       S )a  
        Page mode property.

        .. list-table:: Valid ``mode`` values
           :widths: 50 200

           * - /UseNone
             - Do not show outline or thumbnails panels
           * - /UseOutlines
             - Show outline (aka bookmarks) panel
           * - /UseThumbs
             - Show page thumbnails panel
           * - /FullScreen
             - Fullscreen view
           * - /UseOC
             - Show Optional Content Group (OCG) panel
           * - /UseAttachments
             - Show attachments panel
        )r  rñ   s    rq   Ú	page_modezPdfWriter.page_modeR
  s   € ð* ×"Ñ"Ó$Ð$rp   r
  c                 ó  — t        |t        «      r|}nD|| j                  vr+t        dt        dj                  | j                  «      ¬«       t        |«      }| j                  j                  t        t        j                  «      |i«       y )Nz Mode should be one of: %(modes)srT  )r<  Úmodes)
rˆ   rF   Ú_valid_modesr(   r`   r/  rì   r   r+   r  )r�   r
  Ú	mode_names      rq   r  zPdfWriter.page_modei
  sp   € ä�dœJÔ'Ø$(‰Ià˜4×,Ñ,Ñ,ÜØ6Ü#ØŸ)™) D×$5Ñ$5Ó6õô
 # 4Ó(ˆIØ×Ñ× Ñ ¤*Ô->×-HÑ-HÓ"IÈ9Ð!UÕVrp   r¸  c                 ó`  — |}t        |t        «      r| j                  |   }nt        |t        «      st	        d«      ‚t        t        t        |«      «      }|j                  |t        d«      <   |j                  €t        «       |t        d«      <   |j                  €J ‚|j                  d«      }|j                  d«      dk(  rèt        |t        «      rØd|v rÔt        t        |d   «      }t        t        |d   «      }t        t        t           t!        |«      d	   «      }d
|cxk  rt#        | j                  «      k  r+n n(t        t$        | j                  |   j                  «      }	nt'        |«      }	t)        t        d«      |	t+        ||¬«      «      j,                  |t        d«      <   |j                  j/                  | j1                  |«      «       |j                  d«      dk(  rDt        d«      |v r7|j                  t        t        |d   j3                  «       «      t        d«      <   |S )aŠ  
        Add a single annotation to the page.
        The added annotation must be a new annotation.
        It cannot be recycled.

        Args:
            page_number: PageObject or page index.
            annotation: Annotation to be added (created with annotation).

        Returns:
            The inserted object.
            This can be used for popup creation, for example.

        zpage: invalid typeú/Pr*  ú/DestrŸ  r­  Útarget_page_indexrw  Úfit_argsr   z	/LinkName)Úfit_typer'  z/PopuprÛ  )rˆ   rÑ   rï   r   r†  r   r@   Ú_pdf_objectifyrý   rF   rÄ  r;   r  r‰   r   r   rX  r�   rD   rH   r?   rB   rf  r�   rÜ   r˜   )
r�   rv  r¸  r&  Úto_addr›   r&  r(  r'  Útarget_page_references
             rq   Úadd_annotationzPdfWriter.add_annotationw
  só  € ð& ˆÜ�dœCÔ Ø—:‘:˜dÑ#‰DÜ˜D¤*Ô-ÜÐ0Ó1Ð1äÔ&¬°zÓ(BÓCˆØ#'×#:Ñ#:ˆŒz˜$ÓÑ à×ÑÐ#Ü*5«-ˆD”˜IÓ&Ñ'Ø×ÑÐ+Ð+Ð+ð —j‘j Ó)ˆà�J‰J�zÓ" gÒ-Ü˜;Ô(8Ô9Ø# {Ñ2ô !%¤S¨+Ð6IÑ*JÓ KÐÜœC ¨UÑ!3Ó4ˆHô œH¤S™M¬4°Ó+<¸ZÑ+HÓIˆHàÐ%Ô7¬¨D¯J©J«Õ7Ü(,Ü"Ø—J‘JÐ0Ñ1×DÑDó)Ñ%ô )5Ð5FÓ(GÐ%ä*5Ü˜;Ó'Ø%Ü˜X°Ô9ó+÷ ‰jð	 ”:˜gÓ&Ñ'ð 	×Ñ×Ñ × 0Ñ 0°Ó 8Ô9à�:‰:�jÓ! XÒ-´*¸YÓ2GÈ6Ñ2Qð ×)Ñ)ô Ô! 6¨)Ñ#4×#?Ñ#?Ó#AÓBÜ˜8Ó$ñð ˆrp   c                 óº  — t        d|j                  «       «      }|j                  dg «      D ]«  }|j                  «       }|j                  dd«      }|j                  dd«      }t        |t        «      rt        |«      |t	        d«      <   Œ_|€Œb|j                  «       }|j                  dd«      }t        |t        «      sŒ•t        |«      |t	        d«      <   Œ­ |S )zÿ
        Perform some clean up in the page.
        Currently: convert NameObject named destination to TextStringObject
        (required for names/dests list)

        Args:
            page:

        Returns:
            The cleaned PageObject

        r   r*  r%  Nrû  ú/D)r   r˜   r  rˆ   rF   rM   )r�   r&  ÚaÚa_objrÞ  Úacts         rq   Ú
clean_pagezPdfWriter.clean_page¾
  sÂ   € ô �L $§/¡/Ó"3Ó4ˆØ—‘˜) RÓ(ò 
	@ˆAØ—L‘L“NˆEØ—	‘	˜' 4Ó(ˆAØ—)‘)˜D $Ó'ˆCÜ˜!œZÔ(Ü-=¸aÓ-@�”j Ó)Ò*Ø‘Ø—n‘nÓ&�Ø—G‘G˜D $Ó'�Ü˜a¤Õ,Ü,<¸QÓ,?�Cœ
 4Ó(Ò)ð
	@ð ˆrp   c                 óJ  — t        |t        t        f«      r0t        |d«      5 }t	        |j                  «       «      }d d d «       |S t        |d«      r:t        |d«      r.|j                  d«       |j                  «       }t	        |«      }|S t        d«      ‚# 1 sw Y   S xY w)Nr½   rÆ   r×   r   zÕMerging requires an object that PdfReader can parse. Typically, that is a Path or a string representing a Path, a file object, or an object implementing .seek and .read. Passing a PdfReader directly works as well.)	rˆ   r‰   r   r   r   r×   r  rÆ   r÷  )r�   r¸   rî   r  Úfilecontents        rq   Ú_create_streamzPdfWriter._create_streamÙ
  sœ   € ô
 �g¤¤T˜{Ô+Ü˜ Ó&ð +¨!Ü  §¡£Ó*�÷+ð ˆô �W˜fÔ%¬'°'¸6Ô*BØ�L‰L˜ŒOØ!Ÿ,™,›.ˆKÜ˜[Ó)ˆFð ˆô &ð>óð ÷+ð ˆús   £BÂB"rï   Úimport_outlineÚexcluded_fields.c                 óè   — |€d}t        |t        t        t        f«      r=t        |t        «      rt        |t        «      s|}|}|}| j                  d|d|||«       y| j                  d|||||«       y)aQ  
        Identical to the :meth:`merge()<merge>` method, but assumes you want to
        concatenate all pages onto the end of the file instead of specifying a
        position.

        Args:
            fileobj: A File Object or an object that supports the standard
                read and seek methods similar to a File Object. Could also be a
                string representing a path to a PDF file.
            outline_item: Optionally, you may specify a string to build an
                outline (aka 'bookmark') to identify the beginning of the
                included file.
            pages: Can be a :class:`PageRange<pypdf.pagerange.PageRange>`
                or a ``(start, stop[, step])`` tuple
                or a list of pages to be processed
                to merge only the specified range of pages from the source
                document into the output document.
            import_outline: You may prevent the source document's
                outline (collection of outline items, previously referred to as
                'bookmarks') from being imported by specifying this as ``False``.
            excluded_fields: Provide the list of fields/keys to be ignored
                if ``/Annots`` is part of the list, the annotation will be ignored
                if ``/B`` is part of the list, the articles will be ignored

        Nro   )rˆ   r±  r™   rU   r­   Úmerge)r�   r¸   r{  rï   r6  r7  s         rq   r�   zPdfWriter.appendî
  s‚   € ðB Ð"Ø ˆOÜ�l¤U¬D´)Ð$<Ô=Ü˜%¤Ô&Ü! .´$Ô7Ø&4�OØ!&�Ø ˆEØ�J‰JØØØØØØõð �J‰JØØØØØØõrp   Úpositionc                 ó  — t        |t        «      r|}n| j                  |«      }t        |d¬«      }|€d}|€(t	        t        t        |j                  «      «      «      }n t        |t        «      r4t	        t        |j                  t        |j                  «      «      Ž «      }n\t        |t        «      rnKt        |t        «      r t        |«      dk  rt	        t        |Ž «      }nt        |t        «      st        d«      ‚i }	|D ]Ñ  }
t        |
t        «      r|
}n|j                  |
   }|j                  €J ‚|€=| j                  |g t	        |«      ¢d‘d‘d‘d	‘«      |	|j                  j                  <   nB| j!                  ||g t	        |«      ¢d‘d‘d‘d	‘«      |	|j                  j                  <   |dz  }||	|j                  j                     _        ŒÓ |j$                  |_        t)        t        |j&                  «      t*        k\  ¬
«      }	 |j&                  j-                  «       D ]  }| j/                  |||	|¬«       Œ 	 |j1                  «        |�dt3        d| j5                  t7        |«      t9        t;        |	j-                  «       «      «      j                  t<        ¬«      j?                  «       «      }n| jA                  «       }|jB                  }|rWtD        jF                  |v rE| jI                  |jK                  tD        jF                  d«      |	|¬«      }| jM                  ||d«       d	|vr†i }|	j-                  «       D ]_  }| jO                  |j"                  jK                  d	g «      ||	||¬«      }t        |«      dkD  r||tQ        d	«      <   | jS                  |«       Œa | jU                  ||«       |jK                  d«      }|�=|j?                  «       }tW        |«      s"t        |tX        «      st[        dt\        |¬«       t        |tX        «      �r:| j^                  jK                  d«      }|�t        |j?                  «       tX        «      sC| ja                  |jc                  | dd«      «      | j^                  tQ        d«      <   te        «       }n^t3        tX        |j?                  «       «      jK                  dte        «       «      j?                  «       }t        |td        «      s
te        «       }|jK                  dte        «       «      j?                  «       }t        |td        «      st[        dt\        |¬«       te        «       }| jf                  ti        |«         }|D �ch c]>  }t        |tj        «      sŒ|jl                  dk(  sŒ$|jn                  | u sŒ3|j                  ’Œ@ }}|D ]{  }t        |tj        «      sŒ|j                  |v sŒ#||j                     |vsŒ5|jq                  ||j                     «       |js                  tk        ||j                     d| «      «       Œ} |t3        tX        | j^                  d   «      tQ        d«      <   d|vr| ju                  d|	|«       yy# |j1                  «        w xY wc c}w )aÙ  
        Merge the pages from the given file into the output file at the
        specified page number.

        Args:
            position: The *page number* to insert this file. File will
                be inserted after the given number.
            fileobj: A File Object or an object that supports the standard
                read and seek methods similar to a File Object. Could also be a
                string representing a path to a PDF file.
            outline_item: Optionally, you may specify a string to build an outline
                (aka 'bookmark') to identify the
                beginning of the included file.
            pages: can be a :class:`PageRange<pypdf.pagerange.PageRange>`
                or a ``(start, stop[, step])`` tuple
                or a list of pages to be processed
                to merge only the specified range of pages from the source
                document into the output document.
            import_outline: You may prevent the source document's
                outline (collection of outline items, previously referred to as
                'bookmarks') from being imported by specifying this as ``False``.
            excluded_fields: provide the list of fields/keys to be ignored
                if ``/Annots`` is part of the list, the annotation will be ignored
                if ``/B`` is part of the list, the articles will be ignored

        Raises:
            TypeError: The pages attribute is not configured properly

        Frö  Nro   r   z:"pages" must be a tuple of (start, stop[, step]) or a listr   ú/Br*  )rw   )rc  rt  Úsrcpagesr  rN   )r–   rv  rw  )r4  rï   rt  )Úannotsr&  rï   rt  Úparent_fieldsr   z	/AcroFormz+AcroForm is not a dictionary: %(acro_form)s)r<  r¶  )ú/Fieldsr@  z,AcroForm /Fields is not an array: %(fields)s)r<  r™  rÁ   );rˆ   r   r5  r!   r™   r§   r�   rï   rU   Úindicesr±  r†  r   rý   rF  rþ   rH  Úoriginal_pager  Ú_named_destinationsrv   Ú _NAMED_DESTINATION_INDEX_MINIMUMrË  Ú_merge__process_named_destsr�   r   r�  rM   ÚnextÚiterr:   r˜   rk  rô   r,   rh  Ú_get_filtered_outliner  Ú_insert_filtered_outlineÚ_insert_filtered_annotationsrF   r2  Ú_set_cloned_kidsrS   r@   r(   r`   rì   rÜ   r#  r;   r³   r-  rD   r"  r  rž   r�   Úadd_filtered_articles)r�   r:  r¸   r{  rï   r6  r7  rt  r  r=  r&  Úpgr  rc  Úoutline_item_typÚ_rori  r?  Úpagr¼  r¶  Úwriter_acro_formÚarrr™  ÚtrslatrÙ  Úknownrî   s                               rq   r9  zPdfWriter.merge)  s
  € ôL �gœ|Ô,Ø‰Fà×(Ñ(¨Ó1ˆFô ˜v¨eÔ4ˆFàÐ"Ø ˆOàˆ=Üœœs 6§<¡<Ó0Ó1Ó2‰EÜ˜œyÔ)Üœ §¡¬c°&·,±,Ó.?Ó @ÐAÓB‰EÜ˜œtÔ$ØÜ˜œuÔ%¬#¨e«*¸ª/Üœ ˜Ó'‰EÜ˜E¤5Ô)ÜØLóð ð ˆØò 	EˆDÜ˜$¤
Ô+Ø‘à—\‘\ $Ñ'�Ø×(Ñ(Ð4Ð4Ð4ØÐð 9=¿¹ØÐGœ$˜Ó/ÐG°ÐG°DÐG¸!ÐG¸YÐGó9�˜×.Ñ.×4Ñ4Ò5ð 9=×8HÑ8HØ˜Ð"Q¤D¨Ó$9Ð"Q¸1Ð"Q¸dÐ"QÀAÐ"QÀyÐ"Qó9�˜×.Ñ.×4Ñ4Ñ5ð ˜A‘�ØBDˆH�R×*Ñ*×0Ñ0Ñ1Õ?ð#	Eð( ×%Ñ%ð 	Ô"ô 4Ü˜6×5Ñ5Ó6Ô:ZÑZô
Ðð	'Ø×2Ñ2×9Ñ9Ó;ò �Ø×0Ñ0Ø f°xÐTfð 1õ ñð
 ×$Ñ$Ô&ð Ð#Ü#ØØ×%Ñ%Ü*¨<Ó8Ü $¤T¨(¯/©/Ó*;Ó%<Ó =× PÑ PÜ ð &ó ÷ ‘*“,ó Ñð  $×4Ñ4Ó6Ðà× Ñ ˆÙœdŸm™m¨sÑ2Ø×0Ñ0Ø—W‘WœTŸ]™]¨DÓ1¸È&ð 1ó ˆGð ×)Ñ)ØÐ)¨4ôð ˜OÑ+Ø9;ˆMØ—‘Ó(ò 
%�Ø×7Ñ7Ø×,Ñ,×0Ñ0°¸BÓ?ØØ"Ø!Ø"/ð 8ó �ô �s“8˜a’<Ø14�Cœ
 9Ó-Ñ.Ø—‘ Õ$ð
%ð ×!Ñ! -°Ô8à—G‘G˜KÓ(ˆ	ØÐ Ø!×,Ñ,Ó.ˆIÜ" 9Ô-´jÀÔL\Ô6]ÜØAÜ#Ø'õô
 �iÔ!1Õ2Ø#×0Ñ0×4Ñ4°[ÓAÐØÐ'¬zÐ:J×:UÑ:UÓ:WÔYiÔ/jØ=A×=MÑ=MØ—O‘O D¨%°Ó>ó>�×!Ñ!¤*¨[Ó"9Ñ:ô "“m‘äÔ+Ð-=×-HÑ-HÓ-JÓK×OÑOÐPYÔ[fÓ[hÓi×tÑtÓv�Ü! #¤{Ô3Ü%›-�CØ—]‘] 9¬k«mÓ<×GÑGÓIˆFÜ˜f¤kÔ2ÜØBÜ#Ø!õô
 %›�Ø×(Ñ(¬¨F«Ñ4ˆFà!$öØ¬
°1´nÕ(EÈ!Ï,É,ÐZ[ÓJ[Ð`a×`eÑ`eÐimÒ`m�—“ðˆEð ð ò I�ä˜a¤Õ0°Q·W±WÀÒ5FÈ6ÐRS×RYÑRYÉ?ÐbgÒKgØ—I‘I˜f Q§W¡W™oÔ.Ø—J‘Jœ~¨f°Q·W±W©o¸qÀ$ÓGÕHð	Ið ô Ô! 4×#4Ñ#4°[Ñ#AÓBÜ˜9Ó%ñð �Ñ&Ø×&Ñ& r¨8°VÕ<ð 'øða ×$Ñ$Õ&üòHs$   È4Y. Õ'ZÕ=ZÖZÖZÙ.Z r=  r  c                 ó¾  — |j                   }d| j                  v r$|j                  | j                  «       |d   «      ry |d   �t	        |d   t
        «      ry t	        |d   t        «      rq	 |j                  |d      }|j                  €J ‚	 t        ||j                  j                     j                  «      |t        d«      <   | j                  |d   ||«       y |d   j                  j                  |v rI||d   j                  j                     j                  |t        d«      <   | j                  |d   ||«       y y # t        $ r Y y w xY w# t        $ r Y y w xY w)Nz/Namesr•  ú/Pager   )rf  rì   rš   r‘  rˆ   rG   rÑ   rï   rX  rý   rH   rþ   rv  Ú$_add_named_destination_array_indexedrû   )r�   rc  rt  r=  r  rR  r·  s          rq   rE  z%PdfWriter._merge__process_named_destsÞ  sk  € ð —?‘?ˆØ�t×(Ñ(Ñ(Ð-?×-HÑ-HÈ×IaÑIaÓIcÐeiÐjrÑesÔ-tàØ�'‰]Ð"¤j°°g±Ä
Ô&KØÜ˜˜W™¤sÔ+ðØ—L‘L  g¡Ñ/�ð ×'Ñ'Ð3Ð3Ð3ðÜ'3Ø˜Q×1Ñ1×7Ñ7Ñ8×DÑDó(�”L “OÑ$ð ×9Ñ9¸$¸x¹.È#ÐOaÕbð �'‰]×-Ñ-×3Ñ3°xÑ?Ø#+Ø�W‘×0Ñ0×6Ñ6ñ$ç Ñ ð ”˜Q“Ñ ð ×5Ñ5°d¸8±nÀcÐK]Õ^ð	 @øô ò Ùðûô ò Ùðús%   Á,E ÂAE Å	EÅEÅ	EÅEc                 ó”   — | j                  «       }|j                  |||«      s%| j                  ||«       |j                  ||«       y y r‡   )r‘  rŸ   r“  r¡   )r�   r–   r›   r  rƒ   s        rq   rW  z.PdfWriter._add_named_destination_array_indexed   sJ   € ð ×(Ñ(Ó*ˆØ!×(Ñ(¨°°{ÔCØ×,Ñ,¨U°KÔ@Ø×/Ñ/°°uÕ=ð Drp   Úthreadc           
      óâ  — |j                  | dd¬«      }| j                  j                  |j                  «       t	        d|d   «      }|}d}t        «       }|��ýt        |«      }	|	|v rt        d«      ‚|j                  |	«       | j                  t	        d|j                  d	t        «       «      j                  «       «      ||«      }
|
��B|€Lt	        d| j                  t        «       «      j                  «       «      }|}|j                  |t        d«      <   nat	        d| j                  t        t        d
«      |j                  i«      «      j                  «       «      }|j                  |t        d«      <   |}|
|t        d	«      <   |j                  |t        d«      <   |d   |t        d«      <   t	        d|
j                  «       «      }d|vrt!        «       |t        d«      <   t	        d|d   «      j                  |j                  «       t	        d|d   «      }||k(  r2j                  |t        d«      <   |j                  |t        d
«      <   d}|��Œý|j                  €J ‚|j                  S )aM  
        Clone the thread with only the applicable articles.

        Args:
            thread: Thread entry from the reader's array of threads
            pages: Mapping of object numbers to page objects.
            reader: The corresponding reader.

        Returns:
            The added thread as an indirect reference

        T)ú/F)Úforce_duplicateÚignore_fieldsr@   r[  Nz"Detected cyclic article structure.r   r$  z/Vr¨  r¢  z/Rr<  r;   )r#  rn  r�   rý   r   r}   r-  r7   rž   Ú_get_cloned_pager  rG   r˜   rÜ   r@   rF   r;   )r�   rY  rï   rt  Ú
new_threadÚfirst_articleÚcurrent_articleÚnew_articleÚvisitedÚ
article_idr&  Ú	new_firstÚnew_article2Úpage_objects                 rq   Ú_add_articles_threadzPdfWriter._add_articles_thread  sl  € ð$ —\‘\Ø $°gð "ó 
ˆ
ð 	�‰×Ñ˜J×9Ñ9Ô:ÜÐ/°¸±Ó>ˆØ3@ˆØ/3ˆä›EˆØÑ)Ü˜OÓ,ˆJØ˜WÑ$Ü'Ð(LÓMÐMØ�K‰K˜
Ô#à×(Ñ(Ü�\ ?×#6Ñ#6°t¼Z»\Ó#J×#UÑ#UÓ#WÓXØØóˆDð
 ÑØÐ&Ü"&Ø*Ø×(Ñ(Ô)9Ó);Ó<×GÑGÓIó#�Kð !,�IØ3>×3QÑ3Q�Jœz¨$Ó/Ò0ä#'Ø*Ø×(Ñ(Ü,Ü!+¨DÓ!1°;×3QÑ3QÐ Róó÷ %™*›,ó$�Lð 5A×4SÑ4S�K¤
¨4Ó 0Ñ1Ø".�KØ04�œJ tÓ,Ñ-Ø0:×0MÑ0M�œJ tÓ,Ñ-Ø0?ÀÑ0E�œJ tÓ,Ñ-Ü" <°·±Ó1BÓC�Ø˜{Ñ*Ü4?³M�K¤
¨4Ó 0Ñ1Ü�] K°Ñ$5Ó6×=Ñ=Ø×2Ñ2ôô #Ð#5°ÀtÑ7LÓMˆOØ -Ò/Ø09×0LÑ0L�œJ tÓ,Ñ-Ø.9×.LÑ.L�	œ* TÓ*Ñ+Ø"&�ðY Ò)ð\ ×,Ñ,Ð8Ð8Ð8Ø×,Ñ,Ð,rp   Úfltrc                 ór  — t        |t        «      rt        j                  |«      }n%t        |t        «      st        j                  d«      }|j                  «       D ]Ù  }|j                  }|j                  dd«      D ]¶  }|j                  «       }t        |«      rŒ|j                  d«      }|€Œ3|j                  «       }|j                  j                  | j                  t        |«         vsŒr|j                  |j                  di «      j                  dd«      «      sŒ¤| j                  |||«       Œ¸ ŒÛ y)z†
        Add articles matching the defined criteria.

        Args:
            fltr:
            pages:
            reader:

        rÁ   r<  ro   r¢  Nr¤  r•  )rˆ   r‰   ÚreÚcompiler   rË  rB  r  r˜   rS   rý   rþ   r³   r-  Úsearchrh  )	r�   ri  rï   rt  r·  Úppr/  r0  Úthrs	            rq   rL  zPdfWriter.add_filtered_articlesT  s  € ô" �dœCÔ Ü—:‘:˜dÓ#‰DÜ˜D¤'Ô*Ü—:‘:˜b“>ˆDØ—‘“ò 	BˆAØ—‘ˆBØ—V‘V˜D "Ó%ò B�ØŸ™›�Ü" 5Ô)ØØ—i‘i “o�Ø�;ØØ—n‘nÓ&�Ø×)Ñ)×/Ñ/°t×7JÑ7JÜ�v“Jñ8ò à—k‘k 3§7¡7¨4°Ó#4×"9Ñ"9¸(ÀBÓ"GÕHØ×-Ñ-¨c°5¸&ÕAñBñ	Brp   c                 ó‚  — t        |t        «      ry t        |t        «      r	 |j                  |   j                  }t        |t        «      r"|j                  dd«      dk(  r|j                  }nt        |t        «      r|}	 |j                     j                  S # t
        $ r Y y w xY w# t        $ r ‚ t        $ r Y y w xY w)Nr$  rÁ   rV  )rˆ   rG   rÑ   rï   rý   rX  r@   r  rD   rþ   r.  r/  )r�   r&  rï   rt  Ú_is        rq   r^  zPdfWriter._get_cloned_pagex  s¸   € ô �dœJÔ'ØÜ�dœCÔ ðØ—|‘| DÑ)×<Ñ<�ô �dÔ,Ô-°$·(±(¸7ÀBÓ2GÈ7Ò2RØ×(Ñ(‰BÜ˜œnÔ-ØˆBð	Ø˜Ÿ™‘?×5Ñ5Ð5øô ò Ùðûô ò 	ØÜò 	Ùð	ús#   £B ÂB) Â	B&Â%B&Â)B>Â=B>)r?  r>  r?  c                ó"  — t        «       }t        |t        «      rt        d|j	                  «       «      }|€|S t        |t
        «      s)t        dt        ||j                  j                  ¬«       |S t        «       }t        |«      |j                  kD  r%t        dt        |«      › d|j                  › d�«      ‚|D �]Ð  }t        d|j	                  «       «      }	|	j                  d«      d	k7  sd
|	vst        d|	d
   «      d   dk7  sd|	v �ri|�U|	j                  d«      dk(  rAt        |	j                  d«      t        «      r"|j                  | j                  |	|«      «       Œ§d|	vr0|j                  | j!                  |	j#                  | «      «      «       ŒÛ|	d   }
t        |
t$        «      rIt%        |
«      | j'                  «       v s�Œ|j                  |	j#                  | «      j(                  «       �Œ9t        |
t         «      r|
s�ŒM| j+                  |
d   ||«      }|€�Œg|	j#                  | d¬«      }t        |g|
dd  ¢«      |t-        d«      <   |j                  | j!                  |«      «       �Œ¹t        d|	d
   «      j                  dt/        «       «      }
t1        |
«      r�Œít        |
t$        «      rIt%        |
«      | j'                  «       v s�Œ|j                  |	j#                  | «      j(                  «       �ŒFt        |
t         «      r|
s�ŒZ| j+                  |
d   ||«      }|€�Œt|	j#                  | d¬«      }t        |g|
dd  ¢«      t        d|d
   «      t-        d«      <   |j                  | j!                  |«      «       �ŒÓ |S )Nz	list[Any]zEExpected list of annotations, got %(annots)s of type %(annots_type)s.)r<  r>  Úannots_typez'Maximum annotations per page exceeded: z > rÇ  r@   rŸ  r­  rû  rú  r…  r%  r   rÛ  r   )r%  ©r]  r   r.  )r.  )r;   rˆ   rD   r   r˜   r™   r(   r`   rb  r   r�   Úannotations_maximum_per_pager7   r  r�   Ú_clone_widget_annotationrÜ   r#  r‰   r‘  rý   r^  rF   rG   rS   )r�   r>  r&  rï   rt  r?  ÚoutlistÚconfigurationr¨  ÚanorÞ  r·  Úancs                rq   rJ  z&PdfWriter._insert_filtered_annotations–  s$  € ô “-ˆÜ�fœnÔ-Ü˜+ v×'8Ñ'8Ó':Ó;ˆFØˆ>ØˆNÜ˜&¤$Ô'ÜØWÜØØ"×,Ñ,×5Ñ5õ	ð ˆNÜ)Ó+ˆÜˆv‹;˜×CÑCÒCÜ#Ø9Ü�v“;�-˜s =×#MÑ#MÐ"NÈaðQóð ð ó /	>ˆBÜÐ)¨2¯=©=«?Ó;ˆCà—‘˜
Ó# wÒ.Ø˜s‘?ÜÐ*¨C°©IÓ6°tÑ<ÀÒGØ˜c’>ð "Ð-ØŸ™ 
Ó+¨yÒ8Ü" 3§7¡7¨9Ó#5´~ÔFà—N‘N 4×#@Ñ#@ÀÀmÓ#TÕUØ CÑ'Ø—N‘N 4×#3Ñ#3°C·I±I¸d³OÓ#DÕEà˜G™�AÜ! !¤SÔ)ä˜q›6 T×%=Ñ%=Ó%?Ó?Ø#ŸN™N¨3¯9©9°T«?×+MÑ+MÖNä)¨!¬[Ô9ÁÙ$Ø ×1Ñ1°!°A±$¸¸vÓF˜Øš=Ø"%§)¡)¨DÀ
 )Ó"K˜CÜ7BÀAÀ;ÈÈ!È"ÈÀ;Ó7O˜C¤
¨7Ó 3Ñ4Ø#ŸN™N¨4×+;Ñ+;¸CÓ+@ÖAäÐ+¨S°©YÓ7×;Ñ;¸DÄ*Ã,ÓO�Ü" 1Ô%ÙÜ˜a¤Ô%ä˜1“v ×!9Ñ!9Ó!;Ó;ØŸ™ s§y¡y°£×'IÑ'IÖJä% a¬Ô5¹QÙ Ø×-Ñ-¨a°©d°E¸6ÓB�AØ’}Ø!Ÿi™i¨¸G˜iÓD˜ô (¨¨¨Q¨q¨r¨U¨Ó4ô Ð/°°T±Ó;Ü& tÓ,ñð  Ÿ™ t×'7Ñ'7¸Ó'<Ö=ð_/	>ð` ˆrp   c                 óü  — |j                  | d¬«      }||}}t        |j                  d«      t        «      r­t	        t        |j                  d«      «      }|j                  «       }t        |t        «      snm|j                  | d¬«      }|j                  |t        d«      <   |j                  |v rn3|||j                  <   ||}}t        |j                  d«      t        «      rŒ­|j                  €J ‚|j                  S )aÖ  
        Clone a widget annotation and link it to its parent fields.

        Cloning ``/Parent`` directly would also clone the ``/Kids`` of the
        parent fields, and with them the widgets and pages of sibling fields
        which are not part of the merge. Instead, the parent fields are cloned
        without ``/Kids`` and collected in ``parent_fields``, so that their kids
        can be set by :meth:`_set_cloned_kids` once all annotations are cloned.
        )r   rÛ  rt  rÛ  )r   rÜ  r   rÛ  )
r#  rˆ   r  rD   r   r˜   r@   rý   rF   rþ   )	r�   r¸  r?  r#  r<  ÚtargetÚparent_referenceÚsource_parentr£  s	            rq   rv  z"PdfWriter._clone_widget_annotationä  sò   € ð × Ñ  °^Ð ÓDˆØ# U�ˆÜ˜Ÿ™ IÓ.´Ô?Ü#¤N°F·J±J¸yÓ4IÓJÐØ,×7Ñ7Ó9ˆMÜ˜mÔ-=Ô>ØØ"×(Ñ(¨Ð=WÐ(ÓXˆFØ,2×,EÑ,EˆF”:˜iÓ(Ñ)Ø×%Ñ%¨Ñ6àØ4AˆMÐ*×0Ñ0Ñ1Ø*¨F�FˆFô ˜Ÿ™ IÓ.´Õ?ð ×'Ñ'Ð3Ð3Ð3Ø×'Ñ'Ð'rp   c                 óX  ‡ ‡— ‰ j                   j                  t        |«      i «      Š|j                  «       D ]p  \  }}|j                  dt	        «       «      }t        t        ‰ j                  ‰|   «      «      }t	        ˆ ˆfd„t        t        |«      D «       «      |t        d«      <   Œr y)zZSet the ``/Kids`` of the cloned parent fields to the cloned kids, in their original order.rÜ  c              3   óŽ   •K  — | ]<  }t        |t        «      r*|j                  ‰v rt        ‰|j                     d ‰«      –— Œ> y­w)r   N)rˆ   rD   rþ   )rŠ   Úkidr�   Ú
translateds     €€rq   rŒ   z-PdfWriter._set_cloned_kids.<locals>.<genexpr>  s@   øè ø€ ò 6àÜ˜c¤>Ô2°s·y±yÀJÑ7Nô ˜z¨#¯)©)Ñ4°a¸×>ñ6ùs   ƒAAN)	r³   r  r-  r¬  r;   r   r@   r˜   rF   )r�   r?  rt  rþ   r~  Úkidsr£  r‚  s   `      @rq   rK  zPdfWriter._set_cloned_kids  s“   ù€ à×(Ñ(×,Ñ,¬R°«Z¸Ó<ˆ
Ø$1×$7Ñ$7Ó$9ò 	Ñ ˆE�=Ø ×$Ñ$ W¬k«mÓ<ˆDÜÔ*¨D¯O©O¸JÀuÑ<MÓ,NÓOˆFÜ*5ô 6ä¤¨TÓ2ô6ó +ˆF”:˜gÓ&Ò'ñ	rp   )rc  r4  rc  c                ó*  — |€
t        «       }g }|€|S |j                  «       }t        |«      r
t        «       }t	        |t        «      st        dt        |¬«       |S |j                  dd«      dk(  sd|vrqt        |«      }||v rt        dt        ¬	«       g S |j                  |«       |j                  d
d«      }|�(|j                  «       }|| j                  ||||¬«      z  }|S 	 |j                  «       }t	        |t        «      st        dt        |¬«       	 |S t        |«      }||v rt        dt        ¬	«       	 |S |j                  |«       t        d|j                  |«      «      }| j                  t        d|d   «      ||«      }|€
t        «       }||t        d«      <   d
|v r| j                  |d
   |||¬«      |_        ng |_        t	        |t        «      rt#        |j                   «      dkD  r|j%                  |«       d|vr	 |S |d   }�Œ.)z•
        Extract outline item entries that are part of the specified page set.

        Returns:
            A list of destination objects.

        Nz*Outline node is not a dictionary: %(node)s)r<  r4  r$  rÁ   ú	/Outlinesr•  zDetected cycle in outlines.rž  ú/First)r4  rï   rt  rc  r?   r   rV  r   ú/Next)r}   r˜   rS   r@   rˆ   r(   r`   r  r-  rž   rH  r   Ú_build_outline_itemr^  rG   rF   Ú_filtered_childrenr�   r�   )	r�   r4  rï   rt  rc  Únew_outlineÚnode_idr›   Úcloned_pages	            rq   rH  zPdfWriter._get_filtered_outline  s6  € ð ˆ?Ü“eˆGØ)+ˆØˆ<ØÐØ�‰Ó ˆÜ˜4Ô Ü#Ó%ˆDÜ˜$Ô 0Ô1ÜÐGÔPXÐ_cÕdØÐà�8‰8�G˜RÓ  KÒ/°8À4Ñ3GÜ˜“hˆGØ˜'Ñ!ÜÐ<ÄXÕNØ�	Ø�K‰K˜Ô à—8‘8˜H dÓ+ˆDØÐØ—‘Ó(�Ø˜t×9Ñ9¸tÈ5ÐY_ÐipÐ9ÓqÑq�ðD Ðð? Ø—‘Ó(�Ü! $Ô(8Ô9Ü"Ð#OÔX`ÐgkÕlØð6 Ðô5 ˜T›(�Ø˜gÑ%Ü"Ð#@ÌÕRØð. Ðð- —‘˜GÔ$ä" =°&×2LÑ2LÈTÓ2RÓS�Ø"×3Ñ3´D¸À{ÐSZÑG[Ó4\Ð^cÐekÓl�ØÐ&Ü",£,�KØ3>�œJ wÓ/Ñ0Ø˜tÑ#Ø59×5OÑ5OØ! (™^°5ÀÐQXð 6Pó 6�KÕ2ð 68�KÔ2ä" ;´
Ô;Ü˜;×9Ñ9Ó:¸QÒ>à×&Ñ& {Ô3à $Ñ&ØàÐð ˜G‘}�ñ= rp   c                 ó¼  — t        «       }| j                  |«       t        |d   «      |t        d«      <   t	        |d   t
        «      s]|j                  �9d|j                  v r+|j                  d   j                  | «      |t        d«      <   n|j                  |t        d«      <   |j                  �ªt        |j                  j                  dd«      «      |t        d«      <   |j                  j                  dt        «       «      j                  «       }t	        |t        «      s t        d«      t        d«      t        d«      g}t        |«      |t        d«      <   |S )	Nr•  rV  rû  r%  r[  r   ú/Cg        )rN   rÜ   rM   rF   rˆ   rG   r4  r#  rf  rH   r  r˜   r™   rC   r;   )r�   rc  Ún_olr€  s       rq   Ú_clone_outlinezPdfWriter._clone_outlineV  s  € Ü‹|ˆØ×Ñ˜ÔÜ%5°d¸8±nÓ%EˆŒZ˜Ó!Ñ"Ü˜$˜w™-¬Ô4Ø�y‰yÐ$¨°·±Ñ):Ø)-¯©°4©×)>Ñ)>¸tÓ)D�”Z Ó%Ò&à,0¯O©O�”Z Ó(Ñ)à�9‰9Ð Ü%1°$·)±)·-±-ÀÀaÓ2HÓ%IˆD”˜DÓ!Ñ"Ø—I‘I—M‘M $¬
«Ó5×@Ñ@ÓBˆEÜ˜e¤TÔ*Ü$ SÓ)¬;°sÓ+;¼[ÈÓ=MÐN�Ü%0°Ó%7ˆD”˜DÓ!Ñ"Øˆrp   Úoutlinesc                 ó  — |D ]{  }|j                  dd«      dk(  sd|vr|}n@| j                  |«      }t        t        |j	                  «       «      j                  ||| «       | j                  |j                  |d «       Œ} y )Nr$  rÁ   r…  r•  )r  r�  r   rN   r˜   rx  rI  r‰  )r�   r‘  r£  rr  rc  Únps         rq   rI  z"PdfWriter._insert_filtered_outlineh  s€   € ð ò 	MˆDð �x‰x˜ Ó$¨Ò3°xÀtÑ7KØ‘à×(Ñ(¨Ó.�Ü”Z ×!2Ñ!2Ó!4Ó5×BÑBÀ2ÀvÈtÔTØ×)Ñ)¨$×*AÑ*AÀ2ÀtÕLñ	Mrp   c                  ó   — y)z"Implemented for API harmonization.Nro   rñ   s    rq   r  zPdfWriter.closex  s   € àrp   Úrootc                óÐ  — |€| j                  «       }nt        d|«      }|€
t        «       }d}|�­|j                  |k(  s|j	                  dd «      |k(  r|gS t        |«      }||v rt        d«      ‚|j                  |«       d|v r6| j                  |t        t        |d   «      |¬«      }|rd|v r|g|z   S g |z   S d|v r|dz  }t        t        |d   «      }ny |�Œ­t        d	«      ‚)
NrN   r   r•  z"Detected cyclic outline hierarchy.r†  )r{  r•  rc  r‡  r   z'This line is theoretically unreachable.)rk  r   r}   rý   r  r-  r7   rž   Úfind_outline_itemr[   rN   r9   )r�   r{  r•  rc  ri  r'  Ú
outline_idÚresults           rq   r—  zPdfWriter.find_outline_item|  s  € ð ˆ<Ø×+Ñ+Ó-‰Gä˜<¨Ó.ˆGØˆ?Ü“eˆGàˆØÐ!à×*Ñ*¨lÒ:Ø—;‘;˜x¨Ó.°,Ò>à�w�ä˜G›ˆJØ˜WÑ$Ü'Ð(LÓMÐMØ�K‰K˜
Ô#à˜7Ñ"Ø×/Ñ/Ø!-Üœk¨7°8Ñ+<Ó=Ø#ð 0ó �ñ
 Ø'/°7Ñ':˜U˜GÀfÑLÐLÀÀfÑLÐLØ˜'Ñ!Ø˜‘
�Üœz¨7°7Ñ+;Ó<‘àð1 Ñ!ô2 ÐBÓCÐCrp   c                 óF  — |€i | _         yt        |t        «      r	 | j                   t        |«      = yt        |t        «      r"	 | j                   t        |j                  «      = yt        d|› �«      ‚# t        $ r ‚ t
        $ r Y yw xY w# t        $ r ‚ t
        $ r Y yw xY w)a3  
        Reset the translation table between reader and the writer object.

        Late cloning will create new independent objects.

        Args:
            reader: PdfReader or IndirectObject referencing a PdfReader object.
                if set to None or omitted, all tables will be reset.

        NzInvalid parameter )	r³   rˆ   r!   r-  r.  r/  rD   r  r†  )r�   rt  s     rq   Úreset_translationzPdfWriter.reset_translation¦  s«   € ð ˆ>Ø"$ˆDÕÜ˜¤	Ô*ðØ×'Ñ'¬¨6«
Ñ3ô
 ˜¤Ô/ðØ×'Ñ'¬¨6¯:©:«Ñ7ô Ð0°°Ð9Ó:Ð:øô ò ØÜò Ùðûô
 ò ØÜò Ùðús#   œA3 Á B Á3BÂBÂB ÂB Úpage_index_fromÚpage_index_toÚstyleÚprefixr>  c                 ón  — |€|€t        d«      ‚|�5|t        t        «      vr$t        ddj                  t        «      › d|›�«      ‚|dk  rt        d«      ‚||k  rt        d«      ‚|t	        | j
                  «      k\  rt        d	«      ‚|�|dk7  r|d
k  rt        d«      ‚| j                  |||||«       y)aK  
        Set a page label to a range of pages.

        Page indexes must be given starting from 0.
        Labels must have a style, a prefix or both.
        If a range is not assigned any page label, a decimal label starting from 1 is applied.

        Args:
            page_index_from: page index of the beginning of the range starting from 0
            page_index_to: page index of the beginning of the range starting from 0
            style: The numbering style to be used for the numeric portion of each page label:

                       * ``/D`` Decimal Arabic numerals
                       * ``/R`` Uppercase Roman numerals
                       * ``/r`` Lowercase Roman numerals
                       * ``/A`` Uppercase letters (A to Z for the first 26 pages,
                         AA to ZZ for the next 26, and so on)
                       * ``/a`` Lowercase letters (a to z for the first 26 pages,
                         aa to zz for the next 26, and so on)

            prefix: The label prefix for page labels in this range.
            start:  The value of the numeric portion for the first page label
                    in the range.
                    Subsequent pages are numbered sequentially from this value,
                    which must be greater than or equal to 1.
                    Default value: 1.

        Nz.At least one of style and prefix must be givenzstyle must be one of: rT  z, got r   z/page_index_from must be greater or equal than 0z;page_index_to must be greater or equal than page_index_fromz%page_index_to exceeds number of pagesr   z1If given, start must be greater or equal than one)r   r±  r3   r/  r�   rï   Ú_set_page_label)r�   rœ  r�  rž  rŸ  r>  s         rq   Úset_page_labelzPdfWriter.set_page_labelÆ  sÓ   € ðH ˆ=˜V˜^ÜÐMÓNÐNØÐ ¬e´NÓ.CÑ!CÜØ(¨¯©´>Ó)BÐ(CÀ6È%ÈÐSóð ð ˜QÒÜÐNÓOÐOØ˜?Ò*ÜØMóð ð œC §
¡
›OÒ+ÜÐDÓEÐEØÐ ¨!¢°¸²	ÜÐPÓQÐQà×Ñ˜_¨m¸UÀFÈEÕRrp   c                 ó  — t        «       }t        d«      |t        d«      <   t        «       }|�t        |«      |t        d«      <   |�t        |«      |t        d«      <   |�|dk7  rt        |«      |t        d«      <   t        t        j
                  «      | j                  vr^t        «       }t        t        d«      ||«       t        «       }	||	t        d«      <   |	| j                  t        t        j
                  «      <   t        t        | j                  t        t        j
                  «         «      }	t        t        |	t        d«         «      }t        t        |«      ||«       t        t        |«      ||«       t        t        |«      |«      ^}
}|
|dz   k7  r4|dz   t        | j                  «      k  rt        t        |dz   «      ||«       ||	t        d«      <   |	| j                  t        t        j
                  «      <   y)	a   
        Set a page label to a range of pages.

        Page indexes must be given starting from 0.
        Labels must have a style, a prefix or both.
        If a range is not assigned any page label a decimal label starting from 1 is applied.

        Args:
            page_index_from: page index of the beginning of the range starting from 0
            page_index_to: page index of the beginning of the range starting from 0
            style:  The numbering style to be used for the numeric portion of each page label:
                        /D Decimal Arabic numerals
                        /R Uppercase Roman numerals
                        /r Lowercase Roman numerals
                        /A Uppercase letters (A to Z for the first 26 pages,
                           AA to ZZ for the next 26, and so on)
                        /a Lowercase letters (a to z for the first 26 pages,
                           aa to zz for the next 26, and so on)
            prefix: The label prefix for page labels in this range.
            start:  The value of the numeric portion for the first page label
                    in the range.
                    Subsequent pages are numbered sequentially from this value,
                    which must be greater than or equal to 1. Default value: 1.

        r.  rú  Nr$  r   z/Stz/Numsr   )r@   rF   rM   rH   r+   ÚPAGE_LABELSrì   r;   r   rN   r   r   r    r�   rï   )r�   rœ  r�  rž  rŸ  r>  Údefault_page_labelÚnew_page_labelÚnumsÚpage_labelsÚnext_label_posrõ  s               rq   r¡  zPdfWriter._set_page_labelý  s¼  € ôB .Ó/ÐÜ/9¸$Ó/?Ðœ: dÓ+Ñ,ä)Ó+ˆØÐÜ/9¸%Ó/@ˆNœ: dÓ+Ñ,ØÐÜ/?ÀÓ/GˆNœ: dÓ+Ñ,ØÐ ¨!¢Ü0<¸UÓ0CˆNœ: eÓ,Ñ-äÔ'×3Ñ3Ó4¸D×<MÑ<MÑMÜ“=ˆDÜœ Q›Ð);¸TÔBÜ$›,ˆKØ/3ˆKœ
 7Ó+Ñ,ØKVˆD×ÑœjÔ):×)FÑ)FÓGÑHäÜ˜×)Ñ)¬*Ô5F×5RÑ5RÓ*SÑTó
ˆô ”K ¬Z¸Ó-@Ñ!AÓBˆä”L Ó1°>À4ÔHÜœ oÓ6¸ÀtÔLÜ&¤|°OÓ'DÀdÓKÐˆ˜Ø˜]¨QÑ.Ò.°=À1Ñ3DÄsÈ4Ï:É:ÃÒ3VÜœ ]°QÑ%6Ó7Ð9KÈTÔRà+/ˆ”J˜wÓ'Ñ(ØGRˆ×Ñœ*Ô%6×%BÑ%BÓCÒDrp   c                 óX   — t        «       }| j                  |«       |j                  «       S )z4Write the document into memory and return its bytes.)r   r  Úgetvalue)r�   Úpdf_datas     rq   Ú_get_pdf_byteszPdfWriter._get_pdf_bytes>  s$   € ä“9ˆØ�
‰
�8ÔØ× Ñ Ó"Ð"rp   )rÁ   NFFF)ro   )T)r   ro   ró  )NNr   r‡   r«   )NNT)NNTN)NNTro   )®r`   ra   rb   r¬   r­   Ú__annotations__r™   rI   rX  rÑ   r   r   r!   r"   r   r‚   Úpropertyrò   r@   rô   rö   ÚsetterrD   r]   r  Úbytesr   r  r‡  ÚBaseExceptionr   r  r‰   rØ   rÜ   r˜   r%  r   r   r9  r@  rO   rD  rF  rH  rG   rM  rý  rR  ÚdecimalÚDecimalr]  r?   rM   r=   r`  r   ri  r)   rj  rs  r   r|  r†  rL   r˜  r-   ÚFfBitsÚ
FFBITS_NULr   r±  r«  rÁ  rÔ  rä  rè   rí  ÚALL_DOCUMENT_PERMISSIONSr6   rþ  r  r#   r  r   r  r  r  r  r  r  r   r
  rI  ÚobjectrW  r`  r}   r[  rf  rN   rk  r;   ro  rn  ru  rZ   r~  r%   r:   rB   r�  r�  r“  r–  r™  rŸ  r¢  rW   r¦  r¥  r_   r¡  r>   rÍ  rÌ  r/   rä  ræ  rõ  rJ   r   r	  r  rY   r  rF   r  r  r  r!  r\   r  r  r,  r2  r	   r5  rU   r�   rV   r9  r   rv   rE  rW  rh  r   rL  r^  rJ  rv  rK  rH  r�  rI  r  r[   r—  r›  r3   r¢  r¡  r­  Ú__classcell__)rb  s   @rq   r¯   r¯   á   sR  ø… ñð8 Óðð �9˜tÑ#Ñ$Ó$ðð ˜˜d 3¨°Ñ)=Ñ#=¸sÐ#BÑCÐCÑDÓDðð
 ˜ÑÓðð :<Ø<@Ø!ØØðOgð %*Ø;BØ8AòOgà˜[Ñ(¨4Ñ/°$Ñ6ðOgð  Ñ+¨dÑ2°TÑ9ðOgð ð	Ogð
 ðOgð ðOgð "ðOgð /2°D©jðOgð ,/°©:ðOgð 
óOgðd ð˜dò ó ðð ð!Ð-ò !ó ð!ð ð
Ð'¨$Ñ.ò 
ó ð
ð ‡\�\ð
C˜>Ð,<Ñ<¸tÑCð 
CÈò 
Có ð
Cð ðC˜n¨tÑ3ò Có ðCð ×Ñð- .°5Ñ"8¸4Ñ"?ð -ÀDò -ó ð-ð.˜4ó ð%à�}Ñ%¨Ñ,ð%ð ˜TÑ!ð%ð ! 4Ñ'ð	%ð
 
ó%ð ð
%˜Cò 
%ó ð
%ð ×Ñð" S¨5¡[ð "°Tò "ó ð"ð
&˜yð &¨^ó &ðà .Ñ0ðð 
óðà .Ñ0ðð ðð 
ó	ð2 (*ñ	=àð=ð ð=ð   ‘}ð	=ð
 
ó=ñ~$°ð $Àó $ðLÐ+<ó ð (*ñNàðNð   ‘}ðNð 
ó	Nð8 Ø')ñ	:àð:ð ð:ð   ‘}ð	:ð
 
ó:ð82,Ø"%¨
Ñ"2°^Ñ"CÀdÑ"Jð2,à	ˆt‰ó2,ðj BFñ#Ø˜T‘\ð#Ø27¸$±,ð#à	ó#ð6 15Ø15Øñ	'à�w—‘Ñ&¨Ñ-ð'ð ˜Ÿ™Ñ'¨$Ñ.ð'ð ð	'ð
 
ó'ðR ð(à	Ð'Ñ	'Ð*:Ñ	:¸TÑ	Aô(ó ð(ð
 ×Ñð S¨;Ñ%6¸Ñ%CÀdÑ%Jð Ètò ó ðð"K ð K¨ó Kð8 fð 8°ó 8ð"> sð >°#¸±+ð >À.ó >ð* BFñ/àð/ð $ Z L°$Ð$6Ñ7¸$Ñ>ð/ð 
ó	/ð@%Iàð%Ið  ð%Ið 
ó	%IðN%Kàð%Kð $0ð%Kð ð	%Kð
 ð%Kð ð%Kð ó%KðN 2Ð*×1Ñ1°!Ó4€Jð 3=Ø'+ØñKnà˜4 
Ñ+Ñ+¨dÑ2ðKnð ˜˜S 4¨¡9™_¨u°S¸#¸u°_Ñ/EÑEÐEÑFðKnð )×/Ñ/ð	Knð
  ™ðKnð ðKnð 
óKnð\ )-ñ0Ø Ñ%ð0à	ÐÑ	ó0ðd"¸Ið "È$ÈsÉ)ó "ð,=R°ð =R¸tó =RðD BFñ*5àð*5ð $ Z L°$Ð$6Ñ7¸$Ñ>ð*5ð 
ó	*5óX9ð. &*ØØ2Jð<$ð !%ò<$àð<$ð ˜d™
ð<$ð ð	<$ð
 0ð<$ð ˜‘:ð<$ð 
ó<$ó|9ð&7 :ð 7°$ó 7ð8˜D ;Ñ.ð °5¸¸rÀ#¹w¸Ñ3Gó ð@
¨4°Ñ+?ó 
ð0GP zð GP°dó GPðR.¨:ð .¸%ÀÀSÁ	È4ÐPSÉ9Ð@TÑ:Uó .ð(Ø ðØ48¸±IðØMQÐRUÉYðà	óð H Zð HÀð HÈó Hð0 ð Ð-°Ñ4ô  ó ð ð ‡_�_ð
%à"Ð%5Ñ5¸¸SÀ#¸X¹ÑFÈÑMð
%ð 
ò
%ó ð
%ð  $ s¨C x¡.ð  °Tó  ñ( ‹X€Fð "(Ø$ðJ4ð
 #'Ø$(òJ4àðJ4ð ðJ4ð
  ðJ4ð "ðJ4ð 
óJ4ðX¨¨S©ó ð( ð ¨~ó ð *ó ð: +ó ð& ð	'˜ò 	'ó ð	'ð 6:Ø59Øñ"$à(¨:Ñ5¸
ÑBð"$ð ˜^Ñ+¨dÑ2ð"$ð ˜^Ñ+¨dÑ2ð	"$ð
 ð"$ð 
ó"$ðN 6:Ø59Øñ
à%ð
ð ˜^Ñ+¨dÑ2ð
ð ˜^Ñ+¨dÑ2ð	
ð
 ð
ð 
ó
ñ. $ GÓ,ð 6:Ø59Ø9=ØØØØòPXð ðPXð   .Ñ0°3Ñ6¸Ñ=ð	PXð
 ˜^Ñ+¨dÑ2ðPXð ˜^Ñ+¨dÑ2ðPXð �U˜E 5Ð(Ñ)¨CÑ/°$Ñ6ðPXð ðPXð ðPXð ðPXð ðPXð 
òPXó -ðPXód
ð
Ø%ðØ4BÀ[Ñ4Pðà	óð	$à#ð	$ð 
ó	$ðK¨sð K°~ó Kð ñ	%àð%ð ð%ð �4‰Zð	%ð
 
ó%óNTð
:Ø)¨HÐ5FÑ,GÑGÈ$ÑNð:à	ó:ð à˜zÑ)Ð,<Ñ<ðð ˜3‘- $Ñ&ðð 
ó	ð@ /3ñ	@àÐ+Ñ+ð@ð &¨Ð1CÑ(DÑDð@ð ˜3 ˜8‘n tÑ+ð	@ð
 
ó@ðR 37ñ)à"ð)ð ˜‘Ið)ð ˜‘9ð	)ð
 ! ™Kð)ð *ð)ð ˜s C˜x™.¨4Ñ/ð)ð 
ó)ðb 37ñZà!ðZð Ð(Ñ)ðZð ! ™Kð	Zð
 *ðZð ˜s C˜x™.¨4Ñ/ðZð 
ˆt�C‰y˜$˜s™)Ð#Ñ	$óZð|  )Ÿ}™}ñ3àð3ð 
ó3ñ:7d d¨3¡i°$Ñ&6ð 7dÀ$ó 7dð| (,ñBQàðBQð ðBQð ð	BQð
 ˜‘ Ñ$ðBQð 
óBQðH€Nð *¨tÑ"3ó ð"V z°JÑ'>ð "VÀ4ó "VðH& jð &°Tó &ð8 ð'˜Z¨$Ñ.ò 'ó ð'ð0 ×Ñð& *ð &°ò &ó ð&ð€Lð ¨tÑ 3ó ð ð%˜<¨$Ñ.ò %ó ð%ð, ×ÑðW˜lð W¨tò Wó ðWðEà˜:Ñ%ðEð ˜˜c˜‘NðEð 
ó	EðN˜z¨NÑ:ð ¸zó ð6 d¨[Ñ&8ð ¸Vó ð0 eiØjnØ#Ø>Bñ9à˜yÑ(¨4Ñ/ð9ð ˜I‘o¨¨c°3¨h©Ñ7¸%ÀÀSÈ#ÀÑ:NÑNÐQUÐVYÑQZÑZÐ]aÑað9ð ˜5  c ™?Ñ*¨U°3¸¸S°=Ñ-AÑAÀDÈÁIÑMÐPTÐU_ÑP`Ñ`ÐcgÑgð	9ð
 ð9ð ˜c™ U¨3°¨8¡_Ñ4°tÑ;ð9ð 
ó9ð~ $(Ø9=Ø#Ø>@ñs=à˜‘*ðs=ð ˜Ñ# iÑ/ðs=ð ˜D‘jð	s=ð
 ˜t JÑ/Ñ/°$Ñ6ðs=ð ðs=ð ˜c™ U¨3°¨8¡_Ñ4°tÑ;ðs=ð 
ós=ðj _àð _ð ð _ð �s˜J�Ñ'ð	 _ð
 3ð _ð 
ó _ðD>Øð>Ø'*ð>Ø@Vð>à	ó>ðJ-à ðJ-ð �C˜�OÑ$ðJ-ð ð	J-ð
 
óJ-ðX"Bð �C‰L˜3Ñð"Bð
 �C˜�OÑ$ð"Bð ð"Bð 
ó"BðHà˜zÑ)¨JÑ6¸Ñ<¸tÑCðð �C˜�OÑ$ðð ð	ð
 
˜$Ñ	óðJ =AòLð   i¡Ñ0°4Ñ7ðLð ð	Lð
 �C˜�OÑ$ðLð ðLð ˜CÐ!1Ð1Ñ2°TÑ9ðLð 
ˆkÑ	óLð\(Ø*ð(Ø;?ÀÐEUÐ@UÑ;Vð(à	ó(ð:
¨d°3Ð8HÐ3HÑ.Ið 
ÐS\ð 
Ðaeó 
ð$ $(òGð ðGð �C˜�OÑ$ð	Gð
 ðGð �S‘˜D‘ðGð 
ˆkÑ	óGðR ;ð °:ó ð, )-ñ	Mà�{Ñ#ðMð ˜^Ñ+ðMð  Ñ%ð	Mð
 
óMó ð $(ð(Dð
 $(ò(Dà$ sÑ*ð(Dð ˜DÑ ð(Dð
 �S‘˜D‘ð(Dð 
ˆc‰�TÑ	ó(DðV ;?ñ;Ø .Ñ0°4Ñ7ð;à	ó;ðH (,Ø!Øñ5Sàð5Sð ð5Sð  Ñ$ð	5Sð
 �d‘
ð5Sð �T‰zð5Sð 
ó5Sðv (,Ø!Øñ?Sàð?Sð ð?Sð  Ñ$ð	?Sð
 �d‘
ð?Sð �T‰zð?Sð 
ó?SðB# ÷ #rp   r¯   r  rx   c                 óà  — t        | t        «      r| S t        | t        «      r;t        «       }| j	                  «       D ]  \  }}t        |«      |t        |«      <   Œ |S t        | t        «      r'| j                  d«      rt        | «      S t        | «      S t        | t        t        f«      rt        | «      S t        | t        «      rt        d„ | D «       «      S t        dt!        | «      ›d�«      ‚)Nr„  c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr‡   )r)  )rŠ   r©   s     rq   rŒ   z!_pdf_objectify.<locals>.<genexpr>T  s   è ø€ Ò:°œ>¨!×,Ñ:ùr§  z
type(obj)=z! could not be cast to a PdfObject)rˆ   rI   rX  r@   r¬  r)  rF   r‰   Ú
startswithrM   rý  rÑ   rC   r™   r;   r÷  r‡  )r  r*  r‹   r÷   s       rq   r)  r)  E  sÑ   € Ü�#”yÔ!Øˆ
Ü�#”tÔÜ!Ó#ˆØŸ)™)›+ò 	<‰JˆC�Ü&4°UÓ&;ˆF”:˜c“?Ò#ð	<àˆÜ�#”sÔØ�>‰>˜#ÔÜ˜c“?Ð"Ü Ó$Ð$Ü�#œœs�|Ô$Ü˜3ÓÐÜ�#”tÔÜÑ:°cÔ:Ó:Ð:Ü
ØŒ4�‹9ˆ,Ð7Ð8óð rp   r‹  r–   r€  r‚  r�  c                 óê  — t        «       }| �| |t        d«      <   |j                  t        d«      t        |«      i«       |rWt	        |t
        «      rt        |«      }|j                  t        d«      t        |D �cg c]  }t        |«      ‘Œ c}«      i«       |s|rQd}|r|t        j                  z  }|r|t        j                  z  }|j                  t        d«      t        |«      i«       |S c c}w )Nrû  r•  rŽ  r   r[  )rN   rF   r   rP   rˆ   r‰   rR   r;   rC   r1   r‚  r�  rH   )r‹  r–   r€  r‚  r�  r{  ÚcÚformat_flags           rq   rŠ  rŠ  Z  sæ   € ô “<€LØÐØ)3ˆ”Z Ó%Ñ&Ø×Ñä�xÓ Ô"6°uÓ"=ð	
ôñ
 Ü�eœSÔ!Ü˜uÓ%ˆEØ×ÑÜ˜Óœ{ÀEÖ+J¸q¬K¸­NÒ+JÓKÐLô	
ñ ‘ØˆÙØœ?×1Ñ1Ñ1ˆKÙØœ?×/Ñ/Ñ/ˆKØ×ÑœZ¨Ó-¬|¸KÓ/HÐIÔJØÐùò ,Ks   Á;C0)…rù   r³  rd   rk  ré  r0  rÒ   Úcollections.abcr   r   r   r   Úior   r   r	   Ú	itertoolsr
   Úpathlibr   r   Útypesr   Útypingr   r   r   r   r   Úversion_infor   Útyping_extensionsÚ_configurationr   Ú_doc_commonr   r   ræ   r   r   Ú_pager   r   Ú_page_labelsr   r   r    r´   r!   Ú_utilsr"   r#   r$   r%   r&   r'   r(   Úactionsr)   Ú	constantsr*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   Úerrorsr7   r8   r9   Úgenericr:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   Úgeneric._appearance_streamrT   Ú	pagerangerU   rV   rW   rX   rY   rZ   r[   r\   Úxmpr]   r‘   r·  ÚIntFlagr_   rÊ  rD  rv   r¯   rX  r‰   rý  r™   r)  r±  r­   rŠ  ro   rp   rq   ú<module>rÕ     s©  ðó< Û Û Û 	Û Û Û 
ß AÓ Aß &Ñ &Ý Ý Ý Ý ÷õ ð ×Ñ�wÒÞå&å -ß :ß 5ß -ß BÑ BÝ ÷÷ ñ õ ÷÷ ÷ õ ÷ @Ñ ?÷÷ ÷ ÷ ÷ ÷ ÷ õ8 =ß /÷÷ õ  à4Ð0×4Ñ4Ó6Ð ô
=˜Ÿ™ô 
=ð 5Ð ð
 $&Ð  ÷F"ñ F"ôRa5#�ô a5#ðHk˜˜S #˜X™¨Ñ,¨uÑ4°t¸C±yÑ@ð ÀYó ð*Ø Ñ%ðàðð �˜˜uÐ$Ñ%¨Ñ+¨dÑ2ðð ð	ð
 ðð ôrp   