# ~ Area4 Package by RDIL ~

# Imports:
import random

# Package info variables:
name = "area4"
author = "https://github.com/RDIL"
author_email = "contactspaceboom@gmail.com"
description = "Dividers in Python, the easy way! Multiple different divider looks."

# Divider variables:
divider1 = str("------------------------")
divider2 = str("________________________")
divider3 = str("........................")
divider4 = str("⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛")
divider5 = str("⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️")
divider6 = str("⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️")
divider7 = str("========================")
divider8 = str("########################")
divider9 = str("************************")
divider10 = str(",,,,,,,,,,,,,,,,,,,,,,,,")
divider11 = str("////////////////////////")
divider12 = str("||||||||||||||||||||||||")
divider13 = str("~~~~~~~~~~~~~~~~~~~~~~~~")
divider14 = str("\\\\\\\\\\\\\\\\\\\\\\\\")
divider15 = str("☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕")
divider16 = str("++++++++++++++++++++++++")
divider17 = str("r(`,,,`)r r(`,,,`)r r(`,,,`)r ")
divider18 = str("( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)")
divider19 = str("&&&&&&&&&&&&&&&&&&&&&&&&&")
divider20 = str("^^^^^^^^^^^^^^^^^^^^^^^^^")
divider21 = str("¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯")
divider22 = str("11111111111111111111111")
divider23 = str("22222222222222222222222")
divider24 = str("33333333333333333333333")
divider25 = str("44444444444444444444444")
divider26 = str("55555555555555555555555")
divider27 = str("66666666666666666666666")
divider28 = str("77777777777777777777777")
divider29 = str("88888888888888888888888")
divider30 = str("99999999999999999999999")
divider31 = str("1010101010101010101010")
divider32 = str("<><><><><><><><><><><>")
divider33 = str("^,^,^,^,^,^,^,^,^,^,^,^")
divider34 = str("&*&*&*&*&*&*&*&*&*&*&*&")
divider35 = str(random.randint(0, 99999999999999999999999))
divider36 = str("```````````````````````")
divider37 = str("aaaaaaaaaaaa")
divider38 = str("AAAAAAAAAAAA")
divider39 = str("bbbbbbbbbbbb")
divider40 = str("BBBBBBBBBBBB")
divider41 = str("cccccccccccc")
divider42 = str("CCCCCCCCCCCC")
divider43 = str("dddddddddddd")
divider44 = str("DDDDDDDDDDDD")
divider45 = str("eeeeeeeeeeee")
divider46 = str("EEEEEEEEEEEE")
divider47 = str("ffffffffffff")
divider48 = str("FFFFFFFFFFFF")
divider49 = str("gggggggggggg")
divider50 = str("GGGGGGGGGGGG")
divider51 = str("hhhhhhhhhhhh")
divider52 = str("HHHHHHHHHHHH")
divider53 = str("iiiiiiiiiiii")
divider54 = str("IIIIIIIIIIII")
divider55 = str("jjjjjjjjjjjj")
divider56 = str("JJJJJJJJJJJJ")
divider57 = str("kkkkkkkkkkkk")
divider58 = str("KKKKKKKKKKKK")
divider59 = str("llllllllllll")
divider60 = str("LLLLLLLLLLLL")
divider61 = str("mmmmmmmmmmmm")
divider62 = str("MMMMMMMMMMMM")
divider63 = str("nnnnnnnnnnnn")
divider64 = str("NNNNNNNNNNNN")
divider65 = str("oooooooooooo")
divider66 = str("OOOOOOOOOOOO")
divider67 = str("pppppppppppp")
divider68 = str("PPPPPPPPPPPP")
divider69 = str("qqqqqqqqqqqq")
divider70 = str("QQQQQQQQQQQQ")
divider71 = str("rrrrrrrrrrrr")
divider72 = str("RRRRRRRRRRRR")
divider73 = str("ssssssssssss")
divider74 = str("SSSSSSSSSSSS")
divider75 = str("tttttttttttt")
divider76 = str("TTTTTTTTTTTT")
divider77 = str("uuuuuuuuuuuu")
divider78 = str("UUUUUUUUUUUU")
divider79 = str("vvvvvvvvvvvv")
divider80 = str("VVVVVVVVVVVV")
divider81 = str("wwwwwwwwwwww")
divider82 = str("WWWWWWWWWWWW")
divider83 = str("xxxxxxxxxxxx")
divider84 = str("XXXXXXXXXXXX")
divider85 = str("yyyyyyyyyyyy")
divider86 = str("YYYYYYYYYYYY")
divider87 = str("zzzzzzzzzzzz")
divider88 = str("ZZZZZZZZZZZZ")
divider89 = str("🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️")
divider90 = str("✈️✈️✈️✈️✈️✈️✈️✈️✈️✈️✈️✈️")
divider91 = str("🍂🍂🍂🍂🍂🍂🍂🍂🍂🍂🍂🍂")
divider92 = str("🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️")
custom_div = str("")

