§
    ¥”j`Í  ã                   ó  — d Z ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZ ddlmZ ddlmZ ddlmZmZmZ ddlmZmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZm Z m!Z!m"Z"m#Z# ddl$m%Z%m&Z& ddl'm(Z(m)Z)m*Z*m+Z+m,Z, ej-        rddl.m/Z/ g d¢Z0 ej1        e2¦  «        Z3	 d de4deej5                 dej6        fd„Z7 G d„ de%¦  «        Z8 G d„ dej5        ¦  «        Z9 G d„ de8¦  «        Z: G d„ d¦  «        Z;	 d de%dee<         de:fd„Z=dS )!z„
Utilities for writing PDF files.
Contains code from the PyPDF2 project; see :ref:`here <pypdf2-license>`
for the original license.
é    N)ÚDictÚIterableÚListÚOptionalÚSetÚTupleÚUnionÚcast)Úx509)Úgeneric)ÚPubKeySecurityHandlerÚSecurityHandlerÚStandardSecurityHandler)ÚDeveloperExtensionÚDevExtensionMultivalued)Úpdf_name)Úupdate_info_dictÚview_from_info_dict)ÚDocumentMetadata)ÚIndirectObjectExpectedÚPdfErrorÚPdfReadErrorÚPdfWriteErrorÚinstance_test)Ú
PdfHandlerÚfind_inherited_value_in_tree)ÚOBJSTREAM_FORBIDDENÚObjectStreamÚPositionDictÚ
XRefStreamÚwrite_xref_tableé   ©ÚFontSubsetCollection)ÚBasePdfFileWriterÚ
PageObjectÚPdfFileWriterÚcopy_into_new_writerÚinit_xobject_dictionaryÚcommand_streamÚ	resourcesÚreturnc                 óz  — |pt          j        ¦   «         }t          j        t          d¦  «        t          j        t          t          t           j        d||df¦  «        ¦  «        ¦  «        t          d¦  «        |t          d¦  «        t          d¦  «        t          d¦  «        t          d¦  «        i| ¬¦  «        S )	a  
    Helper function to initialise form XObject dictionaries.

    .. note::
        For utilities to handle image XObjects, see :mod:`.images`.

    :param command_stream:
        The XObject's raw appearance stream.
    :param box_width:
        The width of the XObject's bounding box.
    :param box_height:
        The height of the XObject's bounding box.
    :param resources:
        A resource dictionary to include with the form object.
    :return:
        A :class:`~.generic.StreamObject` representation of the form XObject.
    ú/BBoxg        ú
/Resourcesú/Typeú/XObjectú/Subtypeú/Form©Ústream_data)r   ÚDictionaryObjectÚStreamObjectr   ÚArrayObjectÚlistÚmapÚFloatObject)r*   Ú	box_widthÚ
box_heightr+   s       úg/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/pyhanko/pdf_utils/writer.pyr)   r)   <   s´   € ð. Ð7�WÔ5Ñ7Ô7€IÝÔå�WÑÔ�wÔ2ÝÝ�Ô+¨c°:¸yÈ#Ð-NÑOÔOñô ñ ô  õ
 �\Ñ"Ô" IÝ�WÑÔ�x¨
Ñ3Ô3Ý�ZÑ Ô ¥(¨7Ñ"3Ô"3ð		
ð #ðñ ô ð ó    c                   óx  — e Zd ZU dZdZ	 eed<   	 	 	 dAdeej	        ej
        f         deej	        ej
        df         d	ej        d
edef
d„Zdefd„Zedefd„¦   «         Zedefd„¦   «         Zd„ Zdeej	        ej
        df         deej	                 fd„Zdej        dej        fd„Zedeeef         fd„¦   «         Zdeej        ej	        f         fd„Zdej        fd„Zedej        fd„¦   «         Z d„ Z!de"fd„Z#dBd efd!„Z$dej	        fd"„Z%	 dCd#ee&         dej	        fd$„Z'dDd%„Z(d&„ Z)d'e*fd(„Z+d)e&fd*„Z,d+e-fd,„Z.d-„ Z/d.„ Z0d/„ Z1edej
        fd0„¦   «         Z2ed1„ ¦   «         Z3d2„ Z4dEd4efd5„Z5dBd6efd7„Z6d8„ Z7dFd9„Z8	 dFdej        d#ee&         dej        fd:„Z9	 dAd;e:fd<„Z;	 dGd=„Z<d>ej
        d?ej
        defd@„Z=dS )Hr%   zBase class for PDF writers.)r"   é   Ústream_xrefsr   TÚrootÚinfoNÚdocument_idÚobj_id_startc                 óP  — i | _         t          ¦   «         | _        i | _        || _        | f| _        t          ¦   «         | _        t          |t          j
        ¦  «        r|| _        n|                      |¦  «        | _        d | _        d | _        d | _        || _        || _        d }|�Pt          |t          j
        ¦  «        s|                      |¦  «        }n t          j
        |j        |j        | ¦  «        }|| _        t+          ¦   «         | _        i | _        d| _        d | _        d S ©NF)Úobjectsr9   Úobject_streamsÚobjs_in_streamsÚ_lastobj_idÚ_resolves_objs_fromÚsetÚ_allocated_placeholdersÚ
isinstancer   ÚIndirectObjectÚ_rootÚ
add_objectÚsecurity_handlerÚ_encryptÚ_encrypt_keyÚ_document_idrB   ÚidnumÚ
generationÚ_infor   Ú_metaÚ_font_resourcesÚdigest_aware_writeÚ_mac_handler_cls)ÚselfrC   rD   rE   rF   rB   Úinfo_refs          r>   Ú__init__zBasePdfFileWriter.__init__s   s  € ð BDˆŒÝ26±&´&ˆÔØ=?ˆÔØ'ˆÔØ:>¸ˆÔ Ý14±´ˆÔ$å�d�GÔ2Ñ3Ô3ð 	/ØˆDŒJˆJàŸš¨Ñ.Ô.ˆDŒJà;?ˆÔØ:>ˆŒØ-1ˆÔØ'ˆÔØ(ˆÔØˆØÐÝ˜d¥GÔ$:Ñ;Ô;ð ØŸ?š?¨4Ñ0Ô0��å"Ô1Ø”J ¤°ñô �ð ˆŒ
Ý'7Ñ'9Ô'9ˆŒ
àBDˆÔØ"'ˆÔØ $ˆÔÐÐr?   Úbase_postscript_namec                 óz   — ddl m} 	 | j        |         }n%# t          $ r  ||¦  «        }|| j        |<   Y nw xY w|S )Nr"   r#   )Úfont.apir$   r\   ÚKeyError)r_   rb   r$   Úfscs       r>   Úget_subset_collectionz'BasePdfFileWriter.get_subset_collection›   sp   € Ø2Ð2Ð2Ð2Ð2Ð2ð	=ØÔ&Ð';Ô<ˆCˆCøÝð 	=ð 	=ð 	=Ø&Ð&Ð';Ñ<Ô<ˆCØ9<ˆDÔ Ð!5Ñ6Ð6Ð6ð	=øøøð ˆ
s   ˆ –8·8r,   c                 ó   — | j         S ©N)r[   ©r_   s    r>   Údocument_metazBasePdfFileWriter.document_meta¦   s
   € àŒzÐr?   c                 ó®   — | j         r't          | j                              ¦   «         ¦  «        }nt          ¦   «         }| j                             |¦  «        S ri   )rZ   r   Ú
get_objectr   r[   Ú	view_over)r_   Úbases     r>   Údocument_meta_viewz$BasePdfFileWriter.document_meta_viewª   sL   € ð Œ:ð 	&Ý& t¤z×'<Ò'<Ñ'>Ô'>Ñ?Ô?ˆDˆDå#Ñ%Ô%ˆDØŒz×#Ò# DÑ)Ô)Ð)r?   c                 ó.   — | j         |k     r	|| _         d S d S ri   )Úoutput_version)r_   Úversions     r>   Úensure_output_versionz'BasePdfFileWriter.ensure_output_version·   s&   € ØÔ Ò(Ð(Ø")ˆDÔÐÐð )Ð(r?   c                 óŠ   — |�7t          |t          j        ¦  «        s|                      |¦  «        x| _        }n	|x| _        }|S )zœ
        Set the ``/Info`` entry of the document trailer.

        :param info:
            The new ``/Info`` dictionary, as an indirect reference.
        )rP   r   rQ   rS   rZ   )r_   rD   Únew_infos      r>   Úset_infozBasePdfFileWriter.set_info»   sG   € ð Ð¥J¨tµWÔ5KÑ$LÔ$LÐØ$(§O¢O°DÑ$9Ô$9Ð9ˆDŒJ˜˜à$(Ð(ˆDŒJ˜Øˆr?   ÚkeyÚvaluec                 ó   — t           ‚)á°  
        Set a custom, unmanaged entry in the document trailer or cross-reference
        stream dictionary.

        .. warning::
            Calling this method to set an entry that is managed by pyHanko
            internally (info dictionary, document catalog, etc.) has undefined
            results.

        :param key:
            Dictionary key to use in the trailer.
        :param value:
            Value to set
        ©ÚNotImplementedError©r_   rx   ry   s      r>   Úset_custom_trailer_entryz*BasePdfFileWriter.set_custom_trailer_entryÌ   s
   € õ" "Ð!r?   c                 óD   — | j         }|d         j        |d         j        fS )Nr   r"   )rW   Úoriginal_bytes)r_   Úid_arrs     r>   rE   zBasePdfFileWriter.document_idß   s#   € àÔ"ˆØ�aŒyÔ'¨°¬Ô)AÐAÐAr?   Úobj_refc                 ó   — dS )a  
        Mark an object reference to be updated.
        This is only relevant for incremental updates, but is included
        as a no-op by default for interoperability reasons.

        :param obj_ref:
            An indirect object instance or a reference.
        N© )r_   rƒ   s     r>   Úmark_updatezBasePdfFileWriter.mark_updateä   s	   € ð 	ˆr?   Úobjc                 ó   — dS )aˆ  
        Mark the container of an object (as indicated by the
        :attr:`~.generic.PdfObject.container_ref` attribute on
        :class:`~.generic.PdfObject`) for an update.

        As with :meth:`mark_update`, this only applies to incremental updates,
        but defaults to a no-op.

        :param obj:
            The object whose top-level container needs to be rewritten.
        Nr…   )r_   r‡   s     r>   Úupdate_containerz"BasePdfFileWriter.update_containerñ   s	   € ð 	ˆr?   c                 ó   — | j         j        S )zK
        :return:
            A reference to the document catalog.
        )rR   Ú	referencerj   s    r>   Úroot_refzBasePdfFileWriter.root_refÿ   s   € ð ŒzÔ#Ð#r?   c                 ó   — dS )zœ
        Signal that the document catalog should be written to the output.
        Equivalent to calling :meth:`mark_update` with :attr:`root_ref`.
        Nr…   rj   s    r>   Úupdate_rootzBasePdfFileWriter.update_root  s	   € ð
 	ˆr?   Úextc           
      ól  — 	 | j         d         }n-# t          $ r  t          j        ¦   «         x| j         d<   }Y nw xY w	 ||j                 }n# t          $ r d }Y nw xY wd}d}t          |t          j        ¦  «        r|f}ngt          |t          j        ¦  «        r$t          |                     ¦   «         ¦  «        }d}n)|�'t          |¦  «        j
        }t          d|› d�¦  «        ‚t          |¦  «        D �]�\  }}t          |t          j        ¦  «        s't          |¦  «        j
        }t          d|› d�¦  «        ‚	 t          |                     d	¦  «        ¦  «        }	n*# t          t           t          f$ r t          d
¦  «        ‚w xY w|	|j        k    r d S |j        r|	|j        k    }
|
 }n|	|j        v }
|	|j        v }|
r d S |r“|r|                     ¦   «         ||<   na|j        t.          j        k    r0t          j        |                     ¦   «         g¦  «        ||j        <   n|                     ¦   «         ||j        <   |                      |¦  «          d S |j        t.          j        k    r#t7          d|j        › d|j        › d|	› d�¦  «        ‚�ŒŸ|                     ¦   «         }|€>|j        t.          j        k    rt          j        |g¦  «        ||j        <   nA|||j        <   n6|r|                     |¦  «         nt          j        ||g¦  «        ||j        <   |                      |¦  «         d S )Nz/Extensionsr…   FTzPDF extension value is of type z,, expected (direct) PDF dictionary or array.z%PDF extension array entry is of type z", expected (direct) PDF dictionaryz/ExtensionLevelz(Could not read developer extension levelz)Could not register extension with prefix z and level z?; file contains extension with same prefix and extension level zC. If this extension level is safe to override, mark it as subsumed.)rC   re   r   r6   Úprefix_namerP   r8   ÚtupleÚiterateÚtypeÚ__name__r   Ú	enumerateÚintÚraw_getÚ	TypeErrorÚ
ValueErrorÚextension_levelÚcompare_by_levelÚsubsumed_byÚsubsumesÚas_pdf_objectÚmultivaluedr   ÚALWAYSr‰   ÚNEVERr   Úappend)r_   r�   Ú
extensionsÚcur_ext_valueÚextension_dictsÚold_ext_multivaluedÚcls_nameÚixÚext_dictÚlvlÚold_ext_appliesÚreplace_olds               r>   Úregister_extensionz$BasePdfFileWriter.register_extension  s  € ð	OØœ =Ô1ˆJˆJøÝð 	Oð 	Oð 	OÝ4;Ô4LÑ4NÔ4NÐNˆDŒI�mÑ$ z z zð	Oøøøð	!Ø& s¤Ô7ˆMˆMøÝð 	!ð 	!ð 	!Ø ˆMˆMˆMð	!øøøà79ˆØ#ÐÝ�m¥WÔ%=Ñ>Ô>ð 
	Ø,Ð.ˆOˆOÝ˜¥wÔ':Ñ;Ô;ð 	Ý# M×$9Ò$9Ñ$;Ô$;Ñ<Ô<ˆOØ"&ÐÐØÐ&Ý˜MÑ*Ô*Ô3ˆHÝð>°(ð >ð >ð >ñô ð õ & oÑ6Ô6ð 2	ñ 2	‰LˆB�Ý˜h­Ô(@ÑAÔAð Ý ™>œ>Ô2�Ý"ðDØðDð Dð Dñô ð ðOÝ˜(×*Ò*Ð+<Ñ=Ô=Ñ>Ô>��øÝ�z­8Ð4ð Oð Oð OÝ"Ð#MÑNÔNÐNðOøøøð �cÔ)Ò)Ð)Ø��ØÔ%ð 2Ø"%¨Ô)<Ò"<�Ø"1Ð1��ð #&¨¬Ð"8�Ø! S¤\Ð1�Øð Ø��Øð ð 'ð Fð ),×(9Ò(9Ñ(;Ô(;�M "Ñ%Ð%Ø”_Õ(?Ô(FÒFÐFõ 3:Ô2EØ×*Ò*Ñ,Ô,Ð-ñ3ô 3�J˜sœÑ/Ð/ð 36×2CÒ2CÑ2EÔ2E�J˜sœÑ/Ø×%Ò% jÑ1Ô1Ð1Ø��Ø”Õ$;Ô$AÒAÐAõ $ð>Ø”ð>ð >Ø36Ô3Fð>ð >ð (+ð>ð >ð >ñô ð ñ Bð ×$Ò$Ñ&Ô&ˆØÐ àŒÕ"9Ô"@Ò@Ð@Ý.5Ô.AÀ8À*Ñ.MÔ.M�
˜3œ?Ñ+Ð+à.6�
˜3œ?Ñ+Ð+à"ð à×$Ò$ XÑ.Ô.Ð.Ð.õ /6Ô.AØ" HÐ-ñ/ô /�
˜3œ?Ñ+ð 	×Ò˜jÑ)Ô)Ð)Ð)Ð)s)   ‚ �':¹:¾A ÁAÁAÄ>"E!Å!'FFÚas_metadata_streamc                 óB  — |j         | j        vrt          d|› d�¦  «        ‚|j        }|j        }	 | j        ||f         S # t          $ rT |dk    r>|| j        v rt          j	        ¦   «         cY S 	 | j
        |         cY S # t          $ r Y nw xY wt          |¦  «        ‚w xY w)Nz
Reference z$ has no relation to this PDF writer.r   )ÚpdfrM   r   rX   rY   rI   re   rO   r   Ú
NullObjectrK   )r_   Úidor¯   rX   rY   s        r>   rm   zBasePdfFileWriter.get_objectq  så   € ØŒ7˜$Ô2Ð2Ð2ÝØF˜SÐFÐFÐFñô ð ð ”	ˆØ”^ˆ
ð
	 Ø”< ¨UÐ 3Ô4Ð4øÝð 	 ð 	 ð 	 Ø˜QŠˆØ˜DÔ8Ð8Ð8Ý"Ô-Ñ/Ô/Ð/Ð/Ð/ðØÔ/°Ô6Ð6Ð6Ð6øÝð ð ð Ø�Dðøøøå˜3‘-”-Ðð	 øøøs/   ±A  Á ,BÁ/A>Á;BÁ>
BÂBÂ
BÂBc                 ó–   — | j         dz   }| j                             |¦  «         | xj         dz  c_         t          j        |d| ¦  «        S )a(  
        Allocate an object reference to populate later.
        Calls to :meth:`get_object` for this reference will
        return :class:`~.generic.NullObject` until it is populated using
        :meth:`add_object`.

        This method is only relevant in certain advanced contexts where
        an object ID needs to be known before the object it refers
        to can be built; chances are you'll never need it.

        :return:
            A :class:`~.generic.IndirectObject` instance referring to
            the object just allocated.
        r"   r   )rL   rO   Úaddr   rQ   )r_   rX   s     r>   Úallocate_placeholderz&BasePdfFileWriter.allocate_placeholder„  sQ   € ð  Ô  1Ñ$ˆØÔ$×(Ò(¨Ñ/Ô/Ð/ØÐÔ˜AÑÐÔÝÔ% e¨Q°Ñ5Ô5Ð5r?   Ú
obj_streamc                 ór  — |�|| j         vrt          d¦  «        ‚d}nd}| j        dz   }|€|| j        d|f<   n=|| j        v r!|                     ||¦  «         || j        |<   nt          d|›d�¦  «        ‚|r| j                              |¦  «         n| xj        dz  c_        t          j	        |d| ¦  «        S )	a  
        Add a new object to this writer.

        :param obj:
            The object to add.
        :param obj_stream:
            An object stream to add the object to.
        :param idnum:
            Manually specify the object ID of the object to be added.
            This is only allowed for object IDs that have previously been
            allocated using :meth:`allocate_placeholder`.
        :return:
            A :class:`~.generic.IndirectObject` instance referring to
            the object just added.
        NzkManually specifying idnum is only allowed for references previously allocated using allocate_placeholder().TFr"   r   zStream z is unknown to this PDF writer.)
rO   r   rL   rI   rJ   rS   rK   Úremover   rQ   )r_   r‡   r·   rX   Úpreallocateds        r>   rS   zBasePdfFileWriter.add_object™  s  € ð& ÐØ˜DÔ8Ð8Ð8Ý#ð.ñô ð ð
  ˆLˆLà ˆLØÔ$ qÑ(ˆEàÐØ'*ˆDŒL˜!˜U˜Ñ$Ð$Ø˜4Ô.Ð.Ð.Ø×!Ò! %¨Ñ-Ô-Ð-Ø*-ˆDÔ  Ñ'Ð'åØG˜*ÐGÐGÐGñô ð ð ð 	"ØÔ(×/Ò/°Ñ6Ô6Ð6Ð6àÐÔ Ñ!ÐÔÝÔ% e¨Q°Ñ5Ô5Ð5r?   c                 ó†   — | j         st          d¦  «        ‚t          |¬¦  «        }| j                             |¦  «         |S )zéPrepare and return a new :class:`.ObjectStream` object.

        :param compress:
            Indicates whether the resulting object stream should be compressed.
        :return:
            An :class:`.ObjectStream` object.
        z2Object streams require Xref streams to be enabled.)Úcompress)rB   r   r   rJ   r£   )r_   r¼   Ústreams      r>   Úprepare_object_streamz'BasePdfFileWriter.prepare_object_streamÈ  sR   € ð Ô ð 	ÝØDñô ð õ  xÐ0Ñ0Ô0ˆØÔ×"Ò" 6Ñ*Ô*Ð*Øˆr?   c                 ó   — t           ‚ri   r|   )r_   r½   s     r>   Ú_write_headerzBasePdfFileWriter._write_headerØ  s   € Ý!Ð!r?   Úshc                 ó$  — || _         |                      |                     ¦   «         ¦  «        | _        |                     ¦   «         }|�|                      |¦  «         | j                              ¦   «         D ]}|                      |¦  «         Œd S ri   )rT   rS   rŸ   rU   Úget_min_pdf_versionrt   Úget_extensionsr®   )r_   rÁ   Úmin_pdf_versionÚ	extensions       r>   Ú_assign_security_handlerz*BasePdfFileWriter._assign_security_handlerÛ  s“   € Ø "ˆÔØŸš¨×(8Ò(8Ñ(:Ô(:Ñ;Ô;ˆŒØ×0Ò0Ñ2Ô2ˆØÐ&Ø×&Ò& Ñ7Ô7Ð7ØÔ.×=Ò=Ñ?Ô?ð 	/ð 	/ˆIØ×#Ò# IÑ.Ô.Ð.Ð.ð	/ð 	/r?   Úobj_stmc              #   óÆ   K  — |j         }|r0|s.|                      |                     ¦   «         ¦  «        x|_         }t          |¦  «        D ]\  }\  }}||j        |ffV — ŒdS )zh
        Internal method to flush an object stream as part of the file
        writing process.
        N)ÚrefrS   rŸ   r–   rX   )r_   rÈ   Ú
stream_refr©   rX   r‡   s         r>   Ú_flush_obj_streamz#BasePdfFileWriter._flush_obj_streamä  sŽ   è è € ð
 ”[ˆ
Øð 	P˜:ð 	Pð (,§¢°w×7LÒ7LÑ7NÔ7NÑ'OÔ'OÐOˆGŒK˜*õ !*¨'Ñ 2Ô 2ð 	0ð 	0ÑˆB‘�˜Ø˜*Ô*¨BÐ/Ð/Ð/Ð/Ð/Ð/ð	0ð 	0r?   Úobject_position_dictc                 ó2  — | j         D ]$}|                      |¦  «        D ]\  }}||d|f<   ŒŒ%t          | j                             ¦   «         ¦  «        D ]Ã}|\  }}| j        |         }|                     ¦   «         ||<   |                     d||fz                       d¦  «        ¦  «         d }	| j        � | j	        €J ‚|| j	        j
        k    r| j        }	t          j        ||| ¦  «        }
|                     ||	|
¦  «         |                     d¦  «         ŒÄd S )Nr   ú
%d %d obj
Úasciió   
endobj
)rJ   rÌ   ÚsortedrI   ÚkeysÚtellÚwriteÚencoderT   rU   rX   r   Ú	ReferenceÚwrite_to_stream)r_   r½   rÍ   r·   rX   Ú
pos_recordr©   rY   r‡   ÚhandlerÚcontainer_refs              r>   Ú_write_objectsz BasePdfFileWriter._write_objectsó  sF  € àÔ-ð 	>ð 	>ˆJØ%)×%;Ò%;¸JÑ%GÔ%Gð >ð >Ñ!��zØ3=Ð$ a¨ ZÑ0Ð0ð>õ ˜œ×*Ò*Ñ,Ô,Ñ-Ô-ð 	(ð 	(ˆBØ "ÑˆJ˜Ø”,˜rÔ"ˆCØ'-§{¢{¡}¤}Ð  Ñ$Ø�LŠL˜-¨5°*Ð*=Ñ=×EÒEÀgÑNÔNÑOÔOÐOØ15ˆGØÔ$Ð0Ø”}Ð0Ð0Ð0Ø˜DœMÔ/Ò/Ð/Ø"Ô3�GÝ#Ô-¨e°ZÀÑFÔFˆMØ×Ò ¨°Ñ?Ô?Ð?Ø�LŠL˜Ñ'Ô'Ð'Ð'ð	(ð 	(r?   c                 óÆ   — | j                              ¦   «         D ]2}|j                             ¦   «         D ]}|                     ¦   «          ŒŒ3|                      ¦   «          d S ri   )r\   ÚvaluesÚsubsetsÚprepare_writeÚ_update_meta)r_   rf   Úengines      r>   Ú_prep_dom_for_writingz'BasePdfFileWriter._prep_dom_for_writing  sq   € àÔ'×.Ò.Ñ0Ô0ð 	'ð 	'ˆCØœ+×,Ò,Ñ.Ô.ð 'ð '�Ø×$Ò$Ñ&Ô&Ð&Ð&ð'ð 	×ÒÑÔÐÐÐr?   c                 ó  — d }	 ddl m} | j        j        p,t	          | j        j        ¦  «        p| j        dk    pd| j        v }n# t          $ r d}Y nw xY wd| j        _	        | j
        �Kt          | j        | j
                             ¦   «         |¬¦  «        }|r|                      | j
        ¦  «         nD|sBt          j        ¦   «         }t          | j        |¦  «         |                      |¦  «        | _
        |�r	d }d| j        v rS| j        d         }t#          ||j        ¦  «        r1|}|                     | j        ¦  «         |                      |¦  «         |€“|j                             |                     | j        ¦  «        ¦  «        }| j        }||_        |� | j        j        s|                     ¦   «          |                      |¦  «        | j        d<   |                      ¦   «          |                      ¦   «          d S d S )Nr   ©Úxmp_xml©é   r   ú	/MetadataFÚnow)Úonly_update_existing)Úpyhanko.pdf_utils.metadataræ   r[   Úxmp_unmanagedÚboolÚ	xmp_extrarr   rC   ÚImportErrorÚlast_modifiedrZ   r   rm   r†   r   r6   rS   rP   ÚMetadataStreamÚupdate_xmp_with_metar‰   Úfrom_xmprT   Ú_handlerÚencrypt_metadataÚadd_crypt_filterrŽ   )r_   ræ   Úneed_xmpÚmodÚ	info_dictÚmeta_stmÚmeta_objrÁ   s           r>   rá   zBasePdfFileWriter._update_meta  sL  € Øˆð	ð
 ;Ð:Ð:Ð:Ð:Ð:ð ”
Ô(ð ,Ý˜œ
Ô,Ñ-Ô-ð,àÔ&¨&Ò0ð,ð  $¤)Ð+ð	 ˆHøõ ð 	ð 	ð 	ØˆHˆHˆHð	øøøð $)ˆŒ
Ô ØŒ:Ð!Ý"Ø”
Ø”
×%Ò%Ñ'Ô'à%-ð	ñ ô ˆCð ð -Ø× Ò  ¤Ñ,Ô,Ð,øØð 	4ÝÔ0Ñ2Ô2ˆIÝ˜TœZ¨Ñ3Ô3Ð3ØŸš¨Ñ3Ô3ˆDŒJð ñ 	ØˆHØ˜dœiÐ'Ð'Øœ9 [Ô1�Ý˜h¨Ô(>Ñ?Ô?ð 4Ø'�HØ×1Ò1°$´*Ñ=Ô=Ð=Ø×)Ò)¨(Ñ3Ô3Ð3ØÐØ"Ô1×:Ò:Ø×0Ò0°´Ñ<Ô<ñô �ð Ô*�Ø$&�Ô!à�NØ Ô1ÔBð #ð
 ×-Ò-Ñ/Ô/Ð/Ø)-¯ª¸Ñ)BÔ)B�”	˜+Ñ&Ø× Ò Ñ"Ô"Ð"Ø×ÒÑÔÐÐÐð/	ð 	s   „?A ÁAÁAc                 óÚ   — | j         |t          d¦  «        <   | j        �| j        |t          d¦  «        <   | j        �| j        |t          d¦  «        <   | j        |t          d¦  «        <   d S )Nz/Rootú/Infoz/Encryptz/ID)rR   r   rZ   rU   rW   ©r_   Útrailers     r>   Ú_populate_trailerz#BasePdfFileWriter._populate_trailerK  si   € à%)¤Zˆ•˜Ñ!Ô!Ñ"ØŒ:Ð!Ø)-¬ˆG•H˜WÑ%Ô%Ñ&ØŒ=Ð$Ø,0¬MˆG•H˜ZÑ(Ô(Ñ)ð $(Ô#4ˆ•˜‘”Ñ Ð Ð r?   c                 óV   — t          j        ¦   «         }|                      |¦  «         |S ri   )r   r6   r  rÿ   s     r>   Útrailer_viewzBasePdfFileWriter.trailer_viewV  s)   € åÔ*Ñ,Ô,ˆØ×Ò˜wÑ'Ô'Ð'Øˆr?   c                 ó<   — | j          o| j        d uo| j        j        S ri   )r]   rT   Úpdf_mac_enabledrj   s    r>   Ú_need_mac_on_writez$BasePdfFileWriter._need_mac_on_write\  s0   € ð Ô'Ð'ð 6ØÔ%¨TÐ1ð6àÔ%Ô5ð	
r?   c                 óØ   — |                       ¦   «          | j        r9ddlm} |                      |j        ¦  «         |                     | |¬¦  «         dS |                      |¦  «         dS )z‚
        Write the contents of this PDF writer to a stream.

        :param stream:
            A writable output stream.
        r   ©Úpdfmac)ÚoutputN)rã   r  Úpyhanko.pdf_utils.cryptr	  r®   ÚISO32004Úadd_standalone_macÚ_write)r_   r½   r	  s      r>   rÕ   zBasePdfFileWriter.writed  s€   € ð 	×"Ò"Ñ$Ô$Ð$ØÔ"ð 	 Ø6Ð6Ð6Ð6Ð6Ð6à×#Ò# F¤OÑ4Ô4Ð4Ø×%Ò% d°6Ð%Ñ:Ô:Ð:Ð:Ð:à�KŠK˜ÑÔÐÐÐr?   Úsha256Úmd_algorithmc                 ó¸   — ddl m} | j        p|j        }| j        }|€J ‚|                     |                     ¦   «         |                     ¦   «         |¬¦  «        S )zL
        MAC-adding method that can easily be manipulated in tests.
        r   r  N)Úfile_encryption_keyÚkdf_saltr  )r  r	  r^   ÚPdfMacTokenHandlerrT   Úfrom_key_matÚget_file_encryption_keyÚget_kdf_salt)r_   r  r	  ÚclsrÁ   s        r>   Ú_init_mac_handlerz#BasePdfFileWriter._init_mac_handlert  ss   € ð 	3Ð2Ð2Ð2Ð2Ð2àÔ#Ð@ vÔ'@ˆØÔ"ˆØˆ~ˆ~ˆ~Ø×ÒØ "× :Ò :Ñ <Ô <Ø—_’_Ñ&Ô&Ø%ð  ñ 
ô 
ð 	
r?   Úskip_headerc           	      ó  — i }| j         r&t          |¦  «        }|                     ¦   «          |}nt          j        ¦   «         }|s|                      |¦  «         |                      |¦  «         |                      ||¦  «         | j         r¥|                     ¦   «         }| j	        dz   }||d|f<   t          j
        |dz   ¦  «        |t          d¦  «        <   |                     d|dfz                       d¦  «        ¦  «         |                     |d ¦  «         |                     d¦  «         nžt          |t!          t"          t$          t&          t&          f         t&          f         |¦  «        ¦  «        }t          j
        | j	        dz   ¦  «        |t          d¦  «        <   |                     d¦  «         |                     |d ¦  «         d|z  }|                     |                     d¦  «        d	z   ¦  «         d S )
Nr"   r   z/SizerÏ   rÐ   rÑ   s   trailer
z
startxref
%s
s   %%EOF
)rB   r    r¼   r   r6   rÀ   r  rÜ   rÔ   rL   ÚNumberObjectr   rÕ   rÖ   rØ   r!   r
   r   r   r—   )	r_   r½   r  Úobject_positionsÚxmp_trailerr   Úxref_locationÚxrefs_idÚxref_pointer_strings	            r>   r  zBasePdfFileWriter._writeƒ  sü  € Ø)+Ðð Ôð 	1Ý$Ð%5Ñ6Ô6ˆKØ× Ò Ñ"Ô"Ð"Ø!ˆGˆGåÔ.Ñ0Ô0ˆGàð 	'Ø×Ò˜vÑ&Ô&Ð&Ø×Ò˜wÑ'Ô'Ð'Ø×Ò˜FÐ$4Ñ5Ô5Ð5àÔð 	2Ø"ŸKšK™MœMˆMØÔ'¨!Ñ+ˆHà.;Ð˜a ˜]Ñ+Ý)0Ô)=¸hÈ¹lÑ)KÔ)KˆG•H˜WÑ%Ô%Ñ&à�LŠL˜-¨8°Q¨-Ñ7×?Ò?ÀÑHÔHÑIÔIÐIØ×#Ò# F¨DÑ1Ô1Ð1Ø�LŠL˜Ñ'Ô'Ð'Ð'õ -Ø��T¥%­­S¨¤/µ3Ð"6Ô7Ð9IÑJÔJñô ˆMõ *1Ô)=ØÔ  1Ñ$ñ*ô *ˆG•H˜WÑ%Ô%Ñ&ð �LŠL˜Ñ&Ô&Ð&Ø×#Ò# F¨DÑ1Ô1Ð1ð 2°MÑAÐØ�ŠÐ(×/Ò/°Ñ8Ô8¸:ÑEÑFÔFÐFÐFÐFr?   c                 óÐ  — |                      ¦   «         }	 |                     d¦  «        }t          |t          j        ¦  «        r*|                      ¦   «         }|                      |¦  «         n|}|                      |¦  «         nJ# t          $ r= t          j        ¦   «         }|                      |¦  «         ||t          d¦  «        <   Y nw xY w| 	                    |¦  «         dS )aG  
        Register an annotation to be added to a page.
        This convenience function takes care of calling :meth:`mark_update`
        where necessary.

        :param page_ref:
            Reference to the page object involved.
        :param annot_ref:
            Reference to the annotation object to be added.
        z/AnnotsN)
rm   r˜   rP   r   rQ   r†   re   r8   r   r£   )r_   Úpage_refÚ	annot_refÚpage_objÚannot_arr_refÚannotss         r>   Úregister_annotationz%BasePdfFileWriter.register_annotation­  sõ   € ð ×&Ò&Ñ(Ô(ˆð	3Ø$×,Ò,¨YÑ7Ô7ˆMÝ˜-­Ô)?Ñ@Ô@ð +Ø&×1Ò1Ñ3Ô3�Ø× Ò  Ñ/Ô/Ð/Ð/ð '�Ø× Ò  Ñ*Ô*Ð*øøÝð 	3ð 	3ð 	3ÝÔ(Ñ*Ô*ˆFØ×Ò˜XÑ&Ô&Ð&Ø,2ˆH•X˜iÑ(Ô(Ñ)Ð)Ð)ð	3øøøð
 	�Š�iÑ Ô Ð Ð Ð s   –A0B ÂACÃCc                 ó  — |d         t          d¦  «        k    rt          d¦  «        ‚d|v rt          d¦  «        ‚| j                             d¦  «        }|€|                     ¦   «         d         }|d	z
  }|d
k    r|}d
}n|                      |¦  «        \  }}}|                     ¦   «         }	 |d         }	n# t          $ r t          d¦  «        ‚w xY w|}
|
�F|
d         }t          j	        |d	z   ¦  «        |
t          d¦  «        <   |
 
                    d¦  «        }
|
­F|                      |¦  «        }|	                     |d	z   |¦  «         ||t          d¦  «        <   |                      |¦  «         |                      |	¦  «         |S )a  
        Insert a page object into the tree.

        :param new_page:
            Page object to insert.
        :param after:
            Page number (zero-indexed) after which to insert the page.
        :return:
            A reference to the newly inserted page.
        r0   ú/PagezNot a page objectú/Parentz/Parent must not be set.ú/PagesNú/Countr"   éÿÿÿÿú/Kidsz/Pages must have /Kids)r   r   rC   r˜   rm   Úfind_page_containerre   r   r   r  ÚgetrS   Úinsertr‰   )r_   Únew_pageÚafterÚpage_tree_root_refÚ
page_countÚpages_obj_refÚkid_ixÚ_Ú	pages_objÚkidsÚparentÚcountÚnew_page_refs                r>   Úinsert_pagezBasePdfFileWriter.insert_pageÊ  s¶  € ð �GÔ¥¨Ñ 1Ô 1Ò1Ð1ÝÐ 3Ñ4Ô4Ð4Ø˜Ð Ð ÝÐ :Ñ;Ô;Ð;à!œY×.Ò.¨xÑ8Ô8ÐØˆ=Ø+×6Ò6Ñ8Ô8¸ÔBˆJØ ‘NˆEà�BŠ;ˆ;à.ˆMØˆFˆFà'+×'?Ò'?ÀÑ'FÔ'FÑ$ˆM˜6 1à!×,Ò,Ñ.Ô.ˆ	ð	5Ø˜WÔ%ˆDˆDøÝð 	5ð 	5ð 	5ÝÐ3Ñ4Ô4Ð4ð	5øøøð ˆØÐ à˜8Ô$ˆEÝ)0Ô)=¸eÀa¹iÑ)HÔ)HˆF•8˜HÑ%Ô%Ñ&Ø—Z’Z 	Ñ*Ô*ˆFð	 Ð ð
 —’ xÑ0Ô0ˆØ�Š�F˜Q‘J Ñ-Ô-Ð-Ø(5ˆ•˜)Ñ$Ô$Ñ%Ø×Ò˜iÑ(Ô(Ð(Ø×Ò˜dÑ#Ô#Ð#àÐs   Â0B9 Â9Cc                 óš   — t          |                     ¦   «                              ¦   «         | |i ¬¦  «        }|                     |¦  «        S )aË  
        Deep-copy an object into this writer, dealing with resolving indirect
        references in the process.

        .. danger::
            The table mapping indirect references in the input to indirect
            references in the writer is not preserved between calls.
            Concretely, this means that invoking :meth:`import_object` twice
            on the same input reader may cause object duplication.

        :param obj:
            The object to import.
        :param obj_stream:
            The object stream to import objects into.

            .. note::
                Stream objects and bare references will not be put into
                the object stream; the standard forbids this.
        :return:
            The object as associated with this writer.
            If the input object was an indirect reference, a dictionary
            (incl. streams) or an array, the returned value will always be
            a new instance.
        )ÚsourceÚtargetr·   Úreference_map)Ú_ObjectImporterÚget_container_refÚget_pdf_handlerÚimport_object)r_   r‡   r·   Úimporters       r>   rG  zBasePdfFileWriter.import_objectû  sR   € õ8 #Ø×(Ò(Ñ*Ô*×:Ò:Ñ<Ô<ØØ!Øð	
ñ 
ô 
ˆð ×%Ò% cÑ*Ô*Ð*r?   Úotherc           
      ó2  — |                      |¦  «        \  }}|                     ¦   «         }t          |dd¦  «        }|€t          d|› d�¦  «        ‚t	          d¦  «        |t	          d¦  «        |                      |¦  «        t	          d¦  «        t	          d	¦  «        t	          d
¦  «        t	          d¦  «        i}|d         }	t          |	t          j        ¦  «        rŒt          |	¦  «        dk    r|r|	d                              ¦   «         }	n\t          j
        |d                     d„ |	D ¦   «         ¦  «        ¬¦  «        }
|
                     ¦   «          |                      |
¦  «        S t          |	t          j
        ¦  «        sJ ‚d}|r	 |	d         }n# t          $ r Y nw xY w|�A|                      |¦  «        |t	          d¦  «        <   t          j
        ||	j        ¬¦  «        }
nt          j
        ||	j        ¬¦  «        }
|                      |
¦  «        S )a  
        Import a page content stream from some other
        :class:`~.rw_common.PdfHandler` into the current one as a form XObject.

        :param other:
            A :class:`~.rw_common.PdfHandler`
        :param page_ix:
            Index of the page to copy (default: 0)
        :param inherit_filters:
            Inherit the content stream's filters, if present.
        :return:
            An :class:`~.generic.IndirectObject` referring to the page object
            as added to the current reader.
        ú	/MediaBoxr+  NzPage z does not have a /MediaBoxr.   r/   r0   r1   r2   r3   ú	/Contentsr"   r   r?   c              3   óH   K  — | ]}|                      ¦   «         j        V — Œd S ri   )rm   Údata)Ú.0Úpartial_streams     r>   ú	<genexpr>z;BasePdfFileWriter.import_page_as_xobject.<locals>.<genexpr>J  sE   è è € ð )ð )à*ð '×1Ò1Ñ3Ô3Ô8ð)ð )ð )ð )ð )ð )r?   r4   z/Filter©Úencoded_data)Úfind_page_for_modificationrm   r   r   r   rG  rP   r   r8   Úlenr7   Újoinr¼   rS   re   rS  rN  )r_   rI  Úpage_ixÚinherit_filtersr#  r+   r%  ÚmbÚstream_dictr*   ÚresultÚfilterss               r>   Úimport_page_as_xobjectz(BasePdfFileWriter.import_page_as_xobject  sO  € ð" $×>Ò>¸wÑGÔGÑˆ�)Ø×&Ò&Ñ(Ô(ˆõ *¨(°KÀÑKÔKˆØˆ:ÝÐJ wÐJÐJÐJÑKÔKÐKõ �WÑÔ˜rÝ�\Ñ"Ô" D×$6Ò$6°yÑ$AÔ$AÝ�WÑÔ�x¨
Ñ3Ô3Ý�ZÑ Ô ¥(¨7Ñ"3Ô"3ð	
ˆð " +Ô.ˆõ �n¥gÔ&9Ñ:Ô:ð 	/Ý�>Ñ"Ô" aÒ'Ð'¨OÐ'Ø!/°Ô!2×!=Ò!=Ñ!?Ô!?��õ
 !Ô-ØØ #§¢ð )ð )à.<ð)ñ )ô )ñ !ô !ðñ ô �ð —’Ñ!Ô!Ð!Ø—’ vÑ.Ô.Ð.Ý˜.­'Ô*>Ñ?Ô?Ð?Ð?Ð?ØˆØð 	ðà(¨Ô3��øÝð ð ð Ø�ðøøøð ÐØ/3×/AÒ/AÀ'Ñ/JÔ/JˆK� Ñ+Ô+Ñ,ÝÔ)Ø¨.Ô*Eðñ ô ˆFˆFõ Ô)Ø¨Ô)<ðñ ô ˆFð �Š˜vÑ&Ô&Ð&s   ÆF Æ
F#Æ"F#c                 ób  — |                       |¦  «        \  }}|                     ¦   «         }|                     d¦  «        }t          |t          j        ¦  «        rö|                     ¦   «         }	t          |	t          j        ¦  «        rF|                      |¦  «         |r|	                     d|¦  «         �n-|	 	                    |¦  «         �nt          |	t          j
        ¦  «        rY|r||gn||g}
t	          j        |
¦  «        }	|                      |	¦  «        |t          d¦  «        <   |                      |¦  «         n£t          d¦  «        ‚t          |t          j        ¦  «        rk|}	|r|	                     d|¦  «         n|	 	                    |¦  «         |                      |	¦  «        |t          d¦  «        <   |                      |¦  «         nt          d¦  «        ‚|€dS t          |t          j        ¦  «        r\|                     ¦   «         }t          |t          j        ¦  «        sJ ‚|                      ||¦  «        r|                      |¦  «         nOt	          j        |¦  «        }|                      |¦  «        |t          d¦  «        <   |                      ||¦  «         |S )ae  Append an indirect stream object to a page in a PDF as a content
        stream.

        :param page_ix:
            Index of the page to modify.
            The first page has index `0`.
        :param stream_ref:
            :class:`~.generic.IndirectObject` reference to the stream
            object to add.
        :param resources:
            Resource dictionary containing resources to add to the page's
            existing resource dictionary.
        :param prepend:
            Prepend the content stream to the list of content streams, as
            opposed to appending it to the end.
            This has the effect of causing the stream to be rendered
            underneath the already existing content on the page.
        :return:
            An :class:`~.generic.IndirectObject` reference to the page object
            that was modified.
        rL  r   z"Unexpected type for page /ContentsNr/   )rT  rm   r˜   rP   r   rQ   r8   r†   r2  r£   r7   rS   r   r   r6   Úmerge_resources)r_   rW  rË   r+   ÚprependÚpage_obj_refÚres_refr%  Úcontents_refÚcontentsÚnewÚorig_resource_dicts               r>   Úadd_stream_to_pagez$BasePdfFileWriter.add_stream_to_pageg  s´  € ð2 !%× ?Ò ?ÀÑ HÔ HÑˆ�gà×*Ò*Ñ,Ô,ˆà×'Ò'¨Ñ4Ô4ˆå�l¥GÔ$:Ñ;Ô;ð "	AØ#×.Ò.Ñ0Ô0ˆHÝ˜(¥GÔ$7Ñ8Ô8ð Eð × Ò  Ñ.Ô.Ð.Øð 0Ø—O’O A zÑ2Ô2Ð2Ñ2à—O’O JÑ/Ô/Ð/Ñ/Ý˜H¥gÔ&:Ñ;Ô;ð Eð
 ð4�Z Ð.Ð.à&¨
Ð3ð õ
 #Ô.¨sÑ3Ô3�Ø26·/²/À(Ñ2KÔ2K�� +Ñ.Ô.Ñ/à× Ò  Ñ.Ô.Ð.Ð.åÐCÑDÔDÐDÝ˜¥gÔ&9Ñ:Ô:ð 
	Aà#ˆHØð ,Ø—’  :Ñ.Ô.Ð.Ð.à—’ 
Ñ+Ô+Ð+Ø.2¯oªo¸hÑ.GÔ.GˆH•X˜kÑ*Ô*Ñ+Ø×Ò˜\Ñ*Ô*Ð*Ð*åÐ?Ñ@Ô@Ð@àÐØˆFå�g�wÔ5Ñ6Ô6ð 	@à!(×!3Ò!3Ñ!5Ô!5ÐÝÐ0µ'Ô2JÑKÔKÐKÐKÐKØ×#Ò#Ð$6¸	ÑBÔBð *Ø× Ò  Ñ)Ô)Ð)øõ ")Ô!9¸'Ñ!BÔ!BÐØ/3¯ªØ"ñ0ô 0ˆH•X˜lÑ+Ô+Ñ,ð × Ò Ð!3°YÑ?Ô?Ð?àÐr?   Ú	orig_dictÚnew_dictc           	      ó~  ‡	— d}|                      ¦   «         D �]#\  }}	 |                     |¦  «        }n# t          $ r
 d}|||<   Y Œ0w xY wt          |t          j        ¦  «        r*|                     ¦   «         Š	|                      |¦  «         n|Š	d}t          ‰	t          j        ¦  «        r:|dk    r4‰	 	                    ˆ	fd„|                     ¦   «         D ¦   «         ¦  «         ŒÐt          ‰	t          j
        ¦  «        r9|                      ¦   «         D ]$\  }}|‰	v rt          d|›d|›d�¦  «        ‚|‰	|<   Œ%�Œ%|S )a  
        Update an existing resource dictionary object with data from another
        one. Returns ``True`` if the original dict object was modified directly.

        The caller is responsible for avoiding name conflicts with existing
        resources.
        FTz/ProcSetc              3   óX   •K  — | ]$}t          |t          j        ¦  «        r|‰v¯ |V — Œ%d S ri   )rP   r   Ú
NameObject)rO  ÚxÚ
orig_values     €r>   rQ  z4BasePdfFileWriter.merge_resources.<locals>.<genexpr>à  sQ   øè è € ð "ð "àÝ! !¥WÔ%7Ñ8Ô8ð"ð >?ÀjÐ=PÐ=Pð à=PÐ=PÐ=PÐ=Pð"ð "r?   z$Naming conflict in resource of type z: key z occurs in both.)Úitemsr˜   re   rP   r   rQ   rm   r†   r8   Úextendr6   r   )
r_   rh  ri  Úupdate_neededrx   ry   Úorig_value_refÚkey_Úvalue_rn  s
            @r>   r_  z!BasePdfFileWriter.merge_resources¿  s£  ø€ ð ˆØ"Ÿ.š.Ñ*Ô*ð 	.ñ 	.‰JˆC�ðØ!*×!2Ò!2°3Ñ!7Ô!7��øÝð ð ð Ø $�Ø!&�	˜#‘Ø�ðøøøõ
 ˜.­'Ô*@ÑAÔAð %Ø+×6Ò6Ñ8Ô8�
Ø× Ò  Ñ0Ô0Ð0Ð0à+�
Ø $�õ ˜:¥wÔ':Ñ;Ô;ð.à˜:Ò%Ð%à×!Ò!ð "ð "ð "ð "à"×-Ò-Ñ/Ô/ð"ñ "ô "ñ ô ð ð õ
 ˜J­Ô(@ÑAÔAð .Ø$)§K¢K¡M¤Mð .ð .‘L�D˜&Ø˜zÐ)Ð)Ý&˜hà8;¸¸¸T¸T¸TðCñô ð ð (.�J˜tÑ$Ð$ùàÐs   Ÿ5µA	ÁA	)r   T)F)NN)T)r  ri   rH   )>r•   Ú
__module__Ú__qualname__Ú__doc__rr   rî   Ú__annotations__r	   r   rQ   r6   r8   r—   ra   Ústrrg   Úpropertyr   rk   rp   rt   r   rw   rl  Ú	PdfObjectr   r   ÚbytesrE   r×   r†   r‰   rŒ   rŽ   r   r®   rm   r¶   r   rS   r¾   rÀ   r   rÇ   rÌ   r   rÜ   rã   rá   r  r  r  rÕ   r  r  r(  r?  rG  r   r]  rg  r_  r…   r?   r>   r%   r%   c   s	  € € € € € € Ø%Ð%à€NØ;àÐÐÑðð Ø!ð&%ð &%à�GÔ*¨GÔ,DÐDÔEð&%ð �GÔ*¨GÔ,DÀdÐJÔKð&%ð Ô(ð	&%ð
 ð&%ð ð&%ð &%ð &%ð &%ðP	¸#ð 	ð 	ð 	ð 	ð ðÐ/ð ð ð ñ „Xðð ð
*Ð$4ð 
*ð 
*ð 
*ñ „Xð
*ð*ð *ð *ðà�GÔ*¨GÔ,DÀdÐJÔKðð 
�'Ô(Ô	)ðð ð ð ð""ØÔ%ð"Ø.5Ô.?ð"ð "ð "ð "ð& ðB˜U 5¨% <Ô0ð Bð Bð Bñ „XðBðØ˜WÔ.°Ô0FÐFÔGðð ð ð ð GÔ$5ð ð ð ð ð ð$˜'Ô+ð $ð $ð $ñ „Xð$ðð ð ða*Ð&8ð a*ð a*ð a*ð a*ðF ð  °$ð  ð  ð  ð  ð&6 gÔ&<ð 6ð 6ð 6ð 6ð, EIð-6ð -6Ø'¨Ô5ð-6à	Ô	ð-6ð -6ð -6ð -6ð^ð ð ð ð "ð "ð "ð/¨?ð /ð /ð /ð /ð0¨ð 0ð 0ð 0ð 0ð(¸<ð (ð (ð (ð (ð(ð ð ð:ð :ð :ðx	5ð 	5ð 	5ð ð˜gÔ6ð ð ð ñ „Xðð
 ð
ð 
ñ „Xð
ð ð  ð  ð 
ð 
¨cð 
ð 
ð 
ð 
ð(Gð (G¨$ð (Gð (Gð (Gð (GðT!ð !ð !ð:/ð /ð /ð /ðd LPð"+ð "+ØÔ$ð"+Ø2:¸<Ô2Hð"+à	Ô	ð"+ð "+ð "+ð "+ðJ =AðE'ð E'ØðE'ð E'ð E'ð E'ðR <AðUð Uð Uð Uðp/àÔ+ð/ð Ô*ð/ð 
ð	/ð /ð /ð /ð /ð /r?   r%   c                   ó$   ‡ — e Zd ZdZdˆ fd„	Zˆ xZS )r&   zySubclass of :class:`~.generic.DictionaryObject` that handles some of the
    initialisation boilerplate for page objects.Nc                 óþ  •— |pt          j        ¦   «         }t          |t          ¦  «        rrt	          t          t          t           j        ¦  «        |¦  «        ¦  «        st          d¦  «        ‚t          |t           j	        ¦  «        st          j	        |¦  «        }n)t          |t           j        ¦  «        st          d¦  «        ‚t          |¦  «        dk    rt          d¦  «        ‚t          ¦   «                              t          d¦  «        t          d¦  «        t          d¦  «        t          j	        t          t           j        |¦  «        ¦  «        t          d¦  «        |t          d	¦  «        |i¦  «         d S )
Nz2Contents array must consist of indirect referencesz9Contents must be either an indirect reference or an arrayé   z(Media box must consist of 4 coordinates.r0   r*  rK  r/   rL  )r   r6   rP   r9   Úallr:   r   rQ   r   r8   rU  rš   Úsuperra   r   r;   )r_   rd  Ú	media_boxr+   Ú	__class__s       €r>   ra   zPageObject.__init__ø  s\  ø€ ØÐ;¥Ô!9Ñ!;Ô!;ˆ	å�h¥Ñ%Ô%ð 
	Ý•s�=­Ô)?Ñ@Ô@À(ÑKÔKÑLÔLð Ý#ØHñô ð õ ˜h­Ô(;Ñ<Ô<ð 9Ý"Ô.¨xÑ8Ô8�øÝ˜H¥gÔ&<Ñ=Ô=ð 	ÝØKñô ð õ ˆy‰>Œ>˜QÒÐÝÐGÑHÔHÐHÝ‰Œ×Òå˜Ñ!Ô!¥8¨GÑ#4Ô#4Ý˜Ñ%Ô%¥wÔ':Ý�Ô+¨YÑ7Ô7ñ(ô (õ ˜Ñ&Ô&¨	Ý˜Ñ%Ô% xðñ		
ô 		
ð 		
ð 		
ð 		
r?   ri   )r•   ru  rv  rw  ra   Ú__classcell__©rƒ  s   @r>   r&   r&   ñ  sG   ø€ € € € € ð4ð 4ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r?   r&   c                   ó‚   ‡ — e Zd ZdZdˆ fd„	Zd„ Zdd„Zdeej	                 fd„Z
d	ej        d
ej        fd„Zˆ fd„Zˆ xZS )r'   zClass to write new PDF files.TNc           	      ó¸  •— t          j        t          d¦  «        t          d¦  «        i¦  «        }t          j        t	          j        d¦  «        ¦  «        }t          j        t	          j        d¦  «        ¦  «        }t          j        ||g¦  «        }i | _        t          ¦   «          	                    ||||¬¦  «         |r˜t          j        t          d¦  «        t          d¦  «        t          d¦  «        t          j
        d¦  «        t          d¦  «        t          j        ¦   «         i¦  «        }|                      |¦  «        |t          d¦  «        <   d S d S )	Nr0   z/Catalogé   )rB   r,  r-  r   r/  )r   r6   r   ÚByteStringObjectÚosÚurandomr8   Ú_custom_trailer_entriesr�  ra   r  rS   )
r_   rB   Úinit_page_treerD   rC   Úid1Úid2Úid_objÚpagesrƒ  s
            €r>   ra   zPdfFileWriter.__init__  s0  ø€ åÔ'å˜Ñ!Ô!¥8¨JÑ#7Ô#7ðñ
ô 
ˆõ Ô&¥r¤z°"¡~¤~Ñ6Ô6ˆÝÔ&¥r¤z°"¡~¤~Ñ6Ô6ˆÝÔ$ c¨3 ZÑ0Ô0ˆà')ˆÔ$Ý‰Œ×Ò˜˜t V¸,ÐÑGÔGÐGàð 		>ÝÔ,å˜WÑ%Ô%¥x°Ñ'9Ô'9Ý˜XÑ&Ô&­Ô(<¸QÑ(?Ô(?Ý˜WÑ%Ô%¥wÔ':Ñ'<Ô'<ðñô ˆEð (,§¢°uÑ'=Ô'=ˆD•˜(Ñ#Ô#Ñ$Ð$Ð$ð		>ð 		>r?   c                 ó¢   — | j         \  }}|                     d|› d|› d�                     d¦  «        ¦  «         |                     d¦  «         d S )Nz%PDF-ú.ú
rÐ   s   %Â¥Â±Ã«
)rr   rÕ   rÖ   )r_   r½   ÚmajorÚminors       r>   rÀ   zPdfFileWriter._write_header2  s]   € ØÔ*‰ˆˆuØ�ŠÐ.˜UÐ.Ð. UÐ.Ð.Ð.×5Ò5°gÑ>Ô>Ñ?Ô?Ð?ð 	�ŠÐ3Ñ4Ô4Ð4Ð4Ð4r?   c                 óV   — t          j        ||fi |¤Ž}|                      |¦  «         dS )a>  
        Mark this document to be encrypted with PDF 2.0 encryption (AES-256).

        .. caution::
            While pyHanko supports legacy PDF encryption as well, the API
            to create new documents using outdated encryption is left
            largely undocumented on purpose to discourage its use.

            This caveat does *not* apply to incremental updates added to
            existing documents.

        .. danger::
            The PDF 2.0 standard mandates AES-256 in CBC mode, and also includes
            12 bytes of known plaintext by design. This implies that a
            sufficiently knowledgeable attacker can inject arbitrary content
            into your encrypted files without knowledge of the password.

            Adding a digital signature to the encrypted document is **not**
            a foolproof way to deal with this either, since most viewers will
            still allow the document to be opened before signatures are
            validated, and therefore end users are still exposed to potentially
            malicious content.

            Until the standard supports authenticated encryption schemes, you
            should **never** rely on its encryption provisions if tampering
            is a concern.


        :param owner_pass:
            The desired owner password.
        :param user_pass:
            The desired user password (defaults to the owner password
            if not specified)
        :param kwargs:
            Other keyword arguments to be passed to
            :meth:`.StandardSecurityHandler.build_from_pw`.
        N)r   Úbuild_from_pwrÇ   )r_   Ú
owner_passÚ	user_passÚkwargsrÁ   s        r>   ÚencryptzPdfFileWriter.encrypt9  sE   € õL %Ô2Ø˜	ð
ð 
Ø%+ð
ð 
ˆð 	×%Ò% bÑ)Ô)Ð)Ð)Ð)r?   Ú
recipientsc                 ób   — d| _         t          j        |fi |¤Ž}|                      |¦  «         dS )a=  
        Mark this document to be encrypted with PDF 2.0 public key encryption.
        The certificates passed in should be RSA certificates.

        PyHanko defaults to AES-256 to encrypt the actual file contents.
        The seed used to derive the file encryption key is also encrypted
        using AES-256 and bundled in a CMS EnvelopedData object.
        The envelope key is then encrypted separately for each recipient, using
        their respective public keys.

        .. caution::
            The caveats for :meth:`encrypt` also apply here.

        :param recipients:
            Certificates of the recipients that should be able to decrypt
            the document.
        :param kwargs:
            Other keyword arguments to be passed to
            :meth:`.PubKeySecurityHandler.build_from_certs`.
        rç   N)rr   r   Úbuild_from_certsrÇ   )r_   r�  r›  rÁ   s       r>   Úencrypt_pubkeyzPdfFileWriter.encrypt_pubkeyd  s>   € ð* %ˆÔÝ"Ô3°JÐIÐIÀ&ÐIÐIˆØ×%Ò% bÑ)Ô)Ð)Ð)Ð)r?   rx   ry   c                 ó   — || j         |<   dS )r{   N)rŒ  r~   s      r>   r   z&PdfFileWriter.set_custom_trailer_entry}  s   € ð" -2ˆÔ$ SÑ)Ð)Ð)r?   c                 ó~   •— |                      | j        ¦  «         t          ¦   «                              |¦  «         d S ri   )ÚupdaterŒ  r�  r  )r_   r   rƒ  s     €r>   r  zPdfFileWriter._populate_trailer�  s6   ø€ à�Š�tÔ3Ñ4Ô4Ð4Ý‰Œ×!Ò! 'Ñ*Ô*Ð*Ð*Ð*r?   )TTNri   )r•   ru  rv  rw  ra   rÀ   rœ  r   r   ÚCertificater   r   rl  r{  r   r  r„  r…  s   @r>   r'   r'     sÍ   ø€ € € € € Ø'Ð'ð>ð >ð >ð >ð >ð >ð45ð 5ð 5ð)*ð )*ð )*ð )*ðV*¨¨dÔ.>Ô)?ð *ð *ð *ð *ð22ØÔ%ð2Ø.5Ô.?ð2ð 2ð 2ð 2ð&+ð +ð +ð +ð +ð +ð +ð +ð +r?   r'   c            	       óº   — e Zd Zdededeej        ej        f         de	e
         fd„Zdej        dej        fd„Zdej        fd	„Zd
ej        dej        fd„Zd„ ZdS )rD  rA  rB  rC  r·   c                 óL   — || _         || _        || _        g | _        || _        d S ri   )rA  rB  r·   Úqueued_referencesrC  )r_   rA  rB  rC  r·   s        r>   ra   z_ObjectImporter.__init__—  s6   € ð ˆŒØˆŒØ$ˆŒð ð 	Ôð +ˆÔÐÐr?   r‡   r,   c                 óX  — |                       |¦  «        }| j        r�| j                             ¦   «         \  }}|                     ¦   «         }|                       |¦  «        }t	          |t
          ¦  «        rd }n| j        }| j                             |||j	        ¬¦  «         | j        °�|S )N)r·   rX   )
Ú_ingestr§  Úpoprm   rP   r   r·   rB  rS   rX   )r_   r‡   r[  Ú
source_refÚ
target_refÚ
source_objÚimportedr·   s           r>   rG  z_ObjectImporter.import_object¦  s»   € Ø—’˜cÑ"Ô"ˆàÔ$ð 	Ø%)Ô%;×%?Ò%?Ñ%AÔ%AÑ"ˆJ˜
Ø#×.Ò.Ñ0Ô0ˆJØ—|’| JÑ/Ô/ˆHõ ˜(Õ$7Ñ8Ô8ð -Ø!�
�
à!œ_�
ð ŒK×"Ò"Ø Z°zÔ7Gð #ñ ô ð ð Ô$ð 	ð" ˆr?   c                 óz  ‡ — t          |t          j        ¦  «        r|j        }t          |t          j        ¦  «        r‰                      |j        ¦  «        S t          |t          j        ¦  «        �rˆ fd„|                     ¦   «         D ¦   «         }	 | 	                    d¦  «        }| 
                    ¦   «                              |d¬¦  «         ‰                      |¦  «        |d<   n# t          t          f$ r Y nw xY wt          |t          j        ¦  «        rRt          j        }	 ddlm} t          ||j        ¦  «        r|j        }n# t$          $ r Y nw xY w |||j        ¬¦  «        S t          j        |¦  «        S t          |t          j        ¦  «        r t          j        ˆ fd„|D ¦   «         ¦  «        S |S )	Nc                 óN   •— i | ]!\  }}|d k    ¯|‰                      |¦  «        “Œ"S )ré   ©r©  ©rO  ÚkÚvr_   s      €r>   ú
<dictcomp>z+_ObjectImporter._ingest.<locals>.<dictcomp>Â  s:   ø€ ð ð ð Ù'+ q¨!¸aÀ;Ò>NÐ>N��4—<’< ‘?”?Ð>NÐ>NÐ>Nr?   ré   T)r¯   r   rå   rR  c              3   óB   •K  — | ]}‰                      |¦  «        V — Œd S ri   r±  )rO  r´  r_   s     €r>   rQ  z*_ObjectImporter._ingest.<locals>.<genexpr>ä  s-   øè è € Ð&DÐ&D¸1 t§|¢|°A¡¤Ð&DÐ&DÐ&DÐ&DÐ&DÐ&Dr?   )rP   r   ÚDecryptedObjectProxyÚ	decryptedrQ   Úprocess_referencer‹   r6   ro  Úget_value_as_referencerF  rm   re   r   r7   rì   ræ   rò   rð   rS  r8   )r_   r‡   Úraw_dictÚmeta_refÚstm_clsræ   s   `     r>   r©  z_ObjectImporter._ingest¼  s÷  ø€ Ý�c�7Ô7Ñ8Ô8ð 	 Ø”-ˆCÝ�c�7Ô1Ñ2Ô2ð '	Ø×)Ò)¨#¬-Ñ8Ô8Ð8Ý˜�WÔ5Ñ6Ô6ñ %	ðð ð ð Ø/2¯yªy©{¬{ðñ ô ˆHð
à×5Ò5°kÑBÔB�à×(Ò(Ñ*Ô*×5Ò5Ø°ð 6ñ ô ð ð )-×(>Ò(>¸xÑ(HÔ(H�˜Ñ%Ð%øÝÕ4Ð5ð ð ð Ø�ðøøøõ ˜#�wÔ3Ñ4Ô4ð :Ý!Ô.�ðàBÐBÐBÐBÐBÐBå! # wÔ'=Ñ>Ô>ð 9Ø")Ô"8˜øøÝ"ð ð ð Ø�Dðøøøð �w˜x°cÔ6FÐGÑGÔGÐGåÔ/°Ñ9Ô9Ð9Ý˜�WÔ0Ñ1Ô1ð 	ÝÔ&Ð&DÐ&DÐ&DÐ&DÀÐ&DÑ&DÔ&DÑDÔDÐDàˆJs%   ÂAC* Ã*C>Ã=C>Ä("E Å
EÅErÊ   c                 óÊ   — 	 | j         |         S # t          $ rI | j                             ¦   «         }|| j         |<   | j                             ||j        f¦  «         |cY S w xY wri   )rC  re   rB  r¶   r§  r£   r‹   )r_   rÊ   Únew_idos      r>   r¹  z!_ObjectImporter.process_referenceè  sx   € ð	ØÔ% cÔ*Ð*øÝð 	ð 	ð 	à”k×6Ò6Ñ8Ô8ˆGØ&-ˆDÔ˜sÑ#ØÔ"×)Ò)¨3°Ô0AÐ*BÑCÔCÐCØˆNˆNˆNð	øøøs   ‚ �AA"Á!A"c                 ó  ‡ — ddl m} d„  |‰ j        d¬¦  «        D ¦   «         }|rt                               d¦  «         |D ]È}|                     ¦   «         }t          |t          j        ¦  «        sJ ‚ˆ fd„| 	                    ¦   «         D ¦   «         }t          j
        |                     dt          j        j        ¬	¦  «        j        ¦  «        |d<   ‰ j                             t          j        |¦  «        d ¬
¦  «        ‰ j        |<   ŒÉd S )Nrè   )Úenumerate_sig_fieldsc                 óX   — g | ]'\  }}}t          |t          j        ¦  «        ¯ |j        ‘Œ(S r…   )rP   r   rQ   r‹   )rO  Úfq_nameÚfield_valueÚ	field_refs       r>   ú
<listcomp>z=_ObjectImporter.preprocess_signature_data.<locals>.<listcomp>ù  sF   € ð 
ð 
ð 
á/�˜ iõ ˜+¥wÔ'=Ñ>Ô>ð
ØÔ!ð
ð 
ð 
r?   T)Úfilled_statuszZSource document contains filled signature fields--the copy operation will invalidate them.c                 óN   •— i | ]!\  }}|d k    ¯|‰                      |¦  «        “Œ"S )rL  r±  r²  s      €r>   rµ  z=_ObjectImporter.preprocess_signature_data.<locals>.<dictcomp>	  s>   ø€ ð ð ð á�A�qØ˜Ò#Ð#ð �4—<’< ‘?”?à#Ð#Ð#r?   rL  )Údecrypt)r·   )Úsign.fieldsrÁ  rA  ÚloggerÚwarningrm   rP   r   r6   ro  r‰  r˜   ÚEncryptedObjAccessÚRAWr�   rB  rS   rC  )r_   rÁ  Úsignature_dict_refsrÊ   Úsig_dictr»  s   `     r>   Úpreprocess_signature_dataz)_ObjectImporter.preprocess_signature_dataò  sb  ø€ ð
 	7Ð6Ð6Ð6Ð6Ð6ð
