(() => {
const file = '__GENT_SHELL_FILE__';
if (window !== window.top || location.protocol !== 'tauri:' ||
location.host !== 'localhost' || location.search ||
!(location.pathname === '/' + file || (file === 'index.html' && location.pathname === '/'))) return;
const key = '__GENT_SHELL_KEY__';
const call = (action, value = null) =>
window.__TAURI_INTERNALS__.invoke('gent_bridge', {key, action, value});
Object.defineProperty(window, 'gent', { value: Object.freeze({
closeTray: () => call('close_tray'),
ready: () => call('ready'),
hourCycle: () => call('hour_cycle'),
send: value => call('send', value),
open: url => call('open', url),
board: (html, interactive = false) => window.__TAURI_INTERNALS__.invoke('gent_board', {key, value: {html, interactive}}),
releaseBoard: url => call('release_board', url)
}) });
})();