@opentiny/next-remoter 0.4.1 → 0.4.2
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/next-remoter-runtime.es.js +18793 -18670
- package/dist/next-remoter.cjs.js +8 -8
- package/dist/next-remoter.es.js +480 -471
- package/package.json +2 -2
package/dist/next-remoter.es.js
CHANGED
|
@@ -5091,7 +5091,7 @@ function qu(t, ...r) {
|
|
|
5091
5091
|
[c, ...r].filter(Boolean).join(" ")
|
|
5092
5092
|
), Object.fromEntries(o.entries());
|
|
5093
5093
|
}
|
|
5094
|
-
var Lm = "4.0.
|
|
5094
|
+
var Lm = "4.0.39";
|
|
5095
5095
|
function ll(t) {
|
|
5096
5096
|
return t != null;
|
|
5097
5097
|
}
|
|
@@ -6131,11 +6131,17 @@ function k2(t) {
|
|
|
6131
6131
|
}
|
|
6132
6132
|
function R2(t) {
|
|
6133
6133
|
return uo(
|
|
6134
|
-
() =>
|
|
6135
|
-
t
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6134
|
+
() => {
|
|
6135
|
+
if (!M2(t))
|
|
6136
|
+
throw new Error(
|
|
6137
|
+
`Standard schema vendor '${t["~standard"].vendor}' does not support JSON Schema conversion.`
|
|
6138
|
+
);
|
|
6139
|
+
return Ns(
|
|
6140
|
+
t["~standard"].jsonSchema.input({
|
|
6141
|
+
target: "draft-07"
|
|
6142
|
+
})
|
|
6143
|
+
);
|
|
6144
|
+
},
|
|
6139
6145
|
{
|
|
6140
6146
|
validate: async (r) => {
|
|
6141
6147
|
const o = await t["~standard"].validate(r);
|
|
@@ -6150,7 +6156,10 @@ function R2(t) {
|
|
|
6150
6156
|
}
|
|
6151
6157
|
);
|
|
6152
6158
|
}
|
|
6153
|
-
function M2(t
|
|
6159
|
+
function M2(t) {
|
|
6160
|
+
return t["~standard"].jsonSchema != null;
|
|
6161
|
+
}
|
|
6162
|
+
function D2(t, r) {
|
|
6154
6163
|
var o;
|
|
6155
6164
|
const c = (o = void 0) != null ? o : !1;
|
|
6156
6165
|
return uo(
|
|
@@ -6166,7 +6175,7 @@ function M2(t, r) {
|
|
|
6166
6175
|
}
|
|
6167
6176
|
);
|
|
6168
6177
|
}
|
|
6169
|
-
function
|
|
6178
|
+
function P2(t, r) {
|
|
6170
6179
|
var o;
|
|
6171
6180
|
const c = (o = void 0) != null ? o : !1;
|
|
6172
6181
|
return uo(
|
|
@@ -6186,11 +6195,11 @@ function D2(t, r) {
|
|
|
6186
6195
|
}
|
|
6187
6196
|
);
|
|
6188
6197
|
}
|
|
6189
|
-
function
|
|
6198
|
+
function B2(t) {
|
|
6190
6199
|
return "_zod" in t;
|
|
6191
6200
|
}
|
|
6192
6201
|
function Fe(t, r) {
|
|
6193
|
-
return
|
|
6202
|
+
return B2(t) ? P2(t) : D2(t);
|
|
6194
6203
|
}
|
|
6195
6204
|
async function zt({
|
|
6196
6205
|
value: t,
|
|
@@ -6251,7 +6260,7 @@ async function nd({
|
|
|
6251
6260
|
};
|
|
6252
6261
|
}
|
|
6253
6262
|
}
|
|
6254
|
-
function
|
|
6263
|
+
function L2({
|
|
6255
6264
|
stream: t,
|
|
6256
6265
|
schema: r
|
|
6257
6266
|
}) {
|
|
@@ -6282,7 +6291,7 @@ async function Dn({
|
|
|
6282
6291
|
});
|
|
6283
6292
|
return c.value;
|
|
6284
6293
|
}
|
|
6285
|
-
var
|
|
6294
|
+
var F2 = () => globalThis.fetch, Qn = async ({
|
|
6286
6295
|
url: t,
|
|
6287
6296
|
headers: r,
|
|
6288
6297
|
body: o,
|
|
@@ -6330,7 +6339,7 @@ var L2 = () => globalThis.fetch, Qn = async ({
|
|
|
6330
6339
|
successfulResponseHandler: c,
|
|
6331
6340
|
failedResponseHandler: d,
|
|
6332
6341
|
abortSignal: f,
|
|
6333
|
-
fetch: g =
|
|
6342
|
+
fetch: g = F2()
|
|
6334
6343
|
}) => {
|
|
6335
6344
|
try {
|
|
6336
6345
|
const x = await g(t, {
|
|
@@ -6383,7 +6392,7 @@ var L2 = () => globalThis.fetch, Qn = async ({
|
|
|
6383
6392
|
throw Dm({ error: x, url: t, requestBodyValues: o.values });
|
|
6384
6393
|
}
|
|
6385
6394
|
};
|
|
6386
|
-
function
|
|
6395
|
+
function U2({
|
|
6387
6396
|
id: t,
|
|
6388
6397
|
inputSchema: r
|
|
6389
6398
|
}) {
|
|
@@ -6439,19 +6448,19 @@ function Hn({
|
|
|
6439
6448
|
supportsDeferredResults: c
|
|
6440
6449
|
});
|
|
6441
6450
|
}
|
|
6442
|
-
var
|
|
6451
|
+
var z2 = new TextDecoder();
|
|
6443
6452
|
async function od({
|
|
6444
6453
|
response: t,
|
|
6445
6454
|
url: r
|
|
6446
6455
|
}) {
|
|
6447
|
-
return
|
|
6456
|
+
return z2.decode(
|
|
6448
6457
|
await Gu({
|
|
6449
6458
|
response: t,
|
|
6450
6459
|
url: r
|
|
6451
6460
|
})
|
|
6452
6461
|
);
|
|
6453
6462
|
}
|
|
6454
|
-
var
|
|
6463
|
+
var Z2 = ({
|
|
6455
6464
|
errorSchema: t,
|
|
6456
6465
|
errorToMessage: r,
|
|
6457
6466
|
isRetryable: o
|
|
@@ -6508,7 +6517,7 @@ var z2 = ({
|
|
|
6508
6517
|
throw new sm({});
|
|
6509
6518
|
return {
|
|
6510
6519
|
responseHeaders: o,
|
|
6511
|
-
value:
|
|
6520
|
+
value: L2({
|
|
6512
6521
|
stream: r.body,
|
|
6513
6522
|
schema: t
|
|
6514
6523
|
})
|
|
@@ -6533,7 +6542,7 @@ var z2 = ({
|
|
|
6533
6542
|
value: f.value,
|
|
6534
6543
|
rawValue: f.rawValue
|
|
6535
6544
|
};
|
|
6536
|
-
},
|
|
6545
|
+
}, $2 = () => async ({ response: t, url: r, requestBodyValues: o }) => {
|
|
6537
6546
|
const c = Ei(t);
|
|
6538
6547
|
if (!t.body)
|
|
6539
6548
|
throw new on({
|
|
@@ -6562,7 +6571,7 @@ var z2 = ({
|
|
|
6562
6571
|
});
|
|
6563
6572
|
}
|
|
6564
6573
|
};
|
|
6565
|
-
function
|
|
6574
|
+
function V2(t) {
|
|
6566
6575
|
return t?.replace(/\/$/, "");
|
|
6567
6576
|
}
|
|
6568
6577
|
var Ms = T({
|
|
@@ -6575,7 +6584,7 @@ var Ms = T({
|
|
|
6575
6584
|
param: Or().nullish(),
|
|
6576
6585
|
code: ct([w(), V()]).nullish()
|
|
6577
6586
|
})
|
|
6578
|
-
}), Pn =
|
|
6587
|
+
}), Pn = Z2({
|
|
6579
6588
|
errorSchema: Ms,
|
|
6580
6589
|
errorToMessage: (t) => t.error.message
|
|
6581
6590
|
});
|
|
@@ -6609,7 +6618,7 @@ async function Ds({
|
|
|
6609
6618
|
const b = r(A.value);
|
|
6610
6619
|
if (b != null)
|
|
6611
6620
|
throw x.cancel().catch(() => {
|
|
6612
|
-
}),
|
|
6621
|
+
}), j2({
|
|
6613
6622
|
frame: b,
|
|
6614
6623
|
url: c,
|
|
6615
6624
|
requestBodyValues: d,
|
|
@@ -6623,25 +6632,25 @@ async function Ds({
|
|
|
6623
6632
|
}), _.releaseLock();
|
|
6624
6633
|
}
|
|
6625
6634
|
}
|
|
6626
|
-
function
|
|
6635
|
+
function j2({
|
|
6627
6636
|
frame: t,
|
|
6628
6637
|
url: r,
|
|
6629
6638
|
requestBodyValues: o,
|
|
6630
6639
|
responseHeaders: c
|
|
6631
6640
|
}) {
|
|
6632
6641
|
var d;
|
|
6633
|
-
const f =
|
|
6642
|
+
const f = H2(t);
|
|
6634
6643
|
return new on({
|
|
6635
6644
|
message: (d = f?.message) != null ? d : "OpenAI stream failed before any output was generated",
|
|
6636
6645
|
url: r,
|
|
6637
6646
|
requestBodyValues: o,
|
|
6638
|
-
statusCode: f == null ? 500 :
|
|
6647
|
+
statusCode: f == null ? 500 : W2(f),
|
|
6639
6648
|
responseHeaders: c,
|
|
6640
6649
|
responseBody: JSON.stringify(t),
|
|
6641
6650
|
data: t
|
|
6642
6651
|
});
|
|
6643
6652
|
}
|
|
6644
|
-
function
|
|
6653
|
+
function H2(t) {
|
|
6645
6654
|
var r;
|
|
6646
6655
|
const o = ii(t);
|
|
6647
6656
|
if (o == null)
|
|
@@ -6663,7 +6672,7 @@ function j2(t) {
|
|
|
6663
6672
|
frame: t
|
|
6664
6673
|
} : void 0;
|
|
6665
6674
|
}
|
|
6666
|
-
function
|
|
6675
|
+
function W2(t) {
|
|
6667
6676
|
if (typeof t.code == "number" && hl(t.code))
|
|
6668
6677
|
return t.code;
|
|
6669
6678
|
if (typeof t.code == "string" && /^\d{3}$/.test(t.code)) {
|
|
@@ -6720,14 +6729,14 @@ function pl(t) {
|
|
|
6720
6729
|
raw: t
|
|
6721
6730
|
};
|
|
6722
6731
|
}
|
|
6723
|
-
function
|
|
6732
|
+
function G2(t) {
|
|
6724
6733
|
return JSON.stringify(t === void 0 ? {} : t);
|
|
6725
6734
|
}
|
|
6726
6735
|
function Yn(t) {
|
|
6727
6736
|
var r;
|
|
6728
6737
|
return (r = t?.openai) == null ? void 0 : r.promptCacheBreakpoint;
|
|
6729
6738
|
}
|
|
6730
|
-
function
|
|
6739
|
+
function X2({
|
|
6731
6740
|
prompt: t,
|
|
6732
6741
|
systemMessageMode: r = "system"
|
|
6733
6742
|
}) {
|
|
@@ -6905,7 +6914,7 @@ function G2({
|
|
|
6905
6914
|
type: "function",
|
|
6906
6915
|
function: {
|
|
6907
6916
|
name: S.toolName,
|
|
6908
|
-
arguments:
|
|
6917
|
+
arguments: G2(S.input)
|
|
6909
6918
|
}
|
|
6910
6919
|
});
|
|
6911
6920
|
break;
|
|
@@ -6985,7 +6994,7 @@ function gl(t) {
|
|
|
6985
6994
|
return "other";
|
|
6986
6995
|
}
|
|
6987
6996
|
}
|
|
6988
|
-
var
|
|
6997
|
+
var q2 = Ue(
|
|
6989
6998
|
() => Fe(
|
|
6990
6999
|
T({
|
|
6991
7000
|
id: w().nullish(),
|
|
@@ -7052,7 +7061,7 @@ var X2 = Ue(
|
|
|
7052
7061
|
}).nullish()
|
|
7053
7062
|
})
|
|
7054
7063
|
)
|
|
7055
|
-
),
|
|
7064
|
+
), Y2 = Ue(
|
|
7056
7065
|
() => Fe(
|
|
7057
7066
|
ct([
|
|
7058
7067
|
T({
|
|
@@ -7123,7 +7132,7 @@ var X2 = Ue(
|
|
|
7123
7132
|
Ms
|
|
7124
7133
|
])
|
|
7125
7134
|
)
|
|
7126
|
-
),
|
|
7135
|
+
), K2 = Ue(
|
|
7127
7136
|
() => Fe(
|
|
7128
7137
|
T({
|
|
7129
7138
|
/**
|
|
@@ -7249,7 +7258,7 @@ var X2 = Ue(
|
|
|
7249
7258
|
})
|
|
7250
7259
|
)
|
|
7251
7260
|
);
|
|
7252
|
-
function
|
|
7261
|
+
function J2({
|
|
7253
7262
|
tools: t,
|
|
7254
7263
|
toolChoice: r
|
|
7255
7264
|
}) {
|
|
@@ -7305,7 +7314,7 @@ function K2({
|
|
|
7305
7314
|
}
|
|
7306
7315
|
}
|
|
7307
7316
|
}
|
|
7308
|
-
var
|
|
7317
|
+
var Q2 = class {
|
|
7309
7318
|
constructor(t, r) {
|
|
7310
7319
|
this.specificationVersion = "v3", this.supportedUrls = {
|
|
7311
7320
|
"image/*": [/^https?:\/\/.*$/]
|
|
@@ -7333,10 +7342,10 @@ var J2 = class {
|
|
|
7333
7342
|
const $ = [], L = (S = await Dn({
|
|
7334
7343
|
provider: "openai",
|
|
7335
7344
|
providerOptions: M,
|
|
7336
|
-
schema:
|
|
7345
|
+
schema: K2
|
|
7337
7346
|
})) != null ? S : {}, ne = sd(this.modelId), Z = (I = L.forceReasoning) != null ? I : ne.isReasoningModel;
|
|
7338
7347
|
d != null && $.push({ type: "unsupported", feature: "topK" });
|
|
7339
|
-
const { messages: P, warnings: B } =
|
|
7348
|
+
const { messages: P, warnings: B } = X2(
|
|
7340
7349
|
{
|
|
7341
7350
|
prompt: t,
|
|
7342
7351
|
systemMessageMode: (D = L.systemMessageMode) != null ? D : Z ? "developer" : ne.systemMessageMode
|
|
@@ -7427,7 +7436,7 @@ var J2 = class {
|
|
|
7427
7436
|
tools: ye,
|
|
7428
7437
|
toolChoice: W,
|
|
7429
7438
|
toolWarnings: pe
|
|
7430
|
-
} =
|
|
7439
|
+
} = J2({
|
|
7431
7440
|
tools: A,
|
|
7432
7441
|
toolChoice: b
|
|
7433
7442
|
});
|
|
@@ -7455,7 +7464,7 @@ var J2 = class {
|
|
|
7455
7464
|
body: _,
|
|
7456
7465
|
failedResponseHandler: Pn,
|
|
7457
7466
|
successfulResponseHandler: Sr(
|
|
7458
|
-
|
|
7467
|
+
q2
|
|
7459
7468
|
),
|
|
7460
7469
|
abortSignal: t.abortSignal,
|
|
7461
7470
|
fetch: this.config.fetch
|
|
@@ -7512,14 +7521,14 @@ var J2 = class {
|
|
|
7512
7521
|
body: c,
|
|
7513
7522
|
failedResponseHandler: Pn,
|
|
7514
7523
|
successfulResponseHandler: Rs(
|
|
7515
|
-
|
|
7524
|
+
Y2
|
|
7516
7525
|
),
|
|
7517
7526
|
abortSignal: t.abortSignal,
|
|
7518
7527
|
fetch: this.config.fetch
|
|
7519
7528
|
}), x = await Ds({
|
|
7520
7529
|
stream: g,
|
|
7521
7530
|
getError: (D) => "error" in D ? D.error : void 0,
|
|
7522
|
-
isOutputChunk:
|
|
7531
|
+
isOutputChunk: ex,
|
|
7523
7532
|
url: d,
|
|
7524
7533
|
requestBodyValues: c,
|
|
7525
7534
|
responseHeaders: f
|
|
@@ -7649,7 +7658,7 @@ var J2 = class {
|
|
|
7649
7658
|
};
|
|
7650
7659
|
}
|
|
7651
7660
|
};
|
|
7652
|
-
function
|
|
7661
|
+
function ex(t) {
|
|
7653
7662
|
return "error" in t ? !1 : t.choices.some((r) => {
|
|
7654
7663
|
const o = r.delta;
|
|
7655
7664
|
return o?.content != null && o.content.length > 0 || o?.tool_calls != null && o.tool_calls.length > 0 || o?.annotations != null && o.annotations.length > 0;
|
|
@@ -7688,7 +7697,7 @@ function ml(t) {
|
|
|
7688
7697
|
raw: t
|
|
7689
7698
|
};
|
|
7690
7699
|
}
|
|
7691
|
-
function
|
|
7700
|
+
function tx({
|
|
7692
7701
|
prompt: t,
|
|
7693
7702
|
user: r = "user",
|
|
7694
7703
|
assistant: o = "assistant"
|
|
@@ -7776,7 +7785,7 @@ function yl(t) {
|
|
|
7776
7785
|
return "other";
|
|
7777
7786
|
}
|
|
7778
7787
|
}
|
|
7779
|
-
var
|
|
7788
|
+
var nx = Ue(
|
|
7780
7789
|
() => Fe(
|
|
7781
7790
|
T({
|
|
7782
7791
|
id: w().nullish(),
|
|
@@ -7800,7 +7809,7 @@ var tx = Ue(
|
|
|
7800
7809
|
}).nullish()
|
|
7801
7810
|
})
|
|
7802
7811
|
)
|
|
7803
|
-
),
|
|
7812
|
+
), rx = Ue(
|
|
7804
7813
|
() => Fe(
|
|
7805
7814
|
ct([
|
|
7806
7815
|
T({
|
|
@@ -7871,7 +7880,7 @@ var tx = Ue(
|
|
|
7871
7880
|
logprobs: ct([Ut(), V()]).optional()
|
|
7872
7881
|
})
|
|
7873
7882
|
)
|
|
7874
|
-
),
|
|
7883
|
+
), ix = class {
|
|
7875
7884
|
constructor(t, r) {
|
|
7876
7885
|
this.specificationVersion = "v3", this.supportedUrls = {
|
|
7877
7886
|
// No URLs are supported for completion models.
|
|
@@ -7915,7 +7924,7 @@ var tx = Ue(
|
|
|
7915
7924
|
feature: "responseFormat",
|
|
7916
7925
|
details: "JSON response format is not supported."
|
|
7917
7926
|
});
|
|
7918
|
-
const { prompt: D, stopSequences: R } =
|
|
7927
|
+
const { prompt: D, stopSequences: R } = tx({ prompt: t }), Q = [...R ?? [], ...x ?? []];
|
|
7919
7928
|
return {
|
|
7920
7929
|
args: {
|
|
7921
7930
|
// model id:
|
|
@@ -7956,7 +7965,7 @@ var tx = Ue(
|
|
|
7956
7965
|
body: o,
|
|
7957
7966
|
failedResponseHandler: Pn,
|
|
7958
7967
|
successfulResponseHandler: Sr(
|
|
7959
|
-
|
|
7968
|
+
nx
|
|
7960
7969
|
),
|
|
7961
7970
|
abortSignal: t.abortSignal,
|
|
7962
7971
|
fetch: this.config.fetch
|
|
@@ -7994,14 +8003,14 @@ var tx = Ue(
|
|
|
7994
8003
|
body: c,
|
|
7995
8004
|
failedResponseHandler: Pn,
|
|
7996
8005
|
successfulResponseHandler: Rs(
|
|
7997
|
-
|
|
8006
|
+
rx
|
|
7998
8007
|
),
|
|
7999
8008
|
abortSignal: t.abortSignal,
|
|
8000
8009
|
fetch: this.config.fetch
|
|
8001
8010
|
}), x = await Ds({
|
|
8002
8011
|
stream: g,
|
|
8003
8012
|
getError: (S) => "error" in S ? S.error : void 0,
|
|
8004
|
-
isOutputChunk:
|
|
8013
|
+
isOutputChunk: ox,
|
|
8005
8014
|
url: d,
|
|
8006
8015
|
requestBodyValues: c,
|
|
8007
8016
|
responseHeaders: f
|
|
@@ -8057,10 +8066,10 @@ var tx = Ue(
|
|
|
8057
8066
|
};
|
|
8058
8067
|
}
|
|
8059
8068
|
};
|
|
8060
|
-
function
|
|
8069
|
+
function ox(t) {
|
|
8061
8070
|
return !("error" in t) && t.choices.some((r) => r.text.length > 0);
|
|
8062
8071
|
}
|
|
8063
|
-
var
|
|
8072
|
+
var sx = Ue(
|
|
8064
8073
|
() => Fe(
|
|
8065
8074
|
T({
|
|
8066
8075
|
/**
|
|
@@ -8075,14 +8084,14 @@ var ox = Ue(
|
|
|
8075
8084
|
user: w().optional()
|
|
8076
8085
|
})
|
|
8077
8086
|
)
|
|
8078
|
-
),
|
|
8087
|
+
), ax = Ue(
|
|
8079
8088
|
() => Fe(
|
|
8080
8089
|
T({
|
|
8081
8090
|
data: ce(T({ embedding: ce(V()) })),
|
|
8082
8091
|
usage: T({ prompt_tokens: V() }).nullish()
|
|
8083
8092
|
})
|
|
8084
8093
|
)
|
|
8085
|
-
),
|
|
8094
|
+
), lx = class {
|
|
8086
8095
|
constructor(t, r) {
|
|
8087
8096
|
this.specificationVersion = "v3", this.maxEmbeddingsPerCall = 2048, this.supportsParallelCalls = !0, this.modelId = t, this.config = r;
|
|
8088
8097
|
}
|
|
@@ -8106,7 +8115,7 @@ var ox = Ue(
|
|
|
8106
8115
|
const f = (d = await Dn({
|
|
8107
8116
|
provider: "openai",
|
|
8108
8117
|
providerOptions: c,
|
|
8109
|
-
schema:
|
|
8118
|
+
schema: sx
|
|
8110
8119
|
})) != null ? d : {}, {
|
|
8111
8120
|
responseHeaders: g,
|
|
8112
8121
|
value: x,
|
|
@@ -8126,7 +8135,7 @@ var ox = Ue(
|
|
|
8126
8135
|
},
|
|
8127
8136
|
failedResponseHandler: Pn,
|
|
8128
8137
|
successfulResponseHandler: Sr(
|
|
8129
|
-
|
|
8138
|
+
ax
|
|
8130
8139
|
),
|
|
8131
8140
|
abortSignal: o,
|
|
8132
8141
|
fetch: this.config.fetch
|
|
@@ -8163,7 +8172,7 @@ var ox = Ue(
|
|
|
8163
8172
|
}).nullish()
|
|
8164
8173
|
})
|
|
8165
8174
|
)
|
|
8166
|
-
),
|
|
8175
|
+
), cx = {
|
|
8167
8176
|
"dall-e-3": 1,
|
|
8168
8177
|
"dall-e-2": 10,
|
|
8169
8178
|
"gpt-image-1": 10,
|
|
@@ -8171,15 +8180,15 @@ var ox = Ue(
|
|
|
8171
8180
|
"gpt-image-1.5": 10,
|
|
8172
8181
|
"gpt-image-2": 10,
|
|
8173
8182
|
"chatgpt-image-latest": 10
|
|
8174
|
-
},
|
|
8183
|
+
}, ux = [
|
|
8175
8184
|
"chatgpt-image-",
|
|
8176
8185
|
"gpt-image-1-mini",
|
|
8177
8186
|
"gpt-image-1.5",
|
|
8178
8187
|
"gpt-image-1",
|
|
8179
8188
|
"gpt-image-2"
|
|
8180
8189
|
];
|
|
8181
|
-
function
|
|
8182
|
-
return
|
|
8190
|
+
function dx(t) {
|
|
8191
|
+
return ux.some(
|
|
8183
8192
|
(r) => t.startsWith(r)
|
|
8184
8193
|
);
|
|
8185
8194
|
}
|
|
@@ -8211,7 +8220,7 @@ var ad = T({
|
|
|
8211
8220
|
* to monitor and detect abuse.
|
|
8212
8221
|
*/
|
|
8213
8222
|
user: w().optional()
|
|
8214
|
-
}),
|
|
8223
|
+
}), fx = Ue(
|
|
8215
8224
|
() => Fe(
|
|
8216
8225
|
ad.extend({
|
|
8217
8226
|
/**
|
|
@@ -8227,7 +8236,7 @@ var ad = T({
|
|
|
8227
8236
|
moderation: Ae(["auto", "low"]).optional()
|
|
8228
8237
|
})
|
|
8229
8238
|
)
|
|
8230
|
-
),
|
|
8239
|
+
), hx = Ue(
|
|
8231
8240
|
() => Fe(
|
|
8232
8241
|
ad.extend({
|
|
8233
8242
|
/**
|
|
@@ -8236,13 +8245,13 @@ var ad = T({
|
|
|
8236
8245
|
inputFidelity: Ae(["high", "low"]).optional()
|
|
8237
8246
|
})
|
|
8238
8247
|
)
|
|
8239
|
-
),
|
|
8248
|
+
), px = class {
|
|
8240
8249
|
constructor(t, r) {
|
|
8241
8250
|
this.modelId = t, this.config = r, this.specificationVersion = "v3";
|
|
8242
8251
|
}
|
|
8243
8252
|
get maxImagesPerCall() {
|
|
8244
8253
|
var t;
|
|
8245
|
-
return (t =
|
|
8254
|
+
return (t = cx[this.modelId]) != null ? t : 1;
|
|
8246
8255
|
}
|
|
8247
8256
|
get provider() {
|
|
8248
8257
|
return this.config.provider;
|
|
@@ -8271,7 +8280,7 @@ var ad = T({
|
|
|
8271
8280
|
const ye = (S = await Dn({
|
|
8272
8281
|
provider: "openai",
|
|
8273
8282
|
providerOptions: x,
|
|
8274
|
-
schema:
|
|
8283
|
+
schema: hx
|
|
8275
8284
|
})) != null ? S : {}, { value: W, responseHeaders: pe } = await rd({
|
|
8276
8285
|
url: this.config.url({
|
|
8277
8286
|
path: "/images/edits",
|
|
@@ -8295,7 +8304,7 @@ var ad = T({
|
|
|
8295
8304
|
) : Xu(de.url)
|
|
8296
8305
|
)
|
|
8297
8306
|
),
|
|
8298
|
-
mask: o != null ? await
|
|
8307
|
+
mask: o != null ? await gx(o) : void 0,
|
|
8299
8308
|
n: c,
|
|
8300
8309
|
size: d,
|
|
8301
8310
|
quality: ye.quality,
|
|
@@ -8350,7 +8359,7 @@ var ad = T({
|
|
|
8350
8359
|
const B = (Q = await Dn({
|
|
8351
8360
|
provider: "openai",
|
|
8352
8361
|
providerOptions: x,
|
|
8353
|
-
schema:
|
|
8362
|
+
schema: fx
|
|
8354
8363
|
})) != null ? Q : {}, { value: H, responseHeaders: U } = await Qn({
|
|
8355
8364
|
url: this.config.url({
|
|
8356
8365
|
path: "/images/generations",
|
|
@@ -8369,7 +8378,7 @@ var ad = T({
|
|
|
8369
8378
|
output_format: B.outputFormat,
|
|
8370
8379
|
output_compression: B.outputCompression,
|
|
8371
8380
|
user: B.user,
|
|
8372
|
-
...
|
|
8381
|
+
...dx(this.modelId) ? {} : { response_format: "b64_json" }
|
|
8373
8382
|
},
|
|
8374
8383
|
failedResponseHandler: Pn,
|
|
8375
8384
|
successfulResponseHandler: Sr(
|
|
@@ -8428,7 +8437,7 @@ function vl(t, r, o) {
|
|
|
8428
8437
|
}
|
|
8429
8438
|
return c;
|
|
8430
8439
|
}
|
|
8431
|
-
async function
|
|
8440
|
+
async function gx(t) {
|
|
8432
8441
|
if (!t) return;
|
|
8433
8442
|
if (t.type === "url")
|
|
8434
8443
|
return Xu(t.url);
|
|
@@ -8464,18 +8473,18 @@ var ld = Ue(
|
|
|
8464
8473
|
output: w().optional()
|
|
8465
8474
|
})
|
|
8466
8475
|
)
|
|
8467
|
-
),
|
|
8476
|
+
), mx = Hn({
|
|
8468
8477
|
id: "openai.apply_patch",
|
|
8469
8478
|
inputSchema: ld,
|
|
8470
8479
|
outputSchema: cd
|
|
8471
|
-
}),
|
|
8480
|
+
}), xx = mx, yx = Ue(
|
|
8472
8481
|
() => Fe(
|
|
8473
8482
|
T({
|
|
8474
8483
|
code: w().nullish(),
|
|
8475
8484
|
containerId: w()
|
|
8476
8485
|
})
|
|
8477
8486
|
)
|
|
8478
|
-
),
|
|
8487
|
+
), wx = Ue(
|
|
8479
8488
|
() => Fe(
|
|
8480
8489
|
T({
|
|
8481
8490
|
outputs: ce(
|
|
@@ -8486,7 +8495,7 @@ var ld = Ue(
|
|
|
8486
8495
|
).nullish()
|
|
8487
8496
|
})
|
|
8488
8497
|
)
|
|
8489
|
-
),
|
|
8498
|
+
), _x = Ue(
|
|
8490
8499
|
() => Fe(
|
|
8491
8500
|
T({
|
|
8492
8501
|
container: ct([
|
|
@@ -8497,11 +8506,11 @@ var ld = Ue(
|
|
|
8497
8506
|
]).optional()
|
|
8498
8507
|
})
|
|
8499
8508
|
)
|
|
8500
|
-
),
|
|
8509
|
+
), vx = Hn({
|
|
8501
8510
|
id: "openai.code_interpreter",
|
|
8502
|
-
inputSchema:
|
|
8503
|
-
outputSchema:
|
|
8504
|
-
}),
|
|
8511
|
+
inputSchema: yx,
|
|
8512
|
+
outputSchema: wx
|
|
8513
|
+
}), Cx = (t = {}) => vx(t), bx = Ue(
|
|
8505
8514
|
() => Fe(
|
|
8506
8515
|
T({
|
|
8507
8516
|
name: w(),
|
|
@@ -8518,10 +8527,10 @@ var ld = Ue(
|
|
|
8518
8527
|
]).optional()
|
|
8519
8528
|
})
|
|
8520
8529
|
)
|
|
8521
|
-
),
|
|
8530
|
+
), Ax = Ue(() => Fe(w())), Ex = U2({
|
|
8522
8531
|
id: "openai.custom",
|
|
8523
|
-
inputSchema:
|
|
8524
|
-
}),
|
|
8532
|
+
inputSchema: Ax
|
|
8533
|
+
}), Ix = (t) => Ex(t), ud = T({
|
|
8525
8534
|
key: w(),
|
|
8526
8535
|
type: Ae(["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin"]),
|
|
8527
8536
|
value: ct([w(), V(), Ut(), ce(w())])
|
|
@@ -8530,7 +8539,7 @@ var ld = Ue(
|
|
|
8530
8539
|
filters: ce(
|
|
8531
8540
|
ct([ud, Is(() => dd)])
|
|
8532
8541
|
)
|
|
8533
|
-
}),
|
|
8542
|
+
}), Sx = Ue(
|
|
8534
8543
|
() => Fe(
|
|
8535
8544
|
T({
|
|
8536
8545
|
vectorStoreIds: ce(w()),
|
|
@@ -8542,7 +8551,7 @@ var ld = Ue(
|
|
|
8542
8551
|
filters: ct([ud, dd]).optional()
|
|
8543
8552
|
})
|
|
8544
8553
|
)
|
|
8545
|
-
),
|
|
8554
|
+
), Tx = Ue(
|
|
8546
8555
|
() => Fe(
|
|
8547
8556
|
T({
|
|
8548
8557
|
queries: ce(w()),
|
|
@@ -8557,11 +8566,11 @@ var ld = Ue(
|
|
|
8557
8566
|
).nullable()
|
|
8558
8567
|
})
|
|
8559
8568
|
)
|
|
8560
|
-
),
|
|
8569
|
+
), Ox = Hn({
|
|
8561
8570
|
id: "openai.file_search",
|
|
8562
8571
|
inputSchema: T({}),
|
|
8563
|
-
outputSchema:
|
|
8564
|
-
}),
|
|
8572
|
+
outputSchema: Tx
|
|
8573
|
+
}), Nx = Ue(
|
|
8565
8574
|
() => Fe(
|
|
8566
8575
|
T({
|
|
8567
8576
|
background: Ae(["auto", "opaque", "transparent"]).optional(),
|
|
@@ -8579,13 +8588,13 @@ var ld = Ue(
|
|
|
8579
8588
|
size: Ae(["1024x1024", "1024x1536", "1536x1024", "auto"]).optional()
|
|
8580
8589
|
}).strict()
|
|
8581
8590
|
)
|
|
8582
|
-
),
|
|
8591
|
+
), kx = Ue(() => Fe(T({}))), Rx = Ue(
|
|
8583
8592
|
() => Fe(T({ result: w() }))
|
|
8584
|
-
),
|
|
8593
|
+
), Mx = Hn({
|
|
8585
8594
|
id: "openai.image_generation",
|
|
8586
|
-
inputSchema:
|
|
8587
|
-
outputSchema:
|
|
8588
|
-
}),
|
|
8595
|
+
inputSchema: kx,
|
|
8596
|
+
outputSchema: Rx
|
|
8597
|
+
}), Dx = (t = {}) => Mx(t), fd = Ue(
|
|
8589
8598
|
() => Fe(
|
|
8590
8599
|
T({
|
|
8591
8600
|
action: T({
|
|
@@ -8600,7 +8609,7 @@ var ld = Ue(
|
|
|
8600
8609
|
)
|
|
8601
8610
|
), hd = Ue(
|
|
8602
8611
|
() => Fe(T({ output: w() }))
|
|
8603
|
-
),
|
|
8612
|
+
), Px = Hn({
|
|
8604
8613
|
id: "openai.local_shell",
|
|
8605
8614
|
inputSchema: fd,
|
|
8606
8615
|
outputSchema: hd
|
|
@@ -8629,7 +8638,7 @@ var ld = Ue(
|
|
|
8629
8638
|
)
|
|
8630
8639
|
})
|
|
8631
8640
|
)
|
|
8632
|
-
),
|
|
8641
|
+
), Bx = ce(
|
|
8633
8642
|
wt("type", [
|
|
8634
8643
|
T({
|
|
8635
8644
|
type: q("skillReference"),
|
|
@@ -8647,7 +8656,7 @@ var ld = Ue(
|
|
|
8647
8656
|
})
|
|
8648
8657
|
})
|
|
8649
8658
|
])
|
|
8650
|
-
).optional(),
|
|
8659
|
+
).optional(), Lx = Ue(
|
|
8651
8660
|
() => Fe(
|
|
8652
8661
|
T({
|
|
8653
8662
|
environment: ct([
|
|
@@ -8669,7 +8678,7 @@ var ld = Ue(
|
|
|
8669
8678
|
).optional()
|
|
8670
8679
|
})
|
|
8671
8680
|
]).optional(),
|
|
8672
|
-
skills:
|
|
8681
|
+
skills: Bx
|
|
8673
8682
|
}),
|
|
8674
8683
|
T({
|
|
8675
8684
|
type: q("containerReference"),
|
|
@@ -8688,11 +8697,11 @@ var ld = Ue(
|
|
|
8688
8697
|
]).optional()
|
|
8689
8698
|
})
|
|
8690
8699
|
)
|
|
8691
|
-
),
|
|
8700
|
+
), Fx = Hn({
|
|
8692
8701
|
id: "openai.shell",
|
|
8693
8702
|
inputSchema: pd,
|
|
8694
8703
|
outputSchema: os
|
|
8695
|
-
}),
|
|
8704
|
+
}), Ux = Ue(
|
|
8696
8705
|
() => Fe(
|
|
8697
8706
|
T({
|
|
8698
8707
|
execution: Ae(["server", "client"]).optional(),
|
|
@@ -8713,11 +8722,11 @@ var ld = Ue(
|
|
|
8713
8722
|
tools: ce(At(w(), Rn()))
|
|
8714
8723
|
})
|
|
8715
8724
|
)
|
|
8716
|
-
),
|
|
8725
|
+
), zx = Hn({
|
|
8717
8726
|
id: "openai.tool_search",
|
|
8718
8727
|
inputSchema: ss,
|
|
8719
8728
|
outputSchema: as
|
|
8720
|
-
}),
|
|
8729
|
+
}), Zx = (t = {}) => zx(t), $x = Ue(
|
|
8721
8730
|
() => Fe(
|
|
8722
8731
|
T({
|
|
8723
8732
|
externalWebAccess: Ut().optional(),
|
|
@@ -8732,7 +8741,7 @@ var ld = Ue(
|
|
|
8732
8741
|
}).optional()
|
|
8733
8742
|
})
|
|
8734
8743
|
)
|
|
8735
|
-
),
|
|
8744
|
+
), Vx = Ue(() => Fe(T({}))), jx = Ue(
|
|
8736
8745
|
() => Fe(
|
|
8737
8746
|
T({
|
|
8738
8747
|
action: wt("type", [
|
|
@@ -8759,11 +8768,11 @@ var ld = Ue(
|
|
|
8759
8768
|
).optional()
|
|
8760
8769
|
})
|
|
8761
8770
|
)
|
|
8762
|
-
),
|
|
8771
|
+
), Hx = Hn({
|
|
8763
8772
|
id: "openai.web_search",
|
|
8764
|
-
inputSchema:
|
|
8765
|
-
outputSchema:
|
|
8766
|
-
}),
|
|
8773
|
+
inputSchema: Vx,
|
|
8774
|
+
outputSchema: jx
|
|
8775
|
+
}), Wx = (t = {}) => Hx(t), Gx = Ue(
|
|
8767
8776
|
() => Fe(
|
|
8768
8777
|
T({
|
|
8769
8778
|
searchContextSize: Ae(["low", "medium", "high"]).optional(),
|
|
@@ -8776,9 +8785,9 @@ var ld = Ue(
|
|
|
8776
8785
|
}).optional()
|
|
8777
8786
|
})
|
|
8778
8787
|
)
|
|
8779
|
-
), Gx = Ue(
|
|
8780
|
-
() => Fe(T({}))
|
|
8781
8788
|
), Xx = Ue(
|
|
8789
|
+
() => Fe(T({}))
|
|
8790
|
+
), qx = Ue(
|
|
8782
8791
|
() => Fe(
|
|
8783
8792
|
T({
|
|
8784
8793
|
action: wt("type", [
|
|
@@ -8798,10 +8807,10 @@ var ld = Ue(
|
|
|
8798
8807
|
]).optional()
|
|
8799
8808
|
})
|
|
8800
8809
|
)
|
|
8801
|
-
),
|
|
8810
|
+
), Yx = Hn({
|
|
8802
8811
|
id: "openai.web_search_preview",
|
|
8803
|
-
inputSchema:
|
|
8804
|
-
outputSchema:
|
|
8812
|
+
inputSchema: Xx,
|
|
8813
|
+
outputSchema: qx
|
|
8805
8814
|
}), ls = Is(
|
|
8806
8815
|
() => ct([
|
|
8807
8816
|
w(),
|
|
@@ -8811,7 +8820,7 @@ var ld = Ue(
|
|
|
8811
8820
|
ce(ls),
|
|
8812
8821
|
At(w(), ls)
|
|
8813
8822
|
])
|
|
8814
|
-
),
|
|
8823
|
+
), Kx = Ue(
|
|
8815
8824
|
() => Fe(
|
|
8816
8825
|
T({
|
|
8817
8826
|
serverLabel: w(),
|
|
@@ -8840,7 +8849,7 @@ var ld = Ue(
|
|
|
8840
8849
|
"One of serverUrl or connectorId must be provided."
|
|
8841
8850
|
)
|
|
8842
8851
|
)
|
|
8843
|
-
),
|
|
8852
|
+
), Jx = Ue(() => Fe(T({}))), Qx = Ue(
|
|
8844
8853
|
() => Fe(
|
|
8845
8854
|
T({
|
|
8846
8855
|
type: q("call"),
|
|
@@ -8851,11 +8860,11 @@ var ld = Ue(
|
|
|
8851
8860
|
error: ct([w(), ls]).optional()
|
|
8852
8861
|
})
|
|
8853
8862
|
)
|
|
8854
|
-
),
|
|
8863
|
+
), ey = Hn({
|
|
8855
8864
|
id: "openai.mcp",
|
|
8856
|
-
inputSchema:
|
|
8857
|
-
outputSchema:
|
|
8858
|
-
}),
|
|
8865
|
+
inputSchema: Jx,
|
|
8866
|
+
outputSchema: Qx
|
|
8867
|
+
}), ty = (t) => ey(t), ny = {
|
|
8859
8868
|
/**
|
|
8860
8869
|
* The apply_patch tool lets GPT-5.1 create, update, and delete files in your
|
|
8861
8870
|
* codebase using structured diffs. Instead of just suggesting edits, the model
|
|
@@ -8863,7 +8872,7 @@ var ld = Ue(
|
|
|
8863
8872
|
* enabling iterative, multi-step code editing workflows.
|
|
8864
8873
|
*
|
|
8865
8874
|
*/
|
|
8866
|
-
applyPatch:
|
|
8875
|
+
applyPatch: xx,
|
|
8867
8876
|
/**
|
|
8868
8877
|
* Custom tools let callers constrain model output to a grammar (regex or
|
|
8869
8878
|
* Lark syntax). The model returns a `custom_tool_call` output item whose
|
|
@@ -8873,7 +8882,7 @@ var ld = Ue(
|
|
|
8873
8882
|
* @param description - An optional description of the tool.
|
|
8874
8883
|
* @param format - The output format constraint (grammar type, syntax, and definition).
|
|
8875
8884
|
*/
|
|
8876
|
-
customTool:
|
|
8885
|
+
customTool: Ix,
|
|
8877
8886
|
/**
|
|
8878
8887
|
* The Code Interpreter tool allows models to write and run Python code in a
|
|
8879
8888
|
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
@@ -8881,7 +8890,7 @@ var ld = Ue(
|
|
|
8881
8890
|
*
|
|
8882
8891
|
* @param container - The container to use for the code interpreter.
|
|
8883
8892
|
*/
|
|
8884
|
-
codeInterpreter:
|
|
8893
|
+
codeInterpreter: Cx,
|
|
8885
8894
|
/**
|
|
8886
8895
|
* File search is a tool available in the Responses API. It enables models to
|
|
8887
8896
|
* retrieve information in a knowledge base of previously uploaded files through
|
|
@@ -8892,7 +8901,7 @@ var ld = Ue(
|
|
|
8892
8901
|
* @param ranking - The ranking options to use for the file search.
|
|
8893
8902
|
* @param filters - The filters to use for the file search.
|
|
8894
8903
|
*/
|
|
8895
|
-
fileSearch:
|
|
8904
|
+
fileSearch: Ox,
|
|
8896
8905
|
/**
|
|
8897
8906
|
* The image generation tool allows you to generate images using a text prompt,
|
|
8898
8907
|
* and optionally image inputs. It leverages the GPT Image model,
|
|
@@ -8909,14 +8918,14 @@ var ld = Ue(
|
|
|
8909
8918
|
* @param quality - The quality of the generated image. One of 'auto', 'low', 'medium', or 'high'.
|
|
8910
8919
|
* @param size - The size of the generated image. One of 'auto', '1024x1024', '1024x1536', or '1536x1024'.
|
|
8911
8920
|
*/
|
|
8912
|
-
imageGeneration:
|
|
8921
|
+
imageGeneration: Dx,
|
|
8913
8922
|
/**
|
|
8914
8923
|
* Local shell is a tool that allows agents to run shell commands locally
|
|
8915
8924
|
* on a machine you or the user provides.
|
|
8916
8925
|
*
|
|
8917
8926
|
* Supported models: `gpt-5-codex`
|
|
8918
8927
|
*/
|
|
8919
|
-
localShell:
|
|
8928
|
+
localShell: Px,
|
|
8920
8929
|
/**
|
|
8921
8930
|
* The shell tool allows the model to interact with your local computer through
|
|
8922
8931
|
* a controlled command-line interface. The model proposes shell commands; your
|
|
@@ -8928,7 +8937,7 @@ var ld = Ue(
|
|
|
8928
8937
|
* execution or add strict allow-/deny-lists before forwarding a command to
|
|
8929
8938
|
* the system shell.
|
|
8930
8939
|
*/
|
|
8931
|
-
shell:
|
|
8940
|
+
shell: Fx,
|
|
8932
8941
|
/**
|
|
8933
8942
|
* Web search allows models to access up-to-date information from the internet
|
|
8934
8943
|
* and provide answers with sourced citations.
|
|
@@ -8936,7 +8945,7 @@ var ld = Ue(
|
|
|
8936
8945
|
* @param searchContextSize - The search context size to use for the web search.
|
|
8937
8946
|
* @param userLocation - The user location to use for the web search.
|
|
8938
8947
|
*/
|
|
8939
|
-
webSearchPreview:
|
|
8948
|
+
webSearchPreview: Yx,
|
|
8940
8949
|
/**
|
|
8941
8950
|
* Web search allows models to access up-to-date information from the internet
|
|
8942
8951
|
* and provide answers with sourced citations.
|
|
@@ -8945,7 +8954,7 @@ var ld = Ue(
|
|
|
8945
8954
|
* @param searchContextSize - The search context size to use for the web search.
|
|
8946
8955
|
* @param userLocation - The user location to use for the web search.
|
|
8947
8956
|
*/
|
|
8948
|
-
webSearch:
|
|
8957
|
+
webSearch: Wx,
|
|
8949
8958
|
/**
|
|
8950
8959
|
* MCP (Model Context Protocol) allows models to call tools exposed by
|
|
8951
8960
|
* remote MCP servers or service connectors.
|
|
@@ -8959,7 +8968,7 @@ var ld = Ue(
|
|
|
8959
8968
|
* @param serverDescription - Optional description of the server.
|
|
8960
8969
|
* @param serverUrl - URL for the MCP server.
|
|
8961
8970
|
*/
|
|
8962
|
-
mcp:
|
|
8971
|
+
mcp: ty,
|
|
8963
8972
|
/**
|
|
8964
8973
|
* Tool search allows the model to dynamically search for and load deferred
|
|
8965
8974
|
* tools into the model's context as needed. This helps reduce overall token
|
|
@@ -8969,7 +8978,7 @@ var ld = Ue(
|
|
|
8969
8978
|
* in the tools array. The model will use tool search to load these tools
|
|
8970
8979
|
* when it determines they are needed.
|
|
8971
8980
|
*/
|
|
8972
|
-
toolSearch:
|
|
8981
|
+
toolSearch: Zx
|
|
8973
8982
|
};
|
|
8974
8983
|
function Cl(t) {
|
|
8975
8984
|
var r, o, c, d, f, g;
|
|
@@ -9004,7 +9013,7 @@ function Cl(t) {
|
|
|
9004
9013
|
raw: t
|
|
9005
9014
|
};
|
|
9006
9015
|
}
|
|
9007
|
-
function
|
|
9016
|
+
function ry(t) {
|
|
9008
9017
|
return JSON.stringify(t === void 0 ? {} : t);
|
|
9009
9018
|
}
|
|
9010
9019
|
function Zr(t, r) {
|
|
@@ -9014,7 +9023,7 @@ function Zr(t, r) {
|
|
|
9014
9023
|
function bl(t, r) {
|
|
9015
9024
|
return r ? r.some((o) => t.startsWith(o)) : !1;
|
|
9016
9025
|
}
|
|
9017
|
-
async function
|
|
9026
|
+
async function iy({
|
|
9018
9027
|
prompt: t,
|
|
9019
9028
|
toolNameMapping: r,
|
|
9020
9029
|
systemMessageMode: o,
|
|
@@ -9275,7 +9284,7 @@ async function ry({
|
|
|
9275
9284
|
type: "function_call",
|
|
9276
9285
|
call_id: ue.toolCallId,
|
|
9277
9286
|
name: se,
|
|
9278
|
-
arguments:
|
|
9287
|
+
arguments: ry(ue.input),
|
|
9279
9288
|
...Pe != null && { namespace: Pe }
|
|
9280
9289
|
});
|
|
9281
9290
|
break;
|
|
@@ -9342,7 +9351,7 @@ async function ry({
|
|
|
9342
9351
|
const we = await Dn({
|
|
9343
9352
|
provider: c,
|
|
9344
9353
|
providerOptions: ue.providerOptions,
|
|
9345
|
-
schema:
|
|
9354
|
+
schema: oy
|
|
9346
9355
|
}), Pe = we?.itemId;
|
|
9347
9356
|
if ((x || _) && Pe != null)
|
|
9348
9357
|
break;
|
|
@@ -9653,7 +9662,7 @@ async function ry({
|
|
|
9653
9662
|
(Ve) => !("type" in Ve) || Ve.type !== "reasoning" || Ve.encrypted_content != null
|
|
9654
9663
|
)), { input: me, warnings: je };
|
|
9655
9664
|
}
|
|
9656
|
-
var
|
|
9665
|
+
var oy = T({
|
|
9657
9666
|
itemId: w().nullish(),
|
|
9658
9667
|
reasoningEncryptedContent: w().nullish()
|
|
9659
9668
|
});
|
|
@@ -9682,7 +9691,7 @@ var wi = Is(
|
|
|
9682
9691
|
ce(wi),
|
|
9683
9692
|
At(w(), wi.optional())
|
|
9684
9693
|
])
|
|
9685
|
-
),
|
|
9694
|
+
), sy = T({
|
|
9686
9695
|
type: q("error"),
|
|
9687
9696
|
sequence_number: V(),
|
|
9688
9697
|
error: T({
|
|
@@ -9691,13 +9700,13 @@ var wi = Is(
|
|
|
9691
9700
|
message: w(),
|
|
9692
9701
|
param: w().nullish()
|
|
9693
9702
|
})
|
|
9694
|
-
}),
|
|
9703
|
+
}), ay = T({
|
|
9695
9704
|
type: q("error"),
|
|
9696
9705
|
sequence_number: V(),
|
|
9697
9706
|
code: w().nullish(),
|
|
9698
9707
|
message: w(),
|
|
9699
9708
|
param: w().nullish()
|
|
9700
|
-
}),
|
|
9709
|
+
}), ly = Ue(
|
|
9701
9710
|
() => Fe(
|
|
9702
9711
|
ct([
|
|
9703
9712
|
T({
|
|
@@ -10236,8 +10245,8 @@ var wi = Is(
|
|
|
10236
10245
|
output_index: V(),
|
|
10237
10246
|
diff: w()
|
|
10238
10247
|
}),
|
|
10239
|
-
oy,
|
|
10240
10248
|
sy,
|
|
10249
|
+
ay,
|
|
10241
10250
|
T({ type: w() }).loose().transform((t) => ({
|
|
10242
10251
|
type: "unknown_chunk",
|
|
10243
10252
|
message: t.type
|
|
@@ -10245,7 +10254,7 @@ var wi = Is(
|
|
|
10245
10254
|
// fallback for unknown chunks
|
|
10246
10255
|
])
|
|
10247
10256
|
)
|
|
10248
|
-
),
|
|
10257
|
+
), cy = Ue(
|
|
10249
10258
|
() => Fe(
|
|
10250
10259
|
T({
|
|
10251
10260
|
id: w().optional(),
|
|
@@ -10752,7 +10761,7 @@ var wi = Is(
|
|
|
10752
10761
|
})
|
|
10753
10762
|
)
|
|
10754
10763
|
);
|
|
10755
|
-
async function
|
|
10764
|
+
async function uy({
|
|
10756
10765
|
tools: t,
|
|
10757
10766
|
toolChoice: r,
|
|
10758
10767
|
allowedTools: o,
|
|
@@ -10768,7 +10777,7 @@ async function cy({
|
|
|
10768
10777
|
for (const S of t)
|
|
10769
10778
|
switch (S.type) {
|
|
10770
10779
|
case "function": {
|
|
10771
|
-
const I = (f = S.providerOptions) == null ? void 0 : f.openai, D =
|
|
10780
|
+
const I = (f = S.providerOptions) == null ? void 0 : f.openai, D = dy({
|
|
10772
10781
|
tool: S,
|
|
10773
10782
|
options: I
|
|
10774
10783
|
}), R = I?.namespace;
|
|
@@ -10796,7 +10805,7 @@ async function cy({
|
|
|
10796
10805
|
case "openai.file_search": {
|
|
10797
10806
|
const I = await zt({
|
|
10798
10807
|
value: S.args,
|
|
10799
|
-
schema:
|
|
10808
|
+
schema: Sx
|
|
10800
10809
|
});
|
|
10801
10810
|
m.push({
|
|
10802
10811
|
type: "file_search",
|
|
@@ -10819,12 +10828,12 @@ async function cy({
|
|
|
10819
10828
|
case "openai.shell": {
|
|
10820
10829
|
const I = await zt({
|
|
10821
10830
|
value: S.args,
|
|
10822
|
-
schema:
|
|
10831
|
+
schema: Lx
|
|
10823
10832
|
});
|
|
10824
10833
|
m.push({
|
|
10825
10834
|
type: "shell",
|
|
10826
10835
|
...I.environment && {
|
|
10827
|
-
environment:
|
|
10836
|
+
environment: fy(I.environment)
|
|
10828
10837
|
}
|
|
10829
10838
|
});
|
|
10830
10839
|
break;
|
|
@@ -10838,7 +10847,7 @@ async function cy({
|
|
|
10838
10847
|
case "openai.web_search_preview": {
|
|
10839
10848
|
const I = await zt({
|
|
10840
10849
|
value: S.args,
|
|
10841
|
-
schema:
|
|
10850
|
+
schema: Gx
|
|
10842
10851
|
});
|
|
10843
10852
|
m.push({
|
|
10844
10853
|
type: "web_search_preview",
|
|
@@ -10850,7 +10859,7 @@ async function cy({
|
|
|
10850
10859
|
case "openai.web_search": {
|
|
10851
10860
|
const I = await zt({
|
|
10852
10861
|
value: S.args,
|
|
10853
|
-
schema:
|
|
10862
|
+
schema: $x
|
|
10854
10863
|
});
|
|
10855
10864
|
m.push({
|
|
10856
10865
|
type: "web_search",
|
|
@@ -10864,7 +10873,7 @@ async function cy({
|
|
|
10864
10873
|
case "openai.code_interpreter": {
|
|
10865
10874
|
const I = await zt({
|
|
10866
10875
|
value: S.args,
|
|
10867
|
-
schema:
|
|
10876
|
+
schema: _x
|
|
10868
10877
|
});
|
|
10869
10878
|
m.push({
|
|
10870
10879
|
type: "code_interpreter",
|
|
@@ -10875,7 +10884,7 @@ async function cy({
|
|
|
10875
10884
|
case "openai.image_generation": {
|
|
10876
10885
|
const I = await zt({
|
|
10877
10886
|
value: S.args,
|
|
10878
|
-
schema:
|
|
10887
|
+
schema: Nx
|
|
10879
10888
|
});
|
|
10880
10889
|
m.push({
|
|
10881
10890
|
type: "image_generation",
|
|
@@ -10898,7 +10907,7 @@ async function cy({
|
|
|
10898
10907
|
case "openai.mcp": {
|
|
10899
10908
|
const I = await zt({
|
|
10900
10909
|
value: S.args,
|
|
10901
|
-
schema:
|
|
10910
|
+
schema: Kx
|
|
10902
10911
|
}), D = ($) => ({
|
|
10903
10912
|
tool_names: $.toolNames
|
|
10904
10913
|
}), R = I.requireApproval, Q = R == null ? void 0 : typeof R == "string" ? R : R.never != null ? { never: D(R.never) } : void 0;
|
|
@@ -10921,7 +10930,7 @@ async function cy({
|
|
|
10921
10930
|
case "openai.custom": {
|
|
10922
10931
|
const I = await zt({
|
|
10923
10932
|
value: S.args,
|
|
10924
|
-
schema:
|
|
10933
|
+
schema: bx
|
|
10925
10934
|
});
|
|
10926
10935
|
m.push({
|
|
10927
10936
|
type: "custom",
|
|
@@ -10934,7 +10943,7 @@ async function cy({
|
|
|
10934
10943
|
case "openai.tool_search": {
|
|
10935
10944
|
const I = await zt({
|
|
10936
10945
|
value: S.args,
|
|
10937
|
-
schema:
|
|
10946
|
+
schema: Ux
|
|
10938
10947
|
});
|
|
10939
10948
|
m.push({
|
|
10940
10949
|
type: "tool_search",
|
|
@@ -10994,7 +11003,7 @@ async function cy({
|
|
|
10994
11003
|
}
|
|
10995
11004
|
}
|
|
10996
11005
|
}
|
|
10997
|
-
function
|
|
11006
|
+
function dy({
|
|
10998
11007
|
tool: t,
|
|
10999
11008
|
options: r
|
|
11000
11009
|
}) {
|
|
@@ -11008,7 +11017,7 @@ function uy({
|
|
|
11008
11017
|
...o != null ? { defer_loading: o } : {}
|
|
11009
11018
|
};
|
|
11010
11019
|
}
|
|
11011
|
-
function
|
|
11020
|
+
function fy(t) {
|
|
11012
11021
|
if (t.type === "containerReference")
|
|
11013
11022
|
return {
|
|
11014
11023
|
type: "container_reference",
|
|
@@ -11025,7 +11034,7 @@ function dy(t) {
|
|
|
11025
11034
|
allowed_domains: o.networkPolicy.allowedDomains,
|
|
11026
11035
|
domain_secrets: o.networkPolicy.domainSecrets
|
|
11027
11036
|
},
|
|
11028
|
-
skills:
|
|
11037
|
+
skills: hy(o.skills)
|
|
11029
11038
|
};
|
|
11030
11039
|
}
|
|
11031
11040
|
return {
|
|
@@ -11033,7 +11042,7 @@ function dy(t) {
|
|
|
11033
11042
|
skills: t.skills
|
|
11034
11043
|
};
|
|
11035
11044
|
}
|
|
11036
|
-
function
|
|
11045
|
+
function hy(t) {
|
|
11037
11046
|
return t?.map(
|
|
11038
11047
|
(r) => r.type === "skillReference" ? {
|
|
11039
11048
|
type: "skill_reference",
|
|
@@ -11063,7 +11072,7 @@ function El(t) {
|
|
|
11063
11072
|
}
|
|
11064
11073
|
return c;
|
|
11065
11074
|
}
|
|
11066
|
-
var
|
|
11075
|
+
var py = class {
|
|
11067
11076
|
constructor(t, r) {
|
|
11068
11077
|
this.specificationVersion = "v3", this.supportedUrls = {
|
|
11069
11078
|
"image/*": [/^https?:\/\/.*$/],
|
|
@@ -11127,13 +11136,13 @@ var hy = class {
|
|
|
11127
11136
|
tools: G,
|
|
11128
11137
|
toolChoice: ke,
|
|
11129
11138
|
toolWarnings: ae
|
|
11130
|
-
} = await
|
|
11139
|
+
} = await uy({
|
|
11131
11140
|
tools: A,
|
|
11132
11141
|
toolChoice: b,
|
|
11133
11142
|
allowedTools: (I = W?.allowedTools) != null ? I : void 0,
|
|
11134
11143
|
toolNameMapping: de,
|
|
11135
11144
|
customProviderToolNames: ee
|
|
11136
|
-
}), { input: Te, warnings: Qe } = await
|
|
11145
|
+
}), { input: Te, warnings: Qe } = await iy({
|
|
11137
11146
|
prompt: _,
|
|
11138
11147
|
toolNameMapping: de,
|
|
11139
11148
|
systemMessageMode: (D = W?.systemMessageMode) != null ? D : pe ? "developer" : U.systemMessageMode,
|
|
@@ -11294,7 +11303,7 @@ var hy = class {
|
|
|
11294
11303
|
body: ee,
|
|
11295
11304
|
failedResponseHandler: Pn,
|
|
11296
11305
|
successfulResponseHandler: Sr(
|
|
11297
|
-
|
|
11306
|
+
cy
|
|
11298
11307
|
),
|
|
11299
11308
|
abortSignal: t.abortSignal,
|
|
11300
11309
|
fetch: this.config.fetch
|
|
@@ -11733,14 +11742,14 @@ var hy = class {
|
|
|
11733
11742
|
},
|
|
11734
11743
|
failedResponseHandler: Pn,
|
|
11735
11744
|
successfulResponseHandler: Rs(
|
|
11736
|
-
|
|
11745
|
+
ly
|
|
11737
11746
|
),
|
|
11738
11747
|
abortSignal: t.abortSignal,
|
|
11739
11748
|
fetch: this.config.fetch
|
|
11740
11749
|
}), b = await Ds({
|
|
11741
11750
|
stream: A,
|
|
11742
11751
|
getError: (de) => Tl(de) || Il(de) && de.response.error != null ? de : void 0,
|
|
11743
|
-
isOutputChunk:
|
|
11752
|
+
isOutputChunk: Ny,
|
|
11744
11753
|
url: _,
|
|
11745
11754
|
requestBodyValues: r,
|
|
11746
11755
|
responseHeaders: m
|
|
@@ -11766,7 +11775,7 @@ var hy = class {
|
|
|
11766
11775
|
transform(de, ee) {
|
|
11767
11776
|
var G, ke, ae, Te, Qe, me, je, ze, Ve, qe, Ze, ie, ue, we, Pe, se, K, xe, Se, $e, Rt, It, tt, rt, Ye, Bn, be, Gn, er, en, tr, jt, hr, pn, Ot, pr, Xn, kr, vt, ge;
|
|
11768
11777
|
if (t.includeRawChunks && ee.enqueue({ type: "raw", rawValue: de.rawValue }), !de.success) {
|
|
11769
|
-
const te =
|
|
11778
|
+
const te = my(de.rawValue) ? xy({
|
|
11770
11779
|
value: de.rawValue,
|
|
11771
11780
|
cause: de.error,
|
|
11772
11781
|
url: _,
|
|
@@ -11941,7 +11950,7 @@ var hy = class {
|
|
|
11941
11950
|
}
|
|
11942
11951
|
})));
|
|
11943
11952
|
}
|
|
11944
|
-
} else if (
|
|
11953
|
+
} else if (wy(O)) {
|
|
11945
11954
|
if (O.item.type === "message") {
|
|
11946
11955
|
const te = (Te = O.item.phase) != null ? Te : Z;
|
|
11947
11956
|
Z = void 0, ee.enqueue({
|
|
@@ -12258,28 +12267,28 @@ var hy = class {
|
|
|
12258
12267
|
});
|
|
12259
12268
|
delete B[O.item.id];
|
|
12260
12269
|
}
|
|
12261
|
-
} else if (
|
|
12270
|
+
} else if (Cy(O)) {
|
|
12262
12271
|
const te = L[O.output_index];
|
|
12263
12272
|
te != null && ee.enqueue({
|
|
12264
12273
|
type: "tool-input-delta",
|
|
12265
12274
|
id: te.toolCallId,
|
|
12266
12275
|
delta: O.delta
|
|
12267
12276
|
});
|
|
12268
|
-
} else if (
|
|
12277
|
+
} else if (by(O)) {
|
|
12269
12278
|
const te = L[O.output_index];
|
|
12270
12279
|
te != null && ee.enqueue({
|
|
12271
12280
|
type: "tool-input-delta",
|
|
12272
12281
|
id: te.toolCallId,
|
|
12273
12282
|
delta: O.delta
|
|
12274
12283
|
});
|
|
12275
|
-
} else if (
|
|
12284
|
+
} else if (Sy(O)) {
|
|
12276
12285
|
const te = L[O.output_index];
|
|
12277
12286
|
te?.applyPatch && (ee.enqueue({
|
|
12278
12287
|
type: "tool-input-delta",
|
|
12279
12288
|
id: te.toolCallId,
|
|
12280
12289
|
delta: Cr(O.delta)
|
|
12281
12290
|
}), te.applyPatch.hasDiff = !0);
|
|
12282
|
-
} else if (
|
|
12291
|
+
} else if (Ty(O)) {
|
|
12283
12292
|
const te = L[O.output_index];
|
|
12284
12293
|
te?.applyPatch && !te.applyPatch.endEmitted && (te.applyPatch.hasDiff || (ee.enqueue({
|
|
12285
12294
|
type: "tool-input-delta",
|
|
@@ -12293,7 +12302,7 @@ var hy = class {
|
|
|
12293
12302
|
type: "tool-input-end",
|
|
12294
12303
|
id: te.toolCallId
|
|
12295
12304
|
}), te.applyPatch.endEmitted = !0);
|
|
12296
|
-
} else if (
|
|
12305
|
+
} else if (Ay(O))
|
|
12297
12306
|
ee.enqueue({
|
|
12298
12307
|
type: "tool-result",
|
|
12299
12308
|
toolCallId: O.item_id,
|
|
@@ -12303,14 +12312,14 @@ var hy = class {
|
|
|
12303
12312
|
},
|
|
12304
12313
|
preliminary: !0
|
|
12305
12314
|
});
|
|
12306
|
-
else if (
|
|
12315
|
+
else if (Ey(O)) {
|
|
12307
12316
|
const te = L[O.output_index];
|
|
12308
12317
|
te != null && ee.enqueue({
|
|
12309
12318
|
type: "tool-input-delta",
|
|
12310
12319
|
id: te.toolCallId,
|
|
12311
12320
|
delta: Cr(O.delta)
|
|
12312
12321
|
});
|
|
12313
|
-
} else if (
|
|
12322
|
+
} else if (Iy(O)) {
|
|
12314
12323
|
const te = L[O.output_index];
|
|
12315
12324
|
te != null && (ee.enqueue({
|
|
12316
12325
|
type: "tool-input-delta",
|
|
@@ -12329,14 +12338,14 @@ var hy = class {
|
|
|
12329
12338
|
}),
|
|
12330
12339
|
providerExecuted: !0
|
|
12331
12340
|
}));
|
|
12332
|
-
} else if (
|
|
12341
|
+
} else if (vy(O))
|
|
12333
12342
|
$ = O.response.id, ee.enqueue({
|
|
12334
12343
|
type: "response-metadata",
|
|
12335
12344
|
id: O.response.id,
|
|
12336
12345
|
timestamp: new Date(O.response.created_at * 1e3),
|
|
12337
12346
|
modelId: O.response.model
|
|
12338
12347
|
});
|
|
12339
|
-
else if (
|
|
12348
|
+
else if (gy(O))
|
|
12340
12349
|
ee.enqueue({
|
|
12341
12350
|
type: "text-delta",
|
|
12342
12351
|
id: O.item_id,
|
|
@@ -12390,7 +12399,7 @@ var hy = class {
|
|
|
12390
12399
|
}
|
|
12391
12400
|
}
|
|
12392
12401
|
}), B[O.item_id].summaryParts[O.summary_index] = "concluded") : B[O.item_id].summaryParts[O.summary_index] = "can-conclude";
|
|
12393
|
-
else if (
|
|
12402
|
+
else if (_y(O))
|
|
12394
12403
|
D = {
|
|
12395
12404
|
unified: zo({
|
|
12396
12405
|
finishReason: (It = O.response.incomplete_details) == null ? void 0 : It.reason,
|
|
@@ -12418,7 +12427,7 @@ var hy = class {
|
|
|
12418
12427
|
}
|
|
12419
12428
|
}
|
|
12420
12429
|
}));
|
|
12421
|
-
} else
|
|
12430
|
+
} else Oy(O) ? (ne.push(O.annotation), O.annotation.type === "url_citation" ? ee.enqueue({
|
|
12422
12431
|
type: "source",
|
|
12423
12432
|
sourceType: "url",
|
|
12424
12433
|
id: (tr = (en = (er = M.config).generateId) == null ? void 0 : en.call(er)) != null ? tr : fn(),
|
|
@@ -12491,14 +12500,14 @@ var hy = class {
|
|
|
12491
12500
|
};
|
|
12492
12501
|
}
|
|
12493
12502
|
};
|
|
12494
|
-
function
|
|
12503
|
+
function gy(t) {
|
|
12495
12504
|
return t.type === "response.output_text.delta";
|
|
12496
12505
|
}
|
|
12497
|
-
function
|
|
12498
|
-
const r =
|
|
12506
|
+
function my(t) {
|
|
12507
|
+
const r = yy(t);
|
|
12499
12508
|
return r != null && Array.isArray(r.choices) && typeof r.type != "string";
|
|
12500
12509
|
}
|
|
12501
|
-
function
|
|
12510
|
+
function xy({
|
|
12502
12511
|
value: t,
|
|
12503
12512
|
cause: r,
|
|
12504
12513
|
url: o,
|
|
@@ -12516,52 +12525,52 @@ function my({
|
|
|
12516
12525
|
isRetryable: !1
|
|
12517
12526
|
});
|
|
12518
12527
|
}
|
|
12519
|
-
function
|
|
12528
|
+
function yy(t) {
|
|
12520
12529
|
return typeof t == "object" && t != null ? t : void 0;
|
|
12521
12530
|
}
|
|
12522
|
-
function
|
|
12531
|
+
function wy(t) {
|
|
12523
12532
|
return t.type === "response.output_item.done";
|
|
12524
12533
|
}
|
|
12525
|
-
function
|
|
12534
|
+
function _y(t) {
|
|
12526
12535
|
return t.type === "response.completed" || t.type === "response.incomplete";
|
|
12527
12536
|
}
|
|
12528
12537
|
function Il(t) {
|
|
12529
12538
|
return t.type === "response.failed";
|
|
12530
12539
|
}
|
|
12531
|
-
function
|
|
12540
|
+
function vy(t) {
|
|
12532
12541
|
return t.type === "response.created";
|
|
12533
12542
|
}
|
|
12534
|
-
function
|
|
12543
|
+
function Cy(t) {
|
|
12535
12544
|
return t.type === "response.function_call_arguments.delta";
|
|
12536
12545
|
}
|
|
12537
|
-
function
|
|
12546
|
+
function by(t) {
|
|
12538
12547
|
return t.type === "response.custom_tool_call_input.delta";
|
|
12539
12548
|
}
|
|
12540
|
-
function
|
|
12549
|
+
function Ay(t) {
|
|
12541
12550
|
return t.type === "response.image_generation_call.partial_image";
|
|
12542
12551
|
}
|
|
12543
|
-
function
|
|
12552
|
+
function Ey(t) {
|
|
12544
12553
|
return t.type === "response.code_interpreter_call_code.delta";
|
|
12545
12554
|
}
|
|
12546
|
-
function
|
|
12555
|
+
function Iy(t) {
|
|
12547
12556
|
return t.type === "response.code_interpreter_call_code.done";
|
|
12548
12557
|
}
|
|
12549
|
-
function
|
|
12558
|
+
function Sy(t) {
|
|
12550
12559
|
return t.type === "response.apply_patch_call_operation_diff.delta";
|
|
12551
12560
|
}
|
|
12552
|
-
function
|
|
12561
|
+
function Ty(t) {
|
|
12553
12562
|
return t.type === "response.apply_patch_call_operation_diff.done";
|
|
12554
12563
|
}
|
|
12555
12564
|
function Sl(t) {
|
|
12556
12565
|
return t.type === "response.output_item.added";
|
|
12557
12566
|
}
|
|
12558
|
-
function
|
|
12567
|
+
function Oy(t) {
|
|
12559
12568
|
return t.type === "response.output_text.annotation.added";
|
|
12560
12569
|
}
|
|
12561
12570
|
function Tl(t) {
|
|
12562
12571
|
return t.type === "error";
|
|
12563
12572
|
}
|
|
12564
|
-
function
|
|
12573
|
+
function Ny(t) {
|
|
12565
12574
|
return !(t.type === "response.created" || t.type === "response.failed" || t.type === "error" || t.type === "unknown_chunk");
|
|
12566
12575
|
}
|
|
12567
12576
|
function Ol(t) {
|
|
@@ -12594,14 +12603,14 @@ function Ol(t) {
|
|
|
12594
12603
|
function Cr(t) {
|
|
12595
12604
|
return JSON.stringify(t).slice(1, -1);
|
|
12596
12605
|
}
|
|
12597
|
-
var
|
|
12606
|
+
var ky = Ue(
|
|
12598
12607
|
() => Fe(
|
|
12599
12608
|
T({
|
|
12600
12609
|
instructions: w().nullish(),
|
|
12601
12610
|
speed: V().min(0.25).max(4).default(1).nullish()
|
|
12602
12611
|
})
|
|
12603
12612
|
)
|
|
12604
|
-
),
|
|
12613
|
+
), Ry = class {
|
|
12605
12614
|
constructor(t, r) {
|
|
12606
12615
|
this.modelId = t, this.config = r, this.specificationVersion = "v3";
|
|
12607
12616
|
}
|
|
@@ -12620,7 +12629,7 @@ var Ny = Ue(
|
|
|
12620
12629
|
const x = [], _ = await Dn({
|
|
12621
12630
|
provider: "openai",
|
|
12622
12631
|
providerOptions: g,
|
|
12623
|
-
schema:
|
|
12632
|
+
schema: ky
|
|
12624
12633
|
}), m = {
|
|
12625
12634
|
model: this.modelId,
|
|
12626
12635
|
input: t,
|
|
@@ -12663,7 +12672,7 @@ var Ny = Ue(
|
|
|
12663
12672
|
headers: Mn(this.config.headers(), t.headers),
|
|
12664
12673
|
body: f,
|
|
12665
12674
|
failedResponseHandler: Pn,
|
|
12666
|
-
successfulResponseHandler:
|
|
12675
|
+
successfulResponseHandler: $2(),
|
|
12667
12676
|
abortSignal: t.abortSignal,
|
|
12668
12677
|
fetch: this.config.fetch
|
|
12669
12678
|
});
|
|
@@ -12681,7 +12690,7 @@ var Ny = Ue(
|
|
|
12681
12690
|
}
|
|
12682
12691
|
};
|
|
12683
12692
|
}
|
|
12684
|
-
},
|
|
12693
|
+
}, My = Ue(
|
|
12685
12694
|
() => Fe(
|
|
12686
12695
|
T({
|
|
12687
12696
|
text: w(),
|
|
@@ -12710,7 +12719,7 @@ var Ny = Ue(
|
|
|
12710
12719
|
).nullish()
|
|
12711
12720
|
})
|
|
12712
12721
|
)
|
|
12713
|
-
),
|
|
12722
|
+
), Dy = Ue(
|
|
12714
12723
|
() => Fe(
|
|
12715
12724
|
T({
|
|
12716
12725
|
/**
|
|
@@ -12795,7 +12804,7 @@ var Ny = Ue(
|
|
|
12795
12804
|
urdu: "ur",
|
|
12796
12805
|
vietnamese: "vi",
|
|
12797
12806
|
welsh: "cy"
|
|
12798
|
-
},
|
|
12807
|
+
}, Py = class {
|
|
12799
12808
|
constructor(t, r) {
|
|
12800
12809
|
this.modelId = t, this.config = r, this.specificationVersion = "v3";
|
|
12801
12810
|
}
|
|
@@ -12810,7 +12819,7 @@ var Ny = Ue(
|
|
|
12810
12819
|
const c = [], d = await Dn({
|
|
12811
12820
|
provider: "openai",
|
|
12812
12821
|
providerOptions: o,
|
|
12813
|
-
schema:
|
|
12822
|
+
schema: Dy
|
|
12814
12823
|
}), f = new FormData(), g = t instanceof Uint8Array ? new Blob([t]) : new Blob([Ts(t)]);
|
|
12815
12824
|
f.append("model", this.modelId);
|
|
12816
12825
|
const x = zm(r);
|
|
@@ -12860,7 +12869,7 @@ var Ny = Ue(
|
|
|
12860
12869
|
formData: A,
|
|
12861
12870
|
failedResponseHandler: Pn,
|
|
12862
12871
|
successfulResponseHandler: Sr(
|
|
12863
|
-
|
|
12872
|
+
My
|
|
12864
12873
|
),
|
|
12865
12874
|
abortSignal: t.abortSignal,
|
|
12866
12875
|
fetch: this.config.fetch
|
|
@@ -12887,10 +12896,10 @@ var Ny = Ue(
|
|
|
12887
12896
|
}
|
|
12888
12897
|
};
|
|
12889
12898
|
}
|
|
12890
|
-
},
|
|
12899
|
+
}, By = "3.0.85";
|
|
12891
12900
|
function md(t = {}) {
|
|
12892
12901
|
var r, o;
|
|
12893
|
-
const c = (r =
|
|
12902
|
+
const c = (r = V2(
|
|
12894
12903
|
Um({
|
|
12895
12904
|
settingValue: t.baseURL,
|
|
12896
12905
|
environmentVariableName: "OPENAI_BASE_URL"
|
|
@@ -12906,33 +12915,33 @@ function md(t = {}) {
|
|
|
12906
12915
|
"OpenAI-Project": t.project,
|
|
12907
12916
|
...t.headers
|
|
12908
12917
|
},
|
|
12909
|
-
`ai-sdk/openai/${
|
|
12910
|
-
), g = (D) => new
|
|
12918
|
+
`ai-sdk/openai/${By}`
|
|
12919
|
+
), g = (D) => new Q2(D, {
|
|
12911
12920
|
provider: `${d}.chat`,
|
|
12912
12921
|
url: ({ path: R }) => `${c}${R}`,
|
|
12913
12922
|
headers: f,
|
|
12914
12923
|
fetch: t.fetch
|
|
12915
|
-
}), x = (D) => new
|
|
12924
|
+
}), x = (D) => new ix(D, {
|
|
12916
12925
|
provider: `${d}.completion`,
|
|
12917
12926
|
url: ({ path: R }) => `${c}${R}`,
|
|
12918
12927
|
headers: f,
|
|
12919
12928
|
fetch: t.fetch
|
|
12920
|
-
}), _ = (D) => new
|
|
12929
|
+
}), _ = (D) => new lx(D, {
|
|
12921
12930
|
provider: `${d}.embedding`,
|
|
12922
12931
|
url: ({ path: R }) => `${c}${R}`,
|
|
12923
12932
|
headers: f,
|
|
12924
12933
|
fetch: t.fetch
|
|
12925
|
-
}), m = (D) => new
|
|
12934
|
+
}), m = (D) => new px(D, {
|
|
12926
12935
|
provider: `${d}.image`,
|
|
12927
12936
|
url: ({ path: R }) => `${c}${R}`,
|
|
12928
12937
|
headers: f,
|
|
12929
12938
|
fetch: t.fetch
|
|
12930
|
-
}), A = (D) => new
|
|
12939
|
+
}), A = (D) => new Py(D, {
|
|
12931
12940
|
provider: `${d}.transcription`,
|
|
12932
12941
|
url: ({ path: R }) => `${c}${R}`,
|
|
12933
12942
|
headers: f,
|
|
12934
12943
|
fetch: t.fetch
|
|
12935
|
-
}), b = (D) => new
|
|
12944
|
+
}), b = (D) => new Ry(D, {
|
|
12936
12945
|
provider: `${d}.speech`,
|
|
12937
12946
|
url: ({ path: R }) => `${c}${R}`,
|
|
12938
12947
|
headers: f,
|
|
@@ -12943,7 +12952,7 @@ function md(t = {}) {
|
|
|
12943
12952
|
"The OpenAI model function cannot be called with the new keyword."
|
|
12944
12953
|
);
|
|
12945
12954
|
return S(D);
|
|
12946
|
-
}, S = (D) => new
|
|
12955
|
+
}, S = (D) => new py(D, {
|
|
12947
12956
|
provider: `${d}.responses`,
|
|
12948
12957
|
url: ({ path: R }) => `${c}${R}`,
|
|
12949
12958
|
headers: f,
|
|
@@ -12952,10 +12961,10 @@ function md(t = {}) {
|
|
|
12952
12961
|
}), I = function(D) {
|
|
12953
12962
|
return M(D);
|
|
12954
12963
|
};
|
|
12955
|
-
return I.specificationVersion = "v3", I.languageModel = M, I.chat = g, I.completion = x, I.responses = S, I.embedding = _, I.embeddingModel = _, I.textEmbedding = _, I.textEmbeddingModel = _, I.image = m, I.imageModel = m, I.transcription = A, I.transcriptionModel = A, I.speech = b, I.speechModel = b, I.tools =
|
|
12964
|
+
return I.specificationVersion = "v3", I.languageModel = M, I.chat = g, I.completion = x, I.responses = S, I.embedding = _, I.embeddingModel = _, I.textEmbedding = _, I.textEmbeddingModel = _, I.image = m, I.imageModel = m, I.transcription = A, I.transcriptionModel = A, I.speech = b, I.speechModel = b, I.tools = ny, I;
|
|
12956
12965
|
}
|
|
12957
12966
|
md();
|
|
12958
|
-
const
|
|
12967
|
+
const Ly = {
|
|
12959
12968
|
deepseek: {
|
|
12960
12969
|
prompt: {
|
|
12961
12970
|
strategy: "append",
|
|
@@ -13040,7 +13049,7 @@ const By = {
|
|
|
13040
13049
|
}
|
|
13041
13050
|
}
|
|
13042
13051
|
};
|
|
13043
|
-
class
|
|
13052
|
+
class Fy {
|
|
13044
13053
|
constructor(r = {}) {
|
|
13045
13054
|
this.option = r;
|
|
13046
13055
|
}
|
|
@@ -13138,7 +13147,7 @@ class Ly {
|
|
|
13138
13147
|
})(), o;
|
|
13139
13148
|
}
|
|
13140
13149
|
}
|
|
13141
|
-
function
|
|
13150
|
+
function Uy(t) {
|
|
13142
13151
|
const r = [];
|
|
13143
13152
|
let o = 0;
|
|
13144
13153
|
for (; o < t.length; ) {
|
|
@@ -13156,7 +13165,7 @@ function Fy(t) {
|
|
|
13156
13165
|
}
|
|
13157
13166
|
return r;
|
|
13158
13167
|
}
|
|
13159
|
-
class
|
|
13168
|
+
class zy {
|
|
13160
13169
|
/** 固定系统提示词 */
|
|
13161
13170
|
staticPrompt = "";
|
|
13162
13171
|
/** 元数据提示词 */
|
|
@@ -13199,7 +13208,7 @@ const Zo = {
|
|
|
13199
13208
|
genuiUrl: "https://agent.opentiny.design/api/v1/ai/prompt",
|
|
13200
13209
|
providerType: "deepseek"
|
|
13201
13210
|
};
|
|
13202
|
-
function
|
|
13211
|
+
function Zy(t, r) {
|
|
13203
13212
|
if (!r && !t) return;
|
|
13204
13213
|
if (!t) return r;
|
|
13205
13214
|
if (!r) return t;
|
|
@@ -13208,7 +13217,7 @@ function zy(t, r) {
|
|
|
13208
13217
|
d && typeof d == "object" && !Array.isArray(d) ? o[c] = { ...o[c] || {}, ...d } : o[c] = d;
|
|
13209
13218
|
return o;
|
|
13210
13219
|
}
|
|
13211
|
-
class
|
|
13220
|
+
class $y extends R1 {
|
|
13212
13221
|
transport;
|
|
13213
13222
|
/** 一个 ai-sdk agent 封装 */
|
|
13214
13223
|
agent;
|
|
@@ -13232,7 +13241,7 @@ class Zy extends R1 {
|
|
|
13232
13241
|
const x = {
|
|
13233
13242
|
llmConfig: f.llm ? { llm: f.llm } : { ...f }
|
|
13234
13243
|
};
|
|
13235
|
-
this.agent = new $1(x), this.promptManager = new
|
|
13244
|
+
this.agent = new $1(x), this.promptManager = new zy(), this.promptManager.setStatic(o), this.emit = d;
|
|
13236
13245
|
}
|
|
13237
13246
|
/**
|
|
13238
13247
|
* 更新大语言模型配置
|
|
@@ -13387,7 +13396,7 @@ class Zy extends R1 {
|
|
|
13387
13396
|
tools: this.llmConfig.extraTools || {},
|
|
13388
13397
|
maxSteps: this.llmConfig.maxSteps,
|
|
13389
13398
|
// 合并用户传递的 providerOptions 与默认 GENUI_CONFIG,用户配置优先
|
|
13390
|
-
providerOptions:
|
|
13399
|
+
providerOptions: Zy(this.llmConfig.providerOptions, Ly),
|
|
13391
13400
|
prepareStep: ({ messages: S }) => {
|
|
13392
13401
|
this.cleanGetSkillContentToolResult(S);
|
|
13393
13402
|
const I = this.cleanupOldSnapshotsInMessages(S), D = Object.keys(this.llmConfig.extraTools || {});
|
|
@@ -13422,7 +13431,7 @@ class Zy extends R1 {
|
|
|
13422
13431
|
content: I.content
|
|
13423
13432
|
})))(this.agent.responseMessages), f];
|
|
13424
13433
|
d.messages = x;
|
|
13425
|
-
const _ = await this.agent.chatStream(d), m = new ym(), b = await new
|
|
13434
|
+
const _ = await this.agent.chatStream(d), m = new ym(), b = await new Fy({
|
|
13426
13435
|
debug: this.debugStream,
|
|
13427
13436
|
onFinish: () => {
|
|
13428
13437
|
vi(() => {
|
|
@@ -13442,7 +13451,7 @@ class Zy extends R1 {
|
|
|
13442
13451
|
else {
|
|
13443
13452
|
const D = S.steps.map((R) => R.contents).flat().map((R) => {
|
|
13444
13453
|
if (R.type === "text")
|
|
13445
|
-
return
|
|
13454
|
+
return Uy(R.text);
|
|
13446
13455
|
if (R.type === "reasoning")
|
|
13447
13456
|
return {
|
|
13448
13457
|
type: "collapsible-text",
|
|
@@ -13481,8 +13490,8 @@ class Zy extends R1 {
|
|
|
13481
13490
|
throw new Error("Method not implemented.");
|
|
13482
13491
|
}
|
|
13483
13492
|
}
|
|
13484
|
-
const
|
|
13485
|
-
const c = new
|
|
13493
|
+
const Vy = ({ systemPrompt: t, llmConfig: r, emit: o }) => {
|
|
13494
|
+
const c = new $y({ provider: "custom" }, t, r, o), d = new M1({
|
|
13486
13495
|
providerImplementation: c,
|
|
13487
13496
|
provider: "custom"
|
|
13488
13497
|
}), {
|
|
@@ -13579,9 +13588,9 @@ const $y = ({ systemPrompt: t, llmConfig: r, emit: o }) => {
|
|
|
13579
13588
|
getCurrentConversation: x
|
|
13580
13589
|
};
|
|
13581
13590
|
};
|
|
13582
|
-
function
|
|
13591
|
+
function jy() {
|
|
13583
13592
|
}
|
|
13584
|
-
const Wn = Object.assign, Ps = typeof window < "u", fo = (t) => t !== null && typeof t == "object", dr = (t) => t != null, cs = (t) => typeof t == "function",
|
|
13593
|
+
const Wn = Object.assign, Ps = typeof window < "u", fo = (t) => t !== null && typeof t == "object", dr = (t) => t != null, cs = (t) => typeof t == "function", Hy = (t) => fo(t) && cs(t.then) && cs(t.catch), xd = (t) => typeof t == "number" || /^\d+(\.\d+)?$/.test(t), Wy = () => Ps ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
|
|
13585
13594
|
function Rl(t, r) {
|
|
13586
13595
|
const o = r.split(".");
|
|
13587
13596
|
let c = t;
|
|
@@ -13590,7 +13599,7 @@ function Rl(t, r) {
|
|
|
13590
13599
|
c = fo(c) && (f = c[d]) != null ? f : "";
|
|
13591
13600
|
}), c;
|
|
13592
13601
|
}
|
|
13593
|
-
function
|
|
13602
|
+
function Gy(t, r, o) {
|
|
13594
13603
|
return r.reduce(
|
|
13595
13604
|
(c, d) => (c[d] = t[d], c),
|
|
13596
13605
|
{}
|
|
@@ -13599,7 +13608,7 @@ function Wy(t, r, o) {
|
|
|
13599
13608
|
const eo = null, yn = [Number, String], Er = {
|
|
13600
13609
|
type: Boolean,
|
|
13601
13610
|
default: !0
|
|
13602
|
-
},
|
|
13611
|
+
}, Xy = (t) => ({
|
|
13603
13612
|
type: Number,
|
|
13604
13613
|
default: t
|
|
13605
13614
|
}), wn = (t) => ({
|
|
@@ -13645,7 +13654,7 @@ function wd(t, r, o = {}) {
|
|
|
13645
13654
|
};
|
|
13646
13655
|
}
|
|
13647
13656
|
var $i, $o;
|
|
13648
|
-
function
|
|
13657
|
+
function qy() {
|
|
13649
13658
|
if (!$i && ($i = it(0), $o = it(0), Bs)) {
|
|
13650
13659
|
const t = () => {
|
|
13651
13660
|
$i.value = window.innerWidth, $o.value = window.innerHeight;
|
|
@@ -13654,31 +13663,31 @@ function Xy() {
|
|
|
13654
13663
|
}
|
|
13655
13664
|
return { width: $i, height: $o };
|
|
13656
13665
|
}
|
|
13657
|
-
var
|
|
13658
|
-
function
|
|
13666
|
+
var Yy = /scroll|auto|overlay/i, Ky = Bs ? window : void 0;
|
|
13667
|
+
function Jy(t) {
|
|
13659
13668
|
return t.tagName !== "HTML" && t.tagName !== "BODY" && t.nodeType === 1;
|
|
13660
13669
|
}
|
|
13661
|
-
function Ml(t, r =
|
|
13670
|
+
function Ml(t, r = Ky) {
|
|
13662
13671
|
let o = t;
|
|
13663
|
-
for (; o && o !== r &&
|
|
13672
|
+
for (; o && o !== r && Jy(o); ) {
|
|
13664
13673
|
const { overflowY: c } = window.getComputedStyle(o);
|
|
13665
|
-
if (
|
|
13674
|
+
if (Yy.test(c))
|
|
13666
13675
|
return o;
|
|
13667
13676
|
o = o.parentNode;
|
|
13668
13677
|
}
|
|
13669
13678
|
return r;
|
|
13670
13679
|
}
|
|
13671
|
-
|
|
13672
|
-
const
|
|
13680
|
+
Wy();
|
|
13681
|
+
const Qy = (t) => t.stopPropagation();
|
|
13673
13682
|
function _d(t, r) {
|
|
13674
|
-
(typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(),
|
|
13683
|
+
(typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(), Qy(t);
|
|
13675
13684
|
}
|
|
13676
|
-
|
|
13685
|
+
qy();
|
|
13677
13686
|
function kn(t) {
|
|
13678
13687
|
if (dr(t))
|
|
13679
13688
|
return xd(t) ? `${t}px` : String(t);
|
|
13680
13689
|
}
|
|
13681
|
-
function
|
|
13690
|
+
function ew(t) {
|
|
13682
13691
|
if (dr(t)) {
|
|
13683
13692
|
if (Array.isArray(t))
|
|
13684
13693
|
return {
|
|
@@ -13692,21 +13701,21 @@ function Qy(t) {
|
|
|
13692
13701
|
};
|
|
13693
13702
|
}
|
|
13694
13703
|
}
|
|
13695
|
-
function
|
|
13704
|
+
function tw(t) {
|
|
13696
13705
|
const r = {};
|
|
13697
13706
|
return t !== void 0 && (r.zIndex = +t), r;
|
|
13698
13707
|
}
|
|
13699
|
-
const
|
|
13700
|
-
function
|
|
13708
|
+
const nw = /-(\w)/g, vd = (t) => t.replace(nw, (r, o) => o.toUpperCase()), rw = (t) => t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, ""), { hasOwnProperty: iw } = Object.prototype;
|
|
13709
|
+
function ow(t, r, o) {
|
|
13701
13710
|
const c = r[o];
|
|
13702
|
-
dr(c) && (!
|
|
13711
|
+
dr(c) && (!iw.call(t, o) || !fo(c) ? t[o] = c : t[o] = Cd(Object(t[o]), c));
|
|
13703
13712
|
}
|
|
13704
13713
|
function Cd(t, r) {
|
|
13705
13714
|
return Object.keys(r).forEach((o) => {
|
|
13706
|
-
|
|
13715
|
+
ow(t, r, o);
|
|
13707
13716
|
}), t;
|
|
13708
13717
|
}
|
|
13709
|
-
var
|
|
13718
|
+
var sw = {
|
|
13710
13719
|
name: "姓名",
|
|
13711
13720
|
tel: "电话",
|
|
13712
13721
|
save: "保存",
|
|
@@ -13770,8 +13779,8 @@ var ow = {
|
|
|
13770
13779
|
}
|
|
13771
13780
|
};
|
|
13772
13781
|
const Dl = it("zh-CN"), Pl = lr({
|
|
13773
|
-
"zh-CN":
|
|
13774
|
-
}),
|
|
13782
|
+
"zh-CN": sw
|
|
13783
|
+
}), aw = {
|
|
13775
13784
|
messages() {
|
|
13776
13785
|
return Pl[Dl.value];
|
|
13777
13786
|
},
|
|
@@ -13782,11 +13791,11 @@ const Dl = it("zh-CN"), Pl = lr({
|
|
|
13782
13791
|
Cd(Pl, t);
|
|
13783
13792
|
}
|
|
13784
13793
|
};
|
|
13785
|
-
var
|
|
13786
|
-
function
|
|
13794
|
+
var lw = aw;
|
|
13795
|
+
function cw(t) {
|
|
13787
13796
|
const r = vd(t) + ".";
|
|
13788
13797
|
return (o, ...c) => {
|
|
13789
|
-
const d =
|
|
13798
|
+
const d = lw.messages(), f = Rl(d, r + o) || Rl(d, o);
|
|
13790
13799
|
return cs(f) ? f(...c) : f;
|
|
13791
13800
|
};
|
|
13792
13801
|
}
|
|
@@ -13799,19 +13808,19 @@ function us(t, r) {
|
|
|
13799
13808
|
""
|
|
13800
13809
|
) : "";
|
|
13801
13810
|
}
|
|
13802
|
-
function
|
|
13811
|
+
function uw(t) {
|
|
13803
13812
|
return (r, o) => (r && typeof r != "string" && (o = r, r = ""), r = r ? `${t}__${r}` : t, `${r}${us(r, o)}`);
|
|
13804
13813
|
}
|
|
13805
13814
|
function Nr(t) {
|
|
13806
13815
|
const r = `van-${t}`;
|
|
13807
13816
|
return [
|
|
13808
13817
|
r,
|
|
13809
|
-
|
|
13810
|
-
|
|
13818
|
+
uw(r),
|
|
13819
|
+
cw(r)
|
|
13811
13820
|
];
|
|
13812
13821
|
}
|
|
13813
|
-
const
|
|
13814
|
-
function
|
|
13822
|
+
const dw = "van-haptics-feedback", Bl = 5;
|
|
13823
|
+
function fw(t, {
|
|
13815
13824
|
args: r = [],
|
|
13816
13825
|
done: o,
|
|
13817
13826
|
canceled: c,
|
|
@@ -13819,9 +13828,9 @@ function dw(t, {
|
|
|
13819
13828
|
}) {
|
|
13820
13829
|
if (t) {
|
|
13821
13830
|
const f = t.apply(null, r);
|
|
13822
|
-
|
|
13831
|
+
Hy(f) ? f.then((g) => {
|
|
13823
13832
|
g ? o() : c && c();
|
|
13824
|
-
}).catch(d ||
|
|
13833
|
+
}).catch(d || jy) : f ? o() : c && c();
|
|
13825
13834
|
} else
|
|
13826
13835
|
o();
|
|
13827
13836
|
}
|
|
@@ -13831,12 +13840,12 @@ function Ii(t) {
|
|
|
13831
13840
|
o && (r.component(o, t), r.component(vd(`-${o}`), t));
|
|
13832
13841
|
}, t;
|
|
13833
13842
|
}
|
|
13834
|
-
const
|
|
13843
|
+
const hw = /* @__PURE__ */ Symbol();
|
|
13835
13844
|
function bd(t) {
|
|
13836
13845
|
const r = hs();
|
|
13837
13846
|
r && Wn(r.proxy, t);
|
|
13838
13847
|
}
|
|
13839
|
-
const [
|
|
13848
|
+
const [pw, Ll] = Nr("badge"), gw = {
|
|
13840
13849
|
dot: Boolean,
|
|
13841
13850
|
max: yn,
|
|
13842
13851
|
tag: wn("div"),
|
|
@@ -13846,9 +13855,9 @@ const [hw, Ll] = Nr("badge"), pw = {
|
|
|
13846
13855
|
showZero: Er,
|
|
13847
13856
|
position: wn("top-right")
|
|
13848
13857
|
};
|
|
13849
|
-
var
|
|
13850
|
-
name:
|
|
13851
|
-
props:
|
|
13858
|
+
var mw = sn({
|
|
13859
|
+
name: pw,
|
|
13860
|
+
props: gw,
|
|
13852
13861
|
setup(t, {
|
|
13853
13862
|
slots: r
|
|
13854
13863
|
}) {
|
|
@@ -13904,11 +13913,11 @@ var gw = sn({
|
|
|
13904
13913
|
};
|
|
13905
13914
|
}
|
|
13906
13915
|
});
|
|
13907
|
-
const
|
|
13916
|
+
const xw = Ii(mw);
|
|
13908
13917
|
let Ad = 2e3;
|
|
13909
|
-
const
|
|
13918
|
+
const yw = () => ++Ad, ww = (t) => {
|
|
13910
13919
|
Ad = t;
|
|
13911
|
-
}, [Ed,
|
|
13920
|
+
}, [Ed, _w] = Nr("config-provider"), Id = Symbol(Ed), vw = {
|
|
13912
13921
|
tag: wn("div"),
|
|
13913
13922
|
theme: wn("light"),
|
|
13914
13923
|
zIndex: Number,
|
|
@@ -13918,13 +13927,13 @@ const xw = () => ++Ad, yw = (t) => {
|
|
|
13918
13927
|
themeVarsScope: wn("local"),
|
|
13919
13928
|
iconPrefix: String
|
|
13920
13929
|
};
|
|
13921
|
-
function
|
|
13930
|
+
function Cw(t) {
|
|
13922
13931
|
return t.replace(/([a-zA-Z])(\d)/g, "$1-$2");
|
|
13923
13932
|
}
|
|
13924
|
-
function
|
|
13933
|
+
function bw(t) {
|
|
13925
13934
|
const r = {};
|
|
13926
13935
|
return Object.keys(t).forEach((o) => {
|
|
13927
|
-
const c =
|
|
13936
|
+
const c = Cw(rw(o));
|
|
13928
13937
|
r[`--van-${c}`] = t[o];
|
|
13929
13938
|
}), r;
|
|
13930
13939
|
}
|
|
@@ -13937,11 +13946,11 @@ function Vi(t = {}, r = {}) {
|
|
|
13937
13946
|
}
|
|
13938
13947
|
sn({
|
|
13939
13948
|
name: Ed,
|
|
13940
|
-
props:
|
|
13949
|
+
props: vw,
|
|
13941
13950
|
setup(t, {
|
|
13942
13951
|
slots: r
|
|
13943
13952
|
}) {
|
|
13944
|
-
const o = _t(() =>
|
|
13953
|
+
const o = _t(() => bw(Wn({}, t.themeVars, t.theme === "dark" ? t.themeVarsDark : t.themeVarsLight)));
|
|
13945
13954
|
if (Ps) {
|
|
13946
13955
|
const c = () => {
|
|
13947
13956
|
document.documentElement.classList.add(`van-theme-${t.theme}`);
|
|
@@ -13959,9 +13968,9 @@ sn({
|
|
|
13959
13968
|
}), t.themeVarsScope === "global" && Vi(o.value, {});
|
|
13960
13969
|
}
|
|
13961
13970
|
return oc(Id, t), Wo(() => {
|
|
13962
|
-
t.zIndex !== void 0 &&
|
|
13971
|
+
t.zIndex !== void 0 && ww(t.zIndex);
|
|
13963
13972
|
}), () => Le(t.tag, {
|
|
13964
|
-
class:
|
|
13973
|
+
class: _w(),
|
|
13965
13974
|
style: t.themeVarsScope === "local" ? o.value : void 0
|
|
13966
13975
|
}, {
|
|
13967
13976
|
default: () => {
|
|
@@ -13971,7 +13980,7 @@ sn({
|
|
|
13971
13980
|
});
|
|
13972
13981
|
}
|
|
13973
13982
|
});
|
|
13974
|
-
const [
|
|
13983
|
+
const [Aw, Fl] = Nr("icon"), Ew = (t) => t?.includes("/"), Iw = {
|
|
13975
13984
|
dot: Boolean,
|
|
13976
13985
|
tag: wn("i"),
|
|
13977
13986
|
name: String,
|
|
@@ -13981,9 +13990,9 @@ const [bw, Fl] = Nr("icon"), Aw = (t) => t?.includes("/"), Ew = {
|
|
|
13981
13990
|
badgeProps: Object,
|
|
13982
13991
|
classPrefix: String
|
|
13983
13992
|
};
|
|
13984
|
-
var
|
|
13985
|
-
name:
|
|
13986
|
-
props:
|
|
13993
|
+
var Sw = sn({
|
|
13994
|
+
name: Aw,
|
|
13995
|
+
props: Iw,
|
|
13987
13996
|
setup(t, {
|
|
13988
13997
|
slots: r
|
|
13989
13998
|
}) {
|
|
@@ -13996,8 +14005,8 @@ var Iw = sn({
|
|
|
13996
14005
|
size: x,
|
|
13997
14006
|
badge: _,
|
|
13998
14007
|
color: m
|
|
13999
|
-
} = t, A =
|
|
14000
|
-
return Le(
|
|
14008
|
+
} = t, A = Ew(g);
|
|
14009
|
+
return Le(xw, Hr({
|
|
14001
14010
|
dot: f,
|
|
14002
14011
|
tag: d,
|
|
14003
14012
|
class: [c.value, A ? "" : `${c.value}-${g}`],
|
|
@@ -14018,9 +14027,9 @@ var Iw = sn({
|
|
|
14018
14027
|
};
|
|
14019
14028
|
}
|
|
14020
14029
|
});
|
|
14021
|
-
const Ls = Ii(
|
|
14030
|
+
const Ls = Ii(Sw), [Tw, fi] = Nr("loading"), Ow = Array(12).fill(null).map((t, r) => Le("i", {
|
|
14022
14031
|
class: fi("line", String(r + 1))
|
|
14023
|
-
}, null)),
|
|
14032
|
+
}, null)), Nw = Le("svg", {
|
|
14024
14033
|
class: fi("circular"),
|
|
14025
14034
|
viewBox: "25 25 50 50"
|
|
14026
14035
|
}, [Le("circle", {
|
|
@@ -14028,7 +14037,7 @@ const Ls = Ii(Iw), [Sw, fi] = Nr("loading"), Tw = Array(12).fill(null).map((t, r
|
|
|
14028
14037
|
cy: "50",
|
|
14029
14038
|
r: "20",
|
|
14030
14039
|
fill: "none"
|
|
14031
|
-
}, null)]),
|
|
14040
|
+
}, null)]), kw = {
|
|
14032
14041
|
size: yn,
|
|
14033
14042
|
type: wn("circular"),
|
|
14034
14043
|
color: String,
|
|
@@ -14036,16 +14045,16 @@ const Ls = Ii(Iw), [Sw, fi] = Nr("loading"), Tw = Array(12).fill(null).map((t, r
|
|
|
14036
14045
|
textSize: yn,
|
|
14037
14046
|
textColor: String
|
|
14038
14047
|
};
|
|
14039
|
-
var
|
|
14040
|
-
name:
|
|
14041
|
-
props:
|
|
14048
|
+
var Rw = sn({
|
|
14049
|
+
name: Tw,
|
|
14050
|
+
props: kw,
|
|
14042
14051
|
setup(t, {
|
|
14043
14052
|
slots: r
|
|
14044
14053
|
}) {
|
|
14045
14054
|
const o = _t(() => Wn({
|
|
14046
14055
|
color: t.color
|
|
14047
|
-
},
|
|
14048
|
-
const f = t.type === "spinner" ?
|
|
14056
|
+
}, ew(t.size))), c = () => {
|
|
14057
|
+
const f = t.type === "spinner" ? Ow : Nw;
|
|
14049
14058
|
return Le("span", {
|
|
14050
14059
|
class: fi("spinner", t.type),
|
|
14051
14060
|
style: o.value
|
|
@@ -14076,7 +14085,7 @@ var kw = sn({
|
|
|
14076
14085
|
};
|
|
14077
14086
|
}
|
|
14078
14087
|
});
|
|
14079
|
-
const
|
|
14088
|
+
const Mw = Ii(Rw), Dw = {
|
|
14080
14089
|
// whether to show popup
|
|
14081
14090
|
show: Boolean,
|
|
14082
14091
|
// z-index
|
|
@@ -14104,10 +14113,10 @@ const Rw = Ii(kw), Mw = {
|
|
|
14104
14113
|
// whether to close popup when overlay is clicked
|
|
14105
14114
|
closeOnClickOverlay: Er
|
|
14106
14115
|
};
|
|
14107
|
-
function
|
|
14116
|
+
function Pw(t, r) {
|
|
14108
14117
|
return t > r ? "horizontal" : r > t ? "vertical" : "";
|
|
14109
14118
|
}
|
|
14110
|
-
function
|
|
14119
|
+
function Bw() {
|
|
14111
14120
|
const t = it(0), r = it(0), o = it(0), c = it(0), d = it(0), f = it(0), g = it(""), x = it(!0), _ = () => g.value === "vertical", m = () => g.value === "horizontal", A = () => {
|
|
14112
14121
|
o.value = 0, c.value = 0, d.value = 0, f.value = 0, g.value = "", x.value = !0;
|
|
14113
14122
|
};
|
|
@@ -14116,7 +14125,7 @@ function Pw() {
|
|
|
14116
14125
|
const I = S.touches[0];
|
|
14117
14126
|
o.value = (I.clientX < 0 ? 0 : I.clientX) - t.value, c.value = I.clientY - r.value, d.value = Math.abs(o.value), f.value = Math.abs(c.value);
|
|
14118
14127
|
const D = 10;
|
|
14119
|
-
(!g.value || d.value < D && f.value < D) && (g.value =
|
|
14128
|
+
(!g.value || d.value < D && f.value < D) && (g.value = Pw(d.value, f.value)), x.value && (d.value > Bl || f.value > Bl) && (x.value = !1);
|
|
14120
14129
|
}),
|
|
14121
14130
|
start: ((S) => {
|
|
14122
14131
|
A(), t.value = S.touches[0].clientX, r.value = S.touches[0].clientY;
|
|
@@ -14136,8 +14145,8 @@ function Pw() {
|
|
|
14136
14145
|
}
|
|
14137
14146
|
let oi = 0;
|
|
14138
14147
|
const Ul = "van-overflow-hidden";
|
|
14139
|
-
function
|
|
14140
|
-
const o =
|
|
14148
|
+
function Lw(t, r) {
|
|
14149
|
+
const o = Bw(), c = "01", d = "10", f = (A) => {
|
|
14141
14150
|
o.move(A);
|
|
14142
14151
|
const b = o.deltaY.value > 0 ? d : c;
|
|
14143
14152
|
let M = Ml(
|
|
@@ -14172,7 +14181,7 @@ const zl = () => {
|
|
|
14172
14181
|
var t;
|
|
14173
14182
|
const { scopeId: r } = ((t = hs()) == null ? void 0 : t.vnode) || {};
|
|
14174
14183
|
return r ? { [r]: "" } : null;
|
|
14175
|
-
}, [
|
|
14184
|
+
}, [Fw, Uw] = Nr("overlay"), zw = {
|
|
14176
14185
|
show: Boolean,
|
|
14177
14186
|
zIndex: yn,
|
|
14178
14187
|
duration: yn,
|
|
@@ -14182,10 +14191,10 @@ const zl = () => {
|
|
|
14182
14191
|
customStyle: Object,
|
|
14183
14192
|
teleport: [String, Object]
|
|
14184
14193
|
};
|
|
14185
|
-
var
|
|
14186
|
-
name:
|
|
14194
|
+
var Zw = sn({
|
|
14195
|
+
name: Fw,
|
|
14187
14196
|
inheritAttrs: !1,
|
|
14188
|
-
props:
|
|
14197
|
+
props: zw,
|
|
14189
14198
|
setup(t, {
|
|
14190
14199
|
attrs: r,
|
|
14191
14200
|
slots: o
|
|
@@ -14194,11 +14203,11 @@ var zw = sn({
|
|
|
14194
14203
|
t.lockScroll && _d(x);
|
|
14195
14204
|
}, g = d(() => {
|
|
14196
14205
|
var x;
|
|
14197
|
-
const _ = Wn(
|
|
14206
|
+
const _ = Wn(tw(t.zIndex), t.customStyle);
|
|
14198
14207
|
return dr(t.duration) && (_.animationDuration = `${t.duration}s`), ps(Le("div", Hr({
|
|
14199
14208
|
ref: c,
|
|
14200
14209
|
style: _,
|
|
14201
|
-
class: [
|
|
14210
|
+
class: [Uw(), t.className]
|
|
14202
14211
|
}, r), [(x = o.default) == null ? void 0 : x.call(o)]), [[gs, t.show]]);
|
|
14203
14212
|
});
|
|
14204
14213
|
return wd("touchmove", f, {
|
|
@@ -14218,7 +14227,7 @@ var zw = sn({
|
|
|
14218
14227
|
};
|
|
14219
14228
|
}
|
|
14220
14229
|
});
|
|
14221
|
-
const
|
|
14230
|
+
const $w = Ii(Zw), Vw = Wn({}, Dw, {
|
|
14222
14231
|
round: Boolean,
|
|
14223
14232
|
position: wn("center"),
|
|
14224
14233
|
closeIcon: wn("cross"),
|
|
@@ -14230,11 +14239,11 @@ const Zw = Ii(zw), $w = Wn({}, Mw, {
|
|
|
14230
14239
|
destroyOnClose: Boolean,
|
|
14231
14240
|
safeAreaInsetTop: Boolean,
|
|
14232
14241
|
safeAreaInsetBottom: Boolean
|
|
14233
|
-
}), [
|
|
14234
|
-
var
|
|
14235
|
-
name:
|
|
14242
|
+
}), [jw, Zl] = Nr("popup");
|
|
14243
|
+
var Hw = sn({
|
|
14244
|
+
name: jw,
|
|
14236
14245
|
inheritAttrs: !1,
|
|
14237
|
-
props:
|
|
14246
|
+
props: Vw,
|
|
14238
14247
|
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
|
|
14239
14248
|
setup(t, {
|
|
14240
14249
|
emit: r,
|
|
@@ -14252,9 +14261,9 @@ var jw = sn({
|
|
|
14252
14261
|
}
|
|
14253
14262
|
return P;
|
|
14254
14263
|
}), A = () => {
|
|
14255
|
-
d || (d = !0, g.value = t.zIndex !== void 0 ? +t.zIndex :
|
|
14264
|
+
d || (d = !0, g.value = t.zIndex !== void 0 ? +t.zIndex : yw(), r("open"));
|
|
14256
14265
|
}, b = () => {
|
|
14257
|
-
d &&
|
|
14266
|
+
d && fw(t.beforeClose, {
|
|
14258
14267
|
done() {
|
|
14259
14268
|
d = !1, r("close"), r("update:show", !1);
|
|
14260
14269
|
}
|
|
@@ -14272,7 +14281,7 @@ var jw = sn({
|
|
|
14272
14281
|
role: t.closeOnClickOverlay ? "button" : void 0,
|
|
14273
14282
|
tabindex: t.closeOnClickOverlay ? 0 : void 0
|
|
14274
14283
|
}, t.overlayProps);
|
|
14275
|
-
return Le(
|
|
14284
|
+
return Le($w, Hr(P, zl(), {
|
|
14276
14285
|
onClick: M
|
|
14277
14286
|
}), {
|
|
14278
14287
|
default: c["overlay-content"]
|
|
@@ -14286,7 +14295,7 @@ var jw = sn({
|
|
|
14286
14295
|
role: "button",
|
|
14287
14296
|
tabindex: 0,
|
|
14288
14297
|
name: t.closeIcon,
|
|
14289
|
-
class: [Zl("close-icon", t.closeIconPosition),
|
|
14298
|
+
class: [Zl("close-icon", t.closeIconPosition), dw],
|
|
14290
14299
|
classPrefix: t.iconPrefix,
|
|
14291
14300
|
onClick: I
|
|
14292
14301
|
}, null);
|
|
@@ -14343,7 +14352,7 @@ var jw = sn({
|
|
|
14343
14352
|
})), !P && d && (d = !1, r("close"));
|
|
14344
14353
|
}), bd({
|
|
14345
14354
|
popupRef: x
|
|
14346
|
-
}),
|
|
14355
|
+
}), Lw(x, () => t.show && t.lockScroll), wd("popstate", () => {
|
|
14347
14356
|
t.closeOnPopstate && (b(), f = !1);
|
|
14348
14357
|
}), Wr(() => {
|
|
14349
14358
|
t.show && A();
|
|
@@ -14351,26 +14360,26 @@ var jw = sn({
|
|
|
14351
14360
|
f && (r("update:show", !0), f = !1);
|
|
14352
14361
|
}), ro(() => {
|
|
14353
14362
|
t.show && t.teleport && (b(), f = !0);
|
|
14354
|
-
}), oc(
|
|
14363
|
+
}), oc(hw, () => t.show), () => t.teleport ? Le(oo, {
|
|
14355
14364
|
to: t.teleport
|
|
14356
14365
|
}, {
|
|
14357
14366
|
default: () => [S(), Z()]
|
|
14358
14367
|
}) : Le(so, null, [S(), Z()]);
|
|
14359
14368
|
}
|
|
14360
14369
|
});
|
|
14361
|
-
const
|
|
14370
|
+
const Ww = Ii(Hw);
|
|
14362
14371
|
let si = 0;
|
|
14363
|
-
function
|
|
14372
|
+
function Gw(t) {
|
|
14364
14373
|
t ? (si || document.body.classList.add("van-toast--unclickable"), si++) : si && (si--, si || document.body.classList.remove("van-toast--unclickable"));
|
|
14365
14374
|
}
|
|
14366
|
-
const [
|
|
14375
|
+
const [Xw, $r] = Nr("toast"), qw = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"], Yw = {
|
|
14367
14376
|
icon: String,
|
|
14368
14377
|
show: Boolean,
|
|
14369
14378
|
type: wn("text"),
|
|
14370
14379
|
overlay: Boolean,
|
|
14371
14380
|
message: yn,
|
|
14372
14381
|
iconSize: yn,
|
|
14373
|
-
duration:
|
|
14382
|
+
duration: Xy(2e3),
|
|
14374
14383
|
position: wn("middle"),
|
|
14375
14384
|
teleport: [String, Object],
|
|
14376
14385
|
wordBreak: String,
|
|
@@ -14385,9 +14394,9 @@ const [Gw, $r] = Nr("toast"), Xw = ["show", "overlay", "teleport", "transition",
|
|
|
14385
14394
|
closeOnClickOverlay: Boolean,
|
|
14386
14395
|
zIndex: yn
|
|
14387
14396
|
};
|
|
14388
|
-
var
|
|
14389
|
-
name:
|
|
14390
|
-
props:
|
|
14397
|
+
var Kw = sn({
|
|
14398
|
+
name: Xw,
|
|
14399
|
+
props: Yw,
|
|
14391
14400
|
emits: ["update:show"],
|
|
14392
14401
|
setup(t, {
|
|
14393
14402
|
emit: r,
|
|
@@ -14396,7 +14405,7 @@ var Yw = sn({
|
|
|
14396
14405
|
let c, d = !1;
|
|
14397
14406
|
const f = () => {
|
|
14398
14407
|
const b = t.show && t.forbidClick;
|
|
14399
|
-
d !== b && (d = b,
|
|
14408
|
+
d !== b && (d = b, Gw(d));
|
|
14400
14409
|
}, g = (b) => r("update:show", b), x = () => {
|
|
14401
14410
|
t.closeOnClick && g(!1);
|
|
14402
14411
|
}, _ = () => clearTimeout(c), m = () => {
|
|
@@ -14415,7 +14424,7 @@ var Yw = sn({
|
|
|
14415
14424
|
classPrefix: I
|
|
14416
14425
|
}, null);
|
|
14417
14426
|
if (M === "loading")
|
|
14418
|
-
return Le(
|
|
14427
|
+
return Le(Mw, {
|
|
14419
14428
|
class: $r("loading"),
|
|
14420
14429
|
size: S,
|
|
14421
14430
|
type: D
|
|
@@ -14442,7 +14451,7 @@ var Yw = sn({
|
|
|
14442
14451
|
_(), t.show && t.duration > 0 && (c = setTimeout(() => {
|
|
14443
14452
|
g(!1);
|
|
14444
14453
|
}, t.duration));
|
|
14445
|
-
}), Wr(f), Ci(f), () => Le(
|
|
14454
|
+
}), Wr(f), Ci(f), () => Le(Ww, Hr({
|
|
14446
14455
|
class: [$r([t.position, t.wordBreak === "normal" ? "break-normal" : t.wordBreak, {
|
|
14447
14456
|
[t.type]: !t.icon
|
|
14448
14457
|
}]), t.className],
|
|
@@ -14450,12 +14459,12 @@ var Yw = sn({
|
|
|
14450
14459
|
onClick: x,
|
|
14451
14460
|
onClosed: _,
|
|
14452
14461
|
"onUpdate:show": g
|
|
14453
|
-
},
|
|
14462
|
+
}, Gy(t, qw)), {
|
|
14454
14463
|
default: () => [m(), A()]
|
|
14455
14464
|
});
|
|
14456
14465
|
}
|
|
14457
14466
|
});
|
|
14458
|
-
function
|
|
14467
|
+
function Jw() {
|
|
14459
14468
|
const t = lr({
|
|
14460
14469
|
show: !1
|
|
14461
14470
|
}), r = (d) => {
|
|
@@ -14470,7 +14479,7 @@ function Kw() {
|
|
|
14470
14479
|
toggle: r
|
|
14471
14480
|
};
|
|
14472
14481
|
}
|
|
14473
|
-
function
|
|
14482
|
+
function Qw(t) {
|
|
14474
14483
|
const r = h1(t), o = document.createElement("div");
|
|
14475
14484
|
return document.body.appendChild(o), {
|
|
14476
14485
|
instance: r.mount(o),
|
|
@@ -14479,7 +14488,7 @@ function Jw(t) {
|
|
|
14479
14488
|
}
|
|
14480
14489
|
};
|
|
14481
14490
|
}
|
|
14482
|
-
const
|
|
14491
|
+
const e_ = {
|
|
14483
14492
|
icon: "",
|
|
14484
14493
|
type: "text",
|
|
14485
14494
|
message: "",
|
|
@@ -14500,25 +14509,25 @@ const Qw = {
|
|
|
14500
14509
|
closeOnClick: !1,
|
|
14501
14510
|
closeOnClickOverlay: !1
|
|
14502
14511
|
};
|
|
14503
|
-
let ji = [],
|
|
14504
|
-
const
|
|
14512
|
+
let ji = [], t_ = !1, $l = Wn({}, e_);
|
|
14513
|
+
const n_ = /* @__PURE__ */ new Map();
|
|
14505
14514
|
function Td(t) {
|
|
14506
14515
|
return fo(t) ? t : {
|
|
14507
14516
|
message: t
|
|
14508
14517
|
};
|
|
14509
14518
|
}
|
|
14510
|
-
function
|
|
14519
|
+
function r_() {
|
|
14511
14520
|
const {
|
|
14512
14521
|
instance: t
|
|
14513
|
-
} =
|
|
14522
|
+
} = Qw({
|
|
14514
14523
|
setup() {
|
|
14515
14524
|
const r = it(""), {
|
|
14516
14525
|
open: o,
|
|
14517
14526
|
state: c,
|
|
14518
14527
|
close: d,
|
|
14519
14528
|
toggle: f
|
|
14520
|
-
} =
|
|
14521
|
-
}, x = () => Le(
|
|
14529
|
+
} = Jw(), g = () => {
|
|
14530
|
+
}, x = () => Le(Kw, Hr(c, {
|
|
14522
14531
|
onClosed: g,
|
|
14523
14532
|
"onUpdate:show": f
|
|
14524
14533
|
}), null);
|
|
@@ -14533,9 +14542,9 @@ function n_() {
|
|
|
14533
14542
|
});
|
|
14534
14543
|
return t;
|
|
14535
14544
|
}
|
|
14536
|
-
function
|
|
14537
|
-
if (!ji.length ||
|
|
14538
|
-
const t =
|
|
14545
|
+
function i_() {
|
|
14546
|
+
if (!ji.length || t_) {
|
|
14547
|
+
const t = r_();
|
|
14539
14548
|
ji.push(t);
|
|
14540
14549
|
}
|
|
14541
14550
|
return ji[ji.length - 1];
|
|
@@ -14543,25 +14552,25 @@ function r_() {
|
|
|
14543
14552
|
function at(t = {}) {
|
|
14544
14553
|
if (!Ps)
|
|
14545
14554
|
return {};
|
|
14546
|
-
const r =
|
|
14547
|
-
return r.open(Wn({}, $l,
|
|
14555
|
+
const r = i_(), o = Td(t);
|
|
14556
|
+
return r.open(Wn({}, $l, n_.get(o.type || $l.type), o)), r;
|
|
14548
14557
|
}
|
|
14549
|
-
const
|
|
14558
|
+
const o_ = (t) => (r) => at(Wn({
|
|
14550
14559
|
type: t
|
|
14551
|
-
}, Td(r))), Od =
|
|
14560
|
+
}, Td(r))), Od = o_("loading"), s_ = (t) => {
|
|
14552
14561
|
try {
|
|
14553
14562
|
const r = JSON.parse(t), o = [];
|
|
14554
14563
|
if (!r.mcpServers || typeof r.mcpServers != "object")
|
|
14555
14564
|
throw new Error("JSON 格式错误:缺少 mcpServers 字段");
|
|
14556
14565
|
for (const [c, d] of Object.entries(r.mcpServers)) {
|
|
14557
|
-
const f =
|
|
14566
|
+
const f = a_(d);
|
|
14558
14567
|
f && o.push({ name: c, config: f });
|
|
14559
14568
|
}
|
|
14560
14569
|
return o;
|
|
14561
14570
|
} catch (r) {
|
|
14562
14571
|
throw new Error(`JSON 解析失败: ${r instanceof Error ? r.message : "未知错误"}`);
|
|
14563
14572
|
}
|
|
14564
|
-
},
|
|
14573
|
+
}, a_ = (t) => {
|
|
14565
14574
|
if (!t || typeof t != "object" || !t.url)
|
|
14566
14575
|
return null;
|
|
14567
14576
|
const { type: r, url: o, sessionId: c, headers: d } = t;
|
|
@@ -14576,7 +14585,7 @@ const i_ = (t) => (r) => at(Wn({
|
|
|
14576
14585
|
headers: d,
|
|
14577
14586
|
useAISdkClient: !0
|
|
14578
14587
|
};
|
|
14579
|
-
},
|
|
14588
|
+
}, l_ = (t, r, o) => {
|
|
14580
14589
|
const c = async (f, g, x, _, m) => {
|
|
14581
14590
|
if (await t.insertMcpServer(f, g)) {
|
|
14582
14591
|
const b = t.mcpTools[f];
|
|
@@ -14613,7 +14622,7 @@ const i_ = (t) => (r) => at(Wn({
|
|
|
14613
14622
|
at("添加工具失败:code 类型需要 JSON 字符串格式");
|
|
14614
14623
|
return;
|
|
14615
14624
|
}
|
|
14616
|
-
const $ =
|
|
14625
|
+
const $ = s_(g);
|
|
14617
14626
|
if ($.length === 0) {
|
|
14618
14627
|
at("添加工具失败:JSON 配置格式不正确或未找到有效的服务器配置");
|
|
14619
14628
|
return;
|
|
@@ -14663,7 +14672,7 @@ const i_ = (t) => (r) => at(Wn({
|
|
|
14663
14672
|
}
|
|
14664
14673
|
};
|
|
14665
14674
|
};
|
|
14666
|
-
function
|
|
14675
|
+
function c_(t, r, o) {
|
|
14667
14676
|
const c = it([]), d = it([]), f = it(!1), g = (Z) => t.mcpServers[Z]?.type === "local", x = (Z, P) => {
|
|
14668
14677
|
P ? t.ignoreToolnames = t.ignoreToolnames.filter((B) => B !== Z) : t.ignoreToolnames.includes(Z) || t.ignoreToolnames.push(Z);
|
|
14669
14678
|
}, _ = (Z, P) => {
|
|
@@ -14816,7 +14825,7 @@ function l_(t, r, o) {
|
|
|
14816
14825
|
syncInstalledPluginTools: b
|
|
14817
14826
|
};
|
|
14818
14827
|
}
|
|
14819
|
-
function
|
|
14828
|
+
function u_(t) {
|
|
14820
14829
|
const { onToolCatalogChanged: r } = t, o = typeof window < "u" && window !== window.top, c = (M) => M === window || o && M === window.parent;
|
|
14821
14830
|
let d = !1, f = !1, g = !1;
|
|
14822
14831
|
const x = async () => {
|
|
@@ -14854,7 +14863,7 @@ function c_(t) {
|
|
|
14854
14863
|
b();
|
|
14855
14864
|
});
|
|
14856
14865
|
}
|
|
14857
|
-
function
|
|
14866
|
+
function d_(t) {
|
|
14858
14867
|
const { skillsRef: r, customAgentProvider: o } = t, c = p1([]);
|
|
14859
14868
|
Wo(async () => {
|
|
14860
14869
|
const x = r?.value;
|
|
@@ -14879,7 +14888,7 @@ function u_(t) {
|
|
|
14879
14888
|
skillOverviews: c
|
|
14880
14889
|
};
|
|
14881
14890
|
}
|
|
14882
|
-
const
|
|
14891
|
+
const f_ = ["title"], h_ = /* @__PURE__ */ sn({
|
|
14883
14892
|
__name: "TokenUsage",
|
|
14884
14893
|
props: {
|
|
14885
14894
|
usage: {
|
|
@@ -14923,14 +14932,14 @@ const d_ = ["title"], f_ = /* @__PURE__ */ sn({
|
|
|
14923
14932
|
class: xs(_),
|
|
14924
14933
|
style: sc({ width: x[0] })
|
|
14925
14934
|
}, null, 6))), 128))
|
|
14926
|
-
], 8,
|
|
14935
|
+
], 8, f_));
|
|
14927
14936
|
}
|
|
14928
14937
|
}), fr = (t, r) => {
|
|
14929
14938
|
const o = t.__vccOpts || t;
|
|
14930
14939
|
for (const [c, d] of r)
|
|
14931
14940
|
o[c] = d;
|
|
14932
14941
|
return o;
|
|
14933
|
-
},
|
|
14942
|
+
}, p_ = /* @__PURE__ */ fr(h_, [["__scopeId", "data-v-000098b4"]]), g_ = {
|
|
14934
14943
|
width: "100.000000",
|
|
14935
14944
|
height: "100.000000",
|
|
14936
14945
|
viewBox: "0 0 100 100",
|
|
@@ -14938,8 +14947,8 @@ const d_ = ["title"], f_ = /* @__PURE__ */ sn({
|
|
|
14938
14947
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14939
14948
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
14940
14949
|
};
|
|
14941
|
-
function
|
|
14942
|
-
return dt(), Gt("svg",
|
|
14950
|
+
function m_(t, r) {
|
|
14951
|
+
return dt(), Gt("svg", g_, [...r[0] || (r[0] = [
|
|
14943
14952
|
na('<desc> Created with Pixso. </desc><defs><radialGradient gradientTransform="translate(32.4474 65.1156) rotate(128.932) scale(22.991 20.6919)" cx="0.000000" cy="0.000000" r="1.000000" id="paint_radial_9_3090_0" gradientUnits="userSpaceOnUse"><stop stop-color="#5ADDF8"></stop><stop stop-color="#AEBFFF"></stop><stop offset="0.329153" stop-color="#1476FF"></stop><stop offset="0.667785" stop-color="#655AF8"></stop><stop offset="0.868255" stop-color="#948CFF"></stop><stop offset="1.000000" stop-color="#D25AF8"></stop><stop offset="1.000000" stop-color="#5A8BF8"></stop></radialGradient><linearGradient x1="30.999874" y1="85.000229" x2="30.499891" y2="70.500214" id="paint_linear_9_3092_0" gradientUnits="userSpaceOnUse"><stop stop-color="#000000" stop-opacity="0.000000"></stop><stop offset="1.000000" stop-color="#000000"></stop></linearGradient><radialGradient gradientTransform="translate(26.9999 24.7118) rotate(38.3655) scale(77.7996 109.496)" cx="0.000000" cy="0.000000" r="1.000000" id="paint_radial_9_3094_0" gradientUnits="userSpaceOnUse"><stop stop-color="#5ADDF8"></stop><stop stop-color="#AEBFFF"></stop><stop offset="0.329153" stop-color="#1476FF"></stop><stop offset="0.667785" stop-color="#655AF8"></stop><stop offset="0.868255" stop-color="#948CFF"></stop><stop offset="1.000000" stop-color="#D25AF8"></stop><stop offset="1.000000" stop-color="#5A8BF8"></stop></radialGradient></defs><rect id="NEXT-LOGO-无背景渐变-右" width="100.000000" height="99.999939" transform="matrix(-1 0 0 1 100 0)" fill="#FFFFFF" fill-opacity="0"></rect>', 3),
|
|
14944
14953
|
lt("mask", {
|
|
14945
14954
|
id: "mask9_3088",
|
|
@@ -14962,8 +14971,8 @@ function g_(t, r) {
|
|
|
14962
14971
|
na('<g mask="url(#mask9_3088)"><path id="矢量 1" d="M35.93 81.01L36 63L18 63.07L32.48 82.23C33.61 83.71 35.93 82.9 35.93 81.01Z" fill="url(#paint_radial_9_3090_0)" fill-opacity="1.000000" fill-rule="evenodd"></path><g opacity="0.100000" style="mix-blend-mode:normal;"><path id="矢量 1" d="M35.93 81.01L36 63L18 63.07L32.48 82.23C33.61 83.71 35.93 82.9 35.93 81.01Z" fill="url(#paint_linear_9_3092_0)" fill-opacity="1.000000" fill-rule="evenodd"></path></g><rect id="矩形 5" x="12.000000" y="19.000183" rx="26.999992" width="75.999977" height="53.999985" fill="url(#paint_radial_9_3094_0)" fill-opacity="1.000000"></rect><rect id="矩形 5" rx="26.499992" width="74.999977" height="52.999985" transform="matrix(-1 0 0 1 87.5 19.5002)" fill="#000000" fill-opacity="0"></rect><rect id="矩形 5" rx="26.499992" width="74.999977" height="52.999985" transform="matrix(-1 0 0 1 87.5 19.5002)" stroke="#000000" stroke-opacity="0" stroke-width="1.000000"></rect><path id="path" d="M45.39 59.06C44.22 60.05 42.9 60.66 41.43 60.89C39.95 61.12 38.57 61.04 37.28 60.65C36 60.26 34.04 58.58 34.04 58.58C34.04 58.58 29.02 54.73 29.02 45.61C29.02 36.5 33.5 32.5 33.5 32.5C33.5 32.5 34.72 31.31 36.5 31C38.29 30.68 39.43 30.98 40.66 31.33C50.89 34.23 62.38 34.33 72.58 31.33C73.81 30.98 74.91 30.93 75.89 31.17C76.87 31.42 77.71 31.89 78.42 32.59C81.65 35.81 82.87 41.06 83 45.61C83.12 50.09 81.97 55.24 78.94 58.54C78.04 59.52 76.98 60.22 75.78 60.63C74.58 61.04 73.32 61.12 71.99 60.89C70.66 60.66 69.48 60.05 68.46 59.06C68.01 58.62 67.39 58.07 66.57 57.4C65.76 56.73 64.83 56.08 63.79 55.44C62.75 54.8 61.62 54.25 60.39 53.8C59.16 53.35 57.91 53.13 56.62 53.13C55.36 53.13 54.16 53.36 53 53.83C51.85 54.29 50.79 54.84 49.82 55.48C48.86 56.12 48 56.78 47.26 57.45C46.51 58.11 45.89 58.65 45.39 59.06Z" fill="#FFFFFF" fill-opacity="1.000000" fill-rule="nonzero"></path><rect id="矩形 841" rx="2.000000" width="3.999999" height="11.999996" transform="matrix(-0.999983 0.00577157 0.00577157 0.999983 76.1109 38.0356)" fill="#1476FF" fill-opacity="1.000000"></rect><path id="合并" d="M42.96 38C43.77 37.97 44.55 38.42 44.92 39.19L48.73 47.11C49.22 48.13 48.79 49.34 47.75 49.81C46.72 50.28 45.48 49.83 44.99 48.8L42.96 44.59L40.94 48.81C40.45 49.83 39.21 50.28 38.18 49.81C37.14 49.34 36.7 48.13 37.2 47.11L41 39.19C41.37 38.42 42.16 37.98 42.96 38Z" fill="#1476FF" fill-opacity="1.000000" fill-rule="evenodd"></path></g>', 1)
|
|
14963
14972
|
])]);
|
|
14964
14973
|
}
|
|
14965
|
-
const Nd = { render:
|
|
14966
|
-
function
|
|
14974
|
+
const Nd = { render: m_ };
|
|
14975
|
+
function x_(t) {
|
|
14967
14976
|
const { messages: r, messageState: o, inputMessage: c, handleSendMessage: d } = t, f = En(Nd, { style: { width: "48px", height: "48px" } }), g = it({}), x = _t(() => Xi.includes(o.status)), _ = _t(() => r.value.findLastIndex((S) => S.role === "assistant")), m = (S) => S === void 0 ? "复制" : g.value[S] ? "复制成功" : "复制", A = async (S) => {
|
|
14968
14977
|
const D = r.value[S].uiContent.map((R) => R.content).join(`
|
|
14969
14978
|
`);
|
|
@@ -15036,7 +15045,7 @@ function m_(t) {
|
|
|
15036
15045
|
})
|
|
15037
15046
|
),
|
|
15038
15047
|
// Token 使用统计(如果存在)
|
|
15039
|
-
r.value[S].usage ? En(
|
|
15048
|
+
r.value[S].usage ? En(p_, { usage: r.value[S].usage }) : null
|
|
15040
15049
|
]
|
|
15041
15050
|
);
|
|
15042
15051
|
}
|
|
@@ -15065,7 +15074,7 @@ function m_(t) {
|
|
|
15065
15074
|
regenerateMessage: b
|
|
15066
15075
|
};
|
|
15067
15076
|
}
|
|
15068
|
-
function
|
|
15077
|
+
function y_(t) {
|
|
15069
15078
|
const {
|
|
15070
15079
|
createConversation: r,
|
|
15071
15080
|
switchConversation: o,
|
|
@@ -15115,7 +15124,7 @@ function x_(t) {
|
|
|
15115
15124
|
scrollToBottom: m
|
|
15116
15125
|
};
|
|
15117
15126
|
}
|
|
15118
|
-
function
|
|
15127
|
+
function w_(t) {
|
|
15119
15128
|
const {
|
|
15120
15129
|
sessionId: r,
|
|
15121
15130
|
agentRoot: o,
|
|
@@ -15199,27 +15208,27 @@ function y_(t) {
|
|
|
15199
15208
|
watchSessionIdChanges: R
|
|
15200
15209
|
};
|
|
15201
15210
|
}
|
|
15202
|
-
function
|
|
15211
|
+
function __(t) {
|
|
15203
15212
|
return new Promise((r, o) => {
|
|
15204
15213
|
const c = new FileReader();
|
|
15205
15214
|
c.onload = () => r(c.result), c.onerror = o, c.readAsDataURL(t);
|
|
15206
15215
|
});
|
|
15207
15216
|
}
|
|
15208
|
-
function
|
|
15217
|
+
function v_(t) {
|
|
15209
15218
|
return t.type.startsWith("image/");
|
|
15210
15219
|
}
|
|
15211
|
-
function
|
|
15220
|
+
function C_(t, r) {
|
|
15212
15221
|
const o = r * 1024 * 1024;
|
|
15213
15222
|
return t.size <= o;
|
|
15214
15223
|
}
|
|
15215
|
-
async function
|
|
15224
|
+
async function b_(t) {
|
|
15216
15225
|
if (t.length === 0) return [];
|
|
15217
15226
|
const r = [];
|
|
15218
15227
|
for (const o of t)
|
|
15219
15228
|
if (o.rawFile)
|
|
15220
15229
|
try {
|
|
15221
|
-
const c = await
|
|
15222
|
-
|
|
15230
|
+
const c = await __(o.rawFile);
|
|
15231
|
+
v_(o.rawFile) && r.push({
|
|
15223
15232
|
type: "image",
|
|
15224
15233
|
image: c
|
|
15225
15234
|
// AI SDK 标准格式:只需要 type 和 image 字段
|
|
@@ -15232,7 +15241,7 @@ async function C_(t) {
|
|
|
15232
15241
|
}
|
|
15233
15242
|
return r;
|
|
15234
15243
|
}
|
|
15235
|
-
function
|
|
15244
|
+
function A_(t = {}) {
|
|
15236
15245
|
const r = it([]), o = async (d) => {
|
|
15237
15246
|
if (!d || d.length === 0) return;
|
|
15238
15247
|
c();
|
|
@@ -15245,7 +15254,7 @@ function b_(t = {}) {
|
|
|
15245
15254
|
});
|
|
15246
15255
|
continue;
|
|
15247
15256
|
}
|
|
15248
|
-
if (!
|
|
15257
|
+
if (!C_(x, f)) {
|
|
15249
15258
|
at({
|
|
15250
15259
|
type: "fail",
|
|
15251
15260
|
message: `文件大小超过 ${f}MB 限制`
|
|
@@ -15268,8 +15277,8 @@ function b_(t = {}) {
|
|
|
15268
15277
|
clearAttachments: c
|
|
15269
15278
|
};
|
|
15270
15279
|
}
|
|
15271
|
-
function
|
|
15272
|
-
const { selectedModel: r, selectedModelId: o } = t, c = _t(() => r.value?.multimodal?.supportImages ?? !1), d = _t(() => r.value?.multimodal?.maxFileSize || 10), f = _t(() => r.value?.multimodal?.supportedMimeTypes || ["image/"]), { attachments: g, handleFilesSelected: x, clearAttachments: _ } =
|
|
15280
|
+
function E_(t) {
|
|
15281
|
+
const { selectedModel: r, selectedModelId: o } = t, c = _t(() => r.value?.multimodal?.supportImages ?? !1), d = _t(() => r.value?.multimodal?.maxFileSize || 10), f = _t(() => r.value?.multimodal?.supportedMimeTypes || ["image/"]), { attachments: g, handleFilesSelected: x, clearAttachments: _ } = A_({
|
|
15273
15282
|
maxFileSize: d,
|
|
15274
15283
|
supportedTypes: f
|
|
15275
15284
|
});
|
|
@@ -15291,7 +15300,7 @@ function A_(t) {
|
|
|
15291
15300
|
x(S);
|
|
15292
15301
|
},
|
|
15293
15302
|
checkCanSendAttachments: () => g.value.length > 0 && !c.value ? (at("当前模型不支持附件,请先移除附件或切换支持多模态的模型"), !1) : !0,
|
|
15294
|
-
processAttachments: async () => g.value.length === 0 ? [] : await
|
|
15303
|
+
processAttachments: async () => g.value.length === 0 ? [] : await b_(g.value),
|
|
15295
15304
|
cleanupAttachments: () => {
|
|
15296
15305
|
g.value.length > 0 && _();
|
|
15297
15306
|
},
|
|
@@ -15325,14 +15334,14 @@ var Vl = /* @__PURE__ */ new Map([
|
|
|
15325
15334
|
(function(t) {
|
|
15326
15335
|
t[t.UNKNOWN = 0] = "UNKNOWN", t[t.URL = 1] = "URL";
|
|
15327
15336
|
})(jl || (jl = {}));
|
|
15328
|
-
function
|
|
15337
|
+
function I_(t) {
|
|
15329
15338
|
return Object.values(Ce).includes(t);
|
|
15330
15339
|
}
|
|
15331
15340
|
var _i;
|
|
15332
15341
|
(function(t) {
|
|
15333
15342
|
t[t.SCAN_TYPE_CAMERA = 0] = "SCAN_TYPE_CAMERA", t[t.SCAN_TYPE_FILE = 1] = "SCAN_TYPE_FILE";
|
|
15334
15343
|
})(_i || (_i = {}));
|
|
15335
|
-
var
|
|
15344
|
+
var S_ = (function() {
|
|
15336
15345
|
function t() {
|
|
15337
15346
|
}
|
|
15338
15347
|
return t.GITHUB_PROJECT_URL = "https://github.com/mebjas/html5-qrcode", t.SCAN_DEFAULT_FPS = 2, t.DEFAULT_DISABLE_FLIP = !1, t.DEFAULT_REMEMBER_LAST_CAMERA_USED = !0, t.DEFAULT_SUPPORTED_SCAN_TYPE = [
|
|
@@ -15371,7 +15380,7 @@ var I_ = (function() {
|
|
|
15371
15380
|
(function(t) {
|
|
15372
15381
|
t[t.UNKWOWN_ERROR = 0] = "UNKWOWN_ERROR", t[t.IMPLEMENTATION_ERROR = 1] = "IMPLEMENTATION_ERROR", t[t.NO_CODE_FOUND_ERROR = 2] = "NO_CODE_FOUND_ERROR";
|
|
15373
15382
|
})(ds || (ds = {}));
|
|
15374
|
-
var
|
|
15383
|
+
var T_ = (function() {
|
|
15375
15384
|
function t() {
|
|
15376
15385
|
}
|
|
15377
15386
|
return t.createFrom = function(r) {
|
|
@@ -15380,7 +15389,7 @@ var S_ = (function() {
|
|
|
15380
15389
|
type: ds.UNKWOWN_ERROR
|
|
15381
15390
|
};
|
|
15382
15391
|
}, t;
|
|
15383
|
-
})(),
|
|
15392
|
+
})(), O_ = (function() {
|
|
15384
15393
|
function t(r) {
|
|
15385
15394
|
this.verbose = r;
|
|
15386
15395
|
}
|
|
@@ -15442,15 +15451,15 @@ var jr = (function() {
|
|
|
15442
15451
|
return !0;
|
|
15443
15452
|
}, t;
|
|
15444
15453
|
})(), Hi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
15445
|
-
function
|
|
15454
|
+
function N_(t) {
|
|
15446
15455
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
15447
15456
|
}
|
|
15448
|
-
var ci = { exports: {} },
|
|
15449
|
-
function
|
|
15457
|
+
var ci = { exports: {} }, k_ = ci.exports, Wl;
|
|
15458
|
+
function R_() {
|
|
15450
15459
|
return Wl || (Wl = 1, (function(t, r) {
|
|
15451
15460
|
(function(o, c) {
|
|
15452
15461
|
c(r);
|
|
15453
|
-
})(
|
|
15462
|
+
})(k_, (function(o) {
|
|
15454
15463
|
function c(v) {
|
|
15455
15464
|
return v == null;
|
|
15456
15465
|
}
|
|
@@ -35409,10 +35418,10 @@ function k_() {
|
|
|
35409
35418
|
}));
|
|
35410
35419
|
})(ci, ci.exports)), ci.exports;
|
|
35411
35420
|
}
|
|
35412
|
-
var bt =
|
|
35413
|
-
const
|
|
35421
|
+
var bt = R_();
|
|
35422
|
+
const M_ = /* @__PURE__ */ N_(bt), D_ = /* @__PURE__ */ J1({
|
|
35414
35423
|
__proto__: null,
|
|
35415
|
-
default:
|
|
35424
|
+
default: M_
|
|
35416
35425
|
}, [bt]);
|
|
35417
35426
|
var Gl = (function() {
|
|
35418
35427
|
function t(r, o, c) {
|
|
@@ -35449,7 +35458,7 @@ var Gl = (function() {
|
|
|
35449
35458
|
Ce.UPC_EAN_EXTENSION,
|
|
35450
35459
|
bt.BarcodeFormat.UPC_EAN_EXTENSION
|
|
35451
35460
|
]
|
|
35452
|
-
]), this.reverseFormatMap = this.createReverseFormatMap(), !
|
|
35461
|
+
]), this.reverseFormatMap = this.createReverseFormatMap(), !D_)
|
|
35453
35462
|
throw "Use html5qrcode.min.js without edit, ZXing not found.";
|
|
35454
35463
|
this.verbose = o, this.logger = c;
|
|
35455
35464
|
var d = this.createZXingFormats(r), f = /* @__PURE__ */ new Map();
|
|
@@ -35489,7 +35498,7 @@ var Gl = (function() {
|
|
|
35489
35498
|
}, t.prototype.createDebugData = function() {
|
|
35490
35499
|
return { decoderName: "zxing-js" };
|
|
35491
35500
|
}, t;
|
|
35492
|
-
})(),
|
|
35501
|
+
})(), P_ = function(t, r, o, c) {
|
|
35493
35502
|
function d(f) {
|
|
35494
35503
|
return f instanceof o ? f : new o(function(g) {
|
|
35495
35504
|
g(f);
|
|
@@ -35515,7 +35524,7 @@ var Gl = (function() {
|
|
|
35515
35524
|
}
|
|
35516
35525
|
m((c = c.apply(t, r || [])).next());
|
|
35517
35526
|
});
|
|
35518
|
-
},
|
|
35527
|
+
}, B_ = function(t, r) {
|
|
35519
35528
|
var o = { label: 0, sent: function() {
|
|
35520
35529
|
if (f[0] & 1) throw f[1];
|
|
35521
35530
|
return f[1];
|
|
@@ -35603,9 +35612,9 @@ var Gl = (function() {
|
|
|
35603
35612
|
var r = new BarcodeDetector({ formats: ["qr_code"] });
|
|
35604
35613
|
return typeof r < "u";
|
|
35605
35614
|
}, t.prototype.decodeAsync = function(r) {
|
|
35606
|
-
return
|
|
35615
|
+
return P_(this, void 0, void 0, function() {
|
|
35607
35616
|
var o, c;
|
|
35608
|
-
return
|
|
35617
|
+
return B_(this, function(d) {
|
|
35609
35618
|
switch (d.label) {
|
|
35610
35619
|
case 0:
|
|
35611
35620
|
return [4, this.detector.detect(r)];
|
|
@@ -35731,7 +35740,7 @@ var Gl = (function() {
|
|
|
35731
35740
|
if (m[0] & 5) throw m[1];
|
|
35732
35741
|
return { value: m[0] ? m[1] : void 0, done: !0 };
|
|
35733
35742
|
}
|
|
35734
|
-
},
|
|
35743
|
+
}, L_ = (function() {
|
|
35735
35744
|
function t(r, o, c, d) {
|
|
35736
35745
|
this.EXECUTIONS_TO_REPORT_PERFORMANCE = 100, this.executions = 0, this.executionResults = [], this.wasPrimaryDecoderUsedInLastDecode = !1, this.verbose = c, o && Xl.isSupported() ? (this.primaryDecoder = new Xl(r, c, d), this.secondaryDecoder = new Gl(r, c, d)) : this.primaryDecoder = new Gl(r, c, d);
|
|
35737
35746
|
}
|
|
@@ -35913,7 +35922,7 @@ var Gl = (function() {
|
|
|
35913
35922
|
}
|
|
35914
35923
|
return null;
|
|
35915
35924
|
}, t;
|
|
35916
|
-
})(),
|
|
35925
|
+
})(), F_ = (function(t) {
|
|
35917
35926
|
Fs(r, t);
|
|
35918
35927
|
function r(o, c) {
|
|
35919
35928
|
return t.call(this, o, c) || this;
|
|
@@ -35941,28 +35950,28 @@ var Gl = (function() {
|
|
|
35941
35950
|
if (!this.isSupported())
|
|
35942
35951
|
throw new Error("".concat(this.name, " capability not supported"));
|
|
35943
35952
|
}, r;
|
|
35944
|
-
})(Md),
|
|
35953
|
+
})(Md), U_ = (function(t) {
|
|
35945
35954
|
Fs(r, t);
|
|
35946
35955
|
function r(o) {
|
|
35947
35956
|
return t.call(this, "zoom", o) || this;
|
|
35948
35957
|
}
|
|
35949
35958
|
return r;
|
|
35950
|
-
})(
|
|
35959
|
+
})(F_), z_ = (function(t) {
|
|
35951
35960
|
Fs(r, t);
|
|
35952
35961
|
function r(o) {
|
|
35953
35962
|
return t.call(this, "torch", o) || this;
|
|
35954
35963
|
}
|
|
35955
35964
|
return r;
|
|
35956
|
-
})(Md),
|
|
35965
|
+
})(Md), Z_ = (function() {
|
|
35957
35966
|
function t(r) {
|
|
35958
35967
|
this.track = r;
|
|
35959
35968
|
}
|
|
35960
35969
|
return t.prototype.zoomFeature = function() {
|
|
35961
|
-
return new F_(this.track);
|
|
35962
|
-
}, t.prototype.torchFeature = function() {
|
|
35963
35970
|
return new U_(this.track);
|
|
35971
|
+
}, t.prototype.torchFeature = function() {
|
|
35972
|
+
return new z_(this.track);
|
|
35964
35973
|
}, t;
|
|
35965
|
-
})(),
|
|
35974
|
+
})(), $_ = (function() {
|
|
35966
35975
|
function t(r, o, c) {
|
|
35967
35976
|
this.isClosed = !1, this.parentElement = r, this.mediaStream = o, this.callbacks = c, this.surface = this.createVideoElement(this.parentElement.clientWidth), r.append(this.surface);
|
|
35968
35977
|
}
|
|
@@ -36039,16 +36048,16 @@ var Gl = (function() {
|
|
|
36039
36048
|
});
|
|
36040
36049
|
});
|
|
36041
36050
|
}, t.prototype.getCapabilities = function() {
|
|
36042
|
-
return new
|
|
36051
|
+
return new Z_(this.getFirstTrackOrFail());
|
|
36043
36052
|
}, t;
|
|
36044
|
-
})(),
|
|
36053
|
+
})(), V_ = (function() {
|
|
36045
36054
|
function t(r) {
|
|
36046
36055
|
this.mediaStream = r;
|
|
36047
36056
|
}
|
|
36048
36057
|
return t.prototype.render = function(r, o, c) {
|
|
36049
36058
|
return to(this, void 0, void 0, function() {
|
|
36050
36059
|
return no(this, function(d) {
|
|
36051
|
-
return [2,
|
|
36060
|
+
return [2, $_.create(r, this.mediaStream, o, c)];
|
|
36052
36061
|
});
|
|
36053
36062
|
});
|
|
36054
36063
|
}, t.create = function(r) {
|
|
@@ -36154,7 +36163,7 @@ var Gl = (function() {
|
|
|
36154
36163
|
if (m[0] & 5) throw m[1];
|
|
36155
36164
|
return { value: m[0] ? m[1] : void 0, done: !0 };
|
|
36156
36165
|
}
|
|
36157
|
-
},
|
|
36166
|
+
}, j_ = (function() {
|
|
36158
36167
|
function t() {
|
|
36159
36168
|
}
|
|
36160
36169
|
return t.failIfNotSupported = function() {
|
|
@@ -36168,11 +36177,11 @@ var Gl = (function() {
|
|
|
36168
36177
|
}, t.prototype.create = function(r) {
|
|
36169
36178
|
return Kl(this, void 0, void 0, function() {
|
|
36170
36179
|
return Jl(this, function(o) {
|
|
36171
|
-
return [2,
|
|
36180
|
+
return [2, V_.create(r)];
|
|
36172
36181
|
});
|
|
36173
36182
|
});
|
|
36174
36183
|
}, t;
|
|
36175
|
-
})(),
|
|
36184
|
+
})(), H_ = function(t, r, o, c) {
|
|
36176
36185
|
function d(f) {
|
|
36177
36186
|
return f instanceof o ? f : new o(function(g) {
|
|
36178
36187
|
g(f);
|
|
@@ -36198,7 +36207,7 @@ var Gl = (function() {
|
|
|
36198
36207
|
}
|
|
36199
36208
|
m((c = c.apply(t, r || [])).next());
|
|
36200
36209
|
});
|
|
36201
|
-
},
|
|
36210
|
+
}, W_ = function(t, r) {
|
|
36202
36211
|
var o = { label: 0, sent: function() {
|
|
36203
36212
|
if (f[0] & 1) throw f[1];
|
|
36204
36213
|
return f[1];
|
|
@@ -36257,7 +36266,7 @@ var Gl = (function() {
|
|
|
36257
36266
|
if (m[0] & 5) throw m[1];
|
|
36258
36267
|
return { value: m[0] ? m[1] : void 0, done: !0 };
|
|
36259
36268
|
}
|
|
36260
|
-
},
|
|
36269
|
+
}, G_ = (function() {
|
|
36261
36270
|
function t() {
|
|
36262
36271
|
}
|
|
36263
36272
|
return t.retrieve = function() {
|
|
@@ -36274,9 +36283,9 @@ var Gl = (function() {
|
|
|
36274
36283
|
var r = location.host.split(":")[0];
|
|
36275
36284
|
return r === "127.0.0.1" || r === "localhost";
|
|
36276
36285
|
}, t.getCamerasFromMediaDevices = function() {
|
|
36277
|
-
return
|
|
36286
|
+
return H_(this, void 0, void 0, function() {
|
|
36278
36287
|
var r, o, c, d, f, g, x;
|
|
36279
|
-
return
|
|
36288
|
+
return W_(this, function(_) {
|
|
36280
36289
|
switch (_.label) {
|
|
36281
36290
|
case 0:
|
|
36282
36291
|
return r = function(m) {
|
|
@@ -36316,7 +36325,7 @@ var Gl = (function() {
|
|
|
36316
36325
|
(function(t) {
|
|
36317
36326
|
t[t.UNKNOWN = 0] = "UNKNOWN", t[t.NOT_STARTED = 1] = "NOT_STARTED", t[t.SCANNING = 2] = "SCANNING", t[t.PAUSED = 3] = "PAUSED";
|
|
36318
36327
|
})(Pt || (Pt = {}));
|
|
36319
|
-
var
|
|
36328
|
+
var X_ = (function() {
|
|
36320
36329
|
function t() {
|
|
36321
36330
|
this.state = Pt.NOT_STARTED, this.onGoingTransactionNewState = Pt.UNKNOWN;
|
|
36322
36331
|
}
|
|
@@ -36357,7 +36366,7 @@ var G_ = (function() {
|
|
|
36357
36366
|
throw "Cannot transition from ".concat(this.state, " to ").concat(r);
|
|
36358
36367
|
}
|
|
36359
36368
|
}, t;
|
|
36360
|
-
})(),
|
|
36369
|
+
})(), q_ = (function() {
|
|
36361
36370
|
function t(r) {
|
|
36362
36371
|
this.stateManager = r;
|
|
36363
36372
|
}
|
|
@@ -36376,13 +36385,13 @@ var G_ = (function() {
|
|
|
36376
36385
|
}, t.prototype.isPaused = function() {
|
|
36377
36386
|
return this.stateManager.getState() === Pt.PAUSED;
|
|
36378
36387
|
}, t;
|
|
36379
|
-
})(),
|
|
36388
|
+
})(), Y_ = (function() {
|
|
36380
36389
|
function t() {
|
|
36381
36390
|
}
|
|
36382
36391
|
return t.create = function() {
|
|
36383
|
-
return new
|
|
36392
|
+
return new q_(new X_());
|
|
36384
36393
|
}, t;
|
|
36385
|
-
})(),
|
|
36394
|
+
})(), K_ = /* @__PURE__ */ (function() {
|
|
36386
36395
|
var t = function(r, o) {
|
|
36387
36396
|
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, d) {
|
|
36388
36397
|
c.__proto__ = d;
|
|
@@ -36400,12 +36409,12 @@ var G_ = (function() {
|
|
|
36400
36409
|
r.prototype = o === null ? Object.create(o) : (c.prototype = o.prototype, new c());
|
|
36401
36410
|
};
|
|
36402
36411
|
})(), mn = (function(t) {
|
|
36403
|
-
|
|
36412
|
+
K_(r, t);
|
|
36404
36413
|
function r() {
|
|
36405
36414
|
return t !== null && t.apply(this, arguments) || this;
|
|
36406
36415
|
}
|
|
36407
36416
|
return r.DEFAULT_WIDTH = 300, r.DEFAULT_WIDTH_OFFSET = 2, r.FILE_SCAN_MIN_HEIGHT = 300, r.FILE_SCAN_HIDDEN_CANVAS_PADDING = 100, r.MIN_QR_BOX_SIZE = 50, r.SHADED_LEFT = 1, r.SHADED_RIGHT = 2, r.SHADED_TOP = 3, r.SHADED_BOTTOM = 4, r.SHADED_REGION_ELEMENT_ID = "qr-shaded-region", r.VERBOSE = !1, r.BORDER_SHADER_DEFAULT_COLOR = "#ffffff", r.BORDER_SHADER_MATCH_COLOR = "rgb(90, 193, 56)", r;
|
|
36408
|
-
})(
|
|
36417
|
+
})(S_), J_ = (function() {
|
|
36409
36418
|
function t(r, o) {
|
|
36410
36419
|
this.logger = o, this.fps = mn.SCAN_DEFAULT_FPS, r ? (r.fps && (this.fps = r.fps), this.disableFlip = r.disableFlip === !0, this.qrbox = r.qrbox, this.aspectRatio = r.aspectRatio, this.videoConstraints = r.videoConstraints) : this.disableFlip = mn.DEFAULT_DISABLE_FLIP;
|
|
36411
36420
|
}
|
|
@@ -36422,7 +36431,7 @@ var G_ = (function() {
|
|
|
36422
36431
|
throw "HTML Element with id=".concat(r, " not found");
|
|
36423
36432
|
this.elementId = r, this.verbose = !1;
|
|
36424
36433
|
var c;
|
|
36425
|
-
typeof o == "boolean" ? this.verbose = o === !0 : o && (c = o, this.verbose = c.verbose === !0, c.experimentalFeatures), this.logger = new
|
|
36434
|
+
typeof o == "boolean" ? this.verbose = o === !0 : o && (c = o, this.verbose = c.verbose === !0, c.experimentalFeatures), this.logger = new O_(this.verbose), this.qrcode = new L_(this.getSupportedFormats(o), this.getUseBarCodeDetectorIfSupported(c), this.verbose, this.logger), this.foreverScanTimeout, this.shouldScan = !0, this.stateManagerProxy = Y_.create();
|
|
36426
36435
|
}
|
|
36427
36436
|
return t.prototype.start = function(r, o, c, d) {
|
|
36428
36437
|
var f = this;
|
|
@@ -36433,7 +36442,7 @@ var G_ = (function() {
|
|
|
36433
36442
|
var g;
|
|
36434
36443
|
d ? g = d : g = this.verbose ? this.logger.log : function() {
|
|
36435
36444
|
};
|
|
36436
|
-
var x =
|
|
36445
|
+
var x = J_.create(o, this.logger);
|
|
36437
36446
|
this.clearElement();
|
|
36438
36447
|
var _ = !1;
|
|
36439
36448
|
x.videoConstraints && (x.isMediaStreamConstraintsValid() ? _ = !0 : this.logger.logError("'videoConstraints' is not valid 'MediaStreamConstraints, it will be ignored.'", !0));
|
|
@@ -36453,7 +36462,7 @@ var G_ = (function() {
|
|
|
36453
36462
|
b.setupUi($, L, x), b.isScanning = !0, b.foreverScan(x, c, g);
|
|
36454
36463
|
}
|
|
36455
36464
|
};
|
|
36456
|
-
|
|
36465
|
+
j_.failIfNotSupported().then(function($) {
|
|
36457
36466
|
$.create(D).then(function(L) {
|
|
36458
36467
|
return L.render(f.element, R, Q).then(function(ne) {
|
|
36459
36468
|
b.renderedCamera = ne, M.execute(), S(null);
|
|
@@ -36544,7 +36553,7 @@ var G_ = (function() {
|
|
|
36544
36553
|
}, t.prototype.clear = function() {
|
|
36545
36554
|
this.clearElement();
|
|
36546
36555
|
}, t.getCameras = function() {
|
|
36547
|
-
return
|
|
36556
|
+
return G_.retrieve();
|
|
36548
36557
|
}, t.prototype.getRunningTrackCapabilities = function() {
|
|
36549
36558
|
return this.getRenderedCameraOrFail().getRunningTrackCapabilities();
|
|
36550
36559
|
}, t.prototype.getRunningTrackSettings = function() {
|
|
@@ -36589,7 +36598,7 @@ var G_ = (function() {
|
|
|
36589
36598
|
throw "Atleast 1 formatsToSupport is needed.";
|
|
36590
36599
|
for (var c = [], d = 0, f = r.formatsToSupport; d < f.length; d++) {
|
|
36591
36600
|
var g = f[d];
|
|
36592
|
-
|
|
36601
|
+
I_(g) ? c.push(g) : this.logger.warn("Invalid format: ".concat(g, " passed in config, ignoring."));
|
|
36593
36602
|
}
|
|
36594
36603
|
if (c.length === 0)
|
|
36595
36604
|
throw "None of formatsToSupport match supported values.";
|
|
@@ -36649,7 +36658,7 @@ var G_ = (function() {
|
|
|
36649
36658
|
}).catch(function(d) {
|
|
36650
36659
|
c.possiblyUpdateShaders(!1);
|
|
36651
36660
|
var f = jr.codeParseError(d);
|
|
36652
|
-
return o(f,
|
|
36661
|
+
return o(f, T_.createFrom(f)), !1;
|
|
36653
36662
|
});
|
|
36654
36663
|
}, t.prototype.foreverScan = function(r, o, c) {
|
|
36655
36664
|
var d = this;
|
|
@@ -36790,7 +36799,7 @@ var G_ = (function() {
|
|
|
36790
36799
|
(function(t) {
|
|
36791
36800
|
t[t.STATUS_DEFAULT = 0] = "STATUS_DEFAULT", t[t.STATUS_SUCCESS = 1] = "STATUS_SUCCESS", t[t.STATUS_WARNING = 2] = "STATUS_WARNING", t[t.STATUS_REQUESTING_PERMISSION = 3] = "STATUS_REQUESTING_PERMISSION";
|
|
36792
36801
|
})(ec || (ec = {}));
|
|
36793
|
-
const
|
|
36802
|
+
const Q_ = { class: "scan-code" }, e3 = { class: "btn" }, t3 = { class: "left-back" }, n3 = /* @__PURE__ */ sn({
|
|
36794
36803
|
name: "QrCodeScan",
|
|
36795
36804
|
__name: "QrCodeScan",
|
|
36796
36805
|
emits: ["scanSuccess"],
|
|
@@ -36869,14 +36878,14 @@ const J_ = { class: "scan-code" }, Q_ = { class: "btn" }, e3 = { class: "left-ba
|
|
|
36869
36878
|
onClick: M[0] || (M[0] = (I) => x())
|
|
36870
36879
|
}, null, 8, ["icon"]),
|
|
36871
36880
|
(dt(), In(oo, { to: "body" }, [
|
|
36872
|
-
ps(lt("div",
|
|
36881
|
+
ps(lt("div", Q_, [
|
|
36873
36882
|
M[1] || (M[1] = lt("div", { class: "container" }, [
|
|
36874
36883
|
lt("div", { class: "qrcode" }, [
|
|
36875
36884
|
lt("div", { id: "reader" })
|
|
36876
36885
|
])
|
|
36877
36886
|
], -1)),
|
|
36878
|
-
lt("div",
|
|
36879
|
-
lt("div",
|
|
36887
|
+
lt("div", e3, [
|
|
36888
|
+
lt("div", t3, [
|
|
36880
36889
|
Le(S, {
|
|
36881
36890
|
name: "arrow-left",
|
|
36882
36891
|
onClick: _
|
|
@@ -36890,7 +36899,7 @@ const J_ = { class: "scan-code" }, Q_ = { class: "btn" }, e3 = { class: "left-ba
|
|
|
36890
36899
|
]);
|
|
36891
36900
|
};
|
|
36892
36901
|
}
|
|
36893
|
-
}),
|
|
36902
|
+
}), r3 = /* @__PURE__ */ fr(n3, [["__scopeId", "data-v-2d988579"]]);
|
|
36894
36903
|
function Dd(t, r, o) {
|
|
36895
36904
|
const c = _t(() => t ? Array.isArray(t) ? t : t.value : []), d = () => {
|
|
36896
36905
|
const A = c.value;
|
|
@@ -36930,20 +36939,20 @@ function Dd(t, r, o) {
|
|
|
36930
36939
|
}
|
|
36931
36940
|
};
|
|
36932
36941
|
}
|
|
36933
|
-
const
|
|
36942
|
+
const i3 = typeof window < "u" && typeof document < "u";
|
|
36934
36943
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
36935
|
-
const
|
|
36944
|
+
const o3 = Object.prototype.toString, s3 = (t) => o3.call(t) === "[object Object]", Wi = () => {
|
|
36936
36945
|
};
|
|
36937
36946
|
function Vo(t) {
|
|
36938
36947
|
return Array.isArray(t) ? t : [t];
|
|
36939
36948
|
}
|
|
36940
|
-
function
|
|
36949
|
+
function a3(t, r, o) {
|
|
36941
36950
|
return Bt(t, r, {
|
|
36942
36951
|
...o,
|
|
36943
36952
|
immediate: !0
|
|
36944
36953
|
});
|
|
36945
36954
|
}
|
|
36946
|
-
const Pd =
|
|
36955
|
+
const Pd = i3 ? window : void 0;
|
|
36947
36956
|
function ui(t) {
|
|
36948
36957
|
var r;
|
|
36949
36958
|
const o = Ir(t);
|
|
@@ -36954,7 +36963,7 @@ function jo(...t) {
|
|
|
36954
36963
|
const c = Vo(Ir(t[0])).filter((d) => d != null);
|
|
36955
36964
|
return c.every((d) => typeof d != "string") ? c : void 0;
|
|
36956
36965
|
});
|
|
36957
|
-
return
|
|
36966
|
+
return a3(() => {
|
|
36958
36967
|
var c, d;
|
|
36959
36968
|
return [
|
|
36960
36969
|
(c = (d = o.value) === null || d === void 0 ? void 0 : d.map((f) => ui(f))) !== null && c !== void 0 ? c : [Pd].filter((f) => f != null),
|
|
@@ -36964,13 +36973,13 @@ function jo(...t) {
|
|
|
36964
36973
|
];
|
|
36965
36974
|
}, ([c, d, f, g], x, _) => {
|
|
36966
36975
|
if (!c?.length || !d?.length || !f?.length) return;
|
|
36967
|
-
const m =
|
|
36976
|
+
const m = s3(g) ? { ...g } : g, A = c.flatMap((b) => d.flatMap((M) => f.map((S) => r(b, M, S, m))));
|
|
36968
36977
|
_(() => {
|
|
36969
36978
|
A.forEach((b) => b());
|
|
36970
36979
|
});
|
|
36971
36980
|
}, { flush: "post" });
|
|
36972
36981
|
}
|
|
36973
|
-
function
|
|
36982
|
+
function l3(t, r, o = {}) {
|
|
36974
36983
|
const { window: c = Pd, ignore: d = [], capture: f = !0, detectIframe: g = !1, controls: x = !1 } = o;
|
|
36975
36984
|
if (!c) return x ? {
|
|
36976
36985
|
stop: Wi,
|
|
@@ -37036,7 +37045,7 @@ function a3(t, r, o = {}) {
|
|
|
37036
37045
|
}
|
|
37037
37046
|
} : D;
|
|
37038
37047
|
}
|
|
37039
|
-
const
|
|
37048
|
+
const c3 = ["data-active", "disabled"], u3 = /* @__PURE__ */ sn({
|
|
37040
37049
|
__name: "Button",
|
|
37041
37050
|
props: {
|
|
37042
37051
|
active: { type: Boolean },
|
|
@@ -37051,16 +37060,16 @@ const l3 = ["data-active", "disabled"], c3 = /* @__PURE__ */ sn({
|
|
|
37051
37060
|
disabled: t.disabled || void 0
|
|
37052
37061
|
}, [
|
|
37053
37062
|
ai(r.$slots, "default", {}, void 0, !0)
|
|
37054
|
-
], 10,
|
|
37063
|
+
], 10, c3));
|
|
37055
37064
|
}
|
|
37056
|
-
}), Us = /* @__PURE__ */ fr(
|
|
37065
|
+
}), Us = /* @__PURE__ */ fr(u3, [["__scopeId", "data-v-6f582cce"]]), d3 = {
|
|
37057
37066
|
viewBox: "0 0 16 16",
|
|
37058
37067
|
xmlns: "http://www.w3.org/2000/svg",
|
|
37059
37068
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
37060
37069
|
fill: "none"
|
|
37061
37070
|
};
|
|
37062
|
-
function
|
|
37063
|
-
return dt(), Gt("svg",
|
|
37071
|
+
function f3(t, r) {
|
|
37072
|
+
return dt(), Gt("svg", d3, [...r[0] || (r[0] = [
|
|
37064
37073
|
lt("rect", {
|
|
37065
37074
|
id: "大模型",
|
|
37066
37075
|
width: "16.000000",
|
|
@@ -37076,7 +37085,7 @@ function d3(t, r) {
|
|
|
37076
37085
|
}, null, -1)
|
|
37077
37086
|
])]);
|
|
37078
37087
|
}
|
|
37079
|
-
const
|
|
37088
|
+
const h3 = { render: f3 }, p3 = { class: "button-text" }, g3 = { class: "dropdown-menu__items" }, m3 = ["onClick"], x3 = /* @__PURE__ */ sn({
|
|
37080
37089
|
__name: "ModelSwitch",
|
|
37081
37090
|
props: /* @__PURE__ */ Xo({
|
|
37082
37091
|
modelConfigs: {}
|
|
@@ -37096,7 +37105,7 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37096
37105
|
}, A = () => {
|
|
37097
37106
|
x.value = !1;
|
|
37098
37107
|
}, b = it(null), M = it(null);
|
|
37099
|
-
return
|
|
37108
|
+
return l3(
|
|
37100
37109
|
M,
|
|
37101
37110
|
() => {
|
|
37102
37111
|
A();
|
|
@@ -37121,8 +37130,8 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37121
37130
|
height: 16,
|
|
37122
37131
|
class: "selected-model__icon"
|
|
37123
37132
|
})),
|
|
37124
|
-
lt("span",
|
|
37125
|
-
Le(_e(
|
|
37133
|
+
lt("span", p3, hi(_e(d)?.label), 1),
|
|
37134
|
+
Le(_e(h3), {
|
|
37126
37135
|
width: 16,
|
|
37127
37136
|
height: 16
|
|
37128
37137
|
})
|
|
@@ -37137,7 +37146,7 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37137
37146
|
ref_key: "dropdownMenuRef",
|
|
37138
37147
|
ref: M
|
|
37139
37148
|
}, [
|
|
37140
|
-
lt("div",
|
|
37149
|
+
lt("div", g3, [
|
|
37141
37150
|
(dt(!0), Gt(so, null, ms(_e(f), (D) => (dt(), Gt("div", {
|
|
37142
37151
|
key: D.id,
|
|
37143
37152
|
class: xs(["dropdown-menu__item", { "active-menu": D.id === o.value }]),
|
|
@@ -37150,7 +37159,7 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37150
37159
|
class: "dropdown-menu__icon"
|
|
37151
37160
|
})) : Vn("", !0),
|
|
37152
37161
|
lt("span", null, hi(D.label), 1)
|
|
37153
|
-
], 10,
|
|
37162
|
+
], 10, m3))), 128))
|
|
37154
37163
|
])
|
|
37155
37164
|
], 512)) : Vn("", !0)
|
|
37156
37165
|
]),
|
|
@@ -37163,10 +37172,10 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37163
37172
|
})) : Vn("", !0)
|
|
37164
37173
|
], 512));
|
|
37165
37174
|
}
|
|
37166
|
-
}),
|
|
37175
|
+
}), y3 = /* @__PURE__ */ fr(x3, [["__scopeId", "data-v-475491fd"]]), w3 = {
|
|
37167
37176
|
key: 0,
|
|
37168
37177
|
class: "active-count"
|
|
37169
|
-
},
|
|
37178
|
+
}, _3 = /* @__PURE__ */ sn({
|
|
37170
37179
|
__name: "PluginToggleButton",
|
|
37171
37180
|
props: {
|
|
37172
37181
|
installedPlugins: {}
|
|
@@ -37187,12 +37196,12 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37187
37196
|
style: { "font-size": "16px" }
|
|
37188
37197
|
}),
|
|
37189
37198
|
d[1] || (d[1] = lt("span", { class: "button-text" }, "扩展", -1)),
|
|
37190
|
-
o.value > 0 ? (dt(), Gt("span",
|
|
37199
|
+
o.value > 0 ? (dt(), Gt("span", w3, hi(o.value), 1)) : Vn("", !0)
|
|
37191
37200
|
]),
|
|
37192
37201
|
_: 1
|
|
37193
37202
|
}, 8, ["active"]));
|
|
37194
37203
|
}
|
|
37195
|
-
}),
|
|
37204
|
+
}), v3 = /* @__PURE__ */ fr(_3, [["__scopeId", "data-v-c2a16c66"]]), C3 = {
|
|
37196
37205
|
"data-v-99394ae9": "",
|
|
37197
37206
|
viewBox: "0 0 16 16",
|
|
37198
37207
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -37203,8 +37212,8 @@ const f3 = { render: d3 }, h3 = { class: "button-text" }, p3 = { class: "dropdow
|
|
|
37203
37212
|
customFrame: "#000000",
|
|
37204
37213
|
size: "16"
|
|
37205
37214
|
};
|
|
37206
|
-
function
|
|
37207
|
-
return dt(), Gt("svg",
|
|
37215
|
+
function b3(t, r) {
|
|
37216
|
+
return dt(), Gt("svg", C3, [...r[0] || (r[0] = [
|
|
37208
37217
|
lt("rect", {
|
|
37209
37218
|
id: "生成式UI",
|
|
37210
37219
|
width: "16.000000",
|
|
@@ -37222,7 +37231,7 @@ function C3(t, r) {
|
|
|
37222
37231
|
}, null, -1)
|
|
37223
37232
|
])]);
|
|
37224
37233
|
}
|
|
37225
|
-
const
|
|
37234
|
+
const A3 = { render: b3 }, E3 = /* @__PURE__ */ sn({
|
|
37226
37235
|
__name: "GenUISwitch",
|
|
37227
37236
|
props: {
|
|
37228
37237
|
genuiEnabled: { type: Boolean, type: Boolean, default: !1, required: !1 },
|
|
@@ -37241,7 +37250,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37241
37250
|
onClick: o
|
|
37242
37251
|
}, {
|
|
37243
37252
|
default: rn(() => [
|
|
37244
|
-
Le(_e(
|
|
37253
|
+
Le(_e(A3), {
|
|
37245
37254
|
width: 16,
|
|
37246
37255
|
height: 16
|
|
37247
37256
|
}),
|
|
@@ -37250,7 +37259,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37250
37259
|
_: 1
|
|
37251
37260
|
}, 8, ["active"]));
|
|
37252
37261
|
}
|
|
37253
|
-
}),
|
|
37262
|
+
}), I3 = /* @__PURE__ */ fr(E3, [["__scopeId", "data-v-7f3b0372"]]), S3 = { class: "bubble-image-wrapper" }, T3 = ["src"], O3 = ["src"], N3 = /* @__PURE__ */ sn({
|
|
37254
37263
|
__name: "BubbleImageRenderer",
|
|
37255
37264
|
props: {
|
|
37256
37265
|
content: {}
|
|
@@ -37265,13 +37274,13 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37265
37274
|
f && vi(() => {
|
|
37266
37275
|
o.value?.focus();
|
|
37267
37276
|
});
|
|
37268
|
-
}), (f, g) => (dt(), Gt("div",
|
|
37277
|
+
}), (f, g) => (dt(), Gt("div", S3, [
|
|
37269
37278
|
lt("img", {
|
|
37270
37279
|
src: t.content,
|
|
37271
37280
|
class: "bubble-image",
|
|
37272
37281
|
alt: "用户上传的图片",
|
|
37273
37282
|
onClick: c
|
|
37274
|
-
}, null, 8,
|
|
37283
|
+
}, null, 8, T3),
|
|
37275
37284
|
(dt(), In(oo, { to: "body" }, [
|
|
37276
37285
|
r.value ? (dt(), Gt("div", {
|
|
37277
37286
|
key: 0,
|
|
@@ -37310,13 +37319,13 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37310
37319
|
lt("img", {
|
|
37311
37320
|
src: t.content,
|
|
37312
37321
|
alt: "预览图片"
|
|
37313
|
-
}, null, 8,
|
|
37322
|
+
}, null, 8, O3)
|
|
37314
37323
|
])
|
|
37315
37324
|
], 32)) : Vn("", !0)
|
|
37316
37325
|
]))
|
|
37317
37326
|
]));
|
|
37318
37327
|
}
|
|
37319
|
-
}),
|
|
37328
|
+
}), k3 = /* @__PURE__ */ fr(N3, [["__scopeId", "data-v-91c75579"]]), R3 = `
|
|
37320
37329
|
<svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
37321
37330
|
<defs>
|
|
37322
37331
|
<clipPath id="clip657_188316">
|
|
@@ -37329,10 +37338,10 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37329
37338
|
<path id="path" d="M1.25 9.97C1.25 9.63 1.53 9.35 1.87 9.35L4.37 9.35C4.72 9.35 5 9.63 5 9.97C5 10.32 4.72 10.6 4.37 10.6L1.87 10.6C1.53 10.6 1.25 10.32 1.25 9.97ZM12.5 6.25C12.5 5.9 12.78 5.62 13.12 5.62L17.46 5.62C17.8 5.62 18.08 5.9 18.08 6.25C18.08 6.59 17.8 6.87 17.46 6.87L13.12 6.87C12.78 6.87 12.5 6.59 12.5 6.25ZM12.5 13.73C12.5 13.39 12.78 13.11 13.12 13.11L17.46 13.11C17.8 13.11 18.08 13.39 18.08 13.73C18.08 14.08 17.8 14.36 17.46 14.36L13.12 14.36C12.78 14.36 12.5 14.08 12.5 13.73Z" fill="currentColor" fill-opacity="1" fill-rule="nonzero"></path>
|
|
37330
37339
|
</g>
|
|
37331
37340
|
</svg>
|
|
37332
|
-
`,
|
|
37341
|
+
`, M3 = btoa(R3), tc = `data:image/svg+xml;base64,${M3}`, Ho = (t, r) => {
|
|
37333
37342
|
const [o, c] = t.split("#");
|
|
37334
37343
|
return { id: r, text: o, inputMessage: c };
|
|
37335
|
-
},
|
|
37344
|
+
}, D3 = (t) => {
|
|
37336
37345
|
const r = {
|
|
37337
37346
|
"zh-CN": {
|
|
37338
37347
|
title: "OpenTiny NEXT",
|
|
@@ -37401,11 +37410,11 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37401
37410
|
}, nc = {
|
|
37402
37411
|
"No client found for session ID": "受控端页面已关闭请重新打开或者刷新页面",
|
|
37403
37412
|
"Failed to create MCP client": "创建MCP客户端失败"
|
|
37404
|
-
},
|
|
37413
|
+
}, P3 = (t) => {
|
|
37405
37414
|
console.log("message", t);
|
|
37406
37415
|
const r = Object.keys(nc), o = r.findIndex((d) => t.includes(d));
|
|
37407
37416
|
return (o !== -1 ? nc[r[o]] : t) || t;
|
|
37408
|
-
},
|
|
37417
|
+
}, B3 = { class: "tr-container__title" }, L3 = { style: { flex: "1" } }, F3 = { class: "chat-input" }, U3 = { class: "chat-input-pills" }, z3 = { class: "attachments-container" }, Z3 = { class: "action-buttons" }, $3 = /* @__PURE__ */ sn({
|
|
37409
37418
|
name: "TinyRemoter",
|
|
37410
37419
|
__name: "TinyRobotChat",
|
|
37411
37420
|
props: /* @__PURE__ */ Xo({
|
|
@@ -37552,7 +37561,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37552
37561
|
checkCanSendAttachments: R,
|
|
37553
37562
|
processAttachments: Q,
|
|
37554
37563
|
cleanupAttachments: $
|
|
37555
|
-
} =
|
|
37564
|
+
} = E_({
|
|
37556
37565
|
selectedModel: b,
|
|
37557
37566
|
selectedModelId: x
|
|
37558
37567
|
}), {
|
|
@@ -37574,7 +37583,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37574
37583
|
switchConversation: ke,
|
|
37575
37584
|
deleteConversation: ae,
|
|
37576
37585
|
getCurrentConversation: Te
|
|
37577
|
-
} =
|
|
37586
|
+
} = Vy({
|
|
37578
37587
|
systemPrompt: c.systemPrompt || "",
|
|
37579
37588
|
llmConfig: c.llmConfig,
|
|
37580
37589
|
emit: d
|
|
@@ -37585,16 +37594,16 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37585
37594
|
ne.promptManager.setStatic(Ee);
|
|
37586
37595
|
}
|
|
37587
37596
|
), ne.isGenuiEnabled = _, ne.debugStream = c.debugStream;
|
|
37588
|
-
const Qe = ti(c, "skills"), { processSkillMentions: me } =
|
|
37597
|
+
const Qe = ti(c, "skills"), { processSkillMentions: me } = d_({
|
|
37589
37598
|
skillsRef: Qe,
|
|
37590
37599
|
customAgentProvider: ne
|
|
37591
|
-
}), je = async (Ee, Ne) => pe(Ee, Ne, me), { welcomeIcon: ze, roles: Ve } =
|
|
37600
|
+
}), je = async (Ee, Ne) => pe(Ee, Ne, me), { welcomeIcon: ze, roles: Ve } = x_({
|
|
37592
37601
|
props: c,
|
|
37593
37602
|
messages: P,
|
|
37594
37603
|
messageState: B,
|
|
37595
37604
|
inputMessage: H,
|
|
37596
37605
|
handleSendMessage: je
|
|
37597
|
-
}), { showHistory: qe, handleCreateConversation: Ze, handleHistorySelect: ie, handleHistoryUpdateTitle: ue, handleHistoryDelete: we } =
|
|
37606
|
+
}), { showHistory: qe, handleCreateConversation: Ze, handleHistorySelect: ie, handleHistoryUpdateTitle: ue, handleHistoryDelete: we } = y_({
|
|
37598
37607
|
createConversation: G,
|
|
37599
37608
|
switchConversation: ke,
|
|
37600
37609
|
deleteConversation: ae,
|
|
@@ -37643,7 +37652,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37643
37652
|
requiredCompleteFieldSelectors: ["[componentName=TinyUser] > props > modelValue"]
|
|
37644
37653
|
}),
|
|
37645
37654
|
// 图片渲染器:使用独立的 BubbleImageRenderer 组件
|
|
37646
|
-
image:
|
|
37655
|
+
image: k3
|
|
37647
37656
|
};
|
|
37648
37657
|
function K(Ee, Ne) {
|
|
37649
37658
|
se[Ee] = Ne;
|
|
@@ -37664,8 +37673,8 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37664
37673
|
// 处理客户端断开连接
|
|
37665
37674
|
searchPlugin: er,
|
|
37666
37675
|
syncInstalledPluginTools: en
|
|
37667
|
-
} =
|
|
37668
|
-
|
|
37676
|
+
} = c_(L, m, tc);
|
|
37677
|
+
u_({
|
|
37669
37678
|
onToolCatalogChanged: async () => {
|
|
37670
37679
|
await L.refreshTools(), en();
|
|
37671
37680
|
}
|
|
@@ -37676,11 +37685,11 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37676
37685
|
{ value: "communication", label: "沟通协作" },
|
|
37677
37686
|
{ value: "development", label: "开发工具" },
|
|
37678
37687
|
{ value: "ai", label: "AI 助手" }
|
|
37679
|
-
]), jt =
|
|
37688
|
+
]), jt = D3(c), hr = _t(() => c.pillItems ?? jt.pillItems), pn = _t(() => c.promptItems ?? jt.promptItems), Ot = jt.lang, {
|
|
37680
37689
|
handleScanSuccess: pr,
|
|
37681
37690
|
handleSessionIdInput: Xn,
|
|
37682
37691
|
initialize: kr
|
|
37683
|
-
} =
|
|
37692
|
+
} = w_({
|
|
37684
37693
|
sessionId: ti(c, "sessionId"),
|
|
37685
37694
|
agentRoot: ti(c, "agentRoot"),
|
|
37686
37695
|
mode: c.mode,
|
|
@@ -37709,7 +37718,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37709
37718
|
setTimeout(() => {
|
|
37710
37719
|
Ze();
|
|
37711
37720
|
}, 100), L.onError = (Ne) => {
|
|
37712
|
-
Ne && at(
|
|
37721
|
+
Ne && at(P3(Ne));
|
|
37713
37722
|
};
|
|
37714
37723
|
const Ee = Se.value.filter((Ne) => Ne.addState === "added" && Ne.enabled);
|
|
37715
37724
|
for (const Ne of Ee)
|
|
@@ -37718,7 +37727,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37718
37727
|
for (const [Ne, ot] of Object.entries(c.mcpServers))
|
|
37719
37728
|
await Rt(Ne, ot);
|
|
37720
37729
|
});
|
|
37721
|
-
const { handleCustomAdd: Me } =
|
|
37730
|
+
const { handleCustomAdd: Me } = l_(L, xe, tc);
|
|
37722
37731
|
return r({
|
|
37723
37732
|
/** 大模型代理 */
|
|
37724
37733
|
agent: L,
|
|
@@ -37771,7 +37780,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37771
37780
|
})
|
|
37772
37781
|
}, {
|
|
37773
37782
|
title: rn(() => [
|
|
37774
|
-
lt("h3",
|
|
37783
|
+
lt("h3", B3, hi(t.title), 1)
|
|
37775
37784
|
]),
|
|
37776
37785
|
operations: rn(() => [
|
|
37777
37786
|
ai(Ee.$slots, "operations", {}, () => [
|
|
@@ -37787,7 +37796,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37787
37796
|
svgSize: "20",
|
|
37788
37797
|
onClick: Ne[1] || (Ne[1] = (ot) => qe.value = !_e(qe))
|
|
37789
37798
|
}, null, 8, ["icon"]),
|
|
37790
|
-
Le(
|
|
37799
|
+
Le(r3, { onScanSuccess: _e(pr) }, null, 8, ["onScanSuccess"]),
|
|
37791
37800
|
Le(io, {
|
|
37792
37801
|
name: "drawer-slide",
|
|
37793
37802
|
appear: ""
|
|
@@ -37823,9 +37832,9 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37823
37832
|
], !0)
|
|
37824
37833
|
]),
|
|
37825
37834
|
footer: rn(() => [
|
|
37826
|
-
lt("div",
|
|
37835
|
+
lt("div", F3, [
|
|
37827
37836
|
ai(Ee.$slots, "suggestions", {}, () => [
|
|
37828
|
-
lt("div",
|
|
37837
|
+
lt("div", U3, [
|
|
37829
37838
|
(dt(!0), Gt(so, null, ms(hr.value, (ot) => (dt(), In(_e(A1), {
|
|
37830
37839
|
key: ot.id,
|
|
37831
37840
|
items: ot.menus,
|
|
@@ -37859,18 +37868,18 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37859
37868
|
onCancel: _e(U)
|
|
37860
37869
|
}, x1({
|
|
37861
37870
|
footer: rn(() => [
|
|
37862
|
-
lt("div",
|
|
37863
|
-
Le(
|
|
37871
|
+
lt("div", Z3, [
|
|
37872
|
+
Le(v3, {
|
|
37864
37873
|
"installed-plugins": _e(xe),
|
|
37865
37874
|
onClick: Ne[6] || (Ne[6] = (ot) => $e.value = !_e($e))
|
|
37866
37875
|
}, null, 8, ["installed-plugins"]),
|
|
37867
|
-
_e(A) && _e(A).length > 0 ? (dt(), In(
|
|
37876
|
+
_e(A) && _e(A).length > 0 ? (dt(), In(y3, {
|
|
37868
37877
|
key: 0,
|
|
37869
37878
|
"model-configs": _e(A),
|
|
37870
37879
|
"selected-model-id": x.value,
|
|
37871
37880
|
"onUpdate:selectedModelId": Ne[7] || (Ne[7] = (ot) => x.value = ot)
|
|
37872
37881
|
}, null, 8, ["model-configs", "selected-model-id"])) : Vn("", !0),
|
|
37873
|
-
M.value ? (dt(), In(
|
|
37882
|
+
M.value ? (dt(), In(I3, {
|
|
37874
37883
|
key: 1,
|
|
37875
37884
|
"genui-enabled": _.value,
|
|
37876
37885
|
"onUpdate:genuiEnabled": Ne[8] || (Ne[8] = (ot) => _.value = ot)
|
|
@@ -37888,7 +37897,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37888
37897
|
_e(I).length > 0 ? {
|
|
37889
37898
|
name: "header",
|
|
37890
37899
|
fn: rn(() => [
|
|
37891
|
-
lt("div",
|
|
37900
|
+
lt("div", z3, [
|
|
37892
37901
|
Le(_e(T1), {
|
|
37893
37902
|
items: _e(I),
|
|
37894
37903
|
"onUpdate:items": Ne[5] || (Ne[5] = (ot) => Gi(I) ? I.value = ot : null)
|
|
@@ -37927,8 +37936,8 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37927
37936
|
default: rn(() => [
|
|
37928
37937
|
Le(_e(_1), { "content-renderers": se }, {
|
|
37929
37938
|
default: rn(() => [
|
|
37930
|
-
_e(P).length === 0 ? ai(Ee.$slots, "welcome", {
|
|
37931
|
-
lt("div",
|
|
37939
|
+
_e(P).length === 0 ? ai(Ee.$slots, "welcome", {}, () => [
|
|
37940
|
+
lt("div", L3, [
|
|
37932
37941
|
Le(_e(v1), {
|
|
37933
37942
|
title: _e(Ot)[t.locale].title,
|
|
37934
37943
|
description: _e(Ot)[t.locale].description,
|
|
@@ -37941,7 +37950,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37941
37950
|
"item-class": "prompt-item"
|
|
37942
37951
|
}, null, 8, ["items"])
|
|
37943
37952
|
])
|
|
37944
|
-
], !0) : (dt(), In(_e(b1), {
|
|
37953
|
+
], !0, 0) : (dt(), In(_e(b1), {
|
|
37945
37954
|
key: 1,
|
|
37946
37955
|
style: { flex: "1" },
|
|
37947
37956
|
items: _e(P),
|
|
@@ -37957,7 +37966,7 @@ const b3 = { render: C3 }, A3 = /* @__PURE__ */ sn({
|
|
|
37957
37966
|
_: 3
|
|
37958
37967
|
}, 8, ["show", "fullscreen", "style"]));
|
|
37959
37968
|
}
|
|
37960
|
-
}), rc = /* @__PURE__ */ fr(
|
|
37969
|
+
}), rc = /* @__PURE__ */ fr($3, [["__scopeId", "data-v-635a2faf"]]);
|
|
37961
37970
|
rc.install = function(t) {
|
|
37962
37971
|
t.component("tiny-remoter", rc);
|
|
37963
37972
|
};
|