Ë
    £| k"š  ã                  óÂ  — d Z ddlmZ ddlZddlZddlZddlZddlmZ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mZmZmZmZmZ dd	l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'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z. ddl/m0Z0  ejb                  e2«      Z3dZ4e G d„ d«      «       Z5e G d„ d«      «       Z6dd„Z7d d„Z8ddœd!d„Z9d"d„Z:d"d„Z;ddœd#d„Z<d$d„Z=ddœd#d„Z>d%d„Z?y)&zi/repost: copy a whole channel in order (links swapped on the way), then remove the old posts. Owner only.é    )ÚannotationsN)Ú	dataclassÚfield)ÚButtonÚerrorsé   )Úpicker)
ÚCtxÚ	UserErrorÚcmdÚedit_callback_messageÚguardÚon_cbÚpurge_pendingÚrequire_ownerÚsayÚshow)ÚCrossResultÚprogress_textÚrelink_after_repostÚreport_linesÚrestore_after_undo)Únormalize_username)Úprofile_lines)ÚRepostOptionsÚ
RepostPlanÚdelete_copiesÚplan_repostÚ
run_repostÚsaved_lookup)ÚescÚ
get_rightsÚ	post_link)Údelete_problem_textax  Usage: <code>/repost @old @new</code>
Copies every post of a channel, in order, to the end of the channel and swaps the username inside t.me links on the way. Leave out the usernames to copy without changing links. You pick the channel with buttons afterwards.
Options: <code>--last 5</code> (trial: only the newest 5 post ids), <code>--posts</code> (also change t.me/old/123 post links), <code>--no-typed</code>.

Links to the old posts - in this channel and in all your other connected channels - are pointed at the copies afterwards.
Nothing is deleted by /repost itself: you decide about the old posts after checking the copies.c                  óV   — e Zd ZU dZded<   ded<    eej                  ¬«      Zded<   y	)
ÚRepostChoicez;/repost was typed; the owner still has to pick the channel.ÚintÚuserr   Úopts©Údefault_factoryÚfloatÚcreatedN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   ÚtimeÚ	monotonicr-   © ó    ú/app/app/handlers/repost.pyr&   r&   $   s#   … áEà
ƒIØ
ÓÙ¨4¯>©>Ô:€GˆUÔ:r6   r&   c                  ó”   — e Zd ZU ded<   ded<   ded<   dZded<   d	Zd
ed<   d	Zd
ed<   dZded<    ee	j                  ¬«      Zded<   y)Ú	RepostJobr'   r(   ÚobjectÚchr   r)   NÚplanFÚboolÚrunningÚstopÚ ÚstrÚmig_idr*   r,   r-   )r.   r/   r0   r2   r<   r>   r?   rB   r   r3   r4   r-   r5   r6   r7   r9   r9   -   sM   … à
ƒIØƒJØ
ÓØ€Dˆ&ÓØ€GˆTÓØ€Dˆ$ÓØ€FˆCÓÙ¨4¯>©>Ô:€GˆUÔ:r6   r9   c                ó  — | xs dj                  «       }d dd dœ}g }d}|t        |«      k  rÞ||   }|dk(  rt        d«      ‚|dk(  r`|dz   t        |«      k  rO||dz      j                  «       rt	        ||dz      «      dk  rt        d	«      ‚t	        ||dz      «      |d
<   |dz  }nU|dk(  rd|d<   |dz  }nE|dk(  rd|d<   |dz  }n5|j                  d«      rt        d|› �«      ‚|j                  |«       |dz  }|t        |«      k  rŒÞd x}}|rpt        |«      dk7  rt        d«      ‚t        |d   «      t        |d   «      }}|r|st        d«      ‚|j                  «       |j                  «       k(  rt        d«      ‚|||fS )Nr@   F)ÚlastÚpostsÚtypedr   z	--channelze/repost no longer takes --channel: send the command without it and pick the channel with the buttons.z--lasté   z+--last needs a number, for example --last 5rD   r   z--postsTrE   z
--no-typedrF   z--zUnknown option zHGive both usernames (@old @new), or none to copy without changing links.z<Usernames look like @name (letters, digits and underscores).z*The old and the new username are the same.)	ÚsplitÚlenÚ
ValueErrorÚisdigitr'   Ú
startswithÚappendr   Úlower)ÚrawÚtoksÚflagsÚposÚiÚtÚoldÚnews           r7   Úparse_repost_argsrW   9   sµ  € ØŠI�2×ÑÓ€DØ E°DÑ9€EØ€CØ	€AØ
Œc�$‹iŠ-Ø�‰GˆØ�ÒÜð  Eó  Fð  FØ�(Š]˜q 1™u¤s¨4£yÒ0Ø˜˜A™‘;×&Ñ&Ô(¬C°°Q¸±U±Ó,<¸qÒ,@Ü Ð!NÓOÐOÜ  Q¨¡U¡Ó,ˆE�&‰MØ�‰F‰AØ�)Š^Ø!ˆE�'‰NØ�‰F‰AØ�,ÒØ"ˆE�'‰NØ�‰F‰AØ�\‰\˜$ÔÜ˜¨q¨cÐ2Ó3Ð3à�J‰J�qŒMØ�‰FˆAð' Œc�$‹i‹-ð( Ð€Cˆ#Ù
Üˆs‹8�qŠ=ÜÐgÓhÐhÜ% c¨!¡fÓ-Ô/AÀ#ÀaÁ&Ó/IˆSˆÙ™#ÜÐ[Ó\Ð\Ø�9‰9‹;˜#Ÿ)™)›+Ò%ÜÐIÓJÐJØ��Uˆ?Ðr6   c                óf  — | j                   › d| j                  › d�}| j                  r|d| j                  › d�z  }| j                  r|d| j                  › d�z  }dt	        |«      › d�d| j
                  › d	| j                  › d
| j                  › d| j                  › d| j                  › d|› �g}| j                  r|j                  d| j                  › d�«       | j                  r|j                  d«       |j                  rr|j                  dt	        |j                  «      › dt	        |j                  «      › d| j                  › d| j                   › d| j"                  › d| j$                  › d�«       | j&                  r|j                  d| j&                  › d�«       |t)        | |«      z  }| j*                  r,|j                  d| j*                  › d| j,                  › d�«       |j                  d«       | j.                  r|j                  d| j.                  › d�«       | j0                  r|j                  d| j0                  › d�«       t3        dt5        | j7                  |«      dz  «      «      }|d d!d d"d#|› d$�d%gz  }| j8                  r|j                  d&«       d'j;                  |«      S )(Nz text, z mediaú, z poll(s)z otheru   ðŸ§± <b>Repost plan - z</b>z	Post ids Ú-z: <b>z posts</b> to copy (z messages, z album(s)) - õ   â€¢ uQ    service message(s) (like â€œpinned a messageâ€�) can't be copied and are skippedu(   â€¢ polls are copied without their votesu   â€¢ <code>@õ   </code> â†’ <code>@z</code> in z
 post(s): z button link(s), z hyperlink(s), z typed link(s)zH post(s) carry other bots' buttons (reactions...) - those are not copiedú link(s) in z† post(s) point at other posts of this channel: they are pointed at the new copies (a link to a post that doesn't exist stays as it is)u·   â€¢ afterwards every link to an old post - a hyperlink, a typed link or a button, in ANY of your connected channels - is pointed at the copy (the old posts themselves are not touched)zE post(s) answer another post: each copy answers the copy of that postut    pinned post(s): their copies are pinned at the end (the bot needs the â€œEdit messages of othersâ€� right for that)rG   é<   r@   a¢  <b>How:</b> posts without buttons, replies or links to change are copied by Telegram itself, so they stay exactly as they are. Posts with buttons, links to change or a reply are posted again with their text, formatting, media and buttons in one go, and each one is read back to make sure its buttons are really there. Copies go to the end of the channel silently, in the original order, and are registered in My posts.zQ<b>Not kept:</b> original dates, view counts, reactions, comments and poll votes.zTime: about z1 min. Please don't post in the channel meanwhile.z'<b>Nothing is deleted in this step.</b>z6Trial run: afterwards you can remove the copies again.Ú
)ÚtextÚmediaÚpollsÚotherr!   ÚfirstrD   ÚunitsÚmessagesÚalbumsÚservicerM   ÚswapsrU   rV   Ú
link_postsÚ	n_buttonsÚn_linksÚn_typedÚdropped_postsÚheld_plan_linesÚ
post_linksÚpost_link_postsÚrepliesÚpinnedÚmaxÚroundÚeta_secondsÚpartialÚjoin)ÚpÚoÚtitleÚdelayÚkindsÚlinesÚminutess          r7   Ú	plan_textr€   ^   s—  € Ø�v‰vˆh�g˜aŸg™g˜Y fÐ-€EØ‡w‚wØ�2�a—g‘g�Y˜hÐ'Ñ'ˆØ‡w‚wØ�2�a—g‘g�Y˜fÐ%Ñ%ˆà
 ¤ U£ ¨DÐ1Ø
�A—G‘G�9˜A˜aŸf™f˜X U¨1¯7©7¨)Ð3GÈÏ
É
À|ÐS^Ð_`×_gÑ_gÐ^hÐhuÐv{Ðu|Ð}ð€Eð 	‡y‚yØ�‰�t˜AŸI™I˜;Ð&wÐxÔyØ‡w‚wØ�‰Ð?Ô@Ø‡w‚wØ�‰Øœ#˜aŸe™e›*˜Ð%8¼¸Q¿U¹U»¸ÀKÐPQ×P\ÑP\È~Ð]gØ�{‰{ˆmÐ,¨Q¯Y©Y¨K°ÀqÇyÁyÀkÐQ_ðaô	
ð 	‡‚Ø�‰�t˜AŸO™OÐ,Ð,tÐuÔvØ	Œ_˜Q Ó&Ñ&€EØ‡|‚|Ø�‰Ø�1—<‘<�. ¨Q×->Ñ->Ð,?ð @fð fô	
ð 
‡L�Lð	Wôð 	‡y‚yØ�‰�t˜AŸI™I˜;Ð&kÐlÔmØ‡x‚xØ�‰Ø�1—8‘8�*ð Oð Oô	
ô �!”U˜1Ÿ=™=¨Ó/°"Ñ4Ó5Ó6€GØ	Ø
ð	vð 	Ø[Ø
�w�iÐPÐQØ1ð
ñ 
€Eð 	‡y‚yØ�‰ÐMÔNØ�9‰9�UÓÐr6   F©Úshiftc          	     ó  — g }t        |«      }| j                  rdt        | j                  «      › d�nd}| j                  r.|r,|j                  d|› dt        | j                  «      › d�«       n7| j                  r+|j                  d|› dt        | j                  «      › d�«       | j                  r2| j
                  r&|j                  d| j                  › d	|› d
