@visuallyjs/browser-ui-vue 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chart.d.ts +40 -5
- package/definitions.d.ts +48 -6
- package/diagram-palette-component.d.ts +1 -1
- package/edge-property-mappings-inspector-component.d.ts +31 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/palette-component.d.ts +6 -6
- package/shape-component.d.ts +5 -1
- package/shape-palette-component.d.ts +3 -3
- package/shape-properties-inspector-component.d.ts +30 -0
- package/visuallyjs.browser-ui-vue.cjs.js +1 -1
- package/visuallyjs.browser-ui-vue.es.js +1 -1
package/chart.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ export declare const ColumnChartComponent: {
|
|
|
11
11
|
data: () => {
|
|
12
12
|
hasMounted: boolean;
|
|
13
13
|
};
|
|
14
|
+
methods: {
|
|
15
|
+
_init: () => void;
|
|
16
|
+
};
|
|
14
17
|
/** @internal */
|
|
15
18
|
mounted(): void;
|
|
16
19
|
setup(): {
|
|
@@ -31,6 +34,9 @@ export declare const BarChartComponent: {
|
|
|
31
34
|
data: () => {
|
|
32
35
|
hasMounted: boolean;
|
|
33
36
|
};
|
|
37
|
+
methods: {
|
|
38
|
+
_init: () => void;
|
|
39
|
+
};
|
|
34
40
|
/** @internal */
|
|
35
41
|
mounted(): void;
|
|
36
42
|
setup(): {
|
|
@@ -51,6 +57,9 @@ export declare const XYChartComponent: {
|
|
|
51
57
|
data: () => {
|
|
52
58
|
hasMounted: boolean;
|
|
53
59
|
};
|
|
60
|
+
methods: {
|
|
61
|
+
_init: () => void;
|
|
62
|
+
};
|
|
54
63
|
/** @internal */
|
|
55
64
|
mounted(): void;
|
|
56
65
|
setup(): {
|
|
@@ -71,6 +80,9 @@ export declare const PieChartComponent: {
|
|
|
71
80
|
data: () => {
|
|
72
81
|
hasMounted: boolean;
|
|
73
82
|
};
|
|
83
|
+
methods: {
|
|
84
|
+
_init: () => void;
|
|
85
|
+
};
|
|
74
86
|
/** @internal */
|
|
75
87
|
mounted(): void;
|
|
76
88
|
setup(): {
|
|
@@ -91,6 +103,9 @@ export declare const LineChartComponent: {
|
|
|
91
103
|
data: () => {
|
|
92
104
|
hasMounted: boolean;
|
|
93
105
|
};
|
|
106
|
+
methods: {
|
|
107
|
+
_init: () => void;
|
|
108
|
+
};
|
|
94
109
|
/** @internal */
|
|
95
110
|
mounted(): void;
|
|
96
111
|
setup(): {
|
|
@@ -111,6 +126,9 @@ export declare const AreaChartComponent: {
|
|
|
111
126
|
data: () => {
|
|
112
127
|
hasMounted: boolean;
|
|
113
128
|
};
|
|
129
|
+
methods: {
|
|
130
|
+
_init: () => void;
|
|
131
|
+
};
|
|
114
132
|
/** @internal */
|
|
115
133
|
mounted(): void;
|
|
116
134
|
setup(): {
|
|
@@ -131,6 +149,9 @@ export declare const ScatterChartComponent: {
|
|
|
131
149
|
data: () => {
|
|
132
150
|
hasMounted: boolean;
|
|
133
151
|
};
|
|
152
|
+
methods: {
|
|
153
|
+
_init: () => void;
|
|
154
|
+
};
|
|
134
155
|
/** @internal */
|
|
135
156
|
mounted(): void;
|
|
136
157
|
setup(): {
|
|
@@ -151,6 +172,9 @@ export declare const BubbleChartComponent: {
|
|
|
151
172
|
data: () => {
|
|
152
173
|
hasMounted: boolean;
|
|
153
174
|
};
|
|
175
|
+
methods: {
|
|
176
|
+
_init: () => void;
|
|
177
|
+
};
|
|
154
178
|
/** @internal */
|
|
155
179
|
mounted(): void;
|
|
156
180
|
setup(): {
|
|
@@ -171,6 +195,9 @@ export declare const GaugeChartComponent: {
|
|
|
171
195
|
data: () => {
|
|
172
196
|
hasMounted: boolean;
|
|
173
197
|
};
|
|
198
|
+
methods: {
|
|
199
|
+
_init: () => void;
|
|
200
|
+
};
|
|
174
201
|
/** @internal */
|
|
175
202
|
mounted(): void;
|
|
176
203
|
setup(): {
|
|
@@ -219,17 +246,25 @@ export declare const SankeyChartComponent: {
|
|
|
219
246
|
default: boolean;
|
|
220
247
|
};
|
|
221
248
|
};
|
|
222
|
-
data: () =>
|
|
223
|
-
|
|
249
|
+
data: () => any;
|
|
250
|
+
methods: {
|
|
251
|
+
_init: () => void;
|
|
224
252
|
};
|
|
225
253
|
mounted(): void;
|
|
226
254
|
watch: {
|
|
227
255
|
pivot(newVal: string): void;
|
|
256
|
+
csvData(newData: string): void;
|
|
257
|
+
jsonData(newData: VisuallyJsDefaultJSON): void;
|
|
258
|
+
url(newData: string): void;
|
|
259
|
+
options: {
|
|
260
|
+
handler: () => void;
|
|
261
|
+
deep: boolean;
|
|
262
|
+
};
|
|
228
263
|
};
|
|
229
|
-
render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
230
|
-
[key: string]: any;
|
|
231
|
-
}>;
|
|
232
264
|
setup(): {
|
|
233
265
|
service: unknown;
|
|
234
266
|
};
|
|
267
|
+
render: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
268
|
+
[key: string]: any;
|
|
269
|
+
}>;
|
|
235
270
|
};
|
package/definitions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BrowserElement, CanvasDropFilter, DataGeneratorFunction, GroupIdentifierFunction, ObjectData, OnVertexAddedCallback, Size, SurfaceOptions, TypeGeneratorFunction, EdgeMapping, NodeMapping, GroupMapping, PortMapping, ModelOptions, Base, Surface, PointXY, SvgExportUIOptions, ImageExportUIOptions, DiagramCell, PaletteMode, Diagram, PreparedShape, OverlaySpec, AutoEdgeConnectOptions } from "@visuallyjs/browser-ui";
|
|
1
|
+
import { BrowserElement, CanvasDropFilter, DataGeneratorFunction, GroupIdentifierFunction, ObjectData, OnVertexAddedCallback, Size, SurfaceOptions, TypeGeneratorFunction, EdgeMapping, EdgePropertyMappings, PropertyMapping, NodeMapping, GroupMapping, PortMapping, ModelOptions, Base, Surface, PointXY, SvgExportUIOptions, ImageExportUIOptions, DiagramCell, PaletteMode, Diagram, PreparedShape, OverlaySpec, AutoEdgeConnectOptions, Vertex } from "@visuallyjs/browser-ui";
|
|
2
2
|
export declare const DEFAULT_VUE_SURFACE_ID = "surfaceId";
|
|
3
3
|
export declare const DEFAULT_VUE_PAPER_ID = "paperId";
|
|
4
4
|
export declare const PROP_TYPE_FUNCTION = "typeFunction";
|
|
@@ -247,6 +247,10 @@ export declare const COMPONENT_SANKEY_CHART = "SankeyChartComponent";
|
|
|
247
247
|
* inspector component tag
|
|
248
248
|
*/
|
|
249
249
|
export declare const COMPONENT_INSPECTOR = "InspectorComponent";
|
|
250
|
+
/**
|
|
251
|
+
* edge property mappings inspector tag
|
|
252
|
+
*/
|
|
253
|
+
export declare const COMPONENT_EDGE_PROPERTY_MAPPINGS_INSPECTOR = "EdgePropertyMappingsInspector";
|
|
250
254
|
/**
|
|
251
255
|
* surface popup component tag
|
|
252
256
|
*/
|
|
@@ -435,7 +439,7 @@ export interface ShapePaletteComponentProps {
|
|
|
435
439
|
/**
|
|
436
440
|
* Optional function you can use to set some initial data for an element being dragged. Note that you cannot override the object's `type` with this function.
|
|
437
441
|
*/
|
|
438
|
-
dataGenerator?: DataGeneratorFunction
|
|
442
|
+
dataGenerator?: DataGeneratorFunction;
|
|
439
443
|
/**
|
|
440
444
|
* When in tap mode, allow addition of new vertices simply by clicking, instead of requiring a shape be drawn. (When this is true, the drawing method also still works)
|
|
441
445
|
*/
|
|
@@ -631,15 +635,15 @@ export interface PaletteComponentProps {
|
|
|
631
635
|
/**
|
|
632
636
|
* Function to use to get a dataset for an item that is being dragged/has been tapped. If omitted, Visually JS will use a default data generator that extracts data values from any `data-vjs-***` attribute on the element being dragged.
|
|
633
637
|
*/
|
|
634
|
-
dataGenerator?: DataGeneratorFunction
|
|
638
|
+
dataGenerator?: DataGeneratorFunction;
|
|
635
639
|
/**
|
|
636
640
|
* Function to use to get the type of an item that is being dragged/has been tapped.
|
|
637
641
|
*/
|
|
638
|
-
typeGenerator?: TypeGeneratorFunction
|
|
642
|
+
typeGenerator?: TypeGeneratorFunction;
|
|
639
643
|
/**
|
|
640
644
|
* Function to use to determine whether an item that is being dragged/has been tapped represents a group.
|
|
641
645
|
*/
|
|
642
|
-
groupIdentifier?: GroupIdentifierFunction
|
|
646
|
+
groupIdentifier?: GroupIdentifierFunction;
|
|
643
647
|
/**
|
|
644
648
|
* Whether or not to allow drop on edge. Defaults to false.
|
|
645
649
|
*/
|
|
@@ -672,7 +676,7 @@ export interface PaletteComponentProps {
|
|
|
672
676
|
/**
|
|
673
677
|
* Optional filter to test if objects may be dropped on the canvas.
|
|
674
678
|
*/
|
|
675
|
-
canvasDropFilter?: CanvasDropFilter
|
|
679
|
+
canvasDropFilter?: CanvasDropFilter;
|
|
676
680
|
/**
|
|
677
681
|
* The surface to attach to. Optional: this component can derive a surface from a SurfaceProvider or SurfaceComponent. You'll only need this in certain advanced scenarios.
|
|
678
682
|
*/
|
|
@@ -831,3 +835,41 @@ export interface EdgeTypePickerComponentProps {
|
|
|
831
835
|
*/
|
|
832
836
|
propertyName: string;
|
|
833
837
|
}
|
|
838
|
+
/**
|
|
839
|
+
* @group Props
|
|
840
|
+
*/
|
|
841
|
+
export interface EdgePropertyMappingsInspectorProps {
|
|
842
|
+
/**
|
|
843
|
+
* Optional, you can implement this method to return your own names to use for properties in the inspector.
|
|
844
|
+
*/
|
|
845
|
+
getPropertyName?: (pm: PropertyMapping<EdgeMapping>) => string;
|
|
846
|
+
/**
|
|
847
|
+
* Optional, whether or not to show property names. Defaults to true.
|
|
848
|
+
*/
|
|
849
|
+
showName?: boolean;
|
|
850
|
+
/**
|
|
851
|
+
* Optional class name to use on the wrapper div. Defaults to `vjs-inspector-section`.
|
|
852
|
+
*/
|
|
853
|
+
className?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Optional property mappings to render a form for. The default behaviour is to retrieve the property mappings from the inspector context
|
|
856
|
+
*/
|
|
857
|
+
mappings?: EdgePropertyMappings;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* tag for ShapePropertiesInspector
|
|
861
|
+
*/
|
|
862
|
+
export declare const COMPONENT_SHAPE_PROPERTIES_INSPECTOR = "ShapePropertiesInspectorComponent";
|
|
863
|
+
/**
|
|
864
|
+
* @group Props
|
|
865
|
+
*/
|
|
866
|
+
export interface ShapePropertiesInspectorProps {
|
|
867
|
+
/**
|
|
868
|
+
* vertex to inspect
|
|
869
|
+
*/
|
|
870
|
+
vertex: Vertex;
|
|
871
|
+
/**
|
|
872
|
+
* The maximum number of radio buttons to show for a value list before switching to a select dropdown. Defaults to 7.
|
|
873
|
+
*/
|
|
874
|
+
maxRadios?: number;
|
|
875
|
+
}
|
|
@@ -30,7 +30,7 @@ declare const DiagramPaletteComponent: {
|
|
|
30
30
|
};
|
|
31
31
|
onVertexAdded: FunctionConstructor;
|
|
32
32
|
preparedShapes: PropType<Array<PreparedShape>>;
|
|
33
|
-
allowDropOnEdge: PropType<boolean | CanDropOnEdgeFilter
|
|
33
|
+
allowDropOnEdge: PropType<boolean | CanDropOnEdgeFilter>;
|
|
34
34
|
autoEdgeConnect: PropType<boolean | AutoEdgeConnectOptions>;
|
|
35
35
|
showGroups: {
|
|
36
36
|
type: BooleanConstructor;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EdgeMapping, EdgePropertyMappings, Inspector, PropertyMapping } from "@visuallyjs/browser-ui";
|
|
2
|
+
import { InspectorProviderState } from "./inspector-component";
|
|
3
|
+
declare const EdgePropertyMappingsInspectorComponent: {
|
|
4
|
+
name: string;
|
|
5
|
+
props: {
|
|
6
|
+
getPropertyName: FunctionConstructor;
|
|
7
|
+
showName: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
cssClass: StringConstructor;
|
|
12
|
+
mappings: ArrayConstructor;
|
|
13
|
+
};
|
|
14
|
+
setup(): {
|
|
15
|
+
inspectorProvider: InspectorProviderState;
|
|
16
|
+
};
|
|
17
|
+
data(): {
|
|
18
|
+
inspector: Inspector | null;
|
|
19
|
+
};
|
|
20
|
+
mounted(): void;
|
|
21
|
+
methods: {
|
|
22
|
+
resolveMappings(): EdgePropertyMappings;
|
|
23
|
+
toList(pm: PropertyMapping<EdgeMapping>): Array<string>;
|
|
24
|
+
getPropertyKey(pm: PropertyMapping<EdgeMapping>): any;
|
|
25
|
+
getName(pm: PropertyMapping<EdgeMapping>): any;
|
|
26
|
+
};
|
|
27
|
+
render(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
export { EdgePropertyMappingsInspectorComponent };
|
package/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export * from "./visuallyjs-browser-ui-vue";
|
|
|
9
9
|
export * from "./shape-component";
|
|
10
10
|
export * from "./shape-palette-component";
|
|
11
11
|
export * from "./edge-type-picker-component";
|
|
12
|
+
export * from "./edge-property-mappings-inspector-component";
|
|
13
|
+
export * from "./shape-properties-inspector-component";
|
|
12
14
|
export * from "./inspector-component";
|
|
13
15
|
export * from "./definitions";
|
|
14
16
|
export * from "./controls-component";
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@visuallyjs/browser-ui-vue","version":"1.2.
|
|
1
|
+
{"name":"@visuallyjs/browser-ui-vue","version":"1.2.7","description":"VisuallyJS Vue integration","module":"visuallyjs.browser-ui-vue.es.js","main":"visuallyjs.browser-ui-vue.cjs.js","types":"index.d.ts","files":["visuallyjs.browser-ui-vue.es.js","visuallyjs.browser-ui-vue.cjs.js","**/*.d.ts"],"author":"VisuallyJs <hello@visuallyjs.com> (https://visuallyjs.com)","license":"Commercial","dependencies":{"@visuallyjs/browser-ui":"1.2.7"},"homepage":"https://visuallyjs.com/vue","bugs":"https://github.com/visuallyjs/visuallyjs/issues"}
|
package/palette-component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaletteComponentProps } from "./definitions";
|
|
2
2
|
import { PropType } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { CanvasDropFilter, DataGeneratorFunction, GroupIdentifierFunction, OnVertexAddedCallback, PaletteMode, Size, TypeGeneratorFunction, type AutoEdgeConnectOptions, CanDropOnEdgeFilter } from "@visuallyjs/browser-ui";
|
|
4
4
|
export declare const PaletteComponent: {
|
|
5
5
|
setup(props: PaletteComponentProps): {
|
|
6
6
|
service: unknown;
|
|
@@ -14,16 +14,16 @@ export declare const PaletteComponent: {
|
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
};
|
|
16
16
|
dataGenerator: {
|
|
17
|
-
type: PropType<DataGeneratorFunction
|
|
17
|
+
type: PropType<DataGeneratorFunction>;
|
|
18
18
|
};
|
|
19
19
|
typeGenerator: {
|
|
20
|
-
type: PropType<TypeGeneratorFunction
|
|
20
|
+
type: PropType<TypeGeneratorFunction>;
|
|
21
21
|
};
|
|
22
22
|
groupIdentifier: {
|
|
23
|
-
type: PropType<GroupIdentifierFunction
|
|
23
|
+
type: PropType<GroupIdentifierFunction>;
|
|
24
24
|
};
|
|
25
25
|
allowDropOnEdge: {
|
|
26
|
-
type: PropType<boolean | CanDropOnEdgeFilter
|
|
26
|
+
type: PropType<boolean | CanDropOnEdgeFilter>;
|
|
27
27
|
default: boolean;
|
|
28
28
|
};
|
|
29
29
|
allowDropOnCanvas: {
|
|
@@ -44,7 +44,7 @@ export declare const PaletteComponent: {
|
|
|
44
44
|
};
|
|
45
45
|
dragSize: PropType<Size>;
|
|
46
46
|
onVertexAdded: PropType<OnVertexAddedCallback>;
|
|
47
|
-
canvasDropFilter: PropType<CanvasDropFilter
|
|
47
|
+
canvasDropFilter: PropType<CanvasDropFilter>;
|
|
48
48
|
className: StringConstructor;
|
|
49
49
|
mode: PropType<PaletteMode>;
|
|
50
50
|
selectAfterAdd: {
|
package/shape-component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
import { FontSpec, ObjectData } from "@visuallyjs/browser-ui";
|
|
2
|
+
import { FontSpec, LabelPosition, ObjectData } from "@visuallyjs/browser-ui";
|
|
3
3
|
declare const ShapeComponent: {
|
|
4
4
|
name: string;
|
|
5
5
|
props: {
|
|
@@ -17,6 +17,10 @@ declare const ShapeComponent: {
|
|
|
17
17
|
labelStrokeWidth: {
|
|
18
18
|
type: NumberConstructor;
|
|
19
19
|
};
|
|
20
|
+
labelPosition: {
|
|
21
|
+
type: PropType<LabelPosition>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
20
24
|
multilineLabels: {
|
|
21
25
|
type: BooleanConstructor;
|
|
22
26
|
default: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
import { DataGeneratorFunction,
|
|
2
|
+
import { DataGeneratorFunction, PreparedShape, Size, AutoEdgeConnectOptions, CanDropOnEdgeFilter } from "@visuallyjs/browser-ui";
|
|
3
3
|
import { ShapePaletteComponentProps } from "./definitions";
|
|
4
4
|
declare const ShapePaletteComponent: {
|
|
5
5
|
name: string;
|
|
@@ -14,7 +14,7 @@ declare const ShapePaletteComponent: {
|
|
|
14
14
|
showAllMessage: StringConstructor;
|
|
15
15
|
selectAfterDrop: BooleanConstructor;
|
|
16
16
|
paletteStrokeWidth: NumberConstructor;
|
|
17
|
-
dataGenerator: PropType<DataGeneratorFunction
|
|
17
|
+
dataGenerator: PropType<DataGeneratorFunction>;
|
|
18
18
|
initialSet: StringConstructor;
|
|
19
19
|
mode: StringConstructor;
|
|
20
20
|
allowClickToAdd: BooleanConstructor;
|
|
@@ -26,7 +26,7 @@ declare const ShapePaletteComponent: {
|
|
|
26
26
|
};
|
|
27
27
|
updateTypeOnPaletteTap: BooleanConstructor;
|
|
28
28
|
preparedShapes: PropType<Array<PreparedShape>>;
|
|
29
|
-
allowDropOnEdge: PropType<boolean | CanDropOnEdgeFilter
|
|
29
|
+
allowDropOnEdge: PropType<boolean | CanDropOnEdgeFilter>;
|
|
30
30
|
autoEdgeConnect: PropType<boolean | AutoEdgeConnectOptions>;
|
|
31
31
|
showGroups: {
|
|
32
32
|
type: BooleanConstructor;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Inspector } from "@visuallyjs/browser-ui";
|
|
2
|
+
import { InspectorProviderState } from "./inspector-component";
|
|
3
|
+
/**
|
|
4
|
+
* Inspector for the properties of a shape.
|
|
5
|
+
*/
|
|
6
|
+
declare const ShapePropertiesInspectorComponent: {
|
|
7
|
+
name: string;
|
|
8
|
+
props: {
|
|
9
|
+
/**
|
|
10
|
+
* vertex to inspect
|
|
11
|
+
*/
|
|
12
|
+
vertex: ObjectConstructor;
|
|
13
|
+
/**
|
|
14
|
+
* The maximum number of radio buttons to show for a value list before switching to a select dropdown. Defaults to 7.
|
|
15
|
+
*/
|
|
16
|
+
maxRadios: NumberConstructor;
|
|
17
|
+
};
|
|
18
|
+
setup(): {
|
|
19
|
+
inspectorProvider: InspectorProviderState;
|
|
20
|
+
};
|
|
21
|
+
data(): {
|
|
22
|
+
inspector: Inspector | null;
|
|
23
|
+
};
|
|
24
|
+
mounted(): void;
|
|
25
|
+
methods: {
|
|
26
|
+
resolveShapeDef(): import("@visuallyjs/browser-ui").RealisedShapeType;
|
|
27
|
+
};
|
|
28
|
+
render(): any;
|
|
29
|
+
};
|
|
30
|
+
export { ShapePropertiesInspectorComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ze=Object.defineProperty,lr=Object.defineProperties,pr=Object.getOwnPropertyDescriptor,cr=Object.getOwnPropertyDescriptors,ur=Object.getOwnPropertyNames,Bo=Object.getOwnPropertySymbols;var Uo=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable;var Lo=(e,t,o)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,z=(e,t)=>{for(var o in t||(t={}))Uo.call(t,o)&&Lo(e,o,t[o]);if(Bo)for(var o of Bo(t))dr.call(t,o)&&Lo(e,o,t[o]);return e},he=(e,t)=>lr(e,cr(t));var mr=(e,t)=>{for(var o in t)ze(e,o,{get:t[o],enumerable:!0})},hr=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ur(t))!Uo.call(e,s)&&s!==o&&ze(e,s,{get:()=>t[s],enumerable:!(r=pr(t,s))||r.enumerable});return e};var fr=e=>hr(ze({},"__esModule",{value:!0}),e);var wr={};mr(wr,{$initialiseVueOverlays:()=>We,AreaChartComponent:()=>at,BackgroundComponent:()=>wo,BarChartComponent:()=>rt,BaseOverlayComponent:()=>yo,BrowserUIVueModel:()=>A,BubbleChartComponent:()=>pt,CLASS_VUE_GROUP:()=>lo,CLASS_VUE_NODE:()=>ao,CLASS_VUE_OVERLAY:()=>po,COMPONENT_AREA_CHART:()=>Ue,COMPONENT_BACKGROUND:()=>_e,COMPONENT_BAR_CHART:()=>Ve,COMPONENT_BUBBLE_CHART:()=>Fe,COMPONENT_COLUMN_CHART:()=>Me,COMPONENT_CONTROLS:()=>De,COMPONENT_DIAGRAM:()=>we,COMPONENT_DIAGRAM_PALETTE:()=>be,COMPONENT_DIAGRAM_PROVIDER:()=>mo,COMPONENT_EXPORT_CONTROLS:()=>Ie,COMPONENT_GAUGE_CHART:()=>je,COMPONENT_GRID_BACKGROUND:()=>ge,COMPONENT_IMAGE_BACKGROUND:()=>Se,COMPONENT_INSPECTOR:()=>$e,COMPONENT_LINE_CHART:()=>Le,COMPONENT_MINIVIEW:()=>Re,COMPONENT_PALETTE:()=>xe,COMPONENT_PAPER:()=>Ne,COMPONENT_PAPER_PROVIDER:()=>uo,COMPONENT_PIE_CHART:()=>Ge,COMPONENT_SANKEY_CHART:()=>He,COMPONENT_SCATTER_CHART:()=>ke,COMPONENT_SURFACE:()=>Ae,COMPONENT_SURFACE_POPUP:()=>ho,COMPONENT_SURFACE_PROVIDER:()=>co,COMPONENT_TILED_IMAGE_BACKGROUND:()=>ve,COMPONENT_XY_CHART:()=>Be,ColorPickerComponent:()=>Io,ColumnChartComponent:()=>ot,ControlsComponent:()=>Ro,DEFAULT_SHAPE_HEIGHT:()=>io,DEFAULT_SHAPE_WIDTH:()=>no,DEFAULT_VUE_PAPER_ID:()=>At,DEFAULT_VUE_SURFACE_ID:()=>Rt,DecoratorComponent:()=>yt,DiagramComponent:()=>xo,DiagramPaletteComponent:()=>_t,DiagramProvider:()=>Tt,EVENT_VERTEX_UPDATED:()=>Fo,EVENT_VERTICES_RENDERED:()=>Qe,EdgeTypePickerComponent:()=>Ct,ExportControlsComponent:()=>Ao,GaugeChartComponent:()=>ct,GridBackgroundComponent:()=>bo,ImageBackgroundComponent:()=>Mo,InspectorComponent:()=>Pt,InspectorGetterSymbol:()=>ae,InspectorSetterSymbol:()=>Zo,LineChartComponent:()=>st,MiniviewComponent:()=>No,PROP_ACTIVE_TRACKING:()=>It,PROP_ALLOW_CLICK_TO_ADD:()=>qt,PROP_ALLOW_DROP_ON_CANVAS:()=>Wt,PROP_ALLOW_DROP_ON_EDGE:()=>$t,PROP_ALLOW_DROP_ON_GROUP:()=>zt,PROP_ALLOW_DROP_ON_NODE:()=>Kt,PROP_ALLOW_ROTATION:()=>Qt,PROP_AUTO_EDGE_CONNECT:()=>to,PROP_CANVAS_DROP_FILTER:()=>ro,PROP_CLASS_NAME:()=>K,PROP_CLICK_TO_ADD_ONLY:()=>Zt,PROP_CLICK_TO_CENTER:()=>xt,PROP_CSV_DATA:()=>Lt,PROP_DATA:()=>D,PROP_DATA_GENERATOR:()=>Ft,PROP_DATA_SOURCE_FILTER:()=>Je,PROP_DATA_TYPE:()=>Ee,PROP_DRAG_SIZE:()=>oo,PROP_GROUP_IDENTIFIER:()=>Ht,PROP_ID:()=>Pr,PROP_IGNORE_DROP_ON_NODE:()=>Jt,PROP_INTERACTIVE:()=>Vt,PROP_JSON_DATA:()=>Ut,PROP_MODE:()=>Mt,PROP_MODEL:()=>Oe,PROP_MODEL_OPTIONS:()=>J,PROP_ON_VERTEX_ADDED:()=>Yt,PROP_OPTIONS:()=>Q,PROP_PAPER_ID:()=>bt,PROP_PIVOT:()=>Bt,PROP_RENDER_OPTIONS:()=>fe,PROP_ROTATION_SPEED:()=>eo,PROP_SELECTOR:()=>kt,PROP_SELECT_AFTER_ADD:()=>Xt,PROP_SHOW_LASSO:()=>Dt,PROP_SURFACE_ID:()=>k,PROP_TRACK_SELECTION:()=>wt,PROP_TYPE_FUNCTION:()=>Nt,PROP_TYPE_GENERATOR:()=>jt,PROP_URL:()=>I,PROP_USE_MODEL:()=>Gt,PROP_VIEW_OPTIONS:()=>Pe,PaletteComponent:()=>Do,PaperComponent:()=>So,PaperProvider:()=>mt,PieChartComponent:()=>it,SankeyChartComponent:()=>ut,ScatterChartComponent:()=>lt,ShapeComponent:()=>ht,ShapePaletteComponent:()=>Ot,SurfaceComponent:()=>go,SurfacePopup:()=>gt,SurfaceProvider:()=>dt,TAG_COLOR_PICKER:()=>so,TAG_DECORATOR:()=>fo,TAG_EDGE_TYPE_PICKER:()=>Te,TAG_SHAPE:()=>Ce,TAG_SHAPE_PALETTE:()=>ye,TiledImageBackgroundComponent:()=>Vo,VisuallyJsPlugin:()=>Rr,VisuallyJsService:()=>w,VisuallyJsServiceKey:()=>a,XYChartComponent:()=>nt,addPaper:()=>_o,addSurface:()=>To,bindToDevLifecycle:()=>Er,doProvideInspector:()=>qo,newInstance:()=>Or,useDiagram:()=>Dr,usePaper:()=>Ir,useSurface:()=>xr,useVisuallyJsUpdate:()=>Nr,useZoom:()=>Ar,vertexHasRendered:()=>Oo,vertexHasUpdated:()=>Po,vertexWillRender:()=>jo});module.exports=fr(wr);var Ke=require("@visuallyjs/browser-ui"),A=class extends Ke.BrowserUIModel{render(t,o){return(0,Ke.log)("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function Or(e){return e=e||{},new A(e)}var Rt="surfaceId",At="paperId",Nt="typeFunction",xt="clickToCenter",Dt="showLasso",It="activeTracking",wt="trackSelection",k="surfaceId",bt="paperId",K="className",D="data",Mt="mode",Q="options",fe="renderOptions",J="modelOptions",Oe="model",Pe="viewOptions",I="url",Ee="dataType",Vt="interactive",Bt="pivot",Je="dataSourceFilter",Lt="csvData",Ut="jsonData",Gt="useModel",Pr="id",kt="selector",Ft="dataGenerator",jt="typeGenerator",Ht="groupIdentifier",$t="allowDropOnEdge",Wt="allowDropOnCanvas",zt="allowDropOnGroup",Kt="allowDropOnNode",Jt="ignoreDropOnNode",Yt="onVertexAdded",Xt="selectAfterAdd",Zt="clickToAddOnly",qt="allowClickToAdd",Qt="allowRotation",eo="rotationSpeed",to="autoEdgeConnect",oo="dragSize",ro="canvasDropFilter",Ce="Shape",ye="ShapePalette",no=120,io=90,Te="EdgeTypePickerComponent",so="ColorPickerComponent",ao="vjs-vue-node",lo="vjs-vue-group",po="vjs-vue-overlay",_e="BackgroundComponent",ge="GridBackgroundComponent",Se="ImageBackgroundComponent",ve="TiledImageBackgroundComponent",Re="MiniviewComponent",Ae="SurfaceComponent",co="SurfaceProvider",Ne="PaperComponent",uo="PaperProvider",mo="DiagramProvider",xe="PaletteComponent",De="ControlsComponent",Ie="ExportControlsComponent",we="DiagramComponent",be="DiagramPaletteComponent",Me="ColumnChartComponent",Ve="BarChartComponent",Be="XYChartComponent",Le="LineChartComponent",Ue="AreaChartComponent",Ge="PieChartComponent",ke="ScatterChartComponent",Fe="BubbleChartComponent",je="GaugeChartComponent",He="SankeyChartComponent",$e="InspectorComponent",ho="SurfacePopup",fo="Decorator";var F=require("@visuallyjs/browser-ui"),Ye={props:{data:Object,model:A,obj:F.Vertex,vertex:F.Vertex,ui:F.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=(0,F.isGroup)(e.vertex)?lo:ao;e.el.firstElementChild&&(0,F.addClass)(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),Oo(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),Po(this.ui.id,this.vertex)}};var Go={mixins:[Ye],methods:{getNode:function(){return this.obj},removeNode:function(){this.model.removeNode(this.getNode())},updateNode:function(e){this.model.updateNode(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}}};var ko={methods:{getGroup:function(){return this.obj},removeGroup:function(e){this.model.removeGroup(this.obj,e)},updateGroup:function(e){this.model.updateGroup(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}},mixins:[Ye]};var N=require("vue"),d=require("@visuallyjs/browser-ui"),Eo=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new d.OptimisticEventGenerator;this.hasRendered=!1}vertexWillRender(t){this.unrenderedVertices.set(t.id,t),this.hasRendered=!1}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&(this.hasRendered=!0,this.eventManager.fire(Qe))}vertexHasUpdated(t){this.eventManager.fire(Fo,t)}},Qe="vertices:rendered",Fo="vertex:updated",Co=new Map;function Xe(e){return Co.has(e)||Co.set(e,new Eo),Co.get(e)}function Oo(e,t){Xe(e).vertexHasRendered(t)}function Po(e,t){Xe(e).vertexHasUpdated(t)}function jo(e,t){Xe(e).vertexWillRender(t)}function Er(e,t,o){let r=Xe(e);r&&(r.eventManager.bind(t,o),t===Qe&&r.hasRendered&&r.eventManager.fire(Qe))}var Ze=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},yo={props:{data:Object,model:A,obj:d.Edge,edge:d.Edge,overlay:d.Overlay,ui:d.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&(0,d.addClass)(e.el.firstElementChild,po)},updated(){this.ui.$revalidateElement(this.el)}},qe=(e,t,o,r,s,c,n,l,p)=>{let f=n.component!=null,m=(0,d.isGroup)(l),T=[];f||T.push(m?d.CLASS_DEFAULT_GROUP:d.CLASS_DEFAULT_NODE);let C=f?n.component:{render(g){return g.data.label||""}};if(C){let g=document.createElement(d.ELEMENT_DIV);(0,d.updateClasses)(g,T),C.mixins==null&&(C.mixins=[]);let R=m?ko:Go;C.mixins.find(G=>G===R)||C.mixins.push(R),jo(c.id,l);let q={data:o,model:(0,N.markRaw)(r),ui:(0,N.markRaw)(c),obj:(0,N.markRaw)(l),vertex:(0,N.markRaw)(l),el:g,def:(0,N.markRaw)(n),eventInfo:p==null?null:(0,N.markRaw)(p)};if(n.inject)for(let G in n.inject){let W=n.inject[G],ar=typeof W=="function"?W(l,r):W;q[G]=ar}e.push({component:(0,N.markRaw)(C),el:g,t:l.getFullId(),props:q,vertex:l})}};function To(e,t,o,r,s,c){let n={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(p,f,m,T)=>{},render:(p,f,m,T,C,g,R,H)=>qe(r,p,f,m,T,C,g,R,H),cleanupVertex:Ze,cleanupPort:Ze,rerender:(p,f,m,T,C,g,R,H,q)=>{let G=r.findIndex(W=>W.vertex===R);G!=null&&r.splice(G,1)[0].el,C.$__unmanage(q,!0,!0),requestAnimationFrame(()=>{qe(r,p,f,m,T,C,g,R,H)})}},l=(0,d.extend)(s||{},{view:c||{},id:t});return(0,d.renderSurface)(e,o,n,l)}function _o(e,t,o,r,s,c){let n={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(p,f,m,T)=>{},render:(p,f,m,T,C,g,R,H)=>qe(r,p,f,m,T,C,g,R,H),cleanupVertex:Ze,cleanupPort:Ze,rerender:(p,f,m,T,C,g,R,H,q)=>{let G=r.findIndex(W=>W.vertex===R);G!=null&&r.splice(G,1)[0].el,C.$__unmanage(q,!0,!0),requestAnimationFrame(()=>{qe(r,p,f,m,T,C,g,R,H)})}},l=(0,d.extend)(s||{},{view:c||{},id:t});return(0,d.renderPaper)(e,o,n,l)}function We(e,t,o,r){if(e.edges)for(let s in e.edges){let c=e.edges[s];c.overlays&&(c.overlays=c.overlays.map(n=>{let l={};return n.component!=null?{type:d.OVERLAY_TYPE_CUSTOM,options:{create:f=>{let m=document.createElement(d.ELEMENT_DIV),T=(0,d.uuid)();n.component.mixins==null&&(n.component.mixins=[]),n.component.mixins.indexOf(yo)===-1&&n.component.mixins.push(yo);let C=z({data:f.edge.data,model:(0,N.markRaw)(o()),ui:(0,N.markRaw)(t()),obj:f.edge,edge:f.edge,el:m,def:(0,N.markRaw)(n),eventInfo:null,overlay:n},l);return r.push({component:(0,N.markRaw)(n.component),el:m,t:T,props:C}),m}}}:n}))}}var Y=require("@visuallyjs/browser-ui"),ee=require("vue"),a=Symbol.for("visuallyjs-service"),w=class{constructor(t){this.context=t;this.s=[];this.a=[];this.l=[];this.p=[];this.surface=(0,ee.shallowRef)(null);this.model=(0,ee.shallowRef)(null);this.paper=(0,ee.shallowRef)(null);this.diagram=(0,ee.shallowRef)(null);this.ui=(0,ee.shallowRef)(null)}getSurface(t){this.o(this.a,t,this.c)}getDiagram(t){this.o(this.l,t,this.u)}getPaper(t){this.o(this.p,t,this.m)}getModel(t){this.o(this.s,t,this.n)}getModelDirect(){return this.n}o(t,o,r){if(r!=null)try{o(r)}catch(s){(0,Y.log)(`WARN: could not dispatch ${s}`)}else t.push(o)}setSurface(t){this.surface.value=t,this.model.value=t.model,this.ui.value=t,this.c=t,this.i(t.model),this.r(this.a,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.u=t,this.i(t.model),t.$ui instanceof Y.Surface?this.setSurface(t.$ui):t.$ui instanceof Y.Paper&&this.setPaper(t.$ui),this.r(this.l,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.m=t,this.i(t.model),this.r(this.p,t)}i(t){this.n=t,this.r(this.s,t)}r(t,o){t.forEach(r=>{try{r(o)}catch(s){(0,Y.log)(`WARN: could not flush all queue entries ${s}`)}})}};var b=require("vue"),O=require("@visuallyjs/browser-ui"),go={setup(e){return{service:(0,b.inject)(a),surfaceId:e.surfaceId||Rt}},name:Ae,props:{[D]:{type:Object},[fe]:{type:Object},[J]:{type:Object},[Pe]:{type:Object},[Oe]:{type:Object},[I]:{type:String},[Ee]:{type:String},[k]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new A(this.modelOptions||{}),o=this.$refs.root;e.e=!1;let r=(0,O.clone)(this.viewOptions||{});We(r,()=>this.surface,()=>t,this.overlays),this.surface=To(t,this.surfaceId,o,this.vertices,(0,O.clone)(this.renderOptions||{}),r),this.service.setSurface(this.surface);let s=(n,l)=>{let p=()=>{let m={};return l.originalData||l.updates?m=Object.assign(l.originalData,l.updates):l.newData&&Object.assign(m,l.newData),m},f=this.vertices.find(m=>m.t===n);f!=null&&(f.props.data=p())},c=n=>{let l=this.vertices.findIndex(p=>p.t===n);l!==-1&&this.vertices.splice(l,1)};t.bind(O.EVENT_NODE_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(O.EVENT_GROUP_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(O.EVENT_NODE_REMOVED,n=>{c(n.node.id)}),t.bind(O.EVENT_GROUP_REMOVED,n=>{c(n.group.id)}),t.bind(O.EVENT_EDGE_UPDATED,n=>{let l=n.edge.id;this.overlays.forEach(p=>{p.props.edge&&p.props.edge.id===l&&(p.props.data=n.edge.data)})}),t.bind(O.EVENT_EDGE_REMOVED,n=>{let l=n.edge.id,p=this.overlays.length-1;for(;p>=0;)this.overlays[p].props.edge&&this.overlays[p].props.edge.id===l&&this.overlays.splice(p,1),p--}),t.bind(O.EVENT_GRAPH_CLEARED,()=>{this.vertices.length=0,this.overlays.length=0}),this.surface.bind(O.EVENT_RENDER_END,()=>setTimeout(()=>this.surface.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[D]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({data:e,dataType:this.dataType})}))}},[I]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>(0,b.h)(b.Teleport,{to:t.el,key:t.t},[(0,b.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,b.h)(b.Teleport,{to:t.el,key:t.t},[(0,b.h)(t.component,t.props)]))}),(0,b.h)(O.ELEMENT_DIV,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var M=require("vue"),P=require("@visuallyjs/browser-ui"),So={setup(e){return{service:(0,M.inject)(a),paperId:e.paperId||At}},name:Ne,props:{[D]:{type:Object},[fe]:{type:Object},[J]:{type:Object},[Pe]:{type:Object},[Oe]:{type:Object},[I]:{type:String},[Ee]:{type:String},[bt]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new A(this.modelOptions||{}),o=this.$refs.root;e.e=!1;let r=(0,P.clone)(this.viewOptions||{});We(r,()=>this.paper,()=>t,this.overlays),this.paper=_o(t,this.paperId,o,this.vertices,(0,P.clone)(this.renderOptions||{}),r),this.service.setPaper(this.paper);let s=(n,l)=>{let p=()=>{let m={};return l.originalData||l.updates?m=Object.assign(l.originalData,l.updates):l.newData&&Object.assign(m,l.newData),m},f=this.vertices.find(m=>m.t===n);f!=null&&(f.props.data=p())},c=n=>{let l=this.vertices.findIndex(p=>p.t===n);l!==-1&&this.vertices.splice(l,1)};t.bind(P.EVENT_NODE_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(P.EVENT_GROUP_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(P.EVENT_NODE_REMOVED,n=>{c(n.node.id)}),t.bind(P.EVENT_GROUP_REMOVED,n=>{c(n.group.id)}),t.bind(P.EVENT_EDGE_UPDATED,n=>{let l=n.edge.id;this.overlays.forEach(p=>{p.props.edge&&p.props.edge.id===l&&(p.props.data=n.edge.data)})}),t.bind(P.EVENT_EDGE_REMOVED,n=>{let l=n.edge.id,p=this.overlays.length-1;for(;p>=0;)this.overlays[p].props.edge&&this.overlays[p].props.edge.id===l&&this.overlays.splice(p,1),p--}),t.bind(P.EVENT_GRAPH_CLEARED,()=>{this.vertices.length=0,this.overlays.length=0}),this.paper.bind(P.EVENT_RENDER_END,()=>setTimeout(()=>this.paper.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[D]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({data:e,dataType:this.dataType})}))}},[I]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>(0,M.h)(M.Teleport,{to:t.el,key:t.t},[(0,M.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,M.h)(M.Teleport,{to:t.el,key:t.t},[(0,M.h)(t.component,t.props)]))}),(0,M.h)(P.ELEMENT_DIV,{ref:"root",class:"vjs-vue-paper",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var u=require("vue"),i=require("@visuallyjs/browser-ui"),Cr="Clear dataset?",vo="vjs-selected-mode",Ho="can-undo",$o="can-redo",yr="data-undo",Tr="data-redo",Wo="data-mode",_r="data-reset",gr="data-clear",Sr="data-zoom-in",vr="data-zoom-out",zo="vjs-controls-has-selection",Ro={setup(e){return{service:(0,u.inject)(a)}},name:De,props:{clear:{type:Boolean,default:!0},[k]:{type:String},undoRedo:{type:Boolean,default:!0},orientation:{type:String,default:"row"},zoomToExtents:{type:Boolean,default:!0},zoomButtons:{type:Boolean,default:!1},clearMessage:{type:String,default:Cr},onMaybeClear:{type:Function},className:{type:String,default:""}},methods:{panMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(i.SURFACE_MODE_PAN)},selectMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(i.SURFACE_MODE_SELECT)},zoomToFit:function(){var e;(e=this.service.surface.value)==null||e.zoomToFit()},doClear:function(){let e=this.service.surface.value;e&&(this.onMaybeClear!=null?this.onMaybeClear(()=>e.model.clear()):window.confirm(this.clearMessage)&&e.model.clear())},undo:function(){var e;(e=this.service.model.value)==null||e.undo()},redo:function(){var e;(e=this.service.model.value)==null||e.redo()},zoomIn:function(){var e;(e=this.service.surface.value)==null||e.zoomIn()},zoomOut:function(){var e;(e=this.service.surface.value)==null||e.zoomOut()},resetSelection(){let e=this.service.surface.value;e&&(e.model.clearSelection(),(0,i.supportsPathEditing)(e)&&e.stopEditingPath())},updateSelectionState:function(){let e=this.service.surface.value;e&&(e.model.getSelection().isEmpty()?this.$refs.root.removeAttribute(zo):this.$refs.root.setAttribute(zo,"true"))}},data:function(){return{ready:!1,hasLasso:!1}},render(){if(this.ready){let e=[];return this.showPan&&(e.push((0,u.h)("i",{class:`vjs-pan-mode ${vo}`,[Wo]:i.SURFACE_MODE_PAN,onClick:()=>this.panMode(),title:"Pan mode"},[(0,u.h)("svg",{viewBox:i.PAN_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,u.h)("path",{d:i.PAN_PATH})])])),e.push((0,u.h)("i",{class:"vjs-select-mode",[Wo]:i.SURFACE_MODE_SELECT,onClick:()=>this.selectMode(),title:"Select mode"},[(0,u.h)("svg",{viewBox:i.LASSO_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.LASSO_PATH})])]))),this.undoRedo&&(e.push((0,u.h)("i",{class:"vjs-undo",[yr]:!0,title:"Undo last action",onClick:()=>this.undo()},[(0,u.h)("svg",{viewBox:i.UNDO_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,u.h)("path",{d:i.UNDO_PATH,"stroke-width":2})])])),e.push((0,u.h)("i",{class:"vjs-redo",[Tr]:!0,title:"Redo last action",onClick:()=>this.redo()},[(0,u.h)("svg",{viewBox:i.REDO_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,u.h)("path",{d:i.REDO_PATH,"stroke-width":2})])]))),this.zoomToExtents&&e.push((0,u.h)("i",{class:"vjs-zoom-to-fit",[_r]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[(0,u.h)("svg",{viewBox:i.ZOOM_TO_FIT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.ZOOM_TO_FIT_PATH})])])),this.zoomButtons&&(e.push((0,u.h)("i",{class:"vjs-zoom-in",[Sr]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[(0,u.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.ZOOM_IN_PATH})])])),e.push((0,u.h)("i",{class:"vjs-zoom-out",[vr]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[(0,u.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.ZOOM_OUT_PATH})])]))),e.push((0,u.h)("i",{class:i.CLASS_CONTROLS_RESET_SELECTION,[i.ATTRIBUTE_RESET_SELECTION]:"true",onClick:()=>{this.resetSelection()}},[(0,u.h)("svg",{viewBox:i.RESET_SELECTION_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.RESET_SELECTION_PATH})])])),this.clear&&e.push((0,u.h)("i",{class:"vjs-clear-dataset",[gr]:"true",onClick:()=>{this.doClear()}},[(0,u.h)("svg",{viewBox:i.CLEAR_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.CLEAR_PATH})])])),(0,u.h)(i.ELEMENT_DIV,{class:`vjs-controls ${this.className}`,ref:"root",[Ho]:!1,[$o]:!1,[i.ATTRIBUTE_CONTROLS_ORIENTATION]:this.orientation},e)}else return(0,u.h)(i.ELEMENT_DIV,{ref:"root"})},mounted(){let e=t=>{let o=t.getPlugin(i.LassoPlugin.type);this.showPan=o!=null,t.bind(i.EVENT_SURFACE_MODE_CHANGED,r=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),vo),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+r+"']"),vo)}),t.model.bind(i.EVENT_UNDOREDO_UPDATE,r=>{this.$refs.root.setAttribute(Ho,r.undoCount>0?i.TRUE:i.FALSE),this.$refs.root.setAttribute($o,r.redoCount>0?i.TRUE:i.FALSE)}),t.model.bind(i.EVENT_SELECT,()=>this.updateSelectionState()),t.model.bind(i.EVENT_DESELECT,()=>this.updateSelectionState()),t.model.bind(i.EVENT_SELECTION_CLEARED,()=>this.updateSelectionState()),this.ready=!0};this.service.surface.value==null?(0,u.watch)(this.service.surface,e):e(this.service.surface.value)}};var V=require("vue"),y=require("@visuallyjs/browser-ui"),Ao={name:Ie,setup(e){return{service:(0,V.inject)(a)}},props:{surfaceId:{type:String},showLabel:{type:Boolean,default:!0},label:{type:String,default:"Export :"},margins:{type:Object},svgOptions:{type:Object},imageOptions:{type:Object},allowSvgExport:{type:Boolean,default:!0},allowPngExport:{type:Boolean,default:!0},allowJpgExport:{type:Boolean,default:!0}},methods:{loadSurface:function(e){let t=this.service.surface.value;t&&e(t)},exportSVG:function(){this.loadSurface(e=>{let t=this.svgOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new y.SvgExportUI(e).export(t)})},exportJPG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),t.type="image/jpeg",new y.ImageExportUI(e).export(t)})},exportPNG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new y.ImageExportUI(e).export(t)})}},render(){let e=this.showLabel!==!1,t=this.allowSvgExport!==!1,o=this.allowPngExport!==!1,r=this.allowJpgExport!==!1,s=[];return t&&s.push((0,V.h)("i",{},[(0,V.h)("a",{href:"#","data-type":y.TYPE_SVG,onClick:()=>this.exportSVG()},"SVG")])),o&&s.push((0,V.h)("i",{},[(0,V.h)("a",{href:"#","data-type":y.TYPE_PNG,onClick:()=>this.exportPNG()},"PNG")])),r&&s.push((0,V.h)("i",{},[(0,V.h)("a",{href:"#","data-type":y.TYPE_JPG,onClick:()=>this.exportJPG()},"JPG")])),e&&s.unshift((0,V.h)("span",{},[this.label])),(0,V.h)(y.ELEMENT_DIV,{class:`${y.CLASS_CONTROLS} ${y.CLASS_EXPORT_CONTROLS}`},s)}};var X=require("vue"),et=require("@visuallyjs/browser-ui"),No={setup(e){return{service:(0,X.inject)(a)}},name:Re,props:{[k]:{type:String},[K]:{type:String,default:""},[It]:{type:Boolean,default:!0},[xt]:{type:Boolean,default:!0},[Dt]:{type:Boolean,default:!0},[wt]:{type:Boolean,default:!0},[Nt]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:et.MiniviewPlugin.type,options:{container:this.$el,activeTracking:this.activeTracking,clickToCenter:this.clickToCenter,showLasso:this.showLasso,trackSelection:this.trackSelection,typeFunction:this.typeFunction}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,X.watch)(this.service.surface,e),(0,X.watch)(this.service.paper,e))},render:function(e){return(0,X.h)(et.ELEMENT_DIV,{ref:"root",class:e.className})}};var te=require("vue"),tt=require("@visuallyjs/browser-ui"),xo={setup(e){return{service:(0,te.inject)(a)}},name:we,props:{[D]:{type:Object},[I]:{type:String},[J]:{type:Object},[Q]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=(0,te.markRaw)((0,tt.createDiagram)(e,this.options,this.modelOptions)),this.service.setDiagram(this.diagram),this.data?this.diagram.load({data:this.data}):this.url&&this.diagram.load({url:this.url})},render:function(){return(0,te.h)(tt.ELEMENT_DIV,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var $=require("vue"),h=require("@visuallyjs/browser-ui"),Ko={[K]:{type:String},[D]:{type:Object},[I]:{type:String},[Gt]:{type:Boolean,default:!1}},Jo={setup(){return{service:(0,$.inject)(a)}},render:function(){return(0,$.h)(h.ELEMENT_DIV,{class:`${this.className}`,ref:"root"})}};function j(e,t,o=!0){let r=he(z({},Ko),{[Q]:{type:Object}}),s={};return o&&(r[Je]={type:Function},s[Je]=function(c){this.chart.setDataSourceFilter(c)}),he(z({},Jo),{name:e,props:r,watch:s,data:()=>({hasMounted:!1}),mounted(){let c=this.$refs.root,n=o?Object.assign({dataSourceFilter:this.dataSourceFilter},this.options):this.options;this.data&&(n.data=this.data),this.url&&(n.url=this.url);let l=()=>{this.hasMounted=!0,this.chart=new t(c,n)};this.useModel?this.service.model.value!=null?(n.dataSource=this.service.model.value,l()):(0,$.watch)(this.service.model,p=>{this.hasMounted||(n.dataSource=p,l())}):l()}})}var ot=j(Me,h.ColumnChart),rt=j(Ve,h.BarChart),nt=j(Be,h.CategoryValueChart,!1),it=j(Ge,h.PieChart),st=j(Le,h.LineChart),at=j(Ue,h.AreaChart),lt=j(ke,h.ScatterChart),pt=j(Fe,h.BubbleChart),ct=j(je,h.GaugeChart,!1),ut=he(z({},Jo),{name:He,props:he(z({},Ko),{[Lt]:{type:String},[Ut]:{type:Object},[Vt]:{type:Boolean},[Bt]:{type:String},[Q]:{type:Object}}),data:()=>({hasMounted:!1}),mounted(){let e=this.$refs.root,t=Object.assign({},this.options);this.interactive!=null&&(t.interactive=this.interactive),this.pivot!=null&&(t.pivot=this.pivot),this.csvData&&(t.csvData=this.csvData),this.jsonData&&(t.jsonData=this.jsonData),this.url&&(t.url=this.url);let o=()=>{this.hasMounted=!1,this.chart=new h.SankeyChart(e,t)};if(this.useModel){let r=s=>{this.hasMounted||(t.dataSource=s,o())};this.service.model.value==null?(0,$.watch)(this.service.model,r):r(this.service.model.value)}else o()},watch:{pivot(e){this.chart&&this.chart.pivot(e)}},render:function(){return(0,$.h)(h.ELEMENT_DIV,{class:`${this.className}`,ref:"root"})}});var oe=require("vue"),re=require("@visuallyjs/browser-ui"),Do={setup(e){return{service:(0,oe.inject)(a)}},name:xe,props:{[k]:{type:String},[kt]:{type:String},[Ft]:{type:Function},[jt]:{type:Function},[Ht]:{type:Function},[$t]:{type:[Boolean,Function],default:!1},[Wt]:{type:Boolean,default:!0},[zt]:{type:Boolean,default:!0},[Kt]:{type:Boolean,default:!1},[Jt]:{type:Boolean,default:!1},[oo]:Object,[Yt]:Function,[ro]:Function,[K]:String,[Mt]:String,[Xt]:{type:Boolean,default:!1},[qt]:{type:Boolean,default:!1},[Zt]:{type:Boolean,default:!1},[Qt]:{type:Boolean,default:!0},[eo]:{type:Number,default:2e3},[to]:{type:[Boolean,Object],default:!1}},mounted:function(){let e=t=>{let o={source:this.$refs.root,selector:this.selector,dataGenerator:r=>this.dataGenerator?this.dataGenerator(r):(0,re.defaultDataGenerator)(r),allowDropOnEdge:this.allowDropOnEdge===!0,allowDropOnGroup:this.allowDropOnGroup!==!1,allowDropOnCanvas:this.allowDropOnCanvas!==!1,allowDropOnNode:this.allowDropOnNode===!0,ignoreDropOnNode:this.ignoreDropOnNode===!0,canvasDropFilter:this.canvasDropFilter,onVertexAdded:this.onVertexAdded,dragSize:this.dragSize,mode:this.mode,allowRotation:this.allowRotation!==!1,rotationSpeed:this.rotationSpeed||2e3,autoEdgeConnect:this.autoEdgeConnect};this.groupIdentifier!=null&&(o.groupIdentifier=this.groupIdentifier),this.typeGenerator!=null&&(o.typeGenerator=this.typeGenerator),this.palette=new re.Palette(t,o)};this.service.surface.value==null?(0,oe.watch)(this.service.surface,e):e(this.service.surface.value)},render:function(){return(0,oe.h)(re.ELEMENT_DIV,{ref:"root",class:this.className||""},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var Yo=require("vue"),dt={setup(){(0,Yo.provide)(a,new w("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var Xo=require("vue"),mt={setup(){(0,Xo.provide)(a,new w("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ne=require("vue"),B=require("@visuallyjs/browser-ui"),ht={name:Ce,props:{data:{type:Object},showLabels:{type:Boolean,default:!1},labelProperty:{type:String,default:"label"},labelStrokeWidth:{type:Number},multilineLabels:{type:Boolean,default:!0},labelFillRatio:{type:Number,default:B.DEFAULT_LABEL_FILL_RATIO},labelColor:{type:String,default:"#000000"},font:{type:Object}},setup(){return{service:(0,ne.inject)(a)}},mounted(){let e=t=>{let o=t.getShapeLibrary(),r=o.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.appendChild(r),this.showLabels){let s=o.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(s),this.multilineLabels!=!1&&(0,B.convertToMultilineText)(s,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||B.DEFAULT_LABEL_FILL_RATIO))}};this.service.ui.value==null?(0,ne.watch)(this.service.ui,e):e(this.service.ui.value)},updated(){let e=this.service.surface.value;if(e){let t=e.getShapeLibrary(),o=t.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.replaceChildren(o),this.showLabels){let r=t.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(r),this.multilineLabels!=!1&&(0,B.convertToMultilineText)(r,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||B.DEFAULT_LABEL_FILL_RATIO))}}},render:function(){return(0,ne.h)(B.ELEMENT_SVG,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:B.CLASS_SHAPE})},methods:{getWidth:function(){return this.data.width||no},getHeight:function(){return this.data.height||io},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};var ie=require("vue"),ft=require("@visuallyjs/browser-ui"),Ot={name:ye,props:{surfaceId:{type:String},dragSize:Object,iconSize:Object,fill:String,outline:String,showAllMessage:String,selectAfterDrop:Boolean,paletteStrokeWidth:Number,dataGenerator:Function,initialSet:String,mode:String,allowClickToAdd:Boolean,onVertexAdded:Function,showLabels:Boolean,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:(0,ie.inject)(a)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new ft.ShapePalette(t,{container:this.$refs.container,shapeLibrary:t.getShapeLibrary(),dragSize:this.dragSize,iconSize:this.iconSize,fill:this.fill,outline:this.outline,showAllMessage:this.showAllMessage,selectAfterDrop:this.selectAfterDrop,paletteStrokeWidth:this.paletteStrokeWidth,dataGenerator:this.dataGenerator,initialSet:this.initialSet,mode:this.mode,allowClickToAdd:this.allowClickToAdd,onVertexAdded:this.onVertexAdded,showLabels:this.showLabels,inspector:this.inspector,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.service.surface.value==null?(0,ie.watch)(this.service.surface,e):e(this.service.surface.value)},render:function(){return(0,ie.h)(ft.ELEMENT_DIV,{ref:"container"})}};var L=require("vue"),se=require("@visuallyjs/browser-ui"),ae=Symbol.for("VueInspectorGetter"),Zo=Symbol.for("VueInspectorSetter");function qo(){let e=[],t=null;function o(c){try{c(t)}catch(n){(0,se.log)("WARN: inspector listener threw an exception",n)}}let r={listen:c=>{t!=null?o(c):e.push(c)}},s={inspector:c=>{t=c,e.forEach(o)}};return(0,L.provide)(Zo,s),(0,L.provide)(ae,(0,L.readonly)(r)),s}var Pt={name:$e,props:{autoCommit:{type:Boolean,default:!0},multipleSelections:{type:Boolean,default:!0},filter:Function,renderEmptyContainer:Function,refresh:Function,className:String,showCloseButton:Boolean,afterUpdate:Function,modelValue:Object},emits:["update:modelValue"],setup(e,t){let o=qo();return{service:(0,L.inject)(a),inspectorProvider:o,inspector:null,emit:t.emit}},mounted(){let e=t=>{if(this.inspector==null){let o=new se.Inspector({container:this.$refs.root,ui:t,renderEmptyContainer:()=>(this.emit("update:modelValue",null),this.renderEmptyContainer?this.renderEmptyContainer():""),refresh:(r,s)=>{this.emit("update:modelValue",r),this.refresh&&this.refresh(r),setTimeout(s)},autoCommit:this.autoCommit,multipleSelections:this.multipleSelections,filter:this.filter,showCloseButton:this.showCloseButton,afterUpdate:()=>this.afterUpdate?this.afterUpdate(t):null});this.inspectorProvider.inspector(o)}};this.service.surface.value==null?(0,L.watch)(this.service.surface,e):e(this.service.surface.value)},render(){return(0,L.h)(se.ELEMENT_DIV,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var Et=require("vue"),le=require("@visuallyjs/browser-ui"),Ct={name:Te,props:{propertyName:String},setup(){return{inspectorProvider:(0,Et.inject)(ae)}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{let t=new le.EdgeTypePicker(e.$ui,this.$refs.container,e.$ui.$getEdgePropertyMappings(),e.getValue(this.propertyName),(o,r)=>{e.setValue(this.propertyName,r,null)});t.render(this.propertyName,e.h),e.onChange(()=>{t.select(this.propertyName,e.getValue(this.propertyName))})}):(0,le.log)("WARN: EdgeTypePicker not instantiated inside an InspectorComponent. Cannot mount.")},render:function(){return(0,Et.h)(le.ELEMENT_DIV,{ref:"container"})}};var Z=require("vue"),E=require("@visuallyjs/browser-ui"),Io={render(){let e=this.swatches.map(t=>(0,Z.h)(E.ELEMENT_DIV,{title:t,class:E.CLASS_COLOR_PICKER_SWATCH,style:`background-color:${t}`,"data-color":t,onClick:()=>this.selectSwatch(t)}));return(0,Z.h)(E.ELEMENT_DIV,{class:`${E.CLASS_COLOR_PICKER}`},[(0,Z.h)("input",{type:"color","vjs-att":this.propertyName,ref:"colorInput"}),(0,Z.h)(E.ELEMENT_DIV,{class:E.CLASS_COLOR_PICKER_SWATCHES},e)])},props:{propertyName:String,maxColors:{type:Number,default:10}},data:()=>({CLASS_COLOR_PICKER:E.CLASS_COLOR_PICKER,CLASS_COLOR_PICKER_SWATCHES:E.CLASS_COLOR_PICKER_SWATCHES,CLASS_COLOR_PICKER_SWATCH:E.CLASS_COLOR_PICKER_SWATCH,colorInput:null,swatches:[]}),mounted(){let e=(0,Z.inject)(ae);e&&e.listen(t=>{this.inspector=t,this.swatches=t.ensureContext(E.INSPECTOR_CONTEXT_RECENT_COLORS,()=>[]),this.colorInput=this.$refs.colorInput,this.colorInput.addEventListener("change",this.colorPicked),t.bind(E.EVENT_CONTEXT_UPDATE,o=>{o.key===E.INSPECTOR_CONTEXT_RECENT_COLORS&&(this.swatches=o.value.slice())}),t.bind("change",this.setCurrentColor),this.setCurrentColor()})},methods:{addColor:function(e){let t=this.inspector.ensureContext(E.INSPECTOR_CONTEXT_RECENT_COLORS,()=>[]);if(e=e.toUpperCase(),!(t.find(r=>r.toUpperCase()===e)!=null)){let r=this.maxColors||10,s=t.slice();s.unshift(e),s.length>r&&(s.length=r),this.inspector.updateContext(E.INSPECTOR_CONTEXT_RECENT_COLORS,s)}},colorPicked:function(){let e=this.colorInput.value;this.inspector.setValue(this.propertyName,e,null),this.addColor(e)},selectSwatch:function(e){this.inspector.setValue(this.propertyName,e,null),this.colorInput.value=e},setCurrentColor:function(){let e=this.inspector.getValue(this.propertyName);e!=null&&(this.colorInput.value=e,this.addColor(e))}}};var S=require("vue"),pe=require("@visuallyjs/browser-ui"),yt={props:{placement:{type:String,default:"floating"},position:{type:Object},constraints:{type:Object}},data:()=>({hasMounted:!1,surface:null}),setup(e){return{service:(0,S.inject)(a)}},mounted(){let e=t=>{if(!this.hasMounted){this.surface=t,this.hasMounted=!0;let o=this.position||{x:0,y:0};(0,S.nextTick)().then(()=>{this.placement==="floating"?t.floatElement(this.$refs.root,o):t.fixElement(this.$refs.fixedEl,o,this.constraints)})}};this.service.surface.value==null?(0,S.watch)(this.service.surface,e):e(this.service.surface.value)},render(){return(0,S.h)(pe.ELEMENT_DIV,{ref:"root"},this.hasMounted?this.placement==="floating"?(0,S.h)(pe.ELEMENT_DIV,{},this.$slots.hasOwnProperty("default")?this.$slots.default():[]):(0,S.h)(S.Teleport,{to:this.surface.vertexLayer,key:(0,pe.uuid)()},(0,S.h)(pe.ELEMENT_DIV,{ref:"fixedEl"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])):[])}};var Qo=require("vue"),Tt={setup(){(0,Qo.provide)(a,new w("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ce=require("vue"),ue=require("@visuallyjs/browser-ui"),_t={name:be,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,iconSize:Object,showLabels:Boolean,paletteStrokeWidth:Number,showAllMessage:String,onCellAdded:Function,mode:String,allowClickToAdd:Boolean,autoExitDrawMode:Boolean,selectAfterAdd:{type:Boolean,default:!0},className:String,diagram:{type:Object},onVertexAdded:Function,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:(0,ce.inject)(a)}},data:()=>({hasMounted:!1}),mounted(){if(this.service==null&&this.diagram==null)(0,ue.log)("Cannot mount DiagramPalette - no service found and Diagram not passed in as a prop");else{let e=t=>{this.hasMounted||(this.hasMounted=!0,new ue.DiagramPalette(this.$refs.container,t,{fill:this.fill,outline:this.outline,dragSize:this.dragSize,inspector:this.inspector,iconSize:this.iconSize,showLabels:this.showLabels,paletteStrokeWidth:this.paletteStrokeWidth,showAllMessage:this.showAllMessage,onCellAdded:this.onCellAdded,mode:this.mode,allowClickToAdd:this.allowClickToAdd,autoExitDrawMode:this.autoExitDrawMode,selectAfterAdd:this.selectAfterAdd,onVertexAdded:this.onVertexAdded,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.diagram?e(this.diagram):this.service.diagram.value!=null?e(this.service.diagram.value):(0,ce.watch)(this.service.diagram,e)}},render:function(){return(0,ce.h)(ue.ELEMENT_DIV,{ref:"container"})}};var x=require("@visuallyjs/browser-ui"),v=require("vue"),gt={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=(0,v.inject)(a),o=(0,v.ref)(null),r=(0,v.ref)("block"),s=(0,v.ref)(null),c=(0,v.ref)(null),n=l=>{c.value=new x.PopupHandler(e.selector,s.value,l,p=>{o.value=p,p==null?r.value=x.NONE:(r.value=x.BLOCK,requestAnimationFrame(()=>c.value.$positionPopup()))},e.anchor)};return(0,v.onMounted)(()=>{t.surface.value==null?(0,v.watch)(t.surface,n):n(t.surface.value)}),{service:t,current:o,display:r,rootRef:s,handler:c}},render(){var e;return(0,v.h)(x.ELEMENT_DIV,{ref:"rootRef",display:this.display,position:x.ABSOLUTE,class:x.CLASS_SURFACE_POPUP},this.$slots.hasOwnProperty("default")?this.$slots.default({vertex:this.current,model:(e=this.service.surface.value)==null?void 0:e.model,ui:this.service.surface.value,hide:()=>{var t;return(t=this.handler)==null?void 0:t.$hide()}}):[])}};var _=require("vue"),U=require("@visuallyjs/browser-ui"),wo={setup(){return{service:(0,_.inject)(a)}},name:_e,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:U.BackgroundPlugin.type,options:this.options})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}},bo={setup(){return{service:(0,_.inject)(a)}},name:ge,props:{grid:{type:Object},showBorder:{type:Boolean},minWidth:{type:Number},minHeight:{type:Number},showTickMarks:{type:Boolean},tickMarksPerCell:{type:Number},maxWidth:{type:Number},maxHeight:{type:Number},autoShrink:{type:Boolean},gridType:{type:String},dotRadius:{type:Number},tickDotRadius:{type:Number},visible:{type:Boolean}},mounted:function(){let e=t=>{t.addPlugin({type:U.BackgroundPlugin.type,options:{type:U.GeneratedGridBackground.type,grid:this.grid,showBorder:this.showBorder,minWidth:this.minWidth,minHeight:this.minHeight,showTickMarks:this.showTickMarks,tickMarksPerCell:this.tickMarksPerCell,maxWidth:this.maxWidth,maxHeight:this.maxHeight,autoShrink:this.autoShrink,gridType:this.gridType,dotRadius:this.dotRadius,tickDotRadius:this.tickDotRadius,visible:this.visible}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}},Mo={setup(){return{service:(0,_.inject)(a)}},name:Se,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:U.BackgroundPlugin.type,options:{type:U.SimpleBackground.type,url:this.url}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}},Vo={setup(){return{service:(0,_.inject)(a)}},name:ve,props:{url:{type:String},urlGenerator:{type:Function},tileSize:{type:Object},width:{type:Number},height:{type:Number},maxZoom:{type:Number},tiling:{type:String},panDebounceTimeout:{type:Number},zoomDebounceTimeout:{type:Number}},mounted:function(){let e=t=>{t.addPlugin({type:U.BackgroundPlugin.type,options:{type:U.TiledBackground.type,url:this.url,urlGenerator:this.urlGenerator,tileSize:this.tileSize,width:this.width,height:this.height,tiling:this.tiling,panDebounceTimeout:this.panDebounceTimeout,zoomDebounceTimeout:this.zoomDebounceTimeout}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}};var Rr={install:function(e,t){e.component(co,dt),e.component(uo,mt),e.component(mo,Tt),e.component(Ae,go),e.component(Ne,So),e.component(we,xo),e.component(Re,No),e.component(De,Ro),e.component(Ie,Ao),e.component(_e,wo),e.component(ge,bo),e.component(Se,Mo),e.component(ve,Vo),e.component(xe,Do),e.component(be,_t),e.component(Ve,rt),e.component(Me,ot),e.component(Be,nt),e.component(Le,st),e.component(Ue,at),e.component(Ge,it),e.component(He,ut),e.component(je,ct),e.component(Fe,pt),e.component(ke,lt),e.component(Ce,ht),e.component(ye,Ot),e.component(Te,Ct),e.component(so,Io),e.component($e,Pt),e.component(fo,yt),e.component(ho,gt),e.provide(a,new w("root"))}};var de=require("vue"),St=require("@visuallyjs/browser-ui"),er=require("vue");function Ar(){let e=(0,er.inject)(a),t=(0,de.shallowRef)(null),o=(0,de.shallowRef)(null),r=(0,de.shallowRef)(null),s=(0,de.ref)(1);return e==null||e.getSurface(c=>{o.value=c,o.value.bind(St.EVENT_ZOOM,n=>{s.value=n.zoom})}),e==null||e.getDiagram(c=>{t.value=c,t.value.$ui.bind(St.EVENT_ZOOM,n=>{s.value=n.zoom})}),e==null||e.getPaper(c=>{r.value=c,r.value.bind(St.EVENT_ZOOM,n=>{s.value=n.zoom})}),s}var vt=require("vue"),me=require("@visuallyjs/browser-ui");function Nr(e){let t=(0,vt.inject)(a);if(t){let o=null,r=()=>{o&&e(o)},s=()=>{o&&(o.unbind(me.EVENT_DATA_UPDATED,r),o.unbind(me.EVENT_GRAPH_CLEARED,r))},c=n=>{s(),o=n,o&&(o.bind(me.EVENT_DATA_UPDATED,r),o.bind(me.EVENT_GRAPH_CLEARED,r),r())};t.getModel(n=>{c(n)}),(0,vt.onUnmounted)(()=>{s()})}}var tr=require("vue"),or=require("vue");function xr(){let e=(0,or.inject)(a),t=(0,tr.shallowRef)(null);return e==null||e.getSurface(o=>{t.value=o}),t}var rr=require("vue"),nr=require("vue");function Dr(){let e=(0,nr.inject)(a),t=(0,rr.shallowRef)(null);return e==null||e.getDiagram(o=>{t.value=o}),t}var ir=require("vue"),sr=require("vue");function Ir(){let e=(0,sr.inject)(a),t=(0,ir.shallowRef)(null);return e==null||e.getPaper(o=>{t.value=o}),t}
|
|
1
|
+
var et=Object.defineProperty,gr=Object.defineProperties,yr=Object.getOwnPropertyDescriptor,Cr=Object.getOwnPropertyDescriptors,Tr=Object.getOwnPropertyNames,Yo=Object.getOwnPropertySymbols;var Zo=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable;var Xo=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z=(e,t)=>{for(var r in t||(t={}))Zo.call(t,r)&&Xo(e,r,t[r]);if(Yo)for(var r of Yo(t))_r.call(t,r)&&Xo(e,r,t[r]);return e},ye=(e,t)=>gr(e,Cr(t));var Sr=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},vr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Tr(t))!Zo.call(e,s)&&s!==r&&et(e,s,{get:()=>t[s],enumerable:!(o=yr(t,s))||o.enumerable});return e};var Rr=e=>vr(et({},"__esModule",{value:!0}),e);var Wr={};Sr(Wr,{$initialiseVueOverlays:()=>Qe,AreaChartComponent:()=>Ot,BackgroundComponent:()=>Wo,BarChartComponent:()=>mt,BaseOverlayComponent:()=>Io,BrowserUIVueModel:()=>D,BubbleChartComponent:()=>gt,CLASS_VUE_GROUP:()=>yo,CLASS_VUE_NODE:()=>go,CLASS_VUE_OVERLAY:()=>Co,COMPONENT_AREA_CHART:()=>$e,COMPONENT_BACKGROUND:()=>Ae,COMPONENT_BAR_CHART:()=>ke,COMPONENT_BUBBLE_CHART:()=>Ke,COMPONENT_COLUMN_CHART:()=>je,COMPONENT_CONTROLS:()=>Be,COMPONENT_DIAGRAM:()=>Ue,COMPONENT_DIAGRAM_PALETTE:()=>Ge,COMPONENT_DIAGRAM_PROVIDER:()=>So,COMPONENT_EDGE_PROPERTY_MAPPINGS_INSPECTOR:()=>Ze,COMPONENT_EXPORT_CONTROLS:()=>Le,COMPONENT_GAUGE_CHART:()=>Je,COMPONENT_GRID_BACKGROUND:()=>xe,COMPONENT_IMAGE_BACKGROUND:()=>De,COMPONENT_INSPECTOR:()=>Xe,COMPONENT_LINE_CHART:()=>He,COMPONENT_MINIVIEW:()=>be,COMPONENT_PALETTE:()=>Ve,COMPONENT_PAPER:()=>we,COMPONENT_PAPER_PROVIDER:()=>_o,COMPONENT_PIE_CHART:()=>We,COMPONENT_SANKEY_CHART:()=>Ye,COMPONENT_SCATTER_CHART:()=>ze,COMPONENT_SHAPE_PROPERTIES_INSPECTOR:()=>qe,COMPONENT_SURFACE:()=>Me,COMPONENT_SURFACE_POPUP:()=>vo,COMPONENT_SURFACE_PROVIDER:()=>To,COMPONENT_TILED_IMAGE_BACKGROUND:()=>Ie,COMPONENT_XY_CHART:()=>Fe,ColorPickerComponent:()=>$o,ColumnChartComponent:()=>dt,ControlsComponent:()=>Go,DEFAULT_SHAPE_HEIGHT:()=>Oo,DEFAULT_SHAPE_WIDTH:()=>Po,DEFAULT_VUE_PAPER_ID:()=>jt,DEFAULT_VUE_SURFACE_ID:()=>Gt,DecoratorComponent:()=>xt,DiagramComponent:()=>Fo,DiagramPaletteComponent:()=>It,DiagramProvider:()=>Dt,EVENT_VERTEX_UPDATED:()=>er,EVENT_VERTICES_RENDERED:()=>pt,EdgePropertyMappingsInspectorComponent:()=>Mt,EdgeTypePickerComponent:()=>he,ExportControlsComponent:()=>jo,GaugeChartComponent:()=>yt,GridBackgroundComponent:()=>zo,ImageBackgroundComponent:()=>Ko,InspectorComponent:()=>Nt,InspectorGetterSymbol:()=>F,InspectorSetterSymbol:()=>lr,LineChartComponent:()=>Pt,MiniviewComponent:()=>ko,PROP_ACTIVE_TRACKING:()=>$t,PROP_ALLOW_CLICK_TO_ADD:()=>po,PROP_ALLOW_DROP_ON_CANVAS:()=>oo,PROP_ALLOW_DROP_ON_EDGE:()=>to,PROP_ALLOW_DROP_ON_GROUP:()=>ro,PROP_ALLOW_DROP_ON_NODE:()=>no,PROP_ALLOW_ROTATION:()=>co,PROP_AUTO_EDGE_CONNECT:()=>mo,PROP_CANVAS_DROP_FILTER:()=>fo,PROP_CLASS_NAME:()=>q,PROP_CLICK_TO_ADD_ONLY:()=>lo,PROP_CLICK_TO_CENTER:()=>Ft,PROP_CSV_DATA:()=>rt,PROP_DATA:()=>I,PROP_DATA_GENERATOR:()=>qt,PROP_DATA_SOURCE_FILTER:()=>ot,PROP_DATA_TYPE:()=>Se,PROP_DRAG_SIZE:()=>ho,PROP_GROUP_IDENTIFIER:()=>eo,PROP_ID:()=>Ar,PROP_IGNORE_DROP_ON_NODE:()=>io,PROP_INTERACTIVE:()=>Jt,PROP_JSON_DATA:()=>nt,PROP_MODE:()=>Kt,PROP_MODEL:()=>Te,PROP_MODEL_OPTIONS:()=>Q,PROP_ON_VERTEX_ADDED:()=>so,PROP_OPTIONS:()=>K,PROP_PAPER_ID:()=>zt,PROP_PIVOT:()=>Yt,PROP_RENDER_OPTIONS:()=>Ce,PROP_ROTATION_SPEED:()=>uo,PROP_SELECTOR:()=>Zt,PROP_SELECT_AFTER_ADD:()=>ao,PROP_SHOW_LASSO:()=>Ht,PROP_SURFACE_ID:()=>H,PROP_TRACK_SELECTION:()=>Wt,PROP_TYPE_FUNCTION:()=>kt,PROP_TYPE_GENERATOR:()=>Qt,PROP_URL:()=>R,PROP_USE_MODEL:()=>Xt,PROP_VIEW_OPTIONS:()=>_e,PaletteComponent:()=>Ho,PaperComponent:()=>Vo,PaperProvider:()=>_t,PieChartComponent:()=>ft,SankeyChartComponent:()=>Ct,ScatterChartComponent:()=>Et,ShapeComponent:()=>St,ShapePaletteComponent:()=>Rt,ShapePropertiesInspectorComponent:()=>Bt,SurfaceComponent:()=>wo,SurfacePopup:()=>bt,SurfaceProvider:()=>Tt,TAG_COLOR_PICKER:()=>Eo,TAG_DECORATOR:()=>Ro,TAG_EDGE_TYPE_PICKER:()=>Ne,TAG_SHAPE:()=>ve,TAG_SHAPE_PALETTE:()=>Re,TiledImageBackgroundComponent:()=>Jo,VisuallyJsPlugin:()=>Gr,VisuallyJsService:()=>w,VisuallyJsServiceKey:()=>p,XYChartComponent:()=>ht,addPaper:()=>Mo,addSurface:()=>bo,bindToDevLifecycle:()=>xr,doProvideInspector:()=>pr,newInstance:()=>Nr,useDiagram:()=>Hr,usePaper:()=>$r,useSurface:()=>Fr,useVisuallyJsUpdate:()=>kr,useZoom:()=>jr,vertexHasRendered:()=>No,vertexHasUpdated:()=>Ao,vertexWillRender:()=>tr});module.exports=Rr(Wr);var tt=require("@visuallyjs/browser-ui"),D=class extends tt.BrowserUIModel{render(t,r){return(0,tt.log)("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function Nr(e){return e=e||{},new D(e)}var Gt="surfaceId",jt="paperId",kt="typeFunction",Ft="clickToCenter",Ht="showLasso",$t="activeTracking",Wt="trackSelection",H="surfaceId",zt="paperId",q="className",I="data",Kt="mode",K="options",Ce="renderOptions",Q="modelOptions",Te="model",_e="viewOptions",R="url",Se="dataType",Jt="interactive",Yt="pivot",ot="dataSourceFilter",rt="csvData",nt="jsonData",Xt="useModel",Ar="id",Zt="selector",qt="dataGenerator",Qt="typeGenerator",eo="groupIdentifier",to="allowDropOnEdge",oo="allowDropOnCanvas",ro="allowDropOnGroup",no="allowDropOnNode",io="ignoreDropOnNode",so="onVertexAdded",ao="selectAfterAdd",lo="clickToAddOnly",po="allowClickToAdd",co="allowRotation",uo="rotationSpeed",mo="autoEdgeConnect",ho="dragSize",fo="canvasDropFilter",ve="Shape",Re="ShapePalette",Po=120,Oo=90,Ne="EdgeTypePickerComponent",Eo="ColorPickerComponent",go="vjs-vue-node",yo="vjs-vue-group",Co="vjs-vue-overlay",Ae="BackgroundComponent",xe="GridBackgroundComponent",De="ImageBackgroundComponent",Ie="TiledImageBackgroundComponent",be="MiniviewComponent",Me="SurfaceComponent",To="SurfaceProvider",we="PaperComponent",_o="PaperProvider",So="DiagramProvider",Ve="PaletteComponent",Be="ControlsComponent",Le="ExportControlsComponent",Ue="DiagramComponent",Ge="DiagramPaletteComponent",je="ColumnChartComponent",ke="BarChartComponent",Fe="XYChartComponent",He="LineChartComponent",$e="AreaChartComponent",We="PieChartComponent",ze="ScatterChartComponent",Ke="BubbleChartComponent",Je="GaugeChartComponent",Ye="SankeyChartComponent",Xe="InspectorComponent",Ze="EdgePropertyMappingsInspector",vo="SurfacePopup",Ro="Decorator",qe="ShapePropertiesInspectorComponent";var $=require("@visuallyjs/browser-ui"),it={props:{data:Object,model:D,obj:$.Vertex,vertex:$.Vertex,ui:$.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=(0,$.isGroup)(e.vertex)?yo:go;e.el.firstElementChild&&(0,$.addClass)(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),No(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),Ao(this.ui.id,this.vertex)}};var qo={mixins:[it],methods:{getNode:function(){return this.obj},removeNode:function(){this.model.removeNode(this.getNode())},updateNode:function(e){this.model.updateNode(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}}};var Qo={methods:{getGroup:function(){return this.obj},removeGroup:function(e){this.model.removeGroup(this.obj,e)},updateGroup:function(e){this.model.updateGroup(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}},mixins:[it]};var b=require("vue"),d=require("@visuallyjs/browser-ui"),xo=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new d.OptimisticEventGenerator;this.hasRendered=!1}vertexWillRender(t){this.unrenderedVertices.set(t.id,t),this.hasRendered=!1}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&(this.hasRendered=!0,this.eventManager.fire(pt))}vertexHasUpdated(t){this.eventManager.fire(er,t)}},pt="vertices:rendered",er="vertex:updated",Do=new Map;function st(e){return Do.has(e)||Do.set(e,new xo),Do.get(e)}function No(e,t){st(e).vertexHasRendered(t)}function Ao(e,t){st(e).vertexHasUpdated(t)}function tr(e,t){st(e).vertexWillRender(t)}function xr(e,t,r){let o=st(e);o&&(o.eventManager.bind(t,r),t===pt&&o.hasRendered&&o.eventManager.fire(pt))}var at=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},Io={props:{data:Object,model:D,obj:d.Edge,edge:d.Edge,overlay:d.Overlay,ui:d.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&(0,d.addClass)(e.el.firstElementChild,Co)},updated(){this.ui.$revalidateElement(this.el)}},lt=(e,t,r,o,s,c,n,l,a)=>{let f=n.component!=null,h=(0,d.isGroup)(l),T=[];f||T.push(h?d.CLASS_DEFAULT_GROUP:d.CLASS_DEFAULT_NODE);let y=f?n.component:{render(v){return v.data.label||""}};if(y){let v=document.createElement(d.ELEMENT_DIV);(0,d.updateClasses)(v,T),y.mixins==null&&(y.mixins=[]);let x=h?Qo:qo;y.mixins.find(k=>k===x)||y.mixins.push(x),tr(c.id,l);let ie={data:r,model:(0,b.markRaw)(o),ui:(0,b.markRaw)(c),obj:(0,b.markRaw)(l),vertex:(0,b.markRaw)(l),el:v,def:(0,b.markRaw)(n),eventInfo:a==null?null:(0,b.markRaw)(a)};if(n.inject)for(let k in n.inject){let X=n.inject[k],Er=typeof X=="function"?X(l,o):X;ie[k]=Er}e.push({component:(0,b.markRaw)(y),el:v,t:l.getFullId(),props:ie,vertex:l})}};function bo(e,t,r,o,s,c){let n={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(a,f,h,T)=>{},render:(a,f,h,T,y,v,x,z)=>lt(o,a,f,h,T,y,v,x,z),cleanupVertex:at,cleanupPort:at,rerender:(a,f,h,T,y,v,x,z,ie)=>{let k=o.findIndex(X=>X.vertex===x);k!=null&&o.splice(k,1)[0].el,y.$__unmanage(ie,!0,!0),requestAnimationFrame(()=>{lt(o,a,f,h,T,y,v,x,z)})}},l=(0,d.extend)(s||{},{view:c||{},id:t});return(0,d.renderSurface)(e,r,n,l)}function Mo(e,t,r,o,s,c){let n={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(a,f,h,T)=>{},render:(a,f,h,T,y,v,x,z)=>lt(o,a,f,h,T,y,v,x,z),cleanupVertex:at,cleanupPort:at,rerender:(a,f,h,T,y,v,x,z,ie)=>{let k=o.findIndex(X=>X.vertex===x);k!=null&&o.splice(k,1)[0].el,y.$__unmanage(ie,!0,!0),requestAnimationFrame(()=>{lt(o,a,f,h,T,y,v,x,z)})}},l=(0,d.extend)(s||{},{view:c||{},id:t});return(0,d.renderPaper)(e,r,n,l)}function Qe(e,t,r,o){if(e.edges)for(let s in e.edges){let c=e.edges[s];c.overlays&&(c.overlays=c.overlays.map(n=>{let l={};return n.component!=null?{type:d.OVERLAY_TYPE_CUSTOM,options:{create:f=>{let h=document.createElement(d.ELEMENT_DIV),T=(0,d.uuid)();n.component.mixins==null&&(n.component.mixins=[]),n.component.mixins.indexOf(Io)===-1&&n.component.mixins.push(Io);let y=Z({data:f.edge.data,model:(0,b.markRaw)(r()),ui:(0,b.markRaw)(t()),obj:f.edge,edge:f.edge,el:h,def:(0,b.markRaw)(n),eventInfo:null,overlay:n},l);return o.push({component:(0,b.markRaw)(n.component),el:h,t:T,props:y}),h}}}:n}))}}var ee=require("@visuallyjs/browser-ui"),se=require("vue"),p=Symbol.for("visuallyjs-service"),w=class{constructor(t){this.context=t;this.a=[];this.l=[];this.p=[];this.c=[];this.surface=(0,se.shallowRef)(null);this.model=(0,se.shallowRef)(null);this.paper=(0,se.shallowRef)(null);this.diagram=(0,se.shallowRef)(null);this.ui=(0,se.shallowRef)(null)}getSurface(t){this.r(this.l,t,this.u)}getDiagram(t){this.r(this.p,t,this.m)}getPaper(t){this.r(this.c,t,this.h)}getModel(t){this.r(this.a,t,this.i)}getModelDirect(){return this.i}r(t,r,o){if(o!=null)try{r(o)}catch(s){(0,ee.log)(`WARN: could not dispatch ${s}`)}else t.push(r)}setSurface(t){this.surface.value=t,this.model.value=t.model,this.ui.value=t,this.u=t,this.s(t.model),this.n(this.l,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.m=t,this.s(t.model),t.$ui instanceof ee.Surface?this.setSurface(t.$ui):t.$ui instanceof ee.Paper&&this.setPaper(t.$ui),this.n(this.p,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.h=t,this.s(t.model),this.n(this.c,t)}s(t){this.i=t,this.n(this.a,t)}n(t,r){t.forEach(o=>{try{o(r)}catch(s){(0,ee.log)(`WARN: could not flush all queue entries ${s}`)}})}};var V=require("vue"),O=require("@visuallyjs/browser-ui"),wo={setup(e){return{service:(0,V.inject)(p),surfaceId:e.surfaceId||Gt}},name:Me,props:{[I]:{type:Object},[Ce]:{type:Object},[Q]:{type:Object},[_e]:{type:Object},[Te]:{type:Object},[R]:{type:String},[Se]:{type:String},[H]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new D(this.modelOptions||{}),r=this.$refs.root;e.e=!1;let o=(0,O.clone)(this.viewOptions||{});Qe(o,()=>this.surface,()=>t,this.overlays),this.surface=bo(t,this.surfaceId,r,this.vertices,(0,O.clone)(this.renderOptions||{}),o),this.service.setSurface(this.surface);let s=(n,l)=>{let a=()=>{let h={};return l.originalData||l.updates?h=Object.assign(l.originalData,l.updates):l.newData&&Object.assign(h,l.newData),h},f=this.vertices.find(h=>h.t===n);f!=null&&(f.props.data=a())},c=n=>{let l=this.vertices.findIndex(a=>a.t===n);l!==-1&&this.vertices.splice(l,1)};t.bind(O.EVENT_NODE_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(O.EVENT_GROUP_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(O.EVENT_NODE_REMOVED,n=>{c(n.node.id)}),t.bind(O.EVENT_GROUP_REMOVED,n=>{c(n.group.id)}),t.bind(O.EVENT_EDGE_UPDATED,n=>{let l=n.edge.id;this.overlays.forEach(a=>{a.props.edge&&a.props.edge.id===l&&(a.props.data=n.edge.data)})}),t.bind(O.EVENT_EDGE_REMOVED,n=>{let l=n.edge.id,a=this.overlays.length-1;for(;a>=0;)this.overlays[a].props.edge&&this.overlays[a].props.edge.id===l&&this.overlays.splice(a,1),a--}),t.bind(O.EVENT_GRAPH_CLEARED,()=>{this.vertices.length=0,this.overlays.length=0}),this.surface.bind(O.EVENT_RENDER_END,()=>setTimeout(()=>this.surface.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[I]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({data:e,dataType:this.dataType})}))}},[R]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>(0,V.h)(V.Teleport,{to:t.el,key:t.t},[(0,V.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,V.h)(V.Teleport,{to:t.el,key:t.t},[(0,V.h)(t.component,t.props)]))}),(0,V.h)(O.ELEMENT_DIV,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var B=require("vue"),E=require("@visuallyjs/browser-ui"),Vo={setup(e){return{service:(0,B.inject)(p),paperId:e.paperId||jt}},name:we,props:{[I]:{type:Object},[Ce]:{type:Object},[Q]:{type:Object},[_e]:{type:Object},[Te]:{type:Object},[R]:{type:String},[Se]:{type:String},[zt]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new D(this.modelOptions||{}),r=this.$refs.root;e.e=!1;let o=(0,E.clone)(this.viewOptions||{});Qe(o,()=>this.paper,()=>t,this.overlays),this.paper=Mo(t,this.paperId,r,this.vertices,(0,E.clone)(this.renderOptions||{}),o),this.service.setPaper(this.paper);let s=(n,l)=>{let a=()=>{let h={};return l.originalData||l.updates?h=Object.assign(l.originalData,l.updates):l.newData&&Object.assign(h,l.newData),h},f=this.vertices.find(h=>h.t===n);f!=null&&(f.props.data=a())},c=n=>{let l=this.vertices.findIndex(a=>a.t===n);l!==-1&&this.vertices.splice(l,1)};t.bind(E.EVENT_NODE_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(E.EVENT_GROUP_UPDATED,n=>{s(n.vertex.getFullId(),n)}),t.bind(E.EVENT_NODE_REMOVED,n=>{c(n.node.id)}),t.bind(E.EVENT_GROUP_REMOVED,n=>{c(n.group.id)}),t.bind(E.EVENT_EDGE_UPDATED,n=>{let l=n.edge.id;this.overlays.forEach(a=>{a.props.edge&&a.props.edge.id===l&&(a.props.data=n.edge.data)})}),t.bind(E.EVENT_EDGE_REMOVED,n=>{let l=n.edge.id,a=this.overlays.length-1;for(;a>=0;)this.overlays[a].props.edge&&this.overlays[a].props.edge.id===l&&this.overlays.splice(a,1),a--}),t.bind(E.EVENT_GRAPH_CLEARED,()=>{this.vertices.length=0,this.overlays.length=0}),this.paper.bind(E.EVENT_RENDER_END,()=>setTimeout(()=>this.paper.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[I]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({data:e,dataType:this.dataType})}))}},[R]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>(0,B.h)(B.Teleport,{to:t.el,key:t.t},[(0,B.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,B.h)(B.Teleport,{to:t.el,key:t.t},[(0,B.h)(t.component,t.props)]))}),(0,B.h)(E.ELEMENT_DIV,{ref:"root",class:"vjs-vue-paper",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var u=require("vue"),i=require("@visuallyjs/browser-ui"),Dr="Clear dataset?",Bo="vjs-selected-mode",Lo="can-undo",Uo="can-redo",Ir="data-undo",br="data-redo",or="data-mode",Mr="data-reset",wr="data-clear",Vr="data-zoom-in",Br="data-zoom-out",rr="vjs-controls-has-selection",Go={setup(e){return{service:(0,u.inject)(p)}},name:Be,props:{clear:{type:Boolean,default:!0},[H]:{type:String},undoRedo:{type:Boolean,default:!0},orientation:{type:String,default:"row"},zoomToExtents:{type:Boolean,default:!0},zoomButtons:{type:Boolean,default:!1},clearMessage:{type:String,default:Dr},onMaybeClear:{type:Function},className:{type:String,default:""}},methods:{panMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(i.SURFACE_MODE_PAN)},selectMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(i.SURFACE_MODE_SELECT)},zoomToFit:function(){var e;(e=this.service.surface.value)==null||e.zoomToFit()},doClear:function(){let e=this.service.surface.value;e&&(this.onMaybeClear!=null?this.onMaybeClear(()=>e.model.clear()):window.confirm(this.clearMessage)&&e.model.clear())},undo:function(){var e;(e=this.service.model.value)==null||e.undo()},redo:function(){var e;(e=this.service.model.value)==null||e.redo()},zoomIn:function(){var e;(e=this.service.surface.value)==null||e.zoomIn()},zoomOut:function(){var e;(e=this.service.surface.value)==null||e.zoomOut()},resetSelection(){let e=this.service.surface.value;e&&(e.model.clearSelection(),(0,i.supportsPathEditing)(e)&&e.stopEditingPath())},updateSelectionState:function(){let e=this.service.surface.value;e&&(e.model.getSelection().isEmpty()?this.$refs.root.removeAttribute(rr):this.$refs.root.setAttribute(rr,"true"))}},data:function(){return{ready:!1,hasLasso:!1}},render(){if(this.ready){let e=[];return this.showPan&&(e.push((0,u.h)("i",{class:`vjs-pan-mode ${Bo}`,[or]:i.SURFACE_MODE_PAN,onClick:()=>this.panMode(),title:"Pan mode"},[(0,u.h)("svg",{viewBox:i.PAN_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,u.h)("path",{d:i.PAN_PATH})])])),e.push((0,u.h)("i",{class:"vjs-select-mode",[or]:i.SURFACE_MODE_SELECT,onClick:()=>this.selectMode(),title:"Select mode"},[(0,u.h)("svg",{viewBox:i.LASSO_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.LASSO_PATH})])]))),this.undoRedo&&(e.push((0,u.h)("i",{class:"vjs-undo",[Ir]:!0,title:"Undo last action",onClick:()=>this.undo()},[(0,u.h)("svg",{viewBox:i.UNDO_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,u.h)("path",{d:i.UNDO_PATH,"stroke-width":2})])])),e.push((0,u.h)("i",{class:"vjs-redo",[br]:!0,title:"Redo last action",onClick:()=>this.redo()},[(0,u.h)("svg",{viewBox:i.REDO_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,u.h)("path",{d:i.REDO_PATH,"stroke-width":2})])]))),this.zoomToExtents&&e.push((0,u.h)("i",{class:"vjs-zoom-to-fit",[Mr]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[(0,u.h)("svg",{viewBox:i.ZOOM_TO_FIT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.ZOOM_TO_FIT_PATH})])])),this.zoomButtons&&(e.push((0,u.h)("i",{class:"vjs-zoom-in",[Vr]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[(0,u.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.ZOOM_IN_PATH})])])),e.push((0,u.h)("i",{class:"vjs-zoom-out",[Br]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[(0,u.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.ZOOM_OUT_PATH})])]))),e.push((0,u.h)("i",{class:i.CLASS_CONTROLS_RESET_SELECTION,[i.ATTRIBUTE_RESET_SELECTION]:"true",onClick:()=>{this.resetSelection()}},[(0,u.h)("svg",{viewBox:i.RESET_SELECTION_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.RESET_SELECTION_PATH})])])),this.clear&&e.push((0,u.h)("i",{class:"vjs-clear-dataset",[wr]:"true",onClick:()=>{this.doClear()}},[(0,u.h)("svg",{viewBox:i.CLEAR_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,u.h)("path",{d:i.CLEAR_PATH})])])),(0,u.h)(i.ELEMENT_DIV,{class:`vjs-controls ${this.className}`,ref:"root",[Lo]:!1,[Uo]:!1,[i.ATTRIBUTE_CONTROLS_ORIENTATION]:this.orientation},e)}else return(0,u.h)(i.ELEMENT_DIV,{ref:"root"})},mounted(){let e=t=>{let r=t.getPlugin(i.LassoPlugin.type);this.showPan=r!=null,t.bind(i.EVENT_SURFACE_MODE_CHANGED,o=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),Bo),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+o+"']"),Bo)}),t.model.bind(i.EVENT_UNDOREDO_UPDATE,o=>{this.$refs.root.setAttribute(Lo,o.undoCount>0?i.TRUE:i.FALSE),this.$refs.root.setAttribute(Uo,o.redoCount>0?i.TRUE:i.FALSE)}),t.model.bind(i.EVENT_SELECT,()=>this.updateSelectionState()),t.model.bind(i.EVENT_DESELECT,()=>this.updateSelectionState()),t.model.bind(i.EVENT_SELECTION_CLEARED,()=>this.updateSelectionState()),this.$refs.root.setAttribute(Lo,i.FALSE),this.$refs.root.setAttribute(Uo,i.FALSE),this.ready=!0};this.service.surface.value==null?(0,u.watch)(this.service.surface,e):e(this.service.surface.value)}};var L=require("vue"),C=require("@visuallyjs/browser-ui"),jo={name:Le,setup(e){return{service:(0,L.inject)(p)}},props:{surfaceId:{type:String},showLabel:{type:Boolean,default:!0},label:{type:String,default:"Export :"},margins:{type:Object},svgOptions:{type:Object},imageOptions:{type:Object},allowSvgExport:{type:Boolean,default:!0},allowPngExport:{type:Boolean,default:!0},allowJpgExport:{type:Boolean,default:!0}},methods:{loadSurface:function(e){let t=this.service.surface.value;t&&e(t)},exportSVG:function(){this.loadSurface(e=>{let t=this.svgOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new C.SvgExportUI(e).export(t)})},exportJPG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),t.type="image/jpeg",new C.ImageExportUI(e).export(t)})},exportPNG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new C.ImageExportUI(e).export(t)})}},render(){let e=this.showLabel!==!1,t=this.allowSvgExport!==!1,r=this.allowPngExport!==!1,o=this.allowJpgExport!==!1,s=[];return t&&s.push((0,L.h)("i",{},[(0,L.h)("a",{href:"#","data-type":C.TYPE_SVG,onClick:()=>this.exportSVG()},"SVG")])),r&&s.push((0,L.h)("i",{},[(0,L.h)("a",{href:"#","data-type":C.TYPE_PNG,onClick:()=>this.exportPNG()},"PNG")])),o&&s.push((0,L.h)("i",{},[(0,L.h)("a",{href:"#","data-type":C.TYPE_JPG,onClick:()=>this.exportJPG()},"JPG")])),e&&s.unshift((0,L.h)("span",{},[this.label])),(0,L.h)(C.ELEMENT_DIV,{class:`${C.CLASS_CONTROLS} ${C.CLASS_EXPORT_CONTROLS}`},s)}};var te=require("vue"),ct=require("@visuallyjs/browser-ui"),ko={setup(e){return{service:(0,te.inject)(p)}},name:be,props:{[H]:{type:String},[q]:{type:String,default:""},[$t]:{type:Boolean,default:!0},[Ft]:{type:Boolean,default:!0},[Ht]:{type:Boolean,default:!0},[Wt]:{type:Boolean,default:!0},[kt]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:ct.MiniviewPlugin.type,options:{container:this.$el,activeTracking:this.activeTracking,clickToCenter:this.clickToCenter,showLasso:this.showLasso,trackSelection:this.trackSelection,typeFunction:this.typeFunction}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,te.watch)(this.service.surface,e),(0,te.watch)(this.service.paper,e))},render:function(e){return(0,te.h)(ct.ELEMENT_DIV,{ref:"root",class:e.className})}};var ae=require("vue"),ut=require("@visuallyjs/browser-ui"),Fo={setup(e){return{service:(0,ae.inject)(p)}},name:Ue,props:{[I]:{type:Object},[R]:{type:String},[Q]:{type:Object},[K]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=(0,ae.markRaw)((0,ut.createDiagram)(e,this.options,this.modelOptions)),this.service.setDiagram(this.diagram),this.data?this.diagram.load({data:this.data}):this.url&&this.diagram.load({url:this.url})},render:function(){return(0,ae.h)(ut.ELEMENT_DIV,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var oe=require("vue"),P=require("@visuallyjs/browser-ui"),nr={[q]:{type:String},[I]:{type:Object},[R]:{type:String},[Xt]:{type:Boolean,default:!1}},ir={setup(){return{service:(0,oe.inject)(p)}},render:function(){return(0,oe.h)(P.ELEMENT_DIV,{class:`${this.className}`,ref:"root"})}};function W(e,t,r=!0){let o=ye(Z({},nr),{[K]:{type:Object}}),s={[I]:function(n){this.chart&&this.chart.load({data:n})},[R]:function(n){this.chart&&this.chart.load({url:n})},[K]:{handler:function(){this.o()},deep:!0}};r&&(o[ot]={type:Function},s[ot]=function(n){this.chart.setDataSourceFilter(n)});let c={o:function(){this.chart&&this.chart.destroy();let n=this.$refs.root,l=r?Object.assign({dataSourceFilter:this.dataSourceFilter},this.options):this.options;this.data&&(l.data=this.data),this.url&&(l.url=this.url);let a=()=>{this.chart=new t(n,l)};if(this.useModel)if(this.service.model.value!=null)l.dataSource=this.service.model.value,a();else{let f=(0,oe.watch)(this.service.model,h=>{h!=null&&(l.dataSource=h,a(),f())})}else a()}};return ye(Z({},ir),{name:e,props:o,watch:s,data:()=>({hasMounted:!1}),methods:c,mounted(){this.o()}})}var dt=W(je,P.ColumnChart),mt=W(ke,P.BarChart),ht=W(Fe,P.CategoryValueChart,!1),ft=W(We,P.PieChart),Pt=W(He,P.LineChart),Ot=W($e,P.AreaChart),Et=W(ze,P.ScatterChart),gt=W(Ke,P.BubbleChart),yt=W(Je,P.GaugeChart,!1),Ct=ye(Z({},ir),{name:Ye,props:ye(Z({},nr),{[rt]:{type:String},[nt]:{type:Object},[Jt]:{type:Boolean},[Yt]:{type:String},[K]:{type:Object}}),data:()=>({chart:null}),methods:{o:function(){this.chart&&this.chart.destroy();let e=this.$refs.root,t=Object.assign({},this.options);this.interactive!=null&&(t.interactive=this.interactive),this.pivot!=null&&(t.pivot=this.pivot),this.csvData&&(t.csvData=this.csvData),this.jsonData&&(t.jsonData=this.jsonData),this.url&&(t.url=this.url);let r=()=>{this.chart=new P.SankeyChart(e,t)};if(this.useModel)if(this.service.model.value==null){let o=(0,oe.watch)(this.service.model,s=>{s!=null&&(t.dataSource=s,r(),o())})}else t.dataSource=this.service.model.value,r();else r()}},mounted(){this.o()},watch:{pivot(e){this.chart&&this.chart.pivot(e)},[rt](e){this.chart&&this.chart.load({csvData:e})},[nt](e){this.chart&&this.chart.load({jsonData:e})},[R](e){this.chart&&this.chart.load({url:e})},[K]:{handler:function(){this.o()},deep:!0}}});var le=require("vue"),pe=require("@visuallyjs/browser-ui"),Ho={setup(e){return{service:(0,le.inject)(p)}},name:Ve,props:{[H]:{type:String},[Zt]:{type:String},[qt]:{type:Function},[Qt]:{type:Function},[eo]:{type:Function},[to]:{type:[Boolean,Function],default:!1},[oo]:{type:Boolean,default:!0},[ro]:{type:Boolean,default:!0},[no]:{type:Boolean,default:!1},[io]:{type:Boolean,default:!1},[ho]:Object,[so]:Function,[fo]:Function,[q]:String,[Kt]:String,[ao]:{type:Boolean,default:!1},[po]:{type:Boolean,default:!1},[lo]:{type:Boolean,default:!1},[co]:{type:Boolean,default:!0},[uo]:{type:Number,default:2e3},[mo]:{type:[Boolean,Object],default:!1}},mounted:function(){let e=t=>{let r={source:this.$refs.root,selector:this.selector,dataGenerator:o=>this.dataGenerator?this.dataGenerator(o):(0,pe.defaultDataGenerator)(o),allowDropOnEdge:this.allowDropOnEdge===!0,allowDropOnGroup:this.allowDropOnGroup!==!1,allowDropOnCanvas:this.allowDropOnCanvas!==!1,allowDropOnNode:this.allowDropOnNode===!0,ignoreDropOnNode:this.ignoreDropOnNode===!0,canvasDropFilter:this.canvasDropFilter,onVertexAdded:this.onVertexAdded,dragSize:this.dragSize,mode:this.mode,allowRotation:this.allowRotation!==!1,rotationSpeed:this.rotationSpeed||2e3,autoEdgeConnect:this.autoEdgeConnect};this.groupIdentifier!=null&&(r.groupIdentifier=this.groupIdentifier),this.typeGenerator!=null&&(r.typeGenerator=this.typeGenerator),this.palette=new pe.Palette(t,r)};this.service.surface.value==null?(0,le.watch)(this.service.surface,e):e(this.service.surface.value)},render:function(){return(0,le.h)(pe.ELEMENT_DIV,{ref:"root",class:this.className||""},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var sr=require("vue"),Tt={setup(){(0,sr.provide)(p,new w("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ar=require("vue"),_t={setup(){(0,ar.provide)(p,new w("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ce=require("vue"),U=require("@visuallyjs/browser-ui"),St={name:ve,props:{data:{type:Object},showLabels:{type:Boolean,default:!1},labelProperty:{type:String,default:"label"},labelStrokeWidth:{type:Number},labelPosition:{type:Object,default:"center"},multilineLabels:{type:Boolean,default:!0},labelFillRatio:{type:Number,default:U.DEFAULT_LABEL_FILL_RATIO},labelColor:{type:String,default:"#000000"},font:{type:Object}},setup(){return{service:(0,ce.inject)(p)}},mounted(){let e=t=>{let r=t.getShapeLibrary(),o=r.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.appendChild(o),this.showLabels){let s=r.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(s),this.multilineLabels!=!1&&(0,U.convertToMultilineText)(s,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||U.DEFAULT_LABEL_FILL_RATIO),this.labelPosition)}};this.service.ui.value==null?(0,ce.watch)(this.service.ui,e):e(this.service.ui.value)},updated(){let e=this.service.surface.value;if(e){let t=e.getShapeLibrary(),r=t.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.replaceChildren(r),this.showLabels){let o=t.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(o),this.multilineLabels!=!1&&(0,U.convertToMultilineText)(o,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||U.DEFAULT_LABEL_FILL_RATIO),this.labelPosition)}}},render:function(){return(0,ce.h)(U.ELEMENT_SVG,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:U.CLASS_SHAPE})},methods:{getWidth:function(){return this.data.width||Po},getHeight:function(){return this.data.height||Oo},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};var ue=require("vue"),vt=require("@visuallyjs/browser-ui"),Rt={name:Re,props:{surfaceId:{type:String},dragSize:Object,iconSize:Object,fill:String,outline:String,showAllMessage:String,selectAfterDrop:Boolean,paletteStrokeWidth:Number,dataGenerator:Function,initialSet:String,mode:String,allowClickToAdd:Boolean,onVertexAdded:Function,showLabels:Boolean,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:(0,ue.inject)(p)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new vt.ShapePalette(t,{container:this.$refs.container,shapeLibrary:t.getShapeLibrary(),dragSize:this.dragSize,iconSize:this.iconSize,fill:this.fill,outline:this.outline,showAllMessage:this.showAllMessage,selectAfterDrop:this.selectAfterDrop,paletteStrokeWidth:this.paletteStrokeWidth,dataGenerator:this.dataGenerator,initialSet:this.initialSet,mode:this.mode,allowClickToAdd:this.allowClickToAdd,onVertexAdded:this.onVertexAdded,showLabels:this.showLabels,inspector:this.inspector,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.service.surface.value==null?(0,ue.watch)(this.service.surface,e):e(this.service.surface.value)},render:function(){return(0,ue.h)(vt.ELEMENT_DIV,{ref:"container"})}};var G=require("vue"),de=require("@visuallyjs/browser-ui"),F=Symbol.for("VueInspectorGetter"),lr=Symbol.for("VueInspectorSetter");function pr(){let e=[],t=null;function r(c){try{c(t)}catch(n){(0,de.log)("WARN: inspector listener threw an exception",n)}}let o={listen:c=>{t!=null?r(c):e.push(c)}},s={inspector:c=>{t=c,e.forEach(r)}};return(0,G.provide)(lr,s),(0,G.provide)(F,(0,G.readonly)(o)),s}var Nt={name:Xe,props:{autoCommit:{type:Boolean,default:!0},multipleSelections:{type:Boolean,default:!0},filter:Function,renderEmptyContainer:Function,refresh:Function,className:String,showCloseButton:Boolean,afterUpdate:Function,modelValue:Object},emits:["update:modelValue"],setup(e,t){let r=pr();return{service:(0,G.inject)(p),inspectorProvider:r,inspector:null,emit:t.emit}},mounted(){let e=t=>{if(this.inspector==null){let r=new de.Inspector({container:this.$refs.root,ui:t,renderEmptyContainer:()=>(this.emit("update:modelValue",null),this.renderEmptyContainer?this.renderEmptyContainer():""),refresh:(o,s)=>{this.emit("update:modelValue",o),this.refresh&&this.refresh(o),setTimeout(s)},autoCommit:this.autoCommit,multipleSelections:this.multipleSelections,filter:this.filter,showCloseButton:this.showCloseButton,afterUpdate:()=>this.afterUpdate?this.afterUpdate(t):null});this.inspectorProvider.inspector(r)}};this.service.surface.value==null?(0,G.watch)(this.service.surface,e):e(this.service.surface.value)},render(){return(0,G.h)(de.ELEMENT_DIV,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var At=require("vue"),me=require("@visuallyjs/browser-ui"),he={name:Ne,props:{propertyName:String},setup(){return{inspectorProvider:(0,At.inject)(F)}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{let t=new me.EdgeTypePicker(e.$ui,this.$refs.container,e.$ui.$getEdgePropertyMappings(),e.getValue(this.propertyName),(r,o)=>{e.setValue(this.propertyName,o,null)});t.render(this.propertyName,e.f),e.onChange(()=>{t.reset(),t.select(this.propertyName,e.getValue(this.propertyName))})}):(0,me.log)("WARN: EdgeTypePicker not instantiated inside an InspectorComponent. Cannot mount.")},render:function(){return(0,At.h)(me.ELEMENT_DIV,{ref:"container"})}};var re=require("vue"),g=require("@visuallyjs/browser-ui"),$o={render(){let e=this.swatches.map(t=>(0,re.h)(g.ELEMENT_DIV,{title:t,class:g.CLASS_COLOR_PICKER_SWATCH,style:`background-color:${t}`,"data-color":t,onClick:()=>this.selectSwatch(t)}));return(0,re.h)(g.ELEMENT_DIV,{class:`${g.CLASS_COLOR_PICKER}`},[(0,re.h)("input",{type:"color","vjs-att":this.propertyName,ref:"colorInput"}),(0,re.h)(g.ELEMENT_DIV,{class:g.CLASS_COLOR_PICKER_SWATCHES},e)])},props:{propertyName:String,maxColors:{type:Number,default:10}},data:()=>({CLASS_COLOR_PICKER:g.CLASS_COLOR_PICKER,CLASS_COLOR_PICKER_SWATCHES:g.CLASS_COLOR_PICKER_SWATCHES,CLASS_COLOR_PICKER_SWATCH:g.CLASS_COLOR_PICKER_SWATCH,colorInput:null,swatches:[]}),mounted(){let e=(0,re.inject)(F);e&&e.listen(t=>{this.inspector=t,this.swatches=t.ensureContext(g.INSPECTOR_CONTEXT_RECENT_COLORS,()=>[]),this.colorInput=this.$refs.colorInput,this.colorInput.addEventListener("change",this.colorPicked),t.bind(g.EVENT_CONTEXT_UPDATE,r=>{r.key===g.INSPECTOR_CONTEXT_RECENT_COLORS&&(this.swatches=r.value.slice())}),t.bind("change",this.setCurrentColor),this.setCurrentColor()})},methods:{addColor:function(e){let t=this.inspector.ensureContext(g.INSPECTOR_CONTEXT_RECENT_COLORS,()=>[]);if(e=e.toUpperCase(),!(t.find(o=>o.toUpperCase()===e)!=null)){let o=this.maxColors||10,s=t.slice();s.unshift(e),s.length>o&&(s.length=o),this.inspector.updateContext(g.INSPECTOR_CONTEXT_RECENT_COLORS,s)}},colorPicked:function(){let e=this.colorInput.value;this.inspector.setValue(this.propertyName,e,null),this.addColor(e)},selectSwatch:function(e){this.inspector.setValue(this.propertyName,e,null),this.colorInput.value=e},setCurrentColor:function(){let e=this.inspector.getValue(this.propertyName);e!=null&&(this.colorInput.value=e,this.addColor(e))}}};var N=require("vue"),fe=require("@visuallyjs/browser-ui"),xt={props:{placement:{type:String,default:"floating"},position:{type:Object},constraints:{type:Object}},data:()=>({hasMounted:!1,surface:null}),setup(e){return{service:(0,N.inject)(p)}},mounted(){let e=t=>{if(!this.hasMounted){this.surface=t,this.hasMounted=!0;let r=this.position||{x:0,y:0};(0,N.nextTick)().then(()=>{this.placement==="floating"?t.floatElement(this.$refs.root,r):t.fixElement(this.$refs.fixedEl,r,this.constraints)})}};this.service.surface.value==null?(0,N.watch)(this.service.surface,e):e(this.service.surface.value)},render(){return(0,N.h)(fe.ELEMENT_DIV,{ref:"root"},this.hasMounted?this.placement==="floating"?(0,N.h)(fe.ELEMENT_DIV,{},this.$slots.hasOwnProperty("default")?this.$slots.default():[]):(0,N.h)(N.Teleport,{to:this.surface.vertexLayer,key:(0,fe.uuid)()},(0,N.h)(fe.ELEMENT_DIV,{ref:"fixedEl"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])):[])}};var cr=require("vue"),Dt={setup(){(0,cr.provide)(p,new w("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var Pe=require("vue"),Oe=require("@visuallyjs/browser-ui"),It={name:Ge,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,iconSize:Object,showLabels:Boolean,paletteStrokeWidth:Number,showAllMessage:String,onCellAdded:Function,mode:String,allowClickToAdd:Boolean,autoExitDrawMode:Boolean,selectAfterAdd:{type:Boolean,default:!0},className:String,diagram:{type:Object},onVertexAdded:Function,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:(0,Pe.inject)(p)}},data:()=>({hasMounted:!1}),mounted(){if(this.service==null&&this.diagram==null)(0,Oe.log)("Cannot mount DiagramPalette - no service found and Diagram not passed in as a prop");else{let e=t=>{this.hasMounted||(this.hasMounted=!0,new Oe.DiagramPalette(this.$refs.container,t,{fill:this.fill,outline:this.outline,dragSize:this.dragSize,inspector:this.inspector,iconSize:this.iconSize,showLabels:this.showLabels,paletteStrokeWidth:this.paletteStrokeWidth,showAllMessage:this.showAllMessage,onCellAdded:this.onCellAdded,mode:this.mode,allowClickToAdd:this.allowClickToAdd,autoExitDrawMode:this.autoExitDrawMode,selectAfterAdd:this.selectAfterAdd,onVertexAdded:this.onVertexAdded,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.diagram?e(this.diagram):this.service.diagram.value!=null?e(this.service.diagram.value):(0,Pe.watch)(this.service.diagram,e)}},render:function(){return(0,Pe.h)(Oe.ELEMENT_DIV,{ref:"container"})}};var M=require("@visuallyjs/browser-ui"),A=require("vue"),bt={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=(0,A.inject)(p),r=(0,A.ref)(null),o=(0,A.ref)("block"),s=(0,A.ref)(null),c=(0,A.ref)(null),n=l=>{c.value=new M.PopupHandler(e.selector,s.value,l,a=>{r.value=a,a==null?o.value=M.NONE:(o.value=M.BLOCK,requestAnimationFrame(()=>c.value.$positionPopup()))},e.anchor)};return(0,A.onMounted)(()=>{t.surface.value==null?(0,A.watch)(t.surface,n):n(t.surface.value)}),{service:t,current:r,display:o,rootRef:s,handler:c}},render(){var e;return(0,A.h)(M.ELEMENT_DIV,{ref:"rootRef",display:this.display,position:M.ABSOLUTE,class:M.CLASS_SURFACE_POPUP},this.$slots.hasOwnProperty("default")?this.$slots.default({vertex:this.current,model:(e=this.service.surface.value)==null?void 0:e.model,ui:this.service.surface.value,hide:()=>{var t;return(t=this.handler)==null?void 0:t.$hide()}}):[])}};var _=require("vue"),j=require("@visuallyjs/browser-ui"),Wo={setup(){return{service:(0,_.inject)(p)}},name:Ae,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:j.BackgroundPlugin.type,options:this.options})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}},zo={setup(){return{service:(0,_.inject)(p)}},name:xe,props:{grid:{type:Object},showBorder:{type:Boolean},minWidth:{type:Number},minHeight:{type:Number},showTickMarks:{type:Boolean},tickMarksPerCell:{type:Number},maxWidth:{type:Number},maxHeight:{type:Number},autoShrink:{type:Boolean},gridType:{type:String},dotRadius:{type:Number},tickDotRadius:{type:Number},visible:{type:Boolean}},mounted:function(){let e=t=>{t.addPlugin({type:j.BackgroundPlugin.type,options:{type:j.GeneratedGridBackground.type,grid:this.grid,showBorder:this.showBorder,minWidth:this.minWidth,minHeight:this.minHeight,showTickMarks:this.showTickMarks,tickMarksPerCell:this.tickMarksPerCell,maxWidth:this.maxWidth,maxHeight:this.maxHeight,autoShrink:this.autoShrink,gridType:this.gridType,dotRadius:this.dotRadius,tickDotRadius:this.tickDotRadius,visible:this.visible}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}},Ko={setup(){return{service:(0,_.inject)(p)}},name:De,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:j.BackgroundPlugin.type,options:{type:j.SimpleBackground.type,url:this.url}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}},Jo={setup(){return{service:(0,_.inject)(p)}},name:Ie,props:{url:{type:String},urlGenerator:{type:Function},tileSize:{type:Object},width:{type:Number},height:{type:Number},maxZoom:{type:Number},tiling:{type:String},panDebounceTimeout:{type:Number},zoomDebounceTimeout:{type:Number}},mounted:function(){let e=t=>{t.addPlugin({type:j.BackgroundPlugin.type,options:{type:j.TiledBackground.type,url:this.url,urlGenerator:this.urlGenerator,tileSize:this.tileSize,width:this.width,height:this.height,tiling:this.tiling,panDebounceTimeout:this.panDebounceTimeout,zoomDebounceTimeout:this.zoomDebounceTimeout}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):((0,_.watch)(this.service.surface,e),(0,_.watch)(this.service.paper,e))},render:function(e){return[]}};var ne=require("vue"),J=require("@visuallyjs/browser-ui"),Mt={name:Ze,props:{getPropertyName:Function,showName:{type:Boolean,default:!0},cssClass:String,mappings:Array},setup(){return{inspectorProvider:(0,ne.inject)(F)}},data(){return{inspector:null}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{this.inspector=e}):(0,J.log)("WARN: EdgePropertyMappingsInspector not instantiated inside an InspectorComponent.")},methods:{resolveMappings(){return this.mappings?this.mappings:this.inspector?this.inspector.getFromContext(J.INSPECTOR_CONTEXT_EDGE_PROPERTY_MAPPINGS)||this.inspector.$ui.$getEdgePropertyMappings():[]},toList(e){let t=e.property;return Array.isArray(t)?t:[t]},getPropertyKey(e){return this.toList(e).join(" ")},getName(e){return this.getPropertyName?this.getPropertyName(e):e.name||this.getPropertyKey(e)}},render(){let e=this.resolveMappings(),t=this.cssClass||"vjs-inspector-section";return(0,ne.h)(J.ELEMENT_DIV,{},e.map(r=>{let o=this.getPropertyKey(r),s=this.getName(r),c=[];return this.showName!==!1&&c.push((0,ne.h)(J.ELEMENT_DIV,{},s)),c.push((0,ne.h)(he,{propertyName:o})),(0,ne.h)(J.ELEMENT_DIV,{class:t,key:o},c)}))}};var m=require("vue"),S=require("@visuallyjs/browser-ui"),Lr=7,Ur=["True","False"];function wt(e,t){return(e.booleanLabels||Ur)[t?0:1]}function Y(e){return(0,S.isString)(e)?e:e.label}function Vt(e){return(0,S.isString)(e)?e:e.value}var Bt={name:qe,props:{vertex:Object,maxRadios:Number},setup(){return{inspectorProvider:(0,m.inject)(F)}},data(){return{inspector:null}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{this.inspector=e}):(0,S.log)("WARN: ShapePropertiesInspector not instantiated inside an InspectorComponent.")},methods:{resolveShapeDef(){if(this.inspector==null||this.vertex==null||!(0,S.isNode)(this.vertex))return null;let{type:e,category:t}=this.vertex.data;if(!e||!t)return null;let o=this.inspector.$ui.getShapeLibrary().getShapeSet(t);return o?o.shapes.find(s=>s.type===e):null}},render(){let e=this.vertex;if(!e||!(0,S.isNode)(e))return null;let t=this.resolveShapeDef();if(!t||!t.properties)return null;let r=this.maxRadios==null?Lr:this.maxRadios;return t.properties.map(o=>{let s=o.type==="boolean",c=o.values&&o.values.length>0,n=c&&o.editor!=="select"&&o.values.length<=r,l=[];return(!s||o.editor==="select"||o.editor==="radio")&&l.push((0,m.h)("label",{class:"vjs-inspector-property-label"},o.label||o.id)),o.type==="string"?c?n?l.push((0,m.h)(S.ELEMENT_DIV,{class:"vjs-radio-group"},o.values.map(a=>(0,m.h)("label",{key:Y(a)},[(0,m.h)("input",{type:"radio",name:o.id,"vjs-att":o.id,value:Vt(a)})," "+Y(a)])))):l.push((0,m.h)("select",{"vjs-att":o.id},o.values.map(a=>(0,m.h)("option",{key:Y(a),value:Vt(a)},Y(a))))):l.push((0,m.h)("input",{type:"text","vjs-att":o.id,placeholder:o.description})):o.type==="number"?c?n?l.push((0,m.h)(S.ELEMENT_DIV,{class:"vjs-radio-group"},o.values.map(a=>(0,m.h)("label",{key:Y(a)},[(0,m.h)("input",{type:"radio","vjs-att":o.id,value:Vt(a)})," "+Y(a)])))):l.push((0,m.h)("select",{"vjs-att":o.id},o.values.map(a=>(0,m.h)("option",{key:Y(a),value:Vt(a)},Y(a))))):l.push((0,m.h)("input",{type:"number","vjs-att":o.id,placeholder:o.description,min:o.min,max:o.max})):s?o.editor==="select"?l.push((0,m.h)("select",{"vjs-att":o.id,"vjs-datatype":"boolean"},[(0,m.h)("option",{value:""}),(0,m.h)("option",{value:"true"},wt(o,!0)),(0,m.h)("option",{value:"false"},wt(o,!1))])):o.editor==="radio"?l.push((0,m.h)(S.ELEMENT_DIV,{class:"vjs-radio-group"},[(0,m.h)("label",[(0,m.h)("input",{type:"radio",name:o.id,"vjs-att":o.id,"vjs-datatype":"boolean",value:"true"}),(0,m.h)("span",wt(o,!0))]),(0,m.h)("label",[(0,m.h)("input",{type:"radio",name:o.id,"vjs-att":o.id,"vjs-datatype":"boolean",value:"false"}),(0,m.h)("span",wt(o,!1))])])):l.push((0,m.h)("label",[(0,m.h)("input",{type:"checkbox","vjs-datatype":"boolean","vjs-att":o.id})," "+(o.label||o.id)])):l.push((0,m.h)("input",{type:"text","vjs-att":o.id,placeholder:o.description})),o.description&&l.push((0,m.h)(S.ELEMENT_DIV,{class:"vjs-field-desc"},o.description)),(0,m.h)(S.ELEMENT_DIV,{key:o.id,class:"vjs-inspector-field"},l)})}};var Gr={install:function(e,t){e.component(To,Tt),e.component(_o,_t),e.component(So,Dt),e.component(Me,wo),e.component(we,Vo),e.component(Ue,Fo),e.component(be,ko),e.component(Be,Go),e.component(Le,jo),e.component(Ae,Wo),e.component(xe,zo),e.component(De,Ko),e.component(Ie,Jo),e.component(Ve,Ho),e.component(Ge,It),e.component(ke,mt),e.component(je,dt),e.component(Fe,ht),e.component(He,Pt),e.component($e,Ot),e.component(We,ft),e.component(Ye,Ct),e.component(Je,yt),e.component(Ke,gt),e.component(ze,Et),e.component(ve,St),e.component(Re,Rt),e.component(Ne,he),e.component(Eo,$o),e.component(Xe,Nt),e.component(Ze,Mt),e.component(qe,Bt),e.component(Ro,xt),e.component(vo,bt),e.provide(p,new w("root"))}};var Ee=require("vue"),Lt=require("@visuallyjs/browser-ui"),ur=require("vue");function jr(){let e=(0,ur.inject)(p),t=(0,Ee.shallowRef)(null),r=(0,Ee.shallowRef)(null),o=(0,Ee.shallowRef)(null),s=(0,Ee.ref)(1);return e==null||e.getSurface(c=>{r.value=c,r.value.bind(Lt.EVENT_ZOOM,n=>{s.value=n.zoom})}),e==null||e.getDiagram(c=>{t.value=c,t.value.$ui.bind(Lt.EVENT_ZOOM,n=>{s.value=n.zoom})}),e==null||e.getPaper(c=>{o.value=c,o.value.bind(Lt.EVENT_ZOOM,n=>{s.value=n.zoom})}),s}var Ut=require("vue"),ge=require("@visuallyjs/browser-ui");function kr(e){let t=(0,Ut.inject)(p);if(t){let r=null,o=()=>{r&&e(r)},s=()=>{r&&(r.unbind(ge.EVENT_DATA_UPDATED,o),r.unbind(ge.EVENT_GRAPH_CLEARED,o))},c=n=>{s(),r=n,r&&(r.bind(ge.EVENT_DATA_UPDATED,o),r.bind(ge.EVENT_GRAPH_CLEARED,o),o())};t.getModel(n=>{c(n)}),(0,Ut.onUnmounted)(()=>{s()})}}var dr=require("vue"),mr=require("vue");function Fr(){let e=(0,mr.inject)(p),t=(0,dr.shallowRef)(null);return e==null||e.getSurface(r=>{t.value=r}),t}var hr=require("vue"),fr=require("vue");function Hr(){let e=(0,fr.inject)(p),t=(0,hr.shallowRef)(null);return e==null||e.getDiagram(r=>{t.value=r}),t}var Pr=require("vue"),Or=require("vue");function $r(){let e=(0,Or.inject)(p),t=(0,Pr.shallowRef)(null);return e==null||e.getPaper(r=>{t.value=r}),t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Ko=Object.defineProperty,Jo=Object.defineProperties;var Yo=Object.getOwnPropertyDescriptors;var ot=Object.getOwnPropertySymbols;var Xo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable;var rt=(e,t,o)=>t in e?Ko(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,x=(e,t)=>{for(var o in t||(t={}))Xo.call(t,o)&&rt(e,o,t[o]);if(ot)for(var o of ot(t))Zo.call(t,o)&&rt(e,o,t[o]);return e},b=(e,t)=>Jo(e,Yo(t));import{log as qo,BrowserUIModel as Qo}from"@visuallyjs/browser-ui";var P=class extends Qo{render(t,o){return qo("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function fs(e){return e=e||{},new P(e)}var nt="surfaceId",it="paperId",st="typeFunction",at="clickToCenter",lt="showLasso",pt="activeTracking",ct="trackSelection",v="surfaceId",ut="paperId",I="className",y="data",dt="mode",M="options",G="renderOptions",w="modelOptions",k="model",F="viewOptions",T="url",j="dataType",mt="interactive",ht="pivot",Re="dataSourceFilter",ft="csvData",Ot="jsonData",Pt="useModel",$s="id",Et="selector",Ct="dataGenerator",yt="typeGenerator",Tt="groupIdentifier",_t="allowDropOnEdge",gt="allowDropOnCanvas",St="allowDropOnGroup",vt="allowDropOnNode",Rt="ignoreDropOnNode",At="onVertexAdded",Nt="selectAfterAdd",xt="clickToAddOnly",Dt="allowClickToAdd",It="allowRotation",wt="rotationSpeed",bt="autoEdgeConnect",Mt="dragSize",Vt="canvasDropFilter",H="Shape",$="ShapePalette",Bt=120,Lt=90,W="EdgeTypePickerComponent",Ut="ColorPickerComponent",Gt="vjs-vue-node",kt="vjs-vue-group",Ft="vjs-vue-overlay",z="BackgroundComponent",K="GridBackgroundComponent",J="ImageBackgroundComponent",Y="TiledImageBackgroundComponent",X="MiniviewComponent",Z="SurfaceComponent",jt="SurfaceProvider",q="PaperComponent",Ht="PaperProvider",$t="DiagramProvider",Q="PaletteComponent",ee="ControlsComponent",te="ExportControlsComponent",oe="DiagramComponent",re="DiagramPaletteComponent",ne="ColumnChartComponent",ie="BarChartComponent",se="XYChartComponent",ae="LineChartComponent",le="AreaChartComponent",pe="PieChartComponent",ce="ScatterChartComponent",ue="BubbleChartComponent",de="GaugeChartComponent",me="SankeyChartComponent",he="InspectorComponent",Wt="SurfacePopup",zt="Decorator";import{addClass as er,BrowserUI as tr,isGroup as or,Vertex as Kt}from"@visuallyjs/browser-ui";var fe={props:{data:Object,model:P,obj:Kt,vertex:Kt,ui:tr,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=or(e.vertex)?kt:Gt;e.el.firstElementChild&&er(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),Jt(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),Yt(this.ui.id,this.vertex)}};var Xt={mixins:[fe],methods:{getNode:function(){return this.obj},removeNode:function(){this.model.removeNode(this.getNode())},updateNode:function(e){this.model.updateNode(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}}};var Zt={methods:{getGroup:function(){return this.obj},removeGroup:function(e){this.model.removeGroup(this.obj,e)},updateGroup:function(e){this.model.updateGroup(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}},mixins:[fe]};import{markRaw as E}from"vue";import{addClass as rr,BrowserUI as nr,CLASS_DEFAULT_GROUP as ir,CLASS_DEFAULT_NODE as sr,ELEMENT_DIV as qt,extend as Qt,isGroup as ar,OptimisticEventGenerator as lr,renderSurface as pr,updateClasses as cr,Overlay as ur,Edge as eo,OVERLAY_TYPE_CUSTOM as dr,uuid as mr,renderPaper as hr}from"@visuallyjs/browser-ui";var Ae=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new lr;this.hasRendered=!1}vertexWillRender(t){this.unrenderedVertices.set(t.id,t),this.hasRendered=!1}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&(this.hasRendered=!0,this.eventManager.fire(Ne))}vertexHasUpdated(t){this.eventManager.fire(fr,t)}},Ne="vertices:rendered",fr="vertex:updated",xe=new Map;function Oe(e){return xe.has(e)||xe.set(e,new Ae),xe.get(e)}function Jt(e,t){Oe(e).vertexHasRendered(t)}function Yt(e,t){Oe(e).vertexHasUpdated(t)}function Or(e,t){Oe(e).vertexWillRender(t)}function Aa(e,t,o){let n=Oe(e);n&&(n.eventManager.bind(t,o),t===Ne&&n.hasRendered&&n.eventManager.fire(Ne))}var Pe=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},to={props:{data:Object,model:P,obj:eo,edge:eo,overlay:ur,ui:nr,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&rr(e.el.firstElementChild,Ft)},updated(){this.ui.$revalidateElement(this.el)}},Ee=(e,t,o,n,i,p,r,a,l)=>{let d=r.component!=null,u=ar(a),h=[];d||h.push(u?ir:sr);let m=d?r.component:{render(f){return f.data.label||""}};if(m){let f=document.createElement(qt);cr(f,h),m.mixins==null&&(m.mixins=[]);let O=u?Zt:Xt;m.mixins.find(C=>C===O)||m.mixins.push(O),Or(p.id,a);let D={data:o,model:E(n),ui:E(p),obj:E(a),vertex:E(a),el:f,def:E(r),eventInfo:l==null?null:E(l)};if(r.inject)for(let C in r.inject){let N=r.inject[C],zo=typeof N=="function"?N(a,n):N;D[C]=zo}e.push({component:E(m),el:f,t:a.getFullId(),props:D,vertex:a})}};function oo(e,t,o,n,i,p){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(l,d,u,h)=>{},render:(l,d,u,h,m,f,O,S)=>Ee(n,l,d,u,h,m,f,O,S),cleanupVertex:Pe,cleanupPort:Pe,rerender:(l,d,u,h,m,f,O,S,D)=>{let C=n.findIndex(N=>N.vertex===O);C!=null&&n.splice(C,1)[0].el,m.$__unmanage(D,!0,!0),requestAnimationFrame(()=>{Ee(n,l,d,u,h,m,f,O,S)})}},a=Qt(i||{},{view:p||{},id:t});return pr(e,o,r,a)}function ro(e,t,o,n,i,p){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(l,d,u,h)=>{},render:(l,d,u,h,m,f,O,S)=>Ee(n,l,d,u,h,m,f,O,S),cleanupVertex:Pe,cleanupPort:Pe,rerender:(l,d,u,h,m,f,O,S,D)=>{let C=n.findIndex(N=>N.vertex===O);C!=null&&n.splice(C,1)[0].el,m.$__unmanage(D,!0,!0),requestAnimationFrame(()=>{Ee(n,l,d,u,h,m,f,O,S)})}},a=Qt(i||{},{view:p||{},id:t});return hr(e,o,r,a)}function Ce(e,t,o,n){if(e.edges)for(let i in e.edges){let p=e.edges[i];p.overlays&&(p.overlays=p.overlays.map(r=>{let a={};return r.component!=null?{type:dr,options:{create:d=>{let u=document.createElement(qt),h=mr();r.component.mixins==null&&(r.component.mixins=[]),r.component.mixins.indexOf(to)===-1&&r.component.mixins.push(to);let m=x({data:d.edge.data,model:E(o()),ui:E(t()),obj:d.edge,edge:d.edge,el:u,def:E(r),eventInfo:null,overlay:r},a);return n.push({component:E(r.component),el:u,t:h,props:m}),u}}}:r}))}}import{log as no,Paper as Pr,Surface as Er}from"@visuallyjs/browser-ui";import{shallowRef as V}from"vue";var s=Symbol.for("visuallyjs-service"),_=class{constructor(t){this.context=t;this.s=[];this.a=[];this.l=[];this.p=[];this.surface=V(null);this.model=V(null);this.paper=V(null);this.diagram=V(null);this.ui=V(null)}getSurface(t){this.o(this.a,t,this.c)}getDiagram(t){this.o(this.l,t,this.u)}getPaper(t){this.o(this.p,t,this.m)}getModel(t){this.o(this.s,t,this.n)}getModelDirect(){return this.n}o(t,o,n){if(n!=null)try{o(n)}catch(i){no(`WARN: could not dispatch ${i}`)}else t.push(o)}setSurface(t){this.surface.value=t,this.model.value=t.model,this.ui.value=t,this.c=t,this.i(t.model),this.r(this.a,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.u=t,this.i(t.model),t.$ui instanceof Er?this.setSurface(t.$ui):t.$ui instanceof Pr&&this.setPaper(t.$ui),this.r(this.l,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.m=t,this.i(t.model),this.r(this.p,t)}i(t){this.n=t,this.r(this.s,t)}r(t,o){t.forEach(n=>{try{n(o)}catch(i){no(`WARN: could not flush all queue entries ${i}`)}})}};import{h as B,inject as Cr,Teleport as io}from"vue";import{ELEMENT_DIV as yr,EVENT_GROUP_REMOVED as Tr,EVENT_GROUP_UPDATED as _r,EVENT_NODE_REMOVED as gr,EVENT_NODE_UPDATED as Sr,EVENT_RENDER_END as vr,clone as so,EVENT_EDGE_UPDATED as Rr,EVENT_EDGE_REMOVED as Ar,EVENT_GRAPH_CLEARED as Nr}from"@visuallyjs/browser-ui";var ao={setup(e){return{service:Cr(s),surfaceId:e.surfaceId||nt}},name:Z,props:{[y]:{type:Object},[G]:{type:Object},[w]:{type:Object},[F]:{type:Object},[k]:{type:Object},[T]:{type:String},[j]:{type:String},[v]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new P(this.modelOptions||{}),o=this.$refs.root;e.e=!1;let n=so(this.viewOptions||{});Ce(n,()=>this.surface,()=>t,this.overlays),this.surface=oo(t,this.surfaceId,o,this.vertices,so(this.renderOptions||{}),n),this.service.setSurface(this.surface);let i=(r,a)=>{let l=()=>{let u={};return a.originalData||a.updates?u=Object.assign(a.originalData,a.updates):a.newData&&Object.assign(u,a.newData),u},d=this.vertices.find(u=>u.t===r);d!=null&&(d.props.data=l())},p=r=>{let a=this.vertices.findIndex(l=>l.t===r);a!==-1&&this.vertices.splice(a,1)};t.bind(Sr,r=>{i(r.vertex.getFullId(),r)}),t.bind(_r,r=>{i(r.vertex.getFullId(),r)}),t.bind(gr,r=>{p(r.node.id)}),t.bind(Tr,r=>{p(r.group.id)}),t.bind(Rr,r=>{let a=r.edge.id;this.overlays.forEach(l=>{l.props.edge&&l.props.edge.id===a&&(l.props.data=r.edge.data)})}),t.bind(Ar,r=>{let a=r.edge.id,l=this.overlays.length-1;for(;l>=0;)this.overlays[l].props.edge&&this.overlays[l].props.edge.id===a&&this.overlays.splice(l,1),l--}),t.bind(Nr,()=>{this.vertices.length=0,this.overlays.length=0}),this.surface.bind(vr,()=>setTimeout(()=>this.surface.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[y]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({data:e,dataType:this.dataType})}))}},[T]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>B(io,{to:t.el,key:t.t},[B(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(B(io,{to:t.el,key:t.t},[B(t.component,t.props)]))}),B(yr,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};import{h as L,inject as xr,Teleport as lo}from"vue";import{ELEMENT_DIV as Dr,EVENT_GROUP_REMOVED as Ir,EVENT_GROUP_UPDATED as wr,EVENT_NODE_REMOVED as br,EVENT_NODE_UPDATED as Mr,EVENT_RENDER_END as Vr,clone as po,EVENT_EDGE_UPDATED as Br,EVENT_EDGE_REMOVED as Lr,EVENT_GRAPH_CLEARED as Ur}from"@visuallyjs/browser-ui";var co={setup(e){return{service:xr(s),paperId:e.paperId||it}},name:q,props:{[y]:{type:Object},[G]:{type:Object},[w]:{type:Object},[F]:{type:Object},[k]:{type:Object},[T]:{type:String},[j]:{type:String},[ut]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new P(this.modelOptions||{}),o=this.$refs.root;e.e=!1;let n=po(this.viewOptions||{});Ce(n,()=>this.paper,()=>t,this.overlays),this.paper=ro(t,this.paperId,o,this.vertices,po(this.renderOptions||{}),n),this.service.setPaper(this.paper);let i=(r,a)=>{let l=()=>{let u={};return a.originalData||a.updates?u=Object.assign(a.originalData,a.updates):a.newData&&Object.assign(u,a.newData),u},d=this.vertices.find(u=>u.t===r);d!=null&&(d.props.data=l())},p=r=>{let a=this.vertices.findIndex(l=>l.t===r);a!==-1&&this.vertices.splice(a,1)};t.bind(Mr,r=>{i(r.vertex.getFullId(),r)}),t.bind(wr,r=>{i(r.vertex.getFullId(),r)}),t.bind(br,r=>{p(r.node.id)}),t.bind(Ir,r=>{p(r.group.id)}),t.bind(Br,r=>{let a=r.edge.id;this.overlays.forEach(l=>{l.props.edge&&l.props.edge.id===a&&(l.props.data=r.edge.data)})}),t.bind(Lr,r=>{let a=r.edge.id,l=this.overlays.length-1;for(;l>=0;)this.overlays[l].props.edge&&this.overlays[l].props.edge.id===a&&this.overlays.splice(l,1),l--}),t.bind(Ur,()=>{this.vertices.length=0,this.overlays.length=0}),this.paper.bind(Vr,()=>setTimeout(()=>this.paper.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[y]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({data:e,dataType:this.dataType})}))}},[T]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>L(lo,{to:t.el,key:t.t},[L(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(L(lo,{to:t.el,key:t.t},[L(t.component,t.props)]))}),L(Dr,{ref:"root",class:"vjs-vue-paper",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};import{h as c,inject as Gr,watch as kr}from"vue";import{LassoPlugin as Fr,SURFACE_MODE_SELECT as uo,SURFACE_MODE_PAN as mo,PAN_PATH as jr,PAN_VIEW_BOX as Hr,LASSO_PATH as $r,LASSO_VIEW_BOX as Wr,UNDO_PATH as zr,UNDO_VIEW_BOX as Kr,REDO_PATH as Jr,REDO_VIEW_BOX as Yr,ZOOM_TO_FIT_PATH as Xr,ZOOM_TO_FIT_VIEW_BOX as Zr,EVENT_UNDOREDO_UPDATE as qr,TRUE as ho,FALSE as fo,EVENT_SURFACE_MODE_CHANGED as Qr,ELEMENT_DIV as Oo,ATTRIBUTE_CONTROLS_ORIENTATION as en,ZOOM_IN_OUT_VIEW_BOX as Po,ZOOM_IN_PATH as tn,ZOOM_OUT_PATH as on,RESET_SELECTION_PATH as rn,RESET_SELECTION_VIEW_BOX as nn,CLEAR_PATH as sn,CLEAR_VIEW_BOX as an,ATTRIBUTE_RESET_SELECTION as ln,CLASS_CONTROLS_RESET_SELECTION as pn,EVENT_SELECT as cn,EVENT_DESELECT as un,EVENT_SELECTION_CLEARED as dn,supportsPathEditing as mn}from"@visuallyjs/browser-ui";var hn="Clear dataset?",De="vjs-selected-mode",Eo="can-undo",Co="can-redo",fn="data-undo",On="data-redo",yo="data-mode",Pn="data-reset",En="data-clear",Cn="data-zoom-in",yn="data-zoom-out",To="vjs-controls-has-selection",_o={setup(e){return{service:Gr(s)}},name:ee,props:{clear:{type:Boolean,default:!0},[v]:{type:String},undoRedo:{type:Boolean,default:!0},orientation:{type:String,default:"row"},zoomToExtents:{type:Boolean,default:!0},zoomButtons:{type:Boolean,default:!1},clearMessage:{type:String,default:hn},onMaybeClear:{type:Function},className:{type:String,default:""}},methods:{panMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(mo)},selectMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(uo)},zoomToFit:function(){var e;(e=this.service.surface.value)==null||e.zoomToFit()},doClear:function(){let e=this.service.surface.value;e&&(this.onMaybeClear!=null?this.onMaybeClear(()=>e.model.clear()):window.confirm(this.clearMessage)&&e.model.clear())},undo:function(){var e;(e=this.service.model.value)==null||e.undo()},redo:function(){var e;(e=this.service.model.value)==null||e.redo()},zoomIn:function(){var e;(e=this.service.surface.value)==null||e.zoomIn()},zoomOut:function(){var e;(e=this.service.surface.value)==null||e.zoomOut()},resetSelection(){let e=this.service.surface.value;e&&(e.model.clearSelection(),mn(e)&&e.stopEditingPath())},updateSelectionState:function(){let e=this.service.surface.value;e&&(e.model.getSelection().isEmpty()?this.$refs.root.removeAttribute(To):this.$refs.root.setAttribute(To,"true"))}},data:function(){return{ready:!1,hasLasso:!1}},render(){if(this.ready){let e=[];return this.showPan&&(e.push(c("i",{class:`vjs-pan-mode ${De}`,[yo]:mo,onClick:()=>this.panMode(),title:"Pan mode"},[c("svg",{viewBox:Hr,stroke:"currentColor",fill:"none"},[c("path",{d:jr})])])),e.push(c("i",{class:"vjs-select-mode",[yo]:uo,onClick:()=>this.selectMode(),title:"Select mode"},[c("svg",{viewBox:Wr,stroke:"currentColor",fill:"currentColor"},[c("path",{d:$r})])]))),this.undoRedo&&(e.push(c("i",{class:"vjs-undo",[fn]:!0,title:"Undo last action",onClick:()=>this.undo()},[c("svg",{viewBox:Kr,stroke:"currentColor",fill:"none"},[c("path",{d:zr,"stroke-width":2})])])),e.push(c("i",{class:"vjs-redo",[On]:!0,title:"Redo last action",onClick:()=>this.redo()},[c("svg",{viewBox:Yr,stroke:"currentColor",fill:"none"},[c("path",{d:Jr,"stroke-width":2})])]))),this.zoomToExtents&&e.push(c("i",{class:"vjs-zoom-to-fit",[Pn]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[c("svg",{viewBox:Zr,stroke:"currentColor",fill:"currentColor"},[c("path",{d:Xr})])])),this.zoomButtons&&(e.push(c("i",{class:"vjs-zoom-in",[Cn]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[c("svg",{viewBox:Po,stroke:"currentColor",fill:"currentColor"},[c("path",{d:tn})])])),e.push(c("i",{class:"vjs-zoom-out",[yn]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[c("svg",{viewBox:Po,stroke:"currentColor",fill:"currentColor"},[c("path",{d:on})])]))),e.push(c("i",{class:pn,[ln]:"true",onClick:()=>{this.resetSelection()}},[c("svg",{viewBox:nn,stroke:"currentColor",fill:"currentColor"},[c("path",{d:rn})])])),this.clear&&e.push(c("i",{class:"vjs-clear-dataset",[En]:"true",onClick:()=>{this.doClear()}},[c("svg",{viewBox:an,stroke:"currentColor",fill:"currentColor"},[c("path",{d:sn})])])),c(Oo,{class:`vjs-controls ${this.className}`,ref:"root",[Eo]:!1,[Co]:!1,[en]:this.orientation},e)}else return c(Oo,{ref:"root"})},mounted(){let e=t=>{let o=t.getPlugin(Fr.type);this.showPan=o!=null,t.bind(Qr,n=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),De),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+n+"']"),De)}),t.model.bind(qr,n=>{this.$refs.root.setAttribute(Eo,n.undoCount>0?ho:fo),this.$refs.root.setAttribute(Co,n.redoCount>0?ho:fo)}),t.model.bind(cn,()=>this.updateSelectionState()),t.model.bind(un,()=>this.updateSelectionState()),t.model.bind(dn,()=>this.updateSelectionState()),this.ready=!0};this.service.surface.value==null?kr(this.service.surface,e):e(this.service.surface.value)}};import{h as R,inject as Tn}from"vue";import{CLASS_CONTROLS as _n,CLASS_EXPORT_CONTROLS as gn,ELEMENT_DIV as Sn,ImageExportUI as go,SvgExportUI as vn,TYPE_JPG as Rn,TYPE_PNG as An,TYPE_SVG as Nn}from"@visuallyjs/browser-ui";var So={name:te,setup(e){return{service:Tn(s)}},props:{surfaceId:{type:String},showLabel:{type:Boolean,default:!0},label:{type:String,default:"Export :"},margins:{type:Object},svgOptions:{type:Object},imageOptions:{type:Object},allowSvgExport:{type:Boolean,default:!0},allowPngExport:{type:Boolean,default:!0},allowJpgExport:{type:Boolean,default:!0}},methods:{loadSurface:function(e){let t=this.service.surface.value;t&&e(t)},exportSVG:function(){this.loadSurface(e=>{let t=this.svgOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new vn(e).export(t)})},exportJPG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),t.type="image/jpeg",new go(e).export(t)})},exportPNG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new go(e).export(t)})}},render(){let e=this.showLabel!==!1,t=this.allowSvgExport!==!1,o=this.allowPngExport!==!1,n=this.allowJpgExport!==!1,i=[];return t&&i.push(R("i",{},[R("a",{href:"#","data-type":Nn,onClick:()=>this.exportSVG()},"SVG")])),o&&i.push(R("i",{},[R("a",{href:"#","data-type":An,onClick:()=>this.exportPNG()},"PNG")])),n&&i.push(R("i",{},[R("a",{href:"#","data-type":Rn,onClick:()=>this.exportJPG()},"JPG")])),e&&i.unshift(R("span",{},[this.label])),R(Sn,{class:`${_n} ${gn}`},i)}};import{h as xn,inject as Dn,watch as vo}from"vue";import{ELEMENT_DIV as In,MiniviewPlugin as wn}from"@visuallyjs/browser-ui";var Ro={setup(e){return{service:Dn(s)}},name:X,props:{[v]:{type:String},[I]:{type:String,default:""},[pt]:{type:Boolean,default:!0},[at]:{type:Boolean,default:!0},[lt]:{type:Boolean,default:!0},[ct]:{type:Boolean,default:!0},[st]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:wn.type,options:{container:this.$el,activeTracking:this.activeTracking,clickToCenter:this.clickToCenter,showLasso:this.showLasso,trackSelection:this.trackSelection,typeFunction:this.typeFunction}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(vo(this.service.surface,e),vo(this.service.paper,e))},render:function(e){return xn(In,{ref:"root",class:e.className})}};import{h as bn,inject as Mn,markRaw as Vn}from"vue";import{createDiagram as Bn,ELEMENT_DIV as Ln}from"@visuallyjs/browser-ui";var Ao={setup(e){return{service:Mn(s)}},name:oe,props:{[y]:{type:Object},[T]:{type:String},[w]:{type:Object},[M]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=Vn(Bn(e,this.options,this.modelOptions)),this.service.setDiagram(this.diagram),this.data?this.diagram.load({data:this.data}):this.url&&this.diagram.load({url:this.url})},render:function(){return bn(Ln,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as No,inject as Un,watch as xo}from"vue";import{ColumnChart as Gn,BarChart as kn,CategoryValueChart as Fn,ELEMENT_DIV as Do,LineChart as jn,AreaChart as Hn,PieChart as $n,ScatterChart as Wn,BubbleChart as zn,GaugeChart as Kn,SankeyChart as Jn}from"@visuallyjs/browser-ui";var Io={[I]:{type:String},[y]:{type:Object},[T]:{type:String},[Pt]:{type:Boolean,default:!1}},wo={setup(){return{service:Un(s)}},render:function(){return No(Do,{class:`${this.className}`,ref:"root"})}};function g(e,t,o=!0){let n=b(x({},Io),{[M]:{type:Object}}),i={};return o&&(n[Re]={type:Function},i[Re]=function(p){this.chart.setDataSourceFilter(p)}),b(x({},wo),{name:e,props:n,watch:i,data:()=>({hasMounted:!1}),mounted(){let p=this.$refs.root,r=o?Object.assign({dataSourceFilter:this.dataSourceFilter},this.options):this.options;this.data&&(r.data=this.data),this.url&&(r.url=this.url);let a=()=>{this.hasMounted=!0,this.chart=new t(p,r)};this.useModel?this.service.model.value!=null?(r.dataSource=this.service.model.value,a()):xo(this.service.model,l=>{this.hasMounted||(r.dataSource=l,a())}):a()}})}var Ie=g(ne,Gn),we=g(ie,kn),be=g(se,Fn,!1),Me=g(pe,$n),Ve=g(ae,jn),Be=g(le,Hn),Le=g(ce,Wn),Ue=g(ue,zn),Ge=g(de,Kn,!1),ke=b(x({},wo),{name:me,props:b(x({},Io),{[ft]:{type:String},[Ot]:{type:Object},[mt]:{type:Boolean},[ht]:{type:String},[M]:{type:Object}}),data:()=>({hasMounted:!1}),mounted(){let e=this.$refs.root,t=Object.assign({},this.options);this.interactive!=null&&(t.interactive=this.interactive),this.pivot!=null&&(t.pivot=this.pivot),this.csvData&&(t.csvData=this.csvData),this.jsonData&&(t.jsonData=this.jsonData),this.url&&(t.url=this.url);let o=()=>{this.hasMounted=!1,this.chart=new Jn(e,t)};if(this.useModel){let n=i=>{this.hasMounted||(t.dataSource=i,o())};this.service.model.value==null?xo(this.service.model,n):n(this.service.model.value)}else o()},watch:{pivot(e){this.chart&&this.chart.pivot(e)}},render:function(){return No(Do,{class:`${this.className}`,ref:"root"})}});import{h as Yn,inject as Xn,watch as Zn}from"vue";import{defaultDataGenerator as qn,ELEMENT_DIV as Qn,Palette as ei}from"@visuallyjs/browser-ui";var bo={setup(e){return{service:Xn(s)}},name:Q,props:{[v]:{type:String},[Et]:{type:String},[Ct]:{type:Function},[yt]:{type:Function},[Tt]:{type:Function},[_t]:{type:[Boolean,Function],default:!1},[gt]:{type:Boolean,default:!0},[St]:{type:Boolean,default:!0},[vt]:{type:Boolean,default:!1},[Rt]:{type:Boolean,default:!1},[Mt]:Object,[At]:Function,[Vt]:Function,[I]:String,[dt]:String,[Nt]:{type:Boolean,default:!1},[Dt]:{type:Boolean,default:!1},[xt]:{type:Boolean,default:!1},[It]:{type:Boolean,default:!0},[wt]:{type:Number,default:2e3},[bt]:{type:[Boolean,Object],default:!1}},mounted:function(){let e=t=>{let o={source:this.$refs.root,selector:this.selector,dataGenerator:n=>this.dataGenerator?this.dataGenerator(n):qn(n),allowDropOnEdge:this.allowDropOnEdge===!0,allowDropOnGroup:this.allowDropOnGroup!==!1,allowDropOnCanvas:this.allowDropOnCanvas!==!1,allowDropOnNode:this.allowDropOnNode===!0,ignoreDropOnNode:this.ignoreDropOnNode===!0,canvasDropFilter:this.canvasDropFilter,onVertexAdded:this.onVertexAdded,dragSize:this.dragSize,mode:this.mode,allowRotation:this.allowRotation!==!1,rotationSpeed:this.rotationSpeed||2e3,autoEdgeConnect:this.autoEdgeConnect};this.groupIdentifier!=null&&(o.groupIdentifier=this.groupIdentifier),this.typeGenerator!=null&&(o.typeGenerator=this.typeGenerator),this.palette=new ei(t,o)};this.service.surface.value==null?Zn(this.service.surface,e):e(this.service.surface.value)},render:function(){return Yn(Qn,{ref:"root",class:this.className||""},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{provide as ti}from"vue";var Fe={setup(){ti(s,new _("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{provide as oi}from"vue";var je={setup(){oi(s,new _("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as ri,inject as ni,watch as ii}from"vue";import{CLASS_SHAPE as si,convertToMultilineText as Mo,DEFAULT_LABEL_FILL_RATIO as He,ELEMENT_SVG as ai}from"@visuallyjs/browser-ui";var $e={name:H,props:{data:{type:Object},showLabels:{type:Boolean,default:!1},labelProperty:{type:String,default:"label"},labelStrokeWidth:{type:Number},multilineLabels:{type:Boolean,default:!0},labelFillRatio:{type:Number,default:He},labelColor:{type:String,default:"#000000"},font:{type:Object}},setup(){return{service:ni(s)}},mounted(){let e=t=>{let o=t.getShapeLibrary(),n=o.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.appendChild(n),this.showLabels){let i=o.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(i),this.multilineLabels!=!1&&Mo(i,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||He))}};this.service.ui.value==null?ii(this.service.ui,e):e(this.service.ui.value)},updated(){let e=this.service.surface.value;if(e){let t=e.getShapeLibrary(),o=t.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.replaceChildren(o),this.showLabels){let n=t.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(n),this.multilineLabels!=!1&&Mo(n,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||He))}}},render:function(){return ri(ai,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:si})},methods:{getWidth:function(){return this.data.width||Bt},getHeight:function(){return this.data.height||Lt},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};import{h as li,inject as pi,watch as ci}from"vue";import{ELEMENT_DIV as ui,ShapePalette as di}from"@visuallyjs/browser-ui";var We={name:$,props:{surfaceId:{type:String},dragSize:Object,iconSize:Object,fill:String,outline:String,showAllMessage:String,selectAfterDrop:Boolean,paletteStrokeWidth:Number,dataGenerator:Function,initialSet:String,mode:String,allowClickToAdd:Boolean,onVertexAdded:Function,showLabels:Boolean,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:pi(s)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new di(t,{container:this.$refs.container,shapeLibrary:t.getShapeLibrary(),dragSize:this.dragSize,iconSize:this.iconSize,fill:this.fill,outline:this.outline,showAllMessage:this.showAllMessage,selectAfterDrop:this.selectAfterDrop,paletteStrokeWidth:this.paletteStrokeWidth,dataGenerator:this.dataGenerator,initialSet:this.initialSet,mode:this.mode,allowClickToAdd:this.allowClickToAdd,onVertexAdded:this.onVertexAdded,showLabels:this.showLabels,inspector:this.inspector,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.service.surface.value==null?ci(this.service.surface,e):e(this.service.surface.value)},render:function(){return li(ui,{ref:"container"})}};import{provide as Vo,readonly as mi,inject as hi,h as fi,watch as Oi}from"vue";import{ELEMENT_DIV as Pi,Inspector as Ei,log as Ci}from"@visuallyjs/browser-ui";var U=Symbol.for("VueInspectorGetter"),yi=Symbol.for("VueInspectorSetter");function Ti(){let e=[],t=null;function o(p){try{p(t)}catch(r){Ci("WARN: inspector listener threw an exception",r)}}let n={listen:p=>{t!=null?o(p):e.push(p)}},i={inspector:p=>{t=p,e.forEach(o)}};return Vo(yi,i),Vo(U,mi(n)),i}var ze={name:he,props:{autoCommit:{type:Boolean,default:!0},multipleSelections:{type:Boolean,default:!0},filter:Function,renderEmptyContainer:Function,refresh:Function,className:String,showCloseButton:Boolean,afterUpdate:Function,modelValue:Object},emits:["update:modelValue"],setup(e,t){let o=Ti();return{service:hi(s),inspectorProvider:o,inspector:null,emit:t.emit}},mounted(){let e=t=>{if(this.inspector==null){let o=new Ei({container:this.$refs.root,ui:t,renderEmptyContainer:()=>(this.emit("update:modelValue",null),this.renderEmptyContainer?this.renderEmptyContainer():""),refresh:(n,i)=>{this.emit("update:modelValue",n),this.refresh&&this.refresh(n),setTimeout(i)},autoCommit:this.autoCommit,multipleSelections:this.multipleSelections,filter:this.filter,showCloseButton:this.showCloseButton,afterUpdate:()=>this.afterUpdate?this.afterUpdate(t):null});this.inspectorProvider.inspector(o)}};this.service.surface.value==null?Oi(this.service.surface,e):e(this.service.surface.value)},render(){return fi(Pi,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as _i,inject as gi}from"vue";import{EdgeTypePicker as Si,ELEMENT_DIV as vi,log as Ri}from"@visuallyjs/browser-ui";var Ke={name:W,props:{propertyName:String},setup(){return{inspectorProvider:gi(U)}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{let t=new Si(e.$ui,this.$refs.container,e.$ui.$getEdgePropertyMappings(),e.getValue(this.propertyName),(o,n)=>{e.setValue(this.propertyName,n,null)});t.render(this.propertyName,e.h),e.onChange(()=>{t.select(this.propertyName,e.getValue(this.propertyName))})}):Ri("WARN: EdgeTypePicker not instantiated inside an InspectorComponent. Cannot mount.")},render:function(){return _i(vi,{ref:"container"})}};import{h as ye,inject as Ai}from"vue";import{CLASS_COLOR_PICKER as Bo,CLASS_COLOR_PICKER_SWATCH as Lo,CLASS_COLOR_PICKER_SWATCHES as Uo,EVENT_CONTEXT_UPDATE as Ni,ELEMENT_DIV as Je,INSPECTOR_CONTEXT_RECENT_COLORS as Te}from"@visuallyjs/browser-ui";var Go={render(){let e=this.swatches.map(t=>ye(Je,{title:t,class:Lo,style:`background-color:${t}`,"data-color":t,onClick:()=>this.selectSwatch(t)}));return ye(Je,{class:`${Bo}`},[ye("input",{type:"color","vjs-att":this.propertyName,ref:"colorInput"}),ye(Je,{class:Uo},e)])},props:{propertyName:String,maxColors:{type:Number,default:10}},data:()=>({CLASS_COLOR_PICKER:Bo,CLASS_COLOR_PICKER_SWATCHES:Uo,CLASS_COLOR_PICKER_SWATCH:Lo,colorInput:null,swatches:[]}),mounted(){let e=Ai(U);e&&e.listen(t=>{this.inspector=t,this.swatches=t.ensureContext(Te,()=>[]),this.colorInput=this.$refs.colorInput,this.colorInput.addEventListener("change",this.colorPicked),t.bind(Ni,o=>{o.key===Te&&(this.swatches=o.value.slice())}),t.bind("change",this.setCurrentColor),this.setCurrentColor()})},methods:{addColor:function(e){let t=this.inspector.ensureContext(Te,()=>[]);if(e=e.toUpperCase(),!(t.find(n=>n.toUpperCase()===e)!=null)){let n=this.maxColors||10,i=t.slice();i.unshift(e),i.length>n&&(i.length=n),this.inspector.updateContext(Te,i)}},colorPicked:function(){let e=this.colorInput.value;this.inspector.setValue(this.propertyName,e,null),this.addColor(e)},selectSwatch:function(e){this.inspector.setValue(this.propertyName,e,null),this.colorInput.value=e},setCurrentColor:function(){let e=this.inspector.getValue(this.propertyName);e!=null&&(this.colorInput.value=e,this.addColor(e))}}};import{h as _e,inject as xi,nextTick as Di,Teleport as Ii,watch as wi}from"vue";import{ELEMENT_DIV as Ye,uuid as bi}from"@visuallyjs/browser-ui";var Xe={props:{placement:{type:String,default:"floating"},position:{type:Object},constraints:{type:Object}},data:()=>({hasMounted:!1,surface:null}),setup(e){return{service:xi(s)}},mounted(){let e=t=>{if(!this.hasMounted){this.surface=t,this.hasMounted=!0;let o=this.position||{x:0,y:0};Di().then(()=>{this.placement==="floating"?t.floatElement(this.$refs.root,o):t.fixElement(this.$refs.fixedEl,o,this.constraints)})}};this.service.surface.value==null?wi(this.service.surface,e):e(this.service.surface.value)},render(){return _e(Ye,{ref:"root"},this.hasMounted?this.placement==="floating"?_e(Ye,{},this.$slots.hasOwnProperty("default")?this.$slots.default():[]):_e(Ii,{to:this.surface.vertexLayer,key:bi()},_e(Ye,{ref:"fixedEl"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])):[])}};import{provide as Mi}from"vue";var Ze={setup(){Mi(s,new _("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Vi,inject as Bi,watch as Li}from"vue";import{DiagramPalette as Ui,ELEMENT_DIV as Gi,log as ki}from"@visuallyjs/browser-ui";var qe={name:re,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,iconSize:Object,showLabels:Boolean,paletteStrokeWidth:Number,showAllMessage:String,onCellAdded:Function,mode:String,allowClickToAdd:Boolean,autoExitDrawMode:Boolean,selectAfterAdd:{type:Boolean,default:!0},className:String,diagram:{type:Object},onVertexAdded:Function,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:Bi(s)}},data:()=>({hasMounted:!1}),mounted(){if(this.service==null&&this.diagram==null)ki("Cannot mount DiagramPalette - no service found and Diagram not passed in as a prop");else{let e=t=>{this.hasMounted||(this.hasMounted=!0,new Ui(this.$refs.container,t,{fill:this.fill,outline:this.outline,dragSize:this.dragSize,inspector:this.inspector,iconSize:this.iconSize,showLabels:this.showLabels,paletteStrokeWidth:this.paletteStrokeWidth,showAllMessage:this.showAllMessage,onCellAdded:this.onCellAdded,mode:this.mode,allowClickToAdd:this.allowClickToAdd,autoExitDrawMode:this.autoExitDrawMode,selectAfterAdd:this.selectAfterAdd,onVertexAdded:this.onVertexAdded,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.diagram?e(this.diagram):this.service.diagram.value!=null?e(this.service.diagram.value):Li(this.service.diagram,e)}},render:function(){return Vi(Gi,{ref:"container"})}};import{BLOCK as Fi,ELEMENT_DIV as ji,NONE as Hi,PopupHandler as $i,CLASS_SURFACE_POPUP as Wi,ABSOLUTE as zi}from"@visuallyjs/browser-ui";import{h as Ki,inject as Ji,onMounted as Yi,ref as ge,watch as Xi}from"vue";var Qe={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=Ji(s),o=ge(null),n=ge("block"),i=ge(null),p=ge(null),r=a=>{p.value=new $i(e.selector,i.value,a,l=>{o.value=l,l==null?n.value=Hi:(n.value=Fi,requestAnimationFrame(()=>p.value.$positionPopup()))},e.anchor)};return Yi(()=>{t.surface.value==null?Xi(t.surface,r):r(t.surface.value)}),{service:t,current:o,display:n,rootRef:i,handler:p}},render(){var e;return Ki(ji,{ref:"rootRef",display:this.display,position:zi,class:Wi},this.$slots.hasOwnProperty("default")?this.$slots.default({vertex:this.current,model:(e=this.service.surface.value)==null?void 0:e.model,ui:this.service.surface.value,hide:()=>{var t;return(t=this.handler)==null?void 0:t.$hide()}}):[])}};import{inject as Se,watch as A}from"vue";import{BackgroundPlugin as ve,GeneratedGridBackground as Zi,SimpleBackground as qi,TiledBackground as Qi}from"@visuallyjs/browser-ui";var ko={setup(){return{service:Se(s)}},name:z,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:ve.type,options:this.options})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(A(this.service.surface,e),A(this.service.paper,e))},render:function(e){return[]}},Fo={setup(){return{service:Se(s)}},name:K,props:{grid:{type:Object},showBorder:{type:Boolean},minWidth:{type:Number},minHeight:{type:Number},showTickMarks:{type:Boolean},tickMarksPerCell:{type:Number},maxWidth:{type:Number},maxHeight:{type:Number},autoShrink:{type:Boolean},gridType:{type:String},dotRadius:{type:Number},tickDotRadius:{type:Number},visible:{type:Boolean}},mounted:function(){let e=t=>{t.addPlugin({type:ve.type,options:{type:Zi.type,grid:this.grid,showBorder:this.showBorder,minWidth:this.minWidth,minHeight:this.minHeight,showTickMarks:this.showTickMarks,tickMarksPerCell:this.tickMarksPerCell,maxWidth:this.maxWidth,maxHeight:this.maxHeight,autoShrink:this.autoShrink,gridType:this.gridType,dotRadius:this.dotRadius,tickDotRadius:this.tickDotRadius,visible:this.visible}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(A(this.service.surface,e),A(this.service.paper,e))},render:function(e){return[]}},jo={setup(){return{service:Se(s)}},name:J,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:ve.type,options:{type:qi.type,url:this.url}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(A(this.service.surface,e),A(this.service.paper,e))},render:function(e){return[]}},Ho={setup(){return{service:Se(s)}},name:Y,props:{url:{type:String},urlGenerator:{type:Function},tileSize:{type:Object},width:{type:Number},height:{type:Number},maxZoom:{type:Number},tiling:{type:String},panDebounceTimeout:{type:Number},zoomDebounceTimeout:{type:Number}},mounted:function(){let e=t=>{t.addPlugin({type:ve.type,options:{type:Qi.type,url:this.url,urlGenerator:this.urlGenerator,tileSize:this.tileSize,width:this.width,height:this.height,tiling:this.tiling,panDebounceTimeout:this.panDebounceTimeout,zoomDebounceTimeout:this.zoomDebounceTimeout}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(A(this.service.surface,e),A(this.service.paper,e))},render:function(e){return[]}};var Cd={install:function(e,t){e.component(jt,Fe),e.component(Ht,je),e.component($t,Ze),e.component(Z,ao),e.component(q,co),e.component(oe,Ao),e.component(X,Ro),e.component(ee,_o),e.component(te,So),e.component(z,ko),e.component(K,Fo),e.component(J,jo),e.component(Y,Ho),e.component(Q,bo),e.component(re,qe),e.component(ie,we),e.component(ne,Ie),e.component(se,be),e.component(ae,Ve),e.component(le,Be),e.component(pe,Me),e.component(me,ke),e.component(de,Ge),e.component(ue,Ue),e.component(ce,Le),e.component(H,$e),e.component($,We),e.component(W,Ke),e.component(Ut,Go),e.component(he,ze),e.component(zt,Xe),e.component(Wt,Qe),e.provide(s,new _("root"))}};import{shallowRef as et,ref as es}from"vue";import{EVENT_ZOOM as tt}from"@visuallyjs/browser-ui";import{inject as ts}from"vue";function Ad(){let e=ts(s),t=et(null),o=et(null),n=et(null),i=es(1);return e==null||e.getSurface(p=>{o.value=p,o.value.bind(tt,r=>{i.value=r.zoom})}),e==null||e.getDiagram(p=>{t.value=p,t.value.$ui.bind(tt,r=>{i.value=r.zoom})}),e==null||e.getPaper(p=>{n.value=p,n.value.bind(tt,r=>{i.value=r.zoom})}),i}import{inject as os,onUnmounted as rs}from"vue";import{EVENT_DATA_UPDATED as $o,EVENT_GRAPH_CLEARED as Wo}from"@visuallyjs/browser-ui";function Ld(e){let t=os(s);if(t){let o=null,n=()=>{o&&e(o)},i=()=>{o&&(o.unbind($o,n),o.unbind(Wo,n))},p=r=>{i(),o=r,o&&(o.bind($o,n),o.bind(Wo,n),n())};t.getModel(r=>{p(r)}),rs(()=>{i()})}}import{shallowRef as ns}from"vue";import{inject as is}from"vue";function Hd(){let e=is(s),t=ns(null);return e==null||e.getSurface(o=>{t.value=o}),t}import{shallowRef as ss}from"vue";import{inject as as}from"vue";function Yd(){let e=as(s),t=ss(null);return e==null||e.getDiagram(o=>{t.value=o}),t}import{shallowRef as ls}from"vue";import{inject as ps}from"vue";function tm(){let e=ps(s),t=ls(null);return e==null||e.getPaper(o=>{t.value=o}),t}export{Ce as $initialiseVueOverlays,Be as AreaChartComponent,ko as BackgroundComponent,we as BarChartComponent,to as BaseOverlayComponent,P as BrowserUIVueModel,Ue as BubbleChartComponent,kt as CLASS_VUE_GROUP,Gt as CLASS_VUE_NODE,Ft as CLASS_VUE_OVERLAY,le as COMPONENT_AREA_CHART,z as COMPONENT_BACKGROUND,ie as COMPONENT_BAR_CHART,ue as COMPONENT_BUBBLE_CHART,ne as COMPONENT_COLUMN_CHART,ee as COMPONENT_CONTROLS,oe as COMPONENT_DIAGRAM,re as COMPONENT_DIAGRAM_PALETTE,$t as COMPONENT_DIAGRAM_PROVIDER,te as COMPONENT_EXPORT_CONTROLS,de as COMPONENT_GAUGE_CHART,K as COMPONENT_GRID_BACKGROUND,J as COMPONENT_IMAGE_BACKGROUND,he as COMPONENT_INSPECTOR,ae as COMPONENT_LINE_CHART,X as COMPONENT_MINIVIEW,Q as COMPONENT_PALETTE,q as COMPONENT_PAPER,Ht as COMPONENT_PAPER_PROVIDER,pe as COMPONENT_PIE_CHART,me as COMPONENT_SANKEY_CHART,ce as COMPONENT_SCATTER_CHART,Z as COMPONENT_SURFACE,Wt as COMPONENT_SURFACE_POPUP,jt as COMPONENT_SURFACE_PROVIDER,Y as COMPONENT_TILED_IMAGE_BACKGROUND,se as COMPONENT_XY_CHART,Go as ColorPickerComponent,Ie as ColumnChartComponent,_o as ControlsComponent,Lt as DEFAULT_SHAPE_HEIGHT,Bt as DEFAULT_SHAPE_WIDTH,it as DEFAULT_VUE_PAPER_ID,nt as DEFAULT_VUE_SURFACE_ID,Xe as DecoratorComponent,Ao as DiagramComponent,qe as DiagramPaletteComponent,Ze as DiagramProvider,fr as EVENT_VERTEX_UPDATED,Ne as EVENT_VERTICES_RENDERED,Ke as EdgeTypePickerComponent,So as ExportControlsComponent,Ge as GaugeChartComponent,Fo as GridBackgroundComponent,jo as ImageBackgroundComponent,ze as InspectorComponent,U as InspectorGetterSymbol,yi as InspectorSetterSymbol,Ve as LineChartComponent,Ro as MiniviewComponent,pt as PROP_ACTIVE_TRACKING,Dt as PROP_ALLOW_CLICK_TO_ADD,gt as PROP_ALLOW_DROP_ON_CANVAS,_t as PROP_ALLOW_DROP_ON_EDGE,St as PROP_ALLOW_DROP_ON_GROUP,vt as PROP_ALLOW_DROP_ON_NODE,It as PROP_ALLOW_ROTATION,bt as PROP_AUTO_EDGE_CONNECT,Vt as PROP_CANVAS_DROP_FILTER,I as PROP_CLASS_NAME,xt as PROP_CLICK_TO_ADD_ONLY,at as PROP_CLICK_TO_CENTER,ft as PROP_CSV_DATA,y as PROP_DATA,Ct as PROP_DATA_GENERATOR,Re as PROP_DATA_SOURCE_FILTER,j as PROP_DATA_TYPE,Mt as PROP_DRAG_SIZE,Tt as PROP_GROUP_IDENTIFIER,$s as PROP_ID,Rt as PROP_IGNORE_DROP_ON_NODE,mt as PROP_INTERACTIVE,Ot as PROP_JSON_DATA,dt as PROP_MODE,k as PROP_MODEL,w as PROP_MODEL_OPTIONS,At as PROP_ON_VERTEX_ADDED,M as PROP_OPTIONS,ut as PROP_PAPER_ID,ht as PROP_PIVOT,G as PROP_RENDER_OPTIONS,wt as PROP_ROTATION_SPEED,Et as PROP_SELECTOR,Nt as PROP_SELECT_AFTER_ADD,lt as PROP_SHOW_LASSO,v as PROP_SURFACE_ID,ct as PROP_TRACK_SELECTION,st as PROP_TYPE_FUNCTION,yt as PROP_TYPE_GENERATOR,T as PROP_URL,Pt as PROP_USE_MODEL,F as PROP_VIEW_OPTIONS,bo as PaletteComponent,co as PaperComponent,je as PaperProvider,Me as PieChartComponent,ke as SankeyChartComponent,Le as ScatterChartComponent,$e as ShapeComponent,We as ShapePaletteComponent,ao as SurfaceComponent,Qe as SurfacePopup,Fe as SurfaceProvider,Ut as TAG_COLOR_PICKER,zt as TAG_DECORATOR,W as TAG_EDGE_TYPE_PICKER,H as TAG_SHAPE,$ as TAG_SHAPE_PALETTE,Ho as TiledImageBackgroundComponent,Cd as VisuallyJsPlugin,_ as VisuallyJsService,s as VisuallyJsServiceKey,be as XYChartComponent,ro as addPaper,oo as addSurface,Aa as bindToDevLifecycle,Ti as doProvideInspector,fs as newInstance,Yd as useDiagram,tm as usePaper,Hd as useSurface,Ld as useVisuallyJsUpdate,Ad as useZoom,Jt as vertexHasRendered,Yt as vertexHasUpdated,Or as vertexWillRender};
|
|
1
|
+
var nr=Object.defineProperty,ir=Object.defineProperties;var sr=Object.getOwnPropertyDescriptors;var Et=Object.getOwnPropertySymbols;var ar=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable;var gt=(e,t,r)=>t in e?nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))ar.call(t,r)&>(e,r,t[r]);if(Et)for(var r of Et(t))lr.call(t,r)&>(e,r,t[r]);return e},L=(e,t)=>ir(e,sr(t));import{log as pr,BrowserUIModel as cr}from"@visuallyjs/browser-ui";var g=class extends cr{render(t,r){return pr("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function Vs(e){return e=e||{},new g(e)}var yt="surfaceId",Ct="paperId",Tt="typeFunction",_t="clickToCenter",St="showLasso",vt="activeTracking",Rt="trackSelection",N="surfaceId",Nt="paperId",V="className",y="data",At="mode",M="options",H="renderOptions",B="modelOptions",$="model",W="viewOptions",E="url",z="dataType",xt="interactive",Dt="pivot",Be="dataSourceFilter",Le="csvData",Ue="jsonData",It="useModel",ma="id",bt="selector",Mt="dataGenerator",wt="typeGenerator",Vt="groupIdentifier",Bt="allowDropOnEdge",Lt="allowDropOnCanvas",Ut="allowDropOnGroup",Gt="allowDropOnNode",jt="ignoreDropOnNode",kt="onVertexAdded",Ft="selectAfterAdd",Ht="clickToAddOnly",$t="allowClickToAdd",Wt="allowRotation",zt="rotationSpeed",Kt="autoEdgeConnect",Jt="dragSize",Yt="canvasDropFilter",K="Shape",J="ShapePalette",Xt=120,Zt=90,Y="EdgeTypePickerComponent",qt="ColorPickerComponent",Qt="vjs-vue-node",eo="vjs-vue-group",to="vjs-vue-overlay",X="BackgroundComponent",Z="GridBackgroundComponent",q="ImageBackgroundComponent",Q="TiledImageBackgroundComponent",ee="MiniviewComponent",te="SurfaceComponent",oo="SurfaceProvider",oe="PaperComponent",ro="PaperProvider",no="DiagramProvider",re="PaletteComponent",ne="ControlsComponent",ie="ExportControlsComponent",se="DiagramComponent",ae="DiagramPaletteComponent",le="ColumnChartComponent",pe="BarChartComponent",ce="XYChartComponent",ue="LineChartComponent",de="AreaChartComponent",me="PieChartComponent",he="ScatterChartComponent",fe="BubbleChartComponent",Pe="GaugeChartComponent",Oe="SankeyChartComponent",Ee="InspectorComponent",ge="EdgePropertyMappingsInspector",io="SurfacePopup",so="Decorator",ye="ShapePropertiesInspectorComponent";import{addClass as ur,BrowserUI as dr,isGroup as mr,Vertex as ao}from"@visuallyjs/browser-ui";var Ce={props:{data:Object,model:g,obj:ao,vertex:ao,ui:dr,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=mr(e.vertex)?eo:Qt;e.el.firstElementChild&&ur(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),lo(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),po(this.ui.id,this.vertex)}};var co={mixins:[Ce],methods:{getNode:function(){return this.obj},removeNode:function(){this.model.removeNode(this.getNode())},updateNode:function(e){this.model.updateNode(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}}};var uo={methods:{getGroup:function(){return this.obj},removeGroup:function(e){this.model.removeGroup(this.obj,e)},updateGroup:function(e){this.model.updateGroup(this.obj,e);let t=this.ui.getRenderedElement(this.obj.getFullId());this.ui.$revalidateElement(t)}},mixins:[Ce]};import{markRaw as C}from"vue";import{addClass as hr,BrowserUI as fr,CLASS_DEFAULT_GROUP as Pr,CLASS_DEFAULT_NODE as Or,ELEMENT_DIV as mo,extend as ho,isGroup as Er,OptimisticEventGenerator as gr,renderSurface as yr,updateClasses as Cr,Overlay as Tr,Edge as fo,OVERLAY_TYPE_CUSTOM as _r,uuid as Sr,renderPaper as vr}from"@visuallyjs/browser-ui";var Ge=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new gr;this.hasRendered=!1}vertexWillRender(t){this.unrenderedVertices.set(t.id,t),this.hasRendered=!1}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&(this.hasRendered=!0,this.eventManager.fire(je))}vertexHasUpdated(t){this.eventManager.fire(Rr,t)}},je="vertices:rendered",Rr="vertex:updated",ke=new Map;function Te(e){return ke.has(e)||ke.set(e,new Ge),ke.get(e)}function lo(e,t){Te(e).vertexHasRendered(t)}function po(e,t){Te(e).vertexHasUpdated(t)}function Nr(e,t){Te(e).vertexWillRender(t)}function Xa(e,t,r){let o=Te(e);o&&(o.eventManager.bind(t,r),t===je&&o.hasRendered&&o.eventManager.fire(je))}var _e=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},Po={props:{data:Object,model:g,obj:fo,edge:fo,overlay:Tr,ui:fr,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&hr(e.el.firstElementChild,to)},updated(){this.ui.$revalidateElement(this.el)}},Se=(e,t,r,o,a,p,n,s,i)=>{let m=n.component!=null,c=Er(s),f=[];m||f.push(c?Pr:Or);let h=m?n.component:{render(P){return P.data.label||""}};if(h){let P=document.createElement(mo);Cr(P,f),h.mixins==null&&(h.mixins=[]);let O=c?uo:co;h.mixins.find(T=>T===O)||h.mixins.push(O),Nr(p.id,s);let w={data:r,model:C(o),ui:C(p),obj:C(s),vertex:C(s),el:P,def:C(n),eventInfo:i==null?null:C(i)};if(n.inject)for(let T in n.inject){let I=n.inject[T],rr=typeof I=="function"?I(s,o):I;w[T]=rr}e.push({component:C(h),el:P,t:s.getFullId(),props:w,vertex:s})}};function Oo(e,t,r,o,a,p){let n={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(i,m,c,f)=>{},render:(i,m,c,f,h,P,O,R)=>Se(o,i,m,c,f,h,P,O,R),cleanupVertex:_e,cleanupPort:_e,rerender:(i,m,c,f,h,P,O,R,w)=>{let T=o.findIndex(I=>I.vertex===O);T!=null&&o.splice(T,1)[0].el,h.$__unmanage(w,!0,!0),requestAnimationFrame(()=>{Se(o,i,m,c,f,h,P,O,R)})}},s=ho(a||{},{view:p||{},id:t});return yr(e,r,n,s)}function Eo(e,t,r,o,a,p){let n={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(i,m,c,f)=>{},render:(i,m,c,f,h,P,O,R)=>Se(o,i,m,c,f,h,P,O,R),cleanupVertex:_e,cleanupPort:_e,rerender:(i,m,c,f,h,P,O,R,w)=>{let T=o.findIndex(I=>I.vertex===O);T!=null&&o.splice(T,1)[0].el,h.$__unmanage(w,!0,!0),requestAnimationFrame(()=>{Se(o,i,m,c,f,h,P,O,R)})}},s=ho(a||{},{view:p||{},id:t});return vr(e,r,n,s)}function ve(e,t,r,o){if(e.edges)for(let a in e.edges){let p=e.edges[a];p.overlays&&(p.overlays=p.overlays.map(n=>{let s={};return n.component!=null?{type:_r,options:{create:m=>{let c=document.createElement(mo),f=Sr();n.component.mixins==null&&(n.component.mixins=[]),n.component.mixins.indexOf(Po)===-1&&n.component.mixins.push(Po);let h=b({data:m.edge.data,model:C(r()),ui:C(t()),obj:m.edge,edge:m.edge,el:c,def:C(n),eventInfo:null,overlay:n},s);return o.push({component:C(n.component),el:c,t:f,props:h}),c}}}:n}))}}import{log as go,Paper as Ar,Surface as xr}from"@visuallyjs/browser-ui";import{shallowRef as U}from"vue";var l=Symbol.for("visuallyjs-service"),_=class{constructor(t){this.context=t;this.a=[];this.l=[];this.p=[];this.c=[];this.surface=U(null);this.model=U(null);this.paper=U(null);this.diagram=U(null);this.ui=U(null)}getSurface(t){this.r(this.l,t,this.u)}getDiagram(t){this.r(this.p,t,this.m)}getPaper(t){this.r(this.c,t,this.h)}getModel(t){this.r(this.a,t,this.i)}getModelDirect(){return this.i}r(t,r,o){if(o!=null)try{r(o)}catch(a){go(`WARN: could not dispatch ${a}`)}else t.push(r)}setSurface(t){this.surface.value=t,this.model.value=t.model,this.ui.value=t,this.u=t,this.s(t.model),this.n(this.l,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.m=t,this.s(t.model),t.$ui instanceof xr?this.setSurface(t.$ui):t.$ui instanceof Ar&&this.setPaper(t.$ui),this.n(this.p,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.h=t,this.s(t.model),this.n(this.c,t)}s(t){this.i=t,this.n(this.a,t)}n(t,r){t.forEach(o=>{try{o(r)}catch(a){go(`WARN: could not flush all queue entries ${a}`)}})}};import{h as G,inject as Dr,Teleport as yo}from"vue";import{ELEMENT_DIV as Ir,EVENT_GROUP_REMOVED as br,EVENT_GROUP_UPDATED as Mr,EVENT_NODE_REMOVED as wr,EVENT_NODE_UPDATED as Vr,EVENT_RENDER_END as Br,clone as Co,EVENT_EDGE_UPDATED as Lr,EVENT_EDGE_REMOVED as Ur,EVENT_GRAPH_CLEARED as Gr}from"@visuallyjs/browser-ui";var To={setup(e){return{service:Dr(l),surfaceId:e.surfaceId||yt}},name:te,props:{[y]:{type:Object},[H]:{type:Object},[B]:{type:Object},[W]:{type:Object},[$]:{type:Object},[E]:{type:String},[z]:{type:String},[N]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new g(this.modelOptions||{}),r=this.$refs.root;e.e=!1;let o=Co(this.viewOptions||{});ve(o,()=>this.surface,()=>t,this.overlays),this.surface=Oo(t,this.surfaceId,r,this.vertices,Co(this.renderOptions||{}),o),this.service.setSurface(this.surface);let a=(n,s)=>{let i=()=>{let c={};return s.originalData||s.updates?c=Object.assign(s.originalData,s.updates):s.newData&&Object.assign(c,s.newData),c},m=this.vertices.find(c=>c.t===n);m!=null&&(m.props.data=i())},p=n=>{let s=this.vertices.findIndex(i=>i.t===n);s!==-1&&this.vertices.splice(s,1)};t.bind(Vr,n=>{a(n.vertex.getFullId(),n)}),t.bind(Mr,n=>{a(n.vertex.getFullId(),n)}),t.bind(wr,n=>{p(n.node.id)}),t.bind(br,n=>{p(n.group.id)}),t.bind(Lr,n=>{let s=n.edge.id;this.overlays.forEach(i=>{i.props.edge&&i.props.edge.id===s&&(i.props.data=n.edge.data)})}),t.bind(Ur,n=>{let s=n.edge.id,i=this.overlays.length-1;for(;i>=0;)this.overlays[i].props.edge&&this.overlays[i].props.edge.id===s&&this.overlays.splice(i,1),i--}),t.bind(Gr,()=>{this.vertices.length=0,this.overlays.length=0}),this.surface.bind(Br,()=>setTimeout(()=>this.surface.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[y]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({data:e,dataType:this.dataType})}))}},[E]:{handler(e){this.e!==!1&&this.surface&&this.surface.model&&(this.surface.model.clear(),requestAnimationFrame(()=>{this.surface.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>G(yo,{to:t.el,key:t.t},[G(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(G(yo,{to:t.el,key:t.t},[G(t.component,t.props)]))}),G(Ir,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};import{h as j,inject as jr,Teleport as _o}from"vue";import{ELEMENT_DIV as kr,EVENT_GROUP_REMOVED as Fr,EVENT_GROUP_UPDATED as Hr,EVENT_NODE_REMOVED as $r,EVENT_NODE_UPDATED as Wr,EVENT_RENDER_END as zr,clone as So,EVENT_EDGE_UPDATED as Kr,EVENT_EDGE_REMOVED as Jr,EVENT_GRAPH_CLEARED as Yr}from"@visuallyjs/browser-ui";var vo={setup(e){return{service:jr(l),paperId:e.paperId||Ct}},name:oe,props:{[y]:{type:Object},[H]:{type:Object},[B]:{type:Object},[W]:{type:Object},[$]:{type:Object},[E]:{type:String},[z]:{type:String},[Nt]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new g(this.modelOptions||{}),r=this.$refs.root;e.e=!1;let o=So(this.viewOptions||{});ve(o,()=>this.paper,()=>t,this.overlays),this.paper=Eo(t,this.paperId,r,this.vertices,So(this.renderOptions||{}),o),this.service.setPaper(this.paper);let a=(n,s)=>{let i=()=>{let c={};return s.originalData||s.updates?c=Object.assign(s.originalData,s.updates):s.newData&&Object.assign(c,s.newData),c},m=this.vertices.find(c=>c.t===n);m!=null&&(m.props.data=i())},p=n=>{let s=this.vertices.findIndex(i=>i.t===n);s!==-1&&this.vertices.splice(s,1)};t.bind(Wr,n=>{a(n.vertex.getFullId(),n)}),t.bind(Hr,n=>{a(n.vertex.getFullId(),n)}),t.bind($r,n=>{p(n.node.id)}),t.bind(Fr,n=>{p(n.group.id)}),t.bind(Kr,n=>{let s=n.edge.id;this.overlays.forEach(i=>{i.props.edge&&i.props.edge.id===s&&(i.props.data=n.edge.data)})}),t.bind(Jr,n=>{let s=n.edge.id,i=this.overlays.length-1;for(;i>=0;)this.overlays[i].props.edge&&this.overlays[i].props.edge.id===s&&this.overlays.splice(i,1),i--}),t.bind(Yr,()=>{this.vertices.length=0,this.overlays.length=0}),this.paper.bind(zr,()=>setTimeout(()=>this.paper.$redrawEveryConnection())),e.url?t.load({url:e.url,dataType:e.dataType,onload:()=>e.e=!0}):e.data?t.load({data:e.data,dataType:e.dataType,onload:()=>e.e=!0}):e.e=!0},watch:{[y]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({data:e,dataType:this.dataType})}))}},[E]:{handler(e){this.e!==!1&&this.paper&&this.paper.model&&(this.paper.model.clear(),requestAnimationFrame(()=>{this.paper.model.load({url:e,dataType:this.dataType})}))}}},render:function(){let e=this.vertices.map(t=>j(_o,{to:t.el,key:t.t},[j(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(j(_o,{to:t.el,key:t.t},[j(t.component,t.props)]))}),j(kr,{ref:"root",class:"vjs-vue-paper",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};import{h as u,inject as Xr,watch as Zr}from"vue";import{LassoPlugin as qr,SURFACE_MODE_SELECT as Ro,SURFACE_MODE_PAN as No,PAN_PATH as Qr,PAN_VIEW_BOX as en,LASSO_PATH as tn,LASSO_VIEW_BOX as on,UNDO_PATH as rn,UNDO_VIEW_BOX as nn,REDO_PATH as sn,REDO_VIEW_BOX as an,ZOOM_TO_FIT_PATH as ln,ZOOM_TO_FIT_VIEW_BOX as pn,EVENT_UNDOREDO_UPDATE as cn,TRUE as Ao,FALSE as Re,EVENT_SURFACE_MODE_CHANGED as un,ELEMENT_DIV as xo,ATTRIBUTE_CONTROLS_ORIENTATION as dn,ZOOM_IN_OUT_VIEW_BOX as Do,ZOOM_IN_PATH as mn,ZOOM_OUT_PATH as hn,RESET_SELECTION_PATH as fn,RESET_SELECTION_VIEW_BOX as Pn,CLEAR_PATH as On,CLEAR_VIEW_BOX as En,ATTRIBUTE_RESET_SELECTION as gn,CLASS_CONTROLS_RESET_SELECTION as yn,EVENT_SELECT as Cn,EVENT_DESELECT as Tn,EVENT_SELECTION_CLEARED as _n,supportsPathEditing as Sn}from"@visuallyjs/browser-ui";var vn="Clear dataset?",Fe="vjs-selected-mode",He="can-undo",$e="can-redo",Rn="data-undo",Nn="data-redo",Io="data-mode",An="data-reset",xn="data-clear",Dn="data-zoom-in",In="data-zoom-out",bo="vjs-controls-has-selection",Mo={setup(e){return{service:Xr(l)}},name:ne,props:{clear:{type:Boolean,default:!0},[N]:{type:String},undoRedo:{type:Boolean,default:!0},orientation:{type:String,default:"row"},zoomToExtents:{type:Boolean,default:!0},zoomButtons:{type:Boolean,default:!1},clearMessage:{type:String,default:vn},onMaybeClear:{type:Function},className:{type:String,default:""}},methods:{panMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(No)},selectMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(Ro)},zoomToFit:function(){var e;(e=this.service.surface.value)==null||e.zoomToFit()},doClear:function(){let e=this.service.surface.value;e&&(this.onMaybeClear!=null?this.onMaybeClear(()=>e.model.clear()):window.confirm(this.clearMessage)&&e.model.clear())},undo:function(){var e;(e=this.service.model.value)==null||e.undo()},redo:function(){var e;(e=this.service.model.value)==null||e.redo()},zoomIn:function(){var e;(e=this.service.surface.value)==null||e.zoomIn()},zoomOut:function(){var e;(e=this.service.surface.value)==null||e.zoomOut()},resetSelection(){let e=this.service.surface.value;e&&(e.model.clearSelection(),Sn(e)&&e.stopEditingPath())},updateSelectionState:function(){let e=this.service.surface.value;e&&(e.model.getSelection().isEmpty()?this.$refs.root.removeAttribute(bo):this.$refs.root.setAttribute(bo,"true"))}},data:function(){return{ready:!1,hasLasso:!1}},render(){if(this.ready){let e=[];return this.showPan&&(e.push(u("i",{class:`vjs-pan-mode ${Fe}`,[Io]:No,onClick:()=>this.panMode(),title:"Pan mode"},[u("svg",{viewBox:en,stroke:"currentColor",fill:"none"},[u("path",{d:Qr})])])),e.push(u("i",{class:"vjs-select-mode",[Io]:Ro,onClick:()=>this.selectMode(),title:"Select mode"},[u("svg",{viewBox:on,stroke:"currentColor",fill:"currentColor"},[u("path",{d:tn})])]))),this.undoRedo&&(e.push(u("i",{class:"vjs-undo",[Rn]:!0,title:"Undo last action",onClick:()=>this.undo()},[u("svg",{viewBox:nn,stroke:"currentColor",fill:"none"},[u("path",{d:rn,"stroke-width":2})])])),e.push(u("i",{class:"vjs-redo",[Nn]:!0,title:"Redo last action",onClick:()=>this.redo()},[u("svg",{viewBox:an,stroke:"currentColor",fill:"none"},[u("path",{d:sn,"stroke-width":2})])]))),this.zoomToExtents&&e.push(u("i",{class:"vjs-zoom-to-fit",[An]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[u("svg",{viewBox:pn,stroke:"currentColor",fill:"currentColor"},[u("path",{d:ln})])])),this.zoomButtons&&(e.push(u("i",{class:"vjs-zoom-in",[Dn]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[u("svg",{viewBox:Do,stroke:"currentColor",fill:"currentColor"},[u("path",{d:mn})])])),e.push(u("i",{class:"vjs-zoom-out",[In]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[u("svg",{viewBox:Do,stroke:"currentColor",fill:"currentColor"},[u("path",{d:hn})])]))),e.push(u("i",{class:yn,[gn]:"true",onClick:()=>{this.resetSelection()}},[u("svg",{viewBox:Pn,stroke:"currentColor",fill:"currentColor"},[u("path",{d:fn})])])),this.clear&&e.push(u("i",{class:"vjs-clear-dataset",[xn]:"true",onClick:()=>{this.doClear()}},[u("svg",{viewBox:En,stroke:"currentColor",fill:"currentColor"},[u("path",{d:On})])])),u(xo,{class:`vjs-controls ${this.className}`,ref:"root",[He]:!1,[$e]:!1,[dn]:this.orientation},e)}else return u(xo,{ref:"root"})},mounted(){let e=t=>{let r=t.getPlugin(qr.type);this.showPan=r!=null,t.bind(un,o=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),Fe),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+o+"']"),Fe)}),t.model.bind(cn,o=>{this.$refs.root.setAttribute(He,o.undoCount>0?Ao:Re),this.$refs.root.setAttribute($e,o.redoCount>0?Ao:Re)}),t.model.bind(Cn,()=>this.updateSelectionState()),t.model.bind(Tn,()=>this.updateSelectionState()),t.model.bind(_n,()=>this.updateSelectionState()),this.$refs.root.setAttribute(He,Re),this.$refs.root.setAttribute($e,Re),this.ready=!0};this.service.surface.value==null?Zr(this.service.surface,e):e(this.service.surface.value)}};import{h as A,inject as bn}from"vue";import{CLASS_CONTROLS as Mn,CLASS_EXPORT_CONTROLS as wn,ELEMENT_DIV as Vn,ImageExportUI as wo,SvgExportUI as Bn,TYPE_JPG as Ln,TYPE_PNG as Un,TYPE_SVG as Gn}from"@visuallyjs/browser-ui";var Vo={name:ie,setup(e){return{service:bn(l)}},props:{surfaceId:{type:String},showLabel:{type:Boolean,default:!0},label:{type:String,default:"Export :"},margins:{type:Object},svgOptions:{type:Object},imageOptions:{type:Object},allowSvgExport:{type:Boolean,default:!0},allowPngExport:{type:Boolean,default:!0},allowJpgExport:{type:Boolean,default:!0}},methods:{loadSurface:function(e){let t=this.service.surface.value;t&&e(t)},exportSVG:function(){this.loadSurface(e=>{let t=this.svgOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new Bn(e).export(t)})},exportJPG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),t.type="image/jpeg",new wo(e).export(t)})},exportPNG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new wo(e).export(t)})}},render(){let e=this.showLabel!==!1,t=this.allowSvgExport!==!1,r=this.allowPngExport!==!1,o=this.allowJpgExport!==!1,a=[];return t&&a.push(A("i",{},[A("a",{href:"#","data-type":Gn,onClick:()=>this.exportSVG()},"SVG")])),r&&a.push(A("i",{},[A("a",{href:"#","data-type":Un,onClick:()=>this.exportPNG()},"PNG")])),o&&a.push(A("i",{},[A("a",{href:"#","data-type":Ln,onClick:()=>this.exportJPG()},"JPG")])),e&&a.unshift(A("span",{},[this.label])),A(Vn,{class:`${Mn} ${wn}`},a)}};import{h as jn,inject as kn,watch as Bo}from"vue";import{ELEMENT_DIV as Fn,MiniviewPlugin as Hn}from"@visuallyjs/browser-ui";var Lo={setup(e){return{service:kn(l)}},name:ee,props:{[N]:{type:String},[V]:{type:String,default:""},[vt]:{type:Boolean,default:!0},[_t]:{type:Boolean,default:!0},[St]:{type:Boolean,default:!0},[Rt]:{type:Boolean,default:!0},[Tt]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:Hn.type,options:{container:this.$el,activeTracking:this.activeTracking,clickToCenter:this.clickToCenter,showLasso:this.showLasso,trackSelection:this.trackSelection,typeFunction:this.typeFunction}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(Bo(this.service.surface,e),Bo(this.service.paper,e))},render:function(e){return jn(Fn,{ref:"root",class:e.className})}};import{h as $n,inject as Wn,markRaw as zn}from"vue";import{createDiagram as Kn,ELEMENT_DIV as Jn}from"@visuallyjs/browser-ui";var Uo={setup(e){return{service:Wn(l)}},name:se,props:{[y]:{type:Object},[E]:{type:String},[B]:{type:Object},[M]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=zn(Kn(e,this.options,this.modelOptions)),this.service.setDiagram(this.diagram),this.data?this.diagram.load({data:this.data}):this.url&&this.diagram.load({url:this.url})},render:function(){return $n(Jn,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as Yn,inject as Xn,watch as Go}from"vue";import{ColumnChart as Zn,BarChart as qn,CategoryValueChart as Qn,ELEMENT_DIV as ei,LineChart as ti,AreaChart as oi,PieChart as ri,ScatterChart as ni,BubbleChart as ii,GaugeChart as si,SankeyChart as ai}from"@visuallyjs/browser-ui";var jo={[V]:{type:String},[y]:{type:Object},[E]:{type:String},[It]:{type:Boolean,default:!1}},ko={setup(){return{service:Xn(l)}},render:function(){return Yn(ei,{class:`${this.className}`,ref:"root"})}};function S(e,t,r=!0){let o=L(b({},jo),{[M]:{type:Object}}),a={[y]:function(n){this.chart&&this.chart.load({data:n})},[E]:function(n){this.chart&&this.chart.load({url:n})},[M]:{handler:function(){this.o()},deep:!0}};r&&(o[Be]={type:Function},a[Be]=function(n){this.chart.setDataSourceFilter(n)});let p={o:function(){this.chart&&this.chart.destroy();let n=this.$refs.root,s=r?Object.assign({dataSourceFilter:this.dataSourceFilter},this.options):this.options;this.data&&(s.data=this.data),this.url&&(s.url=this.url);let i=()=>{this.chart=new t(n,s)};if(this.useModel)if(this.service.model.value!=null)s.dataSource=this.service.model.value,i();else{let m=Go(this.service.model,c=>{c!=null&&(s.dataSource=c,i(),m())})}else i()}};return L(b({},ko),{name:e,props:o,watch:a,data:()=>({hasMounted:!1}),methods:p,mounted(){this.o()}})}var We=S(le,Zn),ze=S(pe,qn),Ke=S(ce,Qn,!1),Je=S(me,ri),Ye=S(ue,ti),Xe=S(de,oi),Ze=S(he,ni),qe=S(fe,ii),Qe=S(Pe,si,!1),et=L(b({},ko),{name:Oe,props:L(b({},jo),{[Le]:{type:String},[Ue]:{type:Object},[xt]:{type:Boolean},[Dt]:{type:String},[M]:{type:Object}}),data:()=>({chart:null}),methods:{o:function(){this.chart&&this.chart.destroy();let e=this.$refs.root,t=Object.assign({},this.options);this.interactive!=null&&(t.interactive=this.interactive),this.pivot!=null&&(t.pivot=this.pivot),this.csvData&&(t.csvData=this.csvData),this.jsonData&&(t.jsonData=this.jsonData),this.url&&(t.url=this.url);let r=()=>{this.chart=new ai(e,t)};if(this.useModel)if(this.service.model.value==null){let o=Go(this.service.model,a=>{a!=null&&(t.dataSource=a,r(),o())})}else t.dataSource=this.service.model.value,r();else r()}},mounted(){this.o()},watch:{pivot(e){this.chart&&this.chart.pivot(e)},[Le](e){this.chart&&this.chart.load({csvData:e})},[Ue](e){this.chart&&this.chart.load({jsonData:e})},[E](e){this.chart&&this.chart.load({url:e})},[M]:{handler:function(){this.o()},deep:!0}}});import{h as li,inject as pi,watch as ci}from"vue";import{defaultDataGenerator as ui,ELEMENT_DIV as di,Palette as mi}from"@visuallyjs/browser-ui";var Fo={setup(e){return{service:pi(l)}},name:re,props:{[N]:{type:String},[bt]:{type:String},[Mt]:{type:Function},[wt]:{type:Function},[Vt]:{type:Function},[Bt]:{type:[Boolean,Function],default:!1},[Lt]:{type:Boolean,default:!0},[Ut]:{type:Boolean,default:!0},[Gt]:{type:Boolean,default:!1},[jt]:{type:Boolean,default:!1},[Jt]:Object,[kt]:Function,[Yt]:Function,[V]:String,[At]:String,[Ft]:{type:Boolean,default:!1},[$t]:{type:Boolean,default:!1},[Ht]:{type:Boolean,default:!1},[Wt]:{type:Boolean,default:!0},[zt]:{type:Number,default:2e3},[Kt]:{type:[Boolean,Object],default:!1}},mounted:function(){let e=t=>{let r={source:this.$refs.root,selector:this.selector,dataGenerator:o=>this.dataGenerator?this.dataGenerator(o):ui(o),allowDropOnEdge:this.allowDropOnEdge===!0,allowDropOnGroup:this.allowDropOnGroup!==!1,allowDropOnCanvas:this.allowDropOnCanvas!==!1,allowDropOnNode:this.allowDropOnNode===!0,ignoreDropOnNode:this.ignoreDropOnNode===!0,canvasDropFilter:this.canvasDropFilter,onVertexAdded:this.onVertexAdded,dragSize:this.dragSize,mode:this.mode,allowRotation:this.allowRotation!==!1,rotationSpeed:this.rotationSpeed||2e3,autoEdgeConnect:this.autoEdgeConnect};this.groupIdentifier!=null&&(r.groupIdentifier=this.groupIdentifier),this.typeGenerator!=null&&(r.typeGenerator=this.typeGenerator),this.palette=new mi(t,r)};this.service.surface.value==null?ci(this.service.surface,e):e(this.service.surface.value)},render:function(){return li(di,{ref:"root",class:this.className||""},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{provide as hi}from"vue";var tt={setup(){hi(l,new _("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{provide as fi}from"vue";var ot={setup(){fi(l,new _("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Pi,inject as Oi,watch as Ei}from"vue";import{CLASS_SHAPE as gi,convertToMultilineText as Ho,DEFAULT_LABEL_FILL_RATIO as rt,ELEMENT_SVG as yi}from"@visuallyjs/browser-ui";var nt={name:K,props:{data:{type:Object},showLabels:{type:Boolean,default:!1},labelProperty:{type:String,default:"label"},labelStrokeWidth:{type:Number},labelPosition:{type:Object,default:"center"},multilineLabels:{type:Boolean,default:!0},labelFillRatio:{type:Number,default:rt},labelColor:{type:String,default:"#000000"},font:{type:Object}},setup(){return{service:Oi(l)}},mounted(){let e=t=>{let r=t.getShapeLibrary(),o=r.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.appendChild(o),this.showLabels){let a=r.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(a),this.multilineLabels!=!1&&Ho(a,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||rt),this.labelPosition)}};this.service.ui.value==null?Ei(this.service.ui,e):e(this.service.ui.value)},updated(){let e=this.service.surface.value;if(e){let t=e.getShapeLibrary(),r=t.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.replaceChildren(r),this.showLabels){let o=t.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(o),this.multilineLabels!=!1&&Ho(o,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||rt),this.labelPosition)}}},render:function(){return Pi(yi,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:gi})},methods:{getWidth:function(){return this.data.width||Xt},getHeight:function(){return this.data.height||Zt},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};import{h as Ci,inject as Ti,watch as _i}from"vue";import{ELEMENT_DIV as Si,ShapePalette as vi}from"@visuallyjs/browser-ui";var it={name:J,props:{surfaceId:{type:String},dragSize:Object,iconSize:Object,fill:String,outline:String,showAllMessage:String,selectAfterDrop:Boolean,paletteStrokeWidth:Number,dataGenerator:Function,initialSet:String,mode:String,allowClickToAdd:Boolean,onVertexAdded:Function,showLabels:Boolean,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:Ti(l)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new vi(t,{container:this.$refs.container,shapeLibrary:t.getShapeLibrary(),dragSize:this.dragSize,iconSize:this.iconSize,fill:this.fill,outline:this.outline,showAllMessage:this.showAllMessage,selectAfterDrop:this.selectAfterDrop,paletteStrokeWidth:this.paletteStrokeWidth,dataGenerator:this.dataGenerator,initialSet:this.initialSet,mode:this.mode,allowClickToAdd:this.allowClickToAdd,onVertexAdded:this.onVertexAdded,showLabels:this.showLabels,inspector:this.inspector,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.service.surface.value==null?_i(this.service.surface,e):e(this.service.surface.value)},render:function(){return Ci(Si,{ref:"container"})}};import{provide as $o,readonly as Ri,inject as Ni,h as Ai,watch as xi}from"vue";import{ELEMENT_DIV as Di,Inspector as Ii,log as bi}from"@visuallyjs/browser-ui";var v=Symbol.for("VueInspectorGetter"),Mi=Symbol.for("VueInspectorSetter");function wi(){let e=[],t=null;function r(p){try{p(t)}catch(n){bi("WARN: inspector listener threw an exception",n)}}let o={listen:p=>{t!=null?r(p):e.push(p)}},a={inspector:p=>{t=p,e.forEach(r)}};return $o(Mi,a),$o(v,Ri(o)),a}var st={name:Ee,props:{autoCommit:{type:Boolean,default:!0},multipleSelections:{type:Boolean,default:!0},filter:Function,renderEmptyContainer:Function,refresh:Function,className:String,showCloseButton:Boolean,afterUpdate:Function,modelValue:Object},emits:["update:modelValue"],setup(e,t){let r=wi();return{service:Ni(l),inspectorProvider:r,inspector:null,emit:t.emit}},mounted(){let e=t=>{if(this.inspector==null){let r=new Ii({container:this.$refs.root,ui:t,renderEmptyContainer:()=>(this.emit("update:modelValue",null),this.renderEmptyContainer?this.renderEmptyContainer():""),refresh:(o,a)=>{this.emit("update:modelValue",o),this.refresh&&this.refresh(o),setTimeout(a)},autoCommit:this.autoCommit,multipleSelections:this.multipleSelections,filter:this.filter,showCloseButton:this.showCloseButton,afterUpdate:()=>this.afterUpdate?this.afterUpdate(t):null});this.inspectorProvider.inspector(r)}};this.service.surface.value==null?xi(this.service.surface,e):e(this.service.surface.value)},render(){return Ai(Di,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as Vi,inject as Bi}from"vue";import{EdgeTypePicker as Li,ELEMENT_DIV as Ui,log as Gi}from"@visuallyjs/browser-ui";var k={name:Y,props:{propertyName:String},setup(){return{inspectorProvider:Bi(v)}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{let t=new Li(e.$ui,this.$refs.container,e.$ui.$getEdgePropertyMappings(),e.getValue(this.propertyName),(r,o)=>{e.setValue(this.propertyName,o,null)});t.render(this.propertyName,e.f),e.onChange(()=>{t.reset(),t.select(this.propertyName,e.getValue(this.propertyName))})}):Gi("WARN: EdgeTypePicker not instantiated inside an InspectorComponent. Cannot mount.")},render:function(){return Vi(Ui,{ref:"container"})}};import{h as Ne,inject as ji}from"vue";import{CLASS_COLOR_PICKER as Wo,CLASS_COLOR_PICKER_SWATCH as zo,CLASS_COLOR_PICKER_SWATCHES as Ko,EVENT_CONTEXT_UPDATE as ki,ELEMENT_DIV as at,INSPECTOR_CONTEXT_RECENT_COLORS as Ae}from"@visuallyjs/browser-ui";var Jo={render(){let e=this.swatches.map(t=>Ne(at,{title:t,class:zo,style:`background-color:${t}`,"data-color":t,onClick:()=>this.selectSwatch(t)}));return Ne(at,{class:`${Wo}`},[Ne("input",{type:"color","vjs-att":this.propertyName,ref:"colorInput"}),Ne(at,{class:Ko},e)])},props:{propertyName:String,maxColors:{type:Number,default:10}},data:()=>({CLASS_COLOR_PICKER:Wo,CLASS_COLOR_PICKER_SWATCHES:Ko,CLASS_COLOR_PICKER_SWATCH:zo,colorInput:null,swatches:[]}),mounted(){let e=ji(v);e&&e.listen(t=>{this.inspector=t,this.swatches=t.ensureContext(Ae,()=>[]),this.colorInput=this.$refs.colorInput,this.colorInput.addEventListener("change",this.colorPicked),t.bind(ki,r=>{r.key===Ae&&(this.swatches=r.value.slice())}),t.bind("change",this.setCurrentColor),this.setCurrentColor()})},methods:{addColor:function(e){let t=this.inspector.ensureContext(Ae,()=>[]);if(e=e.toUpperCase(),!(t.find(o=>o.toUpperCase()===e)!=null)){let o=this.maxColors||10,a=t.slice();a.unshift(e),a.length>o&&(a.length=o),this.inspector.updateContext(Ae,a)}},colorPicked:function(){let e=this.colorInput.value;this.inspector.setValue(this.propertyName,e,null),this.addColor(e)},selectSwatch:function(e){this.inspector.setValue(this.propertyName,e,null),this.colorInput.value=e},setCurrentColor:function(){let e=this.inspector.getValue(this.propertyName);e!=null&&(this.colorInput.value=e,this.addColor(e))}}};import{h as xe,inject as Fi,nextTick as Hi,Teleport as $i,watch as Wi}from"vue";import{ELEMENT_DIV as lt,uuid as zi}from"@visuallyjs/browser-ui";var pt={props:{placement:{type:String,default:"floating"},position:{type:Object},constraints:{type:Object}},data:()=>({hasMounted:!1,surface:null}),setup(e){return{service:Fi(l)}},mounted(){let e=t=>{if(!this.hasMounted){this.surface=t,this.hasMounted=!0;let r=this.position||{x:0,y:0};Hi().then(()=>{this.placement==="floating"?t.floatElement(this.$refs.root,r):t.fixElement(this.$refs.fixedEl,r,this.constraints)})}};this.service.surface.value==null?Wi(this.service.surface,e):e(this.service.surface.value)},render(){return xe(lt,{ref:"root"},this.hasMounted?this.placement==="floating"?xe(lt,{},this.$slots.hasOwnProperty("default")?this.$slots.default():[]):xe($i,{to:this.surface.vertexLayer,key:zi()},xe(lt,{ref:"fixedEl"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])):[])}};import{provide as Ki}from"vue";var ct={setup(){Ki(l,new _("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Ji,inject as Yi,watch as Xi}from"vue";import{DiagramPalette as Zi,ELEMENT_DIV as qi,log as Qi}from"@visuallyjs/browser-ui";var ut={name:ae,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},updateTypeOnPaletteTap:Boolean,iconSize:Object,showLabels:Boolean,paletteStrokeWidth:Number,showAllMessage:String,onCellAdded:Function,mode:String,allowClickToAdd:Boolean,autoExitDrawMode:Boolean,selectAfterAdd:{type:Boolean,default:!0},className:String,diagram:{type:Object},onVertexAdded:Function,preparedShapes:Array,allowDropOnEdge:[Boolean,Function],autoEdgeConnect:[Boolean,Object],showGroups:{type:Boolean,default:!0}},setup(e){return{service:Yi(l)}},data:()=>({hasMounted:!1}),mounted(){if(this.service==null&&this.diagram==null)Qi("Cannot mount DiagramPalette - no service found and Diagram not passed in as a prop");else{let e=t=>{this.hasMounted||(this.hasMounted=!0,new Zi(this.$refs.container,t,{fill:this.fill,outline:this.outline,dragSize:this.dragSize,inspector:this.inspector,iconSize:this.iconSize,showLabels:this.showLabels,paletteStrokeWidth:this.paletteStrokeWidth,showAllMessage:this.showAllMessage,onCellAdded:this.onCellAdded,mode:this.mode,allowClickToAdd:this.allowClickToAdd,autoExitDrawMode:this.autoExitDrawMode,selectAfterAdd:this.selectAfterAdd,onVertexAdded:this.onVertexAdded,updateTypeOnPaletteTap:this.updateTypeOnPaletteTap,preparedShapes:this.preparedShapes,allowDropOnEdge:this.allowDropOnEdge,autoEdgeConnect:this.autoEdgeConnect,showGroups:this.showGroups}))};this.diagram?e(this.diagram):this.service.diagram.value!=null?e(this.service.diagram.value):Xi(this.service.diagram,e)}},render:function(){return Ji(qi,{ref:"container"})}};import{BLOCK as es,ELEMENT_DIV as ts,NONE as os,PopupHandler as rs,CLASS_SURFACE_POPUP as ns,ABSOLUTE as is}from"@visuallyjs/browser-ui";import{h as ss,inject as as,onMounted as ls,ref as De,watch as ps}from"vue";var dt={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=as(l),r=De(null),o=De("block"),a=De(null),p=De(null),n=s=>{p.value=new rs(e.selector,a.value,s,i=>{r.value=i,i==null?o.value=os:(o.value=es,requestAnimationFrame(()=>p.value.$positionPopup()))},e.anchor)};return ls(()=>{t.surface.value==null?ps(t.surface,n):n(t.surface.value)}),{service:t,current:r,display:o,rootRef:a,handler:p}},render(){var e;return ss(ts,{ref:"rootRef",display:this.display,position:is,class:ns},this.$slots.hasOwnProperty("default")?this.$slots.default({vertex:this.current,model:(e=this.service.surface.value)==null?void 0:e.model,ui:this.service.surface.value,hide:()=>{var t;return(t=this.handler)==null?void 0:t.$hide()}}):[])}};import{inject as Ie,watch as x}from"vue";import{BackgroundPlugin as be,GeneratedGridBackground as cs,SimpleBackground as us,TiledBackground as ds}from"@visuallyjs/browser-ui";var Yo={setup(){return{service:Ie(l)}},name:X,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:be.type,options:this.options})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(x(this.service.surface,e),x(this.service.paper,e))},render:function(e){return[]}},Xo={setup(){return{service:Ie(l)}},name:Z,props:{grid:{type:Object},showBorder:{type:Boolean},minWidth:{type:Number},minHeight:{type:Number},showTickMarks:{type:Boolean},tickMarksPerCell:{type:Number},maxWidth:{type:Number},maxHeight:{type:Number},autoShrink:{type:Boolean},gridType:{type:String},dotRadius:{type:Number},tickDotRadius:{type:Number},visible:{type:Boolean}},mounted:function(){let e=t=>{t.addPlugin({type:be.type,options:{type:cs.type,grid:this.grid,showBorder:this.showBorder,minWidth:this.minWidth,minHeight:this.minHeight,showTickMarks:this.showTickMarks,tickMarksPerCell:this.tickMarksPerCell,maxWidth:this.maxWidth,maxHeight:this.maxHeight,autoShrink:this.autoShrink,gridType:this.gridType,dotRadius:this.dotRadius,tickDotRadius:this.tickDotRadius,visible:this.visible}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(x(this.service.surface,e),x(this.service.paper,e))},render:function(e){return[]}},Zo={setup(){return{service:Ie(l)}},name:q,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:be.type,options:{type:us.type,url:this.url}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(x(this.service.surface,e),x(this.service.paper,e))},render:function(e){return[]}},qo={setup(){return{service:Ie(l)}},name:Q,props:{url:{type:String},urlGenerator:{type:Function},tileSize:{type:Object},width:{type:Number},height:{type:Number},maxZoom:{type:Number},tiling:{type:String},panDebounceTimeout:{type:Number},zoomDebounceTimeout:{type:Number}},mounted:function(){let e=t=>{t.addPlugin({type:be.type,options:{type:ds.type,url:this.url,urlGenerator:this.urlGenerator,tileSize:this.tileSize,width:this.width,height:this.height,tiling:this.tiling,panDebounceTimeout:this.panDebounceTimeout,zoomDebounceTimeout:this.zoomDebounceTimeout}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(x(this.service.surface,e),x(this.service.paper,e))},render:function(e){return[]}};import{h as Me,inject as ms}from"vue";import{ELEMENT_DIV as mt,INSPECTOR_CONTEXT_EDGE_PROPERTY_MAPPINGS as hs,log as fs}from"@visuallyjs/browser-ui";var ht={name:ge,props:{getPropertyName:Function,showName:{type:Boolean,default:!0},cssClass:String,mappings:Array},setup(){return{inspectorProvider:ms(v)}},data(){return{inspector:null}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{this.inspector=e}):fs("WARN: EdgePropertyMappingsInspector not instantiated inside an InspectorComponent.")},methods:{resolveMappings(){return this.mappings?this.mappings:this.inspector?this.inspector.getFromContext(hs)||this.inspector.$ui.$getEdgePropertyMappings():[]},toList(e){let t=e.property;return Array.isArray(t)?t:[t]},getPropertyKey(e){return this.toList(e).join(" ")},getName(e){return this.getPropertyName?this.getPropertyName(e):e.name||this.getPropertyKey(e)}},render(){let e=this.resolveMappings(),t=this.cssClass||"vjs-inspector-section";return Me(mt,{},e.map(r=>{let o=this.getPropertyKey(r),a=this.getName(r),p=[];return this.showName!==!1&&p.push(Me(mt,{},a)),p.push(Me(k,{propertyName:o})),Me(mt,{class:t,key:o},p)}))}};import{h as d,inject as Ps}from"vue";import{isNode as Qo,isString as er,ELEMENT_DIV as F,log as Os}from"@visuallyjs/browser-ui";var Es=7,gs=["True","False"];function we(e,t){return(e.booleanLabels||gs)[t?0:1]}function D(e){return er(e)?e:e.label}function Ve(e){return er(e)?e:e.value}var ft={name:ye,props:{vertex:Object,maxRadios:Number},setup(){return{inspectorProvider:Ps(v)}},data(){return{inspector:null}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{this.inspector=e}):Os("WARN: ShapePropertiesInspector not instantiated inside an InspectorComponent.")},methods:{resolveShapeDef(){if(this.inspector==null||this.vertex==null||!Qo(this.vertex))return null;let{type:e,category:t}=this.vertex.data;if(!e||!t)return null;let o=this.inspector.$ui.getShapeLibrary().getShapeSet(t);return o?o.shapes.find(a=>a.type===e):null}},render(){let e=this.vertex;if(!e||!Qo(e))return null;let t=this.resolveShapeDef();if(!t||!t.properties)return null;let r=this.maxRadios==null?Es:this.maxRadios;return t.properties.map(o=>{let a=o.type==="boolean",p=o.values&&o.values.length>0,n=p&&o.editor!=="select"&&o.values.length<=r,s=[];return(!a||o.editor==="select"||o.editor==="radio")&&s.push(d("label",{class:"vjs-inspector-property-label"},o.label||o.id)),o.type==="string"?p?n?s.push(d(F,{class:"vjs-radio-group"},o.values.map(i=>d("label",{key:D(i)},[d("input",{type:"radio",name:o.id,"vjs-att":o.id,value:Ve(i)})," "+D(i)])))):s.push(d("select",{"vjs-att":o.id},o.values.map(i=>d("option",{key:D(i),value:Ve(i)},D(i))))):s.push(d("input",{type:"text","vjs-att":o.id,placeholder:o.description})):o.type==="number"?p?n?s.push(d(F,{class:"vjs-radio-group"},o.values.map(i=>d("label",{key:D(i)},[d("input",{type:"radio","vjs-att":o.id,value:Ve(i)})," "+D(i)])))):s.push(d("select",{"vjs-att":o.id},o.values.map(i=>d("option",{key:D(i),value:Ve(i)},D(i))))):s.push(d("input",{type:"number","vjs-att":o.id,placeholder:o.description,min:o.min,max:o.max})):a?o.editor==="select"?s.push(d("select",{"vjs-att":o.id,"vjs-datatype":"boolean"},[d("option",{value:""}),d("option",{value:"true"},we(o,!0)),d("option",{value:"false"},we(o,!1))])):o.editor==="radio"?s.push(d(F,{class:"vjs-radio-group"},[d("label",[d("input",{type:"radio",name:o.id,"vjs-att":o.id,"vjs-datatype":"boolean",value:"true"}),d("span",we(o,!0))]),d("label",[d("input",{type:"radio",name:o.id,"vjs-att":o.id,"vjs-datatype":"boolean",value:"false"}),d("span",we(o,!1))])])):s.push(d("label",[d("input",{type:"checkbox","vjs-datatype":"boolean","vjs-att":o.id})," "+(o.label||o.id)])):s.push(d("input",{type:"text","vjs-att":o.id,placeholder:o.description})),o.description&&s.push(d(F,{class:"vjs-field-desc"},o.description)),d(F,{key:o.id,class:"vjs-inspector-field"},s)})}};var mm={install:function(e,t){e.component(oo,tt),e.component(ro,ot),e.component(no,ct),e.component(te,To),e.component(oe,vo),e.component(se,Uo),e.component(ee,Lo),e.component(ne,Mo),e.component(ie,Vo),e.component(X,Yo),e.component(Z,Xo),e.component(q,Zo),e.component(Q,qo),e.component(re,Fo),e.component(ae,ut),e.component(pe,ze),e.component(le,We),e.component(ce,Ke),e.component(ue,Ye),e.component(de,Xe),e.component(me,Je),e.component(Oe,et),e.component(Pe,Qe),e.component(fe,qe),e.component(he,Ze),e.component(K,nt),e.component(J,it),e.component(Y,k),e.component(qt,Jo),e.component(Ee,st),e.component(ge,ht),e.component(ye,ft),e.component(so,pt),e.component(io,dt),e.provide(l,new _("root"))}};import{shallowRef as Pt,ref as ys}from"vue";import{EVENT_ZOOM as Ot}from"@visuallyjs/browser-ui";import{inject as Cs}from"vue";function Cm(){let e=Cs(l),t=Pt(null),r=Pt(null),o=Pt(null),a=ys(1);return e==null||e.getSurface(p=>{r.value=p,r.value.bind(Ot,n=>{a.value=n.zoom})}),e==null||e.getDiagram(p=>{t.value=p,t.value.$ui.bind(Ot,n=>{a.value=n.zoom})}),e==null||e.getPaper(p=>{o.value=p,o.value.bind(Ot,n=>{a.value=n.zoom})}),a}import{inject as Ts,onUnmounted as _s}from"vue";import{EVENT_DATA_UPDATED as tr,EVENT_GRAPH_CLEARED as or}from"@visuallyjs/browser-ui";function Im(e){let t=Ts(l);if(t){let r=null,o=()=>{r&&e(r)},a=()=>{r&&(r.unbind(tr,o),r.unbind(or,o))},p=n=>{a(),r=n,r&&(r.bind(tr,o),r.bind(or,o),o())};t.getModel(n=>{p(n)}),_s(()=>{a()})}}import{shallowRef as Ss}from"vue";import{inject as vs}from"vue";function Lm(){let e=vs(l),t=Ss(null);return e==null||e.getSurface(r=>{t.value=r}),t}import{shallowRef as Rs}from"vue";import{inject as Ns}from"vue";function Hm(){let e=Ns(l),t=Rs(null);return e==null||e.getDiagram(r=>{t.value=r}),t}import{shallowRef as As}from"vue";import{inject as xs}from"vue";function Ym(){let e=xs(l),t=As(null);return e==null||e.getPaper(r=>{t.value=r}),t}export{ve as $initialiseVueOverlays,Xe as AreaChartComponent,Yo as BackgroundComponent,ze as BarChartComponent,Po as BaseOverlayComponent,g as BrowserUIVueModel,qe as BubbleChartComponent,eo as CLASS_VUE_GROUP,Qt as CLASS_VUE_NODE,to as CLASS_VUE_OVERLAY,de as COMPONENT_AREA_CHART,X as COMPONENT_BACKGROUND,pe as COMPONENT_BAR_CHART,fe as COMPONENT_BUBBLE_CHART,le as COMPONENT_COLUMN_CHART,ne as COMPONENT_CONTROLS,se as COMPONENT_DIAGRAM,ae as COMPONENT_DIAGRAM_PALETTE,no as COMPONENT_DIAGRAM_PROVIDER,ge as COMPONENT_EDGE_PROPERTY_MAPPINGS_INSPECTOR,ie as COMPONENT_EXPORT_CONTROLS,Pe as COMPONENT_GAUGE_CHART,Z as COMPONENT_GRID_BACKGROUND,q as COMPONENT_IMAGE_BACKGROUND,Ee as COMPONENT_INSPECTOR,ue as COMPONENT_LINE_CHART,ee as COMPONENT_MINIVIEW,re as COMPONENT_PALETTE,oe as COMPONENT_PAPER,ro as COMPONENT_PAPER_PROVIDER,me as COMPONENT_PIE_CHART,Oe as COMPONENT_SANKEY_CHART,he as COMPONENT_SCATTER_CHART,ye as COMPONENT_SHAPE_PROPERTIES_INSPECTOR,te as COMPONENT_SURFACE,io as COMPONENT_SURFACE_POPUP,oo as COMPONENT_SURFACE_PROVIDER,Q as COMPONENT_TILED_IMAGE_BACKGROUND,ce as COMPONENT_XY_CHART,Jo as ColorPickerComponent,We as ColumnChartComponent,Mo as ControlsComponent,Zt as DEFAULT_SHAPE_HEIGHT,Xt as DEFAULT_SHAPE_WIDTH,Ct as DEFAULT_VUE_PAPER_ID,yt as DEFAULT_VUE_SURFACE_ID,pt as DecoratorComponent,Uo as DiagramComponent,ut as DiagramPaletteComponent,ct as DiagramProvider,Rr as EVENT_VERTEX_UPDATED,je as EVENT_VERTICES_RENDERED,ht as EdgePropertyMappingsInspectorComponent,k as EdgeTypePickerComponent,Vo as ExportControlsComponent,Qe as GaugeChartComponent,Xo as GridBackgroundComponent,Zo as ImageBackgroundComponent,st as InspectorComponent,v as InspectorGetterSymbol,Mi as InspectorSetterSymbol,Ye as LineChartComponent,Lo as MiniviewComponent,vt as PROP_ACTIVE_TRACKING,$t as PROP_ALLOW_CLICK_TO_ADD,Lt as PROP_ALLOW_DROP_ON_CANVAS,Bt as PROP_ALLOW_DROP_ON_EDGE,Ut as PROP_ALLOW_DROP_ON_GROUP,Gt as PROP_ALLOW_DROP_ON_NODE,Wt as PROP_ALLOW_ROTATION,Kt as PROP_AUTO_EDGE_CONNECT,Yt as PROP_CANVAS_DROP_FILTER,V as PROP_CLASS_NAME,Ht as PROP_CLICK_TO_ADD_ONLY,_t as PROP_CLICK_TO_CENTER,Le as PROP_CSV_DATA,y as PROP_DATA,Mt as PROP_DATA_GENERATOR,Be as PROP_DATA_SOURCE_FILTER,z as PROP_DATA_TYPE,Jt as PROP_DRAG_SIZE,Vt as PROP_GROUP_IDENTIFIER,ma as PROP_ID,jt as PROP_IGNORE_DROP_ON_NODE,xt as PROP_INTERACTIVE,Ue as PROP_JSON_DATA,At as PROP_MODE,$ as PROP_MODEL,B as PROP_MODEL_OPTIONS,kt as PROP_ON_VERTEX_ADDED,M as PROP_OPTIONS,Nt as PROP_PAPER_ID,Dt as PROP_PIVOT,H as PROP_RENDER_OPTIONS,zt as PROP_ROTATION_SPEED,bt as PROP_SELECTOR,Ft as PROP_SELECT_AFTER_ADD,St as PROP_SHOW_LASSO,N as PROP_SURFACE_ID,Rt as PROP_TRACK_SELECTION,Tt as PROP_TYPE_FUNCTION,wt as PROP_TYPE_GENERATOR,E as PROP_URL,It as PROP_USE_MODEL,W as PROP_VIEW_OPTIONS,Fo as PaletteComponent,vo as PaperComponent,ot as PaperProvider,Je as PieChartComponent,et as SankeyChartComponent,Ze as ScatterChartComponent,nt as ShapeComponent,it as ShapePaletteComponent,ft as ShapePropertiesInspectorComponent,To as SurfaceComponent,dt as SurfacePopup,tt as SurfaceProvider,qt as TAG_COLOR_PICKER,so as TAG_DECORATOR,Y as TAG_EDGE_TYPE_PICKER,K as TAG_SHAPE,J as TAG_SHAPE_PALETTE,qo as TiledImageBackgroundComponent,mm as VisuallyJsPlugin,_ as VisuallyJsService,l as VisuallyJsServiceKey,Ke as XYChartComponent,Eo as addPaper,Oo as addSurface,Xa as bindToDevLifecycle,wi as doProvideInspector,Vs as newInstance,Hm as useDiagram,Ym as usePaper,Lm as useSurface,Im as useVisuallyJsUpdate,Cm as useZoom,lo as vertexHasRendered,po as vertexHasUpdated,Nr as vertexWillRender};
|