@next-bricks/visual-builder 1.27.0 → 1.29.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.
Files changed (31) hide show
  1. package/dist/bricks.json +12 -12
  2. package/dist/chunks/5021.e1903483.js +2 -0
  3. package/dist/chunks/5021.e1903483.js.map +1 -0
  4. package/dist/chunks/7150.ac864502.js +3 -0
  5. package/dist/chunks/7150.ac864502.js.map +1 -0
  6. package/dist/chunks/9130.51e9c8f2.js +3 -0
  7. package/dist/chunks/9130.51e9c8f2.js.map +1 -0
  8. package/dist/chunks/{main.fe98968d.js → main.5596cdaa.js} +2 -2
  9. package/dist/chunks/{main.fe98968d.js.map → main.5596cdaa.js.map} +1 -1
  10. package/dist/chunks/property-editor.6e901980.js +2 -0
  11. package/dist/chunks/property-editor.6e901980.js.map +1 -0
  12. package/dist/index.3659828c.js +2 -0
  13. package/dist/{index.d8054e2e.js.map → index.3659828c.js.map} +1 -1
  14. package/dist/manifest.json +71 -60
  15. package/dist/types.json +60 -2
  16. package/dist-types/property-editor/components/common/BoxSizeComponent.d.ts +8 -0
  17. package/dist-types/property-editor/components/common/CustomTab.d.ts +5 -0
  18. package/dist-types/property-editor/components/common/InputWithUnitComponent.d.ts +7 -0
  19. package/dist-types/property-editor/components/common/UseChildrenSelectComponent.d.ts +7 -0
  20. package/dist-types/property-editor/index.d.ts +62 -13
  21. package/dist-types/property-editor/schema/styles.schema.d.ts +2 -0
  22. package/package.json +2 -2
  23. package/dist/chunks/3807.3deff838.js +0 -3
  24. package/dist/chunks/3807.3deff838.js.map +0 -1
  25. package/dist/chunks/9992.cbc677c3.js +0 -3
  26. package/dist/chunks/9992.cbc677c3.js.map +0 -1
  27. package/dist/chunks/property-editor.288470b8.js +0 -2
  28. package/dist/chunks/property-editor.288470b8.js.map +0 -1
  29. package/dist/index.d8054e2e.js +0 -2
  30. /package/dist/chunks/{3807.3deff838.js.LICENSE.txt → 7150.ac864502.js.LICENSE.txt} +0 -0
  31. /package/dist/chunks/{9992.cbc677c3.js.LICENSE.txt → 9130.51e9c8f2.js.LICENSE.txt} +0 -0
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface BoxSizeComponentProps {
3
+ onChange: (value: string) => void;
4
+ value: string;
5
+ mode: "in" | "out";
6
+ }
7
+ export declare function BoxSizeComponent({ onChange, value, mode, }: BoxSizeComponentProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export declare function CustomTab(props: any): React.JSX.Element;
3
+ export declare namespace CustomTab {
4
+ var TabPanel: (props: any) => React.JSX.Element;
5
+ }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { InputProps } from "antd";
3
+ type InputWithUnitComponentProps = InputProps & {
4
+ onChange: (value: string) => void;
5
+ };
6
+ export declare function InputWithUnitComponent(props: InputWithUnitComponentProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { SelectProps } from "antd";
3
+ type UseChildrenSelectComponentProps = SelectProps & {
4
+ triggerAction: (action: string) => void;
5
+ };
6
+ export declare function UseChildrenSelectComponent(props: UseChildrenSelectComponentProps): React.JSX.Element;
7
+ export {};
@@ -10,6 +10,10 @@ import { IconSelectComponent } from "./components/common/IconSelectComponent";
10
10
  import { ColorPickerComponent } from "./components/common/ColorPickerComponent";
11
11
  import { InputWithUrlComponent } from "./components/common/InputWithUrlComponent";
12
12
  import { TextAlignRadioComponent } from "./components/common/TextAlignRadioComponent";
13
+ import { InputWithUnitComponent } from "./components/common/InputWithUnitComponent";
14
+ import { UseChildrenSelectComponent } from "./components/common/UseChildrenSelectComponent";
15
+ import { BoxSizeComponent } from "./components/common/BoxSizeComponent";
16
+ import { CustomTab } from "./components/common/CustomTab";
13
17
  import { DataNode } from "./utils/formilySchemaFormatter";
14
18
  import "./style.css";
15
19
  import { BrickPackage } from "@next-core/types";
@@ -19,7 +23,7 @@ declare const SchemaField: {
19
23
  <Decorator extends import("@formily/react").JSXComponent, Component extends import("@formily/react").JSXComponent>(props: import("@formily/react").ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
20
24
  displayName: string;
21
25
  Markup: {
22
- <Decorator_1 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_1 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaMarkupFieldProps<{
26
+ <Decorator_1 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_1 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaMarkupFieldProps<{
23
27
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
24
28
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
25
29
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -56,13 +60,17 @@ declare const SchemaField: {
56
60
  CodeEditor: typeof CodeEditorComponent;
57
61
  IconSelect: typeof IconSelectComponent;
58
62
  ColorPicker: typeof ColorPickerComponent;
63
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
59
64
  InputWithUrl: typeof InputWithUrlComponent;
65
+ InputWithUnit: typeof InputWithUnitComponent;
60
66
  TextAlignRadio: typeof TextAlignRadioComponent;
67
+ BoxSize: typeof BoxSizeComponent;
68
+ CustomTab: typeof CustomTab;
61
69
  }, Component_1, Decorator_1>): JSX.Element;
62
70
  displayName: string;
63
71
  };
64
72
  String: {
65
- <Decorator_2 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_2 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
73
+ <Decorator_2 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_2 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
66
74
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
67
75
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
68
76
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -99,13 +107,17 @@ declare const SchemaField: {
99
107
  CodeEditor: typeof CodeEditorComponent;
100
108
  IconSelect: typeof IconSelectComponent;
101
109
  ColorPicker: typeof ColorPickerComponent;
110
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
102
111
  InputWithUrl: typeof InputWithUrlComponent;
112
+ InputWithUnit: typeof InputWithUnitComponent;
103
113
  TextAlignRadio: typeof TextAlignRadioComponent;
114
+ BoxSize: typeof BoxSizeComponent;
115
+ CustomTab: typeof CustomTab;
104
116
  }, Component_2, Decorator_2>): JSX.Element;
105
117
  displayName: string;
106
118
  };
107
119
  Object: {
108
- <Decorator_3 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_3 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
120
+ <Decorator_3 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_3 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
109
121
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
110
122
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
111
123
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -142,13 +154,17 @@ declare const SchemaField: {
142
154
  CodeEditor: typeof CodeEditorComponent;
143
155
  IconSelect: typeof IconSelectComponent;
144
156
  ColorPicker: typeof ColorPickerComponent;
157
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
145
158
  InputWithUrl: typeof InputWithUrlComponent;
159
+ InputWithUnit: typeof InputWithUnitComponent;
146
160
  TextAlignRadio: typeof TextAlignRadioComponent;
161
+ BoxSize: typeof BoxSizeComponent;
162
+ CustomTab: typeof CustomTab;
147
163
  }, Component_3, Decorator_3>): JSX.Element;
148
164
  displayName: string;
149
165
  };
150
166
  Array: {
151
- <Decorator_4 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_4 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
167
+ <Decorator_4 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_4 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
152
168
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
153
169
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
154
170
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -185,13 +201,17 @@ declare const SchemaField: {
185
201
  CodeEditor: typeof CodeEditorComponent;
186
202
  IconSelect: typeof IconSelectComponent;
187
203
  ColorPicker: typeof ColorPickerComponent;
204
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
188
205
  InputWithUrl: typeof InputWithUrlComponent;
206
+ InputWithUnit: typeof InputWithUnitComponent;
189
207
  TextAlignRadio: typeof TextAlignRadioComponent;
208
+ BoxSize: typeof BoxSizeComponent;
209
+ CustomTab: typeof CustomTab;
190
210
  }, Component_4, Decorator_4>): JSX.Element;
191
211
  displayName: string;
192
212
  };
193
213
  Boolean: {
194
- <Decorator_5 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_5 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
214
+ <Decorator_5 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_5 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
195
215
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
196
216
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
197
217
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -228,13 +248,17 @@ declare const SchemaField: {
228
248
  CodeEditor: typeof CodeEditorComponent;
229
249
  IconSelect: typeof IconSelectComponent;
230
250
  ColorPicker: typeof ColorPickerComponent;
251
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
231
252
  InputWithUrl: typeof InputWithUrlComponent;
253
+ InputWithUnit: typeof InputWithUnitComponent;
232
254
  TextAlignRadio: typeof TextAlignRadioComponent;
255
+ BoxSize: typeof BoxSizeComponent;
256
+ CustomTab: typeof CustomTab;
233
257
  }, Component_5, Decorator_5>): JSX.Element;
234
258
  displayName: string;
235
259
  };
236
260
  Date: {
237
- <Decorator_6 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_6 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
261
+ <Decorator_6 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_6 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
238
262
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
239
263
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
240
264
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -271,13 +295,17 @@ declare const SchemaField: {
271
295
  CodeEditor: typeof CodeEditorComponent;
272
296
  IconSelect: typeof IconSelectComponent;
273
297
  ColorPicker: typeof ColorPickerComponent;
298
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
274
299
  InputWithUrl: typeof InputWithUrlComponent;
300
+ InputWithUnit: typeof InputWithUnitComponent;
275
301
  TextAlignRadio: typeof TextAlignRadioComponent;
302
+ BoxSize: typeof BoxSizeComponent;
303
+ CustomTab: typeof CustomTab;
276
304
  }, Component_6, Decorator_6>): JSX.Element;
277
305
  displayName: string;
278
306
  };
279
307
  DateTime: {
280
- <Decorator_7 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_7 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
308
+ <Decorator_7 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_7 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
281
309
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
282
310
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
283
311
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -314,13 +342,17 @@ declare const SchemaField: {
314
342
  CodeEditor: typeof CodeEditorComponent;
315
343
  IconSelect: typeof IconSelectComponent;
316
344
  ColorPicker: typeof ColorPickerComponent;
345
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
317
346
  InputWithUrl: typeof InputWithUrlComponent;
347
+ InputWithUnit: typeof InputWithUnitComponent;
318
348
  TextAlignRadio: typeof TextAlignRadioComponent;
349
+ BoxSize: typeof BoxSizeComponent;
350
+ CustomTab: typeof CustomTab;
319
351
  }, Component_7, Decorator_7>): JSX.Element;
320
352
  displayName: string;
321
353
  };
322
354
  Void: {
323
- <Decorator_8 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_8 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
355
+ <Decorator_8 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_8 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
324
356
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
325
357
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
326
358
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -357,13 +389,17 @@ declare const SchemaField: {
357
389
  CodeEditor: typeof CodeEditorComponent;
358
390
  IconSelect: typeof IconSelectComponent;
359
391
  ColorPicker: typeof ColorPickerComponent;
392
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
360
393
  InputWithUrl: typeof InputWithUrlComponent;
394
+ InputWithUnit: typeof InputWithUnitComponent;
361
395
  TextAlignRadio: typeof TextAlignRadioComponent;
396
+ BoxSize: typeof BoxSizeComponent;
397
+ CustomTab: typeof CustomTab;
362
398
  }, Component_8, Decorator_8>): JSX.Element;
363
399
  displayName: string;
364
400
  };
365
401
  Number: {
366
- <Decorator_9 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_9 extends "CodeEditor" | "FormItem" | "FormItemWithoutAdvanced" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "InputWithUrl" | "TextAlignRadio" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
402
+ <Decorator_9 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_9 extends "CodeEditor" | "CustomTab.TabPanel" | "FormItemWithoutAdvanced" | "InputWithUnit" | "TextAlignRadio" | "ColorPicker" | "BoxSize" | "FormItem" | "CustomTab" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "UseChildrenSelect" | "InputWithUrl" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
367
403
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
368
404
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
369
405
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -400,12 +436,20 @@ declare const SchemaField: {
400
436
  CodeEditor: typeof CodeEditorComponent;
401
437
  IconSelect: typeof IconSelectComponent;
402
438
  ColorPicker: typeof ColorPickerComponent;
439
+ UseChildrenSelect: typeof UseChildrenSelectComponent;
403
440
  InputWithUrl: typeof InputWithUrlComponent;
441
+ InputWithUnit: typeof InputWithUnitComponent;
404
442
  TextAlignRadio: typeof TextAlignRadioComponent;
443
+ BoxSize: typeof BoxSizeComponent;
444
+ CustomTab: typeof CustomTab;
405
445
  }, Component_9, Decorator_9>): JSX.Element;
406
446
  displayName: string;
407
447
  };
408
448
  };
449
+ type SelectOptions = {
450
+ label: string;
451
+ value: string;
452
+ }[];
409
453
  export interface EditorComponentProps {
410
454
  advancedMode?: boolean;
411
455
  SchemaFieldComponent: typeof SchemaField;
@@ -423,9 +467,11 @@ export interface EditorComponentProps {
423
467
  scope: {
424
468
  advancedMode: boolean;
425
469
  dataList: DataItem[];
426
- extraLibs: any;
470
+ childSlots: SelectOptions;
471
+ extraLibs: SelectOptions;
427
472
  links: any;
428
473
  tokenClick: (token: CustomEvent<string>) => void;
474
+ triggerAction: (action: string) => void;
429
475
  };
430
476
  }
431
477
  export interface DefinitionItem {
@@ -455,7 +501,8 @@ export declare class PropertyEditor extends ReactNextElement {
455
501
  accessor dataList: DataItem[];
456
502
  accessor editorPackages: BrickPackage[];
457
503
  accessor links: any;
458
- accessor extraLibs: any;
504
+ accessor extraLibs: SelectOptions;
505
+ accessor childSlots: SelectOptions;
459
506
  validate(): void;
460
507
  render(): React.JSX.Element;
461
508
  }
@@ -463,12 +510,14 @@ export interface PropertyEditorProps {
463
510
  values: any;
464
511
  editorName: string;
465
512
  advancedMode?: boolean;
513
+ childSlots?: SelectOptions;
514
+ extraLibs: SelectOptions;
466
515
  dataList: DataItem[];
467
- extraLibs: any;
468
516
  links: any;
469
517
  editorPackages: BrickPackage[];
470
518
  handleValuesChange: (value: any) => void;
471
519
  handleTokenClick: (token: string) => void;
520
+ handleTriggerAction: (action: string) => void;
472
521
  onSubmitEffect: (listener: (value: any, form: Form) => any) => void;
473
522
  }
474
- export declare function LegacyPropertyEditor({ advancedMode, values, editorName, dataList, editorPackages, extraLibs, links, handleValuesChange, handleTokenClick, onSubmitEffect, }: PropertyEditorProps, ref: any): React.JSX.Element;
523
+ export declare function LegacyPropertyEditor({ advancedMode, values, editorName, dataList, editorPackages, extraLibs, childSlots, links, handleValuesChange, handleTokenClick, handleTriggerAction, onSubmitEffect, }: PropertyEditorProps, ref: any): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DataNode } from "../utils/formilySchemaFormatter";
2
+ export declare const stylesSchema: DataNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/visual-builder",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/visual-builder",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,5 +44,5 @@
44
44
  "@next-bricks/icons": "*",
45
45
  "@next-bricks/vs": "*"
46
46
  },