# Functions:
def div1():
	"""
	Returns the divider ------------------------

	:return: divider1
	"""
	return divider1

def div2():
	"""
	Returns the divider ________________________
	:return: divider2
	"""

	return divider2

def div3():
	"""
	Returns the divider ........................

	:return: divider3
	"""

	return divider3

def div4():
	"""
	Returns the divider ⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛

	:return: divider4
	"""

	return divider4

def div5():
	"""
	Returns the divider ⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️

	:return: divider5
	"""

	return divider5

def div6():
	"""
	Returns the divider ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️

	:return: divider6
	"""

	return divider6

def div7():
	"""
	Returns the divider ========================

	:return: divider7
	"""

	return divider7

def div8():
	"""
	Returns the divider ########################

	:return: divider8
	"""

	return divider8

def div9():
	"""
	Returns the divider ************************

	:return: divider9
	"""

	return divider9

def div10():
	"""
	Returns the divider ,,,,,,,,,,,,,,,,,,,,,,,,

	:return: divider10
	"""

	return divider10

def div11():
	"""
	Returns the divider ////////////////////////

	:return: divider11
	"""

	return divider11

def div12():
	"""
	Returns the divider ||||||||||||||||||||||||

	:return: divider12
	"""

	return divider12

def div13():
	"""
	Returns the divider ~~~~~~~~~~~~~~~~~~~~~~~~

	:return: divider13
	"""

	return divider13

def div14():
	"""
	Returns the divider \\\\\\\\\\\\\\\\\\\\\\\\

	:return: divider14
	"""

	return divider14

def div15():
	"""
	Returns the divider ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕ ☕

	:return: divider15
	"""

	return divider15

def div16():
	"""
	Returns the divider ++++++++++++++++++++++++

	:return: divider16
	"""

	return divider16

def div17():
	"""
	Returns the divider r(`,,,`)r r(`,,,`)r r(`,,,`)r

	:return: divider17
	"""

	return divider17

def div18():
	"""
	Returns the divider ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)

	:return: divider18
	"""

	return divider18

def div19():
	"""
	Returns the divider &&&&&&&&&&&&&&&&&&&&&&&&&

	:return: divider19
	"""

	return divider19

def div20():
	"""
	Returns the divider ^^^^^^^^^^^^^^^^^^^^^^^^^

	:return: divider20
	"""

	return divider20

def div21():
	"""
	Returns the divider ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯

	:return: divider21
	"""

	return divider21

def div22():
	"""
	Returns the divider 11111111111111111111111

	:return: divider22
	"""

	return divider22

def div23():
	"""
	Returns the divider 22222222222222222222222

	:return: divider23
	"""

	return divider23

def div24():
	"""
	Returns the divider 33333333333333333333333

	:return: divider24
	"""

	return divider24

def div25():
	"""
	Returns the divider 44444444444444444444444

	:return: divider25
	"""

	return divider25

def div26():
	"""
	Returns the divider 55555555555555555555555

	:return: divider26
	"""

	return divider26

def div27():
	"""
	Returns the divider 66666666666666666666666

	:return: divider27
	"""

	return divider27

def div28():
	"""
	Returns the divider 77777777777777777777777

	:return: divider28
	"""

	return divider28

def div29():
	"""
	Returns the divider 88888888888888888888888

	:return: divider29
	"""

	return divider29

def div30():
	"""
	Returns the divider 99999999999999999999999

	:return: divider30
	"""

	return divider30

def div31():
	"""
	Returns the divider 1010101010101010101010

	:return: divider31
	"""

	return divider31

def div32():
	"""
	Returns the divider <><><><><><><><><><><>

	:return: divider32
	"""

	return divider32

def div33():
	"""
	Returns the divider ^,^,^,^,^,^,^,^,^,^,^,^

	:return: divider33
	"""

	return divider33

