diff --git a/6.11.0/atoms/package.json b/6.11.0/atoms/package.json
index 95f9bd4d625299d552ff81404f195b0343bf80a0..98eca40ae7b915c439d1fd87227eb59d3a3c0aa6 100644
--- a/6.11.0/atoms/package.json
+++ b/6.11.0/atoms/package.json
@@ -8,6 +8,7 @@
"license": "ISC",
"dependencies": {
"@gradio/icons": "workspace:^",
+ "@gradio/markdown-code": "workspace:^",
"@gradio/utils": "workspace:^"
},
"peerDependencies": {
diff --git a/6.11.0/atoms/src/BlockTitle.svelte b/6.11.0/atoms/src/BlockTitle.svelte
index c14be5cd912f30aa50e5733432e1abbf37f4354b..2db9434c29ae802bcb67cdb2fd5ce4c4b378828d 100644
--- a/6.11.0/atoms/src/BlockTitle.svelte
+++ b/6.11.0/atoms/src/BlockTitle.svelte
@@ -1,6 +1,5 @@
-
- {@html render_inline_markdown(info)}
+
+
diff --git a/6.11.0/atoms/src/inline-markdown.ts b/6.11.0/atoms/src/inline-markdown.ts
deleted file mode 100644
index 5eb55f4448ff41876211359dc2f94f5e61431173..0000000000000000000000000000000000000000
--- a/6.11.0/atoms/src/inline-markdown.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-export const INLINE_CODE_RE = /`([^`]+)`/g;
-export const LINK_RE = /\[([^\]]+)\]\(([^)]+)\)/g;
-export const BOLD_ASTERISK_RE = /\*\*(.+?)\*\*/g;
-export const BOLD_UNDERSCORE_RE = /__(.+?)__/g;
-export const ITALIC_ASTERISK_RE = /\*(.+?)\*/g;
-export const ITALIC_UNDERSCORE_RE = /(?/g, ">")
- .replace(/"/g, """);
-}
-
-function render_link(_match: string, text: string, url: string): string {
- const trimmed = url.trim();
- if (PROTOCOL_RE.test(trimmed)) {
- if (/^https?:/i.test(trimmed)) {
- return `
${text}`;
- }
- return text;
- }
- return `
${text}`;
-}
-
-export function render_inline_markdown(text: string): string {
- let result = escape_html(text);
-
- result = result.replace(INLINE_CODE_RE, "
$1");
- result = result.replace(LINK_RE, render_link);
- result = result.replace(BOLD_ASTERISK_RE, "
$1");
- result = result.replace(BOLD_UNDERSCORE_RE, "
$1");
- result = result.replace(ITALIC_ASTERISK_RE, "
$1");
- result = result.replace(ITALIC_UNDERSCORE_RE, "
$1");
- result = result.replace(/\n/g, "
");
-
- return result;
-}
diff --git a/6.11.0/gallery/shared/Gallery.svelte b/6.11.0/gallery/shared/Gallery.svelte
index 174ee0f5766ddcae258cfcc9bec5d86f9518040a..2c078be1f39cd15dedee8365e16c65f7bf0248a2 100644
--- a/6.11.0/gallery/shared/Gallery.svelte
+++ b/6.11.0/gallery/shared/Gallery.svelte
@@ -229,13 +229,15 @@
}
$effect(() => {
- // Only trigger the effect if the selected_index has actually changed
if (selected_index !== old_selected_index) {
old_selected_index = selected_index;
-
- // Ensure we have a valid selection and data to work with
- if (selected_index !== null && resolved_value !== null) {
- // Notify the parent component or listener about the updated selection
+ if (selected_index !== null) {
+ if (resolved_value != null) {
+ selected_index = Math.max(
+ 0,
+ Math.min(selected_index, resolved_value.length - 1)
+ );
+ }
onselect({
index: selected_index,
value: resolved_value?.[selected_index]
diff --git a/6.11.0/preview/package.json b/6.11.0/preview/package.json
index 2a7176875f2633bedfea6a809f120587fa22c344..38a3abd8ce4137386a611cec3fba8a01bb8673a7 100644
--- a/6.11.0/preview/package.json
+++ b/6.11.0/preview/package.json
@@ -1,6 +1,6 @@
{
"name": "@gradio/preview",
- "version": "0.16.2",
+ "version": "0.16.1",
"description": "Gradio UI packages",
"type": "module",
"main": "dist/index.js",
diff --git a/6.11.0/preview/src/build.ts b/6.11.0/preview/src/build.ts
index a63d5e9f5efc3e932bbc3c71e2474a937bb57e89..1f4e5a7a16ff06eae8ad4f33267055b0879c5a0f 100644
--- a/6.11.0/preview/src/build.ts
+++ b/6.11.0/preview/src/build.ts
@@ -74,18 +74,14 @@ export async function make_build({
join(source_dir, pkg.exports["."].gradio)
]
],
- ...(pkg.exports["./example"]
- ? [
- [
- join(template_dir, "example"),
- [
- join(__dirname, "svelte_runtime_entry.js"),
- join(source_dir, pkg.exports["./example"].gradio)
- ]
- ]
- ]
- : [])
- ];
+ [
+ join(template_dir, "example"),
+ [
+ join(__dirname, "svelte_runtime_entry.js"),
+ join(source_dir, pkg.exports["./example"].gradio)
+ ]
+ ]
+ ].filter(([_, path]) => !!path);
for (const [out_path, entry_path] of exports) {
try {
diff --git a/6.11.1/accordion/Index.svelte b/6.11.1/accordion/Index.svelte
deleted file mode 100644
index 060b2c6e34c4199c5f9f1c05bdaedc51686203d2..0000000000000000000000000000000000000000
--- a/6.11.1/accordion/Index.svelte
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
- {#if gradio.shared.loading_status}
-
- {/if}
-
- {
- gradio.dispatch("expand");
- gradio.dispatch("gradio_expand");
- }}
- oncollapse={() => gradio.dispatch("collapse")}
- >
-
-
-
-
-
diff --git a/6.11.1/accordion/package.json b/6.11.1/accordion/package.json
deleted file mode 100644
index 4e8fb8b37e67c980624ec9a07ebecd55df4ab719..0000000000000000000000000000000000000000
--- a/6.11.1/accordion/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "@gradio/accordion",
- "version": "0.5.34",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "main_changeset": true,
- "dependencies": {
- "@gradio/atoms": "workspace:^",
- "@gradio/column": "workspace:^",
- "@gradio/statustracker": "workspace:^",
- "@gradio/utils": "workspace:^"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "devDependencies": {
- "@gradio/preview": "workspace:^"
- },
- "exports": {
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- },
- "./package.json": "./package.json"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/accordion"
- }
-}
diff --git a/6.11.1/accordion/shared/Accordion.svelte b/6.11.1/accordion/shared/Accordion.svelte
deleted file mode 100644
index b5f03ed0ac3ccf5a5fe8539fcb171337470e8790..0000000000000000000000000000000000000000
--- a/6.11.1/accordion/shared/Accordion.svelte
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/6.11.1/accordion/types.ts b/6.11.1/accordion/types.ts
deleted file mode 100644
index 55ce738d6a94da862f24fc2e5ce4f0a55a0d1c5b..0000000000000000000000000000000000000000
--- a/6.11.1/accordion/types.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export interface AccordionProps {
- open: boolean;
-}
-
-export interface AccordionEvents {
- expand: never;
- collapse: never;
- gradio_expand: never;
-}
diff --git a/6.11.1/annotatedimage/Index.svelte b/6.11.1/annotatedimage/Index.svelte
deleted file mode 100644
index 24d07cff4ff3949172d865d85bb4566b71f59bac..0000000000000000000000000000000000000000
--- a/6.11.1/annotatedimage/Index.svelte
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-
-
-
-
-
- {#if gradio.props.value == null}
-
- {:else}
-
-
{
- gradio.dispatch("custom_button_click", { id });
- }}
- >
- {#if (gradio.props.buttons || []).some((btn) => typeof btn === "string" && btn === "fullscreen")}
- {
- fullscreen = detail;
- }}
- />
- {/if}
-
-
-

- {#each gradio.props.value ? gradio.props.value.annotations : [] as ann, i}
-

- {/each}
-
- {#if gradio.props.show_legend && gradio.props.value}
-
- {#each gradio.props.value.annotations as ann, i}
-
- {/each}
-
- {/if}
- {/if}
-
-
-
-
diff --git a/6.11.1/annotatedimage/package.json b/6.11.1/annotatedimage/package.json
deleted file mode 100644
index 52b41fd47c2104ece9017ac4b477693c4a49f0ba..0000000000000000000000000000000000000000
--- a/6.11.1/annotatedimage/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "@gradio/annotatedimage",
- "version": "0.11.7",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "main_changeset": true,
- "exports": {
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- },
- "./package.json": "./package.json"
- },
- "devDependencies": {
- "@gradio/preview": "workspace:^"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "dependencies": {
- "@gradio/atoms": "workspace:^",
- "@gradio/icons": "workspace:^",
- "@gradio/statustracker": "workspace:^",
- "@gradio/upload": "workspace:^",
- "@gradio/utils": "workspace:^",
- "@gradio/client": "workspace:^"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/annotatedimage"
- }
-}
diff --git a/6.11.1/annotatedimage/types.ts b/6.11.1/annotatedimage/types.ts
deleted file mode 100644
index a67663c44b2a3e32e1db9e2e44560696c0e54df1..0000000000000000000000000000000000000000
--- a/6.11.1/annotatedimage/types.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import type { FileData } from "@gradio/client";
-import type { CustomButton } from "@gradio/utils";
-
-export interface Annotation {
- image: FileData;
- label: string;
-}
-
-export interface AnnotatedImageValue {
- image: FileData;
- annotations: Annotation[];
-}
-
-export interface AnnotatedImageProps {
- value: AnnotatedImageValue | null;
- show_legend: boolean;
- height: number | undefined;
- width: number | undefined;
- color_map: Record
;
- buttons: (string | CustomButton)[];
-}
-
-export interface AnnotatedImageEvents {
- change: never;
- select: { index: number; value: string };
- custom_button_click: { id: number };
-}
diff --git a/6.11.1/atoms/package.json b/6.11.1/atoms/package.json
deleted file mode 100644
index 5422ff37cce83ddce0fbbcec76562da28f04bb47..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/package.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "@gradio/atoms",
- "version": "0.23.1",
- "description": "Gradio UI packages",
- "type": "module",
- "main": "src/index.ts",
- "author": "",
- "license": "ISC",
- "dependencies": {
- "@gradio/icons": "workspace:^",
- "@gradio/utils": "workspace:^"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "exports": {
- ".": {
- "gradio": "./src/index.ts",
- "svelte": "./dist/src/index.js",
- "types": "./dist/src/index.d.ts"
- },
- "./package.json": "./package.json"
- },
- "main_changeset": true,
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/atoms"
- },
- "scripts": {
- "sv-package": "svelte-package --input=. --tsconfig=../../tsconfig.json"
- }
-}
diff --git a/6.11.1/atoms/src/Block.svelte b/6.11.1/atoms/src/Block.svelte
deleted file mode 100644
index a9017a5136a582bde732d7a49081a6d5ccfd6322..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/Block.svelte
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-{#if visible === true || visible === "hidden"}
-
-
- {#if resizable}
-
-
- {/if}
-
- {#if fullscreen}
-
- {/if}
-{/if}
-
-
diff --git a/6.11.1/atoms/src/BlockLabel.svelte b/6.11.1/atoms/src/BlockLabel.svelte
deleted file mode 100644
index e60ce34c2eb756ae99c414711c9be2156a58a296..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/BlockLabel.svelte
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/atoms/src/BlockTitle.svelte b/6.11.1/atoms/src/BlockTitle.svelte
deleted file mode 100644
index c14be5cd912f30aa50e5733432e1abbf37f4354b..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/BlockTitle.svelte
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-{#if info}
-
-{/if}
-
-
diff --git a/6.11.1/atoms/src/CustomButton.svelte b/6.11.1/atoms/src/CustomButton.svelte
deleted file mode 100644
index 9273358a1218ff5003a6a21f59092fb619d22015..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/CustomButton.svelte
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/atoms/src/DownloadLink.svelte b/6.11.1/atoms/src/DownloadLink.svelte
deleted file mode 100644
index 52a856eb3b21faffc74b9d541e681264126e1842..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/DownloadLink.svelte
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
diff --git a/6.11.1/atoms/src/Empty.svelte b/6.11.1/atoms/src/Empty.svelte
deleted file mode 100644
index 6bc3ab39a045d27498d50ec9c9804c4011af93f6..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/Empty.svelte
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/atoms/src/FullscreenButton.svelte b/6.11.1/atoms/src/FullscreenButton.svelte
deleted file mode 100644
index 2689805a0724c8bc3ed1eb2059658f077de94381..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/FullscreenButton.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-{#if fullscreen}
- onclick(false)}
- />
-{:else}
- onclick(true)}
- />
-{/if}
diff --git a/6.11.1/atoms/src/IconButton.svelte b/6.11.1/atoms/src/IconButton.svelte
deleted file mode 100644
index f69741583af000edb4cc94ca3d72fff7437b4603..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/IconButton.svelte
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/atoms/src/IconButtonWrapper.svelte b/6.11.1/atoms/src/IconButtonWrapper.svelte
deleted file mode 100644
index 22678f406c9999ecd8c3a9e3c833e2fbad1e14f6..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/IconButtonWrapper.svelte
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
- {#if children}{@render children()}{/if}
- {#if buttons}
- {#each buttons as btn}
- {#if typeof btn !== "string"}
- {
- if (on_custom_button_click) {
- on_custom_button_click(id);
- }
- }}
- />
- {/if}
- {/each}
- {/if}
-
-
-
diff --git a/6.11.1/atoms/src/Info.svelte b/6.11.1/atoms/src/Info.svelte
deleted file mode 100644
index d657b5c5d327653f33fe7284dc3784072717e60e..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/Info.svelte
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- {@html render_inline_markdown(info)}
-
-
-
diff --git a/6.11.1/atoms/src/ScrollFade.svelte b/6.11.1/atoms/src/ScrollFade.svelte
deleted file mode 100644
index 4f41ee90a45057f39c09494597f08c27857355fe..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/ScrollFade.svelte
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-{#if visible}
-
-{/if}
-
-
diff --git a/6.11.1/atoms/src/SelectSource.svelte b/6.11.1/atoms/src/SelectSource.svelte
deleted file mode 100644
index f5e0304f92c4c9ffb83e4d57793772cdd05fd9b5..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/SelectSource.svelte
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-{#if unique_sources.length > 1 || sources.includes("clipboard")}
-
- {#if sources.includes("upload")}
-
- {/if}
-
- {#if sources.includes("microphone")}
-
- {/if}
-
- {#if sources.includes("webcam")}
-
- {/if}
- {#if sources.includes("webcam-video")}
-
- {/if}
- {#if sources.includes("clipboard")}
-
- {/if}
-
-{/if}
-
-
diff --git a/6.11.1/atoms/src/ShareButton.svelte b/6.11.1/atoms/src/ShareButton.svelte
deleted file mode 100644
index 99a7ee08fc7acd68f5b27315af14539a2d02ad56..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/ShareButton.svelte
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- {
- try {
- pending = true;
- const formatted = await formatter(value);
- dispatch("share", {
- description: formatted
- });
- } catch (e) {
- console.error(e);
- let message = e instanceof ShareError ? e.message : "Share failed.";
- dispatch("error", message);
- } finally {
- pending = false;
- }
- }}
-/>
diff --git a/6.11.1/atoms/src/Toolbar.svelte b/6.11.1/atoms/src/Toolbar.svelte
deleted file mode 100644
index 389bb863402c939d2c7fca877c3275abd683e659..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/Toolbar.svelte
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
diff --git a/6.11.1/atoms/src/UploadText.svelte b/6.11.1/atoms/src/UploadText.svelte
deleted file mode 100644
index 5902eb6666effc8c7281027174dd4a0c9e334df6..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/UploadText.svelte
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
- {#if type === "clipboard"}
-
- {:else}
-
- {/if}
-
-
- {#if heading || paragraph}
- {#if heading}
-
{heading}
- {/if}
- {#if paragraph}
-
{paragraph}
- {/if}
- {:else}
- {i18n(defs[type] || defs.file)}
-
- {#if mode !== "short"}
-
- {i18n("common.or")} -
- {message || i18n("upload_text.click_to_upload")}
- {/if}
- {/if}
-
-
-
diff --git a/6.11.1/atoms/src/index.ts b/6.11.1/atoms/src/index.ts
deleted file mode 100644
index fc6a8601e5d6448a2e1c5b0dad6f0b5274b59e2d..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-export { default as Block } from "./Block.svelte";
-export { default as BlockTitle } from "./BlockTitle.svelte";
-export { default as BlockLabel } from "./BlockLabel.svelte";
-export { default as DownloadLink } from "./DownloadLink.svelte";
-export { default as IconButton } from "./IconButton.svelte";
-export { default as Empty } from "./Empty.svelte";
-export { default as Info } from "./Info.svelte";
-export { default as ShareButton } from "./ShareButton.svelte";
-export { default as UploadText } from "./UploadText.svelte";
-export { default as Toolbar } from "./Toolbar.svelte";
-export { default as SelectSource } from "./SelectSource.svelte";
-export { default as IconButtonWrapper } from "./IconButtonWrapper.svelte";
-export { default as FullscreenButton } from "./FullscreenButton.svelte";
-export { default as CustomButton } from "./CustomButton.svelte";
-export { default as ScrollFade } from "./ScrollFade.svelte";
-
-export const BLOCK_KEY = {};
diff --git a/6.11.1/atoms/src/inline-markdown.ts b/6.11.1/atoms/src/inline-markdown.ts
deleted file mode 100644
index 5eb55f4448ff41876211359dc2f94f5e61431173..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/inline-markdown.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-export const INLINE_CODE_RE = /`([^`]+)`/g;
-export const LINK_RE = /\[([^\]]+)\]\(([^)]+)\)/g;
-export const BOLD_ASTERISK_RE = /\*\*(.+?)\*\*/g;
-export const BOLD_UNDERSCORE_RE = /__(.+?)__/g;
-export const ITALIC_ASTERISK_RE = /\*(.+?)\*/g;
-export const ITALIC_UNDERSCORE_RE = /(?/g, ">")
- .replace(/"/g, """);
-}
-
-function render_link(_match: string, text: string, url: string): string {
- const trimmed = url.trim();
- if (PROTOCOL_RE.test(trimmed)) {
- if (/^https?:/i.test(trimmed)) {
- return `${text}`;
- }
- return text;
- }
- return `${text}`;
-}
-
-export function render_inline_markdown(text: string): string {
- let result = escape_html(text);
-
- result = result.replace(INLINE_CODE_RE, "$1");
- result = result.replace(LINK_RE, render_link);
- result = result.replace(BOLD_ASTERISK_RE, "$1");
- result = result.replace(BOLD_UNDERSCORE_RE, "$1");
- result = result.replace(ITALIC_ASTERISK_RE, "$1");
- result = result.replace(ITALIC_UNDERSCORE_RE, "$1");
- result = result.replace(/\n/g, "
");
-
- return result;
-}
diff --git a/6.11.1/atoms/src/utils/parse_placeholder.ts b/6.11.1/atoms/src/utils/parse_placeholder.ts
deleted file mode 100644
index 2a562444d816df338509c915d48a82e4dcb0709c..0000000000000000000000000000000000000000
--- a/6.11.1/atoms/src/utils/parse_placeholder.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-const RE_HEADING = /^(#\s*)(.+)$/m;
-
-export function inject(text: string): [string | false, string | false] {
- const trimmed_text = text.trim();
-
- const heading_match = trimmed_text.match(RE_HEADING);
- if (!heading_match) {
- return [false, trimmed_text || false];
- }
-
- const [full_match, , heading_content] = heading_match;
- const _heading = heading_content.trim();
-
- if (trimmed_text === full_match) {
- return [_heading, false];
- }
-
- const heading_end_index =
- heading_match.index !== undefined
- ? heading_match.index + full_match.length
- : 0;
- const remaining_text = trimmed_text.substring(heading_end_index).trim();
-
- const _paragraph = remaining_text || false;
-
- return [_heading, _paragraph];
-}
diff --git a/6.11.1/audio/Example.svelte b/6.11.1/audio/Example.svelte
deleted file mode 100644
index fc877b8bea36f28d38868c24716022a54a97fb80..0000000000000000000000000000000000000000
--- a/6.11.1/audio/Example.svelte
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- {value ? value : ""}
-
-
-
diff --git a/6.11.1/audio/Index.svelte b/6.11.1/audio/Index.svelte
deleted file mode 100644
index a4648bda9cdddd4e5a7e9d8c4ae93574e0905f55..0000000000000000000000000000000000000000
--- a/6.11.1/audio/Index.svelte
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-
-{#if !gradio.shared.interactive}
-
-
- gradio.dispatch("clear_status", gradio.shared.loading_status)}
- />
-
- {
- gradio.dispatch("custom_button_click", { id });
- }}
- bind:playback_position={gradio.props.playback_position}
- onshare={(detail) => gradio.dispatch("share", detail)}
- onerror={(e) => gradio.dispatch("error", e.detail)}
- onplay={() => gradio.dispatch("play")}
- onpause={() => gradio.dispatch("pause")}
- onstop={() => gradio.dispatch("stop")}
- />
-
-{:else}
-
-
- gradio.dispatch("clear_status", gradio.shared.loading_status)}
- />
- {
- gradio.dispatch("custom_button_click", { id });
- }}
- value={gradio.props.value}
- subtitles={gradio.props.subtitles}
- onchange={(detail) => (gradio.props.value = detail)}
- onstream={(detail) => {
- gradio.props.value = detail;
- gradio.dispatch("stream", gradio.props.value);
- }}
- ondrag={(detail) => (dragging = detail)}
- root={gradio.shared.root}
- sources={gradio.props.sources}
- active_source={active_source || undefined}
- pending={gradio.shared.loading_status.pending}
- streaming={gradio.props.streaming}
- bind:recording
- loop={gradio.props.loop}
- max_file_size={gradio.shared.max_file_size}
- {handle_reset_value}
- editable={gradio.props.editable}
- bind:dragging
- bind:playback_position={gradio.props.playback_position}
- onedit={() => gradio.dispatch("edit")}
- onplay={() => gradio.dispatch("play")}
- onpause={() => gradio.dispatch("pause")}
- onstop={() => gradio.dispatch("stop")}
- onstart_recording={() => gradio.dispatch("start_recording")}
- onpause_recording={() => gradio.dispatch("pause_recording")}
- onstop_recording={() => {
- gradio.dispatch("stop_recording");
- gradio.dispatch("input");
- }}
- onupload={() => {
- gradio.dispatch("upload");
- gradio.dispatch("input");
- }}
- onclear={() => {
- gradio.dispatch("clear");
- gradio.dispatch("input");
- }}
- onerror={handle_error}
- onclose_stream={() => gradio.dispatch("close_stream", "stream")}
- i18n={gradio.i18n}
- {waveform_settings}
- waveform_options={gradio.props.waveform_options}
- {trim_region_settings}
- stream_every={gradio.props.stream_every}
- stream_state={gradio.shared.loading_status.stream_state}
- upload={(...args) => gradio.shared.client.upload(...args)}
- stream_handler={(...args) => gradio.shared.client.stream(...args)}
- time_limit={gradio.shared.loading_status.time_limit}
- >
-
-
-
-{/if}
diff --git a/6.11.1/audio/index.ts b/6.11.1/audio/index.ts
deleted file mode 100644
index c5bc9adbfd99bfba1587c0236e72968d6d91edee..0000000000000000000000000000000000000000
--- a/6.11.1/audio/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { default as Index } from "./Index.svelte";
-export default Index;
-export { default as BaseStaticAudio } from "./static/StaticAudio.svelte";
-export { default as BaseInteractiveAudio } from "./interactive/InteractiveAudio.svelte";
-export { default as BasePlayer } from "./player/AudioPlayer.svelte";
-export type { WaveformOptions } from "./shared/types";
-export { default as BaseExample } from "./Example.svelte";
diff --git a/6.11.1/audio/interactive/InteractiveAudio.svelte b/6.11.1/audio/interactive/InteractiveAudio.svelte
deleted file mode 100644
index c1202e280b6d582f16affa58c148fbb3feabd4bc..0000000000000000000000000000000000000000
--- a/6.11.1/audio/interactive/InteractiveAudio.svelte
+++ /dev/null
@@ -1,431 +0,0 @@
-
-
-
-
-
- {#if value == null || streaming}
- {#if active_source === "microphone"}
-
- {#if streaming}
-
- {:else}
-
onstart_recording?.()}
- onpauserecording={() => onpause_recording?.()}
- onstoprecording={() => onstop_recording?.()}
- />
- {/if}
- {:else if active_source === "upload"}
-
- onerror?.(detail)}
- {root}
- {max_file_size}
- {upload}
- {stream_handler}
- aria_label={i18n("audio.drop_to_upload")}
- >
- {#if children}{@render children()}{/if}
-
- {/if}
- {:else}
- {
- mode = "edit";
- onedit?.();
- }}
- download={buttons === null
- ? value.url
- : buttons.some((btn) => typeof btn === "string" && btn === "download")
- ? value.url
- : null}
- >
- {#if value !== null && buttons}
- {#each buttons as btn}
- {#if typeof btn === "string"}
- {#if btn === "share"}
- {}}
- formatter={async (fileData: FileData) => {
- if (!fileData || !fileData.url) return "";
- let url = await uploadToHuggingFace(fileData.url, "url");
- return ``;
- }}
- {value}
- />
- {/if}
- {:else}
- {
- if (on_custom_button_click) {
- on_custom_button_click(id);
- }
- }}
- />
- {/if}
- {/each}
- {/if}
-
-
-
- {/if}
-
-
-
-
diff --git a/6.11.1/audio/package.json b/6.11.1/audio/package.json
deleted file mode 100644
index eb2a78d0db8fc72e97e46b25e4c2c746875b626d..0000000000000000000000000000000000000000
--- a/6.11.1/audio/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "@gradio/audio",
- "version": "0.23.1",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "dependencies": {
- "@gradio/atoms": "workspace:^",
- "@gradio/button": "workspace:^",
- "@gradio/client": "workspace:^",
- "@gradio/icons": "workspace:^",
- "@gradio/statustracker": "workspace:^",
- "@gradio/upload": "workspace:^",
- "@gradio/utils": "workspace:^",
- "extendable-media-recorder": "9.0.0",
- "extendable-media-recorder-wav-encoder": "7.0.76",
- "hls.js": "1.5.13",
- "resize-observer-polyfill": "1.5.1",
- "svelte-range-slider-pips": "4.1.0",
- "wavesurfer.js": "7.11.0"
- },
- "devDependencies": {
- "@gradio/preview": "workspace:^"
- },
- "main_changeset": true,
- "main": "index.ts",
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "gradio": "./index.ts",
- "svelte": "./dist/index.js",
- "types": "./dist/index.d.ts"
- },
- "./example": {
- "gradio": "./Example.svelte",
- "svelte": "./dist/Example.svelte",
- "types": "./dist/Example.svelte.d.ts"
- },
- "./shared": {
- "gradio": "./shared/index.ts",
- "svelte": "./dist/shared/index.js",
- "types": "./dist/shared/index.d.ts"
- },
- "./base": {
- "gradio": "./static/StaticAudio.svelte",
- "svelte": "./dist/static/StaticAudio.svelte",
- "types": "./dist/static/StaticAudio.svelte.d.ts"
- }
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/audio"
- }
-}
diff --git a/6.11.1/audio/player/AudioPlayer.svelte b/6.11.1/audio/player/AudioPlayer.svelte
deleted file mode 100644
index e277b07d75f075ed7639dcafe860230e04dbb426..0000000000000000000000000000000000000000
--- a/6.11.1/audio/player/AudioPlayer.svelte
+++ /dev/null
@@ -1,525 +0,0 @@
-
-
-
-{#if value === null}
-
-
-
-{:else if use_waveform}
-
-
-
-
-
-
- {#if mode === "edit" && trimDuration > 0}
-
- {/if}
-
-
-
-
-
-
-
-
-{/if}
-
-
diff --git a/6.11.1/audio/recorder/AudioRecorder.svelte b/6.11.1/audio/recorder/AudioRecorder.svelte
deleted file mode 100644
index e9f7c4049b0c1b90b67e99f34ca913f18cd92cc8..0000000000000000000000000000000000000000
--- a/6.11.1/audio/recorder/AudioRecorder.svelte
+++ /dev/null
@@ -1,315 +0,0 @@
-
-
-
-
-
-
- {#if (timing || recordedAudio) && waveform_options.show_recording_waveform}
-
-
-
- {#if mode === "edit" && trimDuration > 0}
-
- {/if}
- {#if timing}
-
- {:else}
-
- {/if}
-
-
- {/if}
-
- {#if record_mounted && !recordedAudio}
-
- {/if}
-
- {#if recordingWaveform && recordedAudio}
-
- {/if}
-
-
-
diff --git a/6.11.1/audio/shared/Audio.svelte b/6.11.1/audio/shared/Audio.svelte
deleted file mode 100644
index ce12d5b360580e26b2edd4d9c88c5a586ba3a312..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/Audio.svelte
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
diff --git a/6.11.1/audio/shared/DeviceSelect.svelte b/6.11.1/audio/shared/DeviceSelect.svelte
deleted file mode 100644
index 638f98fc8e3f203af603252fab235c9ffe6affb9..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/DeviceSelect.svelte
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/audio/shared/MinimalAudioPlayer.svelte b/6.11.1/audio/shared/MinimalAudioPlayer.svelte
deleted file mode 100644
index 177bb48c779ae999f798f35d7ed2cebc55cf0c4b..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/MinimalAudioPlayer.svelte
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
{format_time(playing ? currentTime : duration)}
-
-
-
diff --git a/6.11.1/audio/shared/MinimalAudioRecorder.svelte b/6.11.1/audio/shared/MinimalAudioRecorder.svelte
deleted file mode 100644
index 27c7f1ddf6892b9f7cd9a39263c1d47964ff7128..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/MinimalAudioRecorder.svelte
+++ /dev/null
@@ -1,379 +0,0 @@
-
-
-
- {#if show_device_selection}
-
- {#if mic_devices.length > 1}
-
- {/if}
-
-
- {:else}
-
-
{format_time(seconds)}
-
- {/if}
-
-
-
diff --git a/6.11.1/audio/shared/VolumeControl.svelte b/6.11.1/audio/shared/VolumeControl.svelte
deleted file mode 100644
index 8a7af530e675721335f1e541f7629a74a8f5d596..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/VolumeControl.svelte
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
- (show_volume_slider = false)}
- oninput={(e) => {
- if (e.target instanceof HTMLInputElement) {
- currentVolume = parseFloat(e.target.value);
- waveform?.setVolume(currentVolume);
- }
- }}
-/>
-
-
diff --git a/6.11.1/audio/shared/VolumeLevels.svelte b/6.11.1/audio/shared/VolumeLevels.svelte
deleted file mode 100644
index 65c91190049fc4b61ed5fa4d931dd67957301375..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/VolumeLevels.svelte
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-{#if currentVolume == 0}
-
-{:else if currentVolume < 0.5}
-
-{:else if currentVolume >= 0.5}
-
-{/if}
diff --git a/6.11.1/audio/shared/WaveformControls.svelte b/6.11.1/audio/shared/WaveformControls.svelte
deleted file mode 100644
index d1847ad4070182a60ad17b08464ef1881e5d45bc..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/WaveformControls.svelte
+++ /dev/null
@@ -1,496 +0,0 @@
-
-
-
-
-
-
- {#if show_volume_slider}
-
- {/if}
-
-
-
-
-
-
-
-
-
-
-
- {#if show_subtitles}
-
- {/if}
- {#if editable && interactive}
- {#if show_redo && !mode}
-
- {/if}
-
- {#if !mode}
-
- {:else}
-
-
- {/if}
- {/if}
-
-
-
-
diff --git a/6.11.1/audio/shared/WaveformRecordControls.svelte b/6.11.1/audio/shared/WaveformRecordControls.svelte
deleted file mode 100644
index 332c8e4bd4b7efe09e3ddf13bf15d117a05f2143..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/WaveformRecordControls.svelte
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {#if timing && !show_recording_waveform}
-
- {/if}
-
-
-
-
-
diff --git a/6.11.1/audio/shared/audioBufferToWav.ts b/6.11.1/audio/shared/audioBufferToWav.ts
deleted file mode 100644
index ded367657da4dd93f84995af4e579a644dfa55a8..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/audioBufferToWav.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-export function audioBufferToWav(audioBuffer: AudioBuffer): Uint8Array {
- const numOfChan = audioBuffer.numberOfChannels;
- const length = audioBuffer.length * numOfChan * 2 + 44;
- const buffer = new ArrayBuffer(length);
- const view = new DataView(buffer);
- let offset = 0;
-
- // Write WAV header
- const writeString = function (
- view: DataView,
- offset: number,
- string: string
- ): void {
- for (let i = 0; i < string.length; i++) {
- view.setUint8(offset + i, string.charCodeAt(i));
- }
- };
-
- writeString(view, offset, "RIFF");
- offset += 4;
- view.setUint32(offset, length - 8, true);
- offset += 4;
- writeString(view, offset, "WAVE");
- offset += 4;
- writeString(view, offset, "fmt ");
- offset += 4;
- view.setUint32(offset, 16, true);
- offset += 4; // Sub-chunk size, 16 for PCM
- view.setUint16(offset, 1, true);
- offset += 2; // PCM format
- view.setUint16(offset, numOfChan, true);
- offset += 2;
- view.setUint32(offset, audioBuffer.sampleRate, true);
- offset += 4;
- view.setUint32(offset, audioBuffer.sampleRate * 2 * numOfChan, true);
- offset += 4;
- view.setUint16(offset, numOfChan * 2, true);
- offset += 2;
- view.setUint16(offset, 16, true);
- offset += 2;
- writeString(view, offset, "data");
- offset += 4;
- view.setUint32(offset, audioBuffer.length * numOfChan * 2, true);
- offset += 4;
-
- // Write PCM audio data
- for (let i = 0; i < audioBuffer.length; i++) {
- for (let channel = 0; channel < numOfChan; channel++) {
- const sample = Math.max(
- -1,
- Math.min(1, audioBuffer.getChannelData(channel)[i])
- );
- view.setInt16(offset, sample * 0x7fff, true);
- offset += 2;
- }
- }
-
- return new Uint8Array(buffer);
-}
diff --git a/6.11.1/audio/shared/index.ts b/6.11.1/audio/shared/index.ts
deleted file mode 100644
index e825e5880db2bae8dd2e5ed3730552b70c8a5bea..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export { default as Audio } from "./Audio.svelte";
-export { default as MinimalAudioPlayer } from "./MinimalAudioPlayer.svelte";
-export { default as MinimalAudioRecorder } from "./MinimalAudioRecorder.svelte";
diff --git a/6.11.1/audio/shared/types.ts b/6.11.1/audio/shared/types.ts
deleted file mode 100644
index a86fd9587d0665d050bc5f352b8ab4d0c9150fbe..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/types.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { FileData } from "@gradio/client";
-import type { CustomButton } from "@gradio/utils";
-
-export type WaveformOptions = {
- waveform_color?: string;
- waveform_progress_color?: string;
- show_controls?: boolean;
- skip_length?: number;
- trim_region_color?: string;
- show_recording_waveform?: boolean;
- sample_rate?: number;
-};
-
-export interface SubtitleData {
- start: number;
- end: number;
- text: string;
-}
-
-export interface AudioProps {
- sources:
- | ["microphone"]
- | ["upload"]
- | ["microphone", "upload"]
- | ["upload", "microphone"];
- value: FileData | null;
- type: "numpy" | "filepath";
- autoplay: boolean;
- buttons: ("play" | "download" | "share" | CustomButton)[];
- recording: boolean;
- loop: boolean;
- subtitles: FileData | SubtitleData[] | null;
- waveform_options: WaveformOptions;
- editable: boolean;
- pending: boolean;
- streaming: boolean;
- stream_every: number;
- input_ready: boolean;
- minimal?: boolean;
- playback_position: number;
-}
-
-export interface AudioEvents {
- change: any;
- upload: any;
- stream: any;
- clear: any;
- play: any;
- pause: any;
- stop: any;
- start_recording: any;
- pause_recording: any;
- stop_recording: any;
- input: any;
- error: any;
- warning: any;
- clear_status: any;
- close_stream: any;
- edit: any;
- share: any;
- custom_button_click: { id: number };
-}
diff --git a/6.11.1/audio/shared/utils.ts b/6.11.1/audio/shared/utils.ts
deleted file mode 100644
index 1e099e784b3e9686c9ffaf4bd9636eb82e5b11a7..0000000000000000000000000000000000000000
--- a/6.11.1/audio/shared/utils.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import type WaveSurfer from "wavesurfer.js";
-import { audioBufferToWav } from "./audioBufferToWav";
-
-export interface LoadedParams {
- autoplay?: boolean;
-}
-
-export function blob_to_data_url(blob: Blob): Promise {
- return new Promise((fulfill, reject) => {
- let reader = new FileReader();
- reader.onerror = reject;
- reader.onload = () => fulfill(reader.result as string);
- reader.readAsDataURL(blob);
- });
-}
-
-export const process_audio = async (
- audioBuffer: AudioBuffer,
- start?: number,
- end?: number,
- waveform_sample_rate?: number
-): Promise => {
- const audioContext = new AudioContext({
- sampleRate: waveform_sample_rate || audioBuffer.sampleRate
- });
- const numberOfChannels = audioBuffer.numberOfChannels;
- const sampleRate = waveform_sample_rate || audioBuffer.sampleRate;
-
- let trimmedLength = audioBuffer.length;
- let startOffset = 0;
- if (start != null && end != null) {
- startOffset = Math.round(start * sampleRate);
- const endOffset = Math.round(end * sampleRate);
- trimmedLength = endOffset - startOffset;
- }
-
- const trimmedAudioBuffer = audioContext.createBuffer(
- numberOfChannels,
- trimmedLength,
- sampleRate
- );
-
- for (let channel = 0; channel < numberOfChannels; channel++) {
- const channelData = audioBuffer.getChannelData(channel);
- const trimmedData = trimmedAudioBuffer.getChannelData(channel);
- for (let i = 0; i < trimmedLength; i++) {
- trimmedData[i] = channelData[startOffset + i];
- }
- }
-
- return audioBufferToWav(trimmedAudioBuffer);
-};
-
-export function loaded(
- node: HTMLAudioElement,
- { autoplay }: LoadedParams = {}
-): void {
- async function handle_playback(): Promise {
- if (!autoplay) return;
- node.pause();
- await node.play();
- }
-}
-
-export const skip_audio = (waveform: WaveSurfer, amount: number): void => {
- if (!waveform) return;
- waveform.skip(amount);
-};
-
-export const get_skip_rewind_amount = (
- audio_duration: number,
- skip_length?: number | null
-): number => {
- if (!skip_length) {
- skip_length = 5;
- }
- return (audio_duration / 100) * skip_length || 5;
-};
diff --git a/6.11.1/audio/static/StaticAudio.svelte b/6.11.1/audio/static/StaticAudio.svelte
deleted file mode 100644
index f64346a96d93f7e9730ae2c09793bfdcf89c1027..0000000000000000000000000000000000000000
--- a/6.11.1/audio/static/StaticAudio.svelte
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
-{#if value !== null}
- {#if minimal}
-
- {:else}
-
- {#if buttons.some((btn) => typeof btn === "string" && btn === "download")}
-
-
-
- {/if}
- {#if buttons.some((btn) => typeof btn === "string" && btn === "share")}
- {
- if (!fileData || !fileData.url) return "";
- let url = await uploadToHuggingFace(fileData.url, "url");
- return ``;
- }}
- {value}
- />
- {/if}
-
-
- {}}
- />
- {/if}
-{:else}
-
-
-
-{/if}
diff --git a/6.11.1/audio/streaming/StreamAudio.svelte b/6.11.1/audio/streaming/StreamAudio.svelte
deleted file mode 100644
index 29a14bf0c879bcfa3bbf841ff31a3d339212df91..0000000000000000000000000000000000000000
--- a/6.11.1/audio/streaming/StreamAudio.svelte
+++ /dev/null
@@ -1,214 +0,0 @@
-
-
-
- {#if waveform_options.show_recording_waveform}
-
- {/if}
-
- {#if recording && !waiting}
-
- {:else if recording && waiting}
-
- {:else}
-
- {/if}
-
-
-
-
-
-
diff --git a/6.11.1/audio/streaming/media_recorder.ts b/6.11.1/audio/streaming/media_recorder.ts
deleted file mode 100644
index 717d345884cd74f967f2b1a680c65f7a3a73796e..0000000000000000000000000000000000000000
--- a/6.11.1/audio/streaming/media_recorder.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { IMediaRecorderConstructor } from "extendable-media-recorder";
-
-let media_recorder_initialized = false;
-let media_recorder;
-
-export async function init_media_recorder(): Promise {
- const { MediaRecorder, register } = await import("extendable-media-recorder");
- const { connect } = await import("extendable-media-recorder-wav-encoder");
-
- register(await connect());
- media_recorder_initialized = true;
- media_recorder = MediaRecorder;
- return media_recorder;
-}
diff --git a/6.11.1/box/Index.svelte b/6.11.1/box/Index.svelte
deleted file mode 100644
index fa8fd889b964582c6a7dd87be3eaa90086231be9..0000000000000000000000000000000000000000
--- a/6.11.1/box/Index.svelte
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/box/package.json b/6.11.1/box/package.json
deleted file mode 100644
index b7dbd3929f9b93f00d5f6ba6a5c6f07efa1dd1a0..0000000000000000000000000000000000000000
--- a/6.11.1/box/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "@gradio/box",
- "version": "0.2.31",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "main_changeset": true,
- "exports": {
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- },
- "./package.json": "./package.json"
- },
- "dependencies": {
- "@gradio/atoms": "workspace:^"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/box"
- }
-}
diff --git a/6.11.1/browserstate/Index.svelte b/6.11.1/browserstate/Index.svelte
deleted file mode 100644
index e918b72c6369e9cb55c752ded4f30d531090a84f..0000000000000000000000000000000000000000
--- a/6.11.1/browserstate/Index.svelte
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
diff --git a/6.11.1/browserstate/crypto.ts b/6.11.1/browserstate/crypto.ts
deleted file mode 100644
index 108c8461bd3d8375157d30672a7408641dec4df3..0000000000000000000000000000000000000000
--- a/6.11.1/browserstate/crypto.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import CryptoJS from "crypto-js";
-
-export function encrypt(data: string, key: string): string {
- const hashedKey = CryptoJS.SHA256(key).toString();
- const iv = CryptoJS.lib.WordArray.random(16);
- const encrypted = CryptoJS.AES.encrypt(data, hashedKey, {
- iv: iv,
- mode: CryptoJS.mode.CBC,
- padding: CryptoJS.pad.Pkcs7
- });
-
- const ivString = CryptoJS.enc.Base64.stringify(iv);
- const cipherString = encrypted.toString();
- return ivString + ":" + cipherString;
-}
-
-export function decrypt(encryptedData: string, key: string): string {
- const hashedKey = CryptoJS.SHA256(key).toString();
- const [ivString, cipherString] = encryptedData.split(":");
- const iv = CryptoJS.enc.Base64.parse(ivString);
- const decrypted = CryptoJS.AES.decrypt(cipherString, hashedKey, {
- iv: iv,
- mode: CryptoJS.mode.CBC,
- padding: CryptoJS.pad.Pkcs7
- });
-
- return decrypted.toString(CryptoJS.enc.Utf8);
-}
diff --git a/6.11.1/browserstate/package.json b/6.11.1/browserstate/package.json
deleted file mode 100644
index 1821f69df4ab13380ab9c6bc41f5fb44ea1c7627..0000000000000000000000000000000000000000
--- a/6.11.1/browserstate/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "@gradio/browserstate",
- "version": "0.3.7",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "main_changeset": true,
- "exports": {
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- },
- "./package.json": "./package.json"
- },
- "dependencies": {
- "@gradio/utils": "workspace:^",
- "crypto-js": "^4.2.0",
- "dequal": "^2.0.3"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/state"
- },
- "devDependencies": {
- "@types/crypto-js": "^4.2.2"
- }
-}
diff --git a/6.11.1/build/package.json b/6.11.1/build/package.json
deleted file mode 100644
index b12d3810c02326742fe3ec2ffce6512b50793c40..0000000000000000000000000000000000000000
--- a/6.11.1/build/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "@self/build",
- "version": "0.6.1",
- "description": "Gradio UI packages",
- "type": "module",
- "main": "out/index.js",
- "private": "true",
- "author": "",
- "license": "ISC",
- "scripts": {
- "build": "esbuild src/index.ts --platform=node --format=esm --target=node18 --bundle --packages=external --outfile=out/index.js && cp src/component_loader.js out/"
- },
- "dependencies": {
- "@gradio/theme": "workspace:^",
- "esbuild": "^0.25.10",
- "svelte-i18n": "^4.0.1"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "main_changeset": true,
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/build"
- }
-}
diff --git a/6.11.1/button/Index.svelte b/6.11.1/button/Index.svelte
deleted file mode 100644
index 114e940ae66cd9d069677ed4556f1b20aaf2fb62..0000000000000000000000000000000000000000
--- a/6.11.1/button/Index.svelte
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/button/main.ts b/6.11.1/button/main.ts
deleted file mode 100644
index c517399bd8d1fef0dffc9444717b2061a246f6dc..0000000000000000000000000000000000000000
--- a/6.11.1/button/main.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export { default as default } from "./Index.svelte";
-export { default as BaseButton } from "./shared/Button.svelte";
diff --git a/6.11.1/button/package.json b/6.11.1/button/package.json
deleted file mode 100644
index 0eceb166571a4c8f337494de80697b51f6a00a35..0000000000000000000000000000000000000000
--- a/6.11.1/button/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "@gradio/button",
- "version": "0.6.6",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "dependencies": {
- "@gradio/client": "workspace:^",
- "@gradio/image": "workspace:^",
- "@gradio/upload": "workspace:^",
- "@gradio/utils": "workspace:^"
- },
- "devDependencies": {
- "@gradio/preview": "workspace:^"
- },
- "main": "./Index.svelte",
- "main_changeset": true,
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- }
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/button"
- }
-}
diff --git a/6.11.1/button/shared/Button.svelte b/6.11.1/button/shared/Button.svelte
deleted file mode 100644
index 3a1c3d2521bb8f52fd184b211b8d590db777de36..0000000000000000000000000000000000000000
--- a/6.11.1/button/shared/Button.svelte
+++ /dev/null
@@ -1,236 +0,0 @@
-
-
-{#if link && link.length > 0}
-
- {#if icon}
-
- {/if}
- {#if children}
- {@render children()}
- {/if}
-
-{:else}
-
-{/if}
-
-
diff --git a/6.11.1/chatbot/Index.svelte b/6.11.1/chatbot/Index.svelte
deleted file mode 100644
index c8516f65258ed5c1a837c09abcc90bf1894a8921..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/Index.svelte
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-
-
-
- {#if gradio.shared.loading_status}
-
- gradio.dispatch("clear_status", gradio.shared.loading_status)}
- />
- {/if}
-
- {#if gradio.shared.show_label}
-
- {/if}
- typeof btn === "string" && btn === "share"
- )}
- show_copy_all_button={(gradio.props.buttons ?? ["copy_all"]).some(
- (btn) => typeof btn === "string" && btn === "copy_all"
- )}
- value={_value}
- latex_delimiters={gradio.props.latex_delimiters}
- display_consecutive_in_same_bubble={gradio.props
- .group_consecutive_messages}
- render_markdown={gradio.props.render_markdown}
- theme_mode={gradio.shared.theme_mode}
- editable={gradio.props.editable}
- pending_message={gradio.shared.loading_status?.status === "pending"}
- generating={gradio.shared.loading_status?.status === "generating"}
- rtl={gradio.props.rtl}
- show_copy_button={(gradio.props.buttons ?? ["copy"]).some(
- (btn) => typeof btn === "string" && btn === "copy"
- )}
- buttons={gradio.props.buttons}
- on_custom_button_click={(id) => {
- gradio.dispatch("custom_button_click", { id });
- }}
- like_user_message={gradio.props.like_user_message}
- show_progress={gradio.shared.loading_status?.show_progress || "full"}
- on:change={() => (
- (gradio.props.value = gradio.props.value),
- gradio.dispatch("change", gradio.props.value)
- )}
- on:select={(e) => gradio.dispatch("select", e.detail)}
- on:like={(e) => gradio.dispatch("like", e.detail)}
- on:share={(e) => gradio.dispatch("share", e.detail)}
- on:error={(e) => gradio.dispatch("error", e.detail)}
- on:example_select={(e) => gradio.dispatch("example_select", e.detail)}
- on:option_select={(e) => gradio.dispatch("option_select", e.detail)}
- on:retry={(e) => gradio.dispatch("retry", e.detail)}
- on:undo={(e) => gradio.dispatch("undo", e.detail)}
- on:clear={() => {
- gradio.props.value = [];
- gradio.dispatch("clear");
- }}
- on:copy={(e) => gradio.dispatch("copy", e.detail)}
- on:edit={(e) => {
- if (gradio.props.value === null || gradio.props.value.length === 0)
- return;
- //@ts-ignore
- gradio.props.value[e.detail.index].content = [
- { text: e.detail.value, type: "text" }
- ];
- gradio.dispatch("edit", e.detail);
- }}
- avatar_images={gradio.props.avatar_images}
- sanitize_html={gradio.props.sanitize_html}
- line_breaks={gradio.props.line_breaks}
- autoscroll={gradio.props.autoscroll}
- layout={gradio.props.layout}
- placeholder={gradio.props.placeholder}
- examples={gradio.props.examples}
- _retryable={gradio.props._retryable}
- _undoable={gradio.props._undoable}
- upload={(...args) => gradio.shared.client.upload(...args)}
- _fetch={(...args) => gradio.shared.client.fetch(...args)}
- load_component={gradio.shared.load_component}
- allow_file_downloads={gradio.props.allow_file_downloads}
- allow_tags={gradio.props.allow_tags}
- watermark={gradio.props.watermark}
- />
-
-
-
-
diff --git a/6.11.1/chatbot/package.json b/6.11.1/chatbot/package.json
deleted file mode 100644
index a9214638948cf7aa74f62bc19658a2b438eaf5a2..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "@gradio/chatbot",
- "version": "0.29.7",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "dependencies": {
- "@gradio/atoms": "workspace:^",
- "@gradio/client": "workspace:^",
- "@gradio/gallery": "workspace:^",
- "@gradio/icons": "workspace:^",
- "@gradio/markdown-code": "workspace:^",
- "@gradio/plot": "workspace:^",
- "@gradio/statustracker": "workspace:^",
- "@gradio/theme": "workspace:^",
- "@gradio/upload": "workspace:^",
- "@gradio/utils": "workspace:^",
- "@types/katex": "^0.16.7",
- "@types/prismjs": "1.26.5",
- "dequal": "^2.0.3"
- },
- "devDependencies": {
- "@gradio/audio": "workspace:^",
- "@gradio/image": "workspace:^",
- "@gradio/preview": "workspace:^",
- "@gradio/video": "workspace:^"
- },
- "main_changeset": true,
- "main": "./Index.svelte",
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- }
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/chatbot"
- }
-}
diff --git a/6.11.1/chatbot/shared/ButtonPanel.svelte b/6.11.1/chatbot/shared/ButtonPanel.svelte
deleted file mode 100644
index 867ffc11f9c380b0d2dcfd325524af573a091102..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/ButtonPanel.svelte
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-{#if show_copy || show_retry || show_undo || show_edit || likeable || (show_download_button && file?.url) || (show_share_button && file)}
-
-{/if}
-
-
diff --git a/6.11.1/chatbot/shared/ChatBot.svelte b/6.11.1/chatbot/shared/ChatBot.svelte
deleted file mode 100644
index df68565be930f3534d74feab2fcedcb14ec28e7d..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/ChatBot.svelte
+++ /dev/null
@@ -1,536 +0,0 @@
-
-
-{#if value !== null && value.length > 0}
-
- {#if show_share_button}
- {
- try {
- // @ts-ignore
- const formatted = await format_chat_for_sharing(value);
- dispatch("share", {
- description: formatted
- });
- } catch (e) {
- console.error(e);
- let message = e instanceof ShareError ? e.message : "Share failed.";
- dispatch("error", message);
- }
- }}
- />
- {/if}
- dispatch("clear")}
- label={i18n("chatbot.clear")}
- />
- {#if show_copy_all_button}
-
- {/if}
-
-{/if}
-
-
- {#if value !== null && value.length > 0 && groupedMessages !== null}
-
- {#each groupedMessages as messages, i}
- {@const role = messages[0].role === "user" ? "user" : "bot"}
- {@const avatar_img = avatar_images[role === "user" ? 0 : 1]}
- {@const opposite_avatar_img = avatar_images[role === "user" ? 0 : 1]}
- {@const feedback_index = groupedMessages
- .slice(0, i)
- .filter((m) => m[0].role === "assistant").length}
- {@const current_feedback =
- role === "bot" && feedback_value && feedback_value[feedback_index]
- ? feedback_value[feedback_index]
- : null}
-
0 &&
- messages[messages.length - 1].type == "text")}
- in_edit_mode={edit_index === i}
- bind:edit_messages
- {show_copy_button}
- handle_action={(selected) => {
- if (selected == "edit") {
- edit_messages.splice(0, edit_messages.length);
- }
- if (selected === "edit" || selected === "edit_submit") {
- messages.forEach((msg, index) => {
- handle_action(selected === "edit" ? i : index, msg, selected);
- });
- } else {
- handle_action(i, messages[0], selected);
- }
- }}
- scroll={is_browser ? scroll : () => {}}
- {allow_file_downloads}
- on:copy={(e) => dispatch("copy", e.detail)}
- />
- {#if show_progress !== "hidden" && generating && messages[messages.length - 1].role === "assistant" && messages[messages.length - 1].metadata?.status === "done"}
-
- {/if}
- {/each}
- {#if show_progress !== "hidden" && pending_message}
-
- {:else if options}
-
- {#each options as option, index}
-
- {/each}
-
- {/if}
-
- {:else}
-
dispatch("example_select", e.detail)}
- />
- {/if}
-
-
-{#if show_scroll_button}
-
-
-
-{/if}
-
-
diff --git a/6.11.1/chatbot/shared/Component.svelte b/6.11.1/chatbot/shared/Component.svelte
deleted file mode 100644
index 946b388b4cc17bda3f7d209ac1800ee14cf973cc..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Component.svelte
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-{#if type === "gallery"}
-
-{:else if type === "dataframe"}
- {}, i18n }}
- datatype={props.datatype}
- latex_delimiters={props.latex_delimiters}
- col_count={props.col_count}
- row_count={props.row_count}
- on:load
- />
-{:else if type === "plot"}
- {}}
- bokeh_version={props.bokeh_version}
- caption={props.caption || ""}
- show_actions_button={true}
- on:load
- />
-{:else if type === "audio"}
-
-{:else if type === "video"}
-
-
-
-{:else if type === "image"}
-
-
-
-{:else if type === "html"}
-
-{:else if type === "model3d"}
- {}, i18n }}
- on:load
- {i18n}
- />
-{/if}
diff --git a/6.11.1/chatbot/shared/Copy.svelte b/6.11.1/chatbot/shared/Copy.svelte
deleted file mode 100644
index 551879e7029176df6cd714f523c7f2811a4af44c..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Copy.svelte
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
diff --git a/6.11.1/chatbot/shared/CopyAll.svelte b/6.11.1/chatbot/shared/CopyAll.svelte
deleted file mode 100644
index d7bd6c999a4529c4772379800065a4391a8de88a..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/CopyAll.svelte
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
diff --git a/6.11.1/chatbot/shared/Download.svelte b/6.11.1/chatbot/shared/Download.svelte
deleted file mode 100644
index 4b5d1602f0940d92baaf87c21292f4950dfaa217..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Download.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/Examples.svelte b/6.11.1/chatbot/shared/Examples.svelte
deleted file mode 100644
index 613d5bb06d3c20acf0b5dfe41b62ccabd573a28d..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Examples.svelte
+++ /dev/null
@@ -1,321 +0,0 @@
-
-
-
- {#if placeholder !== null}
-
-
-
- {/if}
- {#if examples !== null}
-
- {#each examples as example, i}
-
- {/each}
-
- {/if}
-
-
-
diff --git a/6.11.1/chatbot/shared/Flag.svelte b/6.11.1/chatbot/shared/Flag.svelte
deleted file mode 100644
index c99256f7e94c39452d2cd1bf72e8b50321986206..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Flag.svelte
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/FlagActive.svelte b/6.11.1/chatbot/shared/FlagActive.svelte
deleted file mode 100644
index 804dce5979a7daf90cf3a07008ec6d2a778230e6..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/FlagActive.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/LikeDislike.svelte b/6.11.1/chatbot/shared/LikeDislike.svelte
deleted file mode 100644
index 45e3486e1de3114d4dd81b85810e6fedfada4c29..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/LikeDislike.svelte
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-{#if feedback_options.includes("Like") || feedback_options.includes("Dislike")}
- {#if feedback_options.includes("Dislike")}
- toggleSelection("Dislike")}
- />
- {/if}
- {#if feedback_options.includes("Like")}
- toggleSelection("Like")}
- />
- {/if}
-{/if}
-
-{#if extra_feedback.length > 0}
-
-{/if}
-
-
diff --git a/6.11.1/chatbot/shared/Message.svelte b/6.11.1/chatbot/shared/Message.svelte
deleted file mode 100644
index 8b2c9ce7e03494f52f0cb9a470aa69ae9155b2aa..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Message.svelte
+++ /dev/null
@@ -1,651 +0,0 @@
-
-
-
- {#if avatar_img !== null}
-
-
-
- {/if}
-
-
- {#each messages as message, thought_index}
-
0}
- >
- {#if in_edit_mode && message.type === "text"}
-
-
- {:else}
-
-
handle_select(i, message)}
- on:keydown={(e) => {
- if (e.key === "Enter") {
- handle_select(i, message);
- }
- }}
- dir={rtl ? "rtl" : "ltr"}
- aria-label={role +
- "'s message: " +
- get_message_label_data(message)}
- >
- {#if message?.metadata?.title}
-
- {:else}
-
- {/if}
-
- {/if}
-
-
- {#if layout === "panel"}
-
dispatch("copy", e.detail)}
- {i18n}
- />
- {/if}
- {/each}
-
-
-
-
-{#if layout === "bubble"}
-
-{/if}
-
-
diff --git a/6.11.1/chatbot/shared/MessageContent.svelte b/6.11.1/chatbot/shared/MessageContent.svelte
deleted file mode 100644
index ab5cbaff7c3ca96e9b8d4a3fbd017f040bbc1c45..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/MessageContent.svelte
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-{#if message.type === "text"}
-
-
-
-{:else if message.type === "component" && message.content.component in _components}
- 0 &&
- display_consecutive_in_same_bubble}
- {i18n}
- {upload}
- {_fetch}
- on:load={() => scroll()}
- {allow_file_downloads}
- />
-{:else if message.type === "component" && message.content.component === "file"}
- {#each message.content.value as file_}
- {@const file: FileData = file_ as FileData}
-
- {/each}
-{/if}
-
-
diff --git a/6.11.1/chatbot/shared/Pending.svelte b/6.11.1/chatbot/shared/Pending.svelte
deleted file mode 100644
index f3946d18361b260b32a75be05d1d758dcf6e292c..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Pending.svelte
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
- {#if avatar_images[1] !== null}
-
-
-
- {/if}
-
-
-
-
-
diff --git a/6.11.1/chatbot/shared/Remove.svelte b/6.11.1/chatbot/shared/Remove.svelte
deleted file mode 100644
index 7dee223fcd1986ec4a9c47eb102205c21050096a..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Remove.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/Thought.svelte b/6.11.1/chatbot/shared/Thought.svelte
deleted file mode 100644
index 1fa079633981280b03ae37029d9e91eec290ec13..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/Thought.svelte
+++ /dev/null
@@ -1,298 +0,0 @@
-
-
-
-
e.key === "Enter" && toggleExpanded()}
- >
-
-
-
-
- {#if thought_node.metadata?.status === "pending"}
-
- {/if}
- {#if thought_node?.metadata?.log || thought_node?.metadata?.duration}
-
- {#if thought_node.metadata.log}
- {thought_node.metadata.log}
- {/if}
- {#if thought_node.metadata.duration !== undefined}
- ({#if Number.isInteger(thought_node.metadata.duration)}{thought_node
- .metadata
- .duration}s{:else if thought_node.metadata.duration >= 0.1}{thought_node.metadata.duration.toFixed(
- 1
- )}s{:else}{(thought_node.metadata.duration * 1000).toFixed(
- 1
- )}ms{/if})
- {/if}
-
- {/if}
-
-
- {#if expanded}
-
-
-
- {#if thought_node.children?.length > 0}
-
- {#each thought_node.children as child, index}
-
- {/each}
-
- {/if}
-
- {/if}
-
-
-
diff --git a/6.11.1/chatbot/shared/ThumbDownActive.svelte b/6.11.1/chatbot/shared/ThumbDownActive.svelte
deleted file mode 100644
index 4b0e3b49846182738a43ec9930cfb71c0e645603..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/ThumbDownActive.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/ThumbDownDefault.svelte b/6.11.1/chatbot/shared/ThumbDownDefault.svelte
deleted file mode 100644
index 14ed5cd46ad0e6507c2ed01c4fcb86f4b7531a7b..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/ThumbDownDefault.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/ThumbUpActive.svelte b/6.11.1/chatbot/shared/ThumbUpActive.svelte
deleted file mode 100644
index 46d62c7a2a2198d60c867f96ee017b69039a91eb..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/ThumbUpActive.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/ThumbUpDefault.svelte b/6.11.1/chatbot/shared/ThumbUpDefault.svelte
deleted file mode 100644
index 65134c934960956ace74a7899de932483aacf796..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/ThumbUpDefault.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/6.11.1/chatbot/shared/autorender.d.ts b/6.11.1/chatbot/shared/autorender.d.ts
deleted file mode 100644
index 946e678e94e682f47568ac2863fabe280b7788c4..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/autorender.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module "katex/dist/contrib/auto-render.js";
diff --git a/6.11.1/chatbot/shared/utils.ts b/6.11.1/chatbot/shared/utils.ts
deleted file mode 100644
index 6431e25a4b4eeda5581df4ebb304d3f2327efa37..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/shared/utils.ts
+++ /dev/null
@@ -1,372 +0,0 @@
-import type { FileData } from "@gradio/client";
-import type { ComponentType, SvelteComponent } from "svelte";
-import { uploadToHuggingFace } from "@gradio/utils";
-import type {
- ComponentMessage,
- ComponentData,
- TextMessage,
- NormalisedMessage,
- Message,
- MessageRole,
- ThoughtNode,
- Text,
- Component,
- File
-} from "../types";
-import type { LoadedComponent } from "../../core/src/types";
-import { Gradio } from "@gradio/utils";
-
-export const format_chat_for_sharing = async (
- chat: NormalisedMessage[],
- url_length_limit = 1800
-): Promise => {
- let messages_to_share = [...chat];
- let formatted = await format_messages(messages_to_share);
-
- if (formatted.length > url_length_limit && messages_to_share.length > 2) {
- const first_message = messages_to_share[0];
- const last_message = messages_to_share[messages_to_share.length - 1];
- messages_to_share = [first_message, last_message];
- formatted = await format_messages(messages_to_share);
- }
-
- if (formatted.length > url_length_limit && messages_to_share.length > 0) {
- const truncated_messages = messages_to_share.map((msg) => {
- if (msg.type === "text") {
- const max_length =
- Math.floor(url_length_limit / messages_to_share.length) - 20;
- if (msg.content.length > max_length) {
- return {
- ...msg,
- content: msg.content.substring(0, max_length) + "..."
- };
- }
- }
- return msg;
- });
-
- messages_to_share = truncated_messages;
- formatted = await format_messages(messages_to_share);
- }
-
- return formatted;
-};
-
-const format_messages = async (chat: NormalisedMessage[]): Promise => {
- let messages = await Promise.all(
- chat.map(async (message) => {
- if (message.role === "system") return "";
- let speaker_emoji = message.role === "user" ? "😃" : "🤖";
- let html_content = "";
-
- if (message.type === "text") {
- const regexPatterns = {
- audio: /|!\[.*?\]\((\/file=.*?)\)/g
- };
-
- html_content = message.content;
-
- for (let [_, regex] of Object.entries(regexPatterns)) {
- let match;
-
- while ((match = regex.exec(message.content)) !== null) {
- const fileUrl = match[1] || match[2];
- const newUrl = await uploadToHuggingFace(fileUrl, "url");
- html_content = html_content.replace(fileUrl, newUrl);
- }
- }
- } else {
- if (!message.content.value) return "";
- const url =
- message.content.component === "video"
- ? message.content.value?.video.path
- : message.content.value;
- const file_url = await uploadToHuggingFace(url, "url");
- if (message.content.component === "audio") {
- html_content = ``;
- } else if (message.content.component === "video") {
- html_content = file_url;
- } else if (message.content.component === "image") {
- html_content = `
`;
- }
- }
-
- return `${speaker_emoji}: ${html_content}`;
- })
- );
- return messages.filter((msg) => msg !== "").join("\n");
-};
-
-export interface UndoRetryData {
- index: number | [number, number];
- value: string | FileData | ComponentData;
-}
-
-export interface EditData {
- index: number | [number, number];
- value: string;
- previous_value: string;
- _dispatch_value: { type: "text"; text: string }[];
-}
-
-const redirect_src_url = (src: string, root: string): string =>
- src.replace('src="/file', `src="${root}file`);
-
-function get_component_for_mime_type(
- mime_type: string | null | undefined,
- file?: { path?: string }
-): string {
- if (!mime_type) {
- const path = file?.path;
- if (path) {
- const lower_path = path.toLowerCase();
- if (
- lower_path.endsWith(".glb") ||
- lower_path.endsWith(".gltf") ||
- lower_path.endsWith(".obj") ||
- lower_path.endsWith(".stl") ||
- lower_path.endsWith(".splat") ||
- lower_path.endsWith(".ply")
- ) {
- return "model3d";
- }
- }
- return "file";
- }
- if (mime_type.includes("audio")) return "audio";
- if (mime_type.includes("video")) return "video";
- if (mime_type.includes("image")) return "image";
- if (mime_type.includes("model")) return "model3d";
- return "file";
-}
-
-function convert_file_message_to_component_message(
- message: File
-): ComponentData {
- const _file = Array.isArray(message.file) ? message.file[0] : message.file;
- const component = get_component_for_mime_type(_file?.mime_type, _file);
- // Ensure that value is always an array for files
- return {
- component: component,
- value:
- component === "file"
- ? Array.isArray(message.file)
- ? message.file
- : [message.file]
- : message.file,
- alt_text: message.alt_text,
- constructor_args: {},
- props: {}
- } as ComponentData;
-}
-
-function normalise_message(
- message: Message,
- content: Text | File | Component,
- root: string,
- i: number
-): NormalisedMessage {
- let normalized: NormalisedMessage;
- if (content.type === "text") {
- normalized = {
- role: message.role,
- metadata: message.metadata,
- content: redirect_src_url(content.text, root),
- type: "text",
- index: i,
- options: message.options
- };
- } else if (content.type === "file") {
- normalized = {
- role: message.role,
- metadata: message.metadata,
- content: convert_file_message_to_component_message(content),
- type: "component",
- index: i,
- options: message.options
- };
- } else {
- normalized = {
- role: message.role,
- metadata: message.metadata,
- content: content,
- type: "component",
- index: i,
- options: message.options
- };
- }
- return normalized;
-}
-
-export function normalise_messages(
- messages: Message[] | null,
- root: string
-): NormalisedMessage[] | null {
- if (messages === null) return messages;
-
- const thought_map = new Map();
-
- return messages
- .flatMap((message, i) => {
- const normalized: NormalisedMessage[] = message.content.map((content) =>
- normalise_message(message, content, root, i)
- );
- for (const msg of normalized) {
- const { id, title, parent_id } = message.metadata || {};
- if (parent_id) {
- const parent = thought_map.get(String(parent_id));
- if (parent) {
- const thought = { ...msg, children: [] } as ThoughtNode;
- parent.children.push(thought);
- if (id && title) {
- thought_map.set(String(id), thought);
- }
- return null;
- }
- }
- if (id && title) {
- const thought = { ...msg, children: [] } as ThoughtNode;
- thought_map.set(String(id), thought);
- return thought;
- }
- }
- return normalized;
- })
- .filter((msg): msg is NormalisedMessage => msg !== null);
-}
-
-export function is_component_message(
- message: NormalisedMessage
-): message is ComponentMessage {
- return message.type === "component";
-}
-
-export function is_last_bot_message(
- messages: NormalisedMessage[],
- all_messages: NormalisedMessage[]
-): boolean {
- const is_bot = messages[messages.length - 1].role === "assistant";
- const last_index = messages[messages.length - 1].index;
- // use JSON.stringify to handle both the number and tuple cases
- // when msg_format is tuples, last_index is an array and when it is messages, it is a number
- const is_last =
- JSON.stringify(last_index) ===
- JSON.stringify(all_messages[all_messages.length - 1].index);
- return is_last && is_bot;
-}
-
-export function group_messages(
- messages: NormalisedMessage[],
- display_consecutive_in_same_bubble = true
-): NormalisedMessage[][] {
- const groupedMessages: NormalisedMessage[][] = [];
- let currentGroup: NormalisedMessage[] = [];
- let currentRole: MessageRole | null = null;
-
- for (const message of messages) {
- if (!(message.role === "assistant" || message.role === "user")) {
- continue;
- }
-
- // If display_consecutive_in_same_bubble is false, each message should be its own group
- if (!display_consecutive_in_same_bubble) {
- groupedMessages.push([message]);
- continue;
- }
-
- if (message.role === currentRole) {
- currentGroup.push(message);
- } else {
- if (currentGroup.length > 0) {
- groupedMessages.push(currentGroup);
- }
- currentGroup = [message];
- currentRole = message.role;
- }
- }
-
- if (currentGroup.length > 0) {
- groupedMessages.push(currentGroup);
- }
-
- return groupedMessages;
-}
-
-export async function load_components(
- component_names: string[],
- _components: Record>,
- load_component: Gradio["load_component"]
-): Promise>> {
- for (const component_name of component_names) {
- if (_components[component_name] || component_name === "file") {
- continue;
- }
- const variant = component_name === "dataframe" ? "component" : "base";
- const { component } = load_component(component_name, variant);
- const comp = await component;
- // @ts-ignore
- _components[component_name] = comp.default;
- }
- return _components;
-}
-
-export function get_components_from_messages(
- messages: NormalisedMessage[] | null
-): string[] {
- if (!messages) return [];
- let components: Set = new Set();
- messages.forEach((message) => {
- if (message.type === "component") {
- components.add(message.content.component);
- }
- });
- return Array.from(components);
-}
-
-export function get_thought_content(msg: NormalisedMessage, depth = 0): string {
- let content = "";
- const indent = " ".repeat(depth);
-
- if (msg.metadata?.title) {
- content += `${indent}${depth > 0 ? "- " : ""}${msg.metadata.title}\n`;
- }
- if (typeof msg.content === "string") {
- content += `${indent} ${msg.content}\n`;
- }
- const thought = msg as ThoughtNode;
- if (thought.children?.length > 0) {
- content += thought.children
- .map((child) => get_thought_content(child, depth + 1))
- .join("");
- }
- return content;
-}
-
-export function all_text(message: TextMessage[] | TextMessage): string {
- if (Array.isArray(message)) {
- return message
- .map((m) => {
- if (m.metadata?.title) {
- return get_thought_content(m);
- }
- return m.content;
- })
- .join("\n");
- }
- if (message.metadata?.title) {
- return get_thought_content(message);
- }
- return message.content;
-}
-
-export function is_all_text(
- message: NormalisedMessage[] | NormalisedMessage
-): message is TextMessage[] | TextMessage {
- return (
- (Array.isArray(message) &&
- message.every((m) => typeof m.content === "string")) ||
- (!Array.isArray(message) && typeof message.content === "string")
- );
-}
diff --git a/6.11.1/chatbot/types.ts b/6.11.1/chatbot/types.ts
deleted file mode 100644
index a476fb97dfda7c228617e7e76a5676e66cc2e1d7..0000000000000000000000000000000000000000
--- a/6.11.1/chatbot/types.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import type { FileData } from "@gradio/client";
-import type { UndoRetryData } from "./shared/utils";
-import type {
- Gradio,
- SelectData,
- LikeData,
- CopyData,
- CustomButton
-} from "@gradio/utils";
-import type { LoadingStatus } from "@gradio/statustracker";
-
-export type MessageRole = "system" | "user" | "assistant";
-
-export interface Metadata {
- title: string | null;
- id?: number | string | null;
- parent_id?: number | string | null;
- duration?: number;
- log?: string;
- status?: "pending" | "done" | null;
-}
-
-export interface ComponentData {
- component: string;
- constructor_args: any;
- props: any;
- value: any;
- alt_text: string | null;
-}
-
-export interface Option {
- label?: string;
- value: string;
-}
-
-export interface Text {
- type: "text";
- text: string;
-}
-
-export interface Component {
- type: "component";
- component: string;
- constructor_args: object;
- props: object;
- value: any;
- alt_text: string | null;
-}
-
-export interface File {
- type: "file";
- file: FileData;
- alt_text: string | null;
-}
-
-export interface Message {
- role: MessageRole;
- metadata: Metadata;
- content: (Text | File | Component)[];
- index: number | [number, number];
- options?: Option[];
-}
-
-export interface TextMessage {
- type: "text";
- content: string;
- index: number | [number, number];
- options?: Option[];
- role: MessageRole;
- metadata: Metadata;
-}
-
-export interface ComponentMessage {
- type: "component";
- content: ComponentData;
- index: number | [number, number];
- options?: Option[];
- role: MessageRole;
- metadata: Metadata;
-}
-
-export interface ExampleMessage {
- icon?: FileData;
- display_text?: string;
- text: string;
- files?: FileData[];
-}
-
-export type message_data =
- | string
- | { file: FileData | FileData[]; alt_text: string | null }
- | { component: string; value: any; constructor_args: any; props: any }
- | null;
-
-export type NormalisedMessage = TextMessage | ComponentMessage;
-
-export type ThoughtNode = NormalisedMessage & { children: ThoughtNode[] };
-
-export interface ChatbotEvents {
- change: Message[];
- select: SelectData;
- share: ShareData;
- error: string;
- like: LikeData;
- clear_status: LoadingStatus;
- example_select: SelectData;
- option_select: SelectData;
- edit: SelectData;
- retry: UndoRetryData;
- undo: UndoRetryData;
- clear: null;
- copy: CopyData;
- custom_button_click: { id: number };
-}
-
-export interface ChatbotProps {
- autoscroll: boolean;
- messages: Message[];
- examples: ExampleMessage[] | null;
- allow_undo: boolean;
- allow_retry: boolean;
- root: string;
- proxy_url: null | string;
- max_messages: number | null;
- avatar_images: [FileData | null, FileData | null];
- like_user_message: boolean;
- height: number | string | undefined;
- resizable: boolean;
- min_height: number | string | undefined;
- max_height: number | string | undefined;
- editable: "user" | "all" | null;
- placeholder: string | null;
- allow_file_downloads: boolean;
- watermark: string | null;
- value: Message[];
- _selectable: boolean;
- likeable: boolean;
- feedback_options: string[];
- feedback_value: (string | null)[] | null;
- buttons: (string | CustomButton)[] | null;
- rtl: boolean;
- sanitize_html: boolean;
- layout: "bubble" | "panel";
- type: "tuples" | "messages";
- render_markdown: boolean;
- line_breaks: boolean;
- group_consecutive_messages: boolean;
- allow_tags: string[] | boolean;
- latex_delimiters: {
- left: string;
- right: string;
- display: boolean;
- }[];
- _retryable: boolean;
- _undoable: boolean;
-}
diff --git a/6.11.1/checkbox/Example.svelte b/6.11.1/checkbox/Example.svelte
deleted file mode 100644
index 14222b070814b943d90b1c14767b09dc391a824b..0000000000000000000000000000000000000000
--- a/6.11.1/checkbox/Example.svelte
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- {value !== null ? value.toLocaleString() : ""}
-
-
-
diff --git a/6.11.1/checkbox/Index.svelte b/6.11.1/checkbox/Index.svelte
deleted file mode 100644
index c074d030a0175bfd9bc255955e57a998658eb8ce..0000000000000000000000000000000000000000
--- a/6.11.1/checkbox/Index.svelte
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
- gradio.dispatch("clear_status", gradio.shared.loading_status)}
- />
- {#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
- {
- gradio.dispatch("custom_button_click", { id });
- }}
- />
- {/if}
- gradio.dispatch("change", val)}
- on_input={() => gradio.dispatch("input")}
- on_select={(data) => gradio.dispatch("select", data)}
- />
- {#if gradio.props.info}
-
- {/if}
-
diff --git a/6.11.1/checkbox/package.json b/6.11.1/checkbox/package.json
deleted file mode 100644
index 25ad2a15f4074e03469a7e80c6f56831bac40f51..0000000000000000000000000000000000000000
--- a/6.11.1/checkbox/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "@gradio/checkbox",
- "version": "0.6.6",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "main_changeset": true,
- "main": "./Index.svelte",
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- },
- "./example": {
- "gradio": "./Example.svelte",
- "svelte": "./dist/Example.svelte",
- "types": "./dist/Example.svelte.d.ts"
- }
- },
- "dependencies": {
- "@gradio/atoms": "workspace:^",
- "@gradio/statustracker": "workspace:^",
- "@gradio/utils": "workspace:^"
- },
- "devDependencies": {
- "@gradio/preview": "workspace:^"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/checkbox"
- }
-}
diff --git a/6.11.1/checkbox/shared/Checkbox.svelte b/6.11.1/checkbox/shared/Checkbox.svelte
deleted file mode 100644
index bc5e78878a217d15b21347eddb9907c4e6e56cff..0000000000000000000000000000000000000000
--- a/6.11.1/checkbox/shared/Checkbox.svelte
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
diff --git a/6.11.1/checkbox/types.ts b/6.11.1/checkbox/types.ts
deleted file mode 100644
index ec75de91ce715730cfde897d3adc1422a5ddad19..0000000000000000000000000000000000000000
--- a/6.11.1/checkbox/types.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type { SelectData, CustomButton } from "@gradio/utils";
-import type { LoadingStatus } from "js/statustracker";
-
-export interface CheckboxProps {
- value: boolean;
- info: string;
- buttons: (string | CustomButton)[] | null;
-}
-
-export interface CheckboxEvents {
- change: boolean;
- input: boolean;
- select: SelectData;
- clear_status: LoadingStatus;
- custom_button_click: { id: number };
-}
diff --git a/6.11.1/checkboxgroup/Example.svelte b/6.11.1/checkboxgroup/Example.svelte
deleted file mode 100644
index 03b00e16396ef48ed247fbb8920e207df1a21f6c..0000000000000000000000000000000000000000
--- a/6.11.1/checkboxgroup/Example.svelte
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- {names_string}
-
-
-
diff --git a/6.11.1/checkboxgroup/Index.svelte b/6.11.1/checkboxgroup/Index.svelte
deleted file mode 100644
index 85580ed4b6624db41dd62185bcf1154d51b4fede..0000000000000000000000000000000000000000
--- a/6.11.1/checkboxgroup/Index.svelte
+++ /dev/null
@@ -1,310 +0,0 @@
-
-
-
-
-
-
- gradio.dispatch("clear_status", gradio.shared.loading_status)}
- />
- {#if gradio.shared.show_label && gradio.props.buttons && gradio.props.buttons.length > 0}
- {
- gradio.dispatch("custom_button_click", { id });
- }}
- />
- {/if}
-
- {#if gradio.props.show_select_all && gradio.shared.interactive}
-
-
-
-
- {:else if gradio.shared.show_label}
- {gradio.shared.label || gradio.i18n("checkbox.checkbox_group")}
- {/if}
-
-
-
- {#each gradio.props.choices as [display_value, internal_value], i}
-
- {/each}
-
-
-
-
diff --git a/6.11.1/checkboxgroup/package.json b/6.11.1/checkboxgroup/package.json
deleted file mode 100644
index e53d1c7d0e0b0f6c5a7872828f6e63cb9e7e2762..0000000000000000000000000000000000000000
--- a/6.11.1/checkboxgroup/package.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "@gradio/checkboxgroup",
- "version": "0.10.1",
- "description": "Gradio UI packages",
- "type": "module",
- "author": "",
- "license": "ISC",
- "private": false,
- "main_changeset": true,
- "main": "./Index.svelte",
- "exports": {
- ".": {
- "gradio": "./Index.svelte",
- "svelte": "./dist/Index.svelte",
- "types": "./dist/Index.svelte.d.ts"
- },
- "./example": {
- "gradio": "./Example.svelte",
- "svelte": "./dist/Example.svelte",
- "types": "./dist/Example.svelte.d.ts"
- },
- "./package.json": "./package.json"
- },
- "dependencies": {
- "@gradio/atoms": "workspace:^",
- "@gradio/statustracker": "workspace:^",
- "@gradio/utils": "workspace:^",
- "dequal": "^2.0.3"
- },
- "devDependencies": {
- "@gradio/preview": "workspace:^"
- },
- "peerDependencies": {
- "svelte": "^5.48.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "js/checkboxgroup"
- }
-}
diff --git a/6.11.1/checkboxgroup/types.ts b/6.11.1/checkboxgroup/types.ts
deleted file mode 100644
index 87c7f82c13031e7262a9d4a709ade5e347271404..0000000000000000000000000000000000000000
--- a/6.11.1/checkboxgroup/types.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import type { SelectData, CustomButton } from "@gradio/utils";
-
-export interface CheckboxGroupProps {
- value: (string | number)[];
- choices: [string, string | number][];
- info: string;
- show_select_all: boolean;
- buttons: (string | CustomButton)[] | null;
-}
-
-export interface CheckboxGroupEvents {
- change: (string | number)[];
- input: (string | number)[];
- select: SelectData;
- clear_status: void;
- custom_button_click: { id: number };
-}
diff --git a/6.11.1/client/package-lock.json b/6.11.1/client/package-lock.json
deleted file mode 100644
index 7aa85d792fbf1fc117c39c8208e51fe02a9c891d..0000000000000000000000000000000000000000
--- a/6.11.1/client/package-lock.json
+++ /dev/null
@@ -1,2093 +0,0 @@
-{
- "name": "@gradio/client",
- "version": "1.19.1",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "@gradio/client",
- "version": "1.19.1",
- "license": "ISC",
- "dependencies": {
- "@types/eventsource": "^1.1.15",
- "bufferutil": "^4.0.7",
- "eventsource": "^2.0.2",
- "fetch-event-stream": "^0.1.5",
- "msw": "^2.2.1",
- "semiver": "^1.1.0",
- "textlinestream": "^1.1.1",
- "typescript": "^5.0.0",
- "vi": "^1.0.0",
- "vite": "^6.4.1",
- "ws": "^8.13.0"
- },
- "devDependencies": {
- "@types/ws": "^8.5.10",
- "esbuild": "^0.21.0"
- },
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
- "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
- "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
- "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
- "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
- "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
- "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
- "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
- "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
- "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
- "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
- "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
- "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
- "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
- "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
- "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
- "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
- "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/netbsd-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz",
- "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
- "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openbsd-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz",
- "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
- "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/openharmony-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz",
- "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
- "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
- "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
- "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
- "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@inquirer/ansi": {
- "version": "1.0.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@inquirer/ansi/-/ansi-1.0.1.tgz",
- "integrity": "sha512-yqq0aJW/5XPhi5xOAL1xRCpe1eh8UFVgYFpFsjEqmIR8rKLyP+HINvFXwUaxYICflJrVlxnp7lLN6As735kVpw==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@inquirer/confirm": {
- "version": "5.1.19",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@inquirer/confirm/-/confirm-5.1.19.tgz",
- "integrity": "sha512-wQNz9cfcxrtEnUyG5PndC8g3gZ7lGDBzmWiXZkX8ot3vfZ+/BLjR8EvyGX4YzQLeVqtAlY/YScZpW7CW8qMoDQ==",
- "license": "MIT",
- "dependencies": {
- "@inquirer/core": "^10.3.0",
- "@inquirer/type": "^3.0.9"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "@types/node": ">=18"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- }
- }
- },
- "node_modules/@inquirer/core": {
- "version": "10.3.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@inquirer/core/-/core-10.3.0.tgz",
- "integrity": "sha512-Uv2aPPPSK5jeCplQmQ9xadnFx2Zhj9b5Dj7bU6ZeCdDNNY11nhYy4btcSdtDguHqCT2h5oNeQTcUNSGGLA7NTA==",
- "license": "MIT",
- "dependencies": {
- "@inquirer/ansi": "^1.0.1",
- "@inquirer/figures": "^1.0.14",
- "@inquirer/type": "^3.0.9",
- "cli-width": "^4.1.0",
- "mute-stream": "^2.0.0",
- "signal-exit": "^4.1.0",
- "wrap-ansi": "^6.2.0",
- "yoctocolors-cjs": "^2.1.2"
- },
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "@types/node": ">=18"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- }
- }
- },
- "node_modules/@inquirer/figures": {
- "version": "1.0.14",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@inquirer/figures/-/figures-1.0.14.tgz",
- "integrity": "sha512-DbFgdt+9/OZYFM+19dbpXOSeAstPy884FPy1KjDu4anWwymZeOYhMY1mdFri172htv6mvc/uvIAAi7b7tvjJBQ==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@inquirer/type": {
- "version": "3.0.9",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@inquirer/type/-/type-3.0.9.tgz",
- "integrity": "sha512-QPaNt/nmE2bLGQa9b7wwyRJoLZ7pN6rcyXvzU0YCmivmJyq1BVo94G98tStRWkoD1RgDX5C+dPlhhHzNdu/W/w==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "peerDependencies": {
- "@types/node": ">=18"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- }
- }
- },
- "node_modules/@mswjs/interceptors": {
- "version": "0.40.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@mswjs/interceptors/-/interceptors-0.40.0.tgz",
- "integrity": "sha512-EFd6cVbHsgLa6wa4RljGj6Wk75qoHxUSyc5asLyyPSyuhIcdS2Q3Phw6ImS1q+CkALthJRShiYfKANcQMuMqsQ==",
- "license": "MIT",
- "dependencies": {
- "@open-draft/deferred-promise": "^2.2.0",
- "@open-draft/logger": "^0.3.0",
- "@open-draft/until": "^2.0.0",
- "is-node-process": "^1.2.0",
- "outvariant": "^1.4.3",
- "strict-event-emitter": "^0.5.1"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@open-draft/deferred-promise": {
- "version": "2.2.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz",
- "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==",
- "license": "MIT"
- },
- "node_modules/@open-draft/logger": {
- "version": "0.3.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@open-draft/logger/-/logger-0.3.0.tgz",
- "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==",
- "license": "MIT",
- "dependencies": {
- "is-node-process": "^1.2.0",
- "outvariant": "^1.4.0"
- }
- },
- "node_modules/@open-draft/until": {
- "version": "2.1.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@open-draft/until/-/until-2.1.0.tgz",
- "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==",
- "license": "MIT"
- },
- "node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz",
- "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-android-arm64": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz",
- "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz",
- "integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz",
- "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz",
- "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz",
- "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz",
- "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz",
- "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz",
- "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz",
- "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-loong64-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz",
- "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==",
- "cpu": [
- "loong64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-ppc64-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz",
- "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz",
- "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz",
- "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz",
- "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==",
- "cpu": [
- "s390x"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz",
- "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz",
- "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-openharmony-arm64": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz",
- "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ]
- },
- "node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz",
- "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz",
- "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-gnu": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz",
- "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz",
- "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@types/estree": {
- "version": "1.0.8",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@types/estree/-/estree-1.0.8.tgz",
- "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
- "license": "MIT"
- },
- "node_modules/@types/eventsource": {
- "version": "1.1.15",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@types/eventsource/-/eventsource-1.1.15.tgz",
- "integrity": "sha512-XQmGcbnxUNa06HR3VBVkc9+A2Vpi9ZyLJcdS5dwaQQ/4ZMWFO+5c90FnMUpbtMZwB/FChoYHwuVg8TvkECacTA==",
- "license": "MIT"
- },
- "node_modules/@types/node": {
- "version": "24.8.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@types/node/-/node-24.8.1.tgz",
- "integrity": "sha512-alv65KGRadQVfVcG69MuB4IzdYVpRwMG/mq8KWOaoOdyY617P5ivaDiMCGOFDWD2sAn5Q0mR3mRtUOgm99hL9Q==",
- "devOptional": true,
- "license": "MIT",
- "dependencies": {
- "undici-types": "~7.14.0"
- }
- },
- "node_modules/@types/statuses": {
- "version": "2.0.6",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@types/statuses/-/statuses-2.0.6.tgz",
- "integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",
- "license": "MIT"
- },
- "node_modules/@types/ws": {
- "version": "8.18.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@types/ws/-/ws-8.18.1.tgz",
- "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "license": "MIT",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/bufferutil": {
- "version": "4.0.9",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/bufferutil/-/bufferutil-4.0.9.tgz",
- "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==",
- "hasInstallScript": true,
- "license": "MIT",
- "dependencies": {
- "node-gyp-build": "^4.3.0"
- },
- "engines": {
- "node": ">=6.14.2"
- }
- },
- "node_modules/cli-width": {
- "version": "4.1.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/cli-width/-/cli-width-4.1.0.tgz",
- "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
- "license": "ISC",
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/cliui": {
- "version": "8.0.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/cliui/-/cliui-8.0.1.tgz",
- "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
- "license": "ISC",
- "dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.1",
- "wrap-ansi": "^7.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/cliui/node_modules/wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "license": "MIT",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "license": "MIT"
- },
- "node_modules/cookie": {
- "version": "1.0.2",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/cookie/-/cookie-1.0.2.tgz",
- "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "license": "MIT"
- },
- "node_modules/esbuild": {
- "version": "0.21.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/esbuild/-/esbuild-0.21.5.tgz",
- "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=12"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.21.5",
- "@esbuild/android-arm": "0.21.5",
- "@esbuild/android-arm64": "0.21.5",
- "@esbuild/android-x64": "0.21.5",
- "@esbuild/darwin-arm64": "0.21.5",
- "@esbuild/darwin-x64": "0.21.5",
- "@esbuild/freebsd-arm64": "0.21.5",
- "@esbuild/freebsd-x64": "0.21.5",
- "@esbuild/linux-arm": "0.21.5",
- "@esbuild/linux-arm64": "0.21.5",
- "@esbuild/linux-ia32": "0.21.5",
- "@esbuild/linux-loong64": "0.21.5",
- "@esbuild/linux-mips64el": "0.21.5",
- "@esbuild/linux-ppc64": "0.21.5",
- "@esbuild/linux-riscv64": "0.21.5",
- "@esbuild/linux-s390x": "0.21.5",
- "@esbuild/linux-x64": "0.21.5",
- "@esbuild/netbsd-x64": "0.21.5",
- "@esbuild/openbsd-x64": "0.21.5",
- "@esbuild/sunos-x64": "0.21.5",
- "@esbuild/win32-arm64": "0.21.5",
- "@esbuild/win32-ia32": "0.21.5",
- "@esbuild/win32-x64": "0.21.5"
- }
- },
- "node_modules/escalade": {
- "version": "3.2.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/escalade/-/escalade-3.2.0.tgz",
- "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/eventsource": {
- "version": "2.0.2",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/eventsource/-/eventsource-2.0.2.tgz",
- "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==",
- "license": "MIT",
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/fdir": {
- "version": "6.5.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/fdir/-/fdir-6.5.0.tgz",
- "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
- "license": "MIT",
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/fetch-event-stream": {
- "version": "0.1.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/fetch-event-stream/-/fetch-event-stream-0.1.5.tgz",
- "integrity": "sha512-V1PWovkspxQfssq/NnxoEyQo1DV+MRK/laPuPblIZmSjMN8P5u46OhlFQznSr9p/t0Sp8Uc6SbM3yCMfr0KU8g==",
- "license": "MIT"
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "license": "ISC",
- "engines": {
- "node": "6.* || 8.* || >= 10.*"
- }
- },
- "node_modules/graphql": {
- "version": "16.11.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/graphql/-/graphql-16.11.0.tgz",
- "integrity": "sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==",
- "license": "MIT",
- "engines": {
- "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
- }
- },
- "node_modules/headers-polyfill": {
- "version": "4.0.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/headers-polyfill/-/headers-polyfill-4.0.3.tgz",
- "integrity": "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==",
- "license": "MIT"
- },
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-node-process": {
- "version": "1.2.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/is-node-process/-/is-node-process-1.2.0.tgz",
- "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==",
- "license": "MIT"
- },
- "node_modules/msw": {
- "version": "2.11.6",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/msw/-/msw-2.11.6.tgz",
- "integrity": "sha512-MCYMykvmiYScyUm7I6y0VCxpNq1rgd5v7kG8ks5dKtvmxRUUPjribX6mUoUNBbM5/3PhUyoelEWiKXGOz84c+w==",
- "hasInstallScript": true,
- "license": "MIT",
- "dependencies": {
- "@inquirer/confirm": "^5.0.0",
- "@mswjs/interceptors": "^0.40.0",
- "@open-draft/deferred-promise": "^2.2.0",
- "@types/statuses": "^2.0.4",
- "cookie": "^1.0.2",
- "graphql": "^16.8.1",
- "headers-polyfill": "^4.0.2",
- "is-node-process": "^1.2.0",
- "outvariant": "^1.4.3",
- "path-to-regexp": "^6.3.0",
- "picocolors": "^1.1.1",
- "rettime": "^0.7.0",
- "statuses": "^2.0.2",
- "strict-event-emitter": "^0.5.1",
- "tough-cookie": "^6.0.0",
- "type-fest": "^4.26.1",
- "until-async": "^3.0.2",
- "yargs": "^17.7.2"
- },
- "bin": {
- "msw": "cli/index.js"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/mswjs"
- },
- "peerDependencies": {
- "typescript": ">= 4.8.x"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/mute-stream": {
- "version": "2.0.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/mute-stream/-/mute-stream-2.0.0.tgz",
- "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==",
- "license": "ISC",
- "engines": {
- "node": "^18.17.0 || >=20.5.0"
- }
- },
- "node_modules/nanoid": {
- "version": "3.3.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/nanoid/-/nanoid-3.3.11.tgz",
- "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/node-gyp-build": {
- "version": "4.8.4",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/node-gyp-build/-/node-gyp-build-4.8.4.tgz",
- "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==",
- "license": "MIT",
- "bin": {
- "node-gyp-build": "bin.js",
- "node-gyp-build-optional": "optional.js",
- "node-gyp-build-test": "build-test.js"
- }
- },
- "node_modules/outvariant": {
- "version": "1.4.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/outvariant/-/outvariant-1.4.3.tgz",
- "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==",
- "license": "MIT"
- },
- "node_modules/path-to-regexp": {
- "version": "6.3.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
- "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
- "license": "MIT"
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/picocolors/-/picocolors-1.1.1.tgz",
- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "license": "ISC"
- },
- "node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/postcss": {
- "version": "8.5.6",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/postcss/-/postcss-8.5.6.tgz",
- "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/postcss"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "nanoid": "^3.3.11",
- "picocolors": "^1.1.1",
- "source-map-js": "^1.2.1"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/require-directory": {
- "version": "2.1.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/rettime": {
- "version": "0.7.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/rettime/-/rettime-0.7.0.tgz",
- "integrity": "sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw==",
- "license": "MIT"
- },
- "node_modules/rollup": {
- "version": "4.52.5",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/rollup/-/rollup-4.52.5.tgz",
- "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==",
- "license": "MIT",
- "dependencies": {
- "@types/estree": "1.0.8"
- },
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
- },
- "optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.52.5",
- "@rollup/rollup-android-arm64": "4.52.5",
- "@rollup/rollup-darwin-arm64": "4.52.5",
- "@rollup/rollup-darwin-x64": "4.52.5",
- "@rollup/rollup-freebsd-arm64": "4.52.5",
- "@rollup/rollup-freebsd-x64": "4.52.5",
- "@rollup/rollup-linux-arm-gnueabihf": "4.52.5",
- "@rollup/rollup-linux-arm-musleabihf": "4.52.5",
- "@rollup/rollup-linux-arm64-gnu": "4.52.5",
- "@rollup/rollup-linux-arm64-musl": "4.52.5",
- "@rollup/rollup-linux-loong64-gnu": "4.52.5",
- "@rollup/rollup-linux-ppc64-gnu": "4.52.5",
- "@rollup/rollup-linux-riscv64-gnu": "4.52.5",
- "@rollup/rollup-linux-riscv64-musl": "4.52.5",
- "@rollup/rollup-linux-s390x-gnu": "4.52.5",
- "@rollup/rollup-linux-x64-gnu": "4.52.5",
- "@rollup/rollup-linux-x64-musl": "4.52.5",
- "@rollup/rollup-openharmony-arm64": "4.52.5",
- "@rollup/rollup-win32-arm64-msvc": "4.52.5",
- "@rollup/rollup-win32-ia32-msvc": "4.52.5",
- "@rollup/rollup-win32-x64-gnu": "4.52.5",
- "@rollup/rollup-win32-x64-msvc": "4.52.5",
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/semiver": {
- "version": "1.1.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/semiver/-/semiver-1.1.0.tgz",
- "integrity": "sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==",
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/signal-exit": {
- "version": "4.1.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/signal-exit/-/signal-exit-4.1.0.tgz",
- "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
- "license": "ISC",
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/source-map-js": {
- "version": "1.2.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/source-map-js/-/source-map-js-1.2.1.tgz",
- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/statuses": {
- "version": "2.0.2",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/statuses/-/statuses-2.0.2.tgz",
- "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/strict-event-emitter": {
- "version": "0.5.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz",
- "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==",
- "license": "MIT"
- },
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "license": "MIT",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "license": "MIT",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/textlinestream": {
- "version": "1.1.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/textlinestream/-/textlinestream-1.1.1.tgz",
- "integrity": "sha512-iBHbi7BQxrFmwZUQJsT0SjNzlLLsXhvW/kg7EyOMVMBIrlnj/qYofwo1LVLZi+3GbUEo96Iu2eqToI2+lZoAEQ==",
- "license": "MIT"
- },
- "node_modules/tinyglobby": {
- "version": "0.2.15",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/tinyglobby/-/tinyglobby-0.2.15.tgz",
- "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
- "license": "MIT",
- "dependencies": {
- "fdir": "^6.5.0",
- "picomatch": "^4.0.3"
- },
- "engines": {
- "node": ">=12.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/SuperchupuDev"
- }
- },
- "node_modules/tldts": {
- "version": "7.0.17",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/tldts/-/tldts-7.0.17.tgz",
- "integrity": "sha512-Y1KQBgDd/NUc+LfOtKS6mNsC9CCaH+m2P1RoIZy7RAPo3C3/t8X45+zgut31cRZtZ3xKPjfn3TkGTrctC2TQIQ==",
- "license": "MIT",
- "dependencies": {
- "tldts-core": "^7.0.17"
- },
- "bin": {
- "tldts": "bin/cli.js"
- }
- },
- "node_modules/tldts-core": {
- "version": "7.0.17",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/tldts-core/-/tldts-core-7.0.17.tgz",
- "integrity": "sha512-DieYoGrP78PWKsrXr8MZwtQ7GLCUeLxihtjC1jZsW1DnvSMdKPitJSe8OSYDM2u5H6g3kWJZpePqkp43TfLh0g==",
- "license": "MIT"
- },
- "node_modules/tough-cookie": {
- "version": "6.0.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/tough-cookie/-/tough-cookie-6.0.0.tgz",
- "integrity": "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==",
- "license": "BSD-3-Clause",
- "dependencies": {
- "tldts": "^7.0.5"
- },
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/type-fest": {
- "version": "4.41.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/type-fest/-/type-fest-4.41.0.tgz",
- "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/typescript": {
- "version": "5.9.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/typescript/-/typescript-5.9.3.tgz",
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/undici-types": {
- "version": "7.14.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/undici-types/-/undici-types-7.14.0.tgz",
- "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==",
- "devOptional": true,
- "license": "MIT"
- },
- "node_modules/until-async": {
- "version": "3.0.2",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/until-async/-/until-async-3.0.2.tgz",
- "integrity": "sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/kettanaito"
- }
- },
- "node_modules/vi": {
- "version": "1.0.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/vi/-/vi-1.0.0.tgz",
- "integrity": "sha512-fLpBeQzBddayFzoNMfCzvkcomwRYHx05qRo8lVCjMmR8ggs36Auw5A6/yH/UU8e2UAsGvh0qmXlNoR1DIdfWUw==",
- "license": "ISC"
- },
- "node_modules/vite": {
- "version": "6.4.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/vite/-/vite-6.4.1.tgz",
- "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
- "license": "MIT",
- "dependencies": {
- "esbuild": "^0.25.0",
- "fdir": "^6.4.4",
- "picomatch": "^4.0.2",
- "postcss": "^8.5.3",
- "rollup": "^4.34.9",
- "tinyglobby": "^0.2.13"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.3"
- },
- "peerDependencies": {
- "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
- "jiti": ">=1.21.0",
- "less": "*",
- "lightningcss": "^1.21.0",
- "sass": "*",
- "sass-embedded": "*",
- "stylus": "*",
- "sugarss": "*",
- "terser": "^5.16.0",
- "tsx": "^4.8.1",
- "yaml": "^2.4.2"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "jiti": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- },
- "tsx": {
- "optional": true
- },
- "yaml": {
- "optional": true
- }
- }
- },
- "node_modules/vite/node_modules/@esbuild/aix-ppc64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz",
- "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/android-arm": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/android-arm/-/android-arm-0.25.11.tgz",
- "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/android-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz",
- "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/android-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/android-x64/-/android-x64-0.25.11.tgz",
- "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/darwin-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz",
- "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/darwin-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz",
- "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/freebsd-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz",
- "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/freebsd-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz",
- "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-arm": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz",
- "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz",
- "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-ia32": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz",
- "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-loong64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz",
- "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==",
- "cpu": [
- "loong64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-mips64el": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz",
- "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==",
- "cpu": [
- "mips64el"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-ppc64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz",
- "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-riscv64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz",
- "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-s390x": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz",
- "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==",
- "cpu": [
- "s390x"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/linux-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz",
- "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/netbsd-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz",
- "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/openbsd-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz",
- "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/sunos-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz",
- "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/win32-arm64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz",
- "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/win32-ia32": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz",
- "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/@esbuild/win32-x64": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz",
- "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/vite/node_modules/esbuild": {
- "version": "0.25.11",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/esbuild/-/esbuild-0.25.11.tgz",
- "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==",
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.25.11",
- "@esbuild/android-arm": "0.25.11",
- "@esbuild/android-arm64": "0.25.11",
- "@esbuild/android-x64": "0.25.11",
- "@esbuild/darwin-arm64": "0.25.11",
- "@esbuild/darwin-x64": "0.25.11",
- "@esbuild/freebsd-arm64": "0.25.11",
- "@esbuild/freebsd-x64": "0.25.11",
- "@esbuild/linux-arm": "0.25.11",
- "@esbuild/linux-arm64": "0.25.11",
- "@esbuild/linux-ia32": "0.25.11",
- "@esbuild/linux-loong64": "0.25.11",
- "@esbuild/linux-mips64el": "0.25.11",
- "@esbuild/linux-ppc64": "0.25.11",
- "@esbuild/linux-riscv64": "0.25.11",
- "@esbuild/linux-s390x": "0.25.11",
- "@esbuild/linux-x64": "0.25.11",
- "@esbuild/netbsd-arm64": "0.25.11",
- "@esbuild/netbsd-x64": "0.25.11",
- "@esbuild/openbsd-arm64": "0.25.11",
- "@esbuild/openbsd-x64": "0.25.11",
- "@esbuild/openharmony-arm64": "0.25.11",
- "@esbuild/sunos-x64": "0.25.11",
- "@esbuild/win32-arm64": "0.25.11",
- "@esbuild/win32-ia32": "0.25.11",
- "@esbuild/win32-x64": "0.25.11"
- }
- },
- "node_modules/wrap-ansi": {
- "version": "6.2.0",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
- "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ws": {
- "version": "8.18.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/ws/-/ws-8.18.3.tgz",
- "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
- "license": "MIT",
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": ">=5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
- "node_modules/y18n": {
- "version": "5.0.8",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "license": "ISC",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yargs": {
- "version": "17.7.2",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/yargs/-/yargs-17.7.2.tgz",
- "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
- "license": "MIT",
- "dependencies": {
- "cliui": "^8.0.1",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.3",
- "y18n": "^5.0.5",
- "yargs-parser": "^21.1.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/yargs-parser": {
- "version": "21.1.1",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/yargs-parser/-/yargs-parser-21.1.1.tgz",
- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
- "license": "ISC",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/yoctocolors-cjs": {
- "version": "2.1.3",
- "resolved": "https://repos.verz.local/artifactory/api/npm/npm/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz",
- "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- }
- }
-}
diff --git a/6.11.1/client/package.json b/6.11.1/client/package.json
deleted file mode 100644
index 00bd5e4d27c5ccce4814ef6f5769bfc2894abb8e..0000000000000000000000000000000000000000
--- a/6.11.1/client/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "@gradio/client",
- "version": "2.1.0",
- "description": "Gradio API client",
- "type": "module",
- "main": "dist/index.js",
- "author": "",
- "license": "ISC",
- "exports": {
- ".": {
- "gradio": "./src/index.ts",
- "browser": "./dist/browser.js",
- "import": "./dist/index.js",
- "default": "./dist/index.js"
- },
- "./package.json": "./package.json",
- "./browser.js": "./dist/browser.js"
- },
- "dependencies": {
- "fetch-event-stream": "^0.1.5"
- },
- "devDependencies": {
- "msw": "^2.11.3",
- "typescript": "^5.9.3"
- },
- "scripts": {
- "bundle": "vite build --ssr",
- "bundle:browser": "BROWSER_BUILD=true vite build",
- "generate_types": "tsc",
- "clean": "rm -rf dist",
- "build": "pnpm clean && pnpm bundle && pnpm bundle:browser && pnpm generate_types",
- "test": "pnpm test:browser && pnpm test:node",
- "test:browser": "vitest run -c vite.config.ts",
- "test:node": "NODE_NO_WARNINGS=1 TEST_MODE=node vitest run -c vite.config.ts",
- "preview:browser": "vite dev --mode=preview"
- },
- "engines": {
- "node": ">=18.0.0"
- },
- "main_changeset": true,
- "repository": {
- "type": "git",
- "url": "git+https://github.com/gradio-app/gradio.git",
- "directory": "client/js"
- }
-}
diff --git a/6.11.1/client/src/client.ts b/6.11.1/client/src/client.ts
deleted file mode 100644
index c62373da9d463459074e054b285721da172ac32f..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/client.ts
+++ /dev/null
@@ -1,549 +0,0 @@
-import type {
- ApiData,
- ApiInfo,
- ClientOptions,
- Config,
- DuplicateOptions,
- EndpointInfo,
- JsApiData,
- PredictReturn,
- SpaceStatus,
- Status,
- UploadResponse,
- client_return,
- SubmitIterable,
- GradioEvent
-} from "./types";
-import { view_api } from "./utils/view_api";
-import { upload_files } from "./utils/upload_files";
-import { upload, FileData } from "./upload";
-import { handle_blob } from "./utils/handle_blob";
-import { post_data } from "./utils/post_data";
-import { predict } from "./utils/predict";
-import { duplicate } from "./utils/duplicate";
-import { submit } from "./utils/submit";
-import { RE_SPACE_NAME, process_endpoint } from "./helpers/api_info";
-import {
- map_names_to_ids,
- resolve_cookies,
- resolve_config,
- get_jwt,
- parse_and_set_cookies
-} from "./helpers/init_helpers";
-import { check_and_wake_space, check_space_status } from "./helpers/spaces";
-import { open_stream, readable_stream, close_stream } from "./utils/stream";
-import {
- API_INFO_ERROR_MSG,
- APP_ID_URL,
- CONFIG_ERROR_MSG,
- HEARTBEAT_URL,
- COMPONENT_SERVER_URL
-} from "./constants";
-declare const BROWSER_BUILD: boolean;
-
-export class Client {
- app_reference: string;
- options: ClientOptions;
- deep_link: string | null = null;
-
- config: Config | undefined;
- api_prefix = "";
- api_info: ApiInfo | undefined;
- api_map: Record = {};
- session_hash: string = Math.random().toString(36).substring(2);
- jwt: string | false = false;
- last_status: Record = {};
-
- private cookies: string | null = null;
-
- // streaming
- stream_status = { open: false };
- closed = false;
- pending_stream_messages: Record = {};
- pending_diff_streams: Record = {};
- event_callbacks: Record Promise> = {};
- unclosed_events: Set = new Set();
- heartbeat_event: EventSource | null = null;
- abort_controller: AbortController | null = null;
- stream_instance: EventSource | null = null;
- current_payload: any;
-
- get_url_config(url: string | null = null): Config {
- if (!this.config) {
- throw new Error(CONFIG_ERROR_MSG);
- }
- if (url === null) {
- url = window.location.href;
- }
- const stripSlashes = (str: string): string => str.replace(/^\/+|\/+$/g, "");
- let root_path = stripSlashes(new URL(this.config.root).pathname);
- let url_path = stripSlashes(new URL(url).pathname);
- let page: string;
- if (!url_path.startsWith(root_path)) {
- page = "";
- } else {
- page = stripSlashes(url_path.substring(root_path.length));
- }
- return this.get_page_config(page);
- }
- get_page_config(page: string): Config {
- if (!this.config) {
- throw new Error(CONFIG_ERROR_MSG);
- }
- let config = this.config;
- if (!(page in config.page)) {
- page = "";
- }
- return {
- ...config,
- current_page: page,
- layout: config.page[page].layout,
- components: config.components.filter((c) =>
- config.page[page].components.includes(c.id)
- ),
- dependencies: this.config.dependencies.filter((d) =>
- config.page[page].dependencies.includes(d.id)
- )
- };
- }
-
- fetch(input: RequestInfo | URL, init?: RequestInit): Promise {
- const headers = new Headers(init?.headers || {});
- if (this && this.cookies) {
- headers.append("Cookie", this.cookies);
- }
- if (this && this.options.headers) {
- let additional_headers = new Headers(this.options.headers);
-
- additional_headers.forEach((value, name) => {
- headers.append(name, value);
- });
- }
-
- return fetch(input, { ...init, headers });
- }
-
- stream(url: URL): EventSource {
- const headers = new Headers();
- if (this && this.cookies) {
- headers.append("Cookie", this.cookies);
- }
- if (this && this.options.headers) {
- let additional_headers = new Headers(this.options.headers);
-
- additional_headers.forEach((value, name) => {
- headers.append(name, value);
- });
- }
- if (this && this.options.token) {
- headers.append("Authorization", `Bearer ${this.options.token}`);
- }
-
- this.abort_controller = new AbortController();
-
- this.stream_instance = readable_stream(url.toString(), {
- credentials: "include",
- headers: headers,
- signal: this.abort_controller.signal
- });
-
- return this.stream_instance;
- }
-
- view_api: () => Promise>;
- upload_files: (
- root_url: string,
- files: (Blob | File)[],
- upload_id?: string
- ) => Promise;
- upload: (
- file_data: FileData[],
- root_url: string,
- upload_id?: string,
- max_file_size?: number
- ) => Promise<(FileData | null)[] | null>;
- handle_blob: (
- endpoint: string,
- data: unknown[],
- endpoint_info: EndpointInfo
- ) => Promise;
- post_data: (
- url: string,
- body: unknown,
- additional_headers?: any
- ) => Promise;
- submit: (
- endpoint: string | number,
- data: unknown[] | Record | undefined,
- event_data?: unknown,
- trigger_id?: number | null,
- all_events?: boolean
- ) => SubmitIterable;
- predict: (
- endpoint: string | number,
- data: unknown[] | Record | undefined,
- event_data?: unknown
- ) => Promise>;
- open_stream: () => Promise;
- private resolve_config: (endpoint: string) => Promise;
- private resolve_cookies: () => Promise;
- constructor(
- app_reference: string,
- options: ClientOptions = { events: ["data"] }
- ) {
- this.app_reference = app_reference;
- this.deep_link = options.query_params?.deep_link || null;
- if (!options.events) {
- options.events = ["data"];
- }
-
- this.options = options;
- this.current_payload = {};
-
- if (options.cookies) {
- this.cookies = options.cookies;
- }
-
- this.view_api = view_api.bind(this);
- this.upload_files = upload_files.bind(this);
- this.handle_blob = handle_blob.bind(this);
- this.post_data = post_data.bind(this);
- this.submit = submit.bind(this);
- this.predict = predict.bind(this) as typeof this.predict;
- this.open_stream = open_stream.bind(this);
- this.resolve_config = resolve_config.bind(this);
- this.resolve_cookies = resolve_cookies.bind(this);
- this.upload = upload.bind(this);
- this.fetch = this.fetch.bind(this);
- this.handle_space_success = this.handle_space_success.bind(this);
- this.stream = this.stream.bind(this);
- }
-
- private async init(): Promise {
- if (this.options.auth) {
- await this.resolve_cookies();
- }
-
- await this._resolve_config().then(({ config }) =>
- this._resolve_heartbeat(config)
- );
-
- this.api_info = await this.view_api();
- this.api_map = map_names_to_ids(this.config?.dependencies || []);
- }
-
- async _resolve_heartbeat(_config: Config): Promise {
- if (_config) {
- this.config = _config;
- this.api_prefix = _config.api_prefix || "";
-
- if (this.config && this.config.connect_heartbeat) {
- if (this.config.space_id && this.options.token) {
- this.jwt = await get_jwt(
- this.config.space_id,
- this.options.token,
- this.cookies
- );
- }
- }
- }
-
- if (_config.space_id && this.options.token) {
- this.jwt = await get_jwt(_config.space_id, this.options.token);
- }
-
- if (this.config && this.config.connect_heartbeat) {
- // connect to the heartbeat endpoint via GET request
- const heartbeat_url = new URL(
- `${this.config.root}${this.api_prefix}/${HEARTBEAT_URL}/${this.session_hash}`
- );
-
- // if the jwt is available, add it to the query params
- if (this.jwt) {
- heartbeat_url.searchParams.set("__sign", this.jwt);
- }
-
- // Just connect to the endpoint without parsing the response. Ref: https://github.com/gradio-app/gradio/pull/7974#discussion_r1557717540
- if (!this.heartbeat_event) {
- this.heartbeat_event = this.stream(heartbeat_url);
- }
- }
- }
-
- static async connect(
- app_reference: string,
- options: ClientOptions = {
- events: ["data"]
- }
- ): Promise {
- const client = new this(app_reference, options); // this refers to the class itself, not the instance
- if (options.session_hash) {
- client.session_hash = options.session_hash;
- }
- await client.init();
- return client;
- }
-
- async reconnect(): Promise<"connected" | "broken" | "changed"> {
- const app_id_url = new URL(
- `${this.config!.root}${this.api_prefix}/${APP_ID_URL}`
- );
- let app_id: string;
- try {
- const response = await this.fetch(app_id_url);
- if (!response.ok) {
- throw new Error();
- }
- app_id = ((await response.json()) as any).app_id;
- } catch (e) {
- return "broken";
- }
- if (app_id !== this.config!.app_id) {
- return "changed";
- }
- return "connected";
- }
-
- close(): void {
- this.closed = true;
- close_stream(this.stream_status, this.abort_controller);
- }
-
- set_current_payload(payload: any): void {
- this.current_payload = payload;
- }
-
- static async duplicate(
- app_reference: string,
- options: DuplicateOptions = {
- events: ["data"]
- }
- ): Promise {
- return duplicate(app_reference, options);
- }
-
- private async _resolve_config(): Promise {
- const { http_protocol, host, space_id } = await process_endpoint(
- this.app_reference,
- this.options.token
- );
-
- const { status_callback } = this.options;
-
- if (space_id && status_callback) {
- await check_and_wake_space(space_id, status_callback);
- }
-
- let config: Config | undefined;
-
- try {
- // Create base URL
- let configUrl = `${http_protocol}//${host}`;
- config = await this.resolve_config(configUrl);
-
- if (!config) {
- throw new Error(CONFIG_ERROR_MSG);
- }
-
- return this.config_success(config);
- } catch (e: any) {
- if (space_id && status_callback) {
- check_space_status(
- space_id,
- RE_SPACE_NAME.test(space_id) ? "space_name" : "subdomain",
- this.handle_space_success
- );
- } else {
- if (status_callback)
- status_callback({
- status: "error",
- message: "Could not load this space.",
- load_status: "error",
- detail: "NOT_FOUND"
- });
- throw Error(e);
- }
- }
- }
-
- private async config_success(
- _config: Config
- ): Promise {
- this.config = _config;
- this.api_prefix = _config.api_prefix || "";
-
- if (this.config.auth_required) {
- return this.prepare_return_obj();
- }
-
- try {
- this.api_info = await this.view_api();
- } catch (e) {
- console.error(API_INFO_ERROR_MSG + (e as Error).message);
- }
-
- return this.prepare_return_obj();
- }
-
- async handle_space_success(status: SpaceStatus): Promise {
- if (!this) {
- throw new Error(CONFIG_ERROR_MSG);
- }
- const { status_callback } = this.options;
- if (status_callback) status_callback(status);
- if (status.status === "running") {
- try {
- this.config = await this._resolve_config();
- this.api_prefix = this?.config?.api_prefix || "";
-
- if (!this.config) {
- throw new Error(CONFIG_ERROR_MSG);
- }
-
- const _config = await this.config_success(this.config);
-
- return _config as Config;
- } catch (e) {
- if (status_callback) {
- status_callback({
- status: "error",
- message: "Could not load this space.",
- load_status: "error",
- detail: "NOT_FOUND"
- });
- }
- throw e;
- }
- }
- }
-
- public async component_server(
- component_id: number,
- fn_name: string,
- data: unknown | { binary: boolean; data: Record }
- ): Promise {
- if (!this.config) {
- throw new Error(CONFIG_ERROR_MSG);
- }
-
- const headers: {
- Authorization?: string;
- "Content-Type"?: "application/json";
- } = {};
-
- const { token } = this.options;
- const { session_hash } = this;
-
- if (token) {
- headers.Authorization = `Bearer ${this.options.token}`;
- }
-
- let root_url: string;
- let component = this.config.components.find(
- (comp) => comp.id === component_id
- );
- if (component?.props?.root_url) {
- root_url = component.props.root_url;
- } else {
- root_url = this.config.root;
- }
-
- let body: FormData | string;
-
- if (typeof data === "object" && data !== null && "binary" in data) {
- const _data = data as { binary: boolean; data: Record };
- body = new FormData();
- for (const key in _data.data) {
- if (key === "binary") continue;
- body.append(key, _data.data[key]);
- }
- body.set("component_id", component_id.toString());
- body.set("fn_name", fn_name);
- body.set("session_hash", session_hash);
- } else {
- body = JSON.stringify({
- data: data,
- component_id,
- fn_name,
- session_hash
- });
-
- headers["Content-Type"] = "application/json";
- }
-
- if (token) {
- headers.Authorization = `Bearer ${token}`;
- }
-
- try {
- const response = await this.fetch(
- `${root_url}${this.api_prefix}/${COMPONENT_SERVER_URL}/`,
- {
- method: "POST",
- body: body,
- headers,
- credentials: "include"
- }
- );
-
- if (!response.ok) {
- throw new Error(
- "Could not connect to component server: " + response.statusText
- );
- }
-
- const output = await response.json();
- return output;
- } catch (e) {
- console.warn(e);
- }
- }
-
- public set_cookies(raw_cookies: string): void {
- this.cookies = parse_and_set_cookies(raw_cookies).join("; ");
- }
-
- private prepare_return_obj(): client_return {
- return {
- config: this.config,
- predict: this.predict,
- submit: this.submit,
- view_api: this.view_api,
- component_server: this.component_server
- };
- }
-}
-
-/**
- * @deprecated This method will be removed in v1.0. Use `Client.connect()` instead.
- * Creates a client instance for interacting with Gradio apps.
- *
- * @param {string} app_reference - The reference or URL to a Gradio space or app.
- * @param {ClientOptions} options - Configuration options for the client.
- * @returns {Promise} A promise that resolves to a `Client` instance.
- */
-export async function client(
- app_reference: string,
- options: ClientOptions = {
- events: ["data"]
- }
-): Promise {
- return await Client.connect(app_reference, options);
-}
-
-/**
- * @deprecated This method will be removed in v1.0. Use `Client.duplicate()` instead.
- * Creates a duplicate of a space and returns a client instance for the duplicated space.
- *
- * @param {string} app_reference - The reference or URL to a Gradio space or app to duplicate.
- * @param {DuplicateOptions} options - Configuration options for the client.
- * @returns {Promise} A promise that resolves to a `Client` instance.
- */
-export async function duplicate_space(
- app_reference: string,
- options: DuplicateOptions
-): Promise {
- return await Client.duplicate(app_reference, options);
-}
-
-export type ClientInstance = Client;
diff --git a/6.11.1/client/src/constants.ts b/6.11.1/client/src/constants.ts
deleted file mode 100644
index ba0e83b4adff8ce489b0d981dbb65afae09f1dd8..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/constants.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-// endpoints
-export const HOST_URL = `host`;
-export const API_URL = `predict/`;
-export const SSE_URL_V0 = `queue/join`;
-export const SSE_DATA_URL_V0 = `queue/data`;
-export const SSE_URL = `queue/data`;
-export const SSE_DATA_URL = `queue/join`;
-export const UPLOAD_URL = `upload`;
-export const LOGIN_URL = `login`;
-export const CONFIG_URL = `config`;
-export const API_INFO_URL = `info`;
-export const RUNTIME_URL = `runtime`;
-export const SLEEPTIME_URL = `sleeptime`;
-export const HEARTBEAT_URL = `heartbeat`;
-export const COMPONENT_SERVER_URL = `component_server`;
-export const RESET_URL = `reset`;
-export const CANCEL_URL = `cancel`;
-export const APP_ID_URL = `app_id`;
-
-export const RAW_API_INFO_URL = `info?serialize=False`;
-export const SPACE_FETCHER_URL =
- "https://gradio-space-api-fetcher-v2.hf.space/api";
-export const SPACE_URL = "https://hf.space/{}";
-
-// messages
-export const QUEUE_FULL_MSG =
- "This application is currently busy. Please try again. ";
-export const BROKEN_CONNECTION_MSG = "Connection errored out. ";
-export const CONFIG_ERROR_MSG = "Could not resolve app config. ";
-export const SPACE_STATUS_ERROR_MSG = "Could not get space status. ";
-export const API_INFO_ERROR_MSG = "Could not get API info. ";
-export const SPACE_METADATA_ERROR_MSG = "Space metadata could not be loaded. ";
-export const INVALID_URL_MSG = "Invalid URL. A full URL path is required.";
-export const UNAUTHORIZED_MSG = "Not authorized to access this space. ";
-export const INVALID_CREDENTIALS_MSG = "Invalid credentials. Could not login. ";
-export const MISSING_CREDENTIALS_MSG =
- "Login credentials are required to access this space.";
-export const NODEJS_FS_ERROR_MSG =
- "File system access is only available in Node.js environments";
-export const ROOT_URL_ERROR_MSG = "Root URL not found in client config";
-export const FILE_PROCESSING_ERROR_MSG = "Error uploading file";
diff --git a/6.11.1/client/src/globals.d.ts b/6.11.1/client/src/globals.d.ts
deleted file mode 100644
index 1ba2e1c40b94d458884be8e7a345a32b9aa93d06..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/globals.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { ApiData, ApiInfo, Config } from "./types";
-
-declare global {
- interface Window {
- __gradio_mode__: "app" | "website";
- gradio_config: Config;
- gradio_api_info: ApiInfo | { api: ApiInfo };
- __is_colab__: boolean;
- __gradio_space__: string | null;
- supports_zerogpu_headers?: boolean;
- BUILD_MODE?: "dev" | "production";
- }
-}
diff --git a/6.11.1/client/src/helpers/api_info.ts b/6.11.1/client/src/helpers/api_info.ts
deleted file mode 100644
index d22ec2f3a63ca8b84df5552e1bbe3c724f069598..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/helpers/api_info.ts
+++ /dev/null
@@ -1,477 +0,0 @@
-import {
- HOST_URL,
- INVALID_URL_MSG,
- QUEUE_FULL_MSG,
- SPACE_METADATA_ERROR_MSG
-} from "../constants";
-import type {
- ApiData,
- ApiInfo,
- Config,
- JsApiData,
- EndpointInfo,
- Status
-} from "../types";
-import { determine_protocol } from "./init_helpers";
-
-export const RE_SPACE_NAME = /^[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+$/;
-export const RE_SPACE_DOMAIN = /.*hf\.space\/{0,1}.*$/;
-
-export async function process_endpoint(
- app_reference: string,
- token?: `hf_${string}`
-): Promise<{
- space_id: string | false;
- host: string;
- ws_protocol: "ws" | "wss";
- http_protocol: "http:" | "https:";
-}> {
- const headers: { Authorization?: string } = {};
- if (token) {
- headers.Authorization = `Bearer ${token}`;
- }
-
- const _app_reference = app_reference.trim().replace(/\/$/, "");
-
- if (RE_SPACE_NAME.test(_app_reference)) {
- // app_reference is a HF space name
- try {
- const res = await fetch(
- `https://huggingface.co/api/spaces/${_app_reference}/${HOST_URL}`,
- { headers }
- );
-
- const _host = (await res.json()).host;
-
- return {
- space_id: app_reference,
- ...determine_protocol(_host)
- };
- } catch (e) {
- throw new Error(SPACE_METADATA_ERROR_MSG);
- }
- }
-
- if (RE_SPACE_DOMAIN.test(_app_reference)) {
- // app_reference is a direct HF space domain
- const { ws_protocol, http_protocol, host } =
- determine_protocol(_app_reference);
-
- return {
- space_id: host.split("/")[0].replace(".hf.space", ""),
- ws_protocol,
- http_protocol,
- host
- };
- }
-
- return {
- space_id: false,
- ...determine_protocol(_app_reference)
- };
-}
-
-export const join_urls = (...urls: string[]): string => {
- try {
- return urls.reduce((base_url: string, part: string) => {
- base_url = base_url.replace(/\/+$/, "");
- part = part.replace(/^\/+/, "");
- return new URL(part, base_url + "/").toString();
- });
- } catch (e) {
- throw new Error(INVALID_URL_MSG);
- }
-};
-
-export function transform_api_info(
- api_info: ApiInfo,
- config: Config,
- api_map: Record
-): ApiInfo {
- const transformed_info: ApiInfo = {
- named_endpoints: {},
- unnamed_endpoints: {}
- };
-
- Object.keys(api_info).forEach((category) => {
- if (category === "named_endpoints" || category === "unnamed_endpoints") {
- transformed_info[category] = {};
-
- Object.entries(api_info[category]).forEach(
- ([endpoint, { parameters, returns }]) => {
- const dependencyIndex =
- config.dependencies.find(
- (dep) =>
- dep.api_name === endpoint ||
- dep.api_name === endpoint.replace("/", "")
- )?.id ||
- api_map[endpoint.replace("/", "")] ||
- -1;
-
- const dependencyTypes =
- dependencyIndex !== -1
- ? config.dependencies.find((dep) => dep.id == dependencyIndex)
- ?.types
- : { generator: false, cancel: false };
-
- if (
- dependencyIndex !== -1 &&
- config.dependencies.find((dep) => dep.id == dependencyIndex)?.inputs
- ?.length !== parameters.length
- ) {
- const components = config.dependencies
- .find((dep) => dep.id == dependencyIndex)!
- .inputs.map(
- (input) => config.components.find((c) => c.id === input)?.type
- );
-
- try {
- components.forEach((comp, idx) => {
- if (comp === "state") {
- const new_param = {
- component: "state",
- example: null,
- parameter_default: null,
- parameter_has_default: true,
- parameter_name: null,
- hidden: true
- };
-
- // @ts-ignore
- parameters.splice(idx, 0, new_param);
- }
- });
- } catch (e) {
- console.error(e);
- }
- }
-
- const transform_type = (
- data: ApiData,
- component: string,
- serializer: string,
- signature_type: "return" | "parameter"
- ): JsApiData => ({
- ...data,
- description: get_description(data?.type, serializer),
- type:
- get_type(data?.type, component, serializer, signature_type) || ""
- });
-
- transformed_info[category][endpoint] = {
- parameters: parameters.map((p: ApiData) =>
- transform_type(p, p?.component, p?.serializer, "parameter")
- ),
- returns: returns.map((r: ApiData) =>
- transform_type(r, r?.component, r?.serializer, "return")
- ),
- type: dependencyTypes
- };
- }
- );
- }
- });
-
- return transformed_info;
-}
-
-export function get_type(
- type: { type: any; description: string },
- component: string,
- serializer: string,
- signature_type: "return" | "parameter"
-): string | undefined {
- if (component === "Api") return type.type;
- switch (type?.type) {
- case "string":
- return "string";
- case "boolean":
- return "boolean";
- case "number":
- return "number";
- }
-
- if (
- serializer === "JSONSerializable" ||
- serializer === "StringSerializable"
- ) {
- return "any";
- } else if (serializer === "ListStringSerializable") {
- return "string[]";
- } else if (component === "Image") {
- return signature_type === "parameter" ? "Blob | File | Buffer" : "string";
- } else if (serializer === "FileSerializable") {
- if (type?.type === "array") {
- return signature_type === "parameter"
- ? "(Blob | File | Buffer)[]"
- : `{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}[]`;
- }
- return signature_type === "parameter"
- ? "Blob | File | Buffer"
- : `{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}`;
- } else if (serializer === "GallerySerializable") {
- return signature_type === "parameter"
- ? "[(Blob | File | Buffer), (string | null)][]"
- : `[{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}, (string | null))][]`;
- }
-}
-
-export function get_description(
- type: { type: any; description: string },
- serializer: string
-): string {
- if (serializer === "GallerySerializable") {
- return "array of [file, label] tuples";
- } else if (serializer === "ListStringSerializable") {
- return "array of strings";
- } else if (serializer === "FileSerializable") {
- return "array of files or single file";
- }
- return type?.description;
-}
-
-/* eslint-disable complexity */
-export function handle_message(
- data: any,
- last_status: Status["stage"]
-): {
- type:
- | "hash"
- | "data"
- | "update"
- | "complete"
- | "generating"
- | "log"
- | "none"
- | "heartbeat"
- | "streaming"
- | "broken_connection"
- | "unexpected_error";
- data?: any;
- status?: Status;
- original_msg?: string;
-} {
- const queue = true;
- switch (data.msg) {
- case "send_data":
- return { type: "data" };
- case "send_hash":
- return { type: "hash" };
- case "queue_full":
- return {
- type: "update",
- status: {
- queue,
- message: QUEUE_FULL_MSG,
- stage: "error",
- code: data.code,
- success: data.success
- }
- };
- case "heartbeat":
- return {
- type: "heartbeat"
- };
- case "unexpected_error":
- return {
- type: "unexpected_error",
- status: {
- queue,
- message: data.message,
- session_not_found: data.session_not_found,
- stage: "error",
- success: false
- }
- };
- case "broken_connection":
- return {
- type: "broken_connection",
- status: {
- queue,
- message: data.message,
- stage: "error",
- success: false
- }
- };
- case "estimation":
- return {
- type: "update",
- status: {
- queue,
- stage: last_status || "pending",
- code: data.code,
- size: data.queue_size,
- position: data.rank,
- eta: data.rank_eta,
- success: data.success
- }
- };
- case "progress":
- return {
- type: "update",
- status: {
- queue,
- stage: "pending",
- code: data.code,
- progress_data: data.progress_data,
- success: data.success
- }
- };
- case "log":
- return { type: "log", data: data };
- case "process_generating":
- return {
- type: "generating",
- status: {
- queue,
- message: !data.success ? data.output.error : null,
- stage: data.success ? "generating" : "error",
- code: data.code,
- progress_data: data.progress_data,
- eta: data.average_duration,
- changed_state_ids: data.success
- ? data.output.changed_state_ids
- : undefined
- },
- data: data.success ? data.output : null
- };
- case "process_streaming":
- return {
- type: "streaming",
- status: {
- queue,
- message: data.output.error,
- stage: "streaming",
- time_limit: data.time_limit,
- code: data.code,
- progress_data: data.progress_data,
- eta: data.eta
- },
- data: data.output
- };
- case "process_completed":
- if ("error" in data.output) {
- return {
- type: "update",
- status: {
- queue,
- title: (data.output.title as string | null) ?? "Error",
- message:
- (data.output.error as string | null) ?? "An error occurred",
- visible: data.output.visible as boolean,
- duration: data.output.duration as number,
- stage: "error",
- code: data.code,
- success: data.success
- }
- };
- }
- return {
- type: "complete",
- status: {
- queue,
- message: !data.success ? data.output.error : undefined,
- stage: data.success ? "complete" : "error",
- code: data.code,
- progress_data: data.progress_data,
- changed_state_ids: data.success
- ? data.output.changed_state_ids
- : undefined
- },
- data: data.success ? data.output : null
- };
-
- case "process_starts":
- return {
- type: "update",
- status: {
- queue,
- stage: "pending",
- code: data.code,
- size: data.rank,
- position: 0,
- success: data.success,
- eta: data.eta
- },
- original_msg: "process_starts"
- };
- }
-
- return { type: "none", status: { stage: "error", queue } };
-}
-/* eslint-enable complexity */
-
-/**
- * Maps the provided `data` to the parameters defined by the `/info` endpoint response.
- * This allows us to support both positional and keyword arguments passed to the client
- * and ensures that all parameters are either directly provided or have default values assigned.
- *
- * @param {unknown[] | Record} data - The input data for the function,
- * which can be either an array of values for positional arguments or an object
- * with key-value pairs for keyword arguments.
- * @param {JsApiData[]} parameters - Array of parameter descriptions retrieved from the
- * `/info` endpoint.
- *
- * @returns {unknown[]} - Returns an array of resolved data where each element corresponds
- * to the expected parameter from the API. The `parameter_default` value is used where
- * a value is not provided for a parameter, and optional parameters without defaults are
- * set to `undefined`.
- *
- * @throws {Error} - Throws an error:
- * - If more arguments are provided than are defined in the parameters.
- * * - If no parameter value is provided for a required parameter and no default value is defined.
- * - If an argument is provided that does not match any defined parameter.
- */
-
-export const map_data_to_params = (
- data: unknown[] | Record = [],
- endpoint_info: EndpointInfo
-): unknown[] => {
- // Workaround for the case where the endpoint_info is undefined
- // See https://github.com/gradio-app/gradio/pull/8820#issuecomment-2237381761
- const parameters = endpoint_info ? endpoint_info.parameters : [];
-
- if (Array.isArray(data)) {
- if (
- endpoint_info &&
- parameters.length > 0 &&
- data.length > parameters.length
- ) {
- console.warn("Too many arguments provided for the endpoint.");
- }
- return data;
- }
-
- const resolved_data: unknown[] = [];
- const provided_keys = Object.keys(data);
-
- parameters.forEach((param, index) => {
- if (data.hasOwnProperty(param.parameter_name)) {
- resolved_data[index] = data[param.parameter_name];
- } else if (param.parameter_has_default) {
- resolved_data[index] = param.parameter_default;
- } else {
- throw new Error(
- `No value provided for required parameter: ${param.parameter_name}`
- );
- }
- });
-
- provided_keys.forEach((key) => {
- if (!parameters.some((param) => param.parameter_name === key)) {
- throw new Error(
- `Parameter \`${key}\` is not a valid keyword argument. Please refer to the API for usage.`
- );
- }
- });
-
- resolved_data.forEach((value, idx) => {
- if (value === undefined && !parameters[idx].parameter_has_default) {
- throw new Error(
- `No value provided for required parameter: ${parameters[idx].parameter_name}`
- );
- }
- });
-
- return resolved_data;
-};
diff --git a/6.11.1/client/src/helpers/data.ts b/6.11.1/client/src/helpers/data.ts
deleted file mode 100644
index 42aad8ddc276bdee28b6835a5954dfbcf124b8dd..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/helpers/data.ts
+++ /dev/null
@@ -1,221 +0,0 @@
-import {
- type ApiData,
- type BlobRef,
- type Config,
- type EndpointInfo,
- type JsApiData,
- type DataType,
- Command,
- type Dependency,
- type ComponentMeta
-} from "../types";
-import { FileData } from "../upload";
-
-const is_node =
- typeof process !== "undefined" && process.versions && process.versions.node;
-
-export function update_object(
- object: { [x: string]: any },
- newValue: any,
- stack: (string | number)[]
-): void {
- while (stack.length > 1) {
- const key = stack.shift();
- if (typeof key === "string" || typeof key === "number") {
- object = object[key];
- } else {
- throw new Error("Invalid key type");
- }
- }
-
- const key = stack.shift();
- if (typeof key === "string" || typeof key === "number") {
- object[key] = newValue;
- } else {
- throw new Error("Invalid key type");
- }
-}
-
-export async function walk_and_store_blobs(
- data: DataType,
- type: string | undefined = undefined,
- path: string[] = [],
- root = false,
- endpoint_info: EndpointInfo | undefined = undefined
-): Promise {
- if (Array.isArray(data)) {
- let blob_refs: BlobRef[] = [];
-
- await Promise.all(
- data.map(async (_, index) => {
- let new_path = path.slice();
- new_path.push(String(index));
-
- const array_refs = await walk_and_store_blobs(
- data[index],
- root
- ? endpoint_info?.parameters[index]?.component || undefined
- : type,
- new_path,
- false,
- endpoint_info
- );
-
- blob_refs = blob_refs.concat(array_refs);
- })
- );
-
- return blob_refs;
- } else if (
- (globalThis.Buffer && data instanceof globalThis.Buffer) ||
- data instanceof Blob
- ) {
- return [
- {
- path: path,
- blob: new Blob([data as any]),
- type
- }
- ];
- } else if (typeof data === "object" && data !== null) {
- let blob_refs: BlobRef[] = [];
- for (const key of Object.keys(data) as (keyof typeof data)[]) {
- const new_path = [...path, key];
- const value = data[key];
-
- blob_refs = blob_refs.concat(
- await walk_and_store_blobs(
- value,
- undefined,
- new_path,
- false,
- endpoint_info
- )
- );
- }
-
- return blob_refs;
- }
-
- return [];
-}
-
-export function skip_queue(id: number, config: Config): boolean {
- let fn_queue = config?.dependencies?.find((dep) => dep.id == id)?.queue;
- if (fn_queue != null) {
- return !fn_queue;
- }
- return !config.enable_queue;
-}
-
-// todo: add jsdoc for this function
-
-export function post_message(
- message: any,
- origin: string
-): Promise {
- return new Promise((res, _rej) => {
- const channel = new MessageChannel();
- channel.port1.onmessage = (({ data }) => {
- channel.port1.close();
- res(data);
- }) as (ev: MessageEvent) => void;
- window.parent.postMessage(message, origin, [channel.port2]);
- });
-}
-
-export function handle_file(
- file_or_url: File | string | Blob | Buffer
-): FileData | Blob | Command {
- if (typeof file_or_url === "string") {
- if (
- file_or_url.startsWith("http://") ||
- file_or_url.startsWith("https://")
- ) {
- return {
- path: file_or_url,
- url: file_or_url,
- orig_name: file_or_url.split("/").pop() ?? "unknown",
- meta: { _type: "gradio.FileData" }
- };
- }
-
- if (is_node) {
- // Handle local file paths
- return new Command("upload_file", {
- path: file_or_url,
- name: file_or_url,
- orig_path: file_or_url
- });
- }
- } else if (typeof File !== "undefined" && file_or_url instanceof File) {
- return new Blob([file_or_url]);
- } else if (file_or_url instanceof Buffer) {
- return new Blob([file_or_url as any]);
- } else if (file_or_url instanceof Blob) {
- return file_or_url;
- }
- throw new Error(
- "Invalid input: must be a URL, File, Blob, or Buffer object."
- );
-}
-
-/**
- * Handles the payload by filtering out state inputs and returning an array of resolved payload values.
- * We send null values for state inputs to the server, but we don't want to include them in the resolved payload.
- *
- * @param resolved_payload - The resolved payload values received from the client or the server
- * @param dependency - The dependency object.
- * @param components - The array of component metadata.
- * @param with_null_state - Optional. Specifies whether to include null values for state inputs. Default is false.
- * @returns An array of resolved payload values, filtered based on the dependency and component metadata.
- */
-export function handle_payload(
- resolved_payload: unknown[],
- dependency: Dependency,
- components: ComponentMeta[],
- type: "input" | "output",
- with_null_state = false
-): unknown[] {
- if (type === "input" && !with_null_state) {
- throw new Error("Invalid code path. Cannot skip state inputs for input.");
- }
- // data comes from the server with null state values so we skip
- if (type === "output" && with_null_state) {
- return resolved_payload;
- }
-
- let updated_payload: unknown[] = [];
- let payload_index = 0;
- const deps = type === "input" ? dependency.inputs : dependency.outputs;
- for (let i = 0; i < deps.length; i++) {
- const input_id = deps[i];
- const component = components.find((c) => c.id === input_id);
-
- if (component?.type === "state") {
- // input + with_null_state needs us to fill state with null values
- if (with_null_state) {
- if (resolved_payload.length === deps.length) {
- const value = resolved_payload[payload_index];
- updated_payload.push(value);
- payload_index++;
- } else {
- updated_payload.push(null);
- }
- } else {
- // this is output & !with_null_state, we skip state inputs
- // the server payload always comes with null state values so we move along the payload index
- payload_index++;
- continue;
- }
- // input & !with_null_state isn't a case we care about, server needs null
- continue;
- } else {
- const value = resolved_payload[payload_index];
- updated_payload.push(value);
- payload_index++;
- }
- }
-
- return updated_payload;
-}
diff --git a/6.11.1/client/src/helpers/init_helpers.ts b/6.11.1/client/src/helpers/init_helpers.ts
deleted file mode 100644
index 94202f6b0cc235f5e4149ad3d489677111731431..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/helpers/init_helpers.ts
+++ /dev/null
@@ -1,250 +0,0 @@
-import type { Config } from "../types";
-import {
- CONFIG_ERROR_MSG,
- CONFIG_URL,
- INVALID_CREDENTIALS_MSG,
- LOGIN_URL,
- MISSING_CREDENTIALS_MSG,
- SPACE_METADATA_ERROR_MSG,
- UNAUTHORIZED_MSG
-} from "../constants";
-import { Client } from "..";
-import { join_urls, process_endpoint } from "./api_info";
-
-/**
- * This function is used to resolve the URL for making requests when the app has a root path.
- * The root path could be a path suffix like "/app" which is appended to the end of the base URL. Or
- * it could be a full URL like "https://abidlabs-test-client-replica--gqf2x.hf.space" which is used when hosting
- * Gradio apps on Hugging Face Spaces.
- * @param {string} base_url The base URL at which the Gradio server is hosted
- * @param {string} root_path The root path, which could be a path suffix (e.g. mounted in FastAPI app) or a full URL (e.g. hosted on Hugging Face Spaces)
- * @param {boolean} prioritize_base Whether to prioritize the base URL over the root path. This is used when both the base path and root paths are full URLs. For example, for fetching files the root path should be prioritized, but for making requests, the base URL should be prioritized.
- * @returns {string} the resolved URL
- */
-export function resolve_root(
- base_url: string,
- root_path: string,
- prioritize_base: boolean
-): string {
- if (root_path.startsWith("http://") || root_path.startsWith("https://")) {
- return prioritize_base ? base_url : root_path;
- }
- return base_url + root_path;
-}
-
-export async function get_jwt(
- space: string,
- token: `hf_${string}`,
- cookies?: string | null
-): Promise {
- try {
- const r = await fetch(`https://huggingface.co/api/spaces/${space}/jwt`, {
- headers: {
- Authorization: `Bearer ${token}`,
- ...(cookies ? { Cookie: cookies } : {})
- }
- });
-
- const jwt = (await r.json()).token;
-
- return jwt || false;
- } catch (e) {
- return false;
- }
-}
-
-export function map_names_to_ids(
- fns: Config["dependencies"]
-): Record {
- let apis: Record = {};
-
- fns.forEach(({ api_name, id }) => {
- if (api_name) apis[api_name] = id;
- });
- return apis;
-}
-
-export async function resolve_config(
- this: Client,
- endpoint: string
-): Promise {
- const headers: Record = this.options.token
- ? { Authorization: `Bearer ${this.options.token}` }
- : {};
-
- headers["Content-Type"] = "application/json";
-
- if (
- typeof window !== "undefined" &&
- window.gradio_config &&
- location.origin !== "http://localhost:9876"
- ) {
- if (window.gradio_config.current_page) {
- endpoint = endpoint.substring(0, endpoint.lastIndexOf("/"));
- }
- if (
- window.gradio_config.dev_mode ||
- (typeof window !== "undefined" && window?.BUILD_MODE === "dev")
- ) {
- let config_url = join_urls(
- endpoint,
- this.deep_link
- ? CONFIG_URL + "?deep_link=" + this.deep_link
- : CONFIG_URL
- );
- const response = await this.fetch(config_url, {
- headers,
- credentials: "include"
- });
- const config = await handleConfigResponse(response, !!this.options.auth);
- config.root = endpoint || config.root;
- // @ts-ignore
- window.gradio_config = {
- ...config,
- current_page: window.gradio_config.current_page
- };
- }
- // @ts-ignore
- return { ...window.gradio_config } as Config;
- } else if (endpoint) {
- let config_url = join_urls(
- endpoint,
- this.deep_link ? CONFIG_URL + "?deep_link=" + this.deep_link : CONFIG_URL
- );
-
- const response = await this.fetch(config_url, {
- headers,
- credentials: "include"
- });
-
- const config = await handleConfigResponse(response, !!this.options.auth);
- // Preserve the backend-provided root if available (it contains the correct public URL)
- // Only fall back to endpoint if the backend didn't provide a root
- if (!config.root) {
- config.root = endpoint;
- }
- return config;
- }
-
- throw new Error(CONFIG_ERROR_MSG);
-}
-
-async function handleConfigResponse(
- response: Response,
- authorized: boolean
-): Promise {
- if (response?.status === 401 && !authorized) {
- const error_data = await response.json();
- const auth_message = error_data?.detail?.auth_message;
- throw new Error(auth_message || MISSING_CREDENTIALS_MSG);
- } else if (response?.status === 401 && authorized) {
- throw new Error(INVALID_CREDENTIALS_MSG);
- }
-
- if (response?.status === 200) {
- let config = await response.json();
- config.dependencies?.forEach((dep: any, i: number) => {
- if (dep.id === undefined) {
- dep.id = i;
- }
- });
- return config;
- } else if (response?.status === 401) {
- throw new Error(UNAUTHORIZED_MSG);
- }
-
- throw new Error(CONFIG_ERROR_MSG);
-}
-
-export async function resolve_cookies(this: Client): Promise {
- const { http_protocol, host } = await process_endpoint(
- this.app_reference,
- this.options.token
- );
-
- try {
- if (this.options.auth) {
- const cookie_header = await get_cookie_header(
- http_protocol,
- host,
- this.options.auth,
- this.fetch,
- this.options.token
- );
-
- if (cookie_header) this.set_cookies(cookie_header);
- }
- } catch (e: unknown) {
- throw Error((e as Error).message);
- }
-}
-
-// separating this from client-bound resolve_cookies so that it can be used in duplicate
-export async function get_cookie_header(
- http_protocol: string,
- host: string,
- auth: [string, string],
- _fetch: typeof fetch,
- token?: `hf_${string}`
-): Promise {
- const formData = new FormData();
- formData.append("username", auth?.[0]);
- formData.append("password", auth?.[1]);
-
- let headers: { Authorization?: string } = {};
-
- if (token) {
- headers.Authorization = `Bearer ${token}`;
- }
-
- const res = await _fetch(`${http_protocol}//${host}/${LOGIN_URL}`, {
- headers,
- method: "POST",
- body: formData,
- credentials: "include"
- });
-
- if (res.status === 200) {
- return res.headers.get("set-cookie");
- } else if (res.status === 401) {
- throw new Error(INVALID_CREDENTIALS_MSG);
- } else {
- throw new Error(SPACE_METADATA_ERROR_MSG);
- }
-}
-
-export function determine_protocol(endpoint: string): {
- ws_protocol: "ws" | "wss";
- http_protocol: "http:" | "https:";
- host: string;
-} {
- if (endpoint.startsWith("http")) {
- const { protocol, host, pathname } = new URL(endpoint);
-
- return {
- ws_protocol: protocol === "https:" ? "wss" : "ws",
- http_protocol: protocol as "http:" | "https:",
- host: host + (pathname !== "/" ? pathname : "")
- };
- }
-
- // default to secure if no protocol is provided
-
- return {
- ws_protocol: "wss",
- http_protocol: "https:",
- host: new URL(endpoint).host
- };
-}
-
-export const parse_and_set_cookies = (cookie_header: string): string[] => {
- let cookies: string[] = [];
- const parts = cookie_header.split(/,(?=\s*[^\s=;]+=[^\s=;]+)/);
- parts.forEach((cookie) => {
- const [cookie_name, cookie_value] = cookie.split(";")[0].split("=");
- if (cookie_name && cookie_value) {
- cookies.push(`${cookie_name.trim()}=${cookie_value.trim()}`);
- }
- });
- return cookies;
-};
diff --git a/6.11.1/client/src/helpers/spaces.ts b/6.11.1/client/src/helpers/spaces.ts
deleted file mode 100644
index 81875f4be056c5f1ac87256536b00c9d8a4bef2e..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/helpers/spaces.ts
+++ /dev/null
@@ -1,252 +0,0 @@
-import {
- RUNTIME_URL,
- SLEEPTIME_URL,
- SPACE_STATUS_ERROR_MSG
-} from "../constants";
-import { RE_SPACE_NAME } from "./api_info";
-import type { SpaceStatusCallback } from "../types";
-
-export async function check_space_status(
- id: string,
- type: "subdomain" | "space_name",
- status_callback: SpaceStatusCallback
-): Promise {
- let endpoint =
- type === "subdomain"
- ? `https://huggingface.co/api/spaces/by-subdomain/${id}`
- : `https://huggingface.co/api/spaces/${id}`;
- let response;
- let _status;
- try {
- response = await fetch(endpoint);
- _status = response.status;
- if (_status !== 200) {
- throw new Error();
- }
- response = await response.json();
- } catch (e) {
- status_callback({
- status: "error",
- load_status: "error",
- message: SPACE_STATUS_ERROR_MSG,
- detail: "NOT_FOUND"
- });
- return;
- }
-
- if (!response || _status !== 200) return;
- const {
- runtime: { stage },
- id: space_name
- } = response;
-
- switch (stage) {
- case "STOPPED":
- case "SLEEPING":
- status_callback({
- status: "sleeping",
- load_status: "pending",
- message: "Space is asleep. Waking it up...",
- detail: stage
- });
-
- setTimeout(() => {
- check_space_status(id, type, status_callback);
- }, 1000); // poll for status
- break;
- case "PAUSED":
- status_callback({
- status: "paused",
- load_status: "error",
- message:
- "This space has been paused by the author. If you would like to try this demo, consider duplicating the space.",
- detail: stage,
- discussions_enabled: await discussions_enabled(space_name)
- });
- break;
- case "RUNNING":
- case "RUNNING_BUILDING":
- status_callback({
- status: "running",
- load_status: "complete",
- message: "Space is running.",
- detail: stage
- });
- break;
- case "BUILDING":
- status_callback({
- status: "building",
- load_status: "pending",
- message: "Space is building...",
- detail: stage
- });
-
- setTimeout(() => {
- check_space_status(id, type, status_callback);
- }, 1000);
- break;
- case "APP_STARTING":
- status_callback({
- status: "starting",
- load_status: "pending",
- message: "Space is starting...",
- detail: stage
- });
-
- setTimeout(() => {
- check_space_status(id, type, status_callback);
- }, 1000);
- break;
- default:
- status_callback({
- status: "space_error",
- load_status: "error",
- message: "This space is experiencing an issue.",
- detail: stage,
- discussions_enabled: await discussions_enabled(space_name)
- });
- break;
- }
-}
-
-export const check_and_wake_space = async (
- space_id: string,
- status_callback: SpaceStatusCallback
-): Promise => {
- let retries = 0;
- const max_retries = 12;
- const check_interval = 5000;
-
- return new Promise((resolve) => {
- check_space_status(
- space_id,
- RE_SPACE_NAME.test(space_id) ? "space_name" : "subdomain",
- (status) => {
- status_callback(status);
-
- if (status.status === "running") {
- resolve();
- } else if (
- status.status === "error" ||
- status.status === "paused" ||
- status.status === "space_error"
- ) {
- resolve();
- } else if (
- status.status === "sleeping" ||
- status.status === "building"
- ) {
- if (retries < max_retries) {
- retries++;
- setTimeout(() => {
- check_and_wake_space(space_id, status_callback).then(resolve);
- }, check_interval);
- } else {
- resolve();
- }
- }
- }
- );
- });
-};
-
-const RE_DISABLED_DISCUSSION =
- /^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;
-export async function discussions_enabled(space_id: string): Promise {
- try {
- const r = await fetch(
- `https://huggingface.co/api/spaces/${space_id}/discussions`,
- {
- method: "HEAD"
- }
- );
-
- const error = r.headers.get("x-error-message");
-
- if (!r.ok || (error && RE_DISABLED_DISCUSSION.test(error))) return false;
- return true;
- } catch (e) {
- return false;
- }
-}
-
-export async function get_space_hardware(
- space_id: string,
- token?: `hf_${string}` | undefined
-): Promise<(typeof hardware_types)[number]> {
- const headers: { Authorization?: string } = {};
- if (token) {
- headers.Authorization = `Bearer ${token}`;
- }
-
- try {
- const res = await fetch(
- `https://huggingface.co/api/spaces/${space_id}/${RUNTIME_URL}`,
- { headers }
- );
-
- if (res.status !== 200)
- throw new Error("Space hardware could not be obtained.");
-
- const { hardware } = await res.json();
-
- return hardware.current;
- } catch (e: any) {
- throw new Error(e.message);
- }
-}
-
-export async function set_space_timeout(
- space_id: string,
- timeout: number,
- token?: `hf_${string}`
-): Promise {
- const headers: { Authorization?: string } = {};
- if (token) {
- headers.Authorization = `Bearer ${token}`;
- }
-
- const body: {
- seconds?: number;
- } = {
- seconds: timeout
- };
-
- try {
- const res = await fetch(
- `https://huggingface.co/api/spaces/${space_id}/${SLEEPTIME_URL}`,
- {
- method: "POST",
- headers: { "Content-Type": "application/json", ...headers },
- body: JSON.stringify(body)
- }
- );
-
- if (res.status !== 200) {
- throw new Error(
- "Could not set sleep timeout on duplicated Space. Please visit *ADD HF LINK TO SETTINGS* to set a timeout manually to reduce billing charges."
- );
- }
-
- const response = await res.json();
- return response;
- } catch (e: any) {
- throw new Error(e.message);
- }
-}
-
-export const hardware_types = [
- "cpu-basic",
- "cpu-upgrade",
- "cpu-xl",
- "t4-small",
- "t4-medium",
- "a10g-small",
- "a10g-large",
- "a10g-largex2",
- "a10g-largex4",
- "a100-large",
- "zero-a10g",
- "h100",
- "h100x8"
-] as const;
diff --git a/6.11.1/client/src/index.ts b/6.11.1/client/src/index.ts
deleted file mode 100644
index 6ea916ad113f5195fdc2d26d8347ed5aaa322031..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/index.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-export { Client } from "./client";
-
-export { predict } from "./utils/predict";
-export { submit } from "./utils/submit";
-export { upload_files } from "./utils/upload_files";
-export { FileData, upload, prepare_files } from "./upload";
-export { handle_file } from "./helpers/data";
-
-export type {
- SpaceStatus,
- StatusMessage,
- Status,
- client_return,
- UploadResponse,
- RenderMessage,
- LogMessage,
- Payload,
- Config,
- ValidationError
-} from "./types";
-
-export { MISSING_CREDENTIALS_MSG } from "./constants";
-
-// todo: remove in @gradio/client v1.0
-export { client } from "./client";
-export { duplicate_space as duplicate } from "./client";
diff --git a/6.11.1/client/src/test/handlers.ts b/6.11.1/client/src/test/handlers.ts
deleted file mode 100644
index 195630332b173e003c0ad14289c66193ea07b569..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/test/handlers.ts
+++ /dev/null
@@ -1,687 +0,0 @@
-import { HttpResponse, http, RequestHandler } from "msw";
-import {
- HOST_URL,
- API_INFO_URL,
- CONFIG_URL,
- RUNTIME_URL,
- SLEEPTIME_URL,
- UPLOAD_URL,
- BROKEN_CONNECTION_MSG,
- LOGIN_URL
-} from "../constants";
-import {
- response_api_info,
- config_response,
- whoami_response,
- duplicate_response,
- hardware_sleeptime_response,
- discussions_response,
- runtime_response
-} from "./test_data";
-
-const root_url = "https://huggingface.co";
-
-export const direct_space_url = "https://hmb-hello-world.hf.space";
-const private_space_url = "https://hmb-secret-world.hf.space";
-const private_auth_space_url = "https://hmb-private-auth-space.hf.space";
-
-const server_error_space_url = "https://hmb-server-error.hf.space";
-const upload_server_test_space_url = "https://hmb-server-test.hf.space";
-const auth_app_space_url = "https://hmb-auth-space.hf.space";
-const unauth_app_space_url = "https://hmb-unauth-space.hf.space";
-const invalid_auth_space_url = "https://hmb-invalid-auth-space.hf.space";
-
-const server_error_reference = "hmb/server_error";
-const app_reference = "hmb/hello_world";
-const broken_app_reference = "hmb/bye_world";
-const duplicate_app_reference = "gradio/hello_world";
-const private_app_reference = "hmb/secret_world";
-const server_test_app_reference = "hmb/server_test";
-const auth_app_reference = "hmb/auth_space";
-const unauth_app_reference = "hmb/unauth_space";
-const invalid_auth_app_reference = "hmb/invalid_auth_space";
-const private_auth_app_reference = "hmb/private_auth_space";
-
-export const handlers: RequestHandler[] = [
- // /host requests
- http.get(`${root_url}/api/spaces/${app_reference}/${HOST_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-hello-world",
- host: "https://hmb-hello-world.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${root_url}/api/spaces/${broken_app_reference}/${HOST_URL}`, () => {
- return new HttpResponse(null, {
- status: 404,
- headers: {
- "Content-Type": "application/json",
- hf_token: "hf_123"
- }
- });
- }),
- http.get(
- `${root_url}/api/spaces/${private_auth_app_reference}/${HOST_URL}`,
- () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-private-auth-space",
- host: "https://hmb-private-auth-space.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- http.get(
- `${root_url}/api/spaces/${private_app_reference}/${HOST_URL}`,
- ({ request }) => {
- const token = request.headers.get("authorization")?.substring(7);
-
- if (!token || token !== "hf_123") {
- return new HttpResponse(null, {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
-
- return new HttpResponse(
- JSON.stringify({
- subdomain: private_app_reference,
- host: private_space_url
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- http.get(
- `${root_url}/api/spaces/${server_error_reference}/${HOST_URL}`,
- () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-server-test",
- host: "https://hmb-server-test.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- http.get(
- `${root_url}/api/spaces/${server_test_app_reference}/${HOST_URL}`,
- () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-server-test",
- host: "https://hmb-server-test.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- http.get(`${root_url}/api/spaces/${auth_app_reference}/${HOST_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-auth-space",
- host: "https://hmb-auth-space.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(
- `${root_url}/api/spaces/${invalid_auth_app_reference}/${HOST_URL}`,
- () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-invalid-auth-space",
- host: "https://hmb-invalid-auth-space.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- http.get(
- `${root_url}/api/spaces/${duplicate_app_reference}/${HOST_URL}`,
- () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "gradio-hello-world",
- host: "https://gradio-hello-world.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- http.get(`${root_url}/api/spaces/${unauth_app_reference}/${HOST_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- subdomain: "hmb-unath-space",
- host: "https://hmb-unauth-space.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- // /info requests
- http.get(`${direct_space_url}/${API_INFO_URL}`, () => {
- return new HttpResponse(JSON.stringify(response_api_info), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${upload_server_test_space_url}/${API_INFO_URL}`, () => {
- return new HttpResponse(JSON.stringify(response_api_info), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${private_space_url}/${API_INFO_URL}`, () => {
- return new HttpResponse(JSON.stringify(response_api_info), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${server_error_space_url}/${API_INFO_URL}`, () => {
- return new HttpResponse(JSON.stringify(response_api_info), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${auth_app_space_url}/${API_INFO_URL}`, async () => {
- return new HttpResponse(JSON.stringify(response_api_info), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${private_auth_space_url}/${API_INFO_URL}`, async () => {
- return new HttpResponse(JSON.stringify(response_api_info), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // /config requests
- http.get(`${direct_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(JSON.stringify(config_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${private_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- ...config_response,
- root: "https://hmb-secret-world.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${upload_server_test_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- ...config_response,
- root: "https://hmb-server-test.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${private_auth_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- ...config_response,
- root: "https://hmb-private-auth-space.hf.space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${direct_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(JSON.stringify(config_response), {
- status: 500,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${server_error_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(JSON.stringify(config_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${invalid_auth_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(JSON.stringify({ detail: "Unauthorized" }), {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${auth_app_space_url}/${CONFIG_URL}`, ({ request }) => {
- return new HttpResponse(
- JSON.stringify({
- ...config_response,
- root: "https://hmb-auth-space.hf.space",
- space_id: "hmb/auth_space"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${unauth_app_space_url}/${CONFIG_URL}`, () => {
- return new HttpResponse(
- JSON.stringify({
- detail: "Unauthorized"
- }),
- {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- // /whoami requests
- http.get(`${root_url}/api/whoami-v2`, () => {
- return new HttpResponse(JSON.stringify(whoami_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json",
- "hf-token": "hf_123"
- }
- });
- }),
- // /duplicate requests
- http.post(
- `${root_url}/api/spaces/${duplicate_app_reference}/duplicate`,
- ({ request }) => {
- if (request.headers.get("authorization")?.substring(7) !== "hf_123") {
- throw new HttpResponse(null, {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- return new HttpResponse(JSON.stringify(duplicate_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- ),
- // /sleeptime requests
- http.post(`${root_url}/api/spaces/${app_reference}/${SLEEPTIME_URL}`, () => {
- return new HttpResponse(JSON.stringify(hardware_sleeptime_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.post(
- `${root_url}/api/spaces/${server_test_app_reference}/${SLEEPTIME_URL}`,
- () => {
- throw new HttpResponse(null, {
- status: 500,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- ),
- // /runtime requests
- http.get(
- `${root_url}/api/spaces/${broken_app_reference}/${RUNTIME_URL}`,
- () => {
- return new HttpResponse(null, {
- status: 404,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }
- ),
- http.get(`${root_url}/api/spaces/${app_reference}/${RUNTIME_URL}`, () => {
- return new HttpResponse(JSON.stringify(hardware_sleeptime_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // queue requests
- http.get(`${direct_space_url}/queue/data`, () => {
- return new HttpResponse(JSON.stringify({ event_id: "123" }), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.post(`${direct_space_url}/queue/join`, () => {
- return new HttpResponse(JSON.stringify({ event_id: "123" }), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // upload requests
- http.post(`${direct_space_url}/${UPLOAD_URL}`, () => {
- return new HttpResponse(JSON.stringify(["lion.jpg"]), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.post(`${upload_server_test_space_url}/${UPLOAD_URL}`, () => {
- throw new HttpResponse(JSON.parse("Internal Server Error"), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // discussions requests
- http.head(`${root_url}/api/spaces/${app_reference}/discussions`, () => {
- return new HttpResponse(JSON.stringify(discussions_response), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.head(
- `${root_url}/api/spaces/${broken_app_reference}/discussions`,
- () => {
- throw new HttpResponse(
- JSON.parse("Discussions are disabled for this repo"),
- {
- status: 403,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }
- ),
- // space requests
- http.get(`${root_url}/api/spaces/${app_reference}`, () => {
- return new HttpResponse(
- JSON.stringify({ id: app_reference, runtime: runtime_response }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${root_url}/api/spaces/hmb/paused_space`, () => {
- return new HttpResponse(
- JSON.stringify({
- id: app_reference,
- runtime: { ...runtime_response, stage: "PAUSED" }
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${root_url}/api/spaces/hmb/building_space`, () => {
- return new HttpResponse(
- JSON.stringify({
- id: app_reference,
- runtime: { ...runtime_response, stage: "BUILDING" }
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${root_url}/api/spaces/hmb/stopped_space`, () => {
- return new HttpResponse(
- JSON.stringify({
- id: app_reference,
- runtime: { ...runtime_response, stage: "STOPPED" }
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${root_url}/api/spaces/hmb/failed_space`, () => {
- throw new HttpResponse(null, {
- status: 500,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.get(`${root_url}/api/spaces/${unauth_app_reference}`, () => {
- return new HttpResponse(
- JSON.stringify({
- id: unauth_app_reference,
- runtime: { ...runtime_response }
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- // jwt requests
- http.get(`${root_url}/api/spaces/${app_reference}/jwt`, () => {
- return new HttpResponse(
- JSON.stringify({
- token: "jwt_123"
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- }
- );
- }),
- http.get(`${root_url}/api/spaces/${broken_app_reference}/jwt`, () => {
- return new HttpResponse(null, {
- status: 500,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // post_data requests
- http.post(`${direct_space_url}`, () => {
- return new HttpResponse(JSON.stringify({}), {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.post(`${private_space_url}`, () => {
- return new HttpResponse(JSON.stringify(BROKEN_CONNECTION_MSG), {
- status: 500,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // heartbeat requests
- http.get(`*/heartbeat/*`, () => {
- return new HttpResponse(null, {
- status: 200,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- // login requests
- http.post(`${auth_app_space_url}/${LOGIN_URL}`, async ({ request }) => {
- let username;
- let password;
-
- await request.formData().then((data) => {
- username = data.get("username");
- password = data.get("password");
- });
-
- if (username === "admin" && password === "pass1234") {
- return new HttpResponse(
- JSON.stringify({
- success: true
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json",
- "Set-Cookie":
- "access-token-unsecure-123=abc; HttpOnly; Path=/; SameSite=none; Secure"
- }
- }
- );
- }
-
- return new HttpResponse(null, {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.post(`${invalid_auth_space_url}/${LOGIN_URL}`, async () => {
- return new HttpResponse(null, {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- });
- }),
- http.post(`${private_auth_space_url}/${LOGIN_URL}`, async ({ request }) => {
- let username;
- let password;
-
- await request.formData().then((data) => {
- username = data.get("username");
- password = data.get("password");
- });
-
- if (username === "admin" && password === "pass1234") {
- return new HttpResponse(
- JSON.stringify({
- success: true
- }),
- {
- status: 200,
- headers: {
- "Content-Type": "application/json",
- "Set-Cookie":
- "access-token-unsecure-123=abc; HttpOnly; Path=/; SameSite=none; Secure"
- }
- }
- );
- }
-
- return new HttpResponse(null, {
- status: 401,
- headers: {
- "Content-Type": "application/json"
- }
- });
- })
-];
diff --git a/6.11.1/client/src/test/mock_eventsource.ts b/6.11.1/client/src/test/mock_eventsource.ts
deleted file mode 100644
index db92054ccb6a80abbf5101552f794172dda03bb4..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/test/mock_eventsource.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { vi } from "vitest";
-
-if (import.meta.env.TEST_MODE !== "node") {
- Object.defineProperty(window, "EventSource", {
- writable: true,
- value: vi.fn().mockImplementation(() => ({
- close: vi.fn(() => {}),
- addEventListener: vi.fn(),
- onmessage: vi.fn((_event: MessageEvent) => {}),
- onerror: vi.fn((_event: Event) => {})
- }))
- });
-}
diff --git a/6.11.1/client/src/test/server.ts b/6.11.1/client/src/test/server.ts
deleted file mode 100644
index fd82f079cd8001bc3cb5ba6293bb49c83ba38b65..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/test/server.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { handlers } from "./handlers";
-// import type { StartOptions } from 'msw';
-import type { SetupWorker, StartOptions } from "msw/browser";
-
-const IS_NODE =
- typeof process !== "undefined" && process.env.TEST_MODE === "node";
-
-interface MockServer {
- start: (opts: StartOptions) => void | ReturnType;
- stop: () => void | Promise;
- resetHandlers: (...handlers: any[]) => void;
-}
-
-export async function initialise_server(): Promise {
- if (IS_NODE) {
- const { setupServer } = await import("msw/node");
- const server = setupServer(...handlers);
- return {
- start: (opts: StartOptions) => server.listen(opts),
- stop: () => server.close(),
- resetHandlers: (...h) => server.resetHandlers(...h)
- };
- }
- const { setupWorker } = await import("msw/browser");
- const worker = setupWorker(...handlers);
- return {
- start: (opts: StartOptions) => worker.start(opts),
- stop: () => worker.stop(),
- resetHandlers: (...h) => worker.resetHandlers(...h)
- };
-}
diff --git a/6.11.1/client/src/test/test_data.ts b/6.11.1/client/src/test/test_data.ts
deleted file mode 100644
index 331dcc9827eb95d0c4dd4ce3bbf45c086d0642cc..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/test/test_data.ts
+++ /dev/null
@@ -1,562 +0,0 @@
-// @ts-nocheck
-import { ApiData, ApiInfo, Config, EndpointInfo } from "../types";
-
-export const runtime_response = {
- stage: "RUNNING",
- hardware: {
- current: "cpu-basic",
- requested: "cpu-basic"
- },
- storage: {
- current: null,
- requested: null
- },
- gcTimeout: 86400,
- replicas: {
- current: 1,
- requested: 1
- },
- devMode: false,
- domains: [
- {
- domain: "hmb-hello-world.hf.space",
- isCustom: false,
- stage: "READY"
- }
- ]
-};
-
-export const transformed_api_info: ApiInfo = {
- named_endpoints: {
- "/predict": {
- parameters: [
- {
- label: "name",
- type: "string",
- python_type: { type: "str", description: "" },
- component: "Textbox",
- example_input: "Hello!!"
- }
- ],
- returns: [
- {
- label: "output",
- type: "string",
- python_type: { type: "str", description: "" },
- component: "Textbox"
- }
- ],
- type: { generator: false, cancel: false }
- }
- },
- unnamed_endpoints: {
- "0": {
- parameters: [
- {
- label: "name",
- type: "string",
- python_type: { type: "str", description: "" },
- component: "Textbox",
- example_input: "Hello!!"
- }
- ],
- returns: [
- {
- label: "output",
- type: "string",
- python_type: { type: "str", description: "" },
- component: "Textbox"
- }
- ],
- type: { generator: false, cancel: false }
- }
- }
-};
-
-export const response_api_info: ApiInfo = {
- named_endpoints: {
- "/predict": {
- parameters: [
- {
- label: "name",
- type: {
- type: "string"
- },
- python_type: {
- type: "str",
- description: ""
- },
- component: "Textbox",
- example_input: "Hello!!"
- }
- ],
- returns: [
- {
- label: "output",
- type: {
- type: "string"
- },
- python_type: {
- type: "str",
- description: ""
- },
- component: "Textbox"
- }
- ]
- }
- },
- unnamed_endpoints: {}
-};
-
-export const config_response: Config = {
- version: "4.27.0",
- mode: "interface",
- app_id: 123,
- dev_mode: false,
- analytics_enabled: true,
- components: [
- {
- id: 3,
- type: "row",
- props: {
- variant: "default",
- visible: true,
- equal_height: false,
- name: "row"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 4,
- type: "column",
- props: {
- scale: 1,
- min_width: 320,
- variant: "panel",
- visible: true,
- name: "column"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 5,
- type: "column",
- props: {
- scale: 1,
- min_width: 320,
- variant: "default",
- visible: true,
- name: "column"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 1,
- type: "textbox",
- props: {
- lines: 1,
- max_lines: 20,
- label: "name",
- show_label: true,
- container: true,
- min_width: 160,
- visible: true,
- autofocus: false,
- autoscroll: true,
- elem_classes: [],
- type: "text",
- rtl: false,
- show_copy_button: false,
- name: "textbox",
- _selectable: false
- },
- skip_api: false,
- component_class_id: "",
- api_info: {
- type: "string"
- },
- example_inputs: "Hello!!"
- },
- {
- id: 6,
- type: "form",
- props: {
- scale: 0,
- min_width: 0,
- name: "form"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 7,
- type: "row",
- props: {
- variant: "default",
- visible: true,
- equal_height: true,
- name: "row"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 8,
- type: "button",
- props: {
- value: "Clear",
- variant: "secondary",
- visible: true,
- interactive: true,
- elem_classes: [],
- api_visibility: "undocumented",
- name: "button",
- _selectable: false
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 9,
- type: "button",
- props: {
- value: "Submit",
- variant: "primary",
- visible: true,
- interactive: true,
- elem_classes: [],
- name: "button",
- _selectable: false
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 10,
- type: "column",
- props: {
- scale: 1,
- min_width: 320,
- variant: "panel",
- visible: true,
- name: "column"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 2,
- type: "textbox",
- props: {
- lines: 1,
- max_lines: 20,
- label: "output",
- show_label: true,
- container: true,
- min_width: 160,
- interactive: false,
- visible: true,
- autofocus: false,
- autoscroll: true,
- elem_classes: [],
- type: "text",
- rtl: false,
- show_copy_button: false,
- name: "textbox",
- _selectable: false
- },
- skip_api: false,
- component_class_id: "",
- api_info: {
- type: "string"
- },
- example_inputs: "Hello!!"
- },
- {
- id: 11,
- type: "row",
- props: {
- variant: "default",
- visible: true,
- equal_height: true,
- name: "row"
- },
- skip_api: true,
- component_class_id: ""
- },
- {
- id: 12,
- type: "form",
- props: {
- scale: 0,
- min_width: 0,
- name: "form"
- },
- skip_api: true,
- component_class_id: ""
- }
- ],
- css: null,
- js: null,
- head: null,
- title: "Gradio",
- space_id: "hmb/hello_world",
- enable_queue: true,
- show_error: false,
- footer_links: ["api", "gradio", "settings"],
- is_colab: false,
- stylesheets: [],
- theme: "default",
- protocol: "sse_v3",
- body_css: {
- body_background_fill: "white",
- body_text_color: "#1f2937",
- body_background_fill_dark: "#0b0f19",
- body_text_color_dark: "#f3f4f6"
- },
- fill_height: false,
- layout: {
- id: 0,
- children: [
- {
- id: 3,
- children: [
- {
- id: 4,
- children: [
- {
- id: 5,
- children: [
- {
- id: 6,
- children: [
- {
- id: 1
- }
- ]
- }
- ]
- },
- {
- id: 7,
- children: [
- {
- id: 8
- },
- {
- id: 9
- }
- ]
- }
- ]
- },
- {
- id: 10,
- children: [
- {
- id: 12,
- children: [
- {
- id: 2
- }
- ]
- },
- {
- id: 11,
- children: []
- }
- ]
- }
- ]
- }
- ]
- },
- dependencies: [
- {
- id: 0,
- targets: [
- [9, "click"],
- [1, "submit"]
- ],
- inputs: [1],
- outputs: [2],
- backend_fn: true,
- js: null,
- queue: null,
- api_name: "predict",
- scroll_to_output: false,
- show_progress: "full",
- every: null,
- batch: false,
- max_batch_size: 4,
- cancels: [],
- types: {
- generator: false,
- cancel: false
- },
- collects_event_data: false,
- trigger_after: null,
- trigger_only_on_success: false,
- trigger_only_on_failure: false,
- trigger_mode: "once",
- api_visibility: "public",
- zerogpu: false
- },
- {
- id: 1,
- targets: [[8, "click"]],
- inputs: [],
- outputs: [1, 2],
- backend_fn: false,
- js: "() => [null, null]",
- queue: false,
- api_name: "js_fn",
- scroll_to_output: false,
- show_progress: "full",
- every: null,
- batch: false,
- max_batch_size: 4,
- cancels: [],
- types: {
- generator: false,
- cancel: false
- },
- collects_event_data: false,
- trigger_after: null,
- trigger_only_on_success: false,
- trigger_only_on_failure: false,
- trigger_mode: "once",
- api_visibility: "private",
- zerogpu: false
- },
- {
- id: 2,
- targets: [[8, "click"]],
- inputs: [],
- outputs: [5],
- backend_fn: false,
- js: '() => [{"variant": null, "visible": true, "__type__": "update"}]\n ',
- queue: false,
- api_name: "js_fn_1",
- scroll_to_output: false,
- show_progress: "full",
- every: null,
- batch: false,
- max_batch_size: 4,
- cancels: [],
- types: {
- generator: false,
- cancel: false
- },
- collects_event_data: false,
- trigger_after: null,
- trigger_only_on_success: false,
- trigger_only_on_failure: false,
- trigger_mode: "once",
- api_visibility: "private",
- zerogpu: false
- }
- ],
- root: "https://hmb-hello-world.hf.space",
- path: ""
-};
-
-export const whoami_response = {
- type: "user",
- id: "123",
- name: "hmb",
- fullname: "jerry",
- email: "jerry@gradio.com",
- emailVerified: true,
- canPay: true,
- periodEnd: 123,
- isPro: false,
- avatarUrl: "",
- orgs: [],
- auth: {
- type: "access_token",
- accessToken: {
- displayName: "Gradio Client",
- role: "write"
- }
- }
-};
-
-export const duplicate_response = {
- url: "https://huggingface.co/spaces/hmb/hello_world"
-};
-
-export const hardware_sleeptime_response = {
- stage: "RUNNING",
- hardware: {
- current: "cpu-basic",
- requested: "cpu-upgrade"
- },
- storage: null,
- gcTimeout: 300,
- replicas: {
- current: 1,
- requested: 1
- },
- devMode: false,
- domains: [
- {
- domain: "hmb-hello-world.hf.space",
- isCustom: false,
- stage: "READY"
- }
- ]
-};
-
-export const endpoint_info: EndpointInfo = {
- parameters: [
- {
- label: "parameter_2",
- parameter_name: "im",
- parameter_has_default: false,
- parameter_default: null,
- type: "",
- python_type: {
- type: "Dict(background: filepath | None, layers: List[filepath], composite: filepath | None, id: str | None)",
- description: ""
- },
- component: "Imageeditor",
- example_input: {
- background: {
- path: "",
- meta: {
- _type: "gradio.FileData"
- },
- orig_name: "bus.png",
- url: ""
- },
- layers: [],
- composite: null
- }
- }
- ],
- returns: [
- {
- label: "value_3",
- type: "string",
- python_type: {
- type: "filepath",
- description: ""
- },
- component: "Image"
- }
- ],
- type: {
- generator: false
- }
-};
-
-export const discussions_response = {
- discussions: [],
- count: 0,
- start: 0,
- numClosedDiscussions: 0
-};
diff --git a/6.11.1/client/src/types.ts b/6.11.1/client/src/types.ts
deleted file mode 100644
index c7538718c9249ac278f826e9eddc2074710badc2..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/types.ts
+++ /dev/null
@@ -1,432 +0,0 @@
-// API Data Types
-
-import { hardware_types } from "./helpers/spaces";
-import type { SvelteComponent } from "svelte";
-import type { ComponentType } from "svelte";
-
-export interface ApiData {
- label: string;
- parameter_name: string;
- parameter_default?: any;
- parameter_has_default?: boolean;
- type: {
- type: any;
- description: string;
- };
- component: string;
- example_input?: any;
- python_type: { type: string; description: string };
- serializer: string;
-}
-
-export interface JsApiData {
- label: string;
- parameter_name: string;
- parameter_default?: any;
- parameter_has_default?: boolean;
- type: string;
- description: string;
- component: string;
- example_input?: any;
- serializer: string;
- python_type: { type: string; description: string };
-}
-
-export interface EndpointInfo {
- parameters: T[];
- returns: T[];
- type?: DependencyTypes;
-}
-
-export interface ApiInfo {
- named_endpoints: Record>;
- unnamed_endpoints: Record>;
-}
-
-export interface BlobRef {
- path: string[];
- type: string | undefined;
- blob: Blob | File | false;
-}
-
-export type DataType = string | Buffer | Record | any[];
-
-// custom class used for uploading local files
-export class Command {
- type: string;
- command: string;
- meta: {
- path: string;
- name: string;
- orig_path: string;
- };
- fileData?: FileData;
-
- constructor(
- command: string,
- meta: { path: string; name: string; orig_path: string }
- ) {
- this.type = "command";
- this.command = command;
- this.meta = meta;
- }
-}
-
-// Function Signature Types
-
-export type SubmitFunction = (
- endpoint: string | number,
- data?: unknown[] | Record,
- event_data?: unknown,
- trigger_id?: number | null,
- all_events?: boolean,
- additional_headers?: Record
-) => SubmitIterable;
-
-export type PredictFunction = (
- endpoint: string | number,
- data?: unknown[] | Record,
- event_data?: unknown
-) => Promise>;
-
-export type client_return = {
- config: Config | undefined;
- predict: PredictFunction;
- submit: SubmitFunction;
- component_server: (
- component_id: number,
- fn_name: string,
- data: unknown[]
- ) => any;
- view_api: (_fetch: typeof fetch) => Promise>;
-};
-
-export interface SubmitIterable extends AsyncIterable {
- [Symbol.asyncIterator](): SubmitIterable;
- next: () => Promise>;
- throw: (value: unknown) => Promise>;
- return: () => Promise>;
- cancel: () => Promise;
- event_id: () => string;
- send_chunk: (payload: Record) => void;
- wait_for_id: () => Promise;
- close_stream: () => void;
-}
-
-export type PredictReturn = {
- type: EventType;
- time: Date;
- data: T;
- endpoint: string;
- fn_index: number;
-};
-
-// Space Status Types
-
-export type SpaceStatus = SpaceStatusNormal | SpaceStatusError;
-
-export interface SpaceStatusNormal {
- status:
- | "sleeping"
- | "running"
- | "building"
- | "error"
- | "stopped"
- | "starting";
- detail:
- | "SLEEPING"
- | "RUNNING"
- | "RUNNING_BUILDING"
- | "BUILDING"
- | "APP_STARTING"
- | "NOT_FOUND";
- load_status: "pending" | "error" | "complete" | "generating";
- message: string;
-}
-
-export interface SpaceStatusError {
- status: "space_error" | "paused";
- detail:
- | "NO_APP_FILE"
- | "CONFIG_ERROR"
- | "BUILD_ERROR"
- | "RUNTIME_ERROR"
- | "PAUSED";
- load_status: "error";
- message: string;
- discussions_enabled: boolean;
-}
-
-export type SpaceStatusCallback = (a: SpaceStatus) => void;
-
-// Configuration and Response Types
-// --------------------------------
-export interface Config {
- deep_link_state?: "none" | "valid" | "invalid";
- auth_required?: true;
- app_id?: string;
- analytics_enabled: boolean;
- connect_heartbeat: boolean;
- dev_mode: boolean;
- vibe_mode: boolean;
- auth_message: string;
- components: ComponentMeta[];
- css: string | null;
- js: string | null;
- head: string | null;
- dependencies: Dependency[];
- enable_queue: boolean;
- show_error: boolean;
- layout: any;
- mode: "blocks" | "interface" | "chat_interface";
- root: string;
- root_url?: string;
- theme: string;
- title: string;
- version: string;
- space_id: string | null;
- is_space: boolean;
- is_colab: boolean;
- footer_links: string[];
- stylesheets: string[];
- current_page: string;
- page: Record<
- string,
- {
- components: number[];
- dependencies: number[];
- layout: any;
- }
- >;
- pages: [string, string, boolean][];
- protocol: "sse_v3" | "sse_v2.1" | "sse_v2" | "sse_v1" | "sse" | "ws";
- max_file_size?: number;
- theme_hash?: number;
- username: string | null;
- api_prefix?: string;
- fill_height?: boolean;
- fill_width?: boolean;
- pwa?: boolean;
- i18n_translations?: Record> | null;
- mcp_server?: boolean;
-}
-
-// todo: DRY up types
-export interface ComponentMeta {
- type: string;
- id: number;
- has_modes: boolean;
- props: SharedProps;
- instance: SvelteComponent;
- component: ComponentType;
- documentation?: Documentation;
- children?: ComponentMeta[];
- parent?: ComponentMeta;
- value?: any;
- component_class_id: string;
- key: string | number | null;
- rendered_in?: number;
-}
-
-interface SharedProps {
- elem_id?: string;
- elem_classes?: string[];
- components?: string[];
- server_fns?: string[];
- interactive: boolean;
- visible: boolean | "hidden";
- [key: string]: unknown;
- root_url?: string;
-}
-
-export interface Documentation {
- type?: TypeDescription;
- description?: TypeDescription;
- example_data?: string;
-}
-
-interface TypeDescription {
- input_payload?: string;
- response_object?: string;
- payload?: string;
-}
-
-export interface Dependency {
- id: number;
- targets: [number, string][];
- inputs: number[];
- outputs: number[];
- backend_fn: boolean;
- js: string | null;
- scroll_to_output: boolean;
- trigger: "click" | "load" | string;
- max_batch_size: number;
- show_progress: "full" | "minimal" | "hidden";
- show_progress_on: number[] | null;
- frontend_fn: ((...args: unknown[]) => Promise) | null;
- status?: string;
- queue: boolean | null;
- every: number | null;
- batch: boolean;
- api_name: string | null;
- cancels: number[];
- types: DependencyTypes;
- collects_event_data: boolean;
- pending_request?: boolean;
- trigger_after?: number;
- trigger_only_on_success?: boolean;
- trigger_only_on_failure?: boolean;
- trigger_mode: "once" | "multiple" | "always_last";
- final_event: Payload | null;
- api_visibility: "public" | "private" | "undocumented";
- rendered_in: number | null;
- render_id: number | null;
- connection: "stream" | "sse";
- time_limit: number;
- stream_every: number;
- like_user_message: boolean;
- event_specific_args: string[];
- component_prop_inputs: number[];
- js_implementation: string | null;
-}
-
-export interface DependencyTypes {
- generator: boolean;
- cancel: boolean;
-}
-
-export interface Payload {
- fn_index: number;
- data: unknown[];
- time?: Date;
- event_data?: unknown;
- trigger_id?: number | null;
-}
-
-export interface PostResponse {
- error?: string;
- [x: string]: any;
-}
-
-export interface UploadResponse {
- error?: string;
- files?: string[];
-}
-
-// Client and File Handling Types
-
-export interface DuplicateOptions extends ClientOptions {
- private?: boolean;
- hardware?: (typeof hardware_types)[number];
- timeout?: number;
-}
-
-export interface ClientOptions {
- token?: `hf_${string}`;
- status_callback?: SpaceStatusCallback | null;
- auth?: [string, string] | null;
- with_null_state?: boolean;
- events?: EventType[];
- headers?: Record | Headers;
- query_params?: Record;
- session_hash?: string;
- cookies?: string;
-}
-
-export interface FileData {
- name: string;
- orig_name?: string;
- size?: number;
- data: string;
- blob?: File;
- is_file?: boolean;
- mime_type?: string;
- alt_text?: string;
-}
-
-// Event and Listener Types
-
-export type EventType = "data" | "status" | "log" | "render";
-
-export interface EventMap {
- data: PayloadMessage;
- status: StatusMessage;
- log: LogMessage;
- render: RenderMessage;
-}
-
-export type GradioEvent = {
- [P in EventType]: EventMap[P];
-}[EventType];
-
-export interface Log {
- log: string;
- title: string;
- level: "warning" | "info" | "success" | "error";
-}
-export interface Render {
- data: {
- components: any[];
- layout: any;
- dependencies: Dependency[];
- render_id: number;
- };
-}
-
-export interface ValidationError {
- is_valid: boolean;
- message: string;
-}
-
-export interface Status {
- queue: boolean;
- code?: string;
- success?: boolean;
- stage: "pending" | "error" | "complete" | "generating" | "streaming";
- duration?: number;
- visible?: boolean;
- broken?: boolean;
- size?: number;
- position?: number;
- eta?: number;
- title?: string;
- message?: string | ValidationError[];
- progress_data?: {
- progress: number | null;
- index: number | null;
- length: number | null;
- unit: string | null;
- desc: string | null;
- }[];
- time?: Date;
- changed_state_ids?: number[];
- time_limit?: number;
- session_not_found?: boolean;
-}
-
-export interface StatusMessage extends Status {
- type: "status";
- endpoint: string;
- fn_index: number;
- original_msg?: string;
-}
-
-export interface PayloadMessage extends Payload {
- type: "data";
- endpoint: string;
- fn_index: number;
-}
-
-export interface LogMessage extends Log {
- type: "log";
- endpoint: string;
- fn_index: number;
- duration: number | null;
- visible: boolean;
-}
-
-export interface RenderMessage extends Render {
- type: "render";
- endpoint: string;
- fn_index: number;
-}
diff --git a/6.11.1/client/src/upload.ts b/6.11.1/client/src/upload.ts
deleted file mode 100644
index ecbe277e818890091f67b0a098f650c21f03af7b..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/upload.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-import type { Client } from "./client";
-import { filesize } from "./utils/filesize";
-export async function upload(
- this: Client,
- file_data: FileData[],
- root_url: string,
- upload_id?: string,
- max_file_size?: number
-): Promise<(FileData | null)[] | null> {
- let files = (Array.isArray(file_data) ? file_data : [file_data]).map(
- (file_data) => file_data.blob!
- );
-
- const oversized_files = files.filter(
- (f) => f.size > (max_file_size ?? Infinity)
- );
- if (oversized_files.length) {
- throw new Error(
- `File(s) exceed the maximum allowed size of ${filesize(max_file_size || Infinity)}: ${oversized_files
- .map((f) => `"${f.name}"`)
- .join(", ")}`
- );
- }
-
- return await Promise.all(
- await this.upload_files(root_url, files, upload_id).then(
- async (response: { files?: string[]; error?: string }) => {
- if (response.error) {
- throw new Error(response.error);
- } else {
- if (response.files) {
- return response.files.map((f, i) => {
- const file = new FileData({
- ...file_data[i],
- path: f,
- url: `${root_url}${this.api_prefix}/file=${f}`
- });
- return file;
- });
- }
-
- return [];
- }
- }
- )
- );
-}
-
-export async function prepare_files(
- files: File[],
- is_stream?: boolean
-): Promise {
- return files.map(
- (f) =>
- new FileData({
- path: f.name,
- orig_name: f.name,
- blob: f,
- size: f.size,
- mime_type: f.type,
- is_stream
- })
- );
-}
-
-export class FileData {
- path: string;
- url?: string;
- orig_name?: string;
- size?: number;
- blob?: File;
- is_stream?: boolean;
- mime_type?: string;
- alt_text?: string;
- b64?: string;
- readonly meta = { _type: "gradio.FileData" };
-
- constructor({
- path,
- url,
- orig_name,
- size,
- blob,
- is_stream,
- mime_type,
- alt_text,
- b64
- }: {
- path: string;
- url?: string;
- orig_name?: string;
- size?: number;
- blob?: File;
- is_stream?: boolean;
- mime_type?: string;
- alt_text?: string;
- b64?: string;
- }) {
- this.path = path;
- this.url = url;
- this.orig_name = orig_name;
- this.size = size;
- this.blob = url ? undefined : blob;
- this.is_stream = is_stream;
- this.mime_type = mime_type;
- this.alt_text = alt_text;
- this.b64 = b64;
- }
-}
diff --git a/6.11.1/client/src/utils/duplicate.ts b/6.11.1/client/src/utils/duplicate.ts
deleted file mode 100644
index e9142c3f731d666f481d6efa1c787dd110a50436..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/duplicate.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import {
- get_space_hardware,
- hardware_types,
- set_space_timeout
-} from "../helpers/spaces";
-import type { DuplicateOptions } from "../types";
-import { Client } from "../client";
-import { SPACE_METADATA_ERROR_MSG } from "../constants";
-import {
- get_cookie_header,
- parse_and_set_cookies
-} from "../helpers/init_helpers";
-import { process_endpoint } from "../helpers/api_info";
-
-export async function duplicate(
- app_reference: string,
- options: DuplicateOptions
-): Promise {
- const { token, private: _private, hardware, timeout, auth } = options;
-
- if (hardware && !hardware_types.includes(hardware)) {
- throw new Error(
- `Invalid hardware type provided. Valid types are: ${hardware_types
- .map((v) => `"${v}"`)
- .join(",")}.`
- );
- }
-
- const { http_protocol, host } = await process_endpoint(app_reference, token);
-
- let cookies: string[] | null = null;
-
- if (auth) {
- const cookie_header = await get_cookie_header(
- http_protocol,
- host,
- auth,
- fetch
- );
-
- if (cookie_header) cookies = parse_and_set_cookies(cookie_header);
- }
-
- const headers = {
- Authorization: `Bearer ${token}`,
- "Content-Type": "application/json",
- ...(cookies ? { Cookie: cookies.join("; ") } : {})
- };
-
- const user = (
- await (
- await fetch(`https://huggingface.co/api/whoami-v2`, {
- headers
- })
- ).json()
- ).name;
-
- const space_name = app_reference.split("/")[1];
- const body: {
- repository: string;
- private?: boolean;
- hardware?: string;
- } = {
- repository: `${user}/${space_name}`
- };
-
- if (_private) {
- body.private = true;
- }
-
- let original_hardware;
-
- try {
- if (!hardware) {
- original_hardware = await get_space_hardware(app_reference, token);
- }
- } catch (e) {
- throw Error(SPACE_METADATA_ERROR_MSG + (e as Error).message);
- }
-
- const requested_hardware = hardware || original_hardware || "cpu-basic";
-
- body.hardware = requested_hardware;
-
- try {
- const response = await fetch(
- `https://huggingface.co/api/spaces/${app_reference}/duplicate`,
- {
- method: "POST",
- headers,
- body: JSON.stringify(body)
- }
- );
-
- if (response.status === 409) {
- try {
- const client = await Client.connect(`${user}/${space_name}`, options);
- return client;
- } catch (error) {
- console.error("Failed to connect Client instance:", error);
- throw error;
- }
- } else if (response.status !== 200) {
- throw new Error(response.statusText);
- }
-
- const duplicated_space = await response.json();
-
- await set_space_timeout(`${user}/${space_name}`, timeout || 300, token);
-
- return await Client.connect(
- get_space_reference(duplicated_space.url),
- options
- );
- } catch (e: any) {
- throw new Error(e);
- }
-}
-
-function get_space_reference(url: string): any {
- const regex = /https:\/\/huggingface.co\/spaces\/([^/]+\/[^/]+)/;
- const match = url.match(regex);
- if (match) {
- return match[1];
- }
-}
diff --git a/6.11.1/client/src/utils/filesize.ts b/6.11.1/client/src/utils/filesize.ts
deleted file mode 100644
index 3e28e69a1bc9d3a5680d4d645d423f6944de867c..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/filesize.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-type SPEC = {
- readonly radix: number;
- readonly unit: string[];
-};
-
-const si = {
- radix: 1e3,
- unit: ["b", "kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"]
-};
-const iec = {
- radix: 1024,
- unit: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"]
-};
-const jedec = {
- radix: 1024,
- unit: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"]
-};
-
-export const SPECS: Record = {
- si,
- iec,
- jedec
-};
-
-/**
- * file size from https://github.com/hustcc/filesize.js
- * @param bytes - The number of bytes to convert to human-readable format
- * @param fixed - Number of decimal places to display (default: 1)
- * @param spec - Size specification to use: "si", "iec", or "jedec" (default: "jedec")
- * @returns Human-readable file size string
- */
-export function filesize(bytes: number, fixed = 1, spec = "jedec"): string {
- bytes = Math.abs(bytes);
- const { radix, unit } = SPECS[spec] || SPECS.jedec;
- let loop = 0;
- while (bytes >= radix) {
- bytes /= radix;
- ++loop;
- }
- return `${bytes.toFixed(fixed)} ${unit[loop]}`;
-}
diff --git a/6.11.1/client/src/utils/handle_blob.ts b/6.11.1/client/src/utils/handle_blob.ts
deleted file mode 100644
index 815a965d30d7d9b44060a9be98a2192ea96e8646..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/handle_blob.ts
+++ /dev/null
@@ -1,142 +0,0 @@
-import { update_object, walk_and_store_blobs } from "../helpers/data";
-import {
- Command,
- type ApiData,
- type EndpointInfo,
- type JsApiData
-} from "../types";
-import { FileData } from "../upload";
-import type { Client } from "..";
-import {
- FILE_PROCESSING_ERROR_MSG,
- NODEJS_FS_ERROR_MSG,
- ROOT_URL_ERROR_MSG
-} from "../constants";
-
-export async function handle_blob(
- this: Client,
- endpoint: string,
- data: unknown[],
- api_info: EndpointInfo
-): Promise {
- const self = this;
-
- await process_local_file_commands(self, data);
-
- const blobRefs = await walk_and_store_blobs(
- data,
- undefined,
- [],
- true,
- api_info
- );
-
- const results = await Promise.all(
- blobRefs.map(async ({ path, blob, type }) => {
- if (!blob) return { path, type };
-
- const response = await self.upload_files(endpoint, [blob]);
- const file_url = response.files && response.files[0];
- return {
- path,
- file_url,
- type,
- name:
- typeof File !== "undefined" && blob instanceof File
- ? blob?.name
- : undefined
- };
- })
- );
-
- results.forEach(({ path, file_url, type, name }) => {
- if (type === "Gallery") {
- update_object(data, file_url, path);
- } else if (file_url) {
- const file = new FileData({ path: file_url, orig_name: name });
- update_object(data, file, path);
- }
- });
-
- return data;
-}
-
-export async function process_local_file_commands(
- client: Client,
- data: unknown[]
-): Promise {
- const root = client.config?.root || client.config?.root_url;
-
- if (!root) {
- throw new Error(ROOT_URL_ERROR_MSG);
- }
-
- await recursively_process_commands(client, data);
-}
-
-async function recursively_process_commands(
- client: Client,
- data: any,
- path: string[] = []
-): Promise {
- for (const key in data) {
- if (data[key] instanceof Command) {
- await process_single_command(client, data, key);
- } else if (typeof data[key] === "object" && data[key] !== null) {
- await recursively_process_commands(client, data[key], [...path, key]);
- }
- }
-}
-
-async function process_single_command(
- client: Client,
- data: any,
- key: string
-): Promise {
- let cmd_item = data[key] as Command;
- const root = client.config?.root || client.config?.root_url;
-
- if (!root) {
- throw new Error(ROOT_URL_ERROR_MSG);
- }
-
- try {
- let fileBuffer: Buffer;
- let fullPath: string;
-
- // check if running in a Node.js environment
- if (
- typeof process !== "undefined" &&
- process.versions &&
- process.versions.node
- ) {
- const fs = await import("fs/promises");
- const path = await import("path");
-
- fullPath = path.resolve(process.cwd(), cmd_item.meta.path);
- fileBuffer = await fs.readFile(fullPath); // Read file from disk
- } else {
- throw new Error(NODEJS_FS_ERROR_MSG);
- }
-
- const file = new Blob([fileBuffer as any], {
- type: "application/octet-stream"
- });
-
- const response = await client.upload_files(root, [file]);
-
- const file_url = response.files && response.files[0];
-
- if (file_url) {
- const fileData = new FileData({
- path: file_url,
- orig_name: cmd_item.meta.name || ""
- });
-
- // replace the command object with the fileData object
- data[key] = fileData;
- }
- } catch (error) {
- console.error(FILE_PROCESSING_ERROR_MSG, error);
- }
-}
diff --git a/6.11.1/client/src/utils/post_data.ts b/6.11.1/client/src/utils/post_data.ts
deleted file mode 100644
index 41be6d2778b28471a75a9b3e3b7a621df3d19757..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/post_data.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { BROKEN_CONNECTION_MSG } from "../constants";
-import type { PostResponse } from "../types";
-import { Client } from "..";
-
-export async function post_data(
- this: Client,
- url: string,
- body: unknown,
- additional_headers?: any
-): Promise<[PostResponse, number]> {
- const headers: {
- Authorization?: string;
- "Content-Type": "application/json";
- } = { "Content-Type": "application/json" };
- if (this.options.token) {
- headers.Authorization = `Bearer ${this.options.token}`;
- }
- try {
- var response = await this.fetch(url, {
- method: "POST",
- body: JSON.stringify(body),
- headers: { ...headers, ...additional_headers },
- credentials: "include"
- });
- } catch (e) {
- return [{ error: BROKEN_CONNECTION_MSG }, 500];
- }
- let output: PostResponse;
- let status: number;
- try {
- output = await response.json();
- status = response.status;
- } catch (e) {
- output = { error: `Could not parse server response: ${e}` };
- status = 500;
- }
- return [output, status];
-}
diff --git a/6.11.1/client/src/utils/predict.ts b/6.11.1/client/src/utils/predict.ts
deleted file mode 100644
index 69013692be0300904374c7130566c16adb74150c..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/predict.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Client } from "../client";
-import type { Dependency, PredictReturn } from "../types";
-
-export async function predict(
- this: Client,
- endpoint: string | number,
- data: unknown[] | Record = {}
-): Promise> {
- let data_returned = false;
- let status_complete = false;
- let dependency: Dependency;
-
- if (!this.config) {
- throw new Error("Could not resolve app config");
- }
-
- if (typeof endpoint === "number") {
- dependency = this.config.dependencies.find((dep) => dep.id == endpoint)!;
- } else {
- const trimmed_endpoint = endpoint.replace(/^\//, "");
- dependency = this.config.dependencies.find(
- (dep) => dep.id == this.api_map[trimmed_endpoint]
- )!;
- }
-
- return new Promise(async (resolve, reject) => {
- const app = this.submit(endpoint, data, null, null, true);
- let result: unknown;
-
- for await (const message of app) {
- if (message.type === "data") {
- if (status_complete) {
- resolve(result as PredictReturn);
- }
- data_returned = true;
- result = message;
- }
-
- if (message.type === "status") {
- if (message.stage === "error") reject(message);
- if (message.stage === "complete") {
- status_complete = true;
- // if complete message comes after data, resolve here
- if (data_returned) {
- resolve(result as PredictReturn);
- }
- }
- }
- }
- });
-}
diff --git a/6.11.1/client/src/utils/stream.ts b/6.11.1/client/src/utils/stream.ts
deleted file mode 100644
index d5f24466c729c0d45c38d41472785e64d9ffa720..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/stream.ts
+++ /dev/null
@@ -1,229 +0,0 @@
-import { BROKEN_CONNECTION_MSG, SSE_URL } from "../constants";
-import type { Client } from "../client";
-import { stream } from "fetch-event-stream";
-
-export async function open_stream(this: Client): Promise {
- let {
- event_callbacks,
- unclosed_events,
- pending_stream_messages,
- stream_status,
- config,
- jwt
- } = this;
-
- const that = this;
-
- if (!config) {
- throw new Error("Could not resolve app config");
- }
-
- stream_status.open = true;
-
- let stream: EventSource | null = null;
- let params = new URLSearchParams({
- session_hash: this.session_hash
- }).toString();
-
- let url = new URL(`${config.root}${this.api_prefix}/${SSE_URL}?${params}`);
-
- if (jwt) {
- url.searchParams.set("__sign", jwt);
- }
-
- stream = this.stream(url);
-
- if (!stream) {
- console.warn("Cannot connect to SSE endpoint: " + url.toString());
- return;
- }
-
- stream.onmessage = async function (event: MessageEvent) {
- let _data = JSON.parse(event.data);
- if (_data.msg === "close_stream") {
- close_stream(stream_status, that.abort_controller);
- return;
- }
- const event_id = _data.event_id;
- if (!event_id) {
- await Promise.all(
- Object.keys(event_callbacks).map((event_id) =>
- event_callbacks[event_id](_data)
- )
- );
- } else if (event_callbacks[event_id] && config) {
- if (
- _data.msg === "process_completed" &&
- ["sse", "sse_v1", "sse_v2", "sse_v2.1", "sse_v3"].includes(
- config.protocol
- )
- ) {
- unclosed_events.delete(event_id);
- }
- let fn: (data: any) => void = event_callbacks[event_id];
-
- if (typeof window !== "undefined" && typeof document !== "undefined") {
- // fn(_data); // need to do this to put the event on the end of the event loop, so the browser can refresh between callbacks and not freeze in case of quick generations. See
- setTimeout(fn, 0, _data); // need to do this to put the event on the end of the event loop, so the browser can refresh between callbacks and not freeze in case of quick generations. See https://github.com/gradio-app/gradio/pull/7055
- } else {
- fn(_data);
- }
- } else {
- if (!pending_stream_messages[event_id]) {
- pending_stream_messages[event_id] = [];
- }
- pending_stream_messages[event_id].push(_data);
- }
- };
- stream.onerror = async function (e) {
- console.error(e);
- await Promise.all(
- Object.keys(event_callbacks).map((event_id) =>
- event_callbacks[event_id]({
- msg: "broken_connection",
- message: BROKEN_CONNECTION_MSG
- })
- )
- );
- };
-}
-
-export function close_stream(
- stream_status: { open: boolean },
- abort_controller: AbortController | null
-): void {
- if (stream_status) {
- stream_status.open = false;
- abort_controller?.abort();
- }
-}
-
-export function apply_diff_stream(
- pending_diff_streams: Record,
- event_id: string,
- data: any
-): void {
- let is_first_generation = !pending_diff_streams[event_id];
- if (is_first_generation) {
- pending_diff_streams[event_id] = [];
- data.data.forEach((value: any, i: number) => {
- pending_diff_streams[event_id][i] = value;
- });
- } else {
- data.data.forEach((value: any, i: number) => {
- let new_data = apply_diff(pending_diff_streams[event_id][i], value);
- pending_diff_streams[event_id][i] = new_data;
- data.data[i] = new_data;
- });
- }
-}
-
-export function apply_diff(
- obj: any,
- diff: [string, (number | string)[], any][]
-): any {
- diff.forEach(([action, path, value]) => {
- obj = apply_edit(obj, path, action, value);
- });
-
- return obj;
-}
-
-function apply_edit(
- target: any,
- path: (number | string)[],
- action: string,
- value: any
-): any {
- if (path.length === 0) {
- if (action === "replace") {
- return value;
- } else if (action === "append") {
- return target + value;
- }
- throw new Error(`Unsupported action: ${action}`);
- }
-
- let current = target;
- for (let i = 0; i < path.length - 1; i++) {
- current = current[path[i]];
- }
-
- const last_path = path[path.length - 1];
- switch (action) {
- case "replace":
- current[last_path] = value;
- break;
- case "append":
- current[last_path] += value;
- break;
- case "add":
- if (Array.isArray(current)) {
- current.splice(Number(last_path), 0, value);
- } else {
- current[last_path] = value;
- }
- break;
- case "delete":
- if (Array.isArray(current)) {
- current.splice(Number(last_path), 1);
- } else {
- delete current[last_path];
- }
- break;
- default:
- throw new Error(`Unknown action: ${action}`);
- }
- return target;
-}
-
-export function readable_stream(
- input: RequestInfo | URL,
- init: RequestInit = {}
-): EventSource {
- const instance: EventSource & { readyState: number } = {
- close: () => {
- console.warn("Method not implemented.");
- },
- onerror: null,
- onmessage: null,
- onopen: null,
- readyState: 0,
- url: input.toString(),
- withCredentials: false,
- CONNECTING: 0,
- OPEN: 1,
- CLOSED: 2,
- addEventListener: () => {
- throw new Error("Method not implemented.");
- },
- dispatchEvent: () => {
- throw new Error("Method not implemented.");
- },
- removeEventListener: () => {
- throw new Error("Method not implemented.");
- }
- };
-
- stream(input, init)
- .then(async (res) => {
- instance.readyState = instance.OPEN;
- try {
- for await (const chunk of res) {
- //@ts-ignore
- instance.onmessage && instance.onmessage(chunk);
- }
- instance.readyState = instance.CLOSED;
- } catch (e) {
- instance.onerror && instance.onerror(e as Event);
- instance.readyState = instance.CLOSED;
- }
- })
- .catch((e) => {
- console.error(e);
- instance.onerror && instance.onerror(e as Event);
- instance.readyState = instance.CLOSED;
- });
-
- return instance as EventSource;
-}
diff --git a/6.11.1/client/src/utils/submit.ts b/6.11.1/client/src/utils/submit.ts
deleted file mode 100644
index 5694837c7380060a686416a0be491debe405b692..0000000000000000000000000000000000000000
--- a/6.11.1/client/src/utils/submit.ts
+++ /dev/null
@@ -1,756 +0,0 @@
-/* eslint-disable complexity */
-import type {
- Status,
- Payload,
- GradioEvent,
- JsApiData,
- EndpointInfo,
- ApiInfo,
- Config,
- Dependency,
- SubmitIterable
-} from "../types";
-
-import { skip_queue, post_message, handle_payload } from "../helpers/data";
-import {
- handle_message,
- map_data_to_params,
- process_endpoint
-} from "../helpers/api_info";
-import {
- BROKEN_CONNECTION_MSG,
- QUEUE_FULL_MSG,
- SSE_URL,
- SSE_DATA_URL,
- RESET_URL,
- CANCEL_URL
-} from "../constants";
-import { apply_diff_stream, close_stream } from "./stream";
-import { Client } from "../client";
-
-export function submit(
- this: Client,
- endpoint: string | number,
- data: unknown[] | Record = {},
- event_data?: unknown,
- trigger_id?: number | null,
- all_events?: boolean,
- additional_headers?: Record
-): SubmitIterable {
- try {
- const { token } = this.options;
- const {
- fetch,
- app_reference,
- config,
- session_hash,
- api_info,
- api_map,
- stream_status,
- pending_stream_messages,
- pending_diff_streams,
- event_callbacks,
- unclosed_events,
- post_data,
- options,
- api_prefix
- } = this;
-
- const addt_headers = additional_headers || { "x-gradio-user": "api" };
-
- const that = this;
-
- if (!api_info) throw new Error("No API found");
- if (!config) throw new Error("Could not resolve app config");
-
- let { fn_index, endpoint_info, dependency } = get_endpoint_info(
- api_info,
- endpoint,
- api_map,
- config
- );
-
- let resolved_data = map_data_to_params(data, endpoint_info);
-
- let stream: EventSource | null;
- let protocol = config.protocol ?? "ws";
- if (protocol === "ws") {
- throw new Error("WebSocket protocol is not supported in this version");
- }
- let event_id_final = "";
- let event_id_cb: () => string = () => event_id_final;
-
- const _endpoint = typeof endpoint === "number" ? "/predict" : endpoint;
- let payload: Payload;
- let event_id: string | null = null;
- let complete: Status | undefined | false = false;
- let last_status: Record = {};
- let url_params =
- typeof window !== "undefined" && typeof document !== "undefined"
- ? new URLSearchParams(window.location.search).toString()
- : "";
-
- const events_to_publish =
- options?.events?.reduce(
- (acc, event) => {
- acc[event] = true;
- return acc;
- },
- {} as Record
- ) || {};
-
- // event subscription methods
- function fire_event(event: GradioEvent): void {
- if (all_events || events_to_publish[event.type]) {
- push_event(event);
- }
- }
-
- async function cancel(): Promise {
- let reset_request = {};
- let cancel_request = {};
- reset_request = { event_id };
- cancel_request = { event_id, session_hash, fn_index };
-
- try {
- if (!config) {
- throw new Error("Could not resolve app config");
- }
-
- if ("event_id" in cancel_request) {
- await fetch(`${config.root}${api_prefix}/${CANCEL_URL}`, {
- headers: { "Content-Type": "application/json" },
- method: "POST",
- body: JSON.stringify(cancel_request)
- });
- }
-
- await fetch(`${config.root}${api_prefix}/${RESET_URL}`, {
- headers: { "Content-Type": "application/json" },
- method: "POST",
- body: JSON.stringify(reset_request)
- });
- } catch (e) {
- console.warn(
- "The `/reset` endpoint could not be called. Subsequent endpoint results may be unreliable."
- );
- }
- }
-
- const resolve_heartbeat = async (config: Config): Promise => {
- await this._resolve_heartbeat(config);
- };
-
- async function handle_render_config(render_config: any): Promise {
- if (!config) return;
- let render_id: number = render_config.render_id;
- config.components = [
- ...config.components.filter((c) => c.props.rendered_in !== render_id),
- ...render_config.components
- ];
- config.dependencies = [
- ...config.dependencies.filter((d) => d.rendered_in !== render_id),
- ...render_config.dependencies
- ];
- const any_state = config.components.some((c) => c.type === "state");
- const any_unload = config.dependencies.some((d) =>
- d.targets.some((t) => t[1] === "unload")
- );
- config.connect_heartbeat = any_state || any_unload;
- await resolve_heartbeat(config);
- fire_event({
- type: "render",
- data: render_config,
- endpoint: _endpoint,
- fn_index
- });
- }
-
- const job = this.handle_blob(
- config.root,
- resolved_data,
- endpoint_info
- ).then(async (_payload) => {
- let input_data = handle_payload(
- _payload,
- dependency,
- config.components,
- "input",
- true
- );
- payload = {
- data: input_data || [],
- event_data,
- fn_index,
- trigger_id
- };
- if (skip_queue(fn_index, config)) {
- fire_event({
- type: "status",
- endpoint: _endpoint,
- stage: "pending",
- queue: false,
- fn_index,
- time: new Date()
- });
-
- post_data(
- `${config.root}${api_prefix}/run${
- _endpoint.startsWith("/") ? _endpoint : `/${_endpoint}`
- }${url_params ? "?" + url_params : ""}`,
- {
- ...payload,
- session_hash
- },
- addt_headers
- )
- .then(async ([output, status_code]: any) => {
- const data = output.data;
-
- if (status_code == 200) {
- fire_event({
- type: "data",
- endpoint: _endpoint,
- fn_index,
- data: handle_payload(
- data,
- dependency,
- config.components,
- "output",
- options.with_null_state
- ),
- time: new Date(),
- event_data,
- trigger_id
- });
- if (output.render_config) {
- await handle_render_config(output.render_config);
- }
-
- fire_event({
- type: "status",
- endpoint: _endpoint,
- fn_index,
- stage: "complete",
- eta: output.average_duration,
- queue: false,
- time: new Date()
- });
- } else {
- const is_connection_error =
- output?.error === BROKEN_CONNECTION_MSG;
- fire_event({
- type: "status",
- stage: "error",
- endpoint: _endpoint,
- fn_index,
- message: output.error,
- broken: is_connection_error,
- queue: false,
- time: new Date()
- });
- }
- })
- .catch((e) => {
- fire_event({
- type: "status",
- stage: "error",
- message: e.message,
- endpoint: _endpoint,
- fn_index,
- queue: false,
- time: new Date()
- });
- });
- } else if (protocol == "sse") {
- fire_event({
- type: "status",
- stage: "pending",
- queue: true,
- endpoint: _endpoint,
- fn_index,
- time: new Date()
- });
- var params = new URLSearchParams({
- fn_index: fn_index.toString(),
- session_hash: session_hash
- }).toString();
- let url = new URL(
- `${config.root}${api_prefix}/${SSE_URL}?${
- url_params ? url_params + "&" : ""
- }${params}`
- );
-
- if (this.jwt) {
- url.searchParams.set("__sign", this.jwt);
- }
-
- stream = this.stream(url);
-
- if (!stream) {
- return Promise.reject(
- new Error("Cannot connect to SSE endpoint: " + url.toString())
- );
- }
-
- stream.onmessage = async function (event: MessageEvent) {
- const _data = JSON.parse(event.data);
- const { type, status, data } = handle_message(
- _data,
- last_status[fn_index]
- );
-
- if (type === "update" && status && !complete) {
- // call 'status' listeners
- fire_event({
- type: "status",
- endpoint: _endpoint,
- fn_index,
- time: new Date(),
- ...status
- });
- if (status.stage === "error") {
- stream?.close();
- close();
- }
- } else if (type === "data") {
- let [_, status] = await post_data(
- `${config.root}${api_prefix}/queue/data`,
- {
- ...payload,
- session_hash,
- event_id
- }
- );
- if (status !== 200) {
- fire_event({
- type: "status",
- stage: "error",
- message: BROKEN_CONNECTION_MSG,
- queue: true,
- endpoint: _endpoint,
- fn_index,
- time: new Date()
- });
- stream?.close();
- close();
- }
- } else if (type === "complete") {
- complete = status;
- } else if (type === "log") {
- fire_event({
- type: "log",
- title: data.title,
- log: data.log,
- level: data.level,
- endpoint: _endpoint,
- duration: data.duration,
- visible: data.visible,
- fn_index
- });
- } else if (type === "generating" || type === "streaming") {
- fire_event({
- type: "status",
- time: new Date(),
- ...status,
- stage: status?.stage!,
- queue: true,
- endpoint: _endpoint,
- fn_index
- });
- }
- if (data) {
- fire_event({
- type: "data",
- time: new Date(),
- data: handle_payload(
- data.data,
- dependency,
- config.components,
- "output",
- options.with_null_state
- ),
- endpoint: _endpoint,
- fn_index,
- event_data,
- trigger_id
- });
-
- if (complete) {
- fire_event({
- type: "status",
- time: new Date(),
- ...complete,
- stage: status?.stage!,
- queue: true,
- endpoint: _endpoint,
- fn_index
- });
- stream?.close();
- close();
- }
- }
- };
- } else if (
- protocol == "sse_v1" ||
- protocol == "sse_v2" ||
- protocol == "sse_v2.1" ||
- protocol == "sse_v3"
- ) {
- // latest API format. v2 introduces sending diffs for intermediate outputs in generative functions, which makes payloads lighter.
- // v3 only closes the stream when the backend sends the close stream message.
- fire_event({
- type: "status",
- stage: "pending",
- queue: true,
- endpoint: _endpoint,
- fn_index,
- time: new Date()
- });
- let hostname = "";
- if (typeof window !== "undefined" && typeof document !== "undefined") {
- hostname = window?.location?.hostname;
- }
-
- let hfhubdev = "dev.spaces.huggingface.tech";
- const origin = hostname.includes(".dev.")
- ? `https://moon-${hostname.split(".")[1]}.${hfhubdev}`
- : `https://huggingface.co`;
-
- const is_zerogpu_iframe =
- typeof window !== "undefined" &&
- typeof document !== "undefined" &&
- window.parent != window &&
- window.supports_zerogpu_headers;
- const zerogpu_auth_promise = is_zerogpu_iframe
- ? post_message