@botonic/shared 2.28.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +11 -0
- package/package.json +1 -1
- package/src/lib/ai-agents-types.d.ts +86 -8
- package/src/lib/ai-agents-types.js +20 -1
- package/src/lib/ai-agents-types.js.map +1 -1
- package/src/lib/domain/botonic/index.d.ts +1 -0
- package/src/lib/domain/botonic/index.js +1 -0
- package/src/lib/domain/botonic/index.js.map +1 -1
- package/src/lib/domain/botonic/outputs.d.ts +11 -3
- package/src/lib/domain/botonic/outputs.js +10 -0
- package/src/lib/domain/botonic/outputs.js.map +1 -1
- package/src/lib/domain/botonic/preview-utils.d.ts +43 -0
- package/src/lib/domain/botonic/preview-utils.js +2 -0
- package/src/lib/domain/botonic/preview-utils.js.map +1 -0
- package/src/lib/domain/botonic/session.d.ts +2 -0
- package/src/lib/domain/botonic/settings.d.ts +1 -0
- package/src/lib/domain/botonic/types.d.ts +31 -3
- package/src/lib/domain/botonic/types.js +30 -1
- package/src/lib/domain/botonic/types.js.map +1 -1
- package/src/lib/domain/botonic/webchat-outputs/index.d.ts +0 -0
- package/src/lib/domain/botonic/webchat-outputs/index.js +2 -0
- package/src/lib/domain/botonic/webchat-outputs/index.js.map +1 -0
- package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/index.d.ts +0 -0
- package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/index.js +2 -0
- package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/index.js.map +1 -0
- package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/webchat-output-rating.d.ts +0 -0
- package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/webchat-output-rating.js +2 -0
- package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/webchat-output-rating.js.map +1 -0
- package/src/lib/hubtype-analytics-types.d.ts +17 -1
- package/src/lib/hubtype-analytics-types.js +1 -0
- package/src/lib/hubtype-analytics-types.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 2.30.0 (2026-06-11)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- update botonic-basic-template ([#932](https://github.com/metis-ai/hubtype-product/pull/932))
|
|
6
|
+
- update plugins to last botonicV0 changes #BLT-2370 ([#920](https://github.com/metis-ai/hubtype-product/pull/920))
|
|
7
|
+
- support botonic v2 preview in flow builder ([#916](https://github.com/metis-ai/hubtype-product/pull/916))
|
|
8
|
+
- port preview events into botonic v2 ([#915](https://github.com/metis-ai/hubtype-product/pull/915))
|
|
9
|
+
|
|
10
|
+
### ❤️ Thank You
|
|
11
|
+
|
|
12
|
+
- Marc Rabat @vanbasten17
|
|
13
|
+
- Oriol Raventós @Iru89
|
|
14
|
+
|
|
15
|
+
## 2.29.0 (2026-05-12)
|
|
16
|
+
|
|
17
|
+
### 🚀 Features
|
|
18
|
+
|
|
19
|
+
- rating component ([#882](https://github.com/metis-ai/hubtype-product/pull/882))
|
|
20
|
+
|
|
21
|
+
### ❤️ Thank You
|
|
22
|
+
|
|
23
|
+
- Marc Rabat @vanbasten17
|
|
24
|
+
|
|
1
25
|
## 2.28.0 (2026-05-06)
|
|
2
26
|
|
|
3
27
|
This was a version bump only for @botonic/shared to align it with other projects, there were no code changes.
|
package/README.md
CHANGED
|
@@ -27,3 +27,14 @@ pnpm add @botonic/shared
|
|
|
27
27
|
# or
|
|
28
28
|
npm install @botonic/shared
|
|
29
29
|
```
|
|
30
|
+
|
|
31
|
+
## Webchat rating submit payload (builtin)
|
|
32
|
+
|
|
33
|
+
Built-in webchat rating UI (and demos that follow it) send postbacks with the same **`prefix|JSON`** pattern as webchat client settings:
|
|
34
|
+
|
|
35
|
+
- **Prefix:** `submit-webchat-rating` (`SUBMIT_WEBCHAT_RATING_PAYLOAD`).
|
|
36
|
+
- **Helpers:** `createSubmitWebchatRatingPayload`, `parseSubmitWebchatRatingPayload`, `isSubmitWebchatRatingPayload`.
|
|
37
|
+
|
|
38
|
+
Flow Builder **CMS** rating nodes may still use **`agent-rating|…`** and other CMS-defined payloads; those are separate from this builtin contract. Custom **`payloads`** arrays on rating custom messages override defaults and are sent as-is.
|
|
39
|
+
|
|
40
|
+
With **`@botonic/webchat-react`**, the UI for **`BOTONIC_OUTPUT_RATING`** (`botonic-output-rating`) is registered automatically in `customMessages`. Pass your own component under the same key only when you need to replace the default **`RatingMessage`**.
|
package/package.json
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare enum OutputAiAgentMessageType {
|
|
2
|
+
Text = "text",
|
|
3
|
+
TextWithButtons = "textWithButtons",
|
|
4
|
+
BotExecutor = "botExecutor",
|
|
5
|
+
Carousel = "carousel",
|
|
6
|
+
Exit = "exit",
|
|
7
|
+
FlowBuilderContent = "flowBuilderContent"
|
|
8
|
+
}
|
|
9
|
+
export interface BaseAiAgentMessage {
|
|
10
|
+
type: OutputAiAgentMessageType;
|
|
3
11
|
}
|
|
4
12
|
export interface Button {
|
|
5
13
|
text: string;
|
|
6
14
|
payload?: string;
|
|
7
15
|
url?: string;
|
|
16
|
+
target?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ButtonWithPayload {
|
|
19
|
+
text: string;
|
|
20
|
+
payload: string;
|
|
8
21
|
}
|
|
9
22
|
export interface TextMessage extends BaseAiAgentMessage {
|
|
10
|
-
type:
|
|
23
|
+
type: OutputAiAgentMessageType.Text;
|
|
11
24
|
content: {
|
|
12
25
|
text: string;
|
|
13
26
|
};
|
|
14
27
|
}
|
|
15
28
|
export interface TextWithButtonsMessage extends BaseAiAgentMessage {
|
|
16
|
-
type:
|
|
29
|
+
type: OutputAiAgentMessageType.TextWithButtons;
|
|
17
30
|
content: {
|
|
18
31
|
text: string;
|
|
19
32
|
buttons: Button[];
|
|
20
33
|
};
|
|
21
34
|
}
|
|
35
|
+
export interface BotExecutorMessage extends BaseAiAgentMessage {
|
|
36
|
+
type: OutputAiAgentMessageType.BotExecutor;
|
|
37
|
+
content: {
|
|
38
|
+
text: string;
|
|
39
|
+
buttons: ButtonWithPayload[];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
22
42
|
interface CarouselElement {
|
|
23
43
|
title: string;
|
|
24
44
|
subtitle: string;
|
|
@@ -26,20 +46,25 @@ interface CarouselElement {
|
|
|
26
46
|
button: Button;
|
|
27
47
|
}
|
|
28
48
|
export interface CarouselMessage extends BaseAiAgentMessage {
|
|
29
|
-
type:
|
|
49
|
+
type: OutputAiAgentMessageType.Carousel;
|
|
30
50
|
content: {
|
|
31
51
|
text?: string;
|
|
32
52
|
elements: CarouselElement[];
|
|
33
53
|
};
|
|
34
54
|
}
|
|
35
55
|
export interface ExitMessage extends BaseAiAgentMessage {
|
|
36
|
-
type:
|
|
56
|
+
type: OutputAiAgentMessageType.Exit;
|
|
37
57
|
}
|
|
38
|
-
export
|
|
58
|
+
export interface FlowBuilderContentMessage extends BaseAiAgentMessage {
|
|
59
|
+
type: OutputAiAgentMessageType.FlowBuilderContent;
|
|
60
|
+
contentId: string;
|
|
61
|
+
}
|
|
62
|
+
export type OutputMessage = TextMessage | TextWithButtonsMessage | BotExecutorMessage | CarouselMessage | ExitMessage | FlowBuilderContentMessage;
|
|
39
63
|
export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>;
|
|
40
64
|
export interface ToolExecution {
|
|
41
65
|
toolName: string;
|
|
42
66
|
toolArguments: Record<string, any>;
|
|
67
|
+
toolResults?: string;
|
|
43
68
|
knowledgebaseSourcesIds?: string[];
|
|
44
69
|
knowledgebaseChunksIds?: string[];
|
|
45
70
|
}
|
|
@@ -51,19 +76,72 @@ export interface RunResult {
|
|
|
51
76
|
error: boolean;
|
|
52
77
|
inputGuardrailsTriggered: string[];
|
|
53
78
|
outputGuardrailsTriggered: string[];
|
|
79
|
+
startingAgentName?: string;
|
|
80
|
+
lastAgentName?: string;
|
|
81
|
+
availableSpecialists?: AvailableSpecialist[];
|
|
82
|
+
isTransferredToSpecialist?: boolean;
|
|
54
83
|
}
|
|
55
84
|
export type InferenceResponse = RunResult;
|
|
56
85
|
export interface GuardrailRule {
|
|
57
86
|
name: string;
|
|
58
87
|
description: string;
|
|
59
88
|
}
|
|
60
|
-
export
|
|
89
|
+
export declare enum VerbosityLevel {
|
|
90
|
+
Low = "low",
|
|
91
|
+
Medium = "medium",
|
|
92
|
+
High = "high"
|
|
93
|
+
}
|
|
94
|
+
export interface HubtypeAssistantMessage {
|
|
95
|
+
role: 'assistant';
|
|
96
|
+
content: string;
|
|
97
|
+
}
|
|
98
|
+
export interface HubtypeUserMessage {
|
|
99
|
+
role: 'user';
|
|
100
|
+
content: string;
|
|
101
|
+
}
|
|
102
|
+
export declare enum AiAgentType {
|
|
103
|
+
Specialist = "specialist",
|
|
104
|
+
Router = "router"
|
|
105
|
+
}
|
|
106
|
+
export interface AvailableSpecialist {
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
}
|
|
110
|
+
export interface AiAgentSpecialistArgs {
|
|
111
|
+
type?: AiAgentType.Specialist;
|
|
61
112
|
name: string;
|
|
62
113
|
instructions: string;
|
|
114
|
+
model: string;
|
|
115
|
+
verbosity: VerbosityLevel;
|
|
63
116
|
activeTools?: {
|
|
64
117
|
name: string;
|
|
65
118
|
}[];
|
|
66
119
|
inputGuardrailRules?: GuardrailRule[];
|
|
67
120
|
sourceIds?: string[];
|
|
121
|
+
previousHubtypeMessages?: HubtypeAssistantMessage[];
|
|
122
|
+
}
|
|
123
|
+
export interface AiAgentRouterSpecialistArgs {
|
|
124
|
+
type: AiAgentType.Specialist;
|
|
125
|
+
name: string;
|
|
126
|
+
description: string;
|
|
127
|
+
instructions: string;
|
|
128
|
+
model: string;
|
|
129
|
+
verbosity: VerbosityLevel;
|
|
130
|
+
activeTools: {
|
|
131
|
+
name: string;
|
|
132
|
+
}[];
|
|
133
|
+
inputGuardrailRules: GuardrailRule[];
|
|
134
|
+
sourceIds: string[];
|
|
135
|
+
}
|
|
136
|
+
export interface AiAgentRouterArgs {
|
|
137
|
+
type: AiAgentType.Router;
|
|
138
|
+
name: string;
|
|
139
|
+
instructions: string;
|
|
140
|
+
model: string;
|
|
141
|
+
verbosity: VerbosityLevel;
|
|
142
|
+
specialists: AiAgentRouterSpecialistArgs[];
|
|
143
|
+
inputGuardrailRules?: GuardrailRule[];
|
|
144
|
+
previousHubtypeMessages?: HubtypeAssistantMessage[];
|
|
68
145
|
}
|
|
146
|
+
export type AiAgentArgs = AiAgentSpecialistArgs | AiAgentRouterArgs;
|
|
69
147
|
export {};
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var OutputAiAgentMessageType;
|
|
2
|
+
(function (OutputAiAgentMessageType) {
|
|
3
|
+
OutputAiAgentMessageType["Text"] = "text";
|
|
4
|
+
OutputAiAgentMessageType["TextWithButtons"] = "textWithButtons";
|
|
5
|
+
OutputAiAgentMessageType["BotExecutor"] = "botExecutor";
|
|
6
|
+
OutputAiAgentMessageType["Carousel"] = "carousel";
|
|
7
|
+
OutputAiAgentMessageType["Exit"] = "exit";
|
|
8
|
+
OutputAiAgentMessageType["FlowBuilderContent"] = "flowBuilderContent";
|
|
9
|
+
})(OutputAiAgentMessageType || (OutputAiAgentMessageType = {}));
|
|
10
|
+
export var VerbosityLevel;
|
|
11
|
+
(function (VerbosityLevel) {
|
|
12
|
+
VerbosityLevel["Low"] = "low";
|
|
13
|
+
VerbosityLevel["Medium"] = "medium";
|
|
14
|
+
VerbosityLevel["High"] = "high";
|
|
15
|
+
})(VerbosityLevel || (VerbosityLevel = {}));
|
|
16
|
+
export var AiAgentType;
|
|
17
|
+
(function (AiAgentType) {
|
|
18
|
+
AiAgentType["Specialist"] = "specialist";
|
|
19
|
+
AiAgentType["Router"] = "router";
|
|
20
|
+
})(AiAgentType || (AiAgentType = {}));
|
|
2
21
|
//# sourceMappingURL=ai-agents-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agents-types.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/ai-agents-types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ai-agents-types.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/ai-agents-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,yCAAa,CAAA;IACb,+DAAmC,CAAA;IACnC,uDAA2B,CAAA;IAC3B,iDAAqB,CAAA;IACrB,yCAAa,CAAA;IACb,qEAAyC,CAAA;AAC3C,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,QAOnC;AAwGD,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAYD,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,wCAAyB,CAAA;IACzB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { BotonicButtonMessageData, BotonicCarouselData, BotonicCustomData, BotonicLocationData, BotonicTextData, BotonicTypingEventData } from './types';
|
|
1
|
+
import type { BotonicButtonMessageData, BotonicCarouselData, BotonicCustomData, BotonicLocationData, BotonicRatingData, BotonicSystemDebugTraceData, BotonicTextData, BotonicTypingEventData } from './types';
|
|
2
2
|
import { BotonicAttachmentData } from './types';
|
|
3
3
|
import { MessageType } from './types';
|
|
4
4
|
import type { WebchatClientSettings } from './webchat-client-settings';
|
|
5
5
|
import type { BotonicWhatsappButtonListData, BotonicWhatsappCatalogData, BotonicWhatsappCTAUrlButtonData, BotonicWhatsappMediaCarouselData, BotonicWhatsappProductCarouselData, BotonicWhatsappProductData, BotonicWhatsappProductListData, BotonicWhatsappTemplateData } from './whatsapp-outputs';
|
|
6
|
-
export type OutputMessageType = MessageType.Text | MessageType.Audio | MessageType.Image | MessageType.Video | MessageType.Document | MessageType.Location | MessageType.ButtonMessage | MessageType.Carousel | MessageType.Custom | MessageType.TypingEvent | MessageType.WhatsappTemplate | MessageType.WhatsappButtonList | MessageType.WhatsappCTAUrlButton | MessageType.WhatsappCatalog | MessageType.WhatsappProduct | MessageType.WhatsappProductList | MessageType.WhatsappProductCarousel | MessageType.WhatsappMediaCarousel | MessageType.WebchatClientSettings;
|
|
6
|
+
export type OutputMessageType = MessageType.Text | MessageType.Audio | MessageType.Image | MessageType.Video | MessageType.Document | MessageType.Location | MessageType.ButtonMessage | MessageType.Carousel | MessageType.Custom | MessageType.TypingEvent | MessageType.WhatsappTemplate | MessageType.WhatsappButtonList | MessageType.WhatsappCTAUrlButton | MessageType.WhatsappCatalog | MessageType.WhatsappProduct | MessageType.WhatsappProductList | MessageType.WhatsappProductCarousel | MessageType.WhatsappMediaCarousel | MessageType.WebchatClientSettings | MessageType.Rating | MessageType.SystemDebugTrace;
|
|
7
7
|
export type BotonicOutputAttachmentExtraFields = {
|
|
8
8
|
file_info?: Record<string, unknown>;
|
|
9
9
|
caption?: string;
|
|
@@ -42,6 +42,8 @@ export type OutputMessageTypeMap = {
|
|
|
42
42
|
[MessageType.WhatsappProductCarousel]: BotonicWhatsappProductCarouselData;
|
|
43
43
|
[MessageType.WhatsappMediaCarousel]: BotonicWhatsappMediaCarouselData;
|
|
44
44
|
[MessageType.WebchatClientSettings]: WebchatClientSettings;
|
|
45
|
+
[MessageType.Rating]: BotonicRatingData;
|
|
46
|
+
[MessageType.SystemDebugTrace]: BotonicSystemDebugTraceData;
|
|
45
47
|
};
|
|
46
48
|
export declare abstract class BotonicOutput<T extends keyof OutputMessageTypeMap = keyof OutputMessageTypeMap> {
|
|
47
49
|
readonly type: T;
|
|
@@ -105,4 +107,10 @@ export declare class BotonicOutputWhatsappMediaCarousel extends BotonicOutput<Me
|
|
|
105
107
|
export declare class BotonicOutputWebchatClientSettings extends BotonicOutput<MessageType.WebchatClientSettings> {
|
|
106
108
|
constructor(data: WebchatClientSettings);
|
|
107
109
|
}
|
|
108
|
-
export
|
|
110
|
+
export declare class BotonicOutputRating extends BotonicOutput<MessageType.Rating> {
|
|
111
|
+
constructor(data: BotonicRatingData);
|
|
112
|
+
}
|
|
113
|
+
export declare class BotonicOutputSystemDebugTrace extends BotonicOutput<MessageType.SystemDebugTrace> {
|
|
114
|
+
constructor(data: BotonicSystemDebugTraceData);
|
|
115
|
+
}
|
|
116
|
+
export type BotonicOutputType = BotonicOutputText | BotonicOutputAudio | BotonicOutputImage | BotonicOutputVideo | BotonicOutputDocument | BotonicOutputLocation | BotonicOutputButtonMessage | BotonicOutputCarousel | BotonicOutputCustom | BotonicOutputTypingEvent | BotonicOutputWhatsappTemplate | BotonicOutputWhatsappButtonList | BotonicOutputWhatsappCTAUrlButton | BotonicOutputWhatsappCatalog | BotonicOutputWhatsappProduct | BotonicOutputWhatsappProductList | BotonicOutputWhatsappProductCarousel | BotonicOutputWhatsappMediaCarousel | BotonicOutputWebchatClientSettings | BotonicOutputRating | BotonicOutputSystemDebugTrace;
|
|
@@ -122,4 +122,14 @@ export class BotonicOutputWebchatClientSettings extends BotonicOutput {
|
|
|
122
122
|
super(MessageType.WebchatClientSettings, data);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
export class BotonicOutputRating extends BotonicOutput {
|
|
126
|
+
constructor(data) {
|
|
127
|
+
super(MessageType.Rating, data);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export class BotonicOutputSystemDebugTrace extends BotonicOutput {
|
|
131
|
+
constructor(data) {
|
|
132
|
+
super(MessageType.SystemDebugTrace, data);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
125
135
|
//# sourceMappingURL=outputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/outputs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/outputs.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AA6DrC,MAAM,OAAO,2BAA4B,SAAQ,qBAAqB;IAIpE,YAAY,IAAmC;QAC7C,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;QACnD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAA;QAC/B,IAA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C1F,YAAY,IAAgC;QAC1C,KAAK,CAAC,WAAW,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC;CACF;AAED,MAAM,OAAO,gCAAiC,SAAQ,aAA8C;IAClG,YAAY,IAAoC;QAC9C,KAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;IAC9C,CAAC;CACF;AAED,MAAM,OAAO,oCAAqC,SAAQ,aAAkD;IAC1G,YAAY,IAAwC;QAClD,KAAK,CAAC,WAAW,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAA;IAClD,CAAC;CACF;AAED,MAAM,OAAO,kCAAmC,SAAQ,aAAgD;IACtG,YAAY,IAAsC;QAChD,KAAK,CAAC,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAA;IAChD,CAAC;CACF;AAED,MAAM,OAAO,kCAAmC,SAAQ,aAAgD;IACtG,YAAY,IAA2B;QACrC,KAAK,CAAC,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAA;IAChD,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,aAAiC;IACxE,YAAY,IAAuB;QACjC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC;CACF;AAED,MAAM,OAAO,6BAA8B,SAAQ,aAA2C;IAC5F,YAAY,IAAiC;QAC3C,KAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface HubtypeExtractionJob {
|
|
2
|
+
id: string;
|
|
3
|
+
fileName: string;
|
|
4
|
+
fileUrl: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
status: string;
|
|
8
|
+
hash: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface HubtypeSource {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
type: string;
|
|
15
|
+
scrapingCountryCode?: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
createdBy: string;
|
|
18
|
+
lastUpdatedAt: string;
|
|
19
|
+
lastUpdatedBy: string;
|
|
20
|
+
activeExtractionJob: HubtypeExtractionJob;
|
|
21
|
+
lastExtractionJob: HubtypeExtractionJob;
|
|
22
|
+
}
|
|
23
|
+
export interface HubtypeChunk {
|
|
24
|
+
id: string;
|
|
25
|
+
text: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ChunkIdsGroupedBySourceData {
|
|
28
|
+
source: HubtypeSource;
|
|
29
|
+
chunks: HubtypeChunk[];
|
|
30
|
+
}
|
|
31
|
+
export interface PreviewToolExecution {
|
|
32
|
+
toolName: string;
|
|
33
|
+
toolArguments: Record<string, unknown>;
|
|
34
|
+
knowledgebaseSourcesIds?: string[];
|
|
35
|
+
knowledgebaseChunksIds?: string[];
|
|
36
|
+
}
|
|
37
|
+
export interface PreviewUtils {
|
|
38
|
+
getChunkIdsGroupedBySource: (chunkIds: string[]) => Promise<ChunkIdsGroupedBySourceData[]>;
|
|
39
|
+
onClickOpenChunks: (chunkIdsGroupedBySource: ChunkIdsGroupedBySourceData[]) => void;
|
|
40
|
+
onClickOpenToolResults: (toolExecution: PreviewToolExecution) => void;
|
|
41
|
+
getMessageById: (messageId: string) => Promise<unknown>;
|
|
42
|
+
trackPreviewEventOpened: (eventProperties: Record<string, unknown>) => void;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-utils.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/preview-utils.ts"],"names":[],"mappings":""}
|
|
@@ -59,5 +59,7 @@ export interface BotonicSession<TExtraData extends UserExtraData = UserExtraData
|
|
|
59
59
|
webchat_client_settings?: WebchatClientSettings;
|
|
60
60
|
/** Flow Builder: node id capturing user input (snake_case in API JSON). `null` clears. */
|
|
61
61
|
capture_user_input_node_id?: string | null;
|
|
62
|
+
/** Flow Builder: whether system locale was updated (snake_case in API JSON). */
|
|
63
|
+
system_locale_updated?: boolean;
|
|
62
64
|
}
|
|
63
65
|
export {};
|
|
@@ -7,6 +7,7 @@ export interface BotonicSettings {
|
|
|
7
7
|
AZURE_OPENAI_API_BASE?: string;
|
|
8
8
|
AZURE_OPENAI_API_VERSION?: string;
|
|
9
9
|
CUSTOM_SHORT_URL_HOST?: string;
|
|
10
|
+
LANGUAGE_DETECTION_ENABLED?: boolean;
|
|
10
11
|
custom?: Record<string, any>;
|
|
11
12
|
}
|
|
12
13
|
/** Lambda `secrets` object shape (subset), aligned with backend `BotonicSecrets.model_dump`. */
|
|
@@ -21,7 +21,10 @@ export declare enum MessageType {
|
|
|
21
21
|
WhatsappProductList = "whatsapp_product_list",
|
|
22
22
|
WhatsappProductCarousel = "whatsapp_product_carousel",
|
|
23
23
|
WhatsappMediaCarousel = "whatsapp_media_carousel",
|
|
24
|
-
WebchatClientSettings = "webchat_client_settings"
|
|
24
|
+
WebchatClientSettings = "webchat_client_settings",
|
|
25
|
+
Rating = "rating",
|
|
26
|
+
SystemDebugTrace = "system_debug_trace",
|
|
27
|
+
EventQueuePositionChanged = "case_event_queue_position_changed"
|
|
25
28
|
}
|
|
26
29
|
export declare class BotonicTextData {
|
|
27
30
|
text: string;
|
|
@@ -43,6 +46,8 @@ export declare abstract class BotonicAttachmentData {
|
|
|
43
46
|
getMediaSrc(): string;
|
|
44
47
|
}
|
|
45
48
|
export declare class BotonicAudioData extends BotonicAttachmentData {
|
|
49
|
+
transcript?: string | undefined;
|
|
50
|
+
constructor(attachment_url?: string, attachment_content?: string, caption?: string, mime_type?: string, filename?: string, transcript?: string | undefined);
|
|
46
51
|
}
|
|
47
52
|
export declare class BotonicImageData extends BotonicAttachmentData {
|
|
48
53
|
}
|
|
@@ -69,7 +74,8 @@ export declare class BotonicTypingEventData {
|
|
|
69
74
|
export declare enum MessageSentBy {
|
|
70
75
|
Bot = "message_sent_by_bot",
|
|
71
76
|
User = "message_sent_by_enduser",
|
|
72
|
-
Agent = "message_sent_by_agent"
|
|
77
|
+
Agent = "message_sent_by_agent",
|
|
78
|
+
System = "message_sent_by_system"
|
|
73
79
|
}
|
|
74
80
|
export declare enum BotonicButtonType {
|
|
75
81
|
WebUrl = "web_url",
|
|
@@ -103,6 +109,28 @@ export declare class BotonicCustomData {
|
|
|
103
109
|
props: Record<string, unknown>;
|
|
104
110
|
constructor(name: string, props: Record<string, unknown>);
|
|
105
111
|
}
|
|
112
|
+
export interface WebchatOutputRatingButton {
|
|
113
|
+
title: string;
|
|
114
|
+
payload: string;
|
|
115
|
+
value: number;
|
|
116
|
+
}
|
|
117
|
+
export declare const RatingTypes: {
|
|
118
|
+
readonly Stars: "stars";
|
|
119
|
+
readonly Smileys: "smileys";
|
|
120
|
+
};
|
|
121
|
+
export type RatingType = (typeof RatingTypes)[keyof typeof RatingTypes];
|
|
122
|
+
export declare class BotonicRatingData {
|
|
123
|
+
text: string;
|
|
124
|
+
type: RatingType;
|
|
125
|
+
buttons: WebchatOutputRatingButton[];
|
|
126
|
+
send_button_text?: string | undefined;
|
|
127
|
+
open_list_button_text?: string | undefined;
|
|
128
|
+
constructor(text: string, type: RatingType, buttons: WebchatOutputRatingButton[], send_button_text?: string | undefined, open_list_button_text?: string | undefined);
|
|
129
|
+
}
|
|
130
|
+
export declare class BotonicSystemDebugTraceData {
|
|
131
|
+
readonly event_data: Record<string, unknown>;
|
|
132
|
+
constructor(data: Record<string, unknown>);
|
|
133
|
+
}
|
|
106
134
|
/** Contact message (ImpMsgContact). Empty strings for last_name/phone_number become null. */
|
|
107
135
|
export declare class BotonicContactData {
|
|
108
136
|
first_name: string;
|
|
@@ -111,4 +139,4 @@ export declare class BotonicContactData {
|
|
|
111
139
|
vcard?: string | undefined;
|
|
112
140
|
constructor(first_name: string, last_name?: string | undefined, phone_number?: string | undefined, vcard?: string | undefined);
|
|
113
141
|
}
|
|
114
|
-
export type BotonicData = BotonicTextData | BotonicPostbackData | BotonicAudioData | BotonicImageData | BotonicVideoData | BotonicDocumentData | BotonicLocationData | BotonicContactData | BotonicTypingEventData | BotonicButtonMessageData | BotonicCarouselData | BotonicCustomData | BotonicContactData | BotonicWhatsappButtonListData | BotonicWhatsappCatalogData | BotonicWhatsappCTAUrlButtonData | BotonicWhatsappMediaCarouselData | BotonicWhatsappProductCarouselData | BotonicWhatsappProductData | BotonicWhatsappProductListData | BotonicWhatsappTemplateData | WebchatClientSettings;
|
|
142
|
+
export type BotonicData = BotonicTextData | BotonicPostbackData | BotonicAudioData | BotonicImageData | BotonicVideoData | BotonicDocumentData | BotonicLocationData | BotonicContactData | BotonicTypingEventData | BotonicButtonMessageData | BotonicCarouselData | BotonicCustomData | BotonicRatingData | BotonicContactData | BotonicWhatsappButtonListData | BotonicWhatsappCatalogData | BotonicWhatsappCTAUrlButtonData | BotonicWhatsappMediaCarouselData | BotonicWhatsappProductCarouselData | BotonicWhatsappProductData | BotonicWhatsappProductListData | BotonicWhatsappTemplateData | WebchatClientSettings | BotonicSystemDebugTraceData;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
import { BotonicMissingAttachmentUrlOrContentException } from './exceptions';
|
|
1
3
|
// ============================================================================
|
|
2
4
|
// MESSAGE TYPE ENUMS
|
|
3
5
|
// ============================================================================
|
|
4
|
-
import { BotonicMissingAttachmentUrlOrContentException } from './exceptions';
|
|
5
6
|
// All possible message types
|
|
6
7
|
export var MessageType;
|
|
7
8
|
(function (MessageType) {
|
|
@@ -26,6 +27,10 @@ export var MessageType;
|
|
|
26
27
|
MessageType["WhatsappProductCarousel"] = "whatsapp_product_carousel";
|
|
27
28
|
MessageType["WhatsappMediaCarousel"] = "whatsapp_media_carousel";
|
|
28
29
|
MessageType["WebchatClientSettings"] = "webchat_client_settings";
|
|
30
|
+
MessageType["Rating"] = "rating";
|
|
31
|
+
MessageType["SystemDebugTrace"] = "system_debug_trace";
|
|
32
|
+
// TODO: We need to add MessageType.EventQueuePositionChanged for BotonicV2 in the backend
|
|
33
|
+
MessageType["EventQueuePositionChanged"] = "case_event_queue_position_changed";
|
|
29
34
|
})(MessageType || (MessageType = {}));
|
|
30
35
|
// ============================================================================
|
|
31
36
|
// BOTONIC DATA UNITS
|
|
@@ -59,6 +64,10 @@ export class BotonicAttachmentData {
|
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
export class BotonicAudioData extends BotonicAttachmentData {
|
|
67
|
+
constructor(attachment_url, attachment_content, caption, mime_type, filename, transcript) {
|
|
68
|
+
super(attachment_url, attachment_content, caption, mime_type, filename);
|
|
69
|
+
this.transcript = transcript;
|
|
70
|
+
}
|
|
62
71
|
}
|
|
63
72
|
export class BotonicImageData extends BotonicAttachmentData {
|
|
64
73
|
}
|
|
@@ -90,6 +99,7 @@ export var MessageSentBy;
|
|
|
90
99
|
MessageSentBy["Bot"] = "message_sent_by_bot";
|
|
91
100
|
MessageSentBy["User"] = "message_sent_by_enduser";
|
|
92
101
|
MessageSentBy["Agent"] = "message_sent_by_agent";
|
|
102
|
+
MessageSentBy["System"] = "message_sent_by_system";
|
|
93
103
|
})(MessageSentBy || (MessageSentBy = {}));
|
|
94
104
|
export var BotonicButtonType;
|
|
95
105
|
(function (BotonicButtonType) {
|
|
@@ -114,6 +124,25 @@ export class BotonicCustomData {
|
|
|
114
124
|
this.props = props;
|
|
115
125
|
}
|
|
116
126
|
}
|
|
127
|
+
export const RatingTypes = {
|
|
128
|
+
Stars: 'stars',
|
|
129
|
+
Smileys: 'smileys',
|
|
130
|
+
};
|
|
131
|
+
export class BotonicRatingData {
|
|
132
|
+
constructor(text, type, buttons, send_button_text, open_list_button_text) {
|
|
133
|
+
this.text = text;
|
|
134
|
+
this.type = type;
|
|
135
|
+
this.buttons = buttons;
|
|
136
|
+
this.send_button_text = send_button_text;
|
|
137
|
+
this.open_list_button_text = open_list_button_text;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export class BotonicSystemDebugTraceData {
|
|
141
|
+
constructor(data) {
|
|
142
|
+
var _a;
|
|
143
|
+
this.event_data = (_a = data.event_data) !== null && _a !== void 0 ? _a : data;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
117
146
|
/** Contact message (ImpMsgContact). Empty strings for last_name/phone_number become null. */
|
|
118
147
|
export class BotonicContactData {
|
|
119
148
|
constructor(first_name, last_name, phone_number, vcard) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/types.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,6CAA6C,EAAE,MAAM,cAAc,CAAA;AAa5E,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAC/E,6BAA6B;AAC7B,MAAM,CAAN,IAAY,WA0BX;AA1BD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,+CAAgC,CAAA;IAChC,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,2CAA4B,CAAA;IAC5B,qDAAsC,CAAA;IACtC,0DAA2C,CAAA;IAC3C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;IACpC,4DAA6C,CAAA;IAC7C,oEAAqD,CAAA;IACrD,gEAAiD,CAAA;IACjD,gEAAiD,CAAA;IACjD,gCAAiB,CAAA;IACjB,sDAAuC,CAAA;IACvC,0FAA0F;IAC1F,8EAA+D,CAAA;AACjE,C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,CAAyB;IACpC,CAAC;CACL;AAQD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAA;AAIV,MAAM,OAAO,iBAAiB;IAC5B,YACS,IAAY,EACZ,IAAgB,EAChB,OAAoC,EACpC,gBAAyB,EACzB,qBAA8B;QAJ9B,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAY;QAChB,YAAO,GAAP,OAAO,CAA6B;QACpC,qBAAgB,GAAhB,gBAAgB,CAAS;QACzB,0BAAqB,GAArB,qBAAqB,CAAS;IACpC,CAAC;CACL;AAED,MAAM,OAAO,2BAA2B;IAGtC,YAAY,IAA6B;;QACvC,IAAI,CAAC,UAAU,GAAG,MAAC,IAAI,CAAC,UAAsC,mCAAI,IAAI,CAAA;IACxE,CAAC;CACF;AAED,6FAA6F;AAC7F,MAAM,OAAO,kBAAkB;IAC7B,YACS,UAAkB,EAClB,SAAkB,EAClB,YAAqB,EACrB,KAAc;QAHd,eAAU,GAAV,UAAU,CAAQ;QAClB,cAAS,GAAT,SAAS,CAAS;QAClB,iBAAY,GAAZ,YAAY,CAAS;QACrB,UAAK,GAAL,KAAK,CAAS;IACpB,CAAC;CACL"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/webchat-outputs/index.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/index.ts"],"names":[],"mappings":""}
|
package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/webchat-output-rating.d.ts
ADDED
|
File without changes
|
package/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/webchat-output-rating.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webchat-output-rating.js","sourceRoot":"","sources":["../../../../../../../../../../libs/botonic/shared/src/lib/domain/botonic/webchat-outputs/webchat-output-rating/webchat-output-rating.ts"],"names":[],"mappings":""}
|
|
@@ -2,6 +2,7 @@ import { ToolExecution } from './ai-agents-types';
|
|
|
2
2
|
export declare const EVENT_FORMAT_VERSION = 5;
|
|
3
3
|
export declare enum EventAction {
|
|
4
4
|
AiAgent = "ai_agent",
|
|
5
|
+
AiAgentRouter = "ai_agent_router",
|
|
5
6
|
FeedbackCase = "feedback_case",
|
|
6
7
|
FeedbackMessage = "feedback_message",
|
|
7
8
|
FeedbackConversation = "feedback_conversation",
|
|
@@ -179,6 +180,21 @@ export interface EventRedirectFlow extends HtBaseEventAllFlowProps {
|
|
|
179
180
|
flowTargetId: string;
|
|
180
181
|
flowTargetName: string;
|
|
181
182
|
}
|
|
183
|
+
export interface EventAiAgentRouter extends HtBaseEventAllFlowProps {
|
|
184
|
+
action: EventAction.AiAgentRouter;
|
|
185
|
+
inputGuardrailsTriggered: string[];
|
|
186
|
+
outputGuardrailsTriggered: string[];
|
|
187
|
+
exit: boolean;
|
|
188
|
+
startingAgentName: string;
|
|
189
|
+
lastAgentName: string;
|
|
190
|
+
availableSpecialists: {
|
|
191
|
+
name: string;
|
|
192
|
+
description: string;
|
|
193
|
+
}[];
|
|
194
|
+
isTransferredToSpecialist: boolean;
|
|
195
|
+
memoryLength: number;
|
|
196
|
+
toolsExecuted: ToolExecution[];
|
|
197
|
+
}
|
|
182
198
|
export interface EventCaptureUserInput extends HtBaseEventAllFlowProps {
|
|
183
199
|
action: EventAction.CaptureUserInput;
|
|
184
200
|
fieldName: string;
|
|
@@ -224,4 +240,4 @@ export interface EventCustom extends HtBaseEventProps {
|
|
|
224
240
|
customFields?: Record<string, any>;
|
|
225
241
|
customSensitiveFields?: Record<string, any>;
|
|
226
242
|
}
|
|
227
|
-
export type HtEventProps = EventCaptureUserInput | EventFeedback | EventFeedbackKnowledgebase | EventFlow | EventBotAction | EventConditionalChannel | EventConditionalCountry | EventConditionalCustom | EventConditionalQueueStatus | EventHandoff | EventHandoffOption | EventKeyword | EventIntentSmart | EventKnowledgeBase | EventWebviewActionTriggered | EventFallback | EventWebviewStep | EventWebviewEnd | EventCustom | EventAiAgent | EventRedirectFlow;
|
|
243
|
+
export type HtEventProps = EventCaptureUserInput | EventFeedback | EventFeedbackKnowledgebase | EventFlow | EventBotAction | EventConditionalChannel | EventConditionalCountry | EventConditionalCustom | EventConditionalQueueStatus | EventHandoff | EventHandoffOption | EventKeyword | EventIntentSmart | EventKnowledgeBase | EventWebviewActionTriggered | EventFallback | EventWebviewStep | EventWebviewEnd | EventCustom | EventAiAgent | EventAiAgentRouter | EventRedirectFlow;
|
|
@@ -2,6 +2,7 @@ export const EVENT_FORMAT_VERSION = 5;
|
|
|
2
2
|
export var EventAction;
|
|
3
3
|
(function (EventAction) {
|
|
4
4
|
EventAction["AiAgent"] = "ai_agent";
|
|
5
|
+
EventAction["AiAgentRouter"] = "ai_agent_router";
|
|
5
6
|
EventAction["FeedbackCase"] = "feedback_case";
|
|
6
7
|
EventAction["FeedbackMessage"] = "feedback_message";
|
|
7
8
|
EventAction["FeedbackConversation"] = "feedback_conversation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hubtype-analytics-types.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/hubtype-analytics-types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"hubtype-analytics-types.js","sourceRoot":"","sources":["../../../../../../libs/botonic/shared/src/lib/hubtype-analytics-types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,MAAM,CAAN,IAAY,WA2BX;AA3BD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,gDAAiC,CAAA;IACjC,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,yDAA0C,CAAA;IAC1C,kEAAmD,CAAA;IACnD,uDAAwC,CAAA;IACxC,yDAA0C,CAAA;IAC1C,uCAAwB,CAAA;IACxB,kEAAmD,CAAA;IACnD,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;IACjB,6CAA8B,CAAA;IAC9B,sDAAuC,CAAA;AACzC,CAAC,EA3BW,WAAW,KAAX,WAAW,QA2BtB;AAqJD,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AA6ED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
|