@botonic/core 0.56.0-alpha.0 → 0.57.0-rslib-esm.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.
Files changed (175) hide show
  1. package/lib/constants.js +8 -0
  2. package/lib/constants.js.map +1 -0
  3. package/lib/{esm/core-bot.d.ts → core-bot.d.ts} +3 -3
  4. package/lib/{cjs/core-bot.js → core-bot.js} +87 -50
  5. package/lib/core-bot.js.map +1 -0
  6. package/lib/debug/index.d.ts +1 -0
  7. package/lib/debug/index.js +6 -0
  8. package/lib/debug/index.js.map +1 -0
  9. package/lib/{cjs/debug → debug}/inspector.d.ts +1 -1
  10. package/lib/{cjs/debug → debug}/inspector.js +27 -21
  11. package/lib/debug/inspector.js.map +1 -0
  12. package/lib/{cjs/handoff.d.ts → handoff.d.ts} +1 -1
  13. package/lib/{esm/handoff.js → handoff.js} +82 -53
  14. package/lib/handoff.js.map +1 -0
  15. package/lib/{esm/hubtype-service.d.ts → hubtype-service.d.ts} +3 -3
  16. package/lib/{cjs/hubtype-service.js → hubtype-service.js} +100 -64
  17. package/lib/hubtype-service.js.map +1 -0
  18. package/lib/index.d.ts +9 -0
  19. package/lib/index.js +22 -0
  20. package/lib/index.js.map +1 -0
  21. package/lib/{esm/models → models}/ai-agents.d.ts +1 -8
  22. package/lib/models/ai-agents.js +30 -0
  23. package/lib/models/ai-agents.js.map +1 -0
  24. package/lib/models/bot-config.js +10 -0
  25. package/lib/models/bot-config.js.map +1 -0
  26. package/lib/{esm/models → models}/hubtype-analytics.d.ts +1 -1
  27. package/lib/{esm/models → models}/hubtype-analytics.js +10 -10
  28. package/lib/models/hubtype-analytics.js.map +1 -0
  29. package/lib/models/index.d.ts +4 -0
  30. package/lib/models/index.js +12 -0
  31. package/lib/models/index.js.map +1 -0
  32. package/lib/{esm/models → models}/legacy-types.js +24 -24
  33. package/lib/models/legacy-types.js.map +1 -0
  34. package/lib/{cjs/plugins.d.ts → plugins.d.ts} +1 -1
  35. package/lib/{esm/plugins.js → plugins.js} +7 -8
  36. package/lib/plugins.js.map +1 -0
  37. package/lib/pusher-utils.js +23 -0
  38. package/lib/pusher-utils.js.map +1 -0
  39. package/lib/routing/index.d.ts +2 -0
  40. package/lib/routing/index.js +8 -0
  41. package/lib/routing/index.js.map +1 -0
  42. package/lib/{cjs/routing → routing}/router-utils.d.ts +1 -1
  43. package/lib/{cjs/routing → routing}/router-utils.js +37 -30
  44. package/lib/routing/router-utils.js.map +1 -0
  45. package/lib/{cjs/routing → routing}/router.d.ts +2 -2
  46. package/lib/routing/router.js +333 -0
  47. package/lib/routing/router.js.map +1 -0
  48. package/lib/{esm/testing → testing}/index.d.ts +1 -1
  49. package/lib/testing/index.js +162 -0
  50. package/lib/testing/index.js.map +1 -0
  51. package/lib/{cjs/utils → utils}/bot-config.d.ts +1 -1
  52. package/lib/{esm/utils → utils}/bot-config.js +57 -28
  53. package/lib/utils/bot-config.js.map +1 -0
  54. package/lib/{cjs/utils → utils}/check-providers.d.ts +1 -1
  55. package/lib/utils/check-providers.js +31 -0
  56. package/lib/utils/check-providers.js.map +1 -0
  57. package/lib/utils/functional.js +69 -0
  58. package/lib/utils/functional.js.map +1 -0
  59. package/lib/utils/index.d.ts +3 -0
  60. package/lib/utils/index.js +10 -0
  61. package/lib/utils/index.js.map +1 -0
  62. package/package.json +14 -12
  63. package/src/hubtype-service.ts +4 -2
  64. package/src/models/ai-agents.ts +0 -9
  65. package/lib/cjs/constants.js +0 -8
  66. package/lib/cjs/constants.js.map +0 -1
  67. package/lib/cjs/core-bot.d.ts +0 -43
  68. package/lib/cjs/core-bot.js.map +0 -1
  69. package/lib/cjs/debug/index.d.ts +0 -1
  70. package/lib/cjs/debug/index.js +0 -5
  71. package/lib/cjs/debug/index.js.map +0 -1
  72. package/lib/cjs/debug/inspector.js.map +0 -1
  73. package/lib/cjs/handoff.js +0 -238
  74. package/lib/cjs/handoff.js.map +0 -1
  75. package/lib/cjs/hubtype-service.d.ts +0 -58
  76. package/lib/cjs/hubtype-service.js.map +0 -1
  77. package/lib/cjs/index.d.ts +0 -9
  78. package/lib/cjs/index.js +0 -13
  79. package/lib/cjs/index.js.map +0 -1
  80. package/lib/cjs/models/ai-agents.d.ts +0 -147
  81. package/lib/cjs/models/ai-agents.js +0 -31
  82. package/lib/cjs/models/ai-agents.js.map +0 -1
  83. package/lib/cjs/models/bot-config.js +0 -10
  84. package/lib/cjs/models/bot-config.js.map +0 -1
  85. package/lib/cjs/models/hubtype-analytics.d.ts +0 -210
  86. package/lib/cjs/models/hubtype-analytics.js +0 -38
  87. package/lib/cjs/models/hubtype-analytics.js.map +0 -1
  88. package/lib/cjs/models/index.d.ts +0 -4
  89. package/lib/cjs/models/index.js +0 -8
  90. package/lib/cjs/models/index.js.map +0 -1
  91. package/lib/cjs/models/legacy-types.js +0 -84
  92. package/lib/cjs/models/legacy-types.js.map +0 -1
  93. package/lib/cjs/plugins.js +0 -24
  94. package/lib/cjs/plugins.js.map +0 -1
  95. package/lib/cjs/pusher-utils.js +0 -18
  96. package/lib/cjs/pusher-utils.js.map +0 -1
  97. package/lib/cjs/routing/index.d.ts +0 -2
  98. package/lib/cjs/routing/index.js +0 -6
  99. package/lib/cjs/routing/index.js.map +0 -1
  100. package/lib/cjs/routing/router-utils.js.map +0 -1
  101. package/lib/cjs/routing/router.js +0 -330
  102. package/lib/cjs/routing/router.js.map +0 -1
  103. package/lib/cjs/testing/index.d.ts +0 -91
  104. package/lib/cjs/testing/index.js +0 -196
  105. package/lib/cjs/testing/index.js.map +0 -1
  106. package/lib/cjs/utils/bot-config.js +0 -94
  107. package/lib/cjs/utils/bot-config.js.map +0 -1
  108. package/lib/cjs/utils/check-providers.js +0 -34
  109. package/lib/cjs/utils/check-providers.js.map +0 -1
  110. package/lib/cjs/utils/functional.js +0 -88
  111. package/lib/cjs/utils/functional.js.map +0 -1
  112. package/lib/cjs/utils/index.d.ts +0 -3
  113. package/lib/cjs/utils/index.js +0 -7
  114. package/lib/cjs/utils/index.js.map +0 -1
  115. package/lib/esm/constants.d.ts +0 -4
  116. package/lib/esm/constants.js +0 -8
  117. package/lib/esm/constants.js.map +0 -1
  118. package/lib/esm/core-bot.js +0 -205
  119. package/lib/esm/core-bot.js.map +0 -1
  120. package/lib/esm/debug/index.d.ts +0 -1
  121. package/lib/esm/debug/index.js +0 -5
  122. package/lib/esm/debug/index.js.map +0 -1
  123. package/lib/esm/debug/inspector.d.ts +0 -24
  124. package/lib/esm/debug/inspector.js +0 -70
  125. package/lib/esm/debug/inspector.js.map +0 -1
  126. package/lib/esm/handoff.d.ts +0 -110
  127. package/lib/esm/handoff.js.map +0 -1
  128. package/lib/esm/hubtype-service.js +0 -205
  129. package/lib/esm/hubtype-service.js.map +0 -1
  130. package/lib/esm/index.d.ts +0 -9
  131. package/lib/esm/index.js +0 -13
  132. package/lib/esm/index.js.map +0 -1
  133. package/lib/esm/models/ai-agents.js +0 -31
  134. package/lib/esm/models/ai-agents.js.map +0 -1
  135. package/lib/esm/models/bot-config.d.ts +0 -24
  136. package/lib/esm/models/bot-config.js +0 -10
  137. package/lib/esm/models/bot-config.js.map +0 -1
  138. package/lib/esm/models/hubtype-analytics.js.map +0 -1
  139. package/lib/esm/models/index.d.ts +0 -4
  140. package/lib/esm/models/index.js +0 -8
  141. package/lib/esm/models/index.js.map +0 -1
  142. package/lib/esm/models/legacy-types.d.ts +0 -332
  143. package/lib/esm/models/legacy-types.js.map +0 -1
  144. package/lib/esm/plugins.d.ts +0 -9
  145. package/lib/esm/plugins.js.map +0 -1
  146. package/lib/esm/pusher-utils.d.ts +0 -7
  147. package/lib/esm/pusher-utils.js +0 -18
  148. package/lib/esm/pusher-utils.js.map +0 -1
  149. package/lib/esm/routing/index.d.ts +0 -2
  150. package/lib/esm/routing/index.js +0 -6
  151. package/lib/esm/routing/index.js.map +0 -1
  152. package/lib/esm/routing/router-utils.d.ts +0 -11
  153. package/lib/esm/routing/router-utils.js +0 -96
  154. package/lib/esm/routing/router-utils.js.map +0 -1
  155. package/lib/esm/routing/router.d.ts +0 -54
  156. package/lib/esm/routing/router.js +0 -330
  157. package/lib/esm/routing/router.js.map +0 -1
  158. package/lib/esm/testing/index.js +0 -196
  159. package/lib/esm/testing/index.js.map +0 -1
  160. package/lib/esm/utils/bot-config.d.ts +0 -4
  161. package/lib/esm/utils/bot-config.js.map +0 -1
  162. package/lib/esm/utils/check-providers.d.ts +0 -8
  163. package/lib/esm/utils/check-providers.js +0 -34
  164. package/lib/esm/utils/check-providers.js.map +0 -1
  165. package/lib/esm/utils/functional.d.ts +0 -10
  166. package/lib/esm/utils/functional.js +0 -88
  167. package/lib/esm/utils/functional.js.map +0 -1
  168. package/lib/esm/utils/index.d.ts +0 -3
  169. package/lib/esm/utils/index.js +0 -7
  170. package/lib/esm/utils/index.js.map +0 -1
  171. /package/lib/{cjs/constants.d.ts → constants.d.ts} +0 -0
  172. /package/lib/{cjs/models → models}/bot-config.d.ts +0 -0
  173. /package/lib/{cjs/models → models}/legacy-types.d.ts +0 -0
  174. /package/lib/{cjs/pusher-utils.d.ts → pusher-utils.d.ts} +0 -0
  175. /package/lib/{cjs/utils → utils}/functional.d.ts +0 -0
