File size: 1,975 Bytes
a03b3ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<script context="module" lang="ts">
	declare global {
		interface Window {
			__gradio_mode__: "app" | "website";
			__gradio_space__: string | null;
		}
	}
	import type { media_query as MQ } from "../lib/utils";
	export let store: ReturnType<typeof MQ>;
</script>

<script lang="ts">
	import "$lib/assets/style.css";
	import "$lib/assets/prism.css";

	import Header from "$lib/components/Header.svelte";
	import Footer from "$lib/components/Footer.svelte";

	import { media_query } from "../lib/utils";
	store = media_query();

	import { browser } from "$app/environment";
	if (browser) {
		window.__gradio_mode__ = "website";
	}

	import CopyButton from "$lib/components/CopyButton.svelte";
	import { afterNavigate } from "$app/navigation";

	afterNavigate(() => {
		for (const node of document.querySelectorAll(".codeblock")) {
			let children = Array.from(node.querySelectorAll("pre, a"));
			let textContent = node.textContent;
			node.innerHTML = "";

			new CopyButton({
				target: node,
				props: {
					content: textContent ?? ""
				}
			});
			for (const child of children) {
				node.appendChild(child);
			}
		}
	});
</script>

<svelte:head>
	<link
		href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap"
		rel="stylesheet"
	/>
	<script
		type="module"
		crossorigin="true"
		src="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.js"
	></script>

	<script
		async
		src="https://www.googletagmanager.com/gtag/js?id=UA-156449732-1"
	></script>
	<script>
		window.dataLayer = window.dataLayer || [];
		function gtag() {
			dataLayer.push(arguments);
		}
		gtag("js", new Date());
		gtag("config", "UA-156449732-1", {
			cookie_flags: "samesite=none;secure"
		});
	</script>
</svelte:head>

<Header />

<slot />

<Footer />

<style>
	:global(
			body:has(.playground) .main-header,
			body:has(.playground) .main-footer
		) {
		display: none;
	}
</style>