ð 
à3GÐ3GØ”¨4ð4ñ 4ô 4ð
ñ 
ô 
Ðð ð 	Ý�NŠNð2ñô ð ð 'ð 	ð 	ˆCØ—~’~Ñ'Ô'ˆHÝ˜h­Ô(@ÑAÔAÐAÐAÐAðð ð ð à$ŸNšNÑ,Ô,ðñ ô ˆHõ
 %,Ô$<Ø× Ò Ø­Ô)CÔ)Gð !ñ ô ä ñ%ô %ˆH�[Ñ!ð
 '+¤k×&<Ò&<ÝÔ(¨Ñ2Ô2Øð '=ñ 'ô 'ˆDÔ˜sÑ#Ð#ð	ð 	r?   N)r•   ru  rv  r   r%   r   r   r×   rQ   r   r   ra   r{  rG  r©  r¹  rÑ  r…   r?   r>   rD  rD  –  sá   € € € € € ð+àð+ð "ð+ð ˜GÔ-¨wÔ/EÐEÔFð	+ð
 ˜\Ô*ð+ð +ð +ð +ð Ô!2ð °wÔ7Hð ð ð ð ð,*˜7Ô,ð *ð *ð *ð *ðX WÔ%6ð ¸7Ô;Lð ð ð ð ð$ð $ð $ð $ð $r?   rD  Úinput_handlerÚwriter_kwargsc           
      ó8  — |pi }|                      dd¦  «         t          d	ddi|¤Ž}| j        }|j        }t          | ||t	          j        |j        |j        |¬¦  «        id¬¦  «        }|                     ¦   «          | 	                    | j
        ¦  «        }|j        |j        f}||j        |<   d|vre	 | j        d         }n# t          $ r d}Y nw xY w|�Bt          | |i d¬¦  «        }| 	                    |¦  «        }	|                     |	¦  «        |_        |S )
