Number Logic Puzzle 4037

Rules:

The grid is covered by cages (groups of cells), marked with dotted outlines. Each cage encloses 2 or more cells. The top-left cell is labeled with a cage sum, which is the sum of all solution digits for the cells inside the cage. All digits in a cage should be distinct. The goal is to fill the grid with digits so that no digit appears more than once in any row, column, or cage.

Puzzle without any blocks is called Latin Square. There are no additional constraints.

This puzzle has a Diagonal Variant. Every diagonal line contains each of the digits only once.