|› d�«       n1| j                  r%|j                  d| j                  › d	|› d
|› d�«       | j                  r%|r#|j                  d| j                  › d|› d�«       n.| j                  r"|j                  d| j                  › d	|› d�«       | j                  r'|r%|j                  d| j                  › d|› |› d�«       n0| j                  r$|j                  d| j                  › d	|› |› d�«       | j                  s| j                  s| j                  r|j                  d«       |S )z�Plan lines about posts Telegram restricts (a copyright strike: the channel is "unavailable", or its posts are
    marked or shown as a notice).õ    (â€œõ   â€�)r@   u   â€¢ âš ï¸� Telegram restricts u    itself: â€œu   â€�uÎ   â€�. Telegram may hide what is posted into such a channel as well, so a repost here may not bring the posts back. To save a struck channel use /shift: it copies the posts from My posts into another channel.u	   â€¢ ðŸ“‹ z post(s) of z are restricted by Telegramzu. They are copied from what My posts saved of them - text, formatting and buttons - not from what Telegram shows now.z¯. They are copied from what My posts saved of them - text, formatting, buttons and media - not from what Telegram shows now (a file that Telegram refuses goes out without it).u   â€¢ âš ï¸� z restricted post(s) of zp have no saved copy in My posts, but Telegram still hands out their content, so they are copied as they are now.u   â€¢ âš ï¸� Telegram marks zU as restricted but still hands out their content, so they are copied as they are now.u.   â€¢ âš ï¸� Telegram shows only its notice for z more post(s) of z» and My posts has no saved copy of them, so they are skipped and the shift will show as not complete. If you have a backup made before that, put it back with /import and run /shift again.u   â€¢ âš ï¸� Telegram holds back z³ - it shows a notice instead of them. Copying the notice would be wrong, so they are skipped, and the old posts can't be deleted afterwards (the repost will show as not complete).uS   â€¢ The new posts are read back: if Telegram itself hides them, the report says so.)r!   Úheld_whyÚchannel_restrictedrM   Ú
held_savedÚno_mediaÚlive_restrictedÚheld_skipped)ry   r{   r‚   r~   ÚnameÚsaids         r7   ro   ro   •   s.  € ð €EÜˆu‹:€DØ,-¯JªJˆU”3�q—z‘z“?Ð# 4Ñ(¸B€DØ×Ò¡Ø�‰Ð5°d°V¸<ÌÈA×L`ÑL`ÓHaÐGbÐbeÐfÕgØ	
×	Ò	Ø�‰Ø,¨T¨F°,¼sÀ1×CWÑCWÓ?XÐ>Yð ZNð Nô	
ð
 	‡|‚|˜Ÿ
š
Ø�‰Ø˜Ÿ™�~ \°$°Ð7RÐSWÐRXð Y_ð _õ	
ð 
�ŠØ�‰Ø˜Ÿ™�~ \°$°Ð7RÐSWÐRXð Y5ð 5ô	
ð
 	×Ò™UØ�‰Ø˜!×+Ñ+Ð,Ð,CÀDÀ6ð JKð Kõ	
ð 
×	Ò	Ø�‰Ø(¨×):Ñ):Ð(;¸<ÈÀvð N2ð 2ô	
ð 	‡~‚~™%Ø�‰Ø<¸Q¿^¹^Ð<LÐL]Ð^bÐ]cÐdhÐcið jJð Jõ	
ð
 
�ŠØ�‰Ø-¨a¯n©nÐ-=¸\È$ÈÐPTÈvð V6ð 6ô	
ð
 	×Ò˜qŸ|š|¨q×/@Ò/@Ø�‰ÐjÔkØ€Lr6   c                ó’  — g }dd„}t        | dd«      rdnd}| j                  r/| j                  rQ|j                  d| j                  › d|› d�«       n.| j                  r"|j                  d	| j                  › d
|› d�«       | j                  r;|j                  dt        | j                  «      › d || j                  «      › d�«       | j                  r,| j                  r |j                  d| j                  › d�«       n+| j                  r|j                  d| j                  › d�«       | j                  rI| j                  r=|j                  dt        | j                  «      › d || j                  «      › d�«       |S | j                  r;|j                  dt        | j                  «      › d || j                  «      › d�«       |S )zKLines about the posts Telegram restricts, for the end of a repost or shift.c                ób   — dj                  d„ | d | D «       «      t        | «      |kD  rdz   S dz   S )NrY   c              3  ó&   K  — | ]	  }d |› �–— Œ y­w©Ú#Nr5   ©Ú.0rS   s     r7   Ú	<genexpr>z-held_notes.<locals>.sample.<locals>.<genexpr>Î   s   è ø€ Ð2©' Q˜1˜Q˜Cœ©'ùó   ‚õ   â€¦r@   )rx   rI   )ÚidsÚns     r7   Úsamplezheld_notes.<locals>.sampleÍ   s5   € Ø�y‰yÑ2¨#¨b¨q©'Ó2Ó2¼sÀ3»xÈ!º|°eÑTÐTÐQSÑTÐTr6   r‰   Fztext, formatting and buttonsz#text, formatting, buttons and mediau"   ðŸ“‹ The source can't be read, so z7 post(s) were copied from what My posts saved of them: z$ - without replies, pins and albums.u   ðŸ“‹ zX post(s) are restricted by Telegram. They were copied from what My posts saved of them: Ú.õ   âš ï¸� zP of them went out without their media, because Telegram refuses the saved file (ú).z} restricted post(s) had no saved copy in My posts, so they were copied as Telegram hands them out (their content was intact).u   âš ï¸� Telegram marks z[ post(s) as restricted but still handed out their content, so they were copied as they are.zj post(s): Telegram shows only its notice and My posts has no saved copy of them, so they were not copied (uV   ). Put a backup made before that back with /import, then use â€œTry the rest againâ€�.zH post(s) are held back by Telegram - it shows a notice instead of them (z`). Copying the notice would be wrong, so they were not copied and the old posts are not deleted.)é   )	ÚgetattrÚfrom_dbÚ
from_savedrM   Ú
media_lostrI   rŠ   Ú
used_savedÚ	held_back)ÚresÚnotesrš   Úwhats       r7   Ú
held_notesr¨   É   sÌ  € à€EóUô .5°S¸*ÀeÔ-LÑ)ÐRw€DØ
‡{‚{Ø�>Š>Ø�L‰LØ4°S·^±^Ð4DÐD{Ø�&Ð<ð>õð 
�ŠØ�‰Ø�C—N‘NÐ#ð $Ø�F˜!ðô	
ð ‡~‚~Ø�‰Ø”c˜#Ÿ.™.Ó)Ð*ð +Ù�s—~‘~Ó&Ð' rð+ô	
ð ×Ò˜sŸ~š~Ø�‰Ø�c×)Ñ)Ð*ð +9ð 9õ	
ð 
×	Ò	Ø�‰Ø$ S×%8Ñ%8Ð$9ð :'ð 'ô	
ð ‡}‚}˜ŸšØ�‰Ø”c˜#Ÿ-™-Ó(Ð)ð *%Ù%+¨C¯M©MÓ%:Ð$;ð <(ð(ô	
ð €Lð 
�ŠØ�‰Ø”c˜#Ÿ-™-Ó(Ð)ð *Ù�s—}‘}Ó%Ð&ð 'ðô	
ð
 €Lr6   c                óp  — t        | dd«      sg S g }| j                  r|j                  d| j                  › d�«       | j                  rmdj	                  d„ | j                  dd D «       «      t        | j                  «      dkD  rd	nd
z   }|j                  dt        | j                  «      › d|› d�«       |S )z6Lines about the files that /shift --no-media left out.r‰   Fu   ðŸš« zI post(s) were copied as text only - their file was left out (--no-media).rY   c              3  ó&   K  — | ]	  }d |› �–— Œ y­wr‘   r5   r“   s     r7   r•   z!no_media_notes.<locals>.<genexpr>  s   è ø€ Ð;Ñ): A˜!˜A˜3œÑ):ùr–   Nrž   r—   r@   z@ post(s) are only a file, so there was nothing to copy of them (r�   )rŸ   Úfiles_left_outrM   Ú	file_onlyrx   rI   )r¥   r¦   r˜   s      r7   Úno_media_notesr­   ú   s«   € ä�3˜
 EÔ*Øˆ	Ø€EØ
