@fonixtree/magic-design 0.1.71 → 0.1.73

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 (117) hide show
  1. package/es/common/ImagePicker/index.js +27 -16
  2. package/es/composite-comp/bol/components/Banner/defaultJSON.js +1 -1
  3. package/es/composite-comp/bol/components/Banner/mobile/index.js +1 -4
  4. package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  5. package/es/composite-comp/bol/components/Banner/pc/index.js +1 -4
  6. package/es/composite-comp/bol/components/Button/index.js +3 -4
  7. package/es/composite-comp/bol/components/Carousel/mobile/index.js +1 -4
  8. package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  9. package/es/composite-comp/bol/components/Carousel/pc/index.js +1 -4
  10. package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +1 -4
  11. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  12. package/es/composite-comp/bol/components/ImageGallery/pc/index.js +3 -4
  13. package/es/composite-comp/bol/components/ImageText/defaultJSON.js +11 -2
  14. package/es/composite-comp/bol/components/ImageText/mobile/index.js +1 -4
  15. package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  16. package/es/composite-comp/bol/components/ImageText/pc/index.js +3 -4
  17. package/es/composite-comp/bol/components/Newsletter/index.js +1 -4
  18. package/es/composite-comp/bol/components/Tag/index.js +3 -4
  19. package/es/composite-comp/bol/components/Text/index.js +3 -4
  20. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +1 -4
  21. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
  22. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +1 -4
  23. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
  24. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +1 -4
  25. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
  26. package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
  27. package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +1 -4
  28. package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +1 -4
  29. package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +1 -4
  30. package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +1 -4
  31. package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +1 -4
  32. package/es/composite-comp/bol/components/Wallet/mobile/index.js +1 -4
  33. package/es/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
  34. package/es/composite-comp/bol/components/Wallet/pc/index.js +1 -4
  35. package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +4 -0
  36. package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  37. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +1 -1
  38. package/es/composite-comp/bol/config-panels/VideoConfig/VideoShareConfig/index.js +12 -2
  39. package/es/composite-comp/common/config-panels/BackgroundConfig/index.js +12 -2
  40. package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  41. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  42. package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  43. package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  44. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +76 -80
  45. package/es/core/Designer/AiImageGenerator/index.js +233 -3
  46. package/es/core/Designer/AiImageGenerator/index.less +33 -0
  47. package/es/core/Designer/ChatRobot/components/CopyBtn/index.js +49 -0
  48. package/es/core/Designer/ChatRobot/components/CopyBtn/index.less +0 -0
  49. package/es/core/Designer/ChatRobot/index.js +110 -8
  50. package/es/core/Designer/ChatRobot/index.less +54 -1
  51. package/es/core/Designer/ChatRobot/markdown.less +1 -0
  52. package/es/core/Designer/FonixtreeGpt/index.js +299 -0
  53. package/es/decorator/metaDecorator.js +1 -1
  54. package/es/locale/en/en.json +1 -0
  55. package/es/locale/es/es.json +1 -0
  56. package/es/locale/id/id.json +1 -0
  57. package/es/meta-comp/config-panels/ImageConfig/index.js +32 -11
  58. package/es/utils/commonUtil.js +15 -2
  59. package/lib/common/ImagePicker/index.js +27 -16
  60. package/lib/composite-comp/bol/components/Banner/defaultJSON.js +1 -1
  61. package/lib/composite-comp/bol/components/Banner/mobile/index.js +1 -4
  62. package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
  63. package/lib/composite-comp/bol/components/Banner/pc/index.js +1 -4
  64. package/lib/composite-comp/bol/components/Button/index.js +3 -4
  65. package/lib/composite-comp/bol/components/Carousel/mobile/index.js +1 -4
  66. package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
  67. package/lib/composite-comp/bol/components/Carousel/pc/index.js +1 -4
  68. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +1 -4
  69. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
  70. package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +3 -4
  71. package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +11 -2
  72. package/lib/composite-comp/bol/components/ImageText/mobile/index.js +1 -4
  73. package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
  74. package/lib/composite-comp/bol/components/ImageText/pc/index.js +3 -4
  75. package/lib/composite-comp/bol/components/Newsletter/index.js +1 -4
  76. package/lib/composite-comp/bol/components/Tag/index.js +3 -4
  77. package/lib/composite-comp/bol/components/Text/index.js +3 -4
  78. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +1 -4
  79. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
  80. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +1 -4
  81. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
  82. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +1 -4
  83. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
  84. package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
  85. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +1 -4
  86. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +1 -4
  87. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +1 -4
  88. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +1 -4
  89. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +1 -4
  90. package/lib/composite-comp/bol/components/Wallet/mobile/index.js +1 -4
  91. package/lib/composite-comp/bol/components/Wallet/mobile/index.less +27 -40
  92. package/lib/composite-comp/bol/components/Wallet/pc/index.js +1 -4
  93. package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +4 -0
  94. package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +1 -1
  95. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +1 -1
  96. package/lib/composite-comp/bol/config-panels/VideoConfig/VideoShareConfig/index.js +12 -2
  97. package/lib/composite-comp/common/config-panels/BackgroundConfig/index.js +12 -2
  98. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
  99. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
  100. package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
  101. package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
  102. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +76 -80
  103. package/lib/core/Designer/AiImageGenerator/index.js +233 -3
  104. package/lib/core/Designer/AiImageGenerator/index.less +33 -0
  105. package/lib/core/Designer/ChatRobot/components/CopyBtn/index.js +49 -0
  106. package/lib/core/Designer/ChatRobot/components/CopyBtn/index.less +0 -0
  107. package/lib/core/Designer/ChatRobot/index.js +110 -8
  108. package/lib/core/Designer/ChatRobot/index.less +54 -1
  109. package/lib/core/Designer/ChatRobot/markdown.less +1 -0
  110. package/lib/core/Designer/FonixtreeGpt/index.js +299 -0
  111. package/lib/decorator/metaDecorator.js +1 -1
  112. package/lib/locale/en/en.json +1 -0
  113. package/lib/locale/es/es.json +1 -0
  114. package/lib/locale/id/id.json +1 -0
  115. package/lib/meta-comp/config-panels/ImageConfig/index.js +32 -11
  116. package/lib/utils/commonUtil.js +15 -2
  117. package/package.json +2 -1
