ait response.json();

            if (data.id) {
                if (window.dataLayer) {
                    window
                        .dataLayer
                        .push({'event': 'mindmap_share_success', 'action': 'Share Success'});
                }

                const shareUrl = `${window.location.origin}/view.html?id=${data.id}`;

                document
                    .querySelector('.share-dialog')
                    .remove();
                document
                    .querySe