×ÒØ�‰�u˜S×/Ñ/Ð0Ð0yÐzÔ{Ø
‡}‚}Ø�i‰iÑ;¨¯©°r¸Ñ):Ó;Ó;ÌÈCÏMÉMÓHZÐ]^ÒH^¹uÐdfÑgˆØ�‰�uœS §¡Ó/Ð0Ð0pÐqtÐpuÐuwÐxÔyØ€Lr6   c               ó`  — t        | dd«      sg S t        | j                  «      | j                  }}t	        d„ | j                  D «       «      }||z
  }| j
                  rdt        | j
                  «      › d�nd}d|› d|› d	|› d
�g}|r|rdnd}|j                  d|› d|› �«       |r|j                  d|› d�«       t        | dd«      r(|j                  dt        | j                  «      › d�«       t        | dd«      r|j                  d| j                  › d�«       |j                  d«       |S )zULines about new posts that TELEGRAM itself hides (they were read back after posting).ÚhiddenNc              3  ó,   K  — | ]  \  }}|sŒ	d –— Œ y­w)rG   Nr5   )r”   Ú_Úhass      r7   r•   zhidden_notes.<locals>.<genexpr>  s   è ø€ Ð6¡J™&˜!˜S²#”A¡Jùs   ‚
�r„   r…   r@   u    âš ï¸� <b>Telegram itself hides ú of the z new post(s) I read back</b>a   : right after they were created they carry its restriction mark, so its apps show the notice instead of them. The bot did not copy a notice - it never posts one: Telegram marks these posts itself, because of something in them or because of the destination.uR    <code>/shift â€¦ --no-media</code> copies the text and buttons without the files.r[   z„ post(s) of these carry a file. Telegram may hide a message that carries a file it has blocked for copyright, wherever it is posted.zy post(s) of these have no file: Telegram hides them for their text or links, or because it restricts the new channel too.Údst_restrictedu:   â€¢ Telegram restricts the destination channel itself: â€œu   â€�.Úhidden_stopFu   â�¹ <b>I stopped after uÝ    post(s)</b>: Telegram hides every new copy I read back, so going on would only add more posts nobody can see. Nothing else was posted. â–¶ï¸� <b>Continue anyway</b> copies the rest; â†©ï¸� <b>Undo</b> removes the copies.zJThe saved posts in My posts are intact. Undo removes the new copies again.)
rŸ   rI   r¯   ÚcheckedÚsumÚ
hidden_whyr!   rM   r´   Úcopied_units)	r¥   r‚   Úkr™   Ú	with_fileÚplainÚwhyr~   Úhints	            r7   Úhidden_notesr¿     sf  € ä�3˜ $Ô'Øˆ	Üˆs�z‰z‹?˜CŸK™K€q€AÜÑ6 C§J¢JÓ6Ó6€IØ�	‰M€EØ/2¯~ª~ˆE”#�c—n‘nÓ%Ð& dÑ
+À2€Cà
*¨1¨#¨X°a°SÐ8TÐUXÐTYð Zzð 	zð€Eñ
 ñ ñ aàð 	ð
 	�‰Ø�9�+ð <Ø<@¸6ðCô	
ñ Ø�‰Ø�5�'ð -ð -ô	
ô ˆsÐ$ dÔ+Ø�‰ÐQÔRUÐVY×VhÑVhÓRiÐQjÐjnÐoÔpÜˆs�M 5Ô)Ø�‰Ø% c×&6Ñ&6Ð%7ð 85ð 5ô	
ð
 
‡L�LÐ]Ô^Ø€Lr6   c                ó¾   — t        | dd«      sy| j                  rdt        | j                  «      › d�nd}dt        | j                  «      › d| j
                  › d|› d	�S )
zSOne line for the running progress message when Telegram hides what was just posted.r¯   Nr@   r„   r…   u   
âš ï¸� Telegram itself hides r³   z new posts checked so faru   . â�¹ Stop is below.)rŸ   r¸   r!   rI   r¯   r¶   )r¥   r½   s     r7   Úhidden_progressrÁ   /  sg   € ä�3˜ $Ô'ØØ/2¯~ª~ˆE”#�c—n‘nÓ%Ð& dÑ
+À2€CØ,¬S°·±«_Ð,=¸XÀcÇkÁkÀ]ÐRkÐloÐkpð  qEð  Fð  Fr6   c               óL  — t        | «      t        | «      z   t        | |¬«      z   }| j                  r|j	                  d| j                  › d�«       | j
                  r|j	                  | j
                  › d�«       | j                  r|j	                  | j                  › d�«       | j                  }|��|j                  r,|j	                  d|j                  › d|j                  › d	�«       |j                  rOd
j                  d„ |j                  dd D «       «      }|j	                  t        |j                  «      › d|› d�«       |j                  r|j	                  d|j                  › d�«       |j                  rB|j	                  d|j                  |j                  z
  › dt!        |j                  «      › d�«       | j"                  r(|j	                  dt!        | j"                  «      › d�«       | j$                  �|t'        | j$                  «      z  }| j(                  r(|j	                  dt!        | j(                  «      › d�«       | j*                  �|t-        | j*                  «      z  }| j.                  r(|j	                  dt!        | j.                  «      › d�«       |S )zELines about answers, links and pins for the end of a repost or shift.r�   u   â†©ï¸� z3 post(s) answer the copy of the post they answered.zQ post(s) could only be copied without their reply (their media can't be rebuilt).zL post(s) answered a post that is not there any more, so they answer nothing.Nu   ðŸ”— r]   z% post(s) now point at the new copies.rY   c              3  óD   K  — | ]  \  }}d |› dt        |«      › �–— Œ y­w©r’   Ú N©r!   ©r”   rS   r™   s      r7   r•   z"finishing_notes.<locals>.<genexpr>E  ó&   è ø€ ÐK¹N±D°A°q  1 # Q¤s¨1£v hÔ/¹Nùó   ‚ é   z, post(s) could not get their links updated (r�   u   ðŸ“Œ z! pinned post(s) are pinned again.z" copy/copies could not be pinned (uM   ). Give the bot the â€œEdit messages of othersâ€� right, or pin them by hand.z&Links and pins could not be finished (z5The name, description and photo could not be copied (z3Links in your other channels could not be updated (u8   ). Press â€œðŸ”— Update links againâ€� to try once more.)r¨   r­   r¿   rr   rM   Ú
reply_lostÚreply_droppedÚfinalÚrelinkedÚlinksÚfailedrx   rI   rs   Ú	pin_errorÚ
pin_wantedr!   Úfinal_errorÚprofiler   Úprofile_errorÚcrossr   Úcross_error)r¥   r‚   r¦   Úfinrš   s        r7   Úfinishing_notesrÙ   7  s>  € ä�s‹Oœn¨SÓ1Ñ1´LÀÈEÔ4RÑR€EØ
‡{‚{Ø�‰�w˜sŸ{™{˜mÐ+^Ð_Ô`Ø
‡~‚~Ø�‰˜Ÿ™Ð'Ð'xÐyÔzØ
×ÒØ�‰˜×)Ñ)Ð*Ð*vÐwÔxØ
�)‰)€CØ
�Ø�<Š<Ø�L‰L˜5 §¡ ¨<¸¿¹°~ÐEjÐkÔlØ�:Š:Ø—Y‘YÑK¸C¿J¹JÀrÈ¹NÓKÓKˆFØ�L‰LœC §
¡
›OÐ,Ð,XÐY_ÐX`Ð`bÐcÔdØ�:Š:Ø�L‰L˜5 §¡ Ð,MÐNÔOØ�=Š=Ø�L‰LØ˜Ÿ™¨¯©Ñ3Ð4Ð4VÔWZÐ[^×[hÑ[hÓWiÐVjð kLð Lôð ‡‚Ø�‰Ð=¼cÀ#Ç/Á/Ó>RÐ=SÐSUÐVÔWØ
‡{�{ÐØ”˜sŸ{™{Ó+Ñ+ˆØ
×ÒØ�‰ÐLÌSÐQT×QbÑQbÓMcÐLdÐdfÐgÔhØ
‡y�yÐØ”˜cŸi™iÓ(Ñ(ˆØ
‡‚Ø�‰ØAÄ#ÀcÇoÁoÓBVÐAWð XDð Dô	
ð €Lr6   c                óF  ‡ ‡‡‡‡‡‡‡‡— ‰ j                   ‰ j                  ‰ j                  cŠŠŠˆfd„Š‰j                  t	        dd¬«      «      t        ‰ d¬«      ˆˆ ˆˆˆfd„«       «       }d$ˆ ˆfd„Š‰‰ j                  d<   t        ‰ d	«      ˆˆˆ ˆˆfd
„«       }t        ‰ d«      ˆ fd„«       }d%ˆˆˆ ˆˆfd„Št        ‰ d«      ˆ ˆˆfd„«       }t        ‰ d«      ˆ ˆˆfd„«       }t        ‰ d«      ˆ fd„«       }t        ‰ d«      ˆˆˆ ˆˆˆfd„«       }ˆfd„Št        ‰ d«      ˆˆfd„«       }t        ‰ d«      ˆ ˆˆfd„«       }	d&d„Št        ‰ d«      ˆˆ ˆˆˆfd„«       }
t        ‰ d«      ˆ ˆˆfd„«       }t        ‰ d «      ˆˆˆ ˆˆˆfd!„«       }t        ‰ d"«      ˆ ˆˆfd#„«       }y )'Nc           	   “  ó   •K  — ‰
j                  | j                  «      ƒ d{  –—† }‰
j                  | j                  «      ƒ d{  –—† }|rt	        |j
                  «      nt        | j                  «      }| j                  r/dt	        | j                  «      › dt	        | j                  «      › d�nd}d}|r|d   rdt        ||d   «      › d�}t        j                  d	d
