@visuallyjs/browser-ui-vue 1.2.2 → 1.2.4
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/definitions.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const PROP_MODEL_OPTIONS = "modelOptions";
|
|
|
17
17
|
export declare const PROP_MODEL = "model";
|
|
18
18
|
export declare const PROP_VIEW_OPTIONS = "viewOptions";
|
|
19
19
|
export declare const PROP_URL = "url";
|
|
20
|
+
export declare const PROP_DATA_TYPE = "dataType";
|
|
20
21
|
export declare const PROP_INTERACTIVE = "interactive";
|
|
21
22
|
export declare const PROP_PIVOT = "pivot";
|
|
22
23
|
export declare const PROP_DATA_SOURCE_FILTER = "dataSourceFilter";
|
|
@@ -309,6 +310,10 @@ export interface SurfaceComponentProps {
|
|
|
309
310
|
* Optional url for a dataset to load.
|
|
310
311
|
*/
|
|
311
312
|
url?: string;
|
|
313
|
+
/**
|
|
314
|
+
* ID of the format that `data` or the data retrieved from `url` is expected to be in. Defaults to `JSON_DATATYPE`.
|
|
315
|
+
*/
|
|
316
|
+
dataType?: string;
|
|
312
317
|
/**
|
|
313
318
|
* Optional dataset to load.
|
|
314
319
|
*/
|
|
@@ -340,6 +345,10 @@ export interface PaperComponentProps {
|
|
|
340
345
|
* Optional url for a dataset to load.
|
|
341
346
|
*/
|
|
342
347
|
url?: string;
|
|
348
|
+
/**
|
|
349
|
+
* ID of the format that `data` or the data retrieved from `url` is expected to be in. Defaults to `JSON_DATATYPE`.
|
|
350
|
+
*/
|
|
351
|
+
dataType?: string;
|
|
343
352
|
/**
|
|
344
353
|
* Optional dataset to load.
|
|
345
354
|
*/
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@visuallyjs/browser-ui-vue","version":"1.2.
|
|
1
|
+
{"name":"@visuallyjs/browser-ui-vue","version":"1.2.4","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.4"},"homepage":"https://visuallyjs.com/vue","bugs":"https://github.com/visuallyjs/visuallyjs/issues"}
|
package/paper-component.d.ts
CHANGED
package/surface-component.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var We=Object.defineProperty,nr=Object.defineProperties,ir=Object.getOwnPropertyDescriptor,sr=Object.getOwnPropertyDescriptors,ar=Object.getOwnPropertyNames,Io=Object.getOwnPropertySymbols;var wo=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable;var Mo=(e,t,o)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,z=(e,t)=>{for(var o in t||(t={}))wo.call(t,o)&&Mo(e,o,t[o]);if(Io)for(var o of Io(t))lr.call(t,o)&&Mo(e,o,t[o]);return e},he=(e,t)=>nr(e,sr(t));var pr=(e,t)=>{for(var o in t)We(e,o,{get:t[o],enumerable:!0})},cr=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ar(t))!wo.call(e,s)&&s!==o&&We(e,s,{get:()=>t[s],enumerable:!(n=ir(t,s))||n.enumerable});return e};var ur=e=>cr(We({},"__esModule",{value:!0}),e);var Ar={};pr(Ar,{$initialiseVueOverlays:()=>$e,AreaChartComponent:()=>it,BackgroundComponent:()=>No,BarChartComponent:()=>tt,BaseOverlayComponent:()=>fo,BrowserUIVueModel:()=>N,BubbleChartComponent:()=>at,CLASS_VUE_GROUP:()=>ro,CLASS_VUE_NODE:()=>oo,CLASS_VUE_OVERLAY:()=>no,COMPONENT_AREA_CHART:()=>Le,COMPONENT_BACKGROUND:()=>ye,COMPONENT_BAR_CHART:()=>be,COMPONENT_BUBBLE_CHART:()=>ke,COMPONENT_COLUMN_CHART:()=>we,COMPONENT_CONTROLS:()=>xe,COMPONENT_DIAGRAM:()=>Ie,COMPONENT_DIAGRAM_PALETTE:()=>Me,COMPONENT_DIAGRAM_PROVIDER:()=>ao,COMPONENT_EXPORT_CONTROLS:()=>De,COMPONENT_GAUGE_CHART:()=>je,COMPONENT_GRID_BACKGROUND:()=>ge,COMPONENT_IMAGE_BACKGROUND:()=>Te,COMPONENT_INSPECTOR:()=>He,COMPONENT_LINE_CHART:()=>Be,COMPONENT_MINIVIEW:()=>ve,COMPONENT_PALETTE:()=>Ae,COMPONENT_PAPER:()=>Ne,COMPONENT_PAPER_PROVIDER:()=>so,COMPONENT_PIE_CHART:()=>Ue,COMPONENT_SANKEY_CHART:()=>Fe,COMPONENT_SCATTER_CHART:()=>Ge,COMPONENT_SURFACE:()=>Re,COMPONENT_SURFACE_POPUP:()=>lo,COMPONENT_SURFACE_PROVIDER:()=>io,COMPONENT_TILED_IMAGE_BACKGROUND:()=>Se,COMPONENT_XY_CHART:()=>Ve,ColorPickerComponent:()=>Ro,ColumnChartComponent:()=>et,ControlsComponent:()=>yo,DEFAULT_SHAPE_HEIGHT:()=>eo,DEFAULT_SHAPE_WIDTH:()=>Qt,DEFAULT_VUE_PAPER_ID:()=>vt,DEFAULT_VUE_SURFACE_ID:()=>St,DecoratorComponent:()=>Et,DiagramComponent:()=>So,DiagramPaletteComponent:()=>_t,DiagramProvider:()=>Ct,EVENT_VERTEX_UPDATED:()=>Lo,EVENT_VERTICES_RENDERED:()=>Bo,EdgeTypePickerComponent:()=>Ot,ExportControlsComponent:()=>go,GaugeChartComponent:()=>lt,GridBackgroundComponent:()=>Ao,ImageBackgroundComponent:()=>xo,InspectorComponent:()=>ft,InspectorGetterSymbol:()=>ae,InspectorSetterSymbol:()=>Ko,LineChartComponent:()=>nt,MiniviewComponent:()=>To,PROP_ACTIVE_TRACKING:()=>xt,PROP_ALLOW_CLICK_TO_ADD:()=>Xt,PROP_ALLOW_DROP_ON_CANVAS:()=>Ht,PROP_ALLOW_DROP_ON_EDGE:()=>Ft,PROP_ALLOW_DROP_ON_GROUP:()=>$t,PROP_ALLOW_DROP_ON_NODE:()=>Wt,PROP_CANVAS_DROP_FILTER:()=>qt,PROP_CLASS_NAME:()=>K,PROP_CLICK_TO_ADD_ONLY:()=>Yt,PROP_CLICK_TO_CENTER:()=>Nt,PROP_CSV_DATA:()=>Vt,PROP_DATA:()=>G,PROP_DATA_GENERATOR:()=>Gt,PROP_DATA_SOURCE_FILTER:()=>Ke,PROP_DRAG_SIZE:()=>Zt,PROP_GROUP_IDENTIFIER:()=>jt,PROP_ID:()=>mr,PROP_IGNORE_DROP_ON_NODE:()=>zt,PROP_INTERACTIVE:()=>wt,PROP_JSON_DATA:()=>Bt,PROP_MODE:()=>Mt,PROP_MODEL:()=>Pe,PROP_MODEL_OPTIONS:()=>J,PROP_ON_VERTEX_ADDED:()=>Kt,PROP_OPTIONS:()=>Q,PROP_PAPER_ID:()=>It,PROP_PIVOT:()=>bt,PROP_RENDER_OPTIONS:()=>fe,PROP_SELECTOR:()=>Ut,PROP_SELECT_AFTER_ADD:()=>Jt,PROP_SHOW_LASSO:()=>At,PROP_SURFACE_ID:()=>U,PROP_TRACK_SELECTION:()=>Dt,PROP_TYPE_FUNCTION:()=>Rt,PROP_TYPE_GENERATOR:()=>kt,PROP_URL:()=>k,PROP_USE_MODEL:()=>Lt,PROP_VIEW_OPTIONS:()=>Oe,PaletteComponent:()=>vo,PaperComponent:()=>Co,PaperProvider:()=>ut,PieChartComponent:()=>rt,SankeyChartComponent:()=>pt,ScatterChartComponent:()=>st,ShapeComponent:()=>dt,ShapePaletteComponent:()=>ht,SurfaceComponent:()=>Eo,SurfacePopup:()=>yt,SurfaceProvider:()=>ct,TAG_COLOR_PICKER:()=>to,TAG_DECORATOR:()=>po,TAG_EDGE_TYPE_PICKER:()=>_e,TAG_SHAPE:()=>Ee,TAG_SHAPE_PALETTE:()=>Ce,TiledImageBackgroundComponent:()=>Do,VisuallyJsPlugin:()=>gr,VisuallyJsService:()=>x,VisuallyJsServiceKey:()=>a,XYChartComponent:()=>ot,addPaper:()=>Oo,addSurface:()=>Po,bindToDevLifecycle:()=>hr,doProvideInspector:()=>Jo,newInstance:()=>dr,useDiagram:()=>Rr,usePaper:()=>Nr,useSurface:()=>vr,useVisuallyJsUpdate:()=>Sr,useZoom:()=>Tr,vertexHasRendered:()=>co,vertexHasUpdated:()=>uo,vertexWillRender:()=>Uo});module.exports=ur(Ar);var ze=require("@visuallyjs/browser-ui"),N=class extends ze.BrowserUIModel{render(t,o){return(0,ze.log)("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function dr(e){return e=e||{},new N(e)}var St="surfaceId",vt="paperId",Rt="typeFunction",Nt="clickToCenter",At="showLasso",xt="activeTracking",Dt="trackSelection",U="surfaceId",It="paperId",K="className",G="data",Mt="mode",Q="options",fe="renderOptions",J="modelOptions",Pe="model",Oe="viewOptions",k="url",wt="interactive",bt="pivot",Ke="dataSourceFilter",Vt="csvData",Bt="jsonData",Lt="useModel",mr="id",Ut="selector",Gt="dataGenerator",kt="typeGenerator",jt="groupIdentifier",Ft="allowDropOnEdge",Ht="allowDropOnCanvas",$t="allowDropOnGroup",Wt="allowDropOnNode",zt="ignoreDropOnNode",Kt="onVertexAdded",Jt="selectAfterAdd",Yt="clickToAddOnly",Xt="allowClickToAdd",Zt="dragSize",qt="canvasDropFilter",Ee="Shape",Ce="ShapePalette",Qt=120,eo=90,_e="EdgeTypePickerComponent",to="ColorPickerComponent",oo="vjs-vue-node",ro="vjs-vue-group",no="vjs-vue-overlay",ye="BackgroundComponent",ge="GridBackgroundComponent",Te="ImageBackgroundComponent",Se="TiledImageBackgroundComponent",ve="MiniviewComponent",Re="SurfaceComponent",io="SurfaceProvider",Ne="PaperComponent",so="PaperProvider",ao="DiagramProvider",Ae="PaletteComponent",xe="ControlsComponent",De="ExportControlsComponent",Ie="DiagramComponent",Me="DiagramPaletteComponent",we="ColumnChartComponent",be="BarChartComponent",Ve="XYChartComponent",Be="LineChartComponent",Le="AreaChartComponent",Ue="PieChartComponent",Ge="ScatterChartComponent",ke="BubbleChartComponent",je="GaugeChartComponent",Fe="SankeyChartComponent",He="InspectorComponent",lo="SurfacePopup",po="Decorator";var j=require("@visuallyjs/browser-ui"),Je={props:{data:Object,model:N,obj:j.Vertex,vertex:j.Vertex,ui:j.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=(0,j.isGroup)(e.vertex)?ro:oo;e.el.firstElementChild&&(0,j.addClass)(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),co(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),uo(this.ui.id,this.vertex)}};var bo={mixins:[Je],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 Vo={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:[Je]};var L=require("vue"),u=require("@visuallyjs/browser-ui"),mo=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new u.OptimisticEventGenerator}vertexWillRender(t){this.unrenderedVertices.set(t.id,t)}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&this.eventManager.fire(Bo)}vertexHasUpdated(t){this.eventManager.fire(Lo,t)}},Bo="vertices:rendered",Lo="vertex:updated",ho=new Map;function Ye(e){return ho.has(e)||ho.set(e,new mo),ho.get(e)}function co(e,t){Ye(e).vertexHasRendered(t)}function uo(e,t){Ye(e).vertexHasUpdated(t)}function Uo(e,t){Ye(e).vertexWillRender(t)}function hr(e,t,o){Ye(e).eventManager.bind(t,o)}var Xe=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},fo={props:{data:Object,model:N,obj:u.Edge,edge:u.Edge,overlay:u.Overlay,ui:u.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&(0,u.addClass)(e.el.firstElementChild,no)},updated(){this.ui.$revalidateElement(this.el)}},Ze=(e,t,o,n,s,c,r,l,p)=>{let f=r.component!=null,m=(0,u.isGroup)(l),y=[];f||y.push(m?u.CLASS_DEFAULT_GROUP:u.CLASS_DEFAULT_NODE);let C=f?r.component:{render(T){return T.data.label||""}};if(C){let T=document.createElement(u.ELEMENT_DIV);(0,u.updateClasses)(T,y),C.mixins==null&&(C.mixins=[]);let R=m?Vo:bo;C.mixins.find(B=>B===R)||C.mixins.push(R),Uo(c.id,l);let q={data:o,model:(0,L.markRaw)(n),ui:(0,L.markRaw)(c),obj:l,vertex:l,el:T,def:(0,L.markRaw)(r),eventInfo:p==null?null:(0,L.markRaw)(p)};if(r.inject)for(let B in r.inject){let W=r.inject[B],rr=typeof W=="function"?W(l,n):W;q[B]=rr}e.push({component:(0,L.markRaw)(C),el:T,e:l.getFullId(),props:q,vertex:l})}};function Po(e,t,o,n,s,c){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(p,f,m,y)=>{},render:(p,f,m,y,C,T,R,H)=>Ze(n,p,f,m,y,C,T,R,H),cleanupVertex:Xe,cleanupPort:Xe,rerender:(p,f,m,y,C,T,R,H,q)=>{let B=n.findIndex(W=>W.vertex===R);B!=null&&n.splice(B,1)[0].el,C.$__unmanage(q,!0,!0),requestAnimationFrame(()=>{Ze(n,p,f,m,y,C,T,R,H)})}},l=(0,u.extend)(s||{},{view:c||{},id:t});return(0,u.renderSurface)(e,o,r,l)}function Oo(e,t,o,n,s,c){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(p,f,m,y)=>{},render:(p,f,m,y,C,T,R,H)=>Ze(n,p,f,m,y,C,T,R,H),cleanupVertex:Xe,cleanupPort:Xe,rerender:(p,f,m,y,C,T,R,H,q)=>{let B=n.findIndex(W=>W.vertex===R);B!=null&&n.splice(B,1)[0].el,C.$__unmanage(q,!0,!0),requestAnimationFrame(()=>{Ze(n,p,f,m,y,C,T,R,H)})}},l=(0,u.extend)(s||{},{view:c||{},id:t});return(0,u.renderPaper)(e,o,r,l)}function $e(e,t,o,n){if(e.edges)for(let s in e.edges){let c=e.edges[s];c.overlays&&(c.overlays=c.overlays.map(r=>{let l={};return r.component!=null?{type:u.OVERLAY_TYPE_CUSTOM,options:{create:f=>{let m=document.createElement(u.ELEMENT_DIV),y=(0,u.uuid)();r.component.mixins==null&&(r.component.mixins=[]),r.component.mixins.indexOf(fo)===-1&&r.component.mixins.push(fo);let C=z({data:f.edge.data,model:(0,L.markRaw)(o()),ui:(0,L.markRaw)(t()),obj:f.edge,edge:f.edge,el:m,def:(0,L.markRaw)(r),eventInfo:null,overlay:r},l);return n.push({component:(0,L.markRaw)(r.component),el:m,e:y,props:C}),m}}}:r}))}}var Y=require("@visuallyjs/browser-ui"),ee=require("vue"),a=Symbol.for("visuallyjs-service"),x=class{constructor(t){this.context=t;this.i=[];this.s=[];this.a=[];this.l=[];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.t(this.s,t,this.p)}getDiagram(t){this.t(this.a,t,this.c)}getPaper(t){this.t(this.l,t,this.u)}getModel(t){this.t(this.i,t,this.r)}getModelDirect(){return this.r}t(t,o,n){if(n!=null)try{o(n)}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.p=t,this.n(t.model),this.o(this.s,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.c=t,this.n(t.model),t.$ui instanceof Y.Surface?this.setSurface(t.$ui):t.$ui instanceof Y.Paper&&this.setPaper(t.$ui),this.o(this.a,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.u=t,this.n(t.model),this.o(this.l,t)}n(t){this.r=t,this.o(this.i,t)}o(t,o){t.forEach(n=>{try{n(o)}catch(s){(0,Y.log)(`WARN: could not flush all queue entries ${s}`)}})}};var D=require("vue"),P=require("@visuallyjs/browser-ui"),Eo={setup(e){return{service:(0,D.inject)(a),surfaceId:e.surfaceId||St}},name:Re,props:{[G]:{type:Object},[fe]:{type:Object},[J]:{type:Object},[Oe]:{type:Object},[Pe]:{type:Object},[k]:{type:String},[U]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new N(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url}):e.data&&t.load({data:e.data});let n=(0,P.clone)(this.viewOptions||{});$e(n,()=>this.surface,()=>t,this.overlays),this.surface=Po(t,this.surfaceId,o,this.vertices,(0,P.clone)(this.renderOptions||{}),n),this.service.setSurface(this.surface);let s=(r,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.e===r);f!=null&&(f.props.data=p())},c=r=>{let l=this.vertices.findIndex(p=>p.e===r);l!==-1&&this.vertices.splice(l,1)};t.bind(P.EVENT_NODE_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(P.EVENT_GROUP_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(P.EVENT_NODE_REMOVED,r=>{c(r.node.id)}),t.bind(P.EVENT_GROUP_REMOVED,r=>{c(r.group.id)}),t.bind(P.EVENT_EDGE_UPDATED,r=>{let l=r.edge.id;this.overlays.forEach(p=>{p.props.edge&&p.props.edge.id===l&&(p.props.data=r.edge.data)})}),t.bind(P.EVENT_EDGE_REMOVED,r=>{let l=r.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.surface.bind(P.EVENT_RENDER_END,()=>setTimeout(()=>this.surface.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>(0,D.h)(D.Teleport,{to:t.el,key:t.e},[(0,D.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,D.h)(D.Teleport,{to:t.el,key:t.e},[(0,D.h)(t.component,t.props)]))}),(0,D.h)(P.ELEMENT_DIV,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var I=require("vue"),O=require("@visuallyjs/browser-ui"),Co={setup(e){return{service:(0,I.inject)(a),paperId:e.paperId||vt}},name:Ne,props:{[G]:{type:Object},[fe]:{type:Object},[J]:{type:Object},[Oe]:{type:Object},[Pe]:{type:Object},[k]:{type:String},[It]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new N(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url}):e.data&&t.load({data:e.data});let n=(0,O.clone)(this.viewOptions||{});$e(n,()=>this.paper,()=>t,this.overlays),this.paper=Oo(t,this.paperId,o,this.vertices,(0,O.clone)(this.renderOptions||{}),n),this.service.setPaper(this.paper);let s=(r,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.e===r);f!=null&&(f.props.data=p())},c=r=>{let l=this.vertices.findIndex(p=>p.e===r);l!==-1&&this.vertices.splice(l,1)};t.bind(O.EVENT_NODE_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(O.EVENT_GROUP_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(O.EVENT_NODE_REMOVED,r=>{c(r.node.id)}),t.bind(O.EVENT_GROUP_REMOVED,r=>{c(r.group.id)}),t.bind(O.EVENT_EDGE_UPDATED,r=>{let l=r.edge.id;this.overlays.forEach(p=>{p.props.edge&&p.props.edge.id===l&&(p.props.data=r.edge.data)})}),t.bind(O.EVENT_EDGE_REMOVED,r=>{let l=r.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.paper.bind(O.EVENT_RENDER_END,()=>setTimeout(()=>this.paper.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>(0,I.h)(I.Teleport,{to:t.el,key:t.e},[(0,I.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,I.h)(I.Teleport,{to:t.el,key:t.e},[(0,I.h)(t.component,t.props)]))}),(0,I.h)(O.ELEMENT_DIV,{ref:"root",class:"vjs-vue-paper",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var d=require("vue"),i=require("@visuallyjs/browser-ui"),fr="Clear dataset?",_o="vjs-selected-mode",Go="can-undo",ko="can-redo",Pr="data-undo",Or="data-redo",jo="data-mode",Er="data-reset",Cr="data-clear",_r="data-zoom-in",yr="data-zoom-out",Fo="vjs-controls-has-selection",yo={setup(e){return{service:(0,d.inject)(a)}},name:xe,props:{clear:{type:Boolean,default:!0},[U]:{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:fr},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(Fo):this.$refs.root.setAttribute(Fo,"true"))}},data:function(){return{ready:!1,hasLasso:!1}},render(){if(this.ready){let e=[];return this.showPan&&(e.push((0,d.h)("i",{class:`vjs-pan-mode ${_o}`,[jo]:i.SURFACE_MODE_PAN,onClick:()=>this.panMode(),title:"Pan mode"},[(0,d.h)("svg",{viewBox:i.PAN_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,d.h)("path",{d:i.PAN_PATH})])])),e.push((0,d.h)("i",{class:"vjs-select-mode",[jo]:i.SURFACE_MODE_SELECT,onClick:()=>this.selectMode(),title:"Select mode"},[(0,d.h)("svg",{viewBox:i.LASSO_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.LASSO_PATH})])]))),this.undoRedo&&(e.push((0,d.h)("i",{class:"vjs-undo",[Pr]:!0,title:"Undo last action",onClick:()=>this.undo()})),e.push((0,d.h)("i",{class:"vjs-redo",[Or]:!0,title:"Redo last action",onClick:()=>this.redo()}))),this.zoomToExtents&&e.push((0,d.h)("i",{class:"vjs-zoom-to-fit",[Er]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[(0,d.h)("svg",{viewBox:i.ZOOM_TO_FIT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.ZOOM_TO_FIT_PATH})])])),this.zoomButtons&&(e.push((0,d.h)("i",{class:"vjs-zoom-in",[_r]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[(0,d.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.ZOOM_IN_PATH})])])),e.push((0,d.h)("i",{class:"vjs-zoom-out",[yr]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[(0,d.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.ZOOM_OUT_PATH})])]))),e.push((0,d.h)("i",{class:i.CLASS_CONTROLS_RESET_SELECTION,[i.ATTRIBUTE_RESET_SELECTION]:"true",onClick:()=>{this.resetSelection()}},[(0,d.h)("svg",{viewBox:i.RESET_SELECTION_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.RESET_SELECTION_PATH})])])),this.clear&&e.push((0,d.h)("i",{class:"vjs-clear-dataset",[Cr]:"true",onClick:()=>{this.doClear()}},[(0,d.h)("svg",{viewBox:i.CLEAR_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.CLEAR_PATH})])])),(0,d.h)(i.ELEMENT_DIV,{class:`vjs-controls ${this.className}`,ref:"root",[Go]:!1,[ko]:!1,[i.ATTRIBUTE_CONTROLS_ORIENTATION]:this.orientation},e)}else return(0,d.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,n=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),_o),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+n+"']"),_o)}),t.model.bind(i.EVENT_UNDOREDO_UPDATE,n=>{this.$refs.root.setAttribute(Go,n.undoCount>0?i.TRUE:i.FALSE),this.$refs.root.setAttribute(ko,n.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,d.watch)(this.service.surface,e):e(this.service.surface.value)}};var M=require("vue"),_=require("@visuallyjs/browser-ui"),go={name:De,setup(e){return{service:(0,M.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 _.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 _.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 _.ImageExportUI(e).export(t)})}},render(){let e=this.showLabel!==!1,t=this.allowSvgExport!==!1,o=this.allowPngExport!==!1,n=this.allowJpgExport!==!1,s=[];return t&&s.push((0,M.h)("i",{},[(0,M.h)("a",{href:"#","data-type":_.TYPE_SVG,onClick:()=>this.exportSVG()},"SVG")])),o&&s.push((0,M.h)("i",{},[(0,M.h)("a",{href:"#","data-type":_.TYPE_PNG,onClick:()=>this.exportPNG()},"PNG")])),n&&s.push((0,M.h)("i",{},[(0,M.h)("a",{href:"#","data-type":_.TYPE_JPG,onClick:()=>this.exportJPG()},"JPG")])),e&&s.unshift((0,M.h)("span",{},[this.label])),(0,M.h)(_.ELEMENT_DIV,{class:`${_.CLASS_CONTROLS} ${_.CLASS_EXPORT_CONTROLS}`},s)}};var X=require("vue"),qe=require("@visuallyjs/browser-ui"),To={setup(e){return{service:(0,X.inject)(a)}},name:ve,props:{[U]:{type:String},[K]:{type:String,default:""},[xt]:{type:Boolean,default:!0},[Nt]:{type:Boolean,default:!0},[At]:{type:Boolean,default:!0},[Dt]:{type:Boolean,default:!0},[Rt]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:qe.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)(qe.ELEMENT_DIV,{ref:"root",class:e.className})}};var te=require("vue"),Qe=require("@visuallyjs/browser-ui"),So={setup(e){return{service:(0,te.inject)(a)}},name:Ie,props:{[G]:{type:Object},[k]:{type:String},[J]:{type:Object},[Q]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=(0,te.markRaw)((0,Qe.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)(Qe.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"),Ho={[K]:{type:String},[G]:{type:Object},[k]:{type:String},[Lt]:{type:Boolean,default:!1}},$o={setup(){return{service:(0,$.inject)(a)}},render:function(){return(0,$.h)(h.ELEMENT_DIV,{class:`${this.className}`,ref:"root"})}};function F(e,t,o=!0){let n=he(z({},Ho),{[Q]:{type:Object}}),s={};return o&&(n[Ke]={type:Function},s[Ke]=function(c){this.chart.setDataSourceFilter(c)}),he(z({},$o),{name:e,props:n,watch:s,data:()=>({hasMounted:!1}),mounted(){let c=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 l=()=>{this.hasMounted=!0,this.chart=new t(c,r)};this.useModel?this.service.model.value!=null?(r.dataSource=this.service.model.value,l()):(0,$.watch)(this.service.model,p=>{this.hasMounted||(r.dataSource=p,l())}):l()}})}var et=F(we,h.ColumnChart),tt=F(be,h.BarChart),ot=F(Ve,h.CategoryValueChart,!1),rt=F(Ue,h.PieChart),nt=F(Be,h.LineChart),it=F(Le,h.AreaChart),st=F(Ge,h.ScatterChart),at=F(ke,h.BubbleChart),lt=F(je,h.GaugeChart,!1),pt=he(z({},$o),{name:Fe,props:he(z({},Ho),{[Vt]:{type:String},[Bt]:{type:Object},[wt]:{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 n=s=>{this.hasMounted||(t.dataSource=s,o())};this.service.model.value==null?(0,$.watch)(this.service.model,n):n(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"),vo={setup(e){return{service:(0,oe.inject)(a)}},name:Ae,props:{[U]:{type:String},[Ut]:{type:String},[Gt]:{type:Function},[kt]:{type:Function},[jt]:{type:Function},[Ft]:{type:Boolean,default:!1},[Ht]:{type:Boolean,default:!0},[$t]:{type:Boolean,default:!0},[Wt]:{type:Boolean,default:!1},[zt]:{type:Boolean,default:!1},[Zt]:Object,[Kt]:Function,[qt]:Function,[K]:String,[Mt]:String,[Jt]:{type:Boolean,default:!1},[Xt]:{type:Boolean,default:!1},[Yt]:{type:Boolean,default:!1}},mounted:function(){let e=t=>{let o={source:this.$refs.root,selector:this.selector,dataGenerator:n=>this.dataGenerator?this.dataGenerator(n):(0,re.defaultDataGenerator)(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};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 Wo=require("vue"),ct={setup(){(0,Wo.provide)(a,new x("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var zo=require("vue"),ut={setup(){(0,zo.provide)(a,new x("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ne=require("vue"),w=require("@visuallyjs/browser-ui"),dt={name:Ee,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:w.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(),n=o.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.appendChild(n),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,w.convertToMultilineText)(s,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||w.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 n=t.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(n),this.multilineLabels!=!1&&(0,w.convertToMultilineText)(n,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||w.DEFAULT_LABEL_FILL_RATIO))}}},render:function(){return(0,ne.h)(w.ELEMENT_SVG,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:w.CLASS_SHAPE})},methods:{getWidth:function(){return this.data.width||Qt},getHeight:function(){return this.data.height||eo},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};var ie=require("vue"),mt=require("@visuallyjs/browser-ui"),ht={name:Ce,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},preparedShapes:Array},setup(e){return{service:(0,ie.inject)(a)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new mt.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,preparedShapes:this.preparedShapes}))};this.service.surface.value==null?(0,ie.watch)(this.service.surface,e):e(this.service.surface.value)},render:function(){return(0,ie.h)(mt.ELEMENT_DIV,{ref:"container"})}};var b=require("vue"),se=require("@visuallyjs/browser-ui"),ae=Symbol.for("VueInspectorGetter"),Ko=Symbol.for("VueInspectorSetter");function Jo(){let e=[],t=null;function o(c){try{c(t)}catch(r){(0,se.log)("WARN: inspector listener threw an exception",r)}}let n={listen:c=>{t!=null?o(c):e.push(c)}},s={inspector:c=>{t=c,e.forEach(o)}};return(0,b.provide)(Ko,s),(0,b.provide)(ae,(0,b.readonly)(n)),s}var ft={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=Jo();return{service:(0,b.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:(n,s)=>{this.emit("update:modelValue",n),this.refresh&&this.refresh(n),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,b.watch)(this.service.surface,e):e(this.service.surface.value)},render(){return(0,b.h)(se.ELEMENT_DIV,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var Pt=require("vue"),le=require("@visuallyjs/browser-ui"),Ot={name:_e,props:{propertyName:String},setup(){return{inspectorProvider:(0,Pt.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,n)=>{e.setValue(this.propertyName,n,null)});t.render(this.propertyName,e.m),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,Pt.h)(le.ELEMENT_DIV,{ref:"container"})}};var Z=require("vue"),E=require("@visuallyjs/browser-ui"),Ro={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(n=>n.toUpperCase()===e)!=null)){let n=this.maxColors||10,s=t.slice();s.unshift(e),s.length>n&&(s.length=n),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"),Et={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 Yo=require("vue"),Ct={setup(){(0,Yo.provide)(a,new x("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ce=require("vue"),ue=require("@visuallyjs/browser-ui"),_t={name:Me,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},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},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,preparedShapes:this.preparedShapes}))};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 A=require("@visuallyjs/browser-ui"),v=require("vue"),yt={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=(0,v.inject)(a),o=(0,v.ref)(null),n=(0,v.ref)("block"),s=(0,v.ref)(null),c=(0,v.ref)(null),r=l=>{c.value=new A.PopupHandler(e.selector,s.value,l,p=>{o.value=p,p==null?n.value=A.NONE:(n.value=A.BLOCK,requestAnimationFrame(()=>c.value.$positionPopup()))},e.anchor)};return(0,v.onMounted)(()=>{t.surface.value==null?(0,v.watch)(t.surface,r):r(t.surface.value)}),{service:t,current:o,display:n,rootRef:s,handler:c}},render(){var e;return(0,v.h)(A.ELEMENT_DIV,{ref:"rootRef",display:this.display,position:A.ABSOLUTE,class:A.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 g=require("vue"),V=require("@visuallyjs/browser-ui"),No={setup(){return{service:(0,g.inject)(a)}},name:ye,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:V.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,g.watch)(this.service.surface,e),(0,g.watch)(this.service.paper,e))},render:function(e){return[]}},Ao={setup(){return{service:(0,g.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:V.BackgroundPlugin.type,options:{type:V.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,g.watch)(this.service.surface,e),(0,g.watch)(this.service.paper,e))},render:function(e){return[]}},xo={setup(){return{service:(0,g.inject)(a)}},name:Te,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:V.BackgroundPlugin.type,options:{type:V.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,g.watch)(this.service.surface,e),(0,g.watch)(this.service.paper,e))},render:function(e){return[]}},Do={setup(){return{service:(0,g.inject)(a)}},name:Se,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:V.BackgroundPlugin.type,options:{type:V.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,g.watch)(this.service.surface,e),(0,g.watch)(this.service.paper,e))},render:function(e){return[]}};var gr={install:function(e,t){e.component(io,ct),e.component(so,ut),e.component(ao,Ct),e.component(Re,Eo),e.component(Ne,Co),e.component(Ie,So),e.component(ve,To),e.component(xe,yo),e.component(De,go),e.component(ye,No),e.component(ge,Ao),e.component(Te,xo),e.component(Se,Do),e.component(Ae,vo),e.component(Me,_t),e.component(be,tt),e.component(we,et),e.component(Ve,ot),e.component(Be,nt),e.component(Le,it),e.component(Ue,rt),e.component(Fe,pt),e.component(je,lt),e.component(ke,at),e.component(Ge,st),e.component(Ee,dt),e.component(Ce,ht),e.component(_e,Ot),e.component(to,Ro),e.component(He,ft),e.component(po,Et),e.component(lo,yt),e.provide(a,new x("root"))}};var de=require("vue"),gt=require("@visuallyjs/browser-ui"),Xo=require("vue");function Tr(){let e=(0,Xo.inject)(a),t=(0,de.shallowRef)(null),o=(0,de.shallowRef)(null),n=(0,de.shallowRef)(null),s=(0,de.ref)(1);return e==null||e.getSurface(c=>{o.value=c,o.value.bind(gt.EVENT_ZOOM,r=>{s.value=r.zoom})}),e==null||e.getDiagram(c=>{t.value=c,t.value.$ui.bind(gt.EVENT_ZOOM,r=>{s.value=r.zoom})}),e==null||e.getPaper(c=>{n.value=c,n.value.bind(gt.EVENT_ZOOM,r=>{s.value=r.zoom})}),s}var Tt=require("vue"),me=require("@visuallyjs/browser-ui");function Sr(e){let t=(0,Tt.inject)(a);if(t){let o=null,n=()=>{o&&e(o)},s=()=>{o&&(o.unbind(me.EVENT_DATA_UPDATED,n),o.unbind(me.EVENT_GRAPH_CLEARED,n))},c=r=>{s(),o=r,o&&(o.bind(me.EVENT_DATA_UPDATED,n),o.bind(me.EVENT_GRAPH_CLEARED,n),n())};t.getModel(r=>{c(r)}),(0,Tt.onUnmounted)(()=>{s()})}}var Zo=require("vue"),qo=require("vue");function vr(){let e=(0,qo.inject)(a),t=(0,Zo.shallowRef)(null);return e==null||e.getSurface(o=>{t.value=o}),t}var Qo=require("vue"),er=require("vue");function Rr(){let e=(0,er.inject)(a),t=(0,Qo.shallowRef)(null);return e==null||e.getDiagram(o=>{t.value=o}),t}var tr=require("vue"),or=require("vue");function Nr(){let e=(0,or.inject)(a),t=(0,tr.shallowRef)(null);return e==null||e.getPaper(o=>{t.value=o}),t}
|
|
1
|
+
var ze=Object.defineProperty,ir=Object.defineProperties,sr=Object.getOwnPropertyDescriptor,ar=Object.getOwnPropertyDescriptors,lr=Object.getOwnPropertyNames,Mo=Object.getOwnPropertySymbols;var bo=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable;var wo=(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={}))bo.call(t,o)&&wo(e,o,t[o]);if(Mo)for(var o of Mo(t))pr.call(t,o)&&wo(e,o,t[o]);return e},he=(e,t)=>ir(e,ar(t));var cr=(e,t)=>{for(var o in t)ze(e,o,{get:t[o],enumerable:!0})},ur=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of lr(t))!bo.call(e,s)&&s!==o&&ze(e,s,{get:()=>t[s],enumerable:!(n=sr(t,s))||n.enumerable});return e};var dr=e=>ur(ze({},"__esModule",{value:!0}),e);var xr={};cr(xr,{$initialiseVueOverlays:()=>We,AreaChartComponent:()=>st,BackgroundComponent:()=>Ao,BarChartComponent:()=>ot,BaseOverlayComponent:()=>Po,BrowserUIVueModel:()=>N,BubbleChartComponent:()=>lt,CLASS_VUE_GROUP:()=>no,CLASS_VUE_NODE:()=>ro,CLASS_VUE_OVERLAY:()=>io,COMPONENT_AREA_CHART:()=>Ue,COMPONENT_BACKGROUND:()=>Te,COMPONENT_BAR_CHART:()=>Ve,COMPONENT_BUBBLE_CHART:()=>je,COMPONENT_COLUMN_CHART:()=>be,COMPONENT_CONTROLS:()=>De,COMPONENT_DIAGRAM:()=>Me,COMPONENT_DIAGRAM_PALETTE:()=>we,COMPONENT_DIAGRAM_PROVIDER:()=>lo,COMPONENT_EXPORT_CONTROLS:()=>Ie,COMPONENT_GAUGE_CHART:()=>Fe,COMPONENT_GRID_BACKGROUND:()=>ge,COMPONENT_IMAGE_BACKGROUND:()=>Se,COMPONENT_INSPECTOR:()=>$e,COMPONENT_LINE_CHART:()=>Le,COMPONENT_MINIVIEW:()=>Re,COMPONENT_PALETTE:()=>xe,COMPONENT_PAPER:()=>Ae,COMPONENT_PAPER_PROVIDER:()=>ao,COMPONENT_PIE_CHART:()=>Ge,COMPONENT_SANKEY_CHART:()=>He,COMPONENT_SCATTER_CHART:()=>ke,COMPONENT_SURFACE:()=>Ne,COMPONENT_SURFACE_POPUP:()=>po,COMPONENT_SURFACE_PROVIDER:()=>so,COMPONENT_TILED_IMAGE_BACKGROUND:()=>ve,COMPONENT_XY_CHART:()=>Be,ColorPickerComponent:()=>No,ColumnChartComponent:()=>tt,ControlsComponent:()=>To,DEFAULT_SHAPE_HEIGHT:()=>to,DEFAULT_SHAPE_WIDTH:()=>eo,DEFAULT_VUE_PAPER_ID:()=>Rt,DEFAULT_VUE_SURFACE_ID:()=>vt,DecoratorComponent:()=>Ct,DiagramComponent:()=>vo,DiagramPaletteComponent:()=>yt,DiagramProvider:()=>_t,EVENT_VERTEX_UPDATED:()=>Uo,EVENT_VERTICES_RENDERED:()=>Lo,EdgeTypePickerComponent:()=>Et,ExportControlsComponent:()=>go,GaugeChartComponent:()=>pt,GridBackgroundComponent:()=>xo,ImageBackgroundComponent:()=>Do,InspectorComponent:()=>Pt,InspectorGetterSymbol:()=>ae,InspectorSetterSymbol:()=>Jo,LineChartComponent:()=>it,MiniviewComponent:()=>So,PROP_ACTIVE_TRACKING:()=>Dt,PROP_ALLOW_CLICK_TO_ADD:()=>Zt,PROP_ALLOW_DROP_ON_CANVAS:()=>$t,PROP_ALLOW_DROP_ON_EDGE:()=>Ht,PROP_ALLOW_DROP_ON_GROUP:()=>Wt,PROP_ALLOW_DROP_ON_NODE:()=>zt,PROP_CANVAS_DROP_FILTER:()=>Qt,PROP_CLASS_NAME:()=>K,PROP_CLICK_TO_ADD_ONLY:()=>Xt,PROP_CLICK_TO_CENTER:()=>At,PROP_CSV_DATA:()=>Bt,PROP_DATA:()=>G,PROP_DATA_GENERATOR:()=>kt,PROP_DATA_SOURCE_FILTER:()=>Je,PROP_DATA_TYPE:()=>Ee,PROP_DRAG_SIZE:()=>qt,PROP_GROUP_IDENTIFIER:()=>Ft,PROP_ID:()=>hr,PROP_IGNORE_DROP_ON_NODE:()=>Kt,PROP_INTERACTIVE:()=>bt,PROP_JSON_DATA:()=>Lt,PROP_MODE:()=>wt,PROP_MODEL:()=>Pe,PROP_MODEL_OPTIONS:()=>J,PROP_ON_VERTEX_ADDED:()=>Jt,PROP_OPTIONS:()=>Q,PROP_PAPER_ID:()=>Mt,PROP_PIVOT:()=>Vt,PROP_RENDER_OPTIONS:()=>fe,PROP_SELECTOR:()=>Gt,PROP_SELECT_AFTER_ADD:()=>Yt,PROP_SHOW_LASSO:()=>xt,PROP_SURFACE_ID:()=>U,PROP_TRACK_SELECTION:()=>It,PROP_TYPE_FUNCTION:()=>Nt,PROP_TYPE_GENERATOR:()=>jt,PROP_URL:()=>k,PROP_USE_MODEL:()=>Ut,PROP_VIEW_OPTIONS:()=>Oe,PaletteComponent:()=>Ro,PaperComponent:()=>_o,PaperProvider:()=>dt,PieChartComponent:()=>nt,SankeyChartComponent:()=>ct,ScatterChartComponent:()=>at,ShapeComponent:()=>mt,ShapePaletteComponent:()=>ft,SurfaceComponent:()=>Co,SurfacePopup:()=>Tt,SurfaceProvider:()=>ut,TAG_COLOR_PICKER:()=>oo,TAG_DECORATOR:()=>co,TAG_EDGE_TYPE_PICKER:()=>ye,TAG_SHAPE:()=>Ce,TAG_SHAPE_PALETTE:()=>_e,TiledImageBackgroundComponent:()=>Io,VisuallyJsPlugin:()=>gr,VisuallyJsService:()=>D,VisuallyJsServiceKey:()=>a,XYChartComponent:()=>rt,addPaper:()=>Eo,addSurface:()=>Oo,bindToDevLifecycle:()=>fr,doProvideInspector:()=>Yo,newInstance:()=>mr,useDiagram:()=>Nr,usePaper:()=>Ar,useSurface:()=>Rr,useVisuallyJsUpdate:()=>vr,useZoom:()=>Sr,vertexHasRendered:()=>uo,vertexHasUpdated:()=>mo,vertexWillRender:()=>Go});module.exports=dr(xr);var Ke=require("@visuallyjs/browser-ui"),N=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 mr(e){return e=e||{},new N(e)}var vt="surfaceId",Rt="paperId",Nt="typeFunction",At="clickToCenter",xt="showLasso",Dt="activeTracking",It="trackSelection",U="surfaceId",Mt="paperId",K="className",G="data",wt="mode",Q="options",fe="renderOptions",J="modelOptions",Pe="model",Oe="viewOptions",k="url",Ee="dataType",bt="interactive",Vt="pivot",Je="dataSourceFilter",Bt="csvData",Lt="jsonData",Ut="useModel",hr="id",Gt="selector",kt="dataGenerator",jt="typeGenerator",Ft="groupIdentifier",Ht="allowDropOnEdge",$t="allowDropOnCanvas",Wt="allowDropOnGroup",zt="allowDropOnNode",Kt="ignoreDropOnNode",Jt="onVertexAdded",Yt="selectAfterAdd",Xt="clickToAddOnly",Zt="allowClickToAdd",qt="dragSize",Qt="canvasDropFilter",Ce="Shape",_e="ShapePalette",eo=120,to=90,ye="EdgeTypePickerComponent",oo="ColorPickerComponent",ro="vjs-vue-node",no="vjs-vue-group",io="vjs-vue-overlay",Te="BackgroundComponent",ge="GridBackgroundComponent",Se="ImageBackgroundComponent",ve="TiledImageBackgroundComponent",Re="MiniviewComponent",Ne="SurfaceComponent",so="SurfaceProvider",Ae="PaperComponent",ao="PaperProvider",lo="DiagramProvider",xe="PaletteComponent",De="ControlsComponent",Ie="ExportControlsComponent",Me="DiagramComponent",we="DiagramPaletteComponent",be="ColumnChartComponent",Ve="BarChartComponent",Be="XYChartComponent",Le="LineChartComponent",Ue="AreaChartComponent",Ge="PieChartComponent",ke="ScatterChartComponent",je="BubbleChartComponent",Fe="GaugeChartComponent",He="SankeyChartComponent",$e="InspectorComponent",po="SurfacePopup",co="Decorator";var j=require("@visuallyjs/browser-ui"),Ye={props:{data:Object,model:N,obj:j.Vertex,vertex:j.Vertex,ui:j.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=(0,j.isGroup)(e.vertex)?no:ro;e.el.firstElementChild&&(0,j.addClass)(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),uo(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),mo(this.ui.id,this.vertex)}};var Vo={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 Bo={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 A=require("vue"),u=require("@visuallyjs/browser-ui"),ho=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new u.OptimisticEventGenerator}vertexWillRender(t){this.unrenderedVertices.set(t.id,t)}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&this.eventManager.fire(Lo)}vertexHasUpdated(t){this.eventManager.fire(Uo,t)}},Lo="vertices:rendered",Uo="vertex:updated",fo=new Map;function Xe(e){return fo.has(e)||fo.set(e,new ho),fo.get(e)}function uo(e,t){Xe(e).vertexHasRendered(t)}function mo(e,t){Xe(e).vertexHasUpdated(t)}function Go(e,t){Xe(e).vertexWillRender(t)}function fr(e,t,o){Xe(e).eventManager.bind(t,o)}var Ze=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},Po={props:{data:Object,model:N,obj:u.Edge,edge:u.Edge,overlay:u.Overlay,ui:u.BrowserUI,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&(0,u.addClass)(e.el.firstElementChild,io)},updated(){this.ui.$revalidateElement(this.el)}},qe=(e,t,o,n,s,c,r,l,p)=>{let f=r.component!=null,m=(0,u.isGroup)(l),y=[];f||y.push(m?u.CLASS_DEFAULT_GROUP:u.CLASS_DEFAULT_NODE);let C=f?r.component:{render(g){return g.data.label||""}};if(C){let g=document.createElement(u.ELEMENT_DIV);(0,u.updateClasses)(g,y),C.mixins==null&&(C.mixins=[]);let R=m?Bo:Vo;C.mixins.find(L=>L===R)||C.mixins.push(R),Go(c.id,l);let q={data:o,model:(0,A.markRaw)(n),ui:(0,A.markRaw)(c),obj:(0,A.markRaw)(l),vertex:(0,A.markRaw)(l),el:g,def:(0,A.markRaw)(r),eventInfo:p==null?null:(0,A.markRaw)(p)};if(r.inject)for(let L in r.inject){let W=r.inject[L],nr=typeof W=="function"?W(l,n):W;q[L]=nr}e.push({component:(0,A.markRaw)(C),el:g,e:l.getFullId(),props:q,vertex:l})}};function Oo(e,t,o,n,s,c){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(p,f,m,y)=>{},render:(p,f,m,y,C,g,R,H)=>qe(n,p,f,m,y,C,g,R,H),cleanupVertex:Ze,cleanupPort:Ze,rerender:(p,f,m,y,C,g,R,H,q)=>{let L=n.findIndex(W=>W.vertex===R);L!=null&&n.splice(L,1)[0].el,C.$__unmanage(q,!0,!0),requestAnimationFrame(()=>{qe(n,p,f,m,y,C,g,R,H)})}},l=(0,u.extend)(s||{},{view:c||{},id:t});return(0,u.renderSurface)(e,o,r,l)}function Eo(e,t,o,n,s,c){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(p,f,m,y)=>{},render:(p,f,m,y,C,g,R,H)=>qe(n,p,f,m,y,C,g,R,H),cleanupVertex:Ze,cleanupPort:Ze,rerender:(p,f,m,y,C,g,R,H,q)=>{let L=n.findIndex(W=>W.vertex===R);L!=null&&n.splice(L,1)[0].el,C.$__unmanage(q,!0,!0),requestAnimationFrame(()=>{qe(n,p,f,m,y,C,g,R,H)})}},l=(0,u.extend)(s||{},{view:c||{},id:t});return(0,u.renderPaper)(e,o,r,l)}function We(e,t,o,n){if(e.edges)for(let s in e.edges){let c=e.edges[s];c.overlays&&(c.overlays=c.overlays.map(r=>{let l={};return r.component!=null?{type:u.OVERLAY_TYPE_CUSTOM,options:{create:f=>{let m=document.createElement(u.ELEMENT_DIV),y=(0,u.uuid)();r.component.mixins==null&&(r.component.mixins=[]),r.component.mixins.indexOf(Po)===-1&&r.component.mixins.push(Po);let C=z({data:f.edge.data,model:(0,A.markRaw)(o()),ui:(0,A.markRaw)(t()),obj:f.edge,edge:f.edge,el:m,def:(0,A.markRaw)(r),eventInfo:null,overlay:r},l);return n.push({component:(0,A.markRaw)(r.component),el:m,e:y,props:C}),m}}}:r}))}}var Y=require("@visuallyjs/browser-ui"),ee=require("vue"),a=Symbol.for("visuallyjs-service"),D=class{constructor(t){this.context=t;this.i=[];this.s=[];this.a=[];this.l=[];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.t(this.s,t,this.p)}getDiagram(t){this.t(this.a,t,this.c)}getPaper(t){this.t(this.l,t,this.u)}getModel(t){this.t(this.i,t,this.r)}getModelDirect(){return this.r}t(t,o,n){if(n!=null)try{o(n)}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.p=t,this.n(t.model),this.o(this.s,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.c=t,this.n(t.model),t.$ui instanceof Y.Surface?this.setSurface(t.$ui):t.$ui instanceof Y.Paper&&this.setPaper(t.$ui),this.o(this.a,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.u=t,this.n(t.model),this.o(this.l,t)}n(t){this.r=t,this.o(this.i,t)}o(t,o){t.forEach(n=>{try{n(o)}catch(s){(0,Y.log)(`WARN: could not flush all queue entries ${s}`)}})}};var I=require("vue"),P=require("@visuallyjs/browser-ui"),Co={setup(e){return{service:(0,I.inject)(a),surfaceId:e.surfaceId||vt}},name:Ne,props:{[G]:{type:Object},[fe]:{type:Object},[J]:{type:Object},[Oe]:{type:Object},[Pe]:{type:Object},[k]:{type:String},[Ee]:{type:String},[U]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new N(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url,dataType:e.dataType}):e.data&&t.load({data:e.data,dataType:e.dataType});let n=(0,P.clone)(this.viewOptions||{});We(n,()=>this.surface,()=>t,this.overlays),this.surface=Oo(t,this.surfaceId,o,this.vertices,(0,P.clone)(this.renderOptions||{}),n),this.service.setSurface(this.surface);let s=(r,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.e===r);f!=null&&(f.props.data=p())},c=r=>{let l=this.vertices.findIndex(p=>p.e===r);l!==-1&&this.vertices.splice(l,1)};t.bind(P.EVENT_NODE_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(P.EVENT_GROUP_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(P.EVENT_NODE_REMOVED,r=>{c(r.node.id)}),t.bind(P.EVENT_GROUP_REMOVED,r=>{c(r.group.id)}),t.bind(P.EVENT_EDGE_UPDATED,r=>{let l=r.edge.id;this.overlays.forEach(p=>{p.props.edge&&p.props.edge.id===l&&(p.props.data=r.edge.data)})}),t.bind(P.EVENT_EDGE_REMOVED,r=>{let l=r.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.surface.bind(P.EVENT_RENDER_END,()=>setTimeout(()=>this.surface.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>(0,I.h)(I.Teleport,{to:t.el,key:t.e},[(0,I.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,I.h)(I.Teleport,{to:t.el,key:t.e},[(0,I.h)(t.component,t.props)]))}),(0,I.h)(P.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"),O=require("@visuallyjs/browser-ui"),_o={setup(e){return{service:(0,M.inject)(a),paperId:e.paperId||Rt}},name:Ae,props:{[G]:{type:Object},[fe]:{type:Object},[J]:{type:Object},[Oe]:{type:Object},[Pe]:{type:Object},[k]:{type:String},[Ee]:{type:String},[Mt]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new N(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url,dataType:e.dataType}):e.data&&t.load({data:e.data,dataType:e.dataType});let n=(0,O.clone)(this.viewOptions||{});We(n,()=>this.paper,()=>t,this.overlays),this.paper=Eo(t,this.paperId,o,this.vertices,(0,O.clone)(this.renderOptions||{}),n),this.service.setPaper(this.paper);let s=(r,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.e===r);f!=null&&(f.props.data=p())},c=r=>{let l=this.vertices.findIndex(p=>p.e===r);l!==-1&&this.vertices.splice(l,1)};t.bind(O.EVENT_NODE_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(O.EVENT_GROUP_UPDATED,r=>{s(r.vertex.getFullId(),r)}),t.bind(O.EVENT_NODE_REMOVED,r=>{c(r.node.id)}),t.bind(O.EVENT_GROUP_REMOVED,r=>{c(r.group.id)}),t.bind(O.EVENT_EDGE_UPDATED,r=>{let l=r.edge.id;this.overlays.forEach(p=>{p.props.edge&&p.props.edge.id===l&&(p.props.data=r.edge.data)})}),t.bind(O.EVENT_EDGE_REMOVED,r=>{let l=r.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.paper.bind(O.EVENT_RENDER_END,()=>setTimeout(()=>this.paper.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>(0,M.h)(M.Teleport,{to:t.el,key:t.e},[(0,M.h)(t.component,t.props)]));return this.overlays.forEach(t=>{e.push((0,M.h)(M.Teleport,{to:t.el,key:t.e},[(0,M.h)(t.component,t.props)]))}),(0,M.h)(O.ELEMENT_DIV,{ref:"root",class:"vjs-vue-paper",style:{width:"100%",height:"100%"}},e.concat(this.$slots.hasOwnProperty("default")?this.$slots.default():[]))}};var d=require("vue"),i=require("@visuallyjs/browser-ui"),Pr="Clear dataset?",yo="vjs-selected-mode",ko="can-undo",jo="can-redo",Or="data-undo",Er="data-redo",Fo="data-mode",Cr="data-reset",_r="data-clear",yr="data-zoom-in",Tr="data-zoom-out",Ho="vjs-controls-has-selection",To={setup(e){return{service:(0,d.inject)(a)}},name:De,props:{clear:{type:Boolean,default:!0},[U]:{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:Pr},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(Ho):this.$refs.root.setAttribute(Ho,"true"))}},data:function(){return{ready:!1,hasLasso:!1}},render(){if(this.ready){let e=[];return this.showPan&&(e.push((0,d.h)("i",{class:`vjs-pan-mode ${yo}`,[Fo]:i.SURFACE_MODE_PAN,onClick:()=>this.panMode(),title:"Pan mode"},[(0,d.h)("svg",{viewBox:i.PAN_VIEW_BOX,stroke:"currentColor",fill:"none"},[(0,d.h)("path",{d:i.PAN_PATH})])])),e.push((0,d.h)("i",{class:"vjs-select-mode",[Fo]:i.SURFACE_MODE_SELECT,onClick:()=>this.selectMode(),title:"Select mode"},[(0,d.h)("svg",{viewBox:i.LASSO_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.LASSO_PATH})])]))),this.undoRedo&&(e.push((0,d.h)("i",{class:"vjs-undo",[Or]:!0,title:"Undo last action",onClick:()=>this.undo()})),e.push((0,d.h)("i",{class:"vjs-redo",[Er]:!0,title:"Redo last action",onClick:()=>this.redo()}))),this.zoomToExtents&&e.push((0,d.h)("i",{class:"vjs-zoom-to-fit",[Cr]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[(0,d.h)("svg",{viewBox:i.ZOOM_TO_FIT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.ZOOM_TO_FIT_PATH})])])),this.zoomButtons&&(e.push((0,d.h)("i",{class:"vjs-zoom-in",[yr]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[(0,d.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.ZOOM_IN_PATH})])])),e.push((0,d.h)("i",{class:"vjs-zoom-out",[Tr]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[(0,d.h)("svg",{viewBox:i.ZOOM_IN_OUT_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.ZOOM_OUT_PATH})])]))),e.push((0,d.h)("i",{class:i.CLASS_CONTROLS_RESET_SELECTION,[i.ATTRIBUTE_RESET_SELECTION]:"true",onClick:()=>{this.resetSelection()}},[(0,d.h)("svg",{viewBox:i.RESET_SELECTION_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.RESET_SELECTION_PATH})])])),this.clear&&e.push((0,d.h)("i",{class:"vjs-clear-dataset",[_r]:"true",onClick:()=>{this.doClear()}},[(0,d.h)("svg",{viewBox:i.CLEAR_VIEW_BOX,stroke:"currentColor",fill:"currentColor"},[(0,d.h)("path",{d:i.CLEAR_PATH})])])),(0,d.h)(i.ELEMENT_DIV,{class:`vjs-controls ${this.className}`,ref:"root",[ko]:!1,[jo]:!1,[i.ATTRIBUTE_CONTROLS_ORIENTATION]:this.orientation},e)}else return(0,d.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,n=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),yo),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+n+"']"),yo)}),t.model.bind(i.EVENT_UNDOREDO_UPDATE,n=>{this.$refs.root.setAttribute(ko,n.undoCount>0?i.TRUE:i.FALSE),this.$refs.root.setAttribute(jo,n.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,d.watch)(this.service.surface,e):e(this.service.surface.value)}};var w=require("vue"),_=require("@visuallyjs/browser-ui"),go={name:Ie,setup(e){return{service:(0,w.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 _.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 _.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 _.ImageExportUI(e).export(t)})}},render(){let e=this.showLabel!==!1,t=this.allowSvgExport!==!1,o=this.allowPngExport!==!1,n=this.allowJpgExport!==!1,s=[];return t&&s.push((0,w.h)("i",{},[(0,w.h)("a",{href:"#","data-type":_.TYPE_SVG,onClick:()=>this.exportSVG()},"SVG")])),o&&s.push((0,w.h)("i",{},[(0,w.h)("a",{href:"#","data-type":_.TYPE_PNG,onClick:()=>this.exportPNG()},"PNG")])),n&&s.push((0,w.h)("i",{},[(0,w.h)("a",{href:"#","data-type":_.TYPE_JPG,onClick:()=>this.exportJPG()},"JPG")])),e&&s.unshift((0,w.h)("span",{},[this.label])),(0,w.h)(_.ELEMENT_DIV,{class:`${_.CLASS_CONTROLS} ${_.CLASS_EXPORT_CONTROLS}`},s)}};var X=require("vue"),Qe=require("@visuallyjs/browser-ui"),So={setup(e){return{service:(0,X.inject)(a)}},name:Re,props:{[U]:{type:String},[K]:{type:String,default:""},[Dt]:{type:Boolean,default:!0},[At]:{type:Boolean,default:!0},[xt]:{type:Boolean,default:!0},[It]:{type:Boolean,default:!0},[Nt]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:Qe.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)(Qe.ELEMENT_DIV,{ref:"root",class:e.className})}};var te=require("vue"),et=require("@visuallyjs/browser-ui"),vo={setup(e){return{service:(0,te.inject)(a)}},name:Me,props:{[G]:{type:Object},[k]:{type:String},[J]:{type:Object},[Q]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=(0,te.markRaw)((0,et.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)(et.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"),$o={[K]:{type:String},[G]:{type:Object},[k]:{type:String},[Ut]:{type:Boolean,default:!1}},Wo={setup(){return{service:(0,$.inject)(a)}},render:function(){return(0,$.h)(h.ELEMENT_DIV,{class:`${this.className}`,ref:"root"})}};function F(e,t,o=!0){let n=he(z({},$o),{[Q]:{type:Object}}),s={};return o&&(n[Je]={type:Function},s[Je]=function(c){this.chart.setDataSourceFilter(c)}),he(z({},Wo),{name:e,props:n,watch:s,data:()=>({hasMounted:!1}),mounted(){let c=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 l=()=>{this.hasMounted=!0,this.chart=new t(c,r)};this.useModel?this.service.model.value!=null?(r.dataSource=this.service.model.value,l()):(0,$.watch)(this.service.model,p=>{this.hasMounted||(r.dataSource=p,l())}):l()}})}var tt=F(be,h.ColumnChart),ot=F(Ve,h.BarChart),rt=F(Be,h.CategoryValueChart,!1),nt=F(Ge,h.PieChart),it=F(Le,h.LineChart),st=F(Ue,h.AreaChart),at=F(ke,h.ScatterChart),lt=F(je,h.BubbleChart),pt=F(Fe,h.GaugeChart,!1),ct=he(z({},Wo),{name:He,props:he(z({},$o),{[Bt]:{type:String},[Lt]:{type:Object},[bt]:{type:Boolean},[Vt]:{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 n=s=>{this.hasMounted||(t.dataSource=s,o())};this.service.model.value==null?(0,$.watch)(this.service.model,n):n(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"),Ro={setup(e){return{service:(0,oe.inject)(a)}},name:xe,props:{[U]:{type:String},[Gt]:{type:String},[kt]:{type:Function},[jt]:{type:Function},[Ft]:{type:Function},[Ht]:{type:Boolean,default:!1},[$t]:{type:Boolean,default:!0},[Wt]:{type:Boolean,default:!0},[zt]:{type:Boolean,default:!1},[Kt]:{type:Boolean,default:!1},[qt]:Object,[Jt]:Function,[Qt]:Function,[K]:String,[wt]:String,[Yt]:{type:Boolean,default:!1},[Zt]:{type:Boolean,default:!1},[Xt]:{type:Boolean,default:!1}},mounted:function(){let e=t=>{let o={source:this.$refs.root,selector:this.selector,dataGenerator:n=>this.dataGenerator?this.dataGenerator(n):(0,re.defaultDataGenerator)(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};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 zo=require("vue"),ut={setup(){(0,zo.provide)(a,new D("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var Ko=require("vue"),dt={setup(){(0,Ko.provide)(a,new D("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ne=require("vue"),b=require("@visuallyjs/browser-ui"),mt={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(),n=o.renderCompiledShape(Object.assign({sw:this.getOutlineWidth()},this.data));if(this.$refs.container.appendChild(n),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 n=t.renderShapeLabel(this.data,this.labelProperty,this.labelStrokeWidth,null,this.labelColor,this.labelColor,this.font);this.$refs.container.appendChild(n),this.multilineLabels!=!1&&(0,b.convertToMultilineText)(n,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||eo},getHeight:function(){return this.data.height||to},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};var ie=require("vue"),ht=require("@visuallyjs/browser-ui"),ft={name:_e,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},preparedShapes:Array},setup(e){return{service:(0,ie.inject)(a)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new ht.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,preparedShapes:this.preparedShapes}))};this.service.surface.value==null?(0,ie.watch)(this.service.surface,e):e(this.service.surface.value)},render:function(){return(0,ie.h)(ht.ELEMENT_DIV,{ref:"container"})}};var V=require("vue"),se=require("@visuallyjs/browser-ui"),ae=Symbol.for("VueInspectorGetter"),Jo=Symbol.for("VueInspectorSetter");function Yo(){let e=[],t=null;function o(c){try{c(t)}catch(r){(0,se.log)("WARN: inspector listener threw an exception",r)}}let n={listen:c=>{t!=null?o(c):e.push(c)}},s={inspector:c=>{t=c,e.forEach(o)}};return(0,V.provide)(Jo,s),(0,V.provide)(ae,(0,V.readonly)(n)),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=Yo();return{service:(0,V.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:(n,s)=>{this.emit("update:modelValue",n),this.refresh&&this.refresh(n),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,V.watch)(this.service.surface,e):e(this.service.surface.value)},render(){return(0,V.h)(se.ELEMENT_DIV,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};var Ot=require("vue"),le=require("@visuallyjs/browser-ui"),Et={name:ye,props:{propertyName:String},setup(){return{inspectorProvider:(0,Ot.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,n)=>{e.setValue(this.propertyName,n,null)});t.render(this.propertyName,e.m),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,Ot.h)(le.ELEMENT_DIV,{ref:"container"})}};var Z=require("vue"),E=require("@visuallyjs/browser-ui"),No={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(n=>n.toUpperCase()===e)!=null)){let n=this.maxColors||10,s=t.slice();s.unshift(e),s.length>n&&(s.length=n),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"),Ct={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 Xo=require("vue"),_t={setup(){(0,Xo.provide)(a,new D("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};var ce=require("vue"),ue=require("@visuallyjs/browser-ui"),yt={name:we,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},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},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,preparedShapes:this.preparedShapes}))};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"),Tt={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=(0,v.inject)(a),o=(0,v.ref)(null),n=(0,v.ref)("block"),s=(0,v.ref)(null),c=(0,v.ref)(null),r=l=>{c.value=new x.PopupHandler(e.selector,s.value,l,p=>{o.value=p,p==null?n.value=x.NONE:(n.value=x.BLOCK,requestAnimationFrame(()=>c.value.$positionPopup()))},e.anchor)};return(0,v.onMounted)(()=>{t.surface.value==null?(0,v.watch)(t.surface,r):r(t.surface.value)}),{service:t,current:o,display:n,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 T=require("vue"),B=require("@visuallyjs/browser-ui"),Ao={setup(){return{service:(0,T.inject)(a)}},name:Te,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:B.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,T.watch)(this.service.surface,e),(0,T.watch)(this.service.paper,e))},render:function(e){return[]}},xo={setup(){return{service:(0,T.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:B.BackgroundPlugin.type,options:{type:B.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,T.watch)(this.service.surface,e),(0,T.watch)(this.service.paper,e))},render:function(e){return[]}},Do={setup(){return{service:(0,T.inject)(a)}},name:Se,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:B.BackgroundPlugin.type,options:{type:B.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,T.watch)(this.service.surface,e),(0,T.watch)(this.service.paper,e))},render:function(e){return[]}},Io={setup(){return{service:(0,T.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:B.BackgroundPlugin.type,options:{type:B.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,T.watch)(this.service.surface,e),(0,T.watch)(this.service.paper,e))},render:function(e){return[]}};var gr={install:function(e,t){e.component(so,ut),e.component(ao,dt),e.component(lo,_t),e.component(Ne,Co),e.component(Ae,_o),e.component(Me,vo),e.component(Re,So),e.component(De,To),e.component(Ie,go),e.component(Te,Ao),e.component(ge,xo),e.component(Se,Do),e.component(ve,Io),e.component(xe,Ro),e.component(we,yt),e.component(Ve,ot),e.component(be,tt),e.component(Be,rt),e.component(Le,it),e.component(Ue,st),e.component(Ge,nt),e.component(He,ct),e.component(Fe,pt),e.component(je,lt),e.component(ke,at),e.component(Ce,mt),e.component(_e,ft),e.component(ye,Et),e.component(oo,No),e.component($e,Pt),e.component(co,Ct),e.component(po,Tt),e.provide(a,new D("root"))}};var de=require("vue"),gt=require("@visuallyjs/browser-ui"),Zo=require("vue");function Sr(){let e=(0,Zo.inject)(a),t=(0,de.shallowRef)(null),o=(0,de.shallowRef)(null),n=(0,de.shallowRef)(null),s=(0,de.ref)(1);return e==null||e.getSurface(c=>{o.value=c,o.value.bind(gt.EVENT_ZOOM,r=>{s.value=r.zoom})}),e==null||e.getDiagram(c=>{t.value=c,t.value.$ui.bind(gt.EVENT_ZOOM,r=>{s.value=r.zoom})}),e==null||e.getPaper(c=>{n.value=c,n.value.bind(gt.EVENT_ZOOM,r=>{s.value=r.zoom})}),s}var St=require("vue"),me=require("@visuallyjs/browser-ui");function vr(e){let t=(0,St.inject)(a);if(t){let o=null,n=()=>{o&&e(o)},s=()=>{o&&(o.unbind(me.EVENT_DATA_UPDATED,n),o.unbind(me.EVENT_GRAPH_CLEARED,n))},c=r=>{s(),o=r,o&&(o.bind(me.EVENT_DATA_UPDATED,n),o.bind(me.EVENT_GRAPH_CLEARED,n),n())};t.getModel(r=>{c(r)}),(0,St.onUnmounted)(()=>{s()})}}var qo=require("vue"),Qo=require("vue");function Rr(){let e=(0,Qo.inject)(a),t=(0,qo.shallowRef)(null);return e==null||e.getSurface(o=>{t.value=o}),t}var er=require("vue"),tr=require("vue");function Nr(){let e=(0,tr.inject)(a),t=(0,er.shallowRef)(null);return e==null||e.getDiagram(o=>{t.value=o}),t}var or=require("vue"),rr=require("vue");function Ar(){let e=(0,rr.inject)(a),t=(0,or.shallowRef)(null);return e==null||e.getPaper(o=>{t.value=o}),t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Fo=Object.defineProperty,Ho=Object.defineProperties;var $o=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var Wo=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable;var tt=(e,t,o)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,x=(e,t)=>{for(var o in t||(t={}))Wo.call(t,o)&&tt(e,o,t[o]);if(et)for(var o of et(t))zo.call(t,o)&&tt(e,o,t[o]);return e},w=(e,t)=>Ho(e,$o(t));import{log as Ko,BrowserUIModel as Jo}from"@visuallyjs/browser-ui";var O=class extends Jo{render(t,o){return Ko("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function as(e){return e=e||{},new O(e)}var ot="surfaceId",rt="paperId",nt="typeFunction",it="clickToCenter",st="showLasso",at="activeTracking",lt="trackSelection",T="surfaceId",pt="paperId",I="className",S="data",ct="mode",b="options",G="renderOptions",M="modelOptions",k="model",j="viewOptions",v="url",ut="interactive",dt="pivot",ve="dataSourceFilter",mt="csvData",ht="jsonData",ft="useModel",bs="id",Pt="selector",Ot="dataGenerator",Et="typeGenerator",Ct="groupIdentifier",_t="allowDropOnEdge",yt="allowDropOnCanvas",gt="allowDropOnGroup",Tt="allowDropOnNode",St="ignoreDropOnNode",vt="onVertexAdded",Rt="selectAfterAdd",Nt="clickToAddOnly",At="allowClickToAdd",xt="dragSize",Dt="canvasDropFilter",F="Shape",H="ShapePalette",It=120,Mt=90,$="EdgeTypePickerComponent",wt="ColorPickerComponent",bt="vjs-vue-node",Vt="vjs-vue-group",Bt="vjs-vue-overlay",W="BackgroundComponent",z="GridBackgroundComponent",K="ImageBackgroundComponent",J="TiledImageBackgroundComponent",Y="MiniviewComponent",X="SurfaceComponent",Lt="SurfaceProvider",Z="PaperComponent",Ut="PaperProvider",Gt="DiagramProvider",q="PaletteComponent",Q="ControlsComponent",ee="ExportControlsComponent",te="DiagramComponent",oe="DiagramPaletteComponent",re="ColumnChartComponent",ne="BarChartComponent",ie="XYChartComponent",se="LineChartComponent",ae="AreaChartComponent",le="PieChartComponent",pe="ScatterChartComponent",ce="BubbleChartComponent",ue="GaugeChartComponent",de="SankeyChartComponent",me="InspectorComponent",kt="SurfacePopup",jt="Decorator";import{addClass as Yo,BrowserUI as Xo,isGroup as Zo,Vertex as Ft}from"@visuallyjs/browser-ui";var he={props:{data:Object,model:O,obj:Ft,vertex:Ft,ui:Xo,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=Zo(e.vertex)?Vt:bt;e.el.firstElementChild&&Yo(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),Ht(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),$t(this.ui.id,this.vertex)}};var Wt={mixins:[he],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:[he]};import{markRaw as _}from"vue";import{addClass as qo,BrowserUI as Qo,CLASS_DEFAULT_GROUP as er,CLASS_DEFAULT_NODE as tr,ELEMENT_DIV as Kt,extend as Jt,isGroup as or,OptimisticEventGenerator as rr,renderSurface as nr,updateClasses as ir,Overlay as sr,Edge as Yt,OVERLAY_TYPE_CUSTOM as ar,uuid as lr,renderPaper as pr}from"@visuallyjs/browser-ui";var Re=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new rr}vertexWillRender(t){this.unrenderedVertices.set(t.id,t)}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&this.eventManager.fire(cr)}vertexHasUpdated(t){this.eventManager.fire(ur,t)}},cr="vertices:rendered",ur="vertex:updated",Ne=new Map;function fe(e){return Ne.has(e)||Ne.set(e,new Re),Ne.get(e)}function Ht(e,t){fe(e).vertexHasRendered(t)}function $t(e,t){fe(e).vertexHasUpdated(t)}function dr(e,t){fe(e).vertexWillRender(t)}function Oa(e,t,o){fe(e).eventManager.bind(t,o)}var Pe=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},Xt={props:{data:Object,model:O,obj:Yt,edge:Yt,overlay:sr,ui:Qo,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&qo(e.el.firstElementChild,Bt)},updated(){this.ui.$revalidateElement(this.el)}},Oe=(e,t,o,n,i,p,r,a,l)=>{let d=r.component!=null,c=or(a),h=[];d||h.push(c?er:tr);let m=d?r.component:{render(f){return f.data.label||""}};if(m){let f=document.createElement(Kt);ir(f,h),m.mixins==null&&(m.mixins=[]);let P=c?zt:Wt;m.mixins.find(E=>E===P)||m.mixins.push(P),dr(p.id,a);let D={data:o,model:_(n),ui:_(p),obj:a,vertex:a,el:f,def:_(r),eventInfo:l==null?null:_(l)};if(r.inject)for(let E in r.inject){let A=r.inject[E],jo=typeof A=="function"?A(a,n):A;D[E]=jo}e.push({component:_(m),el:f,e:a.getFullId(),props:D,vertex:a})}};function Zt(e,t,o,n,i,p){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(l,d,c,h)=>{},render:(l,d,c,h,m,f,P,g)=>Oe(n,l,d,c,h,m,f,P,g),cleanupVertex:Pe,cleanupPort:Pe,rerender:(l,d,c,h,m,f,P,g,D)=>{let E=n.findIndex(A=>A.vertex===P);E!=null&&n.splice(E,1)[0].el,m.$__unmanage(D,!0,!0),requestAnimationFrame(()=>{Oe(n,l,d,c,h,m,f,P,g)})}},a=Jt(i||{},{view:p||{},id:t});return nr(e,o,r,a)}function qt(e,t,o,n,i,p){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(l,d,c,h)=>{},render:(l,d,c,h,m,f,P,g)=>Oe(n,l,d,c,h,m,f,P,g),cleanupVertex:Pe,cleanupPort:Pe,rerender:(l,d,c,h,m,f,P,g,D)=>{let E=n.findIndex(A=>A.vertex===P);E!=null&&n.splice(E,1)[0].el,m.$__unmanage(D,!0,!0),requestAnimationFrame(()=>{Oe(n,l,d,c,h,m,f,P,g)})}},a=Jt(i||{},{view:p||{},id:t});return pr(e,o,r,a)}function Ee(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:ar,options:{create:d=>{let c=document.createElement(Kt),h=lr();r.component.mixins==null&&(r.component.mixins=[]),r.component.mixins.indexOf(Xt)===-1&&r.component.mixins.push(Xt);let m=x({data:d.edge.data,model:_(o()),ui:_(t()),obj:d.edge,edge:d.edge,el:c,def:_(r),eventInfo:null,overlay:r},a);return n.push({component:_(r.component),el:c,e:h,props:m}),c}}}:r}))}}import{log as Qt,Paper as mr,Surface as hr}from"@visuallyjs/browser-ui";import{shallowRef as V}from"vue";var s=Symbol.for("visuallyjs-service"),C=class{constructor(t){this.context=t;this.i=[];this.s=[];this.a=[];this.l=[];this.surface=V(null);this.model=V(null);this.paper=V(null);this.diagram=V(null);this.ui=V(null)}getSurface(t){this.t(this.s,t,this.p)}getDiagram(t){this.t(this.a,t,this.c)}getPaper(t){this.t(this.l,t,this.u)}getModel(t){this.t(this.i,t,this.r)}getModelDirect(){return this.r}t(t,o,n){if(n!=null)try{o(n)}catch(i){Qt(`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.p=t,this.n(t.model),this.o(this.s,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.c=t,this.n(t.model),t.$ui instanceof hr?this.setSurface(t.$ui):t.$ui instanceof mr&&this.setPaper(t.$ui),this.o(this.a,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.u=t,this.n(t.model),this.o(this.l,t)}n(t){this.r=t,this.o(this.i,t)}o(t,o){t.forEach(n=>{try{n(o)}catch(i){Qt(`WARN: could not flush all queue entries ${i}`)}})}};import{h as B,inject as fr,Teleport as eo}from"vue";import{ELEMENT_DIV as Pr,EVENT_GROUP_REMOVED as Or,EVENT_GROUP_UPDATED as Er,EVENT_NODE_REMOVED as Cr,EVENT_NODE_UPDATED as _r,EVENT_RENDER_END as yr,clone as to,EVENT_EDGE_UPDATED as gr,EVENT_EDGE_REMOVED as Tr,EVENT_GRAPH_CLEARED as Sr}from"@visuallyjs/browser-ui";var oo={setup(e){return{service:fr(s),surfaceId:e.surfaceId||ot}},name:X,props:{[S]:{type:Object},[G]:{type:Object},[M]:{type:Object},[j]:{type:Object},[k]:{type:Object},[v]:{type:String},[T]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new O(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url}):e.data&&t.load({data:e.data});let n=to(this.viewOptions||{});Ee(n,()=>this.surface,()=>t,this.overlays),this.surface=Zt(t,this.surfaceId,o,this.vertices,to(this.renderOptions||{}),n),this.service.setSurface(this.surface);let i=(r,a)=>{let l=()=>{let c={};return a.originalData||a.updates?c=Object.assign(a.originalData,a.updates):a.newData&&Object.assign(c,a.newData),c},d=this.vertices.find(c=>c.e===r);d!=null&&(d.props.data=l())},p=r=>{let a=this.vertices.findIndex(l=>l.e===r);a!==-1&&this.vertices.splice(a,1)};t.bind(_r,r=>{i(r.vertex.getFullId(),r)}),t.bind(Er,r=>{i(r.vertex.getFullId(),r)}),t.bind(Cr,r=>{p(r.node.id)}),t.bind(Or,r=>{p(r.group.id)}),t.bind(gr,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(Tr,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(Sr,()=>{this.vertices.length=0,this.overlays.length=0}),this.surface.bind(yr,()=>setTimeout(()=>this.surface.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>B(eo,{to:t.el,key:t.e},[B(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(B(eo,{to:t.el,key:t.e},[B(t.component,t.props)]))}),B(Pr,{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 vr,Teleport as ro}from"vue";import{ELEMENT_DIV as Rr,EVENT_GROUP_REMOVED as Nr,EVENT_GROUP_UPDATED as Ar,EVENT_NODE_REMOVED as xr,EVENT_NODE_UPDATED as Dr,EVENT_RENDER_END as Ir,clone as no,EVENT_EDGE_UPDATED as Mr,EVENT_EDGE_REMOVED as wr,EVENT_GRAPH_CLEARED as br}from"@visuallyjs/browser-ui";var io={setup(e){return{service:vr(s),paperId:e.paperId||rt}},name:Z,props:{[S]:{type:Object},[G]:{type:Object},[M]:{type:Object},[j]:{type:Object},[k]:{type:Object},[v]:{type:String},[pt]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new O(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url}):e.data&&t.load({data:e.data});let n=no(this.viewOptions||{});Ee(n,()=>this.paper,()=>t,this.overlays),this.paper=qt(t,this.paperId,o,this.vertices,no(this.renderOptions||{}),n),this.service.setPaper(this.paper);let i=(r,a)=>{let l=()=>{let c={};return a.originalData||a.updates?c=Object.assign(a.originalData,a.updates):a.newData&&Object.assign(c,a.newData),c},d=this.vertices.find(c=>c.e===r);d!=null&&(d.props.data=l())},p=r=>{let a=this.vertices.findIndex(l=>l.e===r);a!==-1&&this.vertices.splice(a,1)};t.bind(Dr,r=>{i(r.vertex.getFullId(),r)}),t.bind(Ar,r=>{i(r.vertex.getFullId(),r)}),t.bind(xr,r=>{p(r.node.id)}),t.bind(Nr,r=>{p(r.group.id)}),t.bind(Mr,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(wr,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(br,()=>{this.vertices.length=0,this.overlays.length=0}),this.paper.bind(Ir,()=>setTimeout(()=>this.paper.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>L(ro,{to:t.el,key:t.e},[L(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(L(ro,{to:t.el,key:t.e},[L(t.component,t.props)]))}),L(Rr,{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 Vr,watch as Br}from"vue";import{LassoPlugin as Lr,SURFACE_MODE_SELECT as so,SURFACE_MODE_PAN as ao,PAN_PATH as Ur,PAN_VIEW_BOX as Gr,LASSO_PATH as kr,LASSO_VIEW_BOX as jr,ZOOM_TO_FIT_PATH as Fr,ZOOM_TO_FIT_VIEW_BOX as Hr,EVENT_UNDOREDO_UPDATE as $r,TRUE as lo,FALSE as po,EVENT_SURFACE_MODE_CHANGED as Wr,ELEMENT_DIV as co,ATTRIBUTE_CONTROLS_ORIENTATION as zr,ZOOM_IN_OUT_VIEW_BOX as uo,ZOOM_IN_PATH as Kr,ZOOM_OUT_PATH as Jr,RESET_SELECTION_PATH as Yr,RESET_SELECTION_VIEW_BOX as Xr,CLEAR_PATH as Zr,CLEAR_VIEW_BOX as qr,ATTRIBUTE_RESET_SELECTION as Qr,CLASS_CONTROLS_RESET_SELECTION as en,EVENT_SELECT as tn,EVENT_DESELECT as on,EVENT_SELECTION_CLEARED as rn,supportsPathEditing as nn}from"@visuallyjs/browser-ui";var sn="Clear dataset?",Ae="vjs-selected-mode",mo="can-undo",ho="can-redo",an="data-undo",ln="data-redo",fo="data-mode",pn="data-reset",cn="data-clear",un="data-zoom-in",dn="data-zoom-out",Po="vjs-controls-has-selection",Oo={setup(e){return{service:Vr(s)}},name:Q,props:{clear:{type:Boolean,default:!0},[T]:{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:sn},onMaybeClear:{type:Function},className:{type:String,default:""}},methods:{panMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(ao)},selectMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(so)},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(),nn(e)&&e.stopEditingPath())},updateSelectionState:function(){let e=this.service.surface.value;e&&(e.model.getSelection().isEmpty()?this.$refs.root.removeAttribute(Po):this.$refs.root.setAttribute(Po,"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 ${Ae}`,[fo]:ao,onClick:()=>this.panMode(),title:"Pan mode"},[u("svg",{viewBox:Gr,stroke:"currentColor",fill:"none"},[u("path",{d:Ur})])])),e.push(u("i",{class:"vjs-select-mode",[fo]:so,onClick:()=>this.selectMode(),title:"Select mode"},[u("svg",{viewBox:jr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:kr})])]))),this.undoRedo&&(e.push(u("i",{class:"vjs-undo",[an]:!0,title:"Undo last action",onClick:()=>this.undo()})),e.push(u("i",{class:"vjs-redo",[ln]:!0,title:"Redo last action",onClick:()=>this.redo()}))),this.zoomToExtents&&e.push(u("i",{class:"vjs-zoom-to-fit",[pn]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[u("svg",{viewBox:Hr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Fr})])])),this.zoomButtons&&(e.push(u("i",{class:"vjs-zoom-in",[un]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[u("svg",{viewBox:uo,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Kr})])])),e.push(u("i",{class:"vjs-zoom-out",[dn]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[u("svg",{viewBox:uo,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Jr})])]))),e.push(u("i",{class:en,[Qr]:"true",onClick:()=>{this.resetSelection()}},[u("svg",{viewBox:Xr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Yr})])])),this.clear&&e.push(u("i",{class:"vjs-clear-dataset",[cn]:"true",onClick:()=>{this.doClear()}},[u("svg",{viewBox:qr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Zr})])])),u(co,{class:`vjs-controls ${this.className}`,ref:"root",[mo]:!1,[ho]:!1,[zr]:this.orientation},e)}else return u(co,{ref:"root"})},mounted(){let e=t=>{let o=t.getPlugin(Lr.type);this.showPan=o!=null,t.bind(Wr,n=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),Ae),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+n+"']"),Ae)}),t.model.bind($r,n=>{this.$refs.root.setAttribute(mo,n.undoCount>0?lo:po),this.$refs.root.setAttribute(ho,n.redoCount>0?lo:po)}),t.model.bind(tn,()=>this.updateSelectionState()),t.model.bind(on,()=>this.updateSelectionState()),t.model.bind(rn,()=>this.updateSelectionState()),this.ready=!0};this.service.surface.value==null?Br(this.service.surface,e):e(this.service.surface.value)}};import{h as R,inject as mn}from"vue";import{CLASS_CONTROLS as hn,CLASS_EXPORT_CONTROLS as fn,ELEMENT_DIV as Pn,ImageExportUI as Eo,SvgExportUI as On,TYPE_JPG as En,TYPE_PNG as Cn,TYPE_SVG as _n}from"@visuallyjs/browser-ui";var Co={name:ee,setup(e){return{service:mn(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 On(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 Eo(e).export(t)})},exportPNG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new Eo(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":_n,onClick:()=>this.exportSVG()},"SVG")])),o&&i.push(R("i",{},[R("a",{href:"#","data-type":Cn,onClick:()=>this.exportPNG()},"PNG")])),n&&i.push(R("i",{},[R("a",{href:"#","data-type":En,onClick:()=>this.exportJPG()},"JPG")])),e&&i.unshift(R("span",{},[this.label])),R(Pn,{class:`${hn} ${fn}`},i)}};import{h as yn,inject as gn,watch as _o}from"vue";import{ELEMENT_DIV as Tn,MiniviewPlugin as Sn}from"@visuallyjs/browser-ui";var yo={setup(e){return{service:gn(s)}},name:Y,props:{[T]:{type:String},[I]:{type:String,default:""},[at]:{type:Boolean,default:!0},[it]:{type:Boolean,default:!0},[st]:{type:Boolean,default:!0},[lt]:{type:Boolean,default:!0},[nt]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:Sn.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):(_o(this.service.surface,e),_o(this.service.paper,e))},render:function(e){return yn(Tn,{ref:"root",class:e.className})}};import{h as vn,inject as Rn,markRaw as Nn}from"vue";import{createDiagram as An,ELEMENT_DIV as xn}from"@visuallyjs/browser-ui";var go={setup(e){return{service:Rn(s)}},name:te,props:{[S]:{type:Object},[v]:{type:String},[M]:{type:Object},[b]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=Nn(An(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 vn(xn,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as To,inject as Dn,watch as So}from"vue";import{ColumnChart as In,BarChart as Mn,CategoryValueChart as wn,ELEMENT_DIV as vo,LineChart as bn,AreaChart as Vn,PieChart as Bn,ScatterChart as Ln,BubbleChart as Un,GaugeChart as Gn,SankeyChart as kn}from"@visuallyjs/browser-ui";var Ro={[I]:{type:String},[S]:{type:Object},[v]:{type:String},[ft]:{type:Boolean,default:!1}},No={setup(){return{service:Dn(s)}},render:function(){return To(vo,{class:`${this.className}`,ref:"root"})}};function y(e,t,o=!0){let n=w(x({},Ro),{[b]:{type:Object}}),i={};return o&&(n[ve]={type:Function},i[ve]=function(p){this.chart.setDataSourceFilter(p)}),w(x({},No),{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()):So(this.service.model,l=>{this.hasMounted||(r.dataSource=l,a())}):a()}})}var xe=y(re,In),De=y(ne,Mn),Ie=y(ie,wn,!1),Me=y(le,Bn),we=y(se,bn),be=y(ae,Vn),Ve=y(pe,Ln),Be=y(ce,Un),Le=y(ue,Gn,!1),Ue=w(x({},No),{name:de,props:w(x({},Ro),{[mt]:{type:String},[ht]:{type:Object},[ut]:{type:Boolean},[dt]:{type:String},[b]:{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 kn(e,t)};if(this.useModel){let n=i=>{this.hasMounted||(t.dataSource=i,o())};this.service.model.value==null?So(this.service.model,n):n(this.service.model.value)}else o()},watch:{pivot(e){this.chart&&this.chart.pivot(e)}},render:function(){return To(vo,{class:`${this.className}`,ref:"root"})}});import{h as jn,inject as Fn,watch as Hn}from"vue";import{defaultDataGenerator as $n,ELEMENT_DIV as Wn,Palette as zn}from"@visuallyjs/browser-ui";var Ao={setup(e){return{service:Fn(s)}},name:q,props:{[T]:{type:String},[Pt]:{type:String},[Ot]:{type:Function},[Et]:{type:Function},[Ct]:{type:Function},[_t]:{type:Boolean,default:!1},[yt]:{type:Boolean,default:!0},[gt]:{type:Boolean,default:!0},[Tt]:{type:Boolean,default:!1},[St]:{type:Boolean,default:!1},[xt]:Object,[vt]:Function,[Dt]:Function,[I]:String,[ct]:String,[Rt]:{type:Boolean,default:!1},[At]:{type:Boolean,default:!1},[Nt]:{type:Boolean,default:!1}},mounted:function(){let e=t=>{let o={source:this.$refs.root,selector:this.selector,dataGenerator:n=>this.dataGenerator?this.dataGenerator(n):$n(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};this.groupIdentifier!=null&&(o.groupIdentifier=this.groupIdentifier),this.typeGenerator!=null&&(o.typeGenerator=this.typeGenerator),this.palette=new zn(t,o)};this.service.surface.value==null?Hn(this.service.surface,e):e(this.service.surface.value)},render:function(){return jn(Wn,{ref:"root",class:this.className||""},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{provide as Kn}from"vue";var Ge={setup(){Kn(s,new C("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{provide as Jn}from"vue";var ke={setup(){Jn(s,new C("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Yn,inject as Xn,watch as Zn}from"vue";import{CLASS_SHAPE as qn,convertToMultilineText as xo,DEFAULT_LABEL_FILL_RATIO as je,ELEMENT_SVG as Qn}from"@visuallyjs/browser-ui";var Fe={name:F,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:je},labelColor:{type:String,default:"#000000"},font:{type:Object}},setup(){return{service:Xn(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&&xo(i,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||je))}};this.service.ui.value==null?Zn(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&&xo(n,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||je))}}},render:function(){return Yn(Qn,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:qn})},methods:{getWidth:function(){return this.data.width||It},getHeight:function(){return this.data.height||Mt},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};import{h as ei,inject as ti,watch as oi}from"vue";import{ELEMENT_DIV as ri,ShapePalette as ni}from"@visuallyjs/browser-ui";var He={name:H,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},preparedShapes:Array},setup(e){return{service:ti(s)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new ni(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,preparedShapes:this.preparedShapes}))};this.service.surface.value==null?oi(this.service.surface,e):e(this.service.surface.value)},render:function(){return ei(ri,{ref:"container"})}};import{provide as Do,readonly as ii,inject as si,h as ai,watch as li}from"vue";import{ELEMENT_DIV as pi,Inspector as ci,log as ui}from"@visuallyjs/browser-ui";var U=Symbol.for("VueInspectorGetter"),di=Symbol.for("VueInspectorSetter");function mi(){let e=[],t=null;function o(p){try{p(t)}catch(r){ui("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 Do(di,i),Do(U,ii(n)),i}var $e={name:me,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=mi();return{service:si(s),inspectorProvider:o,inspector:null,emit:t.emit}},mounted(){let e=t=>{if(this.inspector==null){let o=new ci({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?li(this.service.surface,e):e(this.service.surface.value)},render(){return ai(pi,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as hi,inject as fi}from"vue";import{EdgeTypePicker as Pi,ELEMENT_DIV as Oi,log as Ei}from"@visuallyjs/browser-ui";var We={name:$,props:{propertyName:String},setup(){return{inspectorProvider:fi(U)}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{let t=new Pi(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.m),e.onChange(()=>{t.select(this.propertyName,e.getValue(this.propertyName))})}):Ei("WARN: EdgeTypePicker not instantiated inside an InspectorComponent. Cannot mount.")},render:function(){return hi(Oi,{ref:"container"})}};import{h as Ce,inject as Ci}from"vue";import{CLASS_COLOR_PICKER as Io,CLASS_COLOR_PICKER_SWATCH as Mo,CLASS_COLOR_PICKER_SWATCHES as wo,EVENT_CONTEXT_UPDATE as _i,ELEMENT_DIV as ze,INSPECTOR_CONTEXT_RECENT_COLORS as _e}from"@visuallyjs/browser-ui";var bo={render(){let e=this.swatches.map(t=>Ce(ze,{title:t,class:Mo,style:`background-color:${t}`,"data-color":t,onClick:()=>this.selectSwatch(t)}));return Ce(ze,{class:`${Io}`},[Ce("input",{type:"color","vjs-att":this.propertyName,ref:"colorInput"}),Ce(ze,{class:wo},e)])},props:{propertyName:String,maxColors:{type:Number,default:10}},data:()=>({CLASS_COLOR_PICKER:Io,CLASS_COLOR_PICKER_SWATCHES:wo,CLASS_COLOR_PICKER_SWATCH:Mo,colorInput:null,swatches:[]}),mounted(){let e=Ci(U);e&&e.listen(t=>{this.inspector=t,this.swatches=t.ensureContext(_e,()=>[]),this.colorInput=this.$refs.colorInput,this.colorInput.addEventListener("change",this.colorPicked),t.bind(_i,o=>{o.key===_e&&(this.swatches=o.value.slice())}),t.bind("change",this.setCurrentColor),this.setCurrentColor()})},methods:{addColor:function(e){let t=this.inspector.ensureContext(_e,()=>[]);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(_e,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 ye,inject as yi,nextTick as gi,Teleport as Ti,watch as Si}from"vue";import{ELEMENT_DIV as Ke,uuid as vi}from"@visuallyjs/browser-ui";var Je={props:{placement:{type:String,default:"floating"},position:{type:Object},constraints:{type:Object}},data:()=>({hasMounted:!1,surface:null}),setup(e){return{service:yi(s)}},mounted(){let e=t=>{if(!this.hasMounted){this.surface=t,this.hasMounted=!0;let o=this.position||{x:0,y:0};gi().then(()=>{this.placement==="floating"?t.floatElement(this.$refs.root,o):t.fixElement(this.$refs.fixedEl,o,this.constraints)})}};this.service.surface.value==null?Si(this.service.surface,e):e(this.service.surface.value)},render(){return ye(Ke,{ref:"root"},this.hasMounted?this.placement==="floating"?ye(Ke,{},this.$slots.hasOwnProperty("default")?this.$slots.default():[]):ye(Ti,{to:this.surface.vertexLayer,key:vi()},ye(Ke,{ref:"fixedEl"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])):[])}};import{provide as Ri}from"vue";var Ye={setup(){Ri(s,new C("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Ni,inject as Ai,watch as xi}from"vue";import{DiagramPalette as Di,ELEMENT_DIV as Ii,log as Mi}from"@visuallyjs/browser-ui";var Xe={name:oe,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},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},setup(e){return{service:Ai(s)}},data:()=>({hasMounted:!1}),mounted(){if(this.service==null&&this.diagram==null)Mi("Cannot mount DiagramPalette - no service found and Diagram not passed in as a prop");else{let e=t=>{this.hasMounted||(this.hasMounted=!0,new Di(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,preparedShapes:this.preparedShapes}))};this.diagram?e(this.diagram):this.service.diagram.value!=null?e(this.service.diagram.value):xi(this.service.diagram,e)}},render:function(){return Ni(Ii,{ref:"container"})}};import{BLOCK as wi,ELEMENT_DIV as bi,NONE as Vi,PopupHandler as Bi,CLASS_SURFACE_POPUP as Li,ABSOLUTE as Ui}from"@visuallyjs/browser-ui";import{h as Gi,inject as ki,onMounted as ji,ref as ge,watch as Fi}from"vue";var Ze={name:"SurfacePopup",props:{selector:String,anchor:{type:String,default:"bottom"}},setup(e){let t=ki(s),o=ge(null),n=ge("block"),i=ge(null),p=ge(null),r=a=>{p.value=new Bi(e.selector,i.value,a,l=>{o.value=l,l==null?n.value=Vi:(n.value=wi,requestAnimationFrame(()=>p.value.$positionPopup()))},e.anchor)};return ji(()=>{t.surface.value==null?Fi(t.surface,r):r(t.surface.value)}),{service:t,current:o,display:n,rootRef:i,handler:p}},render(){var e;return Gi(bi,{ref:"rootRef",display:this.display,position:Ui,class:Li},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 Te,watch as N}from"vue";import{BackgroundPlugin as Se,GeneratedGridBackground as Hi,SimpleBackground as $i,TiledBackground as Wi}from"@visuallyjs/browser-ui";var Vo={setup(){return{service:Te(s)}},name:W,props:{options:{type:Object}},mounted:function(){let e=t=>{t.addPlugin({type:Se.type,options:this.options})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}},Bo={setup(){return{service:Te(s)}},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:Se.type,options:{type:Hi.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):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}},Lo={setup(){return{service:Te(s)}},name:K,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:Se.type,options:{type:$i.type,url:this.url}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}},Uo={setup(){return{service:Te(s)}},name:J,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:Se.type,options:{type:Wi.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):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}};var id={install:function(e,t){e.component(Lt,Ge),e.component(Ut,ke),e.component(Gt,Ye),e.component(X,oo),e.component(Z,io),e.component(te,go),e.component(Y,yo),e.component(Q,Oo),e.component(ee,Co),e.component(W,Vo),e.component(z,Bo),e.component(K,Lo),e.component(J,Uo),e.component(q,Ao),e.component(oe,Xe),e.component(ne,De),e.component(re,xe),e.component(ie,Ie),e.component(se,we),e.component(ae,be),e.component(le,Me),e.component(de,Ue),e.component(ue,Le),e.component(ce,Be),e.component(pe,Ve),e.component(F,Fe),e.component(H,He),e.component($,We),e.component(wt,bo),e.component(me,$e),e.component(jt,Je),e.component(kt,Ze),e.provide(s,new C("root"))}};import{shallowRef as qe,ref as zi}from"vue";import{EVENT_ZOOM as Qe}from"@visuallyjs/browser-ui";import{inject as Ki}from"vue";function md(){let e=Ki(s),t=qe(null),o=qe(null),n=qe(null),i=zi(1);return e==null||e.getSurface(p=>{o.value=p,o.value.bind(Qe,r=>{i.value=r.zoom})}),e==null||e.getDiagram(p=>{t.value=p,t.value.$ui.bind(Qe,r=>{i.value=r.zoom})}),e==null||e.getPaper(p=>{n.value=p,n.value.bind(Qe,r=>{i.value=r.zoom})}),i}import{inject as Ji,onUnmounted as Yi}from"vue";import{EVENT_DATA_UPDATED as Go,EVENT_GRAPH_CLEARED as ko}from"@visuallyjs/browser-ui";function Td(e){let t=Ji(s);if(t){let o=null,n=()=>{o&&e(o)},i=()=>{o&&(o.unbind(Go,n),o.unbind(ko,n))},p=r=>{i(),o=r,o&&(o.bind(Go,n),o.bind(ko,n),n())};t.getModel(r=>{p(r)}),Yi(()=>{i()})}}import{shallowRef as Xi}from"vue";import{inject as Zi}from"vue";function xd(){let e=Zi(s),t=Xi(null);return e==null||e.getSurface(o=>{t.value=o}),t}import{shallowRef as qi}from"vue";import{inject as Qi}from"vue";function Vd(){let e=Qi(s),t=qi(null);return e==null||e.getDiagram(o=>{t.value=o}),t}import{shallowRef as es}from"vue";import{inject as ts}from"vue";function jd(){let e=ts(s),t=es(null);return e==null||e.getPaper(o=>{t.value=o}),t}export{Ee as $initialiseVueOverlays,be as AreaChartComponent,Vo as BackgroundComponent,De as BarChartComponent,Xt as BaseOverlayComponent,O as BrowserUIVueModel,Be as BubbleChartComponent,Vt as CLASS_VUE_GROUP,bt as CLASS_VUE_NODE,Bt as CLASS_VUE_OVERLAY,ae as COMPONENT_AREA_CHART,W as COMPONENT_BACKGROUND,ne as COMPONENT_BAR_CHART,ce as COMPONENT_BUBBLE_CHART,re as COMPONENT_COLUMN_CHART,Q as COMPONENT_CONTROLS,te as COMPONENT_DIAGRAM,oe as COMPONENT_DIAGRAM_PALETTE,Gt as COMPONENT_DIAGRAM_PROVIDER,ee as COMPONENT_EXPORT_CONTROLS,ue as COMPONENT_GAUGE_CHART,z as COMPONENT_GRID_BACKGROUND,K as COMPONENT_IMAGE_BACKGROUND,me as COMPONENT_INSPECTOR,se as COMPONENT_LINE_CHART,Y as COMPONENT_MINIVIEW,q as COMPONENT_PALETTE,Z as COMPONENT_PAPER,Ut as COMPONENT_PAPER_PROVIDER,le as COMPONENT_PIE_CHART,de as COMPONENT_SANKEY_CHART,pe as COMPONENT_SCATTER_CHART,X as COMPONENT_SURFACE,kt as COMPONENT_SURFACE_POPUP,Lt as COMPONENT_SURFACE_PROVIDER,J as COMPONENT_TILED_IMAGE_BACKGROUND,ie as COMPONENT_XY_CHART,bo as ColorPickerComponent,xe as ColumnChartComponent,Oo as ControlsComponent,Mt as DEFAULT_SHAPE_HEIGHT,It as DEFAULT_SHAPE_WIDTH,rt as DEFAULT_VUE_PAPER_ID,ot as DEFAULT_VUE_SURFACE_ID,Je as DecoratorComponent,go as DiagramComponent,Xe as DiagramPaletteComponent,Ye as DiagramProvider,ur as EVENT_VERTEX_UPDATED,cr as EVENT_VERTICES_RENDERED,We as EdgeTypePickerComponent,Co as ExportControlsComponent,Le as GaugeChartComponent,Bo as GridBackgroundComponent,Lo as ImageBackgroundComponent,$e as InspectorComponent,U as InspectorGetterSymbol,di as InspectorSetterSymbol,we as LineChartComponent,yo as MiniviewComponent,at as PROP_ACTIVE_TRACKING,At as PROP_ALLOW_CLICK_TO_ADD,yt as PROP_ALLOW_DROP_ON_CANVAS,_t as PROP_ALLOW_DROP_ON_EDGE,gt as PROP_ALLOW_DROP_ON_GROUP,Tt as PROP_ALLOW_DROP_ON_NODE,Dt as PROP_CANVAS_DROP_FILTER,I as PROP_CLASS_NAME,Nt as PROP_CLICK_TO_ADD_ONLY,it as PROP_CLICK_TO_CENTER,mt as PROP_CSV_DATA,S as PROP_DATA,Ot as PROP_DATA_GENERATOR,ve as PROP_DATA_SOURCE_FILTER,xt as PROP_DRAG_SIZE,Ct as PROP_GROUP_IDENTIFIER,bs as PROP_ID,St as PROP_IGNORE_DROP_ON_NODE,ut as PROP_INTERACTIVE,ht as PROP_JSON_DATA,ct as PROP_MODE,k as PROP_MODEL,M as PROP_MODEL_OPTIONS,vt as PROP_ON_VERTEX_ADDED,b as PROP_OPTIONS,pt as PROP_PAPER_ID,dt as PROP_PIVOT,G as PROP_RENDER_OPTIONS,Pt as PROP_SELECTOR,Rt as PROP_SELECT_AFTER_ADD,st as PROP_SHOW_LASSO,T as PROP_SURFACE_ID,lt as PROP_TRACK_SELECTION,nt as PROP_TYPE_FUNCTION,Et as PROP_TYPE_GENERATOR,v as PROP_URL,ft as PROP_USE_MODEL,j as PROP_VIEW_OPTIONS,Ao as PaletteComponent,io as PaperComponent,ke as PaperProvider,Me as PieChartComponent,Ue as SankeyChartComponent,Ve as ScatterChartComponent,Fe as ShapeComponent,He as ShapePaletteComponent,oo as SurfaceComponent,Ze as SurfacePopup,Ge as SurfaceProvider,wt as TAG_COLOR_PICKER,jt as TAG_DECORATOR,$ as TAG_EDGE_TYPE_PICKER,F as TAG_SHAPE,H as TAG_SHAPE_PALETTE,Uo as TiledImageBackgroundComponent,id as VisuallyJsPlugin,C as VisuallyJsService,s as VisuallyJsServiceKey,Ie as XYChartComponent,qt as addPaper,Zt as addSurface,Oa as bindToDevLifecycle,mi as doProvideInspector,as as newInstance,Vd as useDiagram,jd as usePaper,xd as useSurface,Td as useVisuallyJsUpdate,md as useZoom,Ht as vertexHasRendered,$t as vertexHasUpdated,dr as vertexWillRender};
|
|
1
|
+
var Ho=Object.defineProperty,$o=Object.defineProperties;var Wo=Object.getOwnPropertyDescriptors;var tt=Object.getOwnPropertySymbols;var zo=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable;var ot=(e,t,o)=>t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,x=(e,t)=>{for(var o in t||(t={}))zo.call(t,o)&&ot(e,o,t[o]);if(tt)for(var o of tt(t))Ko.call(t,o)&&ot(e,o,t[o]);return e},w=(e,t)=>$o(e,Wo(t));import{log as Jo,BrowserUIModel as Yo}from"@visuallyjs/browser-ui";var O=class extends Yo{render(t,o){return Jo("render called directly on BrowserUiVue class: should not happen. Surface component should use internal render."),null}};function ls(e){return e=e||{},new O(e)}var rt="surfaceId",nt="paperId",it="typeFunction",st="clickToCenter",at="showLasso",lt="activeTracking",pt="trackSelection",g="surfaceId",ct="paperId",I="className",S="data",ut="mode",b="options",G="renderOptions",M="modelOptions",k="model",j="viewOptions",v="url",F="dataType",dt="interactive",mt="pivot",Re="dataSourceFilter",ht="csvData",ft="jsonData",Pt="useModel",Vs="id",Ot="selector",Et="dataGenerator",Ct="typeGenerator",_t="groupIdentifier",yt="allowDropOnEdge",Tt="allowDropOnCanvas",gt="allowDropOnGroup",St="allowDropOnNode",vt="ignoreDropOnNode",Rt="onVertexAdded",Nt="selectAfterAdd",At="clickToAddOnly",xt="allowClickToAdd",Dt="dragSize",It="canvasDropFilter",H="Shape",$="ShapePalette",Mt=120,wt=90,W="EdgeTypePickerComponent",bt="ColorPickerComponent",Vt="vjs-vue-node",Bt="vjs-vue-group",Lt="vjs-vue-overlay",z="BackgroundComponent",K="GridBackgroundComponent",J="ImageBackgroundComponent",Y="TiledImageBackgroundComponent",X="MiniviewComponent",Z="SurfaceComponent",Ut="SurfaceProvider",q="PaperComponent",Gt="PaperProvider",kt="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",jt="SurfacePopup",Ft="Decorator";import{addClass as Xo,BrowserUI as Zo,isGroup as qo,Vertex as Ht}from"@visuallyjs/browser-ui";var fe={props:{data:Object,model:O,obj:Ht,vertex:Ht,ui:Zo,el:Element,def:Object,eventInfo:Object},mounted(){let e=this,t=qo(e.vertex)?Bt:Vt;e.el.firstElementChild&&Xo(e.el.firstElementChild,t),e.ui.$vertexRendered(e.vertex,e.el,e.def,e.eventInfo),$t(e.ui.id,e.vertex)},methods:{getModel:function(){return this.model},removeVertex:function(){this.model.remove(this.vertex)}},updated(){this.ui.$revalidateElement(this.el),Wt(this.ui.id,this.vertex)}};var zt={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 Kt={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 Qo,BrowserUI as er,CLASS_DEFAULT_GROUP as tr,CLASS_DEFAULT_NODE as or,ELEMENT_DIV as Jt,extend as Yt,isGroup as rr,OptimisticEventGenerator as nr,renderSurface as ir,updateClasses as sr,Overlay as ar,Edge as Xt,OVERLAY_TYPE_CUSTOM as lr,uuid as pr,renderPaper as cr}from"@visuallyjs/browser-ui";var Ne=class{constructor(){this.unrenderedVertices=new Map;this.eventManager=new nr}vertexWillRender(t){this.unrenderedVertices.set(t.id,t)}vertexHasRendered(t){this.unrenderedVertices.delete(t.id),this.unrenderedVertices.size===0&&this.eventManager.fire(ur)}vertexHasUpdated(t){this.eventManager.fire(dr,t)}},ur="vertices:rendered",dr="vertex:updated",Ae=new Map;function Pe(e){return Ae.has(e)||Ae.set(e,new Ne),Ae.get(e)}function $t(e,t){Pe(e).vertexHasRendered(t)}function Wt(e,t){Pe(e).vertexHasUpdated(t)}function mr(e,t){Pe(e).vertexWillRender(t)}function Ea(e,t,o){Pe(e).eventManager.bind(t,o)}var Oe=(e,t)=>{t.parentNode&&t.parentNode.removeChild(t)},Zt={props:{data:Object,model:O,obj:Xt,edge:Xt,overlay:ar,ui:er,el:Element,def:Object,eventInfo:Object},mounted(){let e=this;e.el.firstElementChild&&Qo(e.el.firstElementChild,Lt)},updated(){this.ui.$revalidateElement(this.el)}},Ee=(e,t,o,n,i,p,r,a,l)=>{let d=r.component!=null,c=rr(a),h=[];d||h.push(c?tr:or);let m=d?r.component:{render(f){return f.data.label||""}};if(m){let f=document.createElement(Jt);sr(f,h),m.mixins==null&&(m.mixins=[]);let P=c?Kt:zt;m.mixins.find(C=>C===P)||m.mixins.push(P),mr(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 A=r.inject[C],Fo=typeof A=="function"?A(a,n):A;D[C]=Fo}e.push({component:E(m),el:f,e:a.getFullId(),props:D,vertex:a})}};function qt(e,t,o,n,i,p){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(l,d,c,h)=>{},render:(l,d,c,h,m,f,P,T)=>Ee(n,l,d,c,h,m,f,P,T),cleanupVertex:Oe,cleanupPort:Oe,rerender:(l,d,c,h,m,f,P,T,D)=>{let C=n.findIndex(A=>A.vertex===P);C!=null&&n.splice(C,1)[0].el,m.$__unmanage(D,!0,!0),requestAnimationFrame(()=>{Ee(n,l,d,c,h,m,f,P,T)})}},a=Yt(i||{},{view:p||{},id:t});return ir(e,o,r,a)}function Qt(e,t,o,n,i,p){let r={reactive:!0,asynchronous:!0,usesWrapperElement:!1,update:(l,d,c,h)=>{},render:(l,d,c,h,m,f,P,T)=>Ee(n,l,d,c,h,m,f,P,T),cleanupVertex:Oe,cleanupPort:Oe,rerender:(l,d,c,h,m,f,P,T,D)=>{let C=n.findIndex(A=>A.vertex===P);C!=null&&n.splice(C,1)[0].el,m.$__unmanage(D,!0,!0),requestAnimationFrame(()=>{Ee(n,l,d,c,h,m,f,P,T)})}},a=Yt(i||{},{view:p||{},id:t});return cr(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:lr,options:{create:d=>{let c=document.createElement(Jt),h=pr();r.component.mixins==null&&(r.component.mixins=[]),r.component.mixins.indexOf(Zt)===-1&&r.component.mixins.push(Zt);let m=x({data:d.edge.data,model:E(o()),ui:E(t()),obj:d.edge,edge:d.edge,el:c,def:E(r),eventInfo:null,overlay:r},a);return n.push({component:E(r.component),el:c,e:h,props:m}),c}}}:r}))}}import{log as eo,Paper as hr,Surface as fr}from"@visuallyjs/browser-ui";import{shallowRef as V}from"vue";var s=Symbol.for("visuallyjs-service"),_=class{constructor(t){this.context=t;this.i=[];this.s=[];this.a=[];this.l=[];this.surface=V(null);this.model=V(null);this.paper=V(null);this.diagram=V(null);this.ui=V(null)}getSurface(t){this.t(this.s,t,this.p)}getDiagram(t){this.t(this.a,t,this.c)}getPaper(t){this.t(this.l,t,this.u)}getModel(t){this.t(this.i,t,this.r)}getModelDirect(){return this.r}t(t,o,n){if(n!=null)try{o(n)}catch(i){eo(`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.p=t,this.n(t.model),this.o(this.s,t)}setDiagram(t){this.diagram.value=t,this.model.value=t.model,this.ui.value=t.$ui,this.c=t,this.n(t.model),t.$ui instanceof fr?this.setSurface(t.$ui):t.$ui instanceof hr&&this.setPaper(t.$ui),this.o(this.a,t)}setPaper(t){this.paper.value=t,this.model.value=t.model,this.ui.value=t,this.u=t,this.n(t.model),this.o(this.l,t)}n(t){this.r=t,this.o(this.i,t)}o(t,o){t.forEach(n=>{try{n(o)}catch(i){eo(`WARN: could not flush all queue entries ${i}`)}})}};import{h as B,inject as Pr,Teleport as to}from"vue";import{ELEMENT_DIV as Or,EVENT_GROUP_REMOVED as Er,EVENT_GROUP_UPDATED as Cr,EVENT_NODE_REMOVED as _r,EVENT_NODE_UPDATED as yr,EVENT_RENDER_END as Tr,clone as oo,EVENT_EDGE_UPDATED as gr,EVENT_EDGE_REMOVED as Sr,EVENT_GRAPH_CLEARED as vr}from"@visuallyjs/browser-ui";var ro={setup(e){return{service:Pr(s),surfaceId:e.surfaceId||rt}},name:Z,props:{[S]:{type:Object},[G]:{type:Object},[M]:{type:Object},[j]:{type:Object},[k]:{type:Object},[v]:{type:String},[F]:{type:String},[g]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new O(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url,dataType:e.dataType}):e.data&&t.load({data:e.data,dataType:e.dataType});let n=oo(this.viewOptions||{});Ce(n,()=>this.surface,()=>t,this.overlays),this.surface=qt(t,this.surfaceId,o,this.vertices,oo(this.renderOptions||{}),n),this.service.setSurface(this.surface);let i=(r,a)=>{let l=()=>{let c={};return a.originalData||a.updates?c=Object.assign(a.originalData,a.updates):a.newData&&Object.assign(c,a.newData),c},d=this.vertices.find(c=>c.e===r);d!=null&&(d.props.data=l())},p=r=>{let a=this.vertices.findIndex(l=>l.e===r);a!==-1&&this.vertices.splice(a,1)};t.bind(yr,r=>{i(r.vertex.getFullId(),r)}),t.bind(Cr,r=>{i(r.vertex.getFullId(),r)}),t.bind(_r,r=>{p(r.node.id)}),t.bind(Er,r=>{p(r.group.id)}),t.bind(gr,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(Sr,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(vr,()=>{this.vertices.length=0,this.overlays.length=0}),this.surface.bind(Tr,()=>setTimeout(()=>this.surface.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>B(to,{to:t.el,key:t.e},[B(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(B(to,{to:t.el,key:t.e},[B(t.component,t.props)]))}),B(Or,{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 Rr,Teleport as no}from"vue";import{ELEMENT_DIV as Nr,EVENT_GROUP_REMOVED as Ar,EVENT_GROUP_UPDATED as xr,EVENT_NODE_REMOVED as Dr,EVENT_NODE_UPDATED as Ir,EVENT_RENDER_END as Mr,clone as io,EVENT_EDGE_UPDATED as wr,EVENT_EDGE_REMOVED as br,EVENT_GRAPH_CLEARED as Vr}from"@visuallyjs/browser-ui";var so={setup(e){return{service:Rr(s),paperId:e.paperId||nt}},name:q,props:{[S]:{type:Object},[G]:{type:Object},[M]:{type:Object},[j]:{type:Object},[k]:{type:Object},[v]:{type:String},[F]:{type:String},[ct]:{type:String}},data:function(){return{vertices:[],overlays:[]}},mounted(){let e=this,t=this.model||new O(this.modelOptions||{}),o=this.$refs.root;e.url?t.load({url:e.url,dataType:e.dataType}):e.data&&t.load({data:e.data,dataType:e.dataType});let n=io(this.viewOptions||{});Ce(n,()=>this.paper,()=>t,this.overlays),this.paper=Qt(t,this.paperId,o,this.vertices,io(this.renderOptions||{}),n),this.service.setPaper(this.paper);let i=(r,a)=>{let l=()=>{let c={};return a.originalData||a.updates?c=Object.assign(a.originalData,a.updates):a.newData&&Object.assign(c,a.newData),c},d=this.vertices.find(c=>c.e===r);d!=null&&(d.props.data=l())},p=r=>{let a=this.vertices.findIndex(l=>l.e===r);a!==-1&&this.vertices.splice(a,1)};t.bind(Ir,r=>{i(r.vertex.getFullId(),r)}),t.bind(xr,r=>{i(r.vertex.getFullId(),r)}),t.bind(Dr,r=>{p(r.node.id)}),t.bind(Ar,r=>{p(r.group.id)}),t.bind(wr,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(br,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(Vr,()=>{this.vertices.length=0,this.overlays.length=0}),this.paper.bind(Mr,()=>setTimeout(()=>this.paper.$redrawEveryConnection()))},render:function(){let e=this.vertices.map(t=>L(no,{to:t.el,key:t.e},[L(t.component,t.props)]));return this.overlays.forEach(t=>{e.push(L(no,{to:t.el,key:t.e},[L(t.component,t.props)]))}),L(Nr,{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 Br,watch as Lr}from"vue";import{LassoPlugin as Ur,SURFACE_MODE_SELECT as ao,SURFACE_MODE_PAN as lo,PAN_PATH as Gr,PAN_VIEW_BOX as kr,LASSO_PATH as jr,LASSO_VIEW_BOX as Fr,ZOOM_TO_FIT_PATH as Hr,ZOOM_TO_FIT_VIEW_BOX as $r,EVENT_UNDOREDO_UPDATE as Wr,TRUE as po,FALSE as co,EVENT_SURFACE_MODE_CHANGED as zr,ELEMENT_DIV as uo,ATTRIBUTE_CONTROLS_ORIENTATION as Kr,ZOOM_IN_OUT_VIEW_BOX as mo,ZOOM_IN_PATH as Jr,ZOOM_OUT_PATH as Yr,RESET_SELECTION_PATH as Xr,RESET_SELECTION_VIEW_BOX as Zr,CLEAR_PATH as qr,CLEAR_VIEW_BOX as Qr,ATTRIBUTE_RESET_SELECTION as en,CLASS_CONTROLS_RESET_SELECTION as tn,EVENT_SELECT as on,EVENT_DESELECT as rn,EVENT_SELECTION_CLEARED as nn,supportsPathEditing as sn}from"@visuallyjs/browser-ui";var an="Clear dataset?",xe="vjs-selected-mode",ho="can-undo",fo="can-redo",ln="data-undo",pn="data-redo",Po="data-mode",cn="data-reset",un="data-clear",dn="data-zoom-in",mn="data-zoom-out",Oo="vjs-controls-has-selection",Eo={setup(e){return{service:Br(s)}},name:ee,props:{clear:{type:Boolean,default:!0},[g]:{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:an},onMaybeClear:{type:Function},className:{type:String,default:""}},methods:{panMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(lo)},selectMode:function(){var e;(e=this.service.surface.value)==null||e.setMode(ao)},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(Oo):this.$refs.root.setAttribute(Oo,"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 ${xe}`,[Po]:lo,onClick:()=>this.panMode(),title:"Pan mode"},[u("svg",{viewBox:kr,stroke:"currentColor",fill:"none"},[u("path",{d:Gr})])])),e.push(u("i",{class:"vjs-select-mode",[Po]:ao,onClick:()=>this.selectMode(),title:"Select mode"},[u("svg",{viewBox:Fr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:jr})])]))),this.undoRedo&&(e.push(u("i",{class:"vjs-undo",[ln]:!0,title:"Undo last action",onClick:()=>this.undo()})),e.push(u("i",{class:"vjs-redo",[pn]:!0,title:"Redo last action",onClick:()=>this.redo()}))),this.zoomToExtents&&e.push(u("i",{class:"vjs-zoom-to-fit",[cn]:"true",onClick:()=>this.zoomToFit(),title:"Zoom to Fit"},[u("svg",{viewBox:$r,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Hr})])])),this.zoomButtons&&(e.push(u("i",{class:"vjs-zoom-in",[dn]:"true",onClick:()=>this.zoomIn(),title:"Zoom In"},[u("svg",{viewBox:mo,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Jr})])])),e.push(u("i",{class:"vjs-zoom-out",[mn]:"true",onClick:()=>this.zoomOut(),title:"Zoom Out"},[u("svg",{viewBox:mo,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Yr})])]))),e.push(u("i",{class:tn,[en]:"true",onClick:()=>{this.resetSelection()}},[u("svg",{viewBox:Zr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:Xr})])])),this.clear&&e.push(u("i",{class:"vjs-clear-dataset",[un]:"true",onClick:()=>{this.doClear()}},[u("svg",{viewBox:Qr,stroke:"currentColor",fill:"currentColor"},[u("path",{d:qr})])])),u(uo,{class:`vjs-controls ${this.className}`,ref:"root",[ho]:!1,[fo]:!1,[Kr]:this.orientation},e)}else return u(uo,{ref:"root"})},mounted(){let e=t=>{let o=t.getPlugin(Ur.type);this.showPan=o!=null,t.bind(zr,n=>{t.removeClass(t.$getSelector(this.$refs.root,"[data-mode]"),xe),t.addClass(t.$getSelector(this.$refs.root,"[data-mode='"+n+"']"),xe)}),t.model.bind(Wr,n=>{this.$refs.root.setAttribute(ho,n.undoCount>0?po:co),this.$refs.root.setAttribute(fo,n.redoCount>0?po:co)}),t.model.bind(on,()=>this.updateSelectionState()),t.model.bind(rn,()=>this.updateSelectionState()),t.model.bind(nn,()=>this.updateSelectionState()),this.ready=!0};this.service.surface.value==null?Lr(this.service.surface,e):e(this.service.surface.value)}};import{h as R,inject as hn}from"vue";import{CLASS_CONTROLS as fn,CLASS_EXPORT_CONTROLS as Pn,ELEMENT_DIV as On,ImageExportUI as Co,SvgExportUI as En,TYPE_JPG as Cn,TYPE_PNG as _n,TYPE_SVG as yn}from"@visuallyjs/browser-ui";var _o={name:te,setup(e){return{service:hn(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 En(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 Co(e).export(t)})},exportPNG:function(){this.loadSurface(e=>{let t=this.imageOptions||{};this.margins!=null&&t.margins==null&&Object.assign(t,this.margins),new Co(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":yn,onClick:()=>this.exportSVG()},"SVG")])),o&&i.push(R("i",{},[R("a",{href:"#","data-type":_n,onClick:()=>this.exportPNG()},"PNG")])),n&&i.push(R("i",{},[R("a",{href:"#","data-type":Cn,onClick:()=>this.exportJPG()},"JPG")])),e&&i.unshift(R("span",{},[this.label])),R(On,{class:`${fn} ${Pn}`},i)}};import{h as Tn,inject as gn,watch as yo}from"vue";import{ELEMENT_DIV as Sn,MiniviewPlugin as vn}from"@visuallyjs/browser-ui";var To={setup(e){return{service:gn(s)}},name:X,props:{[g]:{type:String},[I]:{type:String,default:""},[lt]:{type:Boolean,default:!0},[st]:{type:Boolean,default:!0},[at]:{type:Boolean,default:!0},[pt]:{type:Boolean,default:!0},[it]:{type:Function}},mounted:function(){let e=t=>{t.addPlugin({type:vn.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):(yo(this.service.surface,e),yo(this.service.paper,e))},render:function(e){return Tn(Sn,{ref:"root",class:e.className})}};import{h as Rn,inject as Nn,markRaw as An}from"vue";import{createDiagram as xn,ELEMENT_DIV as Dn}from"@visuallyjs/browser-ui";var go={setup(e){return{service:Nn(s)}},name:oe,props:{[S]:{type:Object},[v]:{type:String},[M]:{type:Object},[b]:{type:Object}},mounted(){let e=this.$refs.root;this.diagram=An(xn(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 Rn(Dn,{ref:"root",class:"vjs-vue-surface",style:{width:"100%",height:"100%"}},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as So,inject as In,watch as vo}from"vue";import{ColumnChart as Mn,BarChart as wn,CategoryValueChart as bn,ELEMENT_DIV as Ro,LineChart as Vn,AreaChart as Bn,PieChart as Ln,ScatterChart as Un,BubbleChart as Gn,GaugeChart as kn,SankeyChart as jn}from"@visuallyjs/browser-ui";var No={[I]:{type:String},[S]:{type:Object},[v]:{type:String},[Pt]:{type:Boolean,default:!1}},Ao={setup(){return{service:In(s)}},render:function(){return So(Ro,{class:`${this.className}`,ref:"root"})}};function y(e,t,o=!0){let n=w(x({},No),{[b]:{type:Object}}),i={};return o&&(n[Re]={type:Function},i[Re]=function(p){this.chart.setDataSourceFilter(p)}),w(x({},Ao),{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()):vo(this.service.model,l=>{this.hasMounted||(r.dataSource=l,a())}):a()}})}var De=y(ne,Mn),Ie=y(ie,wn),Me=y(se,bn,!1),we=y(pe,Ln),be=y(ae,Vn),Ve=y(le,Bn),Be=y(ce,Un),Le=y(ue,Gn),Ue=y(de,kn,!1),Ge=w(x({},Ao),{name:me,props:w(x({},No),{[ht]:{type:String},[ft]:{type:Object},[dt]:{type:Boolean},[mt]:{type:String},[b]:{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?vo(this.service.model,n):n(this.service.model.value)}else o()},watch:{pivot(e){this.chart&&this.chart.pivot(e)}},render:function(){return So(Ro,{class:`${this.className}`,ref:"root"})}});import{h as Fn,inject as Hn,watch as $n}from"vue";import{defaultDataGenerator as Wn,ELEMENT_DIV as zn,Palette as Kn}from"@visuallyjs/browser-ui";var xo={setup(e){return{service:Hn(s)}},name:Q,props:{[g]:{type:String},[Ot]:{type:String},[Et]:{type:Function},[Ct]:{type:Function},[_t]:{type:Function},[yt]:{type:Boolean,default:!1},[Tt]:{type:Boolean,default:!0},[gt]:{type:Boolean,default:!0},[St]:{type:Boolean,default:!1},[vt]:{type:Boolean,default:!1},[Dt]:Object,[Rt]:Function,[It]:Function,[I]:String,[ut]:String,[Nt]:{type:Boolean,default:!1},[xt]:{type:Boolean,default:!1},[At]:{type:Boolean,default:!1}},mounted:function(){let e=t=>{let o={source:this.$refs.root,selector:this.selector,dataGenerator:n=>this.dataGenerator?this.dataGenerator(n):Wn(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};this.groupIdentifier!=null&&(o.groupIdentifier=this.groupIdentifier),this.typeGenerator!=null&&(o.typeGenerator=this.typeGenerator),this.palette=new Kn(t,o)};this.service.surface.value==null?$n(this.service.surface,e):e(this.service.surface.value)},render:function(){return Fn(zn,{ref:"root",class:this.className||""},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{provide as Jn}from"vue";var ke={setup(){Jn(s,new _("SurfaceProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{provide as Yn}from"vue";var je={setup(){Yn(s,new _("PaperProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Xn,inject as Zn,watch as qn}from"vue";import{CLASS_SHAPE as Qn,convertToMultilineText as Do,DEFAULT_LABEL_FILL_RATIO as Fe,ELEMENT_SVG as ei}from"@visuallyjs/browser-ui";var He={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:Fe},labelColor:{type:String,default:"#000000"},font:{type:Object}},setup(){return{service:Zn(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&&Do(i,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||Fe))}};this.service.ui.value==null?qn(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&&Do(n,this.data[this.labelProperty]||"",this.getWidth()*(this.labelFillRatio||Fe))}}},render:function(){return Xn(ei,{ref:"container",preserveAspectRatio:"none",fill:this.getFill(),stroke:this.getOutline(),"stroke-width":this.getOutlineWidth(),viewBox:"0 0 "+this.getWidth()+" "+this.getHeight(),class:Qn})},methods:{getWidth:function(){return this.data.width||Mt},getHeight:function(){return this.data.height||wt},getFill:function(){return this.data.fill||"#FFFFFF"},getOutline:function(){return this.data.outline||"#000000"},getOutlineWidth(){return this.data.outlineWidth||2}}};import{h as ti,inject as oi,watch as ri}from"vue";import{ELEMENT_DIV as ni,ShapePalette as ii}from"@visuallyjs/browser-ui";var $e={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},preparedShapes:Array},setup(e){return{service:oi(s)}},data:()=>({hasMounted:!1}),mounted(){let e=t=>{this.hasMounted||(this.hasMounted=!0,new ii(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,preparedShapes:this.preparedShapes}))};this.service.surface.value==null?ri(this.service.surface,e):e(this.service.surface.value)},render:function(){return ti(ni,{ref:"container"})}};import{provide as Io,readonly as si,inject as ai,h as li,watch as pi}from"vue";import{ELEMENT_DIV as ci,Inspector as ui,log as di}from"@visuallyjs/browser-ui";var U=Symbol.for("VueInspectorGetter"),mi=Symbol.for("VueInspectorSetter");function hi(){let e=[],t=null;function o(p){try{p(t)}catch(r){di("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 Io(mi,i),Io(U,si(n)),i}var We={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=hi();return{service:ai(s),inspectorProvider:o,inspector:null,emit:t.emit}},mounted(){let e=t=>{if(this.inspector==null){let o=new ui({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?pi(this.service.surface,e):e(this.service.surface.value)},render(){return li(ci,{ref:"root"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])}};import{h as fi,inject as Pi}from"vue";import{EdgeTypePicker as Oi,ELEMENT_DIV as Ei,log as Ci}from"@visuallyjs/browser-ui";var ze={name:W,props:{propertyName:String},setup(){return{inspectorProvider:Pi(U)}},mounted(){this.inspectorProvider?this.inspectorProvider.listen(e=>{let t=new Oi(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.m),e.onChange(()=>{t.select(this.propertyName,e.getValue(this.propertyName))})}):Ci("WARN: EdgeTypePicker not instantiated inside an InspectorComponent. Cannot mount.")},render:function(){return fi(Ei,{ref:"container"})}};import{h as _e,inject as _i}from"vue";import{CLASS_COLOR_PICKER as Mo,CLASS_COLOR_PICKER_SWATCH as wo,CLASS_COLOR_PICKER_SWATCHES as bo,EVENT_CONTEXT_UPDATE as yi,ELEMENT_DIV as Ke,INSPECTOR_CONTEXT_RECENT_COLORS as ye}from"@visuallyjs/browser-ui";var Vo={render(){let e=this.swatches.map(t=>_e(Ke,{title:t,class:wo,style:`background-color:${t}`,"data-color":t,onClick:()=>this.selectSwatch(t)}));return _e(Ke,{class:`${Mo}`},[_e("input",{type:"color","vjs-att":this.propertyName,ref:"colorInput"}),_e(Ke,{class:bo},e)])},props:{propertyName:String,maxColors:{type:Number,default:10}},data:()=>({CLASS_COLOR_PICKER:Mo,CLASS_COLOR_PICKER_SWATCHES:bo,CLASS_COLOR_PICKER_SWATCH:wo,colorInput:null,swatches:[]}),mounted(){let e=_i(U);e&&e.listen(t=>{this.inspector=t,this.swatches=t.ensureContext(ye,()=>[]),this.colorInput=this.$refs.colorInput,this.colorInput.addEventListener("change",this.colorPicked),t.bind(yi,o=>{o.key===ye&&(this.swatches=o.value.slice())}),t.bind("change",this.setCurrentColor),this.setCurrentColor()})},methods:{addColor:function(e){let t=this.inspector.ensureContext(ye,()=>[]);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(ye,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 Te,inject as Ti,nextTick as gi,Teleport as Si,watch as vi}from"vue";import{ELEMENT_DIV as Je,uuid as Ri}from"@visuallyjs/browser-ui";var Ye={props:{placement:{type:String,default:"floating"},position:{type:Object},constraints:{type:Object}},data:()=>({hasMounted:!1,surface:null}),setup(e){return{service:Ti(s)}},mounted(){let e=t=>{if(!this.hasMounted){this.surface=t,this.hasMounted=!0;let o=this.position||{x:0,y:0};gi().then(()=>{this.placement==="floating"?t.floatElement(this.$refs.root,o):t.fixElement(this.$refs.fixedEl,o,this.constraints)})}};this.service.surface.value==null?vi(this.service.surface,e):e(this.service.surface.value)},render(){return Te(Je,{ref:"root"},this.hasMounted?this.placement==="floating"?Te(Je,{},this.$slots.hasOwnProperty("default")?this.$slots.default():[]):Te(Si,{to:this.surface.vertexLayer,key:Ri()},Te(Je,{ref:"fixedEl"},this.$slots.hasOwnProperty("default")?this.$slots.default():[])):[])}};import{provide as Ni}from"vue";var Xe={setup(){Ni(s,new _("DiagramProvider"))},render(){return this.$slots.hasOwnProperty("default")?this.$slots.default():[]}};import{h as Ai,inject as xi,watch as Di}from"vue";import{DiagramPalette as Ii,ELEMENT_DIV as Mi,log as wi}from"@visuallyjs/browser-ui";var Ze={name:re,props:{fill:String,outline:String,dragSize:Object,inspector:{type:Boolean,default:!0},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},setup(e){return{service:xi(s)}},data:()=>({hasMounted:!1}),mounted(){if(this.service==null&&this.diagram==null)wi("Cannot mount DiagramPalette - no service found and Diagram not passed in as a prop");else{let e=t=>{this.hasMounted||(this.hasMounted=!0,new Ii(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,preparedShapes:this.preparedShapes}))};this.diagram?e(this.diagram):this.service.diagram.value!=null?e(this.service.diagram.value):Di(this.service.diagram,e)}},render:function(){return Ai(Mi,{ref:"container"})}};import{BLOCK as bi,ELEMENT_DIV as Vi,NONE as Bi,PopupHandler as Li,CLASS_SURFACE_POPUP as Ui,ABSOLUTE as Gi}from"@visuallyjs/browser-ui";import{h as ki,inject as ji,onMounted as Fi,ref as ge,watch as Hi}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 Li(e.selector,i.value,a,l=>{o.value=l,l==null?n.value=Bi:(n.value=bi,requestAnimationFrame(()=>p.value.$positionPopup()))},e.anchor)};return Fi(()=>{t.surface.value==null?Hi(t.surface,r):r(t.surface.value)}),{service:t,current:o,display:n,rootRef:i,handler:p}},render(){var e;return ki(Vi,{ref:"rootRef",display:this.display,position:Gi,class:Ui},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 N}from"vue";import{BackgroundPlugin as ve,GeneratedGridBackground as $i,SimpleBackground as Wi,TiledBackground as zi}from"@visuallyjs/browser-ui";var Bo={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):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}},Lo={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:$i.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):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}},Uo={setup(){return{service:Se(s)}},name:J,props:{url:{type:String}},mounted:function(){let e=t=>{t.addPlugin({type:ve.type,options:{type:Wi.type,url:this.url}})};this.service.surface.value!=null&&e(this.service.surface.value),this.service.paper.value!=null?e(this.service.paper.value):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}},Go={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:zi.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):(N(this.service.surface,e),N(this.service.paper,e))},render:function(e){return[]}};var sd={install:function(e,t){e.component(Ut,ke),e.component(Gt,je),e.component(kt,Xe),e.component(Z,ro),e.component(q,so),e.component(oe,go),e.component(X,To),e.component(ee,Eo),e.component(te,_o),e.component(z,Bo),e.component(K,Lo),e.component(J,Uo),e.component(Y,Go),e.component(Q,xo),e.component(re,Ze),e.component(ie,Ie),e.component(ne,De),e.component(se,Me),e.component(ae,be),e.component(le,Ve),e.component(pe,we),e.component(me,Ge),e.component(de,Ue),e.component(ue,Le),e.component(ce,Be),e.component(H,He),e.component($,$e),e.component(W,ze),e.component(bt,Vo),e.component(he,We),e.component(Ft,Ye),e.component(jt,qe),e.provide(s,new _("root"))}};import{shallowRef as Qe,ref as Ki}from"vue";import{EVENT_ZOOM as et}from"@visuallyjs/browser-ui";import{inject as Ji}from"vue";function hd(){let e=Ji(s),t=Qe(null),o=Qe(null),n=Qe(null),i=Ki(1);return e==null||e.getSurface(p=>{o.value=p,o.value.bind(et,r=>{i.value=r.zoom})}),e==null||e.getDiagram(p=>{t.value=p,t.value.$ui.bind(et,r=>{i.value=r.zoom})}),e==null||e.getPaper(p=>{n.value=p,n.value.bind(et,r=>{i.value=r.zoom})}),i}import{inject as Yi,onUnmounted as Xi}from"vue";import{EVENT_DATA_UPDATED as ko,EVENT_GRAPH_CLEARED as jo}from"@visuallyjs/browser-ui";function Sd(e){let t=Yi(s);if(t){let o=null,n=()=>{o&&e(o)},i=()=>{o&&(o.unbind(ko,n),o.unbind(jo,n))},p=r=>{i(),o=r,o&&(o.bind(ko,n),o.bind(jo,n),n())};t.getModel(r=>{p(r)}),Xi(()=>{i()})}}import{shallowRef as Zi}from"vue";import{inject as qi}from"vue";function Dd(){let e=qi(s),t=Zi(null);return e==null||e.getSurface(o=>{t.value=o}),t}import{shallowRef as Qi}from"vue";import{inject as es}from"vue";function Bd(){let e=es(s),t=Qi(null);return e==null||e.getDiagram(o=>{t.value=o}),t}import{shallowRef as ts}from"vue";import{inject as os}from"vue";function Fd(){let e=os(s),t=ts(null);return e==null||e.getPaper(o=>{t.value=o}),t}export{Ce as $initialiseVueOverlays,Ve as AreaChartComponent,Bo as BackgroundComponent,Ie as BarChartComponent,Zt as BaseOverlayComponent,O as BrowserUIVueModel,Le as BubbleChartComponent,Bt as CLASS_VUE_GROUP,Vt as CLASS_VUE_NODE,Lt 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,kt 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,Gt as COMPONENT_PAPER_PROVIDER,pe as COMPONENT_PIE_CHART,me as COMPONENT_SANKEY_CHART,ce as COMPONENT_SCATTER_CHART,Z as COMPONENT_SURFACE,jt as COMPONENT_SURFACE_POPUP,Ut as COMPONENT_SURFACE_PROVIDER,Y as COMPONENT_TILED_IMAGE_BACKGROUND,se as COMPONENT_XY_CHART,Vo as ColorPickerComponent,De as ColumnChartComponent,Eo as ControlsComponent,wt as DEFAULT_SHAPE_HEIGHT,Mt as DEFAULT_SHAPE_WIDTH,nt as DEFAULT_VUE_PAPER_ID,rt as DEFAULT_VUE_SURFACE_ID,Ye as DecoratorComponent,go as DiagramComponent,Ze as DiagramPaletteComponent,Xe as DiagramProvider,dr as EVENT_VERTEX_UPDATED,ur as EVENT_VERTICES_RENDERED,ze as EdgeTypePickerComponent,_o as ExportControlsComponent,Ue as GaugeChartComponent,Lo as GridBackgroundComponent,Uo as ImageBackgroundComponent,We as InspectorComponent,U as InspectorGetterSymbol,mi as InspectorSetterSymbol,be as LineChartComponent,To as MiniviewComponent,lt as PROP_ACTIVE_TRACKING,xt as PROP_ALLOW_CLICK_TO_ADD,Tt as PROP_ALLOW_DROP_ON_CANVAS,yt as PROP_ALLOW_DROP_ON_EDGE,gt as PROP_ALLOW_DROP_ON_GROUP,St as PROP_ALLOW_DROP_ON_NODE,It as PROP_CANVAS_DROP_FILTER,I as PROP_CLASS_NAME,At as PROP_CLICK_TO_ADD_ONLY,st as PROP_CLICK_TO_CENTER,ht as PROP_CSV_DATA,S as PROP_DATA,Et as PROP_DATA_GENERATOR,Re as PROP_DATA_SOURCE_FILTER,F as PROP_DATA_TYPE,Dt as PROP_DRAG_SIZE,_t as PROP_GROUP_IDENTIFIER,Vs as PROP_ID,vt as PROP_IGNORE_DROP_ON_NODE,dt as PROP_INTERACTIVE,ft as PROP_JSON_DATA,ut as PROP_MODE,k as PROP_MODEL,M as PROP_MODEL_OPTIONS,Rt as PROP_ON_VERTEX_ADDED,b as PROP_OPTIONS,ct as PROP_PAPER_ID,mt as PROP_PIVOT,G as PROP_RENDER_OPTIONS,Ot as PROP_SELECTOR,Nt as PROP_SELECT_AFTER_ADD,at as PROP_SHOW_LASSO,g as PROP_SURFACE_ID,pt as PROP_TRACK_SELECTION,it as PROP_TYPE_FUNCTION,Ct as PROP_TYPE_GENERATOR,v as PROP_URL,Pt as PROP_USE_MODEL,j as PROP_VIEW_OPTIONS,xo as PaletteComponent,so as PaperComponent,je as PaperProvider,we as PieChartComponent,Ge as SankeyChartComponent,Be as ScatterChartComponent,He as ShapeComponent,$e as ShapePaletteComponent,ro as SurfaceComponent,qe as SurfacePopup,ke as SurfaceProvider,bt as TAG_COLOR_PICKER,Ft as TAG_DECORATOR,W as TAG_EDGE_TYPE_PICKER,H as TAG_SHAPE,$ as TAG_SHAPE_PALETTE,Go as TiledImageBackgroundComponent,sd as VisuallyJsPlugin,_ as VisuallyJsService,s as VisuallyJsServiceKey,Me as XYChartComponent,Qt as addPaper,qt as addSurface,Ea as bindToDevLifecycle,hi as doProvideInspector,ls as newInstance,Bd as useDiagram,Fd as usePaper,Dd as useSurface,Sd as useVisuallyJsUpdate,hd as useZoom,$t as vertexHasRendered,Wt as vertexHasUpdated,mr as vertexWillRender};
|