@wanji_dsh/dsh-sales 0.11.2 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.zh.md +23 -3
- package/config/langfuse.production.example.json +11 -0
- package/config/production.cordis.yml +36 -0
- package/dist/client.js +238 -113
- package/dist/host.js +1581 -988
- package/dist/types/agent-knowledge.d.ts +8 -1
- package/dist/types/company/identity.d.ts +2 -0
- package/dist/types/diagnostics.d.ts +28 -0
- package/dist/types/host.d.ts +6 -1
- package/dist/types/knowledge-host.d.ts +5 -2
- package/dist/types/knowledge-http-correlation.d.ts +14 -0
- package/dist/types/knowledge-privacy.d.ts +3 -1
- package/dist/types/langfuse-config.d.ts +1 -1
- package/dist/types/production-endpoints.d.ts +8 -0
- package/dist/types/question-tracing.d.ts +2 -0
- package/dist/types/sales-model.d.ts +2 -0
- package/dist/types/update/coordinator.d.ts +6 -0
- package/dist/types/update/types.d.ts +2 -0
- package/dist/types/wechat/runtime.d.ts +1 -0
- package/dist/types/wechat/service.d.ts +2 -0
- package/dist/types/weknora-http.d.ts +1 -1
- package/docs/auto-update.md +3 -3
- package/docs/diagnostics.zh.md +43 -0
- package/package.json +4 -1
- package/runtime/wechat-manifest.json +1 -1
package/dist/client.js
CHANGED
|
@@ -158,7 +158,7 @@ var import_react3 = __toESM(require("react"), 1);
|
|
|
158
158
|
// src/reply-content.tsx
|
|
159
159
|
var import_react2 = __toESM(require("react"), 1);
|
|
160
160
|
|
|
161
|
-
//
|
|
161
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-to-string/lib/index.js
|
|
162
162
|
var emptyOptions = {};
|
|
163
163
|
function toString(value, options) {
|
|
164
164
|
const settings = options || emptyOptions;
|
|
@@ -195,7 +195,7 @@ function node(value) {
|
|
|
195
195
|
return Boolean(value && typeof value === "object");
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
//
|
|
198
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/decode-named-character-reference/index.dom.js
|
|
199
199
|
var element = document.createElement("i");
|
|
200
200
|
function decodeNamedCharacterReference(value) {
|
|
201
201
|
const characterReference2 = "&" + value + ";";
|
|
@@ -207,7 +207,7 @@ function decodeNamedCharacterReference(value) {
|
|
|
207
207
|
return character === characterReference2 ? false : character;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
//
|
|
210
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-chunked/index.js
|
|
211
211
|
function splice(list2, start, remove, items) {
|
|
212
212
|
const end = list2.length;
|
|
213
213
|
let chunkStart = 0;
|
|
@@ -241,7 +241,7 @@ function push(list2, items) {
|
|
|
241
241
|
return items;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
//
|
|
244
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-combine-extensions/index.js
|
|
245
245
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
246
246
|
function combineExtensions(extensions) {
|
|
247
247
|
const all2 = {};
|
|
@@ -281,7 +281,7 @@ function constructs(existing, list2) {
|
|
|
281
281
|
splice(existing, 0, 0, before);
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
//
|
|
284
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-decode-numeric-character-reference/index.js
|
|
285
285
|
function decodeNumericCharacterReference(value, base) {
|
|
286
286
|
const code2 = Number.parseInt(value, base);
|
|
287
287
|
if (
|
|
@@ -299,12 +299,12 @@ function decodeNumericCharacterReference(value, base) {
|
|
|
299
299
|
return String.fromCodePoint(code2);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
//
|
|
302
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-normalize-identifier/index.js
|
|
303
303
|
function normalizeIdentifier(value) {
|
|
304
304
|
return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
//
|
|
307
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-character/index.js
|
|
308
308
|
var asciiAlpha = regexCheck(/[A-Za-z]/);
|
|
309
309
|
var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
|
|
310
310
|
var asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/);
|
|
@@ -336,7 +336,7 @@ function regexCheck(regex) {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
//
|
|
339
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-space/index.js
|
|
340
340
|
function factorySpace(effects, ok3, type, max) {
|
|
341
341
|
const limit = max ? max - 1 : Infinity;
|
|
342
342
|
let size = 0;
|
|
@@ -381,7 +381,7 @@ function factorySpaceMinMax(effects, ok3, nok, type, min, max) {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
//
|
|
384
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/content.js
|
|
385
385
|
var content = {
|
|
386
386
|
tokenize: initializeContent
|
|
387
387
|
};
|
|
@@ -431,7 +431,7 @@ function initializeContent(effects) {
|
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
//
|
|
434
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-edit-map/index.js
|
|
435
435
|
var EditMap = class {
|
|
436
436
|
/**
|
|
437
437
|
* Create a new edit map.
|
|
@@ -529,7 +529,7 @@ function addImplementation(editMap, at, remove, add, before) {
|
|
|
529
529
|
editMap.index.set(at, change);
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
//
|
|
532
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/document.js
|
|
533
533
|
var document2 = {
|
|
534
534
|
tokenize: initializeDocument
|
|
535
535
|
};
|
|
@@ -723,7 +723,7 @@ function tokenizeContainer(effects, ok3, nok) {
|
|
|
723
723
|
return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok3, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
724
724
|
}
|
|
725
725
|
|
|
726
|
-
//
|
|
726
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-classify-character/index.js
|
|
727
727
|
function classifyCharacter(code2) {
|
|
728
728
|
if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {
|
|
729
729
|
return 1;
|
|
@@ -733,7 +733,7 @@ function classifyCharacter(code2) {
|
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
|
|
736
|
-
//
|
|
736
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-resolve-all/index.js
|
|
737
737
|
function resolveAll(constructs2, events, context) {
|
|
738
738
|
const called = [];
|
|
739
739
|
let index2 = -1;
|
|
@@ -747,7 +747,7 @@ function resolveAll(constructs2, events, context) {
|
|
|
747
747
|
return events;
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
//
|
|
750
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/attention.js
|
|
751
751
|
var attention = {
|
|
752
752
|
name: "attention",
|
|
753
753
|
resolveAll: resolveAllAttention,
|
|
@@ -870,7 +870,7 @@ function movePoint(point3, offset) {
|
|
|
870
870
|
point3._bufferIndex += offset;
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
//
|
|
873
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
874
874
|
var autolink = {
|
|
875
875
|
name: "autolink",
|
|
876
876
|
tokenize: tokenizeAutolink
|
|
@@ -971,7 +971,7 @@ function tokenizeAutolink(effects, ok3, nok) {
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
|
|
974
|
-
//
|
|
974
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
975
975
|
var blankLine = {
|
|
976
976
|
partial: true,
|
|
977
977
|
tokenize: tokenizeBlankLine
|
|
@@ -986,7 +986,7 @@ function tokenizeBlankLine(effects, ok3, nok) {
|
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
988
|
|
|
989
|
-
//
|
|
989
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/block-quote.js
|
|
990
990
|
var blockQuote = {
|
|
991
991
|
continuation: {
|
|
992
992
|
tokenize: tokenizeBlockQuoteContinuation
|
|
@@ -1044,7 +1044,7 @@ function exit(effects) {
|
|
|
1044
1044
|
effects.exit("blockQuote");
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
-
//
|
|
1047
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/character-escape.js
|
|
1048
1048
|
var characterEscape = {
|
|
1049
1049
|
name: "characterEscape",
|
|
1050
1050
|
tokenize: tokenizeCharacterEscape
|
|
@@ -1070,7 +1070,7 @@ function tokenizeCharacterEscape(effects, ok3, nok) {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
|
-
//
|
|
1073
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/character-reference.js
|
|
1074
1074
|
var characterReference = {
|
|
1075
1075
|
name: "characterReference",
|
|
1076
1076
|
tokenize: tokenizeCharacterReference
|
|
@@ -1135,7 +1135,7 @@ function tokenizeCharacterReference(effects, ok3, nok) {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
|
-
//
|
|
1138
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js
|
|
1139
1139
|
var nonLazyContinuation = {
|
|
1140
1140
|
partial: true,
|
|
1141
1141
|
tokenize: tokenizeNonLazyContinuation
|
|
@@ -1157,7 +1157,7 @@ function tokenizeNonLazyContinuation(effects, ok3, nok) {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
|
-
//
|
|
1160
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/code-fenced.js
|
|
1161
1161
|
var codeFenced = {
|
|
1162
1162
|
concrete: true,
|
|
1163
1163
|
name: "codeFenced",
|
|
@@ -1320,7 +1320,7 @@ function tokenizeCodeFenced(effects, ok3, nok) {
|
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
|
-
//
|
|
1323
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/code-indented.js
|
|
1324
1324
|
var codeIndented = {
|
|
1325
1325
|
name: "codeIndented",
|
|
1326
1326
|
tokenize: tokenizeCodeIndented
|
|
@@ -1378,7 +1378,7 @@ function tokenizeFurtherStart(effects, ok3, nok) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
|
-
//
|
|
1381
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/code-text.js
|
|
1382
1382
|
var codeText = {
|
|
1383
1383
|
name: "codeText",
|
|
1384
1384
|
previous,
|
|
@@ -1493,7 +1493,7 @@ function tokenizeCodeText(effects, ok3, nok) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
|
|
1496
|
-
//
|
|
1496
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-subtokenize/lib/splice-buffer.js
|
|
1497
1497
|
var SpliceBuffer = class {
|
|
1498
1498
|
/**
|
|
1499
1499
|
* @param {ReadonlyArray<T> | null | undefined} [initial]
|
|
@@ -1686,7 +1686,7 @@ function chunkedPush(list2, right) {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
|
|
1689
|
-
//
|
|
1689
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-subtokenize/index.js
|
|
1690
1690
|
function subtokenize(eventsArray) {
|
|
1691
1691
|
const jumps = {};
|
|
1692
1692
|
let index2 = -1;
|
|
@@ -1839,7 +1839,7 @@ function subcontent(events, eventIndex) {
|
|
|
1839
1839
|
return gaps;
|
|
1840
1840
|
}
|
|
1841
1841
|
|
|
1842
|
-
//
|
|
1842
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/content.js
|
|
1843
1843
|
var content2 = {
|
|
1844
1844
|
resolve: resolveContent,
|
|
1845
1845
|
tokenize: tokenizeContent
|
|
@@ -1910,7 +1910,7 @@ function tokenizeContinuation(effects, ok3, nok) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
|
-
//
|
|
1913
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-destination/index.js
|
|
1914
1914
|
function factoryDestination(effects, ok3, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
|
|
1915
1915
|
const limit = max || Number.POSITIVE_INFINITY;
|
|
1916
1916
|
let balance = 0;
|
|
@@ -2002,7 +2002,7 @@ function factoryDestination(effects, ok3, nok, type, literalType, literalMarkerT
|
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
2004
|
|
|
2005
|
-
//
|
|
2005
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-label/index.js
|
|
2006
2006
|
function factoryLabel(effects, ok3, nok, type, markerType, stringType) {
|
|
2007
2007
|
const self = this;
|
|
2008
2008
|
let size = 0;
|
|
@@ -2063,7 +2063,7 @@ function factoryLabel(effects, ok3, nok, type, markerType, stringType) {
|
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
2065
|
|
|
2066
|
-
//
|
|
2066
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-title/index.js
|
|
2067
2067
|
function factoryTitle(effects, ok3, nok, type, markerType, stringType) {
|
|
2068
2068
|
let marker;
|
|
2069
2069
|
return start;
|
|
@@ -2125,7 +2125,7 @@ function factoryTitle(effects, ok3, nok, type, markerType, stringType) {
|
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
|
|
2128
|
-
//
|
|
2128
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-factory-whitespace/index.js
|
|
2129
2129
|
function factoryWhitespace(effects, ok3) {
|
|
2130
2130
|
let seen;
|
|
2131
2131
|
return start;
|
|
@@ -2144,7 +2144,7 @@ function factoryWhitespace(effects, ok3) {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
}
|
|
2146
2146
|
|
|
2147
|
-
//
|
|
2147
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/definition.js
|
|
2148
2148
|
var definition = {
|
|
2149
2149
|
name: "definition",
|
|
2150
2150
|
tokenize: tokenizeDefinition
|
|
@@ -2230,7 +2230,7 @@ function tokenizeTitleBefore(effects, ok3, nok) {
|
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
2232
2232
|
|
|
2233
|
-
//
|
|
2233
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
|
|
2234
2234
|
var hardBreakEscape = {
|
|
2235
2235
|
name: "hardBreakEscape",
|
|
2236
2236
|
tokenize: tokenizeHardBreakEscape
|
|
@@ -2251,7 +2251,7 @@ function tokenizeHardBreakEscape(effects, ok3, nok) {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
}
|
|
2253
2253
|
|
|
2254
|
-
//
|
|
2254
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/heading-atx.js
|
|
2255
2255
|
var headingAtx = {
|
|
2256
2256
|
name: "headingAtx",
|
|
2257
2257
|
resolve: resolveHeadingAtx,
|
|
@@ -2340,7 +2340,7 @@ function tokenizeHeadingAtx(effects, ok3, nok) {
|
|
|
2340
2340
|
}
|
|
2341
2341
|
}
|
|
2342
2342
|
|
|
2343
|
-
//
|
|
2343
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-html-tag-name/index.js
|
|
2344
2344
|
var htmlBlockNames = [
|
|
2345
2345
|
"address",
|
|
2346
2346
|
"article",
|
|
@@ -2407,7 +2407,7 @@ var htmlBlockNames = [
|
|
|
2407
2407
|
];
|
|
2408
2408
|
var htmlRawNames = ["pre", "script", "style", "textarea"];
|
|
2409
2409
|
|
|
2410
|
-
//
|
|
2410
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/html-flow.js
|
|
2411
2411
|
var htmlFlow = {
|
|
2412
2412
|
concrete: true,
|
|
2413
2413
|
name: "htmlFlow",
|
|
@@ -2766,7 +2766,7 @@ function tokenizeBlankLineBefore(effects, ok3, nok) {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
}
|
|
2768
2768
|
|
|
2769
|
-
//
|
|
2769
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/html-text.js
|
|
2770
2770
|
var htmlText = {
|
|
2771
2771
|
name: "htmlText",
|
|
2772
2772
|
tokenize: tokenizeHtmlText
|
|
@@ -3072,7 +3072,7 @@ function tokenizeHtmlText(effects, ok3, nok) {
|
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
3074
|
|
|
3075
|
-
//
|
|
3075
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/label-end.js
|
|
3076
3076
|
var labelEnd = {
|
|
3077
3077
|
name: "labelEnd",
|
|
3078
3078
|
resolveAll: resolveAllLabelEnd,
|
|
@@ -3298,7 +3298,7 @@ function tokenizeReferenceCollapsed(effects, ok3, nok) {
|
|
|
3298
3298
|
}
|
|
3299
3299
|
}
|
|
3300
3300
|
|
|
3301
|
-
//
|
|
3301
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/label-start-image.js
|
|
3302
3302
|
var labelStartImage = {
|
|
3303
3303
|
name: "labelStartImage",
|
|
3304
3304
|
resolveAll: labelEnd.resolveAll,
|
|
@@ -3335,7 +3335,7 @@ function tokenizeLabelStartImage(effects, ok3, nok) {
|
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
3337
3337
|
|
|
3338
|
-
//
|
|
3338
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/label-start-link.js
|
|
3339
3339
|
var labelStartLink = {
|
|
3340
3340
|
name: "labelStartLink",
|
|
3341
3341
|
resolveAll: labelEnd.resolveAll,
|
|
@@ -3363,7 +3363,7 @@ function tokenizeLabelStartLink(effects, ok3, nok) {
|
|
|
3363
3363
|
}
|
|
3364
3364
|
}
|
|
3365
3365
|
|
|
3366
|
-
//
|
|
3366
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/line-ending.js
|
|
3367
3367
|
var lineEnding = {
|
|
3368
3368
|
name: "lineEnding",
|
|
3369
3369
|
tokenize: tokenizeLineEnding
|
|
@@ -3378,7 +3378,7 @@ function tokenizeLineEnding(effects, ok3) {
|
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
3380
|
|
|
3381
|
-
//
|
|
3381
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/thematic-break.js
|
|
3382
3382
|
var thematicBreak = {
|
|
3383
3383
|
name: "thematicBreak",
|
|
3384
3384
|
tokenize: tokenizeThematicBreak
|
|
@@ -3417,7 +3417,7 @@ function tokenizeThematicBreak(effects, ok3, nok) {
|
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
3419
3419
|
|
|
3420
|
-
//
|
|
3420
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/list.js
|
|
3421
3421
|
var list = {
|
|
3422
3422
|
continuation: {
|
|
3423
3423
|
tokenize: tokenizeListContinuation
|
|
@@ -3547,7 +3547,7 @@ function tokenizeListItemPrefixWhitespace(effects, ok3, nok) {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
}
|
|
3549
3549
|
|
|
3550
|
-
//
|
|
3550
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-core-commonmark/lib/setext-underline.js
|
|
3551
3551
|
var setextUnderline = {
|
|
3552
3552
|
name: "setextUnderline",
|
|
3553
3553
|
resolveTo: resolveToSetextUnderline,
|
|
@@ -3641,7 +3641,7 @@ function tokenizeSetextUnderline(effects, ok3, nok) {
|
|
|
3641
3641
|
}
|
|
3642
3642
|
}
|
|
3643
3643
|
|
|
3644
|
-
//
|
|
3644
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/flow.js
|
|
3645
3645
|
var flow = {
|
|
3646
3646
|
tokenize: initializeFlow
|
|
3647
3647
|
};
|
|
@@ -3679,7 +3679,7 @@ function initializeFlow(effects) {
|
|
|
3679
3679
|
}
|
|
3680
3680
|
}
|
|
3681
3681
|
|
|
3682
|
-
//
|
|
3682
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/initialize/text.js
|
|
3683
3683
|
var resolver = {
|
|
3684
3684
|
resolveAll: createResolver()
|
|
3685
3685
|
};
|
|
@@ -3821,7 +3821,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
3821
3821
|
return events;
|
|
3822
3822
|
}
|
|
3823
3823
|
|
|
3824
|
-
//
|
|
3824
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/constructs.js
|
|
3825
3825
|
var constructs_exports = {};
|
|
3826
3826
|
__export(constructs_exports, {
|
|
3827
3827
|
attentionMarkers: () => attentionMarkers,
|
|
@@ -3896,7 +3896,7 @@ var disable = {
|
|
|
3896
3896
|
null: []
|
|
3897
3897
|
};
|
|
3898
3898
|
|
|
3899
|
-
//
|
|
3899
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/create-tokenizer.js
|
|
3900
3900
|
function createTokenizer(parser, initialize, from) {
|
|
3901
3901
|
let point3 = {
|
|
3902
3902
|
_bufferIndex: -1,
|
|
@@ -4222,7 +4222,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
4222
4222
|
return result.join("");
|
|
4223
4223
|
}
|
|
4224
4224
|
|
|
4225
|
-
//
|
|
4225
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/parse.js
|
|
4226
4226
|
function parse(options) {
|
|
4227
4227
|
const settings = options || {};
|
|
4228
4228
|
const constructs2 = (
|
|
@@ -4248,14 +4248,14 @@ function parse(options) {
|
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
4250
|
|
|
4251
|
-
//
|
|
4251
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/postprocess.js
|
|
4252
4252
|
function postprocess(events) {
|
|
4253
4253
|
while (!subtokenize(events)) {
|
|
4254
4254
|
}
|
|
4255
4255
|
return events;
|
|
4256
4256
|
}
|
|
4257
4257
|
|
|
4258
|
-
//
|
|
4258
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark/lib/preprocess.js
|
|
4259
4259
|
var search = /[\0\t\n\r]/g;
|
|
4260
4260
|
function preprocess() {
|
|
4261
4261
|
let column = 1;
|
|
@@ -4335,7 +4335,7 @@ function preprocess() {
|
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
4337
|
|
|
4338
|
-
//
|
|
4338
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-util-decode-string/index.js
|
|
4339
4339
|
var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
4340
4340
|
function decodeString(value) {
|
|
4341
4341
|
return value.replace(characterEscapeOrReference, decode);
|
|
@@ -4353,7 +4353,7 @@ function decode($0, $1, $2) {
|
|
|
4353
4353
|
return decodeNamedCharacterReference($2) || $0;
|
|
4354
4354
|
}
|
|
4355
4355
|
|
|
4356
|
-
//
|
|
4356
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-stringify-position/lib/index.js
|
|
4357
4357
|
function stringifyPosition(value) {
|
|
4358
4358
|
if (!value || typeof value !== "object") {
|
|
4359
4359
|
return "";
|
|
@@ -4379,7 +4379,7 @@ function index(value) {
|
|
|
4379
4379
|
return value && typeof value === "number" ? value : 1;
|
|
4380
4380
|
}
|
|
4381
4381
|
|
|
4382
|
-
//
|
|
4382
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-from-markdown/lib/index.js
|
|
4383
4383
|
var own = {}.hasOwnProperty;
|
|
4384
4384
|
function fromMarkdown(value, encoding, options) {
|
|
4385
4385
|
if (encoding && typeof encoding === "object") {
|
|
@@ -5088,7 +5088,7 @@ function defaultOnError(left, right) {
|
|
|
5088
5088
|
}
|
|
5089
5089
|
}
|
|
5090
5090
|
|
|
5091
|
-
//
|
|
5091
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/ccount/index.js
|
|
5092
5092
|
function ccount(value, character) {
|
|
5093
5093
|
const source = String(value);
|
|
5094
5094
|
if (typeof character !== "string") {
|
|
@@ -5103,11 +5103,11 @@ function ccount(value, character) {
|
|
|
5103
5103
|
return count;
|
|
5104
5104
|
}
|
|
5105
5105
|
|
|
5106
|
-
//
|
|
5106
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/devlop/lib/default.js
|
|
5107
5107
|
function ok() {
|
|
5108
5108
|
}
|
|
5109
5109
|
|
|
5110
|
-
//
|
|
5110
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/escape-string-regexp/index.js
|
|
5111
5111
|
function escapeStringRegexp(string5) {
|
|
5112
5112
|
if (typeof string5 !== "string") {
|
|
5113
5113
|
throw new TypeError("Expected a string");
|
|
@@ -5115,7 +5115,7 @@ function escapeStringRegexp(string5) {
|
|
|
5115
5115
|
return string5.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
5116
5116
|
}
|
|
5117
5117
|
|
|
5118
|
-
//
|
|
5118
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-is/lib/index.js
|
|
5119
5119
|
var convert = (
|
|
5120
5120
|
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
5121
5121
|
/**
|
|
@@ -5214,12 +5214,12 @@ function looksLikeANode(value) {
|
|
|
5214
5214
|
return value !== null && typeof value === "object" && "type" in value;
|
|
5215
5215
|
}
|
|
5216
5216
|
|
|
5217
|
-
//
|
|
5217
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-visit-parents/lib/color.js
|
|
5218
5218
|
function color(d) {
|
|
5219
5219
|
return d;
|
|
5220
5220
|
}
|
|
5221
5221
|
|
|
5222
|
-
//
|
|
5222
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/unist-util-visit-parents/lib/index.js
|
|
5223
5223
|
var empty = [];
|
|
5224
5224
|
var CONTINUE = true;
|
|
5225
5225
|
var EXIT = false;
|
|
@@ -5339,7 +5339,7 @@ function toResult(value) {
|
|
|
5339
5339
|
return value === null || value === void 0 ? empty : [value];
|
|
5340
5340
|
}
|
|
5341
5341
|
|
|
5342
|
-
//
|
|
5342
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-find-and-replace/lib/index.js
|
|
5343
5343
|
function findAndReplace(tree, list2, options) {
|
|
5344
5344
|
const settings = options || {};
|
|
5345
5345
|
const ignored = convert(settings.ignore || []);
|
|
@@ -5440,7 +5440,7 @@ function toFunction(replace2) {
|
|
|
5440
5440
|
};
|
|
5441
5441
|
}
|
|
5442
5442
|
|
|
5443
|
-
//
|
|
5443
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
|
|
5444
5444
|
function gfmAutolinkLiteralFromMarkdown() {
|
|
5445
5445
|
return {
|
|
5446
5446
|
transforms: [transformGfmAutolinkLiterals],
|
|
@@ -5605,7 +5605,7 @@ function previous2(match) {
|
|
|
5605
5605
|
return match.index === 0 || unicodeWhitespace(code2) || unicodePunctuation(code2);
|
|
5606
5606
|
}
|
|
5607
5607
|
|
|
5608
|
-
//
|
|
5608
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-footnote/lib/index.js
|
|
5609
5609
|
footnoteReference.peek = footnoteReferencePeek;
|
|
5610
5610
|
function enterFootnoteCallString() {
|
|
5611
5611
|
this.buffer();
|
|
@@ -5679,7 +5679,7 @@ function gfmFootnoteFromMarkdown() {
|
|
|
5679
5679
|
};
|
|
5680
5680
|
}
|
|
5681
5681
|
|
|
5682
|
-
//
|
|
5682
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-strikethrough/lib/index.js
|
|
5683
5683
|
handleDelete.attention = attentionDelete;
|
|
5684
5684
|
handleDelete.peek = peekDelete;
|
|
5685
5685
|
function gfmStrikethroughFromMarkdown() {
|
|
@@ -5716,7 +5716,7 @@ function peekDelete() {
|
|
|
5716
5716
|
return "~";
|
|
5717
5717
|
}
|
|
5718
5718
|
|
|
5719
|
-
//
|
|
5719
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-table/lib/index.js
|
|
5720
5720
|
function gfmTableFromMarkdown() {
|
|
5721
5721
|
return {
|
|
5722
5722
|
enter: {
|
|
@@ -5777,7 +5777,7 @@ function replace($0, $1) {
|
|
|
5777
5777
|
return $1 === "|" ? $1 : $0;
|
|
5778
5778
|
}
|
|
5779
5779
|
|
|
5780
|
-
//
|
|
5780
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
5781
5781
|
function gfmTaskListItemFromMarkdown() {
|
|
5782
5782
|
return {
|
|
5783
5783
|
exit: {
|
|
@@ -5824,7 +5824,7 @@ function exitParagraphWithTaskListItem(token) {
|
|
|
5824
5824
|
this.exit(token);
|
|
5825
5825
|
}
|
|
5826
5826
|
|
|
5827
|
-
//
|
|
5827
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/mdast-util-gfm/lib/index.js
|
|
5828
5828
|
function gfmFromMarkdown() {
|
|
5829
5829
|
return [
|
|
5830
5830
|
gfmAutolinkLiteralFromMarkdown(),
|
|
@@ -5835,7 +5835,7 @@ function gfmFromMarkdown() {
|
|
|
5835
5835
|
];
|
|
5836
5836
|
}
|
|
5837
5837
|
|
|
5838
|
-
//
|
|
5838
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
|
|
5839
5839
|
var wwwPrefix = {
|
|
5840
5840
|
tokenize: tokenizeWwwPrefix,
|
|
5841
5841
|
partial: true
|
|
@@ -6177,7 +6177,7 @@ function previousUnbalanced(events) {
|
|
|
6177
6177
|
return result;
|
|
6178
6178
|
}
|
|
6179
6179
|
|
|
6180
|
-
//
|
|
6180
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-footnote/lib/syntax.js
|
|
6181
6181
|
var indent = {
|
|
6182
6182
|
tokenize: tokenizeIndent2,
|
|
6183
6183
|
partial: true
|
|
@@ -6452,7 +6452,7 @@ function tokenizeIndent2(effects, ok3, nok) {
|
|
|
6452
6452
|
}
|
|
6453
6453
|
}
|
|
6454
6454
|
|
|
6455
|
-
//
|
|
6455
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
|
|
6456
6456
|
function gfmStrikethrough(options) {
|
|
6457
6457
|
const options_ = options || {};
|
|
6458
6458
|
let single = options_.singleTilde;
|
|
@@ -6546,7 +6546,7 @@ function gfmStrikethrough(options) {
|
|
|
6546
6546
|
}
|
|
6547
6547
|
}
|
|
6548
6548
|
|
|
6549
|
-
//
|
|
6549
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-table/lib/edit-map.js
|
|
6550
6550
|
var EditMap2 = class {
|
|
6551
6551
|
/**
|
|
6552
6552
|
* Create a new edit map.
|
|
@@ -6632,7 +6632,7 @@ function addImplementation2(editMap, at, remove, add) {
|
|
|
6632
6632
|
editMap.index.set(at, change);
|
|
6633
6633
|
}
|
|
6634
6634
|
|
|
6635
|
-
//
|
|
6635
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-table/lib/infer.js
|
|
6636
6636
|
function gfmTableAlign(events, index2) {
|
|
6637
6637
|
let inDelimiterRow = false;
|
|
6638
6638
|
const align = [];
|
|
@@ -6659,7 +6659,7 @@ function gfmTableAlign(events, index2) {
|
|
|
6659
6659
|
return align;
|
|
6660
6660
|
}
|
|
6661
6661
|
|
|
6662
|
-
//
|
|
6662
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-table/lib/syntax.js
|
|
6663
6663
|
function gfmTable() {
|
|
6664
6664
|
return {
|
|
6665
6665
|
flow: {
|
|
@@ -7050,7 +7050,7 @@ function getPoint(events, index2) {
|
|
|
7050
7050
|
return event[1][side];
|
|
7051
7051
|
}
|
|
7052
7052
|
|
|
7053
|
-
//
|
|
7053
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
|
|
7054
7054
|
var tasklistCheck = {
|
|
7055
7055
|
name: "tasklistCheck",
|
|
7056
7056
|
tokenize: tokenizeTasklistCheck
|
|
@@ -7124,7 +7124,7 @@ function spaceThenNonSpace(effects, ok3, nok) {
|
|
|
7124
7124
|
}
|
|
7125
7125
|
}
|
|
7126
7126
|
|
|
7127
|
-
//
|
|
7127
|
+
// ../../../../../../Users/imac/Code/万机/wanji_dazi_dsh/node_modules/micromark-extension-gfm/index.js
|
|
7128
7128
|
function gfm(options) {
|
|
7129
7129
|
return combineExtensions([
|
|
7130
7130
|
gfmAutolinkLiteral(),
|
|
@@ -7389,42 +7389,107 @@ function updateErrorKey(error) {
|
|
|
7389
7389
|
if (/SERVICE_UNAVAILABLE|offline/i.test(error)) return "updateReconnect";
|
|
7390
7390
|
return "updateUnknown";
|
|
7391
7391
|
}
|
|
7392
|
+
var updateChevronIcon = /* @__PURE__ */ import_react4.default.createElement("svg", { className: "ws-update-chevron", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.25", "aria-hidden": "true" }, /* @__PURE__ */ import_react4.default.createElement("path", { d: "m2.5 4.5 3.5 3.5 3.5-3.5" }));
|
|
7393
|
+
var updateRefreshIcon = /* @__PURE__ */ import_react4.default.createElement("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", "aria-hidden": "true" }, /* @__PURE__ */ import_react4.default.createElement("path", { d: "M20 7v5h-5M4 17v-5h5M6 7a7 7 0 0 1 12-1l2 2M18 17a7 7 0 0 1-12 1l-2-2" }));
|
|
7392
7394
|
function UpdatePanel({ client, view, t }) {
|
|
7393
|
-
const [open, setOpen] = (0, import_react4.useState)(false)
|
|
7395
|
+
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
7396
|
+
const id = (0, import_react4.useId)();
|
|
7397
|
+
const trigger = (0, import_react4.useRef)(null);
|
|
7398
|
+
const close = () => {
|
|
7399
|
+
setOpen(false);
|
|
7400
|
+
trigger.current?.focus();
|
|
7401
|
+
};
|
|
7394
7402
|
const company = view.source === "company-market";
|
|
7395
|
-
const
|
|
7396
|
-
const
|
|
7397
|
-
const
|
|
7398
|
-
const
|
|
7399
|
-
const
|
|
7400
|
-
const
|
|
7401
|
-
const
|
|
7402
|
-
const
|
|
7403
|
-
const
|
|
7404
|
-
|
|
7405
|
-
|
|
7403
|
+
const { phase, installedVersion, runningVersion, automatic } = view;
|
|
7404
|
+
const restartRequired = phase === "restart-required";
|
|
7405
|
+
const candidate = company ? view.availableVersion : view.candidate?.version;
|
|
7406
|
+
const available = candidate && candidate !== installedVersion && candidate !== runningVersion ? candidate : void 0;
|
|
7407
|
+
const active = phase === "preparing" || phase === "installing" || phase === "verifying";
|
|
7408
|
+
const disconnected = Boolean(view.reconnecting && (active || view.preparing));
|
|
7409
|
+
const checking = !disconnected && (Boolean(view.checking) && !active || phase === "checking");
|
|
7410
|
+
const busy = view.preparing || checking || active || disconnected;
|
|
7411
|
+
const unavailable = phase === "unsupported" || phase === "migration-required" || phase === "recovery-required" || restartRequired;
|
|
7412
|
+
const needsSetup = phase === "unsupported" || phase === "migration-required";
|
|
7413
|
+
const stages = company || view.reconnecting || checking ? void 0 : view.completedStages;
|
|
7414
|
+
const percent = stages === void 0 ? void 0 : Math.round(stages * 100 / 3);
|
|
7415
|
+
const progressText = stages === void 0 ? void 0 : t("updateProgressCompleted").replace("{count}", String(stages));
|
|
7416
|
+
const deferred = phase === "waiting-idle" && Boolean(view.error);
|
|
7417
|
+
const errorKey = view.error && !disconnected ? updateErrorKey(view.error) : void 0;
|
|
7418
|
+
const status = t(disconnected ? "updateReconnect" : checking ? "updateChecking" : deferred ? "updateDeferred" : phase === "idle" && !view.checkedAt ? "updateInitial" : labels[phase]);
|
|
7419
|
+
const companyStatus = t(restartRequired ? "updateCompanyRestart" : phase === "migration-required" ? "updateCompanyMigration" : available ? "updateAvailable" : checking ? "updateCompanyChecking" : phase === "idle" && view.checkedAt ? "updateIdle" : "updateCompanyUnavailable");
|
|
7420
|
+
const hasUpdate = Boolean(available && (company || phase === "available"));
|
|
7421
|
+
const triggerLabel = disconnected ? t("updateStatePending") : active ? percent === void 0 ? status : `${t("updateBusyTrigger")} ${percent}%` : phase === "waiting-idle" ? t(deferred ? "updateDeferred" : "updateWaitingTrigger") : phase === "recovery-required" || view.retryable ? t(phase === "recovery-required" ? "updateStatePending" : "updateFailed") : hasUpdate ? `${t("updateTitle")} \xB7 ${t("updateHasUpdate")}` : t("updateTitle");
|
|
7422
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update", onKeyDown: (event) => {
|
|
7423
|
+
if (open && event.key === "Escape") {
|
|
7424
|
+
event.stopPropagation();
|
|
7425
|
+
close();
|
|
7426
|
+
}
|
|
7406
7427
|
} }, /* @__PURE__ */ import_react4.default.createElement(
|
|
7407
7428
|
"button",
|
|
7408
7429
|
{
|
|
7409
|
-
|
|
7430
|
+
ref: trigger,
|
|
7431
|
+
className: `ws-button ws-update-trigger${restartRequired ? " ws-update-trigger-restart" : active || disconnected ? " ws-update-trigger-active" : ""}`,
|
|
7410
7432
|
type: "button",
|
|
7411
7433
|
"aria-expanded": open,
|
|
7412
|
-
"aria-controls": id,
|
|
7413
|
-
"aria-label":
|
|
7434
|
+
"aria-controls": open ? id : void 0,
|
|
7435
|
+
"aria-label": active || disconnected ? `${t("updateTitle")} \xB7 ${triggerLabel}` : void 0,
|
|
7414
7436
|
onClick: () => {
|
|
7415
7437
|
if (!open && company) void client.poll();
|
|
7416
7438
|
setOpen(!open);
|
|
7417
7439
|
}
|
|
7418
7440
|
},
|
|
7419
|
-
/* @__PURE__ */ import_react4.default.createElement("
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
), open && /* @__PURE__ */ import_react4.default.createElement("section", { id, className: "ws-update-card", "aria-label": t("updateTitle") }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-heading" }, /* @__PURE__ */ import_react4.default.createElement("strong", null, t("updateTitle")), /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-icon-button", "aria-label": t("updateClose"), onClick: () => setOpen(false) }, "\xD7")), /* @__PURE__ */ import_react4.default.createElement("dl", { className: "ws-update-versions" }, /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateCurrent")), /* @__PURE__ */ import_react4.default.createElement("dd", null, view.runningVersion || "\u2014")), view.installedVersion && view.installedVersion !== view.runningVersion && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateInstalled")), /* @__PURE__ */ import_react4.default.createElement("dd", null, view.installedVersion)), availableVersion && availableVersion !== view.installedVersion && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateTarget")), /* @__PURE__ */ import_react4.default.createElement("dd", { className: company ? "ws-company-update-version" : void 0 }, availableVersion))), company ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-company-update-hint", role: "status" }, availableVersion ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyPathTitle")), /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyPath"))) : /* @__PURE__ */ import_react4.default.createElement("p", null, t(companyStatus))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { role: "status", className: "ws-update-status", "aria-live": "polite" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-dot" }), status), errorKey && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-error", role: "status" }, t(errorKey)), !needsSetup && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("label", { className: "ws-update-toggle" }, /* @__PURE__ */ import_react4.default.createElement("input", { type: "checkbox", checked: view.automatic, disabled: busy || unavailable, onChange: (e) => void client.action("automatic", e.target.checked) }), /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateAutomatic"))), /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-policy" }, t("updatePolicy"))), view.checkedAt && !needsSetup && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-policy" }, t("updateChecked"), " ", /* @__PURE__ */ import_react4.default.createElement("time", { dateTime: new Date(view.checkedAt).toISOString() }, new Date(view.checkedAt).toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", second: "2-digit" }))), /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-actions" }, /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button", disabled: busy || unavailable, "aria-busy": checking, onClick: () => void client.action("check") }, t(checking ? "updateChecking" : unavailable ? "updateCheckUnavailable" : "updateCheck")), view.candidate && !unavailable && /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button ws-primary", disabled: busy, onClick: () => void client.action("install") }, t("updateInstall"))))));
|
|
7441
|
+
restartRequired ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-dot ws-update-restart-dot", "aria-hidden": "true" }), /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-update-restart-copy" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateRestartTrigger")), installedVersion && /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-update-restart-version" }, t("updateInstalled"), " ", installedVersion))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, hasUpdate ? /* @__PURE__ */ import_react4.default.createElement("span", { className: company ? "ws-dot ws-company-update-dot" : "ws-dot", "aria-hidden": "true" }) : updateRefreshIcon, /* @__PURE__ */ import_react4.default.createElement("span", null, triggerLabel)),
|
|
7442
|
+
updateChevronIcon
|
|
7443
|
+
), open && /* @__PURE__ */ import_react4.default.createElement("section", { id, className: "ws-update-card", "aria-label": t("updateTitle") }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-heading" }, /* @__PURE__ */ import_react4.default.createElement("strong", null, t("updateTitle")), /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-icon-button", "aria-label": t("updateClose"), onClick: close }, "\xD7")), /* @__PURE__ */ import_react4.default.createElement("dl", { className: "ws-update-versions" }, /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateCurrent")), /* @__PURE__ */ import_react4.default.createElement("dd", null, runningVersion || "\u2014")), installedVersion && installedVersion !== runningVersion && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t("updateInstalled")), /* @__PURE__ */ import_react4.default.createElement("dd", null, installedVersion)), available && /* @__PURE__ */ import_react4.default.createElement("div", null, /* @__PURE__ */ import_react4.default.createElement("dt", null, t(company ? "updateTarget" : "updateTargetVersion")), /* @__PURE__ */ import_react4.default.createElement("dd", { className: company ? "ws-company-update-version" : void 0 }, available))), company ? /* @__PURE__ */ import_react4.default.createElement("div", { role: "status" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-company-update-hint" }, /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-summary" }, companyStatus), restartRequired && /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateRestartHelp")), available && /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyNew"))), available && /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-company-update-path" }, /* @__PURE__ */ import_react4.default.createElement("p", null, t("updateCompanyPathTitle")), /* @__PURE__ */ import_react4.default.createElement("strong", null, t("updateCompanyPath")))) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { className: `ws-update-feedback${restartRequired ? " ws-update-feedback-restart" : ""}` }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-status" }, /* @__PURE__ */ import_react4.default.createElement("span", { role: "status" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-dot", "aria-hidden": "true" }), status), percent !== void 0 && /* @__PURE__ */ import_react4.default.createElement("strong", { className: "ws-update-percent", "aria-hidden": "true" }, percent, "%")), stages !== void 0 && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-track", role: "progressbar", "aria-label": t("updateProgressTitle"), "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percent, "aria-valuetext": progressText }, [0, 1, 2].map((step) => /* @__PURE__ */ import_react4.default.createElement("span", { key: step, "data-state": step < stages ? "done" : step === stages ? "current" : "pending" }))), /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-track-caption", "aria-hidden": "true" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateProgressSteps")), /* @__PURE__ */ import_react4.default.createElement("span", null, progressText))), restartRequired && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateRestartHelp")), phase === "installing" && !disconnected && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateInstallHelp")), phase === "available" && !checking && view.candidate?.automatic === false && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateConfirmMinor")), phase === "available" && !checking && view.candidate?.automatic && !automatic && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note" }, t("updateManualHelp")), errorKey && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-note", role: "status" }, t(errorKey))), !needsSetup && phase !== "recovery-required" && !disconnected && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, busy || unavailable ? /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-toggle" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateAutomatic")), /* @__PURE__ */ import_react4.default.createElement("span", { className: "ws-update-toggle-state" }, t(automatic ? "updateOn" : "updateOff"))) : /* @__PURE__ */ import_react4.default.createElement("label", { className: "ws-update-toggle" }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("updateAutomatic")), /* @__PURE__ */ import_react4.default.createElement("input", { type: "checkbox", role: "switch", checked: automatic, onChange: (e) => void client.action("automatic", e.target.checked) })), !busy && !restartRequired && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-policy" }, t("updatePolicy"))), !active && !unavailable && !disconnected && /* @__PURE__ */ import_react4.default.createElement("div", { className: "ws-update-actions" }, view.checkedAt && !checking && /* @__PURE__ */ import_react4.default.createElement("p", { className: "ws-update-checked" }, t("updateChecked"), " ", /* @__PURE__ */ import_react4.default.createElement("time", { dateTime: new Date(view.checkedAt).toISOString() }, new Date(view.checkedAt).toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", second: "2-digit" }))), /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button", disabled: busy, "aria-busy": checking, onClick: () => void client.action("check") }, t(checking ? "updateChecking" : "updateCheck")), available && !checking && /* @__PURE__ */ import_react4.default.createElement("button", { type: "button", className: "ws-button ws-primary", disabled: busy, onClick: () => void client.action("install") }, t(view.retryable ? "updateRetry" : "updateInstall"))))));
|
|
7423
7444
|
}
|
|
7424
7445
|
var updateStyles = `
|
|
7425
|
-
.ws-update{-webkit-app-region:no-drag}
|
|
7446
|
+
.ws-update{-webkit-app-region:no-drag}
|
|
7447
|
+
.ws-update-card{position:absolute;right:24px;top:78px;z-index:15;width:340px;max-width:calc(100% - 24px);max-height:calc(100% - 92px);overflow:auto;padding:16px;background:var(--ws-bg);border:1px solid var(--ws-line);border-radius:12px;box-shadow:0 12px 36px #00000018;text-align:left}
|
|
7448
|
+
.ws-update-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
|
|
7449
|
+
.ws-update-heading strong{font-size:14px}
|
|
7450
|
+
.ws-update-card .ws-update-versions{display:grid;gap:4px;margin-bottom:10px}
|
|
7451
|
+
.ws-update-versions>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
|
|
7452
|
+
.ws-update-versions dt{color:var(--ws-muted);font-size:12px}
|
|
7453
|
+
.ws-update-versions dd{font-variant-numeric:tabular-nums;font-family:ui-monospace,monospace;font-size:12px;overflow-wrap:anywhere}
|
|
7454
|
+
.ws-update-feedback,.ws-company-update-hint{padding:9px 10px;border-radius:8px;background:var(--dsw-alias-interactive-bg-hover-solid,var(--ws-soft))}
|
|
7455
|
+
.ws-update-status{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:500}
|
|
7456
|
+
.ws-update-status [role=status]{display:flex;align-items:baseline;gap:7px}
|
|
7457
|
+
.ws-update-status .ws-dot{align-self:center}
|
|
7458
|
+
.ws-update-percent{font:600 22px/1.15 ui-monospace,monospace;color:var(--ws-accent)}
|
|
7459
|
+
.ws-update-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-top:7px}
|
|
7460
|
+
.ws-update-track>span{height:5px;border-radius:3px;background:color-mix(in srgb,var(--ws-accent) 18%,var(--ws-bg))}
|
|
7461
|
+
.ws-update-track>span[data-state=current]{background:color-mix(in srgb,var(--ws-accent) 53%,var(--ws-bg))}
|
|
7462
|
+
.ws-update-track>span[data-state=done]{background:var(--ws-accent)}
|
|
7463
|
+
.ws-update-track-caption{display:flex;justify-content:space-between;flex-wrap:wrap;gap:2px 7px;margin-top:4px;font-size:11px}
|
|
7464
|
+
.ws-update-card .ws-update-note{font-size:11px;line-height:1.6;margin-top:4px;overflow-wrap:anywhere}
|
|
7465
|
+
.ws-update-toggle{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;border-top:1px solid var(--ws-line);padding-top:10px;font-size:12px}
|
|
7466
|
+
label.ws-update-toggle{cursor:pointer}
|
|
7467
|
+
.ws-update-toggle input{appearance:none;display:flex;align-items:center;flex:none;width:28px;height:16px;margin:0;padding:2px;border:0;border-radius:10px;background:var(--dsw-alias-button-contrast-fill,var(--ws-muted));cursor:pointer}
|
|
7468
|
+
.ws-update-toggle input:checked{justify-content:flex-end;background:var(--ws-accent)}
|
|
7469
|
+
.ws-update-toggle input::after{content:'';width:12px;height:12px;border-radius:50%;background:var(--dsw-alias-label-primary-foreground,var(--ws-bg))}
|
|
7470
|
+
.ws-update-toggle input:not(:checked)::after{background:var(--dsw-alias-switch-thumb,var(--ws-bg))}
|
|
7471
|
+
.ws-update-toggle-state,.ws-update-card .ws-update-policy,.ws-update-checked{color:var(--ws-muted);font-size:11px}
|
|
7472
|
+
.ws-update-card .ws-update-policy{line-height:1.7;margin-top:4px}
|
|
7473
|
+
.ws-update-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}
|
|
7474
|
+
.ws-update-actions .ws-update-checked{margin-inline-end:auto;white-space:nowrap}
|
|
7475
|
+
.ws-update-freeze{padding:8px 28px;border-top:1px solid var(--ws-line);background:var(--ws-soft);font-size:12px;flex:none}
|
|
7476
|
+
.ws-update-trigger .ws-dot{color:var(--ws-accent)}
|
|
7477
|
+
.ws-update-chevron{margin-inline-start:auto;color:var(--ws-muted)}
|
|
7478
|
+
.ws-update-trigger[aria-expanded=true] .ws-update-chevron{transform:rotate(180deg)}
|
|
7479
|
+
.ws-update-trigger-active{font-variant-numeric:tabular-nums;background:var(--dsw-alias-interactive-bg-hover-solid,var(--ws-soft))}
|
|
7480
|
+
.ws-update-trigger-restart{min-width:144px;min-height:44px;justify-content:flex-start;gap:10px}
|
|
7481
|
+
.ws-update-trigger-restart,.ws-update-feedback-restart{background:var(--ws-soft);background:light-dark(#faf9f6,var(--ws-soft))}
|
|
7482
|
+
.ws-update-trigger-restart .ws-update-restart-dot,.ws-update-feedback-restart .ws-dot{width:7px;height:7px;color:#a66a12;color:light-dark(#a66a12,#e2ad54);opacity:1}
|
|
7483
|
+
.ws-update-restart-copy{display:grid;gap:2px;text-align:start;font-size:13px;font-weight:500;line-height:1.25}
|
|
7484
|
+
.ws-update-restart-version{color:var(--ws-muted);font-size:11px;font-weight:400;font-variant-numeric:tabular-nums}
|
|
7485
|
+
.ws-update-trigger .ws-company-update-dot,.ws-company-update-version{color:#237c3d;color:light-dark(#237c3d,#76d68c)}
|
|
7486
|
+
.ws-update-trigger .ws-company-update-dot{width:7px;height:7px;opacity:1}
|
|
7487
|
+
.ws-company-update-hint{font-size:12px;line-height:1.6}
|
|
7488
|
+
.ws-company-update-hint p+p{margin-top:4px}
|
|
7489
|
+
.ws-update-summary{font-weight:500}
|
|
7490
|
+
.ws-company-update-path{margin-top:10px;font-size:12px;overflow-wrap:anywhere}
|
|
7491
|
+
.ws-company-update-path p{margin-bottom:3px;color:var(--ws-muted);font-size:11px}
|
|
7426
7492
|
@container(max-width:540px){.ws-header{flex-wrap:wrap}.ws-header-actions{margin-left:auto;gap:8px}.ws-update-card{top:120px;right:12px;max-height:calc(100% - 132px)}}
|
|
7427
|
-
.ws-update-trigger .ws-company-update-dot,.ws-company-update-version{color:#237c3d;color:light-dark(#237c3d,#76d68c)}.ws-update-trigger .ws-company-update-dot{width:7px;height:7px;opacity:1}.ws-company-update-hint{margin-top:14px;border-top:1px solid var(--ws-line);padding-top:12px;font-size:12px;line-height:1.6;color:var(--ws-muted)}.ws-company-update-hint p+p{margin-top:3px}
|
|
7428
7493
|
`;
|
|
7429
7494
|
|
|
7430
7495
|
// src/company/panel.tsx
|
|
@@ -7456,9 +7521,16 @@ function CompanyIdentityPanel({ rpc, t, disabled }) {
|
|
|
7456
7521
|
const res = await rpc.call("/api", COMPANY_IDENTITY_ENDPOINT, payload, controller.signal);
|
|
7457
7522
|
if (controller.signal.aborted) return;
|
|
7458
7523
|
if (!res.ok || !res.value || typeof res.value !== "object" || !("status" in res.value)) throw Error("company identity unavailable");
|
|
7459
|
-
|
|
7524
|
+
const identity = res.value;
|
|
7525
|
+
setView(identity);
|
|
7460
7526
|
setFailed(false);
|
|
7461
7527
|
if (payload.operation === "bind") {
|
|
7528
|
+
if (identity.status === "awaiting" && !identity.verificationCode) {
|
|
7529
|
+
try {
|
|
7530
|
+
window.open(identity.authorizeUrl, "_blank", "noopener,noreferrer");
|
|
7531
|
+
} catch {
|
|
7532
|
+
}
|
|
7533
|
+
}
|
|
7462
7534
|
setAlias("");
|
|
7463
7535
|
setPhone("");
|
|
7464
7536
|
}
|
|
@@ -8679,11 +8751,13 @@ function createUpdateClient(rpc, options) {
|
|
|
8679
8751
|
let view = { phase: "idle", runningVersion: "", automatic: DEFAULT_AUTOMATIC, preparing: false, checking: false };
|
|
8680
8752
|
let prepared, disposed = false, timer, polling;
|
|
8681
8753
|
const listeners = /* @__PURE__ */ new Set(), lifetime = new AbortController();
|
|
8682
|
-
const
|
|
8754
|
+
const replace2 = (next) => {
|
|
8683
8755
|
if (disposed) return;
|
|
8684
|
-
view =
|
|
8756
|
+
view = next;
|
|
8685
8757
|
for (const f of listeners) f();
|
|
8686
8758
|
};
|
|
8759
|
+
const publish = (patch) => replace2({ ...view, ...patch });
|
|
8760
|
+
const publishSnapshot = (snapshot) => replace2({ ...snapshot, preparing: view.preparing, checking: view.checking });
|
|
8687
8761
|
const freeze = (value) => {
|
|
8688
8762
|
options.freeze(value);
|
|
8689
8763
|
publish({ preparing: value });
|
|
@@ -8695,14 +8769,18 @@ function createUpdateClient(rpc, options) {
|
|
|
8695
8769
|
};
|
|
8696
8770
|
const heartbeat = () => call({ operation: "heartbeat", clientId: options.id, readiness: { ...options.readiness(), prepared } });
|
|
8697
8771
|
const poll = () => polling ??= (async () => {
|
|
8772
|
+
let saving = false;
|
|
8698
8773
|
try {
|
|
8699
8774
|
let reply = await heartbeat();
|
|
8700
8775
|
if (disposed) return;
|
|
8701
8776
|
if (reply.prepareRequestId) {
|
|
8702
8777
|
freeze(true);
|
|
8703
8778
|
if (prepared !== reply.prepareRequestId && !options.readiness().busy) {
|
|
8779
|
+
publishSnapshot(reply.snapshot);
|
|
8780
|
+
saving = true;
|
|
8704
8781
|
await options.flush();
|
|
8705
8782
|
if (disposed) return;
|
|
8783
|
+
saving = false;
|
|
8706
8784
|
const ready = options.readiness();
|
|
8707
8785
|
if (!ready.busy && !ready.dirty) {
|
|
8708
8786
|
prepared = reply.prepareRequestId;
|
|
@@ -8715,9 +8793,9 @@ function createUpdateClient(rpc, options) {
|
|
|
8715
8793
|
prepared = void 0;
|
|
8716
8794
|
freeze(false);
|
|
8717
8795
|
}
|
|
8718
|
-
|
|
8796
|
+
publishSnapshot(reply.snapshot);
|
|
8719
8797
|
} catch (error) {
|
|
8720
|
-
|
|
8798
|
+
publish({ reconnecting: !saving, error: saving ? "UPDATE_SAVE_FAILED" : error instanceof Error ? error.message : "UPDATE_SERVICE_UNAVAILABLE" });
|
|
8721
8799
|
}
|
|
8722
8800
|
})().finally(() => {
|
|
8723
8801
|
polling = void 0;
|
|
@@ -8744,7 +8822,7 @@ function createUpdateClient(rpc, options) {
|
|
|
8744
8822
|
if (operation === "check") publish({ checking: true, error: void 0 });
|
|
8745
8823
|
try {
|
|
8746
8824
|
const reply = await call({ operation, ...operation === "automatic" ? { enabled } : {} });
|
|
8747
|
-
|
|
8825
|
+
publishSnapshot(reply.snapshot);
|
|
8748
8826
|
await poll();
|
|
8749
8827
|
} catch (error) {
|
|
8750
8828
|
publish({ error: error instanceof Error ? error.message : "UPDATE_UNAVAILABLE" });
|
|
@@ -9560,6 +9638,27 @@ var updateZh = {
|
|
|
9560
9638
|
updateInstall: "\u7ACB\u5373\u66F4\u65B0",
|
|
9561
9639
|
updateAutomatic: "\u7A7A\u95F2\u65F6\u81EA\u52A8\u5B89\u88C5\u8865\u4E01\u66F4\u65B0",
|
|
9562
9640
|
updatePolicy: "\u9ED8\u8BA4\u81EA\u52A8\u68C0\u67E5\u5E76\u5B89\u88C5\u8865\u4E01\uFF0C\u65E0\u9700\u5F00\u542F\u3002\u8DE8\u5C0F\u7248\u672C\u5347\u7EA7\u9700\u786E\u8BA4\uFF1B\u4E0D\u4F1A\u5F3A\u5236\u91CD\u542F\u3002",
|
|
9641
|
+
updateRestartTrigger: "\u91CD\u542F\u540E\u751F\u6548",
|
|
9642
|
+
updateRestartHelp: "\u53EF\u7EE7\u7EED\u4F7F\u7528\uFF0C\u65B9\u4FBF\u65F6\u91CD\u542F\u5E94\u7528\u3002",
|
|
9643
|
+
updateTargetVersion: "\u66F4\u65B0\u76EE\u6807",
|
|
9644
|
+
updateHasUpdate: "\u6709\u66F4\u65B0",
|
|
9645
|
+
updateProgressTitle: "\u66F4\u65B0\u9636\u6BB5\u5B8C\u6210\u5EA6",
|
|
9646
|
+
updateProgressSteps: "\u51C6\u5907 \xB7 \u5B89\u88C5 \xB7 \u9A8C\u8BC1",
|
|
9647
|
+
updateProgressCompleted: "\u5DF2\u5B8C\u6210 {count}/3 \u9636\u6BB5",
|
|
9648
|
+
updateBusyTrigger: "\u66F4\u65B0\u4E2D",
|
|
9649
|
+
updateWaitingTrigger: "\u7B49\u5F85\u7A7A\u95F2",
|
|
9650
|
+
updateDeferred: "\u66F4\u65B0\u5DF2\u5EF6\u540E",
|
|
9651
|
+
updateRetry: "\u91CD\u8BD5\u66F4\u65B0",
|
|
9652
|
+
updateStatePending: "\u66F4\u65B0\u72B6\u6001\u5F85\u786E\u8BA4",
|
|
9653
|
+
updateCompanyChecking: "\u6B63\u5728\u68C0\u67E5\u516C\u53F8\u5E02\u573A",
|
|
9654
|
+
updateCompanyNew: "\u8BF7\u5728\u4E07\u673A\u63D2\u4EF6\u4E2D\u5FC3\u66F4\u65B0\u3002",
|
|
9655
|
+
updateInstallHelp: "\u5B89\u88C5\u5B8C\u6210\u540E\u5C06\u9A8C\u8BC1\u65B0\u7248\u6216\u63D0\u793A\u91CD\u542F\u3002",
|
|
9656
|
+
updateOn: "\u5DF2\u5F00\u542F",
|
|
9657
|
+
updateOff: "\u5DF2\u5173\u95ED",
|
|
9658
|
+
updateFreezeInstalling: "\u6B63\u5728\u5B89\u88C5\u66F4\u65B0\uFF0C\u6682\u65F6\u65E0\u6CD5\u7F16\u8F91\u3002",
|
|
9659
|
+
updateFreezeVerifying: "\u6B63\u5728\u9A8C\u8BC1\u65B0\u7248\uFF0C\u6682\u65F6\u65E0\u6CD5\u7F16\u8F91\u3002",
|
|
9660
|
+
updateConfirmMinor: "\u8DE8\u5C0F\u7248\u672C\u5347\u7EA7\u9700\u8981\u786E\u8BA4\u3002",
|
|
9661
|
+
updateManualHelp: "\u53EF\u5728\u65B9\u4FBF\u65F6\u624B\u52A8\u5B89\u88C5\u3002",
|
|
9563
9662
|
updateIdle: "\u5DF2\u5B8C\u6210\u68C0\u67E5\uFF0C\u6682\u65E0\u66F4\u65B0",
|
|
9564
9663
|
updateInitial: "\u542F\u52A8\u540E\u81EA\u52A8\u68C0\u67E5\u66F4\u65B0",
|
|
9565
9664
|
updateChecking: "\u6B63\u5728\u68C0\u67E5\u65B0\u7248\u672C",
|
|
@@ -9599,6 +9698,27 @@ var updateEn = {
|
|
|
9599
9698
|
updateInstall: "Update now",
|
|
9600
9699
|
updateAutomatic: "Install patch updates when idle",
|
|
9601
9700
|
updatePolicy: "Checks and installs patches automatically by default; no setup required. Minor upgrades require confirmation. The app never restarts automatically.",
|
|
9701
|
+
updateRestartTrigger: "Restart to apply",
|
|
9702
|
+
updateRestartHelp: "You can continue working and restart when convenient.",
|
|
9703
|
+
updateTargetVersion: "Update target",
|
|
9704
|
+
updateHasUpdate: "Update available",
|
|
9705
|
+
updateProgressTitle: "Update stages completed",
|
|
9706
|
+
updateProgressSteps: "Prepare \xB7 Install \xB7 Verify",
|
|
9707
|
+
updateProgressCompleted: "{count}/3 stages complete",
|
|
9708
|
+
updateBusyTrigger: "Updating",
|
|
9709
|
+
updateWaitingTrigger: "Waiting to install",
|
|
9710
|
+
updateDeferred: "Update deferred",
|
|
9711
|
+
updateRetry: "Retry update",
|
|
9712
|
+
updateStatePending: "Awaiting update status",
|
|
9713
|
+
updateCompanyChecking: "Checking the Company market",
|
|
9714
|
+
updateCompanyNew: "Update from Wanji Plugin Center.",
|
|
9715
|
+
updateInstallHelp: "After installation, the app verifies the new version or asks you to restart.",
|
|
9716
|
+
updateOn: "On",
|
|
9717
|
+
updateOff: "Off",
|
|
9718
|
+
updateFreezeInstalling: "Installing the update. Editing is paused.",
|
|
9719
|
+
updateFreezeVerifying: "Verifying the new version. Editing is paused.",
|
|
9720
|
+
updateConfirmMinor: "Minor upgrades require confirmation.",
|
|
9721
|
+
updateManualHelp: "You can install the update when convenient.",
|
|
9602
9722
|
updateIdle: "No updates available",
|
|
9603
9723
|
updateInitial: "Checks automatically after startup",
|
|
9604
9724
|
updateChecking: "Checking for updates",
|
|
@@ -9952,15 +10072,15 @@ var zh = {
|
|
|
9952
10072
|
companyModelUnavailable: "\u8EAB\u4EFD\u5DF2\u9A8C\u8BC1\uFF0C\u516C\u53F8\u6A21\u578B\u901A\u9053\u6682\u4E0D\u53EF\u7528",
|
|
9953
10073
|
companyUnbind: "\u89E3\u9664\u7ED1\u5B9A",
|
|
9954
10074
|
companyCancel: "\u53D6\u6D88\u7ED1\u5B9A",
|
|
9955
|
-
companyAwaiting: "\
|
|
10075
|
+
companyAwaiting: "\u8BF7\u5728\u6D4F\u89C8\u5668\u5B8C\u6210\u9489\u9489\u6388\u6743\uFF0C\u7ED1\u5B9A\u72B6\u6001\u4F1A\u81EA\u52A8\u66F4\u65B0\u3002",
|
|
9956
10076
|
companyPairingCode: "\u914D\u5BF9\u7801",
|
|
9957
|
-
companyVerify: "\u6253\u5F00\u9489\u9489\
|
|
10077
|
+
companyVerify: "\u6253\u5F00\u9489\u9489\u767B\u5F55",
|
|
9958
10078
|
companyHint: "\u4E07\u673A\u4F01\u4E1A\u6210\u5458\u7ED1\u5B9A\u672C\u4EBA\u7684\u9489\u9489\u8D26\u53F7\u540E\uFF0C\u5373\u53EF\u4F7F\u7528\u516C\u53F8\u6A21\u578B\u3002",
|
|
9959
10079
|
companyIneligible: "\u672A\u80FD\u9A8C\u8BC1\u5F53\u524D\u8D26\u53F7\u7684\u4E07\u673A\u4F01\u4E1A\u6210\u5458\u8EAB\u4EFD\u3002",
|
|
9960
10080
|
companyAliasOptional: "\u82B1\u540D\uFF08\u9009\u586B\uFF09",
|
|
9961
10081
|
companyPhoneOptional: "\u624B\u673A\u53F7\uFF08\u9009\u586B\uFF09",
|
|
9962
|
-
companyContinue: "\
|
|
9963
|
-
companyBindingFailed: "\
|
|
10082
|
+
companyContinue: "\u4F7F\u7528\u9489\u9489\u767B\u5F55",
|
|
10083
|
+
companyBindingFailed: "\u672A\u80FD\u53D1\u8D77\u9489\u9489\u767B\u5F55\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
9964
10084
|
companyRetryHint: "\u6682\u65F6\u65E0\u6CD5\u786E\u8BA4\u516C\u53F8\u8EAB\u4EFD\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
9965
10085
|
companyChecking: "\u6B63\u5728\u68C0\u67E5\u516C\u53F8\u8EAB\u4EFD\u2026",
|
|
9966
10086
|
companyUnavailable: "\u516C\u53F8\u8EAB\u4EFD\u670D\u52A1\u5C1A\u672A\u63A5\u5165\u3002",
|
|
@@ -10281,15 +10401,15 @@ var en = {
|
|
|
10281
10401
|
companyModelUnavailable: "Identity verified. The company model is temporarily unavailable.",
|
|
10282
10402
|
companyUnbind: "Unlink account",
|
|
10283
10403
|
companyCancel: "Cancel linking",
|
|
10284
|
-
companyAwaiting: "
|
|
10404
|
+
companyAwaiting: "Authorize in DingTalk. Your company identity will update automatically.",
|
|
10285
10405
|
companyPairingCode: "Pairing code",
|
|
10286
|
-
companyVerify: "Open DingTalk
|
|
10406
|
+
companyVerify: "Open DingTalk sign-in",
|
|
10287
10407
|
companyHint: "Wanji employees can link their own DingTalk account to use the company model.",
|
|
10288
10408
|
companyIneligible: "We could not verify this account\u2019s Wanji membership.",
|
|
10289
10409
|
companyAliasOptional: "Display name (optional)",
|
|
10290
10410
|
companyPhoneOptional: "Mobile number (optional)",
|
|
10291
|
-
companyContinue: "
|
|
10292
|
-
companyBindingFailed: "
|
|
10411
|
+
companyContinue: "Sign in with DingTalk",
|
|
10412
|
+
companyBindingFailed: "DingTalk sign-in could not start. Try again.",
|
|
10293
10413
|
companyRetryHint: "Company identity could not be verified. Try again.",
|
|
10294
10414
|
companyChecking: "Checking company identity\u2026",
|
|
10295
10415
|
companyUnavailable: "The company identity service is not connected.",
|
|
@@ -10600,6 +10720,11 @@ var en = {
|
|
|
10600
10720
|
contextHint: "Based on the sample conversation"
|
|
10601
10721
|
};
|
|
10602
10722
|
|
|
10723
|
+
// src/sales-model.ts
|
|
10724
|
+
function isSalesFlash(provider, model) {
|
|
10725
|
+
return model === "deepseek-v4.1-flash" || provider === "deepseek-account" && model === "deepseek-flash";
|
|
10726
|
+
}
|
|
10727
|
+
|
|
10603
10728
|
// src/plan-projection.ts
|
|
10604
10729
|
var steps = { answer: "\u7B54\u590D\u5F53\u524D\u95EE\u9898\uFF0C\u63A5\u5BA2\u6237\u540E\u7EED\u7591\u95EE\u3002", provide_material: "\u63D0\u4F9B\u5BA2\u6237\u672C\u8F6E\u8981\u7684\u8BF4\u660E\u6216\u6750\u6599\uFF1B\u5DF2\u6536\u5230\u7684\u5185\u5BB9\u4E0D\u91CD\u590D\u51C6\u5907\u3002", prepare_confirmation: "\u6309\u5DF2\u786E\u8BA4\u8303\u56F4\u63D0\u4F9B\u786E\u8BA4\u6750\u6599\uFF1B\u672A\u5B9A\u4ED8\u6B3E\u6216\u5F00\u901A\u7EC6\u8282\u5355\u72EC\u8865\uFF0C\u4E0D\u62D6\u4F4F\u5DF2\u5B9A\u6750\u6599\u3002", clarify: "\u53EA\u8865\u95EE\u5F71\u54CD\u5F53\u524D\u5224\u65AD\u7684\u5FC5\u8981\u4FE1\u606F\uFF0C\u4E0D\u91CD\u95EE\u5DF2\u7ECF\u660E\u786E\u7684\u5185\u5BB9\u3002", verify_company: "\u53EA\u6838\u5B9E\u672C\u8F6E\u672A\u5B9A\u7684\u516C\u53F8\u6761\u4EF6\uFF0C\u4FDD\u7559\u5176\u4ED6\u5DF2\u7ECF\u786E\u8BA4\u7684\u6761\u4EF6\u3002", coordinate_demo: "\u534F\u8C03\u5BA2\u6237\u5DF2\u613F\u610F\u4E86\u89E3\u7684\u6F14\u793A\uFF0C\u4E0D\u627F\u8BFA\u672A\u786E\u8BA4\u6863\u671F\u3002", wait: "\u7B49\u5F85\u5BA2\u6237\u7EA6\u5B9A\u7684\u53CD\u9988\uFF0C\u4E0D\u91CD\u590D\u51C6\u5907\u5DF2\u5B8C\u6210\u7684\u5185\u5BB9\u3002", stop: "\u6682\u505C\u4E3B\u52A8\u8054\u7CFB\uFF1B\u5BA2\u6237\u56DE\u6765\u63D0\u51FA\u65B0\u95EE\u9898\u65F6\u518D\u63A5\u8BE5\u95EE\u9898\u3002" };
|
|
10605
10730
|
function projectInternalPlan(plan, latest) {
|
|
@@ -12349,9 +12474,9 @@ async function generateReply(rpc, workspaceId, contact, latest, signal, options
|
|
|
12349
12474
|
case "GENERATION_COMPANY_MODEL_UNAVAILABLE":
|
|
12350
12475
|
throw Error("\u516C\u53F8\u9500\u552E\u8EAB\u4EFD\u5DF2\u9A8C\u8BC1\uFF0C\u6A21\u578B\u901A\u9053\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u91CD\u8BD5\u3002");
|
|
12351
12476
|
case "GENERATION_MODEL_NOT_CONFIGURED":
|
|
12352
|
-
throw Error("\u9500\u552E\u6A21\u578B\u5C1A\u672A\u914D\u7F6E\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u7528\u5DF2\u6388\u6743\u7684 DeepSeek
|
|
12477
|
+
throw Error("\u9500\u552E\u6A21\u578B\u5C1A\u672A\u914D\u7F6E\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u7528\u5DF2\u6388\u6743\u7684 DeepSeek V4.1 Flash\uFF0C\u518D\u751F\u6210\u56DE\u590D\u3002");
|
|
12353
12478
|
case "GENERATION_MODEL_INCOMPATIBLE":
|
|
12354
|
-
throw Error("\u5F53\u524D\u9500\u552E\u6A21\u578B\u65E0\u6CD5\u7528\u4E8E\u8D77\u8349\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u62E9 DeepSeek
|
|
12479
|
+
throw Error("\u5F53\u524D\u9500\u552E\u6A21\u578B\u65E0\u6CD5\u7528\u4E8E\u8D77\u8349\u3002\u8BF7\u5728\u4E07\u673A\u5927\u8111\u8BBE\u7F6E\u4E2D\u9009\u62E9 DeepSeek V4.1 Flash\u3002\u6709\u72EC\u7ACB\u9500\u552E\u6A21\u578B\u914D\u7F6E\u65F6\uFF0C\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u8BE5\u914D\u7F6E\u3002");
|
|
12355
12480
|
case "GENERATION_WORKSPACE":
|
|
12356
12481
|
throw Error("\u9500\u552E\u52A9\u624B\u627E\u4E0D\u5230\u672C\u8F6E\u5DE5\u4F5C\u533A\u3002\u8BF7\u91CD\u65B0\u6253\u5F00\u9500\u552E\u52A9\u624B\uFF0C\u7B49\u5F85\u5DE5\u4F5C\u533A\u8F7D\u5165\u540E\u91CD\u8BD5\u3002");
|
|
12357
12482
|
}
|
|
@@ -12404,7 +12529,7 @@ async function generateReply(rpc, workspaceId, contact, latest, signal, options
|
|
|
12404
12529
|
if (!object2(record3) || !object2(record3.event) || !object2(record3.event.data)) return [];
|
|
12405
12530
|
const message = record3.event.data.message;
|
|
12406
12531
|
if (!object2(message) || message.role !== "assistant" || !Array.isArray(message.content)) return [];
|
|
12407
|
-
if (!object2(message.source) || message.source.
|
|
12532
|
+
if (!object2(message.source) || !isSalesFlash(message.source.provider, message.source.model)) throw new Error("\u672C\u6B21\u56DE\u590D\u6CA1\u6709\u4F7F\u7528\u5DF2\u56FA\u5B9A\u7684Flash\uFF0C\u6682\u672A\u91C7\u7528\uFF1B\u8BF7\u68C0\u67E5\u4E07\u673A\u5927\u8111\u5F53\u524D\u6A21\u578B\u3002");
|
|
12408
12533
|
const text5 = message.content.filter((c) => object2(c) && c.type === "text" && typeof c.text === "string").map((c) => c.text).join("\n");
|
|
12409
12534
|
return text5.trim() ? [text5] : [];
|
|
12410
12535
|
});
|
|
@@ -13353,7 +13478,7 @@ function SalesPage({ t, useSales, useWorkspaces, dispatch, generate, loadConvers
|
|
|
13353
13478
|
const syncProgress = presentation.blocked || view.status?.phase === "authorizing" ? void 0 : view.status?.progress;
|
|
13354
13479
|
const syncPercent = wechatProgressPercent({ progress: syncProgress });
|
|
13355
13480
|
const syncLabel = view.error ? "wxProgressUnavailable" : view.status?.phase === "error" ? "wxProgressFailed" : view.status?.phase === "paused" ? "wxPaused" : syncActive ? "wxIncremental" : "wxRoundComplete";
|
|
13356
|
-
return /* @__PURE__ */ import_react12.default.createElement("section", { className: "ws-page", "aria-label": t("title") }, /* @__PURE__ */ import_react12.default.createElement("style", null, styles + updateStyles + companyIdentityStyles), /* @__PURE__ */ import_react12.default.createElement("header", { className: "ws-header" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-heading" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-brand" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chat", size: 22 })), /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-title-line" }, /* @__PURE__ */ import_react12.default.createElement("h1", null, t("title")), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-demo-label" }, t("wxConnected"))), /* @__PURE__ */ import_react12.default.createElement("p", null, t("subtitle")))), (companyIdentityRpc || updater && update) && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-header-actions" }, companyIdentityRpc && /* @__PURE__ */ import_react12.default.createElement(CompanyIdentityPanel, { rpc: companyIdentityRpc, t, disabled: frozen }), updater && update && /* @__PURE__ */ import_react12.default.createElement(UpdatePanel, { client: updater, view: update, t }))), frozen && /* @__PURE__ */ import_react12.default.createElement("p", { role: "status", className: "ws-update-freeze" }, t("updateFreeze")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-inline-sync" }, wechat && /* @__PURE__ */ import_react12.default.createElement(SyncPanel, { client: wechat, t, view, workspaceId: selectedWorkspace }), !contact.id && workspaceState.error && /* @__PURE__ */ import_react12.default.createElement("span", { role: "status" }, workspaceState.error)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-body", "data-empty": !contact.id, "data-show-chat": showChat, "data-profile": profileVisibility }, /* @__PURE__ */ import_react12.default.createElement("aside", { className: "ws-contacts", "aria-label": t("customers") }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contacts-head" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sortline" }, /* @__PURE__ */ import_react12.default.createElement("h2", null, t("customers")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sort-control" }, /* @__PURE__ */ import_react12.default.createElement("select", { className: "ws-intent-sort", "aria-label": t("intentSort"), value: sort, onChange: (event) => setSort(event.currentTarget.value === "intent" ? "intent" : "recent") }, /* @__PURE__ */ import_react12.default.createElement("option", { value: "recent" }, t("intentSortRecent")), /* @__PURE__ */ import_react12.default.createElement("option", { value: "intent" }, t("intentSortHigh"))), /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chevron", size: 12 }))), /* @__PURE__ */ import_react12.default.createElement("label", { className: "ws-search" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 15 }), /* @__PURE__ */ import_react12.default.createElement("input", { name: "sales-search", autoComplete: "off", "aria-label": t("search"), placeholder: t("search"), value: query, onChange: (e) => setQuery(e.target.value) })), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-filters", role: "group", "aria-label": t("customers") }, ["all", "pending", "handled"].map((value) => /* @__PURE__ */ import_react12.default.createElement("button", { key: value, type: "button", "aria-pressed": filter === value, onClick: () => setFilter(value) }, t(value), /* @__PURE__ */ import_react12.default.createElement("span", null, value === "all" ? state.contacts.length : value === "pending" ? pending : state.contacts.length - pending))))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contact-list" }, contacts.map((c) => /* @__PURE__ */ import_react12.default.createElement("button", { key: c.id, className: `ws-contact ${c.id === contact.id ? "is-selected" : ""}`, "aria-pressed": c.id === contact.id, onClick: () => select(c.id) }, /* @__PURE__ */ import_react12.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, c.wechat?.accountId]), owner: c.wechat?.chatKey ?? c.id, mediaId: c.wechat?.avatarId, fallback: c.initials }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-content" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-line" }, /* @__PURE__ */ import_react12.default.createElement("strong", { title: c.name }, c.name), /* @__PURE__ */ import_react12.default.createElement("time", { dateTime: c.time, title: c.time }, displayTime(c.time))), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-preview" }, c.wechat && c.preview === "[image]" ? t("wxImageListPreview") : c.preview), c.wechat && /* @__PURE__ */ import_react12.default.createElement(IntentBadge, { intent: c.intent, t })))), !contacts.length && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-empty" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 26 }), /* @__PURE__ */ import_react12.default.createElement("p", null, t(state.contacts.length ? "noResults" : presentation.emptyKey)), state.contacts.length > 0 && /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-text-button", onClick: () => {
|
|
13481
|
+
return /* @__PURE__ */ import_react12.default.createElement("section", { className: "ws-page", "aria-label": t("title") }, /* @__PURE__ */ import_react12.default.createElement("style", null, styles + updateStyles + companyIdentityStyles), /* @__PURE__ */ import_react12.default.createElement("header", { className: "ws-header" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-heading" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-brand" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chat", size: 22 })), /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-title-line" }, /* @__PURE__ */ import_react12.default.createElement("h1", null, t("title")), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-demo-label" }, t("wxConnected"))), /* @__PURE__ */ import_react12.default.createElement("p", null, t("subtitle")))), (companyIdentityRpc || updater && update) && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-header-actions" }, companyIdentityRpc && /* @__PURE__ */ import_react12.default.createElement(CompanyIdentityPanel, { rpc: companyIdentityRpc, t, disabled: frozen }), updater && update && /* @__PURE__ */ import_react12.default.createElement(UpdatePanel, { client: updater, view: update, t }))), frozen && /* @__PURE__ */ import_react12.default.createElement("p", { role: "status", className: "ws-update-freeze" }, t(update?.reconnecting ? "updateReconnect" : update?.phase === "installing" ? "updateFreezeInstalling" : update?.phase === "verifying" ? "updateFreezeVerifying" : "updateFreeze")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-inline-sync" }, wechat && /* @__PURE__ */ import_react12.default.createElement(SyncPanel, { client: wechat, t, view, workspaceId: selectedWorkspace }), !contact.id && workspaceState.error && /* @__PURE__ */ import_react12.default.createElement("span", { role: "status" }, workspaceState.error)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-body", "data-empty": !contact.id, "data-show-chat": showChat, "data-profile": profileVisibility }, /* @__PURE__ */ import_react12.default.createElement("aside", { className: "ws-contacts", "aria-label": t("customers") }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contacts-head" }, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sortline" }, /* @__PURE__ */ import_react12.default.createElement("h2", null, t("customers")), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-intent-sort-control" }, /* @__PURE__ */ import_react12.default.createElement("select", { className: "ws-intent-sort", "aria-label": t("intentSort"), value: sort, onChange: (event) => setSort(event.currentTarget.value === "intent" ? "intent" : "recent") }, /* @__PURE__ */ import_react12.default.createElement("option", { value: "recent" }, t("intentSortRecent")), /* @__PURE__ */ import_react12.default.createElement("option", { value: "intent" }, t("intentSortHigh"))), /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chevron", size: 12 }))), /* @__PURE__ */ import_react12.default.createElement("label", { className: "ws-search" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 15 }), /* @__PURE__ */ import_react12.default.createElement("input", { name: "sales-search", autoComplete: "off", "aria-label": t("search"), placeholder: t("search"), value: query, onChange: (e) => setQuery(e.target.value) })), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-filters", role: "group", "aria-label": t("customers") }, ["all", "pending", "handled"].map((value) => /* @__PURE__ */ import_react12.default.createElement("button", { key: value, type: "button", "aria-pressed": filter === value, onClick: () => setFilter(value) }, t(value), /* @__PURE__ */ import_react12.default.createElement("span", null, value === "all" ? state.contacts.length : value === "pending" ? pending : state.contacts.length - pending))))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-contact-list" }, contacts.map((c) => /* @__PURE__ */ import_react12.default.createElement("button", { key: c.id, className: `ws-contact ${c.id === contact.id ? "is-selected" : ""}`, "aria-pressed": c.id === contact.id, onClick: () => select(c.id) }, /* @__PURE__ */ import_react12.default.createElement(WechatAvatar, { client: wechat, scope: JSON.stringify([selectedWorkspace, c.wechat?.accountId]), owner: c.wechat?.chatKey ?? c.id, mediaId: c.wechat?.avatarId, fallback: c.initials }), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-content" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-contact-line" }, /* @__PURE__ */ import_react12.default.createElement("strong", { title: c.name }, c.name), /* @__PURE__ */ import_react12.default.createElement("time", { dateTime: c.time, title: c.time }, displayTime(c.time))), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-preview" }, c.wechat && c.preview === "[image]" ? t("wxImageListPreview") : c.preview), c.wechat && /* @__PURE__ */ import_react12.default.createElement(IntentBadge, { intent: c.intent, t })))), !contacts.length && /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-empty" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "search", size: 26 }), /* @__PURE__ */ import_react12.default.createElement("p", null, t(state.contacts.length ? "noResults" : presentation.emptyKey)), state.contacts.length > 0 && /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-text-button", onClick: () => {
|
|
13357
13482
|
setQuery("");
|
|
13358
13483
|
setFilter("all");
|
|
13359
13484
|
} }, t("clearSearch")))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-sync" }, state.contacts.length > 0 ? /* @__PURE__ */ import_react12.default.createElement(SyncFooter, { view, t }) : /* @__PURE__ */ import_react12.default.createElement("span", null, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-dot" }), t("wxLocalHistory")))), /* @__PURE__ */ import_react12.default.createElement("main", { className: "ws-conversation" }, !contact.id ? /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-conversation-empty" }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "chat", size: 34 }), /* @__PURE__ */ import_react12.default.createElement("h2", null, t("wxRealTitle")), /* @__PURE__ */ import_react12.default.createElement("p", null, syncActive || syncPercent !== void 0 ? /* @__PURE__ */ import_react12.default.createElement(SyncActivity, { active: syncActive, percent: syncPercent }, t(syncActive ? "wxSyncingHint" : syncLabel)) : t(presentation.blocked ? "wxAwaitConnectionHistory" : presentation.hintKey ?? "wxSelectChat")), (syncActive || syncPercent !== void 0) && /* @__PURE__ */ import_react12.default.createElement(SyncProgressTrack, { progress: syncProgress, active: syncActive, t })) : /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-conversation-head" }, /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-icon-button ws-mobile-back", "aria-label": t("contactsBack"), onClick: () => setShowChat(false) }, /* @__PURE__ */ import_react12.default.createElement(Glyph, { name: "arrow" })), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-person-title" }, /* @__PURE__ */ import_react12.default.createElement("h2", null, contact.name, !contact.wechat && /* @__PURE__ */ import_react12.default.createElement("span", null, contact.segment)), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-person-meta" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-person-source" }, /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-dot", "aria-hidden": "true" }), t("wechat"), /* @__PURE__ */ import_react12.default.createElement("span", { className: "ws-separator", "aria-hidden": "true" }, "/"), contact.wechat ? contact.crm ? t("wxBound") : t("wxUnbound") : t("sampleContact")), contact.wechat && /* @__PURE__ */ import_react12.default.createElement(IntentDetails, { key: contact.id, intent: contact.intent, t }))), /* @__PURE__ */ import_react12.default.createElement("div", { className: "ws-conversation-actions" }, /* @__PURE__ */ import_react12.default.createElement("button", { className: "ws-button ws-handle", disabled: frozen || contact.status === "handled", onClick: () => {
|