@@ -23,6 +23,8 @@ var _common = require("../../../common");
23
23
 
24
24
  var _mobx = require("../../../mobx");
25
25
 
26
+ var _commonUtil = require("../../../utils/commonUtil");
27
+
26
28
  require("./index.less");
27
29
 
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -57,6 +59,149 @@ var __extends = void 0 && (void 0).__extends || function () {
57
59
  };
58
60
  }();
59
61
 
62
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
63
+ function adopt(value) {
64
+ return value instanceof P ? value : new P(function (resolve) {
65
+ resolve(value);
66
+ });
67
+ }
68
+
69
+ return new (P || (P = Promise))(function (resolve, reject) {
70
+ function fulfilled(value) {
71
+ try {
72
+ step(generator.next(value));
73
+ } catch (e) {
74
+ reject(e);
75
+ }
76
+ }
77
+
78
+ function rejected(value) {
79
+ try {
80
+ step(generator["throw"](value));
81
+ } catch (e) {
82
+ reject(e);
83
+ }
84
+ }
85
+
86
+ function step(result) {
87
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
88
+ }
89
+
90
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
91
+ });
92
+ };
93
+
94
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
95
+ var _ = {
96
+ label: 0,
97
+ sent: function sent() {
98
+ if (t[0] & 1) throw t[1];
99
+ return t[1];
100
+ },
101
+ trys: [],
102
+ ops: []
103
+ },
104
+ f,
105
+ y,
106
+ t,
107
+ g;
108
+ return g = {
109
+ next: verb(0),
110
+ "throw": verb(1),
111
+ "return": verb(2)
112
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
113
+ return this;
114
+ }), g;
115
+
116
+ function verb(n) {
117
+ return function (v) {
118
+ return step([n, v]);
119
+ };
120
+ }
121
+
122
+ function step(op) {
123
+ if (f) throw new TypeError("Generator is already executing.");
124
+
125
+ while (_) {
126
+ try {
127
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
128
+ if (y = 0, t) op = [op[0] & 2, t.value];
129
+
130
+ switch (op[0]) {
131
+ case 0:
132
+ case 1:
133
+ t = op;
134
+ break;
135
+
136
+ case 4:
137
+ _.label++;
138
+ return {
139
+ value: op[1],
140
+ done: false
141
+ };
142
+
143
+ case 5:
144
+ _.label++;
145
+ y = op[1];
146
+ op = [0];
147
+ continue;
148
+
149
+ case 7:
150
+ op = _.ops.pop();
151
+
152
+ _.trys.pop();
153
+
154
+ continue;
155
+
156
+ default:
157
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
158
+ _ = 0;
159
+ continue;
160
+ }
161
+
162
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
163
+ _.label = op[1];
164
+ break;
165
+ }
166
+
167
+ if (op[0] === 6 && _.label < t[1]) {
168
+ _.label = t[1];
169
+ t = op;
170
+ break;
171
+ }
172
+
173
+ if (t && _.label < t[2]) {
174
+ _.label = t[2];
175
+
176
+ _.ops.push(op);
177
+
178
+ break;
179
+ }
180
+
181
+ if (t[2]) _.ops.pop();
182
+
183
+ _.trys.pop();
184
+
185
+ continue;
186
+ }
187
+
188
+ op = body.call(thisArg, _);
189
+ } catch (e) {
190
+ op = [6, e];
191
+ y = 0;
192
+ } finally {
193
+ f = t = 0;
194
+ }
195
+ }
196
+
197
+ if (op[0] & 5) throw op[1];
198
+ return {
199
+ value: op[0] ? op[1] : void 0,
200
+ done: true
201
+ };
202
+ }
203
+ };
204
+
60
205
  var Search = _antd.Input.Search;