a�  
    Copy all objects in a given PDF handler into a new :class:`.PdfFileWriter`.
    This operation will attempt to preserve the document catalog
    of the original ``input_handler``.

    Very roughly, calling this function and then immediately invoking
    :meth:`~.BasePdfFileWriter.write` on the resulting writer should result
    in an equivalent document as far as presentation is concerned.
    As a general rule, behaviour that is controlled from outside the document
    catalog (e.g. encryption) or that requires byte-for-byte equivalence with
    the original (e.g. digital signatures) will not survive this translation.


    :param input_handler:
        :class:`.PdfHandler` to source objects from.
    :param writer_kwargs:
        Keyword arguments to pass to the writer.
    :return:
        New :class:`.PdfFileWriter` containing all objects from the input
        handler.
    rB   Fr�  )rX   rY   r±   N)rA  rB  rC  r·   rD   rþ   r…   )Ú
setdefaultr'   rŒ   rD  r   rQ   rX   rY   rÑ  rG  rC   rI   r  re   rS   rZ   )
rÒ  rÓ  ÚwÚinput_root_refÚoutput_root_refrH  Únew_root_dictr©   rú   Úimported_infos
             r>   r(   r(     sv  € ð2 "Ð' R€MØ×Ò˜^¨UÑ3Ô3Ð3õ 	Ð<Ð< UÐ<¨mÐ<Ð<€AØ"Ô+€NØ”j€Oõ ØØà�GÔ2Ø%Ô+Ø*Ô5Øðñ ô ð
ð ðñ ô €Hð ×&Ò&Ñ(Ô(Ð(Ø×*Ò*¨=Ô+=Ñ>Ô>€Mà
Ô
$ oÔ&;Ð	<€BØ!€A„Iˆb�Mà�]Ð"Ð"ð	ð
 &Ô2°7Ô;ˆIˆIøÝð 	ð 	ð 	ØˆIˆIˆIð	øøøàÐ Ý&Ø$ØØ Øð	ñ ô ˆHð %×2Ò2°9Ñ=Ô=ˆMØ—l’l =Ñ1Ô1ˆAŒGà€Hs   Â6C ÃCÃCri   )>rw  ÚloggingrŠ  Útypingr   r   r   r   r   r   r	   r
   Ú
asn1cryptor   Úpyhanko.pdf_utilsr   r  r   r   r   Úpyhanko.pdf_utils.extensionsr   r   Úpyhanko.pdf_utils.genericr   Úpyhanko.pdf_utils.metadata.infor   r   Ú pyhanko.pdf_utils.metadata.modelr   Úpyhanko.pdf_utils.miscr   r   r   r   r   Úpyhanko.pdf_utils.rw_commonr   r   Úpyhanko.pdf_utils.xrefr   r   r   r    r!   ÚTYPE_CHECKINGrd   r$   Ú__all__Ú	getLoggerr•   rË  r|  r6   r7   r)   r%   r&   r'   rD  Údictr(   r…   r?   r>   ú<module>rê     s}  ððð ð €€€Ø 	€	€	€	Ø €€€Ø JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ Jà Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð /Ð .Ð .Ð .Ð .Ð .ðð ð ð ð ð ð ð ð >Ð =Ð =Ð =Ð =Ð =ðð ð ð ð ð ð ð ð ð ð ð ð ð ð QÐ PÐ PÐ PÐ PÐ PÐ PÐ Pðð ð ð ð ð ð ð ð ð ð ð ð ð ð 
Ôð /Ø.Ð.Ð.Ð.Ð.Ð.ðð ð €ð 
ˆÔ	˜8Ñ	$Ô	$€ð 59ð	$ð $Øð$ð ˜Ô0Ô1ð	$ð
 Ôð$ð $ð $ð $ðNKð Kð Kð Kð K˜
ñ Kô Kð Kð\!
ð !
ð !
ð !
ð !
�Ô)ñ !
ô !
ð !
ðH~+ð ~+ð ~+ð ~+ð ~+Ð%ñ ~+ô ~+ð ~+ðB@ð @ð @ð @ð @ñ @ô @ð @ðH @DðJð JØðJØ.6°t¬nðJàðJð Jð Jð Jð Jð Jr?   