def div34():
	"""
	Returns the divider &*&*&*&*&*&*&*&*&*&*&*&

	:return: divider34
	"""

	return divider34

def div35():
	"""
	Returns the divider random.randint(0, 99999999999999999999999)

	:return: divider35
	"""

	return divider35

def div36():
	"""
	Returns the divider ```````````````````````

	:return: divider36
	"""

	return divider36

def div37():
	"""
	Returns the divider aaaaaaaaaaaa

	:return: divider37
	"""

	return divider37

def div38():
	"""
	Returns the divider AAAAAAAAAAAA

	:return: divider38
	"""

	return divider38

def div39():
	"""
	Returns the divider bbbbbbbbbbbb

	:return: divider39
	"""

	return divider39

def div40():
	"""
	Returns the divider BBBBBBBBBBBB

	:return: divider40
	"""

	return divider40

def div41():
	"""
	Returns the divider cccccccccccc

	:return: divider41
	"""

	return divider41

def div42():
	"""
	Returns the divider CCCCCCCCCCCC

	:return: divider42
	"""

	return divider42

def div43():
	"""
	Returns the divider dddddddddddd

	:return: divider43
	"""

	return divider43

def div44():
	"""
	Returns the divider DDDDDDDDDDDD

	:return: divider44
	"""

	return divider44

def div45():
	"""
	Returns the divider eeeeeeeeeeee

	:return: divider45
	"""

	return divider45

def div46():
	"""
	Returns the divider EEEEEEEEEEEE

	:return: divider46
	"""

	return divider46

def div47():
	"""
	Returns the divider ffffffffffff

	:return: divider47
	"""

	return divider47

def div48():
	"""
	Returns the divider FFFFFFFFFFFF

	:return: divider48
	"""

	return divider48

def div49():
	"""
	Returns the divider gggggggggggg

	:return: divider49
	"""

	return divider49

def div50():
	"""
	Returns the divider GGGGGGGGGGGG

	:return: divider50
	"""

	return divider50

def div51():
	"""
	Returns the divider hhhhhhhhhhhh

	:return: divider51
	"""

	return divider51

def div52():
	"""
	Returns the divider HHHHHHHHHHHH

	:return: divider52
	"""

	return divider52

def div53():
	"""
	Returns the divider iiiiiiiiiiii

	:return: divider53
	"""

	return divider53

def div54():
	"""
	Returns the divider IIIIIIIIIIII

	:return: divider54
	"""

	return divider54

def div55():
	"""
	Returns the divider jjjjjjjjjjjj

	:return: divider55
	"""

	return divider55

def div56():
	"""
	Returns the divider JJJJJJJJJJJJ

	:return: divider56
	"""

	return divider56

def div57():
	"""
	Returns the divider kkkkkkkkkkkk

	:return: divider57
	"""

	return divider57

def div58():
	"""
	Returns the divider KKKKKKKKKKKK

	:return: divider58
	"""

	return divider58

def div59():
	"""
	Returns the divider llllllllllll

	:return: divider59
	"""

	return divider59

def div60():
	"""
	Returns the divider LLLLLLLLLLLL

	:return: divider60
	"""

	return divider60

def div61():
	"""
	Returns the divider mmmmmmmmmmmm

	:return: divider61
	"""

	return divider61

def div62():
	"""
	Returns the divider MMMMMMMMMMMM

	:return: divider62
	"""

	return divider62

def div63():
	"""
	Returns the divider nnnnnnnnnnnn

	:return: divider63
	"""

	return divider63

def div64():
	"""
	Returns the divider NNNNNNNNNNNN

	:return: divider64
	"""

	return divider64

def div65():
	"""
	Returns the divider oooooooooooo

	:return: divider65
	"""

	return divider65

def div66():
	"""
	Returns the divider OOOOOOOOOOOO

	:return: divider66
	"""

	return divider66

def div67():
	"""
	Returns the divider pppppppppppp

	:return: divider67
	"""

	return divider67

def div68():
	"""
	Returns the divider PPPPPPPPPPPP

	:return: divider68
	"""

	return divider68

def div69():
	"""
	Returns the divider qqqqqqqqqqqq

	:return: divider69
	"""

	return divider69

def div70():
	"""
	Returns the divider QQQQQQQQQQQQ

	:return: divider70
	"""

	return divider70

def div71():
	"""
	Returns the divider rrrrrrrrrrrr

	:return: divider71
	"""

	return divider71