61
206
 
62
207
  var AiImageGenerator =
@@ -68,9 +213,21 @@ function (_super) {
68
213
  var _this = _super !== null && _super.apply(this, arguments) || this;
69
214
 
70
215
  _this.state = {
216
+ loading: false,
71
217
  visible: false,
72
218
  images: []
73
219
  };
220
+ _this.formRef = /*#__PURE__*/_react["default"].createRef();
221
+
222
+ _this.getColumnNum = function (num) {
223
+ if (num === 1) {
224
+ return 1;
225
+ } else if (num > 1 && num <= 4) {
226
+ return 2;
227
+ } else {
228
+ return 3;
229
+ }
230
+ };
74
231
 
75
232
  _this.onCloseDrawer = function () {
76
233
  _mobx.store.setState({
@@ -80,6 +237,71 @@ function (_super) {
80
237
 
81
238
  _this.onHisConfigClick = function () {};
82
239
 
240
+ _this.onGenarate = function (prompt) {
241
+ return __awaiter(_this, void 0, void 0, function () {
242
+ var formVal, result, e_1;
243
+ return __generator(this, function (_a) {
244
+ switch (_a.label) {
245
+ case 0:
246
+ formVal = this.formRef.current.getFieldsValue(true);
247
+ this.setState({
248
+ loading: true
249
+ });
250
+ _a.label = 1;
251
+
252
+ case 1:
253
+ _a.trys.push([1, 3,, 4]);
254
+
255
+ return [4
256
+ /*yield*/
257
+ , (0, _commonUtil.commonFetch)('/designer/v1/ai/create-image', {
258
+ prompt: prompt,
259
+ n: formVal.number || 4,
260
+ height: 256,
261
+ width: 256
262
+ }, 'POST')];
263
+
264
+ case 2:
265
+ result = _a.sent();
266
+ this.setState({
267
+ loading: false,
268
+ images: result.imageList
269
+ });
270
+ return [3
271
+ /*break*/
272
+ , 4];
273
+
274
+ case 3:
275
+ e_1 = _a.sent();
276
+ this.setState({
277
+ loading: false
278
+ });
279
+ return [3
280
+ /*break*/
281
+ , 4];
282
+
283
+ case 4:
284
+ return [2
285
+ /*return*/
286
+ ];
287
+ }
288
+ });
289
+ });
290
+ };
291
+
292
+ _this.getImageList = function (images) {
293
+ var columnNum = _this.getColumnNum(images.length);
294
+
295
+ return images.map(function (img) {
296
+ return /*#__PURE__*/_react["default"].createElement("div", {
297
+ className: "aiImageWrap" + columnNum
298
+ }, /*#__PURE__*/_react["default"].createElement("img", {
299
+ alt: "",
300
+ src: img
301
+ }));
302
+ });
303
+ };
304
+
83
305
  return _this;
84
306
  }
85
307
 
@@ -100,7 +322,8 @@ function (_super) {
100
322
  AiImageGenerator.prototype.render = function () {
101
323
  var _a = this.state,
102
324
  visible = _a.visible,
103
- images = _a.images;
325
+ images = _a.images,
326
+ loading = _a.loading;
104
327
  return /*#__PURE__*/_react["default"].createElement(_antd.Drawer, {
105
328
  bodyStyle: {
106
329
  padding: 16,
@@ -130,11 +353,17 @@ function (_super) {
130
353
  type: "primary"
131
354
  }, "Confirm"))),
132
355
  width: 1084
356
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Spin, {
357
+ spinning: loading
133
358
  }, /*#__PURE__*/_react["default"].createElement("div", {
134
359
  className: "drawer_content"
135
360
  }, /*#__PURE__*/_react["default"].createElement("div", {
136
361
  className: "left_wrap"
137
362
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
363
+ ref: this.formRef,
364
+ initialValues: {
365
+ number: 4
366
+ },
138
367
  layout: "vertical"
139
368
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
140
369
  label: "Choose an AI artist",
@@ -176,7 +405,7 @@ function (_super) {
176
405
  className: "middle_wrap"
177
406
  }, /*#__PURE__*/_react["default"].createElement("div", {
178
407
  className: "img_wrap"
179
- }, !images.length && /*#__PURE__*/_react["default"].createElement("img", {
408
+ }, images.length > 0 ? this.getImageList(images) : /*#__PURE__*/_react["default"].createElement("img", {
180
409
  alt: "",
181
410
  className: "no_data",
182
411
  src: _nodata["default"]
@@ -197,6 +426,7 @@ function (_super) {
197
426
  className: "search_wrap"
198
427
  }, /*#__PURE__*/_react["default"].createElement(Search, {
199
428
  enterButton: "Generate",
429
+ onSearch: this.onGenarate,
200
430
  size: "large"
201
431
  }))), /*#__PURE__*/_react["default"].createElement("div", {
202
432
  className: "right_wrap"
@@ -211,7 +441,7 @@ function (_super) {
211
441
  cursor: 'pointer'
212
442
  },
213
443
  type: "icon-setting1"
214
- })))));
444
+ }))))));
215
445
  };
