The input pattern on the left is editable. Click on the result on the right to reset it. This is a simplified 1KB version of the ConvChain vanilla js port. The object of this algorithm is to generate…