defmodule Level10Web.GameComponents do
  @moduledoc """
  Provides UI components for the game screen.
  """

  use Level10Web, :html
  alias Level10.Games.Card

  @doc """
  Renders a card.
  """
  attr :card, Card, required: true
  attr :class, :string, default: nil
  attr :selected, :boolean, default: false

  @spec card(map) :: Phoenix.LiveView.Rendered.t()
  def card(assigns) do
    ~H"""
    <div class={["relative", @class]}>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 153 216" fill="none" class="w-full h-full">
        <rect
          width="142.568"
          height="205.159"
          x="5.216"
          y="5.625"
          fill={fill_color(@card.color)}
          stroke="#fff"
          stroke-width="10.432"
          rx="19.125"
        />
        <path fill="#fff" d={value_path(@card.value)} class="drop-shadow-md" />
      </svg>
      <div :if={@selected} class="w-full h-full absolute inset-0 bg-white/30 rounded-xl"></div>
    </div>
    """
  end

  @doc """
  Renders the back of a card.
  """
  @spec card_back(map) :: Phoenix.LiveView.Rendered.t()
  def card_back(assigns) do
    ~H"""
    <svg viewBox="0 0 153 216" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-full">
      <rect
        x="5.215"
        y="5.215"
        width="142.57"
        height="205.57"
        rx="19.125"
        fill="#0F172A"
        stroke="white"
        stroke-width="10.43"
      />
      <path
        d="M50.9555 79.3302L50.8885 79.3184L50.8208 79.3127C49.761 79.2234 49.0567 79.0097 48.5179 78.7038C47.9838 78.4007 47.5061 77.9467 46.9901 77.2084C46.3599 76.3066 46.2165 75.4652 46.371 74.7411C46.4711 74.2716 46.7142 73.7707 47.1478 73.2785L51.4515 79.4365C51.2868 79.394 51.121 79.3594 50.9555 79.3302ZM54.4206 83.0755C54.7824 83.2983 55.1841 83.4599 55.627 83.5381C56.7175 83.7307 57.7463 83.3633 58.6171 82.7524C61.2375 80.9141 62.9194 78.3661 63.4203 75.5195C63.9217 72.671 63.217 69.658 61.313 66.9336C59.3151 64.0749 56.6143 62.3372 53.5551 61.9281C50.5141 61.5213 47.3102 62.4516 44.3138 64.5537C41.3033 66.6657 39.3459 69.3102 38.757 72.3191C38.166 75.3386 39.0037 78.4672 41.0763 81.4328C43.5307 84.9448 47.0778 87.2709 50.7446 86.8245C51.5561 86.7733 52.2404 86.5456 52.8807 86.0963C53.7452 85.4899 54.2742 84.6126 54.3958 83.6356C54.4192 83.4479 54.4271 83.2608 54.4206 83.0755ZM55.6261 74.019L52.6985 69.83C53.8017 69.7076 54.788 70.1756 55.4143 71.0718C56.0489 71.9797 56.1383 73.0632 55.6261 74.019ZM59.6626 101.254L59.6626 101.255L59.6732 101.252L74.9369 97.193C74.9382 97.1927 74.9395 97.1923 74.9408 97.192C75.6321 97.0112 76.2887 96.7166 76.8836 96.32L76.8984 96.3101L76.913 96.2999C78.8655 94.9301 79.0423 92.3016 77.7622 90.47C77.2212 89.6959 76.4692 89.0994 75.5277 88.8312C74.6042 88.5682 73.6314 88.6586 72.6895 89.0128L63.198 92.1159L69.342 84.3024C69.9778 83.5222 70.4178 82.6387 70.4979 81.6646C70.5801 80.6652 70.2687 79.7479 69.7149 78.9555C69.0714 78.0347 68.1693 77.3265 67.0918 77.055C65.9859 76.7763 64.8325 76.9954 63.835 77.6951C63.2719 78.0901 62.7764 78.6769 62.4904 79.0155C62.446 79.068 62.4067 79.1146 62.373 79.1535L62.3174 79.2176L62.2694 79.2876L53.3784 92.2502C52.6565 93.2841 52.1709 94.388 52.1635 95.6138C52.156 96.8449 52.6321 97.9676 53.3777 99.0344C54.1091 100.081 55.0067 100.868 56.1543 101.255C57.2866 101.636 58.4721 101.562 59.6626 101.254ZM75.9128 115.041L75.8602 115.031L75.807 115.026C74.7078 114.912 73.9954 114.695 73.4571 114.392C72.9295 114.096 72.4622 113.655 71.9475 112.919C71.3172 112.017 71.1738 111.176 71.3283 110.451C71.4285 109.982 71.6716 109.481 72.1052 108.989L76.4089 115.147C76.2441 115.104 76.0784 115.07 75.9128 115.041ZM79.3767 118.756C79.7296 118.968 80.12 119.122 80.5489 119.198C81.6394 119.39 82.6682 119.023 83.539 118.412C86.1594 116.574 87.8413 114.026 88.3422 111.179C88.8435 108.331 88.1389 105.318 86.2349 102.593C84.237 99.7345 81.5362 97.9969 78.477 97.5878C75.436 97.181 72.2321 98.1113 69.2357 100.213C66.2252 102.325 64.2678 104.97 63.6789 107.979C63.0879 110.998 63.9256 114.127 65.9982 117.093L66.0336 117.143C68.4881 120.655 72.0352 122.981 75.702 122.535C76.5134 122.484 77.1978 122.256 77.8381 121.807C78.7025 121.2 79.2316 120.323 79.3532 119.346C79.3778 119.148 79.3852 118.951 79.3767 118.756ZM74.3789 128.582L74.1434 128.747L75.0027 129.977C75.6623 130.921 76.606 131.629 77.7703 131.834C78.9388 132.041 80.111 131.703 81.1508 130.973L100.187 117.618C101.26 116.866 101.976 115.854 102.182 114.68C102.388 113.513 102.055 112.382 101.406 111.454C100.748 110.512 99.7988 109.793 98.6255 109.577C97.4427 109.359 96.2444 109.69 95.1718 110.442L76.186 123.761C75.128 124.503 74.4254 125.517 74.236 126.697C74.1321 127.345 74.1923 127.982 74.3789 128.582ZM111.694 128.68L111.685 128.677L111.677 128.674L105.331 126.359C104.644 126.072 103.945 125.923 103.224 126C102.487 126.078 101.875 126.377 101.356 126.741C99.6895 127.91 99.2717 130.047 100.436 131.713C100.961 132.463 101.548 132.934 102.445 133.285L102.462 133.291L102.479 133.298L104.597 134.068L90.3156 144.087C89.2897 144.807 88.6066 145.823 88.41 146.991C88.2141 148.154 88.5245 149.325 89.2184 150.317C89.9267 151.331 90.9398 151.997 92.096 152.183C93.2464 152.369 94.4109 152.06 95.402 151.365L114.135 138.223C115.219 137.463 116.005 136.414 116.238 135.142C116.471 133.866 116.105 132.594 115.323 131.475C114.925 130.905 114.483 130.363 113.879 129.878C113.275 129.392 112.571 129.012 111.694 128.68ZM101.609 168.479L101.724 168.399C103.938 170.949 106.819 172.348 110.076 172.51C113.751 172.694 117.742 171.298 121.668 168.543C125.595 165.789 128.236 162.532 129.282 159.026C130.343 155.469 129.704 151.836 127.407 148.549C125.122 145.28 121.917 143.451 118.207 143.237C114.549 143.026 110.571 144.391 106.64 147.149C102.694 149.917 100.007 153.183 98.9227 156.7C97.8207 160.272 98.4297 163.929 100.75 167.249L101.609 168.479ZM32.8161 68.858C33.4385 69.7485 34.3032 70.4345 35.3648 70.6701C36.4476 70.9104 37.5281 70.6353 38.4529 69.9865C39.3634 69.3478 39.9768 68.4243 40.1294 67.3396C40.2802 66.2678 39.9591 65.2048 39.3224 64.2937L34.4032 57.255L50.0853 46.2534C51.1213 45.5266 51.8889 44.5481 52.1192 43.3448C52.3509 42.134 51.9881 40.9596 51.2838 39.9518C50.5918 38.9616 49.6366 38.2024 48.412 38.0149C47.2019 37.8296 46.0332 38.25 44.9989 38.9755L26.57 51.9041C25.5339 52.6309 24.7663 53.6094 24.536 54.8127C24.3043 56.0235 24.6671 57.1979 25.3715 58.2058L32.8161 68.858ZM80.3717 106.782C81.0062 107.69 81.0956 108.774 80.5835 109.729L77.6559 105.54C78.759 105.418 79.7454 105.886 80.3717 106.782ZM107.104 162.792C106.479 161.897 106.373 160.827 107.043 159.447C107.748 157.994 109.294 156.284 111.848 154.492C114.377 152.719 116.465 151.878 118.029 151.731C119.506 151.592 120.464 152.058 121.103 152.971C121.741 153.885 121.851 154.947 121.215 156.289C120.542 157.712 119.039 159.39 116.511 161.164C113.951 162.96 111.827 163.842 110.229 164.013C108.72 164.175 107.751 163.717 107.104 162.792Z"
        fill="white"
        stroke="#6D28D9"
        stroke-width="3"
      />
    </svg>
    """
  end

  @doc """
  Renders the empty discard pile placeholder.
  """
  @spec empty_discard_pile(map) :: Phoenix.LiveView.Rendered.t()
  def empty_discard_pile(assigns) do
    ~H"""
    <svg viewBox="0 0 153 216" xmlns="http://www.w3.org/2000/svg" fill="none" class="w-full">
      <g>
        <rect width="149" height="212" x="2" y="2" stroke="#A78BFA" stroke-width="4" rx="22.34" />
        <path
          fill="#A78BFA"
          d="M20.035 99h6.836c7.4 0 11.758-4.597 11.758-12.424 0-7.827-4.358-12.237-11.758-12.237h-6.836c-1.623 0-2.58.992-2.58 2.683V96.3c0 1.709.957 2.7 2.58 2.7Zm2.58-4.272V78.595h3.64c4.547 0 7.11 2.837 7.11 7.998 0 5.332-2.495 8.135-7.11 8.135h-3.64Zm21.5-16.321c1.504 0 2.666-1.145 2.666-2.58 0-1.453-1.162-2.581-2.666-2.581s-2.666 1.128-2.666 2.58c0 1.436 1.162 2.58 2.666 2.58Zm0 20.952c1.538 0 2.495-.974 2.495-2.598V82.918c0-1.623-.957-2.614-2.495-2.614-1.555 0-2.495.99-2.495 2.614v13.843c0 1.624.94 2.598 2.495 2.598Zm13.296.034c4.836 0 8.1-2.358 8.1-5.999 0-2.734-1.606-4.17-5.503-4.99l-3.025-.65c-1.828-.392-2.546-1.025-2.546-1.982 0-1.179 1.18-1.982 2.871-1.982 1.794 0 2.786.854 3.657 1.965.445.53 1.162.77 1.812.77 1.282 0 1.914-.701 1.914-1.71 0-.239-.051-.478-.12-.734-.598-2.068-3.383-3.794-7.177-3.794-4.751 0-7.776 2.255-7.776 5.759 0 2.717 1.811 4.546 5.4 5.315l3.076.65c1.795.392 2.427.922 2.427 1.913 0 1.214-1.18 1.966-2.99 1.966-1.898 0-3.026-.581-4-1.863-.683-.77-1.367-1.128-2.17-1.128-1.162 0-2.017.769-2.017 1.914 0 .273.069.598.188.923.872 2.153 3.675 3.657 7.879 3.657Zm18.935 0c3.504 0 6.631-1.743 7.725-4.238.222-.496.325-.906.325-1.299 0-1.23-.94-2-2.103-2-1.06 0-1.606.428-2.273 1.47-.769 1.299-1.845 2.154-3.588 2.154-2.496 0-4.05-2.051-4.05-5.657 0-3.538 1.554-5.623 4.084-5.623 1.59 0 2.7.735 3.606 2.341.513.906 1.11 1.3 2.102 1.3 1.179 0 2.136-.718 2.136-1.949 0-.359-.103-.803-.273-1.23-.992-2.598-4.05-4.375-7.725-4.375-5.503 0-8.99 3.691-8.99 9.553 0 5.93 3.504 9.553 9.024 9.553Zm16.133-.103c2.29 0 4.58-1.145 5.606-3.093h.102v.94c.103 1.47 1.043 2.222 2.393 2.222 1.418 0 2.426-.855 2.426-2.512V86.405c0-3.692-3.059-6.118-7.758-6.118-3.794 0-6.734 1.35-7.588 3.537-.171.376-.257.735-.257 1.128 0 1.128.872 1.914 2.085 1.914.803 0 1.436-.307 1.983-.923 1.11-1.435 2.033-1.93 3.554-1.93 1.88 0 3.077.99 3.077 2.7v1.213l-4.615.273c-4.58.274-7.143 2.205-7.143 5.537 0 3.299 2.649 5.554 6.135 5.554Zm1.64-3.605c-1.674 0-2.802-.855-2.802-2.222 0-1.299 1.06-2.136 2.922-2.273l3.863-.24v1.334c0 1.982-1.795 3.4-3.982 3.4Zm14.612 3.674c1.521 0 2.496-.94 2.496-2.598v-8.135c0-2.17.803-3.452 3.076-3.486.974-.017 1.692-.24 2.17-.65.479-.41.718-1.008.718-1.794 0-.854-.239-1.47-.718-1.845-.359-.308-.889-.462-1.555-.462-1.829 0-3.333 1.35-3.811 3.623h-.103v-1.196c0-1.59-.957-2.512-2.358-2.512-1.436 0-2.41.923-2.41 2.512V96.76c0 1.658.992 2.598 2.495 2.598Zm16.441-.069c2.82 0 4.836-1.47 5.64-3.52h.085v1.06c0 1.674 1.077 2.529 2.512 2.529 1.453 0 2.478-.872 2.478-2.53V76.58c0-1.71-1.025-2.616-2.495-2.616-1.453 0-2.495.906-2.495 2.615v7.246h-.103c-.888-2.034-2.939-3.435-5.588-3.435-4.597 0-7.502 3.606-7.502 9.417 0 5.862 2.888 9.484 7.468 9.484Zm1.692-4.016c-2.512 0-4.051-2.067-4.051-5.434 0-3.35 1.539-5.452 4.051-5.452 2.478 0 4.067 2.12 4.067 5.452 0 3.35-1.589 5.434-4.067 5.434Zm-74.717 46.051c1.623 0 2.58-.992 2.58-2.683v-5.418h4.615c5.195 0 8.801-3.384 8.801-8.442 0-5.076-3.486-8.443-8.545-8.443h-7.451c-1.624 0-2.58.992-2.58 2.683v19.62c0 1.691.956 2.683 2.58 2.683Zm2.58-12.134v-8.767h3.504c2.956 0 4.666 1.572 4.666 4.375 0 2.82-1.727 4.392-4.683 4.392h-3.486Zm18.629-8.784c1.503 0 2.666-1.145 2.666-2.581 0-1.452-1.163-2.58-2.666-2.58-1.504 0-2.666 1.128-2.666 2.58 0 1.436 1.162 2.581 2.666 2.581Zm0 20.952c1.538 0 2.495-.974 2.495-2.598v-13.843c0-1.623-.957-2.614-2.495-2.614-1.556 0-2.496.991-2.496 2.614v13.843c0 1.624.94 2.598 2.496 2.598Zm8.442 0c1.47 0 2.495-.889 2.495-2.598v-20.183c0-1.709-1.025-2.615-2.495-2.615-1.453 0-2.495.906-2.495 2.615v20.183c0 1.709 1.042 2.598 2.495 2.598Zm14.287.034c3.538 0 6.374-1.333 7.588-3.589.222-.41.342-.82.342-1.213 0-1.145-.872-1.829-1.949-1.829-.649 0-1.093.188-1.623.735-1.35 1.589-2.546 2.205-4.375 2.205-2.53 0-4.17-1.778-4.17-4.495v-.222h10.459c1.384 0 2.17-.786 2.17-2.171 0-4.973-3.486-8.527-8.681-8.527-5.418 0-8.853 3.742-8.853 9.638 0 5.93 3.367 9.468 9.092 9.468Zm-4.136-11.467c.171-2.342 1.76-3.948 3.948-3.948 2.188 0 3.726 1.555 3.828 3.948H91.95Z"
        />
      </g>
    </svg>
    """
  end

  @spec fill_color(Card.color()) :: String.t()
  defp fill_color(:black), do: "#0F172A"
  defp fill_color(:red), do: "#EF4444"
  defp fill_color(:yellow), do: "#EAB308"
  defp fill_color(:green), do: "#16A34A"
  defp fill_color(:blue), do: "#0284C7"

  @spec value_path(Card.value()) :: String.t()
  defp value_path(:wild),
    do:
      "M57.1543 142.439C61.5094 142.439 63.9849 140.285 65.3143 135.425L76.2708 96.367H76.6834L87.6857 135.425C89.0151 140.376 91.4448 142.439 95.8916 142.439C100.155 142.439 102.539 140.33 103.914 135.471L117.759 85.3189C118.217 83.5769 118.492 81.9265 118.492 80.7346C118.492 76.8838 115.879 74.4999 111.662 74.4999C108.04 74.4999 105.839 76.4712 104.968 80.4595L95.0664 123.323H94.6997L83.5598 80.5971C82.5513 76.517 80.2591 74.4999 76.5 74.4999C72.6492 74.4999 70.4487 76.3795 69.3943 80.6887L58.2545 123.323H57.8878L47.9857 80.4595C47.1605 76.517 44.96 74.4999 41.3385 74.4999C37.1209 74.4999 34.5079 76.8838 34.5079 80.7346C34.5079 81.9723 34.7829 83.6227 35.2413 85.3189L49.0401 135.379C50.4154 140.33 52.7992 142.439 57.1543 142.439Z"

  defp value_path(:skip),
    do:
      "M76.5458 142.668C93.0493 142.668 103.181 134.508 103.181 121.581C103.181 111.541 97.1293 105.902 83.1014 103.106L76.1333 101.685C68.2941 100.126 65.1309 97.6048 65.1309 93.5248C65.1309 88.6654 69.6694 85.4564 76.5 85.4564C82.1845 85.4564 86.4479 87.5193 88.6484 92.5162C90.207 95.3585 92.1324 96.5963 95.2498 96.5963C98.7797 96.5963 101.164 94.3499 101.164 91.0493C101.164 89.8573 100.98 88.8946 100.659 87.9778C97.7253 79.3593 88.6025 74.2707 76.5 74.2707C61.7844 74.2707 51.2405 82.2932 51.2405 94.3958C51.2405 104.252 57.7044 110.578 70.9072 113.191L77.9211 114.567C86.2187 116.263 89.336 118.738 89.336 123.093C89.336 127.953 84.2933 131.529 76.8667 131.529C70.5404 131.529 65.3602 129.236 63.2055 124.194C61.5552 121.26 59.6756 120.16 56.8334 120.16C53.2576 120.16 50.7363 122.589 50.7363 126.257C50.7363 127.494 51.0113 128.778 51.4697 129.97C54.1286 137.213 62.8846 142.668 76.5458 142.668Z"

  defp value_path(:one),
    do:
      "M82.0012 142.531C86.0812 142.531 88.8318 139.78 88.8318 135.609V82.1557C88.8318 77.3881 85.8978 74.4083 80.9926 74.4083C78.1503 74.4083 75.9499 74.8208 72.7409 77.0213L59.6298 86.0982C57.4752 87.611 56.65 89.1697 56.65 91.2785C56.65 94.2124 58.7129 96.2295 61.5094 96.2295C62.9305 96.2295 63.8932 95.9086 65.1768 94.9917L74.8497 88.2528H75.1247V135.609C75.1247 139.78 77.9211 142.531 82.0012 142.531Z"

  defp value_path(:two),
    do:
      "M59.2631 141.568H95.8916C99.4673 141.568 101.622 139.322 101.622 136.067C101.622 132.72 99.4673 130.566 95.8916 130.566H70.953V130.291L85.256 116.538C96.0749 106.315 100.017 101.272 100.017 93.2039C100.017 81.8348 90.5738 73.9498 76.5458 73.9498C64.0307 73.9498 55.7331 80.7804 53.4868 88.1153C53.1659 89.078 52.9826 90.0407 52.9826 91.0951C52.9826 94.5333 55.183 96.7338 58.8963 96.7338C61.8761 96.7338 63.4806 95.4502 65.0393 92.6996C67.4231 87.3818 71.0905 84.7229 76.4083 84.7229C82.3221 84.7229 86.5396 88.6196 86.5396 94.0749C86.5396 98.8426 84.4308 102.052 76.2708 109.891L56.5583 128.732C53.7619 131.299 52.7534 133.041 52.7534 135.654C52.7534 139.139 54.908 141.568 59.2631 141.568Z"

  defp value_path(:three),
    do:
      "M76.1791 143.035C91.5365 143.035 101.943 135.058 101.943 123.048C101.943 113.925 95.5707 108.149 85.7144 107.232V106.957C93.5077 105.352 99.5132 99.8511 99.5132 91.4618C99.5132 80.8721 90.0695 73.9498 76.0874 73.9498C64.3975 73.9498 56.8792 79.3593 53.9453 85.8232C53.2576 87.3818 52.9367 88.7113 52.9367 90.2699C52.9367 93.6165 54.908 95.8628 58.7588 95.8628C61.8761 95.8628 63.4806 94.7167 64.9934 91.5994C67.148 86.9234 70.5404 84.5854 76.1333 84.5854C82.8263 84.5854 86.4021 88.1153 86.4021 93.4331C86.4021 98.8426 81.9095 102.602 74.9872 102.602H72.2825C68.9359 102.602 67.0105 104.619 67.0105 107.507C67.0105 110.487 68.9359 112.458 72.2825 112.458H75.1706C83.1931 112.458 87.9149 116.034 87.8691 122.452C87.8691 127.953 83.1931 131.895 76.4083 131.895C69.5319 131.895 65.9561 129.145 63.6181 124.515C62.2428 121.993 60.5008 120.893 57.7502 120.893C53.9453 120.893 51.6531 123.139 51.6531 126.715C51.6531 128.09 51.974 129.557 52.7075 131.07C55.8248 137.58 63.5723 143.035 76.1791 143.035Z"

  defp value_path(:four),
    do:
      "M88.8776 142.531C92.6826 142.531 95.479 140.193 95.479 135.792V129.42H99.2381C102.86 129.42 104.923 127.174 104.923 123.919C104.923 120.664 102.906 118.372 99.2381 118.372H95.479V84.402C95.479 78.2132 91.0781 74.4083 84.0641 74.4083C78.4712 74.4083 75.1247 76.7004 70.5404 83.7144C63.3431 94.3958 56.7417 104.481 52.2032 112.641C50.1403 116.263 49.3151 118.83 49.3151 121.672C49.3151 126.302 52.6617 129.42 57.6585 129.42H82.3221V135.792C82.3221 140.193 85.0726 142.531 88.8776 142.531ZM82.5971 118.738H61.4177V118.372C66.7813 108.378 72.8784 99.0718 82.3221 85.4564H82.5971V118.738Z"

  defp value_path(:five),
    do:
      "M77.2335 143.035C92.3158 143.035 102.814 133.5 102.814 119.38C102.814 106.773 93.8286 97.8799 81.176 97.8799C74.4371 97.8799 69.0276 100.539 66.3229 104.802H66.0478L67.6065 86.4191H93.737C97.221 86.4191 99.4215 84.2645 99.4215 80.918C99.4215 77.5714 97.1752 75.4168 93.737 75.4168H64.7184C59.3547 75.4168 56.4666 77.6631 56.0082 83.256L54.0828 107.507C54.037 107.736 54.037 107.874 54.037 108.057C53.8536 111.77 56.0082 114.933 60.5467 114.933C63.6181 114.933 64.9934 114.246 67.6982 111.724C70.0361 109.478 73.3368 107.782 77.2793 107.782C84.4767 107.782 89.6111 112.733 89.6111 119.701C89.6111 126.853 84.4308 132.033 77.2335 132.033C71.2739 132.033 67.3773 129.145 64.9934 124.377C63.4348 121.902 61.6927 120.939 58.9421 120.939C55.3664 120.939 53.1659 123.048 53.1659 126.578C53.1659 128.228 53.5785 129.649 54.2662 131.116C57.5669 138.13 66.7355 143.035 77.2335 143.035Z"

  defp value_path(:six),
    do:
      "M77.6461 143.035C92.4075 143.035 103.135 133.271 103.135 119.564C103.135 107.14 94.3788 98.0174 81.5886 98.0174C72.6492 98.0174 66.1395 102.51 63.5723 108.653H63.2972V107.965C63.3889 93.8457 68.2024 84.8605 77.6461 84.8605C82.1845 84.8605 85.3935 86.5566 88.4192 90.3616C90.4363 92.6996 92.0866 93.8915 94.8372 93.8915C98.4588 93.8915 100.613 91.5077 100.613 88.4362C100.613 87.1984 100.292 86.0065 99.6507 84.7229C96.5334 78.5341 88.6484 73.904 77.6919 73.904C60.5008 73.904 50.0486 87.1068 50.0486 109.02C50.0486 116.721 51.4239 123.277 53.9453 128.411C58.8046 138.13 67.148 143.035 77.6461 143.035ZM77.4627 132.033C70.6779 132.033 65.3602 126.715 65.3602 119.884C65.3602 113.146 70.5863 108.24 77.6002 108.24C84.5684 108.24 89.6569 113.191 89.6569 120.16C89.6111 126.807 84.2475 132.033 77.4627 132.033Z"

  defp value_path(:seven),
    do:
      "M66.9188 142.531C69.8986 142.531 71.5948 141.431 73.1076 138.497L97.6336 91.1409C99.4215 87.6569 100.247 85.4564 100.247 82.9809C100.247 78.2591 96.8084 75.4168 91.9949 75.4168H57.7502C54.4495 75.4168 52.0199 77.5714 52.0199 80.8721C52.0199 84.2187 54.4495 86.4191 57.7502 86.4191H86.2646V86.6942L61.7844 132.537C60.9592 134.05 60.5925 135.288 60.5925 136.892C60.5925 140.101 63.0222 142.531 66.9188 142.531Z"

  defp value_path(:eight),
    do:
      "M76.5 143.035C92.27 143.035 103.318 135.15 103.318 123.689C103.318 114.979 96.946 108.561 87.9149 106.773V106.498C95.6624 104.527 100.888 98.8884 100.888 91.7827C100.888 81.4222 90.8488 73.9498 76.5 73.9498C62.1512 73.9498 52.0657 81.4681 52.0657 91.7369C52.0657 98.9342 57.3376 104.573 65.1309 106.498V106.773C56.0999 108.515 49.6819 114.933 49.6819 123.644C49.6819 135.104 60.6842 143.035 76.5 143.035ZM76.5 102.327C70.2195 102.327 65.7727 98.5675 65.7727 93.158C65.7727 87.7027 70.2195 83.9436 76.5 83.9436C82.7346 83.9436 87.2273 87.7027 87.2273 93.158C87.2273 98.5675 82.7346 102.327 76.5 102.327ZM76.5 132.95C69.211 132.95 64.1224 128.64 64.1224 122.635C64.1224 116.675 69.211 112.412 76.5 112.412C83.789 112.412 88.8318 116.675 88.8318 122.635C88.8318 128.64 83.789 132.95 76.5 132.95Z"

  defp value_path(:nine),
    do:
      "M74.8497 143.035C92.4075 143.035 102.906 129.924 102.906 107.919C102.906 100.172 101.53 93.6165 99.0089 88.5279C94.1954 78.8092 85.852 73.904 75.3081 73.904C60.5467 73.904 49.8194 83.6685 49.8194 97.3756C49.8194 110.257 59.5381 118.968 71.7782 118.968C80.4883 118.968 86.998 114.613 89.3819 108.24H89.6569V108.974C89.6111 122.773 85.1185 132.079 75.3539 132.079C70.357 132.079 67.4231 130.291 64.3516 126.578C62.2887 124.285 60.73 123.048 57.9336 123.048C54.2662 123.048 52.2032 125.386 52.2032 128.457C52.2032 129.649 52.4783 130.795 53.1201 132.079C55.8707 137.992 63.8932 143.035 74.8497 143.035ZM75.3539 108.699C68.4316 108.699 63.2972 103.748 63.2972 96.8255C63.2972 90.1324 68.6609 84.9521 75.4915 84.9521C82.3221 84.9521 87.6398 90.2241 87.6398 97.0547C87.6398 103.794 82.3679 108.699 75.3539 108.699Z"

  defp value_path(:ten),
    do:
      "M51.1947 142.531C55.2747 142.531 58.0253 139.78 58.0253 135.609V82.1557C58.0253 77.3881 55.0913 74.4083 50.1861 74.4083C47.3439 74.4083 45.1434 74.8208 41.9344 77.0213L28.8233 86.0982C26.6687 87.611 25.8435 89.1697 25.8435 91.2785C25.8435 94.2124 27.9065 96.2295 30.7029 96.2295C32.124 96.2295 33.0867 95.9086 34.3703 94.9917L44.0432 88.2528H44.3182V135.609C44.3182 139.78 47.1147 142.531 51.1947 142.531ZM99.0547 143.035C115.833 143.035 126.01 129.695 126.01 108.332C126.01 86.9692 115.742 73.904 99.0547 73.904C82.3679 73.904 72.0532 87.0151 72.0532 108.378C72.0532 129.787 82.2762 143.035 99.0547 143.035ZM99.0547 131.941C90.8947 131.941 86.127 123.552 86.127 108.378C86.127 93.3414 90.9864 84.998 99.0547 84.998C107.169 84.998 111.937 93.2956 111.937 108.378C111.937 123.552 107.215 131.941 99.0547 131.941Z"

  defp value_path(:eleven),
    do:
      "M59.4464 142.531C63.5264 142.531 66.277 139.78 66.277 135.609V82.1557C66.277 77.3881 63.3431 74.4083 58.4379 74.4083C55.5956 74.4083 53.3952 74.8208 50.1861 77.0213L37.0751 86.0982C34.9204 87.611 34.0953 89.1697 34.0953 91.2785C34.0953 94.2124 36.1582 96.2295 38.9546 96.2295C40.3758 96.2295 41.3385 95.9086 42.6221 94.9917L52.2949 88.2528H52.57V135.609C52.57 139.78 55.3664 142.531 59.4464 142.531ZM104.556 142.531C108.636 142.531 111.386 139.78 111.386 135.609V82.1557C111.386 77.3881 108.453 74.4083 103.547 74.4083C100.705 74.4083 98.5046 74.8208 95.2956 77.0213L82.1845 86.0982C80.0299 87.611 79.2047 89.1697 79.2047 91.2785C79.2047 94.2124 81.2677 96.2295 84.0641 96.2295C85.4852 96.2295 86.4479 95.9086 87.7315 94.9917L97.4044 88.2528H97.6794V135.609C97.6794 139.78 100.476 142.531 104.556 142.531Z"

  defp value_path(:twelve),
    do:
      "M53.6702 142.531C57.7502 142.531 60.5008 139.78 60.5008 135.609V82.1557C60.5008 77.3881 57.5669 74.4083 52.6617 74.4083C49.8194 74.4083 47.6189 74.8208 44.4099 77.0213L31.2988 86.0982C29.1442 87.611 28.3191 89.1697 28.3191 91.2785C28.3191 94.2124 30.382 96.2295 33.1784 96.2295C34.5995 96.2295 35.5622 95.9086 36.8458 94.9917L46.5187 88.2528H46.7938V135.609C46.7938 139.78 49.5902 142.531 53.6702 142.531ZM81.8178 141.568H118.446C122.022 141.568 124.177 139.322 124.177 136.067C124.177 132.72 122.022 130.566 118.446 130.566H93.5077V130.291L107.811 116.538C118.63 106.315 122.572 101.272 122.572 93.2039C122.572 81.8348 113.129 73.9498 99.1006 73.9498C86.5854 73.9498 78.2879 80.7804 76.0416 88.1153C75.7207 89.078 75.5373 90.0407 75.5373 91.0951C75.5373 94.5333 77.7378 96.7338 81.451 96.7338C84.4308 96.7338 86.0353 95.4502 87.594 92.6996C89.9778 87.3818 93.6453 84.7229 98.963 84.7229C104.877 84.7229 109.094 88.6196 109.094 94.0749C109.094 98.8426 106.986 102.052 98.8255 109.891L79.113 128.732C76.3166 131.299 75.3081 133.041 75.3081 135.654C75.3081 139.139 77.4627 141.568 81.8178 141.568Z"
end
