05AB1E, 137 135 128 122 121 bytes
…( )7ÝJ»•αγʒδÓ₂©8¥ŽQxΣxêÿ•sÅвJIvN”</[(
._-=:"ÆŸ,*”º•DùÙÂ+;Èγтáì³ÓW©ÎÂ_`ƒ≠îj*ΓçÊ~ÞÒ¸β¦oåb/õ47/vÎΓ”›≠øØZµλݺ•20вè¶¡Nè4äyè.;
-6 bytes thanks to @Grimy.
Try it online or verify a few more test cases.
Explanation:
We first create the template-string:
…( ) # Push string "( )"
7ÝJ # Push a list in the range [0,7] joined together: "01234567"
» # Join both by a newline: "( )\n01234567"
•αγʒδÓ₂©2°ćì₂òη₆½•
# Push compressed integer 80545642885242518310229085147411483894
s # Swap to get the earlier created string at the top of the stack
Åв # Convert the large integer to base-"( )\n01234567",
# which basically converts to base-length, and indexes into the string:
# [" ","0","0","0","0","0","\n"," ","0","0","0","0","0","\n","4","(","2","1","3",")","5","\n","4","(","6","6","6",")","5","\n"," ","(","7","7","7",")"]
J # And join it to a single string: " 00000\n 00000\n4(213)5\n4(666)5\n (777)"
Which looks like this:
00000
00000
4(213)5
4(666)5
(777)
Then I loop over the digits of the input:
I # Get the input
v # Loop `y` over each of its digits:
And do the following:
Push the (0-indexed) index N of the list:
N # Push the index of the loop
Push all possible parts as a list of character lists:
”</[(
._-=:"ÆŸ,*”
"# Push dictionary string "</[(\n._-=:" Oo,*"
º # Mirror each line: "</[()]\>\n._-=:" Oo,**,oO ":=-_."
•DùÙÂ+;Èγтáì³ÓW©ÎÂ_`ƒ≠îj*ΓçÊ~ÞÒ¸β¦oåb/õ47/vÎΓ”›≠øØZµλݺ•
# Push compressed integer 492049509496347122906361438631265789982480759119518961177677313610613993948059787418619722816092858096158180892708001681647316210
20в # Convert it to Base-20 as list: [15,10,10,10,15,3,10,19,10,4,15,15,15,15,15,10,12,12,12,10,15,10,10,10,15,9,9,9,9,9,15,15,10,15,15,15,1,10,6,15,8,15,18,9,10,8,11,9,17,16,8,11,9,17,16,8,15,15,15,0,6,15,15,1,8,15,15,15,7,1,15,15,6,8,15,15,15,15,13,15,5,15,2,7,15,0,8,15,15,15,15,13,15,14,15,14,10,10,10]
è # Index each into the string: [" ","_","_","_"," ","(","_","*","_",")"," "," "," "," "," ","_","=","=","=","_"," ","_","_","_"," ",".",".",".",".","."," "," ","_"," "," "," ","/","_","\"," ","\n"," ",",",".","_","\n","-",".","o","O","\n","-",".","o","O","\n"," "," "," ","<","\"," "," ","/","\n"," "," "," ",">","/"," "," ","\","\n"," "," "," "," ",":"," ","]"," ","[",">"," ","<","\n"," "," "," "," ",":"," ","""," ",""","_","_","_"]
¶¡ # Split it by the newline character: [[" ","_","_","_"," ","(","_","*","_",")"," "," "," "," "," ","_","=","=","=","_"," ","_","_","_"," ",".",".",".",".","."," "," ","_"," "," "," ","/","_","\"," "],[" ",",",".","_"],["-",".","o","O"],["-",".","o","O"],[" "," "," ","<","\"," "," ","/"],[" "," "," ",">","/"," "," ","\"],[" "," "," "," ",":"," ","]"," ","[",">"," ","<"],[" "," "," "," ",":"," ","""," ",""","_","_","_"]]
Use the loop index N to get the character-list of the part we are currently working with:
Nè # Index the loop index into it
# i.e. 6 → [" "," "," "," ",":"," ","]"," ","[",">"," ","<"]
Then split the character list into four equal part, and use the input-digit y (which is 1-indexed) to index into it. (NOTE: Since 05AB1E is 0-indexed, but the input is 1-indexed, it would be logical to decrease the digit by 1 before indexing. However, since 05AB1E has automatic wraparound (i.e. indexing 3 in list [1,3,5] will result in 1), I simply rotated the parts once so parts with nr 4 in the challenge description, are at the front of the lists.)
4ä # Split it into 4 equal parts
# i.e. [[" "," "," "],[" ",":"," "],["]"," ","["],[">"," ","<"]]
yè # Index the input-digit `y` into it (with automatic wraparound)
# i.e. 4 → [" "," "," "]
And then replace the 0-indexed index of the loop we pushed at first, one by one with the part-characters:
.; # Replace first; every index of the loop `N` in the template-string
# is replaced one by one with the characters
And in the end the result is output implicitly.
See this 05AB1E tip of mine (section How to compress large integers? and How to compress integer lists?) to understand how the compression parts work.
As for my favorite, it's still the same 'snow rabbit' as 1.5 year ago when I posted my Java solution:
44114432:
_
(_*_)
(. .)
(> <)
(" ")