// public/js/map/clusterIcons.js // =============================== // CLUSTER ICONS // =============================== (function () { "use strict"; function getFirstMarkers(cluster, limit = 4) { const result = []; const stack = [cluster]; while (stack.length && result.length < limit) { const node = stack.pop(); if (node._markers?.length) { for (const marker of node._markers) { result.push(marker); if (result.length >= limit) { break; } } } if (result.length >= limit) { break; } if (node._childClusters?.length) { for (let i = node._childClusters.length - 1; i >= 0; i--) { stack.push(node._childClusters[i]); } } } return result; } window.createPhotoClusterHtml = function ({ count, thumbs = [] }) { const size = Math.min(92, Math.round(28 + Math.sqrt(count) * 6)); const cls = count > 200 ? "cluster-xl" : count > 50 ? "cluster-lg" : count > 10 ? "cluster-md" : "cluster-sm"; const collage = thumbs.length ? `