216
446
 
217
447
  return AiImageGenerator;
@@ -26,10 +26,43 @@
26
26
  height: 550px;
27
27
  position: relative;
28
28
  .img_wrap {
29
+ width: 492px;
29
30
  height: 100%;
30
31
  display: flex;
32
+ flex-wrap: wrap;
31
33
  align-items: center;
32
34
  justify-content: center;
35
+ .aiImageWrap1 {
36
+ height: 492px;
37
+ width: 492px;
38
+ }
39
+ .aiImageWrap2 {
40
+ height: 240px;
41
+ width: 240px;
42
+ margin-bottom: 12px;
43
+ margin-left: 12px;
44
+ &:nth-child(2n - 1) {
45
+ margin-left: 0;
46
+ }
47
+ img {
48
+ max-width: 100%;
49
+ }
50
+ }
51
+
52
+ .aiImageWrap3 {
53
+ height: 156px;
54
+ width: 156px;
55
+ margin-bottom: 12px;
56
+ margin-bottom: 12px;
57
+ margin-left: 12px;
58
+ &:nth-child(3n + 1) {
59
+ margin-left: 0;
60
+ }
61
+ img {
62
+ max-width: 100%;
63
+ }
64
+ }
65
+
33
66
  .no_data {
34
67
  height: 183px;
35
68
  width: 212px;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = CopyBtn;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _common = require("../../../../../common");
13
+
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
18
+ var btnTypeMap = {
19
+ COPY: 'icon-copy1',
20
+ COPIED: 'icon-vector'
21
+ };
22
+
23
+ function CopyBtn(_a) {
24
+ var onClick = _a.onClick;
25
+
26
+ var _b = (0, _react.useState)(btnTypeMap.COPY),
27
+ btnType = _b[0],
28
+ setBtnType = _b[1];
29
+
30
+ var onBtnClick = function onBtnClick() {
31
+ // 拷贝
32
+ setBtnType(btnTypeMap.COPIED);
33
+ onClick(); // 定时更改图标
34
+
35
+ setTimeout(function () {
36
+ setBtnType(btnTypeMap.COPY);
37
+ }, 2000);
38
+ };
39
+
40
+ return /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
41
+ color: "#2F54EB",
42
+ onClick: onBtnClick,
43
+ size: 20,
44
+ style: {
45
+ cursor: 'pointer'
46
+ },
47
+ type: btnType
48
+ });
49
+ }
@@ -11,12 +11,24 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _antd = require("antd");
13
13
 