| j                  › �«      g}t        j                  dd| j                  › �«      g}| j                  dk(  rI| j                  s=d|› d|› d|d   › d|› d�	}t        j                  dd| j                  › �«      g||g}	||	fS | j                  dk(  r=d|› d|› d|d   › d|› d�	}||t        j                  dd| j                  › �«      gg}	||	fS | j                  dk(  r;d|› d|› d|d   › d|› �}t        j                  dd| j                  › �«      g|g}	||	fS | j                  d k(  r8d!|› d"|d   › d|› �}t        j                  dd| j                  › �«      g|g}	||	fS d#|› d$|› d|d   › d|› d%�	}t        j                  d&d| j                  › �«      g|g}	||	fS 7 �Œf7 �ŒF­w)'z2Text and buttons describing where a repost stands.Nz	 (<code>@r\   z</code>)r@   Ú	first_newz

<a href="z">First copy</a>u   â†©ï¸� Undo - remove the copieszrpu:õ   ðŸ”— Update links againúrpl:Úcopiedu   âœ… <b>z: all posts copied in order</b>r_   z< messages are now at the end of the channel and in My posts.zÇ

Look at the end of the channel and check a few posts: formatting, buttons, media. If it looks right, delete the old posts. If not, undo: the copies are removed and the originals were never touched.u   ðŸ—‘ Delete the old postszrpd:z: trial finished</b>z message(s) copied.zB
Check them. Remove them again, or close this trial and keep them.u   âœ… Close, keep the copiesúrpk:Ústoppedu   â�¹ <b>z: stopped</b>z message(s) copied so far.u   â–¶ï¸� Continuezrpc:Úcopyingu   â�³ <b>z1</b>: a repost was running when the bot stopped. u
   âš ï¸� <b>z: not everything was copied</b>zg
Old posts are only deleted once everything is copied, so nothing is lost. Try the rest again, or undo.u   ðŸ”� Try the rest again)Úget_channelÚ
channel_idÚmigration_countsÚidr!   r{   rA   Úold_usernameÚnew_usernamer#   r   ÚinlineÚstatusrw   )Úmigr;   ÚcrŒ   ÚswapÚ
first_copyÚundorÏ   r`   ÚkbÚdbs             €r7   Úview_forzregister.<locals>.view_forb  s  øè ø€ à—>‘> #§.¡.Ó1×1ˆØ×%Ñ% c§f¡fÓ-×-ˆÙ "Œs�2—8‘8Œ}¬¨C¯N©NÓ(;ˆØhk×hxÒhx�œ3˜s×/Ñ/Ó0Ð1Ð1DÄSÈ×IYÑIYÓEZÐD[Ð[cÑdð  AˆØˆ
Ù�!�K’.Ø&¤y°°Q°{±^Ó'DÐ&EÐEUÐVˆJÜ—‘Ð?À4ÈÏÉÀxÀÓQÐRˆÜ—‘Ð8¸DÀÇÁÀ¸/ÓJÐKˆØ�:‰:˜Ò!¨#¯+ª+à˜$˜Ð>¸t¸fÀBÀqÈÁ{Àmð T#Ø#- ,ð /0ð0ð ô —=‘=Ð!<ÀÀSÇVÁVÀH¸oÓNÐOÐQVÐX\Ð]ˆBð( �Rˆxˆð' �Z‰Z˜8Ò#à˜$˜Ð3°D°6¸¸A¸h¹K¸=ÐH[Ð\fÐ[gð hTð Tð ð ˜¤§¡Ð.JÈdÐSV×SYÑSYÐRZÈOÓ \Ð]Ð^ˆBð �Rˆxˆð �Z‰Z˜9Ò$Ø˜T˜F -°¨v°R¸¸(¹°}ÐD^Ð_iÐ^jÐkˆDÜ—=‘=Ð!2°d¸3¿6¹6¸(°OÓDÐEÀtÐLˆBð �Rˆxˆð �Z‰Z˜9Ò$Ø˜T˜FÐ"SÐTUÐV^ÑT_ÐS`Ð`sÐt~Ðsð  AˆDÜ—=‘=Ð!2°d¸3¿6¹6¸(°OÓDÐEÀtÐLˆBð �Rˆxˆð ˜T˜FÐ"AÀ$ÀÀrÈ!ÈHÉ+ÈÐViÐjtÐiuð vð ð ô
 —=‘=Ð!:¸dÀ3Ç6Á6À(¸OÓLÐMÈtÐTˆBØ�RˆxˆðI 2ùØ-ûs"   ƒJ¢J£"JÁJÁIJÊJÚrepostT)Úargs)Úownerc           	   “  ó"  •K  — t        ‰«       | j                  j                  d«      xs dj                  «       }|s_‰j	                  «       ƒ d {  –—† }|�, ‰|«      ƒ d {  –—† \  }}t        | d|z   |«      ƒ d {  –—†  y t        | t        «      ƒ d {  –—†  y 	 t        |«      \  }}}‰j                  «       ƒ d {  –—† }	|	st        d«      ‚t        |||d   €‰j                  n|d   |d   |d	   ¬
«      }
t        j                   d«      }t#        | j$                  |
¬«      ‰j&                  |<    ‰| |d«      ƒ d {  –—†  y 7 Œö7 Œæ7 ŒÍ7 Œ¶# t        $ r/}t        |› d�t        j                  ddt        «      z   «      ‚d }~ww xY w7 ŒÊ7 ŒJ­w)NrG   r@   zUnfinished repost:

ú

z<[^>]+>ú,No channels registered yet. Use /addchannel.rF   rE   rD   )rU   rV   Úinclude_typedÚinclude_postsrD   é   )r(   r)   r   )r   Úpattern_matchÚgroupÚstripÚopen_migrationr   ÚUSAGErW   rJ   r   ÚreÚsubÚlist_channelsr   Úreplace_typed_linksÚsecretsÚ	token_hexr&   Ú	sender_idÚpending)ÚeventrO   rë   r`   rð   rU   rV   rQ   ÚeÚchansr)   ÚtokenÚcfgÚctxrñ   Úshow_pickerrò   s               €€€€€r7   Úh_repostzregister.<locals>.h_repost‹  s�  øè ø€ ô 	�cÔØ×"Ñ"×(Ñ(¨Ó+Ò1¨r×8Ñ8Ó:ˆÙØ×)Ñ)Ó+×+ˆCØˆÙ!)¨#£×.‘��bÜ˜%Ð!9¸DÑ!@À"ÓE×EÐEð ô ˜%¤Ó'×'Ð'Øð	HÜ/°Ó4‰OˆC��eð ×&Ñ&Ó(×(ˆÙÜÐJÓKÐKÜØØØ5:¸7±^Ð5K˜#×1Ò1ÐQVÐW^ÑQ_Ø ™.Ø�v‘ô
ˆô ×!Ñ! !Ó$ˆÜ)¨u¯©ÀTÔJˆ�‰�EÑÙ˜% ¨Ó*×*Ñ*ð/ ,øà.øØEøà'ùô ò 	HÜ˜q˜c ˜J¬¯©°
¸BÄÓ)FÑFÓGÐGûð	Húà(øð 	+ús‹   ƒAFÁEÁFÁ#E
Á$FÁ>EÁ?FÂEÂFÂE Â-FÃ FÃBFÅFÅFÅ
FÅFÅFÅ	FÅ*FÆFÆFÆFc              “  ó�  •‡K  — t        ‰	| «       ‰	j                  j                  ‰«      }t        |t        «      r|j
                  | j                  k7  rt        d«      ‚‰
j                  «       ƒ d {  –—† }|st        d«      ‚|j                  }|j                  r/dt        |j                  «      › dt        |j                  «      › d�nd}|j                  r|d|j                  › d�z  }t        j                   ||d	|› d
�d‰ˆfd„t#        j$                  dd‰› �«      gg¬«      \  }}t'        | ||«      ƒ d {  –—†  y 7 ŒÎ7 Œ­w)Nú)That list has expired. Run /repost again.rø   zswap <code>@r\   z</code> in the linkszcopy without changing any linkz, trial: only the newest z	 post idsu1   ðŸ“¢ <b>Which channel should I repost?</b>
Plan: r›   Úrpc                ó(   •— d‰› d| j                   › �S )Nzrpch:Ú:)ræ   )rì   r  s    €r7   Ú<lambda>z/register.<locals>.show_picker.<locals>.<lambda>À  s   ø€ ˜u U G¨1¨Q¯T©T¨FÑ3r6   õ   âœ–ï¸� Cancelúrpn:)ÚheadÚkindÚargÚchooseÚ
extra_rows)r   r  ÚgetÚ
isinstancer&   r(   r  r   r  r)   ri   r!   rU   rV   rD   r	   Úrenderr   ré   r   )r	  r  ÚpageÚchoicer  r)   r§   r`   rð   r  rñ   s    `       €€r7   r  zregister.<locals>.show_pickerª  s/  ùè ø€ Ü�c˜5Ô!Ø—‘—‘ Ó'ˆÜ˜&¤,Ô/°6·;±;À%Ç/Á/Ò3QÜÐGÓHÐHØ×&Ñ&Ó(×(ˆÙÜÐJÓKÐKØ�{‰{ˆð �zŠzð œ3˜tŸx™x›=˜/Ð)<¼SÀÇÁ»]¸OÐK_Ñ`à1ð 	ð
 �9Š9ØÐ/°·	±	¨{¸)ÐDÑDˆDÜ—=‘=ØØØEÀdÀVÈ1ÐMØØÛ3ÜŸ™ ¸$¸u¸g¸ÓGÐHÐIô