@@ -1,47 +1,68 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BASE_SESSION_VARIABLES = void 0;
4
- exports.getSessionVariables = getSessionVariables;
5
- const zod_1 = require("zod");
6
- const index_1 = require("../models/index");
1
+ import { z } from "zod";
2
+ import { VariableType } from "../models/index.js";
3
+
4
+
5
+
6
+
7
+
7
8
  const SESSION_USER_EXTRA_DATA_PREFIX = 'session.user.extra_data';
8
- exports.BASE_SESSION_VARIABLES = [
9
- { key_path: 'input.data', type: index_1.VariableType.String },
10
- { key_path: 'input.type', type: index_1.VariableType.String },
9
+ const BASE_SESSION_VARIABLES = [
10
+ {
11
+ key_path: 'input.data',
12
+ type: VariableType.String
13
+ },
14
+ {
15
+ key_path: 'input.type',
16
+ type: VariableType.String
17
+ },
11
18
  {
12
19
  key_path: 'session.is_first_interaction',
13
- type: index_1.VariableType.Boolean,
20
+ type: VariableType.Boolean
14
21
  },
15
22
  {
16
23
  key_path: 'session.is_test_integration',
17
- type: index_1.VariableType.Boolean,
24
+ type: VariableType.Boolean
25
+ },
26
+ {
27
+ key_path: 'session._shadowing',
28
+ type: VariableType.Boolean
29
+ },
30
+ {
31
+ key_path: 'session.user.locale',
32
+ type: VariableType.String
18
33
  },
19
- { key_path: 'session._shadowing', type: index_1.VariableType.Boolean },
20
- { key_path: 'session.user.locale', type: index_1.VariableType.String },
21
34
  {
22
35
  key_path: 'session.user.country',
23
- type: index_1.VariableType.String,
36
+ type: VariableType.String
24
37
  },
25
- { key_path: 'session.user.system_locale', type: index_1.VariableType.String },
26
- { key_path: 'session.user.username', type: index_1.VariableType.String },
27
38
  {
28
- key_path: 'session.user.unformatted_phone_number',
29
- type: index_1.VariableType.String,
39
+ key_path: 'session.user.system_locale',
40
+ type: VariableType.String
41
+ },
42
+ {
43
+ key_path: 'session.user.username',
44
+ type: VariableType.String
30
45
  },
46
+ {
47
+ key_path: 'session.user.unformatted_phone_number',
48
+ type: VariableType.String
49
+ }
31
50
  ];
32
51
  function getSessionVariables(extraDataSchema) {
33
- const variables = [...exports.BASE_SESSION_VARIABLES];
52
+ const variables = [
53
+ ...BASE_SESSION_VARIABLES
54
+ ];
34
55
  if (extraDataSchema) {
35
56
  variables.push(...getSessionVariablesFromZodSchema(extraDataSchema));
36
57
  }
37
58
  return variables;
38
59
  }
39
60
  function getSessionVariablesFromZodSchema(schema) {
40
- const jsonSchema = zod_1.z.toJSONSchema(schema);
61
+ const jsonSchema = z.toJSONSchema(schema);
41
62
  if (!jsonSchema.properties) {
42
63
  return [];
43
64
  }
44
- return Object.entries(jsonSchema.properties).flatMap(([key, propertySchema]) => getSessionVariablesFromJsonSchema(propertySchema, `${SESSION_USER_EXTRA_DATA_PREFIX}.${key}`));
65
+ return Object.entries(jsonSchema.properties).flatMap(([key, propertySchema])=>getSessionVariablesFromJsonSchema(propertySchema, `${SESSION_USER_EXTRA_DATA_PREFIX}.${key}`));
45
66
  }
46
67
  function getSessionVariablesFromJsonSchema(schema, keyPath) {
47
68
  const type = getJsonSchemaType(schema);
@@ -51,19 +72,24 @@ function getSessionVariablesFromJsonSchema(schema, keyPath) {
51
72
  return [];
52
73
  }
53
74
  if (type === 'object' && schema.properties) {
54
- return Object.entries(schema.properties).flatMap(([key, propertySchema]) => getSessionVariablesFromJsonSchema(propertySchema, `${keyPath}.${key}`));
75
+ return Object.entries(schema.properties).flatMap(([key, propertySchema])=>getSessionVariablesFromJsonSchema(propertySchema, `${keyPath}.${key}`));
55
76
  }
56
77
  const variableType = getVariableTypeFromJsonSchema(schema);
57
78
  if (!variableType) {
58
79
  return [];
59
80
  }
60
- return [{ key_path: keyPath, type: variableType }];
81
+ return [
82
+ {
83
+ key_path: keyPath,
84
+ type: variableType
85
+ }
86
+ ];
61
87
  }
62
88
  function getJsonSchemaType(schema) {
63
89
  const resolved = resolveJsonSchemaNode(schema);
64
90
  const { type } = resolved;
65
91
  if (Array.isArray(type)) {
66
- return type.find(candidate => candidate !== 'null');
92
+ return type.find((candidate)=>candidate !== 'null');
67
93
  }
68
94
  return type;
69
95
  }
@@ -72,23 +98,26 @@ function getVariableTypeFromJsonSchema(schema) {
72
98
  const type = getJsonSchemaType(resolved);
73
99
  // enum is transformed to string. Review in the future, how to handle them
74
100
  if (type === 'string' || resolved.enum !== undefined) {
75
- return index_1.VariableType.String;
101
+ return VariableType.String;
76
102
  }
77
103
  if (type === 'number' || type === 'integer') {
78
- return index_1.VariableType.Number;
104
+ return VariableType.Number;
79
105
  }
80
106
  if (type === 'boolean') {
81
- return index_1.VariableType.Boolean;
107
+ return VariableType.Boolean;
82
108
  }
83
109
  return undefined;
84
110
  }
85
111
  function resolveJsonSchemaNode(schema) {
86
112
  if (schema.anyOf?.length) {
87
- const nonNullSchema = schema.anyOf.find(candidate => candidate.type !== 'null');
113
+ const nonNullSchema = schema.anyOf.find((candidate)=>candidate.type !== 'null');
88
114
  if (nonNullSchema) {
89
115
  return resolveJsonSchemaNode(nonNullSchema);
90
116
  }
91
117
  }
92
118
  return schema;
93
119
  }
120
+
121
+ export { BASE_SESSION_VARIABLES, getSessionVariables };
122
+
94
123
  //# sourceMappingURL=bot-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/bot-config.js","sources":["../../src/utils/bot-config.ts"],"sourcesContent":["import { type ZodType, z } from 'zod'\nimport { type VariableConfigJSON, VariableType } from '../models/index'\n\nconst SESSION_USER_EXTRA_DATA_PREFIX = 'session.user.extra_data'\n\nexport const BASE_SESSION_VARIABLES: VariableConfigJSON[] = [\n { key_path: 'input.data', type: VariableType.String },\n { key_path: 'input.type', type: VariableType.String },\n {\n key_path: 'session.is_first_interaction',\n type: VariableType.Boolean,\n },\n {\n key_path: 'session.is_test_integration',\n type: VariableType.Boolean,\n },\n { key_path: 'session._shadowing', type: VariableType.Boolean },\n { key_path: 'session.user.locale', type: VariableType.String },\n {\n key_path: 'session.user.country',\n type: VariableType.String,\n },\n { key_path: 'session.user.system_locale', type: VariableType.String },\n { key_path: 'session.user.username', type: VariableType.String },\n {\n key_path: 'session.user.unformatted_phone_number',\n type: VariableType.String,\n },\n]\n\nexport function getSessionVariables(\n extraDataSchema?: ZodType\n): VariableConfigJSON[] {\n const variables = [...BASE_SESSION_VARIABLES]\n\n if (extraDataSchema) {\n variables.push(...getSessionVariablesFromZodSchema(extraDataSchema))\n }\n\n return variables\n}\n\nfunction getSessionVariablesFromZodSchema(\n schema: ZodType\n): VariableConfigJSON[] {\n const jsonSchema = z.toJSONSchema(schema) as JsonSchemaNode\n\n if (!jsonSchema.properties) {\n return []\n }\n\n return Object.entries(jsonSchema.properties).flatMap(\n ([key, propertySchema]) =>\n getSessionVariablesFromJsonSchema(\n propertySchema,\n `${SESSION_USER_EXTRA_DATA_PREFIX}.${key}`\n )\n )\n}\n\nfunction getSessionVariablesFromJsonSchema(\n schema: JsonSchemaNode,\n keyPath: string\n): VariableConfigJSON[] {\n const type = getJsonSchemaType(schema)\n\n // TODO:Arrays are not supported yet. Review in the future, how to handle them\n // in the frontend feature-flow-builder and in the plugin-flow-builder.\n if (type === 'array') {\n return []\n }\n\n if (type === 'object' && schema.properties) {\n return Object.entries(schema.properties).flatMap(([key, propertySchema]) =>\n getSessionVariablesFromJsonSchema(propertySchema, `${keyPath}.${key}`)\n )\n }\n\n const variableType = getVariableTypeFromJsonSchema(schema)\n if (!variableType) {\n return []\n }\n\n return [{ key_path: keyPath, type: variableType }]\n}\n\nfunction getJsonSchemaType(schema: JsonSchemaNode): string | undefined {\n const resolved = resolveJsonSchemaNode(schema)\n const { type } = resolved\n\n if (Array.isArray(type)) {\n return type.find(candidate => candidate !== 'null')\n }\n\n return type\n}\n\nfunction getVariableTypeFromJsonSchema(\n schema: JsonSchemaNode\n): VariableType | undefined {\n const resolved = resolveJsonSchemaNode(schema)\n const type = getJsonSchemaType(resolved)\n\n // enum is transformed to string. Review in the future, how to handle them\n if (type === 'string' || resolved.enum !== undefined) {\n return VariableType.String\n }\n\n if (type === 'number' || type === 'integer') {\n return VariableType.Number\n }\n\n if (type === 'boolean') {\n return VariableType.Boolean\n }\n\n return undefined\n}\n\ntype JsonSchemaNode = {\n type?: string | string[]\n enum?: unknown[]\n properties?: Record<string, JsonSchemaNode>\n anyOf?: JsonSchemaNode[]\n}\n\nfunction resolveJsonSchemaNode(schema: JsonSchemaNode): JsonSchemaNode {\n if (schema.anyOf?.length) {\n const nonNullSchema = schema.anyOf.find(\n candidate => candidate.type !== 'null'\n )\n if (nonNullSchema) {\n return resolveJsonSchemaNode(nonNullSchema)\n }\n }\n\n return schema\n}\n"],"names":["z","VariableType","SESSION_USER_EXTRA_DATA_PREFIX","BASE_SESSION_VARIABLES","getSessionVariables","extraDataSchema","variables","getSessionVariablesFromZodSchema","schema","jsonSchema","Object","key","propertySchema","getSessionVariablesFromJsonSchema","keyPath","type","getJsonSchemaType","variableType","getVariableTypeFromJsonSchema","resolved","resolveJsonSchemaNode","Array","candidate","undefined","nonNullSchema"],"mappings":";;;;;AAAqC;AACkC;AAEvE,MAAME,8BAA8BA,GAAG;AAEhC,MAAMC,sBAAsBA,GAAyB;IAC1D;QAAE,UAAU;QAAc,MAAMF,mBAAmB;IAAC;IACpD;QAAE,UAAU;QAAc,MAAMA,mBAAmB;IAAC;IACpD;QACE,UAAU;QACV,MAAMA,oBAAoB;IAC5B;IACA;QACE,UAAU;QACV,MAAMA,oBAAoB;IAC5B;IACA;QAAE,UAAU;QAAsB,MAAMA,oBAAoB;IAAC;IAC7D;QAAE,UAAU;QAAuB,MAAMA,mBAAmB;IAAC;IAC7D;QACE,UAAU;QACV,MAAMA,mBAAmB;IAC3B;IACA;QAAE,UAAU;QAA8B,MAAMA,mBAAmB;IAAC;IACpE;QAAE,UAAU;QAAyB,MAAMA,mBAAmB;IAAC;IAC/D;QACE,UAAU;QACV,MAAMA,mBAAmB;IAC3B;CACD;AAEM,SAASG,mBAAmBA,CACjCC,eAAyB;IAEzB,MAAMC,YAAY;WAAIH,sBAAsBA;KAAC;IAE7C,IAAIE,iBAAiB;QACnBC,UAAU,IAAI,IAAIC,gCAAgCA,CAACF;IACrD;IAEA,OAAOC;AACT;AAEA,SAASC,gCAAgCA,CACvCC,MAAe;IAEf,MAAMC,aAAaT,cAAc,CAACQ;IAElC,IAAI,CAACC,WAAW,UAAU,EAAE;QAC1B,OAAO,EAAE;IACX;IAEA,OAAOC,OAAO,OAAO,CAACD,WAAW,UAAU,EAAE,OAAO,CAClD,CAAC,CAACE,KAAKC,eAAe,GACpBC,iCAAiCA,CAC/BD,gBACA,GAAGV,8BAA8BA,CAAC,CAAC,EAAES,KAAK;AAGlD;AAEA,SAASE,iCAAiCA,CACxCL,MAAsB,EACtBM,OAAe;IAEf,MAAMC,OAAOC,iBAAiBA,CAACR;IAE/B,8EAA8E;IAC9E,wEAAwE;IACxE,IAAIO,SAAS,SAAS;QACpB,OAAO,EAAE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{ type Session } from '../models/legacy-types.js';
2
2
  export declare function isDev(session: Session): boolean;
3
3
  export declare function isWebchat(session: Session): boolean;
4
4
  export declare function isWhatsapp(session: Session): boolean;
@@ -0,0 +1,31 @@
1
+ import { PROVIDER } from "../models/legacy-types.js";
2
+
3
+
4
+
5
+ // To check Provider in session
6
+ function isDev(session) {
7
+ return session.user.provider === PROVIDER.DEV;
8
+ }
9
+ function isWebchat(session) {
10
+ // When the provider is DEV should we return true because it is a webchat?
11
+ return session.user.provider === PROVIDER.WEBCHAT;
12
+ }
13
+ function isWhatsapp(session) {
14
+ return session.user.provider === PROVIDER.WHATSAPP;
15
+ }
16
+ function isTelegram(session) {
17
+ return session.user.provider === PROVIDER.TELEGRAM;
18
+ }
19
+ function isFacebook(session) {
20
+ return session.user.provider === PROVIDER.FACEBOOK;
21
+ }
22
+ function isInstagram(session) {
23
+ return session.user.provider === PROVIDER.INSTAGRAM;
24
+ }
25
+ function isTwitter(session) {
26
+ return session.user.provider === PROVIDER.TWITTER;
27
+ }
28
+
29
+ export { isDev, isFacebook, isInstagram, isTelegram, isTwitter, isWebchat, isWhatsapp };
30
+
31
+ //# sourceMappingURL=check-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/check-providers.js","sources":["../../src/utils/check-providers.ts"],"sourcesContent":["import { PROVIDER, type Session } from '../models/legacy-types'\n\n// To check Provider in session\nexport function isDev(session: Session) {\n return session.user.provider === PROVIDER.DEV\n}\n\nexport function isWebchat(session: Session) {\n // When the provider is DEV should we return true because it is a webchat?\n return session.user.provider === PROVIDER.WEBCHAT\n}\n\nexport function isWhatsapp(session: Session) {\n return session.user.provider === PROVIDER.WHATSAPP\n}\n\nexport function isTelegram(session: Session) {\n return session.user.provider === PROVIDER.TELEGRAM\n}\n\nexport function isFacebook(session: Session) {\n return session.user.provider === PROVIDER.FACEBOOK\n}\n\nexport function isInstagram(session: Session) {\n return session.user.provider === PROVIDER.INSTAGRAM\n}\n\nexport function isTwitter(session: Session) {\n return session.user.provider === PROVIDER.TWITTER\n}\n"],"names":["PROVIDER","isDev","session","isWebchat","isWhatsapp","isTelegram","isFacebook","isInstagram","isTwitter"],"mappings":";;;AAA+D;AAE/D,+BAA+B;AACxB,SAASC,KAAKA,CAACC,OAAgB;IACpC,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,YAAY;AAC/C;AAEO,SAASG,SAASA,CAACD,OAAgB;IACxC,0EAA0E;IAC1E,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,gBAAgB;AACnD;AAEO,SAASI,UAAUA,CAACF,OAAgB;IACzC,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,iBAAiB;AACpD;AAEO,SAASK,UAAUA,CAACH,OAAgB;IACzC,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,iBAAiB;AACpD;AAEO,SAASM,UAAUA,CAACJ,OAAgB;IACzC,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,iBAAiB;AACpD;AAEO,SAASO,WAAWA,CAACL,OAAgB;IAC1C,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,kBAAkB;AACrD;AAEO,SAASQ,SAASA,CAACN,OAAgB;IACxC,OAAOA,QAAQ,IAAI,CAAC,QAAQ,KAAKF,gBAAgB;AACnD"}
@@ -0,0 +1,69 @@
1
+ const isNode = ()=>{
2
+ // @ts-expect-error
3
+ return typeof IS_NODE !== 'undefined' ? IS_NODE : typeof process !== 'undefined' && process.versions !== null && process.versions.node !== null;
4
+ };
5
+ const isBrowser = ()=>{
6
+ // @ts-expect-error
7
+ return typeof IS_BROWSER !== 'undefined' ? IS_BROWSER : typeof window !== 'undefined' && typeof window.document !== 'undefined' && !window.process?.versions?.node // In Jest window.process?.versions?.node is defined
8
+ ;
9
+ };
10
+ const isMobile = (mobileBreakpoint = 460)=>{
11
+ if (isBrowser()) {
12
+ const w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
13
+ if (w < mobileBreakpoint) {
14
+ return true;
15
+ }
16
+ }
17
+ return false;
18
+ };
19
+ function isFunction(o) {
20
+ return typeof o === 'function';
21
+ }
22
+ function cloneObject(object) {
23
+ if (!object) {
24
+ return {};
25
+ }
26
+ return {
27
+ ...object
28
+ };
29
+ }
30
+ const params2queryString = (params)=>Object.entries(params).map(([k, v])=>`${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join('&');
31
+ // Joins path segments. Preserves initial "/" and resolves ".." and "."
32
+ // Does not support using ".." to go above/outside the root.
33
+ // This means that join("foo", "../../bar") will not resolve to "../bar"
34
+ const join = (...segments)=>{
35
+ // Split the inputs into a list of path commands.
36
+ let parts = [];
37
+ for(let i = 0, l = segments.length; i < l; i++){
38
+ parts = parts.concat(segments[i].split('/'));
39
+ }
40
+ // Interpret the path commands to get the new resolved path.
41
+ const newParts = [];
42
+ for(let i = 0, l = parts.length; i < l; i++){
43
+ const part = parts[i];
44
+ // Remove leading and trailing slashes
45
+ // Also remove "." segments
46
+ if (!part || part === '.') {
47
+ continue;
48
+ }
49
+ // Interpret ".." to pop the last segment
50
+ if (part === '..') {
51
+ newParts.pop();
52
+ } else {
53
+ newParts.push(part);
54
+ }
55
+ }
56
+ // Preserve the initial slash if there was one.
57
+ if (parts[0] === '') {
58
+ newParts.unshift('');
59
+ }
60
+ // Turn back into a single string path.
61
+ return newParts.join('/') || (newParts.length ? '/' : '.');
62
+ };
63
+ // A simple function to get the dirname of a path
64
+ // Trailing slashes are ignored. Leading slash is preserved.
65
+ const dirname = (path)=>join(path, '..');
66
+
67
+ export { cloneObject, dirname, isBrowser, isFunction, isMobile, isNode, join, params2queryString };
68
+
69
+ //# sourceMappingURL=functional.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/functional.js","sources":["../../src/utils/functional.ts"],"sourcesContent":["export const isNode = (): boolean => {\n // @ts-expect-error\n return typeof IS_NODE !== 'undefined'\n ? // @ts-ignore\n IS_NODE\n : typeof process !== 'undefined' &&\n process.versions !== null &&\n process.versions.node !== null\n}\n\nexport const isBrowser = (): boolean => {\n // @ts-expect-error\n return typeof IS_BROWSER !== 'undefined'\n ? // @ts-ignore\n IS_BROWSER\n : typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n !window.process?.versions?.node // In Jest window.process?.versions?.node is defined\n}\n\nexport const isMobile = (mobileBreakpoint = 460): boolean => {\n if (isBrowser()) {\n const w = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n )\n if (w < mobileBreakpoint) {\n return true\n }\n }\n return false\n}\n\nexport function isFunction(o: any): boolean {\n return typeof o === 'function'\n}\n\nexport function cloneObject(object: any): any {\n if (!object) {\n return {}\n }\n return { ...object }\n}\n\nexport const params2queryString = (params: { [key: string]: string }): string =>\n Object.entries(params)\n .map(([k, v]: any) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&')\n\n// Joins path segments. Preserves initial \"/\" and resolves \"..\" and \".\"\n// Does not support using \"..\" to go above/outside the root.\n// This means that join(\"foo\", \"../../bar\") will not resolve to \"../bar\"\nexport const join = (...segments: string[]): string => {\n // Split the inputs into a list of path commands.\n let parts: string[] = []\n for (let i = 0, l = segments.length; i < l; i++) {\n parts = parts.concat(segments[i].split('/'))\n }\n // Interpret the path commands to get the new resolved path.\n const newParts: string[] = []\n for (let i = 0, l = parts.length; i < l; i++) {\n const part = parts[i]\n // Remove leading and trailing slashes\n // Also remove \".\" segments\n if (!part || part === '.') {\n continue\n }\n // Interpret \"..\" to pop the last segment\n if (part === '..') {\n newParts.pop()\n }\n // Push new path segments.\n else {\n newParts.push(part)\n }\n }\n // Preserve the initial slash if there was one.\n if (parts[0] === '') {\n newParts.unshift('')\n }\n // Turn back into a single string path.\n return newParts.join('/') || (newParts.length ? '/' : '.')\n}\n\n// A simple function to get the dirname of a path\n// Trailing slashes are ignored. Leading slash is preserved.\nexport const dirname = (path: string): string => join(path, '..')\n"],"names":["isNode","IS_NODE","process","isBrowser","IS_BROWSER","window","isMobile","mobileBreakpoint","w","Math","document","isFunction","o","cloneObject","object","params2queryString","params","Object","k","v","encodeURIComponent","join","segments","parts","i","l","newParts","part","dirname","path"],"mappings":"AAAO,MAAMA,MAAMA,GAAG;IACpB,mBAAmB;IACnB,OAAO,OAAOC,YAAY,cAEtBA,UACA,OAAOC,YAAY,eACjBA,QAAQ,QAAQ,KAAK,QACrBA,QAAQ,QAAQ,CAAC,IAAI,KAAK;AAClC,EAAC;AAEM,MAAMC,SAASA,GAAG;IACvB,mBAAmB;IACnB,OAAO,OAAOC,eAAe,cAEzBA,aACA,OAAOC,WAAW,eAChB,OAAOA,OAAO,QAAQ,KAAK,eAC3B,CAACA,OAAO,OAAO,EAAE,UAAU,KAAK,oDAAoD;;AAC5F,EAAC;AAEM,MAAMC,QAAQA,GAAG,CAACC,mBAAmB,GAAG;IAC7C,IAAIJ,SAASA,IAAI;QACf,MAAMK,IAAIC,KAAK,GAAG,CAChBC,SAAS,eAAe,CAAC,WAAW,EACpCL,OAAO,UAAU,IAAI;QAEvB,IAAIG,IAAID,kBAAkB;YACxB,OAAO;QACT;IACF;IACA,OAAO;AACT,EAAC;AAEM,SAASI,UAAUA,CAACC,CAAM;IAC/B,OAAO,OAAOA,MAAM;AACtB;AAEO,SAASC,WAAWA,CAACC,MAAW;IACrC,IAAI,CAACA,QAAQ;QACX,OAAO,CAAC;IACV;IACA,OAAO;QAAE,GAAGA,MAAM;IAAC;AACrB;AAEO,MAAMC,kBAAkBA,GAAG,CAACC,SACjCC,OAAO,OAAO,CAACD,QACZ,GAAG,CAAC,CAAC,CAACE,GAAGC,EAAO,GAAK,GAAGC,mBAAmBF,GAAG,CAAC,EAAEE,mBAAmBD,IAAI,EACxE,IAAI,CAAC,KAAI;AAEd,wEAAwE;AACxE,4DAA4D;AAC5D,wEAAwE;AACjE,MAAME,IAAIA,GAAG,CAAC,GAAGC;IACtB,iDAAiD;IACjD,IAAIC,QAAkB,EAAE;IACxB,IAAK,IAAIC,IAAI,GAAGC,IAAIH,SAAS,MAAM,EAAEE,IAAIC,GAAGD,IAAK;QAC/CD,QAAQA,MAAM,MAAM,CAACD,QAAQ,CAACE,EAAE,CAAC,KAAK,CAAC;IACzC;IACA,4DAA4D;IAC5D,MAAME,WAAqB,EAAE;IAC7B,IAAK,IAAIF,IAAI,GAAGC,IAAIF,MAAM,MAAM,EAAEC,IAAIC,GAAGD,IAAK;QAC5C,MAAMG,OAAOJ,KAAK,CAACC,EAAE;QACrB,sCAAsC;QACtC,2BAA2B;QAC3B,IAAI,CAACG,QAAQA,SAAS,KAAK;YACzB;QACF;QACA,yCAAyC;QACzC,IAAIA,SAAS,MAAM;YACjBD,SAAS,GAAG;QACd,OAEK;YACHA,SAAS,IAAI,CAACC;QAChB;IACF;IACA,+CAA+C;IAC/C,IAAIJ,KAAK,CAAC,EAAE,KAAK,IAAI;QACnBG,SAAS,OAAO,CAAC;IACnB;IACA,uCAAuC;IACvC,OAAOA,SAAS,IAAI,CAAC,QAASA,CAAAA,SAAS,MAAM,GAAG,MAAM,GAAE;AAC1D,EAAC;AAED,iDAAiD;AACjD,4DAA4D;AACrD,MAAME,OAAOA,GAAG,CAACC,OAAyBR,IAAIA,CAACQ,MAAM,MAAK"}
@@ -0,0 +1,3 @@
1
+ export * from './bot-config.js';
2
+ export * from './check-providers.js';
3
+ export * from './functional.js';
@@ -0,0 +1,10 @@
1
+ export * from "./bot-config.js";
2
+ export * from "./check-providers.js";
3
+ export * from "./functional.js";
4
+
5
+
6
+
7
+
8
+ export {};
9
+
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './bot-config'\nexport * from './check-providers'\nexport * from './functional'\n"],"names":[],"mappings":";;;AAA4B;AACK;AACL"}
package/package.json CHANGED
@@ -1,28 +1,29 @@
1
1
  {
2
+ "type": "module",
2
3
  "name": "@botonic/core",
3
- "version": "0.56.0-alpha.0",
4
+ "version": "0.57.0-rslib-esm.1",
4
5
  "license": "MIT",
5
6
  "description": "Build Chatbots using React",
6
- "main": "./lib/cjs/index.js",
7
- "module": "./lib/esm/index.js",
7
+ "main": "./lib/index.js",
8
+ "module": "./lib/index.js",
8
9
  "exports": {
9
10
  ".": {
10
- "require": "./lib/cjs/index.js",
11
- "import": "./lib/esm/index.js"
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
12
13
  },
13
14
  "./testing": {
14
- "require": "./lib/cjs/testing/index.js",
15
- "import": "./lib/esm/testing/index.js"
15
+ "types": "./lib/testing/index.d.ts",
16
+ "default": "./lib/testing/index.js"
16
17
  }
17
18
  },
18
19
  "scripts": {
19
20
  "test": "../../node_modules/.bin/jest --coverage",
20
- "prepublishOnly": "rm -rf lib && npm i && npm run build",
21
+ "prepublishOnly": "npm run build && npm run test && npm run lint",
21
22
  "lint": "biome check --write src/",
22
23
  "lint:check": "biome check src/",
23
24
  "format": "biome format --write src/",
24
- "build": "../../node_modules/.bin/tsc -p tsconfig.json && ../../node_modules/.bin/tsc -p tsconfig.esm.json",
25
- "build:watch": "npm run build -- --watch",
25
+ "build": "rslib build --no-env",
26
+ "build:watch": "rslib build --watch --no-env",
26
27
  "cloc": "../../scripts/qa/cloc-package.sh ."
27
28
  },
28
29
  "repository": {
@@ -42,7 +43,7 @@
42
43
  "typesVersions": {
43
44
  "*": {
44
45
  "testing": [
45
- "./lib/cjs/testing/index.d.ts"
46
+ "./lib/testing/index.d.ts"
46
47
  ]
47
48
  }
48
49
  },
@@ -70,5 +71,6 @@
70
71
  "conversational-ui",
71
72
  "javascript"
72
73
  ],
73
- "sideEffects": false
74
+ "sideEffects": false,
75
+ "types": "./lib/index.d.ts"
74
76
  }
@@ -1,5 +1,5 @@
1
1
  import axios, { type AxiosResponse } from 'axios'
2
- import Pusher, { type AuthOptions, type Channel } from 'pusher-js'
2
+ import Pusher, { type AuthOptions, type Channel, type Runtime } from 'pusher-js'
3
3
  import type Channels from 'pusher-js/types/src/core/channels/channels'
4
4
 
5
5
  import type { Input, SessionUser } from './models'
@@ -50,7 +50,9 @@ export class HubtypeService {
50
50
  public lastMessageUpdateDate?: string
51
51
  public onEvent: (event: any) => void
52
52
  public unsentInputs: () => UnsentInput[]
53
- public pusher: Pusher | null
53
+ // Pusher 5's CJS default is a namespace under NodeNext. Its named Runtime
54
+ // interface exposes the same constructor without that interop ambiguity.
55
+ public pusher: InstanceType<Parameters<Runtime['setup']>[0]> | null
54
56
  public channel: Channel
55
57
  public server?: ServerConfig
56
58
  public PUSHER_CONNECT_TIMEOUT_MS = 10000
@@ -5,7 +5,6 @@ export enum OutputMessageType {
5
5
  TextWithButtons = 'textWithButtons',
6
6
  BotExecutor = 'botExecutor',
7
7
  Carousel = 'carousel',
8
- RequestContactInfo = 'requestContactInfo',
9
8
  Exit = 'exit',
10
9
  }
11
10
 
@@ -62,13 +61,6 @@ export interface CarouselMessage extends BaseMessage {
62
61
  }
63
62
  }
64
63
 
65
- export interface RequestContactInfoMessage extends BaseMessage {
66
- type: OutputMessageType.RequestContactInfo
67
- content: {
68
- text: string
69
- }
70
- }
71
-
72
64
  export interface ExitMessage extends BaseMessage {
73
65
  type: OutputMessageType.Exit
74
66
  }
@@ -78,7 +70,6 @@ export type OutputMessage<Extra extends BaseMessage<string> = never> =
78
70
  | TextWithButtonsMessage
79
71
  | BotExecutorMessage
80
72
  | CarouselMessage
81
- | RequestContactInfoMessage
82
73
  | ExitMessage
83
74
  | Extra
84
75
 
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PATH_PAYLOAD_REGEXP = exports.PATH_PAYLOAD_IDENTIFIER = exports.EMPTY_ACTION_PATH = exports.NOT_FOUND_PATH = void 0;
4
- exports.NOT_FOUND_PATH = '404';
5
- exports.EMPTY_ACTION_PATH = '';
6
- exports.PATH_PAYLOAD_IDENTIFIER = '__PATH_PAYLOAD__';
7
- exports.PATH_PAYLOAD_REGEXP = new RegExp(`\\b^${exports.PATH_PAYLOAD_IDENTIFIER}(.*)\\b`);
8
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,KAAK,CAAA;AACtB,QAAA,iBAAiB,GAAG,EAAE,CAAA;AACtB,QAAA,uBAAuB,GAAG,kBAAkB,CAAA;AAC5C,QAAA,mBAAmB,GAAG,IAAI,MAAM,CAC3C,OAAO,+BAAuB,SAAS,CACxC,CAAA"}
@@ -1,43 +0,0 @@
1
- import { Inspector } from './debug';
2
- import { type BotRequest, type BotResponse, type ResolvedPlugins, type Route, type Routes, type Session } from './models';
3
- import { Router } from './routing';
4
- export interface CoreBotConfig {
5
- appId?: string;
6
- defaultDelay?: number;
7
- defaultRoutes?: Route[];
8
- defaultTyping?: number;
9
- inspector?: Inspector;
10
- plugins?: ResolvedPlugins;
11
- renderer: any;
12
- routes: Routes;
13
- theme?: any;
14
- }
15
- export declare class CoreBot {
16
- appId?: string;
17
- defaultDelay: number;
18
- defaultRoutes: Route[];
19
- defaultTyping: number;
20
- inspector: Inspector;
21
- plugins: ResolvedPlugins;
22
- renderer: any;
23
- rootElement: any;
24
- router: Router | null;
25
- routes: Routes;
26
- theme?: any;
27
- constructor({ renderer, routes, theme, plugins, appId, defaultTyping, defaultDelay, defaultRoutes, inspector, }: CoreBotConfig);
28
- setSystemLocale(locale: string, session: Session): void;
29
- setUserLocale(locale: string, session: Session): void;
30
- setUserCountry(country: string, session: Session): void;
31
- input(request: BotRequest): Promise<BotResponse>;
32
- private getBotContext;
33
- private getSettings;
34
- private getSecrets;
35
- private runInput;
36
- private updateSession;
37
- private runPrePlugins;
38
- private getOutput;
39
- private setRouter;
40
- private updateRequestFromOutput;
41
- private runPostPlugins;
42
- private runRedirectAction;
43
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"core-bot.js","sourceRoot":"","sources":["../../src/core-bot.ts"],"names":[],"mappings":";;;AAAA,mCAAm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E,UAAU,CAAC,sBAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzE,OAAO,MAAM,IAAI,CAAC,iBAAiB,CACjC,QAAQ,EACR,UAAU,EACV,cAAc,GAAG,CAAC,CACnB,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAzRD,0BAyRC"}
@@ -1 +0,0 @@
1
- export * from './inspector';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./inspector"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/debug/index.ts"],"names":[],"mappings":";;;AAAA,sDAA2B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../src/debug/inspector.ts"],"names":[],"mappings":";;;AACA,MAAa,cAAc;IACzB,YAAY,CACV,MAAa,EACb,SAAiB,EACjB,WAAyB,EACzB,MAAW,IACJ,CAAC;IACV,eAAe,CACb,MAAa,EACb,SAAiB,EACjB,WAAyB,EACzB,MAAW,IACJ,CAAC;CACX;AAbD,wCAaC;AAED,MAAa,mBAAoB,SAAQ,cAAc;IAGrD;QACE,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,eAAe,GAAG,IAAI,CAAA;QAC3B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAA;IAC7B,CAAC;IAED,iBAAiB,CAAC,eAAyB;QACzC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;QAC1B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,KAAY;QACrB,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,EAAE,CAAC;YAClC,OAAO,IAAI,CAAA;QACb,CAAC;QAC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