nst cachedMindMap = history.find(item => item.id === +id);

                    if (cachedMindMap) {
                        window.location.href = `/history.html?id=${id}`;
                        return;
                    }

                    const response = await fetch(`https://share.mindmapwizard.com/${id}`);
                    if (!response.ok) {
                        throw new Error('Mind map not found');
                    }

                    const data = await response.json();

         