The mechanism of photolysis of n-methyldihydroberberine salts and a sequence for transposition of ring D substituents