‰ˆˆbô �5˜$ Ó#×#Ñ#ð) )øð( 	$ús%   „A/EÁ3EÁ4CEÄ<EÄ=EÅEr  Úrpchc              “  ó8  •‡ ‡‡K  — t        ‰‰ «       |d   t        |d   «      }}‰j                  j                  |«      }t	        |t
        «      r|j                  ‰ j                  k7  rt        d«      ‚‰j                  |«      ƒ d {  –—† Š‰�‰j                  st        d«      ‚‰j                  ‰j                  «      ƒ d {  –—† }|�H‰j                  j                  |d «        ‰|«      ƒ d {  –—† \  }}t        ‰ d|z   |«      ƒ d {  –—†  y t        ‰‰«      ƒ d {  –—† }|�#|j                   r|j"                  st        d«      ‚‰j$                  j'                  «       rt        d«      ‚‰j                  j                  |d «       |j(                  }	dgŠˆˆ ˆfd	„}
‰j$                  4 ƒd {  –—†  t        ‰ d
t+        ‰j,                  «      › d�«      ƒ d {  –—†  t/        ‰‰|	|
t1        ‰‰j                  «      ¬«      ƒ d {  –—† }d d d «      ƒd {  –—†  j2                  r+t        ‰ dt+        |j2                  «      › �«      ƒ d {  –—†  y t5        ‰ j                  ‰|	|¬«      }|‰j                  |<   t7        j8                  dd|› �«      t7        j8                  dd|› �«      gg}t        ‰ t;        ||	‰j,                  ‰j<                  «      |«      ƒ d {  –—†  y 7 �Œ_7 �Œ&7 �Œû7 �Œã7 �ŒÑ7 �ŒC7 �Œ7 Œñ7 Œã# 1 ƒd {  –—†7  sw Y   ŒóxY w7 ŒÄ7 Œ5­w)Nr   rG   r  z;That channel is not registered any more. Run /repost again.zJThere is an unfinished repost for this channel. Finish or undo it first.

uB   The bot needs the â€œPost messagesâ€� admin right in that channel.z5Another long job (replace / repost) is still running.ç        c              “  ó  •K  — t        j                  «       ‰d   z
  dk  ry t        j                  «       ‰d<   	 t        ‰dt        ‰j                  «      › d| j
                  › d�«      ƒ d {  –—†  y 7 Œ# t        $ r Y y w xY w­w)Nr   é   õ   ðŸ”� Reading <b>z</b>: post id r—   )r3   r4   r   r!   r{   ÚscannedÚ	Exception)ry   r;   r	  rD   s    €€€r7   Úprogz'register.<locals>.cb_pick.<locals>.progâ  sz   øè ø€ Ü�~‰~Ó $ q¡'Ñ)¨AÒ-ØÜ—n‘nÓ&ˆD�‰GðÜ+¨EÐ5EÄcÈ"Ï(É(ÃmÀ_ÐTbÐcd×clÑclÐbmÐmpÐ3qÓr×rÒrùÜò Ùðüs:   ƒ6Bº3A5 Á-A3Á.A5 Á2BÁ3A5 Á5	BÁ>BÂ BÂBr(  u   </b>â€¦)ÚprogressÚsavedrœ   )r(   r;   r)   r<   u   â–¶ï¸� Start copyingzrpa:r  r  )r   r'   r  r  r  r&   r(   r  r   rã   Úactiverÿ   ræ   Úpopr   r"   ÚadminÚpostÚlockÚlockedr)   r!   r{   r   r    Úerrorr9   r   ré   r€   Ú
edit_delay)r	  Úpartsr  Úcidr"  rë   r`   rð   Úrightsr)   r+  r<   Újobr;   rD   r  Úclientr  rñ   rò   s   `            @@€€€€€r7   Úcb_pickzregister.<locals>.cb_pickÇ  s   ûè ø€ ä�c˜5Ô!Ø˜1‘Xœs 5¨¡8›}ˆsˆØ—‘—‘ Ó'ˆÜ˜&¤,Ô/°6·;±;À%Ç/Á/Ò3QÜÐGÓHÐHØ—>‘> #Ó&×&ˆØˆ:˜RŸYšYÜÐYÓZÐZØ×%Ñ% b§e¡eÓ,×,ˆØˆ?Ø�K‰K�O‰O˜E 4Ô(Ù% c›]×*‰HˆD�"Ü'ØÐeÐhlÑlÐnpó÷ ð ð Ü! &¨"Ó-×-ˆØÐ v§|¢|¸¿ºÜÐ`ÓaÐaØ�8‰8�?‰?ÔÜÐSÓTÐTØ�‰�‰˜˜tÔ$Ø�{‰{ˆØˆuˆö	ð —8—8“8Ü'¨Ð1AÄ#ÀbÇhÁhÃ-ÀÐPWÐ/XÓY×YÐYÜ$ V¨R°ÀÌLÐY[Ð]_×]bÑ]bÓLcÔd×dˆD÷ —8ð �:Š:Ü'¨°¼¸T¿Z¹Z»Ð8IÐ/JÓK×KÐKØÜ˜UŸ_™_°¸$ÀTÔJˆØ ˆ�‰�EÑÜ�}‰}Ð3°t¸E¸7°^ÓDÄfÇmÁmÐTcÐgkÐlqÐkrÐesÓFtÐuÐvˆÜ# E¬9°T¸4ÀÇÁÈ3Ï>É>Ó+ZÐ\^Ó_×_Ñ_ðM 'ùð -ùð +ùðùð .ùð$ ùØYùØdøð ø—8—8‘8úð Løð
 	`úsæ   †BLÂ	K(Â
;LÃK+Ã-LÃ3K.Ã4LÄK1ÄLÄ#K4Ä$BLÆ4K7Æ5LÆ8'LÇK:Ç +LÈK=ÈLÈLÈK?È5LÉLÉBLË"LË#LË+LË.LË1LË4LË7LË:LË=LË?LÌLÌL
ÌLÌLÌLÚrpnc              “  ó�   •K  — t        ‰| «       ‰j                  j                  |d   d «       t        | d«      ƒ d {  –—†  y 7 Œ­w)Nr   z*Cancelled - nothing was copied or deleted.)r   r  r/  r   )r	  r6  r  s     €r7   Ú	cb_cancelzregister.<locals>.cb_cancelö  s8   øè ø€ ä�c˜5Ô!Ø�‰�‰˜˜a™ $Ô'Ü# EÐ+WÓX×XÒXús   ƒ;A¾A¿Ac              “  ó¼  •‡ ‡‡	‡
‡‡K  — ‰j                  ‰j                  «      ƒ d {  –—† Š‰j                  Š	d\  ‰_        ‰_        ‰‰j
                  d‰j                  › �<   ‰j                  r‰j                  j                  nd ŠdgŠ
ˆ	ˆ ˆ
ˆˆfd„}	 ‰j                  4 ƒd {  –—†  ‰j                  ‰j                  d«      ƒ d {  –—†  t        ‰‰‰	‰‰ j                  ‰j                  |ˆfd„¬«      ƒ d {  –—† }d d d «      ƒd {  –—†  d‰_        j                  rd	n'|j                  s|j                   s|j"                  rd
nd}‰j                  ‰j                  |«      ƒ d {  –—†  ‰j                  ‰j                  «      ƒ d {  –—† Š ‰‰«      ƒ d {  –—† \  }}g }|j$                  r+|j'                  |j(                  › d|j*                  › d�«       |j,                  r|j'                  |j,                  › d�«       |j                  r™dj/                  d„ |j                  d d D «       «      }|j'                  dt1        |j                  «      › d|› t1        |j                  «      dkD  rdnd› d�«       t3        d„ |j                  D «       «      r|j'                  d«       |j                   r(|j'                  dt5        |j                   «      › d�«       |t7        |«      z  }t9        ‰ ||rddj/                  |«      z   ndz   |«      ƒ d {  –—†  y 7 �Œø7 �Œ~7 �Œ]7 �Œ.7 �Œ!# 1 ƒd {  –—†7  sw Y   �Œ2xY w# d‰_        w xY w7 �Œå7 �ŒÅ7 �Œ¸7 Œ?­w)N)TFújob:r%  c           	   “  ó¾  •K  — | j                   dv rt        j                  «       ‰d   z
  dk  ry t        j                  «       ‰d<   | j                  | j                  z   }‰rd‰› �nd}| j                   dk(  r+| j
                  �d|› |› d�t        | j
                  «      z   }nD| j                   d	k(  r	d
|› |› d�}n,dt        ‰j                  «      › d|› |› d�}|t        | «      z  }	 t        ‰|t        j                  dd‰j                  › �«      gg«      ƒ d {  –—†  y 7 Œ# t        j                  $ r Y y t         $ r t"        j%                  dd¬«       Y y w xY w­w)N)ÚcopyrÏ   r   rû   Ú/r@   rÏ   u   âœ… Copied z posts.
Úfinishu   ðŸ”— Copied u;    posts. Now pointing links at the new copies and pinningâ€¦u   â�³ Copying <b>z</b>: u'    postsâ€¦
The old posts stay untouched.õ   â�¹ Stopúrps:úprogress update failedT©Úexc_info)Úphaser3   r4   r¹   Úskipped_donerÖ   r   r!   r{   rÁ   r   r   ré   ræ   r   ÚMessageNotModifiedErrorr*  ÚlogÚdebug)	r¥   ÚdoneÚofÚbodyr;   r	  rD   rë   Útotals	       €€€€€r7   r+  z(register.<locals>.run_copy.<locals>.prog  sR  øè ø€ Ø�y‰yÐ-Ñ-´$·.±.Ó2BÀTÈ!ÁWÑ2LÈqÒ2PØÜ—n‘nÓ&ˆD�‰GØ×#Ñ# c×&6Ñ&6Ñ6ˆDÙ %�1�U�G‘¨2ˆBØ�y‰y˜GÒ#¨¯	©	Ð(=Ø$ T F¨2¨$¨iÐ8¼=ÈÏÉÓ;SÑS‘Ø—‘˜hÒ&Ø% d V¨B¨4Ð/jÐk‘à(¬¨R¯X©X«¨°v¸d¸VÀBÀ4ÐGoÐp�Øœ¨Ó,Ñ,�ðCÜ+¨E°4¼6¿=¹=ÈÐW[Ð\_×\bÑ\bÐ[cÐUdÓ;eÐ:fÐ9gÓh×hÒhùÜ×1Ñ1ò ÙÜò CÜ—	‘	Ð2¸T�	ÖBðCüsH   ƒC$EÃ(3D# ÄD!ÄD# Ä EÄ!D# Ä#EÄ6EÄ8EÅEÅEÅErâ   c                 ó   •— ‰ j                   S ©N©r?   ©r9  s   €r7   r  z,register.<locals>.run_copy.<locals>.<lambda>  s   ø€ Ðsv×s{Òs{r6   )r|   r,  Úshould_stopFrá   Ú
incompleterß   z" post(s) were copied by Telegram, z& were posted again with their buttons.zK post(s) needed their buttons set again after posting - they show them now.rY   c              3  óD   K  — | ]  \  }}d |› dt        |«      › �–— Œ y­wrÄ   rÆ   rÇ   s      r7   r•   z-register.<locals>.run_copy.<locals>.<genexpr>-  rÈ   rÉ   é   z<b>z post(s) failed</b> (r—   r@   r�   c              3  ó,   K  — | ]  \  }}|d k(  –— Œ y­w)ÚButtonsNotShownNr5   )r”   r±   r™   s      r7   r•   z-register.<locals>.run_copy.<locals>.<genexpr>/  s   è ø€ ÐA±j©d¨a°�1Ð)Õ)±jùs   ‚u�   ButtonsNotShown: Telegram did not show the buttons on the new post, so that copy was removed again. The original is untouched - use â€œTry the rest againâ€�.zStopped early because of r›   r÷   r_   )Úget_migrationrB   r;   r>   r?   r  ræ   r<   re   r2  Úset_migration_statusr   r  r5  rá   rÐ   Úabortedr¤   r¹   rM   Ú	forwardedÚrebuiltÚrepairedrx   rI   Úanyr!   rÙ   r   )r	  r9  r+  r¥   rê   r`   rð   r¦   rš   r;   rD   rë   rR  r  r:  r  rñ   rò   s   ``       @@@@€€€€€r7   Úrun_copyzregister.<locals>.run_copyý  sÂ  þè ø€ Ø×$Ñ$ S§Z¡ZÓ0×0ˆØ�V‰VˆØ +ÑˆŒ�S”XØ'*ˆ�‰�d˜3Ÿ6™6˜(�OÑ$Ø"%§(¢(�—‘—’°ˆØˆuˆ÷	Cð 	Cð(	 Ø—x—x“xØ×-Ñ-¨c¯f©f°iÓ@×@Ð@Ü&Ø˜B  C¨¯©ÀÇÁÐY]Ók{ô÷ �÷  —xð  ˆCŒKØ!Ÿkšk‘ÀÇÂÈsÏ{Ê{Ð^a×^kÒ^k±ÐrzˆØ×%Ñ% c§f¡f¨fÓ5×5Ð5Ø×$Ñ$ S§V¡VÓ,×,ˆÙ! #›×&‰ˆˆbØˆØ×ÒØ�L‰LØ—=‘=�/Ð!CÀCÇKÁKÀ=ÐPvÐwôð �<Š<Ø�L‰L˜CŸL™L˜>Ð)tÐuÔvØ�:Š:Ø—Y‘YÑK¸C¿J¹JÀrÈ¹NÓKÓKˆFØ�L‰L˜3œs 3§:¡:›Ð/Ð/DÀVÀHÔVYÐZ]×ZdÑZdÓVeÐhiÒViÉUÐoqÐLrÐrtÐuÔvÜÑA°c·j²jÓAÔAØ—‘ðPôð �;Š;Ø�L‰LÐ4´S¸¿¹Ó5EÐ4FÀaÐHÔIØ” Ó%Ñ%ˆÜ# E¨4ÑPU°6¸D¿I¹IÀeÓ<LÒ3LÐ[]Ñ+^Ð`bÓc×cÑcðs 1ùð8  ùØ@ùðùð  ù—x—x’xûð  ˆC�Kúà5ùØ,ùØ&ùð& 	dúsØ   ‰M¨L ©A+MÂM Â%L#Â&M Â) L/Ã	L&Ã
1L/Ã;L)Ã<L/Ä M ÄL,ÄM ÄAMÅ,MÅ-"MÆMÆMÆMÆ E:MÌMÌMÌ#M Ì&L/Ì)L/Ì,M Ì/MÌ5L8Ì6MÌ=M Í	MÍMÍMÍMÍMÚrpac              “  ó�  •K  — t        ‰| «       ‰j                  j                  |d   «      }t        |t        «      r|j
                  | j                  k7  rt        d«      ‚|j                  s‰j                  j                  «       rt        d«      ‚‰j                  |j                  j                  «      ƒ d {  –—† �t        d«      ‚|j                  |j                  }}t!        j"                  d«      |_        ‰j'                  |j$                  |j                  j                  |j(                  |j*                  |j,                  |j.                  |j0                  |j2                  |j4                  | j                  ¬«
      ƒ d {  –—†  ‰j                  j7                  |d   d «        ‰| |«      ƒ d {  –—†  y 7 �Œ7 Œ87 Œ
­w)Nr   z)That plan has expired. Run /repost again.úA long job is already running.z7There is already an unfinished repost for this channel.rZ  )rU   rV   rù   rú   Úfirst_idÚlast_idrw   Úuser_id)r   r  r  r  r9   r(   r  r   r>   r2  r3  rÿ   r;   ræ   r<   r)   r  r  rB   Úcreate_migrationrU   rV   rù   rú   rd   rD   rw   r/  )r	  r6  r9  ry   rz   r  rñ   rd  s        €€€r7   Úcb_startzregister.<locals>.cb_start9  sR  øè ø€ ä�c˜5Ô!Ø�k‰k�o‰o˜e A™hÓ'ˆÜ˜#œyÔ)¨S¯X©X¸¿¹Ò-HÜÐGÓHÐHØ�;Š;˜#Ÿ(™(Ÿ/™/Ô+ÜÐ<Ó=Ð=Ø×"Ñ" 3§6¡6§9¡9Ó-×-Ð9ÜÐUÓVÐVØ�x‰x˜Ÿ™ˆ1ˆÜ×&Ñ& qÓ)ˆŒ
Ø×!Ñ!Ø�J‰J˜Ÿ™Ÿ	™	 q§u¡u°!·%±%ÀqÇÁÐfg×fuÑfuØ—W‘W a§f¡f°a·i±iÈÏÉð "ó 
÷ 	
ð 	
ð 	�‰�‰˜˜a™ $Ô'Ù�u˜cÓ"×"Ñ"ð .ùð	
øð
 	#ús7   ƒB8GÂ;F?Â<CGÆ	GÆ
