@camstack/addon-model-studio 1.1.241 → 1.1.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_stub.js +746 -726
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-_r2CR4tX.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-N799yFeM.mjs} +3 -3
- package/dist/{hostInit-0MiGrwyj.mjs → hostInit-Cnqc1a9I.mjs} +2 -2
- package/dist/model-studio.addon.js +1 -0
- package/dist/model-studio.addon.mjs +1 -0
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CDiC1cBI.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DdhL5wd4.mjs} +1 -1
- package/package.json +1 -1
package/dist/_stub.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./virtualExposes-CWSi4E_g.mjs";
|
|
2
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-
|
|
2
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DdhL5wd4.mjs";
|
|
3
3
|
import { _ as e, b as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, p as d, r as f, t as p, u as m, v as h } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-CHL8loOl.mjs";
|
|
4
4
|
import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, i as C, l as w, m as T, o as E, p as D, r as O, s as k, t as ee, u as A, v as te, y as j } from "./responsive-DI5osE9O.mjs";
|
|
5
5
|
import { d as ne, l as re, u as M } from "./scene-monitor-copy-SE_x3tUF.mjs";
|
|
@@ -6887,37 +6887,39 @@ function Ps() {
|
|
|
6887
6887
|
if (!e) throw Error("Tabs compound components must be used within <Tabs>");
|
|
6888
6888
|
return e;
|
|
6889
6889
|
}
|
|
6890
|
-
function Fs({ value: e, onValueChange: t, defaultValue: r = "",
|
|
6891
|
-
let [
|
|
6892
|
-
t?.(n), e === void 0 &&
|
|
6890
|
+
function Fs({ value: e, onValueChange: t, defaultValue: r = "", appearance: i = "underline", className: o, ...s }) {
|
|
6891
|
+
let [c, l] = a(r), u = e ?? c, d = n((n) => {
|
|
6892
|
+
t?.(n), e === void 0 && l(n);
|
|
6893
6893
|
}, [e, t]);
|
|
6894
6894
|
return /* @__PURE__ */ z(Ns.Provider, {
|
|
6895
6895
|
value: {
|
|
6896
|
-
value:
|
|
6897
|
-
setValue:
|
|
6896
|
+
value: u,
|
|
6897
|
+
setValue: d,
|
|
6898
|
+
appearance: i
|
|
6898
6899
|
},
|
|
6899
6900
|
children: /* @__PURE__ */ z("div", {
|
|
6900
|
-
className:
|
|
6901
|
-
...
|
|
6901
|
+
className: o,
|
|
6902
|
+
...s
|
|
6902
6903
|
})
|
|
6903
6904
|
});
|
|
6904
6905
|
}
|
|
6905
6906
|
function Is({ className: e, ...t }) {
|
|
6907
|
+
let { appearance: n } = Ps();
|
|
6906
6908
|
return /* @__PURE__ */ z("div", {
|
|
6907
6909
|
role: "tablist",
|
|
6908
|
-
className: G("flex flex-row overflow-x-auto overflow-y-hidden border-b border-border-subtle", e),
|
|
6910
|
+
className: G("flex flex-row overflow-x-auto overflow-y-hidden", n === "pills" ? "gap-1 border-b border-border-subtle py-1" : "border-b border-border-subtle", e),
|
|
6909
6911
|
...t
|
|
6910
6912
|
});
|
|
6911
6913
|
}
|
|
6912
6914
|
function Ls({ value: e, className: t, ...n }) {
|
|
6913
|
-
let { value: r, setValue: i } = Ps(),
|
|
6915
|
+
let { value: r, setValue: i, appearance: a } = Ps(), o = e === r;
|
|
6914
6916
|
return /* @__PURE__ */ z("button", {
|
|
6915
6917
|
type: "button",
|
|
6916
6918
|
role: "tab",
|
|
6917
|
-
"aria-selected":
|
|
6919
|
+
"aria-selected": o,
|
|
6918
6920
|
"aria-controls": `tabpanel-${e}`,
|
|
6919
|
-
tabIndex:
|
|
6920
|
-
className: G("h-7 shrink-0 whitespace-nowrap text-xs px-3 transition-colors", a ? "border-b-2 border-primary text-foreground font-medium" : "text-foreground-muted hover:text-foreground", t),
|
|
6921
|
+
tabIndex: o ? 0 : -1,
|
|
6922
|
+
className: G("h-7 shrink-0 whitespace-nowrap text-xs px-3 transition-colors", a === "pills" ? o ? "rounded-md bg-primary/10 font-medium text-primary" : "rounded-md text-foreground-muted hover:bg-surface-hover hover:text-foreground" : o ? "border-b-2 border-primary text-foreground font-medium" : "text-foreground-muted hover:text-foreground", t),
|
|
6921
6923
|
onClick: () => i(e),
|
|
6922
6924
|
...n
|
|
6923
6925
|
});
|
|
@@ -19102,28 +19104,46 @@ function Qx({ start: e, end: t, className: n, testId: r }) {
|
|
|
19102
19104
|
//#endregion
|
|
19103
19105
|
//#region ../ui-library/src/hooks/use-url-query.ts
|
|
19104
19106
|
t();
|
|
19105
|
-
|
|
19107
|
+
var $x = "camstack:url-query";
|
|
19108
|
+
function eS(e) {
|
|
19106
19109
|
return new URLSearchParams(window.location.search).get(e);
|
|
19107
19110
|
}
|
|
19108
|
-
function
|
|
19111
|
+
function tS() {
|
|
19112
|
+
window.dispatchEvent(new Event($x));
|
|
19113
|
+
}
|
|
19114
|
+
function nS(e, t) {
|
|
19109
19115
|
let n = new URLSearchParams(window.location.search);
|
|
19110
19116
|
t === null || t === "" ? n.delete(e) : n.set(e, t);
|
|
19111
19117
|
let r = n.toString(), i = r ? `${window.location.pathname}?${r}` : window.location.pathname;
|
|
19112
19118
|
window.history.replaceState(null, "", i);
|
|
19113
19119
|
}
|
|
19114
|
-
|
|
19115
|
-
|
|
19120
|
+
var rS = !1;
|
|
19121
|
+
function iS() {
|
|
19122
|
+
if (rS || typeof window > "u") return;
|
|
19123
|
+
rS = !0;
|
|
19124
|
+
let e = window.history.replaceState.bind(window.history), t = window.history.pushState.bind(window.history);
|
|
19125
|
+
window.history.replaceState = (...t) => {
|
|
19126
|
+
e(...t), tS();
|
|
19127
|
+
}, window.history.pushState = (...e) => {
|
|
19128
|
+
t(...e), tS();
|
|
19129
|
+
};
|
|
19130
|
+
}
|
|
19131
|
+
function aS(e) {
|
|
19132
|
+
iS();
|
|
19133
|
+
let [t, r] = a(() => eS(e));
|
|
19116
19134
|
return m(() => {
|
|
19117
|
-
let t = () => r(
|
|
19118
|
-
return window.addEventListener("popstate", t),
|
|
19135
|
+
let t = () => r(eS(e));
|
|
19136
|
+
return window.addEventListener("popstate", t), window.addEventListener($x, t), () => {
|
|
19137
|
+
window.removeEventListener("popstate", t), window.removeEventListener($x, t);
|
|
19138
|
+
};
|
|
19119
19139
|
}, [e]), [t, n((t) => {
|
|
19120
|
-
|
|
19140
|
+
nS(e, t), r(t);
|
|
19121
19141
|
}, [e])];
|
|
19122
19142
|
}
|
|
19123
19143
|
//#endregion
|
|
19124
19144
|
//#region ../ui-library/src/composites/step-inspector/step-inspector-panel.tsx
|
|
19125
19145
|
t(), t(), t(), G(C, "min-w-0 max-w-full gap-1.5 py-1 pl-1 pr-2.5 text-xs font-normal", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40"), G(O, "font-medium"), t(), t(), t(), t(), t();
|
|
19126
|
-
function
|
|
19146
|
+
function oS({ dirtyCount: e, saving: t, status: n, error: r, onSave: i, onDiscard: a, scope: o }) {
|
|
19127
19147
|
let s = e > 0, c = t ? "Saving…" : s ? `${e} unsaved change${e === 1 ? "" : "s"}` : n === "saved" ? "Saved" : n === "error" ? r ?? "Save failed" : "No unsaved changes";
|
|
19128
19148
|
return /* @__PURE__ */ B("footer", {
|
|
19129
19149
|
className: "shrink-0 space-y-2 border-t border-border bg-surface px-4 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] md:pb-2",
|
|
@@ -19194,13 +19214,13 @@ f(function({ title: e, subtitle: t, headerActions: n, headerExtra: i, leading: a
|
|
|
19194
19214
|
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-3",
|
|
19195
19215
|
children: c
|
|
19196
19216
|
}),
|
|
19197
|
-
o !== void 0 && /* @__PURE__ */ z(
|
|
19217
|
+
o !== void 0 && /* @__PURE__ */ z(oS, { ...o })
|
|
19198
19218
|
]
|
|
19199
19219
|
});
|
|
19200
19220
|
}), t(), t(), t(), t(), t(), t(), t(), t(), j("camstack:zone-editing", null), t(), t(), t(), t(), t(), s(() => import("./MaskShapeCanvas-DBaZffFb.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), s(() => import("./MotionZonesSettings-D034u7f9.mjs").then((e) => ({ default: e.MotionZonesSettings }))), s(() => import("./SceneMonitorEditor-KRSGEVkl.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), s(() => import("./PrivacyMaskSettings-Bh8sccz7.mjs").then((e) => ({ default: e.PrivacyMaskSettings })));
|
|
19201
19221
|
//#endregion
|
|
19202
19222
|
//#region src/scrypted/scrypted-yolo-manifest-data.json
|
|
19203
|
-
var rS = /*#__PURE__*/ JSON.parse("[{\"id\":\"scrypted-yolov9t-relu-coreml\",\"label\":\"Scrypted YOLOv9T ReLU CoreML\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9t_relu/scrypted_yolov9t_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"0a8733949d77e3204dba6418e81a11a8cc177015711457ce2c171266f23382d6\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu/scrypted_yolov9t_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322229,\"sha256\":\"f5a62f196f1e72a84efa1637119dffb6501621af9cf6f867bc76b4b59c9242a0\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu/scrypted_yolov9t_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":3797160,\"sha256\":\"b994419b8b68cfd6b89c3c6f3fe6b37458c86cc1d87fcca3df5034476a99dd38\"}],\"sizeMB\":4.12},{\"id\":\"scrypted-yolov9t-relu-onnx\",\"label\":\"Scrypted YOLOv9T ReLU ONNX\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9t_relu/scrypted_yolov9t_relu.onnx\",\"size\":8499266,\"sha256\":\"3f11ea2071b27c285b58c16636a44d6a0a27bdd1ca8b64112dfadabd39cfea47\"}],\"sizeMB\":8.5},{\"id\":\"scrypted-yolov9t-relu-test-coreml\",\"label\":\"Scrypted YOLOv9T ReLU test CoreML\",\"family\":\"yolov9t\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"a5e0128b643f1a66f3e07d4b332f9ccbca97ccab75651c794f0b9f1fb41c8491\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322229,\"sha256\":\"79f4f647f2a0c79db3b560c84251b48c7ba7cbe9c1fecc9674d1a603a389dfa3\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":3797160,\"sha256\":\"72efc9dc6af9241b5e5ee7de24a4f55741f6425d0e279d797f0f223e3d355f84\"}],\"sizeMB\":4.12},{\"id\":\"scrypted-yolov9t-relu-test-onnx\",\"label\":\"Scrypted YOLOv9T ReLU test ONNX\",\"family\":\"yolov9t\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.onnx\",\"size\":8499266,\"sha256\":\"d20aa0e6923a3af7f5e84e3a6d28fb00e8ecd592e3225f986f93bd34b634e2f8\"}],\"sizeMB\":8.5},{\"id\":\"scrypted-yolov9s-relu-coreml\",\"label\":\"Scrypted YOLOv9S ReLU CoreML\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9s_relu/scrypted_yolov9s_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"3bcdb820b82f1e89266f2d11bae1604d3ee4ca6d11dc5bd5c57055ff4157e9f3\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu/scrypted_yolov9s_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322664,\"sha256\":\"9a9c3c9cbca406ec2f0418ec867ed6b878ec6d02c16636d30e0bbd83d2ff7c40\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu/scrypted_yolov9s_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":14190120,\"sha256\":\"fd51eda58a993997268f6a2e424b536ba173207ad7974ab8bee2a8ff76d52dab\"}],\"sizeMB\":14.51},{\"id\":\"scrypted-yolov9s-relu-onnx\",\"label\":\"Scrypted YOLOv9S ReLU ONNX\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9s_relu/scrypted_yolov9s_relu.onnx\",\"size\":29287339,\"sha256\":\"ca0b5bd98d5f59eb2029c6cb5129d53af59873f62a317a028beda463bbb96399\"}],\"sizeMB\":29.29},{\"id\":\"scrypted-yolov9s-relu-test-coreml\",\"label\":\"Scrypted YOLOv9S ReLU test CoreML\",\"family\":\"yolov9s\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"e2d24de0ce7e8573f19572029765e55abc714f36a85175ad7fcb95c001a76653\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322664,\"sha256\":\"186b147cdfd15c5ed7a381ec3a426a22cee0b5c52d56f14efd26da06357f5cb0\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":14190120,\"sha256\":\"e50651924c2cbffd56008a8953569e66c3de69f21807fcf7d825390ce30f21f8\"}],\"sizeMB\":14.51},{\"id\":\"scrypted-yolov9s-relu-test-onnx\",\"label\":\"Scrypted YOLOv9S ReLU test ONNX\",\"family\":\"yolov9s\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.onnx\",\"size\":29287339,\"sha256\":\"115ddb83333762a0f2599421335678696454a5c3571ade5df9bac8e9cb5fb4cf\"}],\"sizeMB\":29.29},{\"id\":\"scrypted-yolov9m-relu-coreml\",\"label\":\"Scrypted YOLOv9M ReLU CoreML\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9m_relu/scrypted_yolov9m_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"c548c6e1ff768b2b01bd71e230aa712a1635ae2baa30e0369557a42fc531ecbf\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu/scrypted_yolov9m_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":247061,\"sha256\":\"1c40e02fc2a2559cb906ea6cd9da9c730d4a78f5019290cbb38d2fcaae379fe7\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu/scrypted_yolov9m_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":39880616,\"sha256\":\"4cf938e5bfcc3ee1644813e4eb4702a7de450cc0581df94c719cf43d0ed2e408\"}],\"sizeMB\":40.13},{\"id\":\"scrypted-yolov9m-relu-onnx\",\"label\":\"Scrypted YOLOv9M ReLU ONNX\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9m_relu/scrypted_yolov9m_relu.onnx\",\"size\":80380404,\"sha256\":\"e7a81fb33224a0105d2a0a594c3fa43c398c361de623f1d14156ae826e7312d5\"}],\"sizeMB\":80.38},{\"id\":\"scrypted-yolov9m-relu-test-coreml\",\"label\":\"Scrypted YOLOv9M ReLU test CoreML\",\"family\":\"yolov9m\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"8e2684b286d02b4bdf9db1027c84cb89bf8e4830cfb58269f3ec457c5a010650\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":247061,\"sha256\":\"53d5946e74b13b15c5f8616081c9f15e8a95a5df3d5b45b830fc5a7f49561c16\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":39880616,\"sha256\":\"69774bf0032c37707601b8cdc1e1820dbd9f8288eb5d6f3879618a5d34ff5199\"}],\"sizeMB\":40.13},{\"id\":\"scrypted-yolov9m-relu-test-onnx\",\"label\":\"Scrypted YOLOv9M ReLU test ONNX\",\"family\":\"yolov9m\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.onnx\",\"size\":80380404,\"sha256\":\"8bb054f099295909ec518e2a6598d63db24d3f90edc8105a0f016903f2a205a2\"}],\"sizeMB\":80.38},{\"id\":\"scrypted-yolov9c-relu-coreml\",\"label\":\"Scrypted YOLOv9C ReLU CoreML\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9c_relu/scrypted_yolov9c_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"813a306ebd69cabfd31f00434f5a961feeca7d237833f3e11805dcf4ad120ba9\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu/scrypted_yolov9c_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":263210,\"sha256\":\"862f082619075e470738306b0ff0a37ae70a7d08e684ca6a6dfa1971d404e0c3\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu/scrypted_yolov9c_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":50489960,\"sha256\":\"ed89747e58943758e2a87221d1d404f6a4466cbc039c3c6f96e327cadc403d27\"}],\"sizeMB\":50.75},{\"id\":\"scrypted-yolov9c-relu-onnx\",\"label\":\"Scrypted YOLOv9C ReLU ONNX\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9c_relu/scrypted_yolov9c_relu.onnx\",\"size\":101631962,\"sha256\":\"b9372c4428daf4cd944c114b1e80d1a9ff0487d743e53a77216a051cfbef7116\"}],\"sizeMB\":101.63},{\"id\":\"scrypted-yolov9c-relu-test-coreml\",\"label\":\"Scrypted YOLOv9C ReLU test CoreML\",\"family\":\"yolov9c\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"966ef82a93cb0ccf1036a8c9729c065fd372fa9590a97d0945e581cc674f7ad2\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":263210,\"sha256\":\"08718ecd3e9552d21a702bd8df60911cad0eec7b2ae382466809550f14634711\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":50489960,\"sha256\":\"fe5936b9430ab4c87f30b148220131d6ec998b2377223d033e2fa2a00e60aada\"}],\"sizeMB\":50.75},{\"id\":\"scrypted-yolov9c-relu-test-onnx\",\"label\":\"Scrypted YOLOv9C ReLU test ONNX\",\"family\":\"yolov9c\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.onnx\",\"size\":101631962,\"sha256\":\"2f4e2031e8efb4cbc871594338b2e875d78ab4af3ee0258d253273b1aac84742\"}],\"sizeMB\":101.63},{\"id\":\"scrypted-yolov9t-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9T ReLU OpenVINO FP32\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9t_relu/best-converted.xml\",\"size\":628222,\"sha256\":\"01b5a9d02a0f281e1aaf4860e1b0ed3a7f16b9d78975be8ff985ae0ee283d877\"},{\"relativePath\":\"openvino/scrypted_yolov9t_relu/best-converted.bin\",\"size\":7542204,\"sha256\":\"4fe9ce8dbdf94514fdd450cbfc907f257153e4898a0c1489a44e4912d8e32cc7\"}],\"sizeMB\":8.17},{\"id\":\"scrypted-yolov9s-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9S ReLU OpenVINO FP32\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9s_relu/best-converted.xml\",\"size\":629249,\"sha256\":\"5b4a229bf7229425698b63bd065a403e440a6151a6ddff0034867659cc4a480d\"},{\"relativePath\":\"openvino/scrypted_yolov9s_relu/best-converted.bin\",\"size\":28329724,\"sha256\":\"c030bd219208ea94082578c81f383d4ef9ec45d7150eec1c2c2ff2569cf49b35\"}],\"sizeMB\":28.96},{\"id\":\"scrypted-yolov9m-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9M ReLU OpenVINO FP32\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9m_relu/best-converted.xml\",\"size\":485439,\"sha256\":\"c66f9f1965bf70fd3635d4dfc3cb94c72c06b344c256713237d77706725b9a0c\"},{\"relativePath\":\"openvino/scrypted_yolov9m_relu/best-converted.bin\",\"size\":79717372,\"sha256\":\"dfc2d8952bbca9ad0e116168e3fd5c754e601c327d78c4f4d0d4cae12f0e1d2a\"}],\"sizeMB\":80.2},{\"id\":\"scrypted-yolov9c-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9C ReLU OpenVINO FP32\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9c_relu/best-converted.xml\",\"size\":535047,\"sha256\":\"836c1e998ebf76108ff64d554fdfa07aa72c42624f1a5448701bb409f27b8d68\"},{\"relativePath\":\"openvino/scrypted_yolov9c_relu/best-converted.bin\",\"size\":100942972,\"sha256\":\"11a1b330ac9843b349927977b3c7c7f17bb42af73a7ff102969132f27ab81814\"}],\"sizeMB\":101.48},{\"id\":\"scrypted-yolov9t-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9T ReLU OpenVINO INT8\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9t_relu_int8/best-converted.xml\",\"size\":1380379,\"sha256\":\"e5a76bf88ac69fc0ebc50c04b61ff91550dd9c2349af1f6d7e4cac949c640cec\"},{\"relativePath\":\"openvino/scrypted_yolov9t_relu_int8/best-converted.bin\",\"size\":1954956,\"sha256\":\"98fb5b6826d7c6697a585f69ba96754873772d9d61fbed8335aab761e8248659\"}],\"sizeMB\":3.34},{\"id\":\"scrypted-yolov9t-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9T ReLU test OpenVINO INT8\",\"family\":\"yolov9t\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9t_relu_test_int8/best-converted.xml\",\"size\":1380383,\"sha256\":\"9e4119284e923e08c9929e78fd31e2552e602a552ac538ae99bf34a50dd4d172\"},{\"relativePath\":\"openvino/scrypted_yolov9t_relu_test_int8/best-converted.bin\",\"size\":1954960,\"sha256\":\"efe5b0a2fd2f5ddef5923eeb9e592a7ef14719061bb7605c86e05b35c2c58ea9\"}],\"sizeMB\":3.34},{\"id\":\"scrypted-yolov9s-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9S ReLU OpenVINO INT8\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9s_relu_int8/best-converted.xml\",\"size\":1382088,\"sha256\":\"4e6c24cf24afbab21462f7e1a15bd05b1cbbe5915046000e03c2435d8110bbbf\"},{\"relativePath\":\"openvino/scrypted_yolov9s_relu_int8/best-converted.bin\",\"size\":7197308,\"sha256\":\"23fd3d666a938c41db232d9c6239baec1134716cfb4ed4ddd3d602dd20eb8ac0\"}],\"sizeMB\":8.58},{\"id\":\"scrypted-yolov9s-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9S ReLU test OpenVINO INT8\",\"family\":\"yolov9s\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9s_relu_test_int8/best-converted.xml\",\"size\":1382092,\"sha256\":\"49865bfeafe7576afce089ba6f5c3e25a9192c8b514eb96265c90fe877795641\"},{\"relativePath\":\"openvino/scrypted_yolov9s_relu_test_int8/best-converted.bin\",\"size\":7197312,\"sha256\":\"78e9d36e6b74754db2b624ea3ec0b3ff57ed6dfed59a4f2225e1a271054597de\"}],\"sizeMB\":8.58},{\"id\":\"scrypted-yolov9m-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9M ReLU OpenVINO INT8\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9m_relu_int8/best-converted.xml\",\"size\":1024595,\"sha256\":\"1242ab8d8c73b2e80c5dd541177ade6e102a2684114b059136acb4cad6efb034\"},{\"relativePath\":\"openvino/scrypted_yolov9m_relu_int8/best-converted.bin\",\"size\":20090516,\"sha256\":\"da8e44af8bee66478e6f359e9504bfb13ab4b76f4bd8a2f1b10cfbc22febcf6e\"}],\"sizeMB\":21.12},{\"id\":\"scrypted-yolov9m-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9M ReLU test OpenVINO INT8\",\"family\":\"yolov9m\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9m_relu_test_int8/best-converted.xml\",\"size\":1024601,\"sha256\":\"24395ae5fdbb321304c865372cd2b905cdc55abb7610520f3963702e2371decb\"},{\"relativePath\":\"openvino/scrypted_yolov9m_relu_test_int8/best-converted.bin\",\"size\":20090520,\"sha256\":\"4360fe0312067f92c49f180c7b8a10271f14d58b8909aa9b96b13af4ab9289aa\"}],\"sizeMB\":21.12},{\"id\":\"scrypted-yolov9c-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9C ReLU OpenVINO INT8\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9c_relu_int8/best-converted.xml\",\"size\":1092695,\"sha256\":\"a45c62940120c4301d8fff9fb3b275c29e3618f403ea68a785f2f3220cefec7a\"},{\"relativePath\":\"openvino/scrypted_yolov9c_relu_int8/best-converted.bin\",\"size\":25428280,\"sha256\":\"0643403a56178c3ed1e066c7884458d8ea6780115d662bdc38d10754d7a11c79\"}],\"sizeMB\":26.52},{\"id\":\"scrypted-yolov9c-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9C ReLU test OpenVINO INT8\",\"family\":\"yolov9c\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9c_relu_test_int8/best-converted.xml\",\"size\":1092695,\"sha256\":\"a8a1899848ebd060af2326d3c8d3c09ea83354f0bedff6cce6fa08b284ea5519\"},{\"relativePath\":\"openvino/scrypted_yolov9c_relu_test_int8/best-converted.bin\",\"size\":25428280,\"sha256\":\"2eb6bb3d0a03a9b239b6f623f9e7bced62eea61fbe4d8ff89c1b3e2e2b7978a2\"}],\"sizeMB\":26.52},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-float16\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite float16\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"float16\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_float16.tflite\",\"size\":14482836,\"sha256\":\"04889db3b81af361c361e41ffa99327330d37b71d680a2f889e6cdf1e94c0d8c\"}],\"sizeMB\":14.48},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-float32\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite float32\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"float32\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_float32.tflite\",\"size\":28777068,\"sha256\":\"f5d7d08fc1d8f2262633d2df4391638e0481740331aaa1837880a47c33001a96\"}],\"sizeMB\":28.78},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-int8\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite int8\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_int8.tflite\",\"size\":7325616,\"sha256\":\"1e9866b16fe80931383bf3c94dc629fe93a37ba3dc1465ea019eb0a50bd428df\"}],\"sizeMB\":7.33},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-integer_quant\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite integer_quant\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"integer_quant\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_integer_quant.tflite\",\"size\":7342552,\"sha256\":\"bc1c902e9a9865637ee2403f70c6bf5c29c695d9163e58ad658feb29bb097ebc\"}],\"sizeMB\":7.34},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-full_integer_quant\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite full_integer_quant\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"full_integer_quant\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_full_integer_quant.tflite\",\"size\":7341704,\"sha256\":\"483ce38dbe33ee5a35f40a82f56c77629a44fa5d95efd8ade9fa97e4d2a261fd\"}],\"sizeMB\":7.34},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-edgetpu\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite edgetpu\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"edgetpu\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_full_integer_quant_edgetpu.tflite\",\"size\":8164480,\"sha256\":\"e1e6b074a3b9fdf19a171baf615553ad375a046aa7de2a3fef9a1950175fab22\"}],\"sizeMB\":8.16}]"), iS = {
|
|
19223
|
+
var sS = /*#__PURE__*/ JSON.parse("[{\"id\":\"scrypted-yolov9t-relu-coreml\",\"label\":\"Scrypted YOLOv9T ReLU CoreML\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9t_relu/scrypted_yolov9t_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"0a8733949d77e3204dba6418e81a11a8cc177015711457ce2c171266f23382d6\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu/scrypted_yolov9t_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322229,\"sha256\":\"f5a62f196f1e72a84efa1637119dffb6501621af9cf6f867bc76b4b59c9242a0\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu/scrypted_yolov9t_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":3797160,\"sha256\":\"b994419b8b68cfd6b89c3c6f3fe6b37458c86cc1d87fcca3df5034476a99dd38\"}],\"sizeMB\":4.12},{\"id\":\"scrypted-yolov9t-relu-onnx\",\"label\":\"Scrypted YOLOv9T ReLU ONNX\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9t_relu/scrypted_yolov9t_relu.onnx\",\"size\":8499266,\"sha256\":\"3f11ea2071b27c285b58c16636a44d6a0a27bdd1ca8b64112dfadabd39cfea47\"}],\"sizeMB\":8.5},{\"id\":\"scrypted-yolov9t-relu-test-coreml\",\"label\":\"Scrypted YOLOv9T ReLU test CoreML\",\"family\":\"yolov9t\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"a5e0128b643f1a66f3e07d4b332f9ccbca97ccab75651c794f0b9f1fb41c8491\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322229,\"sha256\":\"79f4f647f2a0c79db3b560c84251b48c7ba7cbe9c1fecc9674d1a603a389dfa3\"},{\"relativePath\":\"coreml/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":3797160,\"sha256\":\"72efc9dc6af9241b5e5ee7de24a4f55741f6425d0e279d797f0f223e3d355f84\"}],\"sizeMB\":4.12},{\"id\":\"scrypted-yolov9t-relu-test-onnx\",\"label\":\"Scrypted YOLOv9T ReLU test ONNX\",\"family\":\"yolov9t\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9t_relu_test/scrypted_yolov9t_relu_test.onnx\",\"size\":8499266,\"sha256\":\"d20aa0e6923a3af7f5e84e3a6d28fb00e8ecd592e3225f986f93bd34b634e2f8\"}],\"sizeMB\":8.5},{\"id\":\"scrypted-yolov9s-relu-coreml\",\"label\":\"Scrypted YOLOv9S ReLU CoreML\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9s_relu/scrypted_yolov9s_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"3bcdb820b82f1e89266f2d11bae1604d3ee4ca6d11dc5bd5c57055ff4157e9f3\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu/scrypted_yolov9s_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322664,\"sha256\":\"9a9c3c9cbca406ec2f0418ec867ed6b878ec6d02c16636d30e0bbd83d2ff7c40\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu/scrypted_yolov9s_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":14190120,\"sha256\":\"fd51eda58a993997268f6a2e424b536ba173207ad7974ab8bee2a8ff76d52dab\"}],\"sizeMB\":14.51},{\"id\":\"scrypted-yolov9s-relu-onnx\",\"label\":\"Scrypted YOLOv9S ReLU ONNX\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9s_relu/scrypted_yolov9s_relu.onnx\",\"size\":29287339,\"sha256\":\"ca0b5bd98d5f59eb2029c6cb5129d53af59873f62a317a028beda463bbb96399\"}],\"sizeMB\":29.29},{\"id\":\"scrypted-yolov9s-relu-test-coreml\",\"label\":\"Scrypted YOLOv9S ReLU test CoreML\",\"family\":\"yolov9s\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"e2d24de0ce7e8573f19572029765e55abc714f36a85175ad7fcb95c001a76653\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":322664,\"sha256\":\"186b147cdfd15c5ed7a381ec3a426a22cee0b5c52d56f14efd26da06357f5cb0\"},{\"relativePath\":\"coreml/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":14190120,\"sha256\":\"e50651924c2cbffd56008a8953569e66c3de69f21807fcf7d825390ce30f21f8\"}],\"sizeMB\":14.51},{\"id\":\"scrypted-yolov9s-relu-test-onnx\",\"label\":\"Scrypted YOLOv9S ReLU test ONNX\",\"family\":\"yolov9s\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9s_relu_test/scrypted_yolov9s_relu_test.onnx\",\"size\":29287339,\"sha256\":\"115ddb83333762a0f2599421335678696454a5c3571ade5df9bac8e9cb5fb4cf\"}],\"sizeMB\":29.29},{\"id\":\"scrypted-yolov9m-relu-coreml\",\"label\":\"Scrypted YOLOv9M ReLU CoreML\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9m_relu/scrypted_yolov9m_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"c548c6e1ff768b2b01bd71e230aa712a1635ae2baa30e0369557a42fc531ecbf\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu/scrypted_yolov9m_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":247061,\"sha256\":\"1c40e02fc2a2559cb906ea6cd9da9c730d4a78f5019290cbb38d2fcaae379fe7\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu/scrypted_yolov9m_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":39880616,\"sha256\":\"4cf938e5bfcc3ee1644813e4eb4702a7de450cc0581df94c719cf43d0ed2e408\"}],\"sizeMB\":40.13},{\"id\":\"scrypted-yolov9m-relu-onnx\",\"label\":\"Scrypted YOLOv9M ReLU ONNX\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9m_relu/scrypted_yolov9m_relu.onnx\",\"size\":80380404,\"sha256\":\"e7a81fb33224a0105d2a0a594c3fa43c398c361de623f1d14156ae826e7312d5\"}],\"sizeMB\":80.38},{\"id\":\"scrypted-yolov9m-relu-test-coreml\",\"label\":\"Scrypted YOLOv9M ReLU test CoreML\",\"family\":\"yolov9m\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"8e2684b286d02b4bdf9db1027c84cb89bf8e4830cfb58269f3ec457c5a010650\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":247061,\"sha256\":\"53d5946e74b13b15c5f8616081c9f15e8a95a5df3d5b45b830fc5a7f49561c16\"},{\"relativePath\":\"coreml/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":39880616,\"sha256\":\"69774bf0032c37707601b8cdc1e1820dbd9f8288eb5d6f3879618a5d34ff5199\"}],\"sizeMB\":40.13},{\"id\":\"scrypted-yolov9m-relu-test-onnx\",\"label\":\"Scrypted YOLOv9M ReLU test ONNX\",\"family\":\"yolov9m\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9m_relu_test/scrypted_yolov9m_relu_test.onnx\",\"size\":80380404,\"sha256\":\"8bb054f099295909ec518e2a6598d63db24d3f90edc8105a0f016903f2a205a2\"}],\"sizeMB\":80.38},{\"id\":\"scrypted-yolov9c-relu-coreml\",\"label\":\"Scrypted YOLOv9C ReLU CoreML\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9c_relu/scrypted_yolov9c_relu.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"813a306ebd69cabfd31f00434f5a961feeca7d237833f3e11805dcf4ad120ba9\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu/scrypted_yolov9c_relu.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":263210,\"sha256\":\"862f082619075e470738306b0ff0a37ae70a7d08e684ca6a6dfa1971d404e0c3\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu/scrypted_yolov9c_relu.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":50489960,\"sha256\":\"ed89747e58943758e2a87221d1d404f6a4466cbc039c3c6f96e327cadc403d27\"}],\"sizeMB\":50.75},{\"id\":\"scrypted-yolov9c-relu-onnx\",\"label\":\"Scrypted YOLOv9C ReLU ONNX\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9c_relu/scrypted_yolov9c_relu.onnx\",\"size\":101631962,\"sha256\":\"b9372c4428daf4cd944c114b1e80d1a9ff0487d743e53a77216a051cfbef7116\"}],\"sizeMB\":101.63},{\"id\":\"scrypted-yolov9c-relu-test-coreml\",\"label\":\"Scrypted YOLOv9C ReLU test CoreML\",\"family\":\"yolov9c\",\"variant\":\"relu_test\",\"format\":\"coreml\",\"precision\":\"fp16\",\"files\":[{\"relativePath\":\"coreml/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.mlpackage/Manifest.json\",\"size\":617,\"sha256\":\"966ef82a93cb0ccf1036a8c9729c065fd372fa9590a97d0945e581cc674f7ad2\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.mlpackage/Data/com.apple.CoreML/model.mlmodel\",\"size\":263210,\"sha256\":\"08718ecd3e9552d21a702bd8df60911cad0eec7b2ae382466809550f14634711\"},{\"relativePath\":\"coreml/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.mlpackage/Data/com.apple.CoreML/weights/weight.bin\",\"size\":50489960,\"sha256\":\"fe5936b9430ab4c87f30b148220131d6ec998b2377223d033e2fa2a00e60aada\"}],\"sizeMB\":50.75},{\"id\":\"scrypted-yolov9c-relu-test-onnx\",\"label\":\"Scrypted YOLOv9C ReLU test ONNX\",\"family\":\"yolov9c\",\"variant\":\"relu_test\",\"format\":\"onnx\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"onnx/scrypted_yolov9c_relu_test/scrypted_yolov9c_relu_test.onnx\",\"size\":101631962,\"sha256\":\"2f4e2031e8efb4cbc871594338b2e875d78ab4af3ee0258d253273b1aac84742\"}],\"sizeMB\":101.63},{\"id\":\"scrypted-yolov9t-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9T ReLU OpenVINO FP32\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9t_relu/best-converted.xml\",\"size\":628222,\"sha256\":\"01b5a9d02a0f281e1aaf4860e1b0ed3a7f16b9d78975be8ff985ae0ee283d877\"},{\"relativePath\":\"openvino/scrypted_yolov9t_relu/best-converted.bin\",\"size\":7542204,\"sha256\":\"4fe9ce8dbdf94514fdd450cbfc907f257153e4898a0c1489a44e4912d8e32cc7\"}],\"sizeMB\":8.17},{\"id\":\"scrypted-yolov9s-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9S ReLU OpenVINO FP32\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9s_relu/best-converted.xml\",\"size\":629249,\"sha256\":\"5b4a229bf7229425698b63bd065a403e440a6151a6ddff0034867659cc4a480d\"},{\"relativePath\":\"openvino/scrypted_yolov9s_relu/best-converted.bin\",\"size\":28329724,\"sha256\":\"c030bd219208ea94082578c81f383d4ef9ec45d7150eec1c2c2ff2569cf49b35\"}],\"sizeMB\":28.96},{\"id\":\"scrypted-yolov9m-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9M ReLU OpenVINO FP32\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9m_relu/best-converted.xml\",\"size\":485439,\"sha256\":\"c66f9f1965bf70fd3635d4dfc3cb94c72c06b344c256713237d77706725b9a0c\"},{\"relativePath\":\"openvino/scrypted_yolov9m_relu/best-converted.bin\",\"size\":79717372,\"sha256\":\"dfc2d8952bbca9ad0e116168e3fd5c754e601c327d78c4f4d0d4cae12f0e1d2a\"}],\"sizeMB\":80.2},{\"id\":\"scrypted-yolov9c-relu-openvino-fp32\",\"label\":\"Scrypted YOLOv9C ReLU OpenVINO FP32\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"fp32\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9c_relu/best-converted.xml\",\"size\":535047,\"sha256\":\"836c1e998ebf76108ff64d554fdfa07aa72c42624f1a5448701bb409f27b8d68\"},{\"relativePath\":\"openvino/scrypted_yolov9c_relu/best-converted.bin\",\"size\":100942972,\"sha256\":\"11a1b330ac9843b349927977b3c7c7f17bb42af73a7ff102969132f27ab81814\"}],\"sizeMB\":101.48},{\"id\":\"scrypted-yolov9t-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9T ReLU OpenVINO INT8\",\"family\":\"yolov9t\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9t_relu_int8/best-converted.xml\",\"size\":1380379,\"sha256\":\"e5a76bf88ac69fc0ebc50c04b61ff91550dd9c2349af1f6d7e4cac949c640cec\"},{\"relativePath\":\"openvino/scrypted_yolov9t_relu_int8/best-converted.bin\",\"size\":1954956,\"sha256\":\"98fb5b6826d7c6697a585f69ba96754873772d9d61fbed8335aab761e8248659\"}],\"sizeMB\":3.34},{\"id\":\"scrypted-yolov9t-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9T ReLU test OpenVINO INT8\",\"family\":\"yolov9t\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9t_relu_test_int8/best-converted.xml\",\"size\":1380383,\"sha256\":\"9e4119284e923e08c9929e78fd31e2552e602a552ac538ae99bf34a50dd4d172\"},{\"relativePath\":\"openvino/scrypted_yolov9t_relu_test_int8/best-converted.bin\",\"size\":1954960,\"sha256\":\"efe5b0a2fd2f5ddef5923eeb9e592a7ef14719061bb7605c86e05b35c2c58ea9\"}],\"sizeMB\":3.34},{\"id\":\"scrypted-yolov9s-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9S ReLU OpenVINO INT8\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9s_relu_int8/best-converted.xml\",\"size\":1382088,\"sha256\":\"4e6c24cf24afbab21462f7e1a15bd05b1cbbe5915046000e03c2435d8110bbbf\"},{\"relativePath\":\"openvino/scrypted_yolov9s_relu_int8/best-converted.bin\",\"size\":7197308,\"sha256\":\"23fd3d666a938c41db232d9c6239baec1134716cfb4ed4ddd3d602dd20eb8ac0\"}],\"sizeMB\":8.58},{\"id\":\"scrypted-yolov9s-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9S ReLU test OpenVINO INT8\",\"family\":\"yolov9s\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9s_relu_test_int8/best-converted.xml\",\"size\":1382092,\"sha256\":\"49865bfeafe7576afce089ba6f5c3e25a9192c8b514eb96265c90fe877795641\"},{\"relativePath\":\"openvino/scrypted_yolov9s_relu_test_int8/best-converted.bin\",\"size\":7197312,\"sha256\":\"78e9d36e6b74754db2b624ea3ec0b3ff57ed6dfed59a4f2225e1a271054597de\"}],\"sizeMB\":8.58},{\"id\":\"scrypted-yolov9m-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9M ReLU OpenVINO INT8\",\"family\":\"yolov9m\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9m_relu_int8/best-converted.xml\",\"size\":1024595,\"sha256\":\"1242ab8d8c73b2e80c5dd541177ade6e102a2684114b059136acb4cad6efb034\"},{\"relativePath\":\"openvino/scrypted_yolov9m_relu_int8/best-converted.bin\",\"size\":20090516,\"sha256\":\"da8e44af8bee66478e6f359e9504bfb13ab4b76f4bd8a2f1b10cfbc22febcf6e\"}],\"sizeMB\":21.12},{\"id\":\"scrypted-yolov9m-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9M ReLU test OpenVINO INT8\",\"family\":\"yolov9m\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9m_relu_test_int8/best-converted.xml\",\"size\":1024601,\"sha256\":\"24395ae5fdbb321304c865372cd2b905cdc55abb7610520f3963702e2371decb\"},{\"relativePath\":\"openvino/scrypted_yolov9m_relu_test_int8/best-converted.bin\",\"size\":20090520,\"sha256\":\"4360fe0312067f92c49f180c7b8a10271f14d58b8909aa9b96b13af4ab9289aa\"}],\"sizeMB\":21.12},{\"id\":\"scrypted-yolov9c-relu-openvino-int8\",\"label\":\"Scrypted YOLOv9C ReLU OpenVINO INT8\",\"family\":\"yolov9c\",\"variant\":\"relu\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9c_relu_int8/best-converted.xml\",\"size\":1092695,\"sha256\":\"a45c62940120c4301d8fff9fb3b275c29e3618f403ea68a785f2f3220cefec7a\"},{\"relativePath\":\"openvino/scrypted_yolov9c_relu_int8/best-converted.bin\",\"size\":25428280,\"sha256\":\"0643403a56178c3ed1e066c7884458d8ea6780115d662bdc38d10754d7a11c79\"}],\"sizeMB\":26.52},{\"id\":\"scrypted-yolov9c-relu-test-openvino-int8\",\"label\":\"Scrypted YOLOv9C ReLU test OpenVINO INT8\",\"family\":\"yolov9c\",\"variant\":\"relu_test\",\"format\":\"openvino\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"openvino/scrypted_yolov9c_relu_test_int8/best-converted.xml\",\"size\":1092695,\"sha256\":\"a8a1899848ebd060af2326d3c8d3c09ea83354f0bedff6cce6fa08b284ea5519\"},{\"relativePath\":\"openvino/scrypted_yolov9c_relu_test_int8/best-converted.bin\",\"size\":25428280,\"sha256\":\"2eb6bb3d0a03a9b239b6f623f9e7bced62eea61fbe4d8ff89c1b3e2e2b7978a2\"}],\"sizeMB\":26.52},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-float16\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite float16\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"float16\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_float16.tflite\",\"size\":14482836,\"sha256\":\"04889db3b81af361c361e41ffa99327330d37b71d680a2f889e6cdf1e94c0d8c\"}],\"sizeMB\":14.48},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-float32\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite float32\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"float32\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_float32.tflite\",\"size\":28777068,\"sha256\":\"f5d7d08fc1d8f2262633d2df4391638e0481740331aaa1837880a47c33001a96\"}],\"sizeMB\":28.78},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-int8\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite int8\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"int8\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_int8.tflite\",\"size\":7325616,\"sha256\":\"1e9866b16fe80931383bf3c94dc629fe93a37ba3dc1465ea019eb0a50bd428df\"}],\"sizeMB\":7.33},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-integer_quant\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite integer_quant\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"integer_quant\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_integer_quant.tflite\",\"size\":7342552,\"sha256\":\"bc1c902e9a9865637ee2403f70c6bf5c29c695d9163e58ad658feb29bb097ebc\"}],\"sizeMB\":7.34},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-full_integer_quant\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite full_integer_quant\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"full_integer_quant\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_full_integer_quant.tflite\",\"size\":7341704,\"sha256\":\"483ce38dbe33ee5a35f40a82f56c77629a44fa5d95efd8ade9fa97e4d2a261fd\"}],\"sizeMB\":7.34},{\"id\":\"scrypted-yolov9s-relu-sep-320-tflite-edgetpu\",\"label\":\"Scrypted YOLOv9s ReLU sep 320 TFLite edgetpu\",\"family\":\"yolov9s\",\"variant\":\"relu\",\"format\":\"tflite\",\"precision\":\"edgetpu\",\"files\":[{\"relativePath\":\"tflite/scrypted_yolov9s_relu_sep_320/best_full_integer_quant_edgetpu.tflite\",\"size\":8164480,\"sha256\":\"e1e6b074a3b9fdf19a171baf615553ad375a046aa7de2a3fef9a1950175fab22\"}],\"sizeMB\":8.16}]"), cS = {
|
|
19204
19224
|
weights: "UNKNOWN",
|
|
19205
19225
|
code: "GPL-3.0",
|
|
19206
19226
|
data: {
|
|
@@ -19215,7 +19235,7 @@ var rS = /*#__PURE__*/ JSON.parse("[{\"id\":\"scrypted-yolov9t-relu-coreml\",\"l
|
|
|
19215
19235
|
attribution: "Scrypted YOLOv9 ReLU detectors, Koushik Dutta (scrypted/plugin-models, repository tagged MIT); trained with the YOLOv9 code of Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao, GPL-3.0 (https://github.com/WongKinYiu/yolov9).",
|
|
19216
19236
|
modifications: "none: downloaded as published, at a pinned revision",
|
|
19217
19237
|
hosting: "third-party"
|
|
19218
|
-
},
|
|
19238
|
+
}, lS = {
|
|
19219
19239
|
weights: "Apache-2.0",
|
|
19220
19240
|
code: "Apache-2.0",
|
|
19221
19241
|
data: {
|
|
@@ -19230,45 +19250,45 @@ var rS = /*#__PURE__*/ JSON.parse("[{\"id\":\"scrypted-yolov9t-relu-coreml\",\"l
|
|
|
19230
19250
|
url: "https://github.com/google-coral/test_data/blob/master/LICENSE",
|
|
19231
19251
|
attribution: "Coral Edge TPU models and AIY Vision Birds V1 © Google LLC, Apache-2.0.",
|
|
19232
19252
|
hosting: "third-party"
|
|
19233
|
-
},
|
|
19253
|
+
}, uS = /^[0-9a-f]{64}$/, dS = "https://huggingface.co", fS = "scrypted/plugin-models", pS = "187402b20a3be0a7fab9bceee21d857ed6ae0064", mS = [
|
|
19234
19254
|
"person",
|
|
19235
19255
|
"vehicle",
|
|
19236
19256
|
"animal"
|
|
19237
|
-
],
|
|
19257
|
+
], hS = {
|
|
19238
19258
|
mapping: {
|
|
19239
19259
|
person: "person",
|
|
19240
19260
|
vehicle: "vehicle",
|
|
19241
19261
|
animal: "animal"
|
|
19242
19262
|
},
|
|
19243
19263
|
preserveOriginal: !1
|
|
19244
|
-
},
|
|
19264
|
+
}, gS = mS.map((e) => ({
|
|
19245
19265
|
id: e,
|
|
19246
19266
|
name: e
|
|
19247
|
-
})),
|
|
19267
|
+
})), _S = [
|
|
19248
19268
|
"Manifest.json",
|
|
19249
19269
|
"Data/com.apple.CoreML/model.mlmodel",
|
|
19250
19270
|
"Data/com.apple.CoreML/weights/weight.bin"
|
|
19251
|
-
],
|
|
19271
|
+
], vS = {
|
|
19252
19272
|
width: 320,
|
|
19253
19273
|
height: 320
|
|
19254
19274
|
};
|
|
19255
|
-
function
|
|
19256
|
-
if (e === void 0 || !
|
|
19275
|
+
function yS(e, t) {
|
|
19276
|
+
if (e === void 0 || !uS.test(e)) throw Error(`Invalid sha256 for ${t}: expected 64 lowercase hex`);
|
|
19257
19277
|
return e;
|
|
19258
19278
|
}
|
|
19259
|
-
function
|
|
19279
|
+
function bS(e) {
|
|
19260
19280
|
if (e.length === 0 || e.startsWith("/") || e.includes("\\") || e.includes("\0") || e.split("/").some((e) => e.length === 0 || e === "." || e === "..")) throw Error(`Unsafe Scrypted relative path: ${e}`);
|
|
19261
19281
|
return e;
|
|
19262
19282
|
}
|
|
19263
|
-
function
|
|
19264
|
-
return `${
|
|
19283
|
+
function xS(e) {
|
|
19284
|
+
return `${dS}/${fS}/resolve/${pS}/${bS(e).split("/").map((e) => encodeURIComponent(e)).join("/")}`;
|
|
19265
19285
|
}
|
|
19266
|
-
function
|
|
19286
|
+
function SS(e) {
|
|
19267
19287
|
let t = e.find((e) => e.relativePath.endsWith("/Manifest.json"));
|
|
19268
19288
|
if (!t) throw Error("CoreML entry is missing Manifest.json");
|
|
19269
|
-
return
|
|
19289
|
+
return bS(t.relativePath.replace(/\/Manifest\.json$/, ""));
|
|
19270
19290
|
}
|
|
19271
|
-
function
|
|
19291
|
+
function CS(e) {
|
|
19272
19292
|
let t = e.family.slice(-1), n = e.precision === "int8" || e.precision === "uint8" || e.precision === "integer_quant" || e.precision === "full_integer_quant" || e.precision === "edgetpu", r = {
|
|
19273
19293
|
family: "yolov9",
|
|
19274
19294
|
tier: t,
|
|
@@ -19288,19 +19308,19 @@ function yS(e) {
|
|
|
19288
19308
|
name: s,
|
|
19289
19309
|
description: c,
|
|
19290
19310
|
formats: { coreml: {
|
|
19291
|
-
url:
|
|
19311
|
+
url: xS(SS(e.files)),
|
|
19292
19312
|
sizeMB: e.sizeMB,
|
|
19293
19313
|
isDirectory: !0,
|
|
19294
|
-
files: [...
|
|
19314
|
+
files: [..._S],
|
|
19295
19315
|
runtimes: ["python"]
|
|
19296
19316
|
} },
|
|
19297
|
-
inputSize:
|
|
19298
|
-
labels:
|
|
19317
|
+
inputSize: vS,
|
|
19318
|
+
labels: gS,
|
|
19299
19319
|
preprocessMode: "resize",
|
|
19300
|
-
classMap:
|
|
19320
|
+
classMap: hS,
|
|
19301
19321
|
group: r,
|
|
19302
19322
|
provider: "scrypted",
|
|
19303
|
-
license:
|
|
19323
|
+
license: cS
|
|
19304
19324
|
};
|
|
19305
19325
|
if (e.format === "openvino") {
|
|
19306
19326
|
let t = e.files.find((e) => e.relativePath.endsWith(".xml")), n = e.files.find((e) => e.relativePath.endsWith(".bin"));
|
|
@@ -19311,18 +19331,18 @@ function yS(e) {
|
|
|
19311
19331
|
name: s,
|
|
19312
19332
|
description: c,
|
|
19313
19333
|
formats: { openvino: {
|
|
19314
|
-
url:
|
|
19334
|
+
url: xS(t.relativePath),
|
|
19315
19335
|
sizeMB: e.sizeMB,
|
|
19316
19336
|
files: [i],
|
|
19317
19337
|
runtimes: ["python"]
|
|
19318
19338
|
} },
|
|
19319
|
-
inputSize:
|
|
19320
|
-
labels:
|
|
19339
|
+
inputSize: vS,
|
|
19340
|
+
labels: gS,
|
|
19321
19341
|
preprocessMode: "resize",
|
|
19322
|
-
classMap:
|
|
19342
|
+
classMap: hS,
|
|
19323
19343
|
group: r,
|
|
19324
19344
|
provider: "scrypted",
|
|
19325
|
-
license:
|
|
19345
|
+
license: cS
|
|
19326
19346
|
};
|
|
19327
19347
|
}
|
|
19328
19348
|
let l = e.files[0];
|
|
@@ -19332,25 +19352,25 @@ function yS(e) {
|
|
|
19332
19352
|
name: s,
|
|
19333
19353
|
description: c,
|
|
19334
19354
|
formats: { [e.format]: {
|
|
19335
|
-
url:
|
|
19355
|
+
url: xS(l.relativePath),
|
|
19336
19356
|
sizeMB: e.sizeMB,
|
|
19337
19357
|
runtimes: e.format === "tflite" ? ["python"] : void 0
|
|
19338
19358
|
} },
|
|
19339
|
-
inputSize:
|
|
19340
|
-
labels:
|
|
19359
|
+
inputSize: vS,
|
|
19360
|
+
labels: gS,
|
|
19341
19361
|
preprocessMode: "resize",
|
|
19342
|
-
classMap:
|
|
19362
|
+
classMap: hS,
|
|
19343
19363
|
group: r,
|
|
19344
19364
|
provider: "scrypted",
|
|
19345
|
-
license:
|
|
19365
|
+
license: cS,
|
|
19346
19366
|
...e.format === "tflite" ? { postprocessor: "yolo-split-dfl" } : {}
|
|
19347
19367
|
};
|
|
19348
19368
|
}
|
|
19349
|
-
function
|
|
19369
|
+
function wS(e) {
|
|
19350
19370
|
let t = e.files.map((e) => Object.freeze({
|
|
19351
|
-
relativePath:
|
|
19371
|
+
relativePath: bS(e.relativePath),
|
|
19352
19372
|
size: e.size,
|
|
19353
|
-
sha256:
|
|
19373
|
+
sha256: yS(e.sha256, e.relativePath)
|
|
19354
19374
|
}));
|
|
19355
19375
|
return Object.freeze({
|
|
19356
19376
|
id: e.id,
|
|
@@ -19359,22 +19379,22 @@ function bS(e) {
|
|
|
19359
19379
|
variant: e.variant,
|
|
19360
19380
|
format: e.format,
|
|
19361
19381
|
precision: e.precision,
|
|
19362
|
-
inputSize:
|
|
19382
|
+
inputSize: vS,
|
|
19363
19383
|
files: Object.freeze(t),
|
|
19364
|
-
model:
|
|
19384
|
+
model: CS({
|
|
19365
19385
|
...e,
|
|
19366
19386
|
files: t
|
|
19367
19387
|
})
|
|
19368
19388
|
});
|
|
19369
19389
|
}
|
|
19370
|
-
var
|
|
19390
|
+
var TS = Object.freeze(sS.map(wS)), ES = [
|
|
19371
19391
|
"ok",
|
|
19372
19392
|
"missing",
|
|
19373
19393
|
"size-changed",
|
|
19374
19394
|
"unavailable"
|
|
19375
19395
|
];
|
|
19376
|
-
function
|
|
19377
|
-
return
|
|
19396
|
+
function DS(e) {
|
|
19397
|
+
return ES.includes(e.status) ? {
|
|
19378
19398
|
manifestId: e.manifestId,
|
|
19379
19399
|
status: e.status,
|
|
19380
19400
|
...e.details === void 0 ? {} : { details: e.details }
|
|
@@ -19386,11 +19406,11 @@ function CS(e) {
|
|
|
19386
19406
|
}
|
|
19387
19407
|
//#endregion
|
|
19388
19408
|
//#region src/model-studio-actions.ts
|
|
19389
|
-
var
|
|
19409
|
+
var OS = $({
|
|
19390
19410
|
sha256: Q(),
|
|
19391
19411
|
bytes: Pb(),
|
|
19392
19412
|
at: Pb()
|
|
19393
|
-
}),
|
|
19413
|
+
}), kS = kx((e) => {
|
|
19394
19414
|
if (typeof e != "object" || !e || Array.isArray(e)) return e;
|
|
19395
19415
|
let t = e;
|
|
19396
19416
|
return typeof t.formats == "object" && t.formats !== null && !Array.isArray(t.formats) ? { formats: t.formats } : typeof t.format == "string" ? { formats: { [t.format]: {
|
|
@@ -19398,15 +19418,15 @@ var wS = $({
|
|
|
19398
19418
|
bytes: typeof t.bytes == "number" ? t.bytes : 0,
|
|
19399
19419
|
at: typeof t.at == "number" ? t.at : 0
|
|
19400
19420
|
} } } : e;
|
|
19401
|
-
}, $({ formats: ex(nx(P),
|
|
19402
|
-
function
|
|
19421
|
+
}, $({ formats: ex(nx(P), OS) })), AS = $b(Q(), $b(Q(), kS));
|
|
19422
|
+
function jS(e) {
|
|
19403
19423
|
return `frigate-plus-${e}`;
|
|
19404
19424
|
}
|
|
19405
|
-
var
|
|
19425
|
+
var MS = $({
|
|
19406
19426
|
relativePath: Q(),
|
|
19407
19427
|
size: Pb(),
|
|
19408
19428
|
sha256: Q().regex(/^[0-9a-f]{64}$/)
|
|
19409
|
-
}),
|
|
19429
|
+
}), NS = $({
|
|
19410
19430
|
id: Q(),
|
|
19411
19431
|
label: Q(),
|
|
19412
19432
|
family: nx([
|
|
@@ -19427,9 +19447,9 @@ var OS = $({
|
|
|
19427
19447
|
width: Pb(),
|
|
19428
19448
|
height: Pb()
|
|
19429
19449
|
}),
|
|
19430
|
-
files: Kb(
|
|
19450
|
+
files: Kb(MS).readonly(),
|
|
19431
19451
|
model: Xe
|
|
19432
|
-
}),
|
|
19452
|
+
}), PS = $({
|
|
19433
19453
|
manifestId: Q(),
|
|
19434
19454
|
status: nx([
|
|
19435
19455
|
"ok",
|
|
@@ -19438,14 +19458,14 @@ var OS = $({
|
|
|
19438
19458
|
"unavailable"
|
|
19439
19459
|
]),
|
|
19440
19460
|
details: Q().optional()
|
|
19441
|
-
}),
|
|
19461
|
+
}), FS = $({
|
|
19442
19462
|
id: Q(),
|
|
19443
19463
|
label: Q(),
|
|
19444
19464
|
format: nx(P),
|
|
19445
19465
|
sizeMB: Pb(),
|
|
19446
19466
|
inputSize: Pb(),
|
|
19447
19467
|
notes: Q()
|
|
19448
|
-
}),
|
|
19468
|
+
}), IS = $({
|
|
19449
19469
|
id: Q(),
|
|
19450
19470
|
name: Q(),
|
|
19451
19471
|
type: Q(),
|
|
@@ -19528,7 +19548,7 @@ Qe({
|
|
|
19528
19548
|
sha256: Q(),
|
|
19529
19549
|
bytes: Pb()
|
|
19530
19550
|
}), { kind: "mutation" }),
|
|
19531
|
-
listAvailability: ke(Wb(),
|
|
19551
|
+
listAvailability: ke(Wb(), AS),
|
|
19532
19552
|
beginModelUpload: ke($({
|
|
19533
19553
|
filename: Q(),
|
|
19534
19554
|
totalBytes: Pb().int().positive()
|
|
@@ -19543,7 +19563,7 @@ Qe({
|
|
|
19543
19563
|
sha256: Q()
|
|
19544
19564
|
}), { kind: "mutation" }),
|
|
19545
19565
|
abortModelUpload: ke($({ uploadId: Q() }), $({ ok: ix(!0) }), { kind: "mutation" }),
|
|
19546
|
-
listFrigateCatalog: ke(Wb(), Kb(
|
|
19566
|
+
listFrigateCatalog: ke(Wb(), Kb(FS).readonly()),
|
|
19547
19567
|
importFrigateCatalogModel: ke($({
|
|
19548
19568
|
catalogId: Q(),
|
|
19549
19569
|
modelId: Q().optional(),
|
|
@@ -19555,8 +19575,8 @@ Qe({
|
|
|
19555
19575
|
bytes: Pb()
|
|
19556
19576
|
}), { kind: "mutation" }),
|
|
19557
19577
|
listScryptedCatalog: ke(Wb(), $({
|
|
19558
|
-
entries: Kb(
|
|
19559
|
-
drift: Kb(
|
|
19578
|
+
entries: Kb(NS).readonly(),
|
|
19579
|
+
drift: Kb(PS).readonly()
|
|
19560
19580
|
})),
|
|
19561
19581
|
importScryptedCatalogModel: ke($({
|
|
19562
19582
|
manifestId: Q(),
|
|
@@ -19572,7 +19592,7 @@ Qe({
|
|
|
19572
19592
|
ok: Rb(),
|
|
19573
19593
|
error: Q().optional()
|
|
19574
19594
|
}), { kind: "mutation" }),
|
|
19575
|
-
frigatePlusListModels: ke(Wb(), Kb(
|
|
19595
|
+
frigatePlusListModels: ke(Wb(), Kb(IS).readonly()),
|
|
19576
19596
|
importFrigatePlusModel: ke($({
|
|
19577
19597
|
plusModelId: Q(),
|
|
19578
19598
|
modelId: Q().optional(),
|
|
@@ -19607,10 +19627,10 @@ Qe({
|
|
|
19607
19627
|
artifacts: Kb(Te).readonly()
|
|
19608
19628
|
}), { kind: "mutation" })
|
|
19609
19629
|
});
|
|
19610
|
-
var
|
|
19611
|
-
function
|
|
19630
|
+
var LS = /[\u0000-\u001f\u007f]/;
|
|
19631
|
+
function RS(e) {
|
|
19612
19632
|
let t = e.replace(/\s+/g, " ").trim();
|
|
19613
|
-
return t.length === 0 ? { kind: "reset" } :
|
|
19633
|
+
return t.length === 0 ? { kind: "reset" } : LS.test(t) ? {
|
|
19614
19634
|
kind: "invalid",
|
|
19615
19635
|
reason: "The name contains control characters."
|
|
19616
19636
|
} : t.length > 80 ? {
|
|
@@ -19621,30 +19641,30 @@ function PS(e) {
|
|
|
19621
19641
|
name: t
|
|
19622
19642
|
};
|
|
19623
19643
|
}
|
|
19624
|
-
function
|
|
19644
|
+
function zS(e) {
|
|
19625
19645
|
let t = e.name?.trim() ?? "";
|
|
19626
19646
|
return t.length > 0 ? t : e.id;
|
|
19627
19647
|
}
|
|
19628
19648
|
//#endregion
|
|
19629
19649
|
//#region src/ui/model-studio-ui.ts
|
|
19630
|
-
var
|
|
19631
|
-
function
|
|
19632
|
-
return e.stepId ===
|
|
19650
|
+
var BS = "object-detection";
|
|
19651
|
+
function VS(e) {
|
|
19652
|
+
return e.stepId === BS ? he(e.entry, {
|
|
19633
19653
|
labels: [],
|
|
19634
19654
|
classMap: Ie
|
|
19635
19655
|
}) : [];
|
|
19636
19656
|
}
|
|
19637
|
-
var
|
|
19657
|
+
var HS = [
|
|
19638
19658
|
"onnx",
|
|
19639
19659
|
"coreml",
|
|
19640
19660
|
"openvino",
|
|
19641
19661
|
"tflite",
|
|
19642
19662
|
"pt"
|
|
19643
19663
|
];
|
|
19644
|
-
function
|
|
19645
|
-
return
|
|
19664
|
+
function US(e) {
|
|
19665
|
+
return HS.filter((t) => e.formats[t] !== void 0);
|
|
19646
19666
|
}
|
|
19647
|
-
function
|
|
19667
|
+
function WS(e, t) {
|
|
19648
19668
|
let n = e[t];
|
|
19649
19669
|
if (n === void 0) return [];
|
|
19650
19670
|
let r = [];
|
|
@@ -19655,7 +19675,7 @@ function BS(e, t) {
|
|
|
19655
19675
|
});
|
|
19656
19676
|
return r.toSorted((e, t) => e.nodeId.localeCompare(t.nodeId) || e.format.localeCompare(t.format));
|
|
19657
19677
|
}
|
|
19658
|
-
function
|
|
19678
|
+
function GS(e) {
|
|
19659
19679
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
19660
19680
|
for (let r of e.slots) for (let e of r.addons) t.has(e.id) || (t.add(e.id), n.push({
|
|
19661
19681
|
id: e.id,
|
|
@@ -19664,7 +19684,7 @@ function VS(e) {
|
|
|
19664
19684
|
}));
|
|
19665
19685
|
return n;
|
|
19666
19686
|
}
|
|
19667
|
-
function
|
|
19687
|
+
function KS(e) {
|
|
19668
19688
|
let t = {};
|
|
19669
19689
|
for (let n of e.slots) for (let e of n.addons) typeof e.defaultModelId != "string" || e.defaultModelId.length === 0 || (t[e.id] = {
|
|
19670
19690
|
id: e.id,
|
|
@@ -19679,7 +19699,7 @@ function HS(e) {
|
|
|
19679
19699
|
});
|
|
19680
19700
|
return t;
|
|
19681
19701
|
}
|
|
19682
|
-
function
|
|
19702
|
+
function qS(e, t) {
|
|
19683
19703
|
return {
|
|
19684
19704
|
format: e,
|
|
19685
19705
|
sizeMB: t.sizeMB,
|
|
@@ -19688,14 +19708,14 @@ function US(e, t) {
|
|
|
19688
19708
|
...t.precision === void 0 ? {} : { precision: t.precision }
|
|
19689
19709
|
};
|
|
19690
19710
|
}
|
|
19691
|
-
function
|
|
19692
|
-
let t =
|
|
19711
|
+
function JS(e) {
|
|
19712
|
+
let t = HS.flatMap((t) => {
|
|
19693
19713
|
let n = e[t];
|
|
19694
|
-
return n === void 0 ? [] : [
|
|
19695
|
-
}), n = Object.entries(e).filter(([e]) => !
|
|
19714
|
+
return n === void 0 ? [] : [qS(t, n)];
|
|
19715
|
+
}), n = Object.entries(e).filter(([e]) => !HS.includes(e)).map(([e, t]) => qS(e, t));
|
|
19696
19716
|
return [...t, ...n];
|
|
19697
19717
|
}
|
|
19698
|
-
function
|
|
19718
|
+
function YS(e) {
|
|
19699
19719
|
let t = [];
|
|
19700
19720
|
for (let n of e.slots) for (let e of n.addons) for (let n of e.models) {
|
|
19701
19721
|
if (n.legacy === !0) continue;
|
|
@@ -19706,29 +19726,29 @@ function GS(e) {
|
|
|
19706
19726
|
stepName: e.name,
|
|
19707
19727
|
modelId: n.id,
|
|
19708
19728
|
name: n.name,
|
|
19709
|
-
formats:
|
|
19710
|
-
group:
|
|
19711
|
-
...
|
|
19729
|
+
formats: JS(n.formats),
|
|
19730
|
+
group: ZS(r, n.group),
|
|
19731
|
+
...XS(n.suppliesSteps)
|
|
19712
19732
|
});
|
|
19713
19733
|
}
|
|
19714
19734
|
return t;
|
|
19715
19735
|
}
|
|
19716
|
-
function
|
|
19736
|
+
function XS(e) {
|
|
19717
19737
|
return e !== void 0 && e.length > 0 ? { supplies: e } : {};
|
|
19718
19738
|
}
|
|
19719
|
-
function
|
|
19739
|
+
function ZS(e, t) {
|
|
19720
19740
|
if (t !== void 0) return e === "camstack" ? t : {
|
|
19721
19741
|
...t,
|
|
19722
19742
|
family: `${e}:${t.family}`
|
|
19723
19743
|
};
|
|
19724
19744
|
}
|
|
19725
|
-
function
|
|
19745
|
+
function QS(e, t) {
|
|
19726
19746
|
let n = /^(scrypted|frigate|custom):(.+)$/i.exec(e);
|
|
19727
19747
|
if (n === null) return t;
|
|
19728
19748
|
let r = n[2];
|
|
19729
19749
|
return r === "yolov9" ? "YOLOv9" : r === "yolo26" ? "YOLO26" : r === "ssdlite-mobiledet" ? "SSDLite MobileDet" : r === "yolonas" ? "YOLO-NAS" : r.toUpperCase();
|
|
19730
19750
|
}
|
|
19731
|
-
function
|
|
19751
|
+
function $S(e) {
|
|
19732
19752
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
19733
19753
|
for (let r of e) t.has(r.stepId) || (t.add(r.stepId), n.push({
|
|
19734
19754
|
id: r.stepId,
|
|
@@ -19736,16 +19756,16 @@ function YS(e) {
|
|
|
19736
19756
|
}));
|
|
19737
19757
|
return n;
|
|
19738
19758
|
}
|
|
19739
|
-
function
|
|
19759
|
+
function eC(e, t) {
|
|
19740
19760
|
return e.filter((e) => e.stepId === t);
|
|
19741
19761
|
}
|
|
19742
|
-
function
|
|
19762
|
+
function tC(e) {
|
|
19743
19763
|
return e.filter((e) => e.group !== void 0);
|
|
19744
19764
|
}
|
|
19745
|
-
function
|
|
19765
|
+
function nC(e) {
|
|
19746
19766
|
return e.filter((e) => e.group === void 0);
|
|
19747
19767
|
}
|
|
19748
|
-
function
|
|
19768
|
+
function rC(e) {
|
|
19749
19769
|
let t = {};
|
|
19750
19770
|
for (let n of e.formats) t[n.format] = { sizeMB: n.sizeMB };
|
|
19751
19771
|
return {
|
|
@@ -19755,29 +19775,29 @@ function $S(e) {
|
|
|
19755
19775
|
formats: t
|
|
19756
19776
|
};
|
|
19757
19777
|
}
|
|
19758
|
-
function
|
|
19778
|
+
function iC(e) {
|
|
19759
19779
|
return e <= 0 ? "—" : e >= 1e3 ? `${(e / 1e3).toFixed(2)} GB` : `${e.toFixed(e >= 100 ? 0 : 1)} MB`;
|
|
19760
19780
|
}
|
|
19761
19781
|
//#endregion
|
|
19762
19782
|
//#region src/ui/api.ts
|
|
19763
|
-
var
|
|
19764
|
-
function
|
|
19783
|
+
var aC = "model-studio";
|
|
19784
|
+
function oC(e) {
|
|
19765
19785
|
return e;
|
|
19766
19786
|
}
|
|
19767
|
-
function
|
|
19768
|
-
return
|
|
19787
|
+
function sC(e) {
|
|
19788
|
+
return oC(e).addons.custom;
|
|
19769
19789
|
}
|
|
19770
|
-
async function
|
|
19771
|
-
return
|
|
19772
|
-
addonId:
|
|
19790
|
+
async function cC(e, t, n) {
|
|
19791
|
+
return sC(e).mutate({
|
|
19792
|
+
addonId: aC,
|
|
19773
19793
|
action: t,
|
|
19774
19794
|
input: n
|
|
19775
19795
|
});
|
|
19776
19796
|
}
|
|
19777
|
-
function
|
|
19797
|
+
function lC(e) {
|
|
19778
19798
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
19779
19799
|
}
|
|
19780
|
-
function
|
|
19800
|
+
function uC(e, t, n) {
|
|
19781
19801
|
let r = [];
|
|
19782
19802
|
for (let [i, a] of t.entries()) {
|
|
19783
19803
|
let t = e.safeParse(a);
|
|
@@ -19785,7 +19805,7 @@ function oC(e, t, n) {
|
|
|
19785
19805
|
}
|
|
19786
19806
|
return r;
|
|
19787
19807
|
}
|
|
19788
|
-
function
|
|
19808
|
+
function dC(e, t, n) {
|
|
19789
19809
|
let r = e.safeParse(t);
|
|
19790
19810
|
if (!r.success) {
|
|
19791
19811
|
let e = r.error.issues.map((e) => `${e.path.join(".") || "<root>"}: ${e.message}`).join("; ");
|
|
@@ -19793,34 +19813,34 @@ function sC(e, t, n) {
|
|
|
19793
19813
|
}
|
|
19794
19814
|
return r.data;
|
|
19795
19815
|
}
|
|
19796
|
-
function
|
|
19797
|
-
return Array.isArray(e) ?
|
|
19816
|
+
function fC(e) {
|
|
19817
|
+
return Array.isArray(e) ? uC(pe, e, "listCustomModels") : [];
|
|
19798
19818
|
}
|
|
19799
|
-
function
|
|
19800
|
-
if (!
|
|
19819
|
+
function pC(e) {
|
|
19820
|
+
if (!lC(e)) return {};
|
|
19801
19821
|
let t = {};
|
|
19802
19822
|
for (let [n, r] of Object.entries(e)) {
|
|
19803
|
-
if (!
|
|
19823
|
+
if (!lC(r)) {
|
|
19804
19824
|
console.warn(`[model-studio] listAvailability: dropping "${n}" — not an object`, r);
|
|
19805
19825
|
continue;
|
|
19806
19826
|
}
|
|
19807
19827
|
let e = {};
|
|
19808
19828
|
for (let [t, i] of Object.entries(r)) {
|
|
19809
|
-
let r =
|
|
19829
|
+
let r = kS.safeParse(i);
|
|
19810
19830
|
r.success ? e[t] = r.data : console.warn(`[model-studio] listAvailability: dropping ${n}/${t} — ${r.error.issues.map((e) => `${e.path.join(".") || "<root>"}: ${e.message}`).join("; ")}`);
|
|
19811
19831
|
}
|
|
19812
19832
|
t[n] = e;
|
|
19813
19833
|
}
|
|
19814
19834
|
return t;
|
|
19815
19835
|
}
|
|
19816
|
-
async function
|
|
19817
|
-
return
|
|
19836
|
+
async function mC(e) {
|
|
19837
|
+
return fC(await cC(e, "listCustomModels", void 0));
|
|
19818
19838
|
}
|
|
19819
|
-
async function
|
|
19820
|
-
return
|
|
19839
|
+
async function hC(e) {
|
|
19840
|
+
return pC(await cC(e, "listAvailability", void 0));
|
|
19821
19841
|
}
|
|
19822
|
-
function
|
|
19823
|
-
return Array.isArray(e) ? e.filter(
|
|
19842
|
+
function gC(e) {
|
|
19843
|
+
return Array.isArray(e) ? e.filter(lC).flatMap((e) => {
|
|
19824
19844
|
let t = e.format === "openvino" || e.format === "coreml" ? e.format : null;
|
|
19825
19845
|
return t === null ? [] : [{
|
|
19826
19846
|
format: t,
|
|
@@ -19830,104 +19850,104 @@ function fC(e) {
|
|
|
19830
19850
|
}];
|
|
19831
19851
|
}) : [];
|
|
19832
19852
|
}
|
|
19833
|
-
async function
|
|
19834
|
-
let n = await
|
|
19835
|
-
return
|
|
19853
|
+
async function _C(e, t) {
|
|
19854
|
+
let n = await cC(e, "registerCustomModel", t);
|
|
19855
|
+
return lC(n) ? { conversions: gC(n.conversions) } : { conversions: [] };
|
|
19836
19856
|
}
|
|
19837
|
-
async function
|
|
19838
|
-
let n = await
|
|
19839
|
-
if (!
|
|
19857
|
+
async function vC(e, t) {
|
|
19858
|
+
let n = await cC(e, "renameCustomModel", t);
|
|
19859
|
+
if (!lC(n)) throw Error("renameCustomModel: unexpected response shape");
|
|
19840
19860
|
return {
|
|
19841
|
-
modelId:
|
|
19842
|
-
name:
|
|
19861
|
+
modelId: AC(n, "modelId"),
|
|
19862
|
+
name: AC(n, "name")
|
|
19843
19863
|
};
|
|
19844
19864
|
}
|
|
19845
|
-
async function
|
|
19846
|
-
await
|
|
19865
|
+
async function yC(e, t) {
|
|
19866
|
+
await cC(e, "removeModelFromNode", t);
|
|
19847
19867
|
}
|
|
19848
|
-
async function
|
|
19849
|
-
let r = await
|
|
19868
|
+
async function bC(e, t, n) {
|
|
19869
|
+
let r = await cC(e, "ensureModelFormats", {
|
|
19850
19870
|
modelId: t,
|
|
19851
19871
|
formats: n
|
|
19852
19872
|
});
|
|
19853
|
-
return
|
|
19873
|
+
return lC(r) ? { conversions: gC(r.conversions) } : { conversions: [] };
|
|
19854
19874
|
}
|
|
19855
|
-
function
|
|
19856
|
-
return
|
|
19875
|
+
function xC(e) {
|
|
19876
|
+
return oC(e).pipelineExecutor.getSchema;
|
|
19857
19877
|
}
|
|
19858
|
-
function
|
|
19859
|
-
return
|
|
19878
|
+
function SC(e) {
|
|
19879
|
+
return lC(e) && Array.isArray(e.slots);
|
|
19860
19880
|
}
|
|
19861
|
-
async function
|
|
19862
|
-
let t = await
|
|
19863
|
-
if (!
|
|
19864
|
-
return
|
|
19881
|
+
async function CC(e) {
|
|
19882
|
+
let t = await xC(e).query();
|
|
19883
|
+
if (!SC(t)) throw Error("pipeline schema unavailable — cannot enumerate step ids");
|
|
19884
|
+
return GS(t);
|
|
19865
19885
|
}
|
|
19866
|
-
function
|
|
19867
|
-
return
|
|
19886
|
+
function wC(e) {
|
|
19887
|
+
return lC(e) && Array.isArray(e.slots);
|
|
19868
19888
|
}
|
|
19869
|
-
async function
|
|
19870
|
-
return (await
|
|
19889
|
+
async function TC(e, t) {
|
|
19890
|
+
return (await EC(e, t)).seeds;
|
|
19871
19891
|
}
|
|
19872
|
-
async function
|
|
19873
|
-
let n = await
|
|
19874
|
-
if (!
|
|
19892
|
+
async function EC(e, t) {
|
|
19893
|
+
let n = await xC(e).query(t === void 0 ? void 0 : { nodeId: t });
|
|
19894
|
+
if (!wC(n)) throw Error("pipeline schema unavailable — cannot list CamStack seeds");
|
|
19875
19895
|
return {
|
|
19876
|
-
seeds:
|
|
19877
|
-
stepCatalogs:
|
|
19896
|
+
seeds: YS(n),
|
|
19897
|
+
stepCatalogs: KS(n)
|
|
19878
19898
|
};
|
|
19879
19899
|
}
|
|
19880
|
-
async function
|
|
19881
|
-
await
|
|
19900
|
+
async function DC(e, t) {
|
|
19901
|
+
await oC(e).pipelineExecutor.downloadModel.mutate(t);
|
|
19882
19902
|
}
|
|
19883
|
-
async function
|
|
19884
|
-
let n = await
|
|
19885
|
-
if (!
|
|
19903
|
+
async function OC(e, t) {
|
|
19904
|
+
let n = await cC(e, "deleteSeedFromNode", t);
|
|
19905
|
+
if (!lC(n) || n.success !== !0) throw Error("deleteSeedFromNode: unexpected response");
|
|
19886
19906
|
}
|
|
19887
|
-
var
|
|
19888
|
-
function
|
|
19907
|
+
var kC = 512 * 1024;
|
|
19908
|
+
function AC(e, t) {
|
|
19889
19909
|
let n = e[t];
|
|
19890
19910
|
if (typeof n != "string") throw Error(`upload: missing "${t}" in response`);
|
|
19891
19911
|
return n;
|
|
19892
19912
|
}
|
|
19893
|
-
async function
|
|
19894
|
-
let r = await
|
|
19913
|
+
async function jC(e, t, n) {
|
|
19914
|
+
let r = await cC(e, "beginModelUpload", {
|
|
19895
19915
|
filename: t.name,
|
|
19896
19916
|
totalBytes: t.size
|
|
19897
19917
|
});
|
|
19898
|
-
if (!
|
|
19899
|
-
let i =
|
|
19918
|
+
if (!lC(r)) throw Error("beginModelUpload: unexpected response shape");
|
|
19919
|
+
let i = AC(r, "uploadId");
|
|
19900
19920
|
try {
|
|
19901
19921
|
let r = new Uint8Array(await t.arrayBuffer());
|
|
19902
|
-
for (let t = 0; t < r.length; t +=
|
|
19922
|
+
for (let t = 0; t < r.length; t += kC) await cC(e, "appendModelUpload", {
|
|
19903
19923
|
uploadId: i,
|
|
19904
|
-
chunkBase64:
|
|
19905
|
-
}), n?.(Math.min(t +
|
|
19906
|
-
let a = await
|
|
19907
|
-
if (!
|
|
19924
|
+
chunkBase64: MC(r.subarray(t, t + kC))
|
|
19925
|
+
}), n?.(Math.min(t + kC, r.length), r.length);
|
|
19926
|
+
let a = await cC(e, "commitModelUpload", { uploadId: i });
|
|
19927
|
+
if (!lC(a)) throw Error("commitModelUpload: unexpected response shape");
|
|
19908
19928
|
return {
|
|
19909
|
-
filename:
|
|
19929
|
+
filename: AC(a, "filename"),
|
|
19910
19930
|
bytes: typeof a.bytes == "number" ? a.bytes : t.size,
|
|
19911
|
-
sha256:
|
|
19931
|
+
sha256: AC(a, "sha256")
|
|
19912
19932
|
};
|
|
19913
19933
|
} catch (t) {
|
|
19914
|
-
throw await
|
|
19934
|
+
throw await cC(e, "abortModelUpload", { uploadId: i }).catch(() => void 0), t;
|
|
19915
19935
|
}
|
|
19916
19936
|
}
|
|
19917
|
-
function
|
|
19937
|
+
function MC(e) {
|
|
19918
19938
|
let t = "", n = 32768;
|
|
19919
19939
|
for (let r = 0; r < e.length; r += n) t += String.fromCharCode(...e.subarray(r, r + n));
|
|
19920
19940
|
return btoa(t);
|
|
19921
19941
|
}
|
|
19922
|
-
function
|
|
19923
|
-
return
|
|
19942
|
+
function NC(e) {
|
|
19943
|
+
return oC(e).live.onEvent;
|
|
19924
19944
|
}
|
|
19925
|
-
function
|
|
19926
|
-
let r =
|
|
19945
|
+
function PC(e, t, n) {
|
|
19946
|
+
let r = NC(e);
|
|
19927
19947
|
try {
|
|
19928
19948
|
return r.subscribe({ category: "model-convert.progress" }, {
|
|
19929
19949
|
onData: (e) => {
|
|
19930
|
-
let n =
|
|
19950
|
+
let n = lC(e.data) ? e.data : void 0;
|
|
19931
19951
|
n !== void 0 && t({
|
|
19932
19952
|
phase: typeof n.phase == "string" ? n.phase : "working",
|
|
19933
19953
|
pct: typeof n.pct == "number" ? n.pct : void 0,
|
|
@@ -19942,17 +19962,17 @@ function AC(e, t, n) {
|
|
|
19942
19962
|
return n?.(e), null;
|
|
19943
19963
|
}
|
|
19944
19964
|
}
|
|
19945
|
-
async function
|
|
19946
|
-
let n = await
|
|
19947
|
-
if (!
|
|
19965
|
+
async function FC(e, t) {
|
|
19966
|
+
let n = await cC(e, "importFrigateCatalogModel", t);
|
|
19967
|
+
if (!lC(n)) throw Error("importFrigateCatalogModel: unexpected response shape");
|
|
19948
19968
|
return {
|
|
19949
|
-
modelId:
|
|
19969
|
+
modelId: AC(n, "modelId"),
|
|
19950
19970
|
bytes: typeof n.bytes == "number" ? n.bytes : 0
|
|
19951
19971
|
};
|
|
19952
19972
|
}
|
|
19953
|
-
async function
|
|
19954
|
-
let t = await
|
|
19955
|
-
return
|
|
19973
|
+
async function IC(e) {
|
|
19974
|
+
let t = await cC(e, "frigatePlusStatus", void 0);
|
|
19975
|
+
return lC(t) ? {
|
|
19956
19976
|
configured: t.configured === !0,
|
|
19957
19977
|
keyFormatValid: t.keyFormatValid === !0
|
|
19958
19978
|
} : {
|
|
@@ -19960,9 +19980,9 @@ async function MC(e) {
|
|
|
19960
19980
|
keyFormatValid: !1
|
|
19961
19981
|
};
|
|
19962
19982
|
}
|
|
19963
|
-
async function
|
|
19964
|
-
let t = await
|
|
19965
|
-
return
|
|
19983
|
+
async function LC(e) {
|
|
19984
|
+
let t = await cC(e, "frigatePlusTest", void 0);
|
|
19985
|
+
return lC(t) ? {
|
|
19966
19986
|
ok: t.ok === !0,
|
|
19967
19987
|
...typeof t.error == "string" ? { error: t.error } : {}
|
|
19968
19988
|
} : {
|
|
@@ -19970,70 +19990,70 @@ async function NC(e) {
|
|
|
19970
19990
|
error: "unexpected response"
|
|
19971
19991
|
};
|
|
19972
19992
|
}
|
|
19973
|
-
async function
|
|
19974
|
-
let t = await
|
|
19975
|
-
return Array.isArray(t) ?
|
|
19993
|
+
async function RC(e) {
|
|
19994
|
+
let t = await cC(e, "frigatePlusListModels", void 0);
|
|
19995
|
+
return Array.isArray(t) ? uC(IS, t, "frigatePlusListModels") : [];
|
|
19976
19996
|
}
|
|
19977
|
-
async function
|
|
19978
|
-
let n = await
|
|
19979
|
-
if (!
|
|
19997
|
+
async function zC(e, t) {
|
|
19998
|
+
let n = await cC(e, "importFrigatePlusModel", t);
|
|
19999
|
+
if (!lC(n)) throw Error("importFrigatePlusModel: unexpected response shape");
|
|
19980
20000
|
return {
|
|
19981
|
-
modelId:
|
|
20001
|
+
modelId: AC(n, "modelId"),
|
|
19982
20002
|
bytes: typeof n.bytes == "number" ? n.bytes : 0,
|
|
19983
|
-
conversions:
|
|
20003
|
+
conversions: gC(n.conversions)
|
|
19984
20004
|
};
|
|
19985
20005
|
}
|
|
19986
|
-
async function
|
|
19987
|
-
await
|
|
19988
|
-
addonId:
|
|
20006
|
+
async function BC(e, t) {
|
|
20007
|
+
await oC(e).addonSettings.updateGlobalSettings.mutate({
|
|
20008
|
+
addonId: aC,
|
|
19989
20009
|
patch: { frigatePlusApiKey: t }
|
|
19990
20010
|
});
|
|
19991
20011
|
}
|
|
19992
|
-
function
|
|
19993
|
-
return
|
|
20012
|
+
function VC(e) {
|
|
20013
|
+
return lC(e) && Array.isArray(e.devices);
|
|
19994
20014
|
}
|
|
19995
|
-
async function
|
|
19996
|
-
let n = await
|
|
19997
|
-
return
|
|
20015
|
+
async function HC(e, t) {
|
|
20016
|
+
let n = await oC(e).pipelineOrchestrator.getNodeInferenceDevices.query({ nodeId: t });
|
|
20017
|
+
return VC(n) ? n.devices : [];
|
|
19998
20018
|
}
|
|
19999
|
-
async function
|
|
20000
|
-
let n = await
|
|
20001
|
-
return
|
|
20019
|
+
async function UC(e, t) {
|
|
20020
|
+
let n = await oC(e).pipelineExecutor.listLoadedEngines.query({ nodeId: t });
|
|
20021
|
+
return dC(Re.methods.listLoadedEngines.output, n, "listLoadedEngines");
|
|
20002
20022
|
}
|
|
20003
|
-
async function
|
|
20004
|
-
await
|
|
20023
|
+
async function WC(e, t) {
|
|
20024
|
+
await oC(e).pipelineOrchestrator.setAgentInferenceDevices.mutate(t);
|
|
20005
20025
|
}
|
|
20006
|
-
async function
|
|
20007
|
-
return ce(await
|
|
20026
|
+
async function GC(e) {
|
|
20027
|
+
return ce(await oC(e).addonSettings.getGlobalSettings.query({ addonId: "pipeline-orchestrator" }));
|
|
20008
20028
|
}
|
|
20009
|
-
async function
|
|
20010
|
-
await
|
|
20029
|
+
async function KC(e, t) {
|
|
20030
|
+
await oC(e).addonSettings.updateGlobalSettings.mutate({
|
|
20011
20031
|
addonId: "pipeline-orchestrator",
|
|
20012
20032
|
patch: t
|
|
20013
20033
|
});
|
|
20014
20034
|
}
|
|
20015
|
-
function
|
|
20016
|
-
return
|
|
20035
|
+
function qC(e) {
|
|
20036
|
+
return lC(e) && Array.isArray(e.slots);
|
|
20017
20037
|
}
|
|
20018
|
-
async function
|
|
20019
|
-
let r = await
|
|
20020
|
-
if (!
|
|
20038
|
+
async function JC(e, t, n) {
|
|
20039
|
+
let r = await xC(e).query(n === void 0 ? void 0 : { nodeId: n });
|
|
20040
|
+
if (!qC(r)) return null;
|
|
20021
20041
|
for (let e of r.slots) for (let n of e.addons) if (n.id === t) return n;
|
|
20022
20042
|
return null;
|
|
20023
20043
|
}
|
|
20024
|
-
async function
|
|
20025
|
-
let t = await
|
|
20026
|
-
return !
|
|
20044
|
+
async function YC(e) {
|
|
20045
|
+
let t = await cC(e, "tfliteSupport", {});
|
|
20046
|
+
return !lC(t) || !Array.isArray(t.nodes) ? [] : t.nodes.filter((e) => typeof e == "string");
|
|
20027
20047
|
}
|
|
20028
|
-
async function
|
|
20029
|
-
let t = await
|
|
20030
|
-
return !
|
|
20048
|
+
async function XC(e) {
|
|
20049
|
+
let t = await cC(e, "listScryptedCatalog", void 0);
|
|
20050
|
+
return !lC(t) || !Array.isArray(t.entries) || !Array.isArray(t.drift) ? {
|
|
20031
20051
|
entries: [],
|
|
20032
20052
|
drift: []
|
|
20033
20053
|
} : {
|
|
20034
|
-
entries:
|
|
20035
|
-
drift: t.drift.filter(
|
|
20036
|
-
let t =
|
|
20054
|
+
entries: uC(NS, t.entries, "listScryptedCatalog.entries"),
|
|
20055
|
+
drift: t.drift.filter(lC).map((e) => {
|
|
20056
|
+
let t = DS({
|
|
20037
20057
|
manifestId: typeof e.manifestId == "string" ? e.manifestId : "",
|
|
20038
20058
|
status: typeof e.status == "string" ? e.status : "",
|
|
20039
20059
|
...typeof e.details == "string" ? { details: e.details } : {}
|
|
@@ -20046,8 +20066,8 @@ async function KC(e) {
|
|
|
20046
20066
|
})
|
|
20047
20067
|
};
|
|
20048
20068
|
}
|
|
20049
|
-
async function
|
|
20050
|
-
return
|
|
20069
|
+
async function ZC(e, t) {
|
|
20070
|
+
return dC(pe, await cC(e, "importScryptedCatalogModel", {
|
|
20051
20071
|
manifestId: t.manifestId,
|
|
20052
20072
|
...t.name === void 0 ? {} : { name: t.name },
|
|
20053
20073
|
...t.targetNodeId === void 0 ? {} : { targetNodeId: t.targetNodeId }
|
|
@@ -20055,7 +20075,7 @@ async function qC(e, t) {
|
|
|
20055
20075
|
}
|
|
20056
20076
|
//#endregion
|
|
20057
20077
|
//#region src/components/NodeSelector.tsx
|
|
20058
|
-
function
|
|
20078
|
+
function QC({ selectedNodeId: e, onSelect: t }) {
|
|
20059
20079
|
return /* @__PURE__ */ z(Xx, {
|
|
20060
20080
|
selectedNodeId: e,
|
|
20061
20081
|
onSelect: t,
|
|
@@ -20065,7 +20085,7 @@ function JC({ selectedNodeId: e, onSelect: t }) {
|
|
|
20065
20085
|
}
|
|
20066
20086
|
//#endregion
|
|
20067
20087
|
//#region src/components/Form.tsx
|
|
20068
|
-
function
|
|
20088
|
+
function $C({ label: e, children: t }) {
|
|
20069
20089
|
return /* @__PURE__ */ B("label", {
|
|
20070
20090
|
className: "space-y-1 block",
|
|
20071
20091
|
children: [/* @__PURE__ */ z("span", {
|
|
@@ -20074,8 +20094,8 @@ function YC({ label: e, children: t }) {
|
|
|
20074
20094
|
}), t]
|
|
20075
20095
|
});
|
|
20076
20096
|
}
|
|
20077
|
-
function
|
|
20078
|
-
return /* @__PURE__ */ z(
|
|
20097
|
+
function ew({ label: e, value: t, onChange: n, placeholder: r }) {
|
|
20098
|
+
return /* @__PURE__ */ z($C, {
|
|
20079
20099
|
label: e,
|
|
20080
20100
|
children: /* @__PURE__ */ z("input", {
|
|
20081
20101
|
type: "text",
|
|
@@ -20086,8 +20106,8 @@ function XC({ label: e, value: t, onChange: n, placeholder: r }) {
|
|
|
20086
20106
|
})
|
|
20087
20107
|
});
|
|
20088
20108
|
}
|
|
20089
|
-
function
|
|
20090
|
-
return /* @__PURE__ */ z(
|
|
20109
|
+
function tw({ label: e, value: t, onChange: n, min: r, max: i, step: a }) {
|
|
20110
|
+
return /* @__PURE__ */ z($C, {
|
|
20091
20111
|
label: e,
|
|
20092
20112
|
children: /* @__PURE__ */ z("input", {
|
|
20093
20113
|
type: "number",
|
|
@@ -20105,14 +20125,14 @@ function ZC({ label: e, value: t, onChange: n, min: r, max: i, step: a }) {
|
|
|
20105
20125
|
}
|
|
20106
20126
|
//#endregion
|
|
20107
20127
|
//#region src/components/ImportProgressModal.tsx
|
|
20108
|
-
var
|
|
20128
|
+
var nw = {
|
|
20109
20129
|
pending: "bg-surface-hover",
|
|
20110
20130
|
active: "bg-warning animate-pulse",
|
|
20111
20131
|
done: "bg-success",
|
|
20112
20132
|
error: "bg-danger",
|
|
20113
20133
|
skipped: "bg-surface-hover"
|
|
20114
20134
|
};
|
|
20115
|
-
function
|
|
20135
|
+
function rw({ title: e, steps: t, progress: n, logs: r, status: i, errorMessage: a, onClose: o }) {
|
|
20116
20136
|
return /* @__PURE__ */ z("div", {
|
|
20117
20137
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",
|
|
20118
20138
|
role: "dialog",
|
|
@@ -20142,7 +20162,7 @@ function $C({ title: e, steps: t, progress: n, logs: r, status: i, errorMessage:
|
|
|
20142
20162
|
className: "space-y-1.5",
|
|
20143
20163
|
children: t.map((e) => /* @__PURE__ */ B("li", {
|
|
20144
20164
|
className: "flex items-center gap-2 text-xs",
|
|
20145
|
-
children: [/* @__PURE__ */ z("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${
|
|
20165
|
+
children: [/* @__PURE__ */ z("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${nw[e.status]}` }), /* @__PURE__ */ B("span", {
|
|
20146
20166
|
className: e.status === "active" ? "text-foreground font-medium" : e.status === "pending" || e.status === "skipped" ? "text-foreground-subtle" : "text-foreground",
|
|
20147
20167
|
children: [e.label, e.status === "skipped" ? " (skipped)" : ""]
|
|
20148
20168
|
})]
|
|
@@ -20187,7 +20207,7 @@ function $C({ title: e, steps: t, progress: n, logs: r, status: i, errorMessage:
|
|
|
20187
20207
|
})
|
|
20188
20208
|
});
|
|
20189
20209
|
}
|
|
20190
|
-
function
|
|
20210
|
+
function iw(e, t, n = 400) {
|
|
20191
20211
|
let r = t.log !== void 0 && t.log.length > 0 ? t.log : t.phase === "log" ? t.detail ?? "" : `[${t.phase}]${t.detail === void 0 ? "" : ` ${t.detail}`}${t.pct === void 0 ? "" : ` ${t.pct.toFixed(0)}%`}`;
|
|
20192
20212
|
if (r.trim().length === 0) return e;
|
|
20193
20213
|
let i = [...e, r];
|
|
@@ -20195,13 +20215,13 @@ function ew(e, t, n = 400) {
|
|
|
20195
20215
|
}
|
|
20196
20216
|
//#endregion
|
|
20197
20217
|
//#region src/ui/operation-sessions.ts
|
|
20198
|
-
var
|
|
20199
|
-
function
|
|
20200
|
-
for (let e of
|
|
20218
|
+
var aw = 80, ow = [], sw = /* @__PURE__ */ new Set();
|
|
20219
|
+
function cw() {
|
|
20220
|
+
for (let e of sw) e();
|
|
20201
20221
|
}
|
|
20202
|
-
function
|
|
20222
|
+
function lw(e) {
|
|
20203
20223
|
let t = `op-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
20204
|
-
return
|
|
20224
|
+
return ow = [{
|
|
20205
20225
|
id: t,
|
|
20206
20226
|
kind: e.kind,
|
|
20207
20227
|
title: e.title,
|
|
@@ -20211,40 +20231,40 @@ function aw(e) {
|
|
|
20211
20231
|
status: "running",
|
|
20212
20232
|
logs: e.logs ?? [],
|
|
20213
20233
|
startedAt: Date.now()
|
|
20214
|
-
}, ...
|
|
20234
|
+
}, ...ow].slice(0, aw), cw(), t;
|
|
20215
20235
|
}
|
|
20216
|
-
function
|
|
20217
|
-
|
|
20236
|
+
function uw(e, t) {
|
|
20237
|
+
ow = ow.map((n) => n.id === e ? {
|
|
20218
20238
|
...n,
|
|
20219
20239
|
logs: [...n.logs, t]
|
|
20220
|
-
} : n),
|
|
20240
|
+
} : n), cw();
|
|
20221
20241
|
}
|
|
20222
|
-
function
|
|
20223
|
-
|
|
20242
|
+
function dw(e, t) {
|
|
20243
|
+
ow = ow.map((n) => n.id === e ? {
|
|
20224
20244
|
...n,
|
|
20225
20245
|
status: t.status,
|
|
20226
20246
|
...t.errorMessage === void 0 ? {} : { errorMessage: t.errorMessage },
|
|
20227
20247
|
finishedAt: Date.now()
|
|
20228
|
-
} : n),
|
|
20248
|
+
} : n), cw();
|
|
20229
20249
|
}
|
|
20230
|
-
function
|
|
20231
|
-
|
|
20250
|
+
function fw(e, t) {
|
|
20251
|
+
ow = ow.map((n) => n.id === e ? {
|
|
20232
20252
|
...n,
|
|
20233
20253
|
logs: t
|
|
20234
|
-
} : n),
|
|
20254
|
+
} : n), cw();
|
|
20235
20255
|
}
|
|
20236
20256
|
//#endregion
|
|
20237
20257
|
//#region src/components/OperationModalProvider.tsx
|
|
20238
20258
|
t();
|
|
20239
|
-
var
|
|
20240
|
-
function
|
|
20241
|
-
let e = c(
|
|
20259
|
+
var pw = p(null);
|
|
20260
|
+
function mw() {
|
|
20261
|
+
let e = c(pw);
|
|
20242
20262
|
if (e === null) throw Error("useOperationModal: missing OperationModalProvider");
|
|
20243
20263
|
return e;
|
|
20244
20264
|
}
|
|
20245
|
-
function
|
|
20265
|
+
function hw({ children: e }) {
|
|
20246
20266
|
let [t, r] = a(null), i = n((e) => {
|
|
20247
|
-
let t = e.initialLog === void 0 ? [] : [e.initialLog], n =
|
|
20267
|
+
let t = e.initialLog === void 0 ? [] : [e.initialLog], n = lw({
|
|
20248
20268
|
kind: e.kind,
|
|
20249
20269
|
title: e.title,
|
|
20250
20270
|
...e.modelId === void 0 ? {} : { modelId: e.modelId },
|
|
@@ -20266,27 +20286,27 @@ function dw({ children: e }) {
|
|
|
20266
20286
|
steps: t([...n.steps])
|
|
20267
20287
|
});
|
|
20268
20288
|
}, []), s = n((e, t) => {
|
|
20269
|
-
|
|
20289
|
+
uw(e, t), r((n) => n === null || n.sessionId !== e ? n : {
|
|
20270
20290
|
...n,
|
|
20271
20291
|
logs: [...n.logs, t]
|
|
20272
20292
|
});
|
|
20273
20293
|
}, []), c = n((e, t) => {
|
|
20274
20294
|
r((n) => {
|
|
20275
20295
|
if (n === null || n.sessionId !== e) return n;
|
|
20276
|
-
let r =
|
|
20277
|
-
return
|
|
20296
|
+
let r = iw(n.logs, t);
|
|
20297
|
+
return fw(e, r), {
|
|
20278
20298
|
...n,
|
|
20279
20299
|
progress: t.phase === "log" ? n.progress : t,
|
|
20280
20300
|
logs: r
|
|
20281
20301
|
};
|
|
20282
20302
|
});
|
|
20283
20303
|
}, []), u = n((e) => {
|
|
20284
|
-
|
|
20304
|
+
dw(e, { status: "success" }), r((t) => t !== null && t.sessionId === e ? {
|
|
20285
20305
|
...t,
|
|
20286
20306
|
status: "success"
|
|
20287
20307
|
} : t);
|
|
20288
20308
|
}, []), d = n((e, t) => {
|
|
20289
|
-
|
|
20309
|
+
dw(e, {
|
|
20290
20310
|
status: "error",
|
|
20291
20311
|
errorMessage: t
|
|
20292
20312
|
}), r((n) => n !== null && n.sessionId === e ? {
|
|
@@ -20331,9 +20351,9 @@ function dw({ children: e }) {
|
|
|
20331
20351
|
d,
|
|
20332
20352
|
f
|
|
20333
20353
|
]);
|
|
20334
|
-
return /* @__PURE__ */ B(
|
|
20354
|
+
return /* @__PURE__ */ B(pw.Provider, {
|
|
20335
20355
|
value: p,
|
|
20336
|
-
children: [e, t !== null && /* @__PURE__ */ z(
|
|
20356
|
+
children: [e, t !== null && /* @__PURE__ */ z(rw, {
|
|
20337
20357
|
title: t.title,
|
|
20338
20358
|
steps: t.steps,
|
|
20339
20359
|
progress: t.progress,
|
|
@@ -20346,22 +20366,22 @@ function dw({ children: e }) {
|
|
|
20346
20366
|
}
|
|
20347
20367
|
//#endregion
|
|
20348
20368
|
//#region src/scrypted/scrypted-catalog-selectors.ts
|
|
20349
|
-
function
|
|
20369
|
+
function gw(e) {
|
|
20350
20370
|
return typeof e == "string" ? e.includes("x") || e.includes("×") ? e.replace("×", "x") : e : `${e.width}x${e.height}`;
|
|
20351
20371
|
}
|
|
20352
|
-
function
|
|
20372
|
+
function _w(e, t) {
|
|
20353
20373
|
return e.find((e) => e.manifestId === t)?.status;
|
|
20354
20374
|
}
|
|
20355
|
-
function
|
|
20375
|
+
function vw(e) {
|
|
20356
20376
|
if (e.imported) return "Already imported on this hub.";
|
|
20357
20377
|
if (e.registryKnown, e.availabilityKnown, e.driftStatus !== "ok") return e.driftStatus === "missing" ? "Import blocked: remote artifact is missing from the verified tree." : e.driftStatus === "size-changed" ? "Import blocked: remote artifact size no longer matches the verified manifesto." : e.driftStatus === "unavailable" ? "Import blocked: catalog drift is unavailable and cannot be verified." : "Import blocked: catalog drift is unknown and cannot be verified.";
|
|
20358
20378
|
}
|
|
20359
|
-
function
|
|
20379
|
+
function yw(e, t) {
|
|
20360
20380
|
return "has" in e ? e.has(t) : e.includes(t);
|
|
20361
20381
|
}
|
|
20362
20382
|
//#endregion
|
|
20363
20383
|
//#region src/scrypted/scrypted-canonical.ts
|
|
20364
|
-
var
|
|
20384
|
+
var bw = [
|
|
20365
20385
|
"edgetpu",
|
|
20366
20386
|
"int8",
|
|
20367
20387
|
"full_integer_quant",
|
|
@@ -20369,99 +20389,99 @@ var gw = [
|
|
|
20369
20389
|
"float16",
|
|
20370
20390
|
"float32"
|
|
20371
20391
|
];
|
|
20372
|
-
function
|
|
20392
|
+
function xw(e) {
|
|
20373
20393
|
return /^yolov9([tsmc])$/i.exec(e)?.[1]?.toLowerCase() ?? e;
|
|
20374
20394
|
}
|
|
20375
|
-
function
|
|
20395
|
+
function Sw(e) {
|
|
20376
20396
|
let t = e.toLowerCase();
|
|
20377
20397
|
return t === "int8" || t === "uint8" || t === "integer_quant" || t === "full_integer_quant" || t === "edgetpu";
|
|
20378
20398
|
}
|
|
20379
|
-
function
|
|
20380
|
-
let t =
|
|
20381
|
-
return
|
|
20399
|
+
function Cw(e) {
|
|
20400
|
+
let t = xw(e.family), n = e.inputSize.width === e.inputSize.height ? e.inputSize.width : Math.max(e.inputSize.width, e.inputSize.height), r = `scrypted-yolov9${t}-${e.variant}`;
|
|
20401
|
+
return Sw(e.precision) && (r += "-int8"), r += `-${n}`, r;
|
|
20382
20402
|
}
|
|
20383
|
-
function
|
|
20384
|
-
let t =
|
|
20403
|
+
function ww(e) {
|
|
20404
|
+
let t = TS.filter((t) => t.format === "tflite" && Cw(t) === e);
|
|
20385
20405
|
if (t.length !== 0) return t.toSorted((e, t) => {
|
|
20386
|
-
let n =
|
|
20406
|
+
let n = bw.indexOf(e.precision.toLowerCase()), r = bw.indexOf(t.precision.toLowerCase());
|
|
20387
20407
|
return (n === -1 ? 99 : n) - (r === -1 ? 99 : r);
|
|
20388
20408
|
})[0];
|
|
20389
20409
|
}
|
|
20390
|
-
function
|
|
20391
|
-
if (t === "tflite") return
|
|
20392
|
-
let n =
|
|
20410
|
+
function Tw(e, t) {
|
|
20411
|
+
if (t === "tflite") return ww(e)?.id;
|
|
20412
|
+
let n = TS.filter((n) => n.format === t && Cw(n) === e);
|
|
20393
20413
|
if (n.length !== 0) return n.toSorted((e, t) => e.files.reduce((e, t) => e + t.size, 0) - t.files.reduce((e, t) => e + t.size, 0))[0]?.id;
|
|
20394
20414
|
}
|
|
20395
20415
|
//#endregion
|
|
20396
20416
|
//#region src/scrypted/scrypted-as-variant-sources.ts
|
|
20397
|
-
var
|
|
20417
|
+
var Ew = new Set([
|
|
20398
20418
|
"onnx",
|
|
20399
20419
|
"openvino",
|
|
20400
20420
|
"coreml",
|
|
20401
20421
|
"tflite",
|
|
20402
20422
|
"pt"
|
|
20403
|
-
]),
|
|
20423
|
+
]), Dw = {
|
|
20404
20424
|
t: "Tiny",
|
|
20405
20425
|
s: "Small",
|
|
20406
20426
|
m: "Medium",
|
|
20407
20427
|
c: "Compact"
|
|
20408
20428
|
};
|
|
20409
|
-
function
|
|
20410
|
-
return
|
|
20429
|
+
function Ow(e) {
|
|
20430
|
+
return Ew.has(e);
|
|
20411
20431
|
}
|
|
20412
|
-
function
|
|
20432
|
+
function kw(e) {
|
|
20413
20433
|
return /^yolov9([tsmc])$/i.exec(e)?.[1]?.toLowerCase() ?? e;
|
|
20414
20434
|
}
|
|
20415
|
-
function
|
|
20435
|
+
function Aw(e) {
|
|
20416
20436
|
let t = e.toLowerCase();
|
|
20417
20437
|
return t === "int8" || t === "uint8" || t === "integer_quant" || t === "full_integer_quant" || t === "edgetpu" ? "int8" : "fp32";
|
|
20418
20438
|
}
|
|
20419
|
-
function
|
|
20420
|
-
let t =
|
|
20439
|
+
function jw(e) {
|
|
20440
|
+
let t = gw(e.inputSize), n = /^(\d+)x(\d+)$/i.exec(t);
|
|
20421
20441
|
if (!n) return;
|
|
20422
20442
|
let r = Number(n[1]), i = Number(n[2]);
|
|
20423
20443
|
if (!(!Number.isFinite(r) || !Number.isFinite(i))) return r === i ? r : Math.max(r, i);
|
|
20424
20444
|
}
|
|
20425
|
-
function
|
|
20445
|
+
function Mw(e) {
|
|
20426
20446
|
let t = e.model.formats[e.format]?.sizeMB;
|
|
20427
20447
|
return typeof t == "number" && t > 0 ? t : e.files.reduce((e, t) => e + t.size, 0) / 1e6;
|
|
20428
20448
|
}
|
|
20429
|
-
function
|
|
20430
|
-
let n =
|
|
20449
|
+
function Nw(e, t) {
|
|
20450
|
+
let n = Dw[e] ?? e.toUpperCase();
|
|
20431
20451
|
return t === "int8" ? `YOLOv9 ${n} · Int8` : `YOLOv9 ${n}`;
|
|
20432
20452
|
}
|
|
20433
|
-
function
|
|
20453
|
+
function Pw(e) {
|
|
20434
20454
|
return [
|
|
20435
20455
|
"yolov9",
|
|
20436
|
-
|
|
20456
|
+
kw(e.family),
|
|
20437
20457
|
e.variant,
|
|
20438
|
-
|
|
20439
|
-
String(
|
|
20458
|
+
Aw(e.precision),
|
|
20459
|
+
String(jw(e) ?? "")
|
|
20440
20460
|
].join("|");
|
|
20441
20461
|
}
|
|
20442
|
-
function
|
|
20443
|
-
return
|
|
20462
|
+
function Fw(e) {
|
|
20463
|
+
return Cw(e);
|
|
20444
20464
|
}
|
|
20445
|
-
function
|
|
20465
|
+
function Iw(e) {
|
|
20446
20466
|
let t = /* @__PURE__ */ new Map();
|
|
20447
20467
|
for (let n of e) {
|
|
20448
|
-
if (!
|
|
20449
|
-
let e =
|
|
20468
|
+
if (!Ow(n.format)) continue;
|
|
20469
|
+
let e = kw(n.family), r = Aw(n.precision), i = Pw(n), a = Mw(n), o = t.get(i);
|
|
20450
20470
|
if (o) {
|
|
20451
20471
|
let e = o.formats[n.format];
|
|
20452
20472
|
(e === void 0 || a < e.sizeMB) && (o.formats[n.format] = { sizeMB: a });
|
|
20453
20473
|
continue;
|
|
20454
20474
|
}
|
|
20455
20475
|
t.set(i, {
|
|
20456
|
-
sourceId:
|
|
20457
|
-
name:
|
|
20476
|
+
sourceId: Fw(n),
|
|
20477
|
+
name: Nw(e, r),
|
|
20458
20478
|
formats: { [n.format]: { sizeMB: a } },
|
|
20459
20479
|
group: {
|
|
20460
20480
|
family: "yolov9",
|
|
20461
20481
|
tier: e,
|
|
20462
20482
|
precision: r,
|
|
20463
20483
|
...n.variant === "relu_test" ? { optimization: "test" } : {},
|
|
20464
|
-
...
|
|
20484
|
+
...jw(n) === void 0 ? {} : { resolution: jw(n) }
|
|
20465
20485
|
}
|
|
20466
20486
|
});
|
|
20467
20487
|
}
|
|
@@ -20474,18 +20494,18 @@ function Mw(e) {
|
|
|
20474
20494
|
}
|
|
20475
20495
|
//#endregion
|
|
20476
20496
|
//#region src/components/register-shared.tsx
|
|
20477
|
-
var
|
|
20478
|
-
function
|
|
20497
|
+
var Lw = "w-full px-3 py-1.5 text-xs rounded-md border border-border bg-surface text-foreground focus:outline-none focus:border-primary/50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary motion-reduce:transition-none disabled:opacity-50";
|
|
20498
|
+
function Rw(e) {
|
|
20479
20499
|
return e.count === void 0 ? e.label : `${e.label} (${e.count})`;
|
|
20480
20500
|
}
|
|
20481
|
-
function
|
|
20482
|
-
return n.length === 0 ? null : o && n.length === 1 ? c ? /* @__PURE__ */ z(it, { children: c }) : null : /* @__PURE__ */ B(
|
|
20501
|
+
function zw({ label: e, value: t, options: n, onChange: r, disabled: i = !1, placeholder: a = "Select…", compactWhenSingle: o = !1, formatOption: s = Rw, hint: c }) {
|
|
20502
|
+
return n.length === 0 ? null : o && n.length === 1 ? c ? /* @__PURE__ */ z(it, { children: c }) : null : /* @__PURE__ */ B($C, {
|
|
20483
20503
|
label: e,
|
|
20484
20504
|
children: [/* @__PURE__ */ B("select", {
|
|
20485
20505
|
value: t,
|
|
20486
20506
|
onChange: (e) => r(e.target.value),
|
|
20487
20507
|
disabled: i || n.length === 0,
|
|
20488
|
-
className:
|
|
20508
|
+
className: Lw,
|
|
20489
20509
|
children: [t === "" && /* @__PURE__ */ z("option", {
|
|
20490
20510
|
value: "",
|
|
20491
20511
|
disabled: !0,
|
|
@@ -20500,7 +20520,7 @@ function Fw({ label: e, value: t, options: n, onChange: r, disabled: i = !1, pla
|
|
|
20500
20520
|
//#endregion
|
|
20501
20521
|
//#region src/components/SourceModelBrowser.tsx
|
|
20502
20522
|
t();
|
|
20503
|
-
function
|
|
20523
|
+
function Bw({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i, subtitle: o, actionRow: s, renderActionRow: c, footer: l, emptyMessage: u = "No models match the current filters.", testId: d = "source-model-browser" }) {
|
|
20504
20524
|
let f = Je(t), [p, m] = a({});
|
|
20505
20525
|
return /* @__PURE__ */ B("div", {
|
|
20506
20526
|
className: "space-y-3",
|
|
@@ -20509,7 +20529,7 @@ function Iw({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i,
|
|
|
20509
20529
|
e.length > 0 && /* @__PURE__ */ z("div", {
|
|
20510
20530
|
className: "space-y-3",
|
|
20511
20531
|
"data-testid": "source-pre-selectors",
|
|
20512
|
-
children: e.map((e) => /* @__PURE__ */ z(
|
|
20532
|
+
children: e.map((e) => /* @__PURE__ */ z(zw, {
|
|
20513
20533
|
label: e.label,
|
|
20514
20534
|
value: e.value,
|
|
20515
20535
|
options: e.options,
|
|
@@ -20560,22 +20580,22 @@ function Iw({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i,
|
|
|
20560
20580
|
}
|
|
20561
20581
|
//#endregion
|
|
20562
20582
|
//#region src/components/FormatImportRow.tsx
|
|
20563
|
-
var
|
|
20583
|
+
var Vw = {
|
|
20564
20584
|
onnx: "ONNX",
|
|
20565
20585
|
openvino: "OpenVINO",
|
|
20566
20586
|
coreml: "CoreML",
|
|
20567
20587
|
tflite: "TFLite",
|
|
20568
20588
|
pt: "PyTorch"
|
|
20569
20589
|
};
|
|
20570
|
-
function
|
|
20571
|
-
let c = (e) => n === void 0 ? t === null ? !1 :
|
|
20590
|
+
function Hw({ entries: e, registeredIds: t, isImported: n, presence: r = [], busyId: i, onImport: a, onDistributeAll: o, distributeBusy: s = !1 }) {
|
|
20591
|
+
let c = (e) => n === void 0 ? t === null ? !1 : yw(t, e.id) : n(e), l = t !== null && e.some((e) => c(e));
|
|
20572
20592
|
return /* @__PURE__ */ B("div", {
|
|
20573
20593
|
className: "space-y-2 pt-1",
|
|
20574
20594
|
children: [
|
|
20575
20595
|
/* @__PURE__ */ z("div", {
|
|
20576
20596
|
className: "flex flex-wrap gap-2",
|
|
20577
20597
|
children: e.map((e) => {
|
|
20578
|
-
let n = c(e), r =
|
|
20598
|
+
let n = c(e), r = vw({
|
|
20579
20599
|
driftStatus: e.driftStatus ?? "ok",
|
|
20580
20600
|
imported: n,
|
|
20581
20601
|
registryKnown: t !== null
|
|
@@ -20585,11 +20605,11 @@ function Rw({ entries: e, registeredIds: t, isImported: n, presence: r = [], bus
|
|
|
20585
20605
|
children: [
|
|
20586
20606
|
/* @__PURE__ */ z("span", {
|
|
20587
20607
|
className: "font-mono text-foreground",
|
|
20588
|
-
children:
|
|
20608
|
+
children: Vw[e.format] ?? e.format
|
|
20589
20609
|
}),
|
|
20590
20610
|
typeof e.sizeMB == "number" && /* @__PURE__ */ z("span", {
|
|
20591
20611
|
className: "text-foreground-subtle",
|
|
20592
|
-
children:
|
|
20612
|
+
children: iC(e.sizeMB)
|
|
20593
20613
|
}),
|
|
20594
20614
|
n ? /* @__PURE__ */ z("span", {
|
|
20595
20615
|
className: "text-success",
|
|
@@ -20636,11 +20656,11 @@ function Rw({ entries: e, registeredIds: t, isImported: n, presence: r = [], bus
|
|
|
20636
20656
|
}
|
|
20637
20657
|
//#endregion
|
|
20638
20658
|
//#region src/components/DisplayNameField.tsx
|
|
20639
|
-
function
|
|
20640
|
-
let r =
|
|
20659
|
+
function Uw({ value: e, onChange: t, defaultName: n }) {
|
|
20660
|
+
let r = RS(e);
|
|
20641
20661
|
return /* @__PURE__ */ B("div", {
|
|
20642
20662
|
className: "space-y-1",
|
|
20643
|
-
children: [/* @__PURE__ */ z(
|
|
20663
|
+
children: [/* @__PURE__ */ z($C, {
|
|
20644
20664
|
label: "Display name (optional)",
|
|
20645
20665
|
children: /* @__PURE__ */ z("input", {
|
|
20646
20666
|
type: "text",
|
|
@@ -20656,40 +20676,40 @@ function zw({ value: e, onChange: t, defaultName: n }) {
|
|
|
20656
20676
|
})]
|
|
20657
20677
|
});
|
|
20658
20678
|
}
|
|
20659
|
-
function
|
|
20660
|
-
let t =
|
|
20679
|
+
function Ww(e) {
|
|
20680
|
+
let t = RS(e);
|
|
20661
20681
|
return t.kind === "set" ? t.name : void 0;
|
|
20662
20682
|
}
|
|
20663
|
-
function
|
|
20664
|
-
return
|
|
20683
|
+
function Gw(e) {
|
|
20684
|
+
return RS(e).kind === "invalid";
|
|
20665
20685
|
}
|
|
20666
20686
|
//#endregion
|
|
20667
20687
|
//#region src/tabs/ScryptedTab.tsx
|
|
20668
20688
|
t();
|
|
20669
|
-
var
|
|
20689
|
+
var Kw = [
|
|
20670
20690
|
"onnx",
|
|
20671
20691
|
"openvino",
|
|
20672
20692
|
"coreml",
|
|
20673
20693
|
"tflite"
|
|
20674
|
-
],
|
|
20694
|
+
], qw = [{
|
|
20675
20695
|
value: "relu",
|
|
20676
20696
|
label: "Standard"
|
|
20677
20697
|
}, {
|
|
20678
20698
|
value: "relu_test",
|
|
20679
20699
|
label: "Test"
|
|
20680
20700
|
}];
|
|
20681
|
-
function
|
|
20682
|
-
let i =
|
|
20701
|
+
function Jw({ trpc: e, landNodeId: t, onImported: r }) {
|
|
20702
|
+
let i = mw(), [s, c] = a(null), [u, d] = a([]), [f, p] = a(null), [h, g] = a({}), [_, v] = a({}), [y, b] = a(null), [x, S] = a(null), [C, w] = a(null), [T, E] = a("relu"), [D, O] = a(""), [k, ee] = a(""), [A, te] = a(null), [j, ne] = a(""), re = o(0), M = o(!1), ie = t !== void 0 && t.length > 0 ? t : j.length > 0 ? j : void 0, ae = n(async () => {
|
|
20683
20703
|
let t = ++re.current;
|
|
20684
20704
|
b(null);
|
|
20685
20705
|
try {
|
|
20686
|
-
let n =
|
|
20706
|
+
let n = XC(e), r = mC(e).then((e) => ({
|
|
20687
20707
|
ok: !0,
|
|
20688
20708
|
value: e
|
|
20689
|
-
}), () => ({ ok: !1 })), i =
|
|
20709
|
+
}), () => ({ ok: !1 })), i = hC(e).then((e) => ({
|
|
20690
20710
|
ok: !0,
|
|
20691
20711
|
value: e
|
|
20692
|
-
}), () => ({ ok: !1 })), a =
|
|
20712
|
+
}), () => ({ ok: !1 })), a = YC(e).then((e) => e, () => []), [o, s, l, u] = await Promise.all([
|
|
20693
20713
|
n,
|
|
20694
20714
|
r,
|
|
20695
20715
|
i,
|
|
@@ -20699,12 +20719,12 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20699
20719
|
if (c(o.entries), d(o.drift), te(u), u.length > 0 && ne((e) => e.length > 0 && u.includes(e) ? e : u[0]), s.ok) {
|
|
20700
20720
|
p(new Set(s.value.map((e) => e.entry.id)));
|
|
20701
20721
|
let e = {};
|
|
20702
|
-
for (let t of s.value) e[t.entry.id] =
|
|
20722
|
+
for (let t of s.value) e[t.entry.id] = US(t.entry);
|
|
20703
20723
|
g(e);
|
|
20704
20724
|
} else p(null), g({});
|
|
20705
20725
|
if (l.ok && s.ok) {
|
|
20706
20726
|
let e = {};
|
|
20707
|
-
for (let t of s.value) e[t.entry.id] =
|
|
20727
|
+
for (let t of s.value) e[t.entry.id] = WS(l.value, t.entry.id);
|
|
20708
20728
|
v(e);
|
|
20709
20729
|
} else v({});
|
|
20710
20730
|
} catch (e) {
|
|
@@ -20715,9 +20735,9 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20715
20735
|
m(() => {
|
|
20716
20736
|
ae();
|
|
20717
20737
|
}, [ae]);
|
|
20718
|
-
let oe = l(() => (s ?? []).filter((e) => e.variant === T), [s, T]), se = l(() =>
|
|
20719
|
-
if (M.current ||
|
|
20720
|
-
let a =
|
|
20738
|
+
let oe = l(() => (s ?? []).filter((e) => e.variant === T), [s, T]), se = l(() => Iw(oe), [oe]), N = l(() => new Map(se.map((e) => [e.id, e])), [se]), P = D.length > 0 && N.has(D) ? D : se[0]?.id ?? "", ce = n(async (n) => {
|
|
20739
|
+
if (M.current || Gw(k)) return;
|
|
20740
|
+
let a = Ww(k);
|
|
20721
20741
|
M.current = !0, S(n.id), w(null);
|
|
20722
20742
|
let o = n.format === "tflite" ? ie : t !== void 0 && t.length > 0 ? t : void 0;
|
|
20723
20743
|
try {
|
|
@@ -20738,18 +20758,18 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20738
20758
|
}]],
|
|
20739
20759
|
initialLog: `Starting ${n.format} import for ${n.canonicalId}…`
|
|
20740
20760
|
}, async ({ appendLog: t, patchSteps: r }) => {
|
|
20741
|
-
if (n.mode === "native") await
|
|
20761
|
+
if (n.mode === "native") await ZC(e, {
|
|
20742
20762
|
manifestId: n.manifestId,
|
|
20743
20763
|
...a === void 0 ? {} : { name: a },
|
|
20744
20764
|
...o === void 0 ? {} : { targetNodeId: o }
|
|
20745
20765
|
}), t(o === void 0 ? `Imported ${n.format} into the registry` : `Imported and landed on ${o}`);
|
|
20746
20766
|
else {
|
|
20747
20767
|
let r = f?.has(n.canonicalId) === !0, i = (h[n.canonicalId] ?? []).includes("onnx");
|
|
20748
|
-
(!r || !i) && (t("ONNX not present — importing first…"), await
|
|
20768
|
+
(!r || !i) && (t("ONNX not present — importing first…"), await ZC(e, {
|
|
20749
20769
|
manifestId: n.onnxManifestId,
|
|
20750
20770
|
...a === void 0 ? {} : { name: a },
|
|
20751
20771
|
...o === void 0 ? {} : { targetNodeId: o }
|
|
20752
|
-
})), t(`Converting ONNX → ${n.format}…`), await
|
|
20772
|
+
})), t(`Converting ONNX → ${n.format}…`), await bC(e, n.canonicalId, [n.format]), t(`Converted to ${n.format}`);
|
|
20753
20773
|
}
|
|
20754
20774
|
r((e) => e.map((e) => e.status === "active" || e.status === "pending" ? {
|
|
20755
20775
|
...e,
|
|
@@ -20790,7 +20810,7 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20790
20810
|
children: "Retry"
|
|
20791
20811
|
})]
|
|
20792
20812
|
});
|
|
20793
|
-
let le = N.get(P), F = le && s ?
|
|
20813
|
+
let le = N.get(P), F = le && s ? Zw({
|
|
20794
20814
|
filtered: oe,
|
|
20795
20815
|
drift: u,
|
|
20796
20816
|
sourceId: le.id
|
|
@@ -20838,14 +20858,14 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20838
20858
|
children: t
|
|
20839
20859
|
})]
|
|
20840
20860
|
}),
|
|
20841
|
-
/* @__PURE__ */ z(
|
|
20861
|
+
/* @__PURE__ */ z(Bw, {
|
|
20842
20862
|
testId: "scrypted-browser",
|
|
20843
20863
|
title: "YOLOv9",
|
|
20844
20864
|
preSelectors: [{
|
|
20845
20865
|
id: "variant",
|
|
20846
20866
|
label: "Variant",
|
|
20847
20867
|
value: T,
|
|
20848
|
-
options:
|
|
20868
|
+
options: qw.map((e) => ({
|
|
20849
20869
|
value: e.value,
|
|
20850
20870
|
label: e.label,
|
|
20851
20871
|
count: (s ?? []).filter((t) => t.variant === e.value).length
|
|
@@ -20861,11 +20881,11 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20861
20881
|
emptyMessage: "No Scrypted artifacts for this variant.",
|
|
20862
20882
|
actionRow: le && ue.length > 0 ? /* @__PURE__ */ B("div", {
|
|
20863
20883
|
className: "space-y-2",
|
|
20864
|
-
children: [/* @__PURE__ */ z(
|
|
20884
|
+
children: [/* @__PURE__ */ z(Uw, {
|
|
20865
20885
|
value: k,
|
|
20866
20886
|
onChange: ee,
|
|
20867
20887
|
defaultName: le.name
|
|
20868
|
-
}), /* @__PURE__ */ z(
|
|
20888
|
+
}), /* @__PURE__ */ z(Hw, {
|
|
20869
20889
|
entries: ue,
|
|
20870
20890
|
registeredIds: f,
|
|
20871
20891
|
isImported: (e) => {
|
|
@@ -20884,7 +20904,7 @@ function Ww({ trpc: e, landNodeId: t, onImported: r }) {
|
|
|
20884
20904
|
]
|
|
20885
20905
|
});
|
|
20886
20906
|
}
|
|
20887
|
-
var
|
|
20907
|
+
var Yw = [
|
|
20888
20908
|
"edgetpu",
|
|
20889
20909
|
"int8",
|
|
20890
20910
|
"full_integer_quant",
|
|
@@ -20892,25 +20912,25 @@ var Gw = [
|
|
|
20892
20912
|
"float16",
|
|
20893
20913
|
"float32"
|
|
20894
20914
|
];
|
|
20895
|
-
function
|
|
20915
|
+
function Xw(e, t, n) {
|
|
20896
20916
|
let r = e.filter((e) => e.format === t);
|
|
20897
20917
|
if (r.length !== 0) {
|
|
20898
20918
|
if (t === "tflite") {
|
|
20899
|
-
let e =
|
|
20919
|
+
let e = Tw(n, "tflite");
|
|
20900
20920
|
return (e === void 0 ? void 0 : r.find((t) => t.id === e)) || r.toSorted((e, t) => {
|
|
20901
|
-
let n =
|
|
20921
|
+
let n = Yw.indexOf(e.precision.toLowerCase()), r = Yw.indexOf(t.precision.toLowerCase());
|
|
20902
20922
|
return (n === -1 ? 99 : n) - (r === -1 ? 99 : r);
|
|
20903
20923
|
})[0];
|
|
20904
20924
|
}
|
|
20905
20925
|
return r.toSorted((e, t) => e.files.reduce((e, t) => e + t.size, 0) - t.files.reduce((e, t) => e + t.size, 0))[0];
|
|
20906
20926
|
}
|
|
20907
20927
|
}
|
|
20908
|
-
function
|
|
20909
|
-
let t = e.sourceId, n = e.filtered.filter((e) =>
|
|
20928
|
+
function Zw(e) {
|
|
20929
|
+
let t = e.sourceId, n = e.filtered.filter((e) => Fw(e) === t);
|
|
20910
20930
|
if (n.length === 0) return [];
|
|
20911
|
-
let r =
|
|
20912
|
-
for (let a of
|
|
20913
|
-
let o =
|
|
20931
|
+
let r = Xw(n, "onnx", t)?.id ?? Tw(t, "onnx"), i = [];
|
|
20932
|
+
for (let a of Kw) {
|
|
20933
|
+
let o = Xw(n, a, t);
|
|
20914
20934
|
if (o) {
|
|
20915
20935
|
i.push({
|
|
20916
20936
|
id: `${t}::${a}`,
|
|
@@ -20920,7 +20940,7 @@ function qw(e) {
|
|
|
20920
20940
|
canonicalId: t,
|
|
20921
20941
|
onnxManifestId: r ?? o.id,
|
|
20922
20942
|
sizeMB: o.model.formats[a]?.sizeMB,
|
|
20923
|
-
driftStatus:
|
|
20943
|
+
driftStatus: _w(e.drift, o.id)
|
|
20924
20944
|
});
|
|
20925
20945
|
continue;
|
|
20926
20946
|
}
|
|
@@ -20938,14 +20958,14 @@ function qw(e) {
|
|
|
20938
20958
|
}
|
|
20939
20959
|
//#endregion
|
|
20940
20960
|
//#region src/frigate/frigate-import.ts
|
|
20941
|
-
function
|
|
20961
|
+
function Qw(e, t) {
|
|
20942
20962
|
return {
|
|
20943
20963
|
family: e === "mobiledet" ? "ssdlite-mobiledet" : e,
|
|
20944
20964
|
tier: "default",
|
|
20945
20965
|
resolution: t
|
|
20946
20966
|
};
|
|
20947
20967
|
}
|
|
20948
|
-
var
|
|
20968
|
+
var $w = {
|
|
20949
20969
|
yolov9: {
|
|
20950
20970
|
type: "yolov9",
|
|
20951
20971
|
label: "YOLOv9 (ONNX)",
|
|
@@ -20974,7 +20994,7 @@ var Yw = {
|
|
|
20974
20994
|
notes: "SSDLite MobileDet, EdgeTPU-compiled full-integer TFLite (the Frigate default-model architecture). TFLite_Detection_PostProcess 4-tensor output, decoded by the ssd postprocessor. Requires a Coral (tflite format node)."
|
|
20975
20995
|
}
|
|
20976
20996
|
};
|
|
20977
|
-
function
|
|
20997
|
+
function eT(e) {
|
|
20978
20998
|
let t = e.includes("\n") || !e.includes(",") ? e.split("\n") : e.split(","), n = [];
|
|
20979
20999
|
for (let e of t) {
|
|
20980
21000
|
let t = e.trim();
|
|
@@ -20984,7 +21004,7 @@ function Xw(e) {
|
|
|
20984
21004
|
}
|
|
20985
21005
|
return n;
|
|
20986
21006
|
}
|
|
20987
|
-
var
|
|
21007
|
+
var tT = [{
|
|
20988
21008
|
id: "frigate-mobiledet-edgetpu",
|
|
20989
21009
|
label: "Frigate default — SSDLite MobileDet (EdgeTPU)",
|
|
20990
21010
|
format: "tflite",
|
|
@@ -20993,13 +21013,13 @@ var Zw = [{
|
|
|
20993
21013
|
inputSize: 320,
|
|
20994
21014
|
postprocessor: "ssd",
|
|
20995
21015
|
labels: /* @__PURE__ */ "person.bicycle.car.motorcycle.airplane.bus.train.car.boat.traffic light.fire hydrant.street sign.stop sign.parking meter.bench.bird.cat.dog.horse.sheep.cow.elephant.bear.zebra.giraffe.hat.backpack.umbrella.shoe.eye glasses.handbag.tie.suitcase.frisbee.skis.snowboard.sports ball.kite.baseball bat.baseball glove.skateboard.surfboard.tennis racket.bottle.plate.wine glass.cup.fork.knife.spoon.bowl.banana.apple.sandwich.orange.broccoli.carrot.hot dog.pizza.donut.cake.chair.couch.potted plant.bed.mirror.dining table.window.desk.toilet.door.tv.laptop.mouse.remote.keyboard.cell phone.microwave.oven.toaster.sink.refrigerator.blender.book.clock.vase.scissors.teddy bear.hair drier.toothbrush.hair brush".split("."),
|
|
20996
|
-
license:
|
|
21016
|
+
license: lS,
|
|
20997
21017
|
notes: "Frigate's default detection model (the one a stock Frigate + Coral install runs). EdgeTPU-compiled full-integer TFLite, 320×320, TFLite_Detection_PostProcess output → ssd decode. Requires a Coral (tflite format) node."
|
|
20998
|
-
}],
|
|
20999
|
-
function
|
|
21000
|
-
return
|
|
21018
|
+
}], nT = /^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}:[a-z0-9]{40}$/;
|
|
21019
|
+
function rT(e) {
|
|
21020
|
+
return nT.test(e);
|
|
21001
21021
|
}
|
|
21002
|
-
var
|
|
21022
|
+
var iT = {
|
|
21003
21023
|
n: "Nano",
|
|
21004
21024
|
t: "Tiny",
|
|
21005
21025
|
s: "Small",
|
|
@@ -21008,14 +21028,14 @@ var eT = {
|
|
|
21008
21028
|
l: "Large",
|
|
21009
21029
|
x: "Extra large"
|
|
21010
21030
|
};
|
|
21011
|
-
function
|
|
21031
|
+
function aT(e) {
|
|
21012
21032
|
let t = /^(yolov\d+)([a-z])$/.exec(e);
|
|
21013
21033
|
if (t !== null) {
|
|
21014
21034
|
let e = t[2];
|
|
21015
21035
|
return {
|
|
21016
21036
|
architecture: t[1],
|
|
21017
21037
|
weight: e,
|
|
21018
|
-
weightLabel:
|
|
21038
|
+
weightLabel: iT[e] ?? e.toUpperCase()
|
|
21019
21039
|
};
|
|
21020
21040
|
}
|
|
21021
21041
|
return {
|
|
@@ -21024,20 +21044,20 @@ function tT(e) {
|
|
|
21024
21044
|
weightLabel: ""
|
|
21025
21045
|
};
|
|
21026
21046
|
}
|
|
21027
|
-
function
|
|
21047
|
+
function oT(e) {
|
|
21028
21048
|
let t = e.supportedDetectors;
|
|
21029
|
-
return t.includes("onnx") || t.includes("openvino") ? "neural" : t.includes("edgetpu") ? "coral" : t.length === 0 ?
|
|
21049
|
+
return t.includes("onnx") || t.includes("openvino") ? "neural" : t.includes("edgetpu") ? "coral" : t.length === 0 ? pT(e.type).format === "tflite" ? "coral" : "neural" : null;
|
|
21030
21050
|
}
|
|
21031
|
-
function
|
|
21051
|
+
function sT(e) {
|
|
21032
21052
|
return e.width !== void 0 && e.height !== void 0 ? `${e.width}x${e.height}` : "";
|
|
21033
21053
|
}
|
|
21034
|
-
var
|
|
21035
|
-
function
|
|
21054
|
+
var cT = (e, t) => t.trainDate.localeCompare(e.trainDate);
|
|
21055
|
+
function lT(e, t) {
|
|
21036
21056
|
let n = /* @__PURE__ */ new Map();
|
|
21037
21057
|
for (let r of e) for (let e of t(r)) e !== "" && n.set(e, (n.get(e) ?? 0) + 1);
|
|
21038
21058
|
return n;
|
|
21039
21059
|
}
|
|
21040
|
-
function
|
|
21060
|
+
function uT(e, t, n) {
|
|
21041
21061
|
let r = [
|
|
21042
21062
|
"kind",
|
|
21043
21063
|
"release",
|
|
@@ -21045,46 +21065,46 @@ function oT(e, t, n) {
|
|
|
21045
21065
|
"architecture",
|
|
21046
21066
|
"weight",
|
|
21047
21067
|
"dimensions"
|
|
21048
|
-
], i = r.indexOf(n), a =
|
|
21068
|
+
], i = r.indexOf(n), a = aT(e.name);
|
|
21049
21069
|
for (let n = 0; n <= i; n++) {
|
|
21050
21070
|
let i = r[n];
|
|
21051
|
-
if (i === "kind" && t.kind !== void 0 && t.kind === "base" !== e.isBaseModel || i === "release" && t.release !== void 0 && e.baseModel !== t.release || i === "detector" && t.detector !== void 0 && !e.supportedDetectors.includes(t.detector) || i === "architecture" && t.architecture !== void 0 && a.architecture !== t.architecture || i === "weight" && t.weight !== void 0 && a.weight !== t.weight || i === "dimensions" && t.dimensions !== void 0 &&
|
|
21071
|
+
if (i === "kind" && t.kind !== void 0 && t.kind === "base" !== e.isBaseModel || i === "release" && t.release !== void 0 && e.baseModel !== t.release || i === "detector" && t.detector !== void 0 && !e.supportedDetectors.includes(t.detector) || i === "architecture" && t.architecture !== void 0 && a.architecture !== t.architecture || i === "weight" && t.weight !== void 0 && a.weight !== t.weight || i === "dimensions" && t.dimensions !== void 0 && sT(e) !== t.dimensions) return !1;
|
|
21052
21072
|
}
|
|
21053
21073
|
return !0;
|
|
21054
21074
|
}
|
|
21055
|
-
function
|
|
21056
|
-
let n =
|
|
21075
|
+
function dT(e, t) {
|
|
21076
|
+
let n = lT(e, (e) => [e.isBaseModel ? "base" : "custom"]);
|
|
21057
21077
|
return {
|
|
21058
21078
|
kind: ["custom", "base"].filter((e) => (n.get(e) ?? 0) > 0).map((e) => ({
|
|
21059
21079
|
value: e,
|
|
21060
21080
|
label: e === "custom" ? "My trainings" : "Official base",
|
|
21061
21081
|
count: n.get(e)
|
|
21062
21082
|
})),
|
|
21063
|
-
release: [...
|
|
21083
|
+
release: [...lT(e.filter((e) => uT(e, t, "kind")), (e) => [e.baseModel]).entries()].toSorted((e, t) => t[0].localeCompare(e[0], void 0, { numeric: !0 })).map(([e, t]) => ({
|
|
21064
21084
|
value: e,
|
|
21065
21085
|
label: e,
|
|
21066
21086
|
count: t
|
|
21067
21087
|
})),
|
|
21068
21088
|
detector: [],
|
|
21069
|
-
architecture: [...
|
|
21089
|
+
architecture: [...lT(e.filter((e) => uT(e, t, "detector")), (e) => [aT(e.name).architecture]).entries()].toSorted((e, t) => e[0].localeCompare(t[0])).map(([e, t]) => ({
|
|
21070
21090
|
value: e,
|
|
21071
21091
|
label: e,
|
|
21072
21092
|
count: t
|
|
21073
21093
|
})),
|
|
21074
|
-
weight: [...
|
|
21094
|
+
weight: [...lT(e.filter((e) => uT(e, t, "architecture")), (e) => [aT(e.name).weight]).entries()].toSorted((e, t) => e[0].localeCompare(t[0])).map(([e, t]) => ({
|
|
21075
21095
|
value: e,
|
|
21076
|
-
label:
|
|
21096
|
+
label: iT[e] ?? e.toUpperCase(),
|
|
21077
21097
|
count: t
|
|
21078
21098
|
})),
|
|
21079
|
-
dimensions: [...
|
|
21099
|
+
dimensions: [...lT(e.filter((e) => uT(e, t, "weight")), (e) => [sT(e)]).entries()].toSorted((e, t) => e[0].localeCompare(t[0], void 0, { numeric: !0 })).map(([e, t]) => ({
|
|
21080
21100
|
value: e,
|
|
21081
21101
|
label: e.replace("x", "×"),
|
|
21082
21102
|
count: t
|
|
21083
21103
|
})),
|
|
21084
|
-
entries: e.filter((e) =>
|
|
21104
|
+
entries: e.filter((e) => uT(e, t, "dimensions")).toSorted(cT)
|
|
21085
21105
|
};
|
|
21086
21106
|
}
|
|
21087
|
-
var
|
|
21107
|
+
var fT = {
|
|
21088
21108
|
mobiledet: {
|
|
21089
21109
|
format: "tflite",
|
|
21090
21110
|
postprocessor: "ssd",
|
|
@@ -21109,8 +21129,8 @@ var cT = {
|
|
|
21109
21129
|
extension: ".onnx"
|
|
21110
21130
|
}
|
|
21111
21131
|
};
|
|
21112
|
-
function
|
|
21113
|
-
return
|
|
21132
|
+
function pT(e) {
|
|
21133
|
+
return fT[e] ?? {
|
|
21114
21134
|
format: "onnx",
|
|
21115
21135
|
extension: ".onnx"
|
|
21116
21136
|
};
|
|
@@ -21118,12 +21138,12 @@ function lT(e) {
|
|
|
21118
21138
|
//#endregion
|
|
21119
21139
|
//#region src/components/TfliteGate.tsx
|
|
21120
21140
|
t();
|
|
21121
|
-
function
|
|
21141
|
+
function mT(e, t) {
|
|
21122
21142
|
let [n, r] = a(null);
|
|
21123
21143
|
return m(() => {
|
|
21124
21144
|
if (!t) return;
|
|
21125
21145
|
let n = !1;
|
|
21126
|
-
return
|
|
21146
|
+
return YC(e).then((e) => {
|
|
21127
21147
|
n || r(e);
|
|
21128
21148
|
}).catch(() => {
|
|
21129
21149
|
n || r([]);
|
|
@@ -21132,7 +21152,7 @@ function uT(e, t) {
|
|
|
21132
21152
|
};
|
|
21133
21153
|
}, [e, t]), t ? n : [];
|
|
21134
21154
|
}
|
|
21135
|
-
function
|
|
21155
|
+
function hT({ nodes: e }) {
|
|
21136
21156
|
return e === null ? /* @__PURE__ */ z("div", {
|
|
21137
21157
|
className: "text-[10px] text-foreground-subtle",
|
|
21138
21158
|
children: "Checking Coral availability…"
|
|
@@ -21150,7 +21170,7 @@ function dT({ nodes: e }) {
|
|
|
21150
21170
|
}
|
|
21151
21171
|
//#endregion
|
|
21152
21172
|
//#region src/frigate/frigate-as-variant-sources.ts
|
|
21153
|
-
var
|
|
21173
|
+
var gT = {
|
|
21154
21174
|
n: "Nano",
|
|
21155
21175
|
t: "Tiny",
|
|
21156
21176
|
s: "Small",
|
|
@@ -21158,30 +21178,30 @@ var fT = {
|
|
|
21158
21178
|
c: "Compact",
|
|
21159
21179
|
l: "Large",
|
|
21160
21180
|
x: "Extra large"
|
|
21161
|
-
},
|
|
21181
|
+
}, _T = [
|
|
21162
21182
|
"onnx",
|
|
21163
21183
|
"openvino",
|
|
21164
21184
|
"coreml",
|
|
21165
21185
|
"tflite"
|
|
21166
21186
|
];
|
|
21167
|
-
function
|
|
21168
|
-
return e.filter((e) =>
|
|
21187
|
+
function vT(e) {
|
|
21188
|
+
return e.filter((e) => oT(e) !== null);
|
|
21169
21189
|
}
|
|
21170
|
-
function
|
|
21190
|
+
function yT(e) {
|
|
21171
21191
|
if (e.width !== void 0 && e.height !== void 0) return e.width === e.height ? e.width : Math.max(e.width, e.height);
|
|
21172
|
-
let t = /^(\d+)x(\d+)$/.exec(
|
|
21192
|
+
let t = /^(\d+)x(\d+)$/.exec(sT(e));
|
|
21173
21193
|
if (!t) return;
|
|
21174
21194
|
let n = Number(t[1]), r = Number(t[2]);
|
|
21175
21195
|
if (!(!Number.isFinite(n) || !Number.isFinite(r))) return n === r ? n : Math.max(n, r);
|
|
21176
21196
|
}
|
|
21177
|
-
function
|
|
21197
|
+
function bT(e, t) {
|
|
21178
21198
|
if (t.length === 0) return e === "mobiledet" ? "SSDLite MobileDet" : e === "yolonas" ? "YOLO-NAS" : e.toUpperCase();
|
|
21179
|
-
let n =
|
|
21199
|
+
let n = gT[t] ?? t.toUpperCase();
|
|
21180
21200
|
return e.startsWith("yolo") ? `${e.replace(/^yolo/i, "YOLO")} ${n}` : `${e} ${n}`;
|
|
21181
21201
|
}
|
|
21182
|
-
var
|
|
21183
|
-
function
|
|
21184
|
-
let t = [...e].toSorted(
|
|
21202
|
+
var xT = (e, t) => t.trainDate.localeCompare(e.trainDate);
|
|
21203
|
+
function ST(e) {
|
|
21204
|
+
let t = [...e].toSorted(xT), n = t.find((e) => oT(e) === "neural"), r = t.find((e) => oT(e) === "coral"), i = [];
|
|
21185
21205
|
return n !== void 0 && (i.push({
|
|
21186
21206
|
format: "onnx",
|
|
21187
21207
|
plusModelId: n.id,
|
|
@@ -21202,33 +21222,33 @@ function vT(e) {
|
|
|
21202
21222
|
plusModelId: r.id,
|
|
21203
21223
|
via: "download",
|
|
21204
21224
|
needsCoral: !0
|
|
21205
|
-
}), i.toSorted((e, t) =>
|
|
21225
|
+
}), i.toSorted((e, t) => _T.indexOf(e.format) - _T.indexOf(t.format));
|
|
21206
21226
|
}
|
|
21207
|
-
function
|
|
21227
|
+
function CT(e) {
|
|
21208
21228
|
let t = /* @__PURE__ */ new Map();
|
|
21209
21229
|
for (let n of e) {
|
|
21210
21230
|
let e = n.trainDate.slice(0, 10);
|
|
21211
21231
|
t.set(e, [...t.get(e) ?? [], n]);
|
|
21212
21232
|
}
|
|
21213
21233
|
return [...t.entries()].map(([e, t]) => {
|
|
21214
|
-
let n = t.toSorted(
|
|
21234
|
+
let n = t.toSorted(xT);
|
|
21215
21235
|
return {
|
|
21216
21236
|
key: e,
|
|
21217
21237
|
trainDate: n[0]?.trainDate ?? "",
|
|
21218
21238
|
verifiedImages: Math.max(0, ...n.map((e) => e.verifiedImages)),
|
|
21219
21239
|
builds: n,
|
|
21220
|
-
offers:
|
|
21240
|
+
offers: ST(n)
|
|
21221
21241
|
};
|
|
21222
21242
|
}).filter((e) => e.offers.length > 0).toSorted((e, t) => t.trainDate.localeCompare(e.trainDate));
|
|
21223
21243
|
}
|
|
21224
|
-
function
|
|
21244
|
+
function wT(e) {
|
|
21225
21245
|
let t = /* @__PURE__ */ new Map();
|
|
21226
|
-
for (let n of
|
|
21227
|
-
let e =
|
|
21246
|
+
for (let n of vT(e)) {
|
|
21247
|
+
let e = aT(n.name), r = e.weight.length > 0 ? e.weight : "default", i = yT(n), a = `${n.name}${i === void 0 ? "" : `-${i}`}`, o = t.get(a) ?? {
|
|
21228
21248
|
family: e.architecture,
|
|
21229
21249
|
tier: r,
|
|
21230
21250
|
...i === void 0 ? {} : { resolution: i },
|
|
21231
|
-
name:
|
|
21251
|
+
name: bT(e.architecture, e.weight),
|
|
21232
21252
|
builds: []
|
|
21233
21253
|
};
|
|
21234
21254
|
t.set(a, {
|
|
@@ -21238,7 +21258,7 @@ function bT(e) {
|
|
|
21238
21258
|
}
|
|
21239
21259
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
21240
21260
|
for (let [e, i] of t) {
|
|
21241
|
-
let t =
|
|
21261
|
+
let t = CT(i.builds), a = t[0];
|
|
21242
21262
|
a !== void 0 && (n.set(e, {
|
|
21243
21263
|
sourceId: e,
|
|
21244
21264
|
family: i.family,
|
|
@@ -21265,16 +21285,16 @@ function bT(e) {
|
|
|
21265
21285
|
//#endregion
|
|
21266
21286
|
//#region src/tabs/use-plus-import.ts
|
|
21267
21287
|
t();
|
|
21268
|
-
function
|
|
21288
|
+
function TT(e) {
|
|
21269
21289
|
return e.length === 0 ? "" : ` Engine conversions: ${e.map((e) => e.ok ? `${e.format} ✓${e.nodeId ? ` (${e.nodeId})` : ""}` : `${e.format} ✗ — ${e.error ?? "failed"}`).join("; ")}.`;
|
|
21270
21290
|
}
|
|
21271
|
-
function
|
|
21291
|
+
function ET({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
21272
21292
|
let [o, s] = a(null), [c, l] = a({}), [u, d] = a({}), [f, p] = a(null), [h, g] = a(null), _ = n(async () => {
|
|
21273
21293
|
try {
|
|
21274
|
-
let [t, n] = await Promise.all([
|
|
21294
|
+
let [t, n] = await Promise.all([mC(e), hC(e)]);
|
|
21275
21295
|
s(new Set(t.map((e) => e.entry.id)));
|
|
21276
21296
|
let r = {}, i = {};
|
|
21277
|
-
for (let e of t) r[e.entry.id] =
|
|
21297
|
+
for (let e of t) r[e.entry.id] = US(e.entry), i[e.entry.id] = WS(n, e.entry.id);
|
|
21278
21298
|
l(r), d(i);
|
|
21279
21299
|
} catch {
|
|
21280
21300
|
s(null), l({}), d({});
|
|
@@ -21284,7 +21304,7 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21284
21304
|
_();
|
|
21285
21305
|
}, [_]);
|
|
21286
21306
|
let v = n(async (n, a, s, l) => {
|
|
21287
|
-
let u =
|
|
21307
|
+
let u = jS(n);
|
|
21288
21308
|
p(`${u}::${a}`);
|
|
21289
21309
|
let d = a === "openvino" || a === "coreml", f = [
|
|
21290
21310
|
{
|
|
@@ -21313,7 +21333,7 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21313
21333
|
progress: null,
|
|
21314
21334
|
logs: [`Starting ${a} import for ${n}…`],
|
|
21315
21335
|
status: "running",
|
|
21316
|
-
sessionId:
|
|
21336
|
+
sessionId: lw({
|
|
21317
21337
|
kind: d ? "convert" : "import",
|
|
21318
21338
|
title: `Import ${s} · ${a}`,
|
|
21319
21339
|
modelId: u,
|
|
@@ -21328,9 +21348,9 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21328
21348
|
steps: e([...t.steps])
|
|
21329
21349
|
});
|
|
21330
21350
|
}, h = (e) => {
|
|
21331
|
-
g((t) => t === null ? t : (
|
|
21351
|
+
g((t) => t === null ? t : (uw(t.sessionId, e), {
|
|
21332
21352
|
...t,
|
|
21333
|
-
logs:
|
|
21353
|
+
logs: iw(t.logs, {
|
|
21334
21354
|
phase: "log",
|
|
21335
21355
|
log: e
|
|
21336
21356
|
})
|
|
@@ -21340,11 +21360,11 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21340
21360
|
...n,
|
|
21341
21361
|
status: t
|
|
21342
21362
|
} : n));
|
|
21343
|
-
}, y =
|
|
21363
|
+
}, y = PC(e, (e) => {
|
|
21344
21364
|
g((t) => {
|
|
21345
21365
|
if (t === null) return t;
|
|
21346
|
-
let n =
|
|
21347
|
-
return
|
|
21366
|
+
let n = iw(t.logs, e);
|
|
21367
|
+
return fw(t.sessionId, n), {
|
|
21348
21368
|
...t,
|
|
21349
21369
|
progress: e.phase === "log" ? t.progress : e,
|
|
21350
21370
|
logs: n
|
|
@@ -21356,7 +21376,7 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21356
21376
|
if (a === "onnx" || a === "tflite") if (i) h(`${a} already in Library`), v("download", "done"), v("register", "done");
|
|
21357
21377
|
else {
|
|
21358
21378
|
h(`Downloading native ${a}…`);
|
|
21359
|
-
let r = await
|
|
21379
|
+
let r = await zC(e, {
|
|
21360
21380
|
plusModelId: n,
|
|
21361
21381
|
...l === void 0 ? {} : { name: l },
|
|
21362
21382
|
ensureFormats: [],
|
|
@@ -21366,21 +21386,21 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21366
21386
|
}
|
|
21367
21387
|
else if (d) if (!r) {
|
|
21368
21388
|
h("ONNX missing — downloading first…");
|
|
21369
|
-
let r = await
|
|
21389
|
+
let r = await zC(e, {
|
|
21370
21390
|
plusModelId: n,
|
|
21371
21391
|
...l === void 0 ? {} : { name: l },
|
|
21372
21392
|
ensureFormats: [a],
|
|
21373
21393
|
format: "onnx"
|
|
21374
21394
|
});
|
|
21375
|
-
v("download", "done"), v("register", "done"), v("convert", r.conversions.some((e) => e.format === a && e.ok) ? "done" : "error"), h(`Registered ${r.modelId}.${
|
|
21395
|
+
v("download", "done"), v("register", "done"), v("convert", r.conversions.some((e) => e.format === a && e.ok) ? "done" : "error"), h(`Registered ${r.modelId}.${TT(r.conversions)}`), t(`Imported "${r.modelId}" + ${a}.${TT(r.conversions)}`);
|
|
21376
21396
|
} else if (i) v("download", "done"), v("register", "done"), v("convert", "done"), h(`${a} already present on ${u}`);
|
|
21377
21397
|
else {
|
|
21378
21398
|
v("download", "done"), v("register", "done"), v("convert", "active"), h(`Converting ONNX → ${a} on a capable node…`);
|
|
21379
|
-
let n = await
|
|
21380
|
-
if (v("convert", r ? "done" : "error"), h(`Conversion:${
|
|
21381
|
-
t(`Converted "${u}" → ${a}.${
|
|
21399
|
+
let n = await bC(e, u, [a]), r = n.conversions.some((e) => e.format === a && e.ok);
|
|
21400
|
+
if (v("convert", r ? "done" : "error"), h(`Conversion:${TT(n.conversions)}`), !r) throw Error(n.conversions.find((e) => e.format === a)?.error ?? `${a} conversion failed`);
|
|
21401
|
+
t(`Converted "${u}" → ${a}.${TT(n.conversions)}`);
|
|
21382
21402
|
}
|
|
21383
|
-
await _(), g((e) => e === null ? e : (
|
|
21403
|
+
await _(), g((e) => e === null ? e : (dw(e.sessionId, { status: "success" }), {
|
|
21384
21404
|
...e,
|
|
21385
21405
|
status: "success",
|
|
21386
21406
|
steps: e.steps.map((e) => e.status === "active" || e.status === "pending" ? {
|
|
@@ -21391,7 +21411,7 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21391
21411
|
}));
|
|
21392
21412
|
} catch (e) {
|
|
21393
21413
|
let t = e instanceof Error ? e.message : "Import failed";
|
|
21394
|
-
g((e) => e === null ? e : (
|
|
21414
|
+
g((e) => e === null ? e : (dw(e.sessionId, {
|
|
21395
21415
|
status: "error",
|
|
21396
21416
|
errorMessage: t
|
|
21397
21417
|
}), {
|
|
@@ -21428,11 +21448,11 @@ function ST({ trpc: e, onRegistered: t, onError: r, landNodeId: i }) {
|
|
|
21428
21448
|
//#endregion
|
|
21429
21449
|
//#region src/tabs/FrigatePlusCatalog.tsx
|
|
21430
21450
|
t();
|
|
21431
|
-
var
|
|
21432
|
-
function
|
|
21451
|
+
var DT = ["kind", "release"];
|
|
21452
|
+
function OT(e, t) {
|
|
21433
21453
|
let n = { ...t };
|
|
21434
|
-
for (let t of
|
|
21435
|
-
let r =
|
|
21454
|
+
for (let t of DT) {
|
|
21455
|
+
let r = dT(e, n)[t], i = n[t], a = r[0];
|
|
21436
21456
|
a !== void 0 && (i === void 0 || !r.some((e) => e.value === i)) && (n = t === "kind" ? {
|
|
21437
21457
|
...n,
|
|
21438
21458
|
kind: a.value === "base" ? "base" : "custom"
|
|
@@ -21443,23 +21463,23 @@ function wT(e, t) {
|
|
|
21443
21463
|
}
|
|
21444
21464
|
return n;
|
|
21445
21465
|
}
|
|
21446
|
-
function
|
|
21466
|
+
function kT(e) {
|
|
21447
21467
|
return e === null ? "checking Coral…" : e.length === 0 ? "needs a Coral" : void 0;
|
|
21448
21468
|
}
|
|
21449
|
-
function
|
|
21450
|
-
let [o, s] = a({}), [c, u] = a(""), d =
|
|
21469
|
+
function AT({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i }) {
|
|
21470
|
+
let [o, s] = a({}), [c, u] = a(""), d = ET({
|
|
21451
21471
|
trpc: e,
|
|
21452
21472
|
onRegistered: n,
|
|
21453
21473
|
onError: r,
|
|
21454
21474
|
...i === void 0 ? {} : { landNodeId: i }
|
|
21455
|
-
}), f = l(() =>
|
|
21475
|
+
}), f = l(() => vT(t), [t]), p = OT(f, o), m = dT(f, {
|
|
21456
21476
|
kind: p.kind,
|
|
21457
21477
|
release: p.release
|
|
21458
|
-
}), h = l(() =>
|
|
21478
|
+
}), h = l(() => wT(m.entries), [
|
|
21459
21479
|
f,
|
|
21460
21480
|
p.kind,
|
|
21461
21481
|
p.release
|
|
21462
|
-
]), g =
|
|
21482
|
+
]), g = mT(e, l(() => [...h.combos.values()].some((e) => e.trainings.some((e) => e.offers.some((e) => e.format === "tflite"))), [h])), _ = (e, t) => {
|
|
21463
21483
|
s(e === "kind" ? { kind: t === "base" ? "base" : "custom" } : {
|
|
21464
21484
|
...p.kind === void 0 ? {} : { kind: p.kind },
|
|
21465
21485
|
release: t
|
|
@@ -21470,7 +21490,7 @@ function ET({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
21470
21490
|
children: "No models this cluster can run are visible to this account yet — train one on Frigate+."
|
|
21471
21491
|
});
|
|
21472
21492
|
let v = h.combos.has(c) ? c : "";
|
|
21473
|
-
return /* @__PURE__ */ B(it, { children: [d.modal !== null && /* @__PURE__ */ z(
|
|
21493
|
+
return /* @__PURE__ */ B(it, { children: [d.modal !== null && /* @__PURE__ */ z(rw, {
|
|
21474
21494
|
title: d.modal.title,
|
|
21475
21495
|
steps: d.modal.steps,
|
|
21476
21496
|
progress: d.modal.progress,
|
|
@@ -21478,7 +21498,7 @@ function ET({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
21478
21498
|
status: d.modal.status,
|
|
21479
21499
|
...d.modal.errorMessage === void 0 ? {} : { errorMessage: d.modal.errorMessage },
|
|
21480
21500
|
onClose: d.closeModal
|
|
21481
|
-
}), /* @__PURE__ */ z(
|
|
21501
|
+
}), /* @__PURE__ */ z(Bw, {
|
|
21482
21502
|
testId: "frigate-browser",
|
|
21483
21503
|
preSelectors: [{
|
|
21484
21504
|
id: "kind",
|
|
@@ -21501,7 +21521,7 @@ function ET({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
21501
21521
|
emptyMessage: "No Frigate+ models in this release that the cluster can run.",
|
|
21502
21522
|
renderActionRow: (e) => {
|
|
21503
21523
|
let t = h.combos.get(e);
|
|
21504
|
-
return t === void 0 ? null : /* @__PURE__ */ z(
|
|
21524
|
+
return t === void 0 ? null : /* @__PURE__ */ z(MT, {
|
|
21505
21525
|
combo: t,
|
|
21506
21526
|
tfliteNodes: g,
|
|
21507
21527
|
registeredIds: d.registeredIds,
|
|
@@ -21513,25 +21533,25 @@ function ET({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
21513
21533
|
}
|
|
21514
21534
|
})] });
|
|
21515
21535
|
}
|
|
21516
|
-
var
|
|
21517
|
-
function
|
|
21536
|
+
var jT = (e) => `${jS(e.plusModelId)}::${e.format}`;
|
|
21537
|
+
function MT({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, presenceByModel: i, busyId: o, onImport: s }) {
|
|
21518
21538
|
let [c, l] = a(e.trainings[0]?.key ?? ""), [u, d] = a("");
|
|
21519
21539
|
m(() => {
|
|
21520
21540
|
l(e.trainings[0]?.key ?? "");
|
|
21521
21541
|
}, [e]);
|
|
21522
21542
|
let f = e.trainings.find((e) => e.key === c) ?? e.trainings[0], p = f?.builds[0];
|
|
21523
21543
|
if (f === void 0 || p === void 0) return null;
|
|
21524
|
-
let h = f.offers.some((e) => e.format === "onnx"), g = f.offers.some((e) => e.format === "tflite"), _ =
|
|
21525
|
-
id:
|
|
21544
|
+
let h = f.offers.some((e) => e.format === "onnx"), g = f.offers.some((e) => e.format === "tflite"), _ = kT(t), v = f.offers.map((e) => ({
|
|
21545
|
+
id: jT(e),
|
|
21526
21546
|
format: e.format,
|
|
21527
21547
|
driftStatus: e.needsCoral ? _ ?? "ok" : "ok"
|
|
21528
|
-
})), y = [...new Set(f.offers.map((e) =>
|
|
21548
|
+
})), y = [...new Set(f.offers.map((e) => jS(e.plusModelId)))].flatMap((e) => i[e] ?? []), b = `${e.name}${e.resolution === void 0 ? "" : ` ${e.resolution}`}`;
|
|
21529
21549
|
return /* @__PURE__ */ B("div", {
|
|
21530
21550
|
className: "space-y-3",
|
|
21531
21551
|
"data-testid": "plus-combo-panel",
|
|
21532
21552
|
"data-combo": e.sourceId,
|
|
21533
21553
|
children: [
|
|
21534
|
-
e.trainings.length > 1 && /* @__PURE__ */ z(
|
|
21554
|
+
e.trainings.length > 1 && /* @__PURE__ */ z(zw, {
|
|
21535
21555
|
label: "Training",
|
|
21536
21556
|
value: f.key,
|
|
21537
21557
|
options: e.trainings.map((e) => ({
|
|
@@ -21561,7 +21581,7 @@ function OT({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
21561
21581
|
}),
|
|
21562
21582
|
" · input",
|
|
21563
21583
|
" ",
|
|
21564
|
-
|
|
21584
|
+
sT(p).replace("x", "×"),
|
|
21565
21585
|
f.verifiedImages > 0 ? /* @__PURE__ */ B(it, { children: [
|
|
21566
21586
|
" · ",
|
|
21567
21587
|
f.verifiedImages,
|
|
@@ -21577,21 +21597,21 @@ function OT({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
21577
21597
|
})
|
|
21578
21598
|
]
|
|
21579
21599
|
}),
|
|
21580
|
-
g && /* @__PURE__ */ z(
|
|
21581
|
-
/* @__PURE__ */ z(
|
|
21600
|
+
g && /* @__PURE__ */ z(hT, { nodes: t }),
|
|
21601
|
+
/* @__PURE__ */ z(Uw, {
|
|
21582
21602
|
value: u,
|
|
21583
21603
|
onChange: d,
|
|
21584
21604
|
defaultName: p.name
|
|
21585
21605
|
}),
|
|
21586
|
-
/* @__PURE__ */ z(
|
|
21606
|
+
/* @__PURE__ */ z(Hw, {
|
|
21587
21607
|
entries: v,
|
|
21588
21608
|
registeredIds: n,
|
|
21589
21609
|
isImported: (e) => (r[e.id.split("::")[0] ?? ""] ?? []).includes(e.format),
|
|
21590
21610
|
presence: y,
|
|
21591
21611
|
busyId: o,
|
|
21592
21612
|
onImport: (e) => {
|
|
21593
|
-
let t = f.offers.find((t) =>
|
|
21594
|
-
t === void 0 ||
|
|
21613
|
+
let t = f.offers.find((t) => jT(t) === e);
|
|
21614
|
+
t === void 0 || Gw(u) || s(t, b, Ww(u));
|
|
21595
21615
|
}
|
|
21596
21616
|
})
|
|
21597
21617
|
]
|
|
@@ -21600,12 +21620,12 @@ function OT({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
21600
21620
|
//#endregion
|
|
21601
21621
|
//#region src/tabs/FrigateSourceSections.tsx
|
|
21602
21622
|
t();
|
|
21603
|
-
var
|
|
21604
|
-
function
|
|
21623
|
+
var NT = "https://docs.frigate.video/integrations/plus/";
|
|
21624
|
+
function PT({ trpc: e, status: t, onStatusChange: r }) {
|
|
21605
21625
|
let [i, o] = a(""), [s, c] = a(null), [l, u] = a(!1), [d, f] = a(null), [p, m] = a(!1), [h, g] = a(!1), _ = n(async () => {
|
|
21606
21626
|
m(!0), f(null);
|
|
21607
21627
|
try {
|
|
21608
|
-
let t = await
|
|
21628
|
+
let t = await LC(e);
|
|
21609
21629
|
f(t.ok ? "Connection OK" : t.error ?? "Connection failed");
|
|
21610
21630
|
} catch (e) {
|
|
21611
21631
|
f(e instanceof Error ? e.message : "Connection failed");
|
|
@@ -21614,13 +21634,13 @@ function AT({ trpc: e, status: t, onStatusChange: r }) {
|
|
|
21614
21634
|
}
|
|
21615
21635
|
}, [e]), v = n(async () => {
|
|
21616
21636
|
let t = i.trim();
|
|
21617
|
-
if (c(null),
|
|
21637
|
+
if (c(null), !rT(t)) {
|
|
21618
21638
|
c("The key does not match the documented \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:40-hex\" format shown in your Frigate+ account.");
|
|
21619
21639
|
return;
|
|
21620
21640
|
}
|
|
21621
21641
|
u(!0);
|
|
21622
21642
|
try {
|
|
21623
|
-
await
|
|
21643
|
+
await BC(e, t), o(""), g(!1), r(await IC(e)), await _();
|
|
21624
21644
|
} catch (e) {
|
|
21625
21645
|
c(e instanceof Error ? e.message : "Failed to save the API key");
|
|
21626
21646
|
} finally {
|
|
@@ -21643,7 +21663,7 @@ function AT({ trpc: e, status: t, onStatusChange: r }) {
|
|
|
21643
21663
|
"Required to list your account models.",
|
|
21644
21664
|
" ",
|
|
21645
21665
|
/* @__PURE__ */ z("a", {
|
|
21646
|
-
href:
|
|
21666
|
+
href: NT,
|
|
21647
21667
|
target: "_blank",
|
|
21648
21668
|
rel: "noreferrer",
|
|
21649
21669
|
className: "text-primary hover:underline",
|
|
@@ -21684,7 +21704,7 @@ function AT({ trpc: e, status: t, onStatusChange: r }) {
|
|
|
21684
21704
|
y && /* @__PURE__ */ B("div", {
|
|
21685
21705
|
className: "space-y-1",
|
|
21686
21706
|
children: [
|
|
21687
|
-
/* @__PURE__ */ z(
|
|
21707
|
+
/* @__PURE__ */ z($C, {
|
|
21688
21708
|
label: "Frigate+ API key",
|
|
21689
21709
|
children: /* @__PURE__ */ z("input", {
|
|
21690
21710
|
type: "password",
|
|
@@ -21725,11 +21745,11 @@ function AT({ trpc: e, status: t, onStatusChange: r }) {
|
|
|
21725
21745
|
]
|
|
21726
21746
|
});
|
|
21727
21747
|
}
|
|
21728
|
-
function
|
|
21748
|
+
function FT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNodeId: o }) {
|
|
21729
21749
|
let [s, c] = a(null), [l, u] = a(null), [d, f] = a(!1), p = n(async () => {
|
|
21730
21750
|
f(!0);
|
|
21731
21751
|
try {
|
|
21732
|
-
u(await
|
|
21752
|
+
u(await RC(e));
|
|
21733
21753
|
} catch (e) {
|
|
21734
21754
|
r(e instanceof Error ? e.message : "Failed to list Frigate+ models");
|
|
21735
21755
|
} finally {
|
|
@@ -21740,7 +21760,7 @@ function jT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNode
|
|
|
21740
21760
|
}, [p]);
|
|
21741
21761
|
return m(() => {
|
|
21742
21762
|
let t = !1;
|
|
21743
|
-
return
|
|
21763
|
+
return IC(e).then((e) => {
|
|
21744
21764
|
t || (c(e), e.configured && p());
|
|
21745
21765
|
}).catch(() => {
|
|
21746
21766
|
t || c({
|
|
@@ -21756,7 +21776,7 @@ function jT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNode
|
|
|
21756
21776
|
}) : s.configured ? /* @__PURE__ */ B("div", {
|
|
21757
21777
|
className: "space-y-3",
|
|
21758
21778
|
children: [
|
|
21759
|
-
/* @__PURE__ */ z(
|
|
21779
|
+
/* @__PURE__ */ z(PT, {
|
|
21760
21780
|
trpc: e,
|
|
21761
21781
|
status: s,
|
|
21762
21782
|
onStatusChange: h
|
|
@@ -21775,7 +21795,7 @@ function jT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNode
|
|
|
21775
21795
|
className: "text-xs text-foreground-subtle",
|
|
21776
21796
|
children: "Loading your Frigate+ models…"
|
|
21777
21797
|
}),
|
|
21778
|
-
l !== null && /* @__PURE__ */ z(
|
|
21798
|
+
l !== null && /* @__PURE__ */ z(AT, {
|
|
21779
21799
|
models: l,
|
|
21780
21800
|
trpc: e,
|
|
21781
21801
|
onRegistered: t,
|
|
@@ -21785,7 +21805,7 @@ function jT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNode
|
|
|
21785
21805
|
]
|
|
21786
21806
|
}) : /* @__PURE__ */ B("div", {
|
|
21787
21807
|
className: "space-y-4",
|
|
21788
|
-
children: [/* @__PURE__ */ z(
|
|
21808
|
+
children: [/* @__PURE__ */ z(PT, {
|
|
21789
21809
|
trpc: e,
|
|
21790
21810
|
status: s,
|
|
21791
21811
|
onStatusChange: h
|
|
@@ -21794,7 +21814,7 @@ function jT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNode
|
|
|
21794
21814
|
children: [/* @__PURE__ */ z("div", {
|
|
21795
21815
|
className: "text-[11px] text-foreground-subtle",
|
|
21796
21816
|
children: "Public default (no key required):"
|
|
21797
|
-
}),
|
|
21817
|
+
}), tT.map((n) => /* @__PURE__ */ z(IT, {
|
|
21798
21818
|
trpc: e,
|
|
21799
21819
|
catalogId: n.id,
|
|
21800
21820
|
onRegistered: t,
|
|
@@ -21805,8 +21825,8 @@ function jT({ trpc: e, onRegistered: t, onError: r, onPrefillUpload: i, landNode
|
|
|
21805
21825
|
})]
|
|
21806
21826
|
});
|
|
21807
21827
|
}
|
|
21808
|
-
function
|
|
21809
|
-
let s =
|
|
21828
|
+
function IT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUpload: i, landNodeId: o }) {
|
|
21829
|
+
let s = tT.find((e) => e.id === t), [c, l] = a(!1), [u, d] = a(""), [f, p] = a(null), h = mT(e, s?.format === "tflite"), [g, _] = a("");
|
|
21810
21830
|
if (m(() => {
|
|
21811
21831
|
if (o !== void 0 && o.length > 0) {
|
|
21812
21832
|
_(o);
|
|
@@ -21822,7 +21842,7 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21822
21842
|
return /* @__PURE__ */ B("div", {
|
|
21823
21843
|
className: "rounded-md border border-border bg-surface px-3 py-2 space-y-2",
|
|
21824
21844
|
children: [
|
|
21825
|
-
f !== null && /* @__PURE__ */ z(
|
|
21845
|
+
f !== null && /* @__PURE__ */ z(rw, {
|
|
21826
21846
|
title: f.title,
|
|
21827
21847
|
steps: f.steps,
|
|
21828
21848
|
progress: f.progress,
|
|
@@ -21853,7 +21873,7 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21853
21873
|
})
|
|
21854
21874
|
]
|
|
21855
21875
|
}),
|
|
21856
|
-
s.format === "tflite" && /* @__PURE__ */ z(
|
|
21876
|
+
s.format === "tflite" && /* @__PURE__ */ z(hT, { nodes: h }),
|
|
21857
21877
|
o === void 0 && s.format === "tflite" && h !== null && h.length > 0 && /* @__PURE__ */ B("label", {
|
|
21858
21878
|
className: "flex items-center gap-2 text-[11px] text-foreground",
|
|
21859
21879
|
children: [/* @__PURE__ */ z("span", {
|
|
@@ -21876,7 +21896,7 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21876
21896
|
children: o
|
|
21877
21897
|
})]
|
|
21878
21898
|
}),
|
|
21879
|
-
/* @__PURE__ */ z(
|
|
21899
|
+
/* @__PURE__ */ z(Uw, {
|
|
21880
21900
|
value: u,
|
|
21881
21901
|
onChange: d,
|
|
21882
21902
|
defaultName: s.label
|
|
@@ -21886,7 +21906,7 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21886
21906
|
children: [/* @__PURE__ */ z("button", {
|
|
21887
21907
|
onClick: () => {
|
|
21888
21908
|
l(!0);
|
|
21889
|
-
let t = b ? y : void 0, i = `Import ${s.label}`, a =
|
|
21909
|
+
let t = b ? y : void 0, i = `Import ${s.label}`, a = lw({
|
|
21890
21910
|
kind: "import",
|
|
21891
21911
|
title: i,
|
|
21892
21912
|
modelId: s.id,
|
|
@@ -21910,14 +21930,14 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21910
21930
|
status: "running",
|
|
21911
21931
|
sessionId: a
|
|
21912
21932
|
});
|
|
21913
|
-
let o =
|
|
21914
|
-
|
|
21933
|
+
let o = Ww(u);
|
|
21934
|
+
FC(e, {
|
|
21915
21935
|
catalogId: s.id,
|
|
21916
21936
|
...o === void 0 ? {} : { name: o },
|
|
21917
21937
|
...t === void 0 ? {} : { targetNodeId: t }
|
|
21918
21938
|
}).then((e) => {
|
|
21919
21939
|
let r = t === void 0 ? `Registered "${e.modelId}" (${(e.bytes / 1e6).toFixed(1)} MB).` : `Registered "${e.modelId}" and landed on ${t} (${(e.bytes / 1e6).toFixed(1)} MB).`;
|
|
21920
|
-
|
|
21940
|
+
uw(a, r), dw(a, { status: "success" }), p((e) => e === null ? e : {
|
|
21921
21941
|
...e,
|
|
21922
21942
|
status: "success",
|
|
21923
21943
|
logs: [...e.logs, r],
|
|
@@ -21928,7 +21948,7 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21928
21948
|
}), n(r);
|
|
21929
21949
|
}).catch((e) => {
|
|
21930
21950
|
let t = e instanceof Error ? e.message : "Catalog import failed";
|
|
21931
|
-
|
|
21951
|
+
dw(a, {
|
|
21932
21952
|
status: "error",
|
|
21933
21953
|
errorMessage: t
|
|
21934
21954
|
}), p((e) => e === null ? e : {
|
|
@@ -21942,7 +21962,7 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21942
21962
|
}), r(t);
|
|
21943
21963
|
}).finally(() => l(!1));
|
|
21944
21964
|
},
|
|
21945
|
-
disabled: c || v ||
|
|
21965
|
+
disabled: c || v || Gw(u),
|
|
21946
21966
|
className: "px-4 py-1.5 text-xs font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors",
|
|
21947
21967
|
children: c ? "Importing…" : b ? `Import + land on ${y}` : "Register"
|
|
21948
21968
|
}), /* @__PURE__ */ z("button", {
|
|
@@ -21963,10 +21983,10 @@ function MT({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
21963
21983
|
//#endregion
|
|
21964
21984
|
//#region src/tabs/CatalogTab.tsx
|
|
21965
21985
|
t();
|
|
21966
|
-
function
|
|
21986
|
+
function LT(e) {
|
|
21967
21987
|
return e === "scrypted" || e === "frigate" || e === "camstack" ? e : "camstack";
|
|
21968
21988
|
}
|
|
21969
|
-
var
|
|
21989
|
+
var RT = [
|
|
21970
21990
|
{
|
|
21971
21991
|
value: "camstack",
|
|
21972
21992
|
label: "CamStack"
|
|
@@ -21979,11 +21999,11 @@ var PT = [
|
|
|
21979
21999
|
value: "frigate",
|
|
21980
22000
|
label: "Frigate"
|
|
21981
22001
|
}
|
|
21982
|
-
],
|
|
21983
|
-
function
|
|
21984
|
-
return
|
|
22002
|
+
], zT = new Set(P);
|
|
22003
|
+
function BT(e) {
|
|
22004
|
+
return zT.has(e);
|
|
21985
22005
|
}
|
|
21986
|
-
function
|
|
22006
|
+
function VT({ seed: e, nodeId: t, busyKey: n, onDownload: r }) {
|
|
21987
22007
|
return /* @__PURE__ */ z("div", {
|
|
21988
22008
|
className: "flex flex-wrap gap-2 pt-1",
|
|
21989
22009
|
children: e.formats.map((i) => {
|
|
@@ -21997,7 +22017,7 @@ function LT({ seed: e, nodeId: t, busyKey: n, onDownload: r }) {
|
|
|
21997
22017
|
}),
|
|
21998
22018
|
/* @__PURE__ */ z("span", {
|
|
21999
22019
|
className: "text-foreground-subtle",
|
|
22000
|
-
children:
|
|
22020
|
+
children: iC(i.sizeMB)
|
|
22001
22021
|
}),
|
|
22002
22022
|
i.downloaded ? /* @__PURE__ */ B("span", {
|
|
22003
22023
|
className: "text-success",
|
|
@@ -22014,8 +22034,8 @@ function LT({ seed: e, nodeId: t, busyKey: n, onDownload: r }) {
|
|
|
22014
22034
|
})
|
|
22015
22035
|
});
|
|
22016
22036
|
}
|
|
22017
|
-
function
|
|
22018
|
-
let o =
|
|
22037
|
+
function HT({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFamily: i, onDownload: a }) {
|
|
22038
|
+
let o = tC(e), s = nC(e), c = o.map(rC), l = Je(c), u = new Map(e.map((e) => [e.modelId, e]));
|
|
22019
22039
|
return l.length === 0 && s.length === 0 ? null : /* @__PURE__ */ B("div", {
|
|
22020
22040
|
className: "space-y-3",
|
|
22021
22041
|
"data-testid": "catalog-provider",
|
|
@@ -22031,7 +22051,7 @@ function RT({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
22031
22051
|
className: "flex items-baseline justify-between gap-2",
|
|
22032
22052
|
children: [/* @__PURE__ */ z("span", {
|
|
22033
22053
|
className: "text-sm font-medium text-foreground",
|
|
22034
|
-
children:
|
|
22054
|
+
children: QS(e.family, e.label)
|
|
22035
22055
|
}), /* @__PURE__ */ z("span", {
|
|
22036
22056
|
className: "text-[10px] font-mono text-foreground-subtle",
|
|
22037
22057
|
children: s
|
|
@@ -22042,7 +22062,7 @@ function RT({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
22042
22062
|
value: s,
|
|
22043
22063
|
onChange: (t) => i(e.family, t)
|
|
22044
22064
|
}),
|
|
22045
|
-
l && /* @__PURE__ */ z(
|
|
22065
|
+
l && /* @__PURE__ */ z(VT, {
|
|
22046
22066
|
seed: l,
|
|
22047
22067
|
nodeId: t,
|
|
22048
22068
|
busyKey: n,
|
|
@@ -22062,7 +22082,7 @@ function RT({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
22062
22082
|
className: "text-[10px] font-mono text-foreground-subtle",
|
|
22063
22083
|
children: e.modelId
|
|
22064
22084
|
})]
|
|
22065
|
-
}), /* @__PURE__ */ z(
|
|
22085
|
+
}), /* @__PURE__ */ z(VT, {
|
|
22066
22086
|
seed: e,
|
|
22067
22087
|
nodeId: t,
|
|
22068
22088
|
busyKey: n,
|
|
@@ -22071,11 +22091,11 @@ function RT({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
22071
22091
|
}, `${e.stepId}:${e.modelId}`))]
|
|
22072
22092
|
});
|
|
22073
22093
|
}
|
|
22074
|
-
function
|
|
22094
|
+
function UT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
22075
22095
|
let [i, o] = a([]), [s, c] = a(""), [u, d] = a(!0), [f, p] = a(null), [h, g] = a(null), [_, v] = a(null), [y, b] = a({}), x = n(async () => {
|
|
22076
22096
|
p(null);
|
|
22077
22097
|
try {
|
|
22078
|
-
let t = await
|
|
22098
|
+
let t = await TC(e, r);
|
|
22079
22099
|
o(t), c((e) => e && t.some((t) => t.stepId === e) ? e : t[0]?.stepId ?? "");
|
|
22080
22100
|
} catch (e) {
|
|
22081
22101
|
p(e instanceof Error ? e.message : "Failed to load catalog");
|
|
@@ -22086,7 +22106,7 @@ function zT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
|
22086
22106
|
m(() => {
|
|
22087
22107
|
d(!0), x();
|
|
22088
22108
|
}, [x, t]);
|
|
22089
|
-
let S = l(() =>
|
|
22109
|
+
let S = l(() => $S(i), [i]), C = l(() => eC(i, s).filter((e) => e.provider === "camstack"), [i, s]), w = l(() => Je(tC(C).map(rC)), [C]), T = l(() => {
|
|
22090
22110
|
let e = /* @__PURE__ */ new Map();
|
|
22091
22111
|
for (let t of C) e.set(t.modelId, t);
|
|
22092
22112
|
return e;
|
|
@@ -22101,8 +22121,8 @@ function zT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
|
22101
22121
|
return !n && Object.keys(e).length === Object.keys(t).length ? e : t;
|
|
22102
22122
|
});
|
|
22103
22123
|
}, [w, T]);
|
|
22104
|
-
let E =
|
|
22105
|
-
if (
|
|
22124
|
+
let E = mw(), D = n(async (t, n) => {
|
|
22125
|
+
if (BT(n)) {
|
|
22106
22126
|
g(`${t.stepId}/${t.modelId}/${n}`), v(null);
|
|
22107
22127
|
try {
|
|
22108
22128
|
await E.run({
|
|
@@ -22118,7 +22138,7 @@ function zT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
|
22118
22138
|
}],
|
|
22119
22139
|
initialLog: `Downloading ${t.modelId} (${n}) → ${r}…`
|
|
22120
22140
|
}, async ({ appendLog: i, patchSteps: a }) => {
|
|
22121
|
-
await
|
|
22141
|
+
await DC(e, {
|
|
22122
22142
|
addonId: t.stepId,
|
|
22123
22143
|
modelId: t.modelId,
|
|
22124
22144
|
format: n,
|
|
@@ -22154,7 +22174,7 @@ function zT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
|
22154
22174
|
className: "rounded-md border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",
|
|
22155
22175
|
children: _
|
|
22156
22176
|
}),
|
|
22157
|
-
/* @__PURE__ */ z(
|
|
22177
|
+
/* @__PURE__ */ z($C, {
|
|
22158
22178
|
label: "Step",
|
|
22159
22179
|
children: /* @__PURE__ */ z(Ga, {
|
|
22160
22180
|
"aria-label": "Step",
|
|
@@ -22173,7 +22193,7 @@ function zT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
|
22173
22193
|
C.length === 0 ? /* @__PURE__ */ z("div", {
|
|
22174
22194
|
className: "rounded-xl border border-border bg-surface text-center text-xs text-foreground-subtle italic py-10",
|
|
22175
22195
|
children: "No CamStack models for this step."
|
|
22176
|
-
}) : /* @__PURE__ */ z(
|
|
22196
|
+
}) : /* @__PURE__ */ z(HT, {
|
|
22177
22197
|
seeds: C,
|
|
22178
22198
|
nodeId: r,
|
|
22179
22199
|
busyKey: h,
|
|
@@ -22187,7 +22207,7 @@ function zT({ trpc: e, refreshKey: t, nodeId: r }) {
|
|
|
22187
22207
|
]
|
|
22188
22208
|
});
|
|
22189
22209
|
}
|
|
22190
|
-
function
|
|
22210
|
+
function WT({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered: i, onPrefillUpload: o }) {
|
|
22191
22211
|
let [s, c] = a("hub");
|
|
22192
22212
|
return /* @__PURE__ */ B("div", {
|
|
22193
22213
|
className: x,
|
|
@@ -22202,7 +22222,7 @@ function BT({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered
|
|
|
22202
22222
|
"data-source": n,
|
|
22203
22223
|
role: "group",
|
|
22204
22224
|
"aria-label": "Catalog source",
|
|
22205
|
-
children:
|
|
22225
|
+
children: RT.map((e) => /* @__PURE__ */ z("button", {
|
|
22206
22226
|
type: "button",
|
|
22207
22227
|
"aria-pressed": n === e.value,
|
|
22208
22228
|
onClick: () => r(e.value),
|
|
@@ -22210,22 +22230,22 @@ function BT({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered
|
|
|
22210
22230
|
children: e.label
|
|
22211
22231
|
}, e.value))
|
|
22212
22232
|
}),
|
|
22213
|
-
end: /* @__PURE__ */ z(
|
|
22233
|
+
end: /* @__PURE__ */ z(QC, {
|
|
22214
22234
|
selectedNodeId: s,
|
|
22215
22235
|
onSelect: c
|
|
22216
22236
|
})
|
|
22217
22237
|
}),
|
|
22218
|
-
n === "camstack" && /* @__PURE__ */ z(
|
|
22238
|
+
n === "camstack" && /* @__PURE__ */ z(UT, {
|
|
22219
22239
|
trpc: e,
|
|
22220
22240
|
refreshKey: t,
|
|
22221
22241
|
nodeId: s
|
|
22222
22242
|
}),
|
|
22223
|
-
n === "scrypted" && /* @__PURE__ */ z(
|
|
22243
|
+
n === "scrypted" && /* @__PURE__ */ z(Jw, {
|
|
22224
22244
|
trpc: e,
|
|
22225
22245
|
landNodeId: s,
|
|
22226
22246
|
onImported: () => i?.()
|
|
22227
22247
|
}),
|
|
22228
|
-
n === "frigate" && /* @__PURE__ */ z(
|
|
22248
|
+
n === "frigate" && /* @__PURE__ */ z(FT, {
|
|
22229
22249
|
trpc: e,
|
|
22230
22250
|
landNodeId: s,
|
|
22231
22251
|
onRegistered: (e) => {
|
|
@@ -22239,15 +22259,15 @@ function BT({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered
|
|
|
22239
22259
|
}
|
|
22240
22260
|
//#endregion
|
|
22241
22261
|
//#region src/ensure-formats.ts
|
|
22242
|
-
function
|
|
22262
|
+
function GT(e) {
|
|
22243
22263
|
return e.length === 0 ? "" : ` Engine conversions: ${e.map((e) => e.ok ? `${e.format} ✓${e.nodeId ? ` (${e.nodeId})` : ""}` : `${e.format} ✗ — ${e.error ?? "failed"}`).join("; ")}.`;
|
|
22244
22264
|
}
|
|
22245
22265
|
//#endregion
|
|
22246
22266
|
//#region src/frigate/registration.ts
|
|
22247
|
-
var
|
|
22248
|
-
function
|
|
22249
|
-
let t = e.type === "custom" ? null :
|
|
22250
|
-
if (!
|
|
22267
|
+
var KT = /^[a-zA-Z0-9._-]+$/;
|
|
22268
|
+
function qT(e) {
|
|
22269
|
+
let t = e.type === "custom" ? null : $w[e.type];
|
|
22270
|
+
if (!KT.test(e.modelId)) throw Error(`Model id "${e.modelId}" is invalid — letters, digits, dot, underscore, hyphen only`);
|
|
22251
22271
|
if (!e.name.trim()) throw Error("Display name is required");
|
|
22252
22272
|
if (!e.stepId.trim()) throw Error("Step is required");
|
|
22253
22273
|
if (!(e.inputWidth > 0) || !(e.inputHeight > 0)) throw Error("Input size must be positive");
|
|
@@ -22279,7 +22299,7 @@ function UT(e) {
|
|
|
22279
22299
|
...e.defaultClassFloors === void 0 ? {} : { defaultClassFloors: { ...e.defaultClassFloors } }
|
|
22280
22300
|
} : {
|
|
22281
22301
|
provider: "frigate",
|
|
22282
|
-
group:
|
|
22302
|
+
group: Qw(e.type, e.inputWidth),
|
|
22283
22303
|
...F(e.labels),
|
|
22284
22304
|
defaultClassFloors: Ce("stock", e.defaultClassFloors)
|
|
22285
22305
|
}
|
|
@@ -22292,11 +22312,11 @@ function UT(e) {
|
|
|
22292
22312
|
//#endregion
|
|
22293
22313
|
//#region src/components/StepSelect.tsx
|
|
22294
22314
|
t();
|
|
22295
|
-
function
|
|
22315
|
+
function JT({ trpc: e, label: t = "Step", value: n, onChange: r, slots: i }) {
|
|
22296
22316
|
let [o, s] = a(null), [c, l] = a(null);
|
|
22297
22317
|
return m(() => {
|
|
22298
22318
|
let t = !1;
|
|
22299
|
-
return
|
|
22319
|
+
return CC(e).then((e) => {
|
|
22300
22320
|
if (t) return;
|
|
22301
22321
|
let a = i ? e.filter((e) => i.includes(e.slot)) : e;
|
|
22302
22322
|
s(a), l(null), a.length > 0 && !a.some((e) => e.id === n) && r(a[0].id);
|
|
@@ -22305,7 +22325,7 @@ function WT({ trpc: e, label: t = "Step", value: n, onChange: r, slots: i }) {
|
|
|
22305
22325
|
}), () => {
|
|
22306
22326
|
t = !0;
|
|
22307
22327
|
};
|
|
22308
|
-
}, [e]), /* @__PURE__ */ B(
|
|
22328
|
+
}, [e]), /* @__PURE__ */ B($C, {
|
|
22309
22329
|
label: t,
|
|
22310
22330
|
children: [/* @__PURE__ */ B("select", {
|
|
22311
22331
|
value: n,
|
|
@@ -22338,7 +22358,7 @@ function WT({ trpc: e, label: t = "Step", value: n, onChange: r, slots: i }) {
|
|
|
22338
22358
|
}
|
|
22339
22359
|
//#endregion
|
|
22340
22360
|
//#region src/ui/probe-custom-model.ts
|
|
22341
|
-
var
|
|
22361
|
+
var YT = {
|
|
22342
22362
|
".onnx": "onnx",
|
|
22343
22363
|
".tflite": "tflite",
|
|
22344
22364
|
".pt": "pt",
|
|
@@ -22347,30 +22367,30 @@ var GT = {
|
|
|
22347
22367
|
".mlmodel": "coreml",
|
|
22348
22368
|
".xml": "openvino"
|
|
22349
22369
|
};
|
|
22350
|
-
function
|
|
22370
|
+
function XT(e) {
|
|
22351
22371
|
let t = (e.split(/[/?#]/).pop() ?? e).toLowerCase();
|
|
22352
22372
|
if (t.endsWith(".mlpackage")) return ".mlpackage";
|
|
22353
22373
|
let n = t.lastIndexOf(".");
|
|
22354
22374
|
return n >= 0 ? t.slice(n) : "";
|
|
22355
22375
|
}
|
|
22356
|
-
function
|
|
22376
|
+
function ZT(e) {
|
|
22357
22377
|
return (e.split(/[/?#]/).pop() ?? e).replace(/\.(onnx|tflite|pt|pth|xml|mlmodel|mlpackage)$/i, "");
|
|
22358
22378
|
}
|
|
22359
|
-
function
|
|
22379
|
+
function QT(e) {
|
|
22360
22380
|
let t = e.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
22361
22381
|
return t.length > 0 ? t : "custom-model";
|
|
22362
22382
|
}
|
|
22363
|
-
function
|
|
22383
|
+
function $T(e) {
|
|
22364
22384
|
return /\b640\b/.test(e) || /[_-]640([_-]|$)/.test(e) ? 640 : (/\b320\b/.test(e) || /[_-]320([_-]|$)/.test(e), 320);
|
|
22365
22385
|
}
|
|
22366
|
-
function
|
|
22386
|
+
function eE(e) {
|
|
22367
22387
|
let t = e.replace(/[_-]+/g, " ").trim();
|
|
22368
22388
|
return t.length === 0 ? "Custom model" : t.replace(/\b\w/g, (e) => e.toUpperCase());
|
|
22369
22389
|
}
|
|
22370
|
-
function
|
|
22371
|
-
let t = [], n = e.kind === "file" ? e.filename : e.url, r =
|
|
22390
|
+
function tE(e) {
|
|
22391
|
+
let t = [], n = e.kind === "file" ? e.filename : e.url, r = YT[XT(n)] ?? null;
|
|
22372
22392
|
r === null && n.trim().length > 0 && t.push("Could not infer format from extension — pick it below.");
|
|
22373
|
-
let i =
|
|
22393
|
+
let i = ZT(n), a = QT(i), o = eE(i), s = $T(i);
|
|
22374
22394
|
s === 640 ? t.push("Input size guessed 640 from the name.") : t.push("Input size default 320 (edit if the model expects another).");
|
|
22375
22395
|
let c = null;
|
|
22376
22396
|
return e.kind === "file" && typeof e.bytes == "number" && e.bytes > 0 && (c = Number((e.bytes / 1e6).toFixed(1))), t.push("Decode (postprocessor) is not inferred — choose to match the model output."), {
|
|
@@ -22385,13 +22405,13 @@ function ZT(e) {
|
|
|
22385
22405
|
//#endregion
|
|
22386
22406
|
//#region src/tabs/RegisterTab.tsx
|
|
22387
22407
|
t();
|
|
22388
|
-
var
|
|
22408
|
+
var nE = [
|
|
22389
22409
|
"onnx",
|
|
22390
22410
|
"openvino",
|
|
22391
22411
|
"coreml",
|
|
22392
22412
|
"tflite",
|
|
22393
22413
|
"pt"
|
|
22394
|
-
],
|
|
22414
|
+
], rE = [
|
|
22395
22415
|
"yolo",
|
|
22396
22416
|
"yolonas",
|
|
22397
22417
|
"ssd",
|
|
@@ -22404,24 +22424,24 @@ var QT = [
|
|
|
22404
22424
|
"ctc",
|
|
22405
22425
|
"plate-slots",
|
|
22406
22426
|
"saliency"
|
|
22407
|
-
],
|
|
22427
|
+
], iE = [
|
|
22408
22428
|
".onnx",
|
|
22409
22429
|
".tflite",
|
|
22410
22430
|
".pt"
|
|
22411
|
-
],
|
|
22431
|
+
], aE = [{
|
|
22412
22432
|
value: "upload",
|
|
22413
22433
|
label: "Upload file"
|
|
22414
22434
|
}, {
|
|
22415
22435
|
value: "url",
|
|
22416
22436
|
label: "Remote URL"
|
|
22417
22437
|
}];
|
|
22418
|
-
function
|
|
22419
|
-
let s =
|
|
22438
|
+
function oE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsumed: i }) {
|
|
22439
|
+
let s = mw(), [c, u] = a("upload"), [d, f] = a(""), [p, h] = a(""), [g, _] = a("object-detection"), [v, y] = a("onnx"), [b, x] = a(""), [S, C] = a(""), [w, T] = a(0), [E, D] = a(320), [O, k] = a(320), [ee, A] = a(""), [te, j] = a(null), [ne, re] = a([]), [M, ie] = a({ state: "idle" }), [ae, oe] = a(!1), [se, N] = a(null), [P, ce] = a(null), le = o(null), F = l(() => eT(ee), [ee]);
|
|
22420
22440
|
m(() => {
|
|
22421
22441
|
r != null && (u("upload"), y(r.format), x(r.postprocessor ?? ""), D(r.inputSize), k(r.inputSize), A(r.labels.join("\n")), j(r.sourceLabel), N(null), ce(null), i?.());
|
|
22422
22442
|
}, [r, i]);
|
|
22423
22443
|
let ue = n((e, t) => {
|
|
22424
|
-
let n =
|
|
22444
|
+
let n = tE(e);
|
|
22425
22445
|
re(n.hints), n.format !== null && y(n.format), D(n.inputSize), k(n.inputSize), (t?.forceId || !d) && f(n.modelId), p || h(n.name), n.sizeMB !== null && e.kind === "url" && T(n.sizeMB);
|
|
22426
22446
|
}, [d, p]), de = n(async (t) => {
|
|
22427
22447
|
N(null), ue({
|
|
@@ -22435,7 +22455,7 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22435
22455
|
try {
|
|
22436
22456
|
ie({
|
|
22437
22457
|
state: "done",
|
|
22438
|
-
file: await
|
|
22458
|
+
file: await jC(e, t, (e, t) => {
|
|
22439
22459
|
ie({
|
|
22440
22460
|
state: "uploading",
|
|
22441
22461
|
pct: Math.round(e / t * 100)
|
|
@@ -22477,13 +22497,13 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22477
22497
|
sizeMB: w
|
|
22478
22498
|
} : null;
|
|
22479
22499
|
if (n === null) return N(c === "upload" ? "Upload the model file first" : "Model URL is required");
|
|
22480
|
-
if (
|
|
22500
|
+
if (Gw(p)) return N("The display name is not acceptable");
|
|
22481
22501
|
oe(!0);
|
|
22482
22502
|
try {
|
|
22483
|
-
let r =
|
|
22503
|
+
let r = rE.find((e) => e === b), i = qT({
|
|
22484
22504
|
type: "custom",
|
|
22485
22505
|
modelId: d.trim(),
|
|
22486
|
-
name:
|
|
22506
|
+
name: Ww(p) ?? d.trim(),
|
|
22487
22507
|
stepId: g,
|
|
22488
22508
|
source: n,
|
|
22489
22509
|
format: v,
|
|
@@ -22508,11 +22528,11 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22508
22528
|
}],
|
|
22509
22529
|
initialLog: `Registering "${i.entry.name}"…`
|
|
22510
22530
|
}, async ({ appendLog: t, patchSteps: n }) => {
|
|
22511
|
-
let r = await
|
|
22531
|
+
let r = await _C(e, i);
|
|
22512
22532
|
n((e) => e.map((e) => e.status === "active" || e.status === "pending" ? {
|
|
22513
22533
|
...e,
|
|
22514
22534
|
status: "done"
|
|
22515
|
-
} : e)), t(`Registered for step ${g}.${
|
|
22535
|
+
} : e)), t(`Registered for step ${g}.${GT(r.conversions)}`);
|
|
22516
22536
|
});
|
|
22517
22537
|
let a = `Registered "${i.entry.name}".`;
|
|
22518
22538
|
ce(a), t(a);
|
|
@@ -22557,7 +22577,7 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22557
22577
|
children: "Source"
|
|
22558
22578
|
}), /* @__PURE__ */ z("div", {
|
|
22559
22579
|
className: "inline-flex rounded-md border border-border overflow-hidden",
|
|
22560
|
-
children:
|
|
22580
|
+
children: aE.map((e) => /* @__PURE__ */ z("button", {
|
|
22561
22581
|
type: "button",
|
|
22562
22582
|
onClick: () => {
|
|
22563
22583
|
N(null), ce(null), u(e.value);
|
|
@@ -22579,8 +22599,8 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22579
22599
|
". Upload your exported file below."
|
|
22580
22600
|
]
|
|
22581
22601
|
}),
|
|
22582
|
-
c === "upload" ? /* @__PURE__ */ B(
|
|
22583
|
-
label: `Model file (${
|
|
22602
|
+
c === "upload" ? /* @__PURE__ */ B($C, {
|
|
22603
|
+
label: `Model file (${iE.join(" / ")})`,
|
|
22584
22604
|
children: [
|
|
22585
22605
|
/* @__PURE__ */ B("div", {
|
|
22586
22606
|
className: "flex items-center gap-3 flex-wrap",
|
|
@@ -22612,7 +22632,7 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22612
22632
|
/* @__PURE__ */ z("input", {
|
|
22613
22633
|
ref: le,
|
|
22614
22634
|
type: "file",
|
|
22615
|
-
accept:
|
|
22635
|
+
accept: iE.join(","),
|
|
22616
22636
|
className: "hidden",
|
|
22617
22637
|
onChange: (e) => {
|
|
22618
22638
|
let t = e.target.files?.[0];
|
|
@@ -22633,13 +22653,13 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22633
22653
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
22634
22654
|
children: [/* @__PURE__ */ z("div", {
|
|
22635
22655
|
className: "sm:col-span-2",
|
|
22636
|
-
children: /* @__PURE__ */ z(
|
|
22656
|
+
children: /* @__PURE__ */ z(ew, {
|
|
22637
22657
|
label: "Model URL / HuggingFace path",
|
|
22638
22658
|
value: S,
|
|
22639
22659
|
onChange: C,
|
|
22640
22660
|
placeholder: "https://… or hf://org/repo/model.onnx"
|
|
22641
22661
|
})
|
|
22642
|
-
}), /* @__PURE__ */ z(
|
|
22662
|
+
}), /* @__PURE__ */ z(tw, {
|
|
22643
22663
|
label: "Size (MB)",
|
|
22644
22664
|
value: w,
|
|
22645
22665
|
onChange: T,
|
|
@@ -22658,12 +22678,12 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22658
22678
|
}),
|
|
22659
22679
|
/* @__PURE__ */ B("div", {
|
|
22660
22680
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
22661
|
-
children: [/* @__PURE__ */ z(
|
|
22681
|
+
children: [/* @__PURE__ */ z(ew, {
|
|
22662
22682
|
label: "Model id",
|
|
22663
22683
|
value: d,
|
|
22664
22684
|
onChange: f,
|
|
22665
22685
|
placeholder: "my-detector"
|
|
22666
|
-
}), /* @__PURE__ */ z(
|
|
22686
|
+
}), /* @__PURE__ */ z(Uw, {
|
|
22667
22687
|
value: p,
|
|
22668
22688
|
onChange: h,
|
|
22669
22689
|
defaultName: d.trim() || "My Detector"
|
|
@@ -22672,18 +22692,18 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22672
22692
|
/* @__PURE__ */ B("div", {
|
|
22673
22693
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
22674
22694
|
children: [
|
|
22675
|
-
/* @__PURE__ */ z(
|
|
22695
|
+
/* @__PURE__ */ z(JT, {
|
|
22676
22696
|
trpc: e,
|
|
22677
22697
|
value: g,
|
|
22678
22698
|
onChange: _
|
|
22679
22699
|
}),
|
|
22680
|
-
/* @__PURE__ */ z(
|
|
22700
|
+
/* @__PURE__ */ z(tw, {
|
|
22681
22701
|
label: "Input width",
|
|
22682
22702
|
value: E,
|
|
22683
22703
|
onChange: D,
|
|
22684
22704
|
min: 1
|
|
22685
22705
|
}),
|
|
22686
|
-
/* @__PURE__ */ z(
|
|
22706
|
+
/* @__PURE__ */ z(tw, {
|
|
22687
22707
|
label: "Input height",
|
|
22688
22708
|
value: O,
|
|
22689
22709
|
onChange: k,
|
|
@@ -22693,21 +22713,21 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22693
22713
|
}),
|
|
22694
22714
|
/* @__PURE__ */ B("div", {
|
|
22695
22715
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
22696
|
-
children: [/* @__PURE__ */ z(
|
|
22716
|
+
children: [/* @__PURE__ */ z($C, {
|
|
22697
22717
|
label: "Format",
|
|
22698
22718
|
children: /* @__PURE__ */ z("select", {
|
|
22699
22719
|
value: v,
|
|
22700
22720
|
onChange: (e) => {
|
|
22701
|
-
let t =
|
|
22721
|
+
let t = nE.find((t) => t === e.target.value);
|
|
22702
22722
|
t !== void 0 && y(t);
|
|
22703
22723
|
},
|
|
22704
22724
|
className: "w-full px-3 py-1.5 text-xs rounded-md border border-border bg-surface text-foreground focus:outline-none focus:border-primary/50",
|
|
22705
|
-
children:
|
|
22725
|
+
children: nE.map((e) => /* @__PURE__ */ z("option", {
|
|
22706
22726
|
value: e,
|
|
22707
22727
|
children: e
|
|
22708
22728
|
}, e))
|
|
22709
22729
|
})
|
|
22710
|
-
}), /* @__PURE__ */ B(
|
|
22730
|
+
}), /* @__PURE__ */ B($C, {
|
|
22711
22731
|
label: "Decode (postprocessor)",
|
|
22712
22732
|
children: [/* @__PURE__ */ B("select", {
|
|
22713
22733
|
value: b,
|
|
@@ -22716,7 +22736,7 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22716
22736
|
children: [/* @__PURE__ */ z("option", {
|
|
22717
22737
|
value: "",
|
|
22718
22738
|
children: "Step default"
|
|
22719
|
-
}),
|
|
22739
|
+
}), rE.map((e) => /* @__PURE__ */ z("option", {
|
|
22720
22740
|
value: e,
|
|
22721
22741
|
children: e
|
|
22722
22742
|
}, e))]
|
|
@@ -22726,7 +22746,7 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22726
22746
|
})]
|
|
22727
22747
|
})]
|
|
22728
22748
|
}),
|
|
22729
|
-
/* @__PURE__ */ z(
|
|
22749
|
+
/* @__PURE__ */ z($C, {
|
|
22730
22750
|
label: `Labelmap (${F.length} labels — order = model output index)`,
|
|
22731
22751
|
children: /* @__PURE__ */ z("textarea", {
|
|
22732
22752
|
value: ee,
|
|
@@ -22751,7 +22771,7 @@ function nE({ trpc: e, onRegistered: t, initialPrefill: r = null, onPrefillConsu
|
|
|
22751
22771
|
//#endregion
|
|
22752
22772
|
//#region src/tabs/ImportTab.tsx
|
|
22753
22773
|
t();
|
|
22754
|
-
function
|
|
22774
|
+
function sE({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsumed: r }) {
|
|
22755
22775
|
let [i, o] = a(null), [s, c] = a(null), [l, u] = a(n);
|
|
22756
22776
|
return m(() => {
|
|
22757
22777
|
n !== null && u(n);
|
|
@@ -22767,7 +22787,7 @@ function rE({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsu
|
|
|
22767
22787
|
className: "rounded-md border border-success/30 bg-success/10 px-3 py-2 text-xs text-success",
|
|
22768
22788
|
children: s
|
|
22769
22789
|
}),
|
|
22770
|
-
/* @__PURE__ */ z(
|
|
22790
|
+
/* @__PURE__ */ z(oE, {
|
|
22771
22791
|
trpc: e,
|
|
22772
22792
|
onRegistered: (e) => {
|
|
22773
22793
|
c(e ?? "Registered."), o(null), t();
|
|
@@ -22782,7 +22802,7 @@ function rE({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsu
|
|
|
22782
22802
|
}
|
|
22783
22803
|
//#endregion
|
|
22784
22804
|
//#region src/ui/installed-activation.ts
|
|
22785
|
-
function
|
|
22805
|
+
function cE(e, t, n, r, i) {
|
|
22786
22806
|
if (r == null || de(t)) return [];
|
|
22787
22807
|
let a = [];
|
|
22788
22808
|
for (let o of e) o.enabled && i.has(o.format) && Uo(r.models, o.format) && Wo({
|
|
@@ -22796,10 +22816,10 @@ function iE(e, t, n, r, i) {
|
|
|
22796
22816
|
});
|
|
22797
22817
|
return a;
|
|
22798
22818
|
}
|
|
22799
|
-
function
|
|
22819
|
+
function lE(e, t) {
|
|
22800
22820
|
return { [Ne(e)]: t };
|
|
22801
22821
|
}
|
|
22802
|
-
function
|
|
22822
|
+
function uE(e, t, n) {
|
|
22803
22823
|
let r = Object.keys(t).length > 0;
|
|
22804
22824
|
return {
|
|
22805
22825
|
enabled: n ? !0 : e.enabled,
|
|
@@ -22808,18 +22828,18 @@ function oE(e, t, n) {
|
|
|
22808
22828
|
...r ? { steps: t } : {}
|
|
22809
22829
|
};
|
|
22810
22830
|
}
|
|
22811
|
-
function
|
|
22831
|
+
function dE(e, t, n, r) {
|
|
22812
22832
|
let i = new Set(r), a = {};
|
|
22813
22833
|
for (let r of e) {
|
|
22814
22834
|
let e = { ...r.steps };
|
|
22815
22835
|
i.has(r.key) && (e[t] = {
|
|
22816
22836
|
...e[t],
|
|
22817
22837
|
modelId: n
|
|
22818
|
-
}), a[r.key] =
|
|
22838
|
+
}), a[r.key] = uE(r, e, i.has(r.key));
|
|
22819
22839
|
}
|
|
22820
22840
|
return a;
|
|
22821
22841
|
}
|
|
22822
|
-
function
|
|
22842
|
+
function fE(e, t, n, r, i) {
|
|
22823
22843
|
let a = {};
|
|
22824
22844
|
for (let o of e) {
|
|
22825
22845
|
let e = { ...o.steps };
|
|
@@ -22835,52 +22855,52 @@ function cE(e, t, n, r, i) {
|
|
|
22835
22855
|
Object.keys(i).length > 0 ? e[t] = i : delete e[t];
|
|
22836
22856
|
}
|
|
22837
22857
|
}
|
|
22838
|
-
a[o.key] =
|
|
22858
|
+
a[o.key] = uE(o, e, o.key === i);
|
|
22839
22859
|
}
|
|
22840
22860
|
return a;
|
|
22841
22861
|
}
|
|
22842
22862
|
//#endregion
|
|
22843
22863
|
//#region src/ui/installed-inventory.ts
|
|
22844
|
-
function
|
|
22864
|
+
function pE(e) {
|
|
22845
22865
|
return Po(e);
|
|
22846
22866
|
}
|
|
22847
|
-
function
|
|
22867
|
+
function mE(e) {
|
|
22848
22868
|
return e.map((e) => ({
|
|
22849
22869
|
value: e.key,
|
|
22850
|
-
label:
|
|
22870
|
+
label: pE(e),
|
|
22851
22871
|
enabled: e.enabled
|
|
22852
22872
|
}));
|
|
22853
22873
|
}
|
|
22854
|
-
var
|
|
22855
|
-
function
|
|
22856
|
-
let n =
|
|
22874
|
+
var hE = /\[([^\]]+)\]\s*$/;
|
|
22875
|
+
function gE(e, t) {
|
|
22876
|
+
let n = hE.exec(e.engineKey)?.[1];
|
|
22857
22877
|
return n === void 0 ? e.engine.format === t.format ? e.engine.backend === t.backend ? e.engine.device === t.device : t.key === "cpu" && e.engine.device === "cpu" : !1 : n === t.key;
|
|
22858
22878
|
}
|
|
22859
|
-
function
|
|
22879
|
+
function _E(e, t, n, r) {
|
|
22860
22880
|
if (e === null) return null;
|
|
22861
22881
|
let i = `${n}/${r}`;
|
|
22862
|
-
return e.some((e) =>
|
|
22882
|
+
return e.some((e) => gE(e, t) && e.modelsLoaded.includes(i));
|
|
22863
22883
|
}
|
|
22864
|
-
var
|
|
22865
|
-
function
|
|
22884
|
+
var vE = new Set(["audio-classifier"]);
|
|
22885
|
+
function yE(e, t, n) {
|
|
22866
22886
|
return t?.[e] ?? n?.defaultModelId;
|
|
22867
22887
|
}
|
|
22868
|
-
function
|
|
22888
|
+
function bE(e, t) {
|
|
22869
22889
|
if (e.onDisk !== "current") return /* @__PURE__ */ new Set();
|
|
22870
22890
|
let n = t.stepCatalogs[e.stepId], r = new Set([e.format]);
|
|
22871
|
-
return de(e.stepId) ?
|
|
22891
|
+
return de(e.stepId) ? yE(e.stepId, t.clusterModels, n) === e.modelId ? new Set(t.devices.filter((t) => t.enabled && t.format === e.format).map((e) => e.key)) : /* @__PURE__ */ new Set() : new Set(cE(t.devices, e.stepId, e.modelId, n, r).map((e) => e.deviceKey));
|
|
22872
22892
|
}
|
|
22873
|
-
function
|
|
22893
|
+
function xE(e, t, n) {
|
|
22874
22894
|
return t ? "outside-pools" : e.some((e) => e.loaded === !0) ? "in-use" : e.some((e) => e.configured) ? "configured" : e.some((e) => e.enabled) ? n ? "idle" : "unknown" : "unused";
|
|
22875
22895
|
}
|
|
22876
|
-
function
|
|
22877
|
-
let n =
|
|
22896
|
+
function SE(e, t) {
|
|
22897
|
+
let n = bE(e, t), r = t.devices.filter((t) => t.format === e.format).map((r) => ({
|
|
22878
22898
|
deviceKey: r.key,
|
|
22879
|
-
label:
|
|
22899
|
+
label: pE(r),
|
|
22880
22900
|
enabled: r.enabled,
|
|
22881
|
-
loaded:
|
|
22901
|
+
loaded: _E(t.engines, r, e.stepId, e.modelId),
|
|
22882
22902
|
configured: n.has(r.key)
|
|
22883
|
-
})).toSorted((e, t) => e.label.localeCompare(t.label)), i = t.stepCatalogs[e.stepId]?.slot, a =
|
|
22903
|
+
})).toSorted((e, t) => e.label.localeCompare(t.label)), i = t.stepCatalogs[e.stepId]?.slot, a = xE(r, i !== void 0 && vE.has(i), t.engines !== null);
|
|
22884
22904
|
return {
|
|
22885
22905
|
...e,
|
|
22886
22906
|
key: `${e.stepId}::${e.modelId}::${e.format}`,
|
|
@@ -22891,7 +22911,7 @@ function vE(e, t) {
|
|
|
22891
22911
|
removable: a === "idle" || a === "unused"
|
|
22892
22912
|
};
|
|
22893
22913
|
}
|
|
22894
|
-
function
|
|
22914
|
+
function CE(e, t, n) {
|
|
22895
22915
|
return t.onDisk === "missing" ? null : {
|
|
22896
22916
|
stepId: e.stepId,
|
|
22897
22917
|
modelId: e.modelId,
|
|
@@ -22903,17 +22923,17 @@ function yE(e, t, n) {
|
|
|
22903
22923
|
...t.precision === void 0 ? {} : { precision: t.precision },
|
|
22904
22924
|
onDisk: t.onDisk,
|
|
22905
22925
|
origin: n.has(e.modelId) ? "registry" : "pipeline",
|
|
22906
|
-
...
|
|
22926
|
+
...XS(e.supplies)
|
|
22907
22927
|
};
|
|
22908
22928
|
}
|
|
22909
|
-
function
|
|
22929
|
+
function wE(e, t) {
|
|
22910
22930
|
let n = [];
|
|
22911
22931
|
for (let r of e.registry) {
|
|
22912
22932
|
let i = r.entry.id, a = e.availability[i]?.[e.nodeId];
|
|
22913
22933
|
if (a !== void 0) for (let [e, o] of Object.entries(a.formats)) t.has(`${r.stepId}::${i}::${e}`) || n.push({
|
|
22914
22934
|
stepId: r.stepId,
|
|
22915
22935
|
modelId: i,
|
|
22916
|
-
name:
|
|
22936
|
+
name: zS(r.entry),
|
|
22917
22937
|
description: r.entry.description,
|
|
22918
22938
|
provider: we({
|
|
22919
22939
|
id: i,
|
|
@@ -22924,33 +22944,33 @@ function bE(e, t) {
|
|
|
22924
22944
|
sizeMB: o.bytes / 1e6,
|
|
22925
22945
|
onDisk: "current",
|
|
22926
22946
|
origin: "registry",
|
|
22927
|
-
...
|
|
22947
|
+
...XS(VS(r))
|
|
22928
22948
|
});
|
|
22929
22949
|
}
|
|
22930
22950
|
return n;
|
|
22931
22951
|
}
|
|
22932
|
-
function
|
|
22952
|
+
function TE(e) {
|
|
22933
22953
|
let t = new Set(e.registry.map((e) => e.entry.id)), n = e.seeds.flatMap((e) => e.formats.flatMap((n) => {
|
|
22934
|
-
let r =
|
|
22954
|
+
let r = CE(e, n, t);
|
|
22935
22955
|
return r === null ? [] : [r];
|
|
22936
22956
|
})), r = new Set(n.map((e) => `${e.stepId}::${e.modelId}::${e.format}`)), i = new Map(e.registry.map((e) => [e.entry.id, e.entry.description]));
|
|
22937
|
-
return [...n, ...
|
|
22957
|
+
return [...n, ...wE(e, r)].map((e) => ({
|
|
22938
22958
|
...e,
|
|
22939
22959
|
description: i.get(e.modelId) ?? e.description
|
|
22940
|
-
})).map((t) =>
|
|
22960
|
+
})).map((t) => SE(t, e)).toSorted((e, t) => e.name.localeCompare(t.name) || e.format.localeCompare(t.format));
|
|
22941
22961
|
}
|
|
22942
|
-
function
|
|
22962
|
+
function EE(e, t, n) {
|
|
22943
22963
|
let r = n.device === "all" ? void 0 : t.find((e) => e.key === n.device)?.format;
|
|
22944
22964
|
return e.filter((e) => !(n.provider !== "all" && e.provider !== n.provider || n.step !== "all" && e.stepId !== n.step || n.device !== "all" && e.format !== r));
|
|
22945
22965
|
}
|
|
22946
|
-
function
|
|
22966
|
+
function DE(e) {
|
|
22947
22967
|
return e.filter((e) => e.removable).reduce((e, t) => e + t.sizeMB, 0);
|
|
22948
22968
|
}
|
|
22949
|
-
function
|
|
22969
|
+
function OE(e, t, n, r) {
|
|
22950
22970
|
let i = e.devices.filter((e) => e.enabled && e.format === r).map((r) => ({
|
|
22951
22971
|
deviceKey: r.key,
|
|
22952
|
-
label:
|
|
22953
|
-
loaded:
|
|
22972
|
+
label: pE(r),
|
|
22973
|
+
loaded: _E(e.engines, r, t, n)
|
|
22954
22974
|
})).toSorted((e, t) => e.label.localeCompare(t.label)), a = e.stepCatalogs[t]?.models.find((e) => e.id === n), o = e.seeds.find((e) => e.stepId === t && e.modelId === n)?.formats.find((e) => e.format === r)?.onDisk ?? "missing";
|
|
22955
22975
|
return {
|
|
22956
22976
|
format: r,
|
|
@@ -22959,7 +22979,7 @@ function wE(e, t, n, r) {
|
|
|
22959
22979
|
onDisk: o
|
|
22960
22980
|
};
|
|
22961
22981
|
}
|
|
22962
|
-
function
|
|
22982
|
+
function kE(e, t, n) {
|
|
22963
22983
|
return {
|
|
22964
22984
|
stepId: e,
|
|
22965
22985
|
modelId: t,
|
|
@@ -22972,7 +22992,7 @@ function TE(e, t, n) {
|
|
|
22972
22992
|
let r = [...new Set(n.devices.filter((e) => e.enabled).map((e) => e.format))];
|
|
22973
22993
|
return {
|
|
22974
22994
|
nodeId: n.nodeId,
|
|
22975
|
-
entries: r.map((r) =>
|
|
22995
|
+
entries: r.map((r) => OE(n, e, t, r))
|
|
22976
22996
|
};
|
|
22977
22997
|
})
|
|
22978
22998
|
};
|
|
@@ -22980,7 +23000,7 @@ function TE(e, t, n) {
|
|
|
22980
23000
|
//#endregion
|
|
22981
23001
|
//#region src/components/InstalledSettingsModal.tsx
|
|
22982
23002
|
t();
|
|
22983
|
-
function
|
|
23003
|
+
function AE({ trpc: e, nodeId: t, stepId: r, modelId: i, modelName: o, devices: s, deviceKey: c, onClose: l, onDone: u }) {
|
|
22984
23004
|
let [d, f] = a(!1), [p, h] = a(null), [g, _] = a(null), [v, y] = a({
|
|
22985
23005
|
enabled: !0,
|
|
22986
23006
|
modelId: i,
|
|
@@ -22988,7 +23008,7 @@ function EE({ trpc: e, nodeId: t, stepId: r, modelId: i, modelName: o, devices:
|
|
|
22988
23008
|
}), b = s.find((e) => e.key === c);
|
|
22989
23009
|
m(() => {
|
|
22990
23010
|
let n = !1;
|
|
22991
|
-
return
|
|
23011
|
+
return JC(e, r, t).then((e) => {
|
|
22992
23012
|
if (n) return;
|
|
22993
23013
|
_(e);
|
|
22994
23014
|
let t = b?.steps?.[r];
|
|
@@ -23010,9 +23030,9 @@ function EE({ trpc: e, nodeId: t, stepId: r, modelId: i, modelName: o, devices:
|
|
|
23010
23030
|
let x = n(async () => {
|
|
23011
23031
|
f(!0), h(null);
|
|
23012
23032
|
try {
|
|
23013
|
-
await
|
|
23033
|
+
await WC(e, {
|
|
23014
23034
|
agentNodeId: t,
|
|
23015
|
-
inferenceDevices:
|
|
23035
|
+
inferenceDevices: fE(s, r, v.modelId ?? i, v.settings ?? {}, c)
|
|
23016
23036
|
}), u(), l();
|
|
23017
23037
|
} catch (e) {
|
|
23018
23038
|
h(e instanceof Error ? e.message : "Save settings failed");
|
|
@@ -23102,12 +23122,12 @@ function EE({ trpc: e, nodeId: t, stepId: r, modelId: i, modelName: o, devices:
|
|
|
23102
23122
|
//#endregion
|
|
23103
23123
|
//#region src/components/installed/use-cluster-placement.ts
|
|
23104
23124
|
t();
|
|
23105
|
-
async function
|
|
23125
|
+
async function jE(e, t) {
|
|
23106
23126
|
try {
|
|
23107
23127
|
let [n, r, i] = await Promise.all([
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23128
|
+
EC(e, t),
|
|
23129
|
+
HC(e, t),
|
|
23130
|
+
UC(e, t).catch(() => null)
|
|
23111
23131
|
]);
|
|
23112
23132
|
return {
|
|
23113
23133
|
nodeId: t,
|
|
@@ -23123,11 +23143,11 @@ async function DE(e, t) {
|
|
|
23123
23143
|
};
|
|
23124
23144
|
}
|
|
23125
23145
|
}
|
|
23126
|
-
function
|
|
23146
|
+
function ME(e, t, n) {
|
|
23127
23147
|
let [r, i] = a(null), o = t.join("\n");
|
|
23128
23148
|
return m(() => {
|
|
23129
23149
|
let t = !1, n = o.length === 0 ? [] : o.split("\n");
|
|
23130
|
-
return Promise.all(n.map((t) =>
|
|
23150
|
+
return Promise.all(n.map((t) => jE(e, t))).then((e) => {
|
|
23131
23151
|
t || i(e);
|
|
23132
23152
|
}), () => {
|
|
23133
23153
|
t = !0;
|
|
@@ -23141,14 +23161,14 @@ function OE(e, t, n) {
|
|
|
23141
23161
|
//#endregion
|
|
23142
23162
|
//#region src/components/installed/use-online-node-ids.ts
|
|
23143
23163
|
t();
|
|
23144
|
-
function
|
|
23164
|
+
function NE() {
|
|
23145
23165
|
let { nodes: e } = Rr();
|
|
23146
23166
|
return l(() => e.filter((e) => e.isOnline).map((e) => e.id), [e]);
|
|
23147
23167
|
}
|
|
23148
23168
|
//#endregion
|
|
23149
23169
|
//#region src/components/installed/ClusterModelsSection.tsx
|
|
23150
23170
|
t();
|
|
23151
|
-
function
|
|
23171
|
+
function PE({ row: e }) {
|
|
23152
23172
|
if (e.entry === null) return /* @__PURE__ */ z(Ia, {
|
|
23153
23173
|
variant: "danger",
|
|
23154
23174
|
className: "text-[10px] px-1.5 py-0",
|
|
@@ -23176,7 +23196,7 @@ function AE({ row: e }) {
|
|
|
23176
23196
|
})]
|
|
23177
23197
|
});
|
|
23178
23198
|
}
|
|
23179
|
-
var
|
|
23199
|
+
var FE = [
|
|
23180
23200
|
{
|
|
23181
23201
|
key: "node",
|
|
23182
23202
|
header: "Node",
|
|
@@ -23205,11 +23225,11 @@ var jE = [
|
|
|
23205
23225
|
{
|
|
23206
23226
|
key: "state",
|
|
23207
23227
|
header: "State",
|
|
23208
|
-
render: (e) => /* @__PURE__ */ z(
|
|
23228
|
+
render: (e) => /* @__PURE__ */ z(PE, { row: e })
|
|
23209
23229
|
}
|
|
23210
23230
|
];
|
|
23211
|
-
function
|
|
23212
|
-
return
|
|
23231
|
+
function IE(e, t, n) {
|
|
23232
|
+
return kE(e.stepId, t, n).nodes.flatMap((e) => e.entries.length === 0 ? [{
|
|
23213
23233
|
key: e.nodeId,
|
|
23214
23234
|
nodeId: e.nodeId,
|
|
23215
23235
|
entry: null,
|
|
@@ -23220,7 +23240,7 @@ function ME(e, t, n) {
|
|
|
23220
23240
|
entry: t
|
|
23221
23241
|
})));
|
|
23222
23242
|
}
|
|
23223
|
-
function
|
|
23243
|
+
function LE(e, t) {
|
|
23224
23244
|
let n = new Map(e.options.map((e) => [e.id, e.label]));
|
|
23225
23245
|
for (let r of t ?? []) if (r.error === void 0) for (let t of r.seeds) t.stepId === e.stepId && !n.has(t.modelId) && n.set(t.modelId, t.name);
|
|
23226
23246
|
return [...n].map(([e, t]) => ({
|
|
@@ -23228,14 +23248,14 @@ function NE(e, t) {
|
|
|
23228
23248
|
label: t
|
|
23229
23249
|
}));
|
|
23230
23250
|
}
|
|
23231
|
-
function
|
|
23251
|
+
function RE({ step: e, current: t, inputs: n, onChange: r }) {
|
|
23232
23252
|
let [i, o] = a(t);
|
|
23233
23253
|
m(() => o(t), [t]);
|
|
23234
|
-
let s = l(() => n === null ? [] :
|
|
23254
|
+
let s = l(() => n === null ? [] : IE(e, t, n), [
|
|
23235
23255
|
e,
|
|
23236
23256
|
t,
|
|
23237
23257
|
n
|
|
23238
|
-
]), c = l(() =>
|
|
23258
|
+
]), c = l(() => LE(e, n), [e, n]), u = (e) => c.find((t) => t.id === e)?.label ?? e;
|
|
23239
23259
|
return /* @__PURE__ */ B("section", {
|
|
23240
23260
|
"aria-labelledby": `cluster-${e.stepId}`,
|
|
23241
23261
|
className: E,
|
|
@@ -23288,7 +23308,7 @@ function PE({ step: e, current: t, inputs: n, onChange: r }) {
|
|
|
23288
23308
|
/* @__PURE__ */ z("div", {
|
|
23289
23309
|
className: "p-2 sm:p-3",
|
|
23290
23310
|
children: /* @__PURE__ */ z(cc, {
|
|
23291
|
-
columns:
|
|
23311
|
+
columns: FE,
|
|
23292
23312
|
rows: s,
|
|
23293
23313
|
rowKey: (e) => e.key,
|
|
23294
23314
|
minWidthPx: 420,
|
|
@@ -23300,8 +23320,8 @@ function PE({ step: e, current: t, inputs: n, onChange: r }) {
|
|
|
23300
23320
|
]
|
|
23301
23321
|
});
|
|
23302
23322
|
}
|
|
23303
|
-
function
|
|
23304
|
-
let a = Ha(), o =
|
|
23323
|
+
function zE({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i }) {
|
|
23324
|
+
let a = Ha(), o = ME(e, NE(), t), s = async (t, n, o) => {
|
|
23305
23325
|
if (await a({
|
|
23306
23326
|
title: "Activate cluster-wide?",
|
|
23307
23327
|
message: `Set "${o}" as the ONE cluster model for ${t}. Shared vector index — every node uses this encoder.`,
|
|
@@ -23309,7 +23329,7 @@ function FE({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i
|
|
|
23309
23329
|
cancelLabel: "Cancel",
|
|
23310
23330
|
variant: "default"
|
|
23311
23331
|
})) try {
|
|
23312
|
-
await
|
|
23332
|
+
await KC(e, lE(t, n)), r();
|
|
23313
23333
|
} catch (e) {
|
|
23314
23334
|
i(e instanceof Error ? e.message : "Activate failed");
|
|
23315
23335
|
}
|
|
@@ -23321,7 +23341,7 @@ function FE({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i
|
|
|
23321
23341
|
id: "installed-cluster-models",
|
|
23322
23342
|
className: T,
|
|
23323
23343
|
children: "Cluster models"
|
|
23324
|
-
}), Ge.map((e) => /* @__PURE__ */ z(
|
|
23344
|
+
}), Ge.map((e) => /* @__PURE__ */ z(RE, {
|
|
23325
23345
|
step: e,
|
|
23326
23346
|
current: n?.[e.stepId] ?? e.defaultModelId,
|
|
23327
23347
|
inputs: o,
|
|
@@ -23331,19 +23351,19 @@ function FE({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i
|
|
|
23331
23351
|
}
|
|
23332
23352
|
//#endregion
|
|
23333
23353
|
//#region src/components/FillBadges.tsx
|
|
23334
|
-
function
|
|
23354
|
+
function BE(e) {
|
|
23335
23355
|
if (e.kind === "mask") return "Emits an instance mask with every detection: the Segmentation step can take its masks from this model instead of running its own.";
|
|
23336
23356
|
if (e.kind === "crop") return e.stepId === "face-detection" ? "Draws face boxes inside people: face detection can refine them for recognition (from a 640 px or larger model input), once \"Use the root model\" is checked on that step." : "Draws plate boxes inside vehicles: plate detection can use them, and the plate reader reads them, once \"Use the root model\" is checked on that step.";
|
|
23337
23357
|
let t = Le[e.stepId] ? `${e.stepId} takes this model's labels by default — its own model does not run` : `${e.stepId} can take this model's labels`;
|
|
23338
23358
|
return e.uncovered.length > 0 ? `${t}; this model cannot produce ${e.uncovered.join(", ")}.` : `${t}, for every class.`;
|
|
23339
23359
|
}
|
|
23340
|
-
function
|
|
23360
|
+
function VE({ supplies: e }) {
|
|
23341
23361
|
return e === void 0 || e.length === 0 ? null : /* @__PURE__ */ z("span", {
|
|
23342
23362
|
className: "flex flex-wrap gap-1",
|
|
23343
23363
|
"data-testid": "fill-badges",
|
|
23344
23364
|
children: e.map((e) => /* @__PURE__ */ z("span", {
|
|
23345
23365
|
className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium border bg-primary/10 text-primary border-primary/30",
|
|
23346
|
-
title:
|
|
23366
|
+
title: BE(e),
|
|
23347
23367
|
children: je(e)
|
|
23348
23368
|
}, e.stepId))
|
|
23349
23369
|
});
|
|
@@ -23351,7 +23371,7 @@ function LE({ supplies: e }) {
|
|
|
23351
23371
|
//#endregion
|
|
23352
23372
|
//#region src/components/InlineRename.tsx
|
|
23353
23373
|
t();
|
|
23354
|
-
function
|
|
23374
|
+
function HE({ name: e, modelId: t, onRename: n, onError: r }) {
|
|
23355
23375
|
let [i, o] = a(null), [s, c] = a(!1);
|
|
23356
23376
|
if (i === null) return /* @__PURE__ */ B("span", {
|
|
23357
23377
|
className: "flex items-center gap-1 min-w-0",
|
|
@@ -23377,7 +23397,7 @@ function RE({ name: e, modelId: t, onRename: n, onError: r }) {
|
|
|
23377
23397
|
})
|
|
23378
23398
|
})]
|
|
23379
23399
|
});
|
|
23380
|
-
let l =
|
|
23400
|
+
let l = RS(i), u = async () => {
|
|
23381
23401
|
if (l.kind !== "invalid") {
|
|
23382
23402
|
c(!0);
|
|
23383
23403
|
try {
|
|
@@ -23448,19 +23468,19 @@ function RE({ name: e, modelId: t, onRename: n, onError: r }) {
|
|
|
23448
23468
|
}
|
|
23449
23469
|
//#endregion
|
|
23450
23470
|
//#region src/components/installed/DeviceChips.tsx
|
|
23451
|
-
function
|
|
23471
|
+
function UE(e) {
|
|
23452
23472
|
return e.enabled ? e.loaded === !0 ? e.configured ? "loaded, configured" : "loaded" : e.configured ? "configured, not loaded" : e.loaded === null ? "load state unknown" : "not used" : "off";
|
|
23453
23473
|
}
|
|
23454
|
-
function
|
|
23474
|
+
function WE(e) {
|
|
23455
23475
|
return e.enabled ? e.loaded === !0 ? "border-success/40 bg-success/10 text-success" : e.configured ? "border-primary/50 bg-primary/10 text-primary" : "border-border bg-surface text-foreground-subtle" : "border-border bg-foreground-subtle/35";
|
|
23456
23476
|
}
|
|
23457
|
-
function
|
|
23477
|
+
function GE({ chip: e }) {
|
|
23458
23478
|
return /* @__PURE__ */ z("span", {
|
|
23459
23479
|
"aria-hidden": !0,
|
|
23460
23480
|
className: G("h-1.5 w-1.5 rounded-full", e.loaded === !0 ? "bg-success" : e.configured ? "border border-primary" : "border border-foreground-subtle/60")
|
|
23461
23481
|
});
|
|
23462
23482
|
}
|
|
23463
|
-
function
|
|
23483
|
+
function KE({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
23464
23484
|
return e.length === 0 ? /* @__PURE__ */ z("span", {
|
|
23465
23485
|
className: "text-[10px] text-foreground-subtle",
|
|
23466
23486
|
children: "no device of this format"
|
|
@@ -23468,15 +23488,15 @@ function HE({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
|
23468
23488
|
className: "flex flex-wrap gap-1",
|
|
23469
23489
|
"data-testid": "installed-device-chips",
|
|
23470
23490
|
children: e.map((e) => {
|
|
23471
|
-
let r =
|
|
23491
|
+
let r = UE(e);
|
|
23472
23492
|
if (!e.enabled) return /* @__PURE__ */ z("span", {
|
|
23473
|
-
className: G(C,
|
|
23493
|
+
className: G(C, WE(e), "min-w-[1.75rem] justify-center px-1.5"),
|
|
23474
23494
|
"data-device-key": e.deviceKey,
|
|
23475
23495
|
"data-state": r,
|
|
23476
23496
|
"aria-label": `${e.label} (${e.deviceKey}): ${r}`,
|
|
23477
23497
|
title: `${e.deviceKey} — ${r}`
|
|
23478
23498
|
}, e.deviceKey);
|
|
23479
|
-
let i = t !== void 0 && !n, a = G(C,
|
|
23499
|
+
let i = t !== void 0 && !n, a = G(C, WE(e), i && "hover:border-primary/60"), o = /* @__PURE__ */ B(it, { children: [/* @__PURE__ */ z(GE, { chip: e }), e.label] });
|
|
23480
23500
|
return i ? /* @__PURE__ */ z("button", {
|
|
23481
23501
|
type: "button",
|
|
23482
23502
|
className: a,
|
|
@@ -23499,7 +23519,7 @@ function HE({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
|
23499
23519
|
}
|
|
23500
23520
|
//#endregion
|
|
23501
23521
|
//#region src/components/installed/UsageBadge.tsx
|
|
23502
|
-
var
|
|
23522
|
+
var qE = {
|
|
23503
23523
|
"in-use": {
|
|
23504
23524
|
label: "in use",
|
|
23505
23525
|
variant: "success",
|
|
@@ -23530,30 +23550,30 @@ var UE = {
|
|
|
23530
23550
|
variant: "default",
|
|
23531
23551
|
title: "The loaded-engine read failed: whether a pool holds it cannot be told."
|
|
23532
23552
|
}
|
|
23533
|
-
},
|
|
23534
|
-
function
|
|
23535
|
-
let t =
|
|
23553
|
+
}, JE = "text-[10px] px-1.5 py-0";
|
|
23554
|
+
function YE({ usage: e }) {
|
|
23555
|
+
let t = qE[e];
|
|
23536
23556
|
return /* @__PURE__ */ z(Ia, {
|
|
23537
23557
|
variant: t.variant,
|
|
23538
|
-
className:
|
|
23558
|
+
className: JE,
|
|
23539
23559
|
title: t.title,
|
|
23540
23560
|
"data-usage": e,
|
|
23541
23561
|
children: t.label
|
|
23542
23562
|
});
|
|
23543
23563
|
}
|
|
23544
|
-
function
|
|
23564
|
+
function XE() {
|
|
23545
23565
|
return /* @__PURE__ */ z(Ia, {
|
|
23546
23566
|
variant: "warning",
|
|
23547
23567
|
style: "outline",
|
|
23548
|
-
className: `${
|
|
23568
|
+
className: `${JE} border-warning/40`,
|
|
23549
23569
|
title: "On disk, but not proven to be the current catalog build: it is replaced the next time the model is needed.",
|
|
23550
23570
|
children: "stale"
|
|
23551
23571
|
});
|
|
23552
23572
|
}
|
|
23553
|
-
function
|
|
23573
|
+
function ZE({ precision: e }) {
|
|
23554
23574
|
return /* @__PURE__ */ z(Ia, {
|
|
23555
23575
|
style: "outline",
|
|
23556
|
-
className: `${
|
|
23576
|
+
className: `${JE} border-border text-foreground-subtle uppercase`,
|
|
23557
23577
|
title: "Numeric precision of this build",
|
|
23558
23578
|
children: e
|
|
23559
23579
|
});
|
|
@@ -23561,13 +23581,13 @@ function qE({ precision: e }) {
|
|
|
23561
23581
|
//#endregion
|
|
23562
23582
|
//#region src/components/installed/InstalledFilesTable.tsx
|
|
23563
23583
|
t();
|
|
23564
|
-
var
|
|
23584
|
+
var QE = {
|
|
23565
23585
|
camstack: "CamStack",
|
|
23566
23586
|
scrypted: "Scrypted",
|
|
23567
23587
|
frigate: "Frigate",
|
|
23568
23588
|
custom: "Custom"
|
|
23569
23589
|
};
|
|
23570
|
-
function
|
|
23590
|
+
function $E({ row: e, onRename: t, onError: n }) {
|
|
23571
23591
|
return /* @__PURE__ */ B("div", {
|
|
23572
23592
|
className: "flex min-w-0 flex-col gap-0.5 whitespace-normal",
|
|
23573
23593
|
"data-testid": "installed-file",
|
|
@@ -23575,7 +23595,7 @@ function YE({ row: e, onRename: t, onError: n }) {
|
|
|
23575
23595
|
"data-usage": e.usage,
|
|
23576
23596
|
"data-removable": e.removable ? "true" : "false",
|
|
23577
23597
|
children: [
|
|
23578
|
-
e.renameable ? /* @__PURE__ */ z(
|
|
23598
|
+
e.renameable ? /* @__PURE__ */ z(HE, {
|
|
23579
23599
|
name: e.name,
|
|
23580
23600
|
modelId: e.modelId,
|
|
23581
23601
|
onRename: t,
|
|
@@ -23596,16 +23616,16 @@ function YE({ row: e, onRename: t, onError: n }) {
|
|
|
23596
23616
|
children: [
|
|
23597
23617
|
e.stepId,
|
|
23598
23618
|
" · ",
|
|
23599
|
-
|
|
23619
|
+
QE[e.provider] ?? e.provider,
|
|
23600
23620
|
e.clusterScoped ? " · cluster model" : "",
|
|
23601
23621
|
e.description ? ` · ${e.description}` : ""
|
|
23602
23622
|
]
|
|
23603
23623
|
}),
|
|
23604
|
-
/* @__PURE__ */ z(
|
|
23624
|
+
/* @__PURE__ */ z(VE, { supplies: e.supplies })
|
|
23605
23625
|
]
|
|
23606
23626
|
});
|
|
23607
23627
|
}
|
|
23608
|
-
function
|
|
23628
|
+
function eD({ row: e }) {
|
|
23609
23629
|
return /* @__PURE__ */ B("span", {
|
|
23610
23630
|
className: "inline-flex flex-wrap items-center gap-1",
|
|
23611
23631
|
children: [
|
|
@@ -23613,12 +23633,12 @@ function XE({ row: e }) {
|
|
|
23613
23633
|
className: "font-mono text-[11px] text-foreground",
|
|
23614
23634
|
children: e.format
|
|
23615
23635
|
}),
|
|
23616
|
-
e.precision !== void 0 && /* @__PURE__ */ z(
|
|
23617
|
-
e.onDisk === "stale" && /* @__PURE__ */ z(
|
|
23636
|
+
e.precision !== void 0 && /* @__PURE__ */ z(ZE, { precision: e.precision }),
|
|
23637
|
+
e.onDisk === "stale" && /* @__PURE__ */ z(XE, {})
|
|
23618
23638
|
]
|
|
23619
23639
|
});
|
|
23620
23640
|
}
|
|
23621
|
-
function
|
|
23641
|
+
function tD({ row: e, busy: t, onRemove: n }) {
|
|
23622
23642
|
return e.removable ? /* @__PURE__ */ B("button", {
|
|
23623
23643
|
type: "button",
|
|
23624
23644
|
className: ee,
|
|
@@ -23632,7 +23652,7 @@ function ZE({ row: e, busy: t, onRemove: n }) {
|
|
|
23632
23652
|
}), "Remove"]
|
|
23633
23653
|
}) : null;
|
|
23634
23654
|
}
|
|
23635
|
-
function
|
|
23655
|
+
function nD() {
|
|
23636
23656
|
let [e, t] = a(/* @__PURE__ */ new Set());
|
|
23637
23657
|
return {
|
|
23638
23658
|
busy: e,
|
|
@@ -23646,8 +23666,8 @@ function QE() {
|
|
|
23646
23666
|
}
|
|
23647
23667
|
};
|
|
23648
23668
|
}
|
|
23649
|
-
function
|
|
23650
|
-
let { busy: o, run: s } =
|
|
23669
|
+
function rD({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onError: a }) {
|
|
23670
|
+
let { busy: o, run: s } = nD(), c = (e, t) => {
|
|
23651
23671
|
s(e.key, async () => {
|
|
23652
23672
|
try {
|
|
23653
23673
|
await t();
|
|
@@ -23663,7 +23683,7 @@ function $E({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
23663
23683
|
header: "Model",
|
|
23664
23684
|
nowrap: !1,
|
|
23665
23685
|
sortValue: (e) => e.name,
|
|
23666
|
-
render: (e) => /* @__PURE__ */ z(
|
|
23686
|
+
render: (e) => /* @__PURE__ */ z($E, {
|
|
23667
23687
|
row: e,
|
|
23668
23688
|
onRename: (t) => r(e, t),
|
|
23669
23689
|
onError: a
|
|
@@ -23673,7 +23693,7 @@ function $E({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
23673
23693
|
key: "format",
|
|
23674
23694
|
header: "Format",
|
|
23675
23695
|
sortValue: (e) => e.format,
|
|
23676
|
-
render: (e) => /* @__PURE__ */ z(
|
|
23696
|
+
render: (e) => /* @__PURE__ */ z(eD, { row: e })
|
|
23677
23697
|
},
|
|
23678
23698
|
{
|
|
23679
23699
|
key: "size",
|
|
@@ -23682,7 +23702,7 @@ function $E({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
23682
23702
|
sortValue: (e) => e.sizeMB,
|
|
23683
23703
|
render: (e) => /* @__PURE__ */ z("span", {
|
|
23684
23704
|
className: "font-mono text-[11px]",
|
|
23685
|
-
children:
|
|
23705
|
+
children: iC(e.sizeMB)
|
|
23686
23706
|
})
|
|
23687
23707
|
},
|
|
23688
23708
|
{
|
|
@@ -23690,7 +23710,7 @@ function $E({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
23690
23710
|
header: "Devices",
|
|
23691
23711
|
nowrap: !1,
|
|
23692
23712
|
notSortableReason: "A list of devices has no order that means something.",
|
|
23693
|
-
render: (e) => /* @__PURE__ */ z(
|
|
23713
|
+
render: (e) => /* @__PURE__ */ z(KE, {
|
|
23694
23714
|
chips: e.chips,
|
|
23695
23715
|
disabled: o.has(e.key),
|
|
23696
23716
|
onChip: e.clusterScoped || e.origin !== "pipeline" || e.usage === "outside-pools" ? void 0 : (t) => c(e, () => i(e, t))
|
|
@@ -23700,12 +23720,12 @@ function $E({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
23700
23720
|
key: "status",
|
|
23701
23721
|
header: "Status",
|
|
23702
23722
|
sortValue: (e) => e.usage,
|
|
23703
|
-
render: (e) => /* @__PURE__ */ z(
|
|
23723
|
+
render: (e) => /* @__PURE__ */ z(YE, { usage: e.usage })
|
|
23704
23724
|
},
|
|
23705
23725
|
{
|
|
23706
23726
|
key: "actions",
|
|
23707
23727
|
align: "right",
|
|
23708
|
-
render: (e) => /* @__PURE__ */ z(
|
|
23728
|
+
render: (e) => /* @__PURE__ */ z(tD, {
|
|
23709
23729
|
row: e,
|
|
23710
23730
|
busy: o.has(e.key),
|
|
23711
23731
|
onRemove: () => c(e, () => n(e))
|
|
@@ -23726,24 +23746,24 @@ function $E({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
23726
23746
|
}
|
|
23727
23747
|
//#endregion
|
|
23728
23748
|
//#region src/components/installed/InstalledFilters.tsx
|
|
23729
|
-
var
|
|
23749
|
+
var iD = [
|
|
23730
23750
|
"camstack",
|
|
23731
23751
|
"scrypted",
|
|
23732
23752
|
"frigate",
|
|
23733
23753
|
"custom"
|
|
23734
|
-
],
|
|
23754
|
+
], aD = {
|
|
23735
23755
|
camstack: "CamStack",
|
|
23736
23756
|
scrypted: "Scrypted",
|
|
23737
23757
|
frigate: "Frigate",
|
|
23738
23758
|
custom: "Custom"
|
|
23739
|
-
},
|
|
23759
|
+
}, oD = [{
|
|
23740
23760
|
value: "all",
|
|
23741
23761
|
label: "All"
|
|
23742
|
-
}, ...
|
|
23762
|
+
}, ...iD.map((e) => ({
|
|
23743
23763
|
value: e,
|
|
23744
|
-
label:
|
|
23764
|
+
label: aD[e]
|
|
23745
23765
|
}))];
|
|
23746
|
-
function
|
|
23766
|
+
function sD(e) {
|
|
23747
23767
|
let t = [{
|
|
23748
23768
|
value: "all",
|
|
23749
23769
|
label: "All devices"
|
|
@@ -23760,7 +23780,7 @@ function rD(e) {
|
|
|
23760
23780
|
role: "group",
|
|
23761
23781
|
"aria-label": "Provider",
|
|
23762
23782
|
"data-testid": "installed-provider-filter",
|
|
23763
|
-
children:
|
|
23783
|
+
children: oD.map((t) => /* @__PURE__ */ z("button", {
|
|
23764
23784
|
type: "button",
|
|
23765
23785
|
"aria-pressed": e.provider === t.value,
|
|
23766
23786
|
onClick: () => e.onProvider(t.value),
|
|
@@ -23797,7 +23817,7 @@ function rD(e) {
|
|
|
23797
23817
|
] }),
|
|
23798
23818
|
end: /* @__PURE__ */ z("div", {
|
|
23799
23819
|
className: "min-w-0 max-w-full overflow-x-auto",
|
|
23800
|
-
children: /* @__PURE__ */ z(
|
|
23820
|
+
children: /* @__PURE__ */ z(QC, {
|
|
23801
23821
|
selectedNodeId: e.nodeId,
|
|
23802
23822
|
onSelect: e.onNode
|
|
23803
23823
|
})
|
|
@@ -23807,27 +23827,27 @@ function rD(e) {
|
|
|
23807
23827
|
//#endregion
|
|
23808
23828
|
//#region src/tabs/InstalledTab.tsx
|
|
23809
23829
|
t();
|
|
23810
|
-
function
|
|
23830
|
+
function cD(e) {
|
|
23811
23831
|
return e === "camstack" || e === "scrypted" || e === "frigate" || e === "custom" ? e : "all";
|
|
23812
23832
|
}
|
|
23813
|
-
function
|
|
23833
|
+
function lD(e) {
|
|
23814
23834
|
return e === null || e.length === 0 || e === "all" ? "all" : e;
|
|
23815
23835
|
}
|
|
23816
|
-
var
|
|
23817
|
-
function
|
|
23836
|
+
var uD = lD, dD = lD;
|
|
23837
|
+
function fD(e) {
|
|
23818
23838
|
return e === null || e.length === 0 ? "hub" : e;
|
|
23819
23839
|
}
|
|
23820
|
-
function
|
|
23840
|
+
function pD(e) {
|
|
23821
23841
|
return P.some((t) => t === e);
|
|
23822
23842
|
}
|
|
23823
|
-
async function
|
|
23843
|
+
async function mD(e, t) {
|
|
23824
23844
|
let [n, r, i, a, o, s] = await Promise.all([
|
|
23825
|
-
|
|
23826
|
-
|
|
23827
|
-
|
|
23828
|
-
|
|
23829
|
-
|
|
23830
|
-
|
|
23845
|
+
mC(e),
|
|
23846
|
+
hC(e),
|
|
23847
|
+
EC(e, t),
|
|
23848
|
+
HC(e, t).catch(() => []),
|
|
23849
|
+
UC(e, t).catch(() => null),
|
|
23850
|
+
GC(e).catch(() => null)
|
|
23831
23851
|
]);
|
|
23832
23852
|
return {
|
|
23833
23853
|
models: n,
|
|
@@ -23839,15 +23859,15 @@ async function uD(e, t) {
|
|
|
23839
23859
|
clusterModels: s
|
|
23840
23860
|
};
|
|
23841
23861
|
}
|
|
23842
|
-
function
|
|
23843
|
-
let [i, a] =
|
|
23862
|
+
function hD(e, t, r) {
|
|
23863
|
+
let [i, a] = aS(e), o = n((e) => a(e === r ? null : e), [a, r]);
|
|
23844
23864
|
return [t(i), o];
|
|
23845
23865
|
}
|
|
23846
|
-
function
|
|
23847
|
-
let [r, i] =
|
|
23866
|
+
function gD({ trpc: e, refreshKey: t }) {
|
|
23867
|
+
let [r, i] = aS("provider"), o = cD(r), s = n((e) => i(e === "all" ? null : e), [i]), [c, u] = hD("type", uD, "all"), [d, f] = hD("device", dD, "all"), [p, h] = hD("node", fD, "hub"), g = Ha(), [_, v] = a(null), [y, b] = a(null), [S, C] = a(0), [w, T] = a(null), E = n(async () => {
|
|
23848
23868
|
b(null);
|
|
23849
23869
|
try {
|
|
23850
|
-
v(await
|
|
23870
|
+
v(await mD(e, p));
|
|
23851
23871
|
} catch (e) {
|
|
23852
23872
|
b(e instanceof Error ? e.message : "Failed to load installed models");
|
|
23853
23873
|
}
|
|
@@ -23857,7 +23877,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23857
23877
|
}, [E, t]);
|
|
23858
23878
|
let O = n(async () => {
|
|
23859
23879
|
await E(), C((e) => e + 1);
|
|
23860
|
-
}, [E]), k = l(() => _ === null ? [] :
|
|
23880
|
+
}, [E]), k = l(() => _ === null ? [] : TE({
|
|
23861
23881
|
nodeId: p,
|
|
23862
23882
|
seeds: _.seeds,
|
|
23863
23883
|
stepCatalogs: _.stepCatalogs,
|
|
@@ -23866,7 +23886,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23866
23886
|
clusterModels: _.clusterModels,
|
|
23867
23887
|
registry: _.models,
|
|
23868
23888
|
availability: _.availability
|
|
23869
|
-
}), [_, p]), ee = _?.devices ?? [], A = l(() =>
|
|
23889
|
+
}), [_, p]), ee = _?.devices ?? [], A = l(() => EE(k, ee, {
|
|
23870
23890
|
provider: o,
|
|
23871
23891
|
step: c,
|
|
23872
23892
|
device: d
|
|
@@ -23880,20 +23900,20 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23880
23900
|
let e = new Set(k.map((e) => e.stepId));
|
|
23881
23901
|
return c !== "all" && e.add(c), [...e].toSorted((e, t) => e.localeCompare(t));
|
|
23882
23902
|
}, [k, c]), j = n(async (t) => {
|
|
23883
|
-
if (!t.removable || !
|
|
23903
|
+
if (!t.removable || !pD(t.format)) return;
|
|
23884
23904
|
let n = {
|
|
23885
23905
|
modelId: t.modelId,
|
|
23886
23906
|
format: t.format,
|
|
23887
23907
|
nodeId: p
|
|
23888
23908
|
};
|
|
23889
|
-
t.origin === "registry" ? await
|
|
23909
|
+
t.origin === "registry" ? await yC(e, n) : await OC(e, {
|
|
23890
23910
|
...n,
|
|
23891
23911
|
addonId: t.stepId
|
|
23892
23912
|
});
|
|
23893
23913
|
}, [p, e]), ne = n(async (e) => {
|
|
23894
|
-
!e.removable || !
|
|
23914
|
+
!e.removable || !pD(e.format) || await g({
|
|
23895
23915
|
title: "Delete model file?",
|
|
23896
|
-
message: `Permanently delete the ${e.format} file of "${e.name}" (${e.modelId}, ${
|
|
23916
|
+
message: `Permanently delete the ${e.format} file of "${e.name}" (${e.modelId}, ${iC(e.sizeMB)}) from ${p}. Its other formats stay. This cannot be undone.`,
|
|
23897
23917
|
confirmLabel: "Delete file",
|
|
23898
23918
|
cancelLabel: "Cancel",
|
|
23899
23919
|
variant: "danger"
|
|
@@ -23908,7 +23928,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23908
23928
|
let e = re.reduce((e, t) => e + t.sizeMB, 0);
|
|
23909
23929
|
if (await g({
|
|
23910
23930
|
title: "Delete unused model files?",
|
|
23911
|
-
message: `Permanently delete ${re.length} unused ${re.length === 1 ? "file" : "files"} (${
|
|
23931
|
+
message: `Permanently delete ${re.length} unused ${re.length === 1 ? "file" : "files"} (${iC(e)}) from ${p}. No enabled device on this node runs these formats. Other formats of each model stay. This cannot be undone.`,
|
|
23912
23932
|
confirmLabel: "Delete unused files",
|
|
23913
23933
|
cancelLabel: "Cancel",
|
|
23914
23934
|
variant: "danger"
|
|
@@ -23923,7 +23943,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23923
23943
|
O,
|
|
23924
23944
|
re
|
|
23925
23945
|
]), ie = n(async (t, n) => {
|
|
23926
|
-
await
|
|
23946
|
+
await vC(e, {
|
|
23927
23947
|
modelId: t.modelId,
|
|
23928
23948
|
name: n
|
|
23929
23949
|
}), await O();
|
|
@@ -23941,9 +23961,9 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23941
23961
|
confirmLabel: "Activate",
|
|
23942
23962
|
cancelLabel: "Cancel",
|
|
23943
23963
|
variant: "default"
|
|
23944
|
-
}) && (await
|
|
23964
|
+
}) && (await WC(e, {
|
|
23945
23965
|
agentNodeId: p,
|
|
23946
|
-
inferenceDevices:
|
|
23966
|
+
inferenceDevices: dE(ee, t.stepId, t.modelId, [n.deviceKey])
|
|
23947
23967
|
}), await O());
|
|
23948
23968
|
}, [
|
|
23949
23969
|
g,
|
|
@@ -23960,14 +23980,14 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23960
23980
|
className: "rounded-md border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",
|
|
23961
23981
|
children: y
|
|
23962
23982
|
}),
|
|
23963
|
-
/* @__PURE__ */ z(
|
|
23983
|
+
/* @__PURE__ */ z(sD, {
|
|
23964
23984
|
provider: o,
|
|
23965
23985
|
onProvider: s,
|
|
23966
23986
|
step: c,
|
|
23967
23987
|
stepOptions: te,
|
|
23968
23988
|
onStep: u,
|
|
23969
23989
|
device: d,
|
|
23970
|
-
deviceOptions:
|
|
23990
|
+
deviceOptions: mE(ee),
|
|
23971
23991
|
onDevice: f,
|
|
23972
23992
|
nodeId: p,
|
|
23973
23993
|
onNode: h
|
|
@@ -23989,10 +24009,10 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
23989
24009
|
p,
|
|
23990
24010
|
se ? ` (of ${k.length})` : "",
|
|
23991
24011
|
" · ",
|
|
23992
|
-
|
|
24012
|
+
iC(oe),
|
|
23993
24013
|
" on disk ·",
|
|
23994
24014
|
" ",
|
|
23995
|
-
|
|
24015
|
+
iC(DE(k)),
|
|
23996
24016
|
" reclaimable",
|
|
23997
24017
|
_?.engines === null ? " · loaded state unavailable" : ""
|
|
23998
24018
|
]
|
|
@@ -24008,7 +24028,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
24008
24028
|
]
|
|
24009
24029
|
})]
|
|
24010
24030
|
}),
|
|
24011
|
-
/* @__PURE__ */ z(
|
|
24031
|
+
/* @__PURE__ */ z(rD, {
|
|
24012
24032
|
rows: A,
|
|
24013
24033
|
emptyMessage: k.length === 0 ? `No model files on ${p}.` : "No files match these filters.",
|
|
24014
24034
|
onRemove: ne,
|
|
@@ -24016,7 +24036,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
24016
24036
|
onChip: ae,
|
|
24017
24037
|
onError: b
|
|
24018
24038
|
}),
|
|
24019
|
-
/* @__PURE__ */ z(
|
|
24039
|
+
/* @__PURE__ */ z(zE, {
|
|
24020
24040
|
trpc: e,
|
|
24021
24041
|
refreshKey: t + S,
|
|
24022
24042
|
clusterModels: _?.clusterModels ?? null,
|
|
@@ -24024,7 +24044,7 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
24024
24044
|
onError: b
|
|
24025
24045
|
})
|
|
24026
24046
|
] }),
|
|
24027
|
-
w && /* @__PURE__ */ z(
|
|
24047
|
+
w && /* @__PURE__ */ z(AE, {
|
|
24028
24048
|
trpc: e,
|
|
24029
24049
|
nodeId: p,
|
|
24030
24050
|
stepId: w.row.stepId,
|
|
@@ -24040,13 +24060,13 @@ function fD({ trpc: e, refreshKey: t }) {
|
|
|
24040
24060
|
}
|
|
24041
24061
|
//#endregion
|
|
24042
24062
|
//#region src/tabs/LogsTab.tsx
|
|
24043
|
-
var
|
|
24044
|
-
function
|
|
24063
|
+
var _D = "model-studio";
|
|
24064
|
+
function vD() {
|
|
24045
24065
|
return /* @__PURE__ */ z("div", {
|
|
24046
24066
|
className: "space-y-3",
|
|
24047
24067
|
"data-testid": "logs-tab",
|
|
24048
24068
|
children: /* @__PURE__ */ z(Pl, {
|
|
24049
|
-
addonId:
|
|
24069
|
+
addonId: _D,
|
|
24050
24070
|
limit: 200,
|
|
24051
24071
|
maxHeight: "max-h-[70vh]",
|
|
24052
24072
|
showFilters: !0,
|
|
@@ -24057,7 +24077,7 @@ function mD() {
|
|
|
24057
24077
|
//#endregion
|
|
24058
24078
|
//#region src/page.tsx
|
|
24059
24079
|
t();
|
|
24060
|
-
var
|
|
24080
|
+
var yD = [
|
|
24061
24081
|
{
|
|
24062
24082
|
id: "catalog",
|
|
24063
24083
|
label: "Catalog"
|
|
@@ -24075,17 +24095,17 @@ var hD = [
|
|
|
24075
24095
|
label: "Logs"
|
|
24076
24096
|
}
|
|
24077
24097
|
];
|
|
24078
|
-
function
|
|
24098
|
+
function bD(e) {
|
|
24079
24099
|
return e === "library" ? "installed" : e === "convert" || e === "settings" ? "catalog" : e === "import" || e === "catalog" || e === "installed" || e === "logs" ? e : "catalog";
|
|
24080
24100
|
}
|
|
24081
|
-
function
|
|
24101
|
+
function xD(e) {
|
|
24082
24102
|
return `model-studio-tab-${e}`;
|
|
24083
24103
|
}
|
|
24084
|
-
function
|
|
24104
|
+
function SD(e) {
|
|
24085
24105
|
return `model-studio-panel-${e}`;
|
|
24086
24106
|
}
|
|
24087
|
-
function
|
|
24088
|
-
let [t, r] =
|
|
24107
|
+
function CD({ trpc: e }) {
|
|
24108
|
+
let [t, r] = aS("tab"), [i, s] = aS("source"), c = bD(t), l = LT(i), [u, d] = a(0), [f, p] = a(null), h = o(!1), g = n(() => d((e) => e + 1), []), _ = n((e, t = !1) => {
|
|
24089
24109
|
r(e === "catalog" ? null : e), e !== "catalog" && i !== null && (e === "import" || e === "logs" || e === "installed") && s(null), t && (h.current = !0);
|
|
24090
24110
|
}, [
|
|
24091
24111
|
r,
|
|
@@ -24095,7 +24115,7 @@ function yD({ trpc: e }) {
|
|
|
24095
24115
|
s(e === "camstack" ? null : e);
|
|
24096
24116
|
}, [s]);
|
|
24097
24117
|
return m(() => {
|
|
24098
|
-
h.current && (h.current = !1, document.getElementById(
|
|
24118
|
+
h.current && (h.current = !1, document.getElementById(xD(c))?.focus());
|
|
24099
24119
|
}, [c]), m(() => {
|
|
24100
24120
|
t === "convert" && r(null), t === "library" && r("installed"), t === "settings" && (r(null), s("frigate")), c !== "catalog" && i !== null && s(null), c === "catalog" && i === "custom" && (r("import"), s(null));
|
|
24101
24121
|
}, [
|
|
@@ -24104,7 +24124,7 @@ function yD({ trpc: e }) {
|
|
|
24104
24124
|
i,
|
|
24105
24125
|
r,
|
|
24106
24126
|
s
|
|
24107
|
-
]), /* @__PURE__ */ z(
|
|
24127
|
+
]), /* @__PURE__ */ z(hw, { children: /* @__PURE__ */ B(Zx, {
|
|
24108
24128
|
icon: xt,
|
|
24109
24129
|
title: "Model Studio",
|
|
24110
24130
|
children: [/* @__PURE__ */ z(Fs, {
|
|
@@ -24114,8 +24134,8 @@ function yD({ trpc: e }) {
|
|
|
24114
24134
|
},
|
|
24115
24135
|
children: /* @__PURE__ */ z(Is, {
|
|
24116
24136
|
"aria-label": "Model Studio sections",
|
|
24117
|
-
children:
|
|
24118
|
-
id:
|
|
24137
|
+
children: yD.map((e) => /* @__PURE__ */ z(Ls, {
|
|
24138
|
+
id: xD(e.id),
|
|
24119
24139
|
value: e.id,
|
|
24120
24140
|
children: e.label
|
|
24121
24141
|
}, e.id))
|
|
@@ -24123,10 +24143,10 @@ function yD({ trpc: e }) {
|
|
|
24123
24143
|
}), /* @__PURE__ */ B("div", {
|
|
24124
24144
|
className: "min-h-[400px]",
|
|
24125
24145
|
role: "tabpanel",
|
|
24126
|
-
id:
|
|
24127
|
-
"aria-labelledby":
|
|
24146
|
+
id: SD(c),
|
|
24147
|
+
"aria-labelledby": xD(c),
|
|
24128
24148
|
children: [
|
|
24129
|
-
c === "catalog" && /* @__PURE__ */ z(
|
|
24149
|
+
c === "catalog" && /* @__PURE__ */ z(WT, {
|
|
24130
24150
|
trpc: e,
|
|
24131
24151
|
refreshKey: u,
|
|
24132
24152
|
source: l,
|
|
@@ -24136,20 +24156,20 @@ function yD({ trpc: e }) {
|
|
|
24136
24156
|
p(e), _("import");
|
|
24137
24157
|
}
|
|
24138
24158
|
}),
|
|
24139
|
-
c === "installed" && /* @__PURE__ */ z(
|
|
24159
|
+
c === "installed" && /* @__PURE__ */ z(gD, {
|
|
24140
24160
|
trpc: e,
|
|
24141
24161
|
refreshKey: u
|
|
24142
24162
|
}),
|
|
24143
|
-
c === "import" && /* @__PURE__ */ z(
|
|
24163
|
+
c === "import" && /* @__PURE__ */ z(sE, {
|
|
24144
24164
|
trpc: e,
|
|
24145
24165
|
onRegistered: g,
|
|
24146
24166
|
initialPrefill: f,
|
|
24147
24167
|
onPrefillConsumed: () => p(null)
|
|
24148
24168
|
}),
|
|
24149
|
-
c === "logs" && /* @__PURE__ */ z(
|
|
24169
|
+
c === "logs" && /* @__PURE__ */ z(vD, {})
|
|
24150
24170
|
]
|
|
24151
24171
|
})]
|
|
24152
24172
|
}) });
|
|
24153
24173
|
}
|
|
24154
24174
|
//#endregion
|
|
24155
|
-
export {
|
|
24175
|
+
export { CD as default };
|