window.initTooltip = (element) => { $(element).tooltip({ container: 'body', delay: { show: 300, hide: 150 }, trigger: 'hover', placement: (_, source) => { const position = $(source).attr('data-tooltip-placement'); return position || 'top'; }, template: `