def div72():
	"""
	Returns the divider RRRRRRRRRRRR

	:return: divider72
	"""

	return divider72

def div73():
	"""
	Returns the divider ssssssssssss

	:return: divider73
	"""

	return divider73

def div74():
	"""
	Returns the divider SSSSSSSSSSSS

	:return: divider74
	"""

	return divider74

def div75():
	"""
	Returns the divider tttttttttttt

	:return: divider75
	"""

	return divider75

def div76():
	"""
	Returns the divider TTTTTTTTTTTT

	:return: divider76
	"""

	return divider76

def div77():
	"""
	Returns the divider uuuuuuuuuuuu

	:return: divider77
	"""

	return divider77

def div78():
	"""
	Returns the divider UUUUUUUUUUUU

	:return: divider78
	"""

	return divider78

def div79():
	"""
	Returns the divider vvvvvvvvvvvv

	:return: divider79
	"""

	return divider79

def div80():
	"""
	Returns the divider VVVVVVVVVVVV

	:return: divider80
	"""

	return divider80

def div81():
	"""
	Returns the divider wwwwwwwwwwww

	:return: divider81
	"""

	return divider81

def div82():
	"""
	Returns the divider WWWWWWWWWWWW

	:return: divider82
	"""

	return divider82

def div83():
	"""
	Returns the divider xxxxxxxxxxxx

	:return: divider83
	"""

	return divider83

def div84():
	"""
	Returns the divider XXXXXXXXXXXX

	:return: divider84
	"""

	return divider84

def div85():
	"""
	Returns the divider yyyyyyyyyyyy

	:return: divider85
	"""

	return divider85

def div86():
	"""
	Returns the divider YYYYYYYYYYYY

	:return: divider86
	"""

	return divider86

def div87():
	"""
	Returns the divider zzzzzzzzzzzz

	:return: divider87
	"""

	return divider87

def div88():
	"""
	Returns the divider ZZZZZZZZZZZZ

	:return: divider88
	"""

	return divider88

def div89():
	"""
	Returns the divider 🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️🏖️

	:return: divider89
	"""

	return divider89

def div90():
	"""
	Returns the divider ✈️✈️✈️✈️✈️✈️✈️✈️✈️✈️✈️✈️

	:return: divider90
	"""

	return divider90

def div91():
	"""
	Returns the divider 🍂🍂🍂🍂🍂🍂🍂🍂🍂🍂🍂🍂

	:return: divider91
	"""

	return divider91

def div92():
	"""
	Returns the divider 🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️🗝️

	:return: divider92
	"""

	return divider92

def customdiv():
    return custom_div

def make_div(unit: str, length: int = 24, start: str = '', end: str = '', literal_unit=False) -> str:
    """
    Generates and returns a custom divider

    :param unit: str containing a repeating unit
    :param length: The maximum length that will not be exceeded (default: 24)
    :param start: optional starting string
    :param end: optional ending string
    :param literal_unit: if True will not try to break unit down into smaller repeating subunits
    :return: a custom created divider
    :rtype: str

    :Example:

    custom_div = make_div(unit='=-', length=40, start='<', end='=>')

    note:: The generated string will be terminated at the specified length regardless
     of whether all the input strings have been fully replicated.  A unit > 1 length may
     not be able to be replicated to extend to the full length.  In this situation, the
     string will be shorter than the specified length.

     Example: unit of 10 characters and a specified length of 25 will contain 2 units for
      a total length of 20 characters.
    """

    # reduce the size if possible to extend closer to full length
    if not literal_unit:
        unit = _reduce_to_unit(unit)
    repeats = (length - len(start + end)) // len(unit)

    return (start + unit * repeats + end)[0:length]


# reduces a repeating divider to the smallest repeating unit possible
# example: 'XxXxXxX' -> 'Xx'
def _reduce_to_unit(divider: str) -> str:
    for unit_size in range(1, len(divider) // 2 + 1):
        length = len(divider)
        unit = divider[:unit_size]
        remainder = length % unit_size

        # ignores mismatches in final characters
        if unit * (length // unit_size) == divider[:unit_size * (length // unit_size)]:
            return unit
    return divider  # return original if smaller unit not found


def area4info():
    info = f"Name: {name}"
    info += f"\nAuthor: {author}"
    info += f"\nAuthor Email: {author_email}"
    info += f"\nDescription: {description}"
    return info
