45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: e5665fbfc4a03fa5.7b861e1710.js
|
|
* Module id: 493983
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
var t = e.i(469850);
|
|
function r(e) {
|
|
return (e.imageList?.length ?? 0) > 0 ? "image2image" : "text2image";
|
|
}
|
|
function n(e, t) {
|
|
let r = t.imageList?.length ?? 0;
|
|
if (0 === r) return !0;
|
|
let n = (((e?.properties ?? {}).modeType ?? {}).items ?? {}).image2image;
|
|
return !!n && 0 !== n[1] && r >= n[0] && r <= n[1];
|
|
}
|
|
function a(e, r, a, l) {
|
|
if (!a) return { allowed: !1 };
|
|
let o = (function (e, r) {
|
|
let n = (0, t.nodeTypeToListKey)(r);
|
|
if (!n) return e;
|
|
let a = e[n] ?? [];
|
|
return { ...e, [n]: [...a, { nodeId: "__simulated__", url: "" }] };
|
|
})(r, e),
|
|
i = r.model;
|
|
if (i && n(a("image", i), o)) return { allowed: !0, modelKey: i };
|
|
for (let e of l)
|
|
if (e.modelKey !== i && n(a("image", e.modelKey), o))
|
|
return { allowed: !0, modelKey: e.modelKey };
|
|
return { allowed: !1 };
|
|
}
|
|
e.s([
|
|
"canAcceptImageConnection",
|
|
() => a,
|
|
"computeImageModeType",
|
|
() => r,
|
|
"isImageModelEnabledForMedia",
|
|
() => n,
|
|
]);
|
|
};
|
|
|
|
export default moduleFactory;
|