47
- "gitHead": "42631e65caff4395ef4ec8781e77d27f481a14eb"
47
+ "gitHead": "42b8d52e4787a5e044b4513d120d050848641f8f"
48
48
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see 3807.3deff838.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[3807],{3807:(e,t,n)=>{n.r(t);var a,i=n(4635),o=n(918),r=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),h=n(8769),u=n.n(h),p=n(1929),m=n(4223),v=n(7180),g=n(9765),f=n(3373),A=n.n(f);let b,E,k,y,w,x,N,L,C,M,T,R,I,O,_;const S=(0,m.wrapBrick)("eo-icon"),{defineElement:D,property:P,event:W}=(0,p.createDecorators)();let $;var F=new WeakMap,B=new WeakMap,U=new WeakMap,z=new WeakMap,V=new WeakSet,j=new WeakMap,K=new WeakMap,H=new WeakMap;class G extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,V),(0,o.A)(this,F,E(this)),(0,o.A)(this,B,(k(this),y(this))),(0,o.A)(this,U,(w(this),x(this))),(0,o.A)(this,z,(N(this),L(this))),(0,o.A)(this,j,(T(this),e=>{e!==this.active&&(this.active=e,(0,s.A)(V,this,C).emit(e))})),(0,o.A)(this,K,R(this)),(0,o.A)(this,H,(_(this),()=>{(0,s.A)(V,this,I).emit()}))}get titleLabel(){return(0,c.A)(F,this)}set titleLabel(e){(0,l.A)(F,this,e)}get active(){return(0,c.A)(B,this)}set active(e){(0,l.A)(B,this,e)}get badge(){return(0,c.A)(U,this)}set badge(e){(0,l.A)(U,this,e)}render(){return u().createElement(Y,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,c.A)(j,this),onFirstActivated:(0,c.A)(H,this)})}}function Y(e){let{titleLabel:t,active:n,badge:a,onActiveChange:i,onFirstActivated:o}=e;const[r,s]=(0,h.useState)(n),[l,c]=(0,h.useState)(!1);(0,h.useEffect)((()=>{s(n)}),[n]),(0,h.useEffect)((()=>{null==i||i(r)}),[r,i]);const d=(0,h.useCallback)((()=>{s((e=>!e)),l||r||(c(!0),null==o||o())}),[l,r,o]),p=(0,h.useRef)(),[m,v]=(0,h.useState)(!1),g=(0,h.useMemo)((()=>function(e){let t;const n=()=>cancelAnimationFrame(t),a=function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];t&&n(),t=requestAnimationFrame((()=>{(()=>{v(p.current.scrollTop>0)})(...a)}))};return a.cancel=n,a}()),[]);return u().createElement("div",{className:A()("pane",{scrolled:m})},u().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},u().createElement("div",{className:"pane-title"},u().createElement("span",{className:"title-icon"},r?u().createElement(S,{lib:"antd",theme:"outlined",icon:"down"}):u().createElement(S,{lib:"antd",theme:"outlined",icon:"right"})),u().createElement("div",{className:"title-label"},t),u().createElement("slot",{name:"title"})),u().createElement("slot",{name:"actions"}),a&&u().createElement("div",{className:"badge"},a),u().createElement("div",{className:"pane-scroll-shadow"})),u().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:g,ref:p},u().createElement("slot",null,u().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}a=G,({e:[E,k,y,w,x,N,L,C,M,T,R,I,O,_],c:[$,b]}=(0,d.A)(a,[D("visual-builder.workbench-pane",{styleTexts:[v.A,g.A]})],[[P(),1,"titleLabel"],[P({type:Boolean}),1,"active"],[P({type:Number}),1,"badge"],[W({type:"active.change"}),1,"activeChangeEvent",e=>(0,c.A)(z,e),(e,t)=>(0,l.A)(z,e,t)],[W({type:"active.firstActivated"}),1,"activeFirstActivatedEvent",e=>(0,c.A)(K,e),(e,t)=>(0,l.A)(K,e,t)]],0,(e=>H.has((0,r.A)(e))),m.ReactNextElement)),b();var X,q=n(4586),J=n(2150);let Q,Z,ee;const{defineElement:te,property:ne}=(0,p.createDecorators)();let ae;var ie=new WeakMap,oe=new WeakMap,re=new WeakMap,se=new WeakMap;class le extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,ie,Z(this)),(0,o.A)(this,oe,(ee(this),()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")})),(0,o.A)(this,re,(()=>{const e=(0,c.A)(oe,this).call(this).assignedNodes();for(const t of e)t.active?t.style.flex=String(t.activeFlex??"1"):t.style.flex="initial"})),(0,o.A)(this,se,(e=>{const t=e.target.assignedNodes();for(const e of t)e.addEventListener("active.change",(0,c.A)(re,this))})),(0,q.A)(this,"refCallback",(()=>{(0,c.A)(re,this).call(this);const e=(0,c.A)(oe,this).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,c.A)(se,this).call(this,e)}))}))}get titleLabel(){return(0,c.A)(ie,this)}set titleLabel(e){(0,l.A)(ie,this,e)}render(){return u().createElement(ce,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ce(e){let{titleLabel:t,refCallback:n}=e;return u().createElement("div",{className:"sidebar",ref:n},u().createElement("div",{className:"title-container"},u().createElement("div",{className:"title-label"},t),u().createElement("slot",{name:"titleToolbar"})),u().createElement("div",{className:"pane-container"},u().createElement("slot",null)))}X=le,({e:[Z,ee],c:[ae,Q]}=(0,d.A)(X,[te("visual-builder.workbench-sidebar",{styleTexts:[J.A]})],[[ne(),1,"titleLabel"]],0,void 0,m.ReactNextElement)),Q();var de,he=n(5292);let ue,pe,me,ve,ge,fe,Ae,be,Ee,ke,ye;const{defineElement:we,property:xe}=(0,p.createDecorators)(),Ne=(0,m.wrapBrick)("eo-link"),Le=(0,m.wrapBrick)("eo-icon");let Ce;var Me=new WeakMap,Te=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Oe=new WeakMap;class _e extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,Me,pe(this)),(0,o.A)(this,Te,(me(this),ve(this))),(0,o.A)(this,Re,(ge(this),fe(this))),(0,o.A)(this,Ie,(Ae(this),be(this))),(0,o.A)(this,Oe,(Ee(this),ke(this))),ye(this)}get icon(){return(0,c.A)(Me,this)}set icon(e){(0,l.A)(Me,this,e)}get to(){return(0,c.A)(Te,this)}set to(e){(0,l.A)(Te,this,e)}get active(){return(0,c.A)(Re,this)}set active(e){(0,l.A)(Re,this,e)}get href(){return(0,c.A)(Ie,this)}set href(e){(0,l.A)(Ie,this,e)}get target(){return(0,c.A)(Oe,this)}set target(e){(0,l.A)(Oe,this,e)}render(){return u().createElement(Se,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function Se(e){let{icon:t,to:n,active:a,href:i,target:o}=e;return u().createElement(Ne,{className:A()("action",{active:a}),url:n,href:i,target:o},u().createElement(Le,t))}de=_e,({e:[pe,me,ve,ge,fe,Ae,be,Ee,ke,ye],c:[Ce,ue]}=(0,d.A)(de,[we("visual-builder.workbench-action",{styleTexts:[he.A]})],[[xe({attribute:!1}),1,"icon"],[xe(),1,"to"],[xe({type:Boolean}),1,"active"],[xe(),1,"href"],[xe(),1,"target"]],0,void 0,m.ReactNextElement)),ue();var De=n(6916),Pe=n(1201);function We(e,t,n,a){const i=[],o=[],r=[];let s=0;return e&&e.forEach((e=>{if(e.key=""===a?`${s}`:`${a}.${s}`,function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){const a=We(e.items,t,n,e.key);i.push(...a.selectedKeys),(a.selectedKeys.length||e.defaultExpanded)&&o.push(e.key),o.push(...a.openedKeys),r.push(...a.matchedKeys)}else if(function(e,t,n){if(!e.to)return!1;const a="object"==typeof e.to?e.to:(0,Pe.parsePath)(e.to),i=a.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");let o=!!(0,De.matchPath)(t,{path:i,exact:e.exact});if(o&&e.activeMatchSearch&&(o=$e(n,a.search)),!o&&Array.isArray(e.activeIncludes))for(const a of e.activeIncludes){var r;let e;const i=a.includes("?");if(i&&(e=(0,Pe.parsePath)(a)),o=!!(0,De.matchPath)(t,{path:i?e.pathname:a,exact:!0}),o&&null!==(r=e)&&void 0!==r&&r.search&&(o=$e(n,e.search)),o)break}if(o&&Array.isArray(e.activeExcludes))for(const n of e.activeExcludes)if(o=!(0,De.matchPath)(t,{path:n,exact:!0}),!o)break;return o}(e,t,n)){i.push(String(e.key));const t=e.key.split(".");for(let e=0;e<t.length;e++)r.push(t.slice(0,e+1).join("."))}s+=1})),i.length&&""!==a&&o.push(a),{selectedKeys:i,openedKeys:o,matchedKeys:r}}function $e(e,t){const n=new URLSearchParams(e),a=new URLSearchParams(t);for(const[e,t]of a.entries())if((n.get(e)??"")!==t)return!1;return!0}var Fe,Be=n(3430);let Ue,ze,Ve,je,Ke;const He=(0,m.wrapBrick)("visual-builder.workbench-action"),{defineElement:Ge,property:Ye}=(0,p.createDecorators)();let Xe;var qe=new WeakMap,Je=new WeakMap;class Qe extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,qe,ze(this)),(0,o.A)(this,Je,(Ve(this),je(this))),Ke(this)}get appId(){return(0,c.A)(qe,this)}set appId(e){(0,l.A)(qe,this,e)}get menu(){return(0,c.A)(Je,this)}set menu(e){(0,l.A)(Je,this,e)}render(){return u().createElement(tt,{appId:this.appId,menu:this.menu})}}let Ze;Fe=Qe,({e:[ze,Ve,je,Ke],c:[Xe,Ue]}=(0,d.A)(Fe,[Ge("visual-builder.workbench-action-list",{styleTexts:[Be.A]})],[[Ye(),1,"appId"],[Ye({attribute:!1}),1,"menu"]],0,void 0,m.ReactNextElement)),Ue();const et=new Map;function tt(e){var t;let{appId:n,menu:a}=e;const i=(0,De.getHistory)(),[o,r]=(0,h.useState)(),[s,l]=(0,h.useState)(i.location);return(0,h.useEffect)((()=>{const e=i.listen((e=>{l(e)}));return e}),[i]),(0,h.useEffect)((()=>{Ze||(Ze=n),Ze!==n&&(et.clear(),Ze=n)}),[n]),(0,h.useEffect)((()=>{const{pathname:e,search:t}=s,{selectedKeys:n}=We((null==a?void 0:a.menuItems)??[],e,t,"");r(Number(n[0]))}),[a,s]),u().createElement("div",{className:"workBenchActionList"},null==a||null===(t=a.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){let n=e.to;return o!==t&&et.has(t)&&(n=et.get(t)),u().createElement(He,{key:t,icon:e.icon,to:n,href:e.href,target:e.target,active:o===t,onClick:()=>(e=>{e.href||et.set(o,`${s.pathname}${s.search}`)})(e)})}})).filter(Boolean))}var nt,at=n(1030),it=n.n(at),ot=n(4940),rt=n(7758),st=n(9406),lt=n(675),ct=n(7995),dt=n(6275);let ht,ut,pt,mt,vt,gt,ft,At,bt,Et,kt,yt,wt,xt,Nt,Lt,Ct,Mt,Tt,Rt,It,Ot,_t,St,Dt,Pt,Wt,$t,Ft,Bt,Ut,zt,Vt,jt,Kt,Ht,Gt,Yt,Xt,qt,Jt,Qt,Zt,en,tn,nn,an,on,rn,sn,ln,cn,dn,hn,un,pn,mn;function vn(e){return e.key}n(9583);const{defineElement:gn,property:fn,event:An}=(0,p.createDecorators)();let bn;var En=new WeakMap,kn=new WeakMap,yn=new WeakMap,wn=new WeakMap,xn=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,Cn=new WeakMap,Mn=new WeakMap,Tn=new WeakMap,Rn=new WeakMap,In=new WeakMap,On=new WeakMap,_n=new WeakMap,Sn=new WeakMap,Dn=new WeakMap,Pn=new WeakMap,Wn=new WeakMap,$n=new WeakMap,Fn=new WeakSet,Bn=new WeakMap,Un=new WeakMap,zn=new WeakMap,Vn=new WeakMap,jn=new WeakMap,Kn=new WeakMap,Hn=new WeakMap,Gn=new WeakMap,Yn=new WeakMap;class Xn extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Fn),(0,o.A)(this,En,ut(this)),(0,o.A)(this,kn,(pt(this),mt(this))),(0,o.A)(this,yn,(vt(this),gt(this))),(0,o.A)(this,wn,(ft(this),At(this))),(0,o.A)(this,xn,(bt(this),Et(this))),(0,o.A)(this,Nn,(kt(this),yt(this))),(0,o.A)(this,Ln,(wt(this),xt(this))),(0,o.A)(this,Cn,(Nt(this),Lt(this))),(0,o.A)(this,Mn,(Ct(this),Mt(this))),(0,o.A)(this,Tn,(Tt(this),Rt(this))),(0,o.A)(this,Rn,(It(this),Ot(this))),(0,o.A)(this,In,(_t(this),St(this))),(0,o.A)(this,On,(Dt(this),Pt(this))),(0,o.A)(this,_n,(Wt(this),$t(this))),(0,o.A)(this,Sn,(Ft(this),Bt(this))),(0,o.A)(this,Dn,(Ut(this),zt(this))),(0,o.A)(this,Pn,(Vt(this),jt(this))),(0,o.A)(this,Wn,(Kt(this),Ht(this))),(0,o.A)(this,$n,(Gt(this),Yt(this))),(0,o.A)(this,Bn,(Jt(this),e=>{(0,s.A)(Fn,this,Xt).emit(e)})),(0,o.A)(this,Un,Qt(this)),(0,o.A)(this,zn,(tn(this),e=>()=>{(0,s.A)(Fn,this,Zt).emit(e.data)})),(0,o.A)(this,Vn,nn(this)),(0,o.A)(this,jn,(rn(this),e=>{(0,s.A)(Fn,this,an).emit(e)})),(0,o.A)(this,Kn,sn(this)),(0,o.A)(this,Hn,(dn(this),e=>t=>{t.preventDefault(),(0,s.A)(Fn,this,ln).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})})),(0,o.A)(this,Gn,hn(this)),(0,o.A)(this,Yn,(mn(this),(e,t)=>{(0,s.A)(Fn,this,un).emit({nodeId:e,collapsed:t})}))}get nodes(){return(0,c.A)(En,this)}set nodes(e){(0,l.A)(En,this,e)}get actions(){return(0,c.A)(kn,this)}set actions(e){(0,l.A)(kn,this,e)}get actionsHidden(){return(0,c.A)(yn,this)}set actionsHidden(e){(0,l.A)(yn,this,e)}get placeholder(){return(0,c.A)(wn,this)}set placeholder(e){(0,l.A)(wn,this,e)}get isTransformName(){return(0,c.A)(xn,this)}set isTransformName(e){(0,l.A)(xn,this,e)}get searchPlaceholder(){return(0,c.A)(Nn,this)}set searchPlaceholder(e){(0,l.A)(Nn,this,e)}get noSearch(){return(0,c.A)(Ln,this)}set noSearch(e){(0,l.A)(Ln,this,e)}get activeKey(){return(0,c.A)(Cn,this)}set activeKey(e){(0,l.A)(Cn,this,e)}get showMatchedNodeOnly(){return(0,c.A)(Mn,this)}set showMatchedNodeOnly(e){(0,l.A)(Mn,this,e)}get matchNodeDataFields(){return(0,c.A)(Tn,this)}set matchNodeDataFields(e){(0,l.A)(Tn,this,e)}get fixedActionsFor(){return(0,c.A)(Rn,this)}set fixedActionsFor(e){(0,l.A)(Rn,this,e)}get collapsible(){return(0,c.A)(In,this)}set collapsible(e){(0,l.A)(In,this,e)}get collapsedNodes(){return(0,c.A)(On,this)}set collapsedNodes(e){(0,l.A)(On,this,e)}get allowDrag(){return(0,c.A)(_n,this)}set allowDrag(e){(0,l.A)(_n,this,e)}get allowDragToRoot(){return(0,c.A)(Sn,this)}set allowDragToRoot(e){(0,l.A)(Sn,this,e)}get allowDragToInside(){return(0,c.A)(Dn,this)}set allowDragToInside(e){(0,l.A)(Dn,this,e)}get nodeKey(){return(0,c.A)(Pn,this)}set nodeKey(e){(0,l.A)(Pn,this,e)}get skipNotify(){return(0,c.A)(Wn,this)}set skipNotify(e){(0,l.A)(Wn,this,e)}render(){return u().createElement(ot.e.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,c.A)(Bn,this)}},u().createElement(st.N.Provider,{value:{activeKey:this.activeKey,basePaddingLeft:5,showMatchedNodeOnly:this.showMatchedNodeOnly,isTransformName:this.isTransformName,fixedActionsFor:this.fixedActionsFor,nodeKey:this.nodeKey,collapsible:this.collapsible,collapsedNodes:this.collapsedNodes,getCollapsedId:vn,onNodeToggle:(0,c.A)(Yn,this),skipNotify:this.skipNotify,clickFactory:(0,c.A)(zn,this),contextMenuFactory:(0,c.A)(Hn,this),matchNode:(e,t)=>{var n;return(0,lt.U)(e.name,t)||!(null===(n=this.matchNodeDataFields)||void 0===n||!n.length)&&(0,lt.U)("*"===this.matchNodeDataFields?e.data:(0,at.pick)(e.data,this.matchNodeDataFields),t)}}},u().createElement(rt.cU,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,c.A)(jn,this),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}nt=Xn,({e:[ut,pt,mt,vt,gt,ft,At,bt,Et,kt,yt,wt,xt,Nt,Lt,Ct,Mt,Tt,Rt,It,Ot,_t,St,Dt,Pt,Wt,$t,Ft,Bt,Ut,zt,Vt,jt,Kt,Ht,Gt,Yt,Xt,qt,Jt,Qt,Zt,en,tn,nn,an,on,rn,sn,ln,cn,dn,hn,un,pn,mn],c:[bn,ht]}=(0,d.A)(nt,[gn("visual-builder.workbench-tree",{styleTexts:[ct.A,dt.A]})],[[fn({attribute:!1}),1,"nodes"],[fn({attribute:!1}),1,"actions"],[fn({type:Boolean}),1,"actionsHidden"],[fn(),1,"placeholder"],[fn({type:Boolean}),1,"isTransformName"],[fn(),1,"searchPlaceholder"],[fn({type:Boolean}),1,"noSearch"],[fn({attribute:!1}),1,"activeKey"],[fn({type:Boolean}),1,"showMatchedNodeOnly"],[fn({attribute:!1}),1,"matchNodeDataFields"],[fn({attribute:!1}),1,"fixedActionsFor"],[fn({type:Boolean}),1,"collapsible"],[fn({attribute:!1}),1,"collapsedNodes"],[fn({type:Boolean}),1,"allowDrag"],[fn({type:Boolean}),1,"allowDragToRoot"],[fn({type:Boolean}),1,"allowDragToInside"],[fn({type:String}),1,"nodeKey"],[fn({type:Boolean}),1,"skipNotify"],[An({type:"action.click"}),1,"actionClickEvent",e=>(0,c.A)($n,e),(e,t)=>(0,l.A)($n,e,t)],[An({type:"node.click"}),1,"nodeClickEvent",e=>(0,c.A)(Un,e),(e,t)=>(0,l.A)(Un,e,t)],[An({type:"node.drop"}),1,"nodeDropEvent",e=>(0,c.A)(Vn,e),(e,t)=>(0,l.A)(Vn,e,t)],[An({type:"context.menu"}),1,"nodeContextMenuEvent",e=>(0,c.A)(Kn,e),(e,t)=>(0,l.A)(Kn,e,t)],[An({type:"node.toggle"}),1,"nodeToggleEvent",e=>(0,c.A)(Gn,e),(e,t)=>(0,l.A)(Gn,e,t)]],0,(e=>Yn.has((0,r.A)(e))),m.ReactNextElement)),ht();var qn=n(8896),Jn=n(9027);n(6788),customElements.define("visual-builder.inject-preview-agent",(0,qn.createProviderClass)((function(e,t){return(0,Jn.A)(e,t)})));var Qn=n(155),Zn=n.n(Qn),ea=n(1361),ta=n(5502);let na=function(e){return e.LOAD_MORE="LOAD_MORE",e.LOADING="LOADING",e.NO_DATA="NO_DATA",e.NODE="NODE",e.ADD="ADD",e.EDIT="EDIT",e.DELETE="DELETE",e.IMPORT="IMPORT",e.CLONE="CLONE",e.APPEND_RELATION="APPEND_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REMOVE_RELATION="REMOVE_RELATION",e.ROLLBACK="ROLLBACK",e.ROLLBACK_ALL="ROLLBACK_ALL",e.ADD_FULL="ADD_FULL",e.EDIT_FULL="EDIT_FULL",e.DELETE_FULL="DELETE_FULL",e.IMPORT_FULL="IMPORT_FULL",e.CLONE_FULL="CLONE_FULL",e.APPEND_RELATION_FULL="APPEND_RELATION_FULL",e.UPDATE_RELATION_FULL="UPDATE_RELATION_FULL",e.REMOVE_RELATION_FULL="REMOVE_RELATION_FULL",e.ROLLBACK_FULL="ROLLBACK_FULL",e.ROLLBACK_ALL_FULL="ROLLBACK_ALL_FULL",e.PROJECT="PROJECT",e.USER="USER",e.PERMISSION="PERMISSION",e.BRICK="BRICK",e.ROUTE="ROUTE",e.TEMPLATE="TEMPLATE",e.SNIPPET="SNIPPET",e.I18N="I18N",e.IMAGE="IMAGE",e.FUNCTION="FUNCTION",e.MENU="MENU",e.MENU_ITEM="MENU_ITEM",e.WORKFLOW="WORKFLOW",e}({});const aa="bricks/visual-builder/workbench-history-action";var ia=n(9740),oa=n(6330),ra=n(3465),sa=function(){var e=(0,oa.A)((function*(e,t,n){return(yield ra.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,ia.A)((0,ia.A)({},n),{},{params:t}))).data}));return function(t,n,a){return e.apply(this,arguments)}}(),la=n(8799);const ca={add:`${aa}:${na.ADD}`,edit:`${aa}:${na.EDIT}`,delete:`${aa}:${na.DELETE}`,batch_delete:`${aa}:${na.DELETE}`,import:`${aa}:${na.IMPORT}`,clone:`${aa}:${na.CLONE}`,append_relation:`${aa}:${na.APPEND_RELATION}`,update_relation:`${aa}:${na.UPDATE_RELATION}`,remove_relation:`${aa}:${na.REMOVE_RELATION}`,rollback:`${aa}:${na.ROLLBACK}`,rollback_all:`${aa}:${na.ROLLBACK_ALL}`},da={add:`${aa}:${na.ADD_FULL}`,edit:`${aa}:${na.EDIT_FULL}`,delete:`${aa}:${na.DELETE_FULL}`,batch_delete:`${aa}:${na.DELETE_FULL}`,import:`${aa}:${na.IMPORT_FULL}`,clone:`${aa}:${na.CLONE_FULL}`,append_relation:`${aa}:${na.APPEND_RELATION_FULL}`,update_relation:`${aa}:${na.UPDATE_RELATION_FULL}`,remove_relation:`${aa}:${na.REMOVE_RELATION_FULL}`,rollback:`${aa}:${na.ROLLBACK_FULL}`,rollback_all:`${aa}:${na.ROLLBACK_ALL_FULL}`},ha={project:`${aa}:${na.PROJECT}`,userGroup:`${aa}:${na.USER}`,permission:`${aa}:${na.PERMISSION}`,brick:`${aa}:${na.BRICK}`,route:`${aa}:${na.ROUTE}`,template:`${aa}:${na.TEMPLATE}`,snippet:`${aa}:${na.SNIPPET}`,i18n:`${aa}:${na.I18N}`,image:`${aa}:${na.IMAGE}`,function:`${aa}:${na.FUNCTION}`,menu:`${aa}:${na.MENU}`,menuItem:`${aa}:${na.MENU_ITEM}`,workflow:`${aa}:${na.WORKFLOW}`},ua={PROJECT_MICRO_APP:`${aa}:${na.PROJECT}`,"MICRO_APP_USER_GROUP@EASYOPS":`${aa}:${na.USER}`,MICRO_APP_RESOURCE_PERMISSION:`${aa}:${na.PERMISSION}`,STORYBOARD_BRICK:`${aa}:${na.BRICK}`,STORYBOARD_ROUTE:`${aa}:${na.ROUTE}`,STORYBOARD_TEMPLATE:`${aa}:${na.TEMPLATE}`,STORYBOARD_SNIPPET:`${aa}:${na.SNIPPET}`,STORYBOARD_I18N:`${aa}:${na.I18N}`,MICRO_APP_RESOURCE_IMAGE:`${aa}:${na.IMAGE}`,STORYBOARD_FUNCTION:`${aa}:${na.FUNCTION}`,MICRO_APP_RESOURCE_MENU:`${aa}:${na.MENU}`,MICRO_APP_RESOURCE_MENU_ITEM:`${aa}:${na.MENU_ITEM}`,"WORKFLOW_DEF@EASYOPS":`${aa}:${na.WORKFLOW}`};function pa(e){var t,n,a,i,o,r,s,l,c,d,h,u;const p="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",m=la.i18n.t(ha[e.category]??e.category),v=la.i18n.t(ca[p]??p),g=la.i18n.t(ua[null===(t=e.abstract)||void 0===t?void 0:t.leftObjectId]??(null===(n=e.abstract)||void 0===n?void 0:n.leftObjectId)),f=la.i18n.t(ua[null===(a=e.abstract)||void 0===a?void 0:a.rightObjectId]??(null===(i=e.abstract)||void 0===i?void 0:i.rightObjectId)),A=ma(null===(o=e.abstract)||void 0===o?void 0:o.nodes,null===(r=e.abstract)||void 0===r?void 0:r.nodesCount),b=ma(null===(s=e.abstract)||void 0===s?void 0:s.leftNodes,null===(l=e.abstract)||void 0===l?void 0:l.leftNodesCount),E=ma(null===(c=e.abstract)||void 0===c?void 0:c.rightNodes,null===(d=e.abstract)||void 0===d?void 0:d.rightNodesCount),k="rollback"===p?pa(e.rollBackIdInfo).abstract:null;return{category:m,action:v,leftObjectId:g,rightObjectId:f,nodes:A,leftNodes:b,rightNodes:E,abstract:la.i18n.t(da[p]??p,{category:m,nodes:A,leftNodes:b,rightNodes:E,nodeChanges:null===(h=e.abstract)||void 0===h||null===(h=h.nodeChanges)||void 0===h?void 0:h.join(", "),relationChanges:null===(u=e.abstract)||void 0===u||null===(u=u.relationChanges)||void 0===u?void 0:u.join(", "),leftObjectId:g,rightObjectId:f,rollbackAbstract:k}),rollbackAbstract:k}}function ma(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return la.i18n.t(`${aa}:${na.NODE}`,{nodes:e.join(n),context:t>e.length?"ellipsis":void 0,count:t})}var va;let ga,fa,Aa,ba,Ea,ka,ya,wa,xa,Na,La,Ca,Ma,Ta,Ra,Ia,Oa;(0,ta.initializeReactI18n)(aa,{en:{LOAD_MORE:"Load more",LOADING:"Loading",NO_DATA:"No data",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }} etc., a total of {{ count }} items",ADD:"Add node",EDIT:"Edit node",DELETE:"Delete node",IMPORT:"Batch import node",CLONE:"Clone node",APPEND_RELATION:"Append Relation",UPDATE_RELATION:"Update Relation",REMOVE_RELATION:"Remove Relation",ROLLBACK:"Rollback",ROLLBACK_ALL:"Rollback all operations",ADD_FULL:"Add {{ category }} ({{ nodes }})",EDIT_FULL:"Edit {{ nodeChanges }} of {{ category }} ({{ nodes }})",DELETE_FULL:"Delete {{ category }} ({{ nodes }})",IMPORT_FULL:"Batch Import {{ category }} ({{ nodes }})",CLONE_FULL:"Clone {{ category }} ({{ nodes }})",APPEND_RELATION_FULL:"Append the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",UPDATE_RELATION_FULL:"Update the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",REMOVE_RELATION_FULL:"Remove the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",ROLLBACK_FULL:"Rollback to [{{ rollbackAbstract }}]",ROLLBACK_ALL_FULL:"Rollback all operations",PROJECT:"Project",USER:"User Group",PERMISSION:"Permission",BRICK:"Brick",ROUTE:"Route",TEMPLATE:"Template",SNIPPET:"Snippet",I18N:"I18N",IMAGE:"Image",FUNCTION:"Function",MENU:"Menu",MENU_ITEM:"Menu item",WORKFLOW:"Workflow"},zh:{LOAD_MORE:"加载更多",LOADING:"加载中",NO_DATA:"没有数据",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }}等共{{ count }}项",ADD:"新增节点",EDIT:"编辑节点",DELETE:"删除节点",IMPORT:"批量导入节点",CLONE:"克隆节点",APPEND_RELATION:"添加关系",UPDATE_RELATION:"更新关系",REMOVE_RELATION:"移除关系",ROLLBACK:"回滚",ROLLBACK_ALL:"回滚全部操作",ADD_FULL:"新增{{ category }}({{ nodes }})",EDIT_FULL:"编辑{{ category }}({{ nodes }})的 {{ nodeChanges }}",DELETE_FULL:"删除{{ category }}({{ nodes }})",IMPORT_FULL:"批量导入{{ category }}({{ nodes }})",CLONE_FULL:"克隆{{ category }}({{ nodes }})",APPEND_RELATION_FULL:"添加{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",UPDATE_RELATION_FULL:"更新{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",REMOVE_RELATION_FULL:"移除{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",ROLLBACK_FULL:"回滚到【{{ rollbackAbstract }}】",ROLLBACK_ALL_FULL:"回滚全部操作",PROJECT:"项目",USER:"用户组",PERMISSION:"权限点",BRICK:"构件",ROUTE:"路由",TEMPLATE:"模版",SNIPPET:"片段",I18N:"国际化",IMAGE:"图片",FUNCTION:"函数",MENU:"菜单",MENU_ITEM:"菜单项",WORKFLOW:"工作流"}});const{defineElement:_a,property:Sa,event:Da}=(0,p.createDecorators)(),Pa=(0,m.wrapBrick)("eo-button"),Wa=(0,m.wrapBrick)("eo-link"),$a=(0,m.wrapBrick)("eo-icon"),Fa=(0,m.wrapBrick)("eo-easyops-avatar"),Ba=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});let Ua;var za=new WeakMap,Va=new WeakMap,ja=new WeakMap,Ka=new WeakSet,Ha=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,qa=new WeakMap;class Ja extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Ka),(0,o.A)(this,za,fa(this)),(0,o.A)(this,Va,(Aa(this),ba(this))),(0,o.A)(this,ja,(Ea(this),ka(this))),(0,o.A)(this,Ha,(xa(this),e=>{(0,s.A)(Ka,this,ya).emit(e)})),(0,o.A)(this,Ga,Na(this)),(0,o.A)(this,Ya,(Ma(this),e=>{(0,s.A)(Ka,this,La).emit(e)})),(0,o.A)(this,Xa,Ta(this)),(0,o.A)(this,qa,(Oa(this),()=>{(0,s.A)(Ka,this,Ra).emit()}))}get appId(){return(0,c.A)(za,this)}set appId(e){(0,l.A)(za,this,e)}get projectId(){return(0,c.A)(Va,this)}set projectId(e){(0,l.A)(Va,this,e)}render(){return u().createElement(Qa,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,c.A)(Ha,this),onRollback:(0,c.A)(Ya,this),onRollbackAll:(0,c.A)(qa,this)})}}function Qa(e){const{appId:t,onHistoryItemClick:n,onRollback:a,onRollbackAll:i}=e,{t:o}=(0,ta.useTranslation)(aa),[r,s]=(0,h.useState)(!1),[l,c]=(0,h.useState)(!0),[d,p]=(0,h.useState)(!1),[m,v]=(0,h.useState)([]),g=(0,h.useRef)(""),f=e=>{s(!0),sa(t,{ts:g.current,limit:20}).then((t=>{v((n=>{const a=t.list.map((e=>({...e,translation:pa(e)})));return e?a:n.concat(a)})),g.current=t.ts,p(t.list.length<20),c(t.list.length<20)})).catch((e=>{(0,De.handleHttpError)(e)})).finally((()=>{s(!1)}))};return u().createElement(Ba,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(c(!0),p(!1),v([]),g.current="",f(!0))}},u().createElement(Pa,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),u().createElement("div",null,u().createElement("div",{className:"history-title"},"History"),u().createElement("div",{className:"history-list"},m.length?u().createElement(u().Fragment,null,m.map(((e,t)=>u().createElement(Za,{key:`${e.uniqueKey}-${e.ts}`,data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:n,onRollback:a}))),!l&&u().createElement("span",{className:"load-more-container"},u().createElement(Wa,{className:"load-more",disabled:r,onClick:()=>f()},o(na.LOAD_MORE))),d&&u().createElement("span",{className:"end-container"},"The End",u().createElement($a,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):u().createElement("div",{className:"empty"},o(r?na.LOADING:na.NO_DATA))),u().createElement("slot",null)))}function Za(e){const{data:t,enableRollback:n,current:a,onHistoryItemClick:i,onRollback:o}=e,r=Zn()(Number(t.ts)/1e6),s=Zn().duration(r.diff(Zn()())),l=s.days()<=-1?r.format("YYYY-MM-DD HH:mm:ss"):s.humanize(!0,{ss:0,s:60,m:60,h:24});return u().createElement("div",{className:"item-container"},u().createElement("div",{className:"item-title"},u().createElement("div",{className:"title-left",onClick:()=>i({...t,enableRollback:n})},u().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),a&&u().createElement("div",{className:"branch"},"(current)")),u().createElement("div",{className:"title-right"},n&&u().createElement($a,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>o(t)}))),u().createElement("div",{className:"item-info"},u().createElement(Fa,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),u().createElement("div",{className:"time"},l),u().createElement("div",{className:"operator"},t.user)))}va=Ja,({e:[fa,Aa,ba,Ea,ka,ya,wa,xa,Na,La,Ca,Ma,Ta,Ra,Ia,Oa],c:[Ua,ga]}=(0,d.A)(va,[_a("visual-builder.workbench-history-action",{styleTexts:[ea.A]})],[[Sa(),1,"appId"],[Sa(),1,"projectId"],[Da({type:"history.item.click"}),1,"historyItemClickEvent",e=>(0,c.A)(ja,e),(e,t)=>(0,l.A)(ja,e,t)],[Da({type:"rollback"}),1,"rollbackEvent",e=>(0,c.A)(Ga,e),(e,t)=>(0,l.A)(Ga,e,t)],[Da({type:"rollback.all"}),1,"rollbackAllEvent",e=>(0,c.A)(Xa,e),(e,t)=>(0,l.A)(Xa,e,t)]],0,(e=>qa.has((0,r.A)(e))),m.ReactNextElement)),ga();var ei,ti=n(2381);let ni,ai,ii,oi,ri,si,li,ci,di,hi,ui,pi,mi,vi,gi,fi,Ai,bi,Ei,ki,yi,wi,xi,Ni,Li,Ci,Mi,Ti,Ri,Ii,Oi,_i,Si,Di,Pi,Wi,$i,Fi,Bi,Ui,zi,Vi,ji,Ki,Hi,Gi,Yi,Xi,qi,Ji,Qi,Zi,eo;const{defineElement:to,property:no,event:ao}=(0,p.createDecorators)(),io=(0,m.wrapBrick)("eo-icon"),oo=(0,m.wrapBrick)("eo-tooltip"),ro=new Set;let so;var lo=new WeakMap,co=new WeakMap,ho=new WeakMap,uo=new WeakMap,po=new WeakMap,mo=new WeakMap,vo=new WeakMap,go=new WeakMap,fo=new WeakMap,Ao=new WeakSet,bo=new WeakMap,Eo=new WeakMap,ko=new WeakMap,yo=new WeakMap,wo=new WeakMap,xo=new WeakMap,No=new WeakMap,Lo=new WeakMap,Co=new WeakMap,Mo=new WeakMap,To=new WeakMap,Ro=new WeakMap,Io=new WeakMap,Oo=new WeakMap,_o=new WeakMap,So=new WeakMap,Do=new WeakMap;class Po extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Ao),(0,o.A)(this,lo,ai(this)),(0,o.A)(this,co,(ii(this),oi(this))),(0,o.A)(this,ho,(ri(this),si(this))),(0,o.A)(this,uo,(li(this),ci(this))),(0,o.A)(this,po,(di(this),hi(this))),(0,o.A)(this,mo,(ui(this),pi(this))),(0,o.A)(this,vo,(mi(this),vi(this))),(0,o.A)(this,go,(gi(this),fi(this))),(0,o.A)(this,fo,(Ai(this),bi(this))),(0,o.A)(this,bo,(yi(this),e=>{(0,s.A)(Ao,this,Ei).emit(e)})),(0,o.A)(this,Eo,wi(this)),(0,o.A)(this,ko,(Li(this),e=>{(0,s.A)(Ao,this,xi).emit(e)})),(0,o.A)(this,yo,Ci(this)),(0,o.A)(this,wo,(Ri(this),()=>{(0,s.A)(Ao,this,Mi).emit()})),(0,o.A)(this,xo,Ii(this)),(0,o.A)(this,No,(Si(this),()=>{(0,s.A)(Ao,this,Oi).emit()})),(0,o.A)(this,Lo,Di(this)),(0,o.A)(this,Co,($i(this),e=>{(0,s.A)(Ao,this,Pi).emit(e)})),(0,o.A)(this,Mo,Fi(this)),(0,o.A)(this,To,(zi(this),()=>{(0,s.A)(Ao,this,Bi).emit()})),(0,o.A)(this,Ro,Vi(this)),(0,o.A)(this,Io,(Hi(this),e=>{(0,s.A)(Ao,this,ji).emit(e)})),(0,o.A)(this,Oo,Gi(this)),(0,o.A)(this,_o,(qi(this),e=>{(0,s.A)(Ao,this,Yi).emit(e)})),(0,o.A)(this,So,Ji(this)),(0,o.A)(this,Do,(eo(this),e=>{(0,s.A)(Ao,this,Qi).emit(e)}))}get label(){return(0,c.A)(lo,this)}set label(e){(0,l.A)(lo,this,e)}get type(){return(0,c.A)(co,this)}set type(e){(0,l.A)(co,this,e)}get external(){return(0,c.A)(ho,this)}set external(e){(0,l.A)(ho,this,e)}get subNodes(){return(0,c.A)(uo,this)}set subNodes(e){(0,l.A)(uo,this,e)}get active(){return(0,c.A)(po,this)}set active(e){(0,l.A)(po,this,e)}get notSynced(){return(0,c.A)(mo,this)}set notSynced(e){(0,l.A)(mo,this,e)}get disableChildAppend(){return(0,c.A)(vo,this)}set disableChildAppend(e){(0,l.A)(vo,this,e)}get autoFocusOnce(){return(0,c.A)(go,this)}set autoFocusOnce(e){(0,l.A)(go,this,e)}render(){return u().createElement(Wo,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,c.A)(bo,this),onLabelChange:(0,c.A)(ko,this),onNodeClick:(0,c.A)(wo,this),onNodeDoubleClick:(0,c.A)(No,this),onNodeContextMenu:(0,c.A)(Co,this),onChildAppend:(0,c.A)(To,this),onExternalClick:(0,c.A)(Io,this),onSubNodeDoubleClick:(0,c.A)(_o,this),onSubNodeContextMenu:(0,c.A)(Do,this)})}}function Wo(e){let{label:t,type:n,external:a,subNodes:i,autoFocusOnce:o,onLabelEditingChange:r,onLabelChange:s,onNodeClick:l,onNodeDoubleClick:c,onNodeContextMenu:d,onChildAppend:p,onExternalClick:m,onSubNodeDoubleClick:v,onSubNodeContextMenu:g}=e;const f="board"===n?"board":"page",[b,E]=(0,h.useState)(t),[k,y]=(0,h.useState)(!1),w=(0,h.useRef)(!1),[x,N]=(0,h.useState)(!1),L=(0,h.useRef)(null);(0,h.useEffect)((()=>{E(t)}),[t]);const C=(0,h.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),y(!0)}),[]);(0,h.useEffect)((()=>{o&&!ro.has(o)&&(ro.add(o),setTimeout((()=>{y(!0)}),1))}),[o]),(0,h.useEffect)((()=>{var e,t;k&&(null===(e=L.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=L.current)||void 0===t||t.select())}),[k]),(0,h.useEffect)((()=>{w.current?null==r||r(k):w.current=!0}),[k,r]);const M=(0,h.useCallback)((e=>{E(e.target.value)}),[]),T=(0,h.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=L.current)||void 0===n||n.blur()}),[]),R=(0,h.useCallback)((()=>{y(!1),N(!0)}),[]);(0,h.useEffect)((()=>{x&&(null==s||s(b),N(!1))}),[b,s,x]);const I=(0,h.useCallback)((e=>{e.stopPropagation(),null==p||p()}),[p]),O=(0,h.useCallback)((e=>{e.stopPropagation(),null==m||m(a)}),[a,m]),_=(0,h.useCallback)((e=>{e.stopPropagation()}),[]),S=38*Math.max(0,Math.floor(((null==i?void 0:i.length)??0)-3));return u().createElement(u().Fragment,null,u().createElement("div",{className:A()("node",f,{"editing-label":k}),style:{height:"board"===f?70:130+S},onClick:l,onDoubleClick:c,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},u().createElement("input",{className:"label-input",value:b,ref:L,onChange:M,onKeyDown:T,onBlur:R,onDoubleClick:_,onContextMenu:_,onMouseDown:_}),u().createElement("div",{className:"label",onDoubleClick:C,onMouseDown:_},b),"board"===f?u().createElement("div",{className:"icon-container"},u().createElement(io,{lib:"antd",icon:"unordered-list"})):u().createElement("div",{className:"thumbnail-container",style:{height:98+S}},u().createElement("div",{className:"thumbnail-placeholder"},u().createElement(io,{lib:"antd",icon:"ellipsis"})),a&&u().createElement("div",{className:"external",onClick:O,onDoubleClick:_,onMouseDown:_},u().createElement(io,{lib:"antd",icon:"desktop"}),u().createElement("span",{className:"external-label"},a.label)),null!=i&&i.length?u().createElement("div",{className:"sub-nodes"},i.map((e=>u().createElement($o,{key:e.id,subNode:e,onSubNodeDoubleClick:v,onSubNodeContextMenu:g})))):null)),u().createElement("div",{className:"add-button",role:"button",onClick:I,onMouseDown:_},u().createElement(io,{lib:"fa",icon:"plus"})))}function $o(e){let{subNode:t,onSubNodeDoubleClick:n,onSubNodeContextMenu:a}=e;return u().createElement(oo,{key:t.id,content:t.label},u().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==n||n(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==a||a({node:t,clientX:e.clientX,clientY:e.clientY})}},u().createElement("div",{className:"sub-node-skeleton-title"}),u().createElement("div",{className:"sub-node-skeleton-content"}),u().createElement("div",{className:"sub-node-skeleton-button"})))}ei=Po,({e:[ai,ii,oi,ri,si,li,ci,di,hi,ui,pi,mi,vi,gi,fi,Ai,bi,Ei,ki,yi,wi,xi,Ni,Li,Ci,Mi,Ti,Ri,Ii,Oi,_i,Si,Di,Pi,Wi,$i,Fi,Bi,Ui,zi,Vi,ji,Ki,Hi,Gi,Yi,Xi,qi,Ji,Qi,Zi,eo],c:[so,ni]}=(0,d.A)(ei,[to("visual-builder.page-arch-node",{styleTexts:[ti.A]})],[[no(),1,"label"],[no(),1,"type"],[no({attribute:!1}),1,"external"],[no({attribute:!1}),1,"subNodes"],[no({type:Boolean,render:!1}),1,"active"],[no({type:Boolean,render:!1}),1,"notSynced"],[no({type:Boolean,render:!1}),1,"disableChildAppend"],[no(),1,"autoFocusOnce"],[ao({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,c.A)(fo,e),(e,t)=>(0,l.A)(fo,e,t)],[ao({type:"label.change"}),1,"labelChange",e=>(0,c.A)(Eo,e),(e,t)=>(0,l.A)(Eo,e,t)],[ao({type:"node.click"}),1,"nodeClick",e=>(0,c.A)(yo,e),(e,t)=>(0,l.A)(yo,e,t)],[ao({type:"node.dblclick"}),1,"nodeDoubleClick",e=>(0,c.A)(xo,e),(e,t)=>(0,l.A)(xo,e,t)],[ao({type:"node.contextmenu"}),1,"nodeContextMenu",e=>(0,c.A)(Lo,e),(e,t)=>(0,l.A)(Lo,e,t)],[ao({type:"child.append"}),1,"childAppend",e=>(0,c.A)(Mo,e),(e,t)=>(0,l.A)(Mo,e,t)],[ao({type:"external.click"}),1,"externalClick",e=>(0,c.A)(Ro,e),(e,t)=>(0,l.A)(Ro,e,t)],[ao({type:"subNode.dblclick"}),1,"subNodeDoubleClick",e=>(0,c.A)(Oo,e),(e,t)=>(0,l.A)(Oo,e,t)],[ao({type:"subNode.contextmenu"}),1,"subNodeContextMenu",e=>(0,c.A)(So,e),(e,t)=>(0,l.A)(So,e,t)]],0,(e=>Do.has((0,r.A)(e))),m.ReactNextElement)),ni();var Fo,Bo=n(6484),Uo=n(6213),zo=n(2559);function Vo(e,t,n,a){return t((0,zo.A)(e,n),a),a}let jo,Ko,Ho,Go,Yo,Xo,qo,Jo,Qo;const{method:Zo,property:er}=(0,p.createDecorators)();var tr=new WeakMap,nr=new WeakSet,ar=new WeakMap,ir=new WeakMap,or=new WeakMap,rr=new WeakMap,sr=new WeakMap,lr=new WeakMap;class cr extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,nr),(0,o.A)(this,tr,(jo(this),!1)),(0,o.A)(this,ar,"normal"),(0,o.A)(this,ir,!1),(0,o.A)(this,or,Ko(this)),(0,o.A)(this,rr,(Ho(this),Go(this))),(0,o.A)(this,sr,(Yo(this),Xo(this))),(0,o.A)(this,lr,(qo(this),Jo(this))),Qo(this)}get isFormItemElement(){return!0}set validateState(e){Vo(nr,pr,this,e),this._render()}get validateState(){return(0,s.A)(nr,this,ur)}set notRender(e){this.hidden=e,Vo(nr,hr,this,e),this._render()}get notRender(){return(0,s.A)(nr,this,dr)}get $bindFormItem(){return(0,s.A)(nr,this,mr)}set $bindFormItem(e){Vo(nr,vr,this,e),this._render()}get helpBrick(){return(0,c.A)(or,this)}set helpBrick(e){(0,l.A)(or,this,e)}get labelBrick(){return(0,c.A)(rr,this)}set labelBrick(e){(0,l.A)(rr,this,e)}get labelCol(){return(0,c.A)(sr,this)}set labelCol(e){(0,l.A)(sr,this,e)}get wrapperCol(){return(0,c.A)(lr,this)}set wrapperCol(e){(0,l.A)(lr,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function dr(e){return(0,c.A)(tr,e)}function hr(e,t){(0,l.A)(tr,e,t)}function ur(e){return(0,c.A)(ar,e)}function pr(e,t){(0,l.A)(ar,e,t)}function mr(e){return(0,c.A)(ir,e)}function vr(e,t){(0,l.A)(ir,e,t)}Fo=cr,[Ko,Ho,Go,Yo,Xo,qo,Jo,Qo,jo]=(0,d.A)(Fo,[],[[er({attribute:!1}),1,"helpBrick"],[er({attribute:!1}),1,"labelBrick"],[er({attribute:!1}),1,"labelCol"],[er({attribute:!1}),1,"wrapperCol"],[Zo(),2,"setNotRender"],[Zo(),2,"getFormElement"]],0,void 0,m.ReactNextElement).e;var gr=function(){var e=(0,oa.A)((function*(e,t){return(yield ra.http.post("api/gateway/next_builder.contract_center.SearchContract/api/v1/contract/search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();let fr=function(e){return e.CONTRACT_OPTIONS_TIPS_PREFIX="CONTRACT_OPTIONS_TIPS_PREFIX",e.CONTRACT_OPTIONS_TIPS_SUFFIX="CONTRACT_OPTIONS_TIPS_SUFFIX",e.CONTRACT_VALIDATE_MESSAGE="CONTRACT_VALIDATE_MESSAGE",e}({});const Ar="bricks/visual-builder/contract-select",br={en:{CONTRACT_OPTIONS_TIPS_PREFIX:"Only the first",CONTRACT_OPTIONS_TIPS_SUFFIX:"items are displayed, please search for more results",CONTRACT_VALIDATE_MESSAGE:"Please fill in the correct contract name "},zh:{CONTRACT_OPTIONS_TIPS_PREFIX:"仅展示前",CONTRACT_OPTIONS_TIPS_SUFFIX:"项,更多结果请搜索",CONTRACT_VALIDATE_MESSAGE:"请填写正确的契约名称"}};(0,ta.initializeReactI18n)(Ar,br);const Er=(0,m.wrapBrick)("eo-icon"),kr=(0,m.wrapBrick)("eo-input",{onChange:"change"});function yr(e){const{itemsCount:t=20,onBlur:n}=e,[a,i]=(0,h.useState)(t),{t:o}=(0,ta.useTranslation)(Ar),[r,s]=(0,h.useState)(!1);return u().createElement("div",{className:"options-tips",slot:e.slot},o(fr.CONTRACT_OPTIONS_TIPS_PREFIX)," ",r?u().createElement(kr,{autoFocus:!0,inputStyle:{width:65},value:String(a),onBlur:()=>{s(!1),null==n||n(a)},onChange:e=>{i(Number(e.detail))}}):u().createElement("span",null,a," ",u().createElement(Er,{icon:"edit",lib:"antd",onClick:()=>{s(!0)}}))," ",o(fr.CONTRACT_OPTIONS_TIPS_SUFFIX))}var wr;let xr,Nr,Lr,Cr,Mr,Tr,Rr,Ir,Or,_r,Sr,Dr,Pr,Wr,$r;(0,ta.initializeReactI18n)(Ar,br);const{defineElement:Fr,property:Br,event:Ur}=(0,p.createDecorators)(),zr=(0,m.wrapBrick)("eo-form-item"),Vr=(0,m.wrapBrick)("eo-auto-complete",{onChange:"change"});let jr;var Kr=new WeakMap,Hr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,qr=new WeakMap,Jr=new WeakSet;function Qr(e){if("string"!=typeof e)return{name:"",version:""};const[t,n]=e.split(":");return{name:t,version:n}}function Zr(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function es(e){return(0,at.isNil)(e)||Zr(e)?"":la.i18n.t(`${Ar}:${fr.CONTRACT_VALIDATE_MESSAGE}`)}function ts(e){let{value:t,inputStyle:n,validateState:a,suffix:i,onChange:o}=e;const[r,s]=(0,h.useState)(),[l,c]=(0,h.useState)(20),d=function(e){let{pageSize:t=20,q:n=""}=e;const[a,i]=(0,h.useState)([]),[o,r]=(0,h.useState)(n),[s,l]=(0,h.useState)(t);return(0,h.useEffect)((()=>{r(n)}),[n]),(0,h.useEffect)((()=>{l(t)}),[t]),(0,h.useEffect)((()=>{(async()=>{try{const{list:e}=await gr({page:1,pageSize:s,fullContractName:o},{interceptorParams:{ignoreLoadingBar:!0}});i(e)}catch(e){console.error(e),i([])}})()}),[o,s]),a}({q:r,pageSize:l}),[p,m]=(0,h.useState)(Qr(t)),[v,g]=(0,h.useState)([]);(0,h.useEffect)((()=>{m(Qr(t))}),[t]);const f=(0,h.useMemo)((()=>(0,at.debounce)((e=>{s(e)}),200)),[]);return u().createElement("div",{className:"contract-wrapper"},u().createElement(Vr,{className:"contract-selector",options:null==d?void 0:d.map((e=>({value:e.fullContractName,label:e.fullContractName}))),value:p.name,inputStyle:n,validateState:a,onChange:e=>{const t=e.detail;if(Zr(t))m(Qr(t)),null==o||o(t);else{var n;const e=null===(n=d.find((e=>e.fullContractName===t)))||void 0===n?void 0:n.version,a=(null==e?void 0:e[0])??"";g(e),m({name:t,version:a}),null==o||o(`${t}:${a}`)}f(t)}},u().createElement(yr,{onBlur:e=>c(e),slot:"options-toolbar"})),u().createElement(Vr,{className:"version-selector",value:p.version,validateState:a,options:null==v?void 0:v.map((e=>({value:e,label:e}))),onChange:e=>{const t=e.detail;m({name:p.name,version:t}),null==o||o(`${p.name}:${t}`)}}),null!=i&&i.useBrick?u().createElement(Bo.ReactUseMultipleBricks,i):null)}wr=class extends cr{constructor(){super(...arguments),(0,i.A)(this,Jr),(0,o.A)(this,Kr,Nr(this)),(0,o.A)(this,Hr,(Lr(this),Cr(this))),(0,o.A)(this,Gr,(Mr(this),Tr(this))),(0,o.A)(this,Yr,(Rr(this),Ir(this))),(0,o.A)(this,Xr,(Or(this),_r(this))),(0,o.A)(this,qr,(Sr(this),Dr(this))),(0,q.A)(this,"handleChange",($r(this),e=>{(0,s.A)(Jr,this,Pr).emit(e)}))}get name(){return(0,c.A)(Kr,this)}set name(e){(0,l.A)(Kr,this,e)}get required(){return(0,c.A)(Hr,this)}set required(e){(0,l.A)(Hr,this,e)}get label(){return(0,c.A)(Gr,this)}set label(e){(0,l.A)(Gr,this,e)}get value(){return(0,c.A)(Yr,this)}set value(e){(0,l.A)(Yr,this,e)}get suffix(){return(0,c.A)(Xr,this)}set suffix(e){(0,l.A)(Xr,this,e)}render(){return u().createElement(zr,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,labelBrick:this.labelBrick,helpBrick:this.helpBrick,notRender:this.notRender,trigger:"handleChange",validator:es},u().createElement(ts,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[Nr,Lr,Cr,Mr,Tr,Rr,Ir,Or,_r,Sr,Dr,Pr,Wr,$r],c:[jr,xr]}=(0,d.A)(wr,[Fr("visual-builder.contract-select",{styleTexts:[Uo.A]})],[[Br(),1,"name"],[Br({type:Boolean}),1,"required"],[Br(),1,"label"],[Br({attribute:!1}),1,"value"],[Br({attribute:!1}),1,"suffix"],[Ur({type:"change"}),1,"changeEvent",e=>(0,c.A)(qr,e),(e,t)=>(0,l.A)(qr,e,t)]],0,(e=>Jr.has((0,r.A)(e))),cr)),xr();var ns,as=n(7540);let is,os,rs,ss,ls,cs,ds,hs,us,ps,ms,vs,gs,fs,As,bs;const Es=(0,m.wrapBrick)("eo-menu"),ks=(0,m.wrapBrick)("eo-menu-item"),ys=(0,m.wrapBrick)("eo-tooltip"),ws=(0,qn.unwrapProvider)("basic.lock-body-scroll");(0,ta.initializeReactI18n)("bricks/visual-builder/generate-snippets-context-menu",{en:{},zh:{}});const{defineElement:xs,property:Ns,event:Ls,method:Cs}=(0,p.createDecorators)();let Ms;var Ts=new WeakMap,Rs=new WeakMap,Is=new WeakMap,Os=new WeakMap,_s=new WeakSet,Ss=new WeakMap,Ds=new WeakMap,Ps=new WeakMap;class Ws extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,_s),(0,o.A)(this,Ts,(is(this),rs(this))),(0,o.A)(this,Rs,(ss(this),ls(this))),(0,o.A)(this,Is,(cs(this),ds(this))),(0,o.A)(this,Os,(hs(this),us(this))),(0,o.A)(this,Ss,(vs(this),gs(this))),(0,o.A)(this,Ds,(bs(this),e=>{(0,s.A)(_s,this,ps).emit(e)})),(0,o.A)(this,Ps,(e=>{(0,s.A)(_s,this,fs).emit(e)}))}get options(){return(0,c.A)(Ts,this)}set options(e){(0,l.A)(Ts,this,e)}get active(){return(0,c.A)(Rs,this)}set active(e){(0,l.A)(Rs,this,e)}get position(){return(0,c.A)(Is,this)}set position(e){(0,l.A)(Is,this,e)}open(e){let{position:t}=e;this.active=!0,this.position=t}close(){this.active=!1,this.position=void 0}disconnectedCallback(){super.disconnectedCallback(),ws(this,!1)}render(){return u().createElement($s,{active:this.active,element:this,position:this.position,onItemDragStart:(0,c.A)(Ds,this),onItemDragEnd:(0,c.A)(Ps,this),options:this.options})}}function $s(e){var t,n;let{element:a,active:i,onItemDragEnd:o,onItemDragStart:r,options:s,position:l}=e;const[c,d]=(0,h.useState)(!1),p=(0,h.useRef)(null),[m,v]=(0,h.useState)(null),g=(0,h.useCallback)((e=>{e.preventDefault(),null==a||a.close()}),[a]),f=(0,h.useCallback)(((e,t)=>{var n;d(!0),t.dragConf&&(null===(n=e.dataTransfer)||void 0===n||n.setData(t.dragConf.format,JSON.stringify(t.dragConf.data))),e.target.classList.add("dragging"),null==r||r(t)}),[r]),A=(0,h.useCallback)(((e,t)=>{d(!1),e.target.classList.remove("dragging"),null==a||a.close(),null==o||o(t)}),[a,o]);return(0,h.useEffect)((()=>{ws(a,i)}),[i,a]),(0,h.useEffect)((()=>{if(i&&p.current&&l){const e=p.current.getBoundingClientRect(),t=e.width+8,n=e.height+8,{clientWidth:a,clientHeight:i}=document.documentElement,o=[...l];a>t&&l[0]+t>a&&(o[0]=l[0]-t),i>n&&l[1]+n>i&&(o[1]=i-n),v(o)}else v(null)}),[i,l]),u().createElement(u().Fragment,null,!c&&u().createElement("div",{className:"mask",onClick:g,onContextMenu:g}),u().createElement("div",{className:"container",ref:p,style:{left:null===(t=m??l)||void 0===t?void 0:t[0],top:null===(n=m??l)||void 0===n?void 0:n[1],visibility:m?"visible":"hidden"}},null==s?void 0:s.map(((e,t)=>{var n,a;return u().createElement("div",{key:t},u().createElement("div",{className:"title"},e.title),(null===(n=e.children)||void 0===n?void 0:n.length)&&u().createElement(Es,null,null===(a=e.children)||void 0===a?void 0:a.map(((e,t)=>u().createElement(ys,{content:e.tooltip,hoist:!0,placement:"left",key:t},u().createElement(ks,{disabled:e.disabled,icon:e.icon,draggable:!e.disabled,onDragStart:t=>f(t,e),onDragEnd:t=>A(t,e)},e.text))))))}))))}ns=Ws,({e:[rs,ss,ls,cs,ds,hs,us,ps,ms,vs,gs,fs,As,bs,is],c:[Ms,os]}=(0,d.A)(ns,[xs("visual-builder.generate-snippets-context-menu",{styleTexts:[as.A]})],[[Ns({attribute:!1}),1,"options"],[Ns({type:Boolean}),1,"active"],[Ns({attribute:!1}),1,"position"],[Ls({type:"item.drag.start"}),1,"itemDragStartEvent",e=>(0,c.A)(Os,e),(e,t)=>(0,l.A)(Os,e,t)],[Ls({type:"item.drag.end"}),1,"itemDragEndEvent",e=>(0,c.A)(Ss,e),(e,t)=>(0,l.A)(Ss,e,t)],[Cs(),2,"open"],[Cs(),2,"close"]],0,(e=>Ps.has((0,r.A)(e))),m.ReactNextElement)),os();var Fs=n(1085),Bs=n(3091),Us=n(7447),zs=n(3640),Vs=n(4360),js=n(3544),Ks=n(4650),Hs=n(9830);function Gs(){function e(e,t,n){if(!n||"pre"!==n.tagName||"code"!==e.tagName)return;const a=function(e){const t=e.properties.className||[];for(const e of t)if("language-"===e.slice(0,9))return e.slice(9).toLowerCase();return null}(e);if(null===a)return;let i;try{n.properties.className=(n.properties.className||[]).concat("language-"+a),i=Hs.L.highlight((0,Ks.d)(e),a)}catch{return}e.children=i.children}return t=>{(0,js.YR)(t,"element",e)}}const Ys={Fragment:Fs.Fragment,jsx:Fs.jsx,jsxs:Fs.jsxs};function Xs(e){let{content:t}=e;const[n,a]=(0,h.useState)(null);return(0,h.useEffect)((()=>{let e=!1;return(0,Bs.l)().use(Us.A).use(zs.A).use([Gs]).use(Vs.A,Ys).process(t).then((t=>{e||a(t.result)})).catch((t=>{e||(console.error("Convert markdown failed:",t),a(null))})),()=>{e=!0}}),[t]),n}const qs=(0,m.wrapBrick)("eo-avatar");function Js(e){let{message:t}=e;const n=(0,h.useMemo)((()=>{const e=[];if("assistant"===t.role){const n=/(?:^|\n)```(easy_cmd_\S+)\n([\s\S]*?)\n```(?:$|\n)/gm;let a,i=0;for(;a=n.exec(t.content);){const[o,r,s]=a,l=a.index,c=t.content.slice(i,l).trim();c.length>0&&e.push({type:"markdown",content:c}),e.push({type:"command",command:r,content:s.trim(),raw:o}),i=n.lastIndex}const o=t.content.slice(i).trim();o.length>0&&e.push({type:"markdown",content:o})}else e.push({type:"plain",content:t.content});return e}),[t.content,t.role]),a=(0,h.useRef)(null);return(0,h.useEffect)((()=>{const e=a.current;e&&setTimeout((()=>{const n=e.parentElement.querySelectorAll(".texting");for(const e of n)e.classList.remove("texting");if(!t.partial)return;let a=e;for(;a;){const e=a.lastChild;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE||"DETAILS"===(null==e?void 0:e.tagName)&&!e.open){var i;if((null==e?void 0:e.nodeType)!==Node.TEXT_NODE||0!==e.textContent.trim().length||(null===(i=e.previousSibling)||void 0===i?void 0:i.nodeType)!==Node.ELEMENT_NODE)break;a=e.previousSibling}else a=e}a.classList.add("texting")}),1)}),[t.partial,t.content]),u().createElement("div",{className:A()("message",{failed:t.failed})},u().createElement("div",{className:"avatar"},u().createElement(qs,{icon:{lib:"easyops",icon:"assistant"===t.role?"robot":"account"},size:"small",className:`role-${t.role}`})),u().createElement("div",{className:"main"},u().createElement("div",{className:"label"},"assistant"===t.role?"Assistant":"You"),u().createElement("div",{className:"content",ref:a},n.map(((e,t)=>u().createElement(Qs,{key:t,chunk:e}))))))}function Qs(e){let{chunk:t}=e;return u().createElement(u().Fragment,null,"markdown"===t.type?u().createElement("div",{className:"markdown"},u().createElement(Xs,{content:t.content})):"command"===t.type?u().createElement(u().Fragment,null,u().createElement("details",{className:"command"},u().createElement("summary",null,"```",t.command),u().createElement("pre",null,u().createElement("code",null,t.content)))):u().createElement("div",{className:"plain"},t.content))}var Zs,el=n(7236);let tl,nl,al,il,ol,rl,sl,ll,cl;const{defineElement:dl,property:hl,event:ul}=(0,p.createDecorators)();let pl;var ml=new WeakMap,vl=new WeakMap,gl=new WeakMap,fl=new WeakSet,Al=new WeakMap;class bl extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,fl),(0,o.A)(this,ml,nl(this)),(0,o.A)(this,vl,(al(this),il(this))),(0,o.A)(this,gl,(ol(this),rl(this))),(0,o.A)(this,Al,(cl(this),e=>{(0,s.A)(fl,this,sl).emit(e)}))}get messages(){return(0,c.A)(ml,this)}set messages(e){(0,l.A)(ml,this,e)}get errorBoundary(){return(0,c.A)(vl,this)}set errorBoundary(e){(0,l.A)(vl,this,e)}render(){return u().createElement(El,{host:this,messages:this.messages,errorBoundary:this.errorBoundary,onStoryboardUpdate:(0,c.A)(Al,this)})}}function El(e){let{messages:t,host:n,errorBoundary:a,onStoryboardUpdate:i}=e;const o=(0,h.useMemo)((()=>/(?:^|\n)```easy_cmd_vb_block_(page|storyboard)\n([\s\S]*?)\n```(?:$|\n)/gm),[]),r=(0,h.useRef)(new Map),[s,l]=(0,h.useState)([]),c=(0,h.useRef)(!1);(0,h.useEffect)((()=>{for(const e of t??[]){if("assistant"!==e.role)continue;let t;o.lastIndex=r.current.get(e.key)??0;const n=[];let a=!1;for(;t=o.exec(e.content);){r.current.set(e.key,o.lastIndex);const[,i,s]=t;try{const e=JSON.parse(s);"page"===i?(a=!0,n.push(...e)):n.push({...e,type:"item"})}catch(e){console.error("parse storyboard failed:",e)}}a?l(n):n.length>0&&l((e=>[...e,...n]))}}),[o,t]);const[d,p]=(0,h.useState)([]);(0,h.useEffect)((()=>{const e=[],t=new Map;for(const n of s)"block"===n.type?e.push(n):n.storyboard&&t.set(n.uuid,n.storyboard);e.sort(((e,t)=>e.seq-t.seq));const n={brick:"eo-content-layout",children:[]},i={brick:"eo-main-view",children:[{brick:"eo-page-title",slot:"pageTitle",properties:{pageTitle:"测试页面"}}]};let o=!1;for(const r of e)if("全局操作区"===r.name)for(const e of r.children){const n=t.get(e);n&&(i.children.push({...n,properties:{...n.properties,slot:void 0},errorBoundary:a,slot:"toolbar",iid:`item:${e}`,meta:{type:"item",uuid:e,block:{uuid:r.uuid,name:r.name}}}),o=!0)}else{const e=t.get(r.uuid);if(e){const i={...e,children:[],errorBoundary:a,iid:`block:${r.uuid}`,meta:{type:"block",uuid:r.uuid,name:r.name}};o=!0,n.children.push(i);for(const e of r.children){const n=t.get(e);n&&i.children.push({...n,errorBoundary:a,iid:`item:${e}`,meta:{type:"item",uuid:e}})}}else if(!r.hasContainer)for(const e of r.children){const i=t.get(e);i&&(n.children.push({...i,errorBoundary:a,iid:`item:${e}`,meta:{type:"item",uuid:e}}),o=!0)}}i.children.push(n),p((e=>o?[i]:0===e.length?e:[]))}),[s,a]),(0,h.useEffect)((()=>{null==i||i(d)}),[i,d]);const m=(0,h.useMemo)((()=>{let e=n;for(;e;){const t=getComputedStyle(e,null).getPropertyValue("overflow-y");if("auto"===t||"scroll"===t)return e;if(e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else{if(!(e.parentNode instanceof Element))break;e=e.parentNode}}return document.scrollingElement||document.documentElement}),[n]);return(0,h.useEffect)((()=>{c.current||setTimeout((()=>{m.scrollTo(0,m.scrollHeight)}),1)}),[t,m]),(0,h.useEffect)((()=>{const e=()=>{c.current=m.scrollTop+m.clientHeight+6<m.scrollHeight};return m.addEventListener("scroll",e),()=>{m.removeEventListener("scroll",e)}}),[m]),u().createElement(u().Fragment,null,null==t?void 0:t.map(((e,t)=>u().createElement(Js,{key:e.key??`index-${t}`,message:e}))))}Zs=bl,({e:[nl,al,il,ol,rl,sl,ll,cl],c:[pl,tl]}=(0,d.A)(Zs,[dl("visual-builder.chat-conversation",{styleTexts:[el.A]})],[[hl({attribute:!1}),1,"messages"],[hl({type:Boolean}),1,"errorBoundary"],[ul({type:"storyboard.update"}),1,"storyboardUpdate",e=>(0,c.A)(gl,e),(e,t)=>(0,l.A)(gl,e,t)]],0,(e=>Al.has((0,r.A)(e))),m.ReactNextElement)),tl();var kl=n(9575),yl=n(1732),wl=n.n(yl);function xl(e){let{variant:t,width:n,height:a,left:i,top:o,label:r}=e;return u().createElement("div",{className:"outline "+t,style:{width:n+8,height:a+8,left:i-4,top:o-4}},u().createElement("div",{className:"label"},r))}var Nl,Ll=n(1563);let Cl,Ml,Tl,Rl,Il,Ol,_l,Sl,Dl,Pl,Wl,$l,Fl,Bl,Ul,zl;const{defineElement:Vl,property:jl,event:Kl,method:Hl}=(0,p.createDecorators)();let Gl;var Yl=new WeakMap,Xl=new WeakMap,ql=new WeakMap,Jl=new WeakMap,Ql=new WeakMap,Zl=new WeakMap,ec=new WeakSet,tc=new WeakMap;class nc extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ec),(0,o.A)(this,Yl,(Cl(this),Tl(this))),(0,o.A)(this,Xl,(Rl(this),Il(this))),(0,o.A)(this,ql,(Ol(this),_l(this))),(0,o.A)(this,Jl,(Sl(this),Dl(this))),(0,o.A)(this,Ql,(Pl(this),Wl(this))),(0,o.A)(this,Zl,($l(this),Fl(this))),(0,o.A)(this,tc,(zl(this),e=>{(0,s.A)(ec,this,Bl).emit(e)}))}get storyboard(){return(0,c.A)(Yl,this)}set storyboard(e){(0,l.A)(Yl,this,e)}get theme(){return(0,c.A)(Xl,this)}set theme(e){(0,l.A)(Xl,this,e)}get uiVersion(){return(0,c.A)(ql,this)}set uiVersion(e){(0,l.A)(ql,this,e)}get app(){return(0,c.A)(Jl,this)}set app(e){(0,l.A)(Jl,this,e)}get inspecting(){return(0,c.A)(Ql,this)}set inspecting(e){(0,l.A)(Ql,this,e)}select(e){var t;const n=null===(t=this.shadowRoot)||void 0===t||null===(t=t.querySelector("iframe"))||void 0===t?void 0:t.contentWindow;null==n||n.postMessage({channel:"chat-preview",type:"select",payload:e},location.origin)}render(){return u().createElement(ac,{storyboard:this.storyboard,theme:this.theme,uiVersion:this.uiVersion,app:this.app,inspecting:this.inspecting,onActiveTargetChange:(0,c.A)(tc,this)})}}function ac(e){let{storyboard:t,theme:n,uiVersion:a,app:i,inspecting:o,onActiveTargetChange:r}=e;const s=(0,h.useRef)(),[l,c]=(0,h.useState)(!1),[d,p]=(0,h.useState)(!1),[m,v]=(0,h.useState)({x:0,y:0}),[g,f]=(0,h.useState)([]),[b,E]=(0,h.useState)([]),[k,y]=(0,h.useState)([]),[w,x]=(0,h.useState)([]),N=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=s.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?c(!0):setTimeout(e,100)};e()}),[]);(0,h.useEffect)((()=>{var e;if(!l)return;const t=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!t)throw new Error("Cannot find preview agent package: bricks/visual-builder");(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_inject)("visual-builder.inject-chat-preview-agent",{...t,filePath:`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${t.filePath}`})}),[l]),(0,h.useEffect)((()=>{var e;if(!l)return;const o=null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;o&&o("yaml",{yaml:(0,yl.safeDump)(t,{schema:yl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:i,theme:n,uiVersion:a})}),[i,l,t,n,a]);const L=(0,h.useMemo)((()=>{if(d)return()=>{setTimeout((()=>{window.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}})}),100)}}),[d]);(0,h.useEffect)((()=>{const e=e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"initialized":p(!0);break;case"inspect-hover":f(e.data.payload.outlines);break;case"scroll":v(e.data.payload);break;case"inspect-active":E(e.data.payload.outlines)}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[]),(0,h.useEffect)((()=>{var e;d&&(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e||e.postMessage({channel:"chat-preview",type:"toggle-inspecting",payload:{inspecting:o}},location.origin))}),[d,o]);const C=(0,h.useCallback)((e=>e.map((e=>{var t,n;const a=(null==s||null===(t=s.current)||void 0===t?void 0:t.offsetLeft)??0,i=(null==s||null===(n=s.current)||void 0===n?void 0:n.offsetTop)??0,{width:o,height:r,left:l,top:c,...d}=e;return{width:1*o,height:1*r,left:1*(l-m.x)+a,top:1*(c-m.y)+i,...d}}))),[m.x,m.y]);return(0,h.useEffect)((()=>{r(b[0])}),[b,r]),(0,h.useEffect)((()=>{x(C(b))}),[b,C]),(0,h.useEffect)((()=>{y(C(g))}),[g,C]),u().createElement("div",{className:A()("container",{inspecting:o})},u().createElement("iframe",{ref:s,src:`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:N,onMouseOut:L}),k.map(((e,t)=>u().createElement(xl,(0,kl.A)({key:t,variant:"hover"},e)))),w.map(((e,t)=>u().createElement(xl,(0,kl.A)({key:t,variant:"active"},e)))))}Nl=nc,({e:[Tl,Rl,Il,Ol,_l,Sl,Dl,Pl,Wl,$l,Fl,Bl,Ul,zl,Cl],c:[Gl,Ml]}=(0,d.A)(Nl,[Vl("visual-builder.chat-preview",{styleTexts:[Ll.A]})],[[jl({attribute:!1}),1,"storyboard"],[jl(),1,"theme"],[jl(),1,"uiVersion"],[jl(),1,"app"],[jl({type:Boolean}),1,"inspecting"],[Kl({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(Zl,e),(e,t)=>(0,l.A)(Zl,e,t)],[Hl(),2,"select"]],0,(e=>tc.has((0,r.A)(e))),m.ReactNextElement)),Ml();let ic=!1;const oc="item:";let rc=null;function sc(e){e.preventDefault(),e.stopPropagation(),function(e){const t=uc(e.composedPath());window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:t.map(pc)}},location.origin)}(e)}function lc(e){e.preventDefault(),e.stopPropagation()}const cc=(0,at.debounce)(((e,t,n)=>{let a=uc(e);if(0===a.length)for(const i of e)if(i instanceof HTMLElement&&i.shadowRoot){a=uc(i.shadowRoot.elementsFromPoint(t,n));break}const i=a.length>0?a[0].element:null;i!==rc&&(rc=i,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:a.map(pc)}},location.origin))}),20,{leading:!0});function dc(e){cc(e.composedPath(),e.clientX,e.clientY)}function hc(e){e.preventDefault(),e.stopPropagation(),rc=null,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}},location.origin)}function uc(e){const t=[];return e.forEach((e=>{let n;if(e.nodeType===Node.ELEMENT_NODE&&e instanceof HTMLElement&&(n=e.dataset.iid)&&n.startsWith(oc)){const a=n.substring(oc.length);t.push({type:"item",uuid:a,label:mc(e),element:e})}})),t}function pc(e){const{element:t,type:n,uuid:a,label:i}=e,{width:o,height:r,left:s,top:l}=t.getBoundingClientRect();return{width:o,height:r,left:s+window.scrollX,top:l+window.scrollY,type:n,uuid:a,label:i}}function mc(e){return e.tagName.toLowerCase().split(".").pop()}let vc=!1;function gc(e){window.parent.postMessage({channel:"chat-preview",...e},location.origin)}customElements.define("visual-builder.inject-chat-preview-agent",(0,qn.createProviderClass)((async function(){vc||(vc=!0,n.e(2201).then(n.bind(n,2201)),gc({type:"initialized"}),window.addEventListener("message",(e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"toggle-inspecting":!function(e){if(ic===e)return;ic=e;const t=e?"addEventListener":"removeEventListener";window[t]("click",sc,!0),window[t]("mousedown",lc,!0),window[t]("mouseover",lc,!0),window[t]("mouseup",lc,!0),window[t]("pointerdown",lc,!0),window[t]("pointerover",lc,!0),window[t]("pointerup",lc,!0),window[t]("pointerleave",hc,!0),window[t]("pointermove",dc,!0)}(e.data.payload.inspecting);break;case"select":!function(e){const t=`${e.type}:${e.uuid}`,n=(0,Jn.w)(t);window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:n.map((t=>pc({...e,element:t,label:mc(t)})))}},location.origin)}(e.data.payload)}})),window.addEventListener("scroll",(()=>{gc({type:"scroll",payload:{x:window.scrollX,y:window.scrollY}})})))})));var fc,Ac=n(4014),bc=n(8918);let Ec,kc,yc,wc,xc,Nc,Lc,Cc,Mc,Tc,Rc;const{defineElement:Ic,property:Oc}=(0,p.createDecorators)();let _c;var Sc=new WeakMap,Dc=new WeakMap,Pc=new WeakMap,Wc=new WeakMap,$c=new WeakMap;class Fc extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,Sc,kc(this)),(0,o.A)(this,Dc,(yc(this),wc(this))),(0,o.A)(this,Pc,(xc(this),Nc(this))),(0,o.A)(this,Wc,(Lc(this),Cc(this))),(0,o.A)(this,$c,(Mc(this),Tc(this))),Rc(this)}get generations(){return(0,c.A)(Sc,this)}set generations(e){(0,l.A)(Sc,this,e)}get category(){return(0,c.A)(Dc,this)}set category(e){(0,l.A)(Dc,this,e)}get theme(){return(0,c.A)(Pc,this)}set theme(e){(0,l.A)(Pc,this,e)}get uiVersion(){return(0,c.A)(Wc,this)}set uiVersion(e){(0,l.A)(Wc,this,e)}get app(){return(0,c.A)($c,this)}set app(e){(0,l.A)($c,this,e)}render(){return u().createElement(Bc,{generations:this.generations,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app})}}function Bc(e){let{generations:t,category:n,theme:a,uiVersion:i,app:o}=e;const r=(0,h.useRef)(),[s,l]=(0,h.useState)(!1),[c,d]=(0,h.useState)(!1),p=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=r.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?l(!0):setTimeout(e,100)};e()}),[]);return(0,h.useEffect)((()=>{if(!s)return;const e=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!e)throw new Error("Cannot find preview agent package: bricks/visual-builder");const t=r.current.contentWindow._preview_only_inject,n={...e,filePath:`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${e.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>t(e,n,void 0,!0)))).then((()=>{d(!0)}))}),[s]),(0,h.useEffect)((()=>{var e;if(!c)return;const s=null===(e=r.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const l=new Map,d=new Map;for(const e of t){let t=l.get(e.propertyId);t||l.set(e.propertyId,t=new Map);let n=t.get(e.rwType);n||t.set(e.rwType,n=new Map),n.set(e.displayLevel??0,e),d.set(e.propertyId,e.mockData)}const h=[{brick:"div",properties:{textContent:"属性",className:"head-cell"}},{brick:"div",properties:{textContent:"类别",className:"head-cell"}},{brick:"div",properties:{textContent:"展示等级",className:"head-cell last-col-cell",style:{gridColumn:"span 5",textAlign:"center"}}}],u={brick:"visual-builder.pre-generated-table-view",properties:{style:{gridTemplateColumns:"120px 80px repeat(5, 1fr)"}},children:h};let p=0;for(const[e,t]of l){let a=0;const i=p===l.size-1;for(const[o,r]of t){if(0===a){let n;for(const t of r.values()){n=t.propertyName??e;break}h.push({brick:"div",properties:{textContent:n,className:i?"last-row-cell":void 0,style:{gridRow:`span ${t.size}`}}})}const s=i&&a===t.size-1;h.push({brick:"div",properties:{textContent:o,className:s?"last-row-cell":void 0}});for(let t=-2;t<3;t++){var m;const a=r.get(t);let i;if(null!=a&&null!==(m=a.mockData)&&void 0!==m&&m.length){const t=a.mockData[Math.floor(Math.random()*a.mockData.length)];switch(a.category??n){case"detail-item":i={[e]:t};break;case"table-column":i={cellData:t}}}const o=[];2===t&&o.push("last-col-cell"),s&&o.push("last-row-cell"),h.push({brick:"div",...o?{properties:{className:o.join(" ")}}:null,children:[{brick:"visual-builder.pre-generated-container",properties:{useBrick:(null==a?void 0:a.storyboard)??[],dataSource:i},errorBoundary:!0}]})}a++}p++}s("yaml",{yaml:(0,yl.safeDump)(u,{schema:yl.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:o,theme:a,uiVersion:i,styleText:bc.A})}),[o,c,t,a,i,n]),u().createElement("div",{className:A()("container")},u().createElement("iframe",{ref:r,src:`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:p}))}fc=Fc,({e:[kc,yc,wc,xc,Nc,Lc,Cc,Mc,Tc,Rc],c:[_c,Ec]}=(0,d.A)(fc,[Ic("visual-builder.pre-generated-preview",{styleTexts:[Ac.A]})],[[Oc({attribute:!1}),1,"generations"],[Oc(),1,"category"],[Oc(),1,"theme"],[Oc(),1,"uiVersion"],[Oc(),1,"app"]],0,void 0,m.ReactNextElement)),Ec();var Uc,zc=n(9216);let Vc;const{defineElement:jc}=(0,p.createDecorators)();let Kc;class Hc extends m.ReactNextElement{render(){return u().createElement(Gc,null)}}function Gc(){return u().createElement("slot",null)}Uc=Hc,[Kc,Vc]=(0,d.A)(Uc,[jc("visual-builder.pre-generated-table-view",{styleTexts:[zc.A]})],[],0,void 0,m.ReactNextElement).c,Vc();var Yc,Xc=n(4967);let qc,Jc,Qc,Zc,ed;const{defineElement:td,property:nd}=(0,p.createDecorators)();let ad;var id=new WeakMap,od=new WeakMap;class rd extends m.ReactNextElement{constructor(){super(...arguments),(0,o.A)(this,id,Jc(this)),(0,o.A)(this,od,(Qc(this),Zc(this))),ed(this)}get useBrick(){return(0,c.A)(id,this)}set useBrick(e){(0,l.A)(id,this,e)}get dataSource(){return(0,c.A)(od,this)}set dataSource(e){(0,l.A)(od,this,e)}render(){return u().createElement(sd,{useBrick:this.useBrick,dataSource:this.dataSource})}}function sd(e){let{useBrick:t,dataSource:n}=e;return u().createElement(Bo.ReactUseMultipleBricks,{useBrick:t,data:n,errorBoundary:!0})}Yc=rd,({e:[Jc,Qc,Zc,ed],c:[ad,qc]}=(0,d.A)(Yc,[td("visual-builder.pre-generated-container",{styleTexts:[Xc.A]})],[[nd({attribute:!1}),1,"useBrick"],[nd({attribute:!1}),1,"dataSource"]],0,void 0,m.ReactNextElement)),qc();var ld=n(5908),cd=n(7091),dd=n(50),hd=n(6768),ud=n(8621),pd=n(9193),md=n(1431);const vd=(0,m.wrapBrick)("eo-icon"),gd=(0,m.wrapBrick)("eo-tooltip"),fd=(0,m.wrapBrick)("vs.code-editor",{onChange:"code.change",tokenClick:"token.click"}),Ad=(0,m.wrapBrick)("eo-icon-select",{onChange:"change"});var bd=n(5346),Ed=n(7856);const kd=Object.entries({amber:"#f7bf02",yellow:"#fadb14",orange:"#e38306",pink:"#ff1a79",red:"#f24c25",blue:"#1a7aff",indigo:"#3844e8","deep-purple":"#6641f9","gray-blue":"#778dc3",purple:"#893ad8",cyan:"#21d4f3",teal:"#1dc897",green:"#08BF33"}).map((e=>{let[t,n]=e;return{label:t,colors:(0,Ed.cM)(n)}}));var yd=n(5524),wd=n(1979),xd=n(6394),Nd=n(4514);const Ld="#normal_form",Cd="#advanced_form";function Md(e,t){return e?"string"==typeof e?{[`x-${t}`]:e}:{[`x-${t}`]:e.name,[`x-${t}-props`]:{..."CodeEditor"===e.name?{extraLibs:"{{extraLibs}}",links:"{{links}}",tokenClick:"{{tokenClick}}",lineNumbers:"off"}:{},...e.props??{}}}:{}}function Td(e){const t=e=>{let n,a={};e.children&&(n=e.children.map(t));const{name:i,type:o,component:r,decorator:s}=e,l="string"===o?{name:"FormItem"}:"boolean"===o?{name:"FormItem",props:{layout:"horizontal"}}:{},c="string"===o?{name:"Input"}:"boolean"===o?{name:"Switch",props:{size:"small"}}:{},d={type:o??"void",...(0,at.omit)(e,["children","component","decorator"]),...Md({...l,..."string"==typeof s?{name:s}:s},"decorator"),...Md({...c,..."string"==typeof r?{name:r}:r},"component")};if("string"==typeof i?a[i]=d:a=d,n){d.properties={};for(const e of n)"string"==typeof e.name?d.properties[e.name]=e:d.properties={...d.properties,...e}}return a};return{type:"object",properties:{[Ld]:{type:"void",properties:t({...e,children:[{name:"id",title:"id",type:"string",decorator:{name:"FormItem",props:{layout:"horizontal"}}},{name:"hidden",title:"隐藏",type:"boolean"},...e.children]})},[Cd]:{name:Cd,type:"string","x-decorator":"FormItemWithoutAdvanced","x-component":"CodeEditor","x-component-props":{extraLibs:"{{extraLibs}}",links:"{{links}}",tokenClick:"{{tokenClick}}",minLines:5}}}}}var Rd,Id=n(2591),Od=n.n(Id),_d=n(1740),Sd=n.n(_d),Dd=n(8128),Pd=n.n(Dd),Wd=n(855),$d=n.n(Wd),Fd=n(3051),Bd=n.n(Fd),Ud=n(3656),zd=n.n(Ud),Vd=n(3276),jd={};let Kd,Hd,Gd,Yd,Xd,qd,Jd,Qd,Zd,eh,th,nh,ah,ih,oh,rh,sh,lh,ch,dh,hh,uh,ph,mh,vh,gh,fh,Ah,bh,Eh,kh,yh;jd.styleTagTransform=zd(),jd.setAttributes=$d(),jd.insert=Pd().bind(null,"head"),jd.domAPI=Sd(),jd.insertStyleElement=Bd(),Od()(Vd.A,jd),Vd.A&&Vd.A.locals&&Vd.A.locals;const{defineElement:wh,property:xh,method:Nh,event:Lh}=(0,p.createDecorators)(),Ch=u().forwardRef(qh),Mh="before_submit",Th="on_advanced_change",Rh=(0,cd.Uy)({components:{FormLayout:pd.Hb,Input:pd.pd,FormItem:function(e){const t=(0,cd.mN)(),n=(0,cd.Mt)(),a=(0,cd.Ov)(),[i,o]=(0,h.useState)("string"==typeof n.value&&(0,md.isEvaluable)(n.value)?"advanced":"normal"),r=(0,h.useMemo)((()=>"advanced"===i),[i]),s=(0,h.useMemo)((()=>n.component),[n]),l=(0,h.useCallback)((()=>{const e=r?"normal":"advanced",i="advanced"===e;o(e),n.setComponent(i?"CodeEditor":s[0],{...i?{...a??{},lineNumbers:"off"}:s[1]});const l=t.getValuesIn(n.props.name);if(i&&(0,at.isObject)(l))t.setInitialValues({[n.props.name]:wl().safeDump(l)});else if(!i&&l&&"string"==typeof l){let e;try{e=wl().load(l)}catch{e=null}t.setInitialValues({[n.props.name]:e},"overwrite")}}),[t,n,r,s,a]);return(0,cd.Uf)((()=>{(0,ld.J4)(n.props.name,(e=>{let{value:t}=e;"string"==typeof t&&(0,md.isEvaluable)(t)&&(o("advanced"),n.setComponent("CodeEditor",{...a??{},lineNumbers:"off"}))}))})),u().createElement("div",{className:"advanced-form-item"},u().createElement(pd.eI,(0,kl.A)({},e,{layout:r?null:e.layout||"vertical"}),e.children),u().createElement("div",{className:"advanced-mode-check-wrapper"},u().createElement(gd,{content:"normal"===i?"使用表达式":"关闭表达式"},u().createElement(vd,{className:A()({isActive:r}),lib:"fa",icon:"code",onClick:l}))))},FormItemWithoutAdvanced:pd.eI,FormCollapse:pd.w9,NumberPicker:pd.Y_,Radio:pd.sx,Select:pd.l6,Switch:pd.dO,CategoryTitle:function(e){return u().createElement("div",{className:"custom-category-title"},e.text)},CodeEditor:function(e){const[t,n]=(0,h.useState)(),[a,i]=(0,h.useState)(),o=(0,h.useCallback)((t=>{var n;i(t.detail?t.detail:void 0);const a=t.detail?wl().safeLoad(t.detail):void 0;null==e||null===(n=e.onChange)||void 0===n||n.call(e,a)}),[e]);return(0,h.useEffect)((()=>{if(e.value&&!t){let t=e.value;t&&"string"!=typeof t&&(t=wl().safeDump(t,{skipInvalid:!0})),n(t)}}),[e.value,t]),u().createElement(fd,(0,kl.A)({minLines:e.minLines??1,automaticLayout:"fit-content",language:"brick_next_yaml",theme:"vs-dark"},e,{value:a??t,onChange:o}))},IconSelect:function(e){return u().createElement(Ad,e)},ColorPicker:function(e){const[t,n]=(0,h.useState)(),a=(0,h.useMemo)((()=>(e=>[{label:"系统默认",colors:e.map((e=>e.colors)).flat()}])(kd)),[]);return(0,h.useEffect)((()=>{if(e.value){const t=((e,t)=>{const[,n,a]=t.match(/^var\(--palette-(\w+)-(\d+)\)$/)??[];let i=t;return n&&a&&e.forEach((e=>{const t=e.colors[Number(a)-1];e.label===n&&t&&(i="string"==typeof t?t:t.toHsbString())})),i})(kd,e.value);n(t)}}),[e.value]),u().createElement(bd.A,(0,kl.A)({getPopupContainer:()=>document.body,showText:!0,presets:a},e,{value:t,onChange:(t,n)=>{var a,i;a=n,null===(i=e.onChange)||void 0===i||i.call(e,((e,t)=>{let n=t;return e.forEach((e=>{const t=e.label,a=e.colors.findIndex((e=>"string"==typeof e?e===n:e.toHsbString()===n));a>=0&&(n=`var(--palette-${t}-${a+1})`)})),n})(kd,a))}}))},InputWithUrl:function(e){const[t,n]=(0,h.useState)(!0),a=(0,cd.mN)(),i=(0,cd.Mt)(),{url:o,href:r}=e.transform??{url:"url",href:"href"},s=(0,h.useMemo)((()=>(0,ld.fA)(Th,((e,t)=>n=>{n(e,t)}))),[]),l=(0,h.useCallback)((()=>{const i=!t;n(i),a.setValues({[i?o:r]:e.value}),a.deleteValuesIn(i?r:o)}),[t,a,o,e.value,r]),c=(0,h.useCallback)((n=>{e.onChange(n.detail),a.setValues({[t?o:r]:n.detail})}),[e,a,t,o,r]),d=(0,h.useMemo)((()=>t?"内链":"外链"),[t]),p=(0,h.useCallback)((e=>{const{values:t}=e.getState(),a=i.props.name;e.setValuesIn(a,t[o]??t[r]),n(!t[r])}),[i.props.name,r,o]);return(0,h.useEffect)((()=>{a.addEffects("onAdvancedChange",(()=>{(0,ld.oJ)(p),s(((e,t)=>{const n=i.props.name;e&&t.deleteValuesIn(n)}))}))}),[a,i,s,p]),(0,h.useEffect)((()=>{p(a)}),[]),u().createElement(pd.pd,(0,kl.A)({},e,{suffix:u().createElement("div",{style:{cursor:"pointer"},slot:"suffix",onClick:l},d),onChange:c}))},TextAlignRadio:function(e){return u().createElement(yd.Ay.Group,(0,kl.A)({},e,{size:"small"}),u().createElement(yd.Ay.Button,{value:"left"},u().createElement(wd.A,null)),u().createElement(yd.Ay.Button,{value:"center"},u().createElement(xd.A,null)),u().createElement(yd.Ay.Button,{value:"right"},u().createElement(Nd.A,null)))}}});let Ih;var Oh=new WeakMap,_h=new WeakMap,Sh=new WeakMap,Dh=new WeakMap,Ph=new WeakMap,Wh=new WeakMap,$h=new WeakMap,Fh=new WeakMap,Bh=new WeakMap,Uh=new WeakSet,zh=new WeakMap,Vh=new WeakMap,jh=new WeakMap,Kh=new WeakMap,Hh=new WeakMap,Gh=new WeakMap,Yh=new WeakMap;class Xh extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Uh),(0,o.A)(this,Oh,(Kd(this),(0,h.createRef)())),(0,o.A)(this,_h,Gd(this)),(0,o.A)(this,Sh,(Yd(this),Xd(this))),(0,o.A)(this,Dh,(qd(this),Jd(this))),(0,o.A)(this,Ph,(Qd(this),Zd(this))),(0,o.A)(this,Wh,(eh(this),th(this))),(0,o.A)(this,$h,(nh(this),ah(this))),(0,o.A)(this,Fh,(ih(this),oh(this))),(0,o.A)(this,Bh,(rh(this),sh(this))),(0,o.A)(this,zh,(dh(this),hh(this))),(0,o.A)(this,Vh,(mh(this),vh(this))),(0,o.A)(this,jh,(Ah(this),e=>{(0,s.A)(Uh,this,gh).emit(e)})),(0,o.A)(this,Kh,bh(this)),(0,o.A)(this,Hh,(yh(this),e=>{(0,s.A)(Uh,this,Eh).emit(e)})),(0,o.A)(this,Gh,void 0),(0,o.A)(this,Yh,(0,ld.fA)(Mh,((e,t)=>n=>{(0,l.A)(Gh,this,n(e,t))})))}get editorName(){return(0,c.A)(_h,this)}set editorName(e){(0,l.A)(_h,this,e)}get values(){return(0,c.A)(Sh,this)}set values(e){(0,l.A)(Sh,this,e)}get advancedMode(){return(0,c.A)(Dh,this)}set advancedMode(e){(0,l.A)(Dh,this,e)}get dataList(){return(0,c.A)(Ph,this)}set dataList(e){(0,l.A)(Ph,this,e)}get editorPackages(){return(0,c.A)(Wh,this)}set editorPackages(e){(0,l.A)(Wh,this,e)}get links(){return(0,c.A)($h,this)}set links(e){(0,l.A)($h,this,e)}get extraLibs(){return(0,c.A)(Fh,this)}set extraLibs(e){(0,l.A)(Fh,this,e)}validate(){var e;const t=null===(e=(0,c.A)(Oh,this).current)||void 0===e?void 0:e.getFormInstance();(0,l.A)(Gh,this,null);const n=()=>this.advancedMode?t.values[Cd]:it().omit(t.values,[Cd]);t.validate().then((()=>{t.notify(Mh,n()),(0,c.A)(Gh,this)?(0,s.A)(Uh,this,lh).emit((0,c.A)(Gh,this)):(0,s.A)(Uh,this,lh).emit(n())})).catch((e=>{(0,s.A)(Uh,this,uh).emit(e)}))}render(){return u().createElement(Ch,{ref:(0,c.A)(Oh,this),editorName:this.editorName,values:this.values,advancedMode:this.advancedMode,dataList:this.dataList,extraLibs:this.extraLibs,links:this.links,editorPackages:this.editorPackages,handleValuesChange:(0,c.A)(jh,this),handleTokenClick:(0,c.A)(Hh,this),onSubmitEffect:(0,c.A)(Yh,this)})}}function qh(e,t){let{advancedMode:n,values:a,editorName:i,dataList:o,editorPackages:r,extraLibs:s,links:l,handleValuesChange:c,handleTokenClick:d,onSubmitEffect:p}=e;const[m,v]=(0,h.useState)((()=>{var e;return null===(e=De.customEditors.get(i))||void 0===e?void 0:e(u())})),g=(0,Bo.useCurrentTheme)(),f=(0,h.useMemo)((()=>(0,ud.VC)()),[]),A=(0,h.useMemo)((()=>(0,ld.DG)()),[m]),b=(0,h.useRef)(null),E=(0,h.useMemo)((()=>(0,ld.fA)(Th,((e,t)=>n=>{b.current=n(e,t)}))),[]);(0,h.useImperativeHandle)(t,(()=>({getFormInstance:()=>A})));const k=(0,h.useCallback)((async()=>{De.customEditors.get(i)?v((()=>{var e;return null===(e=De.customEditors.get(i))||void 0===e?void 0:e(u())})):(await De.__secret_internals.loadEditors([i],r),v((()=>{var e;return null===(e=De.customEditors.get(i))||void 0===e?void 0:e(u())})))}),[i,r]),y=(0,h.useCallback)(((e,t)=>{if(t){const t=it().omit(e,[Cd]);return{[Cd]:it().isEmpty(t)?"":t}}return e[Cd]??e}),[]);return(0,h.useEffect)((()=>{k()}),[k]),(0,h.useEffect)((()=>{m&&A.setInitialValues(a)}),[m,A]),(0,h.useEffect)((()=>{b.current=null,A.notify(Th,n),A.query(Ld).take((e=>{e.display=n?"hidden":"visible"})),A.query(Cd).take((e=>{e.display=n?"visible":"hidden"}));const{values:e}=A.getState(),t=y(b.current??e,n);A.setValues(t,"overwrite")}),[n,A,y,m]),(0,h.useEffect)((()=>{A.addEffects("onValueChange",(()=>{(0,ld.A$)((e=>{c(e.values)}))}))}),[A]),m?u().createElement("div",{className:"property-form-wrapper"},u().createElement(dd.Ay,{prefixCls:"antdV5",theme:{algorithm:"dark-v2"===g?hd.A.darkAlgorithm:hd.A.defaultAlgorithm,components:{InputNumber:{handleVisible:!0}}},getPopupContainer:e=>e},u().createElement(ud.N7,{cache:f},u().createElement(cd.Op,{form:A},u().createElement(m,{advancedMode:n,SchemaFieldComponent:Rh,form:A,scope:{dataList:o,advancedMode:n,extraLibs:s,links:l,tokenClick:e=>d(e.detail)},effects:{onFieldInit:ld.yd,onFieldValueChange:ld.$l,onFieldInitialValueChange:ld.J4,onFormInitialValuesChange:ld.oJ,onFormValidateSuccess:ld.zu,onSubmit:p,onAdvancedChange:E},formilySchemaFormatter:Td}))))):null}Rd=Xh,({e:[Gd,Yd,Xd,qd,Jd,Qd,Zd,eh,th,nh,ah,ih,oh,rh,sh,lh,ch,dh,hh,uh,ph,mh,vh,gh,fh,Ah,bh,Eh,kh,yh,Kd],c:[Ih,Hd]}=(0,d.A)(Rd,[wh("visual-builder.property-editor",{shadowOptions:!1,dependencies:["eo-icon-select","vs.code-editor","eo-tooltip"]})],[[xh(),1,"editorName"],[xh({attribute:!1}),1,"values"],[xh({type:Boolean}),1,"advancedMode"],[xh({attribute:!1}),1,"dataList"],[xh({attribute:!1}),1,"editorPackages"],[xh({attribute:!1}),1,"links"],[xh({attribute:!1}),1,"extraLibs"],[Lh({type:"validate.success"}),1,"successEvent",e=>(0,c.A)(Bh,e),(e,t)=>(0,l.A)(Bh,e,t)],[Lh({type:"validate.error"}),1,"errorEvent",e=>(0,c.A)(zh,e),(e,t)=>(0,l.A)(zh,e,t)],[Nh(),2,"validate"],[Lh({type:"values.change"}),1,"valuesChangeEvent",e=>(0,c.A)(Vh,e),(e,t)=>(0,l.A)(Vh,e,t)],[Lh({type:"token.click"}),1,"tokenClick",e=>(0,c.A)(Kh,e),(e,t)=>(0,l.A)(Kh,e,t)]],0,(e=>Yh.has((0,r.A)(e))),m.ReactNextElement)),Hd(),customElements.define("visual-builder.check-editor-by-name",(0,qn.createProviderClass)((async function(e){try{await De.__secret_internals.loadEditors([e])}catch{return!1}return!!De.customEditors.get(e)})));var Jh=n(9680);function Qh(e,t){const n=new Map;for(const a of e){const e=(0,Jh.collectMemberUsage)([a.if,a.value,a.resolve],t);n.set(a,e)}return n}function Zh(e,t){e.forEach((n=>{!function(e,t){var n;const{dependencyList:a,nodeList:i,parents:o,result:r}=t,s=(0,at.cloneDeep)(e);r.push(s);const l=a.find((e=>e.node.key===s.key));if(null!==(n=l.deps)&&void 0!==n&&n.length&&!o.some((e=>e.key===s.key))){const e=s.children=[];!function(e,t){const n=[];e.deps.forEach((e=>{const a=t.nodeList.filter((t=>t.name===e));n.push(...a)})),Zh(n,t)}(l,{dependencyList:a,nodeList:i,parents:[...o,s],result:e})}}(n,{...t,nodeList:e})}))}customElements.define("visual-builder.get-data-deps",(0,qn.createProviderClass)(Qh)),customElements.define("visual-builder.get-dependency-tree",(0,qn.createProviderClass)((function(e,t){const n=e,a=Qh(n.map((e=>e.data)),t.dataType),i=[];for(const[e,t]of a)i.push({deps:Array.from(t.usedProperties),node:n.find((t=>t.data===e))});const o=[];return Zh(n,{result:o,dependencyList:i,parents:[]}),o})));var eu=n(264);customElements.define("visual-builder.parse-path",(0,qn.createProviderClass)((async function(e,t){const n=[];return{regexp:(0,eu.MM)(e,n,(0,at.defaults)(t,{end:!1,strict:!1,sensitive:!0})),keys:n}})))},6265:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,'.advanced-form-item{position:relative}.advanced-form-item .advanced-mode-check-wrapper{position:absolute;top:6px;right:6px;line-height:0;z-index:1}.advanced-form-item .advanced-mode-check-wrapper eo-icon[icon="code"]{cursor:pointer;padding:2px 4px;background:var(--palette-gray-7);border-radius:6px}.advanced-form-item .advanced-mode-check-wrapper eo-icon.isActive[icon="code"]{background:var(--color-brand);color:#fff}',""]);const s=r},7621:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,".custom-category-title{font-size:14px;font-weight:600;line-height:14px;margin-bottom:12px;border-left:2px solid;padding-left:6px;border-color:#8d8d8d;margin-top:18px}.custom-category-title:first-child{margin-top:0}",""]);const s=r},3276:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o),s=n(6265),l=n(7621),c=r()(i());c.i(s.A),c.i(l.A),c.push([e.id,".property-form-wrapper .antdV5-formily-item-feedback-layout-loose{margin-bottom:10px}.property-form-wrapper .antdV5-formily-item .antdV5-formily-item-control{align-self:center}",""]);const d=c},7236:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o),s=n(6131),l=r()(i());l.i(s.A),l.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.message{display:flex;gap:8px}.main{flex:1;min-width:0}.label{font-weight:bold;line-height:28px}.message:not(:last-child){margin-bottom:2em}.invisible-dots{opacity:0}.failed .content{color:var(--color-error)}.command:not(:first-child){margin-top:1em}.command:not(:last-child){margin-bottom:1em}pre{white-space:pre-wrap;background-color:var(--palette-gray-3);border-radius:6px;padding:1em}.markdown > :first-child{margin-top:0}.markdown > :last-child{margin-bottom:0}.avatar{align-self:flex-start;display:flex;align-items:center;justify-content:center}.texting::after{content:" ";animation:texting 2s infinite;white-space:pre}@keyframes texting{0%{content:" "}25%{content:". "}50%{content:".. "}75%{content:"..."}100%{content:" "}}pre[class*="language-"]{overflow:visible}pre[class*="language-"],\ncode[class*="language-"]{white-space:pre-wrap}eo-avatar.role-assistant::part(avatar-icon){background-color:var(--palette-blue-5)}.content{word-wrap:break-word}.plain{white-space:pre-wrap}',""]);const c=l.toString()},1563:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative;box-shadow:rgba(204,204,204,0.2) 0px 0px 0px 1px}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}.outline{position:absolute;border-style:solid;border-width:2px;border-radius:0 4px 4px;pointer-events:none}.label{position:absolute;left:-2px;top:-20px;height:18px;line-height:16px;padding:2px 5px 0;font-size:12px;border-radius:4px 4px 0 0;white-space:nowrap}.outline.hover{border-color:rgba(var(--palette-blue-6-channel),0.3)}.outline.hover .label{background:rgba(var(--palette-blue-6-channel),0.3)}.outline.active{border-color:var(--palette-blue-6)}.outline.active .label{background:var(--palette-blue-6)}.container:not(.inspecting) .outline{display:none}",""]);const s=r.toString()},6213:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.contract-wrapper{display:flex;gap:4px}.contract-selector{flex:1}.version-selector{width:100px}.options-tips{padding:0px 10px;font-weight:400;color:#999;white-space:nowrap;font-style:italic}",""]);const s=r.toString()},7540:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.mask,\n.container{display:none;position:fixed;z-index:1}.mask{top:0;bottom:0;left:0;right:0;z-index:1}:host([active]) .mask,\n:host([active]) .container{display:block}.container{background:var(--antd-dropdown-menu-bg);border-radius:var(--medius-border-radius);padding:5px}.container .title{padding:5px 12px;cursor:default;color:var(--color-secondary-text);border-bottom:1px solid var(--color-text-divider-line)}.container eo-menu{border:none;padding:5px 0}.container eo-menu eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.container eo-menu eo-menu-item[disabled]::part(menu-item){cursor:not-allowed}.container eo-menu eo-menu-item::part(menu-item){cursor:grab;padding:5px 12px;border-radius:var(--medius-border-radius);min-width:max-content}.container eo-menu eo-menu-item.dragging{opacity:0.5}.container eo-menu eo-tooltip{display:block}",""]);const s=r.toString()},2381:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{--local-node-outline-style:solid;display:block}:host([hidden]){display:none}:host([not-synced]){--local-node-outline-style:dashed}*{box-sizing:border-box}.node{width:168px;max-width:none;height:130px;position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.node.board{height:70px;max-width:168px;width:-moz-fit-content;width:fit-content;padding-bottom:4px}.label,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:18px;font-size:var(--sub-title-font-size-small);color:var(--color-header-text);font-weight:var(--font-weight-500);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.node.editing-label .label{height:0}.node:not(.editing-label) .label-input{display:none}.add-button,\n.icon-container,\n.thumbnail-container,\n.thumbnail-placeholder{display:flex;align-items:center;justify-content:center}.thumbnail-container{height:98px;outline:1px var(--local-node-outline-style) var(--palette-gray-4);opacity:1;border:4px solid transparent;border-radius:4px;width:100%;position:relative;flex-direction:column}.thumbnail-placeholder{color:var(--palette-gray-5);font-size:36px;flex:1}.icon-container{font-size:20px;background-color:var(--palette-teal-6);color:var(--palette-gray-4);width:36px;height:36px;border-radius:50%;outline-offset:4px}:host([active]) .thumbnail-container,\n:host([active]) .icon-container{outline:2px var(--local-node-outline-style) var(--palette-blue-3)}:host(:not([active])) .node:hover .thumbnail-container,\n:host(:not([active])) .node:hover .icon-container{outline:1px var(--local-node-outline-style) var(--palette-blue-3)}.add-button{position:absolute;bottom:-26px;left:calc(50% - 12px);width:24px;height:24px;background:var(--palette-gray-3);color:var(--palette-gray-6);border-radius:50%;cursor:pointer}:host([not-synced]) .add-button,\n:host([disable-child-append]) .add-button,\n:host(:not([active])) .add-button{display:none}.add-button:hover{background:var(--palette-blue-5);color:var(--palette-gray-2)}.external{position:absolute;top:4px;left:4px;padding:0 10px;display:flex;align-items:center;gap:6px;background:var(--palette-purple-4);font-size:12px;line-height:20px;height:22px;cursor:pointer;color:var(--palette-gray-1);border-radius:9999px;right:4px;max-width:-moz-fit-content;max-width:fit-content}.external-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.external:hover{background:var(--palette-purple-5)}.sub-nodes{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%}.sub-node{background-color:var(--palette-gray-2);border-radius:4px;padding:6px;display:flex;flex-direction:column;justify-content:space-between;height:32px}.sub-node-skeleton-title{width:18px;height:4px;border-radius:2px;align-self:flex-start;background-color:var(--palette-gray-4)}.sub-node-skeleton-content{width:100%;height:4px;border-radius:2px;background-color:var(--palette-gray-4)}.sub-node-skeleton-button{width:18px;height:4px;border-radius:2px;align-self:flex-end;background-color:var(--palette-blue-3)}.sub-node:hover{background-color:var(--palette-gray-3)}.sub-node:hover .sub-node-skeleton-title,\n.sub-node:hover .sub-node-skeleton-content{background-color:var(--palette-gray-5)}.sub-node:hover .sub-node-skeleton-button{background-color:var(--palette-blue-4)}",""]);const s=r.toString()},4967:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}",""]);const s=r.toString()},8918:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,"#preview-root{padding:0;height:100vh;overflow-y:auto;border:1px solid var(--theme-gray-border-color);border-radius:4px}.head-cell{position:sticky;top:0;background:var(--body-background);z-index:1;font-weight:bold}.last-col-cell{border-right-color:transparent}.last-row-cell{border-bottom-color:transparent}",""]);const s=r.toString()},4014:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=r.toString()},9216:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:grid;width:100%}:host([hidden]){display:none}::slotted(*){padding:4px 8px;border:1px solid var(--theme-gray-border-color);border-left-color:transparent;border-top-color:transparent;min-width:0;word-break:break-word}",""]);const s=r.toString()},9765:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,".custom-scrollbar-container{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.03)}.custom-scrollbar-container::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;position:absolute}.custom-scrollbar-container::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0);border-radius:4px}.custom-scrollbar-container:hover::-webkit-scrollbar-track{background-color:rgba(255,255,255,0.03)}.custom-scrollbar-container:hover::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.15)}",""]);const s=r.toString()},3430:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,'.workBenchActionList{display:flex;flex-direction:column;width:min-content;height:100%;background-color:#4297ff}:host-context(html[data-theme="dark-v2"]) .workBenchActionList,\n:host-context([data-override-theme="dark-v2"]) .workBenchActionList{background-color:#323237}',""]);const s=r.toString()},5292:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:rgba(255,255,255,0.4);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:white}.action.active::part(link),\n.action::part(link):hover{color:white}',""]);const s=r.toString()},1361:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,":host{display:inline-block}:host([hidden]){display:none}eo-popover::part(popup){width:800px;max-width:60vw;padding:10px;background:var(--color-fill-bg-container-4);border-radius:var(--medius-border-radius);box-shadow:var(--feedback-container-shadow);z-index:1000}.history-title{font-size:var(--title-font-size);font-weight:var(--font-weight-500);color:var(--color-strong-text);margin-bottom:5px}.history-list{max-height:500px;overflow-y:auto}.item-container{padding:10px 0;display:flex;flex-direction:column;gap:5px}.empty{padding:5px 0 10px 0;font-size:14px;color:var(--text-color-secondary);text-align:center}.item-container:not(:last-of-type){border-bottom:1px solid var(--color-border-divider-line)}.item-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.title-left,\n.title-right{display:flex;align-items:center}.title-left{cursor:pointer;overflow:hidden;gap:5px}.topic{font-size:14px;color:var(--text-color-title);font-weight:var(--font-weight-500);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.branch{font-size:14px;color:var(--text-color-secondary)}.rollback{margin-right:5px;font-size:14px;color:var(--text-color-secondary);cursor:pointer}.rollback:hover{color:var(--color-brand)}.item-info{display:flex;align-items:center;gap:5px}.time,\n.operator{font-size:14px;color:var(--text-color-secondary)}.load-more-container{display:block;text-align:center}.end-container{display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;color:var(--color-brand)}.rollback-all{cursor:pointer}",""]);const s=r.toString()},7180:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,':host{display:block;--pane-color:#595959}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--pane-color:#ccc}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.pane{display:flex;flex-direction:column;color:var(--pane-color);height:100%}.pane-header{display:flex;align-items:center;cursor:pointer;border-top:1px solid transparent;position:relative}.pane-header:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#007fd4}:host(:not(:first-child)) .pane-header{border-top-color:rgba(204,204,204,0.2)}.pane-scroll-shadow{display:none;position:absolute;bottom:-3px;left:0;right:0;height:3px;box-shadow:#000000 0 6px 6px -6px inset;z-index:1}.scrolled .pane-scroll-shadow{display:block}.pane-title{display:flex;align-items:center;font-size:13px;line-height:24px;height:25px;min-width:0;flex:1}.title-icon{display:flex;justify-content:center;align-items:center;width:24px;padding-right:2px;line-height:1;flex-shrink:0}.title-label{text-transform:uppercase;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-body{flex-grow:1;min-height:0;display:none;overflow:hidden;overflow-y:auto;overflow-y:overlay}:host([active]) .pane-body{display:initial}:host(:not(:hover)) ::slotted([slot="actions"]){display:none}.badge{background-color:rgb(77,77,77);color:rgb(255,255,255);border-radius:11px;height:18px;padding:3px 6px;line-height:13px;margin:0 3px;font-size:12px}',""]);const s=r.toString()},2150:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o)()(i());r.push([e.id,':host{--sidebar-background:#fff;--title-container-background:#fff;--title-container-color:#595959;display:block;outline-color:rgba(83,89,93,0.5);background-color:var(--sidebar-background);height:100%}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--sidebar-background:#181818;--title-container-background:#181818;--title-container-color:rgb(187,187,187);background-color:var(--sidebar-background)}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.sidebar{display:flex;flex-direction:column;height:100%}.title-container{display:flex;padding:0 8px 8px 8px;color:var(--title-container-color);background:var(--title-container-background)}.title-label{font-weight:300;line-height:44px;padding-left:12px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-container{flex-grow:1;min-height:0;display:flex;flex-direction:column}::slotted([slot="panes"]){transition:flex 0.2s;min-height:25px}',""]);const s=r.toString()},6131:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6758),i=n.n(a),o=n(935),r=n.n(o),s=n(7745),l=r()(i());l.i(s.A),l.push([e.id,"",""]);const c=l.toString()},264:(e,t,n)=>{function a(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function i(e){return e&&e.sensitive?"":"i"}function o(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var o=n.strict,r=void 0!==o&&o,s=n.start,l=void 0===s||s,c=n.end,d=void 0===c||c,h=n.encode,u=void 0===h?function(e){return e}:h,p=n.delimiter,m=void 0===p?"/#?":p,v=n.endsWith,g="[".concat(a(void 0===v?"":v),"]|$"),f="[".concat(a(m),"]"),A=l?"^":"",b=0,E=e;b<E.length;b++){var k=E[b];if("string"==typeof k)A+=a(u(k));else{var y=a(u(k.prefix)),w=a(u(k.suffix));if(k.pattern)if(t&&t.push(k),y||w)if("+"===k.modifier||"*"===k.modifier){var x="*"===k.modifier?"?":"";A+="(?:".concat(y,"((?:").concat(k.pattern,")(?:").concat(w).concat(y,"(?:").concat(k.pattern,"))*)").concat(w,")").concat(x)}else A+="(?:".concat(y,"(").concat(k.pattern,")").concat(w,")").concat(k.modifier);else"+"===k.modifier||"*"===k.modifier?A+="((?:".concat(k.pattern,")").concat(k.modifier,")"):A+="(".concat(k.pattern,")").concat(k.modifier);else A+="(?:".concat(y).concat(w,")").concat(k.modifier)}}if(d)r||(A+="".concat(f,"?")),A+=n.endsWith?"(?=".concat(g,")"):"$";else{var N=e[e.length-1],L="string"==typeof N?f.indexOf(N[N.length-1])>-1:void 0===N;r||(A+="(?:".concat(f,"(?=").concat(g,"))?")),L||(A+="(?=".concat(f,"|").concat(g,")"))}return new RegExp(A,i(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var a=e[n];if("*"!==a&&"+"!==a&&"?"!==a)if("\\"!==a)if("{"!==a)if("}"!==a)if(":"!==a)if("("!==a)t.push({type:"CHAR",index:n,value:e[n++]});else{var i=1,o="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--i){s++;break}}else if("("===e[s]&&(i++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=e[s++]}else o+=e[s++]+e[s++];if(i)throw new TypeError("Unbalanced pattern at ".concat(n));if(!o)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:o}),n=s}else{for(var r="",s=n+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;r+=e[s++]}if(!r)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:r}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),i=t.prefixes,o=void 0===i?"./":i,r="[^".concat(a(t.delimiter||"/#?"),"]+?"),s=[],l=0,c=0,d="",h=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},u=function(e){var t=h(e);if(void 0!==t)return t;var a=n[c],i=a.type,o=a.index;throw new TypeError("Unexpected ".concat(i," at ").concat(o,", expected ").concat(e))},p=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var m=h("CHAR"),v=h("NAME"),g=h("PATTERN");if(v||g){var f=m||"";-1===o.indexOf(f)&&(d+=f,f=""),d&&(s.push(d),d=""),s.push({name:v||l++,prefix:f,suffix:"",pattern:g||r,modifier:h("MODIFIER")||""})}else{var A=m||h("ESCAPED_CHAR");if(A)d+=A;else if(d&&(s.push(d),d=""),h("OPEN")){f=p();var b=h("NAME")||"",E=h("PATTERN")||"",k=p();u("CLOSE"),s.push({name:b||(E?l++:""),pattern:b&&!E?r:E,prefix:f,suffix:k,modifier:h("MODIFIER")||""})}else u("END")}}return s}(e,n),t,n)}function r(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,a=0,i=n.exec(e.source);i;)t.push({name:i[1]||a++,prefix:"",suffix:"",modifier:"",pattern:""}),i=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var a=e.map((function(e){return r(e,t,n).source}));return new RegExp("(?:".concat(a.join("|"),")"),i(n))}(e,t,n):o(e,t,n)}n.d(t,{MM:()=>r})}}]);
3
- //# sourceMappingURL=3807.3deff838.js.map