@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 304 kB
JavaScript
(function(Z,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("lodash-es"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../modal/index.umd.js"),require("../transfer/index.umd.js"),require("../tabs/index.umd.js"),require("../order/index.umd.js"),require("../condition/index.umd.js"),require("../checkbox/index.umd.js"),require("../common/index.umd.js"),require("../filter-bar/index.umd.js"),require("../tooltip/index.umd.js"),require("../pagination/index.umd.js"),require("../button/index.umd.js"),require("../search-box/index.umd.js"),require("../tags/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../property-panel/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../events-editor/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../schema-selector/index.umd.js"),require("../tree-grid/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../external-container/index.umd.js"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","@vueuse/core","../data-view/index.umd.js","../modal/index.umd.js","../transfer/index.umd.js","../tabs/index.umd.js","../order/index.umd.js","../condition/index.umd.js","../checkbox/index.umd.js","../common/index.umd.js","../filter-bar/index.umd.js","../tooltip/index.umd.js","../pagination/index.umd.js","../button/index.umd.js","../search-box/index.umd.js","../tags/index.umd.js","../dynamic-form/index.umd.js","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js","../property-panel/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-list/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../events-editor/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../number-spinner/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../../designer/radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../schema-selector/index.umd.js","../tree-grid/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../external-container/index.umd.js","../notify/index.umd.js"],i):(Z=typeof globalThis<"u"?globalThis:Z||self,i(Z["flow-canvas"]={},Z.Vue,Z.LodashES,Z.VueUseCore,Z.dataView,null,Z.FTransfer,Z.FTabs,Z.FOrder,null,Z.checkbox,Z.common,Z.FFilterBar,Z.FTooltip,Z.FPagination,Z.FButton,Z.FSearchBox,Z.FTags,Z.FDynamicForm,Z.dynamicResolver,null,null,Z.FAccordion,Z.FAvatar,Z.FButtonEdit,Z.FButtonGroup,Z.FCalendar,Z.FCapsule,Z.FCheckbox,Z.FCheckboxGroup,Z.FComboList,Z.FComboTree,Z.FComponent,Z.FColorPicker,Z.FContentContainer,Z.FDatePicker,Z.FDataGrid,Z.FDropdown,Z.FEventsEditor,Z.FFieldSelector,Z.FBindingSelector,Z.FImageCropper,Z.FInputGroup,Z.FLayout,Z.FListNav,Z.FListView,Z.FLookup,Z.FMappingEditor,Z.FNav,Z.FNumberRange,Z.FNumberSpinner,Z.FPageHeader,Z.FPageFooter,Z.FProgress,Z.FQuerySolution,Z.FRadioGroup,Z.FRate,Z.FResponseToolbar,Z.FResponseLayout,Z.FResponseLayoutEditorSetting,Z.FSection,Z.FSmokeDetector,Z.FSplitter,Z.FStep,Z.FSwitch,Z.FText,Z.FTimePicker,Z.FTreeview,Z.FUploader,Z.FVerifyDetail,Z.FVideo,Z.FTextArea,Z.FSchemaSelector,Z.FTreeGrid$1,Z.FEventParameter,Z.FFilterConditionEditor,Z.FFieldset,Z.FSortConditionEditor,Z.FMenuLookup,Z.FDrawer,Z.FJsonEditor,Z.FPropertyEditor,Z.FExpressionEditor,Z.FCodeEditor,Z.FHtmlTemplate,Z.FExternalContainer,Z.notify))})(this,function(Z,i,Fe,wn,Ie,Oc,Cn,xn,_n,Mc,Vr,Re,Sn,Tn,Nn,Ir,kn,On,Yt,Pr,Ec,Fc,Mn,En,Fn,Vn,In,Pn,rn,Gt,Ut,Dr,Dn,jn,Bn,Rn,$n,Wn,jr,Br,Ln,Hn,qn,An,zn,Yn,Gn,Rr,Un,Xn,Qn,Kn,Jn,Zn,eo,to,no,oo,ro,io,ao,so,lo,co,uo,fo,po,mo,ho,go,yo,vo,$r,bo,Wr,Lr,wo,Hr,qr,Co,Ar,zr,Yr,Gr,xo,Ur,Xr){"use strict";var Nc=Object.defineProperty;var kc=(Z,i,Fe)=>i in Z?Nc(Z,i,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Z[i]=Fe;var q=(Z,i,Fe)=>kc(Z,typeof i!="symbol"?i+"":i,Fe);const _o={modelValue:{type:Object,default:{}}};function Qr(){const o={aroundDirection:"none",left:2,right:2,top:2,bottom:2,x:0,y:0};function r(){const E=document.createElementNS("http://www.w3.org/2000/svg","path");return E.setAttribute("fill","none"),E.setAttribute("stroke","#4d53e8"),E.setAttribute("stroke-width","2"),E.setAttribute("class",""),E}function a(){const E=document.createElementNS("http://www.w3.org/2000/svg","path");return E.setAttribute("fill","none"),E.setAttribute("stroke","#4d53e8"),E.setAttribute("stroke-width","2"),E.setAttribute("stroke-linecap","round"),E}function s(){const E=document.createElementNS("http://www.w3.org/2000/svg","path");return E.setAttribute("fill","none"),E.setAttribute("stroke","#4d53e8"),E.setAttribute("stroke-width","2"),E.setAttribute("stroke-linecap","round"),E}function l(E,N,V,P){const j=M=>{M.key==="Delete"&&(E.indexOf("^"),document.removeEventListener("keydown",j),N.remove())};V.addEventListener("mouseenter",()=>{V.setAttribute("stroke","#37d0ff"),P.setAttribute("stroke","#37d0ff"),V.setAttribute("stroke-width","3"),document.addEventListener("keydown",j)}),V.addEventListener("mouseleave",()=>{V.setAttribute("stroke","#4d53e8"),V.setAttribute("stroke-width","2"),P.setAttribute("stroke","#4d53e8"),document.removeEventListener("keydown",j)})}function c(E){let N=document.getElementById(E);if(N==null){const V=document.createElementNS("http://www.w3.org/2000/svg","svg"),P=r();V.appendChild(P);const j=a();V.appendChild(j);const M=s();V.appendChild(M);const I=s();V.appendChild(I),N=document.createElement("div"),N.id=E,N.style.position="absolute",N.appendChild(V),l(E,N,P,j);const H=document.getElementById("svg-container");return H&&H.appendChild(N),N}return N}function u(E,N,V,P,j){const M={x:0,y:0};return E==="west"&&(N==="north_west"&&(V==="north"&&(M.x=0,M.y=0-j/2),V==="west"&&(M.x=0-P/2,M.y=0)),N==="north_east"&&(V==="north"&&(M.x=-100,M.y=0-j/2),V==="east"&&(M.x=-100,M.y=0-j/2)),N==="south_east"&&(V==="south"&&(M.x=-100,M.y=0+j/2),V==="east"&&(M.x=-100,M.y=0+j/2)),N==="south_west"&&(V==="south"&&(M.x=0,M.y=0+j/2),V==="west"&&(M.x=0-P/2,M.y=0))),E==="east"&&(N==="north_west"&&(V==="north"&&(M.x=-100,M.y=0-j/2),V==="west"&&(M.x=100,M.y=0-j/2)),N==="north_east"&&(V==="north"&&(M.x=0,M.y=0-j/2),V==="east"&&(M.x=0+P/2,M.y=0)),N==="south_east"&&(V==="south"&&(M.x=0,M.y=0+j/2),V==="east"&&(M.x=0+P/2,M.y=0)),N==="south_west"&&(V==="south"&&(M.x=100,M.y=0+j/2),V==="west"&&(M.x=100,M.y=0+j/2))),E==="north"&&(N==="north_west"&&(V==="north"&&(M.x=0,M.y=0-j/2),V==="west"&&(M.x=0-P/2,M.y=0)),N==="north_east"&&(V==="north"&&(M.x=0,M.y=0-j/2),V==="east"&&(M.x=0+P/2,M.y=0)),N==="south_east"&&(V==="south"&&(M.x=0+P/2,M.y=-100),V==="east"&&(M.x=0+P/2,M.y=-100)),N==="south_west"&&(V==="south"&&(M.x=0-P/2,M.y=-100),V==="west"&&(M.x=0-P/2,M.y=-100))),E==="south"&&(N==="north_west"&&(V==="north"&&(M.x=0-P/2,M.y=100),V==="west"&&(M.x=0-P/2,M.y=100)),N==="north_east"&&(V==="north"&&(M.x=0+P/2,M.y=100),V==="east"&&(M.x=0+P/2,M.y=100)),N==="south_east"&&(V==="south"&&(M.x=0,M.y=0+j/2),V==="east"&&(M.x=0+P/2,M.y=0)),N==="south_west"&&(V==="south"&&(M.x=0,M.y=j/2),V==="west"&&(M.x=0-P/2,M.y=0))),M}function d(E,N,V,P){const j={x:0,y:0};return E==="south"&&(N==="west"&&(j.x=-100,j.y=0-P/2),N==="east"&&(j.x=100,j.y=-100),N==="south"&&(j.x=0-V/2,j.y=100),(N==="north"||N==="center")&&(j.x=0,j.y=0-P/2)),E==="north"&&(N==="west"&&(j.x=-100,j.y=100),N==="east"&&(j.x=100,j.y=100),N==="north"&&(j.x=0-V/2,j.y=-100),(N==="south"||N==="center")&&(j.x=0,j.y=P/2)),E==="east"&&(N==="north"&&(j.y=-100,j.x=-100),N==="south"&&(j.y=100,j.x=-100),N==="east"&&(j.x=100,j.y=100),(N==="west"||N==="center")&&(j.x=0-V/2,j.y=0)),E==="west"&&(N==="north"&&(j.y=-100,j.x=100),N==="south"&&(j.y=100,j.x=100),N==="west"&&(j.x=-100,j.y=P/2),(N==="east"||N==="center")&&(j.x=V/2,j.y=0)),j}function p(E,N,V,P,j,M,I){const H=I==="south"||I==="east"?"portrait":"landscape",L=j,W=H==="landscape"?"east":"north",Y=I==="center"?H==="landscape"?"west":"south":I,K=u(L,M,W,E,N),{x:U,y:X}=K,se=d(W,Y,E,N),{x:ie,y:fe}=se;fe<0&&(N+=Math.abs(fe));const Ee=new Map([["default",0+U],["portrait",0+U],["landscape",0+U]]),xe=new Map([["default",N+X],["portrait",N+X],["landscape",N+X]]);U<0&&(E+=Math.abs(U)),ie>0&&(E+=ie);const G=new Map([["default",E+ie],["portrait",E+ie],["landscape",E+ie]]),ne=new Map([["default",0+fe],["portrait",0+fe],["landscape",0+fe]]),z=P.left>o.left,J=P.bottom>o.bottom,we=z?0:J?E/2:Ee.get(H),ke=J?N+P.bottom:z?N/2:xe.get(H),Me=G.get(H),qe=ne.get(H);return[{x:we,y:ke},{x:Me,y:qe},{x:ie,y:fe}]}function m(E,N,V,P,j,M,I){const H=I==="south"||I==="west"?"portrait":"landscape",L=j,W=H==="landscape"?"west":"north",Y=I,K=u(L,M,W,E,N),{x:U,y:X}=K,se=d(W,Y,E,N),{x:ie,y:fe}=se;fe<0&&(N+=Math.abs(fe)),U>0&&(E+=U),ie<0&&(E+=Math.abs(ie));const Ee=new Map([["default",E+U],["portrait",E+U],["landscape",E+U]]),xe=new Map([["default",N+X],["portrait",N+X],["landscape",N+X]]),G=new Map([["default",0+ie],["portrait",0+ie],["landscape",0+ie]]),ne=new Map([["default",0+fe],["portrait",0+fe],["landscape",0+fe]]),z=P.right>o.right,J=P.bottom>o.bottom,we=z?E+P.right:J?E/2:Ee.get(H),ke=J?N+P.bottom:z?N/2:xe.get(H),Me=G.get(H),qe=ne.get(H);return[{x:we,y:ke},{x:Me,y:qe},{x:ie,y:fe}]}function y(E,N,V,P,j,M,I){const H=I==="north"||I==="east"?"portrait":"landscape",L=j,W=H==="landscape"?"east":"south",Y=I,K=u(L,M,W,E,N),{x:U,y:X}=K,se=d(W,Y,E,N),{x:ie,y:fe}=se,Ee=new Map([["default",0+U],["portrait",0+U],["landscape",0+U]]),xe=new Map([["default",0+X],["portrait",0+X],["landscape",0+X]]);U<0&&(E+=Math.abs(U)),X<0&&(N+=Math.abs(X)),ie>0&&(E+=ie),fe>0&&(N+=fe);const G=new Map([["default",E+ie],["portrait",E+ie],["landscape",E+ie]]),ne=new Map([["default",N+fe],["portrait",N+fe],["landscape",N+fe]]),z=P.left>o.left,J=P.top>o.top,we=z?0:J?E/2:Ee.get(H),ke=J?0:z?N/2:xe.get(H),Me=G.get(H),qe=ne.get(H);return[{x:we,y:ke},{x:Me,y:qe},{x:ie,y:fe}]}function f(E,N,V,P,j,M,I){const H=I==="north"||I==="west"?"portrait":"landscape",L=j,W=H==="landscape"?"west":"south",Y=I,K=u(L,M,W,E,N),{x:U,y:X}=K,se=d(W,Y,E,N),{x:ie,y:fe}=se;ie<0&&(E+=Math.abs(ie));const Ee=new Map([["default",E+U],["portrait",E+U],["landscape",E+U]]),xe=new Map([["default",0+X],["portrait",0+X],["landscape",0+X]]);X<0&&(N+=Math.abs(X)),fe>0&&(N+=fe);const G=new Map([["default",0+ie],["portrait",0+ie],["landscape",0+ie]]),ne=new Map([["default",N+fe],["portrait",N+fe],["landscape",N+fe]]),z=P.right>o.right,J=P.top>o.top,we=z?E+P.right:J?E/2:Ee.get(H),ke=J?0:z?N/2:xe.get(H),Me=G.get(H),qe=ne.get(H);return[{x:we,y:ke},{x:Me,y:qe},{x:ie,y:fe}]}const k=new Map([["north_east",p],["north_west",m],["south_east",y],["south_west",f]]),b=new Map([["east",["north_west","south_west"]],["west",["north_east","south_east"]],["north",["south_west","south_east"]],["south",["north_west","north_east"]],["center",[]]]);function v(E,N){return E==="north_west"?{aroundDirection:"north_west",left:N.left,right:100,top:N.top,bottom:N.top}:E==="south_west"?{aroundDirection:"south_west",left:N.left,right:100,top:N.top,bottom:N.bottom}:N}function T(E,N){return E==="north_east"?{left:100,right:N.right,top:N.top,bottom:N.top}:E==="south_east"?{left:100,right:N.right,top:N.top,bottom:N.bottom}:N}function g(E,N){return E==="south_west"?{left:N.left,right:N.right,top:100,bottom:N.top}:E==="south_east"?{left:N.left,right:N.right,top:100,bottom:N.bottom}:N}function x(E,N){return E==="north_west"?{left:N.left,right:N.right,top:N.top,bottom:100}:E==="north_east"?{left:N.left,right:N.right,top:N.top,bottom:100}:N}function _(E,N){return N}const w=new Map([["east",v],["west",T],["north",g],["south",x],["center",_]]);function h(E,N,V,P){const j=N.x-E.x,M=N.y-E.y,I=j>=0?"east":"west",H=M>=0?"south":"north",L=`${H}_${I}`,Y=(b.get(V)||[]).includes(L),K=w.get(V),U=Y?K(L,o):o,X=Math.abs(j),se=Math.abs(M),ie=k.get(`${H}_${I}`),[fe,Ee,xe]=ie(X,se,Y,U,V,L,P),G=I==="west"?xe.x<0?Math.abs(xe.x):0:xe.x>0?xe.x:0,ne=U.left+U.right+X+G,z=H==="north"?xe.y<0?Math.abs(xe.y):0:xe.y>0?xe.y:0,J=U.top+U.bottom+se+z,we=I==="east"?E.x-U.left:E.x+U.right-ne,ke=H==="south"?E.y-U.top:E.y+U.bottom-J,Me=I==="east"?U.left:ne-U.right,qe=H==="north"?J-U.bottom:U.top,ut=I==="west"?xe.x<0?Math.abs(xe.x):0:xe.x<0?ne:ne-xe.x,st=H==="north"?xe.y<0?Math.abs(xe.y):0:xe.y<0?J:J-xe.y;return{width:ne,height:J,left:we,top:ke,startPoinInBoundray:{x:Me,y:qe},firstControlPoint:fe,secondControlPoint:Ee,endPoinInBoundray:{x:ut,y:st}}}function S(E,N,V,P,j){E.style.position="absolute",E.style.alignItems="center",E.style.left=`${N}px`,E.style.top=`${V}px`,E.style.width=P+"px",E.style.height=j+"px"}function O(E,N,V,P,j,M,I){const H=E.childNodes[0];H.setAttribute("width",String(N)),H.setAttribute("height",String(V)),E.appendChild(H);const L=H.childNodes[0],W=`${P.x} ${P.y}`,Y=`${j.x} ${j.y}`,K=`${M.x} ${M.y}`,U=`${I.x} ${I.y}`,X="M ".concat(W).concat(" C ").concat(Y).concat(","+K+",").concat(U);L.setAttribute("d",X),L.setAttribute("fill","none"),L.setAttribute("stroke","#4d53e8"),L.setAttribute("stroke-width","2"),L.setAttribute("class","")}function F(E,N,V,P,j){const{width:M,height:I,left:H,top:L,startPoinInBoundray:W,firstControlPoint:Y,secondControlPoint:K,endPoinInBoundray:U}=h(N,V,P,j);S(E,H,L,M,I),O(E,M,I,W,Y,K,U)}function C(E,N,V,P,j){const M=c(E);F(M,N,V,P,j)}function R(E){return Number(E.replace("px",""))}function $(E){if(E!==null){const N=E.parentNode,V=R(N.style.left),P=R(N.style.top);return{x:V+E.offsetLeft+E.offsetWidth/2,y:P+E.offsetTop+E.offsetHeight/2}}return{x:0,y:0}}function D(E,N){const V=document.getElementById(E),P=document.getElementById(N),j=$(V),M=$(P),I=j.x+2,H=j.y,L=M.x-2,W=M.y;return{startPoint:{x:I,y:H},endPoint:{x:L,y:W}}}function B(E,N,V,P){const{startPoint:j,endPoint:M}=D(E,N);C(`${E}_${N}`,j,M,V,P)}return{connect:B,drawing:C}}function Kr(n){const t=i.ref(),e=i.ref(0),o=i.ref(0),r=i.ref({x:0,y:0}),a=i.ref(),{drawing:s}=n;function l(v){return Number(v.replace("px",""))}function c(v){return(v&&v.className&&v.className.split?v.className.split(" "):[]).includes("f-flow-ancher")}function u(v){switch((v?v.className.split(" "):[]).find(x=>x.startsWith("circle-"))||""){case"circle-left":return"west";case"circle-right":return"east";case"circle-top":return"north";case"circle-bottom":return"south";default:return"center"}}function d(v,T,g){const x=g.getBoundingClientRect();e.value=x.left,o.value=x.top,r.value={x:v,y:T},t.value=u(g)}function p(v){var S;const T=v.clientX-e.value,g=v.clientY-o.value,x=r.value.x+T,_=r.value.y+g,w=v.target,h=w&&typeof w.className=="string"&&c(w)?u(w):"center";s(`${(S=a.value)==null?void 0:S.id}_curve_to`,{x:r.value.x,y:r.value.y},{x,y:_},t.value,h)}function m(v){const T=document.getElementById(v);T&&T.remove()}function y(){document.addEventListener("mousemove",p)}function f(){document.removeEventListener("mousemove",p)}function k(v){a.value=void 0,f()}function b(v,T){a.value=document.getElementById(v);const g=a.value.offsetParent,x=a.value.getBoundingClientRect(),_=g.getBoundingClientRect(),w=l(g.style.left)+(x.left-_.left),h=l(g.style.top)+(x.top-_.top),S=w+x.width/2,O=h+x.height/2;d(S,O,a.value),y()}return{drawFrom:b,eraseDrawingLine:m,finishToDraw:k,getAncherPointPosition:u,isAncherPoint:c}}const Jr={id:{type:String,default:""},type:{type:String,default:""},modelValue:{type:Object},x:{type:Number,default:0},y:{type:Number,default:0},connection:{type:Array,default:[]}},It=i.ref(0);function Zr(n,t){const e=t.getBoundingClientRect(),o=n.getBoundingClientRect(),r=o.top>=e.top,a=o.top<=e.bottom;return r&&a}function ei(n){const t=n.querySelector(".component-btn-group");if(!t)return;t.style.display="";const e=t.getBoundingClientRect();if(!(e.top===0&&e.left===0)){const o=t.querySelector("div");if(o){const r=o.getBoundingClientRect();o.style.top=e.top+"px";let a=e.left-r.width;const s=document.querySelector(".editorDiv");if(s){const l=s.getBoundingClientRect();a<l.left&&({left:a}=n.getBoundingClientRect())}o.style.left=a+"px"}}}function ti(n){if(!window.scrollContainerList)return;const t=Array.from(window.scrollContainerList);if(t.length&&t.length===1){const e=t[0],o=document.querySelector(`[id=${e}]`);if(o&&o.contains(n))return o}}function So(n){if(!n)return;const t=n.getBoundingClientRect();if(t.width===0&&t.height===0)return;const e=n.querySelector(".component-btn-group");if(e){let o=!0;const r=ti(n);if(r&&(o=Zr(n,r)),!o){e.style.display="none";return}ei(n)}}function Xt(n){if(!n)return;let t;n.className.includes("dgComponentSelected")?t=n:t=n.querySelector(".dgComponentSelected"),t&&So(t)}const ni={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Qt(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var To={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(){return function(){function e(o,r,a){function s(u,d){if(!r[u]){if(!o[u]){var p=typeof Qt=="function"&&Qt;if(!d&&p)return p(u,!0);if(l)return l(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var y=r[u]={exports:{}};o[u][0].call(y.exports,function(f){var k=o[u][1][f];return s(k||f)},y,y.exports,e,o,r,a)}return r[u].exports}for(var l=typeof Qt=="function"&&Qt,c=0;c<a.length;c++)s(a[c]);return s}return e}()({1:[function(e,o,r){var a={},s="(?:^|\\s)",l="(?:\\s|$)";function c(p){var m=a[p];return m?m.lastIndex=0:a[p]=m=new RegExp(s+p+l,"g"),m}function u(p,m){var y=p.className;y.length?c(m).test(y)||(p.className+=" "+m):p.className=m}function d(p,m){p.className=p.className.replace(c(m)," ").trim()}o.exports={add:u,rm:d}},{}],2:[function(e,o,r){(function(a){var s=e("contra/emitter"),l=e("crossvent"),c=e("./classes"),u=document,d=u.documentElement;function p(C,R){var $=arguments.length;$===1&&Array.isArray(C)===!1&&(R=C,C=[]);var D,B,E,N,V,P,j,M,I,H=null,L,W,Y=!1,K=0,U,X=R||{};X.moves===void 0&&(X.moves=T),X.accepts===void 0&&(X.accepts=T),X.invalid===void 0&&(X.invalid=ut),X.containers===void 0&&(X.containers=C||[]),X.isContainer===void 0&&(X.isContainer=v),X.copy===void 0&&(X.copy=!1),X.copySortSource===void 0&&(X.copySortSource=!1),X.revertOnSpill===void 0&&(X.revertOnSpill=!1),X.removeOnSpill===void 0&&(X.removeOnSpill=!1),X.direction===void 0&&(X.direction="vertical"),X.ignoreInputTextSelection===void 0&&(X.ignoreInputTextSelection=!0),X.mirrorContainer===void 0&&(X.mirrorContainer=u.body);var se=s({containers:X.containers,start:Me,end:st,cancel:Le,remove:Xe,destroy:G,canMove:ke,dragging:!1});return X.removeOnSpill===!0&&se.on("over",St).on("out",vt),fe(),se;function ie(A){return se.containers.indexOf(A)!==-1||X.isContainer(A)}function fe(A){var te=A?"remove":"add";f(d,te,"mousedown",z),f(d,te,"mouseup",Oe)}function Ee(A){var te=A?"remove":"add";f(d,te,"mousemove",J)}function xe(A){var te=A?"remove":"add";l[te](d,"selectstart",ne),l[te](d,"click",ne)}function G(){fe(!0),Oe({})}function ne(A){L&&A.preventDefault()}function z(A){N=A.clientX,V=A.clientY;var te=k(A)!==1||A.metaKey||A.ctrlKey;if(!te){var re=A.target,oe=we(re);oe&&(L=oe,Ee(),A.type==="mousedown"&&(w(re)?re.focus():A.preventDefault()))}}function J(A){if(L){if(k(A)===0){Oe({});return}if(!(A.clientX!==void 0&&Math.abs(A.clientX-N)<=(X.slideFactorX||0)&&A.clientY!==void 0&&Math.abs(A.clientY-V)<=(X.slideFactorY||0))){if(X.ignoreInputTextSelection){var te=F("clientX",A)||0,re=F("clientY",A)||0,oe=u.elementFromPoint(te,re);if(w(oe))return}var Se=L;Ee(!0),xe(),st(),qe(Se),c.add(M||E,"gu-transit"),Tt(),Mt(),K=0,gt(A)}}}function we(A){if(!(se.dragging&&D)&&!ie(A)){for(var te=A;_(A)&&ie(_(A))===!1;)if(X.invalid(A,te)||(A=_(A),!A))return;var re=_(A);if(re&&!X.invalid(A,te)){var oe=X.moves(A,re,te,S(A));if(oe)return{item:A,source:re}}}}function ke(A){return!!we(A)}function Me(A){var te=we(A);te&&qe(te)}function qe(A){je(A.item,A.source)&&(M=A.item.cloneNode(!0),se.emit("cloned",M,A.item,"copy")),B=A.source,E=A.item,P=j=S(A.item),se.dragging=!0,se.emit("drag",E,B)}function ut(){return!1}function st(){if(se.dragging){var A=M||E;Be(A,_(A))}}function ee(){L=!1,Ee(!0),xe(!0)}function Oe(A){if(ee(),!!se.dragging){var te=M||E,re=F("clientX",A)||0,oe=F("clientY",A)||0,Se=b(D,re,oe),_e=_t(Se,re,oe);_e&&(M&&X.copySortSource||!M||_e!==B)?Be(te,_e):X.removeOnSpill?Xe():Le()}}function Be(A,te){var re=_(A);M&&X.copySortSource&&te===B&&re.removeChild(E),yt(te)?se.emit("cancel",A,B):se.emit("drop",A,te,B,j),dt()}function Xe(){if(se.dragging){var A=M||E,te=_(A);te&&te.removeChild(A),se.emit(M?"cancel":"remove",A,te,B),dt()}}function Le(A){if(se.dragging){var te=arguments.length>0?A:X.revertOnSpill,re=M||E,oe=_(re),Se=yt(oe);Se===!1&&te&&(M?oe&&oe.removeChild(M):B.insertBefore(re,P)),Se||te?se.emit("cancel",re,B,B):se.emit("drop",re,oe,B,j),dt()}}function dt(){var A=M||E;ee(),ae(),me(),A&&c.rm(A,"gu-transit"),I&&clearTimeout(I),se.dragging=!1,H&&se.emit("out",A,H,B),se.emit("dragend",A,K),B=E=M=P=j=I=H=null}function yt(A,te){var re;return te!==void 0?re=te:D?re=j:re=S(M||E),A===B&&re===P}function _t(A,te,re){for(var oe=A;oe&&!Se();)oe=_(oe);return oe;function Se(){var _e=ie(oe);if(_e===!1)return!1;var We=Ce(oe,A),Ve=Te(oe,We,te,re),Ae=yt(oe,Ve);return Ae?!0:X.accepts(E,oe,B,Ve)}}function gt(A){if(!D)return;A.preventDefault();var te=F("clientX",A)||0,re=F("clientY",A)||0;D.style.left=te-2+"px",D.style.top=re-2+"px";var oe=M||E,Se=b(D,te,re),_e=_t(Se,te,re),We=_e!==null&&_e!==H;(We||_e===null)&&(be(),H=_e,ft()),he(Se,re);var Ve=_(oe);if(_e===B&&M&&!X.copySortSource){Ve&&Ve.removeChild(oe);return}var Ae,lt=Ce(_e,Se);if(Y=$e(lt,_e),lt!==null)Ae=Te(_e,lt,te,re);else if(X.revertOnSpill===!0&&!M)Ae=P,_e=B;else{M&&Ve&&Ve.removeChild(oe),M&&W&&(W.style.display="none");return}W.style.display="block",Ot(Ae,oe,We),Ae?ot(lt,Ae):Q(_e);function Ze(Ne){se.emit(Ne,oe,H,B)}function ft(){We&&Ze("over")}function be(){H&&Ze("out")}}function Ot(A,te,re){(A===te||A===S(te))&&(j=S(te)),(A===null&&re||A!==te&&A!==S(te))&&(j=A)}function St(A){c.rm(A,"gu-hide")}function vt(A){se.dragging&&c.add(A,"gu-hide")}function Mt(){D||(D=document.createElement("div"),D.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",D.innerHTML=X.getMirrorText&&X.getMirrorText(E)||"控件",c.add(D,"gu-mirror"),X.mirrorContainer.appendChild(D),f(d,"add","mousemove",gt),c.add(X.mirrorContainer,"gu-unselectable"),se.emit("cloned",D,E,"mirror"))}function Tt(){if(W=document.createElement("div"),c.add(W,"gu-insertion"),E){var A=E.getBoundingClientRect();W.style.left=A.left+"px",W.style.top=A.top+"px"}Y=!1,X.mirrorContainer.appendChild(W)}function ae(){D&&(c.rm(X.mirrorContainer,"gu-unselectable"),f(d,"remove","mousemove",gt),_(D).removeChild(D),D=null)}function me(){W&&(_(W).removeChild(W),W=null)}function Ce(A,te){for(var re=te;re!==A&&_(re)!==A;)re=_(re);return re===d?null:re}function $e(A,te){if(!te)return Y;var re=A||te&&te.lastElementChild;if(!re)return!0;var oe=getComputedStyle(A),Se=/^inline/.test(oe.getPropertyValue("display"))||/^(left|right)$/.test(oe.getPropertyValue("float"));if(Se)return!0;if(te){var _e=getComputedStyle(te),We=_e.getPropertyValue("display");if(/flex$/.test(We)){var Ve=_e.getPropertyValue("flex-direction")||"row";if(Ve==="row"||Ve==="row-reverse")return!Qe(te)}return!1}return!0}function Qe(A){if(!A.children||!A.children.length)return!1;for(const te of Array.from(A.children)){const oe=(te.className&&te.className.split(" ")||[]).filter(Se=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Se));if(!oe.length)return!1;for(const Se of oe){const _e=Se.slice(Se.lastIndexOf("-")+1);if(parseInt(_e,10)!==12)return!1}}return!0}function ot(A,te){const re=te.getBoundingClientRect();if(W.style.left=re.left+"px",W.style.top=re.top+"px",Y){if(W.style.height=re.height+"px",W.style.width="4px",A){const oe=A.getBoundingClientRect();oe.top!==re.top&&(W.style.left=oe.right+"px",W.style.top=oe.top+"px",W.style.height=oe.height+"px")}}else if(W.style.height="4px",W.style.width=re.width+"px",U){const oe=U.getBoundingClientRect();re.top<oe.top&&(W.style.display="none")}te===E&&E&&(W.style.display="none")}function Q(A){j=null;var te=A.lastElementChild;if(te){var re=te.getBoundingClientRect();Y?(W.style.left=re.right+"px",W.style.top=re.top+"px",W.style.height=re.height+"px",W.style.width="4px"):(W.style.left=re.left+"px",W.style.top=re.bottom+"px",W.style.height="4px",W.style.width=re.width+"px"),te===E&&E&&(W.style.display="none")}else W.style.display="none"}function he(A,te){if(!X.mirrorContainer.contains(A)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(U=m(A),!U||!U.contains(A)))return;const re=document.querySelector(".dgComponentSelected"),oe=U.getBoundingClientRect();if(te-30<oe.top&&U.scrollTop>0){let Se=U.scrollTop<10?U.scrollTop:10;U.scrollBy(0,-1*Se),re&&U.contains(re)&&(K=K+-1*Se)}if(te+30>oe.bottom&&U.scrollTop<U.scrollHeight-U.clientHeight){const Se=U.scrollHeight-U.clientHeight-U.scrollTop;let _e=Se<10?Se:10;U.scrollBy(0,_e),re&&U.contains(re)&&(K=K+_e)}}function Te(A,te,re,oe){var Se=X.direction==="horizontal",_e=X.direction==="mixed",We=te!==A?Ae():Ve();return We;function Ve(){var Ze=A.children.length,ft,be,Ne;for(ft=0;ft<Ze;ft++)if(be=A.children[ft],Ne=be.getBoundingClientRect(),Se&&Ne.left+Ne.width/2>re||!_e&&!Se&&Ne.top+Ne.height/2>oe||_e&&Ne.left+Ne.width>re&&Ne.top+Ne.height>oe)return be;return null}function Ae(){var Ze=te.getBoundingClientRect();if(_e){var ft=oe-Ze.top,be=re-Ze.left,Ne=Ze.bottom-oe,rt=Ze.right-re,tt=Math.min(be,rt,ft,Ne),it;return Y?it=rt<be:it=Ne===tt||rt===tt||be===tt,lt(it)}return lt(Se?re>Ze.left+g(Ze)/2:oe>Ze.top+x(Ze)/2)}function lt(Ze){return Ze?S(te):te}}function je(A,te){return typeof X.copy=="boolean"?X.copy:X.copy(A,te)}}function m(C){const R=Array.from(window.scrollContainerList);if(R.length===1){const D=Array.from(window.scrollContainerList)[0];return document.getElementById(D)}const $=y(R);for(const D of $)if(D.contains(C))return D;return null}function y(C){const R=[];return C.forEach($=>{const D=document.getElementById($);D&&R.push(D)}),R.sort(($,D)=>$.contains(D)?1:D.contains($)?-1:0),R}function f(C,R,$,D){var B={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},E={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},N={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};a.navigator.pointerEnabled?l[R](C,E[$],D):a.navigator.msPointerEnabled?l[R](C,N[$],D):(l[R](C,B[$],D),l[R](C,$,D))}function k(C){if(C.touches!==void 0)return C.touches.length;if(C.which!==void 0&&C.which!==0)return C.which;if(C.buttons!==void 0)return C.buttons;var R=C.button;if(R!==void 0)return R&1?1:R&2?3:R&4?2:0}function b(C,R,$){C=C||{};var D=C.className||"",B;return C.className+=" gu-hide",B=u.elementFromPoint(R,$),C.className=D,B}function v(){return!1}function T(){return!0}function g(C){return C.width||C.right-C.left}function x(C){return C.height||C.bottom-C.top}function _(C){return C.parentNode===u?null:C.parentNode}function w(C){return C.tagName==="INPUT"||C.tagName==="TEXTAREA"||C.tagName==="SELECT"||h(C)}function h(C){return!C||C.contentEditable==="false"?!1:C.contentEditable==="true"?!0:h(_(C))}function S(C){return C.nextElementSibling||R();function R(){var $=C;do $=$.nextSibling;while($&&$.nodeType!==1);return $}}function O(C){return C.targetTouches&&C.targetTouches.length?C.targetTouches[0]:C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:C}function F(C,R){var $=O(R),D={pageX:"clientX",pageY:"clientY"};return C in D&&!(C in $)&&D[C]in $&&(C=D[C]),$[C]}o.exports=p}).call(this,typeof bt<"u"?bt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(e,o,r){o.exports=function(s,l){return Array.prototype.slice.call(s,l)}},{}],4:[function(e,o,r){var a=e("ticky");o.exports=function(l,c,u){l&&a(function(){l.apply(u||null,c||[])})}},{ticky:10}],5:[function(e,o,r){var a=e("atoa"),s=e("./debounce");o.exports=function(c,u){var d=u||{},p={};return c===void 0&&(c={}),c.on=function(m,y){return p[m]?p[m].push(y):p[m]=[y],c},c.once=function(m,y){return y._once=!0,c.on(m,y),c},c.off=function(m,y){var f=arguments.length;if(f===1)delete p[m];else if(f===0)p={};else{var k=p[m];if(!k)return c;k.splice(k.indexOf(y),1)}return c},c.emit=function(){var m=a(arguments);return c.emitterSnapshot(m.shift()).apply(this,m)},c.emitterSnapshot=function(m){var y=(p[m]||[]).slice(0);return function(){var f=a(arguments),k=this||c;if(m==="error"&&d.throws!==!1&&!y.length)throw f.length===1?f[0]:f;return y.forEach(function(v){d.async?s(v,f,k):v.apply(k,f),v._once&&c.off(m,v)}),c}},c}},{"./debounce":4,atoa:3}],6:[function(e,o,r){(function(a){var s=e("custom-event"),l=e("./eventmap"),c=a.document,u=m,d=f,p=[];a.addEventListener||(u=y,d=k),o.exports={add:u,remove:d,fabricate:b};function m(_,w,h,S){return _.addEventListener(w,h,S)}function y(_,w,h){return _.attachEvent("on"+w,T(_,w,h))}function f(_,w,h,S){return _.removeEventListener(w,h,S)}function k(_,w,h){var S=g(_,w,h);if(S)return _.detachEvent("on"+w,S)}function b(_,w,h){var S=l.indexOf(w)===-1?F():O();_.dispatchEvent?_.dispatchEvent(S):_.fireEvent("on"+w,S);function O(){var C;return c.createEvent?(C=c.createEvent("Event"),C.initEvent(w,!0,!0)):c.createEventObject&&(C=c.createEventObject()),C}function F(){return new s(w,{detail:h})}}function v(_,w,h){return function(O){var F=O||a.event;F.target=F.target||F.srcElement,F.preventDefault=F.preventDefault||function(){F.returnValue=!1},F.stopPropagation=F.stopPropagation||function(){F.cancelBubble=!0},F.which=F.which||F.keyCode,h.call(_,F)}}function T(_,w,h){var S=g(_,w,h)||v(_,w,h);return p.push({wrapper:S,element:_,type:w,fn:h}),S}function g(_,w,h){var S=x(_,w,h);if(S){var O=p[S].wrapper;return p.splice(S,1),O}}function x(_,w,h){var S,O;for(S=0;S<p.length;S++)if(O=p[S],O.element===_&&O.type===w&&O.fn===h)return S}}).call(this,typeof bt<"u"?bt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(e,o,r){(function(a){var s=[],l="",c=/^on/;for(l in a)c.test(l)&&s.push(l.slice(2));o.exports=s}).call(this,typeof bt<"u"?bt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(e,o,r){(function(a){var s=a.CustomEvent;function l(){try{var c=new s("cat",{detail:{foo:"bar"}});return c.type==="cat"&&c.detail.foo==="bar"}catch{}return!1}o.exports=l()?s:typeof document<"u"&&typeof document.createEvent=="function"?function(u,d){var p=document.createEvent("CustomEvent");return d?p.initCustomEvent(u,d.bubbles,d.cancelable,d.detail):p.initCustomEvent(u,!1,!1,void 0),p}:function(u,d){var p=document.createEventObject();return p.type=u,d?(p.bubbles=!!d.bubbles,p.cancelable=!!d.cancelable,p.detail=d.detail):(p.bubbles=!1,p.cancelable=!1,p.detail=void 0),p}}).call(this,typeof bt<"u"?bt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(e,o,r){var a=o.exports={},s,l;function c(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=c}catch{s=c}try{typeof clearTimeout=="function"?l=clearTimeout:l=u}catch{l=u}})();function d(x){if(s===setTimeout)return setTimeout(x,0);if((s===c||!s)&&setTimeout)return s=setTimeout,setTimeout(x,0);try{return s(x,0)}catch{try{return s.call(null,x,0)}catch{return s.call(this,x,0)}}}function p(x){if(l===clearTimeout)return clearTimeout(x);if((l===u||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(x);try{return l(x)}catch{try{return l.call(null,x)}catch{return l.call(this,x)}}}var m=[],y=!1,f,k=-1;function b(){!y||!f||(y=!1,f.length?m=f.concat(m):k=-1,m.length&&v())}function v(){if(!y){var x=d(b);y=!0;for(var _=m.length;_;){for(f=m,m=[];++k<_;)f&&f[k].run();k=-1,_=m.length}f=null,y=!1,p(x)}}a.nextTick=function(x){var _=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)_[w-1]=arguments[w];m.push(new T(x,_)),m.length===1&&!y&&d(v)};function T(x,_){this.fun=x,this.array=_}T.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function g(){}a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(x){return[]},a.binding=function(x){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(x){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],10:[function(e,o,r){(function(a){var s=typeof a=="function",l;s?l=function(c){a(c)}:l=function(c){setTimeout(c,0)},o.exports=l}).call(this,e("timers").setImmediate)},{timers:11}],11:[function(e,o,r){(function(a,s){var l=e("process/browser.js").nextTick,c=Function.prototype.apply,u=Array.prototype.slice,d={},p=0;r.setTimeout=function(){return new m(c.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new m(c.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(y){y.close()};function m(y,f){this._id=y,this._clearFn=f}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(y,f){clearTimeout(y._idleTimeoutId),y._idleTimeout=f},r.unenroll=function(y){clearTimeout(y._idleTimeoutId),y._idleTimeout=-1},r._unrefActive=r.active=function(y){clearTimeout(y._idleTimeoutId);var f=y._idleTimeout;f>=0&&(y._idleTimeoutId=setTimeout(function(){y._onTimeout&&y._onTimeout()},f))},r.setImmediate=typeof a=="function"?a:function(y){var f=p++,k=arguments.length<2?!1:u.call(arguments,1);return d[f]=!0,l(function(){d[f]&&(k?y.apply(null,k):y.call(null),r.clearImmediate(f))}),f},r.clearImmediate=typeof s=="function"?s:function(y){delete d[y]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(To);var ri=To.exports;const No=oi(ri),ii={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object},safeHtml:{type:Boolean,default:!0}},ai={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},an=i.defineComponent({name:"Toast",props:ai,emits:["close","click"],setup:(n,t)=>{const e=i.ref(n.animate),o="fadeOut",r=i.computed(()=>n.options),a=i.ref(!1),s=i.computed(()=>{const v={animated:a.value,toast:!0};return v[n.animate]=!1,v[o]=a.value,v[r.value.type]=!0,r.value.theme&&(v[r.value.theme]=!0),v}),l=i.computed(()=>{const g=`f-icon-${r.value&&r.value.type?r.value.type.replace("toasty-type-",""):"default"}`,x={"f-icon":!0};return x[g]=!0,x}),c=i.computed(()=>r.value.title||r.value.message),u=i.computed(()=>r.value.title&&r.value.message),d=i.computed(()=>!r.value.title&&r.value.message),p=i.computed(()=>n.showCloseButton),m=i.computed(()=>!!r.value.buttons||!!t.slots.default);function y(v){v.stopPropagation(),v.preventDefault(),a.value=!1,setTimeout(()=>{t.emit("close",r.value)},200)}function f(v,T){}function k(v){return`f-preten-link ${v.customClass?v.customClass:""}`}i.watch(e,()=>{e.value});const b=()=>{var v;return i.createVNode(i.Fragment,null,[i.createVNode("div",{class:"after-toast-msg text-right"},[!t.slots.default&&((v=r.value.buttons)==null?void 0:v.map(T=>i.createVNode("span",{class:k(T),onClick:g=>void 0},[T.text]))),t.slots.default&&t.slots.default()])])};return()=>i.createVNode("div",{class:s.value,style:"min-height:44px"},[p.value&&i.createVNode("button",{title:"关闭",class:"toast-close f-btn-icon f-bare",onClick:y},[i.createVNode("span",{class:"f-icon modal_close"},null)]),c.value&&i.createVNode("section",{class:"modal-tips"},[i.createVNode("div",{class:"float-left modal-tips-iconwrap"},[i.createVNode("span",{class:l.value},null)]),i.createVNode("div",{class:"modal-tips-content"},[u.value&&i.createVNode(i.Fragment,null,[i.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:r.value.title},null),i.createVNode("p",{class:"toast-msg",innerHTML:r.value.message},null),m.value&&b()]),d.value&&(r.value.buttons?i.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[i.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null),i.createVNode("div",{class:"after-toast-title text-right ml-auto"},[b()])]):i.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null))])])])}}),Kt=i.defineComponent({name:"Notify",props:ii,emits:["close","empty"],setup(n,t){const e=i.computed(()=>({"farris-notify":!0})),o={left:12,right:12,top:20,bottom:12},r=i.ref(),a=i.ref(n.options),s=i.ref(n.showCloseButton),l=i.computed(()=>n.position||"bottom-right"),c=i.computed(()=>n.timeout!=null?n.timeout:3e3),u=i.computed(()=>{const m=n.bottom?n.bottom:o.bottom,y=n.top?n.top:o.top,f={transition:"all 0.2s ease",left:l.value.indexOf("left")>-1?`${n.left?n.left:o.left}px`:"",right:l.value.indexOf("right")>-1?`${n.right?n.right:o.right}px`:"",top:l.value.indexOf("top")>-1?`${y}px`:"",bottom:l.value.indexOf("bottom")>-1?`${m}px`:""};return l.value.indexOf("center")>-1&&(f.left="50%",f.marginLeft="calc(-24rem / 2)",l.value==="center-center"&&(f.top="50%",f.transform="translate(-50%, -50%)")),f});function d(m){t.emit("close")}c.value&&setTimeout(()=>{d()},c.value),t.expose({closeToast:d,container:r,notifyPosition:l});function p(m,y){d()}return()=>i.createVNode("div",{class:e.value,style:u.value,ref:r},[i.createVNode(an,{options:a.value,showCloseButton:s.value,animate:n.animate,onClose:m=>p(m,a.value)},null)])}});class Wt{constructor(){q(this,"notifyRefs",[]);q(this,"globalConfig",i.reactive({}))}escapeAllHtml(t){if(typeof t!="string"||!t)return"";const e=document.createElement("div");return e.textContent=t||"",e.innerHTML.replace(/ /g," ").replace(/\\n/g,"<br>").replace(/\\t/g," ").replace(/\\r/g,"")}createNotifyInstance(t){const e=this,r=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...t}),a=document.createElement("div");a.style.display="contents";const s=i.createApp({setup(){var u;const l=i.ref();function c(){l.value.container.style.transform="scale(0)",setTimeout(()=>{e.updateNotifyPositionForClose(r,l),s.unmount()},220)}if(r.position.indexOf("top")>-1){const d=e.getNotifyInstances(r.position),p=d[d.length-1];if(p){const m=p.value.container.getBoundingClientRect();r.top=m.bottom}}return r.safeHtml&&((u=r.options)!=null&&u.message)&&(r.options.message=e.escapeAllHtml(r.options.message)),i.onUnmounted(()=>{document.body.removeChild(a)}),i.onMounted(()=>{e.updateNotifyPositionForCreate(r,l)}),()=>i.createVNode(i.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[i.createVNode(Kt,i.mergeProps({ref:l},r,{onClose:c}),null)]})}});return s.provide("NotifyService",this),document.body.appendChild(a),s.mount(a),s}getNotifyInstances(t){return this.notifyRefs.filter(e=>e.value.notifyPosition===t)}updateNotifyPositionForCreate(t,e){if(this.notifyRefs&&this.notifyRefs.length){const o=window.innerHeight;t.position.indexOf("bottom")>-1&&this.getNotifyInstances(t.position).forEach(r=>{const a=r.value.container.getBoundingClientRect();r.value.container.style.bottom=a.height+o-a.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,e]}updateNotifyPositionForClose(t,e){const o=this.notifyRefs.indexOf(e);if(t.position.indexOf("top")>-1){const r=this.getNotifyInstances(t.position),a=r.indexOf(e);r.slice(a+1).forEach(s=>{s.value.container.style.top=s.value.container.offsetTop-s.value.container.offsetHeight+"px"})}o>-1&&this.notifyRefs.splice(o,1)}show(t){return this.createNotifyInstance(t)}buildNotifyProps(t,e){let o="",r="",a,s,l;typeof e=="string"?o=e:e&&(o=e.message||"",r=e.title||"",s=e.position||null,l=e.showCloseButton!=null?e.showCloseButton:null,a=e.timeout!=null?e.timeout:null);const u={options:{type:t,message:o,title:r}};return s!=null&&(u.position=s),l!=null&&(u.showCloseButton=l),a!=null&&(u.timeout=a),u}info(t){const e=this.buildNotifyProps("info",t);return this.show(e)}success(t){const e=this.buildNotifyProps("success",t);return this.show(e)}warning(t){const e=this.buildNotifyProps("warning",t);return this.show(e)}error(t){const e=this.buildNotifyProps("error",t);return this.show(e)}close(t){t&&t.unmount()}closeAll(){this.notifyRefs.forEach(t=>{t==null||t.value.closeToast()}),this.notifyRefs.length=0}}const si=Symbol("NOTIFY_SERVICE_TOKEN");Kt.install=n=>{n.component(Kt.name,Kt),n.component(an.name,an);const t=new Wt;n.provide(si,t),n.provide("FNotifyService",t)};const li={designerHostService:{type:Object,default:{}},componentType:{type:String,default:""},bindingEntityId:{type:String,default:""},steps:{type:Array,default:["selectEntity","selectFields"]}},ko={},Oo={};function sn(n){const{properties:t,title:e,ignore:o}=n,r=o&&Array.isArray(o),a=Object.keys(t).reduce((s,l)=>((!r||!o.find(c=>c===l))&&(s[l]=t[l].type==="object"&&t[l].properties?sn(t[l]):Fe.cloneDeep(t[l].default)),s),{});if(e&&(!r||!o.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");a.id=`${s}_${Math.random().toString().slice(2,6)}`}return a}function ci(n){const{properties:t,title:e,required:o}=n;if(o&&Array.isArray(o)){const r=o.reduce((a,s)=>(a[s]=t[s].type==="object"&&t[s].properties?sn(t[s]):Fe.cloneDeep(t[s].default),a),{});if(e&&o.find(a=>a==="id")){const a=e.toLowerCase().replace(/-/g,"_");r.id=`${a}_${Math.random().toString().slice(2,6)}`}return r}return{type:e}}function Mo(n,t={},e){const o=ko[n];if(o){let r=ci(o);const a=Oo[n];return r=a?a({getSchemaByType:Mo},r,t,e):r,r}return null}function ui(n,t){const e=sn(t);return Object.keys(e).reduce((o,r)=>(Object.prototype.hasOwnProperty.call(n,r)&&(o[r]&&Fe.isPlainObject(o[r])&&Fe.isPlainObject(n[r]||!n[r])?Object.assign(o[r],n[r]||{}):o[r]=n[r]),o),e),e}function Eo(n,t){return Object.keys(n).filter(o=>n[o]!=null).reduce((o,r)=>{if(t.has(r)){const a=t.get(r);if(typeof a=="string")o[a]=n[r];else{const s=a(r,n[r],n);Object.assign(o,s)}}else o[r]=n[r];return o},{})}function di(n,t,e=new Map){const o=ui(n,t);return Eo(o,e)}function fi(n={}){function t(u,d,p,m){if(typeof p=="number")return m[u].length===p;if(typeof p=="object"){const y=Object.keys(p)[0],f=p[y];if(y==="not")return Number(m[u].length)!==Number(f);if(y==="moreThan")return Number(m[u].length)>=Number(f);if(y==="lessThan")return Number(m[u].length)<=Number(f)}return!1}function e(u,d,p,m){return m[u]&&m[u].propertyValue&&String(m[u].propertyValue.value)===String(p)}const o=new Map([["length",t],["getProperty",e]]);Object.keys(n).reduce((u,d)=>(u.set(d,n[d]),u),o);function r(u,d){const p=u;return typeof d=="number"?[{target:p,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:p,operator:"getProperty",param:u,value:!!d}]:typeof d=="object"?Object.keys(d).map(m=>{if(m==="length")return{target:p,operator:"length",param:null,value:d[m]};const y=m,f=d[m];return{target:p,operator:"getProperty",param:y,value:f}}):[]}function a(u){return Object.keys(u).reduce((p,m)=>{const y=r(m,u[m]);return p.push(...y),p},[])}function s(u,d){if(o.has(u.operator)){const p=o.get(u.operator);return p&&p(u.target,u.param,u.value,d)||!1}return!1}function l(u,d){return a(u).reduce((y,f)=>y&&s(f,d),!0)}function c(u,d){const p=Object.keys(u),m=p.includes("allOf"),y=p.includes("anyOf"),f=m||y,v=(f?u[f?m?"allOf":"anyOf":"allOf"]:[u]).map(g=>l(g,d));return m?!v.includes(!1):v.includes(!0)}return{parseValueSchema:c}}const pe={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"html-template":{type:"html-template",name:"模板容器"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"},"external-container":{type:"external-container",name:"外部容器",icon:"content-container"},"list-nav":{type:"list-nav",name:"列表导航"},"filter-bar":{type:"filter-bar",name:"筛选条"}},pi={},mi={};fi();function Pt(n,t,e=new Map,o=(s,l,c,u)=>l,r={},a=s=>s){return ko[t.title]=t,Oo[t.title]=o,pi[t.title]=r,mi[t.title]=a,(s={},l=!0)=>{if(!l)return Eo(s,e);const c=di(s,t,e),u=Object.keys(n).reduce((d,p)=>(d[p]=n[p].d