DPR: Diffusion Preference-based Reward for Offline Reinforcement Learning