14
+ var _marked = require("marked");
15
+
16
+ var _classnames = _interopRequireDefault(require("classnames"));
17
+
18
+ var _CopyBtn = _interopRequireDefault(require("./components/CopyBtn"));
19
+
14
20
  var _common = require("../../../common");
15
21
 
16
22
  var _mobx = require("../../../mobx");
17
23
 
24
+ var _FonixtreeGpt = _interopRequireDefault(require("../FonixtreeGpt"));
25
+
18
26
  require("./index.less");
19
27
 
28
+ require("./markdown.less");
29
+
30
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
+
20
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
33
 
22
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -52,12 +64,19 @@ var ChatRobot =
52
64
  function (_super) {
53
65
  __extends(ChatRobot, _super);
54
66
 
55
- function ChatRobot() {
56
- var _this = _super !== null && _super.apply(this, arguments) || this;
67
+ function ChatRobot(props) {
68
+ var _this = _super.call(this, props) || this;
57
69
 
58
70
  _this.state = {
59
71
  open: false,
60
- message: ''
72
+ message: '',
73
+ context: [],
74
+ isGenerating: false
75
+ };
76
+
77
+ _this.scrollBottom = function () {
78
+ var container = document.getElementById('content_wrap');
79
+ container.scrollTop = container.scrollHeight;
61
80
  };
62
81
 
63
82
  _this.onMessageChage = function (e) {
@@ -66,13 +85,25 @@ function (_super) {
66
85
  });
67
86
  };
68
87
 
88
+ _this.getMarkText = function (text) {
89
+ return _marked.marked.parse(text);
90
+ };
91
+
69
92
  _this.onEnter = function () {
93
+ var message = _this.state.message;
94
+
70
95
  if (!message) {
71
96
  return;
72
97
  } // chat
73
98
 
74
99
 
100
+ _this.chatGpt.sendMessage(message);
101
+
102
+ var context = _this.chatGpt.getContext();
103
+
75
104
  _this.setState({
105
+ isGenerating: true,
106
+ context: context,
76
107
  message: ''
77
108
  });
78
109
  };
@@ -89,7 +120,19 @@ function (_super) {
89
120
  });
90
121
  };
