public function build()
    {
        $countries = [];

        $alpha3_index = [];

        $numeric3_index = [];

        $source = json_decode(substr($this->source(), 8))[0];

        foreach ($source->changes[1][2][2] as $index => $country) {
            if ($index < 2) {
                continue;
            }

            $countries[$country[4]] = [
                'name' => $source->state->{$country[2][1]->id}->caption,
                'alpha2' => $country[4],
                'alpha3' => $country[5],
                'numeric3' => $country[6],
            ];

            $alpha3_index[$country[5]] = $country[4];

            $numeric3_index[$country[6]] = $country[4];
        }

        $template = file_get_contents($this->templateFile);

        $template = str_replace(
            '/* countries */',
            '= ' . $this->encoder->encode($countries, ['array.base' => 4]),
            $template
        );

        $template = str_replace(
            '/* alpha3_index */',
            '= ' . $this->encoder->encode($alpha3_index, ['array.base' => 4]),
            $template
        );

        $template = str_replace(
            '/* numeric3_index */',
            '= ' . $this->encoder->encode($numeric3_index, ['array.base' => 4]),
            $template
        );

        file_put_contents(
            $this->outputFile,
            $template
        );
    }