/GÆ9GÆ:GÇGÇGÚrpcc           	   “  ó  •K  — t        ‰| «       ‰j                  |d   «      ƒ d {  –—† }|�|j                  dvrt        d«      ‚‰j                  j                  «       rt        d«      ‚‰j                  |j                  «      ƒ d {  –—† }|€t        d«      ‚t        |j                  |j                  |j                  |j                  ¬«      } ‰| t        | j                  |||j                  ¬«      «      ƒ d {  –—†  y 7 ŒÞ7 Œ}7 Œ	­w)Nr   )rá   rX  râ   zThere is nothing to continue.rg  ú(That channel is not registered any more.)rU   rV   rù   rú   )r(   r;   r)   rB   )r   r]  rê   r   r2  r3  rã   rä   r   rç   rè   rù   rú   r9   r  ræ   )r	  r6  rë   r;   r)   r  rñ   rd  s        €€€r7   Úcb_continuezregister.<locals>.cb_continueL  sò   øè ø€ ä�c˜5Ô!Ø×$Ñ$ U¨1¡XÓ.×.ˆØˆ;˜#Ÿ*™*Ð,PÑPÜÐ;Ó<Ð<Ø�8‰8�?‰?ÔÜÐ<Ó=Ð=Ø—>‘> #§.¡.Ó1×1ˆØˆ:ÜÐFÓGÐGÜ ×!1Ñ!1°s×7GÑ7GÐWZ×WhÑWhÐx{÷  yJñ  yJô  KˆÙ�uœi¨U¯_©_ÀÈ$ÐWZ×W]ÑW]Ô^Ó_×_Ñ_ð /øð
 2øð 	`ús5   ƒ$D§D¨A"DÂ
DÂA5DÄ D
ÄDÄDÄ
DÚrpsc              “  ó  •K  — t        ‰| «       ‰j                  j                  d|d   › �«      }t        |t        «      r-|j
                  r!d|_        | j                  d«      ƒ d {  –—†  y | j                  d«      ƒ d {  –—†  y 7 Œ7 Œ­w)Nr@  r   Tu6   â�¹ Stopping after the post that is being worked onâ€¦zNothing is running.)r   r  r  r  r9   r>   r?   Úrespond)r	  r6  r9  r  s      €r7   Úcb_stopzregister.<locals>.cb_stopZ  su   øè ø€ ä�c˜5Ô!Ø�k‰k�o‰o  U¨1¡X JÐ/Ó0ˆÜ�cœ9Ô%¨#¯+ª+ØˆCŒHØ—-‘-Ð XÓY×YÑYà—-‘-Ð 5Ó6×6Ñ6ð Zøà6ús$   ƒA%BÁ(BÁ)BÂB
ÂBÂ
BÚrplc              “  óÒ  •‡ ‡‡‡K  — t        ‰‰ «        ‰|«      ƒ d{  –—† \  Š}‰j                  dvrt        d«      ‚‰j                  j	                  «       rt        d«      ‚t        ‰ j                  |t        «       ‰j                  d¬«      Š‰‰j                  d‰j                  › �<   t        «       dgc}Šˆ ˆˆfd	„}d}	 ‰j                  4 ƒd{  –—†  t        ‰ d
«      ƒ d{  –—†  t        ‰‰|‰‰j                  |ˆfd„|¬«      ƒ d{  –—†  ddd«      ƒd{  –—†  d‰_        ‰j                  j)                  d‰j                  › �d«       t+        |«      }|r|j-                  dt/        |«      › d�«       |s|j-                  d«       t1        j2                  dd‰j                  › �«      g}‰j                  dk(  r> ‰‰«      ƒ d{  –—† \  }	}
t        ‰ |	dz   dj5                  |«      z   |
«      ƒ d{  –—†  yt        ‰ dt/        |j6                  «      › d�dj5                  |«      z   |g«      ƒ d{  –—†  y7 �Œ&7 �Œs7 �Œb7 �Œ=7 �Œ0# 1 ƒd{  –—†7  sw Y   �ŒAxY w# t        $ r5}t        j!                  d«       t#        |«      j$                  }Y d}~�Œ}d}~ww xY w# d‰_        ‰j                  j)                  d‰j                  › �d«       w xY w7 �Œ7 Œã7 Œ¥­w)zgLook through every connected channel once more for links to the old posts and point them at the copies.N©rß   Úold_deletedz/Links can be updated once everything is copied.rg  T)r(   r;   r)   rB   r>   r@  r%  c           	   “  ót  •K  — t        j                  «       ‰d   z
  dk  ry t        j                  «       ‰d<   	 t        ‰t        | «      t	        j
                  dd‰j                  › �«      gg«      ƒ d {  –—†  y 7 Œ# t        j                  $ r Y y t        $ r t        j                  dd¬«       Y y w xY w­w)Nr   rû   rE  rF  rG  TrH  )r3   r4   r   r   r   ré   ræ   r   rL  r*  rM  rN  )rì   r	  rD   rë   s    €€€r7   r+  z(register.<locals>.cb_links.<locals>.progr  s£   øè ø€ Ü�~‰~Ó $ q¡'Ñ)¨AÒ-ØÜ—n‘nÓ&ˆD�‰GðCÜ+¨E´=ÀÓ3CÄvÇ}Á}ÐU_ÐcgÐhk×hnÑhnÐgoÐapÓGqÐFrÐEsÓt×tÒtùÜ×1Ñ1ò ÙÜò CÜ—	‘	Ð2¸T�	ÖBðCüsF   ƒ6B8º<A> Á6A<Á7A> Á;B8Á<A> Á>B5ÂB8ÂB5Â2B8Â4B5Â5B8u;   ðŸ”— Looking for links to the old posts in your channelsâ€¦c                 ó   •— ‰ j                   S rT  rU  rV  s   €r7   r  z,register.<locals>.cb_links.<locals>.<lambda>‚  s   ø€ Ðbe×bjÒbjr6   )r|   r,  rW  Úresultz'pointing the links at the copies failedFzLinks could not be updated (r�   u    ðŸ”— There is nothing to change.rÝ   rÞ   rß   r÷   r_   u   ðŸ”— <b>z</b>
)r   rê   r   r2  r3  r9   r  r   ræ   r  r   r   r   r5  r*  rM  Ú	exceptionÚtyper.   r>   r/  r   rM   r!   r   ré   rx   r{   )r	  r6  r;   rÖ   r+  r4  r
  r¦   Úagainr`   rð   r9  rD   rë   r  r:  r  rñ   Úloadrò   s   `          @@@€€€€€€r7   Úcb_linkszregister.<locals>.cb_linkse  sq  üè ø€ ô 	�c˜5Ô!Ù˜U›×#‰ˆˆRØ�:‰:Ð6Ñ6ÜÐMÓNÐNØ�8‰8�?‰?ÔÜÐ<Ó=Ð=Ü˜UŸ_™_°¼-»/ÐRU×RXÑRXÐbfÔgˆØ'*ˆ�‰�d˜3Ÿ6™6˜(�OÑ$Ü!“m c Uˆˆˆtö		Cð ˆð	3Ø—x—x“xÜ+¨EÐ3pÓq×qÐqÜ)Ø˜B  C¨s¯~©~ÈÓZjÐsxô÷ ð ÷  —xð  ˆCŒKØ�K‰K�O‰O˜d 3§6¡6 (˜O¨TÔ2Ü˜UÓ#ˆÙØ�L‰LÐ7¼¸E»
°|À2ÐFÔGÙØ�L‰LÐ;Ô<Ü—‘Ð8¸DÀÇÁÀ¸/ÓJÐKˆØ�:‰:˜Ò!Ù% c›]×*‰HˆD�"Ü'¨¨t°f©}¸t¿y¹yÈÓ?OÑ/OÐQSÓT×TÑTä'¨°¼#¸b¿h¹h»-¸ÈÐ/OÐRV×R[ÑR[Ð\aÓRbÑ/bÐejÐdkÓl×lÑlðW $ùð,  ùØqùðùð  ù—x—x’xûô
 ò 	%Ü�M‰MÐCÔDÜ˜“G×$Ñ$ŽEûð	%ûð  ˆCŒKØ�K‰K�O‰O˜d 3§6¡6 (˜O¨TÕ2úð +ùØTøàlúsã   ‡K'ŸI B$K'ÃI* ÃIÃI* ÃIÃ)IÃ*'IÄIÄIÄI* Ä!IÄ"I* Ä&B,K'ÇK Ç,K'Ç?K#È ?K'È?K%É K'ÉI* ÉIÉIÉI* ÉI'ÉIÉI'É"I* É*	J(É3*J#ÊJ+ Ê#J(Ê(J+ Ê+2KËK'Ë#K'Ë%K'c              “  óÎ   •K  — ‰j                  | d   «      ƒ d {  –—† }|€t        d«      ‚‰j                  |j                  «      ƒ d {  –—† }|€t        d«      ‚||fS 7 ŒE7 Œ­w)Nr   z"I don't know that repost any more.ro  )r]  r   rã   rä   )r6  rë   r;   rñ   s      €r7   r  zregister.<locals>.load—  si   øè ø€ Ø×$Ñ$ U¨1¡XÓ.×.ˆØˆ;ÜÐ@ÓAÐAØ—>‘> #§.¡.Ó1×1ˆØˆ:ÜÐFÓGÐGØ�Bˆwˆð /øð 2ús!   ƒA%›A!œ/A%ÁA#ÁA%Á#A%Úrpbc              “  ó�   •K  —  ‰|«      ƒ d {  –—† \  }} ‰|«      ƒ d {  –—† \  }}t        | ||«      ƒ d {  –—†  y 7 Œ07 Œ7 Œ	­wrT  )r   )r	  r6  rë   r±   r`   rð   r  rò   s         €€r7   Úcb_backzregister.<locals>.cb_back   sF   øè ø€ á˜E“{×"‰ˆˆQÙ! #›×&‰ˆˆbÜ# E¨4°Ó4×4Ñ4ð #øØ&øØ4ús/   ƒA�A �A¢A£AºA»AÁAÁAÚrpdc           
   “  óä  •K  — t        ‰| «        ‰|«      ƒ d {  –—† \  }}|j                  dk7  s|j                  rt        d«      ‚‰j	                  |j
                  «      ƒ d {  –—† }t        | d|d   › dt        |j                  «      › d�t        j                  d|d   › �d|j
                  › �«      t        j                  d	d
