light-chain-open-ui 1.0.3 → 1.0.4
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/README.md +2 -11
- package/dist/{button-DE8_GX7q.cjs → button-BN6fkYfk.cjs} +67 -16
- package/dist/{button-CREPu5oG.js → button-ClBAD6mB.js} +191 -179
- package/dist/lightchain-ui.cjs +1 -1
- package/dist/lightchain-ui.mjs +6 -5
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +50 -48
- package/dist/types/components/task-workflow/task-workflow.d.ts +1 -1
- package/dist/types/styles/register-theme.d.ts +1 -0
- package/package.json +6 -2
- package/src/styles/register-theme.ts +64 -0
|
@@ -1,42 +1,50 @@
|
|
|
1
1
|
import { l as e, t } from "./client-C5AgfBeT.js";
|
|
2
2
|
import { N as n, P as r, o as i } from "./constants-DmzJOR2G.js";
|
|
3
3
|
import { LitElement as a, css as o, html as s, nothing as c } from "lit";
|
|
4
|
+
//#region src/styles/register-theme.ts
|
|
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";
|
|
6
|
+
function d() {
|
|
7
|
+
if (typeof document > "u" || document.getElementById(l)) return;
|
|
8
|
+
let e = document.createElement("style");
|
|
9
|
+
e.id = l, e.textContent = u, document.head.append(e);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
4
12
|
//#region node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
5
|
-
var
|
|
13
|
+
var f = (e) => (t, n) => {
|
|
6
14
|
n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
|
|
7
15
|
customElements.define(e, t);
|
|
8
16
|
});
|
|
9
|
-
},
|
|
17
|
+
}, p = globalThis, ee = p.ShadowRoot && (p.ShadyCSS === void 0 || p.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, te = Symbol(), ne = /* @__PURE__ */ new WeakMap(), re = class {
|
|
10
18
|
constructor(e, t, n) {
|
|
11
|
-
if (this._$cssResult$ = !0, n !==
|
|
19
|
+
if (this._$cssResult$ = !0, n !== te) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
12
20
|
this.cssText = e, this.t = t;
|
|
13
21
|
}
|
|
14
22
|
get styleSheet() {
|
|
15
23
|
let e = this.o, t = this.t;
|
|
16
|
-
if (
|
|
24
|
+
if (ee && e === void 0) {
|
|
17
25
|
let n = t !== void 0 && t.length === 1;
|
|
18
|
-
n && (e =
|
|
26
|
+
n && (e = ne.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && ne.set(t, e));
|
|
19
27
|
}
|
|
20
28
|
return e;
|
|
21
29
|
}
|
|
22
30
|
toString() {
|
|
23
31
|
return this.cssText;
|
|
24
32
|
}
|
|
25
|
-
},
|
|
26
|
-
if (
|
|
33
|
+
}, ie = (e) => new re(typeof e == "string" ? e : e + "", void 0, te), ae = (e, t) => {
|
|
34
|
+
if (ee) e.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
27
35
|
else for (let n of t) {
|
|
28
|
-
let t = document.createElement("style"), r =
|
|
36
|
+
let t = document.createElement("style"), r = p.litNonce;
|
|
29
37
|
r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
|
|
30
38
|
}
|
|
31
|
-
},
|
|
39
|
+
}, oe = ee ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
32
40
|
let t = "";
|
|
33
41
|
for (let n of e.cssRules) t += n.cssText;
|
|
34
|
-
return
|
|
35
|
-
})(e) : e, { is:
|
|
42
|
+
return ie(t);
|
|
43
|
+
})(e) : e, { is: se, defineProperty: ce, getOwnPropertyDescriptor: le, getOwnPropertyNames: ue, getOwnPropertySymbols: de, getPrototypeOf: fe } = Object, m = globalThis, pe = m.trustedTypes, me = pe ? pe.emptyScript : "", he = m.reactiveElementPolyfillSupport, h = (e, t) => e, g = {
|
|
36
44
|
toAttribute(e, t) {
|
|
37
45
|
switch (t) {
|
|
38
46
|
case Boolean:
|
|
39
|
-
e = e ?
|
|
47
|
+
e = e ? me : null;
|
|
40
48
|
break;
|
|
41
49
|
case Object:
|
|
42
50
|
case Array: e = e == null ? e : JSON.stringify(e);
|
|
@@ -61,30 +69,30 @@ var l = (e) => (t, n) => {
|
|
|
61
69
|
}
|
|
62
70
|
return n;
|
|
63
71
|
}
|
|
64
|
-
},
|
|
72
|
+
}, _ = (e, t) => !se(e, t), ge = {
|
|
65
73
|
attribute: !0,
|
|
66
74
|
type: String,
|
|
67
|
-
converter:
|
|
75
|
+
converter: g,
|
|
68
76
|
reflect: !1,
|
|
69
77
|
useDefault: !1,
|
|
70
|
-
hasChanged:
|
|
78
|
+
hasChanged: _
|
|
71
79
|
};
|
|
72
|
-
Symbol.metadata ??= Symbol("metadata"),
|
|
73
|
-
var
|
|
80
|
+
Symbol.metadata ??= Symbol("metadata"), m.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
81
|
+
var v = class extends HTMLElement {
|
|
74
82
|
static addInitializer(e) {
|
|
75
83
|
this._$Ei(), (this.l ??= []).push(e);
|
|
76
84
|
}
|
|
77
85
|
static get observedAttributes() {
|
|
78
86
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
79
87
|
}
|
|
80
|
-
static createProperty(e, t =
|
|
88
|
+
static createProperty(e, t = ge) {
|
|
81
89
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
82
90
|
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
83
|
-
r !== void 0 &&
|
|
91
|
+
r !== void 0 && ce(this.prototype, e, r);
|
|
84
92
|
}
|
|
85
93
|
}
|
|
86
94
|
static getPropertyDescriptor(e, t, n) {
|
|
87
|
-
let { get: r, set: i } =
|
|
95
|
+
let { get: r, set: i } = le(this.prototype, e) ?? {
|
|
88
96
|
get() {
|
|
89
97
|
return this[t];
|
|
90
98
|
},
|
|
@@ -103,17 +111,17 @@ var g = class extends HTMLElement {
|
|
|
103
111
|
};
|
|
104
112
|
}
|
|
105
113
|
static getPropertyOptions(e) {
|
|
106
|
-
return this.elementProperties.get(e) ??
|
|
114
|
+
return this.elementProperties.get(e) ?? ge;
|
|
107
115
|
}
|
|
108
116
|
static _$Ei() {
|
|
109
|
-
if (this.hasOwnProperty(
|
|
110
|
-
let e =
|
|
117
|
+
if (this.hasOwnProperty(h("elementProperties"))) return;
|
|
118
|
+
let e = fe(this);
|
|
111
119
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
112
120
|
}
|
|
113
121
|
static finalize() {
|
|
114
|
-
if (this.hasOwnProperty(
|
|
115
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
116
|
-
let e = this.properties, t = [...
|
|
122
|
+
if (this.hasOwnProperty(h("finalized"))) return;
|
|
123
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(h("properties"))) {
|
|
124
|
+
let e = this.properties, t = [...ue(e), ...de(e)];
|
|
117
125
|
for (let n of t) this.createProperty(n, e[n]);
|
|
118
126
|
}
|
|
119
127
|
let e = this[Symbol.metadata];
|
|
@@ -132,8 +140,8 @@ var g = class extends HTMLElement {
|
|
|
132
140
|
let t = [];
|
|
133
141
|
if (Array.isArray(e)) {
|
|
134
142
|
let n = new Set(e.flat(Infinity).reverse());
|
|
135
|
-
for (let e of n) t.unshift(
|
|
136
|
-
} else e !== void 0 && t.push(
|
|
143
|
+
for (let e of n) t.unshift(oe(e));
|
|
144
|
+
} else e !== void 0 && t.push(oe(e));
|
|
137
145
|
return t;
|
|
138
146
|
}
|
|
139
147
|
static _$Eu(e, t) {
|
|
@@ -159,7 +167,7 @@ var g = class extends HTMLElement {
|
|
|
159
167
|
}
|
|
160
168
|
createRenderRoot() {
|
|
161
169
|
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
170
|
+
return ae(e, this.constructor.elementStyles), e;
|
|
163
171
|
}
|
|
164
172
|
connectedCallback() {
|
|
165
173
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
@@ -174,14 +182,14 @@ var g = class extends HTMLElement {
|
|
|
174
182
|
_$ET(e, t) {
|
|
175
183
|
let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
176
184
|
if (r !== void 0 && !0 === n.reflect) {
|
|
177
|
-
let i = (n.converter?.toAttribute === void 0 ?
|
|
185
|
+
let i = (n.converter?.toAttribute === void 0 ? g : n.converter).toAttribute(t, n.type);
|
|
178
186
|
this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
|
|
179
187
|
}
|
|
180
188
|
}
|
|
181
189
|
_$AK(e, t) {
|
|
182
190
|
let n = this.constructor, r = n._$Eh.get(e);
|
|
183
191
|
if (r !== void 0 && this._$Em !== r) {
|
|
184
|
-
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ?
|
|
192
|
+
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? g : e.converter;
|
|
185
193
|
this._$Em = r;
|
|
186
194
|
let a = i.fromAttribute(t, e.type);
|
|
187
195
|
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
|
|
@@ -190,7 +198,7 @@ var g = class extends HTMLElement {
|
|
|
190
198
|
requestUpdate(e, t, n, r = !1, i) {
|
|
191
199
|
if (e !== void 0) {
|
|
192
200
|
let a = this.constructor;
|
|
193
|
-
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ??
|
|
201
|
+
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? _)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
|
|
194
202
|
this.C(e, t, n);
|
|
195
203
|
}
|
|
196
204
|
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
@@ -254,16 +262,16 @@ var g = class extends HTMLElement {
|
|
|
254
262
|
updated(e) {}
|
|
255
263
|
firstUpdated(e) {}
|
|
256
264
|
};
|
|
257
|
-
|
|
265
|
+
v.elementStyles = [], v.shadowRootOptions = { mode: "open" }, v[h("elementProperties")] = /* @__PURE__ */ new Map(), v[h("finalized")] = /* @__PURE__ */ new Map(), he?.({ ReactiveElement: v }), (m.reactiveElementVersions ??= []).push("2.1.2");
|
|
258
266
|
//#endregion
|
|
259
267
|
//#region node_modules/@lit/reactive-element/decorators/property.js
|
|
260
|
-
var
|
|
268
|
+
var _e = {
|
|
261
269
|
attribute: !0,
|
|
262
270
|
type: String,
|
|
263
|
-
converter:
|
|
271
|
+
converter: g,
|
|
264
272
|
reflect: !1,
|
|
265
|
-
hasChanged:
|
|
266
|
-
},
|
|
273
|
+
hasChanged: _
|
|
274
|
+
}, ve = (e = _e, t, n) => {
|
|
267
275
|
let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
|
|
268
276
|
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
|
|
269
277
|
let { name: r } = n;
|
|
@@ -286,16 +294,16 @@ var ge = {
|
|
|
286
294
|
}
|
|
287
295
|
throw Error("Unsupported decorator location: " + r);
|
|
288
296
|
};
|
|
289
|
-
function
|
|
290
|
-
return (t, n) => typeof n == "object" ?
|
|
297
|
+
function y(e) {
|
|
298
|
+
return (t, n) => typeof n == "object" ? ve(e, t, n) : ((e, t, n) => {
|
|
291
299
|
let r = t.hasOwnProperty(n);
|
|
292
300
|
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
293
301
|
})(e, t, n);
|
|
294
302
|
}
|
|
295
303
|
//#endregion
|
|
296
304
|
//#region node_modules/@lit/reactive-element/decorators/state.js
|
|
297
|
-
function
|
|
298
|
-
return
|
|
305
|
+
function b(e) {
|
|
306
|
+
return y({
|
|
299
307
|
...e,
|
|
300
308
|
state: !0,
|
|
301
309
|
attribute: !1
|
|
@@ -303,10 +311,10 @@ function v(e) {
|
|
|
303
311
|
}
|
|
304
312
|
//#endregion
|
|
305
313
|
//#region node_modules/@lit/reactive-element/decorators/base.js
|
|
306
|
-
var
|
|
314
|
+
var ye = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
|
|
307
315
|
//#endregion
|
|
308
316
|
//#region node_modules/@lit/reactive-element/decorators/query.js
|
|
309
|
-
function
|
|
317
|
+
function be(e, t) {
|
|
310
318
|
return (n, r, i) => {
|
|
311
319
|
let a = (t) => t.renderRoot?.querySelector(e) ?? null;
|
|
312
320
|
if (t) {
|
|
@@ -321,19 +329,19 @@ function ye(e, t) {
|
|
|
321
329
|
}
|
|
322
330
|
};
|
|
323
331
|
})();
|
|
324
|
-
return
|
|
332
|
+
return ye(n, r, { get() {
|
|
325
333
|
let n = e.call(this);
|
|
326
334
|
return n === void 0 && (n = a(this), (n !== null || this.hasUpdated) && t.call(this, n)), n;
|
|
327
335
|
} });
|
|
328
336
|
}
|
|
329
|
-
return
|
|
337
|
+
return ye(n, r, { get() {
|
|
330
338
|
return a(this);
|
|
331
339
|
} });
|
|
332
340
|
};
|
|
333
341
|
}
|
|
334
342
|
//#endregion
|
|
335
343
|
//#region \0@oxc-project+runtime@0.130.0/helpers/decorate.js
|
|
336
|
-
function
|
|
344
|
+
function x(e, t, n, r) {
|
|
337
345
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
338
346
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
339
347
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -341,7 +349,7 @@ function y(e, t, n, r) {
|
|
|
341
349
|
}
|
|
342
350
|
//#endregion
|
|
343
351
|
//#region src/components/image-uploader/image-uploader.ts
|
|
344
|
-
var
|
|
352
|
+
var S = class extends a {
|
|
345
353
|
constructor(...e) {
|
|
346
354
|
super(...e), this.name = "", this.label = "", this.hint = "", this.value = "", this.file = null, this.disabled = !1, this.showMaskHint = !1, this._previewUrl = "", this._errorMessage = "", this._isDragOver = !1;
|
|
347
355
|
}
|
|
@@ -594,10 +602,10 @@ var b = class extends a {
|
|
|
594
602
|
return s`<div class="mask-hint" part="hint">${this.hint || "Mask hint: white keeps the area, black removes the area"}</div>`;
|
|
595
603
|
}
|
|
596
604
|
};
|
|
597
|
-
|
|
605
|
+
x([y({ type: String })], S.prototype, "name", void 0), x([y({ type: String })], S.prototype, "label", void 0), x([y({ type: String })], S.prototype, "hint", void 0), x([y({ type: String })], S.prototype, "value", void 0), x([y({ attribute: !1 })], S.prototype, "file", void 0), x([y({ type: Boolean })], S.prototype, "disabled", void 0), x([y({ type: Boolean })], S.prototype, "showMaskHint", void 0), x([b()], S.prototype, "_previewUrl", void 0), x([b()], S.prototype, "_errorMessage", void 0), x([b()], S.prototype, "_isDragOver", void 0), x([be("input[type=\"file\"]")], S.prototype, "_fileInput", void 0), S = x([f("lc-image-uploader")], S);
|
|
598
606
|
//#endregion
|
|
599
607
|
//#region src/components/mask-editor/mask-editor.ts
|
|
600
|
-
var
|
|
608
|
+
var C = class extends a {
|
|
601
609
|
constructor(...e) {
|
|
602
610
|
super(...e), this.label = "涂抹蒙版", this.name = "", this.hint = "", this.required = !1, this.value = "", this.source = "", this.disabled = !1, this.brushSize = 28, this._mode = "paint", this._isDrawing = !1, this._errorMessage = "", this._aspectRatio = "1 / 1", this._canUndo = !1, this._canRedo = !1, this._zoom = 1, this._isSpacePressed = !1, this._isPanning = !1, this._panX = 0, this._panY = 0, this._lastPoint = null, this._lastPanPoint = null, this._history = [], this._historyIndex = -1, this._sourceWidth = 0, this._sourceHeight = 0;
|
|
603
611
|
}
|
|
@@ -1077,10 +1085,10 @@ var x = class extends a {
|
|
|
1077
1085
|
`;
|
|
1078
1086
|
}
|
|
1079
1087
|
};
|
|
1080
|
-
|
|
1088
|
+
x([y({ type: String })], C.prototype, "label", void 0), x([y({ type: String })], C.prototype, "name", void 0), x([y({ type: String })], C.prototype, "hint", void 0), x([y({ type: Boolean })], C.prototype, "required", void 0), x([y({ type: String })], C.prototype, "value", void 0), x([y({ type: String })], C.prototype, "source", void 0), x([y({ type: Boolean })], C.prototype, "disabled", void 0), x([y({ type: Number })], C.prototype, "brushSize", void 0), x([b()], C.prototype, "_mode", void 0), x([b()], C.prototype, "_isDrawing", void 0), x([b()], C.prototype, "_errorMessage", void 0), x([b()], C.prototype, "_aspectRatio", void 0), x([b()], C.prototype, "_canUndo", void 0), x([b()], C.prototype, "_canRedo", void 0), x([b()], C.prototype, "_zoom", void 0), x([b()], C.prototype, "_isSpacePressed", void 0), x([b()], C.prototype, "_isPanning", void 0), x([b()], C.prototype, "_panX", void 0), x([b()], C.prototype, "_panY", void 0), x([be("canvas")], C.prototype, "_canvas", void 0), C = x([f("lc-mask-editor")], C);
|
|
1081
1089
|
//#endregion
|
|
1082
1090
|
//#region src/components/enum-selector/enum-selector.ts
|
|
1083
|
-
var
|
|
1091
|
+
var w = class extends a {
|
|
1084
1092
|
constructor(...e) {
|
|
1085
1093
|
super(...e), this.label = "", this.name = "", this.value = "", this.mode = "button", this.multiple = !1, this.required = !1, this.disabled = !1, this.showIcon = !1, this.options = "[]";
|
|
1086
1094
|
}
|
|
@@ -1346,13 +1354,13 @@ var S = class extends a {
|
|
|
1346
1354
|
`;
|
|
1347
1355
|
}
|
|
1348
1356
|
};
|
|
1349
|
-
|
|
1357
|
+
x([y({ type: String })], w.prototype, "label", void 0), x([y({ type: String })], w.prototype, "name", void 0), x([y()], w.prototype, "value", void 0), x([y({ type: String })], w.prototype, "mode", void 0), x([y({ type: Boolean })], w.prototype, "multiple", void 0), x([y({ type: Boolean })], w.prototype, "required", void 0), x([y({ type: Boolean })], w.prototype, "disabled", void 0), x([y({
|
|
1350
1358
|
type: Boolean,
|
|
1351
1359
|
attribute: "show-icon"
|
|
1352
|
-
})],
|
|
1360
|
+
})], w.prototype, "showIcon", void 0), x([y({ type: String })], w.prototype, "options", void 0), w = x([f("lc-enum-selector")], w);
|
|
1353
1361
|
//#endregion
|
|
1354
1362
|
//#region src/components/prompt-input/prompt-input.ts
|
|
1355
|
-
var
|
|
1363
|
+
var T = class extends a {
|
|
1356
1364
|
constructor(...e) {
|
|
1357
1365
|
super(...e), this.value = "", this.name = "", this.label = "", this.placeholder = "", this.maxLength = 500, this.required = !1, this.disabled = !1;
|
|
1358
1366
|
}
|
|
@@ -1451,83 +1459,83 @@ var C = class extends a {
|
|
|
1451
1459
|
`;
|
|
1452
1460
|
}
|
|
1453
1461
|
};
|
|
1454
|
-
|
|
1462
|
+
x([y({ type: String })], T.prototype, "value", void 0), x([y({ type: String })], T.prototype, "name", void 0), x([y({ type: String })], T.prototype, "label", void 0), x([y({ type: String })], T.prototype, "placeholder", void 0), x([y({ type: Number })], T.prototype, "maxLength", void 0), x([y({ type: Boolean })], T.prototype, "required", void 0), x([y({ type: Boolean })], T.prototype, "disabled", void 0), T = x([f("lc-prompt-input")], T);
|
|
1455
1463
|
//#endregion
|
|
1456
1464
|
//#region node_modules/lit-html/lit-html.js
|
|
1457
|
-
var
|
|
1458
|
-
function
|
|
1459
|
-
if (!
|
|
1460
|
-
return
|
|
1465
|
+
var E = globalThis, xe = (e) => e, D = E.trustedTypes, Se = D ? D.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, O = "$lit$", k = `lit$${Math.random().toFixed(9).slice(2)}$`, A = "?" + k, Ce = `<${A}>`, j = document, M = () => j.createComment(""), N = (e) => e === null || typeof e != "object" && typeof e != "function", P = Array.isArray, we = (e) => P(e) || typeof e?.[Symbol.iterator] == "function", F = "[ \n\f\r]", I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Te = /-->/g, Ee = />/g, L = RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), De = /'/g, Oe = /"/g, ke = /^(?:script|style|textarea|title)$/i, R = Symbol.for("lit-noChange"), z = Symbol.for("lit-nothing"), Ae = /* @__PURE__ */ new WeakMap(), B = j.createTreeWalker(j, 129);
|
|
1466
|
+
function je(e, t) {
|
|
1467
|
+
if (!P(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1468
|
+
return Se === void 0 ? t : Se.createHTML(t);
|
|
1461
1469
|
}
|
|
1462
|
-
var
|
|
1463
|
-
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
1470
|
+
var Me = (e, t) => {
|
|
1471
|
+
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = I;
|
|
1464
1472
|
for (let t = 0; t < n; t++) {
|
|
1465
1473
|
let n = e[t], s, c, l = -1, u = 0;
|
|
1466
|
-
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o ===
|
|
1467
|
-
let d = o ===
|
|
1468
|
-
a += o ===
|
|
1474
|
+
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === I ? c[1] === "!--" ? o = Te : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = L) : (ke.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = L) : o = Ee : o === L ? c[0] === ">" ? (o = i ?? I, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? L : c[3] === "\"" ? Oe : De) : o === Oe || o === De ? o = L : o === Te || o === Ee ? o = I : (o = L, i = void 0);
|
|
1475
|
+
let d = o === L && e[t + 1].startsWith("/>") ? " " : "";
|
|
1476
|
+
a += o === I ? n + Ce : l >= 0 ? (r.push(s), n.slice(0, l) + O + n.slice(l) + k + d) : n + k + (l === -2 ? t : d);
|
|
1469
1477
|
}
|
|
1470
|
-
return [
|
|
1471
|
-
},
|
|
1478
|
+
return [je(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
1479
|
+
}, Ne = class e {
|
|
1472
1480
|
constructor({ strings: t, _$litType$: n }, r) {
|
|
1473
1481
|
let i;
|
|
1474
1482
|
this.parts = [];
|
|
1475
|
-
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] =
|
|
1476
|
-
if (this.el = e.createElement(l, r),
|
|
1483
|
+
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Me(t, n);
|
|
1484
|
+
if (this.el = e.createElement(l, r), B.currentNode = this.el.content, n === 2 || n === 3) {
|
|
1477
1485
|
let e = this.el.content.firstChild;
|
|
1478
1486
|
e.replaceWith(...e.childNodes);
|
|
1479
1487
|
}
|
|
1480
|
-
for (; (i =
|
|
1488
|
+
for (; (i = B.nextNode()) !== null && c.length < s;) {
|
|
1481
1489
|
if (i.nodeType === 1) {
|
|
1482
|
-
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(
|
|
1483
|
-
let t = u[o++], n = i.getAttribute(e).split(
|
|
1490
|
+
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(O)) {
|
|
1491
|
+
let t = u[o++], n = i.getAttribute(e).split(k), r = /([.?@])?(.*)/.exec(t);
|
|
1484
1492
|
c.push({
|
|
1485
1493
|
type: 1,
|
|
1486
1494
|
index: a,
|
|
1487
1495
|
name: r[2],
|
|
1488
1496
|
strings: n,
|
|
1489
|
-
ctor: r[1] === "." ?
|
|
1497
|
+
ctor: r[1] === "." ? Ie : r[1] === "?" ? Le : r[1] === "@" ? Re : H
|
|
1490
1498
|
}), i.removeAttribute(e);
|
|
1491
|
-
} else e.startsWith(
|
|
1499
|
+
} else e.startsWith(k) && (c.push({
|
|
1492
1500
|
type: 6,
|
|
1493
1501
|
index: a
|
|
1494
1502
|
}), i.removeAttribute(e));
|
|
1495
|
-
if (
|
|
1496
|
-
let e = i.textContent.split(
|
|
1503
|
+
if (ke.test(i.tagName)) {
|
|
1504
|
+
let e = i.textContent.split(k), t = e.length - 1;
|
|
1497
1505
|
if (t > 0) {
|
|
1498
|
-
i.textContent =
|
|
1499
|
-
for (let n = 0; n < t; n++) i.append(e[n],
|
|
1506
|
+
i.textContent = D ? D.emptyScript : "";
|
|
1507
|
+
for (let n = 0; n < t; n++) i.append(e[n], M()), B.nextNode(), c.push({
|
|
1500
1508
|
type: 2,
|
|
1501
1509
|
index: ++a
|
|
1502
1510
|
});
|
|
1503
|
-
i.append(e[t],
|
|
1511
|
+
i.append(e[t], M());
|
|
1504
1512
|
}
|
|
1505
1513
|
}
|
|
1506
|
-
} else if (i.nodeType === 8) if (i.data ===
|
|
1514
|
+
} else if (i.nodeType === 8) if (i.data === A) c.push({
|
|
1507
1515
|
type: 2,
|
|
1508
1516
|
index: a
|
|
1509
1517
|
});
|
|
1510
1518
|
else {
|
|
1511
1519
|
let e = -1;
|
|
1512
|
-
for (; (e = i.data.indexOf(
|
|
1520
|
+
for (; (e = i.data.indexOf(k, e + 1)) !== -1;) c.push({
|
|
1513
1521
|
type: 7,
|
|
1514
1522
|
index: a
|
|
1515
|
-
}), e +=
|
|
1523
|
+
}), e += k.length - 1;
|
|
1516
1524
|
}
|
|
1517
1525
|
a++;
|
|
1518
1526
|
}
|
|
1519
1527
|
}
|
|
1520
1528
|
static createElement(e, t) {
|
|
1521
|
-
let n =
|
|
1529
|
+
let n = j.createElement("template");
|
|
1522
1530
|
return n.innerHTML = e, n;
|
|
1523
1531
|
}
|
|
1524
1532
|
};
|
|
1525
|
-
function
|
|
1526
|
-
if (t ===
|
|
1527
|
-
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a =
|
|
1528
|
-
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t =
|
|
1533
|
+
function V(e, t, n = e, r) {
|
|
1534
|
+
if (t === R) return t;
|
|
1535
|
+
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = N(t) ? void 0 : t._$litDirective$;
|
|
1536
|
+
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = V(e, i._$AS(e, t.values), i, r)), t;
|
|
1529
1537
|
}
|
|
1530
|
-
var
|
|
1538
|
+
var Pe = class {
|
|
1531
1539
|
constructor(e, t) {
|
|
1532
1540
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
1533
1541
|
}
|
|
@@ -1538,28 +1546,28 @@ var Me = class {
|
|
|
1538
1546
|
return this._$AM._$AU;
|
|
1539
1547
|
}
|
|
1540
1548
|
u(e) {
|
|
1541
|
-
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ??
|
|
1542
|
-
|
|
1543
|
-
let i =
|
|
1549
|
+
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? j).importNode(t, !0);
|
|
1550
|
+
B.currentNode = r;
|
|
1551
|
+
let i = B.nextNode(), a = 0, o = 0, s = n[0];
|
|
1544
1552
|
for (; s !== void 0;) {
|
|
1545
1553
|
if (a === s.index) {
|
|
1546
1554
|
let t;
|
|
1547
|
-
s.type === 2 ? t = new
|
|
1555
|
+
s.type === 2 ? t = new Fe(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new ze(i, this, e)), this._$AV.push(t), s = n[++o];
|
|
1548
1556
|
}
|
|
1549
|
-
a !== s?.index && (i =
|
|
1557
|
+
a !== s?.index && (i = B.nextNode(), a++);
|
|
1550
1558
|
}
|
|
1551
|
-
return
|
|
1559
|
+
return B.currentNode = j, r;
|
|
1552
1560
|
}
|
|
1553
1561
|
p(e) {
|
|
1554
1562
|
let t = 0;
|
|
1555
1563
|
for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
|
|
1556
1564
|
}
|
|
1557
|
-
},
|
|
1565
|
+
}, Fe = class e {
|
|
1558
1566
|
get _$AU() {
|
|
1559
1567
|
return this._$AM?._$AU ?? this._$Cv;
|
|
1560
1568
|
}
|
|
1561
1569
|
constructor(e, t, n, r) {
|
|
1562
|
-
this.type = 2, this._$AH =
|
|
1570
|
+
this.type = 2, this._$AH = z, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
1563
1571
|
}
|
|
1564
1572
|
get parentNode() {
|
|
1565
1573
|
let e = this._$AA.parentNode, t = this._$AM;
|
|
@@ -1572,7 +1580,7 @@ var Me = class {
|
|
|
1572
1580
|
return this._$AB;
|
|
1573
1581
|
}
|
|
1574
1582
|
_$AI(e, t = this) {
|
|
1575
|
-
e =
|
|
1583
|
+
e = V(this, e, t), N(e) ? e === z || e == null || e === "" ? (this._$AH !== z && this._$AR(), this._$AH = z) : e !== this._$AH && e !== R && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? we(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
|
|
1576
1584
|
}
|
|
1577
1585
|
O(e) {
|
|
1578
1586
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -1581,30 +1589,30 @@ var Me = class {
|
|
|
1581
1589
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
1582
1590
|
}
|
|
1583
1591
|
_(e) {
|
|
1584
|
-
this._$AH !==
|
|
1592
|
+
this._$AH !== z && N(this._$AH) ? this._$AA.nextSibling.data = e : this.T(j.createTextNode(e)), this._$AH = e;
|
|
1585
1593
|
}
|
|
1586
1594
|
$(e) {
|
|
1587
|
-
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el =
|
|
1595
|
+
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Ne.createElement(je(n.h, n.h[0]), this.options)), n);
|
|
1588
1596
|
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
1589
1597
|
else {
|
|
1590
|
-
let e = new
|
|
1598
|
+
let e = new Pe(r, this), n = e.u(this.options);
|
|
1591
1599
|
e.p(t), this.T(n), this._$AH = e;
|
|
1592
1600
|
}
|
|
1593
1601
|
}
|
|
1594
1602
|
_$AC(e) {
|
|
1595
|
-
let t =
|
|
1596
|
-
return t === void 0 &&
|
|
1603
|
+
let t = Ae.get(e.strings);
|
|
1604
|
+
return t === void 0 && Ae.set(e.strings, t = new Ne(e)), t;
|
|
1597
1605
|
}
|
|
1598
1606
|
k(t) {
|
|
1599
|
-
|
|
1607
|
+
P(this._$AH) || (this._$AH = [], this._$AR());
|
|
1600
1608
|
let n = this._$AH, r, i = 0;
|
|
1601
|
-
for (let a of t) i === n.length ? n.push(r = new e(this.O(
|
|
1609
|
+
for (let a of t) i === n.length ? n.push(r = new e(this.O(M()), this.O(M()), this, this.options)) : r = n[i], r._$AI(a), i++;
|
|
1602
1610
|
i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
|
|
1603
1611
|
}
|
|
1604
1612
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
1605
1613
|
for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
|
|
1606
|
-
let t =
|
|
1607
|
-
|
|
1614
|
+
let t = xe(e).nextSibling;
|
|
1615
|
+
xe(e).remove(), e = t;
|
|
1608
1616
|
}
|
|
1609
1617
|
}
|
|
1610
1618
|
setConnected(e) {
|
|
@@ -1618,47 +1626,47 @@ var Me = class {
|
|
|
1618
1626
|
return this._$AM._$AU;
|
|
1619
1627
|
}
|
|
1620
1628
|
constructor(e, t, n, r, i) {
|
|
1621
|
-
this.type = 1, this._$AH =
|
|
1629
|
+
this.type = 1, this._$AH = z, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = z;
|
|
1622
1630
|
}
|
|
1623
1631
|
_$AI(e, t = this, n, r) {
|
|
1624
1632
|
let i = this.strings, a = !1;
|
|
1625
|
-
if (i === void 0) e =
|
|
1633
|
+
if (i === void 0) e = V(this, e, t, 0), a = !N(e) || e !== this._$AH && e !== R, a && (this._$AH = e);
|
|
1626
1634
|
else {
|
|
1627
1635
|
let r = e, o, s;
|
|
1628
|
-
for (e = i[0], o = 0; o < i.length - 1; o++) s =
|
|
1636
|
+
for (e = i[0], o = 0; o < i.length - 1; o++) s = V(this, r[n + o], t, o), s === R && (s = this._$AH[o]), a ||= !N(s) || s !== this._$AH[o], s === z ? e = z : e !== z && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
|
|
1629
1637
|
}
|
|
1630
1638
|
a && !r && this.j(e);
|
|
1631
1639
|
}
|
|
1632
1640
|
j(e) {
|
|
1633
|
-
e ===
|
|
1641
|
+
e === z ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
1634
1642
|
}
|
|
1635
|
-
},
|
|
1643
|
+
}, Ie = class extends H {
|
|
1636
1644
|
constructor() {
|
|
1637
1645
|
super(...arguments), this.type = 3;
|
|
1638
1646
|
}
|
|
1639
1647
|
j(e) {
|
|
1640
|
-
this.element[this.name] = e ===
|
|
1648
|
+
this.element[this.name] = e === z ? void 0 : e;
|
|
1641
1649
|
}
|
|
1642
|
-
},
|
|
1650
|
+
}, Le = class extends H {
|
|
1643
1651
|
constructor() {
|
|
1644
1652
|
super(...arguments), this.type = 4;
|
|
1645
1653
|
}
|
|
1646
1654
|
j(e) {
|
|
1647
|
-
this.element.toggleAttribute(this.name, !!e && e !==
|
|
1655
|
+
this.element.toggleAttribute(this.name, !!e && e !== z);
|
|
1648
1656
|
}
|
|
1649
|
-
},
|
|
1657
|
+
}, Re = class extends H {
|
|
1650
1658
|
constructor(e, t, n, r, i) {
|
|
1651
1659
|
super(e, t, n, r, i), this.type = 5;
|
|
1652
1660
|
}
|
|
1653
1661
|
_$AI(e, t = this) {
|
|
1654
|
-
if ((e =
|
|
1655
|
-
let n = this._$AH, r = e ===
|
|
1662
|
+
if ((e = V(this, e, t, 0) ?? z) === R) return;
|
|
1663
|
+
let n = this._$AH, r = e === z && n !== z || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== z && (n === z || r);
|
|
1656
1664
|
r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
1657
1665
|
}
|
|
1658
1666
|
handleEvent(e) {
|
|
1659
1667
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
1660
1668
|
}
|
|
1661
|
-
},
|
|
1669
|
+
}, ze = class {
|
|
1662
1670
|
constructor(e, t, n) {
|
|
1663
1671
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
1664
1672
|
}
|
|
@@ -1666,38 +1674,38 @@ var Me = class {
|
|
|
1666
1674
|
return this._$AM._$AU;
|
|
1667
1675
|
}
|
|
1668
1676
|
_$AI(e) {
|
|
1669
|
-
|
|
1677
|
+
V(this, e);
|
|
1670
1678
|
}
|
|
1671
|
-
},
|
|
1672
|
-
M:
|
|
1673
|
-
P:
|
|
1674
|
-
A
|
|
1679
|
+
}, Be = {
|
|
1680
|
+
M: O,
|
|
1681
|
+
P: k,
|
|
1682
|
+
A,
|
|
1675
1683
|
C: 1,
|
|
1676
|
-
L:
|
|
1677
|
-
R:
|
|
1678
|
-
D:
|
|
1679
|
-
V
|
|
1680
|
-
I:
|
|
1684
|
+
L: Me,
|
|
1685
|
+
R: Pe,
|
|
1686
|
+
D: we,
|
|
1687
|
+
V,
|
|
1688
|
+
I: Fe,
|
|
1681
1689
|
H,
|
|
1682
|
-
N:
|
|
1683
|
-
U:
|
|
1684
|
-
B:
|
|
1685
|
-
F:
|
|
1686
|
-
},
|
|
1687
|
-
|
|
1690
|
+
N: Le,
|
|
1691
|
+
U: Re,
|
|
1692
|
+
B: Ie,
|
|
1693
|
+
F: ze
|
|
1694
|
+
}, Ve = E.litHtmlPolyfillSupport;
|
|
1695
|
+
Ve?.(Ne, Fe), (E.litHtmlVersions ??= []).push("3.3.3");
|
|
1688
1696
|
//#endregion
|
|
1689
1697
|
//#region node_modules/lit-html/directive-helpers.js
|
|
1690
|
-
var { I:
|
|
1698
|
+
var { I: He } = Be, Ue = (e) => e.strings === void 0, We = {
|
|
1691
1699
|
ATTRIBUTE: 1,
|
|
1692
1700
|
CHILD: 2,
|
|
1693
1701
|
PROPERTY: 3,
|
|
1694
1702
|
BOOLEAN_ATTRIBUTE: 4,
|
|
1695
1703
|
EVENT: 5,
|
|
1696
1704
|
ELEMENT: 6
|
|
1697
|
-
},
|
|
1705
|
+
}, Ge = (e) => (...t) => ({
|
|
1698
1706
|
_$litDirective$: e,
|
|
1699
1707
|
values: t
|
|
1700
|
-
}),
|
|
1708
|
+
}), Ke = class {
|
|
1701
1709
|
constructor(e) {}
|
|
1702
1710
|
get _$AU() {
|
|
1703
1711
|
return this._$AM._$AU;
|
|
@@ -1722,37 +1730,37 @@ var { I: ze } = Le, Be = (e) => e.strings === void 0, Ve = {
|
|
|
1722
1730
|
if ((t = e._$AM) === void 0) break;
|
|
1723
1731
|
n = t._$AN, n.delete(e), e = t;
|
|
1724
1732
|
} while (n?.size === 0);
|
|
1725
|
-
},
|
|
1733
|
+
}, qe = (e) => {
|
|
1726
1734
|
for (let t; t = e._$AM; e = t) {
|
|
1727
1735
|
let n = t._$AN;
|
|
1728
1736
|
if (n === void 0) t._$AN = n = /* @__PURE__ */ new Set();
|
|
1729
1737
|
else if (n.has(e)) break;
|
|
1730
|
-
n.add(e),
|
|
1738
|
+
n.add(e), Xe(t);
|
|
1731
1739
|
}
|
|
1732
1740
|
};
|
|
1733
|
-
function
|
|
1734
|
-
this._$AN === void 0 ? this._$AM = e : (W(this), this._$AM = e,
|
|
1741
|
+
function Je(e) {
|
|
1742
|
+
this._$AN === void 0 ? this._$AM = e : (W(this), this._$AM = e, qe(this));
|
|
1735
1743
|
}
|
|
1736
|
-
function
|
|
1744
|
+
function Ye(e, t = !1, n = 0) {
|
|
1737
1745
|
let r = this._$AH, i = this._$AN;
|
|
1738
1746
|
if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let e = n; e < r.length; e++) U(r[e], !1), W(r[e]);
|
|
1739
1747
|
else r != null && (U(r, !1), W(r));
|
|
1740
1748
|
else U(this, e);
|
|
1741
1749
|
}
|
|
1742
|
-
var
|
|
1743
|
-
e.type ==
|
|
1744
|
-
},
|
|
1750
|
+
var Xe = (e) => {
|
|
1751
|
+
e.type == We.CHILD && (e._$AP ??= Ye, e._$AQ ??= Je);
|
|
1752
|
+
}, Ze = class extends Ke {
|
|
1745
1753
|
constructor() {
|
|
1746
1754
|
super(...arguments), this._$AN = void 0;
|
|
1747
1755
|
}
|
|
1748
1756
|
_$AT(e, t, n) {
|
|
1749
|
-
super._$AT(e, t, n),
|
|
1757
|
+
super._$AT(e, t, n), qe(this), this.isConnected = e._$AU;
|
|
1750
1758
|
}
|
|
1751
1759
|
_$AO(e, t = !0) {
|
|
1752
1760
|
e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), t && (U(this, e), W(this));
|
|
1753
1761
|
}
|
|
1754
1762
|
setValue(e) {
|
|
1755
|
-
if (
|
|
1763
|
+
if (Ue(this._$Ct)) this._$Ct._$AI(e, this);
|
|
1756
1764
|
else {
|
|
1757
1765
|
let t = [...this._$Ct._$AH];
|
|
1758
1766
|
t[this._$Ci] = e, this._$Ct._$AI(t, this, 0);
|
|
@@ -1760,22 +1768,22 @@ var qe = (e) => {
|
|
|
1760
1768
|
}
|
|
1761
1769
|
disconnected() {}
|
|
1762
1770
|
reconnected() {}
|
|
1763
|
-
},
|
|
1771
|
+
}, Qe = () => new $e(), $e = class {}, et = /* @__PURE__ */ new WeakMap(), tt = Ge(class extends Ze {
|
|
1764
1772
|
render(e) {
|
|
1765
|
-
return
|
|
1773
|
+
return z;
|
|
1766
1774
|
}
|
|
1767
1775
|
update(e, [t]) {
|
|
1768
1776
|
let n = t !== this.G;
|
|
1769
|
-
return n && this.rt(void 0), (n || this.lt !== this.ct) && (this.G = t, this.ht = e.options?.host, this.rt(this.ct = e.element)),
|
|
1777
|
+
return n && this.rt(void 0), (n || this.lt !== this.ct) && (this.G = t, this.ht = e.options?.host, this.rt(this.ct = e.element)), z;
|
|
1770
1778
|
}
|
|
1771
1779
|
rt(e) {
|
|
1772
1780
|
if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
|
|
1773
|
-
let t = this.ht ?? globalThis, n =
|
|
1774
|
-
n === void 0 && (n = /* @__PURE__ */ new WeakMap(),
|
|
1781
|
+
let t = this.ht ?? globalThis, n = et.get(t);
|
|
1782
|
+
n === void 0 && (n = /* @__PURE__ */ new WeakMap(), et.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
|
|
1775
1783
|
} else this.G.value = e;
|
|
1776
1784
|
}
|
|
1777
1785
|
get lt() {
|
|
1778
|
-
return typeof this.G == "function" ?
|
|
1786
|
+
return typeof this.G == "function" ? et.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
1779
1787
|
}
|
|
1780
1788
|
disconnected() {
|
|
1781
1789
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1785,7 +1793,7 @@ var qe = (e) => {
|
|
|
1785
1793
|
}
|
|
1786
1794
|
}), G = class extends a {
|
|
1787
1795
|
constructor(...e) {
|
|
1788
|
-
super(...e), this.value = "", this.name = "", this.label = "", this.disabled = !1, this.colorInputRef =
|
|
1796
|
+
super(...e), this.value = "", this.name = "", this.label = "", this.disabled = !1, this.colorInputRef = Qe();
|
|
1789
1797
|
}
|
|
1790
1798
|
static {
|
|
1791
1799
|
this.styles = o`
|
|
@@ -1885,7 +1893,7 @@ var qe = (e) => {
|
|
|
1885
1893
|
.value=${e}
|
|
1886
1894
|
?disabled=${this.disabled}
|
|
1887
1895
|
@input=${this.handleColorInput}
|
|
1888
|
-
${
|
|
1896
|
+
${tt(this.colorInputRef)}
|
|
1889
1897
|
/>
|
|
1890
1898
|
<div
|
|
1891
1899
|
class="preview ${this.disabled ? "disabled" : ""}"
|
|
@@ -1904,7 +1912,7 @@ var qe = (e) => {
|
|
|
1904
1912
|
`;
|
|
1905
1913
|
}
|
|
1906
1914
|
};
|
|
1907
|
-
|
|
1915
|
+
x([y({ type: String })], G.prototype, "value", void 0), x([y({ type: String })], G.prototype, "name", void 0), x([y({ type: String })], G.prototype, "label", void 0), x([y({ type: Boolean })], G.prototype, "disabled", void 0), G = x([f("lc-color-picker")], G);
|
|
1908
1916
|
//#endregion
|
|
1909
1917
|
//#region src/components/strength-slider/strength-slider.ts
|
|
1910
1918
|
var K = class extends a {
|
|
@@ -1977,10 +1985,10 @@ var K = class extends a {
|
|
|
1977
1985
|
`;
|
|
1978
1986
|
}
|
|
1979
1987
|
};
|
|
1980
|
-
|
|
1988
|
+
x([y({ type: Number })], K.prototype, "value", void 0), x([y({ type: Number })], K.prototype, "min", void 0), x([y({ type: Number })], K.prototype, "max", void 0), x([y({ type: Number })], K.prototype, "step", void 0), x([y({ type: String })], K.prototype, "name", void 0), x([y({ type: String })], K.prototype, "label", void 0), x([y({ type: Boolean })], K.prototype, "disabled", void 0), K = x([f("lc-strength-slider")], K);
|
|
1981
1989
|
//#endregion
|
|
1982
1990
|
//#region src/components/task-progress-card/task-progress-card.ts
|
|
1983
|
-
var
|
|
1991
|
+
var nt = {
|
|
1984
1992
|
pending: "等待中",
|
|
1985
1993
|
running: "运行中",
|
|
1986
1994
|
done: "已完成",
|
|
@@ -2088,7 +2096,7 @@ var $e = {
|
|
|
2088
2096
|
</div>
|
|
2089
2097
|
<div class="meta">
|
|
2090
2098
|
<span class="status-dot" style=${n}></span>
|
|
2091
|
-
<span part="status">${
|
|
2099
|
+
<span part="status">${nt[this.status]}</span>
|
|
2092
2100
|
${this.queuePos >= 0 ? s`<span class="separator">·</span><span>队列位置: ${this.queuePos}</span>` : null}
|
|
2093
2101
|
</div>
|
|
2094
2102
|
${this.submittedAt ? s`<div class="meta" style="margin-top: var(--lc-spacing-1)">
|
|
@@ -2099,7 +2107,7 @@ var $e = {
|
|
|
2099
2107
|
`;
|
|
2100
2108
|
}
|
|
2101
2109
|
};
|
|
2102
|
-
|
|
2110
|
+
x([y({ type: String })], q.prototype, "taskId", void 0), x([y({ type: String })], q.prototype, "status", void 0), x([y({ type: Number })], q.prototype, "progress", void 0), x([y({ type: Number })], q.prototype, "queuePos", void 0), x([y({ type: String })], q.prototype, "errorMessage", void 0), x([y({ type: Number })], q.prototype, "submittedAt", void 0), q = x([f("lc-task-progress-card")], q);
|
|
2103
2111
|
//#endregion
|
|
2104
2112
|
//#region src/components/result-gallery/result-gallery.ts
|
|
2105
2113
|
var J = class extends a {
|
|
@@ -2220,7 +2228,7 @@ var J = class extends a {
|
|
|
2220
2228
|
`;
|
|
2221
2229
|
}
|
|
2222
2230
|
};
|
|
2223
|
-
|
|
2231
|
+
x([y({ type: String })], J.prototype, "images", void 0), x([y({ type: String })], J.prototype, "originalUrl", void 0), x([y({ type: Boolean })], J.prototype, "showDownload", void 0), J = x([f("lc-result-gallery")], J);
|
|
2224
2232
|
//#endregion
|
|
2225
2233
|
//#region src/components/image-compare-slider/image-compare-slider.ts
|
|
2226
2234
|
var Y = class extends a {
|
|
@@ -2340,7 +2348,7 @@ var Y = class extends a {
|
|
|
2340
2348
|
`;
|
|
2341
2349
|
}
|
|
2342
2350
|
};
|
|
2343
|
-
|
|
2351
|
+
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);
|
|
2344
2352
|
//#endregion
|
|
2345
2353
|
//#region src/components/task-workflow/task-workflow.ts
|
|
2346
2354
|
var X = r, Z = i, Q = class extends a {
|
|
@@ -2368,9 +2376,9 @@ var X = r, Z = i, Q = class extends a {
|
|
|
2368
2376
|
_handleChildChange(e) {
|
|
2369
2377
|
let t = e.target;
|
|
2370
2378
|
if (!(t instanceof HTMLElement)) return;
|
|
2371
|
-
let n =
|
|
2379
|
+
let n = rt(t);
|
|
2372
2380
|
if (!n) return;
|
|
2373
|
-
let r =
|
|
2381
|
+
let r = ot(e) ?? it(t);
|
|
2374
2382
|
r !== void 0 && (t.value = r, this._syncMaskSources(n, r));
|
|
2375
2383
|
}
|
|
2376
2384
|
_syncMaskSources(e, t) {
|
|
@@ -2382,10 +2390,10 @@ var X = r, Z = i, Q = class extends a {
|
|
|
2382
2390
|
collectFormData() {
|
|
2383
2391
|
let e = {}, t = this.querySelectorAll("*"), n = new Map(this.taskFields.map((e) => [e.name, e]));
|
|
2384
2392
|
return t.forEach((t) => {
|
|
2385
|
-
let r =
|
|
2393
|
+
let r = rt(t);
|
|
2386
2394
|
if (!r) return;
|
|
2387
|
-
let i =
|
|
2388
|
-
n.get(r)?.type === "images" && typeof i == "string" && i && (i = [i]), n.get(r)?.type === "multiEnum" && typeof i == "string" && i && (i =
|
|
2395
|
+
let i = at(t);
|
|
2396
|
+
n.get(r)?.type === "images" && typeof i == "string" && i && (i = [i]), n.get(r)?.type === "multiEnum" && typeof i == "string" && i && (i = st(i)), i !== void 0 && (e[r] = i);
|
|
2389
2397
|
}), e;
|
|
2390
2398
|
}
|
|
2391
2399
|
get _activeClient() {
|
|
@@ -2442,32 +2450,32 @@ var X = r, Z = i, Q = class extends a {
|
|
|
2442
2450
|
`;
|
|
2443
2451
|
}
|
|
2444
2452
|
};
|
|
2445
|
-
|
|
2453
|
+
x([y({ type: String })], Q.prototype, "type", void 0), x([y({
|
|
2446
2454
|
type: String,
|
|
2447
2455
|
attribute: "submit-endpoint"
|
|
2448
|
-
})], Q.prototype, "submitEndpoint", void 0),
|
|
2456
|
+
})], Q.prototype, "submitEndpoint", void 0), x([y({
|
|
2449
2457
|
type: String,
|
|
2450
2458
|
attribute: "poll-endpoint"
|
|
2451
|
-
})], Q.prototype, "pollEndpoint", void 0),
|
|
2452
|
-
function
|
|
2459
|
+
})], Q.prototype, "pollEndpoint", void 0), x([y({ type: Number })], Q.prototype, "pollInterval", void 0), x([y({ type: Number })], Q.prototype, "maxPollAttempts", void 0), x([y({ attribute: !1 })], Q.prototype, "client", void 0), x([y({ attribute: !1 })], Q.prototype, "customRequest", void 0), x([y({ attribute: !1 })], Q.prototype, "customUploadRequest", void 0), x([b()], Q.prototype, "phase", void 0), x([b()], Q.prototype, "taskId", void 0), x([b()], Q.prototype, "progress", void 0), x([b()], Q.prototype, "result", void 0), x([b()], Q.prototype, "error", void 0), Q = x([f("lc-task-workflow")], Q);
|
|
2460
|
+
function rt(e) {
|
|
2453
2461
|
return e.name || e.getAttribute("name") || "";
|
|
2454
2462
|
}
|
|
2455
|
-
function
|
|
2463
|
+
function it(e) {
|
|
2456
2464
|
let t = e.value;
|
|
2457
2465
|
if (t !== void 0) return t;
|
|
2458
2466
|
if (e.hasAttribute("value")) return e.getAttribute("value") ?? "";
|
|
2459
2467
|
}
|
|
2460
|
-
function
|
|
2461
|
-
return e.file ||
|
|
2468
|
+
function at(e) {
|
|
2469
|
+
return e.file || it(e);
|
|
2462
2470
|
}
|
|
2463
|
-
function
|
|
2471
|
+
function ot(e) {
|
|
2464
2472
|
let t = e.detail;
|
|
2465
2473
|
if (t) {
|
|
2466
2474
|
if ("value" in t) return t.value;
|
|
2467
2475
|
if ("file" in t) return t.file;
|
|
2468
2476
|
}
|
|
2469
2477
|
}
|
|
2470
|
-
function
|
|
2478
|
+
function st(e) {
|
|
2471
2479
|
try {
|
|
2472
2480
|
let t = JSON.parse(e);
|
|
2473
2481
|
if (Array.isArray(t)) return t.map(String);
|
|
@@ -2527,7 +2535,11 @@ var $ = class extends a {
|
|
|
2527
2535
|
`;
|
|
2528
2536
|
}
|
|
2529
2537
|
handleClick(e) {
|
|
2530
|
-
|
|
2538
|
+
if (this.disabled) {
|
|
2539
|
+
e.preventDefault(), e.stopPropagation();
|
|
2540
|
+
return;
|
|
2541
|
+
}
|
|
2542
|
+
this.type !== "submit" && this.dispatchEvent(new MouseEvent("click", {
|
|
2531
2543
|
bubbles: !0,
|
|
2532
2544
|
composed: !0,
|
|
2533
2545
|
cancelable: !0
|
|
@@ -2541,9 +2553,9 @@ var $ = class extends a {
|
|
|
2541
2553
|
`;
|
|
2542
2554
|
}
|
|
2543
2555
|
};
|
|
2544
|
-
|
|
2556
|
+
x([y({ type: String })], $.prototype, "type", void 0), x([y({
|
|
2545
2557
|
type: String,
|
|
2546
2558
|
reflect: !0
|
|
2547
|
-
})], $.prototype, "variant", void 0),
|
|
2559
|
+
})], $.prototype, "variant", void 0), x([y({ type: Boolean })], $.prototype, "disabled", void 0), $ = x([f("lc-button")], $);
|
|
2548
2560
|
//#endregion
|
|
2549
|
-
export { q as a,
|
|
2561
|
+
export { q as a, T as c, S as d, d as f, J as i, w as l, Q as n, K as o, Y as r, G as s, $ as t, C as u };
|