91
122
 
92
- _this.onRegenarate = function () {};
123
+ _this.onRegenarate = function () {
124
+ _this.setState({
125
+ isGenerating: true
126
+ });
127
+
128
+ _this.chatGpt.regenerate();
129
+
130
+ var context = _this.chatGpt.getContext();
131
+
132
+ _this.setState({
133
+ context: context
134
+ });
135
+ };
93
136
 
94
137
  _this.generateImage = function () {
95
138
  _this.setState({
@@ -101,13 +144,46 @@ function (_super) {
101
144
  });
102
145
  };
103
146
 
147
+ _this.copyToClipboard = function (text) {
148
+ navigator.clipboard.writeText(text);
149
+ };
150
+
151
+ _this.chatGpt = new _FonixtreeGpt["default"]({
152
+ onMessage: function onMessage(text) {
153
+ document.getElementById('recent_response').innerHTML = _this.getMarkText(text);
154
+
155
+ _this.scrollBottom();
156
+ },
157
+ onEnd: function onEnd() {
158
+ var context = _this.chatGpt.getContext();
159
+
160
+ document.getElementById('recent_response').innerHTML = '';
161
+
162
+ _this.setState({
163
+ context: context,
164
+ isGenerating: false
165
+ });
166
+ }
167
+ });
104
168
  return _this;
105
169
  }
106
170
 
