var h=Object.defineProperty;var g=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var p=(t,a,s)=>a in t?h(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,_=(t,a)=>{for(var s in a||(a={}))f.call(a,s)&&p(t,s,a[s]);if(g)for(var s of g(a))T.call(a,s)&&p(t,s,a[s]);return t};var l=(t,a,s)=>p(t,typeof a!="symbol"?a+"":a,s);var S=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(c){n(c)}},E=r=>{try{i(s.throw(r))}catch(c){n(c)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,E);i((s=s.apply(t,a)).next())});import{aA as d}from"./vue-CEtC17Vu.js";import{m as A,c as O,f as b,e as I,u as V,g as m,h as P,v as R,D as y,i as B,X as N,l as M,t as D,K as L,p as K,n as k,r as x,o as w,$ as j,q as v,s as H,x as G,z as Y,B as U,C as W,E as F,F as X,H as $,G as z,J as C,L as J,M as Z,N as q,P as Q,Q as aa,S as sa,T as ea,_ as ta,U as ra,V as na,W as ia,Y as oa,Z as ca,a0 as la,a1 as _a,a2 as Ea,a3 as pa,a4 as ga,a5 as Sa,a6 as ua,a7 as ha,a8 as fa,a9 as Ta,aa as da,ab as Aa,ac as Oa,ad as ba,ae as Ia,af as Va,ag as ma,ah as Pa,ai as Ra,aj as ya,ak as Ba,al as Na,am as Ma,an as Da,ao as La,ap as Ka,aq as ka,d as xa,ar as wa,as as ja,at as va,au as Ha,av as Ga,aw as Ya,ax as Ua,ay as Wa,az as Fa,aA as Xa,aB as $a}from"./Editor-BuEQalqM-DucWgUTD.js";import{E as za,a as Ca,b as Ja,c as Za}from"./element-plus-MdtkBKvq.js";const qa=Object.freeze(Object.defineProperty({__proto__:null,API_METHOD_TYPES:A,ActionMenu:O,Assets:b,Binder:I,Box:V,Designer:m,DevTools:P,EVENT_MODIFIERS:R,Editor:y,Engine:B,EventBinder:N,GET_TOKENS_LINK:M,Icon:D,Item:L,KEYBOARD_EVENT_LIST:K,MAX_TOKENS:k,MOBILE_SIZE:x,MOUSE_EVENT_LIST:w,NAME_REGEX:j,NPM_REGISTRY_URL:v,OpenApi:H,PAD_SIZE:G,Panel:Y,REPORT_API:U,RegionType:W,RegionWrapper:F,Renderer:X,SAVE_BLOCK_FILE_FINISH:$,SESSION_ID_KEY:z,STATE_KEY:C,SetterView:J,SetterWrapper:Z,Simulator:q,Skeleton:Q,SkeletonWrapper:aa,SlotsPicker:sa,State:ea,Tabs:ta,VERSION_REGEX:ra,VTJ_DESIGNER_VERSION:na,VUE_DEVTOOLS_FRAME_STATE_KEY:ia,VUE_DEVTOOLS_OVERLAY_PATH:oa,VUE_DEVTOOLS_PATH:ca,VariableBinder:la,Viewer:_a,Viewport:Ea,WidgetGroup:pa,WidgetWrapper:ga,alert:Sa,builtInDeps:ua,builtInMaterials:ha,builtInSetters:fa,builtInWidgets:Ta,confirm:da,createSlotsPicker:Aa,defaultSetter:Oa,depsManager:ba,engineKey:Ia,expressionValidate:Va,getClassProperties:ma,loading:Pa,message:Ra,normalizedStyle:ya,notify:Ba,proxyContext:Na,readJsonFile:Ma,regions:Da,setterManager:La,setters:Ka,useEngine:ka,widgetManager:xa,widgets:wa},Symbol.toStringTag,{value:"Module"}));class ts{constructor(a){l(this,"urls",[]);l(this,"library","");l(this,"params",[]);l(this,"__BASE_PATH__","/");this.config=a;const s=_(_(_({},Ya),qa),Ga),o={Vue:d,__VTJ_PRO__:s,VtjUtils:Ha,VtjIcons:va,VtjUI:ja,ElementPlus:za};for(const[c,u]of Object.entries(o))window[c]=u;const{extension:n,__BASE_PATH__:e="/"}=a||{},{urls:E=[],library:i,params:r=[]}=n||{};i&&(this.urls=E,this.library=i,this.params=r,this.__BASE_PATH__=e)}load(){return S(this,null,function*(){let a={};if(this.library){const s=this.__BASE_PATH__,o=this.urls.filter(e=>Ua(e)).map(e=>`${s}${e}`),n=this.urls.filter(e=>Wa(e)).map(e=>`${s}${e}`);if(Fa(o),n.length){const e=yield Xa(n,this.library).catch(()=>null);e&&typeof e=="function"?a=e.call(e,this.config,...this.params):a=e||{}}}return Object.assign({},this.getEngineOptions(),a)})}getEngineOptions(){const a=["materialPath","pageBasePath","pageRouteName","remote","checkVersion","noMask"];return $a(this.config,a)}}function rs(){return Za.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function ns(t,a="",s="warning"){Ja({title:a,message:t,type:s})}function is(t,a){return Ca.alert(t,a)}export{ts as E,is as a,rs as l,ns as n};