|j
                  › �«      gg«      ƒ d {  –—†  y 7 ŒÎ7 Œ„7 Œ	­w)Nrß   ú@Old posts can only be deleted after a complete, successful copy.u   ðŸ—‘ <b>Delete Úold_leftz old message(s) from z™?</b>
Only originals that have a copy are deleted. This can't be undone. The copies stay and become the channel: nothing is lost, they are already there.u   ðŸ—‘ Yes, delete úrpdy:u   â†©ï¸� Backúrpb:)r   rê   rw   r   rå   ræ   r   r!   r{   r   ré   ©r	  r6  rë   r;   rì   r  rñ   r  s        €€€r7   Úcb_delete_askzregister.<locals>.cb_delete_ask¦  sý   øè ø€ ä�c˜5Ô!Ù˜U›×#‰ˆˆRØ�:‰:˜Ò! S§[¢[ÜÐ^Ó_Ð_Ø×%Ñ% c§f¡fÓ-×-ˆÜ#ØØ˜a 
™m˜_Ð,AÄ#ÀbÇhÁhÃ-Àð Q7ð 7ô �m‰mÐ/°°*±¨Ð?À5ÈÏÉÈÐAQÓRÔTZ×TaÑTaÐboÐswÐx{×x~Ñx~Ðwð  rAó  UBð  Cð  Dó
÷ 	
ñ 	
ð	 $øð .øð	
ús5   ƒC0›C*œAC0Á'C,Á(A<C0Ã$C.Ã%C0Ã,C0Ã.C0c                ób   — t        | dd «      xs g }|rddj                  d„ |D «       «      z   S dS )Nr¦   r_   c              3  ó8   K  — | ]  }d t        |«      › �–— Œ y­w)r[   NrÆ   )r”   r™   s     r7   r•   z2register.<locals>.userbot_lines.<locals>.<genexpr>·  s   è ø€ Ð @¹%°Q 4¬¨A« x¤¹%ùs   ‚r@   )rŸ   rx   )Údeleterr¦   s     r7   Úuserbot_lineszregister.<locals>.userbot_linesµ  s7   € Ü˜ ¨$Ó/Ò5°2ˆÙEJ��t—y‘yÑ @¹%Ó @Ó@Ñ@ÐRÐPRÐRr6   Úrpdyc              “  ó  •‡ ‡K  — t        ‰‰ «        ‰|«      ƒ d {  –—† \  }}|j                  dvs|j                  rt        d«      ‚‰j                  j                  «       rt        d«      ‚dgŠˆ ˆfd„}‰j                  �#‰j                  j                  |«      ƒ d {  –—† nd\  }}	 ‰j                  4 ƒd {  –—†  t        ‰‰||dd||¬	«      ƒ d {  –—† }d d d «      ƒd {  –—†  |�|j                  «       ƒ d {  –—†  	 ‰j                  |j                  «      ƒ d {  –—† } ‰|«      }	j                  rd
|j                  › d�nd}
|j                  dk(  rŒ|j                  s€‰j                  |j                  d«      ƒ d {  –—†  t!        ‰ d|j"                  › d|
› dt%        ||d   «      › d|	› �t'        j(                  dd|j                  › �«      gg«      ƒ d {  –—†  y t+        t-        ‰j                  |j                  |j.                  |j0                  ¬«      «      }t!        ‰ d|j"                  › |
› d|j                  › d|› |	› d|d   › d�t'        j(                  dd|j                  › �«      gt'        j(                  dd|j                  › �«      gg«      ƒ d {  –—†  y 7 �Œ“7 �Œ7 �Œù7 �Œá7 �ŒÔ# 1 ƒd {  –—†7  sw Y   �ŒåxY w7 �ŒÓ# |�|j                  «       ƒ d {  –—†7   w w xY w7 �ŒÓ7 �Œq7 �Œ7 ŒW­w) Nrw  r‡  rg  r%  c              “  óà   •K  — t        j                  «       ‰d   z
  dk  ry t        j                  «       ‰d<   	 t        ‰d| j                  › d�«      ƒ d {  –—†  y 7 Œ# t        $ r Y y w xY w­w)Nr   r'  u   ðŸ—‘ Deleting old postsâ€¦ z done)r3   r4   r   Údeletedr*  )Úrr	  rD   s    €€r7   r+  z-register.<locals>.cb_delete_old.<locals>.progÃ  sk   øè ø€ Ü�~‰~Ó $ q¡'Ñ)¨AÒ-ØÜ—n‘nÓ&ˆD�‰GðÜ+¨EÐ5PÐQR×QZÑQZÐP[Ð[`Ð3aÓb×bÒbùÜò Ùðüs:   ƒ6A.ºA ÁAÁA ÁA.ÁA Á	A+Á(A.Á*A+Á+A.©NNrU   ç      à?)r|   r,  Úfallbackz (z of them by the userbot)r@   r   rx  u   âœ… <b>Done.</b> z old message(s) deletedz8. The channel now consists of the copies (from <a href="rÜ   z*">here</a>), and they are all in My posts.rÝ   rÞ   ©Ú	bot_errorÚfallback_errorÚtriedu   âš ï¸� Deleted rY   z! old message(s) are still there. zb
The copies are complete. You can delete the rest by hand: they are the messages with an id below z. Then close this repost.õ   ðŸ”� Try againr‰  u   âœ… Close this repostrà   )r   rê   rw   r   r2  r3  ÚuserbotÚfallback_forr   Úcloserå   ræ   Ú
by_userbotÚ	remainingr4  r^  r   r”  r#   r   ré   r!   r$   r›  Útried_userbot)r	  r6  rë   r;   r+  r˜  r�  r¥   rì   ÚextraÚbyr½   rD   r:  r  rñ   r  r�  s   `           @€€€€€r7   Úcb_delete_oldzregister.<locals>.cb_delete_old¹  sß  úè ø€ ä�c˜5Ô!Ù˜U›×#‰ˆˆRØ�:‰:Ð6Ñ6¸#¿+º+ÜÐ^Ó_Ð_Ø�8‰8�?‰?ÔÜÐ<Ó=Ð=Øˆuˆõ	ð CFÇ+Á+ÐBY #§+¡+×":Ñ":¸2Ó">×>Ð>Ð_kÑˆ�'ð	&Ø—x—x“xÜ)¨&°"°b¸#¸uÈCÐZ^ÐiqÔr×r�÷  —xð Ð"Ø—m‘m“o×%Ñ%Ø×%Ñ% c§f¡fÓ-×-ˆÙ˜gÓ&ˆØ>A¿nºnˆr�#—.‘.Ð!Ð!9Ñ:ÐRTˆØ�=‰=˜AÒ c§i¢iØ×)Ñ)¨#¯&©&°-Ó@×@Ð@Ü'ØØ# C§K¡K =Ð0GÈÀtð L#Ü#,¨R°°;±Ó#@Ð"AÐAlÐmrÐlsðuä—-‘-Ð 9¸TÀ#Ç&Á&À¸?ÓKÐLÐMó	÷ ð ð ÜÜØ—‘ s§y¡yÀ×ASÑASÐ[^×[lÑ[lôó
ˆô
 $ØØ˜cŸk™k˜]¨2¨$¨b°·±°Ð?`ÐadÐ`eÐfkÐelð mpà�‰~ÐÐ7ð9ô �m‰mÐ,°°c·f±f°XÐ.>Ó?Ð@Ä6Ç=Á=ÐQhÐlpÐqt×qwÑqwÐpxÐjyÓCzÐB{Ð|ó
÷ 	
ñ 	
ðQ $ùð  ?ùàùØrùð  ù—x—x’xúð &úð Ð"Ø—m‘m“o×%Ò%ð #úà-ùð Aùðùð	
ús÷   …L�J0žBLÂ"J3Â#	LÂ-K Â=J6Â>K ÃJ?ÃJ9ÃJ?ÃK Ã(J<Ã)K Ã-LÄKÄ#LÄ&K9Ä'A$LÆK<ÆALÇ&K?Ç'CLÊ*LÊ+LÊ3LÊ6K Ê9J?Ê<K Ê?KËKËKËK ËLËK6Ë.K1Ë/K6Ë6LË<LË?LÌLÚrpuc           
   “  óÔ  •K  — t        ‰| «        ‰|«      ƒ d {  –—† \  }}‰j                  |j                  «      ƒ d {  –—† }|j                  dv s|d   |d   k  rt	        d«      ‚t        | d|d   › dt        |j                  «      › d�t        j                  d	d
|j                  › �«      t        j                  dd|j                  › �«      gg«      ƒ d {  –—†  y 7 ŒÆ7 Œ¢7 Œ	­w)N©rx  Úcopies_deletedÚclosedrˆ  rß   ztSome originals are already deleted, so removing the copies would delete your content. Undo is not possible any more.u   â†©ï¸� <b>Remove the Únew_leftz copied message(s) from z*?</b>
The original posts stay as they are.u   â†©ï¸� Yes, remove the copiesúrpuy:ÚBackrŠ  )
r   rå   ræ   rê   r   r   r!   r{   r   ré   r‹  s        €€€r7   Úcb_undo_askzregister.<locals>.cb_undo_askì  sø   øè ø€ ä�c˜5Ô!Ù˜U›×#‰ˆˆRØ×%Ñ% c§f¡fÓ-×-ˆØ�:‰:ÐDÑDÈÈ*ÉÐXYÐZbÑXcÒHcÜð  Só  Tð  TÜ#ØØ# A j¡M ?Ð2JÌ3ÈrÏxÉxË=È/ð  ZEð  FÜ�m‰mÐ;¸uÀSÇVÁVÀHÐ=MÓNÔPV×P]ÑP]Ð^dÐhlÐmp×msÑmsÐltÐfuÓPvÐwÐxó
÷ 	
ñ 	
ð	 $øØ-øð	
ús4   ƒC(›C"œ%C(ÁC$ÁBC(ÃC&ÃC(Ã$C(Ã&C(Úrpuyc           
   “  ó  •‡ ‡K  — t        ‰‰ «        ‰|«      ƒ d {  –—† \  }}‰j                  |j                  «      ƒ d {  –—† }|j                  dv s|d   |d   k  rt	        d«      ‚‰j
                  j                  «       rt	        d«      ‚‰j                  �#‰j                  j                  |«      ƒ d {  –—† nd\  }}t        «       }dgŠˆ ˆfd„}	 ‰j
                  4 ƒd {  –—†  	 t        ‰‰||‰j                  ||¬	«      ƒ d {  –—†  t!        ‰‰||dd|¬«      ƒ d {  –—† }	d d d «      ƒd {  –—†  |�|j#                  «       ƒ d {  –—†  	 t%        |d¬«      }
|
rddj'                  |
«      z   nd}	j(                  dk(  r]|	j*                  sQ‰j-                  |j                  d«      ƒ d {  –—†  t/        ‰ d|	j0                  › d ‰|«      › |› �«      ƒ d {  –—†  y t3        t5        ‰j                  |	j*                  |	j6                  |	j8                  ¬«      «      }t/        ‰ d|	j0                  › d|	j(                  › d|› |› �t;        j<                  dd|j                  › �«      gg«      ƒ d {  –—†  y 7 �Œd7 �ŒA7 �ŒÌ7 �Œ¡7 �Œ# t        $ r  t        j                  d
«       d|_        Y �Œ¥w xY w7 �Œ”7 �Œ‡# 1 ƒd {  –—†7  sw Y   �Œ˜xY w7 �Œ†# |�|j#                  «       ƒ d {  –—†7   w w xY w7 �ŒE7 �Œ7 Œ†­w)Nr©  rˆ  rß   zUndo is not possible any more.rg  r–  r%  c              “  ó  •K  — t        j                  «       ‰d   z
  dk  ry t        j                  «       ‰d<   	 t        ‰t        | d¬«      «      ƒ d {  –—†  y 7 Œ# t        $ r t
        j                  dd¬«       Y y w xY w­w)Nr   rû   z)Pointing links back at the original posts)r{   rG  TrH  )r3   r4   r   r   r*  rM  rN  )rì   r	  rD   s    €€r7   r+  z'register.<locals>.cb_undo.<locals>.prog  sq   øè ø€ Ü�~‰~Ó $ q¡'Ñ)¨AÒ-ØÜ—n‘nÓ&ˆD�‰GðCÜ+¨E´=ÀÐJuÔ3vÓw×wÒwùÜò CÜ—	‘	Ð2¸T�	ÖBðCüs:   ƒ6BºA ÁAÁA ÁBÁA Á A?Á<BÁ>A?Á?B)r|   r,  r{  z4pointing the links back at the original posts failedTrV   r—  )r|   r˜  )Úbackr_   r@   r   rª  u   â†©ï¸� Done. z@ copied message(s) removed; the original posts were not touched.r™  u   âš ï¸� Removed rY   z copy/copies are still there. r�  r­  )r   rå   ræ   rê   r   r2  r3  rž  rŸ  r   r   r5  r*  rM  r|  rá   r   r   r   rx   r¢  r4  r^  r   r”  r!   r$   r›  r£  r   ré   )r	  r6  rë   r;   rì   r˜  r�  r³  r+  r¥   Ú
link_notesÚ	link_textr½   rD   r  r:  r  rñ   r  r�  s   `            @€€€€€€r7   Úcb_undozregister.<locals>.cb_undoù  sÆ  úè ø€ ä�c˜5Ô!Ù˜U›×#‰ˆˆRØ×%Ñ% c§f¡fÓ-×-ˆØ�:‰:ÐDÑDÈÈ*ÉÐXYÐZbÑXcÒHcÜÐ<Ó=Ð=Ø�8‰8�?‰?ÔÜÐ<Ó=Ð=ØBEÇ+Á+ÐBY #§+¡+×":Ñ":¸2Ó">×>Ð>Ð_kÑˆ�'Ü‹}ˆØˆuˆõ	Cð
	&Ø—x—x“xð(Ü,¨V°R¸¸SÈÏÉÐaeÐnrÔs×sÐsô *¨&°"°b¸#¸uÈCÐZbÔc×c�÷  —xð Ð"Ø—m‘m“o×%Ñ%Ü! $¨TÔ2ˆ
Ù6@�T˜DŸI™I jÓ1Ò1Àbˆ	Ø�=‰=˜AÒ c§i¢iØ×)Ñ)¨#¯&©&Ð2BÓC×CÐCÜ'ØØ §¡˜}Ð,lÙ  Ó)Ð*¨9¨+ð7ó÷ ñ ô Ü#Ø—K‘K¨3¯9©9ÀS×EWÑEWÐ_b×_pÑ_pôóˆCô
 (ØØ! #§+¡+ ¨b°·±°Ð?]Ð^aÐ]bÐclÐbmÐnÜ—-‘-Ð 0°E¸#¿&¹&¸Ð2BÓCÐDÐEó÷ ñ ð[ $ùØ-ùð
 ?ùð  ùàsúÜ ò (Ü—M‘MÐ"XÔYØ#'�D—Lð(úð dùð  ù—x—x’xúð &úð Ð"Ø—m‘m“o×%Ò%ð #úð
 Dùðùðús&  …L�Jž%LÁJÁA7LÂ;JÂ<LÃK Ã)J
Ã*K Ã-KÃ/JÄJÄJÄKÄ(J<Ä)KÄ-K Ä8J?Ä9K Ä=LÅKÅA$LÆ7K<Æ8+LÇ#K?Ç$BLÉ;LÉ<LÊLÊLÊ
K ÊJÊ%J9Ê5KÊ8J9Ê9KÊ?K ËKËKË	KËK ËLËK9Ë1K4Ë2K9Ë9LË?LÌLÚrpkc              “  óÈ   •K  — t        ‰| «        ‰|«      ƒ d {  –—† \  }}‰j                  |j                  d«      ƒ d {  –—†  t        | d«      ƒ d {  –—†  y 7 Œ@7 Œ7 Œ	­w)Nr«  uH   âœ… Closed. Nothing else will be changed in that channel by this repost.)r   r^  ræ   r   )r	  r6  rë   r±   r  rñ   r  s       €€€r7   Úcb_closezregister.<locals>.cb_close/  sY   øè ø€ ä�c˜5Ô!Ù˜E“{×"‰ˆˆQØ×%Ñ% c§f¡f¨hÓ7×7Ð7Ü# EÐ+uÓv×vÑvð #øØ7øØvús3   ƒA"›Aœ&A"ÁAÁA"ÁA ÁA"ÁA"Á A")r  rA   r!  r'   ÚreturnÚNone)r9  r9   rº  r»  ©rº  rA   )r:  rñ   r  Úonr   r   Úpickersr   )r  r  r;  r>  rl  rp  rt  r€  r„  rŒ  r¦  r¯  r¶  r¹  r  r:  rñ   r  rd  r  r�  rò   s   `             @@@@@@@@r7   Úregisterr¿  ^  sà  ÿø€ Ø—j‘j #§&¡&¨#¯'©'€O€FˆB�ô&ðR ‡Y�YŒs�8 $Ô'Ó(Ü
ˆ3�dÔ÷+ó ó )ð+ö:$ð6 $€C‡K�K�Ñä
ˆ3�Ó÷,`ó ð,`ô\ ˆ3�ÓóYó ðY÷:dñ :dôx ˆ3�Óõ#ó ð#ô$ ˆ3�Óõ`ó ð`ô ˆ3�Óó7ó ð7ô ˆ3�Ó÷.mð .mó ð.môbô ˆ3�Óô5ó ð5ô
 ˆ3�Óõ
