@mgamadeus/ddd-agents 0.16.1 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -10
- package/boundary.json +15 -1
- package/dist/admin-chat-widgets.js +158 -0
- package/dist/admin-chat-widgets.js.map +1 -0
- package/dist/admin.js +92 -65
- package/dist/admin.js.map +1 -1
- package/dist/chat.js +19 -19
- package/dist/chat.js.map +1 -1
- package/dist/chunks/AgentScheduleOrderDraftPanel-DM6pz_hc.js +304 -0
- package/dist/chunks/AgentScheduleOrderDraftPanel-DM6pz_hc.js.map +1 -0
- package/dist/chunks/{ConversationMarkdown-DNQcVuz-.js → ConversationMarkdown-dj0EF6bu.js} +5 -5
- package/dist/chunks/{ConversationMarkdown-DNQcVuz-.js.map → ConversationMarkdown-dj0EF6bu.js.map} +1 -1
- package/dist/chunks/{ConversationMessageInputComposerWidgets-BlpIule7.js → ConversationMessageInputComposerWidgets-ClgCwnVW.js} +6 -6
- package/dist/chunks/{ConversationMessageInputComposerWidgets-BlpIule7.js.map → ConversationMessageInputComposerWidgets-ClgCwnVW.js.map} +1 -1
- package/dist/chunks/{VoiceBarsIcon-eODB_UTI.js → VoiceBarsIcon-B6VTVtdB.js} +4 -4
- package/dist/chunks/{VoiceBarsIcon-eODB_UTI.js.map → VoiceBarsIcon-B6VTVtdB.js.map} +1 -1
- package/dist/chunks/{WebSearchResultsConversationWidget-l9Aek_lG.js → WebSearchResultsConversationWidget-BVMwJfhL.js} +73 -64
- package/dist/chunks/WebSearchResultsConversationWidget-BVMwJfhL.js.map +1 -0
- package/dist/chunks/{agents-http-trace-mappers-rsbGAf2_.js → agents-http-trace-mappers-CuGZOFu-.js} +53 -14
- package/dist/chunks/agents-http-trace-mappers-CuGZOFu-.js.map +1 -0
- package/dist/chunks/{browser-request-interception-D678IemW.js → browser-request-interception-BnOQWLaJ.js} +2 -2
- package/dist/chunks/{browser-request-interception-D678IemW.js.map → browser-request-interception-BnOQWLaJ.js.map} +1 -1
- package/dist/chunks/{canvas-label-context-C1Pc_Ldo.js → canvas-label-context-5yvbmK-V.js} +3 -3
- package/dist/chunks/{canvas-label-context-C1Pc_Ldo.js.map → canvas-label-context-5yvbmK-V.js.map} +1 -1
- package/dist/chunks/{canvas-reducers-BYArW_Ji.js → canvas-reducers-133Kl1QH.js} +2 -2
- package/dist/chunks/{canvas-reducers-BYArW_Ji.js.map → canvas-reducers-133Kl1QH.js.map} +1 -1
- package/dist/chunks/{canvasBodies-BpLPp-S8.js → canvasBodies-B2M6aWao.js} +4 -4
- package/dist/chunks/{canvasBodies-BpLPp-S8.js.map → canvasBodies-B2M6aWao.js.map} +1 -1
- package/dist/chunks/{canvasStorage-DSspwRMg.js → canvasStorage-B69JHOLd.js} +2 -2
- package/dist/chunks/{canvasStorage-DSspwRMg.js.map → canvasStorage-B69JHOLd.js.map} +1 -1
- package/dist/chunks/{content-from-unified-diff-DWyBHRSy.js → content-from-unified-diff-BKdgop63.js} +39 -5
- package/dist/chunks/content-from-unified-diff-BKdgop63.js.map +1 -0
- package/dist/chunks/{contract-DtFmOk91.js → contract-CQ6PO_e8.js} +2 -2
- package/dist/chunks/{contract-DtFmOk91.js.map → contract-CQ6PO_e8.js.map} +1 -1
- package/dist/chunks/{conversation-Cbrqtx-_.js → conversation-VosmRbsr.js} +4 -2
- package/dist/chunks/{conversation-Cbrqtx-_.js.map → conversation-VosmRbsr.js.map} +1 -1
- package/dist/chunks/conversation-trace-fVeh6Lg6.js.map +1 -1
- package/dist/chunks/{widget-name-resolver-DXIE9JUr.js → conversationWidgetRegistry-webrYtkI.js} +810 -530
- package/dist/chunks/conversationWidgetRegistry-webrYtkI.js.map +1 -0
- package/dist/chunks/{index-DZovGMpG.js → index-DAEGct6X.js} +61 -61
- package/dist/chunks/index-DAEGct6X.js.map +1 -0
- package/dist/chunks/{link-navigation-a_sRfmsj.js → link-navigation-DQWyeNkx.js} +2 -2
- package/dist/chunks/{link-navigation-a_sRfmsj.js.map → link-navigation-DQWyeNkx.js.map} +1 -1
- package/dist/chunks/{withPollingChangeSubscription-Cz3Diolr.js → withPollingChangeSubscription-Ct8kjmlL.js} +19 -2
- package/dist/chunks/withPollingChangeSubscription-Ct8kjmlL.js.map +1 -0
- package/dist/client-testing.js +39 -5
- package/dist/client-testing.js.map +1 -1
- package/dist/client.js +43 -14
- package/dist/client.js.map +1 -1
- package/dist/contract.js +4 -3
- package/dist/files/i18n-keys.json +619 -15
- package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +4 -2
- package/dist/files/widgets/OwnerStepConfirmationConversationWidget/OwnerStepConfirmationConversationWidget.md +54 -0
- package/dist/files/widgets/OwnerStepConfirmationConversationWidget/owner-step-confirmation.preview-fixtures.json +16 -0
- package/dist/image-render.js +8 -8
- package/dist/index.js +16 -16
- package/dist/kit.js +2 -2
- package/dist/preview.js +124 -117
- package/dist/preview.js.map +1 -1
- package/dist/provider.js +2 -2
- package/dist/renderer.js +53 -52
- package/dist/styles.css +46 -0
- package/dist/types/admin/connections/connection-parts.d.ts +2 -1
- package/dist/types/admin/schedules/AgentScheduleOrderDraftPanel.d.ts +45 -0
- package/dist/types/admin/schedules/AgentSchedulesPanel.d.ts +11 -3
- package/dist/types/admin/schedules/agent-schedules-api.d.ts +38 -2
- package/dist/types/admin/schedules/agent-schedules-format.d.ts +22 -1
- package/dist/types/admin/schedules/agent-schedules-types.d.ts +91 -1
- package/dist/types/admin-chat-widgets/ScheduleOrderApprovalConversationWidget.d.ts +37 -0
- package/dist/types/admin-chat-widgets/registerScheduleOrderApprovalWidget.d.ts +11 -0
- package/dist/types/chat/trace/TurnMetaLine.d.ts +5 -3
- package/dist/types/chat/trace/trace-counts.d.ts +2 -0
- package/dist/types/chat/trace/trace-types.d.ts +4 -0
- package/dist/types/client/AgentsConversationClient.d.ts +17 -1
- package/dist/types/client/http/agents-http-mappers.d.ts +4 -2
- package/dist/types/client/http/agents-http-trace-wire.d.ts +2 -0
- package/dist/types/client/http/agents-http-wire.d.ts +24 -0
- package/dist/types/client/testing/createInMemoryAgentsConversationClient.d.ts +13 -1
- package/dist/types/contract/conversation-trace.d.ts +4 -0
- package/dist/types/contract/conversation.d.ts +43 -0
- package/dist/types/entries/admin-chat-widgets.d.ts +2 -0
- package/dist/types/entries/admin.d.ts +4 -2
- package/dist/types/entries/renderer.d.ts +1 -1
- package/dist/types/renderer/widget-tree/composed-node-schema.d.ts +20 -3
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +3 -1
- package/dist/voice.js +2 -2
- package/dist/widgets.js +4 -4
- package/package.json +7 -1
- package/public-api.json +39 -0
- package/dist/chunks/WebSearchResultsConversationWidget-l9Aek_lG.js.map +0 -1
- package/dist/chunks/agents-http-trace-mappers-rsbGAf2_.js.map +0 -1
- package/dist/chunks/content-from-unified-diff-DWyBHRSy.js.map +0 -1
- package/dist/chunks/index-DZovGMpG.js.map +0 -1
- package/dist/chunks/widget-name-resolver-DXIE9JUr.js.map +0 -1
- package/dist/chunks/withPollingChangeSubscription-Cz3Diolr.js.map +0 -1
package/dist/chunks/{widget-name-resolver-DXIE9JUr.js → conversationWidgetRegistry-webrYtkI.js}
RENAMED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React, { useReducer, useRef, useCallback, useMemo, useEffect, useState, useContext, createContext, useLayoutEffect, useId, useSyncExternalStore, Fragment as Fragment$1 } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { X as getWidgetSelfHydrationKeyFieldName, K as getAgentsEnvironment, F as escapePlainTextForText, r as Text, I as Icon, a6 as useAgentsOwnerSettings, E as classNames, B as Button, S as SegmentBar, v as TrendDelta, w as WidgetText, a0 as translateText, _ as reportWidgetCrash, W as WidgetFeatureGate, g as InteractiveSurface, C as Checkbox, e as DateInput, t as TextInput, R as RadioGroup, l as Select, k as RangeSlider, T as Tabs, s as TextArea, M as Map$1, h as MapMarker, a5 as useAgentsMapsLoader, m as Skeleton, Y as openImageGallery, p as StatusBadge, i as Markdown, a4 as useAgentsEnvironment, af as canStartConversationInPersonalSpace, ag as startConversationInPersonalSpace, ah as canOpenConnectionPermissions, ai as openConnectionPermissions, a9 as useAgentsTexts } from "./index-
|
|
4
|
+
import { j as registerWidgetHydrator, az as SkeletonLine, aI as WidgetSurface, aF as WidgetKpiValue, $ as readWidgetAgentSpaceKeyAttribute, W as WidgetRenderReportContext, E as buildWidgetAgentSpaceKeyProps, bA as readTextNodeContent, bB as readAllowedValue, a as useConversationWidgetContext, M as ModelText, ao as DonePill, by as ConversationWidgetButton, a2 as shortStringHash, bi as WidgetImageReadinessContext, Y as messageAnchor, x as ConversationWidgetActions, bC as useReportTextNodeRenderState, bD as readTextNodeRenderState, aA as SkeletonPill, bE as buildFaviconUrl, bF as readSiteHostname, ay as SkeletonCircle, bG as readSafeHttpUrl, a4 as useWidgetHydration, a3 as useIsEmailWidgetRender, u as useReportWidgetRenderStatus, a9 as AttachedFilesConversationWidget, ag as ClockConversationWidget, ah as ConceptExplainerConversationWidget, aj as CurrencyConverterConversationWidget, ak as CustomVisualizationConversationWidget, ap as DriveFilesConversationWidget, bH as registerDriveFilesHydrator, bu as normalizeEntityMentionFields, ar as EntityMentionConversationWidget, bI as IMAGE_GALLERY_CANVAS_ID, av as ImageGalleryConversationWidget, aH as WidgetStatusChip, aJ as WidgetSurfaceSkeleton, aK as WritingDraftConversationWidget, aC as SuggestedActions, aw as MultiChoiceConversationWidget, ax as QuickRepliesConversationWidget, aD as ToolTraceConversationWidget, ai as ConversationSearchResultsConversationWidget, aE as WebSearchResultsConversationWidget } from "./WebSearchResultsConversationWidget-BVMwJfhL.js";
|
|
5
|
+
import { X as getWidgetSelfHydrationKeyFieldName, K as getAgentsEnvironment, F as escapePlainTextForText, r as Text, I as Icon, a6 as useAgentsOwnerSettings, E as classNames, B as Button, S as SegmentBar, v as TrendDelta, w as WidgetText, a0 as translateText, _ as reportWidgetCrash, W as WidgetFeatureGate, g as InteractiveSurface, C as Checkbox, e as DateInput, t as TextInput, R as RadioGroup, l as Select, k as RangeSlider, T as Tabs, s as TextArea, M as Map$1, h as MapMarker, a5 as useAgentsMapsLoader, m as Skeleton, Y as openImageGallery, p as StatusBadge, i as Markdown, a4 as useAgentsEnvironment, af as canStartConversationInPersonalSpace, ag as startConversationInPersonalSpace, ah as canOpenConnectionPermissions, ai as openConnectionPermissions, a9 as useAgentsTexts } from "./index-DAEGct6X.js";
|
|
6
|
+
import { t as textKey } from "./text-key-DnoZ4lAk.js";
|
|
7
|
+
import { a as useOptionalAgentsConversationClient } from "./AgentsConversationClientContext-B_UJSLXU.js";
|
|
8
|
+
import { A as AgentsClientError } from "./conversation-VosmRbsr.js";
|
|
6
9
|
import ReactApexChartImport from "react-apexcharts";
|
|
7
|
-
import { u as useAgentsLinkNavigation, A as AgentsLink } from "./link-navigation-
|
|
10
|
+
import { u as useAgentsLinkNavigation, A as AgentsLink } from "./link-navigation-DQWyeNkx.js";
|
|
8
11
|
import { i as isAgentsIconName } from "./icon-names-C5PeVvkJ.js";
|
|
9
12
|
import { unified } from "unified";
|
|
10
13
|
import remarkParse from "remark-parse";
|
|
11
14
|
import remarkDirective from "remark-directive";
|
|
12
15
|
import { visit } from "unist-util-visit";
|
|
13
|
-
import { t as textKey } from "./text-key-DnoZ4lAk.js";
|
|
14
|
-
const WIDGET_FENCE_LANG = "widget";
|
|
15
|
-
const BARE_WIDGET_PARAGRAPH = /^\s*widget\s*(\{[\s\S]*\})\s*$/;
|
|
16
|
-
const BARE_WIDGET_LINE_GLOBAL = /^[ \t]*widget[ \t]*(\{.*\})[ \t]*$/gm;
|
|
17
16
|
const ENTITY_TYPE_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
|
|
18
17
|
const ENTITY_ID_PATTERN = /^[A-Za-z0-9_.-]{1,256}$/;
|
|
19
18
|
const ENTITY_DETAIL_INSTANCE_ID = /^entityDetail:([a-zA-Z][a-zA-Z0-9]*):([A-Za-z0-9_.-]{1,256})$/;
|
|
@@ -100,17 +99,30 @@ const addComposedNodeSchemaApplicationPart = (schema, applicationPart) => ({
|
|
|
100
99
|
dataSources: mergeSortedByTypeName(schema.dataSources, applicationPart.dataSources),
|
|
101
100
|
entityTypes: mergeTypeNames(schema.entityTypes, applicationPart.entityTypes)
|
|
102
101
|
});
|
|
103
|
-
|
|
102
|
+
const registeredPackageParts = [];
|
|
103
|
+
let registeredPackagePartsRevision = 0;
|
|
104
|
+
const registerComposedNodeSchemaPart = (part) => {
|
|
105
|
+
const partJson = JSON.stringify(part);
|
|
106
|
+
if (registeredPackageParts.some((registeredPart) => registeredPart === part || JSON.stringify(registeredPart) === partJson)) return;
|
|
107
|
+
registeredPackageParts.push(part);
|
|
108
|
+
registeredPackagePartsRevision += 1;
|
|
109
|
+
};
|
|
110
|
+
let mergedSchema;
|
|
104
111
|
const getComposedNodeSchema = () => {
|
|
105
112
|
const applicationPart = getAgentsEnvironment().composedNodeSchemaApplicationPart;
|
|
106
|
-
if (!applicationPart) return composedNodeSchema;
|
|
107
|
-
if (
|
|
108
|
-
|
|
113
|
+
if (!applicationPart && registeredPackageParts.length === 0) return composedNodeSchema;
|
|
114
|
+
if (mergedSchema === void 0 || mergedSchema.applicationPart !== applicationPart || mergedSchema.packagePartsRevision !== registeredPackagePartsRevision) {
|
|
115
|
+
const schemaWithPackageParts = registeredPackageParts.reduce(
|
|
116
|
+
(schema, packagePart) => addComposedNodeSchemaApplicationPart(schema, packagePart),
|
|
117
|
+
composedNodeSchema
|
|
118
|
+
);
|
|
119
|
+
mergedSchema = {
|
|
109
120
|
applicationPart,
|
|
110
|
-
|
|
121
|
+
packagePartsRevision: registeredPackagePartsRevision,
|
|
122
|
+
schema: applicationPart ? addComposedNodeSchemaApplicationPart(schemaWithPackageParts, applicationPart) : schemaWithPackageParts
|
|
111
123
|
};
|
|
112
124
|
}
|
|
113
|
-
return
|
|
125
|
+
return mergedSchema.schema;
|
|
114
126
|
};
|
|
115
127
|
const resolveComposedSlotForNodeProps = (slot, nodeProps) => {
|
|
116
128
|
if (!slot.sizeClassFromProp || !slot.sizeClassesByPropValue) return slot;
|
|
@@ -124,6 +136,64 @@ const sizeClassFitsSlot = (sizeClass, slotSizeClass) => {
|
|
|
124
136
|
const order = ["compact", "regular", "full"];
|
|
125
137
|
return order.indexOf(sizeClass) !== -1 && order.indexOf(sizeClass) <= order.indexOf(slotSizeClass);
|
|
126
138
|
};
|
|
139
|
+
const LEGACY_NAME_SUFFIX = "Directive";
|
|
140
|
+
let widgetNameSet;
|
|
141
|
+
let widgetNameSetRevision = -1;
|
|
142
|
+
const getWidgetNameSet = () => {
|
|
143
|
+
if (widgetNameSet === void 0 || widgetNameSetRevision !== getConversationWidgetRegistryRevision()) {
|
|
144
|
+
widgetNameSet = new Set(conversationWidgetRegistry.widgets.map((widget) => widget.name));
|
|
145
|
+
widgetNameSetRevision = getConversationWidgetRegistryRevision();
|
|
146
|
+
}
|
|
147
|
+
return widgetNameSet;
|
|
148
|
+
};
|
|
149
|
+
const resolveCanonicalWidgetName = (requestedName, canonicalNames) => {
|
|
150
|
+
if (canonicalNames.has(requestedName)) return requestedName;
|
|
151
|
+
if (!requestedName.endsWith(LEGACY_NAME_SUFFIX)) return void 0;
|
|
152
|
+
const withoutLegacySuffix = requestedName.slice(0, -LEGACY_NAME_SUFFIX.length);
|
|
153
|
+
return canonicalNames.has(withoutLegacySuffix) ? withoutLegacySuffix : void 0;
|
|
154
|
+
};
|
|
155
|
+
const resolveWidgetName = (type) => resolveCanonicalWidgetName(type, getWidgetNameSet());
|
|
156
|
+
const normalizeWidgetName = (value2) => value2.toLowerCase().replace(/directive$/, "");
|
|
157
|
+
const wordTokens = (value2) => value2.replace(/directive$/i, "").split(/(?=[A-Z])/).map((token) => token.toLowerCase()).filter(Boolean);
|
|
158
|
+
const editDistance = (a, b) => {
|
|
159
|
+
const rows2 = a.length + 1;
|
|
160
|
+
const cols = b.length + 1;
|
|
161
|
+
const dist = Array.from({ length: rows2 }, () => new Array(cols).fill(0));
|
|
162
|
+
for (let i = 0; i < rows2; i++) dist[i][0] = i;
|
|
163
|
+
for (let j = 0; j < cols; j++) dist[0][j] = j;
|
|
164
|
+
for (let i = 1; i < rows2; i++) {
|
|
165
|
+
for (let j = 1; j < cols; j++) {
|
|
166
|
+
dist[i][j] = Math.min(
|
|
167
|
+
dist[i - 1][j] + 1,
|
|
168
|
+
dist[i][j - 1] + 1,
|
|
169
|
+
dist[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return dist[rows2 - 1][cols - 1];
|
|
174
|
+
};
|
|
175
|
+
const closestWidgetNames = (type, limit = 3) => {
|
|
176
|
+
const target = normalizeWidgetName(type);
|
|
177
|
+
if (target === "") return [];
|
|
178
|
+
const targetTokens = new Set(wordTokens(type));
|
|
179
|
+
return [...getWidgetNameSet()].map((name) => {
|
|
180
|
+
const candidate = normalizeWidgetName(name);
|
|
181
|
+
const candidateTokens = wordTokens(name);
|
|
182
|
+
const contains = candidate.includes(target) || target.includes(candidate) ? 3 : 0;
|
|
183
|
+
const overlap = candidateTokens.filter((token) => targetTokens.has(token)).length;
|
|
184
|
+
const nameProximity = 1 - editDistance(target, candidate) / Math.max(target.length, candidate.length);
|
|
185
|
+
const tokenProximity = Math.max(
|
|
186
|
+
0,
|
|
187
|
+
...candidateTokens.map((token) => 1 - editDistance(target, token) / Math.max(target.length, token.length))
|
|
188
|
+
);
|
|
189
|
+
const proximity = Math.max(nameProximity, tokenProximity);
|
|
190
|
+
return {
|
|
191
|
+
name,
|
|
192
|
+
keep: contains > 0 || overlap > 0 || proximity >= 0.6,
|
|
193
|
+
score: contains + overlap + proximity
|
|
194
|
+
};
|
|
195
|
+
}).filter((entry2) => entry2.keep).sort((a, b) => b.score - a.score).slice(0, limit).map((entry2) => entry2.name);
|
|
196
|
+
};
|
|
127
197
|
const MAX_JSON_CONTAINER_DEPTH = 31;
|
|
128
198
|
const exceedsJsonContainerDepth = (value2, maxDepth = MAX_JSON_CONTAINER_DEPTH) => {
|
|
129
199
|
const pending2 = [[value2, 1]];
|
|
@@ -1795,7 +1865,7 @@ const evaluateExpression = (source2, resolveName, budget) => {
|
|
|
1795
1865
|
};
|
|
1796
1866
|
const computeComposedViewValues = (computed, state, datasets, budgets2) => {
|
|
1797
1867
|
const budget = new ExpressionBudget(budgets2);
|
|
1798
|
-
const
|
|
1868
|
+
const result2 = { values: {}, errors: {} };
|
|
1799
1869
|
const evaluating = [];
|
|
1800
1870
|
const done = /* @__PURE__ */ new Set();
|
|
1801
1871
|
const resolveTreeName = (name) => {
|
|
@@ -1805,10 +1875,10 @@ const computeComposedViewValues = (computed, state, datasets, budgets2) => {
|
|
|
1805
1875
|
return void 0;
|
|
1806
1876
|
};
|
|
1807
1877
|
const computeOne = (name) => {
|
|
1808
|
-
if (done.has(name)) return
|
|
1878
|
+
if (done.has(name)) return result2.values[name];
|
|
1809
1879
|
if (evaluating.includes(name)) {
|
|
1810
1880
|
for (const cycleName of evaluating.slice(evaluating.indexOf(name))) {
|
|
1811
|
-
|
|
1881
|
+
result2.errors[cycleName] = {
|
|
1812
1882
|
errorCode: "INVALID_EXPRESSION",
|
|
1813
1883
|
message: `a cycle: ${[...evaluating, name].join(" → ")}`
|
|
1814
1884
|
};
|
|
@@ -1816,7 +1886,7 @@ const computeComposedViewValues = (computed, state, datasets, budgets2) => {
|
|
|
1816
1886
|
return void 0;
|
|
1817
1887
|
}
|
|
1818
1888
|
if (evaluating.length >= budgets2.maxComputedDependencyDepth) {
|
|
1819
|
-
|
|
1889
|
+
result2.errors[name] = {
|
|
1820
1890
|
errorCode: "INVALID_EXPRESSION",
|
|
1821
1891
|
message: `deeper than ${budgets2.maxComputedDependencyDepth} computed values`
|
|
1822
1892
|
};
|
|
@@ -1826,20 +1896,20 @@ const computeComposedViewValues = (computed, state, datasets, budgets2) => {
|
|
|
1826
1896
|
const evaluation = evaluateExpression(computed[name], resolveTreeName, budget);
|
|
1827
1897
|
evaluating.pop();
|
|
1828
1898
|
done.add(name);
|
|
1829
|
-
if (
|
|
1830
|
-
|
|
1899
|
+
if (result2.errors[name]) {
|
|
1900
|
+
result2.values[name] = void 0;
|
|
1831
1901
|
return void 0;
|
|
1832
1902
|
}
|
|
1833
1903
|
if (!evaluation.ok) {
|
|
1834
|
-
|
|
1835
|
-
|
|
1904
|
+
result2.errors[name] = { errorCode: evaluation.errorCode, message: evaluation.message };
|
|
1905
|
+
result2.values[name] = void 0;
|
|
1836
1906
|
return void 0;
|
|
1837
1907
|
}
|
|
1838
|
-
|
|
1908
|
+
result2.values[name] = evaluation.value;
|
|
1839
1909
|
return evaluation.value;
|
|
1840
1910
|
};
|
|
1841
1911
|
for (const name of Object.keys(computed)) computeOne(name);
|
|
1842
|
-
return
|
|
1912
|
+
return result2;
|
|
1843
1913
|
};
|
|
1844
1914
|
const valuesOfTree = (stateBox, initialState) => stateBox.initialState === initialState ? stateBox.values : initialState;
|
|
1845
1915
|
const stateReducer = (stateBox, action) => {
|
|
@@ -2644,7 +2714,7 @@ const textSuccess = "agents_textSuccess_-CDriP";
|
|
|
2644
2714
|
const textWarning = "agents_textWarning_77r5Zc";
|
|
2645
2715
|
const textDanger = "agents_textDanger_-erzvV";
|
|
2646
2716
|
const textInfo = "agents_textInfo_ZVSKa-";
|
|
2647
|
-
const styles$
|
|
2717
|
+
const styles$T = {
|
|
2648
2718
|
textNeutral,
|
|
2649
2719
|
textMuted,
|
|
2650
2720
|
textSuccess,
|
|
@@ -2653,12 +2723,12 @@ const styles$S = {
|
|
|
2653
2723
|
textInfo
|
|
2654
2724
|
};
|
|
2655
2725
|
const TONE_TEXT_CLASS = {
|
|
2656
|
-
neutral: styles$
|
|
2657
|
-
muted: styles$
|
|
2658
|
-
success: styles$
|
|
2659
|
-
warning: styles$
|
|
2660
|
-
danger: styles$
|
|
2661
|
-
info: styles$
|
|
2726
|
+
neutral: styles$T.textNeutral,
|
|
2727
|
+
muted: styles$T.textMuted,
|
|
2728
|
+
success: styles$T.textSuccess,
|
|
2729
|
+
warning: styles$T.textWarning,
|
|
2730
|
+
danger: styles$T.textDanger,
|
|
2731
|
+
info: styles$T.textInfo
|
|
2662
2732
|
};
|
|
2663
2733
|
const TONE_GRAPHIC_COLOR = COMPOSED_VIEW_TONE_GRAPHIC_COLOR;
|
|
2664
2734
|
const TONE_TEXT_COLOR = COMPOSED_VIEW_TONE_TEXT_COLOR;
|
|
@@ -2671,7 +2741,7 @@ const value$2 = "agents_value_2Tk6gt";
|
|
|
2671
2741
|
const delta$1 = "agents_delta_Khlvom";
|
|
2672
2742
|
const labelText = "agents_labelText_-JNOOt";
|
|
2673
2743
|
const figure$1 = "agents_figure_UKZnlr";
|
|
2674
|
-
const styles$
|
|
2744
|
+
const styles$S = {
|
|
2675
2745
|
rows,
|
|
2676
2746
|
row: row$4,
|
|
2677
2747
|
label: label$4,
|
|
@@ -2685,39 +2755,39 @@ const styles$R = {
|
|
|
2685
2755
|
const ChartBarRows = (props) => {
|
|
2686
2756
|
const { model, accessibleLabel, testId } = props;
|
|
2687
2757
|
const hasDeltas = model.rows.some((row2) => row2.deltaText !== void 0);
|
|
2688
|
-
return /* @__PURE__ */ jsx("table", { className: styles$
|
|
2758
|
+
return /* @__PURE__ */ jsx("table", { className: styles$S.rows, "aria-label": accessibleLabel, "data-testid": testId, children: /* @__PURE__ */ jsx("tbody", { children: model.rows.map((row2, rowIndex) => /* @__PURE__ */ jsxs(
|
|
2689
2759
|
"tr",
|
|
2690
2760
|
{
|
|
2691
|
-
className: styles$
|
|
2761
|
+
className: styles$S.row,
|
|
2692
2762
|
"data-testid": testId ? `${testId}-row-${rowIndex}` : void 0,
|
|
2693
2763
|
children: [
|
|
2694
|
-
/* @__PURE__ */ jsx("th", { scope: "row", className: styles$
|
|
2695
|
-
/* @__PURE__ */ jsx("td", { className: styles$
|
|
2764
|
+
/* @__PURE__ */ jsx("th", { scope: "row", className: styles$S.label, children: /* @__PURE__ */ jsx(Text, { role: "help", className: styles$S.labelText, translate: false, children: escapePlainTextForText(row2.label) }) }),
|
|
2765
|
+
/* @__PURE__ */ jsx("td", { className: styles$S.track, "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
2696
2766
|
"span",
|
|
2697
2767
|
{
|
|
2698
|
-
className: styles$
|
|
2768
|
+
className: styles$S.bar,
|
|
2699
2769
|
style: {
|
|
2700
2770
|
"--agents-chart-bar-fraction": `${Math.round(row2.fraction * 1e3) / 10}%`,
|
|
2701
2771
|
"--agents-chart-bar-color": `var(${row2.colorToken})`
|
|
2702
2772
|
}
|
|
2703
2773
|
}
|
|
2704
2774
|
) }),
|
|
2705
|
-
/* @__PURE__ */ jsx("td", { className: styles$
|
|
2775
|
+
/* @__PURE__ */ jsx("td", { className: styles$S.value, children: /* @__PURE__ */ jsx(
|
|
2706
2776
|
Text,
|
|
2707
2777
|
{
|
|
2708
2778
|
role: "help",
|
|
2709
2779
|
weight: "medium",
|
|
2710
|
-
className: styles$
|
|
2780
|
+
className: styles$S.figure,
|
|
2711
2781
|
translate: false,
|
|
2712
2782
|
children: escapePlainTextForText(row2.valueText)
|
|
2713
2783
|
}
|
|
2714
2784
|
) }),
|
|
2715
|
-
hasDeltas ? /* @__PURE__ */ jsx("td", { className: styles$
|
|
2785
|
+
hasDeltas ? /* @__PURE__ */ jsx("td", { className: styles$S.delta, children: row2.deltaText !== void 0 ? /* @__PURE__ */ jsx(
|
|
2716
2786
|
Text,
|
|
2717
2787
|
{
|
|
2718
2788
|
role: "help",
|
|
2719
2789
|
color: TONE_TEXT_COLOR[row2.deltaTone],
|
|
2720
|
-
className: styles$
|
|
2790
|
+
className: styles$S.figure,
|
|
2721
2791
|
translate: false,
|
|
2722
2792
|
children: escapePlainTextForText(row2.deltaText)
|
|
2723
2793
|
}
|
|
@@ -2735,7 +2805,7 @@ const figure = "agents_figure_YQkr-X";
|
|
|
2735
2805
|
const bar$1 = "agents_bar_WUSPao";
|
|
2736
2806
|
const conversion = "agents_conversion_B88QLI";
|
|
2737
2807
|
const conversionIcon = "agents_conversionIcon_bJalHq";
|
|
2738
|
-
const styles$
|
|
2808
|
+
const styles$R = {
|
|
2739
2809
|
stages,
|
|
2740
2810
|
stage,
|
|
2741
2811
|
stageHead,
|
|
@@ -2747,33 +2817,33 @@ const styles$Q = {
|
|
|
2747
2817
|
};
|
|
2748
2818
|
const ChartFunnelRows = (props) => {
|
|
2749
2819
|
const { model, accessibleLabel, testId } = props;
|
|
2750
|
-
return /* @__PURE__ */ jsx("ol", { className: styles$
|
|
2820
|
+
return /* @__PURE__ */ jsx("ol", { className: styles$R.stages, "aria-label": accessibleLabel, "data-testid": testId, children: model.stages.map((stage2, stageIndex) => /* @__PURE__ */ jsxs(
|
|
2751
2821
|
"li",
|
|
2752
2822
|
{
|
|
2753
|
-
className: styles$
|
|
2823
|
+
className: styles$R.stage,
|
|
2754
2824
|
"data-testid": testId ? `${testId}-stage-${stageIndex}` : void 0,
|
|
2755
2825
|
children: [
|
|
2756
|
-
stage2.conversionText !== void 0 ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
2757
|
-
/* @__PURE__ */ jsx(Icon, { className: styles$
|
|
2826
|
+
stage2.conversionText !== void 0 ? /* @__PURE__ */ jsxs("div", { className: styles$R.conversion, children: [
|
|
2827
|
+
/* @__PURE__ */ jsx(Icon, { className: styles$R.conversionIcon, name: "arrowDown" }),
|
|
2758
2828
|
/* @__PURE__ */ jsx(
|
|
2759
2829
|
Text,
|
|
2760
2830
|
{
|
|
2761
2831
|
role: "caption",
|
|
2762
2832
|
color: "var(--agents-fg-light)",
|
|
2763
|
-
className: styles$
|
|
2833
|
+
className: styles$R.figure,
|
|
2764
2834
|
replacements: { conversion: stage2.conversionText },
|
|
2765
2835
|
children: "%conversion% of the previous stage"
|
|
2766
2836
|
}
|
|
2767
2837
|
)
|
|
2768
2838
|
] }) : null,
|
|
2769
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
2770
|
-
/* @__PURE__ */ jsx(Text, { role: "help", className: styles$
|
|
2771
|
-
/* @__PURE__ */ jsx(Text, { role: "help", weight: "bold", className: styles$
|
|
2839
|
+
/* @__PURE__ */ jsxs("div", { className: styles$R.stageHead, children: [
|
|
2840
|
+
/* @__PURE__ */ jsx(Text, { role: "help", className: styles$R.label, translate: false, children: escapePlainTextForText(stage2.label) }),
|
|
2841
|
+
/* @__PURE__ */ jsx(Text, { role: "help", weight: "bold", className: styles$R.figure, translate: false, children: escapePlainTextForText(stage2.valueText) })
|
|
2772
2842
|
] }),
|
|
2773
2843
|
/* @__PURE__ */ jsx(
|
|
2774
2844
|
"span",
|
|
2775
2845
|
{
|
|
2776
|
-
className: styles$
|
|
2846
|
+
className: styles$R.bar,
|
|
2777
2847
|
"aria-hidden": "true",
|
|
2778
2848
|
style: { "--agents-chart-funnel-fraction": `${Math.round(stage2.fraction * 1e3) / 10}%` }
|
|
2779
2849
|
}
|
|
@@ -2807,7 +2877,7 @@ const footnote = "agents_footnote_Eh9hCo";
|
|
|
2807
2877
|
const quiet = "agents_quiet_3g4fJY";
|
|
2808
2878
|
const sourceButton = "agents_sourceButton_-n9HT3";
|
|
2809
2879
|
const sourceChip$1 = "agents_sourceChip_Sa0S4w";
|
|
2810
|
-
const styles$
|
|
2880
|
+
const styles$Q = {
|
|
2811
2881
|
footnote,
|
|
2812
2882
|
quiet,
|
|
2813
2883
|
sourceButton,
|
|
@@ -2849,14 +2919,14 @@ const SourceChip$1 = (props) => {
|
|
|
2849
2919
|
iconPosition: "left",
|
|
2850
2920
|
htmlType: "button",
|
|
2851
2921
|
translate: false,
|
|
2852
|
-
className: styles$
|
|
2922
|
+
className: styles$Q.sourceButton,
|
|
2853
2923
|
testId,
|
|
2854
2924
|
onClick: openSource,
|
|
2855
2925
|
children: escapePlainTextForText(footnoteSource.name)
|
|
2856
2926
|
}
|
|
2857
2927
|
);
|
|
2858
2928
|
}
|
|
2859
|
-
const className = styles$
|
|
2929
|
+
const className = styles$Q.sourceChip;
|
|
2860
2930
|
const sourceChipContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2861
2931
|
/* @__PURE__ */ jsx(Icon, { pixelSize: 12, color: "var(--agents-fg-light)", name: "link" }),
|
|
2862
2932
|
/* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(footnoteSource.name) })
|
|
@@ -2871,7 +2941,7 @@ const DataFootnote = (props) => {
|
|
|
2871
2941
|
const captionText = readText$3(caption2);
|
|
2872
2942
|
const footnoteSources = readFootnoteSources(source2).map((footnoteSource, sourceIndex) => ({ footnoteSource, sourceIndex })).filter(({ footnoteSource }) => appearance === "chip" || !isEmailRender && readHostName(footnoteSource.url));
|
|
2873
2943
|
if (!captionText && footnoteSources.length === 0) return null;
|
|
2874
|
-
return /* @__PURE__ */ jsxs("div", { className: classNames(styles$
|
|
2944
|
+
return /* @__PURE__ */ jsxs("div", { className: classNames(styles$Q.footnote, appearance === "quiet" && styles$Q.quiet), "data-testid": testId, children: [
|
|
2875
2945
|
captionText ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(captionText) }) : null,
|
|
2876
2946
|
footnoteSources.map(({ footnoteSource, sourceIndex }) => /* @__PURE__ */ jsx(
|
|
2877
2947
|
SourceChip$1,
|
|
@@ -2900,7 +2970,7 @@ const chart = "agents_chart_w3Iegy";
|
|
|
2900
2970
|
const plot = "agents_plot_5-0cN9";
|
|
2901
2971
|
const sparkline = "agents_sparkline_0aul49";
|
|
2902
2972
|
const skeleton$3 = "agents_skeleton_0zIRZc";
|
|
2903
|
-
const styles$
|
|
2973
|
+
const styles$P = {
|
|
2904
2974
|
chart,
|
|
2905
2975
|
plot,
|
|
2906
2976
|
sparkline,
|
|
@@ -2968,17 +3038,17 @@ const ChartNode = (props) => {
|
|
|
2968
3038
|
const accessibleLabel = chartModelResult.status === "ok" ? [title2, plottedSeriesLabels.join(", ")].filter(Boolean).join(": ") : title2;
|
|
2969
3039
|
const deltaLabel = readText$3(nodeProps.deltaLabel);
|
|
2970
3040
|
const deltaUnitLine = barRowsModelResult?.status === "ok" && barRowsModelResult.model.deltaUnit === "pp" ? "Right: change in percentage points" : barRowsModelResult?.status === "ok" && barRowsModelResult.model.deltaUnit === "%" ? "Right: change in percent" : void 0;
|
|
2971
|
-
return /* @__PURE__ */ jsxs("figure", { className: classNames(styles$
|
|
3041
|
+
return /* @__PURE__ */ jsxs("figure", { className: classNames(styles$P.chart, isSparkline && styles$P.sparkline), "data-testid": testId, children: [
|
|
2972
3042
|
title2 && !isSparkline ? /* @__PURE__ */ jsx(Text, { role: "body", weight: "bold", translate: false, children: escapePlainTextForText(title2) }) : null,
|
|
2973
3043
|
/* @__PURE__ */ jsx(
|
|
2974
3044
|
"div",
|
|
2975
3045
|
{
|
|
2976
3046
|
ref: containerRef,
|
|
2977
|
-
className: styles$
|
|
3047
|
+
className: styles$P.plot,
|
|
2978
3048
|
role: chartModelResult.status === "ok" && !drawsItsOwnRows ? "img" : void 0,
|
|
2979
3049
|
"aria-label": drawsItsOwnRows ? void 0 : accessibleLabel,
|
|
2980
3050
|
"data-chart-kind": kind,
|
|
2981
|
-
children: isWaiting ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
3051
|
+
children: isWaiting ? /* @__PURE__ */ jsx("div", { className: styles$P.skeleton, "aria-busy": "true", "data-testid": `${testId}-skeleton`, children: /* @__PURE__ */ jsx(SkeletonLine, { width: "100%", height: isSparkline ? 32 : 240, radius: 12 }) }) : barRowsModelResult?.status === "ok" ? /* @__PURE__ */ jsx(ChartBarRows, { model: barRowsModelResult.model, accessibleLabel, testId: `${testId}-rows` }) : funnelModelResult?.status === "ok" ? /* @__PURE__ */ jsx(
|
|
2982
3052
|
ChartFunnelRows,
|
|
2983
3053
|
{
|
|
2984
3054
|
model: funnelModelResult.model,
|
|
@@ -3008,7 +3078,7 @@ const __vite_glob_0_0$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.d
|
|
|
3008
3078
|
composedViewComponent: composedViewComponent$N
|
|
3009
3079
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3010
3080
|
const icon$2 = "agents_icon_b13Mj-";
|
|
3011
|
-
const styles$
|
|
3081
|
+
const styles$O = {
|
|
3012
3082
|
icon: icon$2
|
|
3013
3083
|
};
|
|
3014
3084
|
const ICON_SIZE_PX = { small: 16, medium: 20, large: 24 };
|
|
@@ -3030,7 +3100,7 @@ const IconNode = (props) => {
|
|
|
3030
3100
|
return /* @__PURE__ */ jsx(
|
|
3031
3101
|
"span",
|
|
3032
3102
|
{
|
|
3033
|
-
className: styles$
|
|
3103
|
+
className: styles$O.icon,
|
|
3034
3104
|
role: label2 ? "img" : void 0,
|
|
3035
3105
|
"aria-label": label2,
|
|
3036
3106
|
"aria-hidden": label2 ? void 0 : true,
|
|
@@ -3049,7 +3119,7 @@ const denominator = "agents_denominator_-RIxq1";
|
|
|
3049
3119
|
const unitParts = "agents_unitParts_gogUzd";
|
|
3050
3120
|
const delta = "agents_delta_Tz8K1Q";
|
|
3051
3121
|
const loading = "agents_loading_cYDvLv";
|
|
3052
|
-
const styles$
|
|
3122
|
+
const styles$N = {
|
|
3053
3123
|
tile: tile$2,
|
|
3054
3124
|
denominator,
|
|
3055
3125
|
unitParts,
|
|
@@ -3059,7 +3129,7 @@ const styles$M = {
|
|
|
3059
3129
|
const LayoutNestingContext = createContext({ isInsideSurface: false, isInsidePressable: false });
|
|
3060
3130
|
const useLayoutNesting = () => useContext(LayoutNestingContext);
|
|
3061
3131
|
const meter = "agents_meter_uK2P5l";
|
|
3062
|
-
const styles$
|
|
3132
|
+
const styles$M = {
|
|
3063
3133
|
meter
|
|
3064
3134
|
};
|
|
3065
3135
|
const KpiMeter = (props) => {
|
|
@@ -3068,14 +3138,14 @@ const KpiMeter = (props) => {
|
|
|
3068
3138
|
{ value: value2, color },
|
|
3069
3139
|
{ value: max - value2, color: "var(--agents-kpi-meter-track)" }
|
|
3070
3140
|
].filter((segment) => segment.value > 0);
|
|
3071
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
3141
|
+
return /* @__PURE__ */ jsx("div", { className: styles$M.meter, "aria-hidden": "true", "data-testid": testId, children: /* @__PURE__ */ jsx(SegmentBar, { segments, height: 6 }) });
|
|
3072
3142
|
};
|
|
3073
3143
|
const accent = "agents_accent_OUzS9f";
|
|
3074
3144
|
const success$1 = "agents_success_2NnZBL";
|
|
3075
3145
|
const warning$1 = "agents_warning_cJiOOT";
|
|
3076
3146
|
const danger$1 = "agents_danger_i4A6wL";
|
|
3077
3147
|
const info$1 = "agents_info_sr69ph";
|
|
3078
|
-
const styles$
|
|
3148
|
+
const styles$L = {
|
|
3079
3149
|
accent,
|
|
3080
3150
|
success: success$1,
|
|
3081
3151
|
warning: warning$1,
|
|
@@ -3089,16 +3159,16 @@ const TONE_ICON = {
|
|
|
3089
3159
|
info: "info"
|
|
3090
3160
|
};
|
|
3091
3161
|
const TONE_CLASS = {
|
|
3092
|
-
success: styles$
|
|
3093
|
-
warning: styles$
|
|
3094
|
-
danger: styles$
|
|
3095
|
-
info: styles$
|
|
3162
|
+
success: styles$L.success,
|
|
3163
|
+
warning: styles$L.warning,
|
|
3164
|
+
danger: styles$L.danger,
|
|
3165
|
+
info: styles$L.info
|
|
3096
3166
|
};
|
|
3097
3167
|
const KpiToneAccent = (props) => {
|
|
3098
3168
|
const { tone, testId } = props;
|
|
3099
3169
|
const icon2 = TONE_ICON[tone];
|
|
3100
3170
|
if (!icon2) return null;
|
|
3101
|
-
return /* @__PURE__ */ jsx("span", { className: classNames(styles$
|
|
3171
|
+
return /* @__PURE__ */ jsx("span", { className: classNames(styles$L.accent, TONE_CLASS[tone]), "aria-hidden": "true", "data-testid": testId, children: /* @__PURE__ */ jsx(Icon, { pixelSize: 14, color: TONE_GRAPHIC_COLOR[tone], name: icon2 }) });
|
|
3102
3172
|
};
|
|
3103
3173
|
const NUMBER_PATTERN = String.raw`[-+]?(?:\d+(?:[ ]\d{3})*(?:[.,]\d+)?|[.,]\d+)`;
|
|
3104
3174
|
const NUMERIC_SCORE = new RegExp(String.raw`^${NUMBER_PATTERN}(?:\s*\/\s*${NUMBER_PATTERN}|\s*%)?$`);
|
|
@@ -3164,7 +3234,7 @@ const KpiTileNode = (props) => {
|
|
|
3164
3234
|
!isPending && !hasValue ? "NO_DATA" : void 0,
|
|
3165
3235
|
!isPending && !hasValue ? `the KpiTile "${label2}" has no value` : void 0
|
|
3166
3236
|
);
|
|
3167
|
-
const deltaElement = delta2 === void 0 ? void 0 : /* @__PURE__ */ jsxs("span", { className: styles$
|
|
3237
|
+
const deltaElement = delta2 === void 0 ? void 0 : /* @__PURE__ */ jsxs("span", { className: styles$N.delta, "data-testid": `${testId}-delta`, children: [
|
|
3168
3238
|
/* @__PURE__ */ jsx(
|
|
3169
3239
|
TrendDelta,
|
|
3170
3240
|
{
|
|
@@ -3181,12 +3251,12 @@ const KpiTileNode = (props) => {
|
|
|
3181
3251
|
{
|
|
3182
3252
|
level: isInsideSurface ? "flat" : "elevated",
|
|
3183
3253
|
compact: sizeClass !== "full",
|
|
3184
|
-
className: styles$
|
|
3254
|
+
className: styles$N.tile,
|
|
3185
3255
|
testId,
|
|
3186
3256
|
children: [
|
|
3187
3257
|
isPending ? (
|
|
3188
3258
|
// The primitive's own loading skeleton animates its style every frame — a capture never settles on it.
|
|
3189
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
3259
|
+
/* @__PURE__ */ jsxs("div", { className: styles$N.loading, "aria-busy": "true", "data-testid": `${testId}-skeleton`, children: [
|
|
3190
3260
|
/* @__PURE__ */ jsx(WidgetText, { variant: "caption", tone: "light", translate: false, testId: `${testId}-label`, children: escapePlainTextForText(label2) }),
|
|
3191
3261
|
/* @__PURE__ */ jsx(SkeletonLine, { width: "60%", height: 40, radius: 8 })
|
|
3192
3262
|
] })
|
|
@@ -3199,10 +3269,10 @@ const KpiTileNode = (props) => {
|
|
|
3199
3269
|
accent: tone === "neutral" || tone === "muted" ? void 0 : /* @__PURE__ */ jsx(KpiToneAccent, { tone, testId: `${testId}-accent` }),
|
|
3200
3270
|
value: /* @__PURE__ */ jsxs("span", { className: TONE_TEXT_CLASS[tone], "data-testid": `${testId}-value`, children: [
|
|
3201
3271
|
/* @__PURE__ */ jsx(WidgetText, { translate: false, children: hasValue ? escapePlainTextForText(valueParts.lead) : "—" }),
|
|
3202
|
-
valueParts.denominator ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
3272
|
+
valueParts.denominator ? /* @__PURE__ */ jsx("span", { className: styles$N.denominator, children: /* @__PURE__ */ jsx(WidgetText, { translate: false, children: escapePlainTextForText(valueParts.denominator) }) }) : null
|
|
3203
3273
|
] }),
|
|
3204
3274
|
meter: ratio ? /* @__PURE__ */ jsx(KpiMeter, { value: ratio.value, max: ratio.max, color: readMeterColor(tone), testId: `${testId}-meter` }) : void 0,
|
|
3205
|
-
unit: secondary ? /* @__PURE__ */ jsxs("span", { className: styles$
|
|
3275
|
+
unit: secondary ? /* @__PURE__ */ jsxs("span", { className: styles$N.unitParts, children: [
|
|
3206
3276
|
/* @__PURE__ */ jsx(WidgetText, { variant: "value", translate: false, inline: true, testId: `${testId}-value-secondary`, children: escapePlainTextForText(secondary) }),
|
|
3207
3277
|
unit ? /* @__PURE__ */ jsx(WidgetText, { translate: false, children: escapePlainTextForText(unit) }) : null
|
|
3208
3278
|
] }) : unit ? escapePlainTextForText(unit) : void 0,
|
|
@@ -3246,7 +3316,7 @@ const value$1 = "agents_value_QriEAD";
|
|
|
3246
3316
|
const bullet = "agents_bullet_nggUAh";
|
|
3247
3317
|
const number = "agents_number_rI0k0o";
|
|
3248
3318
|
const check = "agents_check_kBEwU8";
|
|
3249
|
-
const styles$
|
|
3319
|
+
const styles$K = {
|
|
3250
3320
|
entry,
|
|
3251
3321
|
withMarker,
|
|
3252
3322
|
text: text$3,
|
|
@@ -3259,25 +3329,25 @@ const styles$J = {
|
|
|
3259
3329
|
const ListEntry = (props) => {
|
|
3260
3330
|
const { marker: marker2, title: title2, description: description2, meta, value: value2, children, trailing: trailing2, isStandalone = false, testId } = props;
|
|
3261
3331
|
const EntryElement = isStandalone ? "div" : "li";
|
|
3262
|
-
return /* @__PURE__ */ jsxs(EntryElement, { className: classNames(styles$
|
|
3263
|
-
marker2 === "bullet" ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
3264
|
-
marker2 === "number" ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
3265
|
-
marker2 === "check" ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
3266
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
3332
|
+
return /* @__PURE__ */ jsxs(EntryElement, { className: classNames(styles$K.entry, marker2 !== "none" && styles$K.withMarker), "data-testid": testId, children: [
|
|
3333
|
+
marker2 === "bullet" ? /* @__PURE__ */ jsx("span", { className: styles$K.bullet, "aria-hidden": "true" }) : null,
|
|
3334
|
+
marker2 === "number" ? /* @__PURE__ */ jsx("span", { className: styles$K.number, "aria-hidden": "true" }) : null,
|
|
3335
|
+
marker2 === "check" ? /* @__PURE__ */ jsx("span", { className: styles$K.check, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, { pixelSize: 16, color: "var(--agents-success-500)", name: "check" }) }) : null,
|
|
3336
|
+
/* @__PURE__ */ jsxs("span", { className: styles$K.text, children: [
|
|
3267
3337
|
title2 ? /* @__PURE__ */ jsx(Text, { role: "body", weight: "bold", translate: false, children: escapePlainTextForText(title2) }) : null,
|
|
3268
3338
|
description2 ? /* @__PURE__ */ jsx(Text, { role: "help", translate: false, children: escapePlainTextForText(description2) }) : null,
|
|
3269
3339
|
meta ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(meta) }) : null,
|
|
3270
3340
|
children
|
|
3271
3341
|
] }),
|
|
3272
|
-
value2 || trailing2 ? /* @__PURE__ */ jsxs("span", { className: styles$
|
|
3273
|
-
value2 ? /* @__PURE__ */ jsx(Text, { role: "body", weight: "medium", className: styles$
|
|
3342
|
+
value2 || trailing2 ? /* @__PURE__ */ jsxs("span", { className: styles$K.trailing, children: [
|
|
3343
|
+
value2 ? /* @__PURE__ */ jsx(Text, { role: "body", weight: "medium", className: styles$K.value, translate: false, children: escapePlainTextForText(value2) }) : null,
|
|
3274
3344
|
trailing2
|
|
3275
3345
|
] }) : null
|
|
3276
3346
|
] });
|
|
3277
3347
|
};
|
|
3278
3348
|
const list = "agents_list_Ggcj5a";
|
|
3279
3349
|
const numbered = "agents_numbered_DqZtgJ";
|
|
3280
|
-
const styles$
|
|
3350
|
+
const styles$J = {
|
|
3281
3351
|
list,
|
|
3282
3352
|
numbered
|
|
3283
3353
|
};
|
|
@@ -3313,7 +3383,7 @@ const ListNode = (props) => {
|
|
|
3313
3383
|
);
|
|
3314
3384
|
if (isEmpty) return /* @__PURE__ */ jsx(DataEmptyLine, { emptyText: nodeProps.emptyText, testId: `${testId}-empty` });
|
|
3315
3385
|
const ListElement = marker2 === "number" ? "ol" : "ul";
|
|
3316
|
-
return /* @__PURE__ */ jsx(ListElement, { className: classNames(styles$
|
|
3386
|
+
return /* @__PURE__ */ jsx(ListElement, { className: classNames(styles$J.list, marker2 === "number" && styles$J.numbered), "data-testid": testId, children: /* @__PURE__ */ jsxs(ListContext.Provider, { value: listContextValue, children: [
|
|
3317
3387
|
shownEntries.map((entry2, entryIndex) => /* @__PURE__ */ jsx(
|
|
3318
3388
|
ListEntry,
|
|
3319
3389
|
{
|
|
@@ -3410,7 +3480,7 @@ const readTableColumns = (columnsValue, rows2) => {
|
|
|
3410
3480
|
};
|
|
3411
3481
|
const value = "agents_value_coW-Oj";
|
|
3412
3482
|
const booleanValue = "agents_booleanValue_N-yLq2";
|
|
3413
|
-
const styles$
|
|
3483
|
+
const styles$I = {
|
|
3414
3484
|
value,
|
|
3415
3485
|
booleanValue
|
|
3416
3486
|
};
|
|
@@ -3418,7 +3488,7 @@ const TableValue = (props) => {
|
|
|
3418
3488
|
const { value: value2, format, currency, decimals, unit, signed = false, tone = "neutral", isBold = false } = props;
|
|
3419
3489
|
const locale = useNumberLocale();
|
|
3420
3490
|
if (typeof value2 === "boolean") {
|
|
3421
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
3491
|
+
return /* @__PURE__ */ jsx("span", { className: styles$I.booleanValue, role: "img", "aria-label": translateText(value2 ? "Yes" : "No"), children: /* @__PURE__ */ jsx(Icon, { pixelSize: 16, color: TONE_GRAPHIC_COLOR[value2 ? "success" : "danger"], name: value2 ? "check" : "close" }) });
|
|
3422
3492
|
}
|
|
3423
3493
|
const formattedValue = formatDataValue(value2, { format, currency, decimals, unit, signed, locale });
|
|
3424
3494
|
if (formattedValue === "") return null;
|
|
@@ -3428,7 +3498,7 @@ const TableValue = (props) => {
|
|
|
3428
3498
|
role: "help",
|
|
3429
3499
|
weight: isBold ? "bold" : "regular",
|
|
3430
3500
|
color: TONE_TEXT_COLOR[tone],
|
|
3431
|
-
className: styles$
|
|
3501
|
+
className: styles$I.value,
|
|
3432
3502
|
translate: false,
|
|
3433
3503
|
children: escapePlainTextForText(formattedValue)
|
|
3434
3504
|
}
|
|
@@ -3442,7 +3512,7 @@ const cell = "agents_cell_gSR-JZ";
|
|
|
3442
3512
|
const start$1 = "agents_start_oOnQ0Y";
|
|
3443
3513
|
const center$1 = "agents_center_1S9cj6";
|
|
3444
3514
|
const end$1 = "agents_end_QXsu76";
|
|
3445
|
-
const styles$
|
|
3515
|
+
const styles$H = {
|
|
3446
3516
|
table,
|
|
3447
3517
|
scroller,
|
|
3448
3518
|
grid: grid$2,
|
|
@@ -3469,11 +3539,11 @@ const TableNode = (props) => {
|
|
|
3469
3539
|
isOverRowBudget ? "BUDGET_EXCEEDED" : isEmpty && !isPending ? "NO_DATA" : void 0,
|
|
3470
3540
|
isOverRowBudget ? `the Table shows the first ${maxRepeatRows} of ${rows2.length} rows only` : isEmpty && !isPending ? "the Table has no rows" : void 0
|
|
3471
3541
|
);
|
|
3472
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
3473
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
3474
|
-
columns.length > 0 ? /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((column2) => /* @__PURE__ */ jsx("th", { scope: "col", className: classNames(styles$
|
|
3542
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$H.table, "data-testid": testId, children: [
|
|
3543
|
+
/* @__PURE__ */ jsx("div", { className: styles$H.scroller, children: /* @__PURE__ */ jsxs("table", { className: styles$H.grid, children: [
|
|
3544
|
+
columns.length > 0 ? /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((column2) => /* @__PURE__ */ jsx("th", { scope: "col", className: classNames(styles$H.cell, styles$H[column2.align]), children: /* @__PURE__ */ jsx(Text, { role: "help", weight: "bold", translate: false, children: escapePlainTextForText(column2.label) }) }, column2.key)) }) }) : null,
|
|
3475
3545
|
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
3476
|
-
shownRows.map((row2, rowIndex) => /* @__PURE__ */ jsx("tr", { className: styles$
|
|
3546
|
+
shownRows.map((row2, rowIndex) => /* @__PURE__ */ jsx("tr", { className: styles$H.row, "data-testid": `${testId}-row-${rowIndex}`, children: columns.map((column2) => /* @__PURE__ */ jsx("td", { className: classNames(styles$H.cell, styles$H[column2.align]), children: /* @__PURE__ */ jsx(
|
|
3477
3547
|
TableValue,
|
|
3478
3548
|
{
|
|
3479
3549
|
value: row2[column2.key],
|
|
@@ -3486,10 +3556,10 @@ const TableNode = (props) => {
|
|
|
3486
3556
|
isWaitingForRows && columns.length > 0 ? Array.from({ length: SKELETON_ROW_COUNT }, (unused, skeletonIndex) => /* @__PURE__ */ jsx(
|
|
3487
3557
|
"tr",
|
|
3488
3558
|
{
|
|
3489
|
-
className: styles$
|
|
3559
|
+
className: styles$H.row,
|
|
3490
3560
|
"aria-busy": "true",
|
|
3491
3561
|
"data-testid": `${testId}-skeleton-${skeletonIndex}`,
|
|
3492
|
-
children: columns.map((column2) => /* @__PURE__ */ jsx("td", { className: classNames(styles$
|
|
3562
|
+
children: columns.map((column2) => /* @__PURE__ */ jsx("td", { className: classNames(styles$H.cell, styles$H[column2.align]), children: /* @__PURE__ */ jsx(SkeletonLine, { width: "70%", height: 12 }) }, column2.key))
|
|
3493
3563
|
},
|
|
3494
3564
|
`skeleton-${skeletonIndex}`
|
|
3495
3565
|
)) : null,
|
|
@@ -3515,7 +3585,7 @@ const heatCell = "agents_heatCell_ZsGX6M";
|
|
|
3515
3585
|
const heat = "agents_heat_71n-vZ";
|
|
3516
3586
|
const heatEmpty = "agents_heatEmpty_3F810F";
|
|
3517
3587
|
const dash = "agents_dash_Hoy4st";
|
|
3518
|
-
const styles$
|
|
3588
|
+
const styles$G = {
|
|
3519
3589
|
content: content$1,
|
|
3520
3590
|
start,
|
|
3521
3591
|
center,
|
|
@@ -3547,14 +3617,14 @@ const TableCellNode = (props) => {
|
|
|
3547
3617
|
"span",
|
|
3548
3618
|
{
|
|
3549
3619
|
className: classNames(
|
|
3550
|
-
styles$
|
|
3551
|
-
styles$
|
|
3552
|
-
bar2 !== void 0 && styles$
|
|
3553
|
-
isHeatCell && styles$
|
|
3554
|
-
isHeatCell && heat2 === void 0 && styles$
|
|
3620
|
+
styles$G.content,
|
|
3621
|
+
styles$G[align],
|
|
3622
|
+
bar2 !== void 0 && styles$G.withBar,
|
|
3623
|
+
isHeatCell && styles$G.heat,
|
|
3624
|
+
isHeatCell && heat2 === void 0 && styles$G.heatEmpty
|
|
3555
3625
|
),
|
|
3556
3626
|
children: [
|
|
3557
|
-
bar2 !== void 0 ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
3627
|
+
bar2 !== void 0 ? /* @__PURE__ */ jsx("span", { className: styles$G.bar, "aria-hidden": "true" }) : null,
|
|
3558
3628
|
hasValue ? /* @__PURE__ */ jsx(
|
|
3559
3629
|
TableValue,
|
|
3560
3630
|
{
|
|
@@ -3567,13 +3637,13 @@ const TableCellNode = (props) => {
|
|
|
3567
3637
|
tone: readDataValueTone(nodeProps.tone),
|
|
3568
3638
|
isBold
|
|
3569
3639
|
}
|
|
3570
|
-
) : isHeatCell ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
3640
|
+
) : isHeatCell ? /* @__PURE__ */ jsx("span", { className: styles$G.dash, children: "—" }) : null,
|
|
3571
3641
|
slots.children && slots.children.length > 0 ? /* @__PURE__ */ jsx(DataContainerContext.Provider, { value: null, children: slots.children }) : null
|
|
3572
3642
|
]
|
|
3573
3643
|
}
|
|
3574
3644
|
);
|
|
3575
3645
|
if (!tableRow) return /* @__PURE__ */ jsx("span", { style: cellStyle, children: content2 });
|
|
3576
|
-
const cellClassName = classNames(styles$
|
|
3646
|
+
const cellClassName = classNames(styles$H.cell, styles$H[align], isHeatCell && styles$G.heatCell);
|
|
3577
3647
|
return isHeader ? /* @__PURE__ */ jsx("th", { scope: "col", className: cellClassName, style: cellStyle, children: content2 }) : /* @__PURE__ */ jsx("td", { className: cellClassName, style: cellStyle, children: content2 });
|
|
3578
3648
|
};
|
|
3579
3649
|
const composedViewComponent$G = {
|
|
@@ -3590,9 +3660,9 @@ const TableRowNode = (props) => {
|
|
|
3590
3660
|
const isHeader = nodeProps.header === true;
|
|
3591
3661
|
const isEmphasis = nodeProps.emphasis === true;
|
|
3592
3662
|
const tableRowContextValue = useMemo(() => ({ isHeader, isEmphasis }), [isHeader, isEmphasis]);
|
|
3593
|
-
const row2 = /* @__PURE__ */ jsx("tr", { className: classNames(styles$
|
|
3663
|
+
const row2 = /* @__PURE__ */ jsx("tr", { className: classNames(styles$H.row, isHeader && styles$H.headerRow), "data-testid": testId, children: /* @__PURE__ */ jsx(TableRowContext.Provider, { value: tableRowContextValue, children: slots.children }) });
|
|
3594
3664
|
if (container === "table") return row2;
|
|
3595
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
3665
|
+
return /* @__PURE__ */ jsx("div", { className: styles$H.scroller, children: /* @__PURE__ */ jsx("table", { className: styles$H.grid, children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx(DataContainerContext.Provider, { value: "table", children: row2 }) }) }) });
|
|
3596
3666
|
};
|
|
3597
3667
|
const composedViewComponent$F = { nodeType: "TableRow", component: TableRowNode };
|
|
3598
3668
|
const __vite_glob_0_8$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -3716,7 +3786,7 @@ const chipName$1 = "agents_chipName_vYiC1X";
|
|
|
3716
3786
|
const chipIcon = "agents_chipIcon_qjFBl-";
|
|
3717
3787
|
const plainName = "agents_plainName_wIGZV3";
|
|
3718
3788
|
const plainChip = "agents_plainChip_1j8sHX";
|
|
3719
|
-
const styles$
|
|
3789
|
+
const styles$F = {
|
|
3720
3790
|
link: link$2,
|
|
3721
3791
|
linkName,
|
|
3722
3792
|
chip: chip$2,
|
|
@@ -3769,7 +3839,7 @@ const EntityLinkNode = (props) => {
|
|
|
3769
3839
|
weight: fontWeight,
|
|
3770
3840
|
translate: false,
|
|
3771
3841
|
display: "inline",
|
|
3772
|
-
className: classNames(styles$
|
|
3842
|
+
className: classNames(styles$F.plainName, variant === "chip" && styles$F.plainChip),
|
|
3773
3843
|
testId: `${testId}-name`,
|
|
3774
3844
|
children: name
|
|
3775
3845
|
}
|
|
@@ -3777,29 +3847,29 @@ const EntityLinkNode = (props) => {
|
|
|
3777
3847
|
}
|
|
3778
3848
|
const openDetail = () => runtime.runEvent({ action: target.actionName });
|
|
3779
3849
|
if (variant === "chip") {
|
|
3780
|
-
return /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: styles$
|
|
3850
|
+
return /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: styles$F.chip, children: /* @__PURE__ */ jsxs("button", { type: "button", className: styles$F.chipButton, onClick: openDetail, "data-testid": "composed-entity-link", children: [
|
|
3781
3851
|
/* @__PURE__ */ jsx(
|
|
3782
3852
|
Text,
|
|
3783
3853
|
{
|
|
3784
3854
|
role: "help",
|
|
3785
3855
|
translate: false,
|
|
3786
3856
|
display: "inline",
|
|
3787
|
-
className: styles$
|
|
3857
|
+
className: styles$F.chipName,
|
|
3788
3858
|
testId: `${testId}-name`,
|
|
3789
3859
|
children: name
|
|
3790
3860
|
}
|
|
3791
3861
|
),
|
|
3792
|
-
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", className: styles$
|
|
3862
|
+
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", className: styles$F.chipIcon, pixelSize: 14, name: "details" })
|
|
3793
3863
|
] }) });
|
|
3794
3864
|
}
|
|
3795
|
-
return /* @__PURE__ */ jsx("button", { type: "button", className: styles$
|
|
3865
|
+
return /* @__PURE__ */ jsx("button", { type: "button", className: styles$F.link, onClick: openDetail, "data-testid": "composed-entity-link", children: /* @__PURE__ */ jsx(
|
|
3796
3866
|
Text,
|
|
3797
3867
|
{
|
|
3798
3868
|
role: textType,
|
|
3799
3869
|
weight: fontWeight,
|
|
3800
3870
|
translate: false,
|
|
3801
3871
|
display: "inline",
|
|
3802
|
-
className: styles$
|
|
3872
|
+
className: styles$F.linkName,
|
|
3803
3873
|
testId: `${testId}-name`,
|
|
3804
3874
|
children: name
|
|
3805
3875
|
}
|
|
@@ -3917,19 +3987,19 @@ const isFormFieldFilled = (value2) => {
|
|
|
3917
3987
|
const form = "agents_form_yA4cVI";
|
|
3918
3988
|
const headerRow = "agents_headerRow_0moUJR";
|
|
3919
3989
|
const headerItems = "agents_headerItems_IyGwsW";
|
|
3920
|
-
const header$
|
|
3990
|
+
const header$4 = "agents_header_kSwo7N";
|
|
3921
3991
|
const fields$1 = "agents_fields_sw9Lwc";
|
|
3922
3992
|
const footer$2 = "agents_footer_HhE3-k";
|
|
3923
|
-
const actions$
|
|
3993
|
+
const actions$3 = "agents_actions_50VAEI";
|
|
3924
3994
|
const nestedBody = "agents_nestedBody_zEWma2";
|
|
3925
|
-
const styles$
|
|
3995
|
+
const styles$E = {
|
|
3926
3996
|
form,
|
|
3927
3997
|
headerRow,
|
|
3928
3998
|
headerItems,
|
|
3929
|
-
header: header$
|
|
3999
|
+
header: header$4,
|
|
3930
4000
|
fields: fields$1,
|
|
3931
4001
|
footer: footer$2,
|
|
3932
|
-
actions: actions$
|
|
4002
|
+
actions: actions$3,
|
|
3933
4003
|
nestedBody
|
|
3934
4004
|
};
|
|
3935
4005
|
const ComposedViewFormContext = createContext(false);
|
|
@@ -3970,7 +4040,7 @@ const FormNode = (props) => {
|
|
|
3970
4040
|
}
|
|
3971
4041
|
}, [isInsideForm, formName, reportNodeStatus]);
|
|
3972
4042
|
if (isInsideForm)
|
|
3973
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
4043
|
+
return /* @__PURE__ */ jsx("div", { className: styles$E.nestedBody, "data-testid": testId, children: slots.children });
|
|
3974
4044
|
const canSend = formName !== void 0 && interactive && !isEmailRender;
|
|
3975
4045
|
const isAnswered = submissionStatus === "sent" || submissionStatus === "declined";
|
|
3976
4046
|
const sendSignal = async (signalText, answeredStatus) => {
|
|
@@ -4019,7 +4089,7 @@ const FormNode = (props) => {
|
|
|
4019
4089
|
if (!interactive) {
|
|
4020
4090
|
return /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", testId: `${testId}-replay-note`, children: "This form can only be sent from the newest reply." });
|
|
4021
4091
|
}
|
|
4022
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
4092
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$E.actions, children: [
|
|
4023
4093
|
/* @__PURE__ */ jsx(
|
|
4024
4094
|
ConversationWidgetButton,
|
|
4025
4095
|
{
|
|
@@ -4047,16 +4117,16 @@ const FormNode = (props) => {
|
|
|
4047
4117
|
) : null
|
|
4048
4118
|
] });
|
|
4049
4119
|
};
|
|
4050
|
-
return /* @__PURE__ */ jsx(WidgetSurface, { level: sizeClass === "full" ? "elevated" : "flat", testId, children: /* @__PURE__ */ jsxs("form", { className: styles$
|
|
4051
|
-
title2 !== void 0 || description2 !== void 0 || headerItems2.length > 0 ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
4052
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
4120
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { level: sizeClass === "full" ? "elevated" : "flat", testId, children: /* @__PURE__ */ jsxs("form", { className: styles$E.form, noValidate: true, onSubmit: (submitEvent) => submitEvent.preventDefault(), children: [
|
|
4121
|
+
title2 !== void 0 || description2 !== void 0 || headerItems2.length > 0 ? /* @__PURE__ */ jsxs("div", { className: styles$E.headerRow, children: [
|
|
4122
|
+
/* @__PURE__ */ jsxs("div", { className: styles$E.header, children: [
|
|
4053
4123
|
title2 !== void 0 ? /* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", children: title2 }) : null,
|
|
4054
4124
|
description2 !== void 0 ? /* @__PURE__ */ jsx(ModelText, { role: "help", color: "var(--agents-fg-light)", children: description2 }) : null
|
|
4055
4125
|
] }),
|
|
4056
|
-
headerItems2.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
4126
|
+
headerItems2.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$E.headerItems, children: headerItems2 }) : null
|
|
4057
4127
|
] }) : null,
|
|
4058
|
-
/* @__PURE__ */ jsx(ComposedViewFormContext.Provider, { value: true, children: /* @__PURE__ */ jsx("fieldset", { className: styles$
|
|
4059
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
4128
|
+
/* @__PURE__ */ jsx(ComposedViewFormContext.Provider, { value: true, children: /* @__PURE__ */ jsx("fieldset", { className: styles$E.fields, disabled: isAnswered || isSending || !canSend && !isEmailRender, children: slots.children }) }),
|
|
4129
|
+
/* @__PURE__ */ jsxs("div", { className: styles$E.footer, "aria-live": "polite", children: [
|
|
4060
4130
|
showsMissingFields ? /* @__PURE__ */ jsx(Text, { role: "caption", color: ERROR_TEXT_COLOR, testId: `${testId}-error-required`, children: "Please fill in the required fields." }) : null,
|
|
4061
4131
|
submissionStatus === "failed" ? /* @__PURE__ */ jsx(Text, { role: "caption", color: ERROR_TEXT_COLOR, testId: `${testId}-error`, children: "Something went wrong. Please try again." }) : null,
|
|
4062
4132
|
renderActionRow()
|
|
@@ -4212,7 +4282,7 @@ const datePickerIcon = "agents_datePickerIcon_oomZCC";
|
|
|
4212
4282
|
const button$1 = "agents_button_-GGF9m";
|
|
4213
4283
|
const buttonFullWidth = "agents_buttonFullWidth_BIpF89";
|
|
4214
4284
|
const radioOptionText = "agents_radioOptionText_ELY-yS";
|
|
4215
|
-
const styles$
|
|
4285
|
+
const styles$D = {
|
|
4216
4286
|
tabsBar,
|
|
4217
4287
|
sliderTrack,
|
|
4218
4288
|
datePicker,
|
|
@@ -4264,7 +4334,7 @@ const ComposedButton = (props) => {
|
|
|
4264
4334
|
runtime.runEvent(node.props.onClick, nodeProps.value);
|
|
4265
4335
|
if (isCopyButton) setIsCopyConfirmed(true);
|
|
4266
4336
|
};
|
|
4267
|
-
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: isFullWidth ? styles$
|
|
4337
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: isFullWidth ? styles$D.buttonFullWidth : styles$D.button, children: /* @__PURE__ */ jsx(
|
|
4268
4338
|
ConversationWidgetButton,
|
|
4269
4339
|
{
|
|
4270
4340
|
variant: buttonType,
|
|
@@ -4293,7 +4363,7 @@ const labelValue = "agents_labelValue_upIIY1";
|
|
|
4293
4363
|
const description = "agents_description_ucyE-b";
|
|
4294
4364
|
const pending = "agents_pending_Tu-pEs";
|
|
4295
4365
|
const frozen = "agents_frozen_Aho93q";
|
|
4296
|
-
const styles$
|
|
4366
|
+
const styles$C = {
|
|
4297
4367
|
field: field$1,
|
|
4298
4368
|
labelRow,
|
|
4299
4369
|
label: label$2,
|
|
@@ -4319,17 +4389,17 @@ const ComposedInputField = (props) => {
|
|
|
4319
4389
|
return /* @__PURE__ */ jsxs(
|
|
4320
4390
|
"div",
|
|
4321
4391
|
{
|
|
4322
|
-
className: classNames(styles$
|
|
4392
|
+
className: classNames(styles$C.field, !isUsable && styles$C.frozen, className),
|
|
4323
4393
|
inert: !isUsable || void 0,
|
|
4324
4394
|
"data-usable": isUsable ? "true" : "false",
|
|
4325
4395
|
"data-testid": testId ? `${testId}-field` : void 0,
|
|
4326
4396
|
children: [
|
|
4327
|
-
labelText2 || labelRowValue ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
4328
|
-
labelText2 && controlId ? /* @__PURE__ */ jsx("label", { htmlFor: controlId, className: styles$
|
|
4329
|
-
labelRowValue ? /* @__PURE__ */ jsx(Text, { role: "body", weight: "bold", translate: false, className: styles$
|
|
4397
|
+
labelText2 || labelRowValue ? /* @__PURE__ */ jsxs("div", { className: styles$C.labelRow, children: [
|
|
4398
|
+
labelText2 && controlId ? /* @__PURE__ */ jsx("label", { htmlFor: controlId, className: styles$C.label, children: labelText2 }) : /* @__PURE__ */ jsx("span", { className: styles$C.label, children: labelText2 }),
|
|
4399
|
+
labelRowValue ? /* @__PURE__ */ jsx(Text, { role: "body", weight: "bold", translate: false, className: styles$C.labelValue, children: escapePlainTextForText(labelRowValue) }) : null
|
|
4330
4400
|
] }) : null,
|
|
4331
|
-
isPending ? /* @__PURE__ */ jsx("span", { "aria-busy": "true", className: styles$
|
|
4332
|
-
description2 ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, className: styles$
|
|
4401
|
+
isPending ? /* @__PURE__ */ jsx("span", { "aria-busy": "true", className: styles$C.pending, "data-testid": testId ? `${testId}-skeleton` : void 0, children: /* @__PURE__ */ jsx(SkeletonLine, { height: pendingHeight, radius: 12 }) }) : children,
|
|
4402
|
+
description2 ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, className: styles$C.description, children: escapePlainTextForText(description2) }) : null
|
|
4333
4403
|
]
|
|
4334
4404
|
}
|
|
4335
4405
|
);
|
|
@@ -4399,13 +4469,13 @@ const composedViewComponent$A = {
|
|
|
4399
4469
|
nodeType: "Checkbox",
|
|
4400
4470
|
component: ComposedCheckbox
|
|
4401
4471
|
};
|
|
4402
|
-
const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4472
|
+
const __vite_glob_0_13$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4403
4473
|
__proto__: null,
|
|
4404
4474
|
composedViewComponent: composedViewComponent$A
|
|
4405
4475
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4406
4476
|
const frozenValue = "agents_frozenValue_Hyb1hq";
|
|
4407
4477
|
const multiline = "agents_multiline_4BAPyl";
|
|
4408
|
-
const styles$
|
|
4478
|
+
const styles$B = {
|
|
4409
4479
|
frozenValue,
|
|
4410
4480
|
multiline
|
|
4411
4481
|
};
|
|
@@ -4415,7 +4485,7 @@ const ComposedInputFrozenValue = (props) => {
|
|
|
4415
4485
|
return /* @__PURE__ */ jsx(
|
|
4416
4486
|
"div",
|
|
4417
4487
|
{
|
|
4418
|
-
className: classNames(styles$
|
|
4488
|
+
className: classNames(styles$B.frozenValue, isMultiline && styles$B.multiline),
|
|
4419
4489
|
"data-frozen-value": "true",
|
|
4420
4490
|
"data-testid": testId,
|
|
4421
4491
|
children: hasValue ? /* @__PURE__ */ jsx(Text, { role: "body", translate: false, allowNewLines: isMultiline, children: escapePlainTextForText(shownValue) }) : /* @__PURE__ */ jsx(Text, { role: "body", translate: false, color: "var(--agents-fg-lightest)", children: "—" })
|
|
@@ -4445,7 +4515,7 @@ const ComposedDatePicker = (props) => {
|
|
|
4445
4515
|
if (typeof pickedTimestamp !== "number" || !Number.isFinite(pickedTimestamp)) return;
|
|
4446
4516
|
changeValue(formatIsoDay(pickedTimestamp));
|
|
4447
4517
|
};
|
|
4448
|
-
return /* @__PURE__ */ jsx(ComposedInputField, { label: label2, isUsable, isPending, pendingHeight: 48, testId, children: isUsable ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
4518
|
+
return /* @__PURE__ */ jsx(ComposedInputField, { label: label2, isUsable, isPending, pendingHeight: 48, testId, children: isUsable ? /* @__PURE__ */ jsxs("div", { className: styles$D.datePicker, "data-testid": testId, children: [
|
|
4449
4519
|
/* @__PURE__ */ jsx(
|
|
4450
4520
|
DateInput,
|
|
4451
4521
|
{
|
|
@@ -4457,7 +4527,7 @@ const ComposedDatePicker = (props) => {
|
|
|
4457
4527
|
},
|
|
4458
4528
|
value2 ?? "none"
|
|
4459
4529
|
),
|
|
4460
|
-
/* @__PURE__ */ jsx(Icon, { className: styles$
|
|
4530
|
+
/* @__PURE__ */ jsx(Icon, { className: styles$D.datePickerIcon, color: "var(--agents-fg-light)", pixelSize: 18, name: "calendar" })
|
|
4461
4531
|
] }) : /* @__PURE__ */ jsx(ComposedInputFrozenValue, { shownValue: formatIsoDayForReading(value2, dateLocale), testId: `${testId}-frozen` }) });
|
|
4462
4532
|
};
|
|
4463
4533
|
const composedViewComponent$z = {
|
|
@@ -4560,7 +4630,7 @@ const ComposedRadioGroup = (props) => {
|
|
|
4560
4630
|
const selectedOption = findComposedInputOption(options, value2);
|
|
4561
4631
|
const radioOptions = options.map((option) => ({
|
|
4562
4632
|
// The label and its explanation as one node.
|
|
4563
|
-
label: /* @__PURE__ */ jsxs("span", { className: styles$
|
|
4633
|
+
label: /* @__PURE__ */ jsxs("span", { className: styles$D.radioOptionText, "data-testid": `${testId}-option-${option.id}`, children: [
|
|
4564
4634
|
/* @__PURE__ */ jsx(Text, { role: "body", translate: false, children: escapePlainTextForText(option.label) }),
|
|
4565
4635
|
option.description ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(option.description) }) : null
|
|
4566
4636
|
] }),
|
|
@@ -4709,7 +4779,7 @@ const ComposedSlider = (props) => {
|
|
|
4709
4779
|
isPending,
|
|
4710
4780
|
pendingHeight: 28,
|
|
4711
4781
|
testId,
|
|
4712
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
4782
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$D.sliderTrack, "aria-label": label2, "data-testid": testId, children: /* @__PURE__ */ jsx(
|
|
4713
4783
|
RangeSlider,
|
|
4714
4784
|
{
|
|
4715
4785
|
value: shownValue,
|
|
@@ -4761,7 +4831,7 @@ const ComposedTabs = (props) => {
|
|
|
4761
4831
|
isPending,
|
|
4762
4832
|
pendingHeight: 36,
|
|
4763
4833
|
testId,
|
|
4764
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
4834
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$D.tabsBar, "data-testid": testId, children: /* @__PURE__ */ jsx(
|
|
4765
4835
|
Tabs,
|
|
4766
4836
|
{
|
|
4767
4837
|
options: tabs,
|
|
@@ -4862,7 +4932,7 @@ const arrow = "agents_arrow_av0SP1";
|
|
|
4862
4932
|
const arrowPrevious = "agents_arrowPrevious_3h1BXR";
|
|
4863
4933
|
const arrowNext = "agents_arrowNext_tgbHsd";
|
|
4864
4934
|
const arrowButton = "agents_arrowButton_NQXi0F";
|
|
4865
|
-
const styles$
|
|
4935
|
+
const styles$A = {
|
|
4866
4936
|
carousel: carousel$2,
|
|
4867
4937
|
visible1,
|
|
4868
4938
|
visible2,
|
|
@@ -4880,10 +4950,10 @@ const styles$z = {
|
|
|
4880
4950
|
};
|
|
4881
4951
|
const VISIBLE_ITEM_COUNTS = [1, 2, 3, 4];
|
|
4882
4952
|
const VISIBLE_CLASS_NAMES = {
|
|
4883
|
-
1: styles$
|
|
4884
|
-
2: styles$
|
|
4885
|
-
3: styles$
|
|
4886
|
-
4: styles$
|
|
4953
|
+
1: styles$A.visible1,
|
|
4954
|
+
2: styles$A.visible2,
|
|
4955
|
+
3: styles$A.visible3,
|
|
4956
|
+
4: styles$A.visible4
|
|
4887
4957
|
};
|
|
4888
4958
|
const SKELETON_SLIDE_COUNT = 3;
|
|
4889
4959
|
const readScrollEdges$1 = (track2) => ({
|
|
@@ -4935,10 +5005,10 @@ const Carousel = (props) => {
|
|
|
4935
5005
|
return /* @__PURE__ */ jsx(
|
|
4936
5006
|
"div",
|
|
4937
5007
|
{
|
|
4938
|
-
className: classNames(styles$
|
|
5008
|
+
className: classNames(styles$A.carousel, VISIBLE_CLASS_NAMES[visibleItemCount]),
|
|
4939
5009
|
"aria-busy": "true",
|
|
4940
5010
|
"data-testid": `${testId}-skeleton`,
|
|
4941
|
-
children: /* @__PURE__ */ jsx("div", { className: classNames(styles$
|
|
5011
|
+
children: /* @__PURE__ */ jsx("div", { className: classNames(styles$A.track, styles$A.frozenTrack), children: Array.from({ length: SKELETON_SLIDE_COUNT }, (unused, skeletonIndex) => /* @__PURE__ */ jsx("div", { className: styles$A.slide, children: /* @__PURE__ */ jsxs("div", { className: styles$A.skeletonSlide, children: [
|
|
4942
5012
|
/* @__PURE__ */ jsx(SkeletonLine, { width: "50%", height: 12 }),
|
|
4943
5013
|
/* @__PURE__ */ jsx(SkeletonLine, { width: "70%", height: 24 }),
|
|
4944
5014
|
/* @__PURE__ */ jsx(SkeletonLine, { width: "40%", height: 10 })
|
|
@@ -4947,13 +5017,13 @@ const Carousel = (props) => {
|
|
|
4947
5017
|
);
|
|
4948
5018
|
}
|
|
4949
5019
|
if (slideCount === 0) return null;
|
|
4950
|
-
return /* @__PURE__ */ jsx("div", { className: classNames(styles$
|
|
5020
|
+
return /* @__PURE__ */ jsx("div", { className: classNames(styles$A.carousel, VISIBLE_CLASS_NAMES[visibleItemCount]), "data-testid": testId, children: /* @__PURE__ */ jsxs("div", { className: styles$A.viewport, children: [
|
|
4951
5021
|
/* @__PURE__ */ jsx(
|
|
4952
5022
|
"div",
|
|
4953
5023
|
{
|
|
4954
5024
|
ref: trackRef,
|
|
4955
5025
|
"data-testid": `${testId}-track`,
|
|
4956
|
-
className: classNames(styles$
|
|
5026
|
+
className: classNames(styles$A.track, runtime.isEmailRender && styles$A.frozenTrack),
|
|
4957
5027
|
role: "group",
|
|
4958
5028
|
"aria-roledescription": translateText("carousel"),
|
|
4959
5029
|
"aria-label": carouselLabel,
|
|
@@ -4961,7 +5031,7 @@ const Carousel = (props) => {
|
|
|
4961
5031
|
children: slides.map((slideNodes, slideIndex) => /* @__PURE__ */ jsx(
|
|
4962
5032
|
"div",
|
|
4963
5033
|
{
|
|
4964
|
-
className: styles$
|
|
5034
|
+
className: styles$A.slide,
|
|
4965
5035
|
"data-testid": `${testId}-slide-${slideIndex}`,
|
|
4966
5036
|
role: "group",
|
|
4967
5037
|
"aria-roledescription": translateText("slide"),
|
|
@@ -4972,22 +5042,22 @@ const Carousel = (props) => {
|
|
|
4972
5042
|
))
|
|
4973
5043
|
}
|
|
4974
5044
|
),
|
|
4975
|
-
isShowingArrows && scrollEdges.canScrollBack ? /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$
|
|
5045
|
+
isShowingArrows && scrollEdges.canScrollBack ? /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$A.arrow, styles$A.arrowPrevious), children: /* @__PURE__ */ jsx(
|
|
4976
5046
|
"button",
|
|
4977
5047
|
{
|
|
4978
5048
|
type: "button",
|
|
4979
|
-
className: styles$
|
|
5049
|
+
className: styles$A.arrowButton,
|
|
4980
5050
|
"data-testid": `${testId}-previous`,
|
|
4981
5051
|
"aria-label": translateText("Show the previous slides"),
|
|
4982
5052
|
onClick: () => scrollBySlide(-1),
|
|
4983
5053
|
children: /* @__PURE__ */ jsx(Icon, { name: "arrowLeft" })
|
|
4984
5054
|
}
|
|
4985
5055
|
) }) : null,
|
|
4986
|
-
isShowingArrows && scrollEdges.canScrollForward ? /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$
|
|
5056
|
+
isShowingArrows && scrollEdges.canScrollForward ? /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$A.arrow, styles$A.arrowNext), children: /* @__PURE__ */ jsx(
|
|
4987
5057
|
"button",
|
|
4988
5058
|
{
|
|
4989
5059
|
type: "button",
|
|
4990
|
-
className: styles$
|
|
5060
|
+
className: styles$A.arrowButton,
|
|
4991
5061
|
"data-testid": `${testId}-next`,
|
|
4992
5062
|
"aria-label": translateText("Show the next slides"),
|
|
4993
5063
|
onClick: () => scrollBySlide(1),
|
|
@@ -5003,7 +5073,7 @@ const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
5003
5073
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5004
5074
|
const horizontal = "agents_horizontal_ugu-FM";
|
|
5005
5075
|
const vertical = "agents_vertical_urpMv4";
|
|
5006
|
-
const styles$
|
|
5076
|
+
const styles$z = {
|
|
5007
5077
|
horizontal,
|
|
5008
5078
|
vertical
|
|
5009
5079
|
};
|
|
@@ -5011,7 +5081,7 @@ const ORIENTATIONS = ["horizontal", "vertical"];
|
|
|
5011
5081
|
const Divider = (props) => {
|
|
5012
5082
|
const { props: nodeProps } = props;
|
|
5013
5083
|
const orientation = readEnumProp(nodeProps.orientation, ORIENTATIONS, "horizontal");
|
|
5014
|
-
return /* @__PURE__ */ jsx("div", { role: "separator", "aria-orientation": orientation, className: styles$
|
|
5084
|
+
return /* @__PURE__ */ jsx("div", { role: "separator", "aria-orientation": orientation, className: styles$z[orientation] });
|
|
5015
5085
|
};
|
|
5016
5086
|
const composedViewComponent$r = { nodeType: "Divider", component: Divider };
|
|
5017
5087
|
const __vite_glob_0_22 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -5028,7 +5098,7 @@ const gapXsmall$2 = "agents_gapXsmall_YHncjA";
|
|
|
5028
5098
|
const gapSmall$2 = "agents_gapSmall_weBW7m";
|
|
5029
5099
|
const gapMedium$2 = "agents_gapMedium_V6Ik6Z";
|
|
5030
5100
|
const gapLarge$2 = "agents_gapLarge_bzc-Uc";
|
|
5031
|
-
const styles$
|
|
5101
|
+
const styles$y = {
|
|
5032
5102
|
flow,
|
|
5033
5103
|
alignStart: alignStart$1,
|
|
5034
5104
|
alignCenter: alignCenter$1,
|
|
@@ -5041,9 +5111,9 @@ const styles$x = {
|
|
|
5041
5111
|
};
|
|
5042
5112
|
const ALIGNMENTS$1 = ["start", "center", "end"];
|
|
5043
5113
|
const ALIGNMENT_CLASS_NAMES$1 = {
|
|
5044
|
-
start: styles$
|
|
5045
|
-
center: styles$
|
|
5046
|
-
end: styles$
|
|
5114
|
+
start: styles$y.alignStart,
|
|
5115
|
+
center: styles$y.alignCenter,
|
|
5116
|
+
end: styles$y.alignEnd
|
|
5047
5117
|
};
|
|
5048
5118
|
const Flow = (props) => {
|
|
5049
5119
|
const { props: nodeProps, slots, runtime } = props;
|
|
@@ -5060,9 +5130,9 @@ const Flow = (props) => {
|
|
|
5060
5130
|
"div",
|
|
5061
5131
|
{
|
|
5062
5132
|
className: classNames(
|
|
5063
|
-
styles$
|
|
5133
|
+
styles$y.flow,
|
|
5064
5134
|
ALIGNMENT_CLASS_NAMES$1[alignment],
|
|
5065
|
-
layoutGapClassName(styles$
|
|
5135
|
+
layoutGapClassName(styles$y, readGapProp(nodeProps.gap, "small"))
|
|
5066
5136
|
),
|
|
5067
5137
|
children: items
|
|
5068
5138
|
}
|
|
@@ -5085,7 +5155,7 @@ const gapXsmall$1 = "agents_gapXsmall_eoYRI4";
|
|
|
5085
5155
|
const gapSmall$1 = "agents_gapSmall_QNN7Lj";
|
|
5086
5156
|
const gapMedium$1 = "agents_gapMedium_BT9hpy";
|
|
5087
5157
|
const gapLarge$1 = "agents_gapLarge_GIrOMv";
|
|
5088
|
-
const styles$
|
|
5158
|
+
const styles$x = {
|
|
5089
5159
|
grid: grid$1,
|
|
5090
5160
|
columns1,
|
|
5091
5161
|
columns2,
|
|
@@ -5124,10 +5194,10 @@ const readMinColumnWidth = (node, writtenMinColumnWidth) => {
|
|
|
5124
5194
|
return cellNodes.every(isCompactCell) ? "compact" : "regular";
|
|
5125
5195
|
};
|
|
5126
5196
|
const COLUMN_CLASS_NAMES = {
|
|
5127
|
-
1: styles$
|
|
5128
|
-
2: styles$
|
|
5129
|
-
3: styles$
|
|
5130
|
-
4: styles$
|
|
5197
|
+
1: styles$x.columns1,
|
|
5198
|
+
2: styles$x.columns2,
|
|
5199
|
+
3: styles$x.columns3,
|
|
5200
|
+
4: styles$x.columns4
|
|
5131
5201
|
};
|
|
5132
5202
|
const Grid = (props) => {
|
|
5133
5203
|
const { node, props: nodeProps, slots, runtime, testId } = props;
|
|
@@ -5146,10 +5216,10 @@ const Grid = (props) => {
|
|
|
5146
5216
|
{
|
|
5147
5217
|
"data-testid": testId,
|
|
5148
5218
|
className: classNames(
|
|
5149
|
-
styles$
|
|
5219
|
+
styles$x.grid,
|
|
5150
5220
|
COLUMN_CLASS_NAMES[columnCount],
|
|
5151
|
-
minColumnWidth === "regular" ? styles$
|
|
5152
|
-
layoutGapClassName(styles$
|
|
5221
|
+
minColumnWidth === "regular" ? styles$x.minColumnRegular : styles$x.minColumnCompact,
|
|
5222
|
+
layoutGapClassName(styles$x, readGapProp(nodeProps.gap))
|
|
5153
5223
|
),
|
|
5154
5224
|
children: cells
|
|
5155
5225
|
}
|
|
@@ -5169,7 +5239,7 @@ const icon$1 = "agents_icon_-vlQJS";
|
|
|
5169
5239
|
const panel = "agents_panel_UrWx4M";
|
|
5170
5240
|
const placementStart = "agents_placementStart_zdT5vQ";
|
|
5171
5241
|
const placementEnd = "agents_placementEnd_TNjfqR";
|
|
5172
|
-
const styles$
|
|
5242
|
+
const styles$w = {
|
|
5173
5243
|
popover,
|
|
5174
5244
|
trigger,
|
|
5175
5245
|
triggerWrapper,
|
|
@@ -5222,18 +5292,18 @@ const Popover = (props) => {
|
|
|
5222
5292
|
}, [isOpen]);
|
|
5223
5293
|
if (label2 === void 0 || !hasExplanation) return null;
|
|
5224
5294
|
const labelContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5225
|
-
icon2 !== "none" ? /* @__PURE__ */ jsx(Icon, { className: styles$
|
|
5295
|
+
icon2 !== "none" ? /* @__PURE__ */ jsx(Icon, { className: styles$w.icon, name: ICON_NAMES[icon2] }) : null,
|
|
5226
5296
|
/* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(label2) })
|
|
5227
5297
|
] });
|
|
5228
5298
|
if (isInsidePressable || runtime.isEmailRender)
|
|
5229
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
5230
|
-
return /* @__PURE__ */ jsxs("span", { ref: popoverRef, className: styles$
|
|
5231
|
-
/* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: styles$
|
|
5299
|
+
return /* @__PURE__ */ jsx("span", { className: styles$w.staticLabel, "data-testid": testId, children: labelContent });
|
|
5300
|
+
return /* @__PURE__ */ jsxs("span", { ref: popoverRef, className: styles$w.popover, children: [
|
|
5301
|
+
/* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: styles$w.triggerWrapper, children: /* @__PURE__ */ jsx(
|
|
5232
5302
|
"button",
|
|
5233
5303
|
{
|
|
5234
5304
|
ref: triggerRef,
|
|
5235
5305
|
type: "button",
|
|
5236
|
-
className: styles$
|
|
5306
|
+
className: styles$w.trigger,
|
|
5237
5307
|
"data-testid": testId,
|
|
5238
5308
|
"aria-expanded": isOpen,
|
|
5239
5309
|
"aria-controls": isOpen ? panelId : void 0,
|
|
@@ -5247,7 +5317,7 @@ const Popover = (props) => {
|
|
|
5247
5317
|
id: panelId,
|
|
5248
5318
|
role: "note",
|
|
5249
5319
|
"data-testid": `${testId}-panel`,
|
|
5250
|
-
className: classNames(styles$
|
|
5320
|
+
className: classNames(styles$w.panel, placement === "start" ? styles$w.placementStart : styles$w.placementEnd),
|
|
5251
5321
|
children: [
|
|
5252
5322
|
text2 !== void 0 ? /* @__PURE__ */ jsx(Text, { role: "help", translate: false, children: escapePlainTextForText(text2) }) : null,
|
|
5253
5323
|
contentNodes
|
|
@@ -5266,7 +5336,7 @@ const button = "agents_button_bKxiw0";
|
|
|
5266
5336
|
const selected = "agents_selected_sDa7Ja";
|
|
5267
5337
|
const content = "agents_content_FRNdnX";
|
|
5268
5338
|
const padded = "agents_padded_huIgOm";
|
|
5269
|
-
const styles$
|
|
5339
|
+
const styles$v = {
|
|
5270
5340
|
pressable,
|
|
5271
5341
|
button,
|
|
5272
5342
|
selected,
|
|
@@ -5293,17 +5363,17 @@ const Pressable = (props) => {
|
|
|
5293
5363
|
return /* @__PURE__ */ jsx(
|
|
5294
5364
|
"div",
|
|
5295
5365
|
{
|
|
5296
|
-
className: classNames(styles$
|
|
5366
|
+
className: classNames(styles$v.pressable, styles$v.content, padsContent && styles$v.padded, isSelected && styles$v.selected),
|
|
5297
5367
|
"data-testid": testId,
|
|
5298
5368
|
children: contentNodes
|
|
5299
5369
|
}
|
|
5300
5370
|
);
|
|
5301
5371
|
}
|
|
5302
|
-
return /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$
|
|
5372
|
+
return /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$v.pressable, isSelected && styles$v.selected), children: /* @__PURE__ */ jsx(
|
|
5303
5373
|
"button",
|
|
5304
5374
|
{
|
|
5305
5375
|
type: "button",
|
|
5306
|
-
className: classNames(styles$
|
|
5376
|
+
className: classNames(styles$v.button, padsContent && styles$v.padded),
|
|
5307
5377
|
"data-testid": testId,
|
|
5308
5378
|
"aria-pressed": isSelected,
|
|
5309
5379
|
"aria-label": accessibleLabel,
|
|
@@ -5321,7 +5391,7 @@ const quote = "agents_quote_rRSqMr";
|
|
|
5321
5391
|
const quotedContent = "agents_quotedContent_Fnel3H";
|
|
5322
5392
|
const caption$3 = "agents_caption_CaGRKN";
|
|
5323
5393
|
const sourceLink = "agents_sourceLink_vqh-op";
|
|
5324
|
-
const styles$
|
|
5394
|
+
const styles$u = {
|
|
5325
5395
|
quote,
|
|
5326
5396
|
quotedContent,
|
|
5327
5397
|
caption: caption$3,
|
|
@@ -5342,18 +5412,18 @@ const Quote = (props) => {
|
|
|
5342
5412
|
if (!hasQuotedContent) return null;
|
|
5343
5413
|
const sourceLabel2 = source2?.name ?? source2?.url;
|
|
5344
5414
|
const canOpenSource = source2?.url !== void 0 && !runtime.isEmailRender;
|
|
5345
|
-
return /* @__PURE__ */ jsxs("figure", { className: styles$
|
|
5346
|
-
/* @__PURE__ */ jsxs("blockquote", { className: styles$
|
|
5415
|
+
return /* @__PURE__ */ jsxs("figure", { className: styles$u.quote, "data-testid": testId, children: [
|
|
5416
|
+
/* @__PURE__ */ jsxs("blockquote", { className: styles$u.quotedContent, cite: source2?.url, children: [
|
|
5347
5417
|
text2 !== void 0 ? /* @__PURE__ */ jsx(Text, { role: "body", translate: false, children: escapePlainTextForText(text2) }) : null,
|
|
5348
5418
|
contentNodes
|
|
5349
5419
|
] }),
|
|
5350
|
-
attribution2 !== void 0 || sourceLabel2 !== void 0 ? /* @__PURE__ */ jsxs("figcaption", { className: styles$
|
|
5420
|
+
attribution2 !== void 0 || sourceLabel2 !== void 0 ? /* @__PURE__ */ jsxs("figcaption", { className: styles$u.caption, children: [
|
|
5351
5421
|
attribution2 !== void 0 ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(attribution2) }) : null,
|
|
5352
5422
|
attribution2 !== void 0 && sourceLabel2 !== void 0 ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-lightest)", translate: false, ariaHidden: true, children: "·" }) : null,
|
|
5353
5423
|
sourceLabel2 !== void 0 && canOpenSource ? /* @__PURE__ */ jsx(
|
|
5354
5424
|
AgentsLink,
|
|
5355
5425
|
{
|
|
5356
|
-
className: styles$
|
|
5426
|
+
className: styles$u.sourceLink,
|
|
5357
5427
|
href: source2?.url,
|
|
5358
5428
|
"data-testid": `${testId}-source`,
|
|
5359
5429
|
children: /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(sourceLabel2) })
|
|
@@ -5373,7 +5443,7 @@ const small = "agents_small_5YnNVj";
|
|
|
5373
5443
|
const medium = "agents_medium_z9bCN5";
|
|
5374
5444
|
const large = "agents_large_Rn-n5f";
|
|
5375
5445
|
const grow = "agents_grow_JyN4Uj";
|
|
5376
|
-
const styles$
|
|
5446
|
+
const styles$t = {
|
|
5377
5447
|
spacer,
|
|
5378
5448
|
small,
|
|
5379
5449
|
medium,
|
|
@@ -5385,7 +5455,7 @@ const Spacer = (props) => {
|
|
|
5385
5455
|
const { props: nodeProps } = props;
|
|
5386
5456
|
const size = readEnumProp(nodeProps.size, SIZES, "medium");
|
|
5387
5457
|
const isGrowing = readBooleanProp(nodeProps.grow, false);
|
|
5388
|
-
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: classNames(styles$
|
|
5458
|
+
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: classNames(styles$t.spacer, styles$t[size], isGrowing && styles$t.grow) });
|
|
5389
5459
|
};
|
|
5390
5460
|
const composedViewComponent$l = { nodeType: "Spacer", component: Spacer };
|
|
5391
5461
|
const __vite_glob_0_28 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -5410,7 +5480,7 @@ const gapXsmall = "agents_gapXsmall_OGRCNo";
|
|
|
5410
5480
|
const gapSmall = "agents_gapSmall_xGhwPm";
|
|
5411
5481
|
const gapMedium = "agents_gapMedium_yY8QRU";
|
|
5412
5482
|
const gapLarge = "agents_gapLarge_XH-WSg";
|
|
5413
|
-
const styles$
|
|
5483
|
+
const styles$s = {
|
|
5414
5484
|
stack,
|
|
5415
5485
|
column,
|
|
5416
5486
|
row: row$2,
|
|
@@ -5434,17 +5504,17 @@ const DIRECTIONS = ["row", "column"];
|
|
|
5434
5504
|
const ALIGNMENTS = ["start", "center", "end", "stretch", "baseline"];
|
|
5435
5505
|
const JUSTIFICATIONS = ["start", "center", "end", "between"];
|
|
5436
5506
|
const ALIGNMENT_CLASS_NAMES = {
|
|
5437
|
-
start: styles$
|
|
5438
|
-
center: styles$
|
|
5439
|
-
end: styles$
|
|
5440
|
-
stretch: styles$
|
|
5441
|
-
baseline: styles$
|
|
5507
|
+
start: styles$s.alignStart,
|
|
5508
|
+
center: styles$s.alignCenter,
|
|
5509
|
+
end: styles$s.alignEnd,
|
|
5510
|
+
stretch: styles$s.alignStretch,
|
|
5511
|
+
baseline: styles$s.alignBaseline
|
|
5442
5512
|
};
|
|
5443
5513
|
const JUSTIFICATION_CLASS_NAMES = {
|
|
5444
|
-
start: styles$
|
|
5445
|
-
center: styles$
|
|
5446
|
-
end: styles$
|
|
5447
|
-
between: styles$
|
|
5514
|
+
start: styles$s.justifyStart,
|
|
5515
|
+
center: styles$s.justifyCenter,
|
|
5516
|
+
end: styles$s.justifyEnd,
|
|
5517
|
+
between: styles$s.justifyBetween
|
|
5448
5518
|
};
|
|
5449
5519
|
const Stack = (props) => {
|
|
5450
5520
|
const { props: nodeProps, slots, runtime } = props;
|
|
@@ -5464,12 +5534,12 @@ const Stack = (props) => {
|
|
|
5464
5534
|
"div",
|
|
5465
5535
|
{
|
|
5466
5536
|
className: classNames(
|
|
5467
|
-
styles$
|
|
5468
|
-
styles$
|
|
5469
|
-
isWrapping && styles$
|
|
5537
|
+
styles$s.stack,
|
|
5538
|
+
styles$s[direction],
|
|
5539
|
+
isWrapping && styles$s.wrap,
|
|
5470
5540
|
ALIGNMENT_CLASS_NAMES[alignment],
|
|
5471
5541
|
JUSTIFICATION_CLASS_NAMES[justification],
|
|
5472
|
-
layoutGapClassName(styles$
|
|
5542
|
+
layoutGapClassName(styles$s, readGapProp(nodeProps.gap))
|
|
5473
5543
|
),
|
|
5474
5544
|
children
|
|
5475
5545
|
}
|
|
@@ -5484,17 +5554,17 @@ const surface = "agents_surface_oZat8u";
|
|
|
5484
5554
|
const compact$1 = "agents_compact_gW-i-f";
|
|
5485
5555
|
const media = "agents_media_uSgVzZ";
|
|
5486
5556
|
const compactMedia = "agents_compactMedia_EzVzo-";
|
|
5487
|
-
const header$
|
|
5557
|
+
const header$3 = "agents_header_-G1cxv";
|
|
5488
5558
|
const titles = "agents_titles_hfEsqk";
|
|
5489
5559
|
const headerEnd$1 = "agents_headerEnd_-xQ-kL";
|
|
5490
5560
|
const body$1 = "agents_body_tZtLtn";
|
|
5491
5561
|
const footer$1 = "agents_footer_OnUaT0";
|
|
5492
|
-
const styles$
|
|
5562
|
+
const styles$r = {
|
|
5493
5563
|
surface,
|
|
5494
5564
|
compact: compact$1,
|
|
5495
5565
|
media,
|
|
5496
5566
|
compactMedia,
|
|
5497
|
-
header: header$
|
|
5567
|
+
header: header$3,
|
|
5498
5568
|
titles,
|
|
5499
5569
|
headerEnd: headerEnd$1,
|
|
5500
5570
|
body: body$1,
|
|
@@ -5527,11 +5597,11 @@ const Surface = (props) => {
|
|
|
5527
5597
|
level: isOutermost ? "elevated" : "flat",
|
|
5528
5598
|
compact: isCompact,
|
|
5529
5599
|
testId,
|
|
5530
|
-
className: classNames(styles$
|
|
5600
|
+
className: classNames(styles$r.surface, isCompact && styles$r.compact),
|
|
5531
5601
|
children: /* @__PURE__ */ jsxs(LayoutNestingContext.Provider, { value: innerNesting, children: [
|
|
5532
|
-
mediaNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: classNames(styles$
|
|
5533
|
-
hasHeader ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5534
|
-
title2 !== void 0 || subtitle !== void 0 ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5602
|
+
mediaNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: classNames(styles$r.media, isCompact && styles$r.compactMedia), children: mediaNodes }) : null,
|
|
5603
|
+
hasHeader ? /* @__PURE__ */ jsxs("div", { className: styles$r.header, children: [
|
|
5604
|
+
title2 !== void 0 || subtitle !== void 0 ? /* @__PURE__ */ jsxs("div", { className: styles$r.titles, children: [
|
|
5535
5605
|
title2 !== void 0 ? /* @__PURE__ */ jsx(
|
|
5536
5606
|
Text,
|
|
5537
5607
|
{
|
|
@@ -5543,10 +5613,10 @@ const Surface = (props) => {
|
|
|
5543
5613
|
) : null,
|
|
5544
5614
|
subtitle !== void 0 ? /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(subtitle) }) : null
|
|
5545
5615
|
] }) : null,
|
|
5546
|
-
headerNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
5616
|
+
headerNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$r.headerEnd, children: headerNodes }) : null
|
|
5547
5617
|
] }) : null,
|
|
5548
|
-
bodyNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
5549
|
-
footerNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
5618
|
+
bodyNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$r.body, children: bodyNodes }) : null,
|
|
5619
|
+
footerNodes.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$r.footer, children: footerNodes }) : null
|
|
5550
5620
|
] })
|
|
5551
5621
|
}
|
|
5552
5622
|
);
|
|
@@ -5693,6 +5763,9 @@ const formatMapRating = (rating, languageCode) => {
|
|
|
5693
5763
|
};
|
|
5694
5764
|
const MapPresentationContext = createContext("inline");
|
|
5695
5765
|
const useMapPresentation = () => useContext(MapPresentationContext);
|
|
5766
|
+
const WIDGET_FENCE_LANG = "widget";
|
|
5767
|
+
const BARE_WIDGET_PARAGRAPH = /^\s*widget\s*(\{[\s\S]*\})\s*$/;
|
|
5768
|
+
const BARE_WIDGET_LINE_GLOBAL = /^[ \t]*widget[ \t]*(\{.*\})[ \t]*$/gm;
|
|
5696
5769
|
const MAX_SURPLUS_CLOSERS = 3;
|
|
5697
5770
|
const decodeJsonObject = (jsonText) => {
|
|
5698
5771
|
let decoded;
|
|
@@ -6473,16 +6546,16 @@ const __vite_glob_0_31 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
6473
6546
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6474
6547
|
const caption$2 = "agents_caption_ZO0ogf";
|
|
6475
6548
|
const wrap$2 = "agents_wrap_GVwVoM";
|
|
6476
|
-
const styles$
|
|
6549
|
+
const styles$q = {
|
|
6477
6550
|
caption: caption$2,
|
|
6478
6551
|
wrap: wrap$2
|
|
6479
6552
|
};
|
|
6480
6553
|
const MediaCaption = (props) => {
|
|
6481
6554
|
const { title: title2, caption: caption2 } = props;
|
|
6482
6555
|
if (!title2 && !caption2) return null;
|
|
6483
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6484
|
-
title2 ? /* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$
|
|
6485
|
-
caption2 ? /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-light)", className: styles$
|
|
6556
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$q.caption, children: [
|
|
6557
|
+
title2 ? /* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$q.wrap, children: title2 }) : null,
|
|
6558
|
+
caption2 ? /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-light)", className: styles$q.wrap, children: caption2 }) : null
|
|
6486
6559
|
] });
|
|
6487
6560
|
};
|
|
6488
6561
|
const frame$2 = "agents_frame_QhqjEk";
|
|
@@ -6501,7 +6574,7 @@ const fallbackText = "agents_fallbackText_G8TPfd";
|
|
|
6501
6574
|
const hiddenCountChip = "agents_hiddenCountChip_QCkf8c";
|
|
6502
6575
|
const sourceChip = "agents_sourceChip_UBV1pB";
|
|
6503
6576
|
const openButton = "agents_openButton_BG-lWg";
|
|
6504
|
-
const styles$
|
|
6577
|
+
const styles$p = {
|
|
6505
6578
|
frame: frame$2,
|
|
6506
6579
|
frameCompact,
|
|
6507
6580
|
ratioSquare,
|
|
@@ -6533,12 +6606,12 @@ const useImageLoadState = (src) => {
|
|
|
6533
6606
|
return { loadState, imageRef, markLoaded, markFailed };
|
|
6534
6607
|
};
|
|
6535
6608
|
const ASPECT_RATIO_CLASS_NAMES = {
|
|
6536
|
-
"1:1": styles$
|
|
6537
|
-
"4:3": styles$
|
|
6538
|
-
"3:2": styles$
|
|
6539
|
-
"5:4": styles$
|
|
6540
|
-
"16:9": styles$
|
|
6541
|
-
"3:4": styles$
|
|
6609
|
+
"1:1": styles$p.ratioSquare,
|
|
6610
|
+
"4:3": styles$p.ratioFourByThree,
|
|
6611
|
+
"3:2": styles$p.ratioThreeByTwo,
|
|
6612
|
+
"5:4": styles$p.ratioFiveByFour,
|
|
6613
|
+
"16:9": styles$p.ratioSixteenByNine,
|
|
6614
|
+
"3:4": styles$p.ratioThreeByFour
|
|
6542
6615
|
};
|
|
6543
6616
|
const MediaImageTile = (props) => {
|
|
6544
6617
|
const {
|
|
@@ -6558,19 +6631,19 @@ const MediaImageTile = (props) => {
|
|
|
6558
6631
|
onLoadFailed?.();
|
|
6559
6632
|
};
|
|
6560
6633
|
const frameClassName = classNames(
|
|
6561
|
-
styles$
|
|
6634
|
+
styles$p.frame,
|
|
6562
6635
|
ASPECT_RATIO_CLASS_NAMES[aspectRatio],
|
|
6563
|
-
isCompact && styles$
|
|
6636
|
+
isCompact && styles$p.frameCompact
|
|
6564
6637
|
);
|
|
6565
6638
|
const frameContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6566
|
-
loadState === "failed" ? /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6639
|
+
loadState === "failed" ? /* @__PURE__ */ jsxs("span", { className: styles$p.fallback, children: [
|
|
6567
6640
|
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", name: "image" }),
|
|
6568
|
-
/* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg)", className: styles$
|
|
6641
|
+
/* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg)", className: styles$p.fallbackText, children: image2.alt })
|
|
6569
6642
|
] }) : /* @__PURE__ */ jsx(
|
|
6570
6643
|
"img",
|
|
6571
6644
|
{
|
|
6572
6645
|
ref: imageRef,
|
|
6573
|
-
className: classNames(styles$
|
|
6646
|
+
className: classNames(styles$p.image, fit === "contain" && styles$p.imageContain),
|
|
6574
6647
|
src: image2.src,
|
|
6575
6648
|
alt: image2.alt,
|
|
6576
6649
|
loading: isEager ? "eager" : "lazy",
|
|
@@ -6579,9 +6652,9 @@ const MediaImageTile = (props) => {
|
|
|
6579
6652
|
onError: markFailed
|
|
6580
6653
|
}
|
|
6581
6654
|
),
|
|
6582
|
-
loadState === "loading" ? /* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
6583
|
-
image2.source && !isCompact ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
6584
|
-
hiddenImageCount > 0 ? /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6655
|
+
loadState === "loading" ? /* @__PURE__ */ jsx(Skeleton, { className: styles$p.skeleton }) : null,
|
|
6656
|
+
image2.source && !isCompact ? /* @__PURE__ */ jsx("span", { className: styles$p.sourceChip, children: /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-on-dark)", ellipsis: true, children: image2.source.name }) }) : null,
|
|
6657
|
+
hiddenImageCount > 0 ? /* @__PURE__ */ jsxs("span", { className: styles$p.hiddenCountChip, children: [
|
|
6585
6658
|
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-on-dark)", name: "photo" }),
|
|
6586
6659
|
/* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-on-dark)", translate: false, children: `+${hiddenImageCount}` })
|
|
6587
6660
|
] }) : null
|
|
@@ -6600,7 +6673,7 @@ const MediaImageTile = (props) => {
|
|
|
6600
6673
|
"button",
|
|
6601
6674
|
{
|
|
6602
6675
|
type: "button",
|
|
6603
|
-
className: styles$
|
|
6676
|
+
className: styles$p.openButton,
|
|
6604
6677
|
"aria-label": openLabel,
|
|
6605
6678
|
onClick: onOpen,
|
|
6606
6679
|
"data-testid": testId ? `${testId}-open` : void 0
|
|
@@ -6707,7 +6780,7 @@ const imageCompact = "agents_imageCompact_h-8KKS";
|
|
|
6707
6780
|
const pendingFrame = "agents_pendingFrame_KPTkbn";
|
|
6708
6781
|
const pendingFrameCompact = "agents_pendingFrameCompact_3mI5Mt";
|
|
6709
6782
|
const pendingSkeleton$1 = "agents_pendingSkeleton_LxA7up";
|
|
6710
|
-
const styles$
|
|
6783
|
+
const styles$o = {
|
|
6711
6784
|
image,
|
|
6712
6785
|
imageCompact,
|
|
6713
6786
|
pendingFrame,
|
|
@@ -6741,16 +6814,16 @@ const ImageNode = (props) => {
|
|
|
6741
6814
|
return /* @__PURE__ */ jsx(
|
|
6742
6815
|
"span",
|
|
6743
6816
|
{
|
|
6744
|
-
className: classNames(styles$
|
|
6817
|
+
className: classNames(styles$o.pendingFrame, isCompact && styles$o.pendingFrameCompact),
|
|
6745
6818
|
"aria-busy": "true",
|
|
6746
6819
|
"data-testid": `${testId}-skeleton`,
|
|
6747
|
-
children: /* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
6820
|
+
children: /* @__PURE__ */ jsx(Skeleton, { className: styles$o.pendingSkeleton })
|
|
6748
6821
|
}
|
|
6749
6822
|
);
|
|
6750
6823
|
}
|
|
6751
6824
|
if (!image2) return null;
|
|
6752
6825
|
const openLightbox = runtime.isEmailRender || isInsidePressable ? void 0 : () => openMediaImagesLightbox([image2], 0);
|
|
6753
|
-
return /* @__PURE__ */ jsxs("figure", { className: classNames(styles$
|
|
6826
|
+
return /* @__PURE__ */ jsxs("figure", { className: classNames(styles$o.image, isCompact && styles$o.imageCompact), "data-testid": testId, children: [
|
|
6754
6827
|
/* @__PURE__ */ jsx(
|
|
6755
6828
|
MediaImageTile,
|
|
6756
6829
|
{
|
|
@@ -6787,7 +6860,7 @@ const carouselPosition = "agents_carouselPosition_3Vgxq3";
|
|
|
6787
6860
|
const pendingTile = "agents_pendingTile_3yCaZK";
|
|
6788
6861
|
const pendingTileCompact = "agents_pendingTileCompact_LboHtT";
|
|
6789
6862
|
const pendingSkeleton = "agents_pendingSkeleton_Vn-s3o";
|
|
6790
|
-
const styles$
|
|
6863
|
+
const styles$n = {
|
|
6791
6864
|
grid,
|
|
6792
6865
|
gridCompact,
|
|
6793
6866
|
tile: tile$1,
|
|
@@ -6813,7 +6886,7 @@ const ImageGroupGrid = (props) => {
|
|
|
6813
6886
|
const { images, aspectRatio, isEmailRender, isInsidePressable, onImageLoadFailed, maxVisibleTiles, isCompact, testId } = props;
|
|
6814
6887
|
const visibleImages = images.slice(0, maxVisibleTiles);
|
|
6815
6888
|
const hiddenImageCount = images.length - visibleImages.length;
|
|
6816
|
-
return /* @__PURE__ */ jsx("div", { className: classNames(styles$
|
|
6889
|
+
return /* @__PURE__ */ jsx("div", { className: classNames(styles$n.grid, isCompact && styles$n.gridCompact), "data-testid": testId, children: visibleImages.map((image2, imageIndex) => /* @__PURE__ */ jsxs("figure", { className: styles$n.tile, children: [
|
|
6817
6890
|
/* @__PURE__ */ jsx(
|
|
6818
6891
|
MediaImageTile,
|
|
6819
6892
|
{
|
|
@@ -6833,8 +6906,8 @@ const ImageGroupGrid = (props) => {
|
|
|
6833
6906
|
const ImageGroupMagazine = (props) => {
|
|
6834
6907
|
const { images, aspectRatio, heroAspectRatio, isEmailRender, isInsidePressable, onImageLoadFailed, testId } = props;
|
|
6835
6908
|
const [heroImage, ...tileImages] = images;
|
|
6836
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6837
|
-
/* @__PURE__ */ jsxs("figure", { className: styles$
|
|
6909
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$n.magazine, "data-testid": testId, children: [
|
|
6910
|
+
/* @__PURE__ */ jsxs("figure", { className: styles$n.tile, children: [
|
|
6838
6911
|
/* @__PURE__ */ jsx(
|
|
6839
6912
|
MediaImageTile,
|
|
6840
6913
|
{
|
|
@@ -6848,7 +6921,7 @@ const ImageGroupMagazine = (props) => {
|
|
|
6848
6921
|
),
|
|
6849
6922
|
/* @__PURE__ */ jsx(MediaCaption, { title: heroImage.title, caption: heroImage.caption })
|
|
6850
6923
|
] }),
|
|
6851
|
-
tileImages.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
6924
|
+
tileImages.length > 0 ? /* @__PURE__ */ jsx("div", { className: styles$n.grid, children: tileImages.map((image2, tileIndex) => /* @__PURE__ */ jsxs("figure", { className: styles$n.tile, children: [
|
|
6852
6925
|
/* @__PURE__ */ jsx(
|
|
6853
6926
|
MediaImageTile,
|
|
6854
6927
|
{
|
|
@@ -6870,12 +6943,12 @@ const CarouselStepButton = (props) => {
|
|
|
6870
6943
|
InteractiveSurface,
|
|
6871
6944
|
{
|
|
6872
6945
|
hoverable: !isDisabled,
|
|
6873
|
-
className: classNames(styles$
|
|
6946
|
+
className: classNames(styles$n.carouselButton, className, isDisabled && styles$n.carouselButtonDisabled),
|
|
6874
6947
|
children: /* @__PURE__ */ jsx(
|
|
6875
6948
|
"button",
|
|
6876
6949
|
{
|
|
6877
6950
|
type: "button",
|
|
6878
|
-
className: styles$
|
|
6951
|
+
className: styles$n.carouselButtonTarget,
|
|
6879
6952
|
"aria-label": label2,
|
|
6880
6953
|
"data-testid": testId,
|
|
6881
6954
|
disabled: isDisabled,
|
|
@@ -6901,14 +6974,14 @@ const ImageGroupCarousel = (props) => {
|
|
|
6901
6974
|
return /* @__PURE__ */ jsxs(
|
|
6902
6975
|
"div",
|
|
6903
6976
|
{
|
|
6904
|
-
className: styles$
|
|
6977
|
+
className: styles$n.carousel,
|
|
6905
6978
|
"data-testid": testId,
|
|
6906
6979
|
role: "group",
|
|
6907
6980
|
"aria-roledescription": "carousel",
|
|
6908
6981
|
tabIndex: hasControls ? 0 : void 0,
|
|
6909
6982
|
onKeyDown: hasControls ? showImageForKey : void 0,
|
|
6910
6983
|
children: [
|
|
6911
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6984
|
+
/* @__PURE__ */ jsxs("div", { className: styles$n.carouselStage, children: [
|
|
6912
6985
|
/* @__PURE__ */ jsx(
|
|
6913
6986
|
MediaImageTile,
|
|
6914
6987
|
{
|
|
@@ -6927,7 +7000,7 @@ const ImageGroupCarousel = (props) => {
|
|
|
6927
7000
|
{
|
|
6928
7001
|
label: translateText("Previous picture"),
|
|
6929
7002
|
icon: "arrowLeft",
|
|
6930
|
-
className: styles$
|
|
7003
|
+
className: styles$n.carouselButtonPrevious,
|
|
6931
7004
|
isDisabled: currentImageIndex === 0,
|
|
6932
7005
|
onStep: () => showImage(currentImageIndex - 1),
|
|
6933
7006
|
testId: `${testId}-previous`
|
|
@@ -6938,13 +7011,13 @@ const ImageGroupCarousel = (props) => {
|
|
|
6938
7011
|
{
|
|
6939
7012
|
label: translateText("Next picture"),
|
|
6940
7013
|
icon: "arrowRight",
|
|
6941
|
-
className: styles$
|
|
7014
|
+
className: styles$n.carouselButtonNext,
|
|
6942
7015
|
isDisabled: currentImageIndex === lastImageIndex,
|
|
6943
7016
|
onStep: () => showImage(currentImageIndex + 1),
|
|
6944
7017
|
testId: `${testId}-next`
|
|
6945
7018
|
}
|
|
6946
7019
|
),
|
|
6947
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7020
|
+
/* @__PURE__ */ jsx("span", { className: styles$n.carouselPosition, "aria-live": "polite", "data-testid": `${testId}-position`, children: /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-on-dark)", translate: false, children: `${currentImageIndex + 1} / ${images.length}` }) })
|
|
6948
7021
|
] }) : null
|
|
6949
7022
|
] }),
|
|
6950
7023
|
/* @__PURE__ */ jsx(MediaCaption, { title: currentImage.title, caption: currentImage.caption })
|
|
@@ -7003,10 +7076,10 @@ const ImageGroupNode = (props) => {
|
|
|
7003
7076
|
return /* @__PURE__ */ jsx(
|
|
7004
7077
|
"div",
|
|
7005
7078
|
{
|
|
7006
|
-
className: classNames(styles$
|
|
7079
|
+
className: classNames(styles$n.grid, isCompact && styles$n.gridCompact),
|
|
7007
7080
|
"aria-busy": "true",
|
|
7008
7081
|
"data-testid": `${testId}-skeleton`,
|
|
7009
|
-
children: Array.from({ length: isCompact ? COMPACT_MAX_VISIBLE_TILES : PENDING_TILE_COUNT }, (unused, tileIndex) => /* @__PURE__ */ jsx("span", { className: classNames(styles$
|
|
7082
|
+
children: Array.from({ length: isCompact ? COMPACT_MAX_VISIBLE_TILES : PENDING_TILE_COUNT }, (unused, tileIndex) => /* @__PURE__ */ jsx("span", { className: classNames(styles$n.pendingTile, isCompact && styles$n.pendingTileCompact), children: /* @__PURE__ */ jsx(Skeleton, { className: styles$n.pendingSkeleton }) }, tileIndex))
|
|
7010
7083
|
}
|
|
7011
7084
|
);
|
|
7012
7085
|
}
|
|
@@ -7060,7 +7133,7 @@ const playButton$1 = "agents_playButton_vUbsU1";
|
|
|
7060
7133
|
const text$2 = "agents_text_po8tsX";
|
|
7061
7134
|
const wrap$1 = "agents_wrap_Y3ml8c";
|
|
7062
7135
|
const openLink$1 = "agents_openLink_Aj8YwO";
|
|
7063
|
-
const styles$
|
|
7136
|
+
const styles$m = {
|
|
7064
7137
|
video,
|
|
7065
7138
|
videoCompact,
|
|
7066
7139
|
frame: frame$1,
|
|
@@ -7112,10 +7185,10 @@ const VideoNode = (props) => {
|
|
|
7112
7185
|
return /* @__PURE__ */ jsx(
|
|
7113
7186
|
"span",
|
|
7114
7187
|
{
|
|
7115
|
-
className: classNames(styles$
|
|
7188
|
+
className: classNames(styles$m.video, isCompact && styles$m.videoCompact),
|
|
7116
7189
|
"aria-busy": "true",
|
|
7117
7190
|
"data-testid": `${testId}-skeleton`,
|
|
7118
|
-
children: /* @__PURE__ */ jsx("span", { className: styles$
|
|
7191
|
+
children: /* @__PURE__ */ jsx("span", { className: styles$m.frame, children: /* @__PURE__ */ jsx(Skeleton, { className: styles$m.frameSkeleton }) })
|
|
7119
7192
|
}
|
|
7120
7193
|
);
|
|
7121
7194
|
}
|
|
@@ -7132,10 +7205,10 @@ const VideoNode = (props) => {
|
|
|
7132
7205
|
};
|
|
7133
7206
|
const metaLine2 = [channel, duration].filter((metaPart) => metaPart !== void 0).join(" · ");
|
|
7134
7207
|
const sourceName = source2 && source2.name !== channel ? source2.name : void 0;
|
|
7135
|
-
const frame2 = isPlaying && videoId ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
7208
|
+
const frame2 = isPlaying && videoId ? /* @__PURE__ */ jsx("span", { className: styles$m.frame, children: /* @__PURE__ */ jsx(
|
|
7136
7209
|
"iframe",
|
|
7137
7210
|
{
|
|
7138
|
-
className: styles$
|
|
7211
|
+
className: styles$m.player,
|
|
7139
7212
|
"data-testid": `${testId}-player`,
|
|
7140
7213
|
src: buildVideoEmbedUrl(videoId),
|
|
7141
7214
|
title: title2,
|
|
@@ -7143,12 +7216,12 @@ const VideoNode = (props) => {
|
|
|
7143
7216
|
allowFullScreen: true,
|
|
7144
7217
|
referrerPolicy: "strict-origin-when-cross-origin"
|
|
7145
7218
|
}
|
|
7146
|
-
) }) : /* @__PURE__ */ jsxs(InteractiveSurface, { hoverable: canOpen, className: styles$
|
|
7219
|
+
) }) : /* @__PURE__ */ jsxs(InteractiveSurface, { hoverable: canOpen, className: styles$m.frame, children: [
|
|
7147
7220
|
showThumbnail ? /* @__PURE__ */ jsx(
|
|
7148
7221
|
"img",
|
|
7149
7222
|
{
|
|
7150
7223
|
ref: thumbnailRef,
|
|
7151
|
-
className: styles$
|
|
7224
|
+
className: styles$m.thumbnail,
|
|
7152
7225
|
src: thumbnailUrl,
|
|
7153
7226
|
alt: "",
|
|
7154
7227
|
loading: isEmailRender ? "eager" : "lazy",
|
|
@@ -7157,14 +7230,14 @@ const VideoNode = (props) => {
|
|
|
7157
7230
|
onError: markThumbnailFailed
|
|
7158
7231
|
}
|
|
7159
7232
|
) : null,
|
|
7160
|
-
showThumbnail && thumbnailLoadState === "loading" ? /* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
7161
|
-
/* @__PURE__ */ jsx("span", { className: classNames(styles$
|
|
7162
|
-
duration ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
7233
|
+
showThumbnail && thumbnailLoadState === "loading" ? /* @__PURE__ */ jsx(Skeleton, { className: styles$m.frameSkeleton }) : null,
|
|
7234
|
+
/* @__PURE__ */ jsx("span", { className: classNames(styles$m.playBadge, isCompact && styles$m.playBadgeCompact), "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-on-dark)", name: "play" }) }),
|
|
7235
|
+
duration ? /* @__PURE__ */ jsx("span", { className: styles$m.durationChip, children: /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-on-dark)", translate: false, children: duration }) }) : null,
|
|
7163
7236
|
canOpen ? /* @__PURE__ */ jsx(
|
|
7164
7237
|
"button",
|
|
7165
7238
|
{
|
|
7166
7239
|
type: "button",
|
|
7167
|
-
className: styles$
|
|
7240
|
+
className: styles$m.playButton,
|
|
7168
7241
|
"data-testid": `${testId}-play`,
|
|
7169
7242
|
"aria-label": translateText("Play the video %title%", { title: title2 }),
|
|
7170
7243
|
onClick: playVideo
|
|
@@ -7172,22 +7245,22 @@ const VideoNode = (props) => {
|
|
|
7172
7245
|
) : null
|
|
7173
7246
|
] });
|
|
7174
7247
|
if (isCompact) {
|
|
7175
|
-
return /* @__PURE__ */ jsxs("span", { className: classNames(styles$
|
|
7248
|
+
return /* @__PURE__ */ jsxs("span", { className: classNames(styles$m.video, styles$m.videoCompact), "data-testid": testId, children: [
|
|
7176
7249
|
frame2,
|
|
7177
7250
|
/* @__PURE__ */ jsx(ModelText, { role: "caption", ellipsis: true, children: title2 })
|
|
7178
7251
|
] });
|
|
7179
7252
|
}
|
|
7180
|
-
return /* @__PURE__ */ jsxs("figure", { className: styles$
|
|
7253
|
+
return /* @__PURE__ */ jsxs("figure", { className: styles$m.video, "data-testid": testId, children: [
|
|
7181
7254
|
frame2,
|
|
7182
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7183
|
-
/* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$
|
|
7255
|
+
/* @__PURE__ */ jsxs("span", { className: styles$m.text, children: [
|
|
7256
|
+
/* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$m.wrap, children: title2 }),
|
|
7184
7257
|
metaLine2 ? /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-light)", children: metaLine2 }) : null,
|
|
7185
7258
|
sourceName ? /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-lightest)", children: sourceName }) : null
|
|
7186
7259
|
] }),
|
|
7187
7260
|
canOpen && watchUrl ? /* @__PURE__ */ jsxs(
|
|
7188
7261
|
AgentsLink,
|
|
7189
7262
|
{
|
|
7190
|
-
className: styles$
|
|
7263
|
+
className: styles$m.openLink,
|
|
7191
7264
|
href: watchUrl,
|
|
7192
7265
|
"data-testid": `${testId}-open-link`,
|
|
7193
7266
|
children: [
|
|
@@ -7237,7 +7310,7 @@ const metaPhrase = "agents_metaPhrase_Kh3c5I";
|
|
|
7237
7310
|
const titleSkeleton = "agents_titleSkeleton_oRueor";
|
|
7238
7311
|
const metaSkeleton = "agents_metaSkeleton_5rFS57";
|
|
7239
7312
|
const openLink = "agents_openLink_WBY-fX";
|
|
7240
|
-
const styles$
|
|
7313
|
+
const styles$l = {
|
|
7241
7314
|
card,
|
|
7242
7315
|
cardElevated,
|
|
7243
7316
|
cardFlat,
|
|
@@ -7296,22 +7369,22 @@ const VideoWidgetNode = (props) => {
|
|
|
7296
7369
|
reportNodeStatus("mounted");
|
|
7297
7370
|
}, [isPending, title2, videoId, reportNodeStatus]);
|
|
7298
7371
|
const cardClassName = classNames(
|
|
7299
|
-
styles$
|
|
7300
|
-
isInsideSurface ? styles$
|
|
7301
|
-
isCompact && styles$
|
|
7372
|
+
styles$l.card,
|
|
7373
|
+
isInsideSurface ? styles$l.cardFlat : styles$l.cardElevated,
|
|
7374
|
+
isCompact && styles$l.cardCompact
|
|
7302
7375
|
);
|
|
7303
7376
|
if (isPending) {
|
|
7304
7377
|
return /* @__PURE__ */ jsxs("span", { className: cardClassName, "aria-busy": "true", "data-testid": `${testId}-skeleton`, children: [
|
|
7305
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7306
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7307
|
-
/* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
7308
|
-
/* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
7378
|
+
/* @__PURE__ */ jsx("span", { className: styles$l.frame, children: /* @__PURE__ */ jsx(Skeleton, { className: styles$l.frameSkeleton }) }),
|
|
7379
|
+
/* @__PURE__ */ jsxs("span", { className: styles$l.text, children: [
|
|
7380
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles$l.titleSkeleton }),
|
|
7381
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles$l.metaSkeleton })
|
|
7309
7382
|
] })
|
|
7310
7383
|
] });
|
|
7311
7384
|
}
|
|
7312
7385
|
if (!title2) return null;
|
|
7313
7386
|
if (!videoId) {
|
|
7314
|
-
return /* @__PURE__ */ jsx("span", { className: cardClassName, "data-testid": testId, children: /* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$
|
|
7387
|
+
return /* @__PURE__ */ jsx("span", { className: cardClassName, "data-testid": testId, children: /* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$l.wrap, children: title2 }) });
|
|
7315
7388
|
}
|
|
7316
7389
|
const watchUrl = videoId ? buildVideoWatchUrl(videoId) : void 0;
|
|
7317
7390
|
const hasControls = videoId !== void 0 && !isEmailRender && !isInsidePressable;
|
|
@@ -7324,10 +7397,10 @@ const VideoWidgetNode = (props) => {
|
|
|
7324
7397
|
}
|
|
7325
7398
|
if (watchUrl) openLink2(watchUrl);
|
|
7326
7399
|
};
|
|
7327
|
-
const frame2 = isPlaying && videoId ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
7400
|
+
const frame2 = isPlaying && videoId ? /* @__PURE__ */ jsx("span", { className: styles$l.frame, children: /* @__PURE__ */ jsx(
|
|
7328
7401
|
"iframe",
|
|
7329
7402
|
{
|
|
7330
|
-
className: styles$
|
|
7403
|
+
className: styles$l.player,
|
|
7331
7404
|
"data-testid": `${testId}-player`,
|
|
7332
7405
|
src: buildVideoEmbedUrl(videoId),
|
|
7333
7406
|
title: title2,
|
|
@@ -7335,12 +7408,12 @@ const VideoWidgetNode = (props) => {
|
|
|
7335
7408
|
allowFullScreen: true,
|
|
7336
7409
|
referrerPolicy: "strict-origin-when-cross-origin"
|
|
7337
7410
|
}
|
|
7338
|
-
) }) : /* @__PURE__ */ jsxs(InteractiveSurface, { hoverable: hasControls, className: styles$
|
|
7411
|
+
) }) : /* @__PURE__ */ jsxs(InteractiveSurface, { hoverable: hasControls, className: styles$l.frame, children: [
|
|
7339
7412
|
showThumbnail ? /* @__PURE__ */ jsx(
|
|
7340
7413
|
"img",
|
|
7341
7414
|
{
|
|
7342
7415
|
ref: thumbnailRef,
|
|
7343
|
-
className: styles$
|
|
7416
|
+
className: styles$l.thumbnail,
|
|
7344
7417
|
src: thumbnailUrl,
|
|
7345
7418
|
alt: "",
|
|
7346
7419
|
loading: isEmailRender ? "eager" : "lazy",
|
|
@@ -7349,14 +7422,14 @@ const VideoWidgetNode = (props) => {
|
|
|
7349
7422
|
onError: markThumbnailFailed
|
|
7350
7423
|
}
|
|
7351
7424
|
) : null,
|
|
7352
|
-
showThumbnail && thumbnailLoadState === "loading" ? /* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
7353
|
-
/* @__PURE__ */ jsx("span", { className: classNames(styles$
|
|
7354
|
-
duration ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
7425
|
+
showThumbnail && thumbnailLoadState === "loading" ? /* @__PURE__ */ jsx(Skeleton, { className: styles$l.frameSkeleton }) : null,
|
|
7426
|
+
/* @__PURE__ */ jsx("span", { className: classNames(styles$l.playBadge, isCompact && styles$l.playBadgeCompact), "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-on-dark)", name: "play" }) }),
|
|
7427
|
+
duration ? /* @__PURE__ */ jsx("span", { className: styles$l.durationChip, children: /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-on-dark)", translate: false, children: duration }) }) : null,
|
|
7355
7428
|
hasControls ? /* @__PURE__ */ jsx(
|
|
7356
7429
|
"button",
|
|
7357
7430
|
{
|
|
7358
7431
|
type: "button",
|
|
7359
|
-
className: styles$
|
|
7432
|
+
className: styles$l.playButton,
|
|
7360
7433
|
"data-testid": `${testId}-play`,
|
|
7361
7434
|
"aria-label": translateText("Play the video %title%", { title: title2 }),
|
|
7362
7435
|
onClick: playVideo
|
|
@@ -7366,7 +7439,7 @@ const VideoWidgetNode = (props) => {
|
|
|
7366
7439
|
if (isCompact) {
|
|
7367
7440
|
return /* @__PURE__ */ jsxs("span", { className: cardClassName, "data-testid": testId, children: [
|
|
7368
7441
|
frame2,
|
|
7369
|
-
/* @__PURE__ */ jsx(ModelText, { role: "caption", weight: "medium", className: styles$
|
|
7442
|
+
/* @__PURE__ */ jsx(ModelText, { role: "caption", weight: "medium", className: styles$l.compactTitle, children: title2 })
|
|
7370
7443
|
] });
|
|
7371
7444
|
}
|
|
7372
7445
|
const statisticPhrases = [
|
|
@@ -7385,10 +7458,10 @@ const VideoWidgetNode = (props) => {
|
|
|
7385
7458
|
].filter((statisticPhrase) => statisticPhrase !== null);
|
|
7386
7459
|
return /* @__PURE__ */ jsxs("article", { className: cardClassName, "data-testid": testId, children: [
|
|
7387
7460
|
frame2,
|
|
7388
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7389
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7390
|
-
channel ? /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-light)", className: styles$
|
|
7391
|
-
statisticPhrases.length > 0 ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
7461
|
+
/* @__PURE__ */ jsxs("span", { className: styles$l.text, children: [
|
|
7462
|
+
/* @__PURE__ */ jsx("span", { className: styles$l.title, title: title2, children: /* @__PURE__ */ jsx(ModelText, { role: "body", weight: "bold", className: styles$l.titleText, children: title2 }) }),
|
|
7463
|
+
channel ? /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-light)", className: styles$l.wrap, children: channel }) : null,
|
|
7464
|
+
statisticPhrases.length > 0 ? /* @__PURE__ */ jsx("span", { className: styles$l.metaLine, children: statisticPhrases.map((statisticPhrase, phraseIndex) => /* @__PURE__ */ jsxs("span", { className: styles$l.metaPhrase, children: [
|
|
7392
7465
|
phraseIndex > 0 ? /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-lightest)", translate: false, children: "·" }) : null,
|
|
7393
7466
|
statisticPhrase
|
|
7394
7467
|
] }, phraseIndex)) }) : null
|
|
@@ -7396,7 +7469,7 @@ const VideoWidgetNode = (props) => {
|
|
|
7396
7469
|
hasControls && watchUrl ? /* @__PURE__ */ jsxs(
|
|
7397
7470
|
AgentsLink,
|
|
7398
7471
|
{
|
|
7399
|
-
className: styles$
|
|
7472
|
+
className: styles$l.openLink,
|
|
7400
7473
|
href: watchUrl,
|
|
7401
7474
|
"data-testid": `${testId}-open-link`,
|
|
7402
7475
|
children: [
|
|
@@ -7528,7 +7601,7 @@ const loadHighlighterWithLanguage = async (grammarName) => {
|
|
|
7528
7601
|
await highlightLanguagePromises[grammarName];
|
|
7529
7602
|
return highlighter;
|
|
7530
7603
|
};
|
|
7531
|
-
const header$
|
|
7604
|
+
const header$2 = "agents_header_gSgG9l";
|
|
7532
7605
|
const heading$1 = "agents_heading_h79BcV";
|
|
7533
7606
|
const headerEnd = "agents_headerEnd_sUiI2V";
|
|
7534
7607
|
const wrappingText = "agents_wrappingText_i9j7-t";
|
|
@@ -7538,8 +7611,8 @@ const compact = "agents_compact_DpYcfU";
|
|
|
7538
7611
|
const skeleton$1 = "agents_skeleton_-WUgmj";
|
|
7539
7612
|
const badge$1 = "agents_badge_IPtLgF";
|
|
7540
7613
|
const tile = "agents_tile_yJK-vF";
|
|
7541
|
-
const styles$
|
|
7542
|
-
header: header$
|
|
7614
|
+
const styles$k = {
|
|
7615
|
+
header: header$2,
|
|
7543
7616
|
heading: heading$1,
|
|
7544
7617
|
headerEnd,
|
|
7545
7618
|
wrappingText,
|
|
@@ -7555,15 +7628,15 @@ const RichNodeFrame = (props) => {
|
|
|
7555
7628
|
const isRoot = sizeClass === "full";
|
|
7556
7629
|
const hasHeader = Boolean(title2) || badge2 !== void 0 || actions2 !== void 0;
|
|
7557
7630
|
const content2 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7558
|
-
hasHeader ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7559
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7631
|
+
hasHeader ? /* @__PURE__ */ jsxs("div", { className: styles$k.header, children: [
|
|
7632
|
+
/* @__PURE__ */ jsxs("div", { className: styles$k.heading, children: [
|
|
7560
7633
|
title2 ? /* @__PURE__ */ jsx(
|
|
7561
7634
|
Text,
|
|
7562
7635
|
{
|
|
7563
7636
|
role: isRoot ? "intro" : "body",
|
|
7564
7637
|
weight: "bold",
|
|
7565
7638
|
translate: false,
|
|
7566
|
-
className: styles$
|
|
7639
|
+
className: styles$k.wrappingText,
|
|
7567
7640
|
children: escapePlainTextForText(title2)
|
|
7568
7641
|
}
|
|
7569
7642
|
) : null,
|
|
@@ -7573,41 +7646,41 @@ const RichNodeFrame = (props) => {
|
|
|
7573
7646
|
role: "help",
|
|
7574
7647
|
color: "var(--agents-fg-light)",
|
|
7575
7648
|
translate: false,
|
|
7576
|
-
className: styles$
|
|
7649
|
+
className: styles$k.wrappingText,
|
|
7577
7650
|
children: escapePlainTextForText(caption2)
|
|
7578
7651
|
}
|
|
7579
7652
|
) : null
|
|
7580
7653
|
] }),
|
|
7581
|
-
badge2 !== void 0 || actions2 !== void 0 ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7654
|
+
badge2 !== void 0 || actions2 !== void 0 ? /* @__PURE__ */ jsxs("div", { className: styles$k.headerEnd, children: [
|
|
7582
7655
|
badge2,
|
|
7583
7656
|
actions2
|
|
7584
7657
|
] }) : null
|
|
7585
7658
|
] }) : null,
|
|
7586
7659
|
children,
|
|
7587
|
-
footer2 ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
7660
|
+
footer2 ? /* @__PURE__ */ jsx("div", { className: styles$k.footer, children: footer2 }) : null
|
|
7588
7661
|
] });
|
|
7589
7662
|
if (isRoot)
|
|
7590
7663
|
return /* @__PURE__ */ jsx(WidgetSurface, { level: "elevated", testId, children: content2 });
|
|
7591
7664
|
if (isTileWhenNested)
|
|
7592
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7593
|
-
return /* @__PURE__ */ jsx("div", { className: classNames(styles$
|
|
7665
|
+
return /* @__PURE__ */ jsx("div", { className: styles$k.tile, "data-testid": testId, children: content2 });
|
|
7666
|
+
return /* @__PURE__ */ jsx("div", { className: classNames(styles$k.nested, sizeClass === "compact" && styles$k.compact), "data-testid": testId, children: content2 });
|
|
7594
7667
|
};
|
|
7595
7668
|
const RichNodeContentSkeleton = (props) => {
|
|
7596
7669
|
const { height, testId } = props;
|
|
7597
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7670
|
+
return /* @__PURE__ */ jsx("div", { className: styles$k.skeleton, "aria-busy": "true", "data-testid": testId, children: /* @__PURE__ */ jsx(SkeletonLine, { width: "100%", height, radius: 12 }) });
|
|
7598
7671
|
};
|
|
7599
7672
|
const RichNodeBadge = (props) => {
|
|
7600
7673
|
const { children } = props;
|
|
7601
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
7674
|
+
return /* @__PURE__ */ jsx("span", { className: styles$k.badge, children: /* @__PURE__ */ jsx(Text, { role: "caption", weight: "medium", color: "var(--agents-fg-light)", translate: false, children: escapePlainTextForText(children) }) });
|
|
7602
7675
|
};
|
|
7603
|
-
const actions$
|
|
7676
|
+
const actions$2 = "agents_actions_pp5-uO";
|
|
7604
7677
|
const codeArea = "agents_codeArea_rGS9h8";
|
|
7605
7678
|
const clipped = "agents_clipped_sJ6UtK";
|
|
7606
7679
|
const code = "agents_code_ZjGPAo";
|
|
7607
7680
|
const wrapped = "agents_wrapped_OEeVIP";
|
|
7608
7681
|
const expandRow = "agents_expandRow_z5yKIH";
|
|
7609
|
-
const styles$
|
|
7610
|
-
actions: actions$
|
|
7682
|
+
const styles$j = {
|
|
7683
|
+
actions: actions$2,
|
|
7611
7684
|
codeArea,
|
|
7612
7685
|
clipped,
|
|
7613
7686
|
code,
|
|
@@ -7689,7 +7762,7 @@ const CodeNode = (props) => {
|
|
|
7689
7762
|
if (code2 === "") return null;
|
|
7690
7763
|
const linesWrap = isWrapped || isEmailRender;
|
|
7691
7764
|
const isClipped = isCollapsible && !isExpanded;
|
|
7692
|
-
const actions2 = isEmailRender ? void 0 : /* @__PURE__ */ jsx(ConversationWidgetActions, { children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7765
|
+
const actions2 = isEmailRender ? void 0 : /* @__PURE__ */ jsx(ConversationWidgetActions, { children: /* @__PURE__ */ jsxs("div", { className: styles$j.actions, children: [
|
|
7693
7766
|
/* @__PURE__ */ jsx(
|
|
7694
7767
|
Button,
|
|
7695
7768
|
{
|
|
@@ -7724,8 +7797,8 @@ const CodeNode = (props) => {
|
|
|
7724
7797
|
isTileWhenNested: true,
|
|
7725
7798
|
testId,
|
|
7726
7799
|
children: [
|
|
7727
|
-
/* @__PURE__ */ jsx("div", { className: classNames(styles$
|
|
7728
|
-
isCollapsible && !isEmailRender ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
7800
|
+
/* @__PURE__ */ jsx("div", { className: classNames(styles$j.codeArea, isClipped && styles$j.clipped), children: highlighting.status === "highlighted" ? /* @__PURE__ */ jsx("pre", { className: classNames(styles$j.code, linesWrap && styles$j.wrapped), children: /* @__PURE__ */ jsx("code", { className: "hljs", dangerouslySetInnerHTML: { __html: highlighting.html } }) }) : /* @__PURE__ */ jsx("pre", { className: classNames(styles$j.code, linesWrap && styles$j.wrapped), children: /* @__PURE__ */ jsx("code", { children: code2 }) }) }),
|
|
7801
|
+
isCollapsible && !isEmailRender ? /* @__PURE__ */ jsx("div", { className: styles$j.expandRow, children: /* @__PURE__ */ jsx(
|
|
7729
7802
|
Button,
|
|
7730
7803
|
{
|
|
7731
7804
|
variant: "muted",
|
|
@@ -7903,7 +7976,7 @@ const useColorSchemeRevision = () => {
|
|
|
7903
7976
|
};
|
|
7904
7977
|
const diagramArea = "agents_diagramArea_A-7jZw";
|
|
7905
7978
|
const diagram = "agents_diagram_Ii-g0P";
|
|
7906
|
-
const styles$
|
|
7979
|
+
const styles$i = {
|
|
7907
7980
|
diagramArea,
|
|
7908
7981
|
diagram
|
|
7909
7982
|
};
|
|
@@ -7991,8 +8064,8 @@ const DiagramNode = (props) => {
|
|
|
7991
8064
|
}
|
|
7992
8065
|
}, [rendering, reportNodeStatus]);
|
|
7993
8066
|
if (rendering.status === "empty") return null;
|
|
7994
|
-
return /* @__PURE__ */ jsx(RichNodeFrame, { sizeClass, title: title2, caption: caption2, testId, children: /* @__PURE__ */ jsxs("div", { ref: themeProbeRef, className: styles$
|
|
7995
|
-
rendering.status === "rendered" ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
8067
|
+
return /* @__PURE__ */ jsx(RichNodeFrame, { sizeClass, title: title2, caption: caption2, testId, children: /* @__PURE__ */ jsxs("div", { ref: themeProbeRef, className: styles$i.diagramArea, children: [
|
|
8068
|
+
rendering.status === "rendered" ? /* @__PURE__ */ jsx("div", { className: styles$i.diagram, dangerouslySetInnerHTML: { __html: rendering.svgMarkup } }) : null,
|
|
7996
8069
|
rendering.status === "loading" ? /* @__PURE__ */ jsx(RichNodeContentSkeleton, { height: 240, testId: `${testId}-skeleton` }) : null,
|
|
7997
8070
|
rendering.status === "failed" ? /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", testId: `${testId}-error`, children: "This diagram could not be drawn." }) : null
|
|
7998
8071
|
] }) });
|
|
@@ -8008,7 +8081,7 @@ const inlineSkeleton$1 = "agents_inlineSkeleton_kNwonL";
|
|
|
8008
8081
|
const caption$1 = "agents_caption_chg3rA";
|
|
8009
8082
|
const failure = "agents_failure_7jkkkt";
|
|
8010
8083
|
const source = "agents_source_c6mzRv";
|
|
8011
|
-
const styles$
|
|
8084
|
+
const styles$h = {
|
|
8012
8085
|
blockFormula,
|
|
8013
8086
|
inlineFormula,
|
|
8014
8087
|
inlineSkeleton: inlineSkeleton$1,
|
|
@@ -8075,18 +8148,18 @@ const MathNode = (props) => {
|
|
|
8075
8148
|
return /* @__PURE__ */ jsx(
|
|
8076
8149
|
"span",
|
|
8077
8150
|
{
|
|
8078
|
-
className: styles$
|
|
8151
|
+
className: styles$h.inlineFormula,
|
|
8079
8152
|
"data-testid": testId,
|
|
8080
8153
|
dangerouslySetInnerHTML: { __html: rendering.html }
|
|
8081
8154
|
}
|
|
8082
8155
|
);
|
|
8083
8156
|
}
|
|
8084
8157
|
if (rendering.status === "loading") {
|
|
8085
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
8158
|
+
return /* @__PURE__ */ jsx("span", { className: styles$h.inlineSkeleton, "aria-busy": "true", "data-testid": `${testId}-skeleton`, children: /* @__PURE__ */ jsx(SkeletonLine, { width: 64, height: 14, radius: 4 }) });
|
|
8086
8159
|
}
|
|
8087
|
-
return /* @__PURE__ */ jsx(Text, { role: "body", translate: false, className: styles$
|
|
8160
|
+
return /* @__PURE__ */ jsx(Text, { role: "body", translate: false, className: styles$h.source, testId: `${testId}-error`, children: escapePlainTextForText(latex) });
|
|
8088
8161
|
}
|
|
8089
|
-
const footer2 = caption2 ? /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", translate: false, className: styles$
|
|
8162
|
+
const footer2 = caption2 ? /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", translate: false, className: styles$h.caption, children: escapePlainTextForText(caption2) }) : void 0;
|
|
8090
8163
|
return /* @__PURE__ */ jsxs(
|
|
8091
8164
|
RichNodeFrame,
|
|
8092
8165
|
{
|
|
@@ -8096,11 +8169,11 @@ const MathNode = (props) => {
|
|
|
8096
8169
|
footer: footer2,
|
|
8097
8170
|
testId,
|
|
8098
8171
|
children: [
|
|
8099
|
-
rendering.status === "rendered" ? /* @__PURE__ */ jsx("div", { className: styles$
|
|
8172
|
+
rendering.status === "rendered" ? /* @__PURE__ */ jsx("div", { className: styles$h.blockFormula, dangerouslySetInnerHTML: { __html: rendering.html } }) : null,
|
|
8100
8173
|
rendering.status === "loading" ? /* @__PURE__ */ jsx(RichNodeContentSkeleton, { height: 48, testId: `${testId}-skeleton` }) : null,
|
|
8101
|
-
rendering.status === "failed" ? /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8174
|
+
rendering.status === "failed" ? /* @__PURE__ */ jsxs("div", { className: styles$h.failure, "data-testid": `${testId}-error`, children: [
|
|
8102
8175
|
/* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: "This formula could not be rendered." }),
|
|
8103
|
-
/* @__PURE__ */ jsx(Text, { role: "help", translate: false, className: styles$
|
|
8176
|
+
/* @__PURE__ */ jsx(Text, { role: "help", translate: false, className: styles$h.source, children: escapePlainTextForText(latex) })
|
|
8104
8177
|
] }) : null
|
|
8105
8178
|
]
|
|
8106
8179
|
}
|
|
@@ -8113,7 +8186,7 @@ const __vite_glob_0_39 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
8113
8186
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
8114
8187
|
const graphic = "agents_graphic_BJrYem";
|
|
8115
8188
|
const compactGraphic = "agents_compactGraphic_FE7Y31";
|
|
8116
|
-
const styles$
|
|
8189
|
+
const styles$g = {
|
|
8117
8190
|
graphic,
|
|
8118
8191
|
compactGraphic
|
|
8119
8192
|
};
|
|
@@ -8178,7 +8251,7 @@ const SvgNode = (props) => {
|
|
|
8178
8251
|
const graphic2 = rendering.status === "rendered" ? /* @__PURE__ */ jsx(
|
|
8179
8252
|
"div",
|
|
8180
8253
|
{
|
|
8181
|
-
className: classNames(styles$
|
|
8254
|
+
className: classNames(styles$g.graphic, sizeClass === "compact" && styles$g.compactGraphic),
|
|
8182
8255
|
dangerouslySetInnerHTML: { __html: rendering.svgMarkup }
|
|
8183
8256
|
}
|
|
8184
8257
|
) : rendering.status === "loading" ? /* @__PURE__ */ jsx(RichNodeContentSkeleton, { height: sizeClass === "compact" ? 48 : 200, testId: `${testId}-skeleton` }) : /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", testId: `${testId}-error`, children: "This graphic could not be shown." });
|
|
@@ -8190,7 +8263,7 @@ const __vite_glob_0_40 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
8190
8263
|
composedViewComponent: composedViewComponent$9
|
|
8191
8264
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
8192
8265
|
const badge = "agents_badge_XcUP7Z";
|
|
8193
|
-
const styles$
|
|
8266
|
+
const styles$f = {
|
|
8194
8267
|
badge
|
|
8195
8268
|
};
|
|
8196
8269
|
const STATUS_OF_TONE = {
|
|
@@ -8208,7 +8281,7 @@ const BadgeNode = (props) => {
|
|
|
8208
8281
|
useReportTextNodeRenderState(runtime, readTextNodeRenderState(isPending, content2), "Badge");
|
|
8209
8282
|
if (isPending) return /* @__PURE__ */ jsx(SkeletonPill, { width: 72, height: 20 });
|
|
8210
8283
|
if (content2.kind !== "text") return null;
|
|
8211
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
8284
|
+
return /* @__PURE__ */ jsx("span", { className: styles$f.badge, "data-tone": tone, "data-testid": testId, children: /* @__PURE__ */ jsx(
|
|
8212
8285
|
StatusBadge,
|
|
8213
8286
|
{
|
|
8214
8287
|
status: STATUS_OF_TONE[tone],
|
|
@@ -8225,7 +8298,7 @@ const __vite_glob_0_41 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
8225
8298
|
composedViewComponent: composedViewComponent$8
|
|
8226
8299
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
8227
8300
|
const caption = "agents_caption_-l3VPi";
|
|
8228
|
-
const styles$
|
|
8301
|
+
const styles$e = {
|
|
8229
8302
|
caption
|
|
8230
8303
|
};
|
|
8231
8304
|
const CaptionNode = (props) => {
|
|
@@ -8241,7 +8314,7 @@ const CaptionNode = (props) => {
|
|
|
8241
8314
|
translate: false,
|
|
8242
8315
|
color: "--agents-fg-light",
|
|
8243
8316
|
display: sizeClass === "compact" ? "inline" : "block",
|
|
8244
|
-
className: styles$
|
|
8317
|
+
className: styles$e.caption,
|
|
8245
8318
|
testId,
|
|
8246
8319
|
children: escapePlainTextForText(content2.text)
|
|
8247
8320
|
}
|
|
@@ -8253,7 +8326,7 @@ const __vite_glob_0_42 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
8253
8326
|
composedViewComponent: composedViewComponent$7
|
|
8254
8327
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
8255
8328
|
const favicon = "agents_favicon_5MA-st";
|
|
8256
|
-
const styles$
|
|
8329
|
+
const styles$d = {
|
|
8257
8330
|
favicon
|
|
8258
8331
|
};
|
|
8259
8332
|
const SiteFavicon = (props) => {
|
|
@@ -8264,7 +8337,7 @@ const SiteFavicon = (props) => {
|
|
|
8264
8337
|
return /* @__PURE__ */ jsx(
|
|
8265
8338
|
"span",
|
|
8266
8339
|
{
|
|
8267
|
-
className: styles$
|
|
8340
|
+
className: styles$d.favicon,
|
|
8268
8341
|
role: accessibleName ? "img" : void 0,
|
|
8269
8342
|
"aria-label": accessibleName,
|
|
8270
8343
|
title: accessibleName,
|
|
@@ -8275,7 +8348,7 @@ const SiteFavicon = (props) => {
|
|
|
8275
8348
|
return /* @__PURE__ */ jsx(
|
|
8276
8349
|
"img",
|
|
8277
8350
|
{
|
|
8278
|
-
className: styles$
|
|
8351
|
+
className: styles$d.favicon,
|
|
8279
8352
|
src: buildFaviconUrl(hostname),
|
|
8280
8353
|
alt: accessibleName ?? "",
|
|
8281
8354
|
title: accessibleName,
|
|
@@ -8301,7 +8374,7 @@ const __vite_glob_0_43 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
8301
8374
|
composedViewComponent: composedViewComponent$6
|
|
8302
8375
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
8303
8376
|
const label$1 = "agents_label_g0luOD";
|
|
8304
|
-
const styles$
|
|
8377
|
+
const styles$c = {
|
|
8305
8378
|
label: label$1
|
|
8306
8379
|
};
|
|
8307
8380
|
const LabelNode = (props) => {
|
|
@@ -8317,7 +8390,7 @@ const LabelNode = (props) => {
|
|
|
8317
8390
|
weight: "medium",
|
|
8318
8391
|
translate: false,
|
|
8319
8392
|
color: "--agents-fg-light",
|
|
8320
|
-
className: styles$
|
|
8393
|
+
className: styles$c.label,
|
|
8321
8394
|
testId,
|
|
8322
8395
|
children: escapePlainTextForText(content2.text)
|
|
8323
8396
|
}
|
|
@@ -8332,7 +8405,7 @@ const link$1 = "agents_link_Vg1N4s";
|
|
|
8332
8405
|
const linkText = "agents_linkText_gM-XpZ";
|
|
8333
8406
|
const newTabIcon = "agents_newTabIcon_jQkngW";
|
|
8334
8407
|
const unlinked = "agents_unlinked_Gp2AQb";
|
|
8335
|
-
const styles$
|
|
8408
|
+
const styles$b = {
|
|
8336
8409
|
link: link$1,
|
|
8337
8410
|
linkText,
|
|
8338
8411
|
newTabIcon,
|
|
@@ -8355,11 +8428,11 @@ const LinkNode = (props) => {
|
|
|
8355
8428
|
if (isPending) return /* @__PURE__ */ jsx(SkeletonLine, { width: "8em", height: 12, radius: 4 });
|
|
8356
8429
|
if (content2.kind !== "text") return null;
|
|
8357
8430
|
if (safeUrl === null) {
|
|
8358
|
-
return /* @__PURE__ */ jsx(Text, { role: "body", translate: false, display: "inline", className: styles$
|
|
8431
|
+
return /* @__PURE__ */ jsx(Text, { role: "body", translate: false, display: "inline", className: styles$b.unlinked, testId, children: escapePlainTextForText(content2.text) });
|
|
8359
8432
|
}
|
|
8360
|
-
return /* @__PURE__ */ jsxs(AgentsLink, { className: styles$
|
|
8361
|
-
/* @__PURE__ */ jsx(Text, { role: "body", translate: false, display: "inline", className: styles$
|
|
8362
|
-
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", className: styles$
|
|
8433
|
+
return /* @__PURE__ */ jsxs(AgentsLink, { className: styles$b.link, href: safeUrl, "data-testid": testId, children: [
|
|
8434
|
+
/* @__PURE__ */ jsx(Text, { role: "body", translate: false, display: "inline", className: styles$b.linkText, children: escapePlainTextForText(content2.text) }),
|
|
8435
|
+
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", className: styles$b.newTabIcon, pixelSize: 14, name: "newTab" })
|
|
8363
8436
|
] });
|
|
8364
8437
|
};
|
|
8365
8438
|
const composedViewComponent$4 = { nodeType: "Link", component: LinkNode };
|
|
@@ -8371,7 +8444,7 @@ const markdown = "agents_markdown_Yoe4uR";
|
|
|
8371
8444
|
const heading = "agents_heading_xhKgq-";
|
|
8372
8445
|
const link = "agents_link_GJKyDD";
|
|
8373
8446
|
const skeleton = "agents_skeleton_bWB-zy";
|
|
8374
|
-
const styles$
|
|
8447
|
+
const styles$a = {
|
|
8375
8448
|
markdown,
|
|
8376
8449
|
heading,
|
|
8377
8450
|
link,
|
|
@@ -8389,7 +8462,7 @@ const renderHeading = (props) => /* @__PURE__ */ jsx(
|
|
|
8389
8462
|
weight: "bold",
|
|
8390
8463
|
translate: false,
|
|
8391
8464
|
display: "block",
|
|
8392
|
-
className: styles$
|
|
8465
|
+
className: styles$a.heading,
|
|
8393
8466
|
headingLevel: 4,
|
|
8394
8467
|
children: escapePlainTextForText(readHastText(props.node))
|
|
8395
8468
|
}
|
|
@@ -8405,7 +8478,7 @@ const SAFE_MARKDOWN_COMPONENTS = {
|
|
|
8405
8478
|
a: (props) => {
|
|
8406
8479
|
const safeUrl = readSafeHttpUrl(props.href);
|
|
8407
8480
|
if (safeUrl === null) return /* @__PURE__ */ jsx("span", { children: props.children });
|
|
8408
|
-
return /* @__PURE__ */ jsx(AgentsLink, { className: styles$
|
|
8481
|
+
return /* @__PURE__ */ jsx(AgentsLink, { className: styles$a.link, href: safeUrl, children: props.children });
|
|
8409
8482
|
}
|
|
8410
8483
|
};
|
|
8411
8484
|
const MarkdownNode = (props) => {
|
|
@@ -8413,13 +8486,13 @@ const MarkdownNode = (props) => {
|
|
|
8413
8486
|
const content2 = readTextNodeContent(nodeProps.markdown);
|
|
8414
8487
|
useReportTextNodeRenderState(runtime, readTextNodeRenderState(isPending, content2), "Markdown");
|
|
8415
8488
|
if (isPending) {
|
|
8416
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8489
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$a.skeleton, "data-testid": `${testId}-skeleton`, children: [
|
|
8417
8490
|
/* @__PURE__ */ jsx(SkeletonLine, { width: "90%", height: 14, radius: 4 }),
|
|
8418
8491
|
/* @__PURE__ */ jsx(SkeletonLine, { width: "70%", height: 14, radius: 4 })
|
|
8419
8492
|
] });
|
|
8420
8493
|
}
|
|
8421
8494
|
if (content2.kind !== "text") return null;
|
|
8422
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
8495
|
+
return /* @__PURE__ */ jsx("div", { className: styles$a.markdown, "data-testid": testId, children: /* @__PURE__ */ jsx(Markdown, { markdown: content2.text, translate: false, components: SAFE_MARKDOWN_COMPONENTS }) });
|
|
8423
8496
|
};
|
|
8424
8497
|
const composedViewComponent$3 = { nodeType: "Markdown", component: MarkdownNode };
|
|
8425
8498
|
const __vite_glob_0_46 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -8480,7 +8553,7 @@ const attribution = "agents_attribution_dmCMO-";
|
|
|
8480
8553
|
const attributionText = "agents_attributionText_qhOi-d";
|
|
8481
8554
|
const licenseLink = "agents_licenseLink_9iXrZ4";
|
|
8482
8555
|
const expandedList = "agents_expandedList_yrs3db";
|
|
8483
|
-
const styles$
|
|
8556
|
+
const styles$9 = {
|
|
8484
8557
|
sourceRef,
|
|
8485
8558
|
sourceList,
|
|
8486
8559
|
sourceLine,
|
|
@@ -8501,14 +8574,14 @@ const SourceChip = (props) => {
|
|
|
8501
8574
|
const { entry: entry2, isEmailRender, testId } = props;
|
|
8502
8575
|
const chipContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8503
8576
|
/* @__PURE__ */ jsx(SiteFavicon, { hostname: entry2.hostname, siteName: entry2.name, isEmailRender }),
|
|
8504
|
-
/* @__PURE__ */ jsx(Text, { role: "caption", weight: "medium", translate: false, className: styles$
|
|
8577
|
+
/* @__PURE__ */ jsx(Text, { role: "caption", weight: "medium", translate: false, className: styles$9.chipName, children: escapePlainTextForText(entry2.name) })
|
|
8505
8578
|
] });
|
|
8506
8579
|
if (entry2.url === null)
|
|
8507
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
8580
|
+
return /* @__PURE__ */ jsx("span", { className: styles$9.chip, "data-testid": testId, children: chipContent });
|
|
8508
8581
|
return /* @__PURE__ */ jsx(
|
|
8509
8582
|
AgentsLink,
|
|
8510
8583
|
{
|
|
8511
|
-
className: classNames(styles$
|
|
8584
|
+
className: classNames(styles$9.chip, styles$9.linkedChip),
|
|
8512
8585
|
href: entry2.url,
|
|
8513
8586
|
title: entry2.title ?? entry2.name,
|
|
8514
8587
|
"data-testid": testId,
|
|
@@ -8523,7 +8596,7 @@ const SourceAttribution = (props) => {
|
|
|
8523
8596
|
if (entry2.author !== null) parts.push({ text: entry2.author, url: null });
|
|
8524
8597
|
if (entry2.license !== null) parts.push({ text: entry2.license, url: entry2.licenseUrl });
|
|
8525
8598
|
parts.push({ text: entry2.name, url: null });
|
|
8526
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
8599
|
+
return /* @__PURE__ */ jsx("span", { className: styles$9.attribution, children: parts.map((part, partIndex) => {
|
|
8527
8600
|
const partText = /* @__PURE__ */ jsx(
|
|
8528
8601
|
Text,
|
|
8529
8602
|
{
|
|
@@ -8531,7 +8604,7 @@ const SourceAttribution = (props) => {
|
|
|
8531
8604
|
translate: false,
|
|
8532
8605
|
display: "inline",
|
|
8533
8606
|
color: "--agents-fg-light",
|
|
8534
|
-
className: styles$
|
|
8607
|
+
className: styles$9.attributionText,
|
|
8535
8608
|
children: escapePlainTextForText(part.text)
|
|
8536
8609
|
}
|
|
8537
8610
|
);
|
|
@@ -8543,30 +8616,30 @@ const SourceAttribution = (props) => {
|
|
|
8543
8616
|
translate: false,
|
|
8544
8617
|
display: "inline",
|
|
8545
8618
|
color: "--agents-fg-light",
|
|
8546
|
-
className: styles$
|
|
8619
|
+
className: styles$9.attributionText,
|
|
8547
8620
|
children: "·"
|
|
8548
8621
|
}
|
|
8549
8622
|
) : null,
|
|
8550
|
-
part.url === null ? partText : /* @__PURE__ */ jsx(AgentsLink, { className: styles$
|
|
8623
|
+
part.url === null ? partText : /* @__PURE__ */ jsx(AgentsLink, { className: styles$9.licenseLink, href: part.url, children: partText })
|
|
8551
8624
|
] }, partIndex);
|
|
8552
8625
|
}) });
|
|
8553
8626
|
};
|
|
8554
8627
|
const SourceList = (props) => {
|
|
8555
8628
|
const { entries, isEmailRender, testId } = props;
|
|
8556
8629
|
const attributedEntries = entries.filter(hasAttribution);
|
|
8557
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
8558
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
8630
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$9.sourceList, children: [
|
|
8631
|
+
/* @__PURE__ */ jsxs("span", { className: styles$9.sourceLine, children: [
|
|
8559
8632
|
/* @__PURE__ */ jsx(
|
|
8560
8633
|
Text,
|
|
8561
8634
|
{
|
|
8562
8635
|
role: "caption",
|
|
8563
8636
|
color: "--agents-fg-light",
|
|
8564
|
-
className: styles$
|
|
8637
|
+
className: styles$9.sourceLabel,
|
|
8565
8638
|
context: entries.length === 1 ? "one" : "other",
|
|
8566
8639
|
children: "Source"
|
|
8567
8640
|
}
|
|
8568
8641
|
),
|
|
8569
|
-
/* @__PURE__ */ jsx("span", { role: "list", className: styles$
|
|
8642
|
+
/* @__PURE__ */ jsx("span", { role: "list", className: styles$9.chips, children: entries.map((entry2, entryIndex) => /* @__PURE__ */ jsx("span", { role: "listitem", className: styles$9.chipItem, children: /* @__PURE__ */ jsx(SourceChip, { entry: entry2, isEmailRender, testId: `${testId}-chip-${entryIndex}` }) }, `${entryIndex}-${entry2.name}`)) })
|
|
8570
8643
|
] }),
|
|
8571
8644
|
attributedEntries.map((entry2, entryIndex) => /* @__PURE__ */ jsx(SourceAttribution, { entry: entry2 }, `${entryIndex}-${entry2.name}`))
|
|
8572
8645
|
] });
|
|
@@ -8591,19 +8664,19 @@ const SourceRefNode = (props) => {
|
|
|
8591
8664
|
if (isPending) return /* @__PURE__ */ jsx(SkeletonPill, { width: 120, height: 24 });
|
|
8592
8665
|
if (entries.length === 0) return null;
|
|
8593
8666
|
if (sizeClass !== "compact") {
|
|
8594
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
8667
|
+
return /* @__PURE__ */ jsx("span", { className: styles$9.sourceRef, "data-testid": testId, children: /* @__PURE__ */ jsx(SourceList, { entries, isEmailRender, testId }) });
|
|
8595
8668
|
}
|
|
8596
8669
|
const [firstEntry] = entries;
|
|
8597
8670
|
const otherSourcesCount = entries.length - 1;
|
|
8598
8671
|
if (otherSourcesCount === 0 && !hasAttribution(firstEntry)) {
|
|
8599
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
8672
|
+
return /* @__PURE__ */ jsx("span", { className: styles$9.sourceRef, "data-testid": testId, children: /* @__PURE__ */ jsx(SourceChip, { entry: firstEntry, isEmailRender, testId: `${testId}-chip-0` }) });
|
|
8600
8673
|
}
|
|
8601
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
8674
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$9.sourceRef, "data-testid": testId, children: [
|
|
8602
8675
|
/* @__PURE__ */ jsxs(
|
|
8603
8676
|
"button",
|
|
8604
8677
|
{
|
|
8605
8678
|
type: "button",
|
|
8606
|
-
className: classNames(styles$
|
|
8679
|
+
className: classNames(styles$9.chip, styles$9.toggleChip),
|
|
8607
8680
|
"aria-expanded": isExpanded,
|
|
8608
8681
|
"aria-controls": expandedListId,
|
|
8609
8682
|
disabled: isEmailRender,
|
|
@@ -8617,16 +8690,16 @@ const SourceRefNode = (props) => {
|
|
|
8617
8690
|
role: "caption",
|
|
8618
8691
|
weight: "medium",
|
|
8619
8692
|
translate: false,
|
|
8620
|
-
className: styles$
|
|
8693
|
+
className: styles$9.chipName,
|
|
8621
8694
|
children: escapePlainTextForText(firstEntry.name)
|
|
8622
8695
|
}
|
|
8623
8696
|
),
|
|
8624
|
-
otherSourcesCount > 0 ? /* @__PURE__ */ jsx(Text, { role: "caption", translate: false, color: "--agents-fg-light", className: styles$
|
|
8697
|
+
otherSourcesCount > 0 ? /* @__PURE__ */ jsx(Text, { role: "caption", translate: false, color: "--agents-fg-light", className: styles$9.moreCount, children: `+${otherSourcesCount}` }) : null,
|
|
8625
8698
|
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", pixelSize: 12, name: isExpanded ? "caretUp" : "caretDown" })
|
|
8626
8699
|
]
|
|
8627
8700
|
}
|
|
8628
8701
|
),
|
|
8629
|
-
isExpanded ? /* @__PURE__ */ jsx("span", { id: expandedListId, className: styles$
|
|
8702
|
+
isExpanded ? /* @__PURE__ */ jsx("span", { id: expandedListId, className: styles$9.expandedList, "data-testid": `${testId}-expanded`, children: /* @__PURE__ */ jsx(SourceList, { entries, isEmailRender, testId: `${testId}-expanded` }) }) : null
|
|
8630
8703
|
] });
|
|
8631
8704
|
};
|
|
8632
8705
|
const composedViewComponent$2 = {
|
|
@@ -8660,7 +8733,7 @@ const success = "agents_success_9Ru8-B";
|
|
|
8660
8733
|
const warning = "agents_warning_XEGEwv";
|
|
8661
8734
|
const danger = "agents_danger_KcUeUC";
|
|
8662
8735
|
const info = "agents_info_jMiFeN";
|
|
8663
|
-
const styles$
|
|
8736
|
+
const styles$8 = {
|
|
8664
8737
|
text,
|
|
8665
8738
|
paragraph,
|
|
8666
8739
|
inline,
|
|
@@ -8732,21 +8805,21 @@ const TextNode = (props) => {
|
|
|
8732
8805
|
else if (content2.kind === "missing" && childNodes.length === 0) renderState = "empty";
|
|
8733
8806
|
useReportTextNodeRenderState(runtime, renderState, "Text");
|
|
8734
8807
|
if (isPending) {
|
|
8735
|
-
return isInline ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
8808
|
+
return isInline ? /* @__PURE__ */ jsx("span", { className: styles$8.inlineSkeleton, children: /* @__PURE__ */ jsx(SkeletonLine, { width: "6em", height: 12, radius: 4 }) }) : /* @__PURE__ */ jsx(SkeletonLine, { width: "80%", height: 14, radius: 4 });
|
|
8736
8809
|
}
|
|
8737
8810
|
if (renderState !== "shown") return null;
|
|
8738
8811
|
const Wrapper = isInline ? "span" : "div";
|
|
8739
8812
|
return /* @__PURE__ */ jsxs(
|
|
8740
8813
|
Wrapper,
|
|
8741
8814
|
{
|
|
8742
|
-
className: classNames(styles$
|
|
8815
|
+
className: classNames(styles$8.text, isInline ? styles$8.inline : styles$8.paragraph, styles$8[tone]),
|
|
8743
8816
|
"data-testid": testId,
|
|
8744
8817
|
children: [
|
|
8745
8818
|
content2.kind === "text" ? /* @__PURE__ */ jsx(
|
|
8746
8819
|
"span",
|
|
8747
8820
|
{
|
|
8748
8821
|
ref: clampedRunRef,
|
|
8749
|
-
className: isClamped ? classNames(styles$
|
|
8822
|
+
className: isClamped ? classNames(styles$8.clamped, styles$8[`clampedAt${maxLines}Lines`]) : void 0,
|
|
8750
8823
|
title: isClamped ? content2.text : void 0,
|
|
8751
8824
|
children: /* @__PURE__ */ jsx(
|
|
8752
8825
|
Text,
|
|
@@ -8761,12 +8834,12 @@ const TextNode = (props) => {
|
|
|
8761
8834
|
)
|
|
8762
8835
|
}
|
|
8763
8836
|
) : null,
|
|
8764
|
-
childNodes.map((childNode, childIndex) => /* @__PURE__ */ jsx("span", { className: styles$
|
|
8837
|
+
childNodes.map((childNode, childIndex) => /* @__PURE__ */ jsx("span", { className: styles$8.inlineChild, children: childNode }, childIndex)),
|
|
8765
8838
|
isShowingClampToggle ? /* @__PURE__ */ jsx(
|
|
8766
8839
|
"button",
|
|
8767
8840
|
{
|
|
8768
8841
|
type: "button",
|
|
8769
|
-
className: styles$
|
|
8842
|
+
className: styles$8.clampToggle,
|
|
8770
8843
|
"data-testid": `${testId}-toggle`,
|
|
8771
8844
|
"aria-expanded": isExpanded,
|
|
8772
8845
|
onClick: () => setIsExpanded((wasExpanded) => !wasExpanded),
|
|
@@ -8783,7 +8856,7 @@ const __vite_glob_0_48 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
8783
8856
|
composedViewComponent: composedViewComponent$1
|
|
8784
8857
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
8785
8858
|
const title = "agents_title_Eod7EC";
|
|
8786
|
-
const styles$
|
|
8859
|
+
const styles$7 = {
|
|
8787
8860
|
title
|
|
8788
8861
|
};
|
|
8789
8862
|
const TITLE_LEVELS = ["widget", "section"];
|
|
@@ -8800,7 +8873,7 @@ const TitleNode = (props) => {
|
|
|
8800
8873
|
role: level === "widget" ? "intro" : "body",
|
|
8801
8874
|
weight: "bold",
|
|
8802
8875
|
translate: false,
|
|
8803
|
-
className: styles$
|
|
8876
|
+
className: styles$7.title,
|
|
8804
8877
|
testId,
|
|
8805
8878
|
headingLevel: level === "widget" ? 3 : 4,
|
|
8806
8879
|
children: escapePlainTextForText(content2.text)
|
|
@@ -8826,7 +8899,7 @@ const componentModules = /* @__PURE__ */ Object.assign({
|
|
|
8826
8899
|
"./components/entity/EntityLink.composed.tsx": __vite_glob_0_10$1,
|
|
8827
8900
|
"./components/form/Form.composed.tsx": __vite_glob_0_11$1,
|
|
8828
8901
|
"./components/inputs/Button.composed.tsx": __vite_glob_0_12$1,
|
|
8829
|
-
"./components/inputs/Checkbox.composed.tsx": __vite_glob_0_13,
|
|
8902
|
+
"./components/inputs/Checkbox.composed.tsx": __vite_glob_0_13$1,
|
|
8830
8903
|
"./components/inputs/DatePicker.composed.tsx": __vite_glob_0_14,
|
|
8831
8904
|
"./components/inputs/Input.composed.tsx": __vite_glob_0_15,
|
|
8832
8905
|
"./components/inputs/RadioGroup.composed.tsx": __vite_glob_0_16,
|
|
@@ -8984,7 +9057,7 @@ const readComposedViewDataTimes = (tree) => {
|
|
|
8984
9057
|
};
|
|
8985
9058
|
};
|
|
8986
9059
|
const dataTimes = "agents_dataTimes_fVIkya";
|
|
8987
|
-
const styles$
|
|
9060
|
+
const styles$6 = {
|
|
8988
9061
|
dataTimes
|
|
8989
9062
|
};
|
|
8990
9063
|
const FALLBACK_DATE_LOCALE = "en-GB";
|
|
@@ -9020,11 +9093,11 @@ const ComposedViewEmailDataTimes = (props) => {
|
|
|
9020
9093
|
);
|
|
9021
9094
|
}
|
|
9022
9095
|
if (phrases.length === 0) return null;
|
|
9023
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
9096
|
+
return /* @__PURE__ */ jsx("div", { className: styles$6.dataTimes, "data-testid": "composed-view-email-data-times", children: /* @__PURE__ */ jsx(Text, { role: "caption", color: "var(--agents-fg-light)", translate: false, children: phrases.join(" · ") }) });
|
|
9024
9097
|
};
|
|
9025
|
-
const root$
|
|
9026
|
-
const styles$
|
|
9027
|
-
root: root$
|
|
9098
|
+
const root$2 = "agents_root_mkymge";
|
|
9099
|
+
const styles$5 = {
|
|
9100
|
+
root: root$2
|
|
9028
9101
|
};
|
|
9029
9102
|
const nodeReportsReducer = (nodeReports, action) => {
|
|
9030
9103
|
const current = nodeReports[action.nodePath];
|
|
@@ -9420,7 +9493,7 @@ const ComposedViewRenderer = (props) => {
|
|
|
9420
9493
|
liftedWidget.path
|
|
9421
9494
|
));
|
|
9422
9495
|
if (tree.view === null) {
|
|
9423
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
9496
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$5.root, children: [
|
|
9424
9497
|
sourceLoaders,
|
|
9425
9498
|
liftedWidgetViews.length > 0 ? liftedWidgetViews : /* @__PURE__ */ jsx(ComposedViewNothingToShow, {})
|
|
9426
9499
|
] });
|
|
@@ -9433,7 +9506,7 @@ const ComposedViewRenderer = (props) => {
|
|
|
9433
9506
|
datasetStatuses: resolvedDatasets.statusByDatasetName,
|
|
9434
9507
|
sources: sourceValues
|
|
9435
9508
|
};
|
|
9436
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
9509
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$5.root, "data-testid": testId, children: [
|
|
9437
9510
|
sourceLoaders,
|
|
9438
9511
|
tree.title ? /* @__PURE__ */ jsx(ModelText, { role: "intro", weight: "bold", children: tree.title }) : null,
|
|
9439
9512
|
lostAllItsContent ? /* @__PURE__ */ jsx(ComposedViewNothingToShow, {}) : /* @__PURE__ */ jsx(ComposedViewSlotErrorBoundary, { nodePath: "view", nodeType: tree.view.type, onRenderFailed, children: /* @__PURE__ */ jsx(
|
|
@@ -9494,16 +9567,16 @@ const ComposedViewConversationWidget = (props) => {
|
|
|
9494
9567
|
}
|
|
9495
9568
|
);
|
|
9496
9569
|
};
|
|
9497
|
-
const conversationWidgetRegistration$
|
|
9570
|
+
const conversationWidgetRegistration$d = {
|
|
9498
9571
|
name: "ComposedView",
|
|
9499
9572
|
component: ComposedViewConversationWidget,
|
|
9500
9573
|
opensCanvases: ["entityDetail", "mapFullScreen"]
|
|
9501
9574
|
};
|
|
9502
9575
|
const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9503
9576
|
__proto__: null,
|
|
9504
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9577
|
+
conversationWidgetRegistration: conversationWidgetRegistration$d
|
|
9505
9578
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9506
|
-
const conversationWidgetRegistration$
|
|
9579
|
+
const conversationWidgetRegistration$c = {
|
|
9507
9580
|
name: "AttachedFiles",
|
|
9508
9581
|
component: AttachedFilesConversationWidget,
|
|
9509
9582
|
sentInCustomerMessage: true,
|
|
@@ -9511,23 +9584,23 @@ const conversationWidgetRegistration$b = {
|
|
|
9511
9584
|
};
|
|
9512
9585
|
const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9513
9586
|
__proto__: null,
|
|
9514
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9587
|
+
conversationWidgetRegistration: conversationWidgetRegistration$c
|
|
9515
9588
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9516
|
-
const conversationWidgetRegistration$
|
|
9589
|
+
const conversationWidgetRegistration$b = {
|
|
9517
9590
|
name: "Clock",
|
|
9518
9591
|
component: ClockConversationWidget
|
|
9519
9592
|
};
|
|
9520
9593
|
const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9521
9594
|
__proto__: null,
|
|
9522
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9595
|
+
conversationWidgetRegistration: conversationWidgetRegistration$b
|
|
9523
9596
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9524
|
-
const conversationWidgetRegistration$
|
|
9597
|
+
const conversationWidgetRegistration$a = {
|
|
9525
9598
|
name: "ConceptExplainer",
|
|
9526
9599
|
component: ConceptExplainerConversationWidget
|
|
9527
9600
|
};
|
|
9528
9601
|
const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9529
9602
|
__proto__: null,
|
|
9530
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9603
|
+
conversationWidgetRegistration: conversationWidgetRegistration$a
|
|
9531
9604
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9532
9605
|
const CONTINUE_IN_PERSONAL_SPACE_WIDGET_TYPE = "ContinueInPersonalSpace";
|
|
9533
9606
|
const parseContinueInPersonalSpacePayload = (payload) => {
|
|
@@ -9545,12 +9618,12 @@ const parseContinueInPersonalSpacePayload = (payload) => {
|
|
|
9545
9618
|
return { request, reason: typeof fields2.reason === "string" ? fields2.reason : null };
|
|
9546
9619
|
};
|
|
9547
9620
|
const row$1 = "agents_row_3OqxgT";
|
|
9548
|
-
const notice$
|
|
9549
|
-
const styles$
|
|
9621
|
+
const notice$2 = "agents_notice_kKGwWh";
|
|
9622
|
+
const styles$4 = {
|
|
9550
9623
|
row: row$1,
|
|
9551
|
-
notice: notice$
|
|
9624
|
+
notice: notice$2
|
|
9552
9625
|
};
|
|
9553
|
-
const TEST_ID$
|
|
9626
|
+
const TEST_ID$3 = "continue-in-personal-space-widget";
|
|
9554
9627
|
const ContinueInPersonalSpaceConversationWidget = (props) => {
|
|
9555
9628
|
const { payload, interactive } = props;
|
|
9556
9629
|
const parsedPayload = useMemo(() => parseContinueInPersonalSpacePayload(payload), [payload]);
|
|
@@ -9566,10 +9639,10 @@ const ContinueInPersonalSpaceConversationWidget = (props) => {
|
|
|
9566
9639
|
if (isStarted) return;
|
|
9567
9640
|
if (startConversationInPersonalSpace(parsedPayload.request)) setIsStarted(true);
|
|
9568
9641
|
};
|
|
9569
|
-
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID$
|
|
9570
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
9642
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID$3, compact: true, children: /* @__PURE__ */ jsxs("div", { className: styles$4.row, children: [
|
|
9643
|
+
/* @__PURE__ */ jsxs("span", { className: styles$4.notice, children: [
|
|
9571
9644
|
/* @__PURE__ */ jsx(Icon, { name: "lock", size: "small" }),
|
|
9572
|
-
/* @__PURE__ */ jsx(Text, { testId: `${TEST_ID$
|
|
9645
|
+
/* @__PURE__ */ jsx(Text, { testId: `${TEST_ID$3}-notice`, children: "Only you may use this connection, and others read this conversation." })
|
|
9573
9646
|
] }),
|
|
9574
9647
|
/* @__PURE__ */ jsx(
|
|
9575
9648
|
Button,
|
|
@@ -9579,51 +9652,51 @@ const ContinueInPersonalSpaceConversationWidget = (props) => {
|
|
|
9579
9652
|
iconPosition: "right",
|
|
9580
9653
|
onClick: continueInPersonalSpace,
|
|
9581
9654
|
disabled: interactive === false || isStarted,
|
|
9582
|
-
testId: `${TEST_ID$
|
|
9655
|
+
testId: `${TEST_ID$3}-button`,
|
|
9583
9656
|
children: "Continue in your personal space"
|
|
9584
9657
|
}
|
|
9585
9658
|
)
|
|
9586
9659
|
] }) });
|
|
9587
9660
|
};
|
|
9588
|
-
const conversationWidgetRegistration$
|
|
9661
|
+
const conversationWidgetRegistration$9 = {
|
|
9589
9662
|
name: CONTINUE_IN_PERSONAL_SPACE_WIDGET_TYPE,
|
|
9590
9663
|
component: ContinueInPersonalSpaceConversationWidget
|
|
9591
9664
|
};
|
|
9592
9665
|
const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9593
9666
|
__proto__: null,
|
|
9594
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9667
|
+
conversationWidgetRegistration: conversationWidgetRegistration$9
|
|
9595
9668
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9596
|
-
const conversationWidgetRegistration$
|
|
9669
|
+
const conversationWidgetRegistration$8 = {
|
|
9597
9670
|
name: "CurrencyConverter",
|
|
9598
9671
|
component: CurrencyConverterConversationWidget
|
|
9599
9672
|
};
|
|
9600
9673
|
const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9601
9674
|
__proto__: null,
|
|
9602
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9675
|
+
conversationWidgetRegistration: conversationWidgetRegistration$8
|
|
9603
9676
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9604
|
-
const conversationWidgetRegistration$
|
|
9677
|
+
const conversationWidgetRegistration$7 = {
|
|
9605
9678
|
name: "CustomVisualization",
|
|
9606
9679
|
component: CustomVisualizationConversationWidget
|
|
9607
9680
|
};
|
|
9608
9681
|
const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9609
9682
|
__proto__: null,
|
|
9610
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9683
|
+
conversationWidgetRegistration: conversationWidgetRegistration$7
|
|
9611
9684
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9612
9685
|
registerDriveFilesHydrator();
|
|
9613
|
-
const conversationWidgetRegistration$
|
|
9686
|
+
const conversationWidgetRegistration$6 = {
|
|
9614
9687
|
name: "DriveFiles",
|
|
9615
9688
|
component: DriveFilesConversationWidget
|
|
9616
9689
|
};
|
|
9617
9690
|
const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9618
9691
|
__proto__: null,
|
|
9619
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9692
|
+
conversationWidgetRegistration: conversationWidgetRegistration$6
|
|
9620
9693
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9621
9694
|
const chip = "agents_chip_hRM85s";
|
|
9622
9695
|
const icon = "agents_icon_6v6GEg";
|
|
9623
9696
|
const prefix = "agents_prefix_j2j33h";
|
|
9624
9697
|
const label = "agents_label_wmbPMU";
|
|
9625
9698
|
const remove = "agents_remove_SMhLO7";
|
|
9626
|
-
const styles$
|
|
9699
|
+
const styles$3 = {
|
|
9627
9700
|
chip,
|
|
9628
9701
|
icon,
|
|
9629
9702
|
prefix,
|
|
@@ -9632,16 +9705,16 @@ const styles$2 = {
|
|
|
9632
9705
|
};
|
|
9633
9706
|
const EntityMentionChip = (props) => {
|
|
9634
9707
|
const { mention, onRemove, testId = "entity-mention-chip" } = props;
|
|
9635
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
9636
|
-
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", className: styles$
|
|
9708
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$3.chip, "data-testid": testId, children: [
|
|
9709
|
+
/* @__PURE__ */ jsx(Icon, { color: "var(--agents-fg-light)", className: styles$3.icon, pixelSize: 14, name: "details" }),
|
|
9637
9710
|
mention.label !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9638
|
-
/* @__PURE__ */ jsx(Text, { className: styles$
|
|
9639
|
-
/* @__PURE__ */ jsx(ModelText, { className: styles$
|
|
9640
|
-
] }) : /* @__PURE__ */ jsx(Text, { className: styles$
|
|
9711
|
+
/* @__PURE__ */ jsx(Text, { className: styles$3.prefix, role: "help", color: "var(--agents-fg-light)", textWrap: "nowrap", children: "About:" }),
|
|
9712
|
+
/* @__PURE__ */ jsx(ModelText, { className: styles$3.label, role: "help", textWrap: "nowrap", children: mention.label })
|
|
9713
|
+
] }) : /* @__PURE__ */ jsx(Text, { className: styles$3.label, role: "help", textWrap: "nowrap", children: "About this entry" }),
|
|
9641
9714
|
onRemove && /* @__PURE__ */ jsx(
|
|
9642
9715
|
Button,
|
|
9643
9716
|
{
|
|
9644
|
-
className: styles$
|
|
9717
|
+
className: styles$3.remove,
|
|
9645
9718
|
variant: "muted",
|
|
9646
9719
|
size: "small",
|
|
9647
9720
|
icon: "close",
|
|
@@ -9658,14 +9731,14 @@ const EntityMentionComposerWidget = (props) => {
|
|
|
9658
9731
|
if (mention === null) return null;
|
|
9659
9732
|
return /* @__PURE__ */ jsx(EntityMentionChip, { mention, onRemove: remove2, testId: `${testId}-chip` });
|
|
9660
9733
|
};
|
|
9661
|
-
const conversationWidgetRegistration$
|
|
9734
|
+
const conversationWidgetRegistration$5 = {
|
|
9662
9735
|
name: "EntityMention",
|
|
9663
9736
|
component: EntityMentionConversationWidget,
|
|
9664
9737
|
composerComponent: EntityMentionComposerWidget
|
|
9665
9738
|
};
|
|
9666
9739
|
const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9667
9740
|
__proto__: null,
|
|
9668
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9741
|
+
conversationWidgetRegistration: conversationWidgetRegistration$5
|
|
9669
9742
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9670
9743
|
const EXTEND_CONNECTION_PERMISSION_WIDGET_TYPE = "ExtendConnectionPermission";
|
|
9671
9744
|
const parseExtendConnectionPermissionPayload = (payload) => {
|
|
@@ -9688,12 +9761,12 @@ const parseExtendConnectionPermissionPayload = (payload) => {
|
|
|
9688
9761
|
};
|
|
9689
9762
|
};
|
|
9690
9763
|
const row = "agents_row_SsalOD";
|
|
9691
|
-
const notice = "agents_notice_C-mk81";
|
|
9692
|
-
const styles$
|
|
9764
|
+
const notice$1 = "agents_notice_C-mk81";
|
|
9765
|
+
const styles$2 = {
|
|
9693
9766
|
row,
|
|
9694
|
-
notice
|
|
9767
|
+
notice: notice$1
|
|
9695
9768
|
};
|
|
9696
|
-
const TEST_ID$
|
|
9769
|
+
const TEST_ID$2 = "extend-connection-permission-widget";
|
|
9697
9770
|
const ExtendConnectionPermissionConversationWidget = (props) => {
|
|
9698
9771
|
const { payload, interactive } = props;
|
|
9699
9772
|
const parsedPayload = useMemo(() => parseExtendConnectionPermissionPayload(payload), [payload]);
|
|
@@ -9704,10 +9777,10 @@ const ExtendConnectionPermissionConversationWidget = (props) => {
|
|
|
9704
9777
|
parsedPayload === null ? "the block names no connection, capability and level" : void 0
|
|
9705
9778
|
);
|
|
9706
9779
|
if (parsedPayload === null || !canOpen) return null;
|
|
9707
|
-
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID$
|
|
9708
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
9780
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID$2, compact: true, children: /* @__PURE__ */ jsxs("div", { className: styles$2.row, children: [
|
|
9781
|
+
/* @__PURE__ */ jsxs("span", { className: styles$2.notice, children: [
|
|
9709
9782
|
/* @__PURE__ */ jsx(Icon, { name: "lockOpen", size: "small" }),
|
|
9710
|
-
/* @__PURE__ */ jsx(Text, { testId: `${TEST_ID$
|
|
9783
|
+
/* @__PURE__ */ jsx(Text, { testId: `${TEST_ID$2}-notice`, children: "This step needs a permission the connection does not have yet." })
|
|
9711
9784
|
] }),
|
|
9712
9785
|
/* @__PURE__ */ jsx(
|
|
9713
9786
|
Button,
|
|
@@ -9717,28 +9790,28 @@ const ExtendConnectionPermissionConversationWidget = (props) => {
|
|
|
9717
9790
|
icon: "settings",
|
|
9718
9791
|
onClick: () => openConnectionPermissions(parsedPayload.target),
|
|
9719
9792
|
disabled: interactive === false,
|
|
9720
|
-
testId: `${TEST_ID$
|
|
9793
|
+
testId: `${TEST_ID$2}-button`,
|
|
9721
9794
|
children: "Extend the permission"
|
|
9722
9795
|
}
|
|
9723
9796
|
)
|
|
9724
9797
|
] }) });
|
|
9725
9798
|
};
|
|
9726
|
-
const conversationWidgetRegistration$
|
|
9799
|
+
const conversationWidgetRegistration$4 = {
|
|
9727
9800
|
name: EXTEND_CONNECTION_PERMISSION_WIDGET_TYPE,
|
|
9728
9801
|
component: ExtendConnectionPermissionConversationWidget
|
|
9729
9802
|
};
|
|
9730
9803
|
const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9731
9804
|
__proto__: null,
|
|
9732
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9805
|
+
conversationWidgetRegistration: conversationWidgetRegistration$4
|
|
9733
9806
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9734
|
-
const conversationWidgetRegistration$
|
|
9807
|
+
const conversationWidgetRegistration$3 = {
|
|
9735
9808
|
name: "ImageGallery",
|
|
9736
9809
|
component: ImageGalleryConversationWidget,
|
|
9737
9810
|
opensCanvases: [IMAGE_GALLERY_CANVAS_ID]
|
|
9738
9811
|
};
|
|
9739
9812
|
const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9740
9813
|
__proto__: null,
|
|
9741
|
-
conversationWidgetRegistration: conversationWidgetRegistration$
|
|
9814
|
+
conversationWidgetRegistration: conversationWidgetRegistration$3
|
|
9742
9815
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9743
9816
|
const MAIL_DRAFT_PREVIEW_WIDGET_TYPE = "MailDraftPreview";
|
|
9744
9817
|
const readText = (value2) => typeof value2 === "string" ? value2 : "";
|
|
@@ -9786,8 +9859,8 @@ const isSentMailDraftPreviewOf = (messageText, contentHash) => {
|
|
|
9786
9859
|
}
|
|
9787
9860
|
return false;
|
|
9788
9861
|
};
|
|
9789
|
-
const root = "agents_root_KKERY6";
|
|
9790
|
-
const header = "agents_header_EV1xj0";
|
|
9862
|
+
const root$1 = "agents_root_KKERY6";
|
|
9863
|
+
const header$1 = "agents_header_EV1xj0";
|
|
9791
9864
|
const fields = "agents_fields_qoX-e2";
|
|
9792
9865
|
const field = "agents_field_6CVNp-";
|
|
9793
9866
|
const fieldValue = "agents_fieldValue_06PTqf";
|
|
@@ -9796,10 +9869,10 @@ const bodySection = "agents_bodySection_A4vdWK";
|
|
|
9796
9869
|
const body = "agents_body_kktg8k";
|
|
9797
9870
|
const bodyFolded = "agents_bodyFolded_2qvJSw";
|
|
9798
9871
|
const foldToggle = "agents_foldToggle_oeM0KI";
|
|
9799
|
-
const actions = "agents_actions_FU-EZk";
|
|
9800
|
-
const styles = {
|
|
9801
|
-
root,
|
|
9802
|
-
header,
|
|
9872
|
+
const actions$1 = "agents_actions_FU-EZk";
|
|
9873
|
+
const styles$1 = {
|
|
9874
|
+
root: root$1,
|
|
9875
|
+
header: header$1,
|
|
9803
9876
|
fields,
|
|
9804
9877
|
field,
|
|
9805
9878
|
fieldValue,
|
|
@@ -9808,9 +9881,9 @@ const styles = {
|
|
|
9808
9881
|
body,
|
|
9809
9882
|
bodyFolded,
|
|
9810
9883
|
foldToggle,
|
|
9811
|
-
actions
|
|
9884
|
+
actions: actions$1
|
|
9812
9885
|
};
|
|
9813
|
-
const TEST_ID = "mail-draft-preview-widget";
|
|
9886
|
+
const TEST_ID$1 = "mail-draft-preview-widget";
|
|
9814
9887
|
const ImageAsAltText = (props) => /* @__PURE__ */ jsx("span", { children: typeof props.alt === "string" ? props.alt : "" });
|
|
9815
9888
|
const MAIL_BODY_MARKDOWN_COMPONENTS = { img: ImageAsAltText };
|
|
9816
9889
|
const BODY_FOLD_HEIGHT_PX = 240;
|
|
@@ -9871,8 +9944,8 @@ const MailDraftPreviewConversationWidget = (props) => {
|
|
|
9871
9944
|
isSendingRef.current = true;
|
|
9872
9945
|
setIsSending(true);
|
|
9873
9946
|
try {
|
|
9874
|
-
const
|
|
9875
|
-
if (
|
|
9947
|
+
const result2 = await sendMessageToChat(texts.translate("Send"));
|
|
9948
|
+
if (result2 !== false) setIsSendAccepted(true);
|
|
9876
9949
|
} catch {
|
|
9877
9950
|
setIsSendAccepted(false);
|
|
9878
9951
|
} finally {
|
|
@@ -9880,29 +9953,29 @@ const MailDraftPreviewConversationWidget = (props) => {
|
|
|
9880
9953
|
setIsSending(false);
|
|
9881
9954
|
}
|
|
9882
9955
|
};
|
|
9883
|
-
const renderField = (label2, value2, testId) => /* @__PURE__ */ jsxs("div", { className: styles.field, "data-testid": testId, children: [
|
|
9956
|
+
const renderField = (label2, value2, testId) => /* @__PURE__ */ jsxs("div", { className: styles$1.field, "data-testid": testId, children: [
|
|
9884
9957
|
/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: label2 }) }),
|
|
9885
|
-
/* @__PURE__ */ jsx("dd", { className: styles.fieldValue, children: /* @__PURE__ */ jsx(ModelText, { role: "help", weight: "medium", children: value2 }) })
|
|
9958
|
+
/* @__PURE__ */ jsx("dd", { className: styles$1.fieldValue, children: /* @__PURE__ */ jsx(ModelText, { role: "help", weight: "medium", children: value2 }) })
|
|
9886
9959
|
] });
|
|
9887
|
-
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID, children: /* @__PURE__ */ jsxs("div", { className: styles.root, "data-status": status, children: [
|
|
9888
|
-
/* @__PURE__ */ jsxs("div", { className: styles.header, children: [
|
|
9889
|
-
/* @__PURE__ */ jsxs("dl", { className: styles.fields, children: [
|
|
9890
|
-
from !== "" ? renderField(textKey("From"), from, `${TEST_ID}-from`) : null,
|
|
9891
|
-
renderField(textKey("To"), to.join(", "), `${TEST_ID}-to`),
|
|
9892
|
-
cc.length > 0 ? renderField(textKey("Cc"), cc.join(", "), `${TEST_ID}-cc`) : null,
|
|
9893
|
-
bcc.length > 0 ? renderField(textKey("Bcc"), bcc.join(", "), `${TEST_ID}-bcc`) : null,
|
|
9894
|
-
subject !== "" ? renderField(textKey("Subject"), subject, `${TEST_ID}-subject`) : null
|
|
9960
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID$1, children: /* @__PURE__ */ jsxs("div", { className: styles$1.root, "data-status": status, children: [
|
|
9961
|
+
/* @__PURE__ */ jsxs("div", { className: styles$1.header, children: [
|
|
9962
|
+
/* @__PURE__ */ jsxs("dl", { className: styles$1.fields, children: [
|
|
9963
|
+
from !== "" ? renderField(textKey("From"), from, `${TEST_ID$1}-from`) : null,
|
|
9964
|
+
renderField(textKey("To"), to.join(", "), `${TEST_ID$1}-to`),
|
|
9965
|
+
cc.length > 0 ? renderField(textKey("Cc"), cc.join(", "), `${TEST_ID$1}-cc`) : null,
|
|
9966
|
+
bcc.length > 0 ? renderField(textKey("Bcc"), bcc.join(", "), `${TEST_ID$1}-bcc`) : null,
|
|
9967
|
+
subject !== "" ? renderField(textKey("Subject"), subject, `${TEST_ID$1}-subject`) : null
|
|
9895
9968
|
] }),
|
|
9896
|
-
isDraft ? null : /* @__PURE__ */ jsx("span", { className: styles.sentChip, "data-testid": `${TEST_ID}-sent`, children: /* @__PURE__ */ jsx(WidgetStatusChip, { tone: "success", children: textKey("Sent") }) })
|
|
9969
|
+
isDraft ? null : /* @__PURE__ */ jsx("span", { className: styles$1.sentChip, "data-testid": `${TEST_ID$1}-sent`, children: /* @__PURE__ */ jsx(WidgetStatusChip, { tone: "success", children: textKey("Sent") }) })
|
|
9897
9970
|
] }),
|
|
9898
|
-
bodyText.trim() !== "" ? /* @__PURE__ */ jsxs("div", { className: styles.bodySection, children: [
|
|
9971
|
+
bodyText.trim() !== "" ? /* @__PURE__ */ jsxs("div", { className: styles$1.bodySection, children: [
|
|
9899
9972
|
/* @__PURE__ */ jsx(
|
|
9900
9973
|
"div",
|
|
9901
9974
|
{
|
|
9902
9975
|
ref: bodyRef,
|
|
9903
|
-
className: classNames(styles.body, isFolded && styles.bodyFolded),
|
|
9976
|
+
className: classNames(styles$1.body, isFolded && styles$1.bodyFolded),
|
|
9904
9977
|
style: isFolded ? { maxHeight: BODY_FOLD_HEIGHT_PX } : void 0,
|
|
9905
|
-
"data-testid": `${TEST_ID}-body`,
|
|
9978
|
+
"data-testid": `${TEST_ID$1}-body`,
|
|
9906
9979
|
children: /* @__PURE__ */ jsx(Markdown, { markdown: bodyText, translate: false, components: MAIL_BODY_MARKDOWN_COMPONENTS })
|
|
9907
9980
|
}
|
|
9908
9981
|
),
|
|
@@ -9910,15 +9983,15 @@ const MailDraftPreviewConversationWidget = (props) => {
|
|
|
9910
9983
|
"button",
|
|
9911
9984
|
{
|
|
9912
9985
|
type: "button",
|
|
9913
|
-
className: styles.foldToggle,
|
|
9986
|
+
className: styles$1.foldToggle,
|
|
9914
9987
|
"aria-expanded": isExpanded,
|
|
9915
9988
|
onClick: () => setIsExpanded((wasExpanded) => !wasExpanded),
|
|
9916
|
-
"data-testid": `${TEST_ID}-fold-toggle`,
|
|
9989
|
+
"data-testid": `${TEST_ID$1}-fold-toggle`,
|
|
9917
9990
|
children: /* @__PURE__ */ jsx(Text, { role: "caption", weight: "medium", color: "var(--agents-fg-light)", children: isExpanded ? "Show less" : "Show more" })
|
|
9918
9991
|
}
|
|
9919
9992
|
) : null
|
|
9920
9993
|
] }) : null,
|
|
9921
|
-
showsSendButton ? /* @__PURE__ */ jsx("div", { className: styles.actions, children: /* @__PURE__ */ jsx(
|
|
9994
|
+
showsSendButton ? /* @__PURE__ */ jsx("div", { className: styles$1.actions, children: /* @__PURE__ */ jsx(
|
|
9922
9995
|
Button,
|
|
9923
9996
|
{
|
|
9924
9997
|
size: "small",
|
|
@@ -9928,17 +10001,280 @@ const MailDraftPreviewConversationWidget = (props) => {
|
|
|
9928
10001
|
onClick: send,
|
|
9929
10002
|
disabled: isSendBusy,
|
|
9930
10003
|
isLoading: isSending,
|
|
9931
|
-
testId: `${TEST_ID}-send`,
|
|
10004
|
+
testId: `${TEST_ID$1}-send`,
|
|
9932
10005
|
children: isSendBusy ? "Sending…" : "Send"
|
|
9933
10006
|
}
|
|
9934
10007
|
) }) : null
|
|
9935
10008
|
] }) });
|
|
9936
10009
|
};
|
|
9937
|
-
const conversationWidgetRegistration$
|
|
10010
|
+
const conversationWidgetRegistration$2 = {
|
|
9938
10011
|
name: MAIL_DRAFT_PREVIEW_WIDGET_TYPE,
|
|
9939
10012
|
component: MailDraftPreviewConversationWidget
|
|
9940
10013
|
};
|
|
9941
10014
|
const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10015
|
+
__proto__: null,
|
|
10016
|
+
conversationWidgetRegistration: conversationWidgetRegistration$2
|
|
10017
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
10018
|
+
const OWNER_STEP_CONFIRMATION_WIDGET_TYPE = "OwnerStepConfirmation";
|
|
10019
|
+
const parseOwnerStepConfirmationPayload = (payload) => {
|
|
10020
|
+
if (typeof payload !== "string") return null;
|
|
10021
|
+
let parsed;
|
|
10022
|
+
try {
|
|
10023
|
+
parsed = JSON.parse(payload);
|
|
10024
|
+
} catch {
|
|
10025
|
+
return null;
|
|
10026
|
+
}
|
|
10027
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
10028
|
+
const fields2 = parsed;
|
|
10029
|
+
const stepConfirmationId = typeof fields2.stepConfirmationId === "number" ? fields2.stepConfirmationId : Number(fields2.stepConfirmationId);
|
|
10030
|
+
const contentHash = typeof fields2.contentHash === "string" ? fields2.contentHash.trim() : "";
|
|
10031
|
+
if (!Number.isInteger(stepConfirmationId) || stepConfirmationId <= 0 || contentHash === "") return null;
|
|
10032
|
+
return { stepConfirmationId, contentHash };
|
|
10033
|
+
};
|
|
10034
|
+
const readServerMoment = (dateTime) => {
|
|
10035
|
+
if (dateTime === null || dateTime.trim() === "") return null;
|
|
10036
|
+
const text2 = dateTime.trim().replace(" ", "T");
|
|
10037
|
+
const moment = Date.parse(/[zZ]|[+-]\d{2}:?\d{2}$/.test(text2) ? text2 : `${text2}Z`);
|
|
10038
|
+
return Number.isNaN(moment) ? null : moment;
|
|
10039
|
+
};
|
|
10040
|
+
const readShownStepStatus = (stepConfirmation, now) => {
|
|
10041
|
+
if (stepConfirmation.status !== "OPEN") return stepConfirmation.status;
|
|
10042
|
+
const expiresAt = readServerMoment(stepConfirmation.expiresAt);
|
|
10043
|
+
return expiresAt !== null && expiresAt <= now ? "EXPIRED" : "OPEN";
|
|
10044
|
+
};
|
|
10045
|
+
const hashToConfirm = (stepConfirmation) => stepConfirmation !== null && typeof stepConfirmation.contentHash === "string" && stepConfirmation.contentHash !== "" ? stepConfirmation.contentHash : null;
|
|
10046
|
+
const root = "agents_root_D6NTnE";
|
|
10047
|
+
const header = "agents_header_dq-7zJ";
|
|
10048
|
+
const lines = "agents_lines_br3wa7";
|
|
10049
|
+
const statusChip = "agents_statusChip_7YV86B";
|
|
10050
|
+
const notice = "agents_notice_rEZyPI";
|
|
10051
|
+
const result = "agents_result_vs3nDg";
|
|
10052
|
+
const actions = "agents_actions_bM3uYK";
|
|
10053
|
+
const styles = {
|
|
10054
|
+
root,
|
|
10055
|
+
header,
|
|
10056
|
+
lines,
|
|
10057
|
+
statusChip,
|
|
10058
|
+
notice,
|
|
10059
|
+
result,
|
|
10060
|
+
actions
|
|
10061
|
+
};
|
|
10062
|
+
const TEST_ID = "owner-step-confirmation-widget";
|
|
10063
|
+
const RUNNING_STEP_READ_INTERVAL_MS = 3e3;
|
|
10064
|
+
const STATUS_CHIP_TONES = {
|
|
10065
|
+
OPEN: "warning",
|
|
10066
|
+
RUNNING: "info",
|
|
10067
|
+
EXECUTED: "success",
|
|
10068
|
+
FAILED: "danger",
|
|
10069
|
+
DISCARDED: "neutral",
|
|
10070
|
+
EXPIRED: "neutral",
|
|
10071
|
+
SUPERSEDED: "neutral"
|
|
10072
|
+
};
|
|
10073
|
+
const translateStatusLabel = (status, texts) => {
|
|
10074
|
+
switch (status) {
|
|
10075
|
+
case "OPEN":
|
|
10076
|
+
return texts.translate("Waiting for you");
|
|
10077
|
+
case "RUNNING":
|
|
10078
|
+
return texts.translate("Running");
|
|
10079
|
+
case "EXECUTED":
|
|
10080
|
+
return texts.translate("Done");
|
|
10081
|
+
case "FAILED":
|
|
10082
|
+
return texts.translate("Failed");
|
|
10083
|
+
case "DISCARDED":
|
|
10084
|
+
return texts.translate("Discarded");
|
|
10085
|
+
case "EXPIRED":
|
|
10086
|
+
return texts.translate("Expired");
|
|
10087
|
+
case "SUPERSEDED":
|
|
10088
|
+
return texts.translate("Replaced");
|
|
10089
|
+
}
|
|
10090
|
+
};
|
|
10091
|
+
const readStepConfirmationPort = (client) => {
|
|
10092
|
+
const getStepConfirmation = client?.getStepConfirmation;
|
|
10093
|
+
if (!client || !getStepConfirmation) return null;
|
|
10094
|
+
return {
|
|
10095
|
+
getStepConfirmation: getStepConfirmation.bind(client),
|
|
10096
|
+
executeStepConfirmation: client.executeStepConfirmation?.bind(client),
|
|
10097
|
+
discardStepConfirmation: client.discardStepConfirmation?.bind(client)
|
|
10098
|
+
};
|
|
10099
|
+
};
|
|
10100
|
+
const isChangedStepRefusal = (caught) => caught instanceof AgentsClientError && caught.httpStatus === 400;
|
|
10101
|
+
const OwnerStepConfirmationConversationWidget = (props) => {
|
|
10102
|
+
const { payload, interactive = false } = props;
|
|
10103
|
+
const { conversationId } = useConversationWidgetContext();
|
|
10104
|
+
const client = useOptionalAgentsConversationClient();
|
|
10105
|
+
const parsedPayload = useMemo(() => parseOwnerStepConfirmationPayload(payload), [payload]);
|
|
10106
|
+
const port = useMemo(() => readStepConfirmationPort(client), [client]);
|
|
10107
|
+
const isUnavailable = parsedPayload === null || port === null || conversationId === void 0;
|
|
10108
|
+
useReportWidgetRenderStatus(
|
|
10109
|
+
isUnavailable ? "failed" : "mounted",
|
|
10110
|
+
isUnavailable ? "INVALID_PROP" : void 0,
|
|
10111
|
+
parsedPayload === null ? "the block names no step or no hash" : port === null ? "the conversation client cannot read step confirmations" : conversationId === void 0 ? "the chat names no conversation" : void 0
|
|
10112
|
+
);
|
|
10113
|
+
if (parsedPayload === null || port === null || conversationId === void 0) {
|
|
10114
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID, children: /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: "This step cannot be confirmed here." }) });
|
|
10115
|
+
}
|
|
10116
|
+
return /* @__PURE__ */ jsx(
|
|
10117
|
+
OwnerStepConfirmationBody,
|
|
10118
|
+
{
|
|
10119
|
+
port,
|
|
10120
|
+
conversationId,
|
|
10121
|
+
stepConfirmationId: parsedPayload.stepConfirmationId,
|
|
10122
|
+
widgetContentHash: parsedPayload.contentHash,
|
|
10123
|
+
interactive
|
|
10124
|
+
}
|
|
10125
|
+
);
|
|
10126
|
+
};
|
|
10127
|
+
const OwnerStepConfirmationBody = ({ port, conversationId, stepConfirmationId, widgetContentHash, interactive }) => {
|
|
10128
|
+
const texts = useAgentsTexts();
|
|
10129
|
+
const isEmailRender = useIsEmailWidgetRender();
|
|
10130
|
+
const [stepConfirmation, setStepConfirmation] = useState(null);
|
|
10131
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
10132
|
+
const [problem, setProblem] = useState(null);
|
|
10133
|
+
const [wasRefusedAsChanged, setWasRefusedAsChanged] = useState(false);
|
|
10134
|
+
const [busyAction, setBusyAction] = useState(null);
|
|
10135
|
+
const [finishedReadCount, setFinishedReadCount] = useState(0);
|
|
10136
|
+
const busyActionRef = useRef(null);
|
|
10137
|
+
const isMountedRef = useRef(true);
|
|
10138
|
+
useEffect(() => {
|
|
10139
|
+
isMountedRef.current = true;
|
|
10140
|
+
return () => {
|
|
10141
|
+
isMountedRef.current = false;
|
|
10142
|
+
};
|
|
10143
|
+
}, []);
|
|
10144
|
+
const readStep = useCallback(async () => {
|
|
10145
|
+
try {
|
|
10146
|
+
const readStepConfirmation = await port.getStepConfirmation(conversationId, stepConfirmationId);
|
|
10147
|
+
if (!isMountedRef.current) return false;
|
|
10148
|
+
setStepConfirmation(readStepConfirmation);
|
|
10149
|
+
const readStatus = readShownStepStatus(readStepConfirmation, Date.now());
|
|
10150
|
+
const hasEnded = readStatus !== "OPEN" && readStatus !== "RUNNING";
|
|
10151
|
+
setProblem((earlierProblem) => hasEnded || earlierProblem === "loadFailed" ? null : earlierProblem);
|
|
10152
|
+
return true;
|
|
10153
|
+
} catch {
|
|
10154
|
+
if (isMountedRef.current) setProblem("loadFailed");
|
|
10155
|
+
return false;
|
|
10156
|
+
} finally {
|
|
10157
|
+
if (isMountedRef.current) {
|
|
10158
|
+
setIsLoading(false);
|
|
10159
|
+
setFinishedReadCount((count) => count + 1);
|
|
10160
|
+
}
|
|
10161
|
+
}
|
|
10162
|
+
}, [port, conversationId, stepConfirmationId]);
|
|
10163
|
+
useEffect(() => {
|
|
10164
|
+
setIsLoading(true);
|
|
10165
|
+
setProblem(null);
|
|
10166
|
+
void readStep();
|
|
10167
|
+
}, [readStep]);
|
|
10168
|
+
const shownStatus = stepConfirmation === null ? null : readShownStepStatus(stepConfirmation, Date.now());
|
|
10169
|
+
useEffect(() => {
|
|
10170
|
+
if (shownStatus !== "RUNNING" || busyAction !== null) return void 0;
|
|
10171
|
+
const timer = setTimeout(() => void readStep(), RUNNING_STEP_READ_INTERVAL_MS);
|
|
10172
|
+
return () => clearTimeout(timer);
|
|
10173
|
+
}, [shownStatus, busyAction, finishedReadCount, readStep]);
|
|
10174
|
+
const runAction = async (action) => {
|
|
10175
|
+
if (busyActionRef.current !== null || stepConfirmation === null) return;
|
|
10176
|
+
const contentHash = hashToConfirm(stepConfirmation);
|
|
10177
|
+
const execute = port.executeStepConfirmation;
|
|
10178
|
+
const discard = port.discardStepConfirmation;
|
|
10179
|
+
if (!execute || !discard || action === "run" && contentHash === null) return;
|
|
10180
|
+
busyActionRef.current = action;
|
|
10181
|
+
setBusyAction(action);
|
|
10182
|
+
setProblem(null);
|
|
10183
|
+
setWasRefusedAsChanged(false);
|
|
10184
|
+
try {
|
|
10185
|
+
const answeredStep = action === "run" && contentHash !== null ? await execute(conversationId, stepConfirmationId, contentHash) : await discard(conversationId, stepConfirmationId);
|
|
10186
|
+
if (isMountedRef.current) setStepConfirmation(answeredStep);
|
|
10187
|
+
} catch (caught) {
|
|
10188
|
+
if (isMountedRef.current) {
|
|
10189
|
+
if (isChangedStepRefusal(caught)) setWasRefusedAsChanged(true);
|
|
10190
|
+
else setProblem(action === "run" ? "runFailed" : "discardFailed");
|
|
10191
|
+
}
|
|
10192
|
+
} finally {
|
|
10193
|
+
await readStep();
|
|
10194
|
+
busyActionRef.current = null;
|
|
10195
|
+
if (isMountedRef.current) setBusyAction(null);
|
|
10196
|
+
}
|
|
10197
|
+
};
|
|
10198
|
+
if (isLoading && stepConfirmation === null) {
|
|
10199
|
+
return /* @__PURE__ */ jsx(WidgetSurfaceSkeleton, { rowCount: 1, testId: `${TEST_ID}-loading` });
|
|
10200
|
+
}
|
|
10201
|
+
if (stepConfirmation === null) {
|
|
10202
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID, children: /* @__PURE__ */ jsxs("div", { className: styles.root, children: [
|
|
10203
|
+
/* @__PURE__ */ jsx("div", { role: "alert", children: /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: "The step could not be loaded." }) }),
|
|
10204
|
+
/* @__PURE__ */ jsx("div", { className: styles.actions, children: /* @__PURE__ */ jsx(
|
|
10205
|
+
Button,
|
|
10206
|
+
{
|
|
10207
|
+
size: "small",
|
|
10208
|
+
variant: "default",
|
|
10209
|
+
icon: "refresh",
|
|
10210
|
+
onClick: () => {
|
|
10211
|
+
setIsLoading(true);
|
|
10212
|
+
setProblem(null);
|
|
10213
|
+
void readStep();
|
|
10214
|
+
},
|
|
10215
|
+
testId: `${TEST_ID}-retry`,
|
|
10216
|
+
children: "Try again"
|
|
10217
|
+
}
|
|
10218
|
+
) })
|
|
10219
|
+
] }) });
|
|
10220
|
+
}
|
|
10221
|
+
const translateLine = (englishLine, lineText) => lineText === null ? englishLine : texts.translate(lineText.template, lineText.replacements);
|
|
10222
|
+
const targetLine = translateLine(stepConfirmation.targetLine, stepConfirmation.targetText);
|
|
10223
|
+
const consequenceLine = translateLine(stepConfirmation.consequenceLine, stepConfirmation.consequenceText);
|
|
10224
|
+
const isChanged = wasRefusedAsChanged || stepConfirmation.contentHash !== null && stepConfirmation.contentHash !== widgetContentHash;
|
|
10225
|
+
const canAct = port.executeStepConfirmation !== void 0 && port.discardStepConfirmation !== void 0;
|
|
10226
|
+
const isOpen = shownStatus === "OPEN" && hashToConfirm(stepConfirmation) !== null;
|
|
10227
|
+
const showsActions = isOpen && interactive && canAct && !isEmailRender;
|
|
10228
|
+
const statusChip2 = shownStatus === null ? null : { tone: STATUS_CHIP_TONES[shownStatus], label: translateStatusLabel(shownStatus, texts) };
|
|
10229
|
+
const showsResult = (shownStatus === "EXECUTED" || shownStatus === "FAILED") && stepConfirmation.resultExcerpt !== null && stepConfirmation.resultExcerpt.trim() !== "";
|
|
10230
|
+
return /* @__PURE__ */ jsx(WidgetSurface, { testId: TEST_ID, children: /* @__PURE__ */ jsxs("div", { className: styles.root, "data-status": shownStatus ?? "UNKNOWN", "aria-busy": busyAction !== null, children: [
|
|
10231
|
+
/* @__PURE__ */ jsxs("div", { className: styles.header, children: [
|
|
10232
|
+
/* @__PURE__ */ jsxs("div", { className: styles.lines, children: [
|
|
10233
|
+
/* @__PURE__ */ jsx(ModelText, { role: "body", weight: "medium", children: targetLine }),
|
|
10234
|
+
consequenceLine.trim() !== "" ? /* @__PURE__ */ jsx(ModelText, { role: "help", color: "var(--agents-fg-light)", children: consequenceLine }) : null
|
|
10235
|
+
] }),
|
|
10236
|
+
statusChip2 !== null ? /* @__PURE__ */ jsx("span", { className: styles.statusChip, "data-testid": `${TEST_ID}-status`, children: /* @__PURE__ */ jsx(WidgetStatusChip, { tone: statusChip2.tone, translate: false, children: escapePlainTextForText(statusChip2.label) }) }) : null
|
|
10237
|
+
] }),
|
|
10238
|
+
isChanged && isOpen ? /* @__PURE__ */ jsx("div", { className: styles.notice, role: "status", "data-testid": `${TEST_ID}-changed`, children: /* @__PURE__ */ jsx(Text, { role: "help", children: "This step changed meanwhile. Check it again before you run it." }) }) : null,
|
|
10239
|
+
shownStatus === "SUPERSEDED" ? /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: "A newer request replaced this step." }) : null,
|
|
10240
|
+
showsResult && stepConfirmation.resultExcerpt !== null ? /* @__PURE__ */ jsx("div", { className: styles.result, "data-testid": `${TEST_ID}-result`, children: /* @__PURE__ */ jsx(ModelText, { role: "caption", color: "var(--agents-fg-light)", allowNewLines: true, children: stepConfirmation.resultExcerpt }) }) : null,
|
|
10241
|
+
problem === "runFailed" || problem === "discardFailed" || problem === "loadFailed" ? /* @__PURE__ */ jsx("div", { role: "alert", "data-testid": `${TEST_ID}-problem`, children: /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: problem === "runFailed" ? "The step could not be run." : problem === "discardFailed" ? "The step could not be discarded." : "The step could not be loaded." }) }) : null,
|
|
10242
|
+
isOpen && interactive && !canAct && !isEmailRender ? /* @__PURE__ */ jsx(Text, { role: "help", color: "var(--agents-fg-light)", children: "This step cannot be confirmed here." }) : null,
|
|
10243
|
+
showsActions ? /* @__PURE__ */ jsxs("div", { className: styles.actions, children: [
|
|
10244
|
+
/* @__PURE__ */ jsx(
|
|
10245
|
+
Button,
|
|
10246
|
+
{
|
|
10247
|
+
size: "small",
|
|
10248
|
+
variant: "default",
|
|
10249
|
+
icon: "close",
|
|
10250
|
+
onClick: () => void runAction("discard"),
|
|
10251
|
+
disabled: busyAction !== null,
|
|
10252
|
+
isLoading: busyAction === "discard",
|
|
10253
|
+
testId: `${TEST_ID}-discard`,
|
|
10254
|
+
children: "Discard"
|
|
10255
|
+
}
|
|
10256
|
+
),
|
|
10257
|
+
/* @__PURE__ */ jsx(
|
|
10258
|
+
Button,
|
|
10259
|
+
{
|
|
10260
|
+
size: "small",
|
|
10261
|
+
variant: "primary",
|
|
10262
|
+
icon: "play",
|
|
10263
|
+
onClick: () => void runAction("run"),
|
|
10264
|
+
disabled: busyAction !== null,
|
|
10265
|
+
isLoading: busyAction === "run",
|
|
10266
|
+
testId: `${TEST_ID}-run`,
|
|
10267
|
+
children: busyAction === "run" ? "Running…" : "Run"
|
|
10268
|
+
}
|
|
10269
|
+
)
|
|
10270
|
+
] }) : null
|
|
10271
|
+
] }) });
|
|
10272
|
+
};
|
|
10273
|
+
const conversationWidgetRegistration$1 = {
|
|
10274
|
+
name: OWNER_STEP_CONFIRMATION_WIDGET_TYPE,
|
|
10275
|
+
component: OwnerStepConfirmationConversationWidget
|
|
10276
|
+
};
|
|
10277
|
+
const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9942
10278
|
__proto__: null,
|
|
9943
10279
|
conversationWidgetRegistration: conversationWidgetRegistration$1
|
|
9944
10280
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -9946,7 +10282,7 @@ const conversationWidgetRegistration = {
|
|
|
9946
10282
|
name: "WritingDraft",
|
|
9947
10283
|
component: WritingDraftConversationWidget
|
|
9948
10284
|
};
|
|
9949
|
-
const
|
|
10285
|
+
const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9950
10286
|
__proto__: null,
|
|
9951
10287
|
conversationWidgetRegistration
|
|
9952
10288
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -9963,7 +10299,8 @@ const widgetRegistrationModules = /* @__PURE__ */ Object.assign({
|
|
|
9963
10299
|
"../widgets/ExtendConnectionPermissionConversationWidget/ExtendConnectionPermissionConversationWidget.widget-registration.ts": __vite_glob_0_9,
|
|
9964
10300
|
"../widgets/ImageGalleryConversationWidget/ImageGalleryConversationWidget.widget-registration.ts": __vite_glob_0_10,
|
|
9965
10301
|
"../widgets/MailDraftPreviewConversationWidget/MailDraftPreviewConversationWidget.widget-registration.ts": __vite_glob_0_11,
|
|
9966
|
-
"../widgets/
|
|
10302
|
+
"../widgets/OwnerStepConfirmationConversationWidget/OwnerStepConfirmationConversationWidget.widget-registration.ts": __vite_glob_0_12,
|
|
10303
|
+
"../widgets/WritingDraftConversationWidget/WritingDraftConversationWidget.widget-registration.ts": __vite_glob_0_13
|
|
9967
10304
|
});
|
|
9968
10305
|
const readConversationWidgetRegistrations = (registrationModules) => Object.values(registrationModules).map((registrationModule) => registrationModule.conversationWidgetRegistration).filter((entry2) => entry2 !== void 0);
|
|
9969
10306
|
const readFolderRegisteredConversationWidgets = () => readConversationWidgetRegistrations(widgetRegistrationModules);
|
|
@@ -10012,86 +10349,29 @@ const replaceConversationWidgetRegistryEntries = (widgets) => {
|
|
|
10012
10349
|
registryRevision += 1;
|
|
10013
10350
|
return previousWidgets;
|
|
10014
10351
|
};
|
|
10015
|
-
const LEGACY_NAME_SUFFIX = "Directive";
|
|
10016
|
-
let widgetNameSet;
|
|
10017
|
-
let widgetNameSetRevision = -1;
|
|
10018
|
-
const getWidgetNameSet = () => {
|
|
10019
|
-
if (widgetNameSet === void 0 || widgetNameSetRevision !== getConversationWidgetRegistryRevision()) {
|
|
10020
|
-
widgetNameSet = new Set(conversationWidgetRegistry.widgets.map((widget) => widget.name));
|
|
10021
|
-
widgetNameSetRevision = getConversationWidgetRegistryRevision();
|
|
10022
|
-
}
|
|
10023
|
-
return widgetNameSet;
|
|
10024
|
-
};
|
|
10025
|
-
const resolveCanonicalWidgetName = (requestedName, canonicalNames) => {
|
|
10026
|
-
if (canonicalNames.has(requestedName)) return requestedName;
|
|
10027
|
-
if (!requestedName.endsWith(LEGACY_NAME_SUFFIX)) return void 0;
|
|
10028
|
-
const withoutLegacySuffix = requestedName.slice(0, -LEGACY_NAME_SUFFIX.length);
|
|
10029
|
-
return canonicalNames.has(withoutLegacySuffix) ? withoutLegacySuffix : void 0;
|
|
10030
|
-
};
|
|
10031
|
-
const resolveWidgetName = (type) => resolveCanonicalWidgetName(type, getWidgetNameSet());
|
|
10032
|
-
const normalizeWidgetName = (value2) => value2.toLowerCase().replace(/directive$/, "");
|
|
10033
|
-
const wordTokens = (value2) => value2.replace(/directive$/i, "").split(/(?=[A-Z])/).map((token) => token.toLowerCase()).filter(Boolean);
|
|
10034
|
-
const editDistance = (a, b) => {
|
|
10035
|
-
const rows2 = a.length + 1;
|
|
10036
|
-
const cols = b.length + 1;
|
|
10037
|
-
const dist = Array.from({ length: rows2 }, () => new Array(cols).fill(0));
|
|
10038
|
-
for (let i = 0; i < rows2; i++) dist[i][0] = i;
|
|
10039
|
-
for (let j = 0; j < cols; j++) dist[0][j] = j;
|
|
10040
|
-
for (let i = 1; i < rows2; i++) {
|
|
10041
|
-
for (let j = 1; j < cols; j++) {
|
|
10042
|
-
dist[i][j] = Math.min(
|
|
10043
|
-
dist[i - 1][j] + 1,
|
|
10044
|
-
dist[i][j - 1] + 1,
|
|
10045
|
-
dist[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
|
|
10046
|
-
);
|
|
10047
|
-
}
|
|
10048
|
-
}
|
|
10049
|
-
return dist[rows2 - 1][cols - 1];
|
|
10050
|
-
};
|
|
10051
|
-
const closestWidgetNames = (type, limit = 3) => {
|
|
10052
|
-
const target = normalizeWidgetName(type);
|
|
10053
|
-
if (target === "") return [];
|
|
10054
|
-
const targetTokens = new Set(wordTokens(type));
|
|
10055
|
-
return [...getWidgetNameSet()].map((name) => {
|
|
10056
|
-
const candidate = normalizeWidgetName(name);
|
|
10057
|
-
const candidateTokens = wordTokens(name);
|
|
10058
|
-
const contains = candidate.includes(target) || target.includes(candidate) ? 3 : 0;
|
|
10059
|
-
const overlap = candidateTokens.filter((token) => targetTokens.has(token)).length;
|
|
10060
|
-
const nameProximity = 1 - editDistance(target, candidate) / Math.max(target.length, candidate.length);
|
|
10061
|
-
const tokenProximity = Math.max(
|
|
10062
|
-
0,
|
|
10063
|
-
...candidateTokens.map((token) => 1 - editDistance(target, token) / Math.max(target.length, token.length))
|
|
10064
|
-
);
|
|
10065
|
-
const proximity = Math.max(nameProximity, tokenProximity);
|
|
10066
|
-
return {
|
|
10067
|
-
name,
|
|
10068
|
-
keep: contains > 0 || overlap > 0 || proximity >= 0.6,
|
|
10069
|
-
score: contains + overlap + proximity
|
|
10070
|
-
};
|
|
10071
|
-
}).filter((entry2) => entry2.keep).sort((a, b) => b.score - a.score).slice(0, limit).map((entry2) => entry2.name);
|
|
10072
|
-
};
|
|
10073
10352
|
export {
|
|
10074
10353
|
ApexChart as A,
|
|
10075
10354
|
readConversationWidgetRegistrations as B,
|
|
10076
10355
|
COMPOSED_VIEW_TONES as C,
|
|
10077
10356
|
readOpenEntityActionTarget as D,
|
|
10078
10357
|
EmbeddedConversationWidget as E,
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10358
|
+
registerComposedNodeSchemaPart as F,
|
|
10359
|
+
resolveCanonicalWidgetName as G,
|
|
10360
|
+
resolveWidgetName as H,
|
|
10361
|
+
readComposedViewDataTimes as I,
|
|
10362
|
+
exceedsJsonContainerDepth as J,
|
|
10363
|
+
remarkWidgetFencePlugin as K,
|
|
10364
|
+
readEntityDetailInstanceId as L,
|
|
10365
|
+
readMapNodeKeyOfInstanceId as M,
|
|
10366
|
+
findMapNodeInMarkdown as N,
|
|
10367
|
+
canvasInstanceIdForEntityDetail as O,
|
|
10368
|
+
mapStyles as P,
|
|
10369
|
+
MapPresentationContext as Q,
|
|
10370
|
+
buildComposedViewComponentRegistry as R,
|
|
10371
|
+
composedViewComponents as S,
|
|
10372
|
+
ComposedViewComponentsContext as T,
|
|
10373
|
+
parseWidgetJsonObject as U,
|
|
10374
|
+
BARE_WIDGET_LINE_GLOBAL as V,
|
|
10095
10375
|
WIDGET_FENCE_LANG as W,
|
|
10096
10376
|
COMPOSED_VIEW_TONE_ALIASES as a,
|
|
10097
10377
|
COMPOSED_VIEW_TONE_GRAPHIC_COLOR as b,
|
|
@@ -10100,8 +10380,8 @@ export {
|
|
|
10100
10380
|
ComposedViewRenderer as e,
|
|
10101
10381
|
readOptionalComposedViewTone as f,
|
|
10102
10382
|
useNumberLocale as g,
|
|
10103
|
-
|
|
10104
|
-
|
|
10383
|
+
registerConversationWidgets as h,
|
|
10384
|
+
registerComposedViewDataSourceFetcher as i,
|
|
10105
10385
|
conversationWidgetRegistry as j,
|
|
10106
10386
|
replaceConversationWidgetRegistryEntries as k,
|
|
10107
10387
|
resetGoogleMapsAuthFailureForTests as l,
|
|
@@ -10120,4 +10400,4 @@ export {
|
|
|
10120
10400
|
getConversationWidgetRegistryRevision as y,
|
|
10121
10401
|
readComposedViewTree as z
|
|
10122
10402
|
};
|
|
10123
|
-
//# sourceMappingURL=
|
|
10403
|
+
//# sourceMappingURL=conversationWidgetRegistry-webrYtkI.js.map
|