171
+ ChatRobot.prototype.componentDidMount = function () {
172
+ this.chatGpt.initChatGpt();
173
+ var context = this.chatGpt.getContext();
174
+ this.setState({
175
+ context: context
176
+ });
177
+ };
178
+
107
179
  ChatRobot.prototype.render = function () {
180
+ var _this = this;
181
+
108
182
  var _a = this.state,
183
+ context = _a.context,
109
184
  message = _a.message,
110
- open = _a.open;
185
+ open = _a.open,
186
+ isGenerating = _a.isGenerating;
111
187
  return /*#__PURE__*/_react["default"].createElement("div", {
112
188
  className: "chat_wrap"
113
189
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -119,7 +195,7 @@ function (_super) {
119
195
  type: "icon-ai"
120
196
  })), /*#__PURE__*/_react["default"].createElement(_antd.Drawer, {
121
197
  bodyStyle: {
122
- padding: 16
198
+ padding: 0
123
199
  },
124
200
  className: "chat_drawer",
125
201
  closable: false,
@@ -182,8 +258,34 @@ function (_super) {
182
258
  }, /*#__PURE__*/_react["default"].createElement("div", {
183
259
  className: "chat_content_wrap"
184
260
  }, /*#__PURE__*/_react["default"].createElement("div", {
185
- className: "content_wrap"
186
- }, /*#__PURE__*/_react["default"].createElement("div", null)), /*#__PURE__*/_react["default"].createElement("div", {
261
+ className: "content_wrap markdown-body",
262
+ id: "content_wrap"
263
+ }, context.length > 0 && context.map(function (ctxNode) {
264
+ return /*#__PURE__*/_react["default"].createElement("div", {
265
+ className: (0, _classnames["default"])('messageOuterWrap', {
266
+ userMessage: ctxNode.role === 'user',
267
+ assistantMessage: ctxNode.role === 'assistant'
268
+ })
269
+ }, /*#__PURE__*/_react["default"].createElement("div", {
270
+ className: "messageWrap"
271
+ }, /*#__PURE__*/_react["default"].createElement("div", {
272
+ className: "messageContentWrap",
273
+ dangerouslySetInnerHTML: {
274
+ __html: _this.getMarkText(ctxNode.content)
275
+ }
276
+ }), ctxNode.role === 'assistant' && /*#__PURE__*/_react["default"].createElement("div", {
277
+ className: "msgIconWrap"
278
+ }, /*#__PURE__*/_react["default"].createElement(_CopyBtn["default"], {
279
+ onClick: function onClick() {
280
+ _this.copyToClipboard(ctxNode.content);
281
+ }
282
+ }))));
283
+ }), isGenerating && /*#__PURE__*/_react["default"].createElement("div", {
284
+ className: "recent_response",
285
+ id: "recent_response"
286
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Spin, {
287
+ spinning: true
288
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
187
289
  className: "regenerate_btn",
188
290
  onClick: this.onRegenarate
189
291
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
@@ -36,13 +36,66 @@
36
36
  padding-bottom: 40px;
37
37
  height: 100%;
38
38
  .content_wrap {
39
+ padding: 16px;
39
40
  height: 100%;
41
+ overflow: scroll;
42
+ font-family: 'Open Sans';
43
+ font-size: 14px;
44
+ font-weight: 400;
45
+ line-height: 22px;
46
+ .messageOuterWrap {
47
+ margin-bottom: 20px;
48
+ .messageWrap {
49
+ position: relative;
50
+ width: fit-content;
51
+ max-width: 70%;
52
+ padding: 7px 14px;
53
+ .messageContentWrap {
54
+ display: flex;
55
+ flex-direction: column;
56
+ p {
57
+ margin-bottom: 0;
58
+ display: inline;
59
+ width: fit-content;
60
+ }
61
+ }
62
+
63
+ .msgIconWrap {
64
+ position: absolute;
65
+ right: -25px;
66
+ bottom: 0;
67
+ }
68
+ }
69
+ }
70
+ .userMessage {
71
+ display: flex;
72
+ justify-content: flex-end;
73
+ .messageWrap {
74
+ border-radius: 4px;
75
+ background: #E9F0FF;
76
+ color: #2F54EB;
77
+ }
78
+ }
79
+ .assistantMessage {
80
+ .messageWrap {
81
+ border-radius: 4px;
82
+ background: #F5F6F7;
83
+ color: #232F46;
84
+ }
85
+ }
86
+ .recent_response {
87
+ min-height: 36px;
88
+ max-width: 70%;
89
+ padding: 7px 14px;
90
+ background: #F5F6F7;
91
+ color: #232F46;
92
+ }
40
93
  }
41
94
  .regenerate_btn {
42
95
  display: flex;
43
96
  align-items: center;
44
97
  position: absolute;
45
- bottom: 0;
98
+ bottom: 10px;
46
99
  border: 1px solid #E6EAF0;
47
100
  border-radius: 4px;
48
101
  padding: 4px 12px;
@@ -0,0 +1 @@
1
+ .markdown-body{color-scheme:dark;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;color:#c9d1d9;background-color:#FFF;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:' ';display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:transparent;color:#58a6ff;text-decoration:none}.markdown-body abbr[title]{border-bottom:none;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:600}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:600;padding-bottom:.3em;font-size:2em;border-bottom:1px solid #21262d}.markdown-body mark{background-color:rgba(187,128,9,.15);color:#c9d1d9}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box;background-color:#0d1117}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em 40px}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:0 0;border-bottom:1px solid #21262d;height:.25em;padding:0;margin:24px 0;background-color:#30363d;border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:#6e7681;opacity:1}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body details:not([open])>:not(summary){display:none!important}.markdown-body [role=button]:focus,.markdown-body a:focus,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=radio]:focus{outline:2px solid #58a6ff;outline-offset:-2px;box-shadow:none}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible){outline:solid 1px transparent}.markdown-body [role=button]:focus-visible,.markdown-body a:focus-visible,.markdown-body input[type=checkbox]:focus-visible,.markdown-body input[type=radio]:focus-visible{outline:2px solid #58a6ff;outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;line-height:10px;color:#c9d1d9;vertical-align:middle;background-color:#161b22;border:solid 1px rgba(110,118,129,.4);border-bottom-color:rgba(110,118,129,.4);border-radius:6px;box-shadow:inset 0 -1px 0 rgba(110,118,129,.4)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h2{font-weight:600;padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #21262d}.markdown-body h3{font-weight:600;font-size:1.25em}.markdown-body h4{font-weight:600;font-size:1em}.markdown-body h5{font-weight:600;font-size:.875em}.markdown-body h6{font-weight:600;font-size:.85em;color:#8b949e}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:#8b949e;border-left:.25em solid #30363d}.markdown-body ol,.markdown-body ul{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code,.markdown-body samp,.markdown-body tt{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-inner-spin-button,.markdown-body input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#f85149}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:0}.markdown-body blockquote,.markdown-body details,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#c9d1d9;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 code,.markdown-body h1 tt,.markdown-body h2 code,.markdown-body h2 tt,.markdown-body h3 code,.markdown-body h3 tt,.markdown-body h4 code,.markdown-body h4 tt,.markdown-body h5 code,.markdown-body h5 tt,.markdown-body h6 code,.markdown-body h6 tt{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ol.no-list,.markdown-body ul.no-list{padding:0;list-style-type:none}.markdown-body ol[type=a]{list-style-type:lower-alpha}.markdown-body ol[type=A]{list-style-type:upper-alpha}.markdown-body ol[type=i]{list-style-type:lower-roman}.markdown-body ol[type=I]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #30363d}.markdown-body table tr{background-color:#0d1117;border-top:1px solid #21262d}.markdown-body table tr:nth-child(2n){background-color:#161b22}.markdown-body table img{background-color:transparent}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #30363d}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#c9d1d9}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:rgba(110,118,129,.4);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#9fa2a6;border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:#0d1117;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#161b22;border-top:0}.markdown-body [data-footnote-ref]::before{content:"["}.markdown-body [data-footnote-ref]::after{content:"]"}.markdown-body .footnotes{font-size:12px;color:#8b949e;border-top:1px solid #30363d}.markdown-body .footnotes ol{padding-left:16px}.markdown-body .footnotes ol ul{display:inline-block;padding-left:16px;margin-top:16px}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target::before{position:absolute;top:-8px;right:-8px;bottom:-8px;left:-24px;pointer-events:none;content:"";border:2px solid #1f6feb;border-radius:6px}.markdown-body .footnotes li:target{color:#c9d1d9}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body .pl-c{color:#8b949e}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#79c0ff}.markdown-body .pl-e,.markdown-body .pl-en{color:#d2a8ff}.markdown-body .pl-s .pl-s1,.markdown-body .pl-smi{color:#c9d1d9}.markdown-body .pl-ent{color:#7ee787}.markdown-body .pl-k{color:#ff7b72}.markdown-body .pl-pds,.markdown-body .pl-s,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre{color:#a5d6ff}.markdown-body .pl-smw,.markdown-body .pl-v{color:#ffa657}.markdown-body .pl-bu{color:#f85149}.markdown-body .pl-ii{color:#f0f6fc;background-color:#8e1519}.markdown-body .pl-c2{color:#f0f6fc;background-color:#b62324}.markdown-body .pl-sr .pl-cce{font-weight:700;color:#7ee787}.markdown-body .pl-ml{color:#f2cc60}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:#1f6feb}.markdown-body .pl-mi{font-style:italic;color:#c9d1d9}.markdown-body .pl-mb{font-weight:700;color:#c9d1d9}.markdown-body .pl-md{color:#ffdcd7;background-color:#67060c}.markdown-body .pl-mi1{color:#aff5b4;background-color:#033a16}.markdown-body .pl-mc{color:#ffdfb6;background-color:#5a1e02}.markdown-body .pl-mi2{color:#c9d1d9;background-color:#1158c7}.markdown-body .pl-mdr{font-weight:700;color:#d2a8ff}.markdown-body .pl-ba{color:#8b949e}.markdown-body .pl-sg{color:#484f58}.markdown-body .pl-corl{text-decoration:underline;color:#a5d6ff}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1em;font-style:normal!important;font-weight:400;line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:400}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:4px}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list{position:relative}.markdown-body .contains-task-list:focus-within .task-list-item-convert-container,.markdown-body .contains-task-list:hover .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip:auto}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}