@opentiny/next-sdk 0.2.4 → 0.2.6-beta.0
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/agent/utils/generateReActPrompt.ts +36 -20
- package/dist/index.d.ts +1 -0
- package/dist/index.es.dev.js +1650 -404
- package/dist/index.es.js +12715 -11615
- package/dist/index.js +899 -804
- package/dist/index.umd.dev.js +1650 -404
- package/dist/index.umd.js +78 -76
- package/dist/mcpsdk@1.25.3.dev.js +190 -181
- package/dist/mcpsdk@1.25.3.es.dev.js +190 -181
- package/dist/mcpsdk@1.25.3.es.js +1111 -1105
- package/dist/mcpsdk@1.25.3.js +14 -14
- package/dist/page-tool-bridge.d.ts +105 -0
- package/dist/skills/index.d.ts +7 -2
- package/dist/webagent.dev.js +1500 -390
- package/dist/webagent.es.dev.js +1500 -390
- package/dist/webagent.es.js +13638 -12631
- package/dist/webagent.js +88 -86
- package/dist/webmcp-full.dev.js +190 -181
- package/dist/webmcp-full.es.dev.js +190 -181
- package/dist/webmcp-full.es.js +74 -68
- package/dist/webmcp-full.js +1 -1
- package/index.ts +3 -0
- package/package.json +1 -1
- package/page-tool-bridge.ts +346 -0
- package/skills/index.ts +47 -17
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { z as
|
|
3
|
-
import { z as
|
|
4
|
-
import { MessageChannelServerTransport as
|
|
5
|
-
import { AuthClientProvider as
|
|
6
|
-
import { McpServer as
|
|
7
|
-
import { ResourceTemplate as
|
|
8
|
-
import { UriTemplate as
|
|
9
|
-
import { completable as
|
|
10
|
-
import { getDisplayName as
|
|
11
|
-
import { InMemoryTransport as
|
|
12
|
-
import { InMemoryTransport as
|
|
13
|
-
import { SetLevelRequestSchema as
|
|
14
|
-
import { Client as
|
|
15
|
-
import { SSEClientTransport as
|
|
16
|
-
import { StreamableHTTPClientTransport as
|
|
17
|
-
import { WebSocketClientTransport as
|
|
18
|
-
import
|
|
19
|
-
import { dynamicTool as
|
|
20
|
-
import { TypeValidationError as
|
|
21
|
-
import * as
|
|
1
|
+
import { default as Ss } from "ajv";
|
|
2
|
+
import { z as le } from "zod";
|
|
3
|
+
import { z as ks } from "zod";
|
|
4
|
+
import { MessageChannelServerTransport as xe, createTransportPair as Mt, MessageChannelClientTransport as Le, sseOptions as Rt, streamOptions as Et, createSseProxy as It, createSocketProxy as At, createStreamProxy as Ot, MessageChannelTransport as $t } from "@opentiny/next";
|
|
5
|
+
import { AuthClientProvider as Ms } from "@opentiny/next";
|
|
6
|
+
import { McpServer as tt } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
import { ResourceTemplate as Es } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
+
import { UriTemplate as As } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
|
|
9
|
+
import { completable as $s } from "@modelcontextprotocol/sdk/server/completable.js";
|
|
10
|
+
import { getDisplayName as js } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
|
|
11
|
+
import { InMemoryTransport as Ut } from "@modelcontextprotocol/sdk/inMemory.js";
|
|
12
|
+
import { InMemoryTransport as Zs } from "@modelcontextprotocol/sdk/inMemory.js";
|
|
13
|
+
import { SetLevelRequestSchema as Ae, SubscribeRequestSchema as jt, UnsubscribeRequestSchema as Nt, ListResourcesRequestSchema as Zt, RootsListChangedNotificationSchema as qt, CallToolResultSchema as zt, ElicitRequestSchema as Dt, CreateMessageRequestSchema as Ht, ListRootsRequestSchema as Ft, ToolListChangedNotificationSchema as Bt, PromptListChangedNotificationSchema as Vt, ResourceListChangedNotificationSchema as Jt, ResourceUpdatedNotificationSchema as Wt, LoggingMessageNotificationSchema as Kt, JSONRPCMessageSchema as Se } from "@modelcontextprotocol/sdk/types.js";
|
|
14
|
+
import { Client as rt } from "@modelcontextprotocol/sdk/client/index.js";
|
|
15
|
+
import { SSEClientTransport as Pe } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
16
|
+
import { StreamableHTTPClientTransport as ie } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
17
|
+
import { WebSocketClientTransport as Gt } from "@modelcontextprotocol/sdk/client/websocket.js";
|
|
18
|
+
import Oe from "qrcode";
|
|
19
|
+
import { dynamicTool as Yt, jsonSchema as Qt, generateText as $e, streamText as ue, stepCountIs as Xt, tool as e2 } from "ai";
|
|
20
|
+
import { TypeValidationError as ge, JSONParseError as Ue, InvalidArgumentError as t2, AISDKError as Q } from "@ai-sdk/provider";
|
|
21
|
+
import * as je from "zod/v4";
|
|
22
22
|
import { z as o } from "zod/v4";
|
|
23
23
|
import { ZodFirstPartyTypeKind as f } from "zod/v3";
|
|
24
|
-
import { createOpenAI as
|
|
25
|
-
import { createDeepSeek as
|
|
26
|
-
class
|
|
24
|
+
import { createOpenAI as r2 } from "@ai-sdk/openai";
|
|
25
|
+
import { createDeepSeek as s2 } from "@ai-sdk/deepseek";
|
|
26
|
+
class ts {
|
|
27
27
|
constructor(e, t) {
|
|
28
28
|
const s = {
|
|
29
29
|
name: "web-mcp-server",
|
|
@@ -35,19 +35,19 @@ class Jr {
|
|
|
35
35
|
completions: {},
|
|
36
36
|
logging: {}
|
|
37
37
|
};
|
|
38
|
-
this.server = new
|
|
38
|
+
this.server = new tt(e || s, t || { capabilities: n }), this.server.server.oninitialized = () => {
|
|
39
39
|
this.oninitialized?.();
|
|
40
40
|
}, this.server.server.onclose = () => {
|
|
41
41
|
this.onclose?.();
|
|
42
42
|
}, this.server.server.onerror = (i) => {
|
|
43
43
|
this.onerror?.(i);
|
|
44
|
-
}, this.server.server.setRequestHandler(
|
|
44
|
+
}, this.server.server.setRequestHandler(Ae, async () => ({}));
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Connects the server to a transport via the specified option.
|
|
48
48
|
*/
|
|
49
49
|
async connect(e) {
|
|
50
|
-
return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new
|
|
50
|
+
return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new xe(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Closes the connection.
|
|
@@ -189,31 +189,31 @@ class Jr {
|
|
|
189
189
|
* Registers a handler for the subscribe request.
|
|
190
190
|
*/
|
|
191
191
|
onSubscribe(e) {
|
|
192
|
-
this.server.server.setRequestHandler(
|
|
192
|
+
this.server.server.setRequestHandler(jt, e);
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
195
195
|
* Registers a handler for the unsubscribe request.
|
|
196
196
|
*/
|
|
197
197
|
onUnsubscribe(e) {
|
|
198
|
-
this.server.server.setRequestHandler(
|
|
198
|
+
this.server.server.setRequestHandler(Nt, e);
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
201
|
* Registers a handler for the set log level request.
|
|
202
202
|
*/
|
|
203
203
|
onSetLogLevel(e) {
|
|
204
|
-
this.server.server.setRequestHandler(
|
|
204
|
+
this.server.server.setRequestHandler(Ae, e);
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
207
207
|
* Registers a handler for the list tools request.
|
|
208
208
|
*/
|
|
209
209
|
onListResources(e) {
|
|
210
|
-
this.server.server.setRequestHandler(
|
|
210
|
+
this.server.server.setRequestHandler(Zt, e);
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
* Registers a handler for the roots list changed notification.
|
|
214
214
|
*/
|
|
215
215
|
onRootsListChanged(e) {
|
|
216
|
-
this.server.server.setNotificationHandler(
|
|
216
|
+
this.server.server.setNotificationHandler(qt, e);
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* Close the transport for window.addEventListener('pagehide')
|
|
@@ -222,8 +222,8 @@ class Jr {
|
|
|
222
222
|
e.persisted || this.transport && typeof this.transport.close == "function" && await this.transport.close();
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
class
|
|
225
|
+
const rs = (r, e) => new xe(r, e), ss = () => Mt(), ns = (r) => r instanceof xe, os = (r) => r instanceof tt;
|
|
226
|
+
class n2 {
|
|
227
227
|
constructor(e, t) {
|
|
228
228
|
const s = {
|
|
229
229
|
name: "web-mcp-client",
|
|
@@ -233,7 +233,7 @@ class Qt {
|
|
|
233
233
|
sampling: {},
|
|
234
234
|
elicitation: {}
|
|
235
235
|
};
|
|
236
|
-
this.client = new
|
|
236
|
+
this.client = new rt(e || s, t || { capabilities: n }), this.client.onclose = () => {
|
|
237
237
|
this.onclose?.();
|
|
238
238
|
}, this.client.onerror = (i) => {
|
|
239
239
|
this.onerror?.(i);
|
|
@@ -245,28 +245,28 @@ class Qt {
|
|
|
245
245
|
async connect(e) {
|
|
246
246
|
if (typeof e.start == "function")
|
|
247
247
|
return this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0, await this.client.connect(this.transport), { transport: this.transport, sessionId: this.transport.sessionId };
|
|
248
|
-
const { url: t, token: s, sessionId: n, type: i, agent: a, onError:
|
|
248
|
+
const { url: t, token: s, sessionId: n, type: i, agent: a, onError: c } = e;
|
|
249
249
|
if (a === !0) {
|
|
250
250
|
const d = { client: this.client, url: t, token: s, sessionId: n };
|
|
251
251
|
let g;
|
|
252
252
|
return await (async () => {
|
|
253
|
-
const { transport: m, sessionId:
|
|
253
|
+
const { transport: m, sessionId: y } = i === "sse" ? await It(d) : i === "socket" ? await At(d) : await Ot(d);
|
|
254
254
|
m.onerror = async (p) => {
|
|
255
|
-
|
|
256
|
-
}, g = { transport: m, sessionId:
|
|
255
|
+
c?.(p);
|
|
256
|
+
}, g = { transport: m, sessionId: y };
|
|
257
257
|
})(), g;
|
|
258
258
|
}
|
|
259
259
|
const u = new URL(t);
|
|
260
|
-
let
|
|
261
|
-
if (i === "channel" && (
|
|
262
|
-
const d =
|
|
263
|
-
|
|
260
|
+
let l;
|
|
261
|
+
if (i === "channel" && (l = new Le(t), await this.client.connect(l)), i === "sse") {
|
|
262
|
+
const d = Rt(s, n);
|
|
263
|
+
l = new Pe(u, d), await this.client.connect(l);
|
|
264
264
|
}
|
|
265
|
-
if (i === "socket" && (
|
|
266
|
-
const d =
|
|
267
|
-
|
|
265
|
+
if (i === "socket" && (l = new Gt(new URL(`${t}?sessionId=${n}&token=${s}`)), l.sessionId = n, await this.client.connect(l)), typeof l > "u") {
|
|
266
|
+
const d = Et(s, n);
|
|
267
|
+
l = new ie(u, d), await this.client.connect(l);
|
|
268
268
|
}
|
|
269
|
-
return this.transport =
|
|
269
|
+
return this.transport = l, { transport: this.transport, sessionId: this.transport.sessionId };
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Closes the connection.
|
|
@@ -356,7 +356,7 @@ class Qt {
|
|
|
356
356
|
* Calls a tool on the server with the given parameters.
|
|
357
357
|
*/
|
|
358
358
|
async callTool(e, t) {
|
|
359
|
-
return await this.client.callTool(e,
|
|
359
|
+
return await this.client.callTool(e, zt, t);
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
362
|
* Lists all tools available on the server.
|
|
@@ -416,65 +416,65 @@ class Qt {
|
|
|
416
416
|
* Registers a handler for the elicitation request.
|
|
417
417
|
*/
|
|
418
418
|
onElicit(e) {
|
|
419
|
-
this.client.setRequestHandler(
|
|
419
|
+
this.client.setRequestHandler(Dt, e);
|
|
420
420
|
}
|
|
421
421
|
/**
|
|
422
422
|
* Registers a handler for the create LLM message request.
|
|
423
423
|
*/
|
|
424
424
|
onCreateMessage(e) {
|
|
425
|
-
this.client.setRequestHandler(
|
|
425
|
+
this.client.setRequestHandler(Ht, e);
|
|
426
426
|
}
|
|
427
427
|
/**
|
|
428
428
|
* Registers a handler for the list roots request.
|
|
429
429
|
*/
|
|
430
430
|
onListRoots(e) {
|
|
431
|
-
this.client.setRequestHandler(
|
|
431
|
+
this.client.setRequestHandler(Ft, e);
|
|
432
432
|
}
|
|
433
433
|
/**
|
|
434
434
|
* Registers a handler for the tool list changed notification.
|
|
435
435
|
*/
|
|
436
436
|
onToolListChanged(e) {
|
|
437
|
-
this.client.setNotificationHandler(
|
|
437
|
+
this.client.setNotificationHandler(Bt, e);
|
|
438
438
|
}
|
|
439
439
|
/**
|
|
440
440
|
* Registers a handler for the prompt list changed notification.
|
|
441
441
|
*/
|
|
442
442
|
onPromptListChanged(e) {
|
|
443
|
-
this.client.setNotificationHandler(
|
|
443
|
+
this.client.setNotificationHandler(Vt, e);
|
|
444
444
|
}
|
|
445
445
|
/**
|
|
446
446
|
* Registers a handler for the resource list changed notification.
|
|
447
447
|
*/
|
|
448
448
|
onResourceListChanged(e) {
|
|
449
|
-
this.client.setNotificationHandler(
|
|
449
|
+
this.client.setNotificationHandler(Jt, e);
|
|
450
450
|
}
|
|
451
451
|
/**
|
|
452
452
|
* Registers a handler for the resource updated notification.
|
|
453
453
|
*/
|
|
454
454
|
onResourceUpdated(e) {
|
|
455
|
-
this.client.setNotificationHandler(
|
|
455
|
+
this.client.setNotificationHandler(Wt, e);
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
* Registers a handler for the logging message notification.
|
|
459
459
|
*/
|
|
460
460
|
onLoggingMessage(e) {
|
|
461
|
-
this.client.setNotificationHandler(
|
|
461
|
+
this.client.setNotificationHandler(Kt, e);
|
|
462
462
|
}
|
|
463
463
|
/**
|
|
464
464
|
* Close the transport for window.addEventListener('pagehide')
|
|
465
465
|
*/
|
|
466
466
|
async onPagehide(e) {
|
|
467
|
-
e.persisted || (
|
|
467
|
+
e.persisted || (o2(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const is = (r, e) => new Pe(r, e), as = (r, e) => new ie(r, e), cs = (r, e) => new Le(r, e), ls = (r) => r instanceof Pe, o2 = (r) => r instanceof ie, us = (r) => r instanceof Le, ds = (r) => r instanceof rt, z = (r, e, t) => {
|
|
471
471
|
window.postMessage({ type: r, direction: t, data: e }, "*");
|
|
472
|
-
},
|
|
472
|
+
}, Ne = (r, e, t) => {
|
|
473
473
|
const s = async function(n) {
|
|
474
474
|
n.source === window && n.data.type === r && n.data.direction === t && await e(n.data.data);
|
|
475
475
|
};
|
|
476
476
|
return window.addEventListener("message", s), () => window.removeEventListener("message", s);
|
|
477
|
-
},
|
|
477
|
+
}, fe = (r, e, t) => {
|
|
478
478
|
if (t.endsWith("content"))
|
|
479
479
|
chrome.tabs.query({}, (s) => {
|
|
480
480
|
s.forEach((n) => {
|
|
@@ -483,23 +483,23 @@ const Qr = (r, e) => new be(r, e), Xr = (r, e) => new ne(r, e), es = (r, e) => n
|
|
|
483
483
|
});
|
|
484
484
|
else
|
|
485
485
|
return chrome.runtime.sendMessage({ direction: t, type: r, data: e });
|
|
486
|
-
},
|
|
487
|
-
const n = (i, a,
|
|
486
|
+
}, ye = (r, e, t, s) => {
|
|
487
|
+
const n = (i, a, c) => {
|
|
488
488
|
if (i.type === r && i.direction === t && (!s || s && i.tabId === s)) {
|
|
489
489
|
const { data: u } = i;
|
|
490
|
-
e(u, a,
|
|
490
|
+
e(u, a, c), c(a);
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
return chrome.runtime.onMessage.addListener(n), () => chrome.runtime.onMessage.removeListener(n);
|
|
494
494
|
};
|
|
495
|
-
class
|
|
495
|
+
class i2 {
|
|
496
496
|
constructor(e) {
|
|
497
|
-
this._isStarted = !1, this._isClosed = !1, this.targetSessionId = e, this._messageListener =
|
|
497
|
+
this._isStarted = !1, this._isClosed = !1, this.targetSessionId = e, this._messageListener = ye(
|
|
498
498
|
"mcp-server-to-client",
|
|
499
499
|
(t) => {
|
|
500
500
|
try {
|
|
501
501
|
if (t.sessionId !== this.targetSessionId) return;
|
|
502
|
-
const s =
|
|
502
|
+
const s = Se.parse(t.mcpMessage);
|
|
503
503
|
this.onmessage?.(s);
|
|
504
504
|
} catch (s) {
|
|
505
505
|
console.log("【Client Transport】处理server消息错误:", s);
|
|
@@ -525,7 +525,7 @@ class e2 {
|
|
|
525
525
|
const s = chrome.sessionRegistry.get(this.targetSessionId);
|
|
526
526
|
this._throwError(() => !s, `【Client Transport】sessionRegistry中未找到${this.targetSessionId}`);
|
|
527
527
|
const n = s.tabIds[s.tabIds.length - 1];
|
|
528
|
-
|
|
528
|
+
fe(
|
|
529
529
|
"mcp-client-to-server",
|
|
530
530
|
{ sessionId: this.targetSessionId, tabId: n, mcpMessage: e },
|
|
531
531
|
"side->content"
|
|
@@ -541,13 +541,13 @@ class e2 {
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
const
|
|
544
|
+
const ke = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => {
|
|
545
545
|
const e = Math.random() * 16 | 0;
|
|
546
546
|
return (r === "x" ? e : e & 3 | 8).toString(16);
|
|
547
547
|
});
|
|
548
|
-
class
|
|
548
|
+
class hs {
|
|
549
549
|
constructor(e = null) {
|
|
550
|
-
this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e ||
|
|
550
|
+
this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || ke(), this._messageListener1 = Ne(
|
|
551
551
|
"sidepanel-ready-to-page",
|
|
552
552
|
() => {
|
|
553
553
|
this._lastRegistration && this._isStarted && this.notifyRegistration(this._lastRegistration).catch((t) => {
|
|
@@ -555,12 +555,12 @@ class ns {
|
|
|
555
555
|
});
|
|
556
556
|
},
|
|
557
557
|
"content->page"
|
|
558
|
-
), this._messageListener2 =
|
|
558
|
+
), this._messageListener2 = Ne(
|
|
559
559
|
"mcp-client-to-server-to-page",
|
|
560
560
|
(t) => {
|
|
561
561
|
if (t.sessionId !== this.sessionId) return;
|
|
562
562
|
console.log("【Page Svr Transport】 即将处理 mcpMessage", t.mcpMessage);
|
|
563
|
-
const s =
|
|
563
|
+
const s = Se.parse(t.mcpMessage);
|
|
564
564
|
this.onmessage?.(s), t.mcpMessage.params?.name && z(
|
|
565
565
|
"update-page-app-message",
|
|
566
566
|
{ status: "run", message: t.mcpMessage.params?.name },
|
|
@@ -630,9 +630,9 @@ class ns {
|
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
class
|
|
633
|
+
class ps {
|
|
634
634
|
constructor(e = null, t) {
|
|
635
|
-
this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e ||
|
|
635
|
+
this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || ke(), this.tabId = t, ye(
|
|
636
636
|
"sidepanel-ready",
|
|
637
637
|
() => {
|
|
638
638
|
this._lastRegistration && this._isStarted && this.notifyRegistration(this._lastRegistration).catch((s) => {
|
|
@@ -654,13 +654,13 @@ class os {
|
|
|
654
654
|
async start() {
|
|
655
655
|
if (console.log("【Content Svr Transport】 启动 start", this.sessionId), !this._isStarted) {
|
|
656
656
|
if (this._isClosed) throw new Error("【Content Svr Transport】 已关闭,无法重新启动");
|
|
657
|
-
|
|
657
|
+
ye(
|
|
658
658
|
"mcp-client-to-server",
|
|
659
659
|
(e) => {
|
|
660
660
|
if (!(e.sessionId !== this.sessionId || e.tabId !== this.tabId))
|
|
661
661
|
try {
|
|
662
662
|
console.log("【Content Svr Transport】 即将处理 mcpMessage", e.mcpMessage);
|
|
663
|
-
const t =
|
|
663
|
+
const t = Se.parse(e.mcpMessage);
|
|
664
664
|
this.onmessage?.(t), e.mcpMessage.params?.name && z(
|
|
665
665
|
"update-page-app-message",
|
|
666
666
|
{ status: "run", message: e.mcpMessage.params?.name },
|
|
@@ -680,7 +680,7 @@ class os {
|
|
|
680
680
|
async send(e, t) {
|
|
681
681
|
this._throwError(() => !this._isStarted, "【Content Svr Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Content Svr Transport】 已关闭,无法发送消息");
|
|
682
682
|
try {
|
|
683
|
-
console.log("【Content Svr Transport】 发送消息到 MCP Client", e),
|
|
683
|
+
console.log("【Content Svr Transport】 发送消息到 MCP Client", e), fe(
|
|
684
684
|
"mcp-server-to-client",
|
|
685
685
|
{
|
|
686
686
|
sessionId: this.sessionId,
|
|
@@ -699,7 +699,7 @@ class os {
|
|
|
699
699
|
}
|
|
700
700
|
/** 通知 Sidepanel 此 Server 已启动并准备接受连接 */
|
|
701
701
|
async notifyRegistration(e) {
|
|
702
|
-
this._isStarted && (this._lastRegistration = e,
|
|
702
|
+
this._isStarted && (this._lastRegistration = e, fe(
|
|
703
703
|
"mcp-server-register",
|
|
704
704
|
{
|
|
705
705
|
sessionId: this.sessionId,
|
|
@@ -721,7 +721,7 @@ class os {
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
class
|
|
724
|
+
class a2 {
|
|
725
725
|
constructor(e, { size: t = 200, margin: s = 4, color: n = "#000", bgColor: i = "#fff" }) {
|
|
726
726
|
this.value = e, this.size = t, this.margin = s, this.color = n, this.bgColor = i;
|
|
727
727
|
}
|
|
@@ -739,18 +739,18 @@ class t2 {
|
|
|
739
739
|
}
|
|
740
740
|
/** 生成二维码的 Data URL(base64 图片) */
|
|
741
741
|
async toDataURL() {
|
|
742
|
-
return
|
|
742
|
+
return Oe.toDataURL(this.value, this.qrCodeOption);
|
|
743
743
|
}
|
|
744
744
|
/** 渲染二维码到指定的 canvas 元素 */
|
|
745
745
|
async toCanvas(e) {
|
|
746
|
-
return
|
|
746
|
+
return Oe.toCanvas(e, this.value, this.qrCodeOption);
|
|
747
747
|
}
|
|
748
748
|
/** 渲染二维码到指定的 img 元素 */
|
|
749
749
|
async toImage(e) {
|
|
750
750
|
e.src = await this.toDataURL();
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
const
|
|
753
|
+
const c2 = {
|
|
754
754
|
content: "",
|
|
755
755
|
placement: "top",
|
|
756
756
|
trigger: "hover",
|
|
@@ -759,10 +759,10 @@ const r2 = {
|
|
|
759
759
|
container: document.body,
|
|
760
760
|
className: "tiny-remoter-native-tooltip"
|
|
761
761
|
};
|
|
762
|
-
class
|
|
762
|
+
class l2 {
|
|
763
763
|
constructor(e, t = {}) {
|
|
764
764
|
if (this.tip = null, this.showTimer = 0, this.hideTimer = 0, this.clickOutside = null, this.el = typeof e == "string" ? document.querySelector(e) : e, !this.el) throw new Error("Tooltip: invalid element");
|
|
765
|
-
this.opts = { ...
|
|
765
|
+
this.opts = { ...c2, ...t }, this.bindEvents();
|
|
766
766
|
}
|
|
767
767
|
/* 公开 API */
|
|
768
768
|
open() {
|
|
@@ -808,9 +808,9 @@ class s2 {
|
|
|
808
808
|
this.applyStyle(this.calcStyle("top"));
|
|
809
809
|
}
|
|
810
810
|
calcStyle(e) {
|
|
811
|
-
const t = this.el.getBoundingClientRect(), s = this.tip.getBoundingClientRect(), n = window.pageYOffset || document.documentElement.scrollTop, i = window.pageXOffset || document.documentElement.scrollLeft, a = 6, [
|
|
812
|
-
let
|
|
813
|
-
return
|
|
811
|
+
const t = this.el.getBoundingClientRect(), s = this.tip.getBoundingClientRect(), n = window.pageYOffset || document.documentElement.scrollTop, i = window.pageXOffset || document.documentElement.scrollLeft, a = 6, [c, u = "center"] = e.split("-");
|
|
812
|
+
let l = 0, d = 0;
|
|
813
|
+
return c === "top" ? l = t.top + n - s.height - a : c === "bottom" ? l = t.bottom + n + a : c === "left" ? d = t.left + i - s.width - a : c === "right" && (d = t.right + i + a), (c === "top" || c === "bottom") && (u === "start" ? d = t.left + i : u === "end" ? d = t.right + i - s.width : d = (t.left + t.right) / 2 + i - s.width / 2), (c === "left" || c === "right") && (u === "start" ? l = t.top + n : u === "end" ? l = t.bottom + n - s.height : l = (t.top + t.bottom) / 2 + n - s.height / 2), { top: Math.round(l), left: Math.round(d) };
|
|
814
814
|
}
|
|
815
815
|
applyStyle({ top: e, left: t }) {
|
|
816
816
|
Object.assign(this.tip.style, {
|
|
@@ -848,11 +848,11 @@ class s2 {
|
|
|
848
848
|
return !!this.tip?.parentNode;
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const Ze = "tiny-remoter-native-tooltip-style";
|
|
852
852
|
(() => {
|
|
853
|
-
if (document.getElementById(
|
|
853
|
+
if (document.getElementById(Ze)) return;
|
|
854
854
|
const r = document.createElement("style");
|
|
855
|
-
r.id =
|
|
855
|
+
r.id = Ze, r.textContent = `
|
|
856
856
|
.tiny-remoter-native-tooltip {
|
|
857
857
|
position: absolute;
|
|
858
858
|
z-index: 9999;
|
|
@@ -901,20 +901,20 @@ const Oe = "tiny-remoter-native-tooltip-style";
|
|
|
901
901
|
}
|
|
902
902
|
`, document.head.appendChild(r);
|
|
903
903
|
})();
|
|
904
|
-
const n2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='39.969238'%20fill='none'%20customFrame='url(%23clipPath_3)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_3'%3e%3crect%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_4'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_5'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_6'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_7'%3e%3crect%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_8'%3e%3crect%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='2'%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(239,246,255)'%20/%3e%3cg%20id='物业'%20clip-path='url(%23clipPath_4)'%20customFrame='url(%23clipPath_4)'%3e%3crect%20id='物业'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20/%3e%3cg%20id='物业服务'%3e%3cg%20id='00公共/红点/图标+红点'%20customFrame='url(%23clipPath_5)'%3e%3crect%20id='00公共/红点/图标+红点'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cg%20id='common_chats_line'%20customFrame='url(%23clipPath_6)'%3e%3crect%20id='common_chats_line'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cpath%20id='形状'%20d='M28.3332%2019.9847C28.3332%2015.3823%2024.6022%2011.6514%2019.9998%2011.6514C15.3975%2011.6514%2011.6665%2015.3823%2011.6665%2019.9847C11.6665%2024.5871%2015.3975%2028.318%2019.9998%2028.318C21.0018%2028.318%2021.9624%2028.1412%2022.8522%2027.8171L26.581%2028.1578C26.7205%2028.1706%2026.8611%2028.1598%2026.9971%2028.1259C27.6669%2027.959%2028.0746%2027.2806%2027.9077%2026.6108L27.2716%2024.0578C27.9477%2022.8535%2028.3332%2021.4641%2028.3332%2019.9847ZM19.9998%2013.1514C16.2259%2013.1514%2013.1665%2016.2108%2013.1665%2019.9847C13.1665%2023.7586%2016.2259%2026.818%2019.9998%2026.818C20.8089%2026.818%2021.5967%2026.678%2022.3388%2026.4077C22.505%2026.3471%2022.6803%2026.3166%2022.8565%2026.3171L22.9887%2026.3233L26.3665%2026.6322L25.8161%2024.4205C25.7352%2024.0958%2025.7655%2023.7548%2025.8997%2023.4512L25.9636%2023.3236C26.5311%2022.3126%2026.8332%2021.1723%2026.8332%2019.9847C26.8332%2016.2108%2023.7738%2013.1514%2019.9998%2013.1514ZM23.1152%2021.2468C23.352%2020.9069%2023.2684%2020.4394%2022.9286%2020.2026C22.5887%2019.9659%2022.1212%2020.0494%2021.8845%2020.3893C21.2894%2021.2433%2020.4268%2021.7347%2019.5102%2021.7347C18.9513%2021.7347%2018.4132%2021.554%2017.9375%2021.2122C17.6011%2020.9705%2017.1325%2021.0472%2016.8908%2021.3836C16.6491%2021.7199%2016.7258%2022.1886%2017.0622%2022.4303C17.7879%2022.9518%2018.6305%2023.2347%2019.5102%2023.2347C20.9394%2023.2347%2022.2505%2022.4878%2023.1152%2021.2468Z'%20fill='rgb(65,142,255)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3cg%20id='00公共/3位数红点'%20opacity='0'%20customFrame='url(%23clipPath_7)'%3e%3crect%20id='00公共/3位数红点'%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20opacity='0'%20fill='rgb(243,111,100)'%20/%3e%3cpath%20id='文本'%20d='M26.0421%2013.4421C26.4259%2013.4421%2026.7677%2013.5255%2027.0675%2013.6923C27.3672%2013.8591%2027.6005%2014.0931%2027.7673%2014.3942C27.9342%2014.694%2028.0176%2015.0351%2028.0176%2015.4176C28.0176%2015.7173%2027.9633%2015.994%2027.8548%2016.2476C27.7463%2016.4999%2027.5673%2016.8315%2027.3177%2017.2425L25.859%2019.6432L25.0167%2019.6432L26.276%2017.5924C26.3534%2017.4704%2026.4307%2017.3564%2026.508%2017.2507C26.3357%2017.3063%2026.1445%2017.3341%2025.9342%2017.3341C25.5721%2017.3341%2025.2493%2017.2479%2024.9658%2017.0757C24.6837%2016.9034%2024.4633%2016.6701%2024.3046%2016.3758C24.1459%2016.0815%2024.0666%2015.7566%2024.0666%2015.4013C24.0666%2015.0351%2024.1513%2014.7021%2024.3209%2014.4023C24.4904%2014.1012%2024.7264%2013.8659%2025.0289%2013.6964C25.3314%2013.5268%2025.6691%2013.4421%2026.0421%2013.4421ZM26.0421%2016.6505C26.4029%2016.6505%2026.6904%2016.5325%2026.9047%2016.2965C27.119%2016.0605%2027.2262%2015.7539%2027.2262%2015.3769C27.2262%2014.9985%2027.119%2014.694%2026.9047%2014.4634C26.6904%2014.2328%2026.4029%2014.1175%2026.0421%2014.1175C25.6867%2014.1175%2025.4019%2014.2342%2025.1876%2014.4674C24.9733%2014.7007%2024.8661%2015.0039%2024.8661%2015.3769C24.8661%2015.7539%2024.9719%2016.0605%2025.1835%2016.2965C25.3951%2016.5325%2025.6813%2016.6505%2026.0421%2016.6505ZM30.7921%2013.4421C31.1759%2013.4421%2031.5177%2013.5255%2031.8175%2013.6923C32.1172%2013.8591%2032.3505%2014.0931%2032.5173%2014.3942C32.6842%2014.694%2032.7676%2015.0351%2032.7676%2015.4176C32.7676%2015.7173%2032.7133%2015.994%2032.6048%2016.2476C32.4963%2016.4999%2032.3173%2016.8315%2032.0677%2017.2425L30.609%2019.6432L29.7667%2019.6432L31.026%2017.5924C31.1034%2017.4704%2031.1807%2017.3564%2031.258%2017.2507C31.0857%2017.3063%2030.8945%2017.3341%2030.6842%2017.3341C30.3221%2017.3341%2029.9993%2017.2479%2029.7158%2017.0757C29.4337%2016.9034%2029.2133%2016.6701%2029.0546%2016.3758C28.8959%2016.0815%2028.8166%2015.7566%2028.8166%2015.4013C28.8166%2015.0351%2028.9013%2014.7021%2029.0709%2014.4023C29.2404%2014.1012%2029.4764%2013.8659%2029.7789%2013.6964C30.0814%2013.5268%2030.4191%2013.4421%2030.7921%2013.4421ZM30.7921%2016.6505C31.1529%2016.6505%2031.4404%2016.5325%2031.6547%2016.2965C31.869%2016.0605%2031.9762%2015.7539%2031.9762%2015.3769C31.9762%2014.9985%2031.869%2014.694%2031.6547%2014.4634C31.4404%2014.2328%2031.1529%2014.1175%2030.7921%2014.1175C30.4367%2014.1175%2030.1519%2014.2342%2029.9376%2014.4674C29.7233%2014.7007%2029.6161%2015.0039%2029.6161%2015.3769C29.6161%2015.7539%2029.7219%2016.0605%2029.9335%2016.2965C30.1451%2016.5325%2030.4313%2016.6505%2030.7921%2016.6505ZM35.2674%2014.6851L35.9001%2014.6851L35.9001%2016.3188L37.5339%2016.3188L37.5339%2016.9516L35.9001%2016.9516L35.9001%2018.5853L35.2674%2018.5853L35.2674%2016.9516L33.6337%2016.9516L33.6337%2016.3188L35.2674%2016.3188L35.2674%2014.6851Z'%20fill='rgb(255,255,255)'%20fill-rule='nonzero'%20/%3e%3c/g%3e%3cg%20id='00公共/单红点'%20opacity='0'%20customFrame='url(%23clipPath_8)'%3e%3crect%20id='00公共/单红点'%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20opacity='0'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3ccircle%20id='红点'%20cx='26.6668301'%20cy='13.3179522'%20r='3.33333325'%20fill='rgb(243,111,100)'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", o2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_12)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_12'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_13'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_14'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='4'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(234,255,244)'%20/%3e%3cg%20id='我的信息'%20clip-path='url(%23clipPath_13)'%20customFrame='url(%23clipPath_13)'%3e%3crect%20id='我的信息'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='组合%208'%20customFrame='url(%23clipPath_14)'%3e%3crect%20id='组合%208'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='合并'%20d='M28.4994%2012.3142C28.4994%2012.2578%2028.4937%2012.2018%2028.4825%2012.1465C28.4713%2012.0911%2028.4547%2012.0373%2028.4327%2011.9851C28.4107%2011.933%2028.3836%2011.8835%2028.3516%2011.8365C28.3197%2011.7896%2028.2834%2011.7461%2028.2427%2011.7062C28.202%2011.6663%2028.1579%2011.6307%2028.1101%2011.5993C28.0622%2011.568%2028.0117%2011.5415%2027.9585%2011.5199C27.9054%2011.4983%2027.8506%2011.4819%2027.7942%2011.4709C27.7378%2011.4599%2027.6806%2011.4544%2027.6231%2011.4544L24.1832%2011.5199L24.1832%2010L29.0796%2010C29.1472%2010%2029.2143%2010.0065%2029.2806%2010.0194C29.347%2010.0324%2029.4114%2010.0516%2029.4739%2010.077C29.5364%2010.1024%2029.5961%2010.1336%2029.6523%2010.1705C29.7086%2010.2074%2029.7605%2010.2493%2029.8084%2010.2963C29.8562%2010.3433%2029.8991%2010.3944%2029.9367%2010.4496C29.9743%2010.5048%2030.006%2010.5631%2030.0319%2010.6244C30.0578%2010.6858%2030.0773%2010.7491%2030.0905%2010.8142C30.1037%2010.8794%2030.1104%2010.9451%2030.1104%2011.0115L30.1832%2014.4522L28.4992%2014.5L28.4994%2012.3142ZM11.6995%2012.3143C11.6995%2012.2579%2011.7051%2012.2019%2011.7163%2012.1466C11.7275%2012.0912%2011.7441%2012.0374%2011.7661%2011.9852C11.7882%2011.9331%2011.8152%2011.8836%2011.8472%2011.8366C11.8791%2011.7897%2011.9155%2011.7462%2011.9562%2011.7063C11.9968%2011.6664%2012.0409%2011.6308%2012.0888%2011.5994C12.1366%2011.5681%2012.1871%2011.5416%2012.2403%2011.52C12.2934%2011.4984%2012.3482%2011.482%2012.4046%2011.471C12.4611%2011.46%2012.5182%2011.4545%2012.5758%2011.4545L16.0157%2011.52L16.0157%2010.0001L11.1193%2010.0001C11.0516%2010.0001%2010.9846%2010.0066%2010.9182%2010.0196C10.8518%2010.0325%2010.7874%2010.0517%2010.7249%2010.0771C10.6624%2010.1025%2010.6028%2010.1337%2010.5465%2010.1706C10.4902%2010.2075%2010.4383%2010.2494%2010.3904%2010.2964C10.3426%2010.3434%2010.2997%2010.3945%2010.2621%2010.4497C10.2245%2010.5049%2010.1929%2010.5632%2010.167%2010.6245C10.1411%2010.6859%2010.1215%2010.7492%2010.1083%2010.8143C10.0951%2010.8795%2010.0885%2010.9452%2010.0884%2011.0116L10.0157%2014.4523L11.6997%2014.5L11.6995%2012.3143ZM25.3135%2021.8051L25.3135%2022.8167C25.7656%2022.8929%2026.2209%2022.9249%2026.6792%2022.9127C28.3381%2022.9127%2029.1675%2022.326%2029.1675%2021.1527C29.1733%2020.9869%2029.151%2020.825%2029.1006%2020.667C29.0503%2020.509%2028.9747%2020.3641%2028.8742%2020.2322C28.767%2020.1025%2028.6403%2019.9963%2028.4938%2019.9134C28.3474%2019.8306%2028.191%2019.7767%2028.0246%2019.7517L28.0246%2019.7011C28.0971%2019.6839%2028.1676%2019.6606%2028.236%2019.6311C28.3044%2019.6016%2028.3698%2019.5665%2028.4321%2019.5257C28.4944%2019.4848%2028.5526%2019.4389%2028.6069%2019.3879C28.6613%2019.3369%2028.7109%2019.2816%2028.7556%2019.222C28.8003%2019.1624%2028.8394%2019.0994%2028.8732%2019.033C28.9069%2018.9665%2028.9346%2018.8977%2028.9564%2018.8265C28.9782%2018.7552%2028.9937%2018.6826%2029.0028%2018.6086C29.0119%2018.5347%2029.0145%2018.4605%2029.0107%2018.3861C29.0217%2018.2675%2029.0176%2018.1495%2028.9984%2018.0319C28.9791%2017.9144%2028.9454%2017.8012%2028.8971%2017.6923C28.8489%2017.5834%2028.7875%2017.4823%2028.7134%2017.3891C28.6393%2017.2959%2028.5547%2017.2135%2028.4595%2017.1419C28.219%2017.0003%2027.963%2016.8972%2027.6915%2016.8326C27.4199%2016.7679%2027.1449%2016.7446%2026.8664%2016.7626C26.6258%2016.7621%2026.3864%2016.7791%2026.1482%2016.8132C25.9479%2016.8386%2025.7504%2016.8791%2025.5563%2016.9346L25.5563%2017.8854C25.743%2017.8264%2025.9337%2017.7842%2026.128%2017.759C26.3276%2017.73%2026.5282%2017.7148%2026.7298%2017.7134C27.0252%2017.6949%2027.3049%2017.7523%2027.5692%2017.8854C27.6168%2017.9161%2027.6595%2017.9525%2027.6972%2017.9947C27.7348%2018.037%2027.766%2018.0835%2027.791%2018.1343C27.816%2018.1851%2027.8337%2018.2383%2027.8441%2018.294C27.8545%2018.3496%2027.8573%2018.4056%2027.8525%2018.462C27.8566%2018.5278%2027.8514%2018.5927%2027.8367%2018.657C27.822%2018.7212%2027.7986%2018.7821%2027.7663%2018.8395C27.734%2018.897%2027.694%2018.9487%2027.6468%2018.9946C27.5995%2019.0405%2027.5468%2019.0787%2027.4885%2019.1093C27.1544%2019.2631%2026.8037%2019.3306%2026.4364%2019.3117L25.9862%2019.3117L25.9862%2020.1917L26.4466%2020.1917C26.8409%2020.1669%2027.2202%2020.2309%2027.5845%2020.3839C27.6459%2020.4167%2027.7011%2020.4576%2027.7505%2020.5066C27.7999%2020.5556%2027.8412%2020.6107%2027.8745%2020.6718C27.9077%2020.733%2027.9315%2020.7976%2027.9458%2020.8656C27.9602%2020.9337%2027.9644%2021.0024%2027.9587%2021.0717C27.9648%2021.1402%2027.9612%2021.2083%2027.9478%2021.2757C27.9344%2021.3432%2027.912%2021.4074%2027.8801%2021.4683C27.8483%2021.5293%2027.8086%2021.5846%2027.7609%2021.6341C27.7132%2021.6837%2027.6593%2021.7254%2027.5996%2021.7596C27.2884%2021.9045%2026.9613%2021.9685%2026.6184%2021.9518C26.1786%2021.9465%2025.7436%2021.8977%2025.3135%2021.8051ZM21.3382%2018.6238C21.3445%2018.5593%2021.343%2018.495%2021.3335%2018.4308C21.3241%2018.3667%2021.3069%2018.3046%2021.2822%2018.2447C21.2575%2018.1847%2021.226%2018.1287%2021.1876%2018.0765C21.1492%2018.0242%2021.1049%2017.9774%2021.055%2017.936C20.9359%2017.8608%2020.808%2017.806%2020.6714%2017.7714C20.5349%2017.7368%2020.3964%2017.7242%2020.2558%2017.7337C19.8009%2017.7395%2019.356%2017.8087%2018.9208%2017.9411L18.9208%2016.9598C19.4252%2016.8181%2019.9393%2016.7524%2020.4633%2016.7626C20.7322%2016.7484%2020.9964%2016.7773%2021.256%2016.8491C21.5156%2016.9209%2021.7571%2017.032%2021.9806%2017.1824C22.0729%2017.2601%2022.1548%2017.3474%2022.2263%2017.4446C22.2978%2017.5418%2022.3567%2017.646%2022.4034%2017.7573C22.45%2017.8686%2022.483%2017.9838%2022.5021%2018.1029C22.5213%2018.222%2022.5261%2018.3417%2022.5167%2018.462C22.5245%2018.7882%2022.4655%2019.1017%2022.3396%2019.4027C22.1879%2019.7384%2021.984%2020.0384%2021.7277%2020.3029C21.3021%2020.7337%2020.8502%2021.135%2020.3721%2021.5067L19.9928%2021.8051L19.9928%2021.8759L22.6938%2021.8759L22.6938%2022.8419L18.5464%2022.8419L18.5464%2021.7697C19.2882%2021.1796%2019.8579%2020.6975%2020.2558%2020.3232C20.574%2020.0432%2020.8523%2019.728%2021.0905%2019.3774C21.1675%2019.2665%2021.2269%2019.1469%2021.2691%2019.0187C21.3113%2018.8904%2021.3344%2018.7588%2021.3382%2018.6238ZM12.3102%2017.2127L12.3102%2018.1939L13.7769%2017.9107L13.7769%2022.8419L14.9605%2022.8419L14.9605%2016.8486L14.0957%2016.8486L12.3102%2017.2127ZM28.5524%2028.0475C28.5524%2028.104%2028.5467%2028.1599%2028.5353%2028.2152C28.5239%2028.2706%2028.5071%2028.3244%2028.4849%2028.3766C28.4626%2028.4287%2028.4352%2028.4782%2028.4028%2028.5252C28.3705%2028.5721%2028.3337%2028.6156%2028.2925%2028.6555C28.2513%2028.6954%2028.2067%2028.731%2028.1583%2028.7624C28.1098%2028.7937%2028.0587%2028.8202%2028.0049%2028.8418C27.9511%2028.8634%2027.8957%2028.8798%2027.8385%2028.8908C27.7814%2028.9018%2027.7235%2028.9073%2027.6653%2028.9073L24.1832%2028.8418L24.1832%2030.3617L29.1397%2030.3617C29.2082%2030.3617%2029.276%2030.3552%2029.3432%2030.3423C29.4104%2030.3293%2029.4756%2030.3101%2029.5389%2030.2847C29.6022%2030.2593%2029.6625%2030.2281%2029.7195%2030.1912C29.7765%2030.1543%2029.829%2030.1124%2029.8774%2030.0654C29.9259%2030.0184%2029.9693%2029.9673%2030.0074%2029.9121C30.0454%2029.8569%2030.0774%2029.7986%2030.1037%2029.7373C30.1299%2029.6759%2030.1497%2029.6126%2030.163%2029.5475C30.1764%2029.4823%2030.1831%2029.4166%2030.1832%2029.3502L30.1832%2026.0478L28.4785%2026L28.5524%2028.0475ZM11.6308%2028.0099C11.6308%2028.0664%2011.6365%2028.1223%2011.6479%2028.1777C11.6592%2028.233%2011.676%2028.2868%2011.6983%2028.339C11.7206%2028.3911%2011.748%2028.4406%2011.7803%2028.4876C11.8127%2028.5345%2011.8495%2028.578%2011.8906%2028.6179C11.9318%2028.6578%2011.9765%2028.6934%2012.0249%2028.7248C12.0733%2028.7562%2012.1244%2028.7826%2012.1783%2028.8042C12.2321%2028.8259%2012.2875%2028.8422%2012.3446%2028.8532C12.4017%2028.8642%2012.4596%2028.8697%2012.5178%2028.8698L16%2028.8042L16%2030.3241L11.0435%2030.3241C10.975%2030.3241%2010.9071%2030.3176%2010.8399%2030.3047C10.7727%2030.2917%2010.7076%2030.2725%2010.6443%2030.2471C10.581%2030.2217%2010.5206%2030.1906%2010.4637%2030.1537C10.4067%2030.1168%2010.3542%2030.0748%2010.3057%2030.0278C10.2573%2029.9809%2010.2138%2029.9298%2010.1758%2029.8745C10.1377%2029.8193%2010.1057%2029.7611%2010.0795%2029.6997C10.0533%2029.6383%2010.0335%2029.575%2010.0201%2029.5099C10.0068%2029.4448%2010%2029.379%2010%2029.3126L10%2026.0478L11.7047%2026L11.6308%2028.0099Z'%20fill='rgb(14,191,241)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", i2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_9)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_9'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_10'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_11'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='3'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='画板%202310'%20customFrame='url(%23clipPath_10)'%3e%3crect%20id='画板%202310'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='人事服务'%3e%3cg%20id='ic_public_link'%20clip-path='url(%23clipPath_11)'%20customFrame='url(%23clipPath_11)'%3e%3crect%20id='ic_public_link'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='path1'%20d='M9.9999%2019.9917C9.9999%2018.4292%209.99573%2016.8667%209.9999%2015.3042C9.99573%2014.5459%2010.0916%2013.7917%2010.2749%2013.0626C10.6874%2011.5126%2011.6957%2010.5917%2013.2457%2010.2334C14.0207%2010.0667%2014.8166%209.98756%2015.6082%2010.0001C18.6041%2010.0001%2021.5999%2010.0001%2024.5999%2010.0001C25.3541%209.99589%2026.1082%2010.0792%2026.8457%2010.2584C28.4416%2010.6459%2029.3999%2011.6584%2029.7624%2013.2501C29.9291%2014.0001%2030.0041%2014.7667%2029.9957%2015.5376C29.9957%2018.5667%2029.9957%2021.5959%2029.9957%2024.6209C29.9999%2025.3709%2029.9166%2026.1209%2029.7416%2026.8459C29.3499%2028.4459%2028.3332%2029.3959%2026.7457%2029.7626C25.9666%2029.9292%2025.1749%2030.0084%2024.3791%2029.9959C21.3957%2029.9959%2018.4124%2029.9959%2015.4291%2029.9959C14.6666%2030.0042%2013.9082%2029.9167%2013.1666%2029.7417C11.5624%2029.3542%2010.5999%2028.3376%2010.2374%2026.7376C10.0499%2025.9251%209.9999%2025.1126%209.9999%2024.2917C9.9999%2022.8584%209.9999%2021.4251%209.9999%2019.9917Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path3'%20d='M25.0333%2021.8666L26.9%2020C28.8083%2018.0916%2028.8083%2015%2026.9%2013.0958C24.9958%2011.1875%2021.9041%2011.1875%2020%2013.0958L18.1291%2014.9625M21.8666%2025.0333L20%2026.9C18.0916%2028.8083%2015%2028.8083%2013.0958%2026.9C11.1875%2024.9958%2011.1875%2021.9041%2013.0958%2020L14.9625%2018.1291'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='pah4'%20d='M18.125%2021.875L21.875%2018.125'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='path5'%20d='M25.8207%2019.2626L24.0457%2021.0376C23.7998%2021.2834%2023.6748%2021.5292%2023.6748%2021.7751C23.6748%2022.0209%2023.7998%2022.2667%2024.0457%2022.5126C24.1498%2022.6167%2024.2665%2022.6959%2024.3915%2022.7459C24.5123%2022.7917%2024.6415%2022.8167%2024.779%2022.8167C24.9207%2022.8167%2025.0498%2022.7917%2025.1665%2022.7459C25.2957%2022.6959%2025.4123%2022.6167%2025.5165%2022.5126L27.2915%2020.7334C27.8165%2020.2126%2028.2165%2019.6334%2028.4957%2019.0001C28.5082%2018.9667%2028.5248%2018.9334%2028.5373%2018.8959C28.554%2018.8626%2028.5665%2018.8292%2028.579%2018.7917C28.8332%2018.1501%2028.9582%2017.4584%2028.9582%2016.7209C28.9582%2015.9792%2028.8332%2015.2876%2028.579%2014.6459C28.5665%2014.6084%2028.554%2014.5751%2028.5373%2014.5417C28.5248%2014.5042%2028.5082%2014.4709%2028.4957%2014.4376C28.2165%2013.8042%2027.8165%2013.2292%2027.2915%2012.7042C26.7707%2012.1792%2026.1915%2011.7792%2025.5582%2011.5001C25.5248%2011.4876%2025.4915%2011.4709%2025.454%2011.4584C25.4207%2011.4417%2025.3873%2011.4292%2025.354%2011.4167C24.7082%2011.1667%2024.0165%2011.0417%2023.279%2011.0417C22.5373%2011.0417%2021.8457%2011.1667%2021.204%2011.4167C21.1665%2011.4292%2021.1332%2011.4417%2021.0998%2011.4584C21.0623%2011.4709%2021.029%2011.4876%2020.9957%2011.5001C20.3623%2011.7792%2019.7832%2012.1792%2019.2623%2012.7042L17.4832%2014.4792C17.379%2014.5834%2017.2998%2014.7001%2017.2498%2014.8292C17.204%2014.9501%2017.179%2015.0751%2017.179%2015.2167C17.179%2015.3542%2017.204%2015.4834%2017.2498%2015.6042C17.2998%2015.7292%2017.379%2015.8459%2017.4832%2015.9542C17.5915%2016.0584%2017.7082%2016.1376%2017.8332%2016.1876C17.954%2016.2334%2018.0832%2016.2584%2018.2207%2016.2584C18.3623%2016.2584%2018.4915%2016.2334%2018.6082%2016.1876C18.7373%2016.1376%2018.854%2016.0584%2018.9582%2015.9542L20.7332%2014.1751C21.0873%2013.8209%2021.4748%2013.5584%2021.8957%2013.3834C22.3165%2013.2084%2022.779%2013.1251%2023.279%2013.1251C23.7748%2013.1251%2024.2373%2013.2084%2024.6582%2013.3834C25.079%2013.5584%2025.4665%2013.8209%2025.8207%2014.1751C26.1748%2014.5292%2026.4373%2014.9167%2026.6123%2015.3376C26.7873%2015.7584%2026.8748%2016.2167%2026.8748%2016.7209C26.8748%2017.2209%2026.7873%2017.6792%2026.6123%2018.1001C26.4373%2018.5209%2026.1748%2018.9084%2025.8207%2019.2626ZM13.3832%2021.8959C13.5582%2021.4751%2013.8207%2021.0876%2014.1748%2020.7334L15.954%2018.9584C16.0582%2018.8542%2016.1373%2018.7376%2016.1873%2018.6084C16.2332%2018.4876%2016.2582%2018.3626%2016.2582%2018.2209C16.2582%2018.0834%2016.2332%2017.9542%2016.1873%2017.8334C16.1373%2017.7084%2016.0582%2017.5917%2015.954%2017.4834C15.7082%2017.2417%2015.4623%2017.1167%2015.2165%2017.1167C14.9707%2017.1167%2014.7248%2017.2417%2014.479%2017.4834L12.704%2019.2626C12.179%2019.7876%2011.779%2020.3626%2011.4998%2020.9959C11.4873%2021.0292%2011.4707%2021.0626%2011.4582%2021.1001C11.4415%2021.1334%2011.429%2021.1667%2011.4165%2021.2042C11.1665%2021.8459%2011.0415%2022.5376%2011.0415%2023.2792C11.0415%2024.0167%2011.1665%2024.7084%2011.4165%2025.3542C11.429%2025.3876%2011.4415%2025.4209%2011.4582%2025.4584C11.4707%2025.4917%2011.4873%2025.5251%2011.4998%2025.5584C11.779%2026.1917%2012.179%2026.7709%2012.704%2027.2917C13.2248%2027.8167%2013.804%2028.2167%2014.4373%2028.4959C14.4707%2028.5084%2014.504%2028.5251%2014.5415%2028.5376C14.5748%2028.5542%2014.6082%2028.5667%2014.6457%2028.5792C15.2873%2028.8292%2015.979%2028.9584%2016.7207%2028.9584C17.4582%2028.9584%2018.1498%2028.8292%2018.7915%2028.5792C18.829%2028.5667%2018.8623%2028.5542%2018.8957%2028.5376C18.9332%2028.5251%2018.9665%2028.5084%2018.9998%2028.4959C19.6332%2028.2167%2020.2123%2027.8167%2020.7332%2027.2917L22.5123%2025.5167C22.6165%2025.4126%2022.6957%2025.2959%2022.7457%2025.1667C22.7915%2025.0459%2022.8165%2024.9209%2022.8165%2024.7792C22.8165%2024.6417%2022.7915%2024.5126%2022.7457%2024.3917C22.6957%2024.2667%2022.6165%2024.1501%2022.5123%2024.0417C22.2665%2023.8001%2022.0207%2023.6751%2021.7748%2023.6751C21.529%2023.6751%2021.2832%2023.8001%2021.0373%2024.0417L19.2623%2025.8209C18.9082%2026.1751%2018.5207%2026.4376%2018.0998%2026.6126C17.679%2026.7876%2017.2165%2026.8751%2016.7207%2026.8751C16.2207%2026.8751%2015.7582%2026.7876%2015.3373%2026.6126C14.9165%2026.4376%2014.529%2026.1751%2014.1748%2025.8209C13.8207%2025.4667%2013.5582%2025.0792%2013.3832%2024.6584C13.2082%2024.2376%2013.1248%2023.7792%2013.1248%2023.2792C13.1248%2022.7751%2013.2082%2022.3167%2013.3832%2021.8959Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path6'%20d='M21.8127%2016.7458C21.746%2016.7874%2021.6877%2016.8374%2021.6293%2016.8916L16.8918%2021.6291C16.8377%2021.6874%2016.7877%2021.7499%2016.746%2021.8124C16.7127%2021.8624%2016.6877%2021.9166%2016.6627%2021.9749C16.6377%2022.0374%2016.6168%2022.1041%2016.6043%2022.1708C16.5918%2022.2333%2016.5835%2022.2999%2016.5835%2022.3666C16.5835%2022.4333%2016.5918%2022.4999%2016.6043%2022.5666C16.6168%2022.6333%2016.6377%2022.6999%2016.6627%2022.7624C16.6877%2022.8166%2016.7127%2022.8708%2016.746%2022.9208C16.7877%2022.9874%2016.8377%2023.0499%2016.8918%2023.1041C16.946%2023.1583%2017.0085%2023.2083%2017.0752%2023.2499C17.1252%2023.2833%2017.1793%2023.3083%2017.2335%2023.3333C17.3002%2023.3583%2017.3627%2023.3791%2017.4293%2023.3916C17.496%2023.4041%2017.5627%2023.4124%2017.6293%2023.4124C17.696%2023.4124%2017.7627%2023.4041%2017.8252%2023.3916C17.8918%2023.3791%2017.9585%2023.3583%2018.021%2023.3333C18.0793%2023.3083%2018.1335%2023.2833%2018.1835%2023.2499C18.246%2023.2083%2018.3085%2023.1583%2018.3668%2023.1041L23.1043%2018.3666C23.1585%2018.3083%2023.2085%2018.2499%2023.2502%2018.1833C23.2835%2018.1333%2023.3085%2018.0791%2023.3335%2018.0208C23.3585%2017.9583%2023.3793%2017.8916%2023.3918%2017.8249C23.4043%2017.7624%2023.4127%2017.6958%2023.4127%2017.6291C23.4127%2017.5624%2023.4043%2017.4958%2023.3918%2017.4291C23.3793%2017.3624%2023.3585%2017.2999%2023.3335%2017.2333C23.3085%2017.1791%2023.2835%2017.1249%2023.2502%2017.0749C23.2085%2017.0083%2023.1585%2016.9458%2023.1043%2016.8916C23.046%2016.8374%2022.9877%2016.7874%2022.921%2016.7458C22.871%2016.7124%2022.8168%2016.6874%2022.7627%2016.6624C22.696%2016.6374%2022.6335%2016.6166%2022.5668%2016.6041C22.5002%2016.5916%2022.4335%2016.5833%2022.3668%2016.5833C22.3002%2016.5833%2022.2335%2016.5916%2022.171%2016.6041C22.1043%2016.6166%2022.0377%2016.6374%2021.9752%2016.6624C21.9168%2016.6874%2021.8627%2016.7124%2021.8127%2016.7458Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", a2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_0)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_0'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_1'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_2'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='1'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='车辆'%20clip-path='url(%23clipPath_1)'%20customFrame='url(%23clipPath_1)'%3e%3crect%20id='车辆'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='编组'%3e%3cg%20id='ic_public_qrcode'%20clip-path='url(%23clipPath_2)'%20customFrame='url(%23clipPath_2)'%3e%3crect%20id='ic_public_qrcode'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cg%20id='ic_public_qrcode_1_1'%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_1'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20opacity='0.200000003'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3ccircle%20id='ic_public_qrcode_2_2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='ic_public_qrcode_2_3'%20d='M17.5%2011.25C17.9602%2011.25%2018.3333%2011.6231%2018.3333%2012.0833L18.3333%2017.5C18.3333%2017.9602%2017.9602%2018.3333%2017.5%2018.3333L12.0833%2018.3333C11.6231%2018.3333%2011.25%2017.9602%2011.25%2017.5L11.25%2012.0833C11.25%2011.6231%2011.6231%2011.25%2012.0833%2011.25L17.5%2011.25ZM17.5%2021.6667C17.9602%2021.6667%2018.3333%2022.0398%2018.3333%2022.5L18.3333%2027.9167C18.3333%2028.3769%2017.9602%2028.75%2017.5%2028.75L12.0833%2028.75C11.6231%2028.75%2011.25%2028.3769%2011.25%2027.9167L11.25%2022.5C11.25%2022.0398%2011.6231%2021.6667%2012.0833%2021.6667L17.5%2021.6667ZM27.9167%2011.25C28.3769%2011.25%2028.75%2011.6231%2028.75%2012.0833L28.75%2017.5C28.75%2017.9602%2028.3769%2018.3333%2027.9167%2018.3333L22.5%2018.3333C22.0398%2018.3333%2021.6667%2017.9602%2021.6667%2017.5L21.6667%2012.0833C21.6667%2011.6231%2022.0398%2011.25%2022.5%2011.25L27.9167%2011.25Z'%20fill-rule='evenodd'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333ZM17.5002%2011.6666L12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666ZM17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499ZM17.5002%2022.0833L12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833ZM27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333ZM27.9168%2011.6666L22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M18.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833ZM12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666L12.0835%2011.6666ZM18.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999ZM12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833L12.0835%2022.0833ZM29.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833ZM22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666L22.5002%2011.6666Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2021.6667L27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667ZM24.5832%2021.6667L24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667ZM21.6665%2025.8334L21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334ZM27.9165%2027.9167L27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167ZM25.8332%2025.8334L25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667L27.9165%2024.5834ZM24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667L24.5832%2022.639ZM21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334L21.6665%2028.7501ZM27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167L27.9165%2028.7501ZM25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334L25.8332%2026.6667Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2014.375L14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375ZM14.375%2024.7917L14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917ZM24.7917%2014.375L24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375L14.375%2015.2083ZM14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917L14.375%2025.625ZM24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375L24.7917%2015.2083Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", c2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2012%2012'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.000000'%20height='12.000000'%20fill='none'%3e%3cdefs%3e%3cfilter%20id='pixso_custom_mask_type_luminance'%3e%3cfeColorMatrix%20type='matrix'%20values='1%200%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%201%200%20'%20/%3e%3c/filter%3e%3c/defs%3e%3cmask%20id='mask_0'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20maskUnits='userSpaceOnUse'%3e%3cg%20filter='url(%23pixso_custom_mask_type_luminance)'%3e%3cg%20id='mask401_19830'%3e%3cpath%20id='蒙版'%20d='M0%200L11.9999%200L11.9999%2011.9999L0%2011.9999L0%200ZM2.69992%201.34999L8.09977%201.34999C9.5082%201.34999%2010.6498%202.49167%2010.6498%203.89998L10.6498%209.2999C10.6498%2010.7082%209.5082%2011.8499%208.09977%2011.8499L2.69992%2011.8499C1.29149%2011.8499%200.149901%2010.7082%200.149901%209.2999L0.149901%203.89998C0.149901%202.49167%201.29149%201.34999%202.69992%201.34999Z'%20fill='rgb(196,196,196)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/mask%3e%3crect%20id='ic_public_copy'%20width='12.000000'%20height='12.000000'%20x='0.000000'%20y='0.000000'%20/%3e%3crect%20id='ic_public_copy-复制/base/ic_public_copy'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path1'%20d='M0.000134537%205.99497C0.000134537%205.05748%20-0.00236544%204.11999%200.000134537%203.1825C-0.00236544%202.72751%200.055134%202.27501%200.165133%201.83752C0.41263%200.907526%201.01762%200.355032%201.94761%200.140034C2.41261%200.040035%202.8901%20-0.00746449%203.3651%203.54269e-05C5.16258%203.54269e-05%206.96006%203.54269e-05%208.76004%203.54269e-05C9.21254%20-0.00246455%209.66503%200.0475349%2010.1075%200.155034C11.065%200.387531%2011.64%200.995025%2011.8575%201.95002C11.9575%202.40001%2012.005%202.86001%2011.9975%203.3225C11.9975%205.13998%2011.9975%206.95746%2011.9975%208.77244C12%209.22244%2011.95%209.67243%2011.845%2010.1099C11.61%2011.0674%2011%2011.6374%2010.0475%2011.8574C9.58003%2011.9574%209.10504%2012.0049%208.62754%2011.9974C6.83756%2011.9974%205.04758%2011.9974%203.2576%2011.9974C2.80011%2012.0024%202.34511%2011.9499%201.90011%2011.8449C0.937625%2011.6124%200.360131%2011.0024%200.142633%2010.0424C0.0301342%209.55494%200.000134537%209.06744%200.000134537%208.57495C0.000134537%207.71495%200.000134537%206.85496%200.000134537%205.99497Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='5.99993801'%20cy='5.99993801'%20r='5.99993801'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='mask'%20mask='url(%23mask_0)'%3e%3cg%20id='组合%208'%3e%3cpath%20id='path'%20d='M11.1%203.89993L11.1%206.8999C11.1%208.55488%209.75502%209.89737%208.10004%209.89737L5.10007%209.89737C3.44258%209.89737%202.1001%208.55488%202.1001%206.8999L2.1001%203.89993C2.1001%202.24245%203.44258%200.897461%205.10007%200.897461L8.10004%200.897461C9.75502%200.897461%2011.1%202.24245%2011.1%203.89993Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/g%3e%3c/g%3e%3cpath%20id='path4'%20d='M2.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path4'%20d='M9.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/svg%3e", l2 = "https://chat.opentiny.design", u2 = "https://ai.opentiny.design/next-remoter", d2 = "https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg", $e = (r) => [
|
|
904
|
+
const u2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='39.969238'%20fill='none'%20customFrame='url(%23clipPath_3)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_3'%3e%3crect%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_4'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_5'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_6'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_7'%3e%3crect%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_8'%3e%3crect%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='2'%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(239,246,255)'%20/%3e%3cg%20id='物业'%20clip-path='url(%23clipPath_4)'%20customFrame='url(%23clipPath_4)'%3e%3crect%20id='物业'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20/%3e%3cg%20id='物业服务'%3e%3cg%20id='00公共/红点/图标+红点'%20customFrame='url(%23clipPath_5)'%3e%3crect%20id='00公共/红点/图标+红点'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cg%20id='common_chats_line'%20customFrame='url(%23clipPath_6)'%3e%3crect%20id='common_chats_line'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cpath%20id='形状'%20d='M28.3332%2019.9847C28.3332%2015.3823%2024.6022%2011.6514%2019.9998%2011.6514C15.3975%2011.6514%2011.6665%2015.3823%2011.6665%2019.9847C11.6665%2024.5871%2015.3975%2028.318%2019.9998%2028.318C21.0018%2028.318%2021.9624%2028.1412%2022.8522%2027.8171L26.581%2028.1578C26.7205%2028.1706%2026.8611%2028.1598%2026.9971%2028.1259C27.6669%2027.959%2028.0746%2027.2806%2027.9077%2026.6108L27.2716%2024.0578C27.9477%2022.8535%2028.3332%2021.4641%2028.3332%2019.9847ZM19.9998%2013.1514C16.2259%2013.1514%2013.1665%2016.2108%2013.1665%2019.9847C13.1665%2023.7586%2016.2259%2026.818%2019.9998%2026.818C20.8089%2026.818%2021.5967%2026.678%2022.3388%2026.4077C22.505%2026.3471%2022.6803%2026.3166%2022.8565%2026.3171L22.9887%2026.3233L26.3665%2026.6322L25.8161%2024.4205C25.7352%2024.0958%2025.7655%2023.7548%2025.8997%2023.4512L25.9636%2023.3236C26.5311%2022.3126%2026.8332%2021.1723%2026.8332%2019.9847C26.8332%2016.2108%2023.7738%2013.1514%2019.9998%2013.1514ZM23.1152%2021.2468C23.352%2020.9069%2023.2684%2020.4394%2022.9286%2020.2026C22.5887%2019.9659%2022.1212%2020.0494%2021.8845%2020.3893C21.2894%2021.2433%2020.4268%2021.7347%2019.5102%2021.7347C18.9513%2021.7347%2018.4132%2021.554%2017.9375%2021.2122C17.6011%2020.9705%2017.1325%2021.0472%2016.8908%2021.3836C16.6491%2021.7199%2016.7258%2022.1886%2017.0622%2022.4303C17.7879%2022.9518%2018.6305%2023.2347%2019.5102%2023.2347C20.9394%2023.2347%2022.2505%2022.4878%2023.1152%2021.2468Z'%20fill='rgb(65,142,255)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3cg%20id='00公共/3位数红点'%20opacity='0'%20customFrame='url(%23clipPath_7)'%3e%3crect%20id='00公共/3位数红点'%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20opacity='0'%20fill='rgb(243,111,100)'%20/%3e%3cpath%20id='文本'%20d='M26.0421%2013.4421C26.4259%2013.4421%2026.7677%2013.5255%2027.0675%2013.6923C27.3672%2013.8591%2027.6005%2014.0931%2027.7673%2014.3942C27.9342%2014.694%2028.0176%2015.0351%2028.0176%2015.4176C28.0176%2015.7173%2027.9633%2015.994%2027.8548%2016.2476C27.7463%2016.4999%2027.5673%2016.8315%2027.3177%2017.2425L25.859%2019.6432L25.0167%2019.6432L26.276%2017.5924C26.3534%2017.4704%2026.4307%2017.3564%2026.508%2017.2507C26.3357%2017.3063%2026.1445%2017.3341%2025.9342%2017.3341C25.5721%2017.3341%2025.2493%2017.2479%2024.9658%2017.0757C24.6837%2016.9034%2024.4633%2016.6701%2024.3046%2016.3758C24.1459%2016.0815%2024.0666%2015.7566%2024.0666%2015.4013C24.0666%2015.0351%2024.1513%2014.7021%2024.3209%2014.4023C24.4904%2014.1012%2024.7264%2013.8659%2025.0289%2013.6964C25.3314%2013.5268%2025.6691%2013.4421%2026.0421%2013.4421ZM26.0421%2016.6505C26.4029%2016.6505%2026.6904%2016.5325%2026.9047%2016.2965C27.119%2016.0605%2027.2262%2015.7539%2027.2262%2015.3769C27.2262%2014.9985%2027.119%2014.694%2026.9047%2014.4634C26.6904%2014.2328%2026.4029%2014.1175%2026.0421%2014.1175C25.6867%2014.1175%2025.4019%2014.2342%2025.1876%2014.4674C24.9733%2014.7007%2024.8661%2015.0039%2024.8661%2015.3769C24.8661%2015.7539%2024.9719%2016.0605%2025.1835%2016.2965C25.3951%2016.5325%2025.6813%2016.6505%2026.0421%2016.6505ZM30.7921%2013.4421C31.1759%2013.4421%2031.5177%2013.5255%2031.8175%2013.6923C32.1172%2013.8591%2032.3505%2014.0931%2032.5173%2014.3942C32.6842%2014.694%2032.7676%2015.0351%2032.7676%2015.4176C32.7676%2015.7173%2032.7133%2015.994%2032.6048%2016.2476C32.4963%2016.4999%2032.3173%2016.8315%2032.0677%2017.2425L30.609%2019.6432L29.7667%2019.6432L31.026%2017.5924C31.1034%2017.4704%2031.1807%2017.3564%2031.258%2017.2507C31.0857%2017.3063%2030.8945%2017.3341%2030.6842%2017.3341C30.3221%2017.3341%2029.9993%2017.2479%2029.7158%2017.0757C29.4337%2016.9034%2029.2133%2016.6701%2029.0546%2016.3758C28.8959%2016.0815%2028.8166%2015.7566%2028.8166%2015.4013C28.8166%2015.0351%2028.9013%2014.7021%2029.0709%2014.4023C29.2404%2014.1012%2029.4764%2013.8659%2029.7789%2013.6964C30.0814%2013.5268%2030.4191%2013.4421%2030.7921%2013.4421ZM30.7921%2016.6505C31.1529%2016.6505%2031.4404%2016.5325%2031.6547%2016.2965C31.869%2016.0605%2031.9762%2015.7539%2031.9762%2015.3769C31.9762%2014.9985%2031.869%2014.694%2031.6547%2014.4634C31.4404%2014.2328%2031.1529%2014.1175%2030.7921%2014.1175C30.4367%2014.1175%2030.1519%2014.2342%2029.9376%2014.4674C29.7233%2014.7007%2029.6161%2015.0039%2029.6161%2015.3769C29.6161%2015.7539%2029.7219%2016.0605%2029.9335%2016.2965C30.1451%2016.5325%2030.4313%2016.6505%2030.7921%2016.6505ZM35.2674%2014.6851L35.9001%2014.6851L35.9001%2016.3188L37.5339%2016.3188L37.5339%2016.9516L35.9001%2016.9516L35.9001%2018.5853L35.2674%2018.5853L35.2674%2016.9516L33.6337%2016.9516L33.6337%2016.3188L35.2674%2016.3188L35.2674%2014.6851Z'%20fill='rgb(255,255,255)'%20fill-rule='nonzero'%20/%3e%3c/g%3e%3cg%20id='00公共/单红点'%20opacity='0'%20customFrame='url(%23clipPath_8)'%3e%3crect%20id='00公共/单红点'%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20opacity='0'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3ccircle%20id='红点'%20cx='26.6668301'%20cy='13.3179522'%20r='3.33333325'%20fill='rgb(243,111,100)'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", d2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_12)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_12'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_13'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_14'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='4'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(234,255,244)'%20/%3e%3cg%20id='我的信息'%20clip-path='url(%23clipPath_13)'%20customFrame='url(%23clipPath_13)'%3e%3crect%20id='我的信息'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='组合%208'%20customFrame='url(%23clipPath_14)'%3e%3crect%20id='组合%208'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='合并'%20d='M28.4994%2012.3142C28.4994%2012.2578%2028.4937%2012.2018%2028.4825%2012.1465C28.4713%2012.0911%2028.4547%2012.0373%2028.4327%2011.9851C28.4107%2011.933%2028.3836%2011.8835%2028.3516%2011.8365C28.3197%2011.7896%2028.2834%2011.7461%2028.2427%2011.7062C28.202%2011.6663%2028.1579%2011.6307%2028.1101%2011.5993C28.0622%2011.568%2028.0117%2011.5415%2027.9585%2011.5199C27.9054%2011.4983%2027.8506%2011.4819%2027.7942%2011.4709C27.7378%2011.4599%2027.6806%2011.4544%2027.6231%2011.4544L24.1832%2011.5199L24.1832%2010L29.0796%2010C29.1472%2010%2029.2143%2010.0065%2029.2806%2010.0194C29.347%2010.0324%2029.4114%2010.0516%2029.4739%2010.077C29.5364%2010.1024%2029.5961%2010.1336%2029.6523%2010.1705C29.7086%2010.2074%2029.7605%2010.2493%2029.8084%2010.2963C29.8562%2010.3433%2029.8991%2010.3944%2029.9367%2010.4496C29.9743%2010.5048%2030.006%2010.5631%2030.0319%2010.6244C30.0578%2010.6858%2030.0773%2010.7491%2030.0905%2010.8142C30.1037%2010.8794%2030.1104%2010.9451%2030.1104%2011.0115L30.1832%2014.4522L28.4992%2014.5L28.4994%2012.3142ZM11.6995%2012.3143C11.6995%2012.2579%2011.7051%2012.2019%2011.7163%2012.1466C11.7275%2012.0912%2011.7441%2012.0374%2011.7661%2011.9852C11.7882%2011.9331%2011.8152%2011.8836%2011.8472%2011.8366C11.8791%2011.7897%2011.9155%2011.7462%2011.9562%2011.7063C11.9968%2011.6664%2012.0409%2011.6308%2012.0888%2011.5994C12.1366%2011.5681%2012.1871%2011.5416%2012.2403%2011.52C12.2934%2011.4984%2012.3482%2011.482%2012.4046%2011.471C12.4611%2011.46%2012.5182%2011.4545%2012.5758%2011.4545L16.0157%2011.52L16.0157%2010.0001L11.1193%2010.0001C11.0516%2010.0001%2010.9846%2010.0066%2010.9182%2010.0196C10.8518%2010.0325%2010.7874%2010.0517%2010.7249%2010.0771C10.6624%2010.1025%2010.6028%2010.1337%2010.5465%2010.1706C10.4902%2010.2075%2010.4383%2010.2494%2010.3904%2010.2964C10.3426%2010.3434%2010.2997%2010.3945%2010.2621%2010.4497C10.2245%2010.5049%2010.1929%2010.5632%2010.167%2010.6245C10.1411%2010.6859%2010.1215%2010.7492%2010.1083%2010.8143C10.0951%2010.8795%2010.0885%2010.9452%2010.0884%2011.0116L10.0157%2014.4523L11.6997%2014.5L11.6995%2012.3143ZM25.3135%2021.8051L25.3135%2022.8167C25.7656%2022.8929%2026.2209%2022.9249%2026.6792%2022.9127C28.3381%2022.9127%2029.1675%2022.326%2029.1675%2021.1527C29.1733%2020.9869%2029.151%2020.825%2029.1006%2020.667C29.0503%2020.509%2028.9747%2020.3641%2028.8742%2020.2322C28.767%2020.1025%2028.6403%2019.9963%2028.4938%2019.9134C28.3474%2019.8306%2028.191%2019.7767%2028.0246%2019.7517L28.0246%2019.7011C28.0971%2019.6839%2028.1676%2019.6606%2028.236%2019.6311C28.3044%2019.6016%2028.3698%2019.5665%2028.4321%2019.5257C28.4944%2019.4848%2028.5526%2019.4389%2028.6069%2019.3879C28.6613%2019.3369%2028.7109%2019.2816%2028.7556%2019.222C28.8003%2019.1624%2028.8394%2019.0994%2028.8732%2019.033C28.9069%2018.9665%2028.9346%2018.8977%2028.9564%2018.8265C28.9782%2018.7552%2028.9937%2018.6826%2029.0028%2018.6086C29.0119%2018.5347%2029.0145%2018.4605%2029.0107%2018.3861C29.0217%2018.2675%2029.0176%2018.1495%2028.9984%2018.0319C28.9791%2017.9144%2028.9454%2017.8012%2028.8971%2017.6923C28.8489%2017.5834%2028.7875%2017.4823%2028.7134%2017.3891C28.6393%2017.2959%2028.5547%2017.2135%2028.4595%2017.1419C28.219%2017.0003%2027.963%2016.8972%2027.6915%2016.8326C27.4199%2016.7679%2027.1449%2016.7446%2026.8664%2016.7626C26.6258%2016.7621%2026.3864%2016.7791%2026.1482%2016.8132C25.9479%2016.8386%2025.7504%2016.8791%2025.5563%2016.9346L25.5563%2017.8854C25.743%2017.8264%2025.9337%2017.7842%2026.128%2017.759C26.3276%2017.73%2026.5282%2017.7148%2026.7298%2017.7134C27.0252%2017.6949%2027.3049%2017.7523%2027.5692%2017.8854C27.6168%2017.9161%2027.6595%2017.9525%2027.6972%2017.9947C27.7348%2018.037%2027.766%2018.0835%2027.791%2018.1343C27.816%2018.1851%2027.8337%2018.2383%2027.8441%2018.294C27.8545%2018.3496%2027.8573%2018.4056%2027.8525%2018.462C27.8566%2018.5278%2027.8514%2018.5927%2027.8367%2018.657C27.822%2018.7212%2027.7986%2018.7821%2027.7663%2018.8395C27.734%2018.897%2027.694%2018.9487%2027.6468%2018.9946C27.5995%2019.0405%2027.5468%2019.0787%2027.4885%2019.1093C27.1544%2019.2631%2026.8037%2019.3306%2026.4364%2019.3117L25.9862%2019.3117L25.9862%2020.1917L26.4466%2020.1917C26.8409%2020.1669%2027.2202%2020.2309%2027.5845%2020.3839C27.6459%2020.4167%2027.7011%2020.4576%2027.7505%2020.5066C27.7999%2020.5556%2027.8412%2020.6107%2027.8745%2020.6718C27.9077%2020.733%2027.9315%2020.7976%2027.9458%2020.8656C27.9602%2020.9337%2027.9644%2021.0024%2027.9587%2021.0717C27.9648%2021.1402%2027.9612%2021.2083%2027.9478%2021.2757C27.9344%2021.3432%2027.912%2021.4074%2027.8801%2021.4683C27.8483%2021.5293%2027.8086%2021.5846%2027.7609%2021.6341C27.7132%2021.6837%2027.6593%2021.7254%2027.5996%2021.7596C27.2884%2021.9045%2026.9613%2021.9685%2026.6184%2021.9518C26.1786%2021.9465%2025.7436%2021.8977%2025.3135%2021.8051ZM21.3382%2018.6238C21.3445%2018.5593%2021.343%2018.495%2021.3335%2018.4308C21.3241%2018.3667%2021.3069%2018.3046%2021.2822%2018.2447C21.2575%2018.1847%2021.226%2018.1287%2021.1876%2018.0765C21.1492%2018.0242%2021.1049%2017.9774%2021.055%2017.936C20.9359%2017.8608%2020.808%2017.806%2020.6714%2017.7714C20.5349%2017.7368%2020.3964%2017.7242%2020.2558%2017.7337C19.8009%2017.7395%2019.356%2017.8087%2018.9208%2017.9411L18.9208%2016.9598C19.4252%2016.8181%2019.9393%2016.7524%2020.4633%2016.7626C20.7322%2016.7484%2020.9964%2016.7773%2021.256%2016.8491C21.5156%2016.9209%2021.7571%2017.032%2021.9806%2017.1824C22.0729%2017.2601%2022.1548%2017.3474%2022.2263%2017.4446C22.2978%2017.5418%2022.3567%2017.646%2022.4034%2017.7573C22.45%2017.8686%2022.483%2017.9838%2022.5021%2018.1029C22.5213%2018.222%2022.5261%2018.3417%2022.5167%2018.462C22.5245%2018.7882%2022.4655%2019.1017%2022.3396%2019.4027C22.1879%2019.7384%2021.984%2020.0384%2021.7277%2020.3029C21.3021%2020.7337%2020.8502%2021.135%2020.3721%2021.5067L19.9928%2021.8051L19.9928%2021.8759L22.6938%2021.8759L22.6938%2022.8419L18.5464%2022.8419L18.5464%2021.7697C19.2882%2021.1796%2019.8579%2020.6975%2020.2558%2020.3232C20.574%2020.0432%2020.8523%2019.728%2021.0905%2019.3774C21.1675%2019.2665%2021.2269%2019.1469%2021.2691%2019.0187C21.3113%2018.8904%2021.3344%2018.7588%2021.3382%2018.6238ZM12.3102%2017.2127L12.3102%2018.1939L13.7769%2017.9107L13.7769%2022.8419L14.9605%2022.8419L14.9605%2016.8486L14.0957%2016.8486L12.3102%2017.2127ZM28.5524%2028.0475C28.5524%2028.104%2028.5467%2028.1599%2028.5353%2028.2152C28.5239%2028.2706%2028.5071%2028.3244%2028.4849%2028.3766C28.4626%2028.4287%2028.4352%2028.4782%2028.4028%2028.5252C28.3705%2028.5721%2028.3337%2028.6156%2028.2925%2028.6555C28.2513%2028.6954%2028.2067%2028.731%2028.1583%2028.7624C28.1098%2028.7937%2028.0587%2028.8202%2028.0049%2028.8418C27.9511%2028.8634%2027.8957%2028.8798%2027.8385%2028.8908C27.7814%2028.9018%2027.7235%2028.9073%2027.6653%2028.9073L24.1832%2028.8418L24.1832%2030.3617L29.1397%2030.3617C29.2082%2030.3617%2029.276%2030.3552%2029.3432%2030.3423C29.4104%2030.3293%2029.4756%2030.3101%2029.5389%2030.2847C29.6022%2030.2593%2029.6625%2030.2281%2029.7195%2030.1912C29.7765%2030.1543%2029.829%2030.1124%2029.8774%2030.0654C29.9259%2030.0184%2029.9693%2029.9673%2030.0074%2029.9121C30.0454%2029.8569%2030.0774%2029.7986%2030.1037%2029.7373C30.1299%2029.6759%2030.1497%2029.6126%2030.163%2029.5475C30.1764%2029.4823%2030.1831%2029.4166%2030.1832%2029.3502L30.1832%2026.0478L28.4785%2026L28.5524%2028.0475ZM11.6308%2028.0099C11.6308%2028.0664%2011.6365%2028.1223%2011.6479%2028.1777C11.6592%2028.233%2011.676%2028.2868%2011.6983%2028.339C11.7206%2028.3911%2011.748%2028.4406%2011.7803%2028.4876C11.8127%2028.5345%2011.8495%2028.578%2011.8906%2028.6179C11.9318%2028.6578%2011.9765%2028.6934%2012.0249%2028.7248C12.0733%2028.7562%2012.1244%2028.7826%2012.1783%2028.8042C12.2321%2028.8259%2012.2875%2028.8422%2012.3446%2028.8532C12.4017%2028.8642%2012.4596%2028.8697%2012.5178%2028.8698L16%2028.8042L16%2030.3241L11.0435%2030.3241C10.975%2030.3241%2010.9071%2030.3176%2010.8399%2030.3047C10.7727%2030.2917%2010.7076%2030.2725%2010.6443%2030.2471C10.581%2030.2217%2010.5206%2030.1906%2010.4637%2030.1537C10.4067%2030.1168%2010.3542%2030.0748%2010.3057%2030.0278C10.2573%2029.9809%2010.2138%2029.9298%2010.1758%2029.8745C10.1377%2029.8193%2010.1057%2029.7611%2010.0795%2029.6997C10.0533%2029.6383%2010.0335%2029.575%2010.0201%2029.5099C10.0068%2029.4448%2010%2029.379%2010%2029.3126L10%2026.0478L11.7047%2026L11.6308%2028.0099Z'%20fill='rgb(14,191,241)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", h2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_9)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_9'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_10'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_11'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='3'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='画板%202310'%20customFrame='url(%23clipPath_10)'%3e%3crect%20id='画板%202310'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='人事服务'%3e%3cg%20id='ic_public_link'%20clip-path='url(%23clipPath_11)'%20customFrame='url(%23clipPath_11)'%3e%3crect%20id='ic_public_link'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='path1'%20d='M9.9999%2019.9917C9.9999%2018.4292%209.99573%2016.8667%209.9999%2015.3042C9.99573%2014.5459%2010.0916%2013.7917%2010.2749%2013.0626C10.6874%2011.5126%2011.6957%2010.5917%2013.2457%2010.2334C14.0207%2010.0667%2014.8166%209.98756%2015.6082%2010.0001C18.6041%2010.0001%2021.5999%2010.0001%2024.5999%2010.0001C25.3541%209.99589%2026.1082%2010.0792%2026.8457%2010.2584C28.4416%2010.6459%2029.3999%2011.6584%2029.7624%2013.2501C29.9291%2014.0001%2030.0041%2014.7667%2029.9957%2015.5376C29.9957%2018.5667%2029.9957%2021.5959%2029.9957%2024.6209C29.9999%2025.3709%2029.9166%2026.1209%2029.7416%2026.8459C29.3499%2028.4459%2028.3332%2029.3959%2026.7457%2029.7626C25.9666%2029.9292%2025.1749%2030.0084%2024.3791%2029.9959C21.3957%2029.9959%2018.4124%2029.9959%2015.4291%2029.9959C14.6666%2030.0042%2013.9082%2029.9167%2013.1666%2029.7417C11.5624%2029.3542%2010.5999%2028.3376%2010.2374%2026.7376C10.0499%2025.9251%209.9999%2025.1126%209.9999%2024.2917C9.9999%2022.8584%209.9999%2021.4251%209.9999%2019.9917Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path3'%20d='M25.0333%2021.8666L26.9%2020C28.8083%2018.0916%2028.8083%2015%2026.9%2013.0958C24.9958%2011.1875%2021.9041%2011.1875%2020%2013.0958L18.1291%2014.9625M21.8666%2025.0333L20%2026.9C18.0916%2028.8083%2015%2028.8083%2013.0958%2026.9C11.1875%2024.9958%2011.1875%2021.9041%2013.0958%2020L14.9625%2018.1291'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='pah4'%20d='M18.125%2021.875L21.875%2018.125'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='path5'%20d='M25.8207%2019.2626L24.0457%2021.0376C23.7998%2021.2834%2023.6748%2021.5292%2023.6748%2021.7751C23.6748%2022.0209%2023.7998%2022.2667%2024.0457%2022.5126C24.1498%2022.6167%2024.2665%2022.6959%2024.3915%2022.7459C24.5123%2022.7917%2024.6415%2022.8167%2024.779%2022.8167C24.9207%2022.8167%2025.0498%2022.7917%2025.1665%2022.7459C25.2957%2022.6959%2025.4123%2022.6167%2025.5165%2022.5126L27.2915%2020.7334C27.8165%2020.2126%2028.2165%2019.6334%2028.4957%2019.0001C28.5082%2018.9667%2028.5248%2018.9334%2028.5373%2018.8959C28.554%2018.8626%2028.5665%2018.8292%2028.579%2018.7917C28.8332%2018.1501%2028.9582%2017.4584%2028.9582%2016.7209C28.9582%2015.9792%2028.8332%2015.2876%2028.579%2014.6459C28.5665%2014.6084%2028.554%2014.5751%2028.5373%2014.5417C28.5248%2014.5042%2028.5082%2014.4709%2028.4957%2014.4376C28.2165%2013.8042%2027.8165%2013.2292%2027.2915%2012.7042C26.7707%2012.1792%2026.1915%2011.7792%2025.5582%2011.5001C25.5248%2011.4876%2025.4915%2011.4709%2025.454%2011.4584C25.4207%2011.4417%2025.3873%2011.4292%2025.354%2011.4167C24.7082%2011.1667%2024.0165%2011.0417%2023.279%2011.0417C22.5373%2011.0417%2021.8457%2011.1667%2021.204%2011.4167C21.1665%2011.4292%2021.1332%2011.4417%2021.0998%2011.4584C21.0623%2011.4709%2021.029%2011.4876%2020.9957%2011.5001C20.3623%2011.7792%2019.7832%2012.1792%2019.2623%2012.7042L17.4832%2014.4792C17.379%2014.5834%2017.2998%2014.7001%2017.2498%2014.8292C17.204%2014.9501%2017.179%2015.0751%2017.179%2015.2167C17.179%2015.3542%2017.204%2015.4834%2017.2498%2015.6042C17.2998%2015.7292%2017.379%2015.8459%2017.4832%2015.9542C17.5915%2016.0584%2017.7082%2016.1376%2017.8332%2016.1876C17.954%2016.2334%2018.0832%2016.2584%2018.2207%2016.2584C18.3623%2016.2584%2018.4915%2016.2334%2018.6082%2016.1876C18.7373%2016.1376%2018.854%2016.0584%2018.9582%2015.9542L20.7332%2014.1751C21.0873%2013.8209%2021.4748%2013.5584%2021.8957%2013.3834C22.3165%2013.2084%2022.779%2013.1251%2023.279%2013.1251C23.7748%2013.1251%2024.2373%2013.2084%2024.6582%2013.3834C25.079%2013.5584%2025.4665%2013.8209%2025.8207%2014.1751C26.1748%2014.5292%2026.4373%2014.9167%2026.6123%2015.3376C26.7873%2015.7584%2026.8748%2016.2167%2026.8748%2016.7209C26.8748%2017.2209%2026.7873%2017.6792%2026.6123%2018.1001C26.4373%2018.5209%2026.1748%2018.9084%2025.8207%2019.2626ZM13.3832%2021.8959C13.5582%2021.4751%2013.8207%2021.0876%2014.1748%2020.7334L15.954%2018.9584C16.0582%2018.8542%2016.1373%2018.7376%2016.1873%2018.6084C16.2332%2018.4876%2016.2582%2018.3626%2016.2582%2018.2209C16.2582%2018.0834%2016.2332%2017.9542%2016.1873%2017.8334C16.1373%2017.7084%2016.0582%2017.5917%2015.954%2017.4834C15.7082%2017.2417%2015.4623%2017.1167%2015.2165%2017.1167C14.9707%2017.1167%2014.7248%2017.2417%2014.479%2017.4834L12.704%2019.2626C12.179%2019.7876%2011.779%2020.3626%2011.4998%2020.9959C11.4873%2021.0292%2011.4707%2021.0626%2011.4582%2021.1001C11.4415%2021.1334%2011.429%2021.1667%2011.4165%2021.2042C11.1665%2021.8459%2011.0415%2022.5376%2011.0415%2023.2792C11.0415%2024.0167%2011.1665%2024.7084%2011.4165%2025.3542C11.429%2025.3876%2011.4415%2025.4209%2011.4582%2025.4584C11.4707%2025.4917%2011.4873%2025.5251%2011.4998%2025.5584C11.779%2026.1917%2012.179%2026.7709%2012.704%2027.2917C13.2248%2027.8167%2013.804%2028.2167%2014.4373%2028.4959C14.4707%2028.5084%2014.504%2028.5251%2014.5415%2028.5376C14.5748%2028.5542%2014.6082%2028.5667%2014.6457%2028.5792C15.2873%2028.8292%2015.979%2028.9584%2016.7207%2028.9584C17.4582%2028.9584%2018.1498%2028.8292%2018.7915%2028.5792C18.829%2028.5667%2018.8623%2028.5542%2018.8957%2028.5376C18.9332%2028.5251%2018.9665%2028.5084%2018.9998%2028.4959C19.6332%2028.2167%2020.2123%2027.8167%2020.7332%2027.2917L22.5123%2025.5167C22.6165%2025.4126%2022.6957%2025.2959%2022.7457%2025.1667C22.7915%2025.0459%2022.8165%2024.9209%2022.8165%2024.7792C22.8165%2024.6417%2022.7915%2024.5126%2022.7457%2024.3917C22.6957%2024.2667%2022.6165%2024.1501%2022.5123%2024.0417C22.2665%2023.8001%2022.0207%2023.6751%2021.7748%2023.6751C21.529%2023.6751%2021.2832%2023.8001%2021.0373%2024.0417L19.2623%2025.8209C18.9082%2026.1751%2018.5207%2026.4376%2018.0998%2026.6126C17.679%2026.7876%2017.2165%2026.8751%2016.7207%2026.8751C16.2207%2026.8751%2015.7582%2026.7876%2015.3373%2026.6126C14.9165%2026.4376%2014.529%2026.1751%2014.1748%2025.8209C13.8207%2025.4667%2013.5582%2025.0792%2013.3832%2024.6584C13.2082%2024.2376%2013.1248%2023.7792%2013.1248%2023.2792C13.1248%2022.7751%2013.2082%2022.3167%2013.3832%2021.8959Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path6'%20d='M21.8127%2016.7458C21.746%2016.7874%2021.6877%2016.8374%2021.6293%2016.8916L16.8918%2021.6291C16.8377%2021.6874%2016.7877%2021.7499%2016.746%2021.8124C16.7127%2021.8624%2016.6877%2021.9166%2016.6627%2021.9749C16.6377%2022.0374%2016.6168%2022.1041%2016.6043%2022.1708C16.5918%2022.2333%2016.5835%2022.2999%2016.5835%2022.3666C16.5835%2022.4333%2016.5918%2022.4999%2016.6043%2022.5666C16.6168%2022.6333%2016.6377%2022.6999%2016.6627%2022.7624C16.6877%2022.8166%2016.7127%2022.8708%2016.746%2022.9208C16.7877%2022.9874%2016.8377%2023.0499%2016.8918%2023.1041C16.946%2023.1583%2017.0085%2023.2083%2017.0752%2023.2499C17.1252%2023.2833%2017.1793%2023.3083%2017.2335%2023.3333C17.3002%2023.3583%2017.3627%2023.3791%2017.4293%2023.3916C17.496%2023.4041%2017.5627%2023.4124%2017.6293%2023.4124C17.696%2023.4124%2017.7627%2023.4041%2017.8252%2023.3916C17.8918%2023.3791%2017.9585%2023.3583%2018.021%2023.3333C18.0793%2023.3083%2018.1335%2023.2833%2018.1835%2023.2499C18.246%2023.2083%2018.3085%2023.1583%2018.3668%2023.1041L23.1043%2018.3666C23.1585%2018.3083%2023.2085%2018.2499%2023.2502%2018.1833C23.2835%2018.1333%2023.3085%2018.0791%2023.3335%2018.0208C23.3585%2017.9583%2023.3793%2017.8916%2023.3918%2017.8249C23.4043%2017.7624%2023.4127%2017.6958%2023.4127%2017.6291C23.4127%2017.5624%2023.4043%2017.4958%2023.3918%2017.4291C23.3793%2017.3624%2023.3585%2017.2999%2023.3335%2017.2333C23.3085%2017.1791%2023.2835%2017.1249%2023.2502%2017.0749C23.2085%2017.0083%2023.1585%2016.9458%2023.1043%2016.8916C23.046%2016.8374%2022.9877%2016.7874%2022.921%2016.7458C22.871%2016.7124%2022.8168%2016.6874%2022.7627%2016.6624C22.696%2016.6374%2022.6335%2016.6166%2022.5668%2016.6041C22.5002%2016.5916%2022.4335%2016.5833%2022.3668%2016.5833C22.3002%2016.5833%2022.2335%2016.5916%2022.171%2016.6041C22.1043%2016.6166%2022.0377%2016.6374%2021.9752%2016.6624C21.9168%2016.6874%2021.8627%2016.7124%2021.8127%2016.7458Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", p2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_0)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_0'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_1'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_2'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='1'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='车辆'%20clip-path='url(%23clipPath_1)'%20customFrame='url(%23clipPath_1)'%3e%3crect%20id='车辆'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='编组'%3e%3cg%20id='ic_public_qrcode'%20clip-path='url(%23clipPath_2)'%20customFrame='url(%23clipPath_2)'%3e%3crect%20id='ic_public_qrcode'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cg%20id='ic_public_qrcode_1_1'%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_1'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20opacity='0.200000003'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3ccircle%20id='ic_public_qrcode_2_2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='ic_public_qrcode_2_3'%20d='M17.5%2011.25C17.9602%2011.25%2018.3333%2011.6231%2018.3333%2012.0833L18.3333%2017.5C18.3333%2017.9602%2017.9602%2018.3333%2017.5%2018.3333L12.0833%2018.3333C11.6231%2018.3333%2011.25%2017.9602%2011.25%2017.5L11.25%2012.0833C11.25%2011.6231%2011.6231%2011.25%2012.0833%2011.25L17.5%2011.25ZM17.5%2021.6667C17.9602%2021.6667%2018.3333%2022.0398%2018.3333%2022.5L18.3333%2027.9167C18.3333%2028.3769%2017.9602%2028.75%2017.5%2028.75L12.0833%2028.75C11.6231%2028.75%2011.25%2028.3769%2011.25%2027.9167L11.25%2022.5C11.25%2022.0398%2011.6231%2021.6667%2012.0833%2021.6667L17.5%2021.6667ZM27.9167%2011.25C28.3769%2011.25%2028.75%2011.6231%2028.75%2012.0833L28.75%2017.5C28.75%2017.9602%2028.3769%2018.3333%2027.9167%2018.3333L22.5%2018.3333C22.0398%2018.3333%2021.6667%2017.9602%2021.6667%2017.5L21.6667%2012.0833C21.6667%2011.6231%2022.0398%2011.25%2022.5%2011.25L27.9167%2011.25Z'%20fill-rule='evenodd'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333ZM17.5002%2011.6666L12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666ZM17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499ZM17.5002%2022.0833L12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833ZM27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333ZM27.9168%2011.6666L22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M18.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833ZM12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666L12.0835%2011.6666ZM18.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999ZM12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833L12.0835%2022.0833ZM29.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833ZM22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666L22.5002%2011.6666Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2021.6667L27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667ZM24.5832%2021.6667L24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667ZM21.6665%2025.8334L21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334ZM27.9165%2027.9167L27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167ZM25.8332%2025.8334L25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667L27.9165%2024.5834ZM24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667L24.5832%2022.639ZM21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334L21.6665%2028.7501ZM27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167L27.9165%2028.7501ZM25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334L25.8332%2026.6667Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2014.375L14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375ZM14.375%2024.7917L14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917ZM24.7917%2014.375L24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375L14.375%2015.2083ZM14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917L14.375%2025.625ZM24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375L24.7917%2015.2083Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", m2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2012%2012'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.000000'%20height='12.000000'%20fill='none'%3e%3cdefs%3e%3cfilter%20id='pixso_custom_mask_type_luminance'%3e%3cfeColorMatrix%20type='matrix'%20values='1%200%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%201%200%20'%20/%3e%3c/filter%3e%3c/defs%3e%3cmask%20id='mask_0'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20maskUnits='userSpaceOnUse'%3e%3cg%20filter='url(%23pixso_custom_mask_type_luminance)'%3e%3cg%20id='mask401_19830'%3e%3cpath%20id='蒙版'%20d='M0%200L11.9999%200L11.9999%2011.9999L0%2011.9999L0%200ZM2.69992%201.34999L8.09977%201.34999C9.5082%201.34999%2010.6498%202.49167%2010.6498%203.89998L10.6498%209.2999C10.6498%2010.7082%209.5082%2011.8499%208.09977%2011.8499L2.69992%2011.8499C1.29149%2011.8499%200.149901%2010.7082%200.149901%209.2999L0.149901%203.89998C0.149901%202.49167%201.29149%201.34999%202.69992%201.34999Z'%20fill='rgb(196,196,196)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/mask%3e%3crect%20id='ic_public_copy'%20width='12.000000'%20height='12.000000'%20x='0.000000'%20y='0.000000'%20/%3e%3crect%20id='ic_public_copy-复制/base/ic_public_copy'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path1'%20d='M0.000134537%205.99497C0.000134537%205.05748%20-0.00236544%204.11999%200.000134537%203.1825C-0.00236544%202.72751%200.055134%202.27501%200.165133%201.83752C0.41263%200.907526%201.01762%200.355032%201.94761%200.140034C2.41261%200.040035%202.8901%20-0.00746449%203.3651%203.54269e-05C5.16258%203.54269e-05%206.96006%203.54269e-05%208.76004%203.54269e-05C9.21254%20-0.00246455%209.66503%200.0475349%2010.1075%200.155034C11.065%200.387531%2011.64%200.995025%2011.8575%201.95002C11.9575%202.40001%2012.005%202.86001%2011.9975%203.3225C11.9975%205.13998%2011.9975%206.95746%2011.9975%208.77244C12%209.22244%2011.95%209.67243%2011.845%2010.1099C11.61%2011.0674%2011%2011.6374%2010.0475%2011.8574C9.58003%2011.9574%209.10504%2012.0049%208.62754%2011.9974C6.83756%2011.9974%205.04758%2011.9974%203.2576%2011.9974C2.80011%2012.0024%202.34511%2011.9499%201.90011%2011.8449C0.937625%2011.6124%200.360131%2011.0024%200.142633%2010.0424C0.0301342%209.55494%200.000134537%209.06744%200.000134537%208.57495C0.000134537%207.71495%200.000134537%206.85496%200.000134537%205.99497Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='5.99993801'%20cy='5.99993801'%20r='5.99993801'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='mask'%20mask='url(%23mask_0)'%3e%3cg%20id='组合%208'%3e%3cpath%20id='path'%20d='M11.1%203.89993L11.1%206.8999C11.1%208.55488%209.75502%209.89737%208.10004%209.89737L5.10007%209.89737C3.44258%209.89737%202.1001%208.55488%202.1001%206.8999L2.1001%203.89993C2.1001%202.24245%203.44258%200.897461%205.10007%200.897461L8.10004%200.897461C9.75502%200.897461%2011.1%202.24245%2011.1%203.89993Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/g%3e%3c/g%3e%3cpath%20id='path4'%20d='M2.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path4'%20d='M9.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/svg%3e", g2 = "https://chat.opentiny.design", f2 = "https://ai.opentiny.design/next-remoter", y2 = "https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg", qe = (r) => [
|
|
905
905
|
{
|
|
906
906
|
action: "qr-code",
|
|
907
907
|
show: !0,
|
|
908
908
|
text: "扫码登录",
|
|
909
909
|
desc: "使用手机遥控页面",
|
|
910
|
-
icon:
|
|
910
|
+
icon: p2
|
|
911
911
|
},
|
|
912
912
|
{
|
|
913
913
|
action: "ai-chat",
|
|
914
914
|
show: !0,
|
|
915
915
|
text: "打开对话框",
|
|
916
916
|
desc: "支持在网页端操作AI",
|
|
917
|
-
icon:
|
|
917
|
+
icon: u2
|
|
918
918
|
},
|
|
919
919
|
{
|
|
920
920
|
action: "remote-url",
|
|
@@ -924,7 +924,7 @@ const n2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='
|
|
|
924
924
|
active: !0,
|
|
925
925
|
tip: r.remoteUrl,
|
|
926
926
|
showCopyIcon: !0,
|
|
927
|
-
icon:
|
|
927
|
+
icon: h2
|
|
928
928
|
},
|
|
929
929
|
{
|
|
930
930
|
action: "remote-control",
|
|
@@ -933,10 +933,10 @@ const n2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='
|
|
|
933
933
|
desc: `${r.sessionId.slice(-6)}`,
|
|
934
934
|
know: !0,
|
|
935
935
|
showCopyIcon: !0,
|
|
936
|
-
icon:
|
|
936
|
+
icon: d2
|
|
937
937
|
}
|
|
938
938
|
];
|
|
939
|
-
class
|
|
939
|
+
class w2 {
|
|
940
940
|
constructor(e) {
|
|
941
941
|
if (this.isExpanded = !1, this.closingTimer = 0, this.getImageUrl = (t) => {
|
|
942
942
|
if (!t) return;
|
|
@@ -952,7 +952,7 @@ class h2 {
|
|
|
952
952
|
});
|
|
953
953
|
}, this.readyTips = (t) => {
|
|
954
954
|
const s = document.getElementById(t);
|
|
955
|
-
s && new
|
|
955
|
+
s && new l2(s, {
|
|
956
956
|
content: "复制",
|
|
957
957
|
placement: "top",
|
|
958
958
|
trigger: "hover"
|
|
@@ -961,9 +961,9 @@ class h2 {
|
|
|
961
961
|
throw new Error("sessionId is required");
|
|
962
962
|
this.options = {
|
|
963
963
|
...e,
|
|
964
|
-
qrCodeUrl: e.qrCodeUrl ||
|
|
965
|
-
remoteUrl: e.remoteUrl ||
|
|
966
|
-
logoUrl: e.logoUrl ||
|
|
964
|
+
qrCodeUrl: e.qrCodeUrl || f2,
|
|
965
|
+
remoteUrl: e.remoteUrl || g2,
|
|
966
|
+
logoUrl: e.logoUrl || y2
|
|
967
967
|
}, e.menuItems && e.menuItems.length === 0 ? this.menuItems = [] : this.menuItems = this.mergeMenuItems(e.menuItems), this.init();
|
|
968
968
|
}
|
|
969
969
|
// 计算 sessionPrefix 属性
|
|
@@ -976,7 +976,7 @@ class h2 {
|
|
|
976
976
|
* @returns 合并后的菜单项配置
|
|
977
977
|
*/
|
|
978
978
|
mergeMenuItems(e) {
|
|
979
|
-
return e ?
|
|
979
|
+
return e ? qe(this.options).map((t) => {
|
|
980
980
|
const s = e.find((n) => n.action === t.action);
|
|
981
981
|
return s ? {
|
|
982
982
|
...t,
|
|
@@ -984,7 +984,7 @@ class h2 {
|
|
|
984
984
|
// 确保show属性存在,默认为true
|
|
985
985
|
show: s.show !== void 0 ? s.show : t.show
|
|
986
986
|
} : t;
|
|
987
|
-
}) :
|
|
987
|
+
}) : qe(this.options);
|
|
988
988
|
}
|
|
989
989
|
init() {
|
|
990
990
|
this.createFloatingBlock(), this.createDropdownMenu(), this.bindEvents(), this.addStyles();
|
|
@@ -1012,7 +1012,7 @@ class h2 {
|
|
|
1012
1012
|
<div>
|
|
1013
1013
|
${t.showCopyIcon ? `
|
|
1014
1014
|
<div class="tiny-remoter-copy-icon" id="${t.action}" data-action="${t.action}">
|
|
1015
|
-
<img src="${
|
|
1015
|
+
<img src="${m2}"/>
|
|
1016
1016
|
</div>
|
|
1017
1017
|
` : ""}
|
|
1018
1018
|
</div>
|
|
@@ -1112,7 +1112,7 @@ class h2 {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
// 创建二维码弹窗
|
|
1114
1114
|
async showQRCode() {
|
|
1115
|
-
const t = await new
|
|
1115
|
+
const t = await new a2((this.options.qrCodeUrl || "") + this.sessionPrefix + this.options.sessionId, {}).toDataURL(), s = this.createModal(
|
|
1116
1116
|
"扫码前往智能遥控器",
|
|
1117
1117
|
`
|
|
1118
1118
|
<div style="text-align: center; padding: 32px;">
|
|
@@ -1572,24 +1572,24 @@ class h2 {
|
|
|
1572
1572
|
this.floatingBlock.parentNode && this.floatingBlock.parentNode.removeChild(this.floatingBlock), this.dropdownMenu.parentNode && this.dropdownMenu.parentNode.removeChild(this.dropdownMenu);
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
const
|
|
1576
|
-
class
|
|
1575
|
+
const ms = (r = {}) => new w2(r);
|
|
1576
|
+
class ze extends Error {
|
|
1577
1577
|
constructor(e, t) {
|
|
1578
1578
|
super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function de(r) {
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function C2(r) {
|
|
1584
1584
|
if (typeof r == "function")
|
|
1585
1585
|
throw new TypeError(
|
|
1586
1586
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
1587
1587
|
);
|
|
1588
|
-
const { onEvent: e =
|
|
1589
|
-
let i = "", a = !0,
|
|
1588
|
+
const { onEvent: e = de, onError: t = de, onRetry: s = de, onComment: n } = r;
|
|
1589
|
+
let i = "", a = !0, c, u = "", l = "";
|
|
1590
1590
|
function d(p) {
|
|
1591
|
-
const
|
|
1592
|
-
for (const x of
|
|
1591
|
+
const C = a ? p.replace(/^\xEF\xBB\xBF/, "") : p, [w, b] = v2(`${i}${C}`);
|
|
1592
|
+
for (const x of w)
|
|
1593
1593
|
g(x);
|
|
1594
1594
|
i = b, a = !1;
|
|
1595
1595
|
}
|
|
@@ -1602,40 +1602,40 @@ function p2(r) {
|
|
|
1602
1602
|
n && n(p.slice(p.startsWith(": ") ? 2 : 1));
|
|
1603
1603
|
return;
|
|
1604
1604
|
}
|
|
1605
|
-
const
|
|
1606
|
-
if (
|
|
1607
|
-
const
|
|
1608
|
-
h(
|
|
1605
|
+
const C = p.indexOf(":");
|
|
1606
|
+
if (C !== -1) {
|
|
1607
|
+
const w = p.slice(0, C), b = p[C + 1] === " " ? 2 : 1, x = p.slice(C + b);
|
|
1608
|
+
h(w, x, p);
|
|
1609
1609
|
return;
|
|
1610
1610
|
}
|
|
1611
1611
|
h(p, "", p);
|
|
1612
1612
|
}
|
|
1613
|
-
function h(p,
|
|
1613
|
+
function h(p, C, w) {
|
|
1614
1614
|
switch (p) {
|
|
1615
1615
|
case "event":
|
|
1616
|
-
|
|
1616
|
+
l = C;
|
|
1617
1617
|
break;
|
|
1618
1618
|
case "data":
|
|
1619
|
-
u = `${u}${
|
|
1619
|
+
u = `${u}${C}
|
|
1620
1620
|
`;
|
|
1621
1621
|
break;
|
|
1622
1622
|
case "id":
|
|
1623
|
-
|
|
1623
|
+
c = C.includes("\0") ? void 0 : C;
|
|
1624
1624
|
break;
|
|
1625
1625
|
case "retry":
|
|
1626
|
-
/^\d+$/.test(
|
|
1627
|
-
new
|
|
1626
|
+
/^\d+$/.test(C) ? s(parseInt(C, 10)) : t(
|
|
1627
|
+
new ze(`Invalid \`retry\` value: "${C}"`, {
|
|
1628
1628
|
type: "invalid-retry",
|
|
1629
|
-
value:
|
|
1630
|
-
line:
|
|
1629
|
+
value: C,
|
|
1630
|
+
line: w
|
|
1631
1631
|
})
|
|
1632
1632
|
);
|
|
1633
1633
|
break;
|
|
1634
1634
|
default:
|
|
1635
1635
|
t(
|
|
1636
|
-
new
|
|
1636
|
+
new ze(
|
|
1637
1637
|
`Unknown field "${p.length > 20 ? `${p.slice(0, 20)}…` : p}"`,
|
|
1638
|
-
{ type: "unknown-field", field: p, value:
|
|
1638
|
+
{ type: "unknown-field", field: p, value: C, line: w }
|
|
1639
1639
|
)
|
|
1640
1640
|
);
|
|
1641
1641
|
break;
|
|
@@ -1643,20 +1643,20 @@ function p2(r) {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
function m() {
|
|
1645
1645
|
u.length > 0 && e({
|
|
1646
|
-
id:
|
|
1647
|
-
event:
|
|
1646
|
+
id: c,
|
|
1647
|
+
event: l || void 0,
|
|
1648
1648
|
// If the data buffer's last character is a U+000A LINE FEED (LF) character,
|
|
1649
1649
|
// then remove the last character from the data buffer.
|
|
1650
1650
|
data: u.endsWith(`
|
|
1651
1651
|
`) ? u.slice(0, -1) : u
|
|
1652
|
-
}),
|
|
1652
|
+
}), c = void 0, u = "", l = "";
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1655
|
-
i && p.consume && g(i), a = !0,
|
|
1654
|
+
function y(p = {}) {
|
|
1655
|
+
i && p.consume && g(i), a = !0, c = void 0, u = "", l = "", i = "";
|
|
1656
1656
|
}
|
|
1657
|
-
return { feed: d, reset:
|
|
1657
|
+
return { feed: d, reset: y };
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function v2(r) {
|
|
1660
1660
|
const e = [];
|
|
1661
1661
|
let t = "", s = 0;
|
|
1662
1662
|
for (; s < r.length; ) {
|
|
@@ -1667,19 +1667,19 @@ function m2(r) {
|
|
|
1667
1667
|
t = r.slice(s);
|
|
1668
1668
|
break;
|
|
1669
1669
|
} else {
|
|
1670
|
-
const
|
|
1671
|
-
e.push(
|
|
1670
|
+
const c = r.slice(s, a);
|
|
1671
|
+
e.push(c), s = a + 1, r[s - 1] === "\r" && r[s] === `
|
|
1672
1672
|
` && s++;
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
1675
|
return [e, t];
|
|
1676
1676
|
}
|
|
1677
|
-
class
|
|
1677
|
+
class we extends TransformStream {
|
|
1678
1678
|
constructor({ onError: e, onRetry: t, onComment: s } = {}) {
|
|
1679
1679
|
let n;
|
|
1680
1680
|
super({
|
|
1681
1681
|
start(i) {
|
|
1682
|
-
n =
|
|
1682
|
+
n = C2({
|
|
1683
1683
|
onEvent: (a) => {
|
|
1684
1684
|
i.enqueue(a);
|
|
1685
1685
|
},
|
|
@@ -1696,7 +1696,7 @@ class ge extends TransformStream {
|
|
|
1696
1696
|
});
|
|
1697
1697
|
}
|
|
1698
1698
|
}
|
|
1699
|
-
var
|
|
1699
|
+
var _2 = ({
|
|
1700
1700
|
prefix: r,
|
|
1701
1701
|
size: e = 16,
|
|
1702
1702
|
alphabet: t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
@@ -1704,25 +1704,25 @@ var f2 = ({
|
|
|
1704
1704
|
} = {}) => {
|
|
1705
1705
|
const n = () => {
|
|
1706
1706
|
const i = t.length, a = new Array(e);
|
|
1707
|
-
for (let
|
|
1708
|
-
a[
|
|
1707
|
+
for (let c = 0; c < e; c++)
|
|
1708
|
+
a[c] = t[Math.random() * i | 0];
|
|
1709
1709
|
return a.join("");
|
|
1710
1710
|
};
|
|
1711
1711
|
if (r == null)
|
|
1712
1712
|
return n;
|
|
1713
1713
|
if (t.includes(s))
|
|
1714
|
-
throw new
|
|
1714
|
+
throw new t2({
|
|
1715
1715
|
argument: "separator",
|
|
1716
1716
|
message: `The separator "${s}" must not be part of the alphabet "${t}".`
|
|
1717
1717
|
});
|
|
1718
1718
|
return () => `${r}${s}${n()}`;
|
|
1719
1719
|
};
|
|
1720
|
-
|
|
1721
|
-
function
|
|
1720
|
+
_2();
|
|
1721
|
+
function st(r = globalThis) {
|
|
1722
1722
|
var e, t, s;
|
|
1723
1723
|
return r.window ? "runtime/browser" : (e = r.navigator) != null && e.userAgent ? `runtime/${r.navigator.userAgent.toLowerCase()}` : (s = (t = r.process) == null ? void 0 : t.versions) != null && s.node ? `runtime/node.js/${r.process.version.substring(0)}` : r.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function b2(r) {
|
|
1726
1726
|
if (r == null)
|
|
1727
1727
|
return {};
|
|
1728
1728
|
const e = {};
|
|
@@ -1737,19 +1737,19 @@ function g2(r) {
|
|
|
1737
1737
|
}
|
|
1738
1738
|
return e;
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1741
|
-
const t = new Headers(
|
|
1740
|
+
function nt(r, ...e) {
|
|
1741
|
+
const t = new Headers(b2(r)), s = t.get("user-agent") || "";
|
|
1742
1742
|
return t.set(
|
|
1743
1743
|
"user-agent",
|
|
1744
1744
|
[s, ...e].filter(Boolean).join(" ")
|
|
1745
1745
|
), Object.fromEntries(t.entries());
|
|
1746
1746
|
}
|
|
1747
|
-
var
|
|
1748
|
-
function
|
|
1747
|
+
var x2 = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, L2 = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
1748
|
+
function De(r) {
|
|
1749
1749
|
const e = JSON.parse(r);
|
|
1750
|
-
return e === null || typeof e != "object" ||
|
|
1750
|
+
return e === null || typeof e != "object" || x2.test(r) === !1 && L2.test(r) === !1 ? e : S2(e);
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function S2(r) {
|
|
1753
1753
|
let e = [r];
|
|
1754
1754
|
for (; e.length; ) {
|
|
1755
1755
|
const t = e;
|
|
@@ -1757,7 +1757,7 @@ function w2(r) {
|
|
|
1757
1757
|
for (const s of t) {
|
|
1758
1758
|
if (Object.prototype.hasOwnProperty.call(s, "__proto__"))
|
|
1759
1759
|
throw new SyntaxError("Object contains forbidden prototype property");
|
|
1760
|
-
if (Object.prototype.hasOwnProperty.call(s, "constructor") && Object.prototype.hasOwnProperty.call(s.constructor, "prototype"))
|
|
1760
|
+
if (Object.prototype.hasOwnProperty.call(s, "constructor") && s.constructor !== null && typeof s.constructor == "object" && Object.prototype.hasOwnProperty.call(s.constructor, "prototype"))
|
|
1761
1761
|
throw new SyntaxError("Object contains forbidden prototype property");
|
|
1762
1762
|
for (const n in s) {
|
|
1763
1763
|
const i = s[n];
|
|
@@ -1767,40 +1767,40 @@ function w2(r) {
|
|
|
1767
1767
|
}
|
|
1768
1768
|
return r;
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function P2(r) {
|
|
1771
1771
|
const { stackTraceLimit: e } = Error;
|
|
1772
1772
|
try {
|
|
1773
1773
|
Error.stackTraceLimit = 0;
|
|
1774
1774
|
} catch {
|
|
1775
|
-
return
|
|
1775
|
+
return De(r);
|
|
1776
1776
|
}
|
|
1777
1777
|
try {
|
|
1778
|
-
return
|
|
1778
|
+
return De(r);
|
|
1779
1779
|
} finally {
|
|
1780
1780
|
Error.stackTraceLimit = e;
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function Te(r) {
|
|
1784
1784
|
if (r.type === "object" || Array.isArray(r.type) && r.type.includes("object")) {
|
|
1785
1785
|
r.additionalProperties = !1;
|
|
1786
1786
|
const { properties: t } = r;
|
|
1787
1787
|
if (t != null)
|
|
1788
1788
|
for (const s of Object.keys(t))
|
|
1789
|
-
t[s] =
|
|
1789
|
+
t[s] = Z(t[s]);
|
|
1790
1790
|
}
|
|
1791
|
-
r.items != null && (r.items = Array.isArray(r.items) ? r.items.map(
|
|
1791
|
+
r.items != null && (r.items = Array.isArray(r.items) ? r.items.map(Z) : Z(r.items)), r.anyOf != null && (r.anyOf = r.anyOf.map(Z)), r.allOf != null && (r.allOf = r.allOf.map(Z)), r.oneOf != null && (r.oneOf = r.oneOf.map(Z));
|
|
1792
1792
|
const { definitions: e } = r;
|
|
1793
1793
|
if (e != null)
|
|
1794
1794
|
for (const t of Object.keys(e))
|
|
1795
|
-
e[t] =
|
|
1795
|
+
e[t] = Z(e[t]);
|
|
1796
1796
|
return r;
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return typeof r == "boolean" ? r :
|
|
1798
|
+
function Z(r) {
|
|
1799
|
+
return typeof r == "boolean" ? r : Te(r);
|
|
1800
1800
|
}
|
|
1801
|
-
var
|
|
1801
|
+
var k2 = Symbol(
|
|
1802
1802
|
"Let zodToJsonSchema decide on which parser to use"
|
|
1803
|
-
),
|
|
1803
|
+
), He = {
|
|
1804
1804
|
name: void 0,
|
|
1805
1805
|
$refStrategy: "root",
|
|
1806
1806
|
basePath: ["#"],
|
|
@@ -1820,17 +1820,17 @@ var _2 = Symbol(
|
|
|
1820
1820
|
emailStrategy: "format:email",
|
|
1821
1821
|
base64Strategy: "contentEncoding:base64",
|
|
1822
1822
|
nameStrategy: "ref"
|
|
1823
|
-
},
|
|
1824
|
-
...
|
|
1823
|
+
}, T2 = (r) => typeof r == "string" ? {
|
|
1824
|
+
...He,
|
|
1825
1825
|
name: r
|
|
1826
1826
|
} : {
|
|
1827
|
-
...
|
|
1827
|
+
...He,
|
|
1828
1828
|
...r
|
|
1829
1829
|
};
|
|
1830
1830
|
function T() {
|
|
1831
1831
|
return {};
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function M2(r, e) {
|
|
1834
1834
|
var t, s, n;
|
|
1835
1835
|
const i = {
|
|
1836
1836
|
type: "array"
|
|
@@ -1840,7 +1840,7 @@ function x2(r, e) {
|
|
|
1840
1840
|
currentPath: [...e.currentPath, "items"]
|
|
1841
1841
|
})), r.minLength && (i.minItems = r.minLength.value), r.maxLength && (i.maxItems = r.maxLength.value), r.exactLength && (i.minItems = r.exactLength.value, i.maxItems = r.exactLength.value), i;
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function R2(r) {
|
|
1844
1844
|
const e = {
|
|
1845
1845
|
type: "integer",
|
|
1846
1846
|
format: "int64"
|
|
@@ -1860,18 +1860,18 @@ function L2(r) {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
return e;
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function E2() {
|
|
1864
1864
|
return { type: "boolean" };
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function ot(r, e) {
|
|
1867
1867
|
return _(r.type._def, e);
|
|
1868
1868
|
}
|
|
1869
|
-
var
|
|
1870
|
-
function
|
|
1869
|
+
var I2 = (r, e) => _(r.innerType._def, e);
|
|
1870
|
+
function it(r, e, t) {
|
|
1871
1871
|
const s = t ?? e.dateStrategy;
|
|
1872
1872
|
if (Array.isArray(s))
|
|
1873
1873
|
return {
|
|
1874
|
-
anyOf: s.map((n, i) =>
|
|
1874
|
+
anyOf: s.map((n, i) => it(r, e, n))
|
|
1875
1875
|
};
|
|
1876
1876
|
switch (s) {
|
|
1877
1877
|
case "string":
|
|
@@ -1886,10 +1886,10 @@ function rt(r, e, t) {
|
|
|
1886
1886
|
format: "date"
|
|
1887
1887
|
};
|
|
1888
1888
|
case "integer":
|
|
1889
|
-
return
|
|
1889
|
+
return A2(r);
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
|
-
var
|
|
1892
|
+
var A2 = (r) => {
|
|
1893
1893
|
const e = {
|
|
1894
1894
|
type: "integer",
|
|
1895
1895
|
format: "unix-time"
|
|
@@ -1905,23 +1905,23 @@ var k2 = (r) => {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
return e;
|
|
1907
1907
|
};
|
|
1908
|
-
function
|
|
1908
|
+
function O2(r, e) {
|
|
1909
1909
|
return {
|
|
1910
1910
|
..._(r.innerType._def, e),
|
|
1911
1911
|
default: r.defaultValue()
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function $2(r, e) {
|
|
1915
1915
|
return e.effectStrategy === "input" ? _(r.schema._def, e) : T();
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function U2(r) {
|
|
1918
1918
|
return {
|
|
1919
1919
|
type: "string",
|
|
1920
1920
|
enum: Array.from(r.values)
|
|
1921
1921
|
};
|
|
1922
1922
|
}
|
|
1923
|
-
var
|
|
1924
|
-
function
|
|
1923
|
+
var j2 = (r) => "type" in r && r.type === "string" ? !1 : "allOf" in r;
|
|
1924
|
+
function N2(r, e) {
|
|
1925
1925
|
const t = [
|
|
1926
1926
|
_(r.left._def, {
|
|
1927
1927
|
...e,
|
|
@@ -1933,19 +1933,19 @@ function I2(r, e) {
|
|
|
1933
1933
|
})
|
|
1934
1934
|
].filter((n) => !!n), s = [];
|
|
1935
1935
|
return t.forEach((n) => {
|
|
1936
|
-
if (
|
|
1936
|
+
if (j2(n))
|
|
1937
1937
|
s.push(...n.allOf);
|
|
1938
1938
|
else {
|
|
1939
1939
|
let i = n;
|
|
1940
1940
|
if ("additionalProperties" in n && n.additionalProperties === !1) {
|
|
1941
|
-
const { additionalProperties: a, ...
|
|
1942
|
-
i =
|
|
1941
|
+
const { additionalProperties: a, ...c } = n;
|
|
1942
|
+
i = c;
|
|
1943
1943
|
}
|
|
1944
1944
|
s.push(i);
|
|
1945
1945
|
}
|
|
1946
1946
|
}), s.length ? { allOf: s } : void 0;
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1948
|
+
function Z2(r) {
|
|
1949
1949
|
const e = typeof r.value;
|
|
1950
1950
|
return e !== "bigint" && e !== "number" && e !== "boolean" && e !== "string" ? {
|
|
1951
1951
|
type: Array.isArray(r.value) ? "array" : "object"
|
|
@@ -1954,7 +1954,7 @@ function A2(r) {
|
|
|
1954
1954
|
const: r.value
|
|
1955
1955
|
};
|
|
1956
1956
|
}
|
|
1957
|
-
var
|
|
1957
|
+
var he = void 0, O = {
|
|
1958
1958
|
/**
|
|
1959
1959
|
* `c` was changed to `[cC]` to replicate /i flag
|
|
1960
1960
|
*/
|
|
@@ -1976,10 +1976,10 @@ var ue = void 0, O = {
|
|
|
1976
1976
|
* Fix in Zod:
|
|
1977
1977
|
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
1978
1978
|
*/
|
|
1979
|
-
emoji: () => (
|
|
1979
|
+
emoji: () => (he === void 0 && (he = RegExp(
|
|
1980
1980
|
"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
|
|
1981
1981
|
"u"
|
|
1982
|
-
)),
|
|
1982
|
+
)), he),
|
|
1983
1983
|
/**
|
|
1984
1984
|
* Unused
|
|
1985
1985
|
*/
|
|
@@ -1999,7 +1999,7 @@ var ue = void 0, O = {
|
|
|
1999
1999
|
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
2000
2000
|
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
2001
2001
|
};
|
|
2002
|
-
function
|
|
2002
|
+
function at(r, e) {
|
|
2003
2003
|
const t = {
|
|
2004
2004
|
type: "string"
|
|
2005
2005
|
};
|
|
@@ -2043,7 +2043,7 @@ function st(r, e) {
|
|
|
2043
2043
|
case "startsWith":
|
|
2044
2044
|
S(
|
|
2045
2045
|
t,
|
|
2046
|
-
RegExp(`^${
|
|
2046
|
+
RegExp(`^${pe(s.value, e)}`),
|
|
2047
2047
|
s.message,
|
|
2048
2048
|
e
|
|
2049
2049
|
);
|
|
@@ -2051,7 +2051,7 @@ function st(r, e) {
|
|
|
2051
2051
|
case "endsWith":
|
|
2052
2052
|
S(
|
|
2053
2053
|
t,
|
|
2054
|
-
RegExp(`${
|
|
2054
|
+
RegExp(`${pe(s.value, e)}$`),
|
|
2055
2055
|
s.message,
|
|
2056
2056
|
e
|
|
2057
2057
|
);
|
|
@@ -2074,7 +2074,7 @@ function st(r, e) {
|
|
|
2074
2074
|
case "includes": {
|
|
2075
2075
|
S(
|
|
2076
2076
|
t,
|
|
2077
|
-
RegExp(
|
|
2077
|
+
RegExp(pe(s.value, e)),
|
|
2078
2078
|
s.message,
|
|
2079
2079
|
e
|
|
2080
2080
|
);
|
|
@@ -2123,16 +2123,16 @@ function st(r, e) {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
return t;
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2127
|
-
return e.patternStrategy === "escape" ?
|
|
2126
|
+
function pe(r, e) {
|
|
2127
|
+
return e.patternStrategy === "escape" ? z2(r) : r;
|
|
2128
2128
|
}
|
|
2129
|
-
var
|
|
2129
|
+
var q2 = new Set(
|
|
2130
2130
|
"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"
|
|
2131
2131
|
);
|
|
2132
|
-
function
|
|
2132
|
+
function z2(r) {
|
|
2133
2133
|
let e = "";
|
|
2134
2134
|
for (let t = 0; t < r.length; t++)
|
|
2135
|
-
|
|
2135
|
+
q2.has(r[t]) || (e += "\\"), e += r[t];
|
|
2136
2136
|
return e;
|
|
2137
2137
|
}
|
|
2138
2138
|
function $(r, e, t, s) {
|
|
@@ -2149,11 +2149,11 @@ function S(r, e, t, s) {
|
|
|
2149
2149
|
r.pattern || (n = r.allOf) != null && n.some((i) => i.pattern) ? (r.allOf || (r.allOf = []), r.pattern && (r.allOf.push({
|
|
2150
2150
|
pattern: r.pattern
|
|
2151
2151
|
}), delete r.pattern), r.allOf.push({
|
|
2152
|
-
pattern:
|
|
2152
|
+
pattern: Fe(e, s),
|
|
2153
2153
|
...t && s.errorMessages && { errorMessage: { pattern: t } }
|
|
2154
|
-
})) : r.pattern =
|
|
2154
|
+
})) : r.pattern = Fe(e, s);
|
|
2155
2155
|
}
|
|
2156
|
-
function
|
|
2156
|
+
function Fe(r, e) {
|
|
2157
2157
|
var t;
|
|
2158
2158
|
if (!e.applyRegexFlags || !r.flags)
|
|
2159
2159
|
return r.source;
|
|
@@ -2165,41 +2165,41 @@ function Ne(r, e) {
|
|
|
2165
2165
|
s: r.flags.includes("s")
|
|
2166
2166
|
// `.` matches newlines
|
|
2167
2167
|
}, n = s.i ? r.source.toLowerCase() : r.source;
|
|
2168
|
-
let i = "", a = !1,
|
|
2169
|
-
for (let
|
|
2168
|
+
let i = "", a = !1, c = !1, u = !1;
|
|
2169
|
+
for (let l = 0; l < n.length; l++) {
|
|
2170
2170
|
if (a) {
|
|
2171
|
-
i += n[
|
|
2171
|
+
i += n[l], a = !1;
|
|
2172
2172
|
continue;
|
|
2173
2173
|
}
|
|
2174
2174
|
if (s.i) {
|
|
2175
|
-
if (
|
|
2176
|
-
if (n[
|
|
2177
|
-
u ? (i += n[
|
|
2175
|
+
if (c) {
|
|
2176
|
+
if (n[l].match(/[a-z]/)) {
|
|
2177
|
+
u ? (i += n[l], i += `${n[l - 2]}-${n[l]}`.toUpperCase(), u = !1) : n[l + 1] === "-" && ((t = n[l + 2]) != null && t.match(/[a-z]/)) ? (i += n[l], u = !0) : i += `${n[l]}${n[l].toUpperCase()}`;
|
|
2178
2178
|
continue;
|
|
2179
2179
|
}
|
|
2180
|
-
} else if (n[
|
|
2181
|
-
i += `[${n[
|
|
2180
|
+
} else if (n[l].match(/[a-z]/)) {
|
|
2181
|
+
i += `[${n[l]}${n[l].toUpperCase()}]`;
|
|
2182
2182
|
continue;
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
2185
|
if (s.m) {
|
|
2186
|
-
if (n[
|
|
2186
|
+
if (n[l] === "^") {
|
|
2187
2187
|
i += `(^|(?<=[\r
|
|
2188
2188
|
]))`;
|
|
2189
2189
|
continue;
|
|
2190
|
-
} else if (n[
|
|
2190
|
+
} else if (n[l] === "$") {
|
|
2191
2191
|
i += `($|(?=[\r
|
|
2192
2192
|
]))`;
|
|
2193
2193
|
continue;
|
|
2194
2194
|
}
|
|
2195
2195
|
}
|
|
2196
|
-
if (s.s && n[
|
|
2197
|
-
i +=
|
|
2198
|
-
` : `[${n[
|
|
2196
|
+
if (s.s && n[l] === ".") {
|
|
2197
|
+
i += c ? `${n[l]}\r
|
|
2198
|
+
` : `[${n[l]}\r
|
|
2199
2199
|
]`;
|
|
2200
2200
|
continue;
|
|
2201
2201
|
}
|
|
2202
|
-
i += n[
|
|
2202
|
+
i += n[l], n[l] === "\\" ? a = !0 : c && n[l] === "]" ? c = !1 : !c && n[l] === "[" && (c = !0);
|
|
2203
2203
|
}
|
|
2204
2204
|
try {
|
|
2205
2205
|
new RegExp(i);
|
|
@@ -2212,8 +2212,8 @@ function Ne(r, e) {
|
|
|
2212
2212
|
}
|
|
2213
2213
|
return i;
|
|
2214
2214
|
}
|
|
2215
|
-
function
|
|
2216
|
-
var t, s, n, i, a,
|
|
2215
|
+
function ct(r, e) {
|
|
2216
|
+
var t, s, n, i, a, c;
|
|
2217
2217
|
const u = {
|
|
2218
2218
|
type: "object",
|
|
2219
2219
|
additionalProperties: (t = _(r.valueType._def, {
|
|
@@ -2222,7 +2222,7 @@ function nt(r, e) {
|
|
|
2222
2222
|
})) != null ? t : e.allowedAdditionalProperties
|
|
2223
2223
|
};
|
|
2224
2224
|
if (((s = r.keyType) == null ? void 0 : s._def.typeName) === f.ZodString && ((n = r.keyType._def.checks) != null && n.length)) {
|
|
2225
|
-
const { type:
|
|
2225
|
+
const { type: l, ...d } = at(r.keyType._def, e);
|
|
2226
2226
|
return {
|
|
2227
2227
|
...u,
|
|
2228
2228
|
propertyNames: d
|
|
@@ -2235,8 +2235,8 @@ function nt(r, e) {
|
|
|
2235
2235
|
enum: r.keyType._def.values
|
|
2236
2236
|
}
|
|
2237
2237
|
};
|
|
2238
|
-
if (((a = r.keyType) == null ? void 0 : a._def.typeName) === f.ZodBranded && r.keyType._def.type._def.typeName === f.ZodString && ((
|
|
2239
|
-
const { type:
|
|
2238
|
+
if (((a = r.keyType) == null ? void 0 : a._def.typeName) === f.ZodBranded && r.keyType._def.type._def.typeName === f.ZodString && ((c = r.keyType._def.type._def.checks) != null && c.length)) {
|
|
2239
|
+
const { type: l, ...d } = ot(
|
|
2240
2240
|
r.keyType._def,
|
|
2241
2241
|
e
|
|
2242
2242
|
);
|
|
@@ -2248,9 +2248,9 @@ function nt(r, e) {
|
|
|
2248
2248
|
}
|
|
2249
2249
|
return u;
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function D2(r, e) {
|
|
2252
2252
|
if (e.mapStrategy === "record")
|
|
2253
|
-
return
|
|
2253
|
+
return ct(r, e);
|
|
2254
2254
|
const t = _(r.keyType._def, {
|
|
2255
2255
|
...e,
|
|
2256
2256
|
currentPath: [...e.currentPath, "items", "items", "0"]
|
|
@@ -2269,7 +2269,7 @@ function U2(r, e) {
|
|
|
2269
2269
|
}
|
|
2270
2270
|
};
|
|
2271
2271
|
}
|
|
2272
|
-
function
|
|
2272
|
+
function H2(r) {
|
|
2273
2273
|
const e = r.values, s = Object.keys(r.values).filter((i) => typeof e[e[i]] != "number").map((i) => e[i]), n = Array.from(
|
|
2274
2274
|
new Set(s.map((i) => typeof i))
|
|
2275
2275
|
);
|
|
@@ -2278,28 +2278,28 @@ function j2(r) {
|
|
|
2278
2278
|
enum: s
|
|
2279
2279
|
};
|
|
2280
2280
|
}
|
|
2281
|
-
function
|
|
2281
|
+
function F2() {
|
|
2282
2282
|
return { not: T() };
|
|
2283
2283
|
}
|
|
2284
|
-
function
|
|
2284
|
+
function B2() {
|
|
2285
2285
|
return {
|
|
2286
2286
|
type: "null"
|
|
2287
2287
|
};
|
|
2288
2288
|
}
|
|
2289
|
-
var
|
|
2289
|
+
var Ce = {
|
|
2290
2290
|
ZodString: "string",
|
|
2291
2291
|
ZodNumber: "number",
|
|
2292
2292
|
ZodBigInt: "integer",
|
|
2293
2293
|
ZodBoolean: "boolean",
|
|
2294
2294
|
ZodNull: "null"
|
|
2295
2295
|
};
|
|
2296
|
-
function
|
|
2296
|
+
function V2(r, e) {
|
|
2297
2297
|
const t = r.options instanceof Map ? Array.from(r.options.values()) : r.options;
|
|
2298
2298
|
if (t.every(
|
|
2299
|
-
(s) => s._def.typeName in
|
|
2299
|
+
(s) => s._def.typeName in Ce && (!s._def.checks || !s._def.checks.length)
|
|
2300
2300
|
)) {
|
|
2301
2301
|
const s = t.reduce((n, i) => {
|
|
2302
|
-
const a =
|
|
2302
|
+
const a = Ce[i._def.typeName];
|
|
2303
2303
|
return a && !n.includes(a) ? [...n, a] : n;
|
|
2304
2304
|
}, []);
|
|
2305
2305
|
return {
|
|
@@ -2328,7 +2328,7 @@ function q2(r, e) {
|
|
|
2328
2328
|
[]
|
|
2329
2329
|
);
|
|
2330
2330
|
if (s.length === t.length) {
|
|
2331
|
-
const n = s.filter((i, a,
|
|
2331
|
+
const n = s.filter((i, a, c) => c.indexOf(i) === a);
|
|
2332
2332
|
return {
|
|
2333
2333
|
type: n.length > 1 ? n : n[0],
|
|
2334
2334
|
enum: t.reduce(
|
|
@@ -2348,9 +2348,9 @@ function q2(r, e) {
|
|
|
2348
2348
|
[]
|
|
2349
2349
|
)
|
|
2350
2350
|
};
|
|
2351
|
-
return
|
|
2351
|
+
return J2(r, e);
|
|
2352
2352
|
}
|
|
2353
|
-
var
|
|
2353
|
+
var J2 = (r, e) => {
|
|
2354
2354
|
const t = (r.options instanceof Map ? Array.from(r.options.values()) : r.options).map(
|
|
2355
2355
|
(s, n) => _(s._def, {
|
|
2356
2356
|
...e,
|
|
@@ -2361,13 +2361,13 @@ var z2 = (r, e) => {
|
|
|
2361
2361
|
);
|
|
2362
2362
|
return t.length ? { anyOf: t } : void 0;
|
|
2363
2363
|
};
|
|
2364
|
-
function
|
|
2364
|
+
function W2(r, e) {
|
|
2365
2365
|
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(
|
|
2366
2366
|
r.innerType._def.typeName
|
|
2367
2367
|
) && (!r.innerType._def.checks || !r.innerType._def.checks.length))
|
|
2368
2368
|
return {
|
|
2369
2369
|
type: [
|
|
2370
|
-
|
|
2370
|
+
Ce[r.innerType._def.typeName],
|
|
2371
2371
|
"null"
|
|
2372
2372
|
]
|
|
2373
2373
|
};
|
|
@@ -2377,7 +2377,7 @@ function D2(r, e) {
|
|
|
2377
2377
|
});
|
|
2378
2378
|
return t && { anyOf: [t, { type: "null" }] };
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2380
|
+
function K2(r) {
|
|
2381
2381
|
const e = {
|
|
2382
2382
|
type: "number"
|
|
2383
2383
|
};
|
|
@@ -2399,27 +2399,27 @@ function H2(r) {
|
|
|
2399
2399
|
}
|
|
2400
2400
|
return e;
|
|
2401
2401
|
}
|
|
2402
|
-
function
|
|
2402
|
+
function G2(r, e) {
|
|
2403
2403
|
const t = {
|
|
2404
2404
|
type: "object",
|
|
2405
2405
|
properties: {}
|
|
2406
2406
|
}, s = [], n = r.shape();
|
|
2407
2407
|
for (const a in n) {
|
|
2408
|
-
let
|
|
2409
|
-
if (
|
|
2408
|
+
let c = n[a];
|
|
2409
|
+
if (c === void 0 || c._def === void 0)
|
|
2410
2410
|
continue;
|
|
2411
|
-
const u =
|
|
2411
|
+
const u = Q2(c), l = _(c._def, {
|
|
2412
2412
|
...e,
|
|
2413
2413
|
currentPath: [...e.currentPath, "properties", a],
|
|
2414
2414
|
propertyPath: [...e.currentPath, "properties", a]
|
|
2415
2415
|
});
|
|
2416
|
-
|
|
2416
|
+
l !== void 0 && (t.properties[a] = l, u || s.push(a));
|
|
2417
2417
|
}
|
|
2418
2418
|
s.length && (t.required = s);
|
|
2419
|
-
const i =
|
|
2419
|
+
const i = Y2(r, e);
|
|
2420
2420
|
return i !== void 0 && (t.additionalProperties = i), t;
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2422
|
+
function Y2(r, e) {
|
|
2423
2423
|
if (r.catchall._def.typeName !== "ZodNever")
|
|
2424
2424
|
return _(r.catchall._def, {
|
|
2425
2425
|
...e,
|
|
@@ -2434,14 +2434,14 @@ function B2(r, e) {
|
|
|
2434
2434
|
return e.removeAdditionalStrategy === "strict" ? e.allowedAdditionalProperties : e.rejectedAdditionalProperties;
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
|
-
function
|
|
2437
|
+
function Q2(r) {
|
|
2438
2438
|
try {
|
|
2439
2439
|
return r.isOptional();
|
|
2440
2440
|
} catch {
|
|
2441
2441
|
return !0;
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
|
-
var
|
|
2444
|
+
var X2 = (r, e) => {
|
|
2445
2445
|
var t;
|
|
2446
2446
|
if (e.currentPath.toString() === ((t = e.propertyPath) == null ? void 0 : t.toString()))
|
|
2447
2447
|
return _(r.innerType._def, e);
|
|
@@ -2450,7 +2450,7 @@ var J2 = (r, e) => {
|
|
|
2450
2450
|
currentPath: [...e.currentPath, "anyOf", "1"]
|
|
2451
2451
|
});
|
|
2452
2452
|
return s ? { anyOf: [{ not: T() }, s] } : T();
|
|
2453
|
-
},
|
|
2453
|
+
}, e0 = (r, e) => {
|
|
2454
2454
|
if (e.pipeStrategy === "input")
|
|
2455
2455
|
return _(r.in._def, e);
|
|
2456
2456
|
if (e.pipeStrategy === "output")
|
|
@@ -2466,10 +2466,10 @@ var J2 = (r, e) => {
|
|
|
2466
2466
|
allOf: [t, s].filter((n) => n !== void 0)
|
|
2467
2467
|
};
|
|
2468
2468
|
};
|
|
2469
|
-
function
|
|
2469
|
+
function t0(r, e) {
|
|
2470
2470
|
return _(r.type._def, e);
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function r0(r, e) {
|
|
2473
2473
|
const s = {
|
|
2474
2474
|
type: "array",
|
|
2475
2475
|
uniqueItems: !0,
|
|
@@ -2480,7 +2480,7 @@ function G2(r, e) {
|
|
|
2480
2480
|
};
|
|
2481
2481
|
return r.minSize && (s.minItems = r.minSize.value), r.maxSize && (s.maxItems = r.maxSize.value), s;
|
|
2482
2482
|
}
|
|
2483
|
-
function
|
|
2483
|
+
function s0(r, e) {
|
|
2484
2484
|
return r.rest ? {
|
|
2485
2485
|
type: "array",
|
|
2486
2486
|
minItems: r.items.length,
|
|
@@ -2512,80 +2512,80 @@ function Y2(r, e) {
|
|
|
2512
2512
|
)
|
|
2513
2513
|
};
|
|
2514
2514
|
}
|
|
2515
|
-
function
|
|
2515
|
+
function n0() {
|
|
2516
2516
|
return {
|
|
2517
2517
|
not: T()
|
|
2518
2518
|
};
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function o0() {
|
|
2521
2521
|
return T();
|
|
2522
2522
|
}
|
|
2523
|
-
var
|
|
2523
|
+
var i0 = (r, e) => _(r.innerType._def, e), a0 = (r, e, t) => {
|
|
2524
2524
|
switch (e) {
|
|
2525
2525
|
case f.ZodString:
|
|
2526
|
-
return
|
|
2526
|
+
return at(r, t);
|
|
2527
2527
|
case f.ZodNumber:
|
|
2528
|
-
return
|
|
2528
|
+
return K2(r);
|
|
2529
2529
|
case f.ZodObject:
|
|
2530
|
-
return
|
|
2530
|
+
return G2(r, t);
|
|
2531
2531
|
case f.ZodBigInt:
|
|
2532
|
-
return
|
|
2532
|
+
return R2(r);
|
|
2533
2533
|
case f.ZodBoolean:
|
|
2534
|
-
return
|
|
2534
|
+
return E2();
|
|
2535
2535
|
case f.ZodDate:
|
|
2536
|
-
return
|
|
2536
|
+
return it(r, t);
|
|
2537
2537
|
case f.ZodUndefined:
|
|
2538
|
-
return
|
|
2538
|
+
return n0();
|
|
2539
2539
|
case f.ZodNull:
|
|
2540
|
-
return
|
|
2540
|
+
return B2();
|
|
2541
2541
|
case f.ZodArray:
|
|
2542
|
-
return
|
|
2542
|
+
return M2(r, t);
|
|
2543
2543
|
case f.ZodUnion:
|
|
2544
2544
|
case f.ZodDiscriminatedUnion:
|
|
2545
|
-
return
|
|
2545
|
+
return V2(r, t);
|
|
2546
2546
|
case f.ZodIntersection:
|
|
2547
|
-
return
|
|
2547
|
+
return N2(r, t);
|
|
2548
2548
|
case f.ZodTuple:
|
|
2549
|
-
return
|
|
2549
|
+
return s0(r, t);
|
|
2550
2550
|
case f.ZodRecord:
|
|
2551
|
-
return
|
|
2551
|
+
return ct(r, t);
|
|
2552
2552
|
case f.ZodLiteral:
|
|
2553
|
-
return
|
|
2553
|
+
return Z2(r);
|
|
2554
2554
|
case f.ZodEnum:
|
|
2555
|
-
return
|
|
2555
|
+
return U2(r);
|
|
2556
2556
|
case f.ZodNativeEnum:
|
|
2557
|
-
return
|
|
2557
|
+
return H2(r);
|
|
2558
2558
|
case f.ZodNullable:
|
|
2559
|
-
return
|
|
2559
|
+
return W2(r, t);
|
|
2560
2560
|
case f.ZodOptional:
|
|
2561
|
-
return
|
|
2561
|
+
return X2(r, t);
|
|
2562
2562
|
case f.ZodMap:
|
|
2563
|
-
return
|
|
2563
|
+
return D2(r, t);
|
|
2564
2564
|
case f.ZodSet:
|
|
2565
|
-
return
|
|
2565
|
+
return r0(r, t);
|
|
2566
2566
|
case f.ZodLazy:
|
|
2567
2567
|
return () => r.getter()._def;
|
|
2568
2568
|
case f.ZodPromise:
|
|
2569
|
-
return
|
|
2569
|
+
return t0(r, t);
|
|
2570
2570
|
case f.ZodNaN:
|
|
2571
2571
|
case f.ZodNever:
|
|
2572
|
-
return
|
|
2572
|
+
return F2();
|
|
2573
2573
|
case f.ZodEffects:
|
|
2574
|
-
return
|
|
2574
|
+
return $2(r, t);
|
|
2575
2575
|
case f.ZodAny:
|
|
2576
2576
|
return T();
|
|
2577
2577
|
case f.ZodUnknown:
|
|
2578
|
-
return
|
|
2578
|
+
return o0();
|
|
2579
2579
|
case f.ZodDefault:
|
|
2580
|
-
return
|
|
2580
|
+
return O2(r, t);
|
|
2581
2581
|
case f.ZodBranded:
|
|
2582
|
-
return
|
|
2582
|
+
return ot(r, t);
|
|
2583
2583
|
case f.ZodReadonly:
|
|
2584
|
-
return
|
|
2584
|
+
return i0(r, t);
|
|
2585
2585
|
case f.ZodCatch:
|
|
2586
|
-
return
|
|
2586
|
+
return I2(r, t);
|
|
2587
2587
|
case f.ZodPipeline:
|
|
2588
|
-
return
|
|
2588
|
+
return e0(r, t);
|
|
2589
2589
|
case f.ZodFunction:
|
|
2590
2590
|
case f.ZodVoid:
|
|
2591
2591
|
case f.ZodSymbol:
|
|
@@ -2594,7 +2594,7 @@ var e0 = (r, e) => _(r.innerType._def, e), t0 = (r, e, t) => {
|
|
|
2594
2594
|
return /* @__PURE__ */ ((s) => {
|
|
2595
2595
|
})();
|
|
2596
2596
|
}
|
|
2597
|
-
},
|
|
2597
|
+
}, c0 = (r, e) => {
|
|
2598
2598
|
let t = 0;
|
|
2599
2599
|
for (; t < r.length && t < e.length && r[t] === e[t]; t++)
|
|
2600
2600
|
;
|
|
@@ -2611,29 +2611,29 @@ function _(r, e, t = !1) {
|
|
|
2611
2611
|
n,
|
|
2612
2612
|
t
|
|
2613
2613
|
);
|
|
2614
|
-
if (u !==
|
|
2614
|
+
if (u !== k2)
|
|
2615
2615
|
return u;
|
|
2616
2616
|
}
|
|
2617
2617
|
if (n && !t) {
|
|
2618
|
-
const u =
|
|
2618
|
+
const u = l0(n, e);
|
|
2619
2619
|
if (u !== void 0)
|
|
2620
2620
|
return u;
|
|
2621
2621
|
}
|
|
2622
2622
|
const i = { def: r, path: e.currentPath, jsonSchema: void 0 };
|
|
2623
2623
|
e.seen.set(r, i);
|
|
2624
|
-
const a =
|
|
2625
|
-
if (
|
|
2626
|
-
const u = e.postProcess(
|
|
2627
|
-
return i.jsonSchema =
|
|
2624
|
+
const a = a0(r, r.typeName, e), c = typeof a == "function" ? _(a(), e) : a;
|
|
2625
|
+
if (c && u0(r, e, c), e.postProcess) {
|
|
2626
|
+
const u = e.postProcess(c, r, e);
|
|
2627
|
+
return i.jsonSchema = c, u;
|
|
2628
2628
|
}
|
|
2629
|
-
return i.jsonSchema =
|
|
2629
|
+
return i.jsonSchema = c, c;
|
|
2630
2630
|
}
|
|
2631
|
-
var
|
|
2631
|
+
var l0 = (r, e) => {
|
|
2632
2632
|
switch (e.$refStrategy) {
|
|
2633
2633
|
case "root":
|
|
2634
2634
|
return { $ref: r.path.join("/") };
|
|
2635
2635
|
case "relative":
|
|
2636
|
-
return { $ref:
|
|
2636
|
+
return { $ref: c0(e.currentPath, r.path) };
|
|
2637
2637
|
case "none":
|
|
2638
2638
|
case "seen":
|
|
2639
2639
|
return r.path.length < e.currentPath.length && r.path.every((t, s) => e.currentPath[s] === t) ? (console.warn(
|
|
@@ -2642,8 +2642,8 @@ var s0 = (r, e) => {
|
|
|
2642
2642
|
)}! Defaulting to any`
|
|
2643
2643
|
), T()) : e.$refStrategy === "seen" ? T() : void 0;
|
|
2644
2644
|
}
|
|
2645
|
-
},
|
|
2646
|
-
const e =
|
|
2645
|
+
}, u0 = (r, e, t) => (r.description && (t.description = r.description), t), d0 = (r) => {
|
|
2646
|
+
const e = T2(r), t = e.name !== void 0 ? [...e.basePath, e.definitionPath, e.name] : e.basePath;
|
|
2647
2647
|
return {
|
|
2648
2648
|
...e,
|
|
2649
2649
|
currentPath: t,
|
|
@@ -2660,14 +2660,14 @@ var s0 = (r, e) => {
|
|
|
2660
2660
|
])
|
|
2661
2661
|
)
|
|
2662
2662
|
};
|
|
2663
|
-
},
|
|
2663
|
+
}, h0 = (r, e) => {
|
|
2664
2664
|
var t;
|
|
2665
|
-
const s =
|
|
2665
|
+
const s = d0(e);
|
|
2666
2666
|
let n = typeof e == "object" && e.definitions ? Object.entries(e.definitions).reduce(
|
|
2667
|
-
(
|
|
2667
|
+
(l, [d, g]) => {
|
|
2668
2668
|
var h;
|
|
2669
2669
|
return {
|
|
2670
|
-
...
|
|
2670
|
+
...l,
|
|
2671
2671
|
[d]: (h = _(
|
|
2672
2672
|
g._def,
|
|
2673
2673
|
{
|
|
@@ -2687,8 +2687,8 @@ var s0 = (r, e) => {
|
|
|
2687
2687
|
currentPath: [...s.basePath, s.definitionPath, i]
|
|
2688
2688
|
},
|
|
2689
2689
|
!1
|
|
2690
|
-
)) != null ? t : T(),
|
|
2691
|
-
|
|
2690
|
+
)) != null ? t : T(), c = typeof e == "object" && e.name !== void 0 && e.nameStrategy === "title" ? e.name : void 0;
|
|
2691
|
+
c !== void 0 && (a.title = c);
|
|
2692
2692
|
const u = i === void 0 ? n ? {
|
|
2693
2693
|
...a,
|
|
2694
2694
|
[s.definitionPath]: n
|
|
@@ -2704,12 +2704,12 @@ var s0 = (r, e) => {
|
|
|
2704
2704
|
}
|
|
2705
2705
|
};
|
|
2706
2706
|
return u.$schema = "http://json-schema.org/draft-07/schema#", u;
|
|
2707
|
-
},
|
|
2707
|
+
}, ve = Symbol.for("vercel.ai.schema");
|
|
2708
2708
|
function J(r, {
|
|
2709
2709
|
validate: e
|
|
2710
2710
|
} = {}) {
|
|
2711
2711
|
return {
|
|
2712
|
-
[
|
|
2712
|
+
[ve]: !0,
|
|
2713
2713
|
_type: void 0,
|
|
2714
2714
|
// should never be used directly
|
|
2715
2715
|
get jsonSchema() {
|
|
@@ -2718,15 +2718,15 @@ function J(r, {
|
|
|
2718
2718
|
validate: e
|
|
2719
2719
|
};
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2722
|
-
return typeof r == "object" && r !== null &&
|
|
2721
|
+
function p0(r) {
|
|
2722
|
+
return typeof r == "object" && r !== null && ve in r && r[ve] === !0 && "jsonSchema" in r && "validate" in r;
|
|
2723
2723
|
}
|
|
2724
|
-
function
|
|
2725
|
-
return r == null ? J({ properties: {}, additionalProperties: !1 }) :
|
|
2724
|
+
function lt(r) {
|
|
2725
|
+
return r == null ? J({ properties: {}, additionalProperties: !1 }) : p0(r) ? r : "~standard" in r ? r["~standard"].vendor === "zod" ? w0(r) : m0(r) : r();
|
|
2726
2726
|
}
|
|
2727
|
-
function
|
|
2727
|
+
function m0(r) {
|
|
2728
2728
|
return J(
|
|
2729
|
-
() =>
|
|
2729
|
+
() => Te(
|
|
2730
2730
|
r["~standard"].jsonSchema.input({
|
|
2731
2731
|
target: "draft-07"
|
|
2732
2732
|
})
|
|
@@ -2736,7 +2736,7 @@ function c0(r) {
|
|
|
2736
2736
|
const t = await r["~standard"].validate(e);
|
|
2737
2737
|
return "value" in t ? { success: !0, value: t.value } : {
|
|
2738
2738
|
success: !1,
|
|
2739
|
-
error: new
|
|
2739
|
+
error: new ge({
|
|
2740
2740
|
value: e,
|
|
2741
2741
|
cause: t.issues
|
|
2742
2742
|
})
|
|
@@ -2745,12 +2745,12 @@ function c0(r) {
|
|
|
2745
2745
|
}
|
|
2746
2746
|
);
|
|
2747
2747
|
}
|
|
2748
|
-
function
|
|
2748
|
+
function g0(r, e) {
|
|
2749
2749
|
var t;
|
|
2750
2750
|
const s = (t = void 0) != null ? t : !1;
|
|
2751
2751
|
return J(
|
|
2752
2752
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
2753
|
-
() =>
|
|
2753
|
+
() => h0(r, {
|
|
2754
2754
|
$refStrategy: s ? "root" : "none"
|
|
2755
2755
|
}),
|
|
2756
2756
|
{
|
|
@@ -2761,13 +2761,13 @@ function l0(r, e) {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
);
|
|
2763
2763
|
}
|
|
2764
|
-
function
|
|
2764
|
+
function f0(r, e) {
|
|
2765
2765
|
var t;
|
|
2766
2766
|
const s = (t = void 0) != null ? t : !1;
|
|
2767
2767
|
return J(
|
|
2768
2768
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
2769
|
-
() =>
|
|
2770
|
-
|
|
2769
|
+
() => Te(
|
|
2770
|
+
je.toJSONSchema(r, {
|
|
2771
2771
|
target: "draft-7",
|
|
2772
2772
|
io: "input",
|
|
2773
2773
|
reused: s ? "ref" : "inline"
|
|
@@ -2775,91 +2775,91 @@ function u0(r, e) {
|
|
|
2775
2775
|
),
|
|
2776
2776
|
{
|
|
2777
2777
|
validate: async (n) => {
|
|
2778
|
-
const i = await
|
|
2778
|
+
const i = await je.safeParseAsync(r, n);
|
|
2779
2779
|
return i.success ? { success: !0, value: i.data } : { success: !1, error: i.error };
|
|
2780
2780
|
}
|
|
2781
2781
|
}
|
|
2782
2782
|
);
|
|
2783
2783
|
}
|
|
2784
|
-
function
|
|
2784
|
+
function y0(r) {
|
|
2785
2785
|
return "_zod" in r;
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2788
|
-
return
|
|
2787
|
+
function w0(r, e) {
|
|
2788
|
+
return y0(r) ? f0(r) : g0(r);
|
|
2789
2789
|
}
|
|
2790
|
-
async function
|
|
2790
|
+
async function ut({
|
|
2791
2791
|
value: r,
|
|
2792
2792
|
schema: e,
|
|
2793
2793
|
context: t
|
|
2794
2794
|
}) {
|
|
2795
|
-
const s =
|
|
2795
|
+
const s = lt(e);
|
|
2796
2796
|
try {
|
|
2797
2797
|
if (s.validate == null)
|
|
2798
2798
|
return { success: !0, value: r, rawValue: r };
|
|
2799
2799
|
const n = await s.validate(r);
|
|
2800
2800
|
return n.success ? { success: !0, value: n.value, rawValue: r } : {
|
|
2801
2801
|
success: !1,
|
|
2802
|
-
error:
|
|
2802
|
+
error: ge.wrap({ value: r, cause: n.error, context: t }),
|
|
2803
2803
|
rawValue: r
|
|
2804
2804
|
};
|
|
2805
2805
|
} catch (n) {
|
|
2806
2806
|
return {
|
|
2807
2807
|
success: !1,
|
|
2808
|
-
error:
|
|
2808
|
+
error: ge.wrap({ value: r, cause: n, context: t }),
|
|
2809
2809
|
rawValue: r
|
|
2810
2810
|
};
|
|
2811
2811
|
}
|
|
2812
2812
|
}
|
|
2813
|
-
async function
|
|
2813
|
+
async function C0({
|
|
2814
2814
|
text: r,
|
|
2815
2815
|
schema: e
|
|
2816
2816
|
}) {
|
|
2817
2817
|
try {
|
|
2818
|
-
const t =
|
|
2819
|
-
return e == null ? { success: !0, value: t, rawValue: t } : await
|
|
2818
|
+
const t = P2(r);
|
|
2819
|
+
return e == null ? { success: !0, value: t, rawValue: t } : await ut({ value: t, schema: e });
|
|
2820
2820
|
} catch (t) {
|
|
2821
2821
|
return {
|
|
2822
2822
|
success: !1,
|
|
2823
|
-
error:
|
|
2823
|
+
error: Ue.isInstance(t) ? t : new Ue({ text: r, cause: t }),
|
|
2824
2824
|
rawValue: void 0
|
|
2825
2825
|
};
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
|
-
function
|
|
2828
|
+
function v0(r) {
|
|
2829
2829
|
return { ...r, type: "dynamic" };
|
|
2830
2830
|
}
|
|
2831
|
-
let
|
|
2832
|
-
|
|
2833
|
-
async function
|
|
2834
|
-
return (await
|
|
2831
|
+
let Me;
|
|
2832
|
+
Me = globalThis.crypto;
|
|
2833
|
+
async function _0(r) {
|
|
2834
|
+
return (await Me).getRandomValues(new Uint8Array(r));
|
|
2835
2835
|
}
|
|
2836
|
-
async function
|
|
2836
|
+
async function b0(r) {
|
|
2837
2837
|
const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~", t = Math.pow(2, 8) - Math.pow(2, 8) % e.length;
|
|
2838
2838
|
let s = "";
|
|
2839
2839
|
for (; s.length < r; ) {
|
|
2840
|
-
const n = await
|
|
2840
|
+
const n = await _0(r - s.length);
|
|
2841
2841
|
for (const i of n)
|
|
2842
2842
|
i < t && (s += e[i % e.length]);
|
|
2843
2843
|
}
|
|
2844
2844
|
return s;
|
|
2845
2845
|
}
|
|
2846
|
-
async function
|
|
2847
|
-
return await
|
|
2846
|
+
async function x0(r) {
|
|
2847
|
+
return await b0(r);
|
|
2848
2848
|
}
|
|
2849
|
-
async function
|
|
2850
|
-
const e = await (await
|
|
2849
|
+
async function L0(r) {
|
|
2850
|
+
const e = await (await Me).subtle.digest("SHA-256", new TextEncoder().encode(r));
|
|
2851
2851
|
return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "");
|
|
2852
2852
|
}
|
|
2853
|
-
async function
|
|
2853
|
+
async function S0(r) {
|
|
2854
2854
|
if (r || (r = 43), r < 43 || r > 128)
|
|
2855
2855
|
throw `Expected a length between 43 and 128. Received ${r}.`;
|
|
2856
|
-
const e = await
|
|
2856
|
+
const e = await x0(r), t = await L0(e);
|
|
2857
2857
|
return {
|
|
2858
2858
|
code_verifier: e,
|
|
2859
2859
|
code_challenge: t
|
|
2860
2860
|
};
|
|
2861
2861
|
}
|
|
2862
|
-
var
|
|
2862
|
+
var P0 = "AI_MCPClientError", dt = `vercel.ai.error.${P0}`, k0 = Symbol.for(dt), Be, Ve, v = class extends (Ve = Q, Be = k0, Ve) {
|
|
2863
2863
|
constructor({
|
|
2864
2864
|
name: r = "MCPClientError",
|
|
2865
2865
|
message: e,
|
|
@@ -2867,26 +2867,26 @@ var v0 = "AI_MCPClientError", at = `vercel.ai.error.${v0}`, _0 = Symbol.for(at),
|
|
|
2867
2867
|
data: s,
|
|
2868
2868
|
code: n
|
|
2869
2869
|
}) {
|
|
2870
|
-
super({ name: r, message: e, cause: t }), this[
|
|
2870
|
+
super({ name: r, message: e, cause: t }), this[Be] = !0, this.data = s, this.code = n;
|
|
2871
2871
|
}
|
|
2872
2872
|
static isInstance(r) {
|
|
2873
|
-
return
|
|
2873
|
+
return Q.hasMarker(r, dt);
|
|
2874
2874
|
}
|
|
2875
|
-
}, H = "2025-06-18",
|
|
2875
|
+
}, H = "2025-06-18", T0 = [
|
|
2876
2876
|
H,
|
|
2877
2877
|
"2025-03-26",
|
|
2878
2878
|
"2024-11-05"
|
|
2879
|
-
],
|
|
2879
|
+
], M0 = o.optional(o.record(o.string(), o.unknown())), R0 = o.looseObject({
|
|
2880
2880
|
name: o.string(),
|
|
2881
2881
|
version: o.string()
|
|
2882
|
-
}),
|
|
2882
|
+
}), ae = o.looseObject({
|
|
2883
2883
|
_meta: o.optional(o.object({}).loose())
|
|
2884
|
-
}), U =
|
|
2884
|
+
}), U = ae, ht = o.object({
|
|
2885
2885
|
method: o.string(),
|
|
2886
|
-
params: o.optional(
|
|
2887
|
-
}),
|
|
2886
|
+
params: o.optional(ae)
|
|
2887
|
+
}), pt = o.object({
|
|
2888
2888
|
applyDefaults: o.optional(o.boolean())
|
|
2889
|
-
}).loose(),
|
|
2889
|
+
}).loose(), E0 = o.looseObject({
|
|
2890
2890
|
experimental: o.optional(o.object({}).loose()),
|
|
2891
2891
|
logging: o.optional(o.object({}).loose()),
|
|
2892
2892
|
prompts: o.optional(
|
|
@@ -2905,19 +2905,19 @@ var v0 = "AI_MCPClientError", at = `vercel.ai.error.${v0}`, _0 = Symbol.for(at),
|
|
|
2905
2905
|
listChanged: o.optional(o.boolean())
|
|
2906
2906
|
})
|
|
2907
2907
|
),
|
|
2908
|
-
elicitation: o.optional(
|
|
2908
|
+
elicitation: o.optional(pt)
|
|
2909
2909
|
});
|
|
2910
2910
|
o.object({
|
|
2911
|
-
elicitation: o.optional(
|
|
2911
|
+
elicitation: o.optional(pt)
|
|
2912
2912
|
}).loose();
|
|
2913
|
-
var
|
|
2913
|
+
var I0 = U.extend({
|
|
2914
2914
|
protocolVersion: o.string(),
|
|
2915
|
-
capabilities:
|
|
2916
|
-
serverInfo:
|
|
2915
|
+
capabilities: E0,
|
|
2916
|
+
serverInfo: R0,
|
|
2917
2917
|
instructions: o.optional(o.string())
|
|
2918
|
-
}),
|
|
2918
|
+
}), Re = U.extend({
|
|
2919
2919
|
nextCursor: o.optional(o.string())
|
|
2920
|
-
}),
|
|
2920
|
+
}), A0 = o.object({
|
|
2921
2921
|
name: o.string(),
|
|
2922
2922
|
/**
|
|
2923
2923
|
* @see https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool
|
|
@@ -2937,26 +2937,26 @@ var P0 = U.extend({
|
|
|
2937
2937
|
title: o.optional(o.string())
|
|
2938
2938
|
}).loose()
|
|
2939
2939
|
),
|
|
2940
|
-
_meta:
|
|
2941
|
-
}).loose(),
|
|
2942
|
-
tools: o.array(
|
|
2943
|
-
}),
|
|
2940
|
+
_meta: M0
|
|
2941
|
+
}).loose(), O0 = Re.extend({
|
|
2942
|
+
tools: o.array(A0)
|
|
2943
|
+
}), mt = o.object({
|
|
2944
2944
|
type: o.literal("text"),
|
|
2945
2945
|
text: o.string()
|
|
2946
|
-
}).loose(),
|
|
2946
|
+
}).loose(), gt = o.object({
|
|
2947
2947
|
type: o.literal("image"),
|
|
2948
2948
|
data: o.base64(),
|
|
2949
2949
|
mimeType: o.string()
|
|
2950
|
-
}).loose(),
|
|
2950
|
+
}).loose(), $0 = o.object({
|
|
2951
2951
|
uri: o.string(),
|
|
2952
2952
|
name: o.string(),
|
|
2953
2953
|
title: o.optional(o.string()),
|
|
2954
2954
|
description: o.optional(o.string()),
|
|
2955
2955
|
mimeType: o.optional(o.string()),
|
|
2956
2956
|
size: o.optional(o.number())
|
|
2957
|
-
}).loose(),
|
|
2958
|
-
resources: o.array(
|
|
2959
|
-
}),
|
|
2957
|
+
}).loose(), U0 = Re.extend({
|
|
2958
|
+
resources: o.array($0)
|
|
2959
|
+
}), ft = o.object({
|
|
2960
2960
|
/**
|
|
2961
2961
|
* The URI of this resource.
|
|
2962
2962
|
*/
|
|
@@ -2973,16 +2973,16 @@ var P0 = U.extend({
|
|
|
2973
2973
|
* The MIME type of this resource, if known.
|
|
2974
2974
|
*/
|
|
2975
2975
|
mimeType: o.optional(o.string())
|
|
2976
|
-
}).loose(),
|
|
2976
|
+
}).loose(), yt = ft.extend({
|
|
2977
2977
|
text: o.string()
|
|
2978
|
-
}),
|
|
2978
|
+
}), wt = ft.extend({
|
|
2979
2979
|
blob: o.base64()
|
|
2980
|
-
}),
|
|
2980
|
+
}), Ct = o.object({
|
|
2981
2981
|
type: o.literal("resource"),
|
|
2982
|
-
resource: o.union([
|
|
2983
|
-
}).loose(),
|
|
2982
|
+
resource: o.union([yt, wt])
|
|
2983
|
+
}).loose(), j0 = U.extend({
|
|
2984
2984
|
content: o.array(
|
|
2985
|
-
o.union([
|
|
2985
|
+
o.union([mt, gt, Ct])
|
|
2986
2986
|
),
|
|
2987
2987
|
/**
|
|
2988
2988
|
* @see https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content
|
|
@@ -2993,80 +2993,80 @@ var P0 = U.extend({
|
|
|
2993
2993
|
U.extend({
|
|
2994
2994
|
toolResult: o.unknown()
|
|
2995
2995
|
})
|
|
2996
|
-
),
|
|
2996
|
+
), N0 = o.object({
|
|
2997
2997
|
uriTemplate: o.string(),
|
|
2998
2998
|
name: o.string(),
|
|
2999
2999
|
title: o.optional(o.string()),
|
|
3000
3000
|
description: o.optional(o.string()),
|
|
3001
3001
|
mimeType: o.optional(o.string())
|
|
3002
|
-
}).loose(),
|
|
3003
|
-
resourceTemplates: o.array(
|
|
3004
|
-
}),
|
|
3002
|
+
}).loose(), Z0 = U.extend({
|
|
3003
|
+
resourceTemplates: o.array(N0)
|
|
3004
|
+
}), q0 = U.extend({
|
|
3005
3005
|
contents: o.array(
|
|
3006
|
-
o.union([
|
|
3006
|
+
o.union([yt, wt])
|
|
3007
3007
|
)
|
|
3008
|
-
}),
|
|
3008
|
+
}), z0 = o.object({
|
|
3009
3009
|
name: o.string(),
|
|
3010
3010
|
description: o.optional(o.string()),
|
|
3011
3011
|
required: o.optional(o.boolean())
|
|
3012
|
-
}).loose(),
|
|
3012
|
+
}).loose(), D0 = o.object({
|
|
3013
3013
|
name: o.string(),
|
|
3014
3014
|
title: o.optional(o.string()),
|
|
3015
3015
|
description: o.optional(o.string()),
|
|
3016
|
-
arguments: o.optional(o.array(
|
|
3017
|
-
}).loose(),
|
|
3018
|
-
prompts: o.array(
|
|
3019
|
-
}),
|
|
3016
|
+
arguments: o.optional(o.array(z0))
|
|
3017
|
+
}).loose(), H0 = Re.extend({
|
|
3018
|
+
prompts: o.array(D0)
|
|
3019
|
+
}), F0 = o.object({
|
|
3020
3020
|
role: o.union([o.literal("user"), o.literal("assistant")]),
|
|
3021
3021
|
content: o.union([
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3022
|
+
mt,
|
|
3023
|
+
gt,
|
|
3024
|
+
Ct
|
|
3025
3025
|
])
|
|
3026
|
-
}).loose(),
|
|
3026
|
+
}).loose(), B0 = U.extend({
|
|
3027
3027
|
description: o.optional(o.string()),
|
|
3028
|
-
messages: o.array(
|
|
3029
|
-
}),
|
|
3028
|
+
messages: o.array(F0)
|
|
3029
|
+
}), V0 = ae.extend({
|
|
3030
3030
|
message: o.string(),
|
|
3031
3031
|
requestedSchema: o.unknown()
|
|
3032
|
-
}),
|
|
3032
|
+
}), Je = ht.extend({
|
|
3033
3033
|
method: o.literal("elicitation/create"),
|
|
3034
|
-
params:
|
|
3035
|
-
}),
|
|
3034
|
+
params: V0
|
|
3035
|
+
}), J0 = U.extend({
|
|
3036
3036
|
action: o.union([
|
|
3037
3037
|
o.literal("accept"),
|
|
3038
3038
|
o.literal("decline"),
|
|
3039
3039
|
o.literal("cancel")
|
|
3040
3040
|
]),
|
|
3041
3041
|
content: o.optional(o.record(o.string(), o.unknown()))
|
|
3042
|
-
}),
|
|
3043
|
-
jsonrpc: o.literal(
|
|
3042
|
+
}), ce = "2.0", W0 = o.object({
|
|
3043
|
+
jsonrpc: o.literal(ce),
|
|
3044
3044
|
id: o.union([o.string(), o.number().int()])
|
|
3045
|
-
}).merge(
|
|
3046
|
-
jsonrpc: o.literal(
|
|
3045
|
+
}).merge(ht).strict(), K0 = o.object({
|
|
3046
|
+
jsonrpc: o.literal(ce),
|
|
3047
3047
|
id: o.union([o.string(), o.number().int()]),
|
|
3048
3048
|
result: U
|
|
3049
|
-
}).strict(),
|
|
3050
|
-
jsonrpc: o.literal(
|
|
3049
|
+
}).strict(), G0 = o.object({
|
|
3050
|
+
jsonrpc: o.literal(ce),
|
|
3051
3051
|
id: o.union([o.string(), o.number().int()]),
|
|
3052
3052
|
error: o.object({
|
|
3053
3053
|
code: o.number().int(),
|
|
3054
3054
|
message: o.string(),
|
|
3055
3055
|
data: o.optional(o.unknown())
|
|
3056
3056
|
})
|
|
3057
|
-
}).strict(),
|
|
3058
|
-
jsonrpc: o.literal(
|
|
3057
|
+
}).strict(), Y0 = o.object({
|
|
3058
|
+
jsonrpc: o.literal(ce)
|
|
3059
3059
|
}).merge(
|
|
3060
3060
|
o.object({
|
|
3061
3061
|
method: o.string(),
|
|
3062
|
-
params: o.optional(
|
|
3062
|
+
params: o.optional(ae)
|
|
3063
3063
|
})
|
|
3064
3064
|
).strict(), V = o.union([
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
]),
|
|
3065
|
+
W0,
|
|
3066
|
+
Y0,
|
|
3067
|
+
K0,
|
|
3068
|
+
G0
|
|
3069
|
+
]), vt = typeof __PACKAGE_VERSION__ < "u" ? __PACKAGE_VERSION__ : "0.0.0-test", _t = o.object({
|
|
3070
3070
|
access_token: o.string(),
|
|
3071
3071
|
id_token: o.string().optional(),
|
|
3072
3072
|
// Optional for OAuth 2.1, but necessary in OpenID Connect
|
|
@@ -3087,7 +3087,7 @@ var P0 = U.extend({
|
|
|
3087
3087
|
return e.protocol !== "javascript:" && e.protocol !== "data:" && e.protocol !== "vbscript:";
|
|
3088
3088
|
},
|
|
3089
3089
|
{ message: "URL cannot use javascript:, data:, or vbscript: scheme" }
|
|
3090
|
-
),
|
|
3090
|
+
), Q0 = o.object({
|
|
3091
3091
|
resource: o.string().url(),
|
|
3092
3092
|
authorization_servers: o.array(P).optional(),
|
|
3093
3093
|
jwks_uri: o.string().url().optional(),
|
|
@@ -3102,7 +3102,7 @@ var P0 = U.extend({
|
|
|
3102
3102
|
authorization_details_types_supported: o.array(o.string()).optional(),
|
|
3103
3103
|
dpop_signing_alg_values_supported: o.array(o.string()).optional(),
|
|
3104
3104
|
dpop_bound_access_tokens_required: o.boolean().optional()
|
|
3105
|
-
}).passthrough(),
|
|
3105
|
+
}).passthrough(), bt = o.object({
|
|
3106
3106
|
issuer: o.string(),
|
|
3107
3107
|
authorization_endpoint: P,
|
|
3108
3108
|
token_endpoint: P,
|
|
@@ -3113,7 +3113,7 @@ var P0 = U.extend({
|
|
|
3113
3113
|
code_challenge_methods_supported: o.array(o.string()),
|
|
3114
3114
|
token_endpoint_auth_methods_supported: o.array(o.string()).optional(),
|
|
3115
3115
|
token_endpoint_auth_signing_alg_values_supported: o.array(o.string()).optional()
|
|
3116
|
-
}).passthrough(),
|
|
3116
|
+
}).passthrough(), X0 = o.object({
|
|
3117
3117
|
issuer: o.string(),
|
|
3118
3118
|
authorization_endpoint: P,
|
|
3119
3119
|
token_endpoint: P,
|
|
@@ -3127,16 +3127,16 @@ var P0 = U.extend({
|
|
|
3127
3127
|
id_token_signing_alg_values_supported: o.array(o.string()),
|
|
3128
3128
|
claims_supported: o.array(o.string()).optional(),
|
|
3129
3129
|
token_endpoint_auth_methods_supported: o.array(o.string()).optional()
|
|
3130
|
-
}).passthrough(),
|
|
3131
|
-
|
|
3130
|
+
}).passthrough(), er = X0.merge(
|
|
3131
|
+
bt.pick({
|
|
3132
3132
|
code_challenge_methods_supported: !0
|
|
3133
3133
|
})
|
|
3134
|
-
),
|
|
3134
|
+
), tr = o.object({
|
|
3135
3135
|
client_id: o.string(),
|
|
3136
3136
|
client_secret: o.string().optional(),
|
|
3137
3137
|
client_id_issued_at: o.number().optional(),
|
|
3138
3138
|
client_secret_expires_at: o.number().optional()
|
|
3139
|
-
}).strip(),
|
|
3139
|
+
}).strip(), rr = o.object({
|
|
3140
3140
|
redirect_uris: o.array(P),
|
|
3141
3141
|
token_endpoint_auth_method: o.string().optional(),
|
|
3142
3142
|
grant_types: o.array(o.string()).optional(),
|
|
@@ -3153,46 +3153,46 @@ var P0 = U.extend({
|
|
|
3153
3153
|
software_id: o.string().optional(),
|
|
3154
3154
|
software_version: o.string().optional(),
|
|
3155
3155
|
software_statement: o.string().optional()
|
|
3156
|
-
}).strip(),
|
|
3156
|
+
}).strip(), sr = o.object({
|
|
3157
3157
|
error: o.string(),
|
|
3158
3158
|
error_description: o.string().optional(),
|
|
3159
3159
|
error_uri: o.string().optional()
|
|
3160
|
-
}),
|
|
3161
|
-
|
|
3162
|
-
),
|
|
3160
|
+
}), nr = rr.merge(
|
|
3161
|
+
tr
|
|
3162
|
+
), or = "AI_MCPClientOAuthError", xt = `vercel.ai.error.${or}`, ir = Symbol.for(xt), We, Ke, W = class extends (Ke = Q, We = ir, Ke) {
|
|
3163
3163
|
constructor({
|
|
3164
3164
|
name: r = "MCPClientOAuthError",
|
|
3165
3165
|
message: e,
|
|
3166
3166
|
cause: t
|
|
3167
3167
|
}) {
|
|
3168
|
-
super({ name: r, message: e, cause: t }), this[
|
|
3168
|
+
super({ name: r, message: e, cause: t }), this[We] = !0;
|
|
3169
3169
|
}
|
|
3170
3170
|
static isInstance(r) {
|
|
3171
|
-
return
|
|
3171
|
+
return Q.hasMarker(r, xt);
|
|
3172
3172
|
}
|
|
3173
3173
|
}, D = class extends W {
|
|
3174
3174
|
};
|
|
3175
3175
|
D.errorCode = "server_error";
|
|
3176
|
-
var Q = class extends W {
|
|
3177
|
-
};
|
|
3178
|
-
Q.errorCode = "invalid_client";
|
|
3179
3176
|
var X = class extends W {
|
|
3180
3177
|
};
|
|
3181
|
-
X.errorCode = "
|
|
3178
|
+
X.errorCode = "invalid_client";
|
|
3182
3179
|
var ee = class extends W {
|
|
3183
3180
|
};
|
|
3184
|
-
ee.errorCode = "
|
|
3185
|
-
var
|
|
3181
|
+
ee.errorCode = "invalid_grant";
|
|
3182
|
+
var te = class extends W {
|
|
3183
|
+
};
|
|
3184
|
+
te.errorCode = "unauthorized_client";
|
|
3185
|
+
var ar = {
|
|
3186
3186
|
[D.errorCode]: D,
|
|
3187
|
-
[Q.errorCode]: Q,
|
|
3188
3187
|
[X.errorCode]: X,
|
|
3189
|
-
[ee.errorCode]: ee
|
|
3188
|
+
[ee.errorCode]: ee,
|
|
3189
|
+
[te.errorCode]: te
|
|
3190
3190
|
};
|
|
3191
|
-
function
|
|
3191
|
+
function cr(r) {
|
|
3192
3192
|
const e = typeof r == "string" ? new URL(r) : new URL(r.href);
|
|
3193
3193
|
return e.hash = "", e;
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function lr({
|
|
3196
3196
|
requestedResource: r,
|
|
3197
3197
|
configuredResource: e
|
|
3198
3198
|
}) {
|
|
@@ -3202,12 +3202,12 @@ function sr({
|
|
|
3202
3202
|
const n = t.pathname.endsWith("/") ? t.pathname : t.pathname + "/", i = s.pathname.endsWith("/") ? s.pathname : s.pathname + "/";
|
|
3203
3203
|
return n.startsWith(i);
|
|
3204
3204
|
}
|
|
3205
|
-
var
|
|
3205
|
+
var re = class extends Error {
|
|
3206
3206
|
constructor(r = "Unauthorized") {
|
|
3207
3207
|
super(r), this.name = "UnauthorizedError";
|
|
3208
3208
|
}
|
|
3209
3209
|
};
|
|
3210
|
-
function
|
|
3210
|
+
function se(r) {
|
|
3211
3211
|
var e;
|
|
3212
3212
|
const t = (e = r.headers.get("www-authenticate")) != null ? e : r.headers.get("WWW-Authenticate");
|
|
3213
3213
|
if (!t)
|
|
@@ -3223,45 +3223,45 @@ function re(r) {
|
|
|
3223
3223
|
return;
|
|
3224
3224
|
}
|
|
3225
3225
|
}
|
|
3226
|
-
function
|
|
3226
|
+
function ur(r, e = "", t = {}) {
|
|
3227
3227
|
return e.endsWith("/") && (e = e.slice(0, -1)), t.prependPathname ? `${e}/.well-known/${r}` : `/.well-known/${r}${e}`;
|
|
3228
3228
|
}
|
|
3229
|
-
async function
|
|
3229
|
+
async function Ee(r, e, t = fetch) {
|
|
3230
3230
|
try {
|
|
3231
3231
|
return await t(r, { headers: e });
|
|
3232
3232
|
} catch (s) {
|
|
3233
3233
|
if (s instanceof TypeError)
|
|
3234
|
-
return e ?
|
|
3234
|
+
return e ? Ee(r, void 0, t) : void 0;
|
|
3235
3235
|
throw s;
|
|
3236
3236
|
}
|
|
3237
3237
|
}
|
|
3238
|
-
async function
|
|
3239
|
-
return await
|
|
3238
|
+
async function Ge(r, e, t = fetch) {
|
|
3239
|
+
return await Ee(r, {
|
|
3240
3240
|
"MCP-Protocol-Version": e
|
|
3241
3241
|
}, t);
|
|
3242
3242
|
}
|
|
3243
|
-
function
|
|
3243
|
+
function dr(r, e) {
|
|
3244
3244
|
return !r || r.status >= 400 && r.status < 500 && e !== "/";
|
|
3245
3245
|
}
|
|
3246
|
-
async function
|
|
3246
|
+
async function hr(r, e, t, s) {
|
|
3247
3247
|
var n, i;
|
|
3248
|
-
const a = new URL(r),
|
|
3248
|
+
const a = new URL(r), c = (n = s?.protocolVersion) != null ? n : H;
|
|
3249
3249
|
let u;
|
|
3250
3250
|
if (s?.metadataUrl)
|
|
3251
3251
|
u = new URL(s.metadataUrl);
|
|
3252
3252
|
else {
|
|
3253
|
-
const d =
|
|
3253
|
+
const d = ur(e, a.pathname);
|
|
3254
3254
|
u = new URL(d, (i = s?.metadataServerUrl) != null ? i : a), u.search = a.search;
|
|
3255
3255
|
}
|
|
3256
|
-
let
|
|
3257
|
-
if (!s?.metadataUrl &&
|
|
3256
|
+
let l = await Ge(u, c, t);
|
|
3257
|
+
if (!s?.metadataUrl && dr(l, a.pathname)) {
|
|
3258
3258
|
const d = new URL(`/.well-known/${e}`, a);
|
|
3259
|
-
|
|
3259
|
+
l = await Ge(d, c, t);
|
|
3260
3260
|
}
|
|
3261
|
-
return
|
|
3261
|
+
return l;
|
|
3262
3262
|
}
|
|
3263
|
-
async function
|
|
3264
|
-
const s = await
|
|
3263
|
+
async function pr(r, e, t = fetch) {
|
|
3264
|
+
const s = await hr(
|
|
3265
3265
|
r,
|
|
3266
3266
|
"oauth-protected-resource",
|
|
3267
3267
|
t,
|
|
@@ -3278,9 +3278,9 @@ async function ar(r, e, t = fetch) {
|
|
|
3278
3278
|
throw new Error(
|
|
3279
3279
|
`HTTP ${s.status} trying to load well-known OAuth protected resource metadata.`
|
|
3280
3280
|
);
|
|
3281
|
-
return
|
|
3281
|
+
return Q0.parse(await s.json());
|
|
3282
3282
|
}
|
|
3283
|
-
function
|
|
3283
|
+
function mr(r) {
|
|
3284
3284
|
const e = typeof r == "string" ? new URL(r) : r, t = e.pathname !== "/", s = [];
|
|
3285
3285
|
if (!t)
|
|
3286
3286
|
return s.push({
|
|
@@ -3308,38 +3308,38 @@ function cr(r) {
|
|
|
3308
3308
|
type: "oidc"
|
|
3309
3309
|
}), s;
|
|
3310
3310
|
}
|
|
3311
|
-
async function
|
|
3311
|
+
async function gr(r, {
|
|
3312
3312
|
fetchFn: e = fetch,
|
|
3313
3313
|
protocolVersion: t = H
|
|
3314
3314
|
} = {}) {
|
|
3315
3315
|
var s;
|
|
3316
|
-
const n = { "MCP-Protocol-Version": t }, i =
|
|
3317
|
-
for (const { url: a, type:
|
|
3318
|
-
const u = await
|
|
3316
|
+
const n = { "MCP-Protocol-Version": t }, i = mr(r);
|
|
3317
|
+
for (const { url: a, type: c } of i) {
|
|
3318
|
+
const u = await Ee(a, n, e);
|
|
3319
3319
|
if (u) {
|
|
3320
3320
|
if (!u.ok) {
|
|
3321
3321
|
if (u.status >= 400 && u.status < 500)
|
|
3322
3322
|
continue;
|
|
3323
3323
|
throw new Error(
|
|
3324
|
-
`HTTP ${u.status} trying to load ${
|
|
3324
|
+
`HTTP ${u.status} trying to load ${c === "oauth" ? "OAuth" : "OpenID provider"} metadata from ${a}`
|
|
3325
3325
|
);
|
|
3326
3326
|
}
|
|
3327
|
-
if (
|
|
3328
|
-
return
|
|
3327
|
+
if (c === "oauth")
|
|
3328
|
+
return bt.parse(await u.json());
|
|
3329
3329
|
{
|
|
3330
|
-
const
|
|
3330
|
+
const l = er.parse(
|
|
3331
3331
|
await u.json()
|
|
3332
3332
|
);
|
|
3333
|
-
if (!((s =
|
|
3333
|
+
if (!((s = l.code_challenge_methods_supported) != null && s.includes("S256")))
|
|
3334
3334
|
throw new Error(
|
|
3335
3335
|
`Incompatible OIDC provider at ${a}: does not support S256 code challenge method required by MCP specification`
|
|
3336
3336
|
);
|
|
3337
|
-
return
|
|
3337
|
+
return l;
|
|
3338
3338
|
}
|
|
3339
3339
|
}
|
|
3340
3340
|
}
|
|
3341
3341
|
}
|
|
3342
|
-
async function
|
|
3342
|
+
async function fr(r, {
|
|
3343
3343
|
metadata: e,
|
|
3344
3344
|
clientInformation: t,
|
|
3345
3345
|
redirectUrl: s,
|
|
@@ -3347,46 +3347,46 @@ async function ur(r, {
|
|
|
3347
3347
|
state: i,
|
|
3348
3348
|
resource: a
|
|
3349
3349
|
}) {
|
|
3350
|
-
const
|
|
3351
|
-
let
|
|
3350
|
+
const c = "code", u = "S256";
|
|
3351
|
+
let l;
|
|
3352
3352
|
if (e) {
|
|
3353
|
-
if (
|
|
3353
|
+
if (l = new URL(e.authorization_endpoint), !e.response_types_supported.includes(c))
|
|
3354
3354
|
throw new Error(
|
|
3355
|
-
`Incompatible auth server: does not support response type ${
|
|
3355
|
+
`Incompatible auth server: does not support response type ${c}`
|
|
3356
3356
|
);
|
|
3357
3357
|
if (!e.code_challenge_methods_supported || !e.code_challenge_methods_supported.includes(u))
|
|
3358
3358
|
throw new Error(
|
|
3359
3359
|
`Incompatible auth server: does not support code challenge method ${u}`
|
|
3360
3360
|
);
|
|
3361
3361
|
} else
|
|
3362
|
-
|
|
3363
|
-
const d = await
|
|
3364
|
-
return
|
|
3362
|
+
l = new URL("/authorize", r);
|
|
3363
|
+
const d = await S0(), g = d.code_verifier, h = d.code_challenge;
|
|
3364
|
+
return l.searchParams.set("response_type", c), l.searchParams.set("client_id", t.client_id), l.searchParams.set("code_challenge", h), l.searchParams.set(
|
|
3365
3365
|
"code_challenge_method",
|
|
3366
3366
|
u
|
|
3367
|
-
),
|
|
3367
|
+
), l.searchParams.set("redirect_uri", String(s)), i && l.searchParams.set("state", i), n && l.searchParams.set("scope", n), n?.includes("offline_access") && l.searchParams.append("prompt", "consent"), a && l.searchParams.set("resource", a.href), { authorizationUrl: l, codeVerifier: g };
|
|
3368
3368
|
}
|
|
3369
|
-
function
|
|
3369
|
+
function Lt(r, e) {
|
|
3370
3370
|
const t = r.client_secret !== void 0;
|
|
3371
3371
|
return e.length === 0 ? t ? "client_secret_post" : "none" : t && e.includes("client_secret_basic") ? "client_secret_basic" : t && e.includes("client_secret_post") ? "client_secret_post" : e.includes("none") ? "none" : t ? "client_secret_post" : "none";
|
|
3372
3372
|
}
|
|
3373
|
-
function
|
|
3373
|
+
function St(r, e, t, s) {
|
|
3374
3374
|
const { client_id: n, client_secret: i } = e;
|
|
3375
3375
|
switch (r) {
|
|
3376
3376
|
case "client_secret_basic":
|
|
3377
|
-
|
|
3377
|
+
yr(n, i, t);
|
|
3378
3378
|
return;
|
|
3379
3379
|
case "client_secret_post":
|
|
3380
|
-
|
|
3380
|
+
wr(n, i, s);
|
|
3381
3381
|
return;
|
|
3382
3382
|
case "none":
|
|
3383
|
-
|
|
3383
|
+
Cr(n, s);
|
|
3384
3384
|
return;
|
|
3385
3385
|
default:
|
|
3386
3386
|
throw new Error(`Unsupported client authentication method: ${r}`);
|
|
3387
3387
|
}
|
|
3388
3388
|
}
|
|
3389
|
-
function
|
|
3389
|
+
function yr(r, e, t) {
|
|
3390
3390
|
if (!e)
|
|
3391
3391
|
throw new Error(
|
|
3392
3392
|
"client_secret_basic authentication requires a client_secret"
|
|
@@ -3394,17 +3394,17 @@ function dr(r, e, t) {
|
|
|
3394
3394
|
const s = btoa(`${r}:${e}`);
|
|
3395
3395
|
t.set("Authorization", `Basic ${s}`);
|
|
3396
3396
|
}
|
|
3397
|
-
function
|
|
3397
|
+
function wr(r, e, t) {
|
|
3398
3398
|
t.set("client_id", r), e && t.set("client_secret", e);
|
|
3399
3399
|
}
|
|
3400
|
-
function
|
|
3400
|
+
function Cr(r, e) {
|
|
3401
3401
|
e.set("client_id", r);
|
|
3402
3402
|
}
|
|
3403
|
-
async function
|
|
3403
|
+
async function Ie(r) {
|
|
3404
3404
|
const e = r instanceof Response ? r.status : void 0, t = r instanceof Response ? await r.text() : r;
|
|
3405
3405
|
try {
|
|
3406
|
-
const s =
|
|
3407
|
-
return new
|
|
3406
|
+
const s = sr.parse(JSON.parse(t)), { error: n, error_description: i, error_uri: a } = s, c = ar[n] || D;
|
|
3407
|
+
return new c({
|
|
3408
3408
|
message: i || "",
|
|
3409
3409
|
cause: a
|
|
3410
3410
|
});
|
|
@@ -3413,17 +3413,17 @@ async function ke(r) {
|
|
|
3413
3413
|
return new D({ message: n });
|
|
3414
3414
|
}
|
|
3415
3415
|
}
|
|
3416
|
-
async function
|
|
3416
|
+
async function vr(r, {
|
|
3417
3417
|
metadata: e,
|
|
3418
3418
|
clientInformation: t,
|
|
3419
3419
|
authorizationCode: s,
|
|
3420
3420
|
codeVerifier: n,
|
|
3421
3421
|
redirectUri: i,
|
|
3422
3422
|
resource: a,
|
|
3423
|
-
addClientAuthentication:
|
|
3423
|
+
addClientAuthentication: c,
|
|
3424
3424
|
fetchFn: u
|
|
3425
3425
|
}) {
|
|
3426
|
-
var
|
|
3426
|
+
var l;
|
|
3427
3427
|
const d = "authorization_code", g = e?.token_endpoint ? new URL(e.token_endpoint) : new URL("/token", r);
|
|
3428
3428
|
if (e?.grant_types_supported && !e.grant_types_supported.includes(d))
|
|
3429
3429
|
throw new Error(
|
|
@@ -3438,26 +3438,26 @@ async function mr(r, {
|
|
|
3438
3438
|
code_verifier: n,
|
|
3439
3439
|
redirect_uri: String(i)
|
|
3440
3440
|
});
|
|
3441
|
-
if (
|
|
3442
|
-
|
|
3441
|
+
if (c)
|
|
3442
|
+
c(h, m, r, e);
|
|
3443
3443
|
else {
|
|
3444
|
-
const p = (
|
|
3444
|
+
const p = (l = e?.token_endpoint_auth_methods_supported) != null ? l : [], C = Lt(
|
|
3445
3445
|
t,
|
|
3446
3446
|
p
|
|
3447
3447
|
);
|
|
3448
|
-
|
|
3448
|
+
St(C, t, h, m);
|
|
3449
3449
|
}
|
|
3450
3450
|
a && m.set("resource", a.href);
|
|
3451
|
-
const
|
|
3451
|
+
const y = await (u ?? fetch)(g, {
|
|
3452
3452
|
method: "POST",
|
|
3453
3453
|
headers: h,
|
|
3454
3454
|
body: m
|
|
3455
3455
|
});
|
|
3456
|
-
if (!
|
|
3457
|
-
throw await
|
|
3458
|
-
return
|
|
3456
|
+
if (!y.ok)
|
|
3457
|
+
throw await Ie(y);
|
|
3458
|
+
return _t.parse(await y.json());
|
|
3459
3459
|
}
|
|
3460
|
-
async function
|
|
3460
|
+
async function _r(r, {
|
|
3461
3461
|
metadata: e,
|
|
3462
3462
|
clientInformation: t,
|
|
3463
3463
|
refreshToken: s,
|
|
@@ -3465,16 +3465,16 @@ async function fr(r, {
|
|
|
3465
3465
|
addClientAuthentication: i,
|
|
3466
3466
|
fetchFn: a
|
|
3467
3467
|
}) {
|
|
3468
|
-
var
|
|
3468
|
+
var c;
|
|
3469
3469
|
const u = "refresh_token";
|
|
3470
|
-
let
|
|
3470
|
+
let l;
|
|
3471
3471
|
if (e) {
|
|
3472
|
-
if (
|
|
3472
|
+
if (l = new URL(e.token_endpoint), e.grant_types_supported && !e.grant_types_supported.includes(u))
|
|
3473
3473
|
throw new Error(
|
|
3474
3474
|
`Incompatible auth server: does not support grant type ${u}`
|
|
3475
3475
|
);
|
|
3476
3476
|
} else
|
|
3477
|
-
|
|
3477
|
+
l = new URL("/token", r);
|
|
3478
3478
|
const d = new Headers({
|
|
3479
3479
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
3480
3480
|
Accept: "application/json"
|
|
@@ -3485,26 +3485,26 @@ async function fr(r, {
|
|
|
3485
3485
|
if (i)
|
|
3486
3486
|
i(d, g, r, e);
|
|
3487
3487
|
else {
|
|
3488
|
-
const m = (
|
|
3488
|
+
const m = (c = e?.token_endpoint_auth_methods_supported) != null ? c : [], y = Lt(
|
|
3489
3489
|
t,
|
|
3490
3490
|
m
|
|
3491
3491
|
);
|
|
3492
|
-
|
|
3492
|
+
St(y, t, d, g);
|
|
3493
3493
|
}
|
|
3494
3494
|
n && g.set("resource", n.href);
|
|
3495
|
-
const h = await (a ?? fetch)(
|
|
3495
|
+
const h = await (a ?? fetch)(l, {
|
|
3496
3496
|
method: "POST",
|
|
3497
3497
|
headers: d,
|
|
3498
3498
|
body: g
|
|
3499
3499
|
});
|
|
3500
3500
|
if (!h.ok)
|
|
3501
|
-
throw await
|
|
3502
|
-
return
|
|
3501
|
+
throw await Ie(h);
|
|
3502
|
+
return _t.parse({
|
|
3503
3503
|
refresh_token: s,
|
|
3504
3504
|
...await h.json()
|
|
3505
3505
|
});
|
|
3506
3506
|
}
|
|
3507
|
-
async function
|
|
3507
|
+
async function br(r, {
|
|
3508
3508
|
metadata: e,
|
|
3509
3509
|
clientMetadata: t,
|
|
3510
3510
|
fetchFn: s
|
|
@@ -3526,30 +3526,30 @@ async function gr(r, {
|
|
|
3526
3526
|
body: JSON.stringify(t)
|
|
3527
3527
|
});
|
|
3528
3528
|
if (!i.ok)
|
|
3529
|
-
throw await
|
|
3530
|
-
return
|
|
3529
|
+
throw await Ie(i);
|
|
3530
|
+
return nr.parse(await i.json());
|
|
3531
3531
|
}
|
|
3532
|
-
async function
|
|
3532
|
+
async function ne(r, e) {
|
|
3533
3533
|
var t, s;
|
|
3534
3534
|
try {
|
|
3535
|
-
return await
|
|
3535
|
+
return await me(r, e);
|
|
3536
3536
|
} catch (n) {
|
|
3537
|
-
if (n instanceof
|
|
3538
|
-
return await ((t = r.invalidateCredentials) == null ? void 0 : t.call(r, "all")), await
|
|
3539
|
-
if (n instanceof
|
|
3540
|
-
return await ((s = r.invalidateCredentials) == null ? void 0 : s.call(r, "tokens")), await
|
|
3537
|
+
if (n instanceof X || n instanceof te)
|
|
3538
|
+
return await ((t = r.invalidateCredentials) == null ? void 0 : t.call(r, "all")), await me(r, e);
|
|
3539
|
+
if (n instanceof ee)
|
|
3540
|
+
return await ((s = r.invalidateCredentials) == null ? void 0 : s.call(r, "tokens")), await me(r, e);
|
|
3541
3541
|
throw n;
|
|
3542
3542
|
}
|
|
3543
3543
|
}
|
|
3544
|
-
async function
|
|
3545
|
-
const s =
|
|
3544
|
+
async function xr(r, e, t) {
|
|
3545
|
+
const s = cr(r);
|
|
3546
3546
|
if (e.validateResourceURL)
|
|
3547
3547
|
return await e.validateResourceURL(
|
|
3548
3548
|
s,
|
|
3549
3549
|
t?.resource
|
|
3550
3550
|
);
|
|
3551
3551
|
if (t) {
|
|
3552
|
-
if (!
|
|
3552
|
+
if (!lr({
|
|
3553
3553
|
requestedResource: s,
|
|
3554
3554
|
configuredResource: t.resource
|
|
3555
3555
|
}))
|
|
@@ -3559,29 +3559,29 @@ async function yr(r, e, t) {
|
|
|
3559
3559
|
return new URL(t.resource);
|
|
3560
3560
|
}
|
|
3561
3561
|
}
|
|
3562
|
-
async function
|
|
3562
|
+
async function me(r, {
|
|
3563
3563
|
serverUrl: e,
|
|
3564
3564
|
authorizationCode: t,
|
|
3565
3565
|
scope: s,
|
|
3566
3566
|
resourceMetadataUrl: n,
|
|
3567
3567
|
fetchFn: i
|
|
3568
3568
|
}) {
|
|
3569
|
-
let a,
|
|
3569
|
+
let a, c;
|
|
3570
3570
|
try {
|
|
3571
|
-
a = await
|
|
3571
|
+
a = await pr(
|
|
3572
3572
|
e,
|
|
3573
3573
|
{ resourceMetadataUrl: n },
|
|
3574
3574
|
i
|
|
3575
|
-
), a.authorization_servers && a.authorization_servers.length > 0 && (
|
|
3575
|
+
), a.authorization_servers && a.authorization_servers.length > 0 && (c = a.authorization_servers[0]);
|
|
3576
3576
|
} catch {
|
|
3577
3577
|
}
|
|
3578
|
-
|
|
3579
|
-
const u = await
|
|
3578
|
+
c || (c = e);
|
|
3579
|
+
const u = await xr(
|
|
3580
3580
|
e,
|
|
3581
3581
|
r,
|
|
3582
3582
|
a
|
|
3583
|
-
),
|
|
3584
|
-
|
|
3583
|
+
), l = await gr(
|
|
3584
|
+
c,
|
|
3585
3585
|
{
|
|
3586
3586
|
fetchFn: i
|
|
3587
3587
|
}
|
|
@@ -3596,16 +3596,16 @@ async function he(r, {
|
|
|
3596
3596
|
throw new Error(
|
|
3597
3597
|
"OAuth client information must be saveable for dynamic registration"
|
|
3598
3598
|
);
|
|
3599
|
-
const p = await
|
|
3600
|
-
metadata:
|
|
3599
|
+
const p = await br(c, {
|
|
3600
|
+
metadata: l,
|
|
3601
3601
|
clientMetadata: r.clientMetadata,
|
|
3602
3602
|
fetchFn: i
|
|
3603
3603
|
});
|
|
3604
3604
|
await r.saveClientInformation(p), d = p;
|
|
3605
3605
|
}
|
|
3606
3606
|
if (t !== void 0) {
|
|
3607
|
-
const p = await r.codeVerifier(),
|
|
3608
|
-
metadata:
|
|
3607
|
+
const p = await r.codeVerifier(), C = await vr(c, {
|
|
3608
|
+
metadata: l,
|
|
3609
3609
|
clientInformation: d,
|
|
3610
3610
|
authorizationCode: t,
|
|
3611
3611
|
codeVerifier: p,
|
|
@@ -3614,13 +3614,13 @@ async function he(r, {
|
|
|
3614
3614
|
addClientAuthentication: r.addClientAuthentication,
|
|
3615
3615
|
fetchFn: i
|
|
3616
3616
|
});
|
|
3617
|
-
return await r.saveTokens(
|
|
3617
|
+
return await r.saveTokens(C), "AUTHORIZED";
|
|
3618
3618
|
}
|
|
3619
3619
|
const g = await r.tokens();
|
|
3620
3620
|
if (g?.refresh_token)
|
|
3621
3621
|
try {
|
|
3622
|
-
const p = await
|
|
3623
|
-
metadata:
|
|
3622
|
+
const p = await _r(c, {
|
|
3623
|
+
metadata: l,
|
|
3624
3624
|
clientInformation: d,
|
|
3625
3625
|
refreshToken: g.refresh_token,
|
|
3626
3626
|
resource: u,
|
|
@@ -3634,10 +3634,10 @@ async function he(r, {
|
|
|
3634
3634
|
!(!(p instanceof W) || p instanceof D)
|
|
3635
3635
|
) throw p;
|
|
3636
3636
|
}
|
|
3637
|
-
const h = r.state ? await r.state() : void 0, { authorizationUrl: m, codeVerifier:
|
|
3638
|
-
|
|
3637
|
+
const h = r.state ? await r.state() : void 0, { authorizationUrl: m, codeVerifier: y } = await fr(
|
|
3638
|
+
c,
|
|
3639
3639
|
{
|
|
3640
|
-
metadata:
|
|
3640
|
+
metadata: l,
|
|
3641
3641
|
clientInformation: d,
|
|
3642
3642
|
state: h,
|
|
3643
3643
|
redirectUrl: r.redirectUrl,
|
|
@@ -3645,9 +3645,9 @@ async function he(r, {
|
|
|
3645
3645
|
resource: u
|
|
3646
3646
|
}
|
|
3647
3647
|
);
|
|
3648
|
-
return await r.saveCodeVerifier(
|
|
3648
|
+
return await r.saveCodeVerifier(y), await r.redirectToAuthorization(m), "REDIRECT";
|
|
3649
3649
|
}
|
|
3650
|
-
var
|
|
3650
|
+
var Lr = class {
|
|
3651
3651
|
constructor({
|
|
3652
3652
|
url: r,
|
|
3653
3653
|
headers: e,
|
|
@@ -3665,10 +3665,10 @@ var Cr = class {
|
|
|
3665
3665
|
const t = await this.authProvider.tokens();
|
|
3666
3666
|
t?.access_token && (e.Authorization = `Bearer ${t.access_token}`);
|
|
3667
3667
|
}
|
|
3668
|
-
return
|
|
3668
|
+
return nt(
|
|
3669
3669
|
e,
|
|
3670
|
-
`ai-sdk/${
|
|
3671
|
-
|
|
3670
|
+
`ai-sdk/${vt}`,
|
|
3671
|
+
st()
|
|
3672
3672
|
);
|
|
3673
3673
|
}
|
|
3674
3674
|
async start() {
|
|
@@ -3677,43 +3677,43 @@ var Cr = class {
|
|
|
3677
3677
|
return r();
|
|
3678
3678
|
this.abortController = new AbortController();
|
|
3679
3679
|
const t = async (s = !1) => {
|
|
3680
|
-
var n, i, a,
|
|
3680
|
+
var n, i, a, c, u;
|
|
3681
3681
|
try {
|
|
3682
|
-
const
|
|
3682
|
+
const l = await this.commonHeaders({
|
|
3683
3683
|
Accept: "text/event-stream"
|
|
3684
3684
|
}), d = await fetch(this.url.href, {
|
|
3685
|
-
headers:
|
|
3685
|
+
headers: l,
|
|
3686
3686
|
signal: (n = this.abortController) == null ? void 0 : n.signal
|
|
3687
3687
|
});
|
|
3688
3688
|
if (d.status === 401 && this.authProvider && !s) {
|
|
3689
|
-
this.resourceMetadataUrl =
|
|
3689
|
+
this.resourceMetadataUrl = se(d);
|
|
3690
3690
|
try {
|
|
3691
|
-
if (await
|
|
3691
|
+
if (await ne(this.authProvider, {
|
|
3692
3692
|
serverUrl: this.url,
|
|
3693
3693
|
resourceMetadataUrl: this.resourceMetadataUrl
|
|
3694
3694
|
}) !== "AUTHORIZED") {
|
|
3695
|
-
const p = new
|
|
3695
|
+
const p = new re();
|
|
3696
3696
|
return (i = this.onerror) == null || i.call(this, p), e(p);
|
|
3697
3697
|
}
|
|
3698
|
-
} catch (
|
|
3699
|
-
return (a = this.onerror) == null || a.call(this,
|
|
3698
|
+
} catch (y) {
|
|
3699
|
+
return (a = this.onerror) == null || a.call(this, y), e(y);
|
|
3700
3700
|
}
|
|
3701
3701
|
return t(!0);
|
|
3702
3702
|
}
|
|
3703
3703
|
if (!d.ok || !d.body) {
|
|
3704
|
-
let
|
|
3705
|
-
d.status === 405 && (
|
|
3704
|
+
let y = `MCP SSE Transport Error: ${d.status} ${d.statusText}`;
|
|
3705
|
+
d.status === 405 && (y += ". This server does not support SSE transport. Try using `http` transport instead");
|
|
3706
3706
|
const p = new v({
|
|
3707
|
-
message:
|
|
3707
|
+
message: y
|
|
3708
3708
|
});
|
|
3709
|
-
return (
|
|
3709
|
+
return (c = this.onerror) == null || c.call(this, p), e(p);
|
|
3710
3710
|
}
|
|
3711
|
-
const h = d.body.pipeThrough(new TextDecoderStream()).pipeThrough(new
|
|
3712
|
-
var
|
|
3711
|
+
const h = d.body.pipeThrough(new TextDecoderStream()).pipeThrough(new we()).getReader(), m = async () => {
|
|
3712
|
+
var y, p, C;
|
|
3713
3713
|
try {
|
|
3714
3714
|
for (; ; ) {
|
|
3715
|
-
const { done:
|
|
3716
|
-
if (
|
|
3715
|
+
const { done: w, value: b } = await h.read();
|
|
3716
|
+
if (w) {
|
|
3717
3717
|
if (this.connected)
|
|
3718
3718
|
throw this.connected = !1, new v({
|
|
3719
3719
|
message: "MCP SSE Transport Error: Connection closed unexpectedly"
|
|
@@ -3732,7 +3732,7 @@ var Cr = class {
|
|
|
3732
3732
|
const k = V.parse(
|
|
3733
3733
|
JSON.parse(M)
|
|
3734
3734
|
);
|
|
3735
|
-
(
|
|
3735
|
+
(y = this.onmessage) == null || y.call(this, k);
|
|
3736
3736
|
} catch (k) {
|
|
3737
3737
|
const R = new v({
|
|
3738
3738
|
message: "MCP SSE Transport Error: Failed to parse message",
|
|
@@ -3741,19 +3741,19 @@ var Cr = class {
|
|
|
3741
3741
|
(p = this.onerror) == null || p.call(this, R);
|
|
3742
3742
|
}
|
|
3743
3743
|
}
|
|
3744
|
-
} catch (
|
|
3745
|
-
if (
|
|
3744
|
+
} catch (w) {
|
|
3745
|
+
if (w instanceof Error && w.name === "AbortError")
|
|
3746
3746
|
return;
|
|
3747
|
-
(
|
|
3747
|
+
(C = this.onerror) == null || C.call(this, w), e(w);
|
|
3748
3748
|
}
|
|
3749
3749
|
};
|
|
3750
3750
|
this.sseConnection = {
|
|
3751
3751
|
close: () => h.cancel()
|
|
3752
3752
|
}, m();
|
|
3753
|
-
} catch (
|
|
3754
|
-
if (
|
|
3753
|
+
} catch (l) {
|
|
3754
|
+
if (l instanceof Error && l.name === "AbortError")
|
|
3755
3755
|
return;
|
|
3756
|
-
(u = this.onerror) == null || u.call(this,
|
|
3756
|
+
(u = this.onerror) == null || u.call(this, l), e(l);
|
|
3757
3757
|
}
|
|
3758
3758
|
};
|
|
3759
3759
|
t();
|
|
@@ -3769,7 +3769,7 @@ var Cr = class {
|
|
|
3769
3769
|
message: "MCP SSE Transport Error: Not connected"
|
|
3770
3770
|
});
|
|
3771
3771
|
const e = this.endpoint, t = async (s = !1) => {
|
|
3772
|
-
var n, i, a,
|
|
3772
|
+
var n, i, a, c, u;
|
|
3773
3773
|
try {
|
|
3774
3774
|
const d = {
|
|
3775
3775
|
method: "POST",
|
|
@@ -3780,13 +3780,13 @@ var Cr = class {
|
|
|
3780
3780
|
signal: (n = this.abortController) == null ? void 0 : n.signal
|
|
3781
3781
|
}, g = await fetch(e, d);
|
|
3782
3782
|
if (g.status === 401 && this.authProvider && !s) {
|
|
3783
|
-
this.resourceMetadataUrl =
|
|
3783
|
+
this.resourceMetadataUrl = se(g);
|
|
3784
3784
|
try {
|
|
3785
|
-
if (await
|
|
3785
|
+
if (await ne(this.authProvider, {
|
|
3786
3786
|
serverUrl: this.url,
|
|
3787
3787
|
resourceMetadataUrl: this.resourceMetadataUrl
|
|
3788
3788
|
}) !== "AUTHORIZED") {
|
|
3789
|
-
const m = new
|
|
3789
|
+
const m = new re();
|
|
3790
3790
|
(i = this.onerror) == null || i.call(this, m);
|
|
3791
3791
|
return;
|
|
3792
3792
|
}
|
|
@@ -3800,17 +3800,17 @@ var Cr = class {
|
|
|
3800
3800
|
const h = await g.text().catch(() => null), m = new v({
|
|
3801
3801
|
message: `MCP SSE Transport Error: POSTing to endpoint (HTTP ${g.status}): ${h}`
|
|
3802
3802
|
});
|
|
3803
|
-
(
|
|
3803
|
+
(c = this.onerror) == null || c.call(this, m);
|
|
3804
3804
|
return;
|
|
3805
3805
|
}
|
|
3806
|
-
} catch (
|
|
3807
|
-
(u = this.onerror) == null || u.call(this,
|
|
3806
|
+
} catch (l) {
|
|
3807
|
+
(u = this.onerror) == null || u.call(this, l);
|
|
3808
3808
|
return;
|
|
3809
3809
|
}
|
|
3810
3810
|
};
|
|
3811
3811
|
await t();
|
|
3812
3812
|
}
|
|
3813
|
-
},
|
|
3813
|
+
}, Sr = class {
|
|
3814
3814
|
constructor({
|
|
3815
3815
|
url: r,
|
|
3816
3816
|
headers: e,
|
|
@@ -3833,10 +3833,10 @@ var Cr = class {
|
|
|
3833
3833
|
const t = await this.authProvider.tokens();
|
|
3834
3834
|
t?.access_token && (e.Authorization = `Bearer ${t.access_token}`);
|
|
3835
3835
|
}
|
|
3836
|
-
return
|
|
3836
|
+
return nt(
|
|
3837
3837
|
e,
|
|
3838
|
-
`ai-sdk/${
|
|
3839
|
-
|
|
3838
|
+
`ai-sdk/${vt}`,
|
|
3839
|
+
st()
|
|
3840
3840
|
);
|
|
3841
3841
|
}
|
|
3842
3842
|
async start() {
|
|
@@ -3865,7 +3865,7 @@ var Cr = class {
|
|
|
3865
3865
|
}
|
|
3866
3866
|
async send(r) {
|
|
3867
3867
|
const e = async (t = !1) => {
|
|
3868
|
-
var s, n, i, a,
|
|
3868
|
+
var s, n, i, a, c, u, l;
|
|
3869
3869
|
try {
|
|
3870
3870
|
const g = {
|
|
3871
3871
|
method: "POST",
|
|
@@ -3877,15 +3877,15 @@ var Cr = class {
|
|
|
3877
3877
|
signal: (s = this.abortController) == null ? void 0 : s.signal
|
|
3878
3878
|
}, h = await fetch(this.url, g), m = h.headers.get("mcp-session-id");
|
|
3879
3879
|
if (m && (this.sessionId = m), h.status === 401 && this.authProvider && !t) {
|
|
3880
|
-
this.resourceMetadataUrl =
|
|
3880
|
+
this.resourceMetadataUrl = se(h);
|
|
3881
3881
|
try {
|
|
3882
|
-
if (await
|
|
3882
|
+
if (await ne(this.authProvider, {
|
|
3883
3883
|
serverUrl: this.url,
|
|
3884
3884
|
resourceMetadataUrl: this.resourceMetadataUrl
|
|
3885
3885
|
}) !== "AUTHORIZED")
|
|
3886
|
-
throw new
|
|
3887
|
-
} catch (
|
|
3888
|
-
throw (n = this.onerror) == null || n.call(this,
|
|
3886
|
+
throw new re();
|
|
3887
|
+
} catch (w) {
|
|
3888
|
+
throw (n = this.onerror) == null || n.call(this, w), w;
|
|
3889
3889
|
}
|
|
3890
3890
|
return e(!0);
|
|
3891
3891
|
}
|
|
@@ -3894,8 +3894,8 @@ var Cr = class {
|
|
|
3894
3894
|
return;
|
|
3895
3895
|
}
|
|
3896
3896
|
if (!h.ok) {
|
|
3897
|
-
const
|
|
3898
|
-
let b = `MCP HTTP Transport Error: POSTing to endpoint (HTTP ${h.status}): ${
|
|
3897
|
+
const w = await h.text().catch(() => null);
|
|
3898
|
+
let b = `MCP HTTP Transport Error: POSTing to endpoint (HTTP ${h.status}): ${w}`;
|
|
3899
3899
|
h.status === 404 && (b += ". This server does not support HTTP transport. Try using `sse` transport instead");
|
|
3900
3900
|
const x = new v({
|
|
3901
3901
|
message: b
|
|
@@ -3906,7 +3906,7 @@ var Cr = class {
|
|
|
3906
3906
|
return;
|
|
3907
3907
|
const p = h.headers.get("content-type") || "";
|
|
3908
3908
|
if (p.includes("application/json")) {
|
|
3909
|
-
const
|
|
3909
|
+
const w = await h.json(), b = Array.isArray(w) ? w.map((x) => V.parse(x)) : [V.parse(w)];
|
|
3910
3910
|
for (const x of b) (a = this.onmessage) == null || a.call(this, x);
|
|
3911
3911
|
return;
|
|
3912
3912
|
}
|
|
@@ -3915,9 +3915,9 @@ var Cr = class {
|
|
|
3915
3915
|
const M = new v({
|
|
3916
3916
|
message: "MCP HTTP Transport Error: text/event-stream response without body"
|
|
3917
3917
|
});
|
|
3918
|
-
throw (
|
|
3918
|
+
throw (c = this.onerror) == null || c.call(this, M), M;
|
|
3919
3919
|
}
|
|
3920
|
-
const b = h.body.pipeThrough(new TextDecoderStream()).pipeThrough(new
|
|
3920
|
+
const b = h.body.pipeThrough(new TextDecoderStream()).pipeThrough(new we()).getReader();
|
|
3921
3921
|
(async () => {
|
|
3922
3922
|
var M, k, R;
|
|
3923
3923
|
try {
|
|
@@ -3945,12 +3945,12 @@ var Cr = class {
|
|
|
3945
3945
|
})();
|
|
3946
3946
|
return;
|
|
3947
3947
|
}
|
|
3948
|
-
const
|
|
3948
|
+
const C = new v({
|
|
3949
3949
|
message: `MCP HTTP Transport Error: Unexpected content type: ${p}`
|
|
3950
3950
|
});
|
|
3951
|
-
throw (u = this.onerror) == null || u.call(this,
|
|
3951
|
+
throw (u = this.onerror) == null || u.call(this, C), C;
|
|
3952
3952
|
} catch (d) {
|
|
3953
|
-
throw (
|
|
3953
|
+
throw (l = this.onerror) == null || l.call(this, d), d;
|
|
3954
3954
|
}
|
|
3955
3955
|
};
|
|
3956
3956
|
await e();
|
|
@@ -3986,45 +3986,45 @@ var Cr = class {
|
|
|
3986
3986
|
}
|
|
3987
3987
|
// Open optional inbound SSE stream; best-effort and resumable
|
|
3988
3988
|
async openInboundSse(r = !1, e) {
|
|
3989
|
-
var t, s, n, i, a,
|
|
3989
|
+
var t, s, n, i, a, c;
|
|
3990
3990
|
try {
|
|
3991
3991
|
const u = await this.commonHeaders({
|
|
3992
3992
|
Accept: "text/event-stream"
|
|
3993
3993
|
});
|
|
3994
3994
|
e && (u["last-event-id"] = e);
|
|
3995
|
-
const
|
|
3995
|
+
const l = await fetch(this.url.href, {
|
|
3996
3996
|
method: "GET",
|
|
3997
3997
|
headers: u,
|
|
3998
3998
|
signal: (t = this.abortController) == null ? void 0 : t.signal
|
|
3999
|
-
}), d =
|
|
4000
|
-
if (d && (this.sessionId = d),
|
|
4001
|
-
this.resourceMetadataUrl =
|
|
3999
|
+
}), d = l.headers.get("mcp-session-id");
|
|
4000
|
+
if (d && (this.sessionId = d), l.status === 401 && this.authProvider && !r) {
|
|
4001
|
+
this.resourceMetadataUrl = se(l);
|
|
4002
4002
|
try {
|
|
4003
|
-
if (await
|
|
4003
|
+
if (await ne(this.authProvider, {
|
|
4004
4004
|
serverUrl: this.url,
|
|
4005
4005
|
resourceMetadataUrl: this.resourceMetadataUrl
|
|
4006
4006
|
}) !== "AUTHORIZED") {
|
|
4007
|
-
const p = new
|
|
4007
|
+
const p = new re();
|
|
4008
4008
|
(s = this.onerror) == null || s.call(this, p);
|
|
4009
4009
|
return;
|
|
4010
4010
|
}
|
|
4011
|
-
} catch (
|
|
4012
|
-
(n = this.onerror) == null || n.call(this,
|
|
4011
|
+
} catch (y) {
|
|
4012
|
+
(n = this.onerror) == null || n.call(this, y);
|
|
4013
4013
|
return;
|
|
4014
4014
|
}
|
|
4015
4015
|
return this.openInboundSse(!0, e);
|
|
4016
4016
|
}
|
|
4017
|
-
if (
|
|
4017
|
+
if (l.status === 405)
|
|
4018
4018
|
return;
|
|
4019
|
-
if (!
|
|
4020
|
-
const
|
|
4021
|
-
message: `MCP HTTP Transport Error: GET SSE failed: ${
|
|
4019
|
+
if (!l.ok || !l.body) {
|
|
4020
|
+
const y = new v({
|
|
4021
|
+
message: `MCP HTTP Transport Error: GET SSE failed: ${l.status} ${l.statusText}`
|
|
4022
4022
|
});
|
|
4023
|
-
(i = this.onerror) == null || i.call(this,
|
|
4023
|
+
(i = this.onerror) == null || i.call(this, y);
|
|
4024
4024
|
return;
|
|
4025
4025
|
}
|
|
4026
|
-
const h =
|
|
4027
|
-
var
|
|
4026
|
+
const h = l.body.pipeThrough(new TextDecoderStream()).pipeThrough(new we()).getReader(), m = async () => {
|
|
4027
|
+
var y, p, C, w;
|
|
4028
4028
|
try {
|
|
4029
4029
|
for (; ; ) {
|
|
4030
4030
|
const { done: b, value: x } = await h.read();
|
|
@@ -4033,7 +4033,7 @@ var Cr = class {
|
|
|
4033
4033
|
if (R && (this.lastInboundEventId = R), M === "message")
|
|
4034
4034
|
try {
|
|
4035
4035
|
const E = V.parse(JSON.parse(k));
|
|
4036
|
-
(
|
|
4036
|
+
(y = this.onmessage) == null || y.call(this, E);
|
|
4037
4037
|
} catch (E) {
|
|
4038
4038
|
const q = new v({
|
|
4039
4039
|
message: "MCP HTTP Transport Error: Failed to parse message",
|
|
@@ -4045,7 +4045,7 @@ var Cr = class {
|
|
|
4045
4045
|
} catch (b) {
|
|
4046
4046
|
if (b instanceof Error && b.name === "AbortError")
|
|
4047
4047
|
return;
|
|
4048
|
-
(
|
|
4048
|
+
(C = this.onerror) == null || C.call(this, b), (w = this.abortController) != null && w.signal.aborted || this.scheduleInboundSseReconnection();
|
|
4049
4049
|
}
|
|
4050
4050
|
};
|
|
4051
4051
|
this.inboundSseConnection = {
|
|
@@ -4054,27 +4054,27 @@ var Cr = class {
|
|
|
4054
4054
|
} catch (u) {
|
|
4055
4055
|
if (u instanceof Error && u.name === "AbortError")
|
|
4056
4056
|
return;
|
|
4057
|
-
(a = this.onerror) == null || a.call(this, u), (
|
|
4057
|
+
(a = this.onerror) == null || a.call(this, u), (c = this.abortController) != null && c.signal.aborted || this.scheduleInboundSseReconnection();
|
|
4058
4058
|
}
|
|
4059
4059
|
}
|
|
4060
4060
|
};
|
|
4061
|
-
function
|
|
4061
|
+
function Pr(r) {
|
|
4062
4062
|
switch (r.type) {
|
|
4063
4063
|
case "sse":
|
|
4064
|
-
return new
|
|
4064
|
+
return new Lr(r);
|
|
4065
4065
|
case "http":
|
|
4066
|
-
return new
|
|
4066
|
+
return new Sr(r);
|
|
4067
4067
|
default:
|
|
4068
4068
|
throw new v({
|
|
4069
4069
|
message: "Unsupported or invalid transport configuration. If you are using a custom transport, make sure it implements the MCPTransport interface."
|
|
4070
4070
|
});
|
|
4071
4071
|
}
|
|
4072
4072
|
}
|
|
4073
|
-
function
|
|
4073
|
+
function kr(r) {
|
|
4074
4074
|
return "start" in r && typeof r.start == "function" && "send" in r && typeof r.send == "function" && "close" in r && typeof r.close == "function";
|
|
4075
4075
|
}
|
|
4076
|
-
var
|
|
4077
|
-
function
|
|
4076
|
+
var Tr = "1.0.0";
|
|
4077
|
+
function Ye({
|
|
4078
4078
|
output: r
|
|
4079
4079
|
}) {
|
|
4080
4080
|
const e = r;
|
|
@@ -4086,19 +4086,19 @@ function Ve({
|
|
|
4086
4086
|
} : { type: "text", text: JSON.stringify(s) }
|
|
4087
4087
|
) };
|
|
4088
4088
|
}
|
|
4089
|
-
async function
|
|
4090
|
-
const e = new
|
|
4089
|
+
async function Mr(r) {
|
|
4090
|
+
const e = new Rr(r);
|
|
4091
4091
|
return await e.init(), e;
|
|
4092
4092
|
}
|
|
4093
|
-
var
|
|
4093
|
+
var Rr = class {
|
|
4094
4094
|
constructor({
|
|
4095
4095
|
transport: r,
|
|
4096
4096
|
name: e = "ai-sdk-mcp-client",
|
|
4097
|
-
version: t =
|
|
4097
|
+
version: t = Tr,
|
|
4098
4098
|
onUncaughtError: s,
|
|
4099
4099
|
capabilities: n
|
|
4100
4100
|
}) {
|
|
4101
|
-
this.requestMessageId = 0, this.responseHandlers = /* @__PURE__ */ new Map(), this.serverCapabilities = {}, this.isClosed = !0, this.onUncaughtError = s, this.clientCapabilities = n ?? {},
|
|
4101
|
+
this.requestMessageId = 0, this.responseHandlers = /* @__PURE__ */ new Map(), this.serverCapabilities = {}, this.isClosed = !0, this.onUncaughtError = s, this.clientCapabilities = n ?? {}, kr(r) ? this.transport = r : this.transport = Pr(r), this.transport.onclose = () => this.onClose(), this.transport.onerror = (i) => this.onError(i), this.transport.onmessage = (i) => {
|
|
4102
4102
|
if ("method" in i) {
|
|
4103
4103
|
"id" in i ? this.onRequestMessage(i) : this.onError(
|
|
4104
4104
|
new v({
|
|
@@ -4125,13 +4125,13 @@ var Lr = class {
|
|
|
4125
4125
|
clientInfo: this.clientInfo
|
|
4126
4126
|
}
|
|
4127
4127
|
},
|
|
4128
|
-
resultSchema:
|
|
4128
|
+
resultSchema: I0
|
|
4129
4129
|
});
|
|
4130
4130
|
if (r === void 0)
|
|
4131
4131
|
throw new v({
|
|
4132
4132
|
message: "Server sent invalid initialize result"
|
|
4133
4133
|
});
|
|
4134
|
-
if (!
|
|
4134
|
+
if (!T0.includes(r.protocolVersion))
|
|
4135
4135
|
throw new v({
|
|
4136
4136
|
message: `Server's protocol version is not supported: ${r.protocolVersion}`
|
|
4137
4137
|
});
|
|
@@ -4193,14 +4193,14 @@ var Lr = class {
|
|
|
4193
4193
|
this.assertCapability(r.method);
|
|
4194
4194
|
const i = t?.signal;
|
|
4195
4195
|
i?.throwIfAborted();
|
|
4196
|
-
const a = this.requestMessageId++,
|
|
4196
|
+
const a = this.requestMessageId++, c = {
|
|
4197
4197
|
...r,
|
|
4198
4198
|
jsonrpc: "2.0",
|
|
4199
4199
|
id: a
|
|
4200
4200
|
}, u = () => {
|
|
4201
4201
|
this.responseHandlers.delete(a);
|
|
4202
4202
|
};
|
|
4203
|
-
this.responseHandlers.set(a, (
|
|
4203
|
+
this.responseHandlers.set(a, (l) => {
|
|
4204
4204
|
if (i?.aborted)
|
|
4205
4205
|
return n(
|
|
4206
4206
|
new v({
|
|
@@ -4208,10 +4208,10 @@ var Lr = class {
|
|
|
4208
4208
|
cause: i.reason
|
|
4209
4209
|
})
|
|
4210
4210
|
);
|
|
4211
|
-
if (
|
|
4212
|
-
return n(
|
|
4211
|
+
if (l instanceof Error)
|
|
4212
|
+
return n(l);
|
|
4213
4213
|
try {
|
|
4214
|
-
const d = e.parse(
|
|
4214
|
+
const d = e.parse(l.result);
|
|
4215
4215
|
s(d);
|
|
4216
4216
|
} catch (d) {
|
|
4217
4217
|
const g = new v({
|
|
@@ -4220,8 +4220,8 @@ var Lr = class {
|
|
|
4220
4220
|
});
|
|
4221
4221
|
n(g);
|
|
4222
4222
|
}
|
|
4223
|
-
}), this.transport.send(
|
|
4224
|
-
u(), n(
|
|
4223
|
+
}), this.transport.send(c).catch((l) => {
|
|
4224
|
+
u(), n(l);
|
|
4225
4225
|
});
|
|
4226
4226
|
});
|
|
4227
4227
|
}
|
|
@@ -4231,7 +4231,7 @@ var Lr = class {
|
|
|
4231
4231
|
} = {}) {
|
|
4232
4232
|
return this.request({
|
|
4233
4233
|
request: { method: "tools/list", params: r },
|
|
4234
|
-
resultSchema:
|
|
4234
|
+
resultSchema: O0,
|
|
4235
4235
|
options: e
|
|
4236
4236
|
});
|
|
4237
4237
|
}
|
|
@@ -4243,7 +4243,7 @@ var Lr = class {
|
|
|
4243
4243
|
try {
|
|
4244
4244
|
return this.request({
|
|
4245
4245
|
request: { method: "tools/call", params: { name: r, arguments: e } },
|
|
4246
|
-
resultSchema:
|
|
4246
|
+
resultSchema: j0,
|
|
4247
4247
|
options: {
|
|
4248
4248
|
signal: t?.abortSignal
|
|
4249
4249
|
}
|
|
@@ -4259,7 +4259,7 @@ var Lr = class {
|
|
|
4259
4259
|
try {
|
|
4260
4260
|
return this.request({
|
|
4261
4261
|
request: { method: "resources/list", params: r },
|
|
4262
|
-
resultSchema:
|
|
4262
|
+
resultSchema: U0,
|
|
4263
4263
|
options: e
|
|
4264
4264
|
});
|
|
4265
4265
|
} catch (t) {
|
|
@@ -4273,7 +4273,7 @@ var Lr = class {
|
|
|
4273
4273
|
try {
|
|
4274
4274
|
return this.request({
|
|
4275
4275
|
request: { method: "resources/read", params: { uri: r } },
|
|
4276
|
-
resultSchema:
|
|
4276
|
+
resultSchema: q0,
|
|
4277
4277
|
options: e
|
|
4278
4278
|
});
|
|
4279
4279
|
} catch (t) {
|
|
@@ -4286,7 +4286,7 @@ var Lr = class {
|
|
|
4286
4286
|
try {
|
|
4287
4287
|
return this.request({
|
|
4288
4288
|
request: { method: "resources/templates/list" },
|
|
4289
|
-
resultSchema:
|
|
4289
|
+
resultSchema: Z0,
|
|
4290
4290
|
options: r
|
|
4291
4291
|
});
|
|
4292
4292
|
} catch (e) {
|
|
@@ -4300,7 +4300,7 @@ var Lr = class {
|
|
|
4300
4300
|
try {
|
|
4301
4301
|
return this.request({
|
|
4302
4302
|
request: { method: "prompts/list", params: r },
|
|
4303
|
-
resultSchema:
|
|
4303
|
+
resultSchema: H0,
|
|
4304
4304
|
options: e
|
|
4305
4305
|
});
|
|
4306
4306
|
} catch (t) {
|
|
@@ -4315,7 +4315,7 @@ var Lr = class {
|
|
|
4315
4315
|
try {
|
|
4316
4316
|
return this.request({
|
|
4317
4317
|
request: { method: "prompts/get", params: { name: r, arguments: e } },
|
|
4318
|
-
resultSchema:
|
|
4318
|
+
resultSchema: B0,
|
|
4319
4319
|
options: t
|
|
4320
4320
|
});
|
|
4321
4321
|
} catch (s) {
|
|
@@ -4351,36 +4351,36 @@ var Lr = class {
|
|
|
4351
4351
|
for (const {
|
|
4352
4352
|
name: i,
|
|
4353
4353
|
title: a,
|
|
4354
|
-
description:
|
|
4354
|
+
description: c,
|
|
4355
4355
|
inputSchema: u,
|
|
4356
|
-
annotations:
|
|
4356
|
+
annotations: l,
|
|
4357
4357
|
_meta: d
|
|
4358
4358
|
} of r.tools) {
|
|
4359
|
-
const g = a ??
|
|
4359
|
+
const g = a ?? l?.title;
|
|
4360
4360
|
if (e !== "automatic" && !(i in e))
|
|
4361
4361
|
continue;
|
|
4362
|
-
const h = this, m = e !== "automatic" ? (t = e[i]) == null ? void 0 : t.outputSchema : void 0,
|
|
4362
|
+
const h = this, m = e !== "automatic" ? (t = e[i]) == null ? void 0 : t.outputSchema : void 0, y = async (C, w) => {
|
|
4363
4363
|
var b;
|
|
4364
|
-
(b =
|
|
4365
|
-
const x = await h.callTool({ name: i, args:
|
|
4364
|
+
(b = w?.abortSignal) == null || b.throwIfAborted();
|
|
4365
|
+
const x = await h.callTool({ name: i, args: C, options: w });
|
|
4366
4366
|
return m != null ? h.extractStructuredContent(x, m, i) : x;
|
|
4367
|
-
}, p = e === "automatic" ?
|
|
4368
|
-
description:
|
|
4367
|
+
}, p = e === "automatic" ? v0({
|
|
4368
|
+
description: c,
|
|
4369
4369
|
title: g,
|
|
4370
4370
|
inputSchema: J({
|
|
4371
4371
|
...u,
|
|
4372
4372
|
properties: (s = u.properties) != null ? s : {},
|
|
4373
4373
|
additionalProperties: !1
|
|
4374
4374
|
}),
|
|
4375
|
-
execute:
|
|
4376
|
-
toModelOutput:
|
|
4375
|
+
execute: y,
|
|
4376
|
+
toModelOutput: Ye
|
|
4377
4377
|
}) : {
|
|
4378
|
-
description:
|
|
4378
|
+
description: c,
|
|
4379
4379
|
title: g,
|
|
4380
4380
|
inputSchema: e[i].inputSchema,
|
|
4381
4381
|
...m != null ? { outputSchema: m } : {},
|
|
4382
|
-
execute:
|
|
4383
|
-
toModelOutput:
|
|
4382
|
+
execute: y,
|
|
4383
|
+
toModelOutput: Ye
|
|
4384
4384
|
};
|
|
4385
4385
|
n[i] = { ...p, _meta: d };
|
|
4386
4386
|
}
|
|
@@ -4391,9 +4391,9 @@ var Lr = class {
|
|
|
4391
4391
|
*/
|
|
4392
4392
|
async extractStructuredContent(r, e, t) {
|
|
4393
4393
|
if ("structuredContent" in r && r.structuredContent != null) {
|
|
4394
|
-
const s = await
|
|
4394
|
+
const s = await ut({
|
|
4395
4395
|
value: r.structuredContent,
|
|
4396
|
-
schema:
|
|
4396
|
+
schema: lt(e)
|
|
4397
4397
|
});
|
|
4398
4398
|
if (!s.success)
|
|
4399
4399
|
throw new v({
|
|
@@ -4405,7 +4405,7 @@ var Lr = class {
|
|
|
4405
4405
|
if ("content" in r && Array.isArray(r.content)) {
|
|
4406
4406
|
const s = r.content.find((n) => n.type === "text");
|
|
4407
4407
|
if (s && "text" in s) {
|
|
4408
|
-
const n = await
|
|
4408
|
+
const n = await C0({
|
|
4409
4409
|
text: s.text,
|
|
4410
4410
|
schema: e
|
|
4411
4411
|
});
|
|
@@ -4452,7 +4452,7 @@ var Lr = class {
|
|
|
4452
4452
|
return this.getPromptInternal({ name: r, args: e, options: t });
|
|
4453
4453
|
}
|
|
4454
4454
|
onElicitationRequest(r, e) {
|
|
4455
|
-
if (r !==
|
|
4455
|
+
if (r !== Je)
|
|
4456
4456
|
throw new v({
|
|
4457
4457
|
message: "Unsupported request schema. Only ElicitationRequestSchema is supported."
|
|
4458
4458
|
});
|
|
@@ -4482,7 +4482,7 @@ var Lr = class {
|
|
|
4482
4482
|
});
|
|
4483
4483
|
return;
|
|
4484
4484
|
}
|
|
4485
|
-
const e =
|
|
4485
|
+
const e = Je.safeParse({
|
|
4486
4486
|
method: r.method,
|
|
4487
4487
|
params: r.params
|
|
4488
4488
|
});
|
|
@@ -4499,7 +4499,7 @@ var Lr = class {
|
|
|
4499
4499
|
return;
|
|
4500
4500
|
}
|
|
4501
4501
|
try {
|
|
4502
|
-
const t = await this.elicitationRequestHandler(e.data), s =
|
|
4502
|
+
const t = await this.elicitationRequestHandler(e.data), s = J0.parse(t);
|
|
4503
4503
|
await this.transport.send({
|
|
4504
4504
|
jsonrpc: "2.0",
|
|
4505
4505
|
id: r.id,
|
|
@@ -4550,15 +4550,15 @@ var Lr = class {
|
|
|
4550
4550
|
);
|
|
4551
4551
|
}
|
|
4552
4552
|
};
|
|
4553
|
-
const
|
|
4553
|
+
const Er = async (r) => {
|
|
4554
4554
|
const e = {};
|
|
4555
4555
|
try {
|
|
4556
4556
|
const t = await r.listTools();
|
|
4557
4557
|
for (const { name: s, description: n, inputSchema: i } of t.tools) {
|
|
4558
|
-
const a = async (
|
|
4559
|
-
e[s] =
|
|
4558
|
+
const a = async (c, u) => r.callTool({ name: s, arguments: c }, { signal: u?.abortSignal });
|
|
4559
|
+
e[s] = Yt({
|
|
4560
4560
|
description: n,
|
|
4561
|
-
inputSchema:
|
|
4561
|
+
inputSchema: Qt({
|
|
4562
4562
|
...i,
|
|
4563
4563
|
properties: i.properties ?? {},
|
|
4564
4564
|
additionalProperties: !1
|
|
@@ -4571,55 +4571,57 @@ const Sr = async (r) => {
|
|
|
4571
4571
|
throw t;
|
|
4572
4572
|
}
|
|
4573
4573
|
};
|
|
4574
|
-
function
|
|
4574
|
+
function Ir(r) {
|
|
4575
4575
|
const e = Object.entries(r);
|
|
4576
4576
|
if (e.length === 0)
|
|
4577
4577
|
return "";
|
|
4578
4578
|
let t = `
|
|
4579
|
-
|
|
4580
4579
|
# 工具调用
|
|
4581
4580
|
|
|
4582
|
-
|
|
4583
|
-
return t += `你可以根据需要调用以下工具:
|
|
4581
|
+
你可以根据需要调用以下工具:
|
|
4584
4582
|
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4583
|
+
<tools>
|
|
4584
|
+
`;
|
|
4585
|
+
return e.forEach(([s, n]) => {
|
|
4586
|
+
const i = n, a = i.description || "无描述", c = i.parameters || i.inputSchema || {};
|
|
4588
4587
|
t += `${JSON.stringify({
|
|
4589
4588
|
name: s,
|
|
4590
4589
|
description: a,
|
|
4591
|
-
parameters:
|
|
4590
|
+
parameters: c
|
|
4592
4591
|
}, null, 2)}
|
|
4593
4592
|
`;
|
|
4594
|
-
}), t +=
|
|
4593
|
+
}), t += `
|
|
4594
|
+
</tools>
|
|
4595
4595
|
|
|
4596
|
-
|
|
4596
|
+
## 工具调用格式
|
|
4597
4597
|
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4598
|
+
要调用工具,请使用以下 XML 格式:
|
|
4599
|
+
Thought: [你的思考过程]
|
|
4600
|
+
<tool_call>
|
|
4601
|
+
{"name": "toolName", "arguments": {"arg1": "value1"}}
|
|
4602
|
+
</tool_call>
|
|
4601
4603
|
|
|
4602
|
-
|
|
4604
|
+
工具执行后,你将收到 <tool_response> 格式的结果。你可以继续思考或调用其他工具。
|
|
4603
4605
|
|
|
4604
|
-
|
|
4606
|
+
## 使用示例
|
|
4605
4607
|
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4608
|
+
如果用户要求"获取今天的日期",你可以这样调用工具:
|
|
4609
|
+
Thought: 用户想要获取今天的日期,我需要调用日期相关的工具。
|
|
4610
|
+
<tool_call>{"name": "get-today", "arguments": {}}</tool_call>
|
|
4609
4611
|
|
|
4610
|
-
|
|
4612
|
+
然后等待工具返回结果(Observation),再根据结果给出最终答案。
|
|
4611
4613
|
|
|
4612
|
-
|
|
4614
|
+
## 任务完成
|
|
4613
4615
|
|
|
4614
|
-
|
|
4616
|
+
当任务完成或无法继续时,直接给出最终答案即可。
|
|
4615
4617
|
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4618
|
+
**重要提示**:
|
|
4619
|
+
- 必须严格按照 XML 格式调用工具
|
|
4620
|
+
- arguments 必须是有效的 JSON 格式
|
|
4621
|
+
- 如果不需要调用工具,直接给出最终答案即可
|
|
4620
4622
|
`, t;
|
|
4621
4623
|
}
|
|
4622
|
-
function
|
|
4624
|
+
function Qe(r, e) {
|
|
4623
4625
|
if (!r || typeof r != "string")
|
|
4624
4626
|
return null;
|
|
4625
4627
|
const t = r.match(/<tool_call>([\s\S]*?)<\/tool_call>/i);
|
|
@@ -4632,11 +4634,11 @@ function Je(r, e) {
|
|
|
4632
4634
|
}
|
|
4633
4635
|
return null;
|
|
4634
4636
|
}
|
|
4635
|
-
const
|
|
4636
|
-
openai:
|
|
4637
|
-
deepseek:
|
|
4637
|
+
const Ar = {
|
|
4638
|
+
openai: r2,
|
|
4639
|
+
deepseek: s2
|
|
4638
4640
|
};
|
|
4639
|
-
class
|
|
4641
|
+
class gs {
|
|
4640
4642
|
constructor({ llmConfig: e, mcpServers: t }) {
|
|
4641
4643
|
if (this.mcpServers = {}, this.mcpClients = {}, this.mcpTools = {}, this.ignoreToolnames = [], this.responseMessages = [], this.useReActMode = !1, !e)
|
|
4642
4644
|
throw new Error("llmConfig is required to initialize AgentModelProvider");
|
|
@@ -4645,7 +4647,7 @@ class as {
|
|
|
4645
4647
|
else if (e.providerType) {
|
|
4646
4648
|
const s = e.providerType;
|
|
4647
4649
|
let n;
|
|
4648
|
-
typeof s == "string" ? n =
|
|
4650
|
+
typeof s == "string" ? n = Ar[s] : n = s, this.llm = n({
|
|
4649
4651
|
apiKey: e.apiKey,
|
|
4650
4652
|
baseURL: e.baseURL
|
|
4651
4653
|
});
|
|
@@ -4657,11 +4659,11 @@ class as {
|
|
|
4657
4659
|
async _createOneClient(e) {
|
|
4658
4660
|
try {
|
|
4659
4661
|
let t;
|
|
4660
|
-
if ("type" in e && e.type.toLocaleLowerCase() === "streamablehttp" ? t = new
|
|
4661
|
-
const n = await
|
|
4662
|
+
if ("type" in e && e.type.toLocaleLowerCase() === "streamablehttp" ? t = new ie(new URL(e.url)) : "type" in e && e.type === "extension" ? t = new i2(e.sessionId) : "transport" in e ? t = e.transport : t = e, e.useAISdkClient ?? !1) {
|
|
4663
|
+
const n = await Mr({ transport: t });
|
|
4662
4664
|
return n.__transport__ = t, n;
|
|
4663
4665
|
} else {
|
|
4664
|
-
const n = new
|
|
4666
|
+
const n = new n2(
|
|
4665
4667
|
{ name: "mcp-web-client", version: "1.0.0" },
|
|
4666
4668
|
{ capabilities: { roots: { listChanged: !0 }, sampling: {}, elicitation: {} } }
|
|
4667
4669
|
);
|
|
@@ -4675,7 +4677,7 @@ class as {
|
|
|
4675
4677
|
async _closeOneClient(e) {
|
|
4676
4678
|
try {
|
|
4677
4679
|
const t = e.__transport__;
|
|
4678
|
-
if (t && t instanceof
|
|
4680
|
+
if (t && t instanceof Ut || t && t instanceof $t)
|
|
4679
4681
|
return;
|
|
4680
4682
|
await t?.terminateSession?.(), await t?.close?.(), await e?.close?.();
|
|
4681
4683
|
} catch {
|
|
@@ -4698,7 +4700,7 @@ class as {
|
|
|
4698
4700
|
if (!e)
|
|
4699
4701
|
return null;
|
|
4700
4702
|
try {
|
|
4701
|
-
return typeof e.tools == "function" ? await e.tools() : await
|
|
4703
|
+
return typeof e.tools == "function" ? await e.tools() : await Er(e);
|
|
4702
4704
|
} catch (s) {
|
|
4703
4705
|
return this.onError && this.onError(s?.message || `Failed to query tools for ${t}`, s), console.error(`Failed to query tools for ${t}`, s), null;
|
|
4704
4706
|
}
|
|
@@ -4772,7 +4774,7 @@ class as {
|
|
|
4772
4774
|
}
|
|
4773
4775
|
/** 生成 ReAct 模式的系统提示词(包含工具描述) */
|
|
4774
4776
|
_generateReActSystemPrompt(e, t, s) {
|
|
4775
|
-
const n =
|
|
4777
|
+
const n = Ir(e);
|
|
4776
4778
|
return s ? `${s}${n}` : `你是一个智能助手,可以通过调用工具来完成任务。
|
|
4777
4779
|
${n}`;
|
|
4778
4780
|
}
|
|
@@ -4796,10 +4798,10 @@ ${n}`;
|
|
|
4796
4798
|
const i = this._tempMergeTools(n.tools);
|
|
4797
4799
|
if (Object.keys(i).length === 0)
|
|
4798
4800
|
return this._chat(e, { model: t, maxSteps: s, ...n });
|
|
4799
|
-
let
|
|
4800
|
-
n.message && !n.messages ?
|
|
4801
|
-
const u = typeof t == "string" ? t : t?.modelId || "default-model", d = { role: "system", content: this._generateReActSystemPrompt(i, u, n.system) }, g =
|
|
4802
|
-
return e ===
|
|
4801
|
+
let c = [];
|
|
4802
|
+
n.message && !n.messages ? c.push({ role: "user", content: n.message }) : n.messages ? c = [...n.messages] : c = [...this.responseMessages];
|
|
4803
|
+
const u = typeof t == "string" ? t : t?.modelId || "default-model", d = { role: "system", content: this._generateReActSystemPrompt(i, u, n.system) }, g = c[0]?.role === "system" ? c : [d, ...c];
|
|
4804
|
+
return e === ue ? this._chatReActStream(g, i, u, s, n) : this._chatReActNonStream(g, i, u, s, n);
|
|
4803
4805
|
}
|
|
4804
4806
|
/**
|
|
4805
4807
|
* 检查消息内容是否包含图片
|
|
@@ -4839,8 +4841,8 @@ ${n}`;
|
|
|
4839
4841
|
e && n.push(e);
|
|
4840
4842
|
let i = 0;
|
|
4841
4843
|
const a = [];
|
|
4842
|
-
for (let
|
|
4843
|
-
const u = t[
|
|
4844
|
+
for (let c = t.length - 1; c >= 0; c--) {
|
|
4845
|
+
const u = t[c];
|
|
4844
4846
|
if (this._messageHasImage(u.content))
|
|
4845
4847
|
if (i < s)
|
|
4846
4848
|
a.unshift(u), i++;
|
|
@@ -4856,22 +4858,22 @@ ${n}`;
|
|
|
4856
4858
|
/** ReAct 模式非流式对话 */
|
|
4857
4859
|
async _chatReActNonStream(e, t, s, n, i) {
|
|
4858
4860
|
let a = [...e];
|
|
4859
|
-
const
|
|
4860
|
-
let
|
|
4861
|
+
const c = e[0]?.role === "system" ? e[0] : null, u = c ? e.slice(1) : e;
|
|
4862
|
+
let l = 0;
|
|
4861
4863
|
const d = i.maxImages ?? 3;
|
|
4862
|
-
for (;
|
|
4863
|
-
|
|
4864
|
-
const h = this._buildMessagesForModel(
|
|
4864
|
+
for (; l < n; ) {
|
|
4865
|
+
l++;
|
|
4866
|
+
const h = this._buildMessagesForModel(c, u, d), { tools: m, ...y } = i, C = (await $e({
|
|
4865
4867
|
// @ts-ignore ProviderV2 是所有llm的父类,在每一个具体的llm类都有一个选择model的函数用法
|
|
4866
4868
|
model: this.llm(s),
|
|
4867
4869
|
messages: h,
|
|
4868
|
-
...
|
|
4869
|
-
})).text,
|
|
4870
|
-
u.push(
|
|
4871
|
-
const b =
|
|
4870
|
+
...y
|
|
4871
|
+
})).text, w = { role: "assistant", content: C };
|
|
4872
|
+
u.push(w), a.push(w);
|
|
4873
|
+
const b = Qe(C, t);
|
|
4872
4874
|
if (!b)
|
|
4873
4875
|
return this.responseMessages = a, {
|
|
4874
|
-
text:
|
|
4876
|
+
text: C,
|
|
4875
4877
|
response: { messages: a }
|
|
4876
4878
|
};
|
|
4877
4879
|
const x = await this._executeReActToolCall(b.toolName, b.arguments, t), R = {
|
|
@@ -4889,27 +4891,27 @@ ${x.success ? JSON.stringify(x.result) : `工具执行失败 - ${x.error}`}
|
|
|
4889
4891
|
}
|
|
4890
4892
|
/** ReAct 模式流式对话 */
|
|
4891
4893
|
_chatReActStream(e, t, s, n, i) {
|
|
4892
|
-
const a = this,
|
|
4893
|
-
let u,
|
|
4894
|
+
const a = this, c = this.llm(s);
|
|
4895
|
+
let u, l;
|
|
4894
4896
|
const d = new Promise((h, m) => {
|
|
4895
|
-
u = h,
|
|
4897
|
+
u = h, l = m;
|
|
4896
4898
|
});
|
|
4897
4899
|
return {
|
|
4898
4900
|
fullStream: new ReadableStream({
|
|
4899
4901
|
async start(h) {
|
|
4900
4902
|
let m = [...e];
|
|
4901
|
-
const
|
|
4902
|
-
let
|
|
4903
|
+
const y = e[0]?.role === "system" ? e[0] : null, p = y ? e.slice(1) : [...e];
|
|
4904
|
+
let C = 0, w = "";
|
|
4903
4905
|
const b = i.maxImages ?? 3;
|
|
4904
4906
|
h.enqueue({ type: "start" }), h.enqueue({ type: "start-step" });
|
|
4905
4907
|
try {
|
|
4906
|
-
for (;
|
|
4907
|
-
|
|
4908
|
-
const x = a._buildMessagesForModel(
|
|
4908
|
+
for (; C < n; ) {
|
|
4909
|
+
C++;
|
|
4910
|
+
const x = a._buildMessagesForModel(y, p, b), { tools: M, ...k } = i;
|
|
4909
4911
|
delete k.system, delete k.onFinish;
|
|
4910
|
-
const R = await
|
|
4912
|
+
const R = await ue({
|
|
4911
4913
|
...k,
|
|
4912
|
-
model:
|
|
4914
|
+
model: c,
|
|
4913
4915
|
messages: x
|
|
4914
4916
|
});
|
|
4915
4917
|
let E = "";
|
|
@@ -4918,10 +4920,10 @@ ${x.success ? JSON.stringify(x.result) : `工具执行失败 - ${x.error}`}
|
|
|
4918
4920
|
type: "text-delta",
|
|
4919
4921
|
text: L.text
|
|
4920
4922
|
})) : L.type === "text-start" ? h.enqueue({ type: "text-start" }) : L.type === "text-end" || L.type === "finish-step" || L.type === "finish" || L.type === "start" || L.type === "start-step" || h.enqueue(L);
|
|
4921
|
-
|
|
4922
|
-
const q = { role: "assistant", content:
|
|
4923
|
+
w += E;
|
|
4924
|
+
const q = { role: "assistant", content: w };
|
|
4923
4925
|
p.push(q), m.push(q);
|
|
4924
|
-
const I =
|
|
4926
|
+
const I = Qe(w, t);
|
|
4925
4927
|
if (!I) {
|
|
4926
4928
|
h.enqueue({ type: "text-end" }), h.enqueue({ type: "finish-step" }), h.enqueue({ type: "finish" }), h.close(), a.responseMessages = m, u({ messages: m });
|
|
4927
4929
|
return;
|
|
@@ -4951,35 +4953,35 @@ ${x.success ? JSON.stringify(x.result) : `工具执行失败 - ${x.error}`}
|
|
|
4951
4953
|
input: I.arguments
|
|
4952
4954
|
});
|
|
4953
4955
|
const A = await a._executeReActToolCall(I.toolName, I.arguments, t);
|
|
4954
|
-
let
|
|
4956
|
+
let G, N = A.result;
|
|
4955
4957
|
if (A.success && A.result && typeof A.result == "object" && A.result.screenshot) {
|
|
4956
|
-
|
|
4957
|
-
const { screenshot: L, ...
|
|
4958
|
-
|
|
4958
|
+
G = A.result.screenshot;
|
|
4959
|
+
const { screenshot: L, ...Y } = A.result;
|
|
4960
|
+
N = Y;
|
|
4959
4961
|
}
|
|
4960
4962
|
let B = "";
|
|
4961
4963
|
if (A.success) {
|
|
4962
|
-
|
|
4964
|
+
N && Array.isArray(N.content) && N.content.length > 0 && N.content[0].text ? B = N.content[0].text : B = JSON.stringify(N);
|
|
4963
4965
|
let L = `<tool_response>
|
|
4964
4966
|
${B}
|
|
4965
4967
|
</tool_response>`;
|
|
4966
|
-
|
|
4968
|
+
G && (L += `
|
|
4967
4969
|
请检查截图以确认操作是否成功。如果成功,请继续下一步;如果失败,请重试。`), h.enqueue({
|
|
4968
4970
|
type: "tool-result",
|
|
4969
4971
|
toolCallId: j,
|
|
4970
4972
|
result: L
|
|
4971
4973
|
});
|
|
4972
|
-
const
|
|
4974
|
+
const Y = G ? {
|
|
4973
4975
|
role: "user",
|
|
4974
4976
|
content: [
|
|
4975
4977
|
{ type: "text", text: L },
|
|
4976
|
-
{ type: "image", image:
|
|
4978
|
+
{ type: "image", image: G }
|
|
4977
4979
|
]
|
|
4978
4980
|
} : {
|
|
4979
4981
|
role: "user",
|
|
4980
4982
|
content: L
|
|
4981
4983
|
};
|
|
4982
|
-
p.push(
|
|
4984
|
+
p.push(Y), m.push(Y), w = "";
|
|
4983
4985
|
} else
|
|
4984
4986
|
B = `工具执行失败 - ${A.error}`, h.enqueue({
|
|
4985
4987
|
type: "tool-error",
|
|
@@ -4990,7 +4992,7 @@ ${B}
|
|
|
4990
4992
|
}
|
|
4991
4993
|
h.enqueue({ type: "text-end" }), h.enqueue({ type: "finish-step" }), h.enqueue({ type: "finish" }), h.close(), a.responseMessages = m, u({ messages: m });
|
|
4992
4994
|
} catch (x) {
|
|
4993
|
-
h.error(x),
|
|
4995
|
+
h.error(x), l(x);
|
|
4994
4996
|
}
|
|
4995
4997
|
}
|
|
4996
4998
|
}),
|
|
@@ -5006,7 +5008,7 @@ ${B}
|
|
|
5006
5008
|
const i = {
|
|
5007
5009
|
// @ts-ignore ProviderV2 是所有llm的父类, 在每一个具体的llm 类都有一个选择model的函数用法
|
|
5008
5010
|
model: this.llm(t),
|
|
5009
|
-
stopWhen:
|
|
5011
|
+
stopWhen: Xt(s),
|
|
5010
5012
|
...n,
|
|
5011
5013
|
tools: this._tempMergeTools(n.tools)
|
|
5012
5014
|
};
|
|
@@ -5017,44 +5019,131 @@ ${B}
|
|
|
5017
5019
|
const u = n.messages[n.messages.length - 1];
|
|
5018
5020
|
u.role === "user" && (a = u);
|
|
5019
5021
|
}
|
|
5020
|
-
const
|
|
5021
|
-
return
|
|
5022
|
-
const
|
|
5023
|
-
a &&
|
|
5024
|
-
}),
|
|
5022
|
+
const c = e(i);
|
|
5023
|
+
return c?.response?.then((u) => {
|
|
5024
|
+
const l = u.messages?.[0];
|
|
5025
|
+
a && l?.role !== "user" && this.responseMessages.push(a), this.responseMessages.push(...u.messages);
|
|
5026
|
+
}), c;
|
|
5025
5027
|
}
|
|
5026
5028
|
async chat(e) {
|
|
5027
|
-
return this._chat(
|
|
5029
|
+
return this._chat($e, e);
|
|
5028
5030
|
}
|
|
5029
5031
|
async chatStream(e) {
|
|
5030
|
-
return this._chat(
|
|
5032
|
+
return this._chat(ue, e);
|
|
5031
5033
|
}
|
|
5032
5034
|
}
|
|
5033
|
-
const
|
|
5034
|
-
|
|
5035
|
-
|
|
5035
|
+
const Pt = "next-sdk:tool-call", _e = "next-sdk:tool-response", kt = "next-sdk:page-ready", oe = /* @__PURE__ */ new Map();
|
|
5036
|
+
let be = null;
|
|
5037
|
+
function fs(r) {
|
|
5038
|
+
be = r;
|
|
5039
|
+
}
|
|
5040
|
+
function Or(r, e, t = 3e4) {
|
|
5041
|
+
return (s) => {
|
|
5042
|
+
const n = ke();
|
|
5043
|
+
return new Promise((i, a) => {
|
|
5044
|
+
let c, u;
|
|
5045
|
+
const l = () => {
|
|
5046
|
+
clearTimeout(c), window.removeEventListener("message", d), u && window.removeEventListener("message", u);
|
|
5047
|
+
};
|
|
5048
|
+
c = setTimeout(() => {
|
|
5049
|
+
l(), a(new Error(`工具 [${r}] 调用超时 (${t}ms),请检查目标页面是否正确调用了 registerPageTool`));
|
|
5050
|
+
}, t);
|
|
5051
|
+
const d = (p) => {
|
|
5052
|
+
p.source === window && p.data?.type === _e && p.data.callId === n && (l(), p.data.error ? a(new Error(p.data.error)) : i(p.data.result));
|
|
5053
|
+
};
|
|
5054
|
+
window.addEventListener("message", d);
|
|
5055
|
+
const g = () => {
|
|
5056
|
+
window.postMessage({ type: Pt, callId: n, toolName: r, route: e, input: s }, window.location.origin || "*");
|
|
5057
|
+
};
|
|
5058
|
+
let h = !1;
|
|
5059
|
+
const m = () => {
|
|
5060
|
+
h || (h = !0, g());
|
|
5061
|
+
};
|
|
5062
|
+
(async () => {
|
|
5063
|
+
try {
|
|
5064
|
+
if (oe.get(e)) {
|
|
5065
|
+
m();
|
|
5066
|
+
return;
|
|
5067
|
+
}
|
|
5068
|
+
u = (p) => {
|
|
5069
|
+
p.source === window && p.data?.type === kt && p.data.route === e && (window.removeEventListener("message", u), m());
|
|
5070
|
+
}, window.addEventListener("message", u), be && await be(e), oe.get(e) && (window.removeEventListener("message", u), m());
|
|
5071
|
+
} catch (p) {
|
|
5072
|
+
l(), a(p instanceof Error ? p : new Error(String(p)));
|
|
5073
|
+
}
|
|
5074
|
+
})();
|
|
5075
|
+
});
|
|
5076
|
+
};
|
|
5077
|
+
}
|
|
5078
|
+
function ys(r) {
|
|
5079
|
+
return new Proxy(r, {
|
|
5080
|
+
get(e, t, s) {
|
|
5081
|
+
return t === "registerTool" ? (n, i, a) => {
|
|
5082
|
+
if (typeof a == "function")
|
|
5083
|
+
return e.registerTool(n, i, a);
|
|
5084
|
+
const { route: c, timeout: u } = a;
|
|
5085
|
+
return e.registerTool(n, i, Or(n, c, u));
|
|
5086
|
+
} : Reflect.get(e, t, s);
|
|
5087
|
+
}
|
|
5088
|
+
});
|
|
5089
|
+
}
|
|
5090
|
+
function ws(r) {
|
|
5091
|
+
const { handlers: e } = r, t = window.location.pathname, s = async (n) => {
|
|
5092
|
+
if (n.source !== window || n.data?.type !== Pt || n.data?.route !== t || !(n.data.toolName in e))
|
|
5093
|
+
return;
|
|
5094
|
+
const { callId: i, toolName: a, input: c } = n.data;
|
|
5095
|
+
try {
|
|
5096
|
+
const u = await e[a](c);
|
|
5097
|
+
window.postMessage({ type: _e, callId: i, result: u }, window.location.origin || "*");
|
|
5098
|
+
} catch (u) {
|
|
5099
|
+
window.postMessage(
|
|
5100
|
+
{
|
|
5101
|
+
type: _e,
|
|
5102
|
+
callId: i,
|
|
5103
|
+
error: u instanceof Error ? u.message : String(u)
|
|
5104
|
+
},
|
|
5105
|
+
window.location.origin || "*"
|
|
5106
|
+
);
|
|
5107
|
+
}
|
|
5108
|
+
};
|
|
5109
|
+
return oe.set(t, !0), window.addEventListener("message", s), window.postMessage({ type: kt, route: t }, window.location.origin || "*"), () => {
|
|
5110
|
+
oe.delete(t), window.removeEventListener("message", s);
|
|
5111
|
+
};
|
|
5112
|
+
}
|
|
5113
|
+
const Tt = /^\.\/[^/]+\/SKILL\.md$/, $r = /^---\s*\n([\s\S]+?)\s*\n---/;
|
|
5114
|
+
function Ur(r) {
|
|
5115
|
+
const e = r.match($r);
|
|
5036
5116
|
if (!e?.[1]) return null;
|
|
5037
5117
|
const t = e[1], s = t.match(/^name:\s*(.+)$/m), n = t.match(/^description:\s*(.+)$/m), i = s?.[1]?.trim(), a = n?.[1]?.trim();
|
|
5038
5118
|
return i && a ? { name: i, description: a } : null;
|
|
5039
5119
|
}
|
|
5040
|
-
function
|
|
5041
|
-
|
|
5120
|
+
function K(r) {
|
|
5121
|
+
const e = {};
|
|
5122
|
+
for (const [t, s] of Object.entries(r)) {
|
|
5123
|
+
const n = t.replace(/\\/g, "/"), i = n.lastIndexOf("skills/"), a = i >= 0 ? n.slice(i + 7) : n, c = a.startsWith("./") ? a : `./${a}`;
|
|
5124
|
+
e[c] = s;
|
|
5125
|
+
}
|
|
5126
|
+
return e;
|
|
5127
|
+
}
|
|
5128
|
+
function jr(r) {
|
|
5129
|
+
const e = K(r);
|
|
5130
|
+
return Object.keys(e).filter((t) => Tt.test(t));
|
|
5042
5131
|
}
|
|
5043
|
-
function
|
|
5044
|
-
const e =
|
|
5045
|
-
for (const
|
|
5046
|
-
const
|
|
5047
|
-
if (!
|
|
5048
|
-
const
|
|
5049
|
-
|
|
5050
|
-
name:
|
|
5051
|
-
description:
|
|
5052
|
-
path:
|
|
5132
|
+
function Cs(r) {
|
|
5133
|
+
const e = K(r), t = Object.keys(e).filter((n) => Tt.test(n)), s = [];
|
|
5134
|
+
for (const n of t) {
|
|
5135
|
+
const i = e[n];
|
|
5136
|
+
if (!i) continue;
|
|
5137
|
+
const a = Ur(i);
|
|
5138
|
+
a && s.push({
|
|
5139
|
+
name: a.name,
|
|
5140
|
+
description: a.description,
|
|
5141
|
+
path: n
|
|
5053
5142
|
});
|
|
5054
5143
|
}
|
|
5055
|
-
return
|
|
5144
|
+
return s;
|
|
5056
5145
|
}
|
|
5057
|
-
function
|
|
5146
|
+
function vs(r) {
|
|
5058
5147
|
return r.length === 0 ? "" : `## 可用技能
|
|
5059
5148
|
|
|
5060
5149
|
${r.map((t) => `- **${t.name}**: ${t.description}`).join(`
|
|
@@ -5062,72 +5151,78 @@ ${r.map((t) => `- **${t.name}**: ${t.description}`).join(`
|
|
|
5062
5151
|
|
|
5063
5152
|
当需要用到某技能时,请使用 get_skill_content 工具获取该技能的完整文档内容。`;
|
|
5064
5153
|
}
|
|
5065
|
-
function
|
|
5066
|
-
|
|
5154
|
+
function _s(r) {
|
|
5155
|
+
const e = K(r);
|
|
5156
|
+
return Object.keys(e);
|
|
5067
5157
|
}
|
|
5068
|
-
function
|
|
5069
|
-
return r[e];
|
|
5158
|
+
function Xe(r, e) {
|
|
5159
|
+
return K(r)[e];
|
|
5070
5160
|
}
|
|
5071
|
-
function
|
|
5072
|
-
return
|
|
5161
|
+
function et(r, e) {
|
|
5162
|
+
return jr(r).find((t) => t.startsWith(`./${e}/SKILL.md`));
|
|
5073
5163
|
}
|
|
5074
|
-
|
|
5164
|
+
const Nr = le.object({
|
|
5165
|
+
skillName: le.string().optional().describe("技能名称,与目录名一致,如 calculator"),
|
|
5166
|
+
path: le.string().optional().describe("文档相对路径,如 ./calculator/SKILL.md 或 ./product-guide/reference/xxx.json")
|
|
5167
|
+
});
|
|
5168
|
+
function bs(r) {
|
|
5169
|
+
const e = K(r);
|
|
5075
5170
|
return {
|
|
5076
|
-
get_skill_content:
|
|
5077
|
-
description: "
|
|
5078
|
-
inputSchema:
|
|
5079
|
-
|
|
5080
|
-
path:
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
else if (s) {
|
|
5088
|
-
const a = Ke(r, s);
|
|
5089
|
-
i = a ? We(r, a) : void 0;
|
|
5171
|
+
get_skill_content: e2({
|
|
5172
|
+
description: "根据技能名称或文档路径获取该技能的完整文档内容。传入 skillName(如 calculator)或 path(如 ./calculator/SKILL.md)。支持 .md、.json、.xml 等各类文本格式文件。",
|
|
5173
|
+
inputSchema: Nr,
|
|
5174
|
+
execute: (s) => {
|
|
5175
|
+
const { skillName: n, path: i } = s;
|
|
5176
|
+
let a;
|
|
5177
|
+
if (i)
|
|
5178
|
+
a = Xe(e, i);
|
|
5179
|
+
else if (n) {
|
|
5180
|
+
const c = et(e, n);
|
|
5181
|
+
a = c ? Xe(e, c) : void 0;
|
|
5090
5182
|
}
|
|
5091
|
-
return
|
|
5183
|
+
return a === void 0 ? { error: "未找到对应技能文档", skillName: n ?? i } : { content: a, path: i ?? et(e, n) };
|
|
5092
5184
|
}
|
|
5093
5185
|
})
|
|
5094
5186
|
};
|
|
5095
5187
|
}
|
|
5096
5188
|
export {
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5189
|
+
gs as AgentModelProvider,
|
|
5190
|
+
Ss as Ajv,
|
|
5191
|
+
Ms as AuthClientProvider,
|
|
5192
|
+
ps as ContentScriptServerTransport,
|
|
5193
|
+
i2 as ExtensionClientTransport,
|
|
5194
|
+
hs as ExtensionPageServerTransport,
|
|
5195
|
+
Zs as InMemoryTransport,
|
|
5196
|
+
a2 as QrCode,
|
|
5197
|
+
Es as ResourceTemplate,
|
|
5198
|
+
As as UriTemplate,
|
|
5199
|
+
n2 as WebMcpClient,
|
|
5200
|
+
ts as WebMcpServer,
|
|
5201
|
+
$s as completable,
|
|
5202
|
+
cs as createMessageChannelClientTransport,
|
|
5203
|
+
ss as createMessageChannelPairTransport,
|
|
5204
|
+
rs as createMessageChannelServerTransport,
|
|
5205
|
+
ms as createRemoter,
|
|
5206
|
+
is as createSSEClientTransport,
|
|
5207
|
+
bs as createSkillTools,
|
|
5208
|
+
as as createStreamableHTTPClientTransport,
|
|
5209
|
+
vs as formatSkillsForSystemPrompt,
|
|
5210
|
+
Er as getAISDKTools,
|
|
5211
|
+
js as getDisplayName,
|
|
5212
|
+
et as getMainSkillPathByName,
|
|
5213
|
+
jr as getMainSkillPaths,
|
|
5214
|
+
Xe as getSkillMdContent,
|
|
5215
|
+
_s as getSkillMdPaths,
|
|
5216
|
+
Cs as getSkillOverviews,
|
|
5217
|
+
ds as isMcpClient,
|
|
5218
|
+
os as isMcpServer,
|
|
5219
|
+
us as isMessageChannelClientTransport,
|
|
5220
|
+
ns as isMessageChannelServerTransport,
|
|
5221
|
+
ls as isSSEClientTransport,
|
|
5222
|
+
o2 as isStreamableHTTPClientTransport,
|
|
5223
|
+
Ur as parseSkillFrontMatter,
|
|
5224
|
+
ws as registerPageTool,
|
|
5225
|
+
fs as setNavigator,
|
|
5226
|
+
ys as withPageTools,
|
|
5227
|
+
ks as z
|
|
5133
5228
|
};
|