ó ð
óSô ˆ3�Ó÷0
ó ð0
ôd ˆ3�Óõ

ó ð

ô ˆ3�Ó÷3ð 3ó ð3ôj ˆ3�Óõwó ñwr6   )rO   rA   rº  Útuple)
ry   r   rz   r   r{   rA   r|   r,   rº  rA   )ry   r   r{   rA   r‚   r=   rº  Úlist)rº  rÁ  )r‚   r=   rº  rÁ  r¼  )r  r
   rº  r»  )@r1   Ú
__future__r   Úloggingr  r  r3   Údataclassesr   r   Útelethonr   r   r@   r	   Úcommonr
   r   r   r   r   r   r   r   r   r   Ú
crosslinksr   r   r   r   r   Úlinkswapr   Úprofile_copyr   Úrepost_enginer   r   r   r   r   r    Útgutilr!   r"   r#   rž  r$   Ú	getLoggerr.   rM  r   r&   r9   rW   r€   ro   r¨   r­   r¿   rÁ   rÙ   r¿  r5   r6   r7   Ú<module>rÍ     sÚ   ðÙ oÝ "ã Û 	Û Û ß (ç #å ß v× v× vß jÕ jÝ )Ý (ß k× kß /Ñ /Ý )à€g×Ñ˜Ó!€ðfð ð ÷;ð ;ó ð;ð ÷;ð ;ó ð;ó"óJ4ðn AFõ 1óh.ób
ð (-õ %óPFð +0õ $ôNVwr6   