light-chain-open-ui 1.0.7 → 1.0.8
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/{button-C5RBeUy4.js → button-CqwbqOYj.js} +5 -5
- package/dist/{button-Dl7JV4N-.cjs → button-D6klXjl6.cjs} +2 -2
- package/dist/{client-CxZI36n6.js → client-BnxuHpr9.js} +193 -107
- package/dist/client-LNELhD1v.cjs +1 -0
- package/dist/{constants-CdudjmSn.js → constants-C7ZLmqrC.js} +33 -8
- package/dist/constants-DFJCA4_2.cjs +1 -0
- package/dist/contants.cjs +1 -1
- package/dist/contants.mjs +4 -4
- package/dist/core-B6yT9mOC.cjs +1 -0
- package/dist/core-BlgVibCC.js +1 -0
- package/dist/lightchain-ui.cjs +1 -1
- package/dist/lightchain-ui.mjs +6 -6
- package/dist/options.cjs +1 -1
- package/dist/options.mjs +2 -2
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +2 -2
- package/dist/types/core/constants.d.ts +23 -1
- package/dist/types/core/task-types/index.d.ts +2 -2
- package/dist/types/options.d.ts +2 -2
- package/package.json +1 -1
- package/dist/client-BnY0dpeN.cjs +0 -1
- package/dist/constants-Bdlwi9VJ.cjs +0 -1
- package/dist/core-8c7MUnKQ.js +0 -1
- package/dist/core-Di13s7Ci.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as e, t } from "./client-
|
|
2
|
-
import {
|
|
1
|
+
import { l as e, t } from "./client-BnxuHpr9.js";
|
|
2
|
+
import { F as n, P as r, o as i } from "./constants-C7ZLmqrC.js";
|
|
3
3
|
import { LitElement as a, css as o, html as s, nothing as c } from "lit";
|
|
4
4
|
//#region src/styles/register-theme.ts
|
|
5
5
|
var l = "light-chain-open-ui-theme", u = "\n:root {\n --lc-color-blue-50: #eff6ff;\n --lc-color-blue-100: #dbeafe;\n --lc-color-blue-500: #3b82f6;\n --lc-color-blue-600: #2563eb;\n --lc-color-blue-700: #1d4ed8;\n --lc-color-gray-50: #f9fafb;\n --lc-color-gray-100: #f3f4f6;\n --lc-color-gray-200: #e5e7eb;\n --lc-color-gray-300: #d1d5db;\n --lc-color-gray-500: #6b7280;\n --lc-color-gray-700: #374151;\n --lc-color-gray-900: #111827;\n --lc-color-success: #10b981;\n --lc-color-warning: #f59e0b;\n --lc-color-error: #ef4444;\n --lc-spacing-1: 4px;\n --lc-spacing-2: 8px;\n --lc-spacing-3: 12px;\n --lc-spacing-4: 16px;\n --lc-spacing-5: 20px;\n --lc-spacing-6: 24px;\n --lc-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n --lc-font-size-xs: 12px;\n --lc-font-size-sm: 14px;\n --lc-font-size-base: 16px;\n --lc-font-size-lg: 18px;\n --lc-font-size-xl: 20px;\n --lc-line-height: 1.5;\n --lc-radius-sm: 4px;\n --lc-radius-md: 8px;\n --lc-radius-lg: 12px;\n --lc-radius-full: 9999px;\n --lc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);\n --lc-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);\n --lc-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);\n --lc-transition-fast: 150ms ease;\n --lc-transition-normal: 200ms ease;\n --lc-color-primary: var(--lc-color-blue-600);\n --lc-color-primary-hover: var(--lc-color-blue-700);\n --lc-color-primary-light: var(--lc-color-blue-50);\n --lc-color-bg: #ffffff;\n --lc-color-bg-secondary: var(--lc-color-gray-50);\n --lc-color-border: var(--lc-color-gray-200);\n --lc-color-text: var(--lc-color-gray-900);\n --lc-color-text-secondary: var(--lc-color-gray-500);\n --lc-color-text-placeholder: var(--lc-color-gray-300);\n --lc-radius-component: var(--lc-radius-md);\n --lc-spacing-component: var(--lc-spacing-4);\n}\n";
|
|
@@ -2366,9 +2366,9 @@ var Y = class extends a {
|
|
|
2366
2366
|
x([y({ type: String })], Y.prototype, "beforeSrc", void 0), x([y({ type: String })], Y.prototype, "afterSrc", void 0), x([y({ type: String })], Y.prototype, "beforeLabel", void 0), x([y({ type: String })], Y.prototype, "afterLabel", void 0), x([b()], Y.prototype, "_position", void 0), Y = x([f("lc-image-compare-slider")], Y);
|
|
2367
2367
|
//#endregion
|
|
2368
2368
|
//#region src/components/task-workflow/task-workflow.ts
|
|
2369
|
-
var X =
|
|
2369
|
+
var X = n, Z = i, Q = class extends a {
|
|
2370
2370
|
constructor(...e) {
|
|
2371
|
-
super(...e), this.type = "", this.submitEndpoint = "", this.pollEndpoint =
|
|
2371
|
+
super(...e), this.type = "", this.submitEndpoint = "", this.pollEndpoint = r.POLL_ENDPOINT, this.pollInterval = r.POLL_INTERVAL, this.maxPollAttempts = r.MAX_POLL_ATTEMPTS, this.phase = X.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this._defaultClient = new t();
|
|
2372
2372
|
}
|
|
2373
2373
|
connectedCallback() {
|
|
2374
2374
|
super.connectedCallback(), this.addEventListener(Z.REQUEST_SUBMIT, this._handleRequestSubmit);
|
|
@@ -2450,7 +2450,7 @@ var X = r, Z = i, Q = class extends a {
|
|
|
2450
2450
|
},
|
|
2451
2451
|
onError: (e) => this._fail(e.message, e.phase)
|
|
2452
2452
|
};
|
|
2453
|
-
this.client ? (this.type && (e.type = this.type), this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), this.pollEndpoint !==
|
|
2453
|
+
this.client ? (this.type && (e.type = this.type), this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), this.pollEndpoint !== r.POLL_ENDPOINT && (e.pollEndpoint = this.pollEndpoint), this.pollInterval !== r.POLL_INTERVAL && (e.pollInterval = this.pollInterval), this.maxPollAttempts !== r.MAX_POLL_ATTEMPTS && (e.maxPollAttempts = this.maxPollAttempts)) : (e.type = this.type, this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), e.pollEndpoint = this.pollEndpoint, e.pollInterval = this.pollInterval, e.maxPollAttempts = this.maxPollAttempts), this._activeClient.configure(e);
|
|
2454
2454
|
}
|
|
2455
2455
|
_syncStateFromClient() {
|
|
2456
2456
|
let e = this._activeClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`./client-
|
|
1
|
+
const e=require(`./client-LNELhD1v.cjs`),t=require(`./constants-DFJCA4_2.cjs`);require(`./react.cjs`);let n=require(`lit`);var r=`light-chain-open-ui-theme`,i=`
|
|
2
2
|
:root {
|
|
3
3
|
--lc-color-blue-50: #eff6ff;
|
|
4
4
|
--lc-color-blue-100: #dbeafe;
|
|
@@ -1098,7 +1098,7 @@ const e=require(`./client-BnY0dpeN.cjs`),t=require(`./constants-Bdlwi9VJ.cjs`);r
|
|
|
1098
1098
|
<span class="label label-before">${this.beforeLabel}</span>
|
|
1099
1099
|
<span class="label label-after">${this.afterLabel}</span>
|
|
1100
1100
|
</div>
|
|
1101
|
-
`}};y([_({type:String})],Y.prototype,`beforeSrc`,void 0),y([_({type:String})],Y.prototype,`afterSrc`,void 0),y([_({type:String})],Y.prototype,`beforeLabel`,void 0),y([_({type:String})],Y.prototype,`afterLabel`,void 0),y([v()],Y.prototype,`_position`,void 0),Y=y([o(`lc-image-compare-slider`)],Y);var X=t.
|
|
1101
|
+
`}};y([_({type:String})],Y.prototype,`beforeSrc`,void 0),y([_({type:String})],Y.prototype,`afterSrc`,void 0),y([_({type:String})],Y.prototype,`beforeLabel`,void 0),y([_({type:String})],Y.prototype,`afterLabel`,void 0),y([v()],Y.prototype,`_position`,void 0),Y=y([o(`lc-image-compare-slider`)],Y);var X=t.F,Z=t.o,Q=class extends n.LitElement{constructor(...n){super(...n),this.type=``,this.submitEndpoint=``,this.pollEndpoint=t.P.POLL_ENDPOINT,this.pollInterval=t.P.POLL_INTERVAL,this.maxPollAttempts=t.P.MAX_POLL_ATTEMPTS,this.phase=X.IDLE,this.taskId=``,this.progress=0,this.result=null,this.error=``,this._defaultClient=new e.t}connectedCallback(){super.connectedCallback(),this.addEventListener(Z.REQUEST_SUBMIT,this._handleRequestSubmit)}disconnectedCallback(){this.removeEventListener(Z.REQUEST_SUBMIT,this._handleRequestSubmit),super.disconnectedCallback()}get typeDef(){return this._syncClientConfig(),this._activeClient.typeDef}get taskFields(){return this.typeDef?.fields??[]}async submit(e){this.phase===X.SUBMITTING||this.phase===X.POLLING||(this._syncClientConfig(),this.phase=X.SUBMITTING,this.error=``,this.progress=0,this.result=null,await this._activeClient.submit(this.type||this._activeClient.type,e),this._syncStateFromClient())}reset(){this._activeClient.reset(),this._syncStateFromClient()}async _handleFormSubmit(e){e.preventDefault(),await this.submit(this.collectFormData())}_handleRequestSubmit(e){e.preventDefault(),this.submit(this.collectFormData())}_handleClick(e){e.composedPath().find(e=>e instanceof HTMLElement?(e.type||e.getAttribute(`type`))===`submit`:!1)&&(e.preventDefault(),this.submit(this.collectFormData()))}_handleChildChange(e){let t=e.target;if(!(t instanceof HTMLElement))return;let n=Ze(t);if(!n)return;let r=et(e)??Qe(t);r!==void 0&&(t.value=r,this._syncMaskSources(n,r))}_syncMaskSources(e,t){this.taskFields.find(t=>t.name===e)?.type===`image`&&(typeof t!=`string`||!t||this.querySelectorAll(`lc-mask-editor`).forEach(e=>{let n=e;n.source||=t}))}collectFormData(){let e={},t=this.querySelectorAll(`*`),n=new Map(this.taskFields.map(e=>[e.name,e]));return t.forEach(t=>{let r=Ze(t);if(!r)return;let i=$e(t);n.get(r)?.type===`images`&&typeof i==`string`&&i&&(i=[i]),n.get(r)?.type===`multiEnum`&&typeof i==`string`&&i&&(i=tt(i)),i!==void 0&&(e[r]=i)}),e}get _activeClient(){return this.client??this._defaultClient}_syncClientConfig(){let e={customRequest:this.customRequest,customUploadRequest:this.customUploadRequest,onSubmit:e=>{this._syncStateFromClient(),this.dispatchEvent(new CustomEvent(Z.SUBMIT,{detail:e,bubbles:!0,composed:!0}))},onPoll:e=>{this._syncStateFromClient(),this.dispatchEvent(new CustomEvent(Z.POLL,{detail:e,bubbles:!0,composed:!0}))},onSuccess:e=>{this._syncStateFromClient(),this.dispatchEvent(new CustomEvent(Z.SUCCESS,{detail:e,bubbles:!0,composed:!0}))},onError:e=>this._fail(e.message,e.phase)};this.client?(this.type&&(e.type=this.type),this.submitEndpoint&&(e.submitEndpoint=this.submitEndpoint),this.pollEndpoint!==t.P.POLL_ENDPOINT&&(e.pollEndpoint=this.pollEndpoint),this.pollInterval!==t.P.POLL_INTERVAL&&(e.pollInterval=this.pollInterval),this.maxPollAttempts!==t.P.MAX_POLL_ATTEMPTS&&(e.maxPollAttempts=this.maxPollAttempts)):(e.type=this.type,this.submitEndpoint&&(e.submitEndpoint=this.submitEndpoint),e.pollEndpoint=this.pollEndpoint,e.pollInterval=this.pollInterval,e.maxPollAttempts=this.maxPollAttempts),this._activeClient.configure(e)}_syncStateFromClient(){let e=this._activeClient;this.phase=e.phase,this.taskId=e.taskId,this.progress=e.progress,this.result=e.result,this.error=e.error}_fail(e,t){this.phase=X.ERROR,this.error=e,this.dispatchEvent(new CustomEvent(Z.ERROR,{detail:{message:e,phase:t},bubbles:!0,composed:!0}))}render(){return n.html`
|
|
1102
1102
|
<form
|
|
1103
1103
|
@submit=${this._handleFormSubmit}
|
|
1104
1104
|
@click=${this._handleClick}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, O as a, S as o, T as s, _ as c, a as l, b as u, f as d, g as f, h as p, k as m, l as h, m as g, p as _, u as v, v as y, w as b, x, y as S } from "./constants-C7ZLmqrC.js";
|
|
2
2
|
//#region src/core/types.ts
|
|
3
|
-
var
|
|
3
|
+
var C = {
|
|
4
4
|
RUNNING: "running",
|
|
5
5
|
DONE: "done"
|
|
6
|
-
},
|
|
6
|
+
}, w = {
|
|
7
7
|
DONE: "done",
|
|
8
8
|
EXCEPTION: "exception"
|
|
9
|
-
},
|
|
9
|
+
}, T = {
|
|
10
10
|
MAX_SIZE_MB: 10,
|
|
11
11
|
MAX_WIDTH: 2048,
|
|
12
12
|
MAX_HEIGHT: 2048,
|
|
13
13
|
ASPECT_RATIO_MIN: 1 / 3,
|
|
14
14
|
ASPECT_RATIO_MAX: 3
|
|
15
|
-
},
|
|
15
|
+
}, E = [
|
|
16
16
|
"1:1",
|
|
17
17
|
"2:3",
|
|
18
18
|
"3:4",
|
|
@@ -23,32 +23,32 @@ var S = {
|
|
|
23
23
|
];
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/core/image-validator.ts
|
|
26
|
-
function
|
|
26
|
+
function D(e) {
|
|
27
27
|
let t = [];
|
|
28
|
-
e.size >
|
|
28
|
+
e.size > T.MAX_SIZE_MB * 1024 * 1024 && t.push("图片大小不能超过10MB"), (e.width > T.MAX_WIDTH || e.height > T.MAX_HEIGHT) && t.push("图片分辨率不能超过2048x2048");
|
|
29
29
|
let n = e.width / e.height;
|
|
30
|
-
return (n <
|
|
30
|
+
return (n < T.ASPECT_RATIO_MIN || n > T.ASPECT_RATIO_MAX) && t.push("宽高比必须在1:3到3:1之间"), {
|
|
31
31
|
valid: t.length === 0,
|
|
32
32
|
errors: t
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function O(e, t) {
|
|
36
36
|
let n = [];
|
|
37
37
|
return (e.width !== t.width || e.height !== t.height) && n.push("蒙版尺寸必须与原图尺寸相同"), {
|
|
38
38
|
valid: n.length === 0,
|
|
39
39
|
errors: n
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
async function
|
|
43
|
-
let t = e.size <=
|
|
42
|
+
async function k(e) {
|
|
43
|
+
let t = e.size <= T.MAX_SIZE_MB * 1024 * 1024;
|
|
44
44
|
return new Promise((n) => {
|
|
45
45
|
let r = new Image(), i = URL.createObjectURL(e);
|
|
46
46
|
r.onload = () => {
|
|
47
47
|
URL.revokeObjectURL(i);
|
|
48
48
|
let e = [];
|
|
49
|
-
(r.width >
|
|
49
|
+
(r.width > T.MAX_WIDTH || r.height > T.MAX_HEIGHT) && e.push("图片分辨率不能超过2048x2048");
|
|
50
50
|
let a = r.width / r.height;
|
|
51
|
-
(a <
|
|
51
|
+
(a < T.ASPECT_RATIO_MIN || a > T.ASPECT_RATIO_MAX) && e.push("宽高比必须在1:3到3:1之间"), t || e.push("图片大小不能超过10MB"), n({
|
|
52
52
|
valid: e.length === 0,
|
|
53
53
|
errors: e
|
|
54
54
|
});
|
|
@@ -62,7 +62,7 @@ async function O(e) {
|
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/core/task-types/types-part-a.ts
|
|
65
|
-
var
|
|
65
|
+
var A = {
|
|
66
66
|
GeneratePrinting: {
|
|
67
67
|
key: "GeneratePrinting",
|
|
68
68
|
title: "图案设计",
|
|
@@ -160,7 +160,7 @@ var k = {
|
|
|
160
160
|
label: "视角",
|
|
161
161
|
type: "enum",
|
|
162
162
|
required: !0,
|
|
163
|
-
options:
|
|
163
|
+
options: u
|
|
164
164
|
}]
|
|
165
165
|
},
|
|
166
166
|
PrintingTiling: {
|
|
@@ -286,7 +286,7 @@ var k = {
|
|
|
286
286
|
label: "放大倍数",
|
|
287
287
|
type: "enum",
|
|
288
288
|
required: !0,
|
|
289
|
-
options:
|
|
289
|
+
options: r
|
|
290
290
|
}]
|
|
291
291
|
},
|
|
292
292
|
VectorConvert: {
|
|
@@ -303,7 +303,7 @@ var k = {
|
|
|
303
303
|
label: "图案类型",
|
|
304
304
|
type: "enum",
|
|
305
305
|
required: !0,
|
|
306
|
-
options:
|
|
306
|
+
options: S
|
|
307
307
|
}]
|
|
308
308
|
},
|
|
309
309
|
ChangeModel: {
|
|
@@ -321,19 +321,19 @@ var k = {
|
|
|
321
321
|
name: "gender",
|
|
322
322
|
label: "性别",
|
|
323
323
|
type: "enum",
|
|
324
|
-
options:
|
|
324
|
+
options: f
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
327
|
name: "age",
|
|
328
328
|
label: "年龄",
|
|
329
329
|
type: "enum",
|
|
330
|
-
options:
|
|
330
|
+
options: v
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
name: "race",
|
|
334
334
|
label: "人种",
|
|
335
335
|
type: "enum",
|
|
336
|
-
options:
|
|
336
|
+
options: t
|
|
337
337
|
}
|
|
338
338
|
]
|
|
339
339
|
},
|
|
@@ -361,7 +361,7 @@ var k = {
|
|
|
361
361
|
name: "position",
|
|
362
362
|
label: "服装位置",
|
|
363
363
|
type: "enum",
|
|
364
|
-
options:
|
|
364
|
+
options: x
|
|
365
365
|
}]
|
|
366
366
|
},
|
|
367
367
|
Eliminate: {
|
|
@@ -440,7 +440,7 @@ var k = {
|
|
|
440
440
|
label: "改版部位",
|
|
441
441
|
type: "multiEnum",
|
|
442
442
|
required: !0,
|
|
443
|
-
options:
|
|
443
|
+
options: g
|
|
444
444
|
}]
|
|
445
445
|
},
|
|
446
446
|
GenerateModel: {
|
|
@@ -460,13 +460,13 @@ var k = {
|
|
|
460
460
|
label: "性别",
|
|
461
461
|
type: "enum",
|
|
462
462
|
required: !0,
|
|
463
|
-
options:
|
|
463
|
+
options: f
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
466
|
name: "race",
|
|
467
467
|
label: "人种",
|
|
468
468
|
type: "enum",
|
|
469
|
-
options:
|
|
469
|
+
options: t
|
|
470
470
|
}
|
|
471
471
|
]
|
|
472
472
|
},
|
|
@@ -513,7 +513,7 @@ var k = {
|
|
|
513
513
|
label: "识别类型",
|
|
514
514
|
type: "enum",
|
|
515
515
|
required: !0,
|
|
516
|
-
options:
|
|
516
|
+
options: b
|
|
517
517
|
}]
|
|
518
518
|
},
|
|
519
519
|
LineArtToReal: {
|
|
@@ -532,7 +532,7 @@ var k = {
|
|
|
532
532
|
label: "图片类型",
|
|
533
533
|
type: "enum",
|
|
534
534
|
required: !0,
|
|
535
|
-
options:
|
|
535
|
+
options: c
|
|
536
536
|
},
|
|
537
537
|
{
|
|
538
538
|
name: "prompt",
|
|
@@ -606,7 +606,7 @@ var k = {
|
|
|
606
606
|
required: !0
|
|
607
607
|
}]
|
|
608
608
|
}
|
|
609
|
-
},
|
|
609
|
+
}, j = {
|
|
610
610
|
ChangeAccessoriesByImg: {
|
|
611
611
|
key: "ChangeAccessoriesByImg",
|
|
612
612
|
title: "配饰穿搭调整",
|
|
@@ -629,7 +629,7 @@ var k = {
|
|
|
629
629
|
label: "配件类型",
|
|
630
630
|
type: "enum",
|
|
631
631
|
required: !0,
|
|
632
|
-
options:
|
|
632
|
+
options: h
|
|
633
633
|
}
|
|
634
634
|
]
|
|
635
635
|
},
|
|
@@ -663,7 +663,7 @@ var k = {
|
|
|
663
663
|
label: "试衣模板",
|
|
664
664
|
type: "enum",
|
|
665
665
|
required: !0,
|
|
666
|
-
options:
|
|
666
|
+
options: e
|
|
667
667
|
}]
|
|
668
668
|
},
|
|
669
669
|
FixDeformities: {
|
|
@@ -698,7 +698,7 @@ var k = {
|
|
|
698
698
|
label: "裁剪模式",
|
|
699
699
|
type: "enum",
|
|
700
700
|
required: !0,
|
|
701
|
-
options:
|
|
701
|
+
options: _
|
|
702
702
|
},
|
|
703
703
|
{
|
|
704
704
|
name: "x",
|
|
@@ -741,7 +741,7 @@ var k = {
|
|
|
741
741
|
label: "服装位置",
|
|
742
742
|
type: "enum",
|
|
743
743
|
required: !0,
|
|
744
|
-
options:
|
|
744
|
+
options: x
|
|
745
745
|
}]
|
|
746
746
|
},
|
|
747
747
|
GenerateShortVideo: {
|
|
@@ -771,7 +771,7 @@ var k = {
|
|
|
771
771
|
label: "时长",
|
|
772
772
|
type: "enum",
|
|
773
773
|
required: !0,
|
|
774
|
-
options:
|
|
774
|
+
options: p
|
|
775
775
|
}
|
|
776
776
|
]
|
|
777
777
|
},
|
|
@@ -804,32 +804,75 @@ var k = {
|
|
|
804
804
|
}
|
|
805
805
|
]
|
|
806
806
|
},
|
|
807
|
-
|
|
808
|
-
key: "
|
|
809
|
-
title: "
|
|
810
|
-
description: "
|
|
807
|
+
OrientationRedesign: {
|
|
808
|
+
key: "OrientationRedesign",
|
|
809
|
+
title: "智能改款",
|
|
810
|
+
description: "上传服装主图与参考图,按指令智能改款",
|
|
811
811
|
fields: [
|
|
812
812
|
{
|
|
813
813
|
name: "imgUrl",
|
|
814
|
-
label: "
|
|
814
|
+
label: "主图",
|
|
815
815
|
type: "image",
|
|
816
816
|
required: !0
|
|
817
817
|
},
|
|
818
|
-
{
|
|
819
|
-
name: "maskUrl",
|
|
820
|
-
label: "蒙版1",
|
|
821
|
-
type: "mask"
|
|
822
|
-
},
|
|
823
818
|
{
|
|
824
819
|
name: "refImgUrl",
|
|
825
|
-
label: "参考图
|
|
820
|
+
label: "参考图",
|
|
826
821
|
type: "image"
|
|
827
822
|
},
|
|
828
823
|
{
|
|
829
824
|
name: "prompt",
|
|
830
|
-
label: "
|
|
825
|
+
label: "改款指令",
|
|
831
826
|
type: "text",
|
|
832
|
-
placeholder: "
|
|
827
|
+
placeholder: "描述改款需求"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: "optimizeFlag",
|
|
831
|
+
label: "是否强化指令",
|
|
832
|
+
type: "boolean"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
name: "qualityMode",
|
|
836
|
+
label: "质量模式",
|
|
837
|
+
type: "enum",
|
|
838
|
+
required: !0,
|
|
839
|
+
options: o
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
name: "aspectRatio",
|
|
843
|
+
label: "生图尺寸",
|
|
844
|
+
type: "aspectRatio"
|
|
845
|
+
}
|
|
846
|
+
]
|
|
847
|
+
},
|
|
848
|
+
OrientationDesignReplaceElement: {
|
|
849
|
+
key: "OrientationDesignReplaceElement",
|
|
850
|
+
title: "元素替换",
|
|
851
|
+
description: "基于遮罩与参考图替换设计点元素",
|
|
852
|
+
fields: [
|
|
853
|
+
{
|
|
854
|
+
name: "imgUrl",
|
|
855
|
+
label: "服装图片",
|
|
856
|
+
type: "image",
|
|
857
|
+
required: !0
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
name: "maskImgUrl",
|
|
861
|
+
label: "设计点遮罩",
|
|
862
|
+
type: "mask",
|
|
863
|
+
required: !0
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: "referenceImgUrl",
|
|
867
|
+
label: "设计点参考图",
|
|
868
|
+
type: "image",
|
|
869
|
+
required: !0
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
name: "referenceMaskImgUrl",
|
|
873
|
+
label: "参考图遮罩",
|
|
874
|
+
type: "mask",
|
|
875
|
+
required: !0
|
|
833
876
|
}
|
|
834
877
|
]
|
|
835
878
|
},
|
|
@@ -926,7 +969,7 @@ var k = {
|
|
|
926
969
|
VirtualFittingReferenceV2: {
|
|
927
970
|
key: "VirtualFittingReferenceV2",
|
|
928
971
|
title: "AI试衣参考图2.0",
|
|
929
|
-
description: "
|
|
972
|
+
description: "支持姿势、背景、质量与比例的试衣参考图2.0",
|
|
930
973
|
fields: [
|
|
931
974
|
{
|
|
932
975
|
name: "imgUrl",
|
|
@@ -956,6 +999,12 @@ var k = {
|
|
|
956
999
|
type: "text",
|
|
957
1000
|
placeholder: "描述试衣需求"
|
|
958
1001
|
},
|
|
1002
|
+
{
|
|
1003
|
+
name: "qualityMode",
|
|
1004
|
+
label: "生图质量",
|
|
1005
|
+
type: "enum",
|
|
1006
|
+
options: o
|
|
1007
|
+
},
|
|
959
1008
|
{
|
|
960
1009
|
name: "aspectRatio",
|
|
961
1010
|
label: "宽高比",
|
|
@@ -963,6 +1012,38 @@ var k = {
|
|
|
963
1012
|
}
|
|
964
1013
|
]
|
|
965
1014
|
},
|
|
1015
|
+
VirtualFittingV2: {
|
|
1016
|
+
key: "VirtualFittingV2",
|
|
1017
|
+
endpoint: "/task/submit/v2/VirtualFitting",
|
|
1018
|
+
title: "AI试衣2.0",
|
|
1019
|
+
description: "上传服装图,按文字指令生成商用模特效果图",
|
|
1020
|
+
fields: [
|
|
1021
|
+
{
|
|
1022
|
+
name: "imgUrl",
|
|
1023
|
+
label: "服装图片",
|
|
1024
|
+
type: "image",
|
|
1025
|
+
required: !0
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
name: "userPrompt",
|
|
1029
|
+
label: "文字指令",
|
|
1030
|
+
type: "text",
|
|
1031
|
+
required: !0,
|
|
1032
|
+
placeholder: "描述试衣需求"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
name: "qualityMode",
|
|
1036
|
+
label: "生图质量",
|
|
1037
|
+
type: "enum",
|
|
1038
|
+
options: o
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
name: "aspectRatio",
|
|
1042
|
+
label: "生成比例",
|
|
1043
|
+
type: "aspectRatio"
|
|
1044
|
+
}
|
|
1045
|
+
]
|
|
1046
|
+
},
|
|
966
1047
|
FlowerShapedDesign: {
|
|
967
1048
|
key: "FlowerShapedDesign",
|
|
968
1049
|
title: "花型创款",
|
|
@@ -1015,7 +1096,7 @@ var k = {
|
|
|
1015
1096
|
name: "removePattern",
|
|
1016
1097
|
label: "是否去除参考图印花",
|
|
1017
1098
|
type: "enum",
|
|
1018
|
-
options:
|
|
1099
|
+
options: s
|
|
1019
1100
|
}
|
|
1020
1101
|
]
|
|
1021
1102
|
},
|
|
@@ -1063,31 +1144,31 @@ var k = {
|
|
|
1063
1144
|
label: "性别",
|
|
1064
1145
|
type: "enum",
|
|
1065
1146
|
required: !0,
|
|
1066
|
-
options:
|
|
1147
|
+
options: f
|
|
1067
1148
|
},
|
|
1068
1149
|
{
|
|
1069
1150
|
name: "age",
|
|
1070
1151
|
label: "年龄",
|
|
1071
1152
|
type: "enum",
|
|
1072
|
-
options:
|
|
1153
|
+
options: v
|
|
1073
1154
|
},
|
|
1074
1155
|
{
|
|
1075
1156
|
name: "nationality",
|
|
1076
1157
|
label: "国籍",
|
|
1077
1158
|
type: "enum",
|
|
1078
|
-
options:
|
|
1159
|
+
options: y
|
|
1079
1160
|
},
|
|
1080
1161
|
{
|
|
1081
1162
|
name: "skinColor",
|
|
1082
1163
|
label: "肤色",
|
|
1083
1164
|
type: "enum",
|
|
1084
|
-
options:
|
|
1165
|
+
options: m
|
|
1085
1166
|
},
|
|
1086
1167
|
{
|
|
1087
1168
|
name: "bodyShape",
|
|
1088
1169
|
label: "身材",
|
|
1089
1170
|
type: "enum",
|
|
1090
|
-
options:
|
|
1171
|
+
options: d
|
|
1091
1172
|
}
|
|
1092
1173
|
]
|
|
1093
1174
|
},
|
|
@@ -1101,7 +1182,7 @@ var k = {
|
|
|
1101
1182
|
label: "性别",
|
|
1102
1183
|
type: "enum",
|
|
1103
1184
|
required: !0,
|
|
1104
|
-
options:
|
|
1185
|
+
options: f
|
|
1105
1186
|
},
|
|
1106
1187
|
{
|
|
1107
1188
|
name: "faceRefImgUrl",
|
|
@@ -1173,7 +1254,7 @@ var k = {
|
|
|
1173
1254
|
name: "gender",
|
|
1174
1255
|
label: "性别",
|
|
1175
1256
|
type: "enum",
|
|
1176
|
-
options:
|
|
1257
|
+
options: f
|
|
1177
1258
|
},
|
|
1178
1259
|
{
|
|
1179
1260
|
name: "similarity",
|
|
@@ -1227,7 +1308,7 @@ var k = {
|
|
|
1227
1308
|
label: "尺码",
|
|
1228
1309
|
type: "enum",
|
|
1229
1310
|
required: !0,
|
|
1230
|
-
options:
|
|
1311
|
+
options: a
|
|
1231
1312
|
},
|
|
1232
1313
|
{
|
|
1233
1314
|
name: "aspectRatio",
|
|
@@ -1305,7 +1386,7 @@ var k = {
|
|
|
1305
1386
|
label: "视角",
|
|
1306
1387
|
type: "enum",
|
|
1307
1388
|
required: !0,
|
|
1308
|
-
options:
|
|
1389
|
+
options: u
|
|
1309
1390
|
},
|
|
1310
1391
|
{
|
|
1311
1392
|
name: "aspectRatio",
|
|
@@ -1339,22 +1420,22 @@ var k = {
|
|
|
1339
1420
|
}
|
|
1340
1421
|
]
|
|
1341
1422
|
}
|
|
1342
|
-
},
|
|
1343
|
-
...
|
|
1344
|
-
...
|
|
1423
|
+
}, M = {
|
|
1424
|
+
...A,
|
|
1425
|
+
...j
|
|
1345
1426
|
};
|
|
1346
|
-
function
|
|
1347
|
-
return
|
|
1427
|
+
function N(e) {
|
|
1428
|
+
return M[e];
|
|
1348
1429
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return Object.values(
|
|
1430
|
+
function P() {
|
|
1431
|
+
return Object.values(M);
|
|
1351
1432
|
}
|
|
1352
1433
|
//#endregion
|
|
1353
1434
|
//#region src/core/validate.ts
|
|
1354
|
-
function
|
|
1435
|
+
function F(e, t) {
|
|
1355
1436
|
let n = [];
|
|
1356
1437
|
for (let r of t) {
|
|
1357
|
-
let t = e[r.name], i =
|
|
1438
|
+
let t = e[r.name], i = I(r, t);
|
|
1358
1439
|
i && n.push(i);
|
|
1359
1440
|
}
|
|
1360
1441
|
return {
|
|
@@ -1362,12 +1443,12 @@ function P(e, t) {
|
|
|
1362
1443
|
errors: n
|
|
1363
1444
|
};
|
|
1364
1445
|
}
|
|
1365
|
-
function
|
|
1446
|
+
function I(e, t) {
|
|
1366
1447
|
let n = t == null || t === "";
|
|
1367
1448
|
if (e.required && n) return {
|
|
1368
1449
|
field: e.name,
|
|
1369
1450
|
label: e.label,
|
|
1370
|
-
message:
|
|
1451
|
+
message: l.FIELD_REQUIRED(e.label)
|
|
1371
1452
|
};
|
|
1372
1453
|
if (t == null) return null;
|
|
1373
1454
|
let r = (t) => ({
|
|
@@ -1378,42 +1459,45 @@ function F(e, t) {
|
|
|
1378
1459
|
switch (e.type) {
|
|
1379
1460
|
case "image":
|
|
1380
1461
|
case "mask":
|
|
1381
|
-
if (typeof t != "string" && !
|
|
1462
|
+
if (typeof t != "string" && !L(t)) return r(l.FIELD_STRING);
|
|
1382
1463
|
break;
|
|
1383
1464
|
case "images":
|
|
1384
|
-
if (!Array.isArray(t) || t.length === 0) return r(
|
|
1385
|
-
if (t.some((e) => (typeof e != "string" || e === "") && !
|
|
1465
|
+
if (!Array.isArray(t) || t.length === 0) return r(l.FIELD_ARRAY);
|
|
1466
|
+
if (t.some((e) => (typeof e != "string" || e === "") && !L(e))) return r(l.FIELD_ARRAY_ELEMENTS);
|
|
1386
1467
|
break;
|
|
1387
1468
|
case "text":
|
|
1388
|
-
if (typeof t != "string") return r(
|
|
1389
|
-
if (e.maxLength && t.length > e.maxLength) return r((t) =>
|
|
1469
|
+
if (typeof t != "string") return r(l.FIELD_STRING);
|
|
1470
|
+
if (e.maxLength && t.length > e.maxLength) return r((t) => l.FIELD_MAX_LENGTH(t, e.maxLength));
|
|
1390
1471
|
break;
|
|
1391
1472
|
case "enum":
|
|
1392
|
-
if (typeof t != "string") return r(
|
|
1393
|
-
if (e.options && !e.options.some((e) => e.value === t)) return r(
|
|
1473
|
+
if (typeof t != "string") return r(l.FIELD_STRING);
|
|
1474
|
+
if (e.options && !e.options.some((e) => e.value === t)) return r(l.FIELD_ENUM_INVALID);
|
|
1394
1475
|
break;
|
|
1395
1476
|
case "multiEnum":
|
|
1396
|
-
if (!Array.isArray(t) || t.length === 0) return r(
|
|
1397
|
-
if (t.some((e) => typeof e != "string" || e === "")) return r(
|
|
1398
|
-
if (e.options && t.some((t) => !e.options?.some((e) => e.value === t))) return r(
|
|
1477
|
+
if (!Array.isArray(t) || t.length === 0) return r(l.FIELD_ARRAY);
|
|
1478
|
+
if (t.some((e) => typeof e != "string" || e === "")) return r(l.FIELD_ARRAY_ELEMENTS);
|
|
1479
|
+
if (e.options && t.some((t) => !e.options?.some((e) => e.value === t))) return r(l.FIELD_ENUM_INVALID);
|
|
1399
1480
|
break;
|
|
1400
1481
|
case "color":
|
|
1401
|
-
if (typeof t != "string" || !/^#[0-9A-Fa-f]{6}$/.test(t)) return r(
|
|
1482
|
+
if (typeof t != "string" || !/^#[0-9A-Fa-f]{6}$/.test(t)) return r(l.FIELD_COLOR_FORMAT);
|
|
1402
1483
|
break;
|
|
1403
1484
|
case "number":
|
|
1404
|
-
if (typeof t != "number" || Number.isNaN(t)) return r(
|
|
1485
|
+
if (typeof t != "number" || Number.isNaN(t)) return r(l.FIELD_NUMBER);
|
|
1486
|
+
break;
|
|
1487
|
+
case "boolean":
|
|
1488
|
+
if (typeof t != "boolean") return r(l.FIELD_BOOLEAN);
|
|
1405
1489
|
break;
|
|
1406
1490
|
case "aspectRatio":
|
|
1407
1491
|
case "strength": break;
|
|
1408
1492
|
}
|
|
1409
1493
|
return null;
|
|
1410
1494
|
}
|
|
1411
|
-
function
|
|
1495
|
+
function L(e) {
|
|
1412
1496
|
return typeof File < "u" && e instanceof File;
|
|
1413
1497
|
}
|
|
1414
1498
|
//#endregion
|
|
1415
1499
|
//#region src/core/client.ts
|
|
1416
|
-
var
|
|
1500
|
+
var R = class {
|
|
1417
1501
|
constructor(e = {}) {
|
|
1418
1502
|
this.type = "", this.submitEndpoint = "/task/submit", this.submitEndpointMode = "prefix", this.pollEndpoint = "/task/progress", this.pollInterval = 1e3, this.maxPollAttempts = 120, this.phase = i.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this.activeTasks = /* @__PURE__ */ new Map(), this.pollTimer = null, this.isPollingBatch = !1, this.configure(e);
|
|
1419
1503
|
}
|
|
@@ -1422,7 +1506,7 @@ var L = class {
|
|
|
1422
1506
|
}
|
|
1423
1507
|
get typeDef() {
|
|
1424
1508
|
let e = this.resolvedTaskTypeKey;
|
|
1425
|
-
return e ?
|
|
1509
|
+
return e ? N(e) : void 0;
|
|
1426
1510
|
}
|
|
1427
1511
|
get taskFields() {
|
|
1428
1512
|
return this.typeDef?.fields ?? [];
|
|
@@ -1430,12 +1514,12 @@ var L = class {
|
|
|
1430
1514
|
async submit(e, t) {
|
|
1431
1515
|
let n = this.createRequestUri(e);
|
|
1432
1516
|
if (!n) {
|
|
1433
|
-
this.fail(
|
|
1517
|
+
this.fail(l.MISSING_ENDPOINT, i.IDLE);
|
|
1434
1518
|
return;
|
|
1435
1519
|
}
|
|
1436
1520
|
let r = this.getTaskFields(e);
|
|
1437
1521
|
if (r.length > 0) {
|
|
1438
|
-
let e =
|
|
1522
|
+
let e = F(t, r);
|
|
1439
1523
|
if (!e.valid) {
|
|
1440
1524
|
this.fail(e.errors.map((e) => e.message).join("; "), i.IDLE);
|
|
1441
1525
|
return;
|
|
@@ -1452,21 +1536,23 @@ var L = class {
|
|
|
1452
1536
|
};
|
|
1453
1537
|
this.onSubmit?.(a), await this.trackTask(i);
|
|
1454
1538
|
} catch (e) {
|
|
1455
|
-
this.fail(e instanceof Error ? e.message :
|
|
1539
|
+
this.fail(e instanceof Error ? e.message : l.SUBMIT_FAILED, this.phase);
|
|
1456
1540
|
}
|
|
1457
1541
|
}
|
|
1458
1542
|
reset() {
|
|
1459
1543
|
this.phase = i.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this.activeTasks.clear(), this.pollTimer &&= (clearTimeout(this.pollTimer), null);
|
|
1460
1544
|
}
|
|
1461
1545
|
createRequestUri(e = this.type) {
|
|
1462
|
-
|
|
1546
|
+
if (this.submitEndpointMode === "full") return this.submitEndpoint;
|
|
1547
|
+
let t = U(e), n = t ? N(t) : void 0;
|
|
1548
|
+
return n?.endpoint ? n.endpoint : e ? `${this.submitEndpoint}/${e}` : this.submitEndpoint;
|
|
1463
1549
|
}
|
|
1464
1550
|
get resolvedTaskTypeKey() {
|
|
1465
|
-
return
|
|
1551
|
+
return U(this.type);
|
|
1466
1552
|
}
|
|
1467
1553
|
getTaskFields(e) {
|
|
1468
|
-
let t =
|
|
1469
|
-
return t ?
|
|
1554
|
+
let t = U(e);
|
|
1555
|
+
return t ? N(t)?.fields ?? [] : [];
|
|
1470
1556
|
}
|
|
1471
1557
|
async resolveUploads(e, t) {
|
|
1472
1558
|
let n = t.length > 0 ? t.filter((e) => e.type === "image" || e.type === "mask" || e.type === "images") : Object.keys(e).map((e) => ({
|
|
@@ -1482,9 +1568,9 @@ var L = class {
|
|
|
1482
1568
|
return r;
|
|
1483
1569
|
}
|
|
1484
1570
|
async resolveUploadValue(e, t) {
|
|
1485
|
-
if (!
|
|
1571
|
+
if (!W(e)) return e;
|
|
1486
1572
|
if (!this.customUploadRequest) throw Error(`customUploadRequest is required to upload ${t.name}`);
|
|
1487
|
-
return
|
|
1573
|
+
return G(await this.customUploadRequest(e));
|
|
1488
1574
|
}
|
|
1489
1575
|
trackTask(e) {
|
|
1490
1576
|
this.phase = i.POLLING;
|
|
@@ -1514,7 +1600,7 @@ var L = class {
|
|
|
1514
1600
|
t.attempts += 1;
|
|
1515
1601
|
let n = r.get(e);
|
|
1516
1602
|
if (!n) {
|
|
1517
|
-
this.failTask(t,
|
|
1603
|
+
this.failTask(t, l.TASK_NOT_FOUND(e));
|
|
1518
1604
|
return;
|
|
1519
1605
|
}
|
|
1520
1606
|
this.taskId = e, this.progress = n.taskProgress;
|
|
@@ -1537,10 +1623,10 @@ var L = class {
|
|
|
1537
1623
|
this.onSuccess?.(r), this.completeTask(t);
|
|
1538
1624
|
return;
|
|
1539
1625
|
}
|
|
1540
|
-
t.attempts >= this.maxPollAttempts && this.failTask(t,
|
|
1626
|
+
t.attempts >= this.maxPollAttempts && this.failTask(t, l.POLL_TIMEOUT(e));
|
|
1541
1627
|
});
|
|
1542
1628
|
} catch (e) {
|
|
1543
|
-
let t = e instanceof Error ? e.message :
|
|
1629
|
+
let t = e instanceof Error ? e.message : l.POLL_FAILED;
|
|
1544
1630
|
[...this.activeTasks.values()].forEach((e) => this.failTask(e, t));
|
|
1545
1631
|
} finally {
|
|
1546
1632
|
this.isPollingBatch = !1, this.activeTasks.size ? (this.phase = i.POLLING, this.ensurePolling(this.pollInterval)) : this.phase === i.POLLING && (this.phase = this.error ? i.ERROR : i.SUCCESS);
|
|
@@ -1558,7 +1644,7 @@ var L = class {
|
|
|
1558
1644
|
body: JSON.stringify(t),
|
|
1559
1645
|
headers: { "Content-Type": "application/json" }
|
|
1560
1646
|
});
|
|
1561
|
-
return n && typeof n.json == "function" ? n.json() :
|
|
1647
|
+
return n && typeof n.json == "function" ? n.json() : z(n);
|
|
1562
1648
|
}
|
|
1563
1649
|
fail(e, t, n) {
|
|
1564
1650
|
this.phase = i.ERROR, this.error = e;
|
|
@@ -1570,29 +1656,29 @@ var L = class {
|
|
|
1570
1656
|
this.onError?.(r);
|
|
1571
1657
|
}
|
|
1572
1658
|
};
|
|
1573
|
-
function R(e) {
|
|
1574
|
-
return V(e) && B(e.data) ? e.data : (z(e), e);
|
|
1575
|
-
}
|
|
1576
1659
|
function z(e) {
|
|
1577
|
-
return
|
|
1660
|
+
return H(e) && V(e.data) ? e.data : (B(e), e);
|
|
1578
1661
|
}
|
|
1579
1662
|
function B(e) {
|
|
1580
|
-
return
|
|
1663
|
+
return H(e) && "data" in e;
|
|
1581
1664
|
}
|
|
1582
1665
|
function V(e) {
|
|
1583
|
-
return
|
|
1666
|
+
return H(e) && "data" in e && ("code" in e || "success" in e || "msg" in e);
|
|
1584
1667
|
}
|
|
1585
1668
|
function H(e) {
|
|
1669
|
+
return typeof e == "object" && !!e;
|
|
1670
|
+
}
|
|
1671
|
+
function U(e) {
|
|
1586
1672
|
if (!e) return "";
|
|
1587
|
-
if (
|
|
1673
|
+
if (M[e]) return e;
|
|
1588
1674
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[-\s]+/g, "_").toUpperCase();
|
|
1589
|
-
return
|
|
1675
|
+
return M[t] ? t : "";
|
|
1590
1676
|
}
|
|
1591
|
-
function
|
|
1677
|
+
function W(e) {
|
|
1592
1678
|
return typeof File < "u" && e instanceof File;
|
|
1593
1679
|
}
|
|
1594
|
-
async function
|
|
1595
|
-
return e ? typeof e == "string" ? e : e instanceof Response ?
|
|
1680
|
+
async function G(e) {
|
|
1681
|
+
return e ? typeof e == "string" ? e : e instanceof Response ? G(await e.json()) : typeof e.data == "string" ? e.data : e.data ? e.data.value || e.data.url || "" : e.value || e.url || "" : "";
|
|
1596
1682
|
}
|
|
1597
1683
|
//#endregion
|
|
1598
|
-
export {
|
|
1684
|
+
export { N as a, D as c, E as d, w as f, P as i, k as l, C as m, F as n, j as o, T as p, M as r, A as s, R as t, O as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./constants-DFJCA4_2.cjs`);var t={RUNNING:`running`,DONE:`done`},n={DONE:`done`,EXCEPTION:`exception`},r={MAX_SIZE_MB:10,MAX_WIDTH:2048,MAX_HEIGHT:2048,ASPECT_RATIO_MIN:1/3,ASPECT_RATIO_MAX:3},i=[`1:1`,`2:3`,`3:4`,`3:2`,`4:3`,`9:16`,`16:9`];function a(e){let t=[];e.size>r.MAX_SIZE_MB*1024*1024&&t.push(`图片大小不能超过10MB`),(e.width>r.MAX_WIDTH||e.height>r.MAX_HEIGHT)&&t.push(`图片分辨率不能超过2048x2048`);let n=e.width/e.height;return(n<r.ASPECT_RATIO_MIN||n>r.ASPECT_RATIO_MAX)&&t.push(`宽高比必须在1:3到3:1之间`),{valid:t.length===0,errors:t}}function o(e,t){let n=[];return(e.width!==t.width||e.height!==t.height)&&n.push(`蒙版尺寸必须与原图尺寸相同`),{valid:n.length===0,errors:n}}async function s(e){let t=e.size<=r.MAX_SIZE_MB*1024*1024;return new Promise(n=>{let i=new Image,a=URL.createObjectURL(e);i.onload=()=>{URL.revokeObjectURL(a);let e=[];(i.width>r.MAX_WIDTH||i.height>r.MAX_HEIGHT)&&e.push(`图片分辨率不能超过2048x2048`);let o=i.width/i.height;(o<r.ASPECT_RATIO_MIN||o>r.ASPECT_RATIO_MAX)&&e.push(`宽高比必须在1:3到3:1之间`),t||e.push(`图片大小不能超过10MB`),n({valid:e.length===0,errors:e})},i.onerror=()=>{URL.revokeObjectURL(a),n({valid:!1,errors:[`无法加载图片`]})},i.src=a})}var c={GeneratePrinting:{key:`GeneratePrinting`,title:`图案设计`,description:`上传1-2张灵感素材图进行融合发散设计`,fields:[{name:`imgUrlList`,label:`灵感素材图`,type:`images`,required:!0,hint:`上传1-2张灵感素材图`},{name:`prompt`,label:`图案风格`,type:`text`,required:!0,placeholder:`描述想要的图案风格`},{name:`aspectRatio`,label:`比例`,type:`aspectRatio`}]},VirtualFitting:{key:`VirtualFitting`,title:`AI试衣`,description:`上传服装图片生成模特上身效果图`,fields:[{name:`imgUrl`,label:`上装图片`,type:`image`,required:!0,hint:`挂拍图/人台图/平铺图`},{name:`lowerImgUrl`,label:`下装图片`,type:`image`},{name:`prompt`,label:`试衣需求`,type:`text`,placeholder:`描述试衣需求`},{name:`aspectRatio`,label:`比例`,type:`aspectRatio`}]},FixFace:{key:`FixFace`,title:`面部优化`,description:`智能修复模特脸部畸形`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0}]},ChangeFace:{key:`ChangeFace`,title:`面部替换`,description:`上传指定面部图片替换模特面容`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考面部图`,type:`image`,required:!0}]},MultiPerspective:{key:`MultiPerspective`,title:`多视角`,description:`生成不同角度的展示效果图`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`perspective`,label:`视角`,type:`enum`,required:!0,options:e.b}]},PrintingTiling:{key:`PrintingTiling`,title:`图案印染上身`,description:`将指定图案虚拟印染到款式图上`,fields:[{name:`imgUrl`,label:`款式图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`printingImgUrl`,label:`印花图案`,type:`image`,required:!0},{name:`prompt`,label:`印染需求`,type:`text`,placeholder:`描述印染需求`}]},ChangeDesignPoint:{key:`ChangeDesignPoint`,title:`设计点修改`,description:`通过参考图实现设计点修改或融合`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`prompt`,label:`修改需求`,type:`text`,placeholder:`描述修改需求`}]},ChangeColor:{key:`ChangeColor`,title:`服装改色`,description:`自定义区域一键换色`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`改色区域蒙版`,type:`mask`,required:!0},{name:`hexCode`,label:`目标颜色`,type:`color`,required:!0}]},ChangeFabric:{key:`ChangeFabric`,title:`面料上身`,description:`将指定面料一键上身到款式图`,fields:[{name:`imgUrl`,label:`款式图/模特图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`,required:!0},{name:`fabricImgUrl`,label:`面料图`,type:`image`,required:!0}]},Sr:{key:`Sr`,title:`高清放大`,description:`无损高清放大与细节强化`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`scale`,label:`放大倍数`,type:`enum`,required:!0,options:e.E}]},VectorConvert:{key:`VectorConvert`,title:`矢量图转换`,description:`生成可编辑的矢量格式文件`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`patternType`,label:`图案类型`,type:`enum`,required:!0,options:e.y}]},ChangeModel:{key:`ChangeModel`,title:`模特更换`,description:`一键更换模特并支持自定义选择`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`gender`,label:`性别`,type:`enum`,options:e.g},{name:`age`,label:`年龄`,type:`enum`,options:e.u},{name:`race`,label:`人种`,type:`enum`,options:e.C}]},GenerateSketch:{key:`GenerateSketch`,title:`平铺图转线稿`,description:`上传平铺图生成线稿`,fields:[{name:`imgUrl`,label:`平铺图`,type:`image`,required:!0}]},ModelGenerateSketch:{key:`ModelGenerateSketch`,title:`模特图转线稿`,description:`上传模特图生成线稿`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`position`,label:`服装位置`,type:`enum`,options:e.x}]},Eliminate:{key:`Eliminate`,title:`AI消除`,description:`一键消除指定元素`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`消除区域蒙版`,type:`mask`,required:!0}]},ExpandImage:{key:`ExpandImage`,title:`AI扩图`,description:`一键扩充人物或背景`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`扩图区域蒙版`,type:`mask`,required:!0}]},ClothingDesign:{key:`ClothingDesign`,title:`AI创款`,description:`根据灵感图快速创款`,fields:[{name:`imgUrlList`,label:`灵感款式图`,type:`images`,hint:`上传1-3张灵感图`},{name:`fabricImgUrl`,label:`面料图`,type:`image`,hint:`上传面料图进行面料创款`},{name:`words`,label:`创款需求`,type:`text`,placeholder:`描述创款需求`},{name:`aspectRatio`,label:`比例`,type:`aspectRatio`}]},ChangePattern:{key:`ChangePattern`,title:`服装改版`,description:`通过选择部位和版型修改服装版型`,fields:[{name:`imgUrl`,label:`服装图`,type:`image`,required:!0},{name:`detailList`,label:`改版部位`,type:`multiEnum`,required:!0,options:e.m}]},GenerateModel:{key:`GenerateModel`,title:`定制模特`,description:`生成符合需求的虚拟模特`,fields:[{name:`imgUrlList`,label:`参考图片`,type:`images`,required:!0,hint:`上传1-10张带面容的图片`},{name:`gender`,label:`性别`,type:`enum`,required:!0,options:e.g},{name:`race`,label:`人种`,type:`enum`,options:e.C}]},ModifyPrinting:{key:`ModifyPrinting`,title:`图案修改`,description:`上传图案和参考图AI修改`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`prompt`,label:`修改需求`,type:`text`,placeholder:`描述修改需求`}]},CutOut:{key:`CutOut`,title:`智能抠图`,description:`一键抠图修边`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`recognitionType`,label:`识别类型`,type:`enum`,required:!0,options:e.w}]},LineArtToReal:{key:`LineArtToReal`,title:`线稿转实物`,description:`线稿图生成实物效果平铺图`,fields:[{name:`imgUrl`,label:`线稿图`,type:`image`,required:!0},{name:`imageType`,label:`图片类型`,type:`enum`,required:!0,options:e._},{name:`prompt`,label:`款式特征`,type:`text`,placeholder:`描述款式特征`}]},FixPartial:{key:`FixPartial`,title:`局部修复`,description:`修复或重新创造指定区域`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`修复区域蒙版`,type:`mask`,required:!0},{name:`prompt`,label:`修复需求`,type:`text`,placeholder:`描述修复需求`}]},DetailCompensation:{key:`DetailCompensation`,title:`细节补偿`,description:`精准还原服装细节`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`refImgUrl`,label:`参考图`,type:`image`}]},ChangeClothesByImg:{key:`ChangeClothesByImg`,title:`服装穿搭调整`,description:`上下装搭配调整`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`changeImgUrl`,label:`搭配服装图`,type:`image`,required:!0}]}},l={ChangeAccessoriesByImg:{key:`ChangeAccessoriesByImg`,title:`配饰穿搭调整`,description:`背包鞋子首饰等搭配调整`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`changeImgUrl`,label:`搭配物品图`,type:`image`,required:!0},{name:`accessoryType`,label:`配件类型`,type:`enum`,required:!0,options:e.l}]},VirtualFittingReference:{key:`VirtualFittingReference`,title:`AI试衣参考图模式`,description:`上传模特参考图生成试衣效果`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`refImgUrl`,label:`模特参考图`,type:`image`,required:!0}]},VirtualFittingTemplate:{key:`VirtualFittingTemplate`,title:`AI试衣模板模式`,description:`选择试衣场景模板`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`templateId`,label:`试衣模板`,type:`enum`,required:!0,options:e.A}]},FixDeformities:{key:`FixDeformities`,title:`畸形修复`,description:`修复手部脚部脸部畸形`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`maskUrl`,label:`修复区域蒙版`,type:`mask`,required:!0}]},IntelligentCropping:{key:`IntelligentCropping`,title:`AI智能裁图`,description:`自定义像素或比例裁图`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`mode`,label:`裁剪模式`,type:`enum`,required:!0,options:e.p},{name:`x`,label:`X坐标`,type:`number`},{name:`y`,label:`Y坐标`,type:`number`},{name:`width`,label:`宽度`,type:`number`},{name:`height`,label:`高度`,type:`number`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},ModelToFlat:{key:`ModelToFlat`,title:`模特转平铺`,description:`模特图生成平铺图效果`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`position`,label:`服装位置`,type:`enum`,required:!0,options:e.x}]},GenerateShortVideo:{key:`GenerateShortVideo`,title:`短视频生成`,description:`上传图片生成短视频`,fields:[{name:`imgUrl`,label:`首帧图片`,type:`image`,required:!0},{name:`tailImgUrl`,label:`尾帧图片`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述视频内容`},{name:`duration`,label:`时长`,type:`enum`,required:!0,options:e.h}]},OneClickModifyPrinting:{key:`OneClickModifyPrinting`,title:`一键改图案`,description:`通过文本或参考图一键更改图案`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述图案修改需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},OrientationRedesign:{key:`OrientationRedesign`,title:`智能改款`,description:`上传服装主图与参考图,按指令智能改款`,fields:[{name:`imgUrl`,label:`主图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`prompt`,label:`改款指令`,type:`text`,placeholder:`描述改款需求`},{name:`optimizeFlag`,label:`是否强化指令`,type:`boolean`},{name:`qualityMode`,label:`质量模式`,type:`enum`,required:!0,options:e.S},{name:`aspectRatio`,label:`生图尺寸`,type:`aspectRatio`}]},OrientationDesignReplaceElement:{key:`OrientationDesignReplaceElement`,title:`元素替换`,description:`基于遮罩与参考图替换设计点元素`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`maskImgUrl`,label:`设计点遮罩`,type:`mask`,required:!0},{name:`referenceImgUrl`,label:`设计点参考图`,type:`image`,required:!0},{name:`referenceMaskImgUrl`,label:`参考图遮罩`,type:`mask`,required:!0}]},DirectionalIntegration:{key:`DirectionalIntegration`,title:`定向融合`,description:`通过融合设计点对服装进行融合设计`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版1`,type:`mask`},{name:`refImgUrl`,label:`参考图1`,type:`image`,required:!0}]},OneClickIntegration:{key:`OneClickIntegration`,title:`一键融合`,description:`通过参考图和文本指令一键融合`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`,required:!0},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述融合需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},ChangeFabricV2:{key:`ChangeFabricV2`,title:`面料上身2.0`,description:`支持文本指令的面料上身`,fields:[{name:`imgUrl`,label:`款式图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`,required:!0},{name:`fabricImgUrl`,label:`面料图`,type:`image`,required:!0},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述调整需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},VirtualFittingReferenceV2:{key:`VirtualFittingReferenceV2`,title:`AI试衣参考图2.0`,description:`支持姿势、背景、质量与比例的试衣参考图2.0`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`refImgUrl`,label:`模特参考图`,type:`image`,required:!0},{name:`poseImgUrl`,label:`姿势图`,type:`image`},{name:`bgImgUrl`,label:`背景图`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述试衣需求`},{name:`qualityMode`,label:`生图质量`,type:`enum`,options:e.S},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},VirtualFittingV2:{key:`VirtualFittingV2`,endpoint:`/task/submit/v2/VirtualFitting`,title:`AI试衣2.0`,description:`上传服装图,按文字指令生成商用模特效果图`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`userPrompt`,label:`文字指令`,type:`text`,required:!0,placeholder:`描述试衣需求`},{name:`qualityMode`,label:`生图质量`,type:`enum`,options:e.S},{name:`aspectRatio`,label:`生成比例`,type:`aspectRatio`}]},FlowerShapedDesign:{key:`FlowerShapedDesign`,title:`花型创款`,description:`将印花上身到指定款式效果图`,fields:[{name:`imgUrl`,label:`印花图案`,type:`image`,required:!0},{name:`prompt`,label:`文本指令`,type:`text`,required:!0,placeholder:`描述上身效果需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FlowerShapedVirtualPrinting:{key:`FlowerShapedVirtualPrinting`,title:`花型上身`,description:`将图案上身到款式图指定区域`,fields:[{name:`imgUrl`,label:`印花图案`,type:`image`,required:!0},{name:`bodyImgUrl`,label:`上身图`,type:`image`,required:!0},{name:`bodyMaskImgUrl`,label:`目标区域蒙版`,type:`mask`,required:!0},{name:`removePattern`,label:`是否去除参考图印花`,type:`enum`,options:e.T}]},OneClickChangeColor:{key:`OneClickChangeColor`,title:`一键改色`,description:`整合智能识别与自定义改色`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`hexCode`,label:`目标颜色`,type:`color`},{name:`hexImgUrl`,label:`颜色参考图`,type:`image`},{name:`changeColorArea`,label:`改色区域`,type:`text`,placeholder:`如:上衣`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelWithLabels:{key:`FittingModelWithLabels`,title:`模特定制标签模式`,description:`通过标签选择生成虚拟模特`,fields:[{name:`gender`,label:`性别`,type:`enum`,required:!0,options:e.g},{name:`age`,label:`年龄`,type:`enum`,options:e.u},{name:`nationality`,label:`国籍`,type:`enum`,options:e.v},{name:`skinColor`,label:`肤色`,type:`enum`,options:e.k},{name:`bodyShape`,label:`身材`,type:`enum`,options:e.f}]},FittingModelCustom:{key:`FittingModelCustom`,title:`模特定制自定义模式`,description:`根据参考图生成虚拟模特`,fields:[{name:`gender`,label:`性别`,type:`enum`,required:!0,options:e.g},{name:`faceRefImgUrl`,label:`脸部参考图`,type:`image`,required:!0},{name:`similarity`,label:`相似度`,type:`enum`,options:e.D},{name:`bodyShapeRefImgUrl`,label:`身材参考图`,type:`image`},{name:`additionalDescription`,label:`附加描述`,type:`text`,placeholder:`附加描述`}]},FittingModelChangeFace:{key:`FittingModelChangeFace`,title:`模特换脸`,description:`对模特图换脸操作`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考面部图`,type:`image`,required:!0},{name:`similarity`,label:`相似度`,type:`enum`,options:e.D},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeModel:{key:`FittingModelChangeModel`,title:`模特替换`,description:`随机或指定模特替换`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`gender`,label:`性别`,type:`enum`,options:e.g},{name:`similarity`,label:`相似度`,type:`enum`,options:e.D},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeBodyShape:{key:`FittingModelChangeBodyShape`,title:`模特身材调整`,description:`通过标签或参考图调整身材`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`bodyShapeRefImgUrl`,label:`身材参考图`,type:`image`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeClothingSize:{key:`FittingModelChangeClothingSize`,title:`模特尺码调整`,description:`调整模特服装尺码`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`size`,label:`尺码`,type:`enum`,required:!0,options:e.O},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangePosture:{key:`FittingModelChangePosture`,title:`模特姿势调整`,description:`调整模特姿势`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`poseImgUrl`,label:`姿势参考图`,type:`image`,required:!0},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeBackground:{key:`FittingModelChangeBackground`,title:`模特换背景`,description:`替换模特背景`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`bgImgUrl`,label:`背景参考图`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述背景需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangePerspective:{key:`FittingModelChangePerspective`,title:`模特视角调整`,description:`调整模特视角`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`perspective`,label:`视角`,type:`enum`,required:!0,options:e.b},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},TrainClothingModel:{key:`TrainClothingModel`,title:`服装风格模型训练`,description:`训练自定义服装风格模型`,fields:[{name:`imgUrlList`,label:`训练图片`,type:`images`,required:!0,hint:`建议上传30-50张正面/斜侧面模特图`},{name:`clothingModelName`,label:`模型名称`,type:`text`,required:!0},{name:`enhanceWordList`,label:`加强词`,type:`text`}]}},u={...c,...l};function d(e){return u[e]}function f(){return Object.values(u)}function p(e,t){let n=[];for(let r of t){let t=e[r.name],i=m(r,t);i&&n.push(i)}return{valid:n.length===0,errors:n}}function m(t,n){let r=n==null||n===``;if(t.required&&r)return{field:t.name,label:t.label,message:e.a.FIELD_REQUIRED(t.label)};if(n==null)return null;let i=e=>({field:t.name,label:t.label,message:e(t.label)});switch(t.type){case`image`:case`mask`:if(typeof n!=`string`&&!h(n))return i(e.a.FIELD_STRING);break;case`images`:if(!Array.isArray(n)||n.length===0)return i(e.a.FIELD_ARRAY);if(n.some(e=>(typeof e!=`string`||e===``)&&!h(e)))return i(e.a.FIELD_ARRAY_ELEMENTS);break;case`text`:if(typeof n!=`string`)return i(e.a.FIELD_STRING);if(t.maxLength&&n.length>t.maxLength)return i(n=>e.a.FIELD_MAX_LENGTH(n,t.maxLength));break;case`enum`:if(typeof n!=`string`)return i(e.a.FIELD_STRING);if(t.options&&!t.options.some(e=>e.value===n))return i(e.a.FIELD_ENUM_INVALID);break;case`multiEnum`:if(!Array.isArray(n)||n.length===0)return i(e.a.FIELD_ARRAY);if(n.some(e=>typeof e!=`string`||e===``))return i(e.a.FIELD_ARRAY_ELEMENTS);if(t.options&&n.some(e=>!t.options?.some(t=>t.value===e)))return i(e.a.FIELD_ENUM_INVALID);break;case`color`:if(typeof n!=`string`||!/^#[0-9A-Fa-f]{6}$/.test(n))return i(e.a.FIELD_COLOR_FORMAT);break;case`number`:if(typeof n!=`number`||Number.isNaN(n))return i(e.a.FIELD_NUMBER);break;case`boolean`:if(typeof n!=`boolean`)return i(e.a.FIELD_BOOLEAN);break;case`aspectRatio`:case`strength`:break}return null}function h(e){return typeof File<`u`&&e instanceof File}var g=class{constructor(t={}){this.type=``,this.submitEndpoint=`/task/submit`,this.submitEndpointMode=`prefix`,this.pollEndpoint=`/task/progress`,this.pollInterval=1e3,this.maxPollAttempts=120,this.phase=e.F.IDLE,this.taskId=``,this.progress=0,this.result=null,this.error=``,this.activeTasks=new Map,this.pollTimer=null,this.isPollingBatch=!1,this.configure(t)}configure(e){e.type!==void 0&&(this.type=e.type),e.submitEndpoint!==void 0&&(this.submitEndpoint=e.submitEndpoint),e.submitEndpointMode!==void 0&&(this.submitEndpointMode=e.submitEndpointMode),e.pollEndpoint!==void 0&&(this.pollEndpoint=e.pollEndpoint),e.pollInterval!==void 0&&(this.pollInterval=e.pollInterval),e.maxPollAttempts!==void 0&&(this.maxPollAttempts=e.maxPollAttempts),e.customRequest!==void 0&&(this.customRequest=e.customRequest),e.customUploadRequest!==void 0&&(this.customUploadRequest=e.customUploadRequest),e.customUploadRequert!==void 0&&(this.customUploadRequest=e.customUploadRequert),e.onSubmit!==void 0&&(this.onSubmit=e.onSubmit),e.onPoll!==void 0&&(this.onPoll=e.onPoll),e.onSuccess!==void 0&&(this.onSuccess=e.onSuccess),e.onError!==void 0&&(this.onError=e.onError)}get typeDef(){let e=this.resolvedTaskTypeKey;return e?d(e):void 0}get taskFields(){return this.typeDef?.fields??[]}async submit(t,n){let r=this.createRequestUri(t);if(!r){this.fail(e.a.MISSING_ENDPOINT,e.F.IDLE);return}let i=this.getTaskFields(t);if(i.length>0){let t=p(n,i);if(!t.valid){this.fail(t.errors.map(e=>e.message).join(`; `),e.F.IDLE);return}}this.phase=e.F.SUBMITTING,this.error=``,this.progress=0,this.result=null;try{let e=await this.resolveUploads(n,i),t=(await this.request(r,e)).data.taskId;this.taskId=t;let a={taskId:t,endpoint:r,formData:e};this.onSubmit?.(a),await this.trackTask(t)}catch(t){this.fail(t instanceof Error?t.message:e.a.SUBMIT_FAILED,this.phase)}}reset(){this.phase=e.F.IDLE,this.taskId=``,this.progress=0,this.result=null,this.error=``,this.activeTasks.clear(),this.pollTimer&&=(clearTimeout(this.pollTimer),null)}createRequestUri(e=this.type){if(this.submitEndpointMode===`full`)return this.submitEndpoint;let t=x(e),n=t?d(t):void 0;return n?.endpoint?n.endpoint:e?`${this.submitEndpoint}/${e}`:this.submitEndpoint}get resolvedTaskTypeKey(){return x(this.type)}getTaskFields(e){let t=x(e);return t?d(t)?.fields??[]:[]}async resolveUploads(e,t){let n=t.length>0?t.filter(e=>e.type===`image`||e.type===`mask`||e.type===`images`):Object.keys(e).map(e=>({name:e,type:`image`}));if(!n.length)return e;let r={...e};for(let e of n){let t=r[e.name];Array.isArray(t)?r[e.name]=await Promise.all(t.map(t=>this.resolveUploadValue(t,e))):r[e.name]=await this.resolveUploadValue(t,e)}return r}async resolveUploadValue(e,t){if(!S(e))return e;if(!this.customUploadRequest)throw Error(`customUploadRequest is required to upload ${t.name}`);return C(await this.customUploadRequest(e))}trackTask(t){this.phase=e.F.POLLING;let n=new Promise(e=>{this.activeTasks.set(t,{taskId:t,attempts:0,resolve:e})});return this.ensurePolling(0),n}ensurePolling(e=this.pollInterval){this.pollTimer||this.isPollingBatch||!this.activeTasks.size||(this.pollTimer=setTimeout(()=>{this.pollTimer=null,this.pollActiveTasks()},this.pollInterval))}async pollActiveTasks(){if(!this.activeTasks.size)return;this.isPollingBatch=!0;let t=[...this.activeTasks.keys()];try{let n=`${this.pollEndpoint}?taskIds=${t.map(encodeURIComponent).join(`,`)}`,r=await this.request(n),i=new Map(r.data.map(e=>[e.aiTaskId,e]));t.forEach(t=>{let n=this.activeTasks.get(t);if(!n)return;n.attempts+=1;let r=i.get(t);if(!r){this.failTask(n,e.a.TASK_NOT_FOUND(t));return}this.taskId=t,this.progress=r.taskProgress;let a={taskId:t,progress:r.taskProgress,status:r.aiTaskStatus,queuePos:r.queuePos};if(this.onPoll?.(a),r.aiTaskStatus===`done`){this.result=r;let e={taskId:t,images:r.imgInfo?[{index:0,url:r.imgInfo}]:[],result:r};this.onSuccess?.(e),this.completeTask(n);return}n.attempts>=this.maxPollAttempts&&this.failTask(n,e.a.POLL_TIMEOUT(t))})}catch(t){let n=t instanceof Error?t.message:e.a.POLL_FAILED;[...this.activeTasks.values()].forEach(e=>this.failTask(e,n))}finally{this.isPollingBatch=!1,this.activeTasks.size?(this.phase=e.F.POLLING,this.ensurePolling(this.pollInterval)):this.phase===e.F.POLLING&&(this.phase=this.error?e.F.ERROR:e.F.SUCCESS)}}completeTask(e){this.activeTasks.delete(e.taskId),e.resolve()}failTask(t,n){this.activeTasks.delete(t.taskId),this.fail(n,e.F.POLLING,t.taskId),t.resolve()}async request(e,t){let n=this.customRequest?await this.customRequest(e,t):await fetch(e,t===void 0?{method:`GET`}:{method:`POST`,body:JSON.stringify(t),headers:{"Content-Type":`application/json`}});return n&&typeof n.json==`function`?n.json():_(n)}fail(t,n,r){this.phase=e.F.ERROR,this.error=t;let i={message:t,phase:n,taskId:r};this.onError?.(i)}};function _(e){return b(e)&&y(e.data)?e.data:(v(e),e)}function v(e){return b(e)&&`data`in e}function y(e){return b(e)&&`data`in e&&(`code`in e||`success`in e||`msg`in e)}function b(e){return typeof e==`object`&&!!e}function x(e){if(!e)return``;if(u[e])return e;let t=e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/[-\s]+/g,`_`).toUpperCase();return u[t]?t:``}function S(e){return typeof File<`u`&&e instanceof File}async function C(e){return e?typeof e==`string`?e:e instanceof Response?C(await e.json()):typeof e.data==`string`?e.data:e.data?e.data.value||e.data.url||``:e.value||e.url||``:``}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return o}});
|
|
@@ -38,7 +38,9 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
38
38
|
MODEL_TO_FLAT: "ModelToFlat",
|
|
39
39
|
GENERATE_SHORT_VIDEO: "GenerateShortVideo",
|
|
40
40
|
ONE_CLICK_MODIFY_PRINTING: "OneClickModifyPrinting",
|
|
41
|
-
|
|
41
|
+
ORIENTATION_REDESIGN: "OrientationRedesign",
|
|
42
|
+
ORIENTATION_DESIGN_REPLACE_ELEMENT: "OrientationDesignReplaceElement",
|
|
43
|
+
VIRTUAL_FITTING_V2: "VirtualFittingV2",
|
|
42
44
|
DIRECTIONAL_INTEGRATION: "DirectionalIntegration",
|
|
43
45
|
ONE_CLICK_INTEGRATION: "OneClickIntegration",
|
|
44
46
|
CHANGE_FABRIC_V2: "ChangeFabricV2",
|
|
@@ -66,7 +68,8 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
66
68
|
ASPECT_RATIO: "aspectRatio",
|
|
67
69
|
COLOR: "color",
|
|
68
70
|
STRENGTH: "strength",
|
|
69
|
-
NUMBER: "number"
|
|
71
|
+
NUMBER: "number",
|
|
72
|
+
BOOLEAN: "boolean"
|
|
70
73
|
}, s = {
|
|
71
74
|
IDLE: "idle",
|
|
72
75
|
SUBMITTING: "submitting",
|
|
@@ -99,7 +102,8 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
99
102
|
FIELD_MAX_LENGTH: (e, t) => `${e}不能超过${t}个字符`,
|
|
100
103
|
FIELD_ENUM_INVALID: (e) => `${e}值不在可选项中`,
|
|
101
104
|
FIELD_COLOR_FORMAT: (e) => `${e}必须为#RRGGBB格式`,
|
|
102
|
-
FIELD_NUMBER: (e) => `${e}
|
|
105
|
+
FIELD_NUMBER: (e) => `${e}必须为数字`,
|
|
106
|
+
FIELD_BOOLEAN: (e) => `${e}必须为布尔值`
|
|
103
107
|
}, d = { IMAGE: [
|
|
104
108
|
"image/jpeg",
|
|
105
109
|
"image/png",
|
|
@@ -125,6 +129,14 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
125
129
|
label: "4:3",
|
|
126
130
|
value: "4:3"
|
|
127
131
|
},
|
|
132
|
+
{
|
|
133
|
+
label: "4:5",
|
|
134
|
+
value: "4:5"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: "5:4",
|
|
138
|
+
value: "5:4"
|
|
139
|
+
},
|
|
128
140
|
{
|
|
129
141
|
label: "9:16",
|
|
130
142
|
value: "9:16"
|
|
@@ -289,6 +301,19 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
289
301
|
label: "否",
|
|
290
302
|
value: "false"
|
|
291
303
|
}], k = [
|
|
304
|
+
{
|
|
305
|
+
label: "1K",
|
|
306
|
+
value: "1k"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
label: "2K",
|
|
310
|
+
value: "2k"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
label: "4K",
|
|
314
|
+
value: "4k"
|
|
315
|
+
}
|
|
316
|
+
], A = [
|
|
292
317
|
{
|
|
293
318
|
label: "中国",
|
|
294
319
|
value: "china"
|
|
@@ -345,7 +370,7 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
345
370
|
label: "其他",
|
|
346
371
|
value: "other"
|
|
347
372
|
}
|
|
348
|
-
],
|
|
373
|
+
], j = [
|
|
349
374
|
{
|
|
350
375
|
label: "白皙",
|
|
351
376
|
value: "fair"
|
|
@@ -366,7 +391,7 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
366
391
|
label: "其他",
|
|
367
392
|
value: "other"
|
|
368
393
|
}
|
|
369
|
-
],
|
|
394
|
+
], M = [
|
|
370
395
|
{
|
|
371
396
|
label: "偏瘦",
|
|
372
397
|
value: "slim"
|
|
@@ -383,13 +408,13 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
383
408
|
label: "肥胖",
|
|
384
409
|
value: "fat"
|
|
385
410
|
}
|
|
386
|
-
],
|
|
411
|
+
], N = [{
|
|
387
412
|
label: "一致",
|
|
388
413
|
value: "same"
|
|
389
414
|
}, {
|
|
390
415
|
label: "相似",
|
|
391
416
|
value: "similar"
|
|
392
|
-
}],
|
|
417
|
+
}], P = [{
|
|
393
418
|
label: "偏小",
|
|
394
419
|
value: "smaller"
|
|
395
420
|
}, {
|
|
@@ -397,4 +422,4 @@ var e = "https://api.lightchainai.com", t = "client-secret", n = "/task/progress
|
|
|
397
422
|
value: "larger"
|
|
398
423
|
}];
|
|
399
424
|
//#endregion
|
|
400
|
-
export {
|
|
425
|
+
export { T as A, y as C, N as D, h as E, s as F, r as M, a as N, P as O, c as P, k as S, O as T, C as _, u as a, m as b, f as c, p as d, M as f, _ as g, D as h, i, n as j, j as k, w as l, x as m, e as n, l as o, E as p, t as r, o as s, d as t, v as u, A as v, S as w, b as x, g as y };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`https://api.lightchainai.com`,t=`client-secret`,n=`/task/progress`,r=`/task/submit`,i={BAD_REQUEST:400,UNAUTHORIZED:401,RATE_LIMIT:429,SERVER_ERROR:500},a={GENERATE_PRINTING:`GeneratePrinting`,VIRTUAL_FITTING:`VirtualFitting`,FIX_FACE:`FixFace`,CHANGE_FACE:`ChangeFace`,MULTI_PERSPECTIVE:`MultiPerspective`,PRINTING_TILING:`PrintingTiling`,CHANGE_DESIGN_POINT:`ChangeDesignPoint`,CHANGE_COLOR:`ChangeColor`,CHANGE_FABRIC:`ChangeFabric`,SR:`Sr`,VECTOR_CONVERT:`VectorConvert`,CHANGE_MODEL:`ChangeModel`,GENERATE_SKETCH:`GenerateSketch`,MODEL_GENERATE_SKETCH:`ModelGenerateSketch`,ELIMINATE:`Eliminate`,EXPAND_IMAGE:`ExpandImage`,CLOTHING_DESIGN:`ClothingDesign`,CHANGE_PATTERN:`ChangePattern`,GENERATE_MODEL:`GenerateModel`,MODIFY_PRINTING:`ModifyPrinting`,CUT_OUT:`CutOut`,LINE_ART_TO_REAL:`LineArtToReal`,FIX_PARTIAL:`FixPartial`,DETAIL_COMPENSATION:`DetailCompensation`,CHANGE_CLOTHES_BY_IMG:`ChangeClothesByImg`,CHANGE_ACCESSORIES_BY_IMG:`ChangeAccessoriesByImg`,VIRTUAL_FITTING_REFERENCE:`VirtualFittingReference`,VIRTUAL_FITTING_TEMPLATE:`VirtualFittingTemplate`,FIX_DEFORMITIES:`FixDeformities`,INTELLIGENT_CROPPING:`IntelligentCropping`,MODEL_TO_FLAT:`ModelToFlat`,GENERATE_SHORT_VIDEO:`GenerateShortVideo`,ONE_CLICK_MODIFY_PRINTING:`OneClickModifyPrinting`,ORIENTATION_REDESIGN:`OrientationRedesign`,ORIENTATION_DESIGN_REPLACE_ELEMENT:`OrientationDesignReplaceElement`,VIRTUAL_FITTING_V2:`VirtualFittingV2`,DIRECTIONAL_INTEGRATION:`DirectionalIntegration`,ONE_CLICK_INTEGRATION:`OneClickIntegration`,CHANGE_FABRIC_V2:`ChangeFabricV2`,VIRTUAL_FITTING_REFERENCE_V2:`VirtualFittingReferenceV2`,FLOWER_SHAPED_DESIGN:`FlowerShapedDesign`,FLOWER_SHAPED_VIRTUAL_PRINTING:`FlowerShapedVirtualPrinting`,ONE_CLICK_CHANGE_COLOR:`OneClickChangeColor`,FITTING_MODEL_WITH_LABELS:`FittingModelWithLabels`,FITTING_MODEL_CUSTOM:`FittingModelCustom`,FITTING_MODEL_CHANGE_FACE:`FittingModelChangeFace`,FITTING_MODEL_CHANGE_MODEL:`FittingModelChangeModel`,FITTING_MODEL_CHANGE_BODY_SHAPE:`FittingModelChangeBodyShape`,FITTING_MODEL_CHANGE_CLOTHING_SIZE:`FittingModelChangeClothingSize`,FITTING_MODEL_CHANGE_POSTURE:`FittingModelChangePosture`,FITTING_MODEL_CHANGE_BACKGROUND:`FittingModelChangeBackground`,FITTING_MODEL_CHANGE_PERSPECTIVE:`FittingModelChangePerspective`,TRAIN_CLOTHING_MODEL:`TrainClothingModel`},o={IMAGE:`image`,MASK:`mask`,IMAGES:`images`,TEXT:`text`,ENUM:`enum`,MULTI_ENUM:`multiEnum`,ASPECT_RATIO:`aspectRatio`,COLOR:`color`,STRENGTH:`strength`,NUMBER:`number`,BOOLEAN:`boolean`},s={IDLE:`idle`,SUBMITTING:`submitting`,POLLING:`polling`,SUCCESS:`success`,ERROR:`error`},c={POLL_INTERVAL:1e3,MAX_POLL_ATTEMPTS:120,POLL_ENDPOINT:`/task/progress`},l={CHANGE:`change`,SUBMIT:`submit`,REQUEST_SUBMIT:`lc-request-submit`,POLL:`poll`,SUCCESS:`success`,ERROR:`error`,IMAGE_CLICK:`image-click`,COMPARE:`compare`},u={MISSING_ENDPOINT:`未指定提交端点或任务类型`,POLL_TIMEOUT:e=>`轮询超时: ${e}`,POLL_FAILED:`轮询失败`,TASK_NOT_FOUND:e=>`未找到任务: ${e}`,SUBMIT_FAILED:`提交失败`,FIELD_REQUIRED:e=>`${e}为必填项`,FIELD_STRING:e=>`${e}必须为字符串`,FIELD_ARRAY:e=>`${e}必须为非空数组`,FIELD_ARRAY_ELEMENTS:e=>`${e}数组元素必须为非空字符串`,FIELD_MAX_LENGTH:(e,t)=>`${e}不能超过${t}个字符`,FIELD_ENUM_INVALID:e=>`${e}值不在可选项中`,FIELD_COLOR_FORMAT:e=>`${e}必须为#RRGGBB格式`,FIELD_NUMBER:e=>`${e}必须为数字`,FIELD_BOOLEAN:e=>`${e}必须为布尔值`},d={IMAGE:[`image/jpeg`,`image/png`,`image/webp`]},f={MAX_IMAGE_SIZE:10*1024*1024},p=[{label:`1:1`,value:`1:1`},{label:`2:3`,value:`2:3`},{label:`3:4`,value:`3:4`},{label:`3:2`,value:`3:2`},{label:`4:3`,value:`4:3`},{label:`4:5`,value:`4:5`},{label:`5:4`,value:`5:4`},{label:`9:16`,value:`9:16`},{label:`16:9`,value:`16:9`}],m=[{label:`正面`,value:`front`},{label:`背面`,value:`back`},{label:`左侧`,value:`left`},{label:`右侧`,value:`right`}],h=[{label:`2倍`,value:`2`},{label:`3倍`,value:`3`},{label:`4倍`,value:`4`}],g=[{label:`线稿`,value:`line`},{label:`印花`,value:`printing`}],_=[{label:`女`,value:`female`},{label:`男`,value:`male`}],v=[{label:`青年`,value:`young`},{label:`中年`,value:`middle`}],y=[{label:`亚洲`,value:`asian`},{label:`欧洲`,value:`european`},{label:`非洲`,value:`african`}],b=[{label:`上装`,value:`upper`},{label:`下装`,value:`lower`},{label:`连身装`,value:`dress`}],x=[{label:`袖型`,value:`sleeve`},{label:`领型`,value:`collar`},{label:`裤型`,value:`pants`},{label:`裙型`,value:`skirt`}],S=[{label:`全身`,value:`full`},{label:`半身`,value:`half`},{label:`服装`,value:`clothing`}],C=[{label:`黑白线稿`,value:`bw`},{label:`彩色线稿`,value:`color`}],w=[{label:`背包`,value:`bag`},{label:`鞋子`,value:`shoes`},{label:`首饰`,value:`jewelry`},{label:`腰带`,value:`belt`},{label:`帽子`,value:`hat`}],T=[{label:`棚内瑜伽`,value:`yoga`},{label:`极简棚拍`,value:`minimal`}],E=[{label:`自定义像素`,value:`1`},{label:`比例裁剪`,value:`2`}],D=[{label:`3秒`,value:`3`},{label:`5秒`,value:`5`}],O=[{label:`是`,value:`true`},{label:`否`,value:`false`}],k=[{label:`1K`,value:`1k`},{label:`2K`,value:`2k`},{label:`4K`,value:`4k`}],A=[{label:`中国`,value:`china`},{label:`美国`,value:`usa`},{label:`英国`,value:`uk`},{label:`法国`,value:`france`},{label:`德国`,value:`germany`},{label:`意大利`,value:`italy`},{label:`西班牙`,value:`spain`},{label:`俄罗斯`,value:`russia`},{label:`日本`,value:`japan`},{label:`韩国`,value:`korea`},{label:`泰国`,value:`thailand`},{label:`印度`,value:`india`},{label:`越南`,value:`vietnam`},{label:`其他`,value:`other`}],j=[{label:`白皙`,value:`fair`},{label:`中等`,value:`medium`},{label:`小麦色`,value:`wheatish`},{label:`深色`,value:`dark`},{label:`其他`,value:`other`}],M=[{label:`偏瘦`,value:`slim`},{label:`标准`,value:`standard`},{label:`微胖`,value:`chubby`},{label:`肥胖`,value:`fat`}],N=[{label:`一致`,value:`same`},{label:`相似`,value:`similar`}],P=[{label:`偏小`,value:`smaller`},{label:`偏大`,value:`larger`}];Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return g}});
|
package/dist/contants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./client-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./client-LNELhD1v.cjs`),t=require(`./constants-DFJCA4_2.cjs`);require(`./core-B6yT9mOC.cjs`),exports.ACCEPTED_FILE_TYPES=t.t,exports.API_BASE_URL=t.n,exports.ASPECT_RATIOS=e.d,exports.AUTH_HEADER_KEY=t.r,exports.CallbackStatus=e.f,exports.ERROR_CODES=t.i,exports.ERROR_MESSAGES=t.a,exports.EVENT_NAMES=t.o,exports.FIELD_TYPES=t.s,exports.FILE_SIZE_LIMITS=t.c,exports.IMAGE_LIMITS=e.p,exports.TASK_PROGRESS_PATH=t.j,exports.TASK_SUBMIT_PREFIX=t.M,exports.TASK_TYPES=e.r,exports.TASK_TYPES_PART_A=e.s,exports.TASK_TYPES_PART_B=e.o,exports.TASK_WORKFLOW_TYPES=t.N,exports.TaskStatus=e.m,exports.WORKFLOW_DEFAULTS=t.P,exports.WORKFLOW_PHASES=t.F,exports.getAllTaskTypes=e.i,exports.getTaskTypeDef=e.a;
|
package/dist/contants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, d as t, f as n, i as r, m as i, o as a, p as o, r as s, s as c } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import "./core-
|
|
4
|
-
export { x as ACCEPTED_FILE_TYPES, _ as API_BASE_URL, t as ASPECT_RATIOS, y as AUTH_HEADER_KEY, n as CallbackStatus, h as ERROR_CODES, p as ERROR_MESSAGES, v as EVENT_NAMES, b as FIELD_TYPES, m as FILE_SIZE_LIMITS, o as IMAGE_LIMITS,
|
|
1
|
+
import { a as e, d as t, f as n, i as r, m as i, o as a, p as o, r as s, s as c } from "./client-BnxuHpr9.js";
|
|
2
|
+
import { F as l, M as u, N as d, P as f, a as p, c as m, i as h, j as g, n as _, o as v, r as y, s as b, t as x } from "./constants-C7ZLmqrC.js";
|
|
3
|
+
import "./core-BlgVibCC.js";
|
|
4
|
+
export { x as ACCEPTED_FILE_TYPES, _ as API_BASE_URL, t as ASPECT_RATIOS, y as AUTH_HEADER_KEY, n as CallbackStatus, h as ERROR_CODES, p as ERROR_MESSAGES, v as EVENT_NAMES, b as FIELD_TYPES, m as FILE_SIZE_LIMITS, o as IMAGE_LIMITS, g as TASK_PROGRESS_PATH, u as TASK_SUBMIT_PREFIX, s as TASK_TYPES, c as TASK_TYPES_PART_A, a as TASK_TYPES_PART_B, d as TASK_WORKFLOW_TYPES, i as TaskStatus, f as WORKFLOW_DEFAULTS, l as WORKFLOW_PHASES, r as getAllTaskTypes, e as getTaskTypeDef };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./client-LNELhD1v.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./client-BnxuHpr9.js";
|
package/dist/lightchain-ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./button-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./button-D6klXjl6.cjs`),t=require(`./client-LNELhD1v.cjs`),n=require(`./constants-DFJCA4_2.cjs`);require(`./core-B6yT9mOC.cjs`),e.f();function r(){}exports.ACCEPTED_FILE_TYPES=n.t,exports.API_BASE_URL=n.n,exports.ASPECT_RATIOS=t.d,exports.AUTH_HEADER_KEY=n.r,exports.CallbackStatus=t.f,exports.ERROR_CODES=n.i,exports.ERROR_MESSAGES=n.a,exports.EVENT_NAMES=n.o,exports.FIELD_TYPES=n.s,exports.FILE_SIZE_LIMITS=n.c,exports.IMAGE_LIMITS=t.p,Object.defineProperty(exports,`LcButton`,{enumerable:!0,get:function(){return e.t}}),Object.defineProperty(exports,`LcColorPicker`,{enumerable:!0,get:function(){return e.s}}),Object.defineProperty(exports,`LcEnumSelector`,{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(exports,`LcImageCompareSlider`,{enumerable:!0,get:function(){return e.r}}),Object.defineProperty(exports,`LcImageUploader`,{enumerable:!0,get:function(){return e.d}}),Object.defineProperty(exports,`LcMaskEditor`,{enumerable:!0,get:function(){return e.u}}),Object.defineProperty(exports,`LcPromptInput`,{enumerable:!0,get:function(){return e.c}}),Object.defineProperty(exports,`LcResultGallery`,{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(exports,`LcStrengthSlider`,{enumerable:!0,get:function(){return e.o}}),Object.defineProperty(exports,`LcTaskProgressCard`,{enumerable:!0,get:function(){return e.a}}),Object.defineProperty(exports,`LcTaskWorkflow`,{enumerable:!0,get:function(){return e.n}}),exports.LightChainClient=t.t,exports.OPTIONS_ACCESSORY_TYPE=n.l,exports.OPTIONS_AGE=n.u,exports.OPTIONS_ASPECT_RATIO=n.d,exports.OPTIONS_BODY_SHAPE=n.f,exports.OPTIONS_CROP_MODE=n.p,exports.OPTIONS_DETAIL_LIST=n.m,exports.OPTIONS_DURATION=n.h,exports.OPTIONS_GENDER=n.g,exports.OPTIONS_IMAGE_TYPE=n._,exports.OPTIONS_NATIONALITY=n.v,exports.OPTIONS_PATTERN_TYPE=n.y,exports.OPTIONS_PERSPECTIVE=n.b,exports.OPTIONS_POSITION=n.x,exports.OPTIONS_QUALITY_MODE=n.S,exports.OPTIONS_RACE=n.C,exports.OPTIONS_RECOGNITION_TYPE=n.w,exports.OPTIONS_REMOVE_PATTERN=n.T,exports.OPTIONS_SCALE=n.E,exports.OPTIONS_SIMILARITY=n.D,exports.OPTIONS_SIZE=n.O,exports.OPTIONS_SKIN_COLOR=n.k,exports.OPTIONS_TEMPLATE_ID=n.A,exports.TASK_PROGRESS_PATH=n.j,exports.TASK_SUBMIT_PREFIX=n.M,exports.TASK_TYPES=t.r,exports.TASK_TYPES_PART_A=t.s,exports.TASK_TYPES_PART_B=t.o,exports.TASK_WORKFLOW_TYPES=n.N,exports.TaskStatus=t.m,exports.WORKFLOW_DEFAULTS=n.P,exports.WORKFLOW_PHASES=n.F,exports.getAllTaskTypes=t.i,exports.getTaskTypeDef=t.a,exports.registerAllComponents=r,exports.validateFormData=t.n,exports.validateImage=t.c,exports.validateImageFile=t.l,exports.validateMask=t.u;
|
package/dist/lightchain-ui.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./button-
|
|
2
|
-
import { a as f, c as p, d as m, f as h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T } from "./client-
|
|
3
|
-
import { A as E, C as D, D as O, E as k,
|
|
4
|
-
import "./core-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./button-CqwbqOYj.js";
|
|
2
|
+
import { a as f, c as p, d as m, f as h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T } from "./client-BnxuHpr9.js";
|
|
3
|
+
import { A as E, C as D, D as O, E as k, F as A, M as j, N as M, O as N, P, S as F, T as I, _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, j as K, k as q, l as J, m as Y, n as X, o as Z, p as Q, r as $, s as ee, t as te, u as ne, v as re, w as ie, x as ae, y as oe } from "./constants-C7ZLmqrC.js";
|
|
4
|
+
import "./core-BlgVibCC.js";
|
|
5
5
|
//#region src/index.ts
|
|
6
6
|
r();
|
|
7
|
-
function
|
|
7
|
+
function se() {}
|
|
8
8
|
//#endregion
|
|
9
|
-
export {
|
|
9
|
+
export { te as ACCEPTED_FILE_TYPES, X as API_BASE_URL, m as ASPECT_RATIOS, $ as AUTH_HEADER_KEY, h as CallbackStatus, G as ERROR_CODES, R as ERROR_MESSAGES, Z as EVENT_NAMES, ee as FIELD_TYPES, B as FILE_SIZE_LIMITS, x as IMAGE_LIMITS, u as LcButton, l as LcColorPicker, a as LcEnumSelector, c as LcImageCompareSlider, n as LcImageUploader, d as LcMaskEditor, t as LcPromptInput, i as LcResultGallery, s as LcStrengthSlider, e as LcTaskProgressCard, o as LcTaskWorkflow, w as LightChainClient, J as OPTIONS_ACCESSORY_TYPE, ne as OPTIONS_AGE, V as OPTIONS_ASPECT_RATIO, H as OPTIONS_BODY_SHAPE, Q as OPTIONS_CROP_MODE, Y as OPTIONS_DETAIL_LIST, W as OPTIONS_DURATION, U as OPTIONS_GENDER, L as OPTIONS_IMAGE_TYPE, re as OPTIONS_NATIONALITY, oe as OPTIONS_PATTERN_TYPE, z as OPTIONS_PERSPECTIVE, ae as OPTIONS_POSITION, F as OPTIONS_QUALITY_MODE, D as OPTIONS_RACE, ie as OPTIONS_RECOGNITION_TYPE, I as OPTIONS_REMOVE_PATTERN, k as OPTIONS_SCALE, O as OPTIONS_SIMILARITY, N as OPTIONS_SIZE, q as OPTIONS_SKIN_COLOR, E as OPTIONS_TEMPLATE_ID, K as TASK_PROGRESS_PATH, j as TASK_SUBMIT_PREFIX, S as TASK_TYPES, C as TASK_TYPES_PART_A, b as TASK_TYPES_PART_B, M as TASK_WORKFLOW_TYPES, v as TaskStatus, P as WORKFLOW_DEFAULTS, A as WORKFLOW_PHASES, g as getAllTaskTypes, f as getTaskTypeDef, se as registerAllComponents, y as validateFormData, p as validateImage, _ as validateImageFile, T as validateMask };
|
package/dist/options.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./constants-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./constants-DFJCA4_2.cjs`);exports.OPTIONS_ACCESSORY_TYPE=e.l,exports.OPTIONS_AGE=e.u,exports.OPTIONS_ASPECT_RATIO=e.d,exports.OPTIONS_BODY_SHAPE=e.f,exports.OPTIONS_CROP_MODE=e.p,exports.OPTIONS_DETAIL_LIST=e.m,exports.OPTIONS_DURATION=e.h,exports.OPTIONS_GENDER=e.g,exports.OPTIONS_IMAGE_TYPE=e._,exports.OPTIONS_NATIONALITY=e.v,exports.OPTIONS_PATTERN_TYPE=e.y,exports.OPTIONS_PERSPECTIVE=e.b,exports.OPTIONS_POSITION=e.x,exports.OPTIONS_QUALITY_MODE=e.S,exports.OPTIONS_RACE=e.C,exports.OPTIONS_RECOGNITION_TYPE=e.w,exports.OPTIONS_REMOVE_PATTERN=e.T,exports.OPTIONS_SCALE=e.E,exports.OPTIONS_SIMILARITY=e.D,exports.OPTIONS_SIZE=e.O,exports.OPTIONS_SKIN_COLOR=e.k,exports.OPTIONS_TEMPLATE_ID=e.A;
|
package/dist/options.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, b as c, d as l, f as u, g as d, h as f, k as p, l as m, m as h, p as g, u as _, v, w as y, x as b, y as x } from "./constants-C7ZLmqrC.js";
|
|
2
|
+
export { m as OPTIONS_ACCESSORY_TYPE, _ as OPTIONS_AGE, l as OPTIONS_ASPECT_RATIO, u as OPTIONS_BODY_SHAPE, g as OPTIONS_CROP_MODE, h as OPTIONS_DETAIL_LIST, f as OPTIONS_DURATION, d as OPTIONS_GENDER, s as OPTIONS_IMAGE_TYPE, v as OPTIONS_NATIONALITY, x as OPTIONS_PATTERN_TYPE, c as OPTIONS_PERSPECTIVE, b as OPTIONS_POSITION, a as OPTIONS_QUALITY_MODE, t as OPTIONS_RACE, y as OPTIONS_RECOGNITION_TYPE, o as OPTIONS_REMOVE_PATTERN, r as OPTIONS_SCALE, n as OPTIONS_SIMILARITY, i as OPTIONS_SIZE, p as OPTIONS_SKIN_COLOR, e as OPTIONS_TEMPLATE_ID };
|
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./button-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./button-D6klXjl6.cjs`),l=require(`./constants-DFJCA4_2.cjs`);let u=require(`@lit/react`),d=require(`react`);d=s(d,1);var f=l.o;c.f();var p=(0,u.createComponent)({react:d.default,tagName:`lc-image-uploader`,elementClass:c.d,events:{onChange:f.CHANGE}}),m=(0,u.createComponent)({react:d.default,tagName:`lc-mask-editor`,elementClass:c.u,events:{onChange:f.CHANGE}}),h=(0,u.createComponent)({react:d.default,tagName:`lc-enum-selector`,elementClass:c.l,events:{onChange:f.CHANGE}}),g=(0,u.createComponent)({react:d.default,tagName:`lc-prompt-input`,elementClass:c.c,events:{onChange:f.CHANGE}}),_=(0,u.createComponent)({react:d.default,tagName:`lc-color-picker`,elementClass:c.s,events:{onChange:f.CHANGE}}),v=(0,u.createComponent)({react:d.default,tagName:`lc-strength-slider`,elementClass:c.o,events:{onChange:f.CHANGE}}),y=(0,u.createComponent)({react:d.default,tagName:`lc-task-progress-card`,elementClass:c.a,events:{}}),b=(0,u.createComponent)({react:d.default,tagName:`lc-result-gallery`,elementClass:c.i,events:{onImageClick:f.IMAGE_CLICK,onCompare:f.COMPARE}}),x=(0,u.createComponent)({react:d.default,tagName:`lc-image-compare-slider`,elementClass:c.r,events:{}});function S(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function C(e,t,n){d.default.useLayoutEffect(()=>{let r=e.current;if(!(!r||!n))return r.addEventListener(t,n),()=>r.removeEventListener(t,n)},[t,n,e])}function w(e,t){e.type=t.type??``,t.submitEndpoint!==void 0&&(e.submitEndpoint=t.submitEndpoint),t.pollEndpoint!==void 0&&(e.pollEndpoint=t.pollEndpoint),t.pollInterval!==void 0&&(e.pollInterval=t.pollInterval),t.maxPollAttempts!==void 0&&(e.maxPollAttempts=t.maxPollAttempts),e.client=t.client,e.customRequest=t.customRequest,e.customUploadRequest=t.customUploadRequest}var T=d.default.forwardRef((e,t)=>{let{children:n,className:r,type:i,submitEndpoint:a,pollEndpoint:o,pollInterval:s,maxPollAttempts:c,client:l,customRequest:u,customUploadRequest:p,onSubmit:m,onPoll:h,onPolling:g,onSuccess:_,onError:v,...y}=e,b=d.default.useRef(null),x={type:i,submitEndpoint:a,pollEndpoint:o,pollInterval:s,maxPollAttempts:c,client:l,customRequest:u,customUploadRequest:p},T=d.default.useCallback(e=>{b.current=e,e&&w(e,x),S(t,e)},[t,i,a,o,s,c,l,u,p]);return d.default.useLayoutEffect(()=>{b.current&&w(b.current,x)},[i,a,o,s,c,l,u,p]),C(b,f.SUBMIT,m),C(b,f.POLL,h),C(b,f.POLL,g),C(b,f.SUCCESS,_),C(b,f.ERROR,v),d.default.createElement(`lc-task-workflow`,{...y,class:r,ref:T,suppressHydrationWarning:!0},n)});T.displayName=`LcTaskWorkflowReact`;function E(e,t){e.type=t.type??`button`,e.variant=t.variant??`primary`,e.disabled=!!t.disabled}var D=d.default.forwardRef((e,t)=>{let{children:n,className:r,type:i,variant:a,disabled:o,onClick:s,...c}=e,l=d.default.useRef(null),u={type:i,variant:a,disabled:o},p=i??`button`,m=d.default.useCallback(e=>{l.current=e,e&&E(e,u),S(t,e)},[t,i,a,o]);return d.default.useLayoutEffect(()=>{l.current&&E(l.current,u)},[i,a,o]),C(l,f.REQUEST_SUBMIT,p===`submit`?s:void 0),d.default.createElement(`lc-button`,{...c,...p===`submit`?{}:{onClick:s},class:r,ref:m,suppressHydrationWarning:!0},n)});D.displayName=`LcButtonReact`,exports.LcButtonReact=D,exports.LcColorPickerReact=_,exports.LcEnumSelectorReact=h,exports.LcImageCompareSliderReact=x,exports.LcImageUploaderReact=p,exports.LcMaskEditorReact=m,exports.LcPromptInputReact=g,exports.LcResultGalleryReact=b,exports.LcStrengthSliderReact=v,exports.LcTaskProgressCardReact=y,exports.LcTaskWorkflowReact=T,exports.t=s;
|
package/dist/react.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, o, r as s, s as c, u as l } from "./button-
|
|
2
|
-
import { o as u } from "./constants-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, o, r as s, s as c, u as l } from "./button-CqwbqOYj.js";
|
|
2
|
+
import { o as u } from "./constants-C7ZLmqrC.js";
|
|
3
3
|
import { createComponent as d } from "@lit/react";
|
|
4
4
|
import f from "react";
|
|
5
5
|
//#region src/react/index.ts
|
|
@@ -46,7 +46,9 @@ export declare const TASK_WORKFLOW_TYPES: {
|
|
|
46
46
|
readonly MODEL_TO_FLAT: "ModelToFlat";
|
|
47
47
|
readonly GENERATE_SHORT_VIDEO: "GenerateShortVideo";
|
|
48
48
|
readonly ONE_CLICK_MODIFY_PRINTING: "OneClickModifyPrinting";
|
|
49
|
-
readonly
|
|
49
|
+
readonly ORIENTATION_REDESIGN: "OrientationRedesign";
|
|
50
|
+
readonly ORIENTATION_DESIGN_REPLACE_ELEMENT: "OrientationDesignReplaceElement";
|
|
51
|
+
readonly VIRTUAL_FITTING_V2: "VirtualFittingV2";
|
|
50
52
|
readonly DIRECTIONAL_INTEGRATION: "DirectionalIntegration";
|
|
51
53
|
readonly ONE_CLICK_INTEGRATION: "OneClickIntegration";
|
|
52
54
|
readonly CHANGE_FABRIC_V2: "ChangeFabricV2";
|
|
@@ -77,6 +79,7 @@ export declare const FIELD_TYPES: {
|
|
|
77
79
|
readonly COLOR: "color";
|
|
78
80
|
readonly STRENGTH: "strength";
|
|
79
81
|
readonly NUMBER: "number";
|
|
82
|
+
readonly BOOLEAN: "boolean";
|
|
80
83
|
};
|
|
81
84
|
export type FieldType = (typeof FIELD_TYPES)[keyof typeof FIELD_TYPES];
|
|
82
85
|
export declare const WORKFLOW_PHASES: {
|
|
@@ -123,6 +126,7 @@ export declare const ERROR_MESSAGES: {
|
|
|
123
126
|
readonly FIELD_ENUM_INVALID: (label: string) => string;
|
|
124
127
|
readonly FIELD_COLOR_FORMAT: (label: string) => string;
|
|
125
128
|
readonly FIELD_NUMBER: (label: string) => string;
|
|
129
|
+
readonly FIELD_BOOLEAN: (label: string) => string;
|
|
126
130
|
};
|
|
127
131
|
export declare const ACCEPTED_FILE_TYPES: {
|
|
128
132
|
readonly IMAGE: readonly ["image/jpeg", "image/png", "image/webp"];
|
|
@@ -148,6 +152,12 @@ export declare const OPTIONS_ASPECT_RATIO: readonly [{
|
|
|
148
152
|
}, {
|
|
149
153
|
readonly label: "4:3";
|
|
150
154
|
readonly value: "4:3";
|
|
155
|
+
}, {
|
|
156
|
+
readonly label: "4:5";
|
|
157
|
+
readonly value: "4:5";
|
|
158
|
+
}, {
|
|
159
|
+
readonly label: "5:4";
|
|
160
|
+
readonly value: "5:4";
|
|
151
161
|
}, {
|
|
152
162
|
readonly label: "9:16";
|
|
153
163
|
readonly value: "9:16";
|
|
@@ -323,6 +333,18 @@ export declare const OPTIONS_REMOVE_PATTERN: readonly [{
|
|
|
323
333
|
readonly value: "false";
|
|
324
334
|
}];
|
|
325
335
|
export type RemovePatternValue = OptionValue<typeof OPTIONS_REMOVE_PATTERN>;
|
|
336
|
+
/** 生图质量模式 */
|
|
337
|
+
export declare const OPTIONS_QUALITY_MODE: readonly [{
|
|
338
|
+
readonly label: "1K";
|
|
339
|
+
readonly value: "1k";
|
|
340
|
+
}, {
|
|
341
|
+
readonly label: "2K";
|
|
342
|
+
readonly value: "2k";
|
|
343
|
+
}, {
|
|
344
|
+
readonly label: "4K";
|
|
345
|
+
readonly value: "4k";
|
|
346
|
+
}];
|
|
347
|
+
export type QualityModeValue = OptionValue<typeof OPTIONS_QUALITY_MODE>;
|
|
326
348
|
/** 国籍 */
|
|
327
349
|
export declare const OPTIONS_NATIONALITY: readonly [{
|
|
328
350
|
readonly label: "中国";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export interface TaskFieldDef {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
-
type: 'image' | 'mask' | 'images' | 'text' | 'enum' | 'multiEnum' | 'aspectRatio' | 'color' | 'strength' | 'number';
|
|
5
|
+
type: 'image' | 'mask' | 'images' | 'text' | 'enum' | 'multiEnum' | 'aspectRatio' | 'color' | 'strength' | 'number' | 'boolean';
|
|
6
6
|
required?: boolean;
|
|
7
7
|
hint?: string;
|
|
8
8
|
placeholder?: string;
|
|
@@ -23,7 +23,7 @@ export interface TaskTypeDef {
|
|
|
23
23
|
}
|
|
24
24
|
export { TASK_TYPES_PART_A } from './types-part-a.js';
|
|
25
25
|
export { TASK_TYPES_PART_B } from './types-part-b.js';
|
|
26
|
-
/** 所有任务类型(
|
|
26
|
+
/** 所有任务类型(53 个提交类接口) */
|
|
27
27
|
export declare const TASK_TYPES: Record<string, TaskTypeDef>;
|
|
28
28
|
/** 根据 key 获取任务类型定义 */
|
|
29
29
|
export declare function getTaskTypeDef(key: string): TaskTypeDef | undefined;
|
package/dist/types/options.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { OPTIONS_ACCESSORY_TYPE, OPTIONS_AGE, OPTIONS_ASPECT_RATIO, OPTIONS_BODY_SHAPE, OPTIONS_CROP_MODE, OPTIONS_DETAIL_LIST, OPTIONS_DURATION, OPTIONS_GENDER, OPTIONS_IMAGE_TYPE, OPTIONS_NATIONALITY, OPTIONS_PATTERN_TYPE, OPTIONS_PERSPECTIVE, OPTIONS_POSITION, OPTIONS_RACE, OPTIONS_RECOGNITION_TYPE, OPTIONS_REMOVE_PATTERN, OPTIONS_SCALE, OPTIONS_SIMILARITY, OPTIONS_SIZE, OPTIONS_SKIN_COLOR, OPTIONS_TEMPLATE_ID, } from './core/constants.js';
|
|
2
|
-
export type { AccessoryTypeValue, AgeValue, BodyShapeValue, CropModeValue, DetailListValue, DurationValue, GenderValue, ImageTypeValue, NationalityValue, OptionValue, PatternTypeValue, PerspectiveValue, PositionValue, RaceValue, RecognitionTypeValue, RemovePatternValue, ScaleValue, SimilarityValue, SizeValue, SkinColorValue, TemplateIdValue, } from './core/constants.js';
|
|
1
|
+
export { OPTIONS_ACCESSORY_TYPE, OPTIONS_AGE, OPTIONS_ASPECT_RATIO, OPTIONS_BODY_SHAPE, OPTIONS_CROP_MODE, OPTIONS_DETAIL_LIST, OPTIONS_DURATION, OPTIONS_GENDER, OPTIONS_IMAGE_TYPE, OPTIONS_NATIONALITY, OPTIONS_PATTERN_TYPE, OPTIONS_PERSPECTIVE, OPTIONS_POSITION, OPTIONS_QUALITY_MODE, OPTIONS_RACE, OPTIONS_RECOGNITION_TYPE, OPTIONS_REMOVE_PATTERN, OPTIONS_SCALE, OPTIONS_SIMILARITY, OPTIONS_SIZE, OPTIONS_SKIN_COLOR, OPTIONS_TEMPLATE_ID, } from './core/constants.js';
|
|
2
|
+
export type { AccessoryTypeValue, AgeValue, BodyShapeValue, CropModeValue, DetailListValue, DurationValue, GenderValue, ImageTypeValue, NationalityValue, OptionValue, PatternTypeValue, PerspectiveValue, PositionValue, QualityModeValue, RaceValue, RecognitionTypeValue, RemovePatternValue, ScaleValue, SimilarityValue, SizeValue, SkinColorValue, TemplateIdValue, } from './core/constants.js';
|
package/package.json
CHANGED
package/dist/client-BnY0dpeN.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./constants-Bdlwi9VJ.cjs`);var t={RUNNING:`running`,DONE:`done`},n={DONE:`done`,EXCEPTION:`exception`},r={MAX_SIZE_MB:10,MAX_WIDTH:2048,MAX_HEIGHT:2048,ASPECT_RATIO_MIN:1/3,ASPECT_RATIO_MAX:3},i=[`1:1`,`2:3`,`3:4`,`3:2`,`4:3`,`9:16`,`16:9`];function a(e){let t=[];e.size>r.MAX_SIZE_MB*1024*1024&&t.push(`图片大小不能超过10MB`),(e.width>r.MAX_WIDTH||e.height>r.MAX_HEIGHT)&&t.push(`图片分辨率不能超过2048x2048`);let n=e.width/e.height;return(n<r.ASPECT_RATIO_MIN||n>r.ASPECT_RATIO_MAX)&&t.push(`宽高比必须在1:3到3:1之间`),{valid:t.length===0,errors:t}}function o(e,t){let n=[];return(e.width!==t.width||e.height!==t.height)&&n.push(`蒙版尺寸必须与原图尺寸相同`),{valid:n.length===0,errors:n}}async function s(e){let t=e.size<=r.MAX_SIZE_MB*1024*1024;return new Promise(n=>{let i=new Image,a=URL.createObjectURL(e);i.onload=()=>{URL.revokeObjectURL(a);let e=[];(i.width>r.MAX_WIDTH||i.height>r.MAX_HEIGHT)&&e.push(`图片分辨率不能超过2048x2048`);let o=i.width/i.height;(o<r.ASPECT_RATIO_MIN||o>r.ASPECT_RATIO_MAX)&&e.push(`宽高比必须在1:3到3:1之间`),t||e.push(`图片大小不能超过10MB`),n({valid:e.length===0,errors:e})},i.onerror=()=>{URL.revokeObjectURL(a),n({valid:!1,errors:[`无法加载图片`]})},i.src=a})}var c={GeneratePrinting:{key:`GeneratePrinting`,title:`图案设计`,description:`上传1-2张灵感素材图进行融合发散设计`,fields:[{name:`imgUrlList`,label:`灵感素材图`,type:`images`,required:!0,hint:`上传1-2张灵感素材图`},{name:`prompt`,label:`图案风格`,type:`text`,required:!0,placeholder:`描述想要的图案风格`},{name:`aspectRatio`,label:`比例`,type:`aspectRatio`}]},VirtualFitting:{key:`VirtualFitting`,title:`AI试衣`,description:`上传服装图片生成模特上身效果图`,fields:[{name:`imgUrl`,label:`上装图片`,type:`image`,required:!0,hint:`挂拍图/人台图/平铺图`},{name:`lowerImgUrl`,label:`下装图片`,type:`image`},{name:`prompt`,label:`试衣需求`,type:`text`,placeholder:`描述试衣需求`},{name:`aspectRatio`,label:`比例`,type:`aspectRatio`}]},FixFace:{key:`FixFace`,title:`面部优化`,description:`智能修复模特脸部畸形`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0}]},ChangeFace:{key:`ChangeFace`,title:`面部替换`,description:`上传指定面部图片替换模特面容`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考面部图`,type:`image`,required:!0}]},MultiPerspective:{key:`MultiPerspective`,title:`多视角`,description:`生成不同角度的展示效果图`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`perspective`,label:`视角`,type:`enum`,required:!0,options:e.b}]},PrintingTiling:{key:`PrintingTiling`,title:`图案印染上身`,description:`将指定图案虚拟印染到款式图上`,fields:[{name:`imgUrl`,label:`款式图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`printingImgUrl`,label:`印花图案`,type:`image`,required:!0},{name:`prompt`,label:`印染需求`,type:`text`,placeholder:`描述印染需求`}]},ChangeDesignPoint:{key:`ChangeDesignPoint`,title:`设计点修改`,description:`通过参考图实现设计点修改或融合`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`prompt`,label:`修改需求`,type:`text`,placeholder:`描述修改需求`}]},ChangeColor:{key:`ChangeColor`,title:`服装改色`,description:`自定义区域一键换色`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`改色区域蒙版`,type:`mask`,required:!0},{name:`hexCode`,label:`目标颜色`,type:`color`,required:!0}]},ChangeFabric:{key:`ChangeFabric`,title:`面料上身`,description:`将指定面料一键上身到款式图`,fields:[{name:`imgUrl`,label:`款式图/模特图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`,required:!0},{name:`fabricImgUrl`,label:`面料图`,type:`image`,required:!0}]},Sr:{key:`Sr`,title:`高清放大`,description:`无损高清放大与细节强化`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`scale`,label:`放大倍数`,type:`enum`,required:!0,options:e.T}]},VectorConvert:{key:`VectorConvert`,title:`矢量图转换`,description:`生成可编辑的矢量格式文件`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`patternType`,label:`图案类型`,type:`enum`,required:!0,options:e.y}]},ChangeModel:{key:`ChangeModel`,title:`模特更换`,description:`一键更换模特并支持自定义选择`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`gender`,label:`性别`,type:`enum`,options:e.g},{name:`age`,label:`年龄`,type:`enum`,options:e.u},{name:`race`,label:`人种`,type:`enum`,options:e.S}]},GenerateSketch:{key:`GenerateSketch`,title:`平铺图转线稿`,description:`上传平铺图生成线稿`,fields:[{name:`imgUrl`,label:`平铺图`,type:`image`,required:!0}]},ModelGenerateSketch:{key:`ModelGenerateSketch`,title:`模特图转线稿`,description:`上传模特图生成线稿`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`position`,label:`服装位置`,type:`enum`,options:e.x}]},Eliminate:{key:`Eliminate`,title:`AI消除`,description:`一键消除指定元素`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`消除区域蒙版`,type:`mask`,required:!0}]},ExpandImage:{key:`ExpandImage`,title:`AI扩图`,description:`一键扩充人物或背景`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`扩图区域蒙版`,type:`mask`,required:!0}]},ClothingDesign:{key:`ClothingDesign`,title:`AI创款`,description:`根据灵感图快速创款`,fields:[{name:`imgUrlList`,label:`灵感款式图`,type:`images`,hint:`上传1-3张灵感图`},{name:`fabricImgUrl`,label:`面料图`,type:`image`,hint:`上传面料图进行面料创款`},{name:`words`,label:`创款需求`,type:`text`,placeholder:`描述创款需求`},{name:`aspectRatio`,label:`比例`,type:`aspectRatio`}]},ChangePattern:{key:`ChangePattern`,title:`服装改版`,description:`通过选择部位和版型修改服装版型`,fields:[{name:`imgUrl`,label:`服装图`,type:`image`,required:!0},{name:`detailList`,label:`改版部位`,type:`multiEnum`,required:!0,options:e.m}]},GenerateModel:{key:`GenerateModel`,title:`定制模特`,description:`生成符合需求的虚拟模特`,fields:[{name:`imgUrlList`,label:`参考图片`,type:`images`,required:!0,hint:`上传1-10张带面容的图片`},{name:`gender`,label:`性别`,type:`enum`,required:!0,options:e.g},{name:`race`,label:`人种`,type:`enum`,options:e.S}]},ModifyPrinting:{key:`ModifyPrinting`,title:`图案修改`,description:`上传图案和参考图AI修改`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`prompt`,label:`修改需求`,type:`text`,placeholder:`描述修改需求`}]},CutOut:{key:`CutOut`,title:`智能抠图`,description:`一键抠图修边`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`recognitionType`,label:`识别类型`,type:`enum`,required:!0,options:e.C}]},LineArtToReal:{key:`LineArtToReal`,title:`线稿转实物`,description:`线稿图生成实物效果平铺图`,fields:[{name:`imgUrl`,label:`线稿图`,type:`image`,required:!0},{name:`imageType`,label:`图片类型`,type:`enum`,required:!0,options:e._},{name:`prompt`,label:`款式特征`,type:`text`,placeholder:`描述款式特征`}]},FixPartial:{key:`FixPartial`,title:`局部修复`,description:`修复或重新创造指定区域`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`修复区域蒙版`,type:`mask`,required:!0},{name:`prompt`,label:`修复需求`,type:`text`,placeholder:`描述修复需求`}]},DetailCompensation:{key:`DetailCompensation`,title:`细节补偿`,description:`精准还原服装细节`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`},{name:`refImgUrl`,label:`参考图`,type:`image`}]},ChangeClothesByImg:{key:`ChangeClothesByImg`,title:`服装穿搭调整`,description:`上下装搭配调整`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`changeImgUrl`,label:`搭配服装图`,type:`image`,required:!0}]}},l={ChangeAccessoriesByImg:{key:`ChangeAccessoriesByImg`,title:`配饰穿搭调整`,description:`背包鞋子首饰等搭配调整`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`changeImgUrl`,label:`搭配物品图`,type:`image`,required:!0},{name:`accessoryType`,label:`配件类型`,type:`enum`,required:!0,options:e.l}]},VirtualFittingReference:{key:`VirtualFittingReference`,title:`AI试衣参考图模式`,description:`上传模特参考图生成试衣效果`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`refImgUrl`,label:`模特参考图`,type:`image`,required:!0}]},VirtualFittingTemplate:{key:`VirtualFittingTemplate`,title:`AI试衣模板模式`,description:`选择试衣场景模板`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`templateId`,label:`试衣模板`,type:`enum`,required:!0,options:e.k}]},FixDeformities:{key:`FixDeformities`,title:`畸形修复`,description:`修复手部脚部脸部畸形`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`maskUrl`,label:`修复区域蒙版`,type:`mask`,required:!0}]},IntelligentCropping:{key:`IntelligentCropping`,title:`AI智能裁图`,description:`自定义像素或比例裁图`,fields:[{name:`imgUrl`,label:`图片`,type:`image`,required:!0},{name:`mode`,label:`裁剪模式`,type:`enum`,required:!0,options:e.p},{name:`x`,label:`X坐标`,type:`number`},{name:`y`,label:`Y坐标`,type:`number`},{name:`width`,label:`宽度`,type:`number`},{name:`height`,label:`高度`,type:`number`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},ModelToFlat:{key:`ModelToFlat`,title:`模特转平铺`,description:`模特图生成平铺图效果`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`position`,label:`服装位置`,type:`enum`,required:!0,options:e.x}]},GenerateShortVideo:{key:`GenerateShortVideo`,title:`短视频生成`,description:`上传图片生成短视频`,fields:[{name:`imgUrl`,label:`首帧图片`,type:`image`,required:!0},{name:`tailImgUrl`,label:`尾帧图片`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述视频内容`},{name:`duration`,label:`时长`,type:`enum`,required:!0,options:e.h}]},OneClickModifyPrinting:{key:`OneClickModifyPrinting`,title:`一键改图案`,description:`通过文本或参考图一键更改图案`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述图案修改需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},OrientationDesign:{key:`OrientationDesign`,title:`服装定向设计`,description:`通过设计点对服装进行定向设计`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版1`,type:`mask`},{name:`refImgUrl`,label:`参考图1`,type:`image`},{name:`prompt`,label:`文本指令1`,type:`text`,placeholder:`描述设计需求`}]},DirectionalIntegration:{key:`DirectionalIntegration`,title:`定向融合`,description:`通过融合设计点对服装进行融合设计`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版1`,type:`mask`},{name:`refImgUrl`,label:`参考图1`,type:`image`,required:!0}]},OneClickIntegration:{key:`OneClickIntegration`,title:`一键融合`,description:`通过参考图和文本指令一键融合`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考图`,type:`image`,required:!0},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述融合需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},ChangeFabricV2:{key:`ChangeFabricV2`,title:`面料上身2.0`,description:`支持文本指令的面料上身`,fields:[{name:`imgUrl`,label:`款式图`,type:`image`,required:!0},{name:`maskUrl`,label:`蒙版`,type:`mask`,required:!0},{name:`fabricImgUrl`,label:`面料图`,type:`image`,required:!0},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述调整需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},VirtualFittingReferenceV2:{key:`VirtualFittingReferenceV2`,title:`AI试衣参考图2.0`,description:`支持姿势和背景的试衣`,fields:[{name:`imgUrl`,label:`服装图片`,type:`image`,required:!0},{name:`refImgUrl`,label:`模特参考图`,type:`image`,required:!0},{name:`poseImgUrl`,label:`姿势图`,type:`image`},{name:`bgImgUrl`,label:`背景图`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述试衣需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FlowerShapedDesign:{key:`FlowerShapedDesign`,title:`花型创款`,description:`将印花上身到指定款式效果图`,fields:[{name:`imgUrl`,label:`印花图案`,type:`image`,required:!0},{name:`prompt`,label:`文本指令`,type:`text`,required:!0,placeholder:`描述上身效果需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FlowerShapedVirtualPrinting:{key:`FlowerShapedVirtualPrinting`,title:`花型上身`,description:`将图案上身到款式图指定区域`,fields:[{name:`imgUrl`,label:`印花图案`,type:`image`,required:!0},{name:`bodyImgUrl`,label:`上身图`,type:`image`,required:!0},{name:`bodyMaskImgUrl`,label:`目标区域蒙版`,type:`mask`,required:!0},{name:`removePattern`,label:`是否去除参考图印花`,type:`enum`,options:e.w}]},OneClickChangeColor:{key:`OneClickChangeColor`,title:`一键改色`,description:`整合智能识别与自定义改色`,fields:[{name:`imgUrl`,label:`原图`,type:`image`,required:!0},{name:`hexCode`,label:`目标颜色`,type:`color`},{name:`hexImgUrl`,label:`颜色参考图`,type:`image`},{name:`changeColorArea`,label:`改色区域`,type:`text`,placeholder:`如:上衣`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelWithLabels:{key:`FittingModelWithLabels`,title:`模特定制标签模式`,description:`通过标签选择生成虚拟模特`,fields:[{name:`gender`,label:`性别`,type:`enum`,required:!0,options:e.g},{name:`age`,label:`年龄`,type:`enum`,options:e.u},{name:`nationality`,label:`国籍`,type:`enum`,options:e.v},{name:`skinColor`,label:`肤色`,type:`enum`,options:e.O},{name:`bodyShape`,label:`身材`,type:`enum`,options:e.f}]},FittingModelCustom:{key:`FittingModelCustom`,title:`模特定制自定义模式`,description:`根据参考图生成虚拟模特`,fields:[{name:`gender`,label:`性别`,type:`enum`,required:!0,options:e.g},{name:`faceRefImgUrl`,label:`脸部参考图`,type:`image`,required:!0},{name:`similarity`,label:`相似度`,type:`enum`,options:e.E},{name:`bodyShapeRefImgUrl`,label:`身材参考图`,type:`image`},{name:`additionalDescription`,label:`附加描述`,type:`text`,placeholder:`附加描述`}]},FittingModelChangeFace:{key:`FittingModelChangeFace`,title:`模特换脸`,description:`对模特图换脸操作`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`refImgUrl`,label:`参考面部图`,type:`image`,required:!0},{name:`similarity`,label:`相似度`,type:`enum`,options:e.E},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeModel:{key:`FittingModelChangeModel`,title:`模特替换`,description:`随机或指定模特替换`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`gender`,label:`性别`,type:`enum`,options:e.g},{name:`similarity`,label:`相似度`,type:`enum`,options:e.E},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeBodyShape:{key:`FittingModelChangeBodyShape`,title:`模特身材调整`,description:`通过标签或参考图调整身材`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`bodyShapeRefImgUrl`,label:`身材参考图`,type:`image`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeClothingSize:{key:`FittingModelChangeClothingSize`,title:`模特尺码调整`,description:`调整模特服装尺码`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`size`,label:`尺码`,type:`enum`,required:!0,options:e.D},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangePosture:{key:`FittingModelChangePosture`,title:`模特姿势调整`,description:`调整模特姿势`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`poseImgUrl`,label:`姿势参考图`,type:`image`,required:!0},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangeBackground:{key:`FittingModelChangeBackground`,title:`模特换背景`,description:`替换模特背景`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`bgImgUrl`,label:`背景参考图`,type:`image`},{name:`prompt`,label:`文本指令`,type:`text`,placeholder:`描述背景需求`},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},FittingModelChangePerspective:{key:`FittingModelChangePerspective`,title:`模特视角调整`,description:`调整模特视角`,fields:[{name:`imgUrl`,label:`模特图`,type:`image`,required:!0},{name:`perspective`,label:`视角`,type:`enum`,required:!0,options:e.b},{name:`aspectRatio`,label:`宽高比`,type:`aspectRatio`}]},TrainClothingModel:{key:`TrainClothingModel`,title:`服装风格模型训练`,description:`训练自定义服装风格模型`,fields:[{name:`imgUrlList`,label:`训练图片`,type:`images`,required:!0,hint:`建议上传30-50张正面/斜侧面模特图`},{name:`clothingModelName`,label:`模型名称`,type:`text`,required:!0},{name:`enhanceWordList`,label:`加强词`,type:`text`}]}},u={...c,...l};function d(e){return u[e]}function f(){return Object.values(u)}function p(e,t){let n=[];for(let r of t){let t=e[r.name],i=m(r,t);i&&n.push(i)}return{valid:n.length===0,errors:n}}function m(t,n){let r=n==null||n===``;if(t.required&&r)return{field:t.name,label:t.label,message:e.a.FIELD_REQUIRED(t.label)};if(n==null)return null;let i=e=>({field:t.name,label:t.label,message:e(t.label)});switch(t.type){case`image`:case`mask`:if(typeof n!=`string`&&!h(n))return i(e.a.FIELD_STRING);break;case`images`:if(!Array.isArray(n)||n.length===0)return i(e.a.FIELD_ARRAY);if(n.some(e=>(typeof e!=`string`||e===``)&&!h(e)))return i(e.a.FIELD_ARRAY_ELEMENTS);break;case`text`:if(typeof n!=`string`)return i(e.a.FIELD_STRING);if(t.maxLength&&n.length>t.maxLength)return i(n=>e.a.FIELD_MAX_LENGTH(n,t.maxLength));break;case`enum`:if(typeof n!=`string`)return i(e.a.FIELD_STRING);if(t.options&&!t.options.some(e=>e.value===n))return i(e.a.FIELD_ENUM_INVALID);break;case`multiEnum`:if(!Array.isArray(n)||n.length===0)return i(e.a.FIELD_ARRAY);if(n.some(e=>typeof e!=`string`||e===``))return i(e.a.FIELD_ARRAY_ELEMENTS);if(t.options&&n.some(e=>!t.options?.some(t=>t.value===e)))return i(e.a.FIELD_ENUM_INVALID);break;case`color`:if(typeof n!=`string`||!/^#[0-9A-Fa-f]{6}$/.test(n))return i(e.a.FIELD_COLOR_FORMAT);break;case`number`:if(typeof n!=`number`||Number.isNaN(n))return i(e.a.FIELD_NUMBER);break;case`aspectRatio`:case`strength`:break}return null}function h(e){return typeof File<`u`&&e instanceof File}var g=class{constructor(t={}){this.type=``,this.submitEndpoint=`/task/submit`,this.submitEndpointMode=`prefix`,this.pollEndpoint=`/task/progress`,this.pollInterval=1e3,this.maxPollAttempts=120,this.phase=e.P.IDLE,this.taskId=``,this.progress=0,this.result=null,this.error=``,this.activeTasks=new Map,this.pollTimer=null,this.isPollingBatch=!1,this.configure(t)}configure(e){e.type!==void 0&&(this.type=e.type),e.submitEndpoint!==void 0&&(this.submitEndpoint=e.submitEndpoint),e.submitEndpointMode!==void 0&&(this.submitEndpointMode=e.submitEndpointMode),e.pollEndpoint!==void 0&&(this.pollEndpoint=e.pollEndpoint),e.pollInterval!==void 0&&(this.pollInterval=e.pollInterval),e.maxPollAttempts!==void 0&&(this.maxPollAttempts=e.maxPollAttempts),e.customRequest!==void 0&&(this.customRequest=e.customRequest),e.customUploadRequest!==void 0&&(this.customUploadRequest=e.customUploadRequest),e.customUploadRequert!==void 0&&(this.customUploadRequest=e.customUploadRequert),e.onSubmit!==void 0&&(this.onSubmit=e.onSubmit),e.onPoll!==void 0&&(this.onPoll=e.onPoll),e.onSuccess!==void 0&&(this.onSuccess=e.onSuccess),e.onError!==void 0&&(this.onError=e.onError)}get typeDef(){let e=this.resolvedTaskTypeKey;return e?d(e):void 0}get taskFields(){return this.typeDef?.fields??[]}async submit(t,n){let r=this.createRequestUri(t);if(!r){this.fail(e.a.MISSING_ENDPOINT,e.P.IDLE);return}let i=this.getTaskFields(t);if(i.length>0){let t=p(n,i);if(!t.valid){this.fail(t.errors.map(e=>e.message).join(`; `),e.P.IDLE);return}}this.phase=e.P.SUBMITTING,this.error=``,this.progress=0,this.result=null;try{let e=await this.resolveUploads(n,i),t=(await this.request(r,e)).data.taskId;this.taskId=t;let a={taskId:t,endpoint:r,formData:e};this.onSubmit?.(a),await this.trackTask(t)}catch(t){this.fail(t instanceof Error?t.message:e.a.SUBMIT_FAILED,this.phase)}}reset(){this.phase=e.P.IDLE,this.taskId=``,this.progress=0,this.result=null,this.error=``,this.activeTasks.clear(),this.pollTimer&&=(clearTimeout(this.pollTimer),null)}createRequestUri(e=this.type){return this.submitEndpointMode===`full`?this.submitEndpoint:e?`${this.submitEndpoint}/${e}`:this.submitEndpoint}get resolvedTaskTypeKey(){return x(this.type)}getTaskFields(e){let t=x(e);return t?d(t)?.fields??[]:[]}async resolveUploads(e,t){let n=t.length>0?t.filter(e=>e.type===`image`||e.type===`mask`||e.type===`images`):Object.keys(e).map(e=>({name:e,type:`image`}));if(!n.length)return e;let r={...e};for(let e of n){let t=r[e.name];Array.isArray(t)?r[e.name]=await Promise.all(t.map(t=>this.resolveUploadValue(t,e))):r[e.name]=await this.resolveUploadValue(t,e)}return r}async resolveUploadValue(e,t){if(!S(e))return e;if(!this.customUploadRequest)throw Error(`customUploadRequest is required to upload ${t.name}`);return C(await this.customUploadRequest(e))}trackTask(t){this.phase=e.P.POLLING;let n=new Promise(e=>{this.activeTasks.set(t,{taskId:t,attempts:0,resolve:e})});return this.ensurePolling(0),n}ensurePolling(e=this.pollInterval){this.pollTimer||this.isPollingBatch||!this.activeTasks.size||(this.pollTimer=setTimeout(()=>{this.pollTimer=null,this.pollActiveTasks()},this.pollInterval))}async pollActiveTasks(){if(!this.activeTasks.size)return;this.isPollingBatch=!0;let t=[...this.activeTasks.keys()];try{let n=`${this.pollEndpoint}?taskIds=${t.map(encodeURIComponent).join(`,`)}`,r=await this.request(n),i=new Map(r.data.map(e=>[e.aiTaskId,e]));t.forEach(t=>{let n=this.activeTasks.get(t);if(!n)return;n.attempts+=1;let r=i.get(t);if(!r){this.failTask(n,e.a.TASK_NOT_FOUND(t));return}this.taskId=t,this.progress=r.taskProgress;let a={taskId:t,progress:r.taskProgress,status:r.aiTaskStatus,queuePos:r.queuePos};if(this.onPoll?.(a),r.aiTaskStatus===`done`){this.result=r;let e={taskId:t,images:r.imgInfo?[{index:0,url:r.imgInfo}]:[],result:r};this.onSuccess?.(e),this.completeTask(n);return}n.attempts>=this.maxPollAttempts&&this.failTask(n,e.a.POLL_TIMEOUT(t))})}catch(t){let n=t instanceof Error?t.message:e.a.POLL_FAILED;[...this.activeTasks.values()].forEach(e=>this.failTask(e,n))}finally{this.isPollingBatch=!1,this.activeTasks.size?(this.phase=e.P.POLLING,this.ensurePolling(this.pollInterval)):this.phase===e.P.POLLING&&(this.phase=this.error?e.P.ERROR:e.P.SUCCESS)}}completeTask(e){this.activeTasks.delete(e.taskId),e.resolve()}failTask(t,n){this.activeTasks.delete(t.taskId),this.fail(n,e.P.POLLING,t.taskId),t.resolve()}async request(e,t){let n=this.customRequest?await this.customRequest(e,t):await fetch(e,t===void 0?{method:`GET`}:{method:`POST`,body:JSON.stringify(t),headers:{"Content-Type":`application/json`}});return n&&typeof n.json==`function`?n.json():_(n)}fail(t,n,r){this.phase=e.P.ERROR,this.error=t;let i={message:t,phase:n,taskId:r};this.onError?.(i)}};function _(e){return b(e)&&y(e.data)?e.data:(v(e),e)}function v(e){return b(e)&&`data`in e}function y(e){return b(e)&&`data`in e&&(`code`in e||`success`in e||`msg`in e)}function b(e){return typeof e==`object`&&!!e}function x(e){if(!e)return``;if(u[e])return e;let t=e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/[-\s]+/g,`_`).toUpperCase();return u[t]?t:``}function S(e){return typeof File<`u`&&e instanceof File}async function C(e){return e?typeof e==`string`?e:e instanceof Response?C(await e.json()):typeof e.data==`string`?e.data:e.data?e.data.value||e.data.url||``:e.value||e.url||``:``}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return o}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`https://api.lightchainai.com`,t=`client-secret`,n=`/task/progress`,r=`/task/submit`,i={BAD_REQUEST:400,UNAUTHORIZED:401,RATE_LIMIT:429,SERVER_ERROR:500},a={GENERATE_PRINTING:`GeneratePrinting`,VIRTUAL_FITTING:`VirtualFitting`,FIX_FACE:`FixFace`,CHANGE_FACE:`ChangeFace`,MULTI_PERSPECTIVE:`MultiPerspective`,PRINTING_TILING:`PrintingTiling`,CHANGE_DESIGN_POINT:`ChangeDesignPoint`,CHANGE_COLOR:`ChangeColor`,CHANGE_FABRIC:`ChangeFabric`,SR:`Sr`,VECTOR_CONVERT:`VectorConvert`,CHANGE_MODEL:`ChangeModel`,GENERATE_SKETCH:`GenerateSketch`,MODEL_GENERATE_SKETCH:`ModelGenerateSketch`,ELIMINATE:`Eliminate`,EXPAND_IMAGE:`ExpandImage`,CLOTHING_DESIGN:`ClothingDesign`,CHANGE_PATTERN:`ChangePattern`,GENERATE_MODEL:`GenerateModel`,MODIFY_PRINTING:`ModifyPrinting`,CUT_OUT:`CutOut`,LINE_ART_TO_REAL:`LineArtToReal`,FIX_PARTIAL:`FixPartial`,DETAIL_COMPENSATION:`DetailCompensation`,CHANGE_CLOTHES_BY_IMG:`ChangeClothesByImg`,CHANGE_ACCESSORIES_BY_IMG:`ChangeAccessoriesByImg`,VIRTUAL_FITTING_REFERENCE:`VirtualFittingReference`,VIRTUAL_FITTING_TEMPLATE:`VirtualFittingTemplate`,FIX_DEFORMITIES:`FixDeformities`,INTELLIGENT_CROPPING:`IntelligentCropping`,MODEL_TO_FLAT:`ModelToFlat`,GENERATE_SHORT_VIDEO:`GenerateShortVideo`,ONE_CLICK_MODIFY_PRINTING:`OneClickModifyPrinting`,ORIENTATION_DESIGN:`OrientationDesign`,DIRECTIONAL_INTEGRATION:`DirectionalIntegration`,ONE_CLICK_INTEGRATION:`OneClickIntegration`,CHANGE_FABRIC_V2:`ChangeFabricV2`,VIRTUAL_FITTING_REFERENCE_V2:`VirtualFittingReferenceV2`,FLOWER_SHAPED_DESIGN:`FlowerShapedDesign`,FLOWER_SHAPED_VIRTUAL_PRINTING:`FlowerShapedVirtualPrinting`,ONE_CLICK_CHANGE_COLOR:`OneClickChangeColor`,FITTING_MODEL_WITH_LABELS:`FittingModelWithLabels`,FITTING_MODEL_CUSTOM:`FittingModelCustom`,FITTING_MODEL_CHANGE_FACE:`FittingModelChangeFace`,FITTING_MODEL_CHANGE_MODEL:`FittingModelChangeModel`,FITTING_MODEL_CHANGE_BODY_SHAPE:`FittingModelChangeBodyShape`,FITTING_MODEL_CHANGE_CLOTHING_SIZE:`FittingModelChangeClothingSize`,FITTING_MODEL_CHANGE_POSTURE:`FittingModelChangePosture`,FITTING_MODEL_CHANGE_BACKGROUND:`FittingModelChangeBackground`,FITTING_MODEL_CHANGE_PERSPECTIVE:`FittingModelChangePerspective`,TRAIN_CLOTHING_MODEL:`TrainClothingModel`},o={IMAGE:`image`,MASK:`mask`,IMAGES:`images`,TEXT:`text`,ENUM:`enum`,MULTI_ENUM:`multiEnum`,ASPECT_RATIO:`aspectRatio`,COLOR:`color`,STRENGTH:`strength`,NUMBER:`number`},s={IDLE:`idle`,SUBMITTING:`submitting`,POLLING:`polling`,SUCCESS:`success`,ERROR:`error`},c={POLL_INTERVAL:1e3,MAX_POLL_ATTEMPTS:120,POLL_ENDPOINT:`/task/progress`},l={CHANGE:`change`,SUBMIT:`submit`,REQUEST_SUBMIT:`lc-request-submit`,POLL:`poll`,SUCCESS:`success`,ERROR:`error`,IMAGE_CLICK:`image-click`,COMPARE:`compare`},u={MISSING_ENDPOINT:`未指定提交端点或任务类型`,POLL_TIMEOUT:e=>`轮询超时: ${e}`,POLL_FAILED:`轮询失败`,TASK_NOT_FOUND:e=>`未找到任务: ${e}`,SUBMIT_FAILED:`提交失败`,FIELD_REQUIRED:e=>`${e}为必填项`,FIELD_STRING:e=>`${e}必须为字符串`,FIELD_ARRAY:e=>`${e}必须为非空数组`,FIELD_ARRAY_ELEMENTS:e=>`${e}数组元素必须为非空字符串`,FIELD_MAX_LENGTH:(e,t)=>`${e}不能超过${t}个字符`,FIELD_ENUM_INVALID:e=>`${e}值不在可选项中`,FIELD_COLOR_FORMAT:e=>`${e}必须为#RRGGBB格式`,FIELD_NUMBER:e=>`${e}必须为数字`},d={IMAGE:[`image/jpeg`,`image/png`,`image/webp`]},f={MAX_IMAGE_SIZE:10*1024*1024},p=[{label:`1:1`,value:`1:1`},{label:`2:3`,value:`2:3`},{label:`3:4`,value:`3:4`},{label:`3:2`,value:`3:2`},{label:`4:3`,value:`4:3`},{label:`9:16`,value:`9:16`},{label:`16:9`,value:`16:9`}],m=[{label:`正面`,value:`front`},{label:`背面`,value:`back`},{label:`左侧`,value:`left`},{label:`右侧`,value:`right`}],h=[{label:`2倍`,value:`2`},{label:`3倍`,value:`3`},{label:`4倍`,value:`4`}],g=[{label:`线稿`,value:`line`},{label:`印花`,value:`printing`}],_=[{label:`女`,value:`female`},{label:`男`,value:`male`}],v=[{label:`青年`,value:`young`},{label:`中年`,value:`middle`}],y=[{label:`亚洲`,value:`asian`},{label:`欧洲`,value:`european`},{label:`非洲`,value:`african`}],b=[{label:`上装`,value:`upper`},{label:`下装`,value:`lower`},{label:`连身装`,value:`dress`}],x=[{label:`袖型`,value:`sleeve`},{label:`领型`,value:`collar`},{label:`裤型`,value:`pants`},{label:`裙型`,value:`skirt`}],S=[{label:`全身`,value:`full`},{label:`半身`,value:`half`},{label:`服装`,value:`clothing`}],C=[{label:`黑白线稿`,value:`bw`},{label:`彩色线稿`,value:`color`}],w=[{label:`背包`,value:`bag`},{label:`鞋子`,value:`shoes`},{label:`首饰`,value:`jewelry`},{label:`腰带`,value:`belt`},{label:`帽子`,value:`hat`}],T=[{label:`棚内瑜伽`,value:`yoga`},{label:`极简棚拍`,value:`minimal`}],E=[{label:`自定义像素`,value:`1`},{label:`比例裁剪`,value:`2`}],D=[{label:`3秒`,value:`3`},{label:`5秒`,value:`5`}],O=[{label:`是`,value:`true`},{label:`否`,value:`false`}],k=[{label:`中国`,value:`china`},{label:`美国`,value:`usa`},{label:`英国`,value:`uk`},{label:`法国`,value:`france`},{label:`德国`,value:`germany`},{label:`意大利`,value:`italy`},{label:`西班牙`,value:`spain`},{label:`俄罗斯`,value:`russia`},{label:`日本`,value:`japan`},{label:`韩国`,value:`korea`},{label:`泰国`,value:`thailand`},{label:`印度`,value:`india`},{label:`越南`,value:`vietnam`},{label:`其他`,value:`other`}],A=[{label:`白皙`,value:`fair`},{label:`中等`,value:`medium`},{label:`小麦色`,value:`wheatish`},{label:`深色`,value:`dark`},{label:`其他`,value:`other`}],j=[{label:`偏瘦`,value:`slim`},{label:`标准`,value:`standard`},{label:`微胖`,value:`chubby`},{label:`肥胖`,value:`fat`}],M=[{label:`一致`,value:`same`},{label:`相似`,value:`similar`}],N=[{label:`偏小`,value:`smaller`},{label:`偏大`,value:`larger`}];Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return g}});
|
package/dist/core-8c7MUnKQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./client-CxZI36n6.js";
|
package/dist/core-Di13s7Ci.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./client-BnY0dpeN.cjs`);
|