@chamn/render 0.0.42 → 0.0.44
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/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +238 -229
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -6
package/dist/index.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(g,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(g=typeof globalThis<"u"?globalThis:g||self,S(g.CRender={},g.React,g.ReactDOM))})(this,function(g,S,ct){"use strict";var Qm=Object.defineProperty;var qm=(g,S,ct)=>S in g?Qm(g,S,{enumerable:!0,configurable:!0,writable:!0,value:ct}):g[S]=ct;var b=(g,S,ct)=>(qm(g,typeof S!="symbol"?S+"":S,ct),ct);function va(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const ga=va(ct),ya=t=>()=>{console.warn(`${t} need to be implement getComponent`)},ba=["customPageRootRender"],Fr=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Ur=t=>[...Fr,...ba].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Fr.includes(n)&&(r[n]=ya),r},{});var _a=Object.defineProperty,Sa=(t,e,r)=>e in t?_a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e,r)=>(Sa(t,typeof e!="symbol"?e+"":e,r),r),ja=typeof global=="object"&&global&&global.Object===Object&&global;const kr=ja;var Oa=typeof self=="object"&&self&&self.Object===Object&&self,Ca=kr||Oa||Function("return this")();const Y=Ca;var wa=Y.Symbol;const V=wa;var Vr=Object.prototype,Ea=Vr.hasOwnProperty,$a=Vr.toString,Ft=V?V.toStringTag:void 0;function Na(t){var e=Ea.call(t,Ft),r=t[Ft];try{t[Ft]=void 0;var n=!0}catch{}var o=$a.call(t);return n&&(e?t[Ft]=r:delete t[Ft]),o}var Ta=Object.prototype,Aa=Ta.toString;function Ma(t){return Aa.call(t)}var Pa="[object Null]",xa="[object Undefined]",Gr=V?V.toStringTag:void 0;function ut(t){return t==null?t===void 0?xa:Pa:Gr&&Gr in Object(t)?Na(t):Ma(t)}function K(t){return t!=null&&typeof t=="object"}var Da="[object Symbol]";function Te(t){return typeof t=="symbol"||K(t)&&ut(t)==Da}function Ae(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Ia=Array.isArray;const I=Ia;var Ra=1/0,zr=V?V.prototype:void 0,Hr=zr?zr.toString:void 0;function Jr(t){if(typeof t=="string")return t;if(I(t))return Ae(t,Jr)+"";if(Te(t))return Hr?Hr.call(t):"";var e=t+"";return e=="0"&&1/t==-Ra?"-0":e}function H(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Me(t){return t}var La="[object AsyncFunction]",Ba="[object Function]",Fa="[object GeneratorFunction]",Ua="[object Proxy]";function Pe(t){if(!H(t))return!1;var e=ut(t);return e==Ba||e==Fa||e==La||e==Ua}var ka=Y["__core-js_shared__"];const xe=ka;var Wr=function(){var t=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Va(t){return!!Wr&&Wr in t}var Ga=Function.prototype,za=Ga.toString;function lt(t){if(t!=null){try{return za.call(t)}catch{}try{return t+""}catch{}}return""}var Ha=/[\\^$.*+?()[\]{}|]/g,Ja=/^\[object .+?Constructor\]$/,Wa=Function.prototype,Qa=Object.prototype,qa=Wa.toString,Ya=Qa.hasOwnProperty,Ka=RegExp("^"+qa.call(Ya).replace(Ha,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xa(t){if(!H(t)||Va(t))return!1;var e=Pe(t)?Ka:Ja;return e.test(lt(t))}function Za(t,e){return t==null?void 0:t[e]}function ft(t,e){var r=Za(t,e);return Xa(r)?r:void 0}var ti=ft(Y,"WeakMap");const De=ti;var Qr=Object.create,ei=function(){function t(){}return function(e){if(!H(e))return{};if(Qr)return Qr(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const ri=ei;function ni(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function oi(){}function qr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var ai=800,ii=16,si=Date.now;function ci(t){var e=0,r=0;return function(){var n=si(),o=ii-(n-r);if(r=n,o>0){if(++e>=ai)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ui(t){return function(){return t}}var li=function(){try{var t=ft(Object,"defineProperty");return t({},"",{}),t}catch{}}();const se=li;var fi=se?function(t,e){return se(t,"toString",{configurable:!0,enumerable:!1,value:ui(e),writable:!0})}:Me,di=ci(fi);const Yr=di;function pi(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function hi(t,e,r,n){for(var o=t.length,a=r+(n?1:-1);n?a--:++a<o;)if(e(t[a],a,t))return a;return-1}function mi(t){return t!==t}function vi(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function gi(t,e,r){return e===e?vi(t,e,r):hi(t,mi,r)}function yi(t,e){var r=t==null?0:t.length;return!!r&&gi(t,e,0)>-1}var bi=9007199254740991,_i=/^(?:0|[1-9]\d*)$/;function ce(t,e){var r=typeof t;return e=e??bi,!!e&&(r=="number"||r!="symbol"&&_i.test(t))&&t>-1&&t%1==0&&t<e}function Ie(t,e,r){e=="__proto__"&&se?se(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ut(t,e){return t===e||t!==t&&e!==e}var Si=Object.prototype,ji=Si.hasOwnProperty;function Re(t,e,r){var n=t[e];(!(ji.call(t,e)&&Ut(n,r))||r===void 0&&!(e in t))&&Ie(t,e,r)}function St(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?Ie(r,i,c):Re(r,i,c)}return r}var Kr=Math.max;function Xr(t,e,r){return e=Kr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Kr(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),ni(t,this,i)}}function Zr(t,e){return Yr(Xr(t,e,Me),t+"")}var Oi=9007199254740991;function Le(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Oi}function ue(t){return t!=null&&Le(t.length)&&!Pe(t)}function Ci(t,e,r){if(!H(r))return!1;var n=typeof e;return(n=="number"?ue(r)&&ce(e,r.length):n=="string"&&e in r)?Ut(r[e],t):!1}function wi(t){return Zr(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&Ci(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var Ei=Object.prototype;function Be(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ei;return t===r}function $i(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ni="[object Arguments]";function tn(t){return K(t)&&ut(t)==Ni}var en=Object.prototype,Ti=en.hasOwnProperty,Ai=en.propertyIsEnumerable,Mi=tn(function(){return arguments}())?tn:function(t){return K(t)&&Ti.call(t,"callee")&&!Ai.call(t,"callee")};const kt=Mi;function Pi(){return!1}var rn=typeof g=="object"&&g&&!g.nodeType&&g,nn=rn&&typeof module=="object"&&module&&!module.nodeType&&module,xi=nn&&nn.exports===rn,on=xi?Y.Buffer:void 0,Di=on?on.isBuffer:void 0,Ii=Di||Pi;const Vt=Ii;var Ri="[object Arguments]",Li="[object Array]",Bi="[object Boolean]",Fi="[object Date]",Ui="[object Error]",ki="[object Function]",Vi="[object Map]",Gi="[object Number]",zi="[object Object]",Hi="[object RegExp]",Ji="[object Set]",Wi="[object String]",Qi="[object WeakMap]",qi="[object ArrayBuffer]",Yi="[object DataView]",Ki="[object Float32Array]",Xi="[object Float64Array]",Zi="[object Int8Array]",ts="[object Int16Array]",es="[object Int32Array]",rs="[object Uint8Array]",ns="[object Uint8ClampedArray]",os="[object Uint16Array]",as="[object Uint32Array]",N={};N[Ki]=N[Xi]=N[Zi]=N[ts]=N[es]=N[rs]=N[ns]=N[os]=N[as]=!0,N[Ri]=N[Li]=N[qi]=N[Bi]=N[Yi]=N[Fi]=N[Ui]=N[ki]=N[Vi]=N[Gi]=N[zi]=N[Hi]=N[Ji]=N[Wi]=N[Qi]=!1;function is(t){return K(t)&&Le(t.length)&&!!N[ut(t)]}function Fe(t){return function(e){return t(e)}}var an=typeof g=="object"&&g&&!g.nodeType&&g,Gt=an&&typeof module=="object"&&module&&!module.nodeType&&module,ss=Gt&&Gt.exports===an,Ue=ss&&kr.process,cs=function(){try{var t=Gt&&Gt.require&&Gt.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch{}}();const jt=cs;var sn=jt&&jt.isTypedArray,us=sn?Fe(sn):is;const ke=us;var ls=Object.prototype,fs=ls.hasOwnProperty;function cn(t,e){var r=I(t),n=!r&&kt(t),o=!r&&!n&&Vt(t),a=!r&&!n&&!o&&ke(t),s=r||n||o||a,i=s?$i(t.length,String):[],c=i.length;for(var u in t)(e||fs.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ce(u,c)))&&i.push(u);return i}function un(t,e){return function(r){return t(e(r))}}var ds=un(Object.keys,Object);const ps=ds;var hs=Object.prototype,ms=hs.hasOwnProperty;function vs(t){if(!Be(t))return ps(t);var e=[];for(var r in Object(t))ms.call(t,r)&&r!="constructor"&&e.push(r);return e}function le(t){return ue(t)?cn(t):vs(t)}function gs(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ys=Object.prototype,bs=ys.hasOwnProperty;function _s(t){if(!H(t))return gs(t);var e=Be(t),r=[];for(var n in t)n=="constructor"&&(e||!bs.call(t,n))||r.push(n);return r}function zt(t){return ue(t)?cn(t,!0):_s(t)}var Ss=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,js=/^\w*$/;function Ve(t,e){if(I(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Te(t)?!0:js.test(t)||!Ss.test(t)||e!=null&&t in Object(e)}var Os=ft(Object,"create");const Ht=Os;function Cs(){this.__data__=Ht?Ht(null):{},this.size=0}function ws(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Es="__lodash_hash_undefined__",$s=Object.prototype,Ns=$s.hasOwnProperty;function Ts(t){var e=this.__data__;if(Ht){var r=e[t];return r===Es?void 0:r}return Ns.call(e,t)?e[t]:void 0}var As=Object.prototype,Ms=As.hasOwnProperty;function Ps(t){var e=this.__data__;return Ht?e[t]!==void 0:Ms.call(e,t)}var xs="__lodash_hash_undefined__";function Ds(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ht&&e===void 0?xs:e,this}function dt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}dt.prototype.clear=Cs,dt.prototype.delete=ws,dt.prototype.get=Ts,dt.prototype.has=Ps,dt.prototype.set=Ds;function Is(){this.__data__=[],this.size=0}function fe(t,e){for(var r=t.length;r--;)if(Ut(t[r][0],e))return r;return-1}var Rs=Array.prototype,Ls=Rs.splice;function Bs(t){var e=this.__data__,r=fe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ls.call(e,r,1),--this.size,!0}function Fs(t){var e=this.__data__,r=fe(e,t);return r<0?void 0:e[r][1]}function Us(t){return fe(this.__data__,t)>-1}function ks(t,e){var r=this.__data__,n=fe(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function et(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=Is,et.prototype.delete=Bs,et.prototype.get=Fs,et.prototype.has=Us,et.prototype.set=ks;var Vs=ft(Y,"Map");const Jt=Vs;function Gs(){this.size=0,this.__data__={hash:new dt,map:new(Jt||et),string:new dt}}function zs(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function de(t,e){var r=t.__data__;return zs(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Hs(t){var e=de(this,t).delete(t);return this.size-=e?1:0,e}function Js(t){return de(this,t).get(t)}function Ws(t){return de(this,t).has(t)}function Qs(t,e){var r=de(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function rt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=Gs,rt.prototype.delete=Hs,rt.prototype.get=Js,rt.prototype.has=Ws,rt.prototype.set=Qs;var qs="Expected a function";function Ge(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(qs);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var s=t.apply(this,n);return r.cache=a.set(o,s)||a,s};return r.cache=new(Ge.Cache||rt),r}Ge.Cache=rt;var Ys=500;function Ks(t){var e=Ge(t,function(n){return r.size===Ys&&r.clear(),n}),r=e.cache;return e}var Xs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zs=/\\(\\)?/g,tc=Ks(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Xs,function(r,n,o,a){e.push(o?a.replace(Zs,"$1"):n||r)}),e});const ec=tc;function rc(t){return t==null?"":Jr(t)}function Ot(t,e){return I(t)?t:Ve(t,e)?[t]:ec(rc(t))}var nc=1/0;function Ct(t){if(typeof t=="string"||Te(t))return t;var e=t+"";return e=="0"&&1/t==-nc?"-0":e}function pe(t,e){e=Ot(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Ct(e[r++])];return r&&r==n?t:void 0}function ln(t,e,r){var n=t==null?void 0:pe(t,e);return n===void 0?r:n}function ze(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var fn=V?V.isConcatSpreadable:void 0;function oc(t){return I(t)||kt(t)||!!(fn&&t&&t[fn])}function He(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=oc),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?He(i,e-1,r,n,o):ze(o,i):n||(o[o.length]=i)}return o}function ac(t){var e=t==null?0:t.length;return e?He(t,1):[]}function ic(t){return Yr(Xr(t,void 0,ac),t+"")}var sc=un(Object.getPrototypeOf,Object);const Je=sc;var cc="[object Object]",uc=Function.prototype,lc=Object.prototype,dn=uc.toString,fc=lc.hasOwnProperty,dc=dn.call(Object);function B(t){if(!K(t)||ut(t)!=cc)return!1;var e=Je(t);if(e===null)return!0;var r=fc.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&dn.call(r)==dc}function pc(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function hc(){this.__data__=new et,this.size=0}function mc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function vc(t){return this.__data__.get(t)}function gc(t){return this.__data__.has(t)}var yc=200;function bc(t,e){var r=this.__data__;if(r instanceof et){var n=r.__data__;if(!Jt||n.length<yc-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new rt(n)}return r.set(t,e),this.size=r.size,this}function J(t){var e=this.__data__=new et(t);this.size=e.size}J.prototype.clear=hc,J.prototype.delete=mc,J.prototype.get=vc,J.prototype.has=gc,J.prototype.set=bc;function _c(t,e){return t&&St(e,le(e),t)}function Sc(t,e){return t&&St(e,zt(e),t)}var pn=typeof g=="object"&&g&&!g.nodeType&&g,hn=pn&&typeof module=="object"&&module&&!module.nodeType&&module,jc=hn&&hn.exports===pn,mn=jc?Y.Buffer:void 0,vn=mn?mn.allocUnsafe:void 0;function gn(t,e){if(e)return t.slice();var r=t.length,n=vn?vn(r):new t.constructor(r);return t.copy(n),n}function Oc(t,e){for(var r=-1,n=t==null?0:t.length,o=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[o++]=s)}return a}function yn(){return[]}var Cc=Object.prototype,wc=Cc.propertyIsEnumerable,bn=Object.getOwnPropertySymbols,Ec=bn?function(t){return t==null?[]:(t=Object(t),Oc(bn(t),function(e){return wc.call(t,e)}))}:yn;const We=Ec;function $c(t,e){return St(t,We(t),e)}var Nc=Object.getOwnPropertySymbols,Tc=Nc?function(t){for(var e=[];t;)ze(e,We(t)),t=Je(t);return e}:yn;const _n=Tc;function Ac(t,e){return St(t,_n(t),e)}function Sn(t,e,r){var n=e(t);return I(t)?n:ze(n,r(t))}function Qe(t){return Sn(t,le,We)}function qe(t){return Sn(t,zt,_n)}var Mc=ft(Y,"DataView");const Ye=Mc;var Pc=ft(Y,"Promise");const Ke=Pc;var xc=ft(Y,"Set");const wt=xc;var jn="[object Map]",Dc="[object Object]",On="[object Promise]",Cn="[object Set]",wn="[object WeakMap]",En="[object DataView]",Ic=lt(Ye),Rc=lt(Jt),Lc=lt(Ke),Bc=lt(wt),Fc=lt(De),pt=ut;(Ye&&pt(new Ye(new ArrayBuffer(1)))!=En||Jt&&pt(new Jt)!=jn||Ke&&pt(Ke.resolve())!=On||wt&&pt(new wt)!=Cn||De&&pt(new De)!=wn)&&(pt=function(t){var e=ut(t),r=e==Dc?t.constructor:void 0,n=r?lt(r):"";if(n)switch(n){case Ic:return En;case Rc:return jn;case Lc:return On;case Bc:return Cn;case Fc:return wn}return e});const Wt=pt;var Uc=Object.prototype,kc=Uc.hasOwnProperty;function Vc(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&kc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Gc=Y.Uint8Array;const he=Gc;function Xe(t){var e=new t.constructor(t.byteLength);return new he(e).set(new he(t)),e}function zc(t,e){var r=e?Xe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Hc=/\w*$/;function Jc(t){var e=new t.constructor(t.source,Hc.exec(t));return e.lastIndex=t.lastIndex,e}var $n=V?V.prototype:void 0,Nn=$n?$n.valueOf:void 0;function Wc(t){return Nn?Object(Nn.call(t)):{}}function Tn(t,e){var r=e?Xe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Qc="[object Boolean]",qc="[object Date]",Yc="[object Map]",Kc="[object Number]",Xc="[object RegExp]",Zc="[object Set]",tu="[object String]",eu="[object Symbol]",ru="[object ArrayBuffer]",nu="[object DataView]",ou="[object Float32Array]",au="[object Float64Array]",iu="[object Int8Array]",su="[object Int16Array]",cu="[object Int32Array]",uu="[object Uint8Array]",lu="[object Uint8ClampedArray]",fu="[object Uint16Array]",du="[object Uint32Array]";function pu(t,e,r){var n=t.constructor;switch(e){case ru:return Xe(t);case Qc:case qc:return new n(+t);case nu:return zc(t,r);case ou:case au:case iu:case su:case cu:case uu:case lu:case fu:case du:return Tn(t,r);case Yc:return new n;case Kc:case tu:return new n(t);case Xc:return Jc(t);case Zc:return new n;case eu:return Wc(t)}}function An(t){return typeof t.constructor=="function"&&!Be(t)?ri(Je(t)):{}}var hu="[object Map]";function mu(t){return K(t)&&Wt(t)==hu}var Mn=jt&&jt.isMap,vu=Mn?Fe(Mn):mu;const gu=vu;var yu="[object Set]";function bu(t){return K(t)&&Wt(t)==yu}var Pn=jt&&jt.isSet,_u=Pn?Fe(Pn):bu;const Su=_u;var ju=1,Ou=2,Cu=4,xn="[object Arguments]",wu="[object Array]",Eu="[object Boolean]",$u="[object Date]",Nu="[object Error]",Dn="[object Function]",Tu="[object GeneratorFunction]",Au="[object Map]",Mu="[object Number]",In="[object Object]",Pu="[object RegExp]",xu="[object Set]",Du="[object String]",Iu="[object Symbol]",Ru="[object WeakMap]",Lu="[object ArrayBuffer]",Bu="[object DataView]",Fu="[object Float32Array]",Uu="[object Float64Array]",ku="[object Int8Array]",Vu="[object Int16Array]",Gu="[object Int32Array]",zu="[object Uint8Array]",Hu="[object Uint8ClampedArray]",Ju="[object Uint16Array]",Wu="[object Uint32Array]",$={};$[xn]=$[wu]=$[Lu]=$[Bu]=$[Eu]=$[$u]=$[Fu]=$[Uu]=$[ku]=$[Vu]=$[Gu]=$[Au]=$[Mu]=$[In]=$[Pu]=$[xu]=$[Du]=$[Iu]=$[zu]=$[Hu]=$[Ju]=$[Wu]=!0,$[Nu]=$[Dn]=$[Ru]=!1;function Qt(t,e,r,n,o,a){var s,i=e&ju,c=e&Ou,u=e&Cu;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!H(t))return t;var l=I(t);if(l){if(s=Vc(t),!i)return qr(t,s)}else{var d=Wt(t),f=d==Dn||d==Tu;if(Vt(t))return gn(t,i);if(d==In||d==xn||f&&!o){if(s=c||f?{}:An(t),!i)return c?Ac(t,Sc(s,t)):$c(t,_c(s,t))}else{if(!$[d])return o?t:{};s=pu(t,d,i)}}a||(a=new J);var p=a.get(t);if(p)return p;a.set(t,s),Su(t)?t.forEach(function(_){s.add(Qt(_,e,r,_,t,a))}):gu(t)&&t.forEach(function(_,O){s.set(O,Qt(_,e,r,O,t,a))});var h=u?c?qe:Qe:c?zt:le,y=l?void 0:h(t);return pi(y||t,function(_,O){y&&(O=_,_=t[O]),Re(s,O,Qt(_,e,r,O,t,a))}),s}var Qu=1,qu=4;function Rn(t){return Qt(t,Qu|qu)}var Yu="__lodash_hash_undefined__";function Ku(t){return this.__data__.set(t,Yu),this}function Xu(t){return this.__data__.has(t)}function qt(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new rt;++e<r;)this.add(t[e])}qt.prototype.add=qt.prototype.push=Ku,qt.prototype.has=Xu;function Zu(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Ln(t,e){return t.has(e)}var tl=1,el=2;function Bn(t,e,r,n,o,a){var s=r&tl,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var d=-1,f=!0,p=r&el?new qt:void 0;for(a.set(t,e),a.set(e,t);++d<i;){var h=t[d],y=e[d];if(n)var _=s?n(y,h,d,e,t,a):n(h,y,d,t,e,a);if(_!==void 0){if(_)continue;f=!1;break}if(p){if(!Zu(e,function(O,C){if(!Ln(p,C)&&(h===O||o(h,O,r,n,a)))return p.push(C)})){f=!1;break}}else if(!(h===y||o(h,y,r,n,a))){f=!1;break}}return a.delete(t),a.delete(e),f}function rl(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Ze(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var nl=1,ol=2,al="[object Boolean]",il="[object Date]",sl="[object Error]",cl="[object Map]",ul="[object Number]",ll="[object RegExp]",fl="[object Set]",dl="[object String]",pl="[object Symbol]",hl="[object ArrayBuffer]",ml="[object DataView]",Fn=V?V.prototype:void 0,tr=Fn?Fn.valueOf:void 0;function vl(t,e,r,n,o,a,s){switch(r){case ml:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hl:return!(t.byteLength!=e.byteLength||!a(new he(t),new he(e)));case al:case il:case ul:return Ut(+t,+e);case sl:return t.name==e.name&&t.message==e.message;case ll:case dl:return t==e+"";case cl:var i=rl;case fl:var c=n&nl;if(i||(i=Ze),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=ol,s.set(t,e);var l=Bn(i(t),i(e),n,o,a,s);return s.delete(t),l;case pl:if(tr)return tr.call(t)==tr.call(e)}return!1}var gl=1,yl=Object.prototype,bl=yl.hasOwnProperty;function _l(t,e,r,n,o,a){var s=r&gl,i=Qe(t),c=i.length,u=Qe(e),l=u.length;if(c!=l&&!s)return!1;for(var d=c;d--;){var f=i[d];if(!(s?f in e:bl.call(e,f)))return!1}var p=a.get(t),h=a.get(e);if(p&&h)return p==e&&h==t;var y=!0;a.set(t,e),a.set(e,t);for(var _=s;++d<c;){f=i[d];var O=t[f],C=e[f];if(n)var P=s?n(C,O,f,e,t,a):n(O,C,f,t,e,a);if(!(P===void 0?O===C||o(O,C,r,n,a):P)){y=!1;break}_||(_=f=="constructor")}if(y&&!_){var x=t.constructor,L=e.constructor;x!=L&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof L=="function"&&L instanceof L)&&(y=!1)}return a.delete(t),a.delete(e),y}var Sl=1,Un="[object Arguments]",kn="[object Array]",me="[object Object]",jl=Object.prototype,Vn=jl.hasOwnProperty;function Ol(t,e,r,n,o,a){var s=I(t),i=I(e),c=s?kn:Wt(t),u=i?kn:Wt(e);c=c==Un?me:c,u=u==Un?me:u;var l=c==me,d=u==me,f=c==u;if(f&&Vt(t)){if(!Vt(e))return!1;s=!0,l=!1}if(f&&!l)return a||(a=new J),s||ke(t)?Bn(t,e,r,n,o,a):vl(t,e,c,r,n,o,a);if(!(r&Sl)){var p=l&&Vn.call(t,"__wrapped__"),h=d&&Vn.call(e,"__wrapped__");if(p||h){var y=p?t.value():t,_=h?e.value():e;return a||(a=new J),o(y,_,r,n,a)}}return f?(a||(a=new J),_l(t,e,r,n,o,a)):!1}function er(t,e,r,n,o){return t===e?!0:t==null||e==null||!K(t)&&!K(e)?t!==t&&e!==e:Ol(t,e,r,n,er,o)}var Cl=1,wl=2;function El(t,e,r,n){var o=r.length,a=o,s=!n;if(t==null)return!a;for(t=Object(t);o--;){var i=r[o];if(s&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){i=r[o];var c=i[0],u=t[c],l=i[1];if(s&&i[2]){if(u===void 0&&!(c in t))return!1}else{var d=new J;if(n)var f=n(u,l,c,t,e,d);if(!(f===void 0?er(l,u,Cl|wl,n,d):f))return!1}}return!0}function Gn(t){return t===t&&!H(t)}function $l(t){for(var e=le(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Gn(o)]}return e}function zn(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Nl(t){var e=$l(t);return e.length==1&&e[0][2]?zn(e[0][0],e[0][1]):function(r){return r===t||El(r,t,e)}}function Tl(t,e){return t!=null&&e in Object(t)}function Al(t,e,r){e=Ot(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=Ct(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=o?a:(o=t==null?0:t.length,!!o&&Le(o)&&ce(s,o)&&(I(t)||kt(t)))}function Ml(t,e){return t!=null&&Al(t,e,Tl)}var Pl=1,xl=2;function Dl(t,e){return Ve(t)&&Gn(e)?zn(Ct(t),e):function(r){var n=ln(r,t);return n===void 0&&n===e?Ml(r,t):er(e,n,Pl|xl)}}function Il(t){return function(e){return e==null?void 0:e[t]}}function Rl(t){return function(e){return pe(e,t)}}function Ll(t){return Ve(t)?Il(Ct(t)):Rl(t)}function rr(t){return typeof t=="function"?t:t==null?Me:typeof t=="object"?I(t)?Dl(t[0],t[1]):Nl(t):Ll(t)}function Bl(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var Fl=Bl();const Ul=Fl;function nr(t,e,r){(r!==void 0&&!Ut(t[e],r)||r===void 0&&!(e in t))&&Ie(t,e,r)}function or(t){return K(t)&&ue(t)}function ar(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function kl(t){return St(t,zt(t))}function Vl(t,e,r,n,o,a,s){var i=ar(t,r),c=ar(e,r),u=s.get(c);if(u){nr(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,d=l===void 0;if(d){var f=I(c),p=!f&&Vt(c),h=!f&&!p&&ke(c);l=c,f||p||h?I(i)?l=i:or(i)?l=qr(i):p?(d=!1,l=gn(c,!0)):h?(d=!1,l=Tn(c,!0)):l=[]:B(c)||kt(c)?(l=i,kt(i)?l=kl(i):(!H(i)||Pe(i))&&(l=An(c))):d=!1}d&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),nr(t,r,l)}function Hn(t,e,r,n,o){t!==e&&Ul(e,function(a,s){if(o||(o=new J),H(a))Vl(t,e,s,r,Hn,n,o);else{var i=n?n(ar(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),nr(t,s,i)}},zt)}function Gl(t,e,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function Jn(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function zl(t,e){return e.length<2?t:pe(t,pc(e,0,-1))}var Hl=wi(function(t,e,r){Hn(t,e,r)});const Wn=Hl;var Jl="Expected a function";function Wl(t){if(typeof t!="function")throw new TypeError(Jl);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Ql(t,e){return e=Ot(e,t),t=zl(t,e),t==null||delete t[Ct(Jn(e))]}function ql(t){return B(t)?void 0:t}var Yl=1,Kl=2,Xl=4,Zl=ic(function(t,e){var r={};if(t==null)return r;var n=!1;e=Ae(e,function(a){return a=Ot(a,t),n||(n=a.length>1),a}),St(t,qe(t),r),n&&(r=Qt(r,Yl|Kl|Xl,ql));for(var o=e.length;o--;)Ql(r,e[o]);return r});const Qn=Zl;function tf(t,e,r,n){if(!H(t))return t;e=Ot(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=Ct(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var l=i[c];u=n?n(l,c,i):void 0,u===void 0&&(u=H(l)?l:ce(e[o+1])?[]:{})}Re(i,c,u),i=i[c]}return t}function ef(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=pe(t,s);r(i,s)&&tf(a,Ot(s,t),i)}return a}function rf(t,e){if(t==null)return{};var r=Ae(qe(t),function(n){return[n]});return e=rr(e),ef(t,r,function(n,o){return e(n,o[0])})}function nf(t,e){return rf(t,Wl(rr(e)))}var of=1/0,af=wt&&1/Ze(new wt([,-0]))[1]==of?function(t){return new wt(t)}:oi;const sf=af;var cf=200;function uf(t,e,r){var n=-1,o=yi,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=Gl;else if(a>=cf){var u=e?null:sf(t);if(u)return Ze(u);s=!1,o=Ln,c=new qt}else c=e?[]:i;t:for(;++n<a;){var l=t[n],d=e?e(l):l;if(l=r||l!==0?l:0,s&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue t;e&&c.push(d),i.push(l)}else o(c,d,r)||(c!==i&&c.push(d),i.push(l))}return i}var lf=Zr(function(t){var e=Jn(t);return or(e)&&(e=void 0),uf(He(t,1,or,!0),rr(e))});const ff=lf;class qn extends TypeError{constructor(e,r){let n;const{message:o,...a}=e,{path:s}=e,i=s.length===0?o:"At path: "+s.join(".")+" -- "+o;super(i),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var c;return(c=n)!=null?c:n=[e,...r()]}}}function df(t){return W(t)&&typeof t[Symbol.iterator]=="function"}function W(t){return typeof t=="object"&&t!=null}function k(t){return typeof t=="string"?JSON.stringify(t):""+t}function pf(t){const{done:e,value:r}=t.next();return e?void 0:r}function hf(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:o,branch:a}=e,{type:s}=r,{refinement:i,message:c="Expected a value of type `"+s+"`"+(i?" with refinement `"+i+"`":"")+", but received: `"+k(n)+"`"}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*Yn(t,e,r,n){df(t)||(t=[t]);for(const o of t){const a=hf(o,e,r,n);a&&(yield a)}}function*ir(t,e,r){r===void 0&&(r={});const{path:n=[],branch:o=[t],coerce:a=!1,mask:s=!1}=r,i={path:n,branch:o};if(a&&(t=e.coercer(t,i),s&&e.type!=="type"&&W(e.schema)&&W(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,i))c="not_valid",yield[u,void 0];for(let[u,l,d]of e.entries(t,i)){const f=ir(l,d,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,l],coerce:a,mask:s});for(const p of f)p[0]?(c=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(l=p[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):W(t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,i))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class X{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:o,refiner:a,coercer:s=c=>c,entries:i=function*(){}}=e;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(c,u)=>{const l=o(c,u);return Yn(l,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const l=a(c,u);return Yn(l,u,this,c)}:this.refiner=()=>[]}assert(e){return Kn(e,this)}create(e){return mf(e,this)}is(e){return gf(e,this)}mask(e){return vf(e,this)}validate(e,r){return r===void 0&&(r={}),Et(e,this,r)}}function Kn(t,e){const r=Et(t,e);if(r[0])throw r[0]}function mf(t,e){const r=Et(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function vf(t,e){const r=Et(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function gf(t,e){return!Et(t,e)[0]}function Et(t,e,r){r===void 0&&(r={});const n=ir(t,e,r),o=pf(n);return o[0]?[new qn(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function sr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=e[0].type==="type",o=e.map(s=>s.schema),a=Object.assign({},...o);return n?eo(a):w(a)}function at(t,e){return new X({type:t,schema:null,validator:e})}function $t(t){return new X({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function Xn(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return eo(n);default:return w(n)}}function A(){return at("any",()=>!0)}function D(t){return new X({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||"Expected an array value, but received: "+k(e)}})}function ht(){return at("boolean",t=>typeof t=="boolean")}function cr(t){const e={},r=t.map(n=>k(n)).join();for(const n of t)e[n]=n;return new X({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+k(n)}})}function Zn(){return at("func",t=>typeof t=="function"||"Expected a function, but received: "+k(t))}function F(t){const e=k(t),r=typeof t;return new X({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+k(n)}})}function yf(){return at("never",()=>!1)}function to(){return at("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+k(t))}function w(t){const e=t?Object.keys(t):[],r=yf();return new X({type:"object",schema:t||null,*entries(n){if(t&&W(n)){const o=new Set(Object.keys(n));for(const a of e)o.delete(a),yield[a,n[a],t[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return W(n)||"Expected an object, but received: "+k(n)},coercer(n){return W(n)?{...n}:n}})}function m(t){return new X({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Yt(t,e){return new X({type:"record",schema:null,*entries(r){if(W(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return W(r)||"Expected an object, but received: "+k(r)}})}function v(){return at("string",t=>typeof t=="string"||"Expected a string, but received: "+k(t))}function eo(t){const e=Object.keys(t);return new X({type:"type",schema:t,*entries(r){if(W(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return W(r)||"Expected an object, but received: "+k(r)}})}function U(t){const e=t.map(r=>r.type).join(" | ");return new X({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||bf()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=ir(r,a,n),[i]=s;if(i[0])for(const[c]of s)c&&o.push(c);else return[]}return["Expected the value to satisfy a union of `"+e+"`, but received: "+k(r),...o]}})}function bf(){return at("unknown",()=>!0)}const ur=w({package:v(),version:v(),name:v(),exportName:m(v()),destructuring:m(ht()),subName:m(v()),main:m(v()),cssPaths:m(D(v()))}),_f=D(ur),Sf=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var G=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(G||{}),lr=(t=>(t.DESIGN="design",t.SAVE="save",t))(lr||{}),fr=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(fr||{});const jf=()=>at("normalObj",t=>!B(t)||[G.SLOT,G.EXPRESSION,G.FUNCTION].includes(t==null?void 0:t.type)?!1:(Et(t,Yt(v(),dr)),!0)),dr=U([v(),to(),ht(),w({type:F(G.SLOT),renderType:cr([fr.FUNC,fr.COMP]),params:m(D(v())),value:$t(()=>U([Nt,D(Nt)]))}),w({type:F(G.EXPRESSION),value:v()}),w({type:F(G.FUNCTION),value:v()}),jf(),D($t(()=>dr))]),ro=w({type:F(G.EXPRESSION),value:v()}),Nt=w({id:m(v()),title:m(v()),componentName:v(),props:m(Yt(v(),dr)),nodeName:m(v()),state:m(Yt(v(),A())),children:$t(()=>m(D(U([v(),Nt])))),configure:m(A()),css:m(A()),style:m(A()),classNames:m(D(A())),refId:m(v()),extra:m(Yt(A(),A())),condition:m(U([ht(),ro])),loop:m(w({open:ht(),data:U([D(A()),ro]),args:m(D(v())),forName:m(v()),forIndex:m(v()),key:m(A()),name:m(v())})),methods:m(D(A()))}),ve=U([v(),w({label:v(),tip:m(v())})]),Of=w({type:F("shape"),value:D(w({name:v(),title:ve,valueType:$t(()=>ge)}))}),Cf=w({type:F("enums"),value:D(v())});w({type:F("array"),value:$t(()=>ge)});const wf=w({type:F("array"),value:$t(()=>D(ge))}),ge=U([cr(["array","boolean","number","object","string"]),cr(["component","expression","function"]),Of,Cf,wf]),Ef=U([v(),w({componentName:v(),props:m(A()),initialValue:m(A()),component:m(A()),hiddenLabel:m(ht())})]),pr=w({name:v(),title:ve,valueType:ge,description:m(v()),defaultValue:A(),setters:m(D(Ef)),condition:m(Zn())});U([v(),Zn()]);var hr=(t=>(t.SINGLE="single",t.GROUP="group",t))(hr||{});U([v(),w({name:v(),describe:m(v()),params:m(w({name:v(),description:v()})),template:v()})]);const $f=w({id:m(v()),title:v(),snapshot:U([v(),A()]),snapshotText:m(v()),description:m(v()),tags:m(D(v())),groupName:m(v()),category:m(v()),schema:sr(Xn(Nt,["id"]),w({componentName:m(v())}))}),Nf=w({componentName:v(),title:v(),screenshot:m(v()),icon:m(v()),tags:m(D(v())),groupName:m(v()),category:m(v()),priority:m(to()),npm:m(ur),snippets:D($f),props:D(U([pr,w({title:m(ve),type:F("single"),content:pr}),w({title:m(ve),type:F("group"),content:D(pr)})])),fixedProps:m(A()),isContainer:m(U([ht(),w({placeholder:v(),width:v(),height:v()})])),disableEditorDragDom:m(A()),isLayout:m(ht()),rootSelector:m(v()),advanceCustom:m(A()),extra:m(Yt(A(),A()))}),Tf=t=>({data:e,message:r,throwError:n})=>{const o=t({data:e,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
|
|
1
|
+
(function(g,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(g=typeof globalThis<"u"?globalThis:g||self,S(g.CRender={},g.React,g.ReactDOM))})(this,function(g,S,ct){"use strict";var Qm=Object.defineProperty;var qm=(g,S,ct)=>S in g?Qm(g,S,{enumerable:!0,configurable:!0,writable:!0,value:ct}):g[S]=ct;var b=(g,S,ct)=>(qm(g,typeof S!="symbol"?S+"":S,ct),ct);function va(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const ga=va(ct),ya=t=>()=>{console.warn(`${t} need to be implement getComponent`)},ba=["customPageRootRender"],Ur=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],kr=t=>[...Ur,...ba].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Ur.includes(n)&&(r[n]=ya),r},{});var _a=Object.defineProperty,Sa=(t,e,r)=>e in t?_a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e,r)=>(Sa(t,typeof e!="symbol"?e+"":e,r),r),ja=typeof global=="object"&&global&&global.Object===Object&&global;const Vr=ja;var Ca=typeof self=="object"&&self&&self.Object===Object&&self,Oa=Vr||Ca||Function("return this")();const Y=Oa;var wa=Y.Symbol;const V=wa;var Gr=Object.prototype,Ea=Gr.hasOwnProperty,$a=Gr.toString,Ft=V?V.toStringTag:void 0;function Na(t){var e=Ea.call(t,Ft),r=t[Ft];try{t[Ft]=void 0;var n=!0}catch{}var o=$a.call(t);return n&&(e?t[Ft]=r:delete t[Ft]),o}var Ta=Object.prototype,Ma=Ta.toString;function Aa(t){return Ma.call(t)}var Pa="[object Null]",xa="[object Undefined]",zr=V?V.toStringTag:void 0;function ut(t){return t==null?t===void 0?xa:Pa:zr&&zr in Object(t)?Na(t):Aa(t)}function K(t){return t!=null&&typeof t=="object"}var Ia="[object Symbol]";function Te(t){return typeof t=="symbol"||K(t)&&ut(t)==Ia}function Me(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Da=Array.isArray;const D=Da;var Ra=1/0,Hr=V?V.prototype:void 0,Jr=Hr?Hr.toString:void 0;function Wr(t){if(typeof t=="string")return t;if(D(t))return Me(t,Wr)+"";if(Te(t))return Jr?Jr.call(t):"";var e=t+"";return e=="0"&&1/t==-Ra?"-0":e}function H(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ae(t){return t}var La="[object AsyncFunction]",Ba="[object Function]",Fa="[object GeneratorFunction]",Ua="[object Proxy]";function Pe(t){if(!H(t))return!1;var e=ut(t);return e==Ba||e==Fa||e==La||e==Ua}var ka=Y["__core-js_shared__"];const xe=ka;var Qr=function(){var t=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Va(t){return!!Qr&&Qr in t}var Ga=Function.prototype,za=Ga.toString;function lt(t){if(t!=null){try{return za.call(t)}catch{}try{return t+""}catch{}}return""}var Ha=/[\\^$.*+?()[\]{}|]/g,Ja=/^\[object .+?Constructor\]$/,Wa=Function.prototype,Qa=Object.prototype,qa=Wa.toString,Ya=Qa.hasOwnProperty,Ka=RegExp("^"+qa.call(Ya).replace(Ha,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xa(t){if(!H(t)||Va(t))return!1;var e=Pe(t)?Ka:Ja;return e.test(lt(t))}function Za(t,e){return t==null?void 0:t[e]}function ft(t,e){var r=Za(t,e);return Xa(r)?r:void 0}var ti=ft(Y,"WeakMap");const Ie=ti;var qr=Object.create,ei=function(){function t(){}return function(e){if(!H(e))return{};if(qr)return qr(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const ri=ei;function ni(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function oi(){}function Yr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var ai=800,ii=16,si=Date.now;function ci(t){var e=0,r=0;return function(){var n=si(),o=ii-(n-r);if(r=n,o>0){if(++e>=ai)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ui(t){return function(){return t}}var li=function(){try{var t=ft(Object,"defineProperty");return t({},"",{}),t}catch{}}();const se=li;var fi=se?function(t,e){return se(t,"toString",{configurable:!0,enumerable:!1,value:ui(e),writable:!0})}:Ae,di=ci(fi);const Kr=di;function pi(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function hi(t,e,r,n){for(var o=t.length,a=r+(n?1:-1);n?a--:++a<o;)if(e(t[a],a,t))return a;return-1}function mi(t){return t!==t}function vi(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function gi(t,e,r){return e===e?vi(t,e,r):hi(t,mi,r)}function yi(t,e){var r=t==null?0:t.length;return!!r&&gi(t,e,0)>-1}var bi=9007199254740991,_i=/^(?:0|[1-9]\d*)$/;function ce(t,e){var r=typeof t;return e=e??bi,!!e&&(r=="number"||r!="symbol"&&_i.test(t))&&t>-1&&t%1==0&&t<e}function De(t,e,r){e=="__proto__"&&se?se(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ut(t,e){return t===e||t!==t&&e!==e}var Si=Object.prototype,ji=Si.hasOwnProperty;function Re(t,e,r){var n=t[e];(!(ji.call(t,e)&&Ut(n,r))||r===void 0&&!(e in t))&&De(t,e,r)}function St(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?De(r,i,c):Re(r,i,c)}return r}var Xr=Math.max;function Zr(t,e,r){return e=Xr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Xr(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),ni(t,this,i)}}function tn(t,e){return Kr(Zr(t,e,Ae),t+"")}var Ci=9007199254740991;function Le(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ci}function ue(t){return t!=null&&Le(t.length)&&!Pe(t)}function Oi(t,e,r){if(!H(r))return!1;var n=typeof e;return(n=="number"?ue(r)&&ce(e,r.length):n=="string"&&e in r)?Ut(r[e],t):!1}function wi(t){return tn(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&Oi(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var Ei=Object.prototype;function Be(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ei;return t===r}function $i(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ni="[object Arguments]";function en(t){return K(t)&&ut(t)==Ni}var rn=Object.prototype,Ti=rn.hasOwnProperty,Mi=rn.propertyIsEnumerable,Ai=en(function(){return arguments}())?en:function(t){return K(t)&&Ti.call(t,"callee")&&!Mi.call(t,"callee")};const kt=Ai;function Pi(){return!1}var nn=typeof g=="object"&&g&&!g.nodeType&&g,on=nn&&typeof module=="object"&&module&&!module.nodeType&&module,xi=on&&on.exports===nn,an=xi?Y.Buffer:void 0,Ii=an?an.isBuffer:void 0,Di=Ii||Pi;const Vt=Di;var Ri="[object Arguments]",Li="[object Array]",Bi="[object Boolean]",Fi="[object Date]",Ui="[object Error]",ki="[object Function]",Vi="[object Map]",Gi="[object Number]",zi="[object Object]",Hi="[object RegExp]",Ji="[object Set]",Wi="[object String]",Qi="[object WeakMap]",qi="[object ArrayBuffer]",Yi="[object DataView]",Ki="[object Float32Array]",Xi="[object Float64Array]",Zi="[object Int8Array]",ts="[object Int16Array]",es="[object Int32Array]",rs="[object Uint8Array]",ns="[object Uint8ClampedArray]",os="[object Uint16Array]",as="[object Uint32Array]",N={};N[Ki]=N[Xi]=N[Zi]=N[ts]=N[es]=N[rs]=N[ns]=N[os]=N[as]=!0,N[Ri]=N[Li]=N[qi]=N[Bi]=N[Yi]=N[Fi]=N[Ui]=N[ki]=N[Vi]=N[Gi]=N[zi]=N[Hi]=N[Ji]=N[Wi]=N[Qi]=!1;function is(t){return K(t)&&Le(t.length)&&!!N[ut(t)]}function Fe(t){return function(e){return t(e)}}var sn=typeof g=="object"&&g&&!g.nodeType&&g,Gt=sn&&typeof module=="object"&&module&&!module.nodeType&&module,ss=Gt&&Gt.exports===sn,Ue=ss&&Vr.process,cs=function(){try{var t=Gt&&Gt.require&&Gt.require("util").types;return t||Ue&&Ue.binding&&Ue.binding("util")}catch{}}();const jt=cs;var cn=jt&&jt.isTypedArray,us=cn?Fe(cn):is;const ke=us;var ls=Object.prototype,fs=ls.hasOwnProperty;function un(t,e){var r=D(t),n=!r&&kt(t),o=!r&&!n&&Vt(t),a=!r&&!n&&!o&&ke(t),s=r||n||o||a,i=s?$i(t.length,String):[],c=i.length;for(var u in t)(e||fs.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ce(u,c)))&&i.push(u);return i}function ln(t,e){return function(r){return t(e(r))}}var ds=ln(Object.keys,Object);const ps=ds;var hs=Object.prototype,ms=hs.hasOwnProperty;function vs(t){if(!Be(t))return ps(t);var e=[];for(var r in Object(t))ms.call(t,r)&&r!="constructor"&&e.push(r);return e}function le(t){return ue(t)?un(t):vs(t)}function gs(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ys=Object.prototype,bs=ys.hasOwnProperty;function _s(t){if(!H(t))return gs(t);var e=Be(t),r=[];for(var n in t)n=="constructor"&&(e||!bs.call(t,n))||r.push(n);return r}function zt(t){return ue(t)?un(t,!0):_s(t)}var Ss=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,js=/^\w*$/;function Ve(t,e){if(D(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Te(t)?!0:js.test(t)||!Ss.test(t)||e!=null&&t in Object(e)}var Cs=ft(Object,"create");const Ht=Cs;function Os(){this.__data__=Ht?Ht(null):{},this.size=0}function ws(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Es="__lodash_hash_undefined__",$s=Object.prototype,Ns=$s.hasOwnProperty;function Ts(t){var e=this.__data__;if(Ht){var r=e[t];return r===Es?void 0:r}return Ns.call(e,t)?e[t]:void 0}var Ms=Object.prototype,As=Ms.hasOwnProperty;function Ps(t){var e=this.__data__;return Ht?e[t]!==void 0:As.call(e,t)}var xs="__lodash_hash_undefined__";function Is(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ht&&e===void 0?xs:e,this}function dt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}dt.prototype.clear=Os,dt.prototype.delete=ws,dt.prototype.get=Ts,dt.prototype.has=Ps,dt.prototype.set=Is;function Ds(){this.__data__=[],this.size=0}function fe(t,e){for(var r=t.length;r--;)if(Ut(t[r][0],e))return r;return-1}var Rs=Array.prototype,Ls=Rs.splice;function Bs(t){var e=this.__data__,r=fe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ls.call(e,r,1),--this.size,!0}function Fs(t){var e=this.__data__,r=fe(e,t);return r<0?void 0:e[r][1]}function Us(t){return fe(this.__data__,t)>-1}function ks(t,e){var r=this.__data__,n=fe(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function et(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=Ds,et.prototype.delete=Bs,et.prototype.get=Fs,et.prototype.has=Us,et.prototype.set=ks;var Vs=ft(Y,"Map");const Jt=Vs;function Gs(){this.size=0,this.__data__={hash:new dt,map:new(Jt||et),string:new dt}}function zs(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function de(t,e){var r=t.__data__;return zs(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Hs(t){var e=de(this,t).delete(t);return this.size-=e?1:0,e}function Js(t){return de(this,t).get(t)}function Ws(t){return de(this,t).has(t)}function Qs(t,e){var r=de(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function rt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=Gs,rt.prototype.delete=Hs,rt.prototype.get=Js,rt.prototype.has=Ws,rt.prototype.set=Qs;var qs="Expected a function";function Ge(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(qs);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var s=t.apply(this,n);return r.cache=a.set(o,s)||a,s};return r.cache=new(Ge.Cache||rt),r}Ge.Cache=rt;var Ys=500;function Ks(t){var e=Ge(t,function(n){return r.size===Ys&&r.clear(),n}),r=e.cache;return e}var Xs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zs=/\\(\\)?/g,tc=Ks(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Xs,function(r,n,o,a){e.push(o?a.replace(Zs,"$1"):n||r)}),e});const ec=tc;function rc(t){return t==null?"":Wr(t)}function Ct(t,e){return D(t)?t:Ve(t,e)?[t]:ec(rc(t))}var nc=1/0;function Ot(t){if(typeof t=="string"||Te(t))return t;var e=t+"";return e=="0"&&1/t==-nc?"-0":e}function pe(t,e){e=Ct(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Ot(e[r++])];return r&&r==n?t:void 0}function fn(t,e,r){var n=t==null?void 0:pe(t,e);return n===void 0?r:n}function ze(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var dn=V?V.isConcatSpreadable:void 0;function oc(t){return D(t)||kt(t)||!!(dn&&t&&t[dn])}function He(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=oc),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?He(i,e-1,r,n,o):ze(o,i):n||(o[o.length]=i)}return o}function ac(t){var e=t==null?0:t.length;return e?He(t,1):[]}function ic(t){return Kr(Zr(t,void 0,ac),t+"")}var sc=ln(Object.getPrototypeOf,Object);const Je=sc;var cc="[object Object]",uc=Function.prototype,lc=Object.prototype,pn=uc.toString,fc=lc.hasOwnProperty,dc=pn.call(Object);function B(t){if(!K(t)||ut(t)!=cc)return!1;var e=Je(t);if(e===null)return!0;var r=fc.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&pn.call(r)==dc}function pc(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function hc(){this.__data__=new et,this.size=0}function mc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function vc(t){return this.__data__.get(t)}function gc(t){return this.__data__.has(t)}var yc=200;function bc(t,e){var r=this.__data__;if(r instanceof et){var n=r.__data__;if(!Jt||n.length<yc-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new rt(n)}return r.set(t,e),this.size=r.size,this}function J(t){var e=this.__data__=new et(t);this.size=e.size}J.prototype.clear=hc,J.prototype.delete=mc,J.prototype.get=vc,J.prototype.has=gc,J.prototype.set=bc;function _c(t,e){return t&&St(e,le(e),t)}function Sc(t,e){return t&&St(e,zt(e),t)}var hn=typeof g=="object"&&g&&!g.nodeType&&g,mn=hn&&typeof module=="object"&&module&&!module.nodeType&&module,jc=mn&&mn.exports===hn,vn=jc?Y.Buffer:void 0,gn=vn?vn.allocUnsafe:void 0;function yn(t,e){if(e)return t.slice();var r=t.length,n=gn?gn(r):new t.constructor(r);return t.copy(n),n}function Cc(t,e){for(var r=-1,n=t==null?0:t.length,o=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[o++]=s)}return a}function bn(){return[]}var Oc=Object.prototype,wc=Oc.propertyIsEnumerable,_n=Object.getOwnPropertySymbols,Ec=_n?function(t){return t==null?[]:(t=Object(t),Cc(_n(t),function(e){return wc.call(t,e)}))}:bn;const We=Ec;function $c(t,e){return St(t,We(t),e)}var Nc=Object.getOwnPropertySymbols,Tc=Nc?function(t){for(var e=[];t;)ze(e,We(t)),t=Je(t);return e}:bn;const Sn=Tc;function Mc(t,e){return St(t,Sn(t),e)}function jn(t,e,r){var n=e(t);return D(t)?n:ze(n,r(t))}function Qe(t){return jn(t,le,We)}function qe(t){return jn(t,zt,Sn)}var Ac=ft(Y,"DataView");const Ye=Ac;var Pc=ft(Y,"Promise");const Ke=Pc;var xc=ft(Y,"Set");const wt=xc;var Cn="[object Map]",Ic="[object Object]",On="[object Promise]",wn="[object Set]",En="[object WeakMap]",$n="[object DataView]",Dc=lt(Ye),Rc=lt(Jt),Lc=lt(Ke),Bc=lt(wt),Fc=lt(Ie),pt=ut;(Ye&&pt(new Ye(new ArrayBuffer(1)))!=$n||Jt&&pt(new Jt)!=Cn||Ke&&pt(Ke.resolve())!=On||wt&&pt(new wt)!=wn||Ie&&pt(new Ie)!=En)&&(pt=function(t){var e=ut(t),r=e==Ic?t.constructor:void 0,n=r?lt(r):"";if(n)switch(n){case Dc:return $n;case Rc:return Cn;case Lc:return On;case Bc:return wn;case Fc:return En}return e});const Wt=pt;var Uc=Object.prototype,kc=Uc.hasOwnProperty;function Vc(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&kc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Gc=Y.Uint8Array;const he=Gc;function Xe(t){var e=new t.constructor(t.byteLength);return new he(e).set(new he(t)),e}function zc(t,e){var r=e?Xe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Hc=/\w*$/;function Jc(t){var e=new t.constructor(t.source,Hc.exec(t));return e.lastIndex=t.lastIndex,e}var Nn=V?V.prototype:void 0,Tn=Nn?Nn.valueOf:void 0;function Wc(t){return Tn?Object(Tn.call(t)):{}}function Mn(t,e){var r=e?Xe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Qc="[object Boolean]",qc="[object Date]",Yc="[object Map]",Kc="[object Number]",Xc="[object RegExp]",Zc="[object Set]",tu="[object String]",eu="[object Symbol]",ru="[object ArrayBuffer]",nu="[object DataView]",ou="[object Float32Array]",au="[object Float64Array]",iu="[object Int8Array]",su="[object Int16Array]",cu="[object Int32Array]",uu="[object Uint8Array]",lu="[object Uint8ClampedArray]",fu="[object Uint16Array]",du="[object Uint32Array]";function pu(t,e,r){var n=t.constructor;switch(e){case ru:return Xe(t);case Qc:case qc:return new n(+t);case nu:return zc(t,r);case ou:case au:case iu:case su:case cu:case uu:case lu:case fu:case du:return Mn(t,r);case Yc:return new n;case Kc:case tu:return new n(t);case Xc:return Jc(t);case Zc:return new n;case eu:return Wc(t)}}function An(t){return typeof t.constructor=="function"&&!Be(t)?ri(Je(t)):{}}var hu="[object Map]";function mu(t){return K(t)&&Wt(t)==hu}var Pn=jt&&jt.isMap,vu=Pn?Fe(Pn):mu;const gu=vu;var yu="[object Set]";function bu(t){return K(t)&&Wt(t)==yu}var xn=jt&&jt.isSet,_u=xn?Fe(xn):bu;const Su=_u;var ju=1,Cu=2,Ou=4,In="[object Arguments]",wu="[object Array]",Eu="[object Boolean]",$u="[object Date]",Nu="[object Error]",Dn="[object Function]",Tu="[object GeneratorFunction]",Mu="[object Map]",Au="[object Number]",Rn="[object Object]",Pu="[object RegExp]",xu="[object Set]",Iu="[object String]",Du="[object Symbol]",Ru="[object WeakMap]",Lu="[object ArrayBuffer]",Bu="[object DataView]",Fu="[object Float32Array]",Uu="[object Float64Array]",ku="[object Int8Array]",Vu="[object Int16Array]",Gu="[object Int32Array]",zu="[object Uint8Array]",Hu="[object Uint8ClampedArray]",Ju="[object Uint16Array]",Wu="[object Uint32Array]",$={};$[In]=$[wu]=$[Lu]=$[Bu]=$[Eu]=$[$u]=$[Fu]=$[Uu]=$[ku]=$[Vu]=$[Gu]=$[Mu]=$[Au]=$[Rn]=$[Pu]=$[xu]=$[Iu]=$[Du]=$[zu]=$[Hu]=$[Ju]=$[Wu]=!0,$[Nu]=$[Dn]=$[Ru]=!1;function Qt(t,e,r,n,o,a){var s,i=e&ju,c=e&Cu,u=e&Ou;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!H(t))return t;var l=D(t);if(l){if(s=Vc(t),!i)return Yr(t,s)}else{var d=Wt(t),f=d==Dn||d==Tu;if(Vt(t))return yn(t,i);if(d==Rn||d==In||f&&!o){if(s=c||f?{}:An(t),!i)return c?Mc(t,Sc(s,t)):$c(t,_c(s,t))}else{if(!$[d])return o?t:{};s=pu(t,d,i)}}a||(a=new J);var p=a.get(t);if(p)return p;a.set(t,s),Su(t)?t.forEach(function(_){s.add(Qt(_,e,r,_,t,a))}):gu(t)&&t.forEach(function(_,C){s.set(C,Qt(_,e,r,C,t,a))});var h=u?c?qe:Qe:c?zt:le,y=l?void 0:h(t);return pi(y||t,function(_,C){y&&(C=_,_=t[C]),Re(s,C,Qt(_,e,r,C,t,a))}),s}var Qu=1,qu=4;function Ln(t){return Qt(t,Qu|qu)}var Yu="__lodash_hash_undefined__";function Ku(t){return this.__data__.set(t,Yu),this}function Xu(t){return this.__data__.has(t)}function qt(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new rt;++e<r;)this.add(t[e])}qt.prototype.add=qt.prototype.push=Ku,qt.prototype.has=Xu;function Zu(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Bn(t,e){return t.has(e)}var tl=1,el=2;function Fn(t,e,r,n,o,a){var s=r&tl,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var d=-1,f=!0,p=r&el?new qt:void 0;for(a.set(t,e),a.set(e,t);++d<i;){var h=t[d],y=e[d];if(n)var _=s?n(y,h,d,e,t,a):n(h,y,d,t,e,a);if(_!==void 0){if(_)continue;f=!1;break}if(p){if(!Zu(e,function(C,O){if(!Bn(p,O)&&(h===C||o(h,C,r,n,a)))return p.push(O)})){f=!1;break}}else if(!(h===y||o(h,y,r,n,a))){f=!1;break}}return a.delete(t),a.delete(e),f}function rl(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Ze(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var nl=1,ol=2,al="[object Boolean]",il="[object Date]",sl="[object Error]",cl="[object Map]",ul="[object Number]",ll="[object RegExp]",fl="[object Set]",dl="[object String]",pl="[object Symbol]",hl="[object ArrayBuffer]",ml="[object DataView]",Un=V?V.prototype:void 0,tr=Un?Un.valueOf:void 0;function vl(t,e,r,n,o,a,s){switch(r){case ml:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hl:return!(t.byteLength!=e.byteLength||!a(new he(t),new he(e)));case al:case il:case ul:return Ut(+t,+e);case sl:return t.name==e.name&&t.message==e.message;case ll:case dl:return t==e+"";case cl:var i=rl;case fl:var c=n&nl;if(i||(i=Ze),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=ol,s.set(t,e);var l=Fn(i(t),i(e),n,o,a,s);return s.delete(t),l;case pl:if(tr)return tr.call(t)==tr.call(e)}return!1}var gl=1,yl=Object.prototype,bl=yl.hasOwnProperty;function _l(t,e,r,n,o,a){var s=r&gl,i=Qe(t),c=i.length,u=Qe(e),l=u.length;if(c!=l&&!s)return!1;for(var d=c;d--;){var f=i[d];if(!(s?f in e:bl.call(e,f)))return!1}var p=a.get(t),h=a.get(e);if(p&&h)return p==e&&h==t;var y=!0;a.set(t,e),a.set(e,t);for(var _=s;++d<c;){f=i[d];var C=t[f],O=e[f];if(n)var P=s?n(O,C,f,e,t,a):n(C,O,f,t,e,a);if(!(P===void 0?C===O||o(C,O,r,n,a):P)){y=!1;break}_||(_=f=="constructor")}if(y&&!_){var x=t.constructor,L=e.constructor;x!=L&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof L=="function"&&L instanceof L)&&(y=!1)}return a.delete(t),a.delete(e),y}var Sl=1,kn="[object Arguments]",Vn="[object Array]",me="[object Object]",jl=Object.prototype,Gn=jl.hasOwnProperty;function Cl(t,e,r,n,o,a){var s=D(t),i=D(e),c=s?Vn:Wt(t),u=i?Vn:Wt(e);c=c==kn?me:c,u=u==kn?me:u;var l=c==me,d=u==me,f=c==u;if(f&&Vt(t)){if(!Vt(e))return!1;s=!0,l=!1}if(f&&!l)return a||(a=new J),s||ke(t)?Fn(t,e,r,n,o,a):vl(t,e,c,r,n,o,a);if(!(r&Sl)){var p=l&&Gn.call(t,"__wrapped__"),h=d&&Gn.call(e,"__wrapped__");if(p||h){var y=p?t.value():t,_=h?e.value():e;return a||(a=new J),o(y,_,r,n,a)}}return f?(a||(a=new J),_l(t,e,r,n,o,a)):!1}function er(t,e,r,n,o){return t===e?!0:t==null||e==null||!K(t)&&!K(e)?t!==t&&e!==e:Cl(t,e,r,n,er,o)}var Ol=1,wl=2;function El(t,e,r,n){var o=r.length,a=o,s=!n;if(t==null)return!a;for(t=Object(t);o--;){var i=r[o];if(s&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){i=r[o];var c=i[0],u=t[c],l=i[1];if(s&&i[2]){if(u===void 0&&!(c in t))return!1}else{var d=new J;if(n)var f=n(u,l,c,t,e,d);if(!(f===void 0?er(l,u,Ol|wl,n,d):f))return!1}}return!0}function zn(t){return t===t&&!H(t)}function $l(t){for(var e=le(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,zn(o)]}return e}function Hn(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Nl(t){var e=$l(t);return e.length==1&&e[0][2]?Hn(e[0][0],e[0][1]):function(r){return r===t||El(r,t,e)}}function Tl(t,e){return t!=null&&e in Object(t)}function Ml(t,e,r){e=Ct(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=Ot(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=o?a:(o=t==null?0:t.length,!!o&&Le(o)&&ce(s,o)&&(D(t)||kt(t)))}function Al(t,e){return t!=null&&Ml(t,e,Tl)}var Pl=1,xl=2;function Il(t,e){return Ve(t)&&zn(e)?Hn(Ot(t),e):function(r){var n=fn(r,t);return n===void 0&&n===e?Al(r,t):er(e,n,Pl|xl)}}function Dl(t){return function(e){return e==null?void 0:e[t]}}function Rl(t){return function(e){return pe(e,t)}}function Ll(t){return Ve(t)?Dl(Ot(t)):Rl(t)}function rr(t){return typeof t=="function"?t:t==null?Ae:typeof t=="object"?D(t)?Il(t[0],t[1]):Nl(t):Ll(t)}function Bl(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var Fl=Bl();const Ul=Fl;function nr(t,e,r){(r!==void 0&&!Ut(t[e],r)||r===void 0&&!(e in t))&&De(t,e,r)}function or(t){return K(t)&&ue(t)}function ar(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function kl(t){return St(t,zt(t))}function Vl(t,e,r,n,o,a,s){var i=ar(t,r),c=ar(e,r),u=s.get(c);if(u){nr(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,d=l===void 0;if(d){var f=D(c),p=!f&&Vt(c),h=!f&&!p&&ke(c);l=c,f||p||h?D(i)?l=i:or(i)?l=Yr(i):p?(d=!1,l=yn(c,!0)):h?(d=!1,l=Mn(c,!0)):l=[]:B(c)||kt(c)?(l=i,kt(i)?l=kl(i):(!H(i)||Pe(i))&&(l=An(c))):d=!1}d&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),nr(t,r,l)}function Jn(t,e,r,n,o){t!==e&&Ul(e,function(a,s){if(o||(o=new J),H(a))Vl(t,e,s,r,Jn,n,o);else{var i=n?n(ar(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),nr(t,s,i)}},zt)}function Gl(t,e,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function Wn(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function zl(t,e){return e.length<2?t:pe(t,pc(e,0,-1))}var Hl=wi(function(t,e,r){Jn(t,e,r)});const Qn=Hl;var Jl="Expected a function";function Wl(t){if(typeof t!="function")throw new TypeError(Jl);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Ql(t,e){return e=Ct(e,t),t=zl(t,e),t==null||delete t[Ot(Wn(e))]}function ql(t){return B(t)?void 0:t}var Yl=1,Kl=2,Xl=4,Zl=ic(function(t,e){var r={};if(t==null)return r;var n=!1;e=Me(e,function(a){return a=Ct(a,t),n||(n=a.length>1),a}),St(t,qe(t),r),n&&(r=Qt(r,Yl|Kl|Xl,ql));for(var o=e.length;o--;)Ql(r,e[o]);return r});const qn=Zl;function tf(t,e,r,n){if(!H(t))return t;e=Ct(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=Ot(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var l=i[c];u=n?n(l,c,i):void 0,u===void 0&&(u=H(l)?l:ce(e[o+1])?[]:{})}Re(i,c,u),i=i[c]}return t}function ef(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=pe(t,s);r(i,s)&&tf(a,Ct(s,t),i)}return a}function rf(t,e){if(t==null)return{};var r=Me(qe(t),function(n){return[n]});return e=rr(e),ef(t,r,function(n,o){return e(n,o[0])})}function nf(t,e){return rf(t,Wl(rr(e)))}var of=1/0,af=wt&&1/Ze(new wt([,-0]))[1]==of?function(t){return new wt(t)}:oi;const sf=af;var cf=200;function uf(t,e,r){var n=-1,o=yi,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=Gl;else if(a>=cf){var u=e?null:sf(t);if(u)return Ze(u);s=!1,o=Bn,c=new qt}else c=e?[]:i;t:for(;++n<a;){var l=t[n],d=e?e(l):l;if(l=r||l!==0?l:0,s&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue t;e&&c.push(d),i.push(l)}else o(c,d,r)||(c!==i&&c.push(d),i.push(l))}return i}var lf=tn(function(t){var e=Wn(t);return or(e)&&(e=void 0),uf(He(t,1,or,!0),rr(e))});const ff=lf;class Yn extends TypeError{constructor(e,r){let n;const{message:o,...a}=e,{path:s}=e,i=s.length===0?o:"At path: "+s.join(".")+" -- "+o;super(i),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var c;return(c=n)!=null?c:n=[e,...r()]}}}function df(t){return W(t)&&typeof t[Symbol.iterator]=="function"}function W(t){return typeof t=="object"&&t!=null}function k(t){return typeof t=="string"?JSON.stringify(t):""+t}function pf(t){const{done:e,value:r}=t.next();return e?void 0:r}function hf(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:o,branch:a}=e,{type:s}=r,{refinement:i,message:c="Expected a value of type `"+s+"`"+(i?" with refinement `"+i+"`":"")+", but received: `"+k(n)+"`"}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*Kn(t,e,r,n){df(t)||(t=[t]);for(const o of t){const a=hf(o,e,r,n);a&&(yield a)}}function*ir(t,e,r){r===void 0&&(r={});const{path:n=[],branch:o=[t],coerce:a=!1,mask:s=!1}=r,i={path:n,branch:o};if(a&&(t=e.coercer(t,i),s&&e.type!=="type"&&W(e.schema)&&W(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,i))c="not_valid",yield[u,void 0];for(let[u,l,d]of e.entries(t,i)){const f=ir(l,d,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,l],coerce:a,mask:s});for(const p of f)p[0]?(c=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(l=p[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):W(t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,i))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class X{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:o,refiner:a,coercer:s=c=>c,entries:i=function*(){}}=e;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(c,u)=>{const l=o(c,u);return Kn(l,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const l=a(c,u);return Kn(l,u,this,c)}:this.refiner=()=>[]}assert(e){return Xn(e,this)}create(e){return mf(e,this)}is(e){return gf(e,this)}mask(e){return vf(e,this)}validate(e,r){return r===void 0&&(r={}),Et(e,this,r)}}function Xn(t,e){const r=Et(t,e);if(r[0])throw r[0]}function mf(t,e){const r=Et(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function vf(t,e){const r=Et(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function gf(t,e){return!Et(t,e)[0]}function Et(t,e,r){r===void 0&&(r={});const n=ir(t,e,r),o=pf(n);return o[0]?[new Yn(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function sr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=e[0].type==="type",o=e.map(s=>s.schema),a=Object.assign({},...o);return n?ro(a):w(a)}function at(t,e){return new X({type:t,schema:null,validator:e})}function $t(t){return new X({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function Zn(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return ro(n);default:return w(n)}}function M(){return at("any",()=>!0)}function I(t){return new X({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||"Expected an array value, but received: "+k(e)}})}function ht(){return at("boolean",t=>typeof t=="boolean")}function cr(t){const e={},r=t.map(n=>k(n)).join();for(const n of t)e[n]=n;return new X({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+k(n)}})}function to(){return at("func",t=>typeof t=="function"||"Expected a function, but received: "+k(t))}function F(t){const e=k(t),r=typeof t;return new X({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+k(n)}})}function yf(){return at("never",()=>!1)}function eo(){return at("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+k(t))}function w(t){const e=t?Object.keys(t):[],r=yf();return new X({type:"object",schema:t||null,*entries(n){if(t&&W(n)){const o=new Set(Object.keys(n));for(const a of e)o.delete(a),yield[a,n[a],t[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return W(n)||"Expected an object, but received: "+k(n)},coercer(n){return W(n)?{...n}:n}})}function m(t){return new X({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Yt(t,e){return new X({type:"record",schema:null,*entries(r){if(W(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return W(r)||"Expected an object, but received: "+k(r)}})}function v(){return at("string",t=>typeof t=="string"||"Expected a string, but received: "+k(t))}function ro(t){const e=Object.keys(t);return new X({type:"type",schema:t,*entries(r){if(W(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return W(r)||"Expected an object, but received: "+k(r)}})}function U(t){const e=t.map(r=>r.type).join(" | ");return new X({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||bf()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=ir(r,a,n),[i]=s;if(i[0])for(const[c]of s)c&&o.push(c);else return[]}return["Expected the value to satisfy a union of `"+e+"`, but received: "+k(r),...o]}})}function bf(){return at("unknown",()=>!0)}const ur=w({package:v(),version:v(),name:v(),exportName:m(v()),destructuring:m(ht()),subName:m(v()),main:m(v()),cssPaths:m(I(v()))}),_f=I(ur),Sf=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var G=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(G||{}),lr=(t=>(t.DESIGN="design",t.SAVE="save",t))(lr||{}),fr=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(fr||{});const jf=()=>at("normalObj",t=>!B(t)||[G.SLOT,G.EXPRESSION,G.FUNCTION].includes(t==null?void 0:t.type)?!1:(Et(t,Yt(v(),dr)),!0)),dr=U([v(),eo(),ht(),w({type:F(G.SLOT),renderType:cr([fr.FUNC,fr.COMP]),params:m(I(v())),value:$t(()=>U([Nt,I(Nt)]))}),w({type:F(G.EXPRESSION),value:v()}),w({type:F(G.FUNCTION),value:v()}),jf(),I($t(()=>dr))]),no=w({type:F(G.EXPRESSION),value:v()}),Nt=w({id:m(v()),title:m(v()),componentName:v(),props:m(Yt(v(),dr)),nodeName:m(v()),state:m(Yt(v(),M())),children:$t(()=>m(I(U([v(),Nt])))),configure:m(M()),css:m(M()),style:m(M()),classNames:m(I(M())),refId:m(v()),extra:m(Yt(M(),M())),condition:m(U([ht(),no])),loop:m(w({open:ht(),data:U([I(M()),no]),args:m(I(v())),forName:m(v()),forIndex:m(v()),key:m(M()),name:m(v())})),methods:m(I(M()))}),ve=U([v(),w({label:v(),tip:m(v())})]),Cf=w({type:F("shape"),value:I(w({name:v(),title:ve,valueType:$t(()=>ge)}))}),Of=w({type:F("enums"),value:I(v())});w({type:F("array"),value:$t(()=>ge)});const wf=w({type:F("array"),value:$t(()=>I(ge))}),ge=U([cr(["array","boolean","number","object","string"]),cr(["component","expression","function"]),Cf,Of,wf]),Ef=U([v(),w({componentName:v(),props:m(M()),initialValue:m(M()),component:m(M()),hiddenLabel:m(ht())})]),pr=w({name:v(),title:ve,valueType:ge,description:m(v()),defaultValue:M(),setters:m(I(Ef)),condition:m(to())});U([v(),to()]);var hr=(t=>(t.SINGLE="single",t.GROUP="group",t))(hr||{});U([v(),w({name:v(),describe:m(v()),params:m(w({name:v(),description:v()})),template:v()})]);const $f=w({id:m(v()),title:v(),snapshot:U([v(),M()]),snapshotText:m(v()),description:m(v()),tags:m(I(v())),groupName:m(v()),category:m(v()),schema:sr(Zn(Nt,["id"]),w({componentName:m(v())}))}),Nf=w({componentName:v(),title:v(),screenshot:m(v()),icon:m(v()),tags:m(I(v())),groupName:m(v()),category:m(v()),priority:m(eo()),npm:m(ur),snippets:I($f),props:I(U([pr,w({title:m(ve),type:F("single"),content:pr}),w({title:m(ve),type:F("group"),content:I(pr)})])),fixedProps:m(M()),isContainer:m(U([ht(),w({placeholder:v(),width:v(),height:v()})])),disableEditorDragDom:m(M()),isLayout:m(ht()),rootSelector:m(v()),advanceCustom:m(M()),extra:m(Yt(M(),M()))}),Tf=t=>({data:e,message:r,throwError:n})=>{const o=t({data:e,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
|
|
2
2
|
originData: ${JSON.stringify(e)}`):new Error(`${JSON.stringify(e)}
|
|
3
3
|
data struct format is invalidate`);return o.message||r?console.warn(`${o.message||r}
|
|
4
4
|
originData: ${JSON.stringify(e)}`):console.warn(`${JSON.stringify(e)}
|
|
5
|
-
data struct format is invalidate`),o},mr=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return Tf(({data:a})=>{try{return
|
|
6
|
-
`)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var Tt=(t=>(t.ROOT_CONTAINER="RootContainer",t))(Tt||{});const Af=w({type:F(G.FUNCTION),value:v()}),Mf=sr(Xn(Nt,["componentName"]),w({componentName:F("RootContainer")}));function Pf(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}const Kt=Pf(),xf=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new vt([]);return e&&(o=e.materialsMode||new vt([])),n&&(I(n)?r.value=n.map(a=>new M(a,{parent:e,materials:o})):B(n)&&r.value.push(new M(n,{parent:e,materials:o}))),r};class At{constructor(e,r){j(this,"nodeType","SLOT"),j(this,"rawData"),j(this,"parent"),j(this,"emitter",Kt),j(this,"data"),j(this,"id"),j(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new vt([]);this.materialsMode=n,this.id=Z(),this.data=xf(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof M)return o.export(e);if(B(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return I(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const no=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===hr.SINGLE?e.push(n.content):n.type===hr.GROUP&&(e=[...e,...no(n.content)]):e.push(r)}),e},vr=(t,e,r)=>{if(t.type)return t.type===G.SLOT?new At(t,{parent:e,materials:r}):t;if(B(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=gr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>vr(n,e,r)):t},gr=(t,e,r)=>B(t)?vr(t,e,r):I(t)?t.map(n=>vr(n,e,r)):t;class it{constructor(e,r,n){j(this,"nodeType","PROP"),j(this,"rawData"),j(this,"parent"),j(this,"emitter",Kt),j(this,"data"),j(this,"name"),j(this,"materialsMode");const o=(n==null?void 0:n.materials)||new vt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=gr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=gr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof At)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof M){const r=e.material;return no((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(e){const r=this.data,n=o=>{if(o instanceof it||o instanceof At||o instanceof M)return o.export(e);if(I(o))return o.map(a=>n(a));if(B(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Df=t=>{if(typeof t=="string")return!0;mr({data:t,dataStruct:Nt,throwError:!1})},oo=(t,e,r=new vt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??Z(),children:[],props:{},methods:t.methods||[],configure:Wn(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var s;const i=(s=t.props)==null?void 0:s[a];if(i instanceof it){n.props[a]=i;return}n.props[a]=new it(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof M)return a;if(B(a)){const s=a;return new M(s,{parent:e,materials:r})}else return a}):(t.children instanceof M&&(n.children=[t.children]),n.children=[new M(t.children,{parent:e,materials:r})])),n};class M{constructor(e,r){j(this,"nodeType","NODE"),j(this,"rawData"),j(this,"data"),j(this,"emitter",Kt),j(this,"parent"),j(this,"materialsModel"),j(this,"listenerHandle"),j(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Df(e);const n=(r==null?void 0:r.materials)||new vt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=oo(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}destroy(){this.listenerHandle.forEach(e=>e())}get id(){return this.data.id}get value(){return this.data}clone(e){const r={...this.export("design"),id:e||Z()};return new M(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=oo(r,this),r}updateValue(e){const r=this.data,n=this.updateWithPlainObj(e);this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return _r(this,e)}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof M?l.export(e):l),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(l=>{const d=ln(i,l,!1);d&&(c[l]=d)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let u={...n,configure:s,props:o,children:a,condition:n.condition};return e==="design"&&delete u.id,u=br(u),u}}const ao=(t,e,r)=>{const n={...t,id:Z(),props:{},componentName:Tt.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:Wn(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];I(t.children)?o=t.children.map(s=>s instanceof M?s:B(s)?new M(s,{parent:e,materials:r}):s):t.children instanceof M?o.push(t.children):t.children&&B(t.children)&&o.push(new M(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(s=>{var i;const c=(i=t.props)==null?void 0:i[s];c instanceof it?n.props[s]=c:n.props[s]=new it(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Xt{constructor(e,{parent:r,materials:n}){j(this,"rawData"),j(this,"data"),j(this,"nodeType",Tt.ROOT_CONTAINER),j(this,"emitter",Kt),j(this,"materialsModel"),j(this,"listenerHandle"),j(this,"onChangeCbQueue"),j(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=ao(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}updateWithPlainObj(e){const r={...this.data,...e};return this.data=ao(r,this,this.materialsModel),r}updateValue(e){const r=this.data;this.updateWithPlainObj(e),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return _r(this,e)}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e=lr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c),condition:n.condition};let i=Qn(s,["id"]);return i=br(i),i}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(e=>e())}clone(e){const r={...this.export("design"),id:e||Z()};return new Xt(r,{materials:this.materialsModel,parent:null})}}const mt=t=>(t==null?void 0:t.type)===G.EXPRESSION,If=t=>(t==null?void 0:t.type)===G.FUNCTION,Z=()=>Math.random().toString(32).slice(3,9),Rf=t=>(t==null?void 0:t.nodeType)==="NODE",yr=t=>(t==null?void 0:t.nodeType)==="PROP",Lf=t=>(t==null?void 0:t.nodeType)==="SLOT",br=t=>nf(t,e=>B(e)?!Object.keys(e).length:I(e)?!e.length:!e);function Bf(t,e){const r=[t];for(;r.length;){const n=r.shift();if(n&&e(n))return n;const o=(n==null?void 0:n.props)||{},a=i=>{if(i instanceof M){r.push(i);return}if(i instanceof At&&a(i.value.value),i instanceof it){a(i.value);return}if(B(i)){const c=i;Object.keys(c).forEach(u=>{a(c[u])});return}if(I(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof M))||[];r.push(...s)}}function _r(t,e){return Bf(t,r=>r.id===e)}const Ff=t=>{const e=Rn(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${Z()}`,title:n.title||t.title,category:n.category||t.category,tags:[...n.tags||[],...t.tags||[]],groupName:n.groupName||t.groupName,snapshot:n.snapshot||t.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||t.componentName}})),e};class Uf{constructor(e){j(this,"rawData"),j(this,"data"),this.rawData=e,this.data=Ff(e)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(e){return this.data.snippets.find(r=>r.id===e)}}const io=t=>{if(!I(t))throw new Error("Materials must be a array");return t.map(e=>new Uf(e))},kf=t=>{t==null||t.forEach(e=>{mr({data:e,dataStruct:Nf,throwError:!1})})};class vt{constructor(e){j(this,"rawData"),j(this,"data"),j(this,"usedMaterials",[]),this.rawData=e,kf(e),this.data=io(e)}addMaterials(e){const r=io(e);this.data.push(...r)}removeMaterial(e){const r=this.data.filter(n=>!e.includes(n.componentName));this.data=r}findByComponentName(e){return this.data.find(r=>r.componentName===e)}findSnippetById(e){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(e)}return n}getAllSnippets(){const e=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});let o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(d=>{const f=d.category||"default";s.includes(f)||(s.push(f),i[f]=[]),i[f].push(d)});const u=[];s.forEach(d=>{i[d].length&&u.push({name:d,list:i[d]})});const l={name:a,list:u};o.push(l)}}),o=o.sort((a,s)=>(a.name||"")>(s.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const Vf=w({version:v(),name:v(),css:m(v()),renderType:m(U([F("COMPONENT"),F("PAGE")])),loadType:m(A()),lifecycle:m(A()),props:m(A()),methods:m(D(Af)),componentsMeta:D(sr(w({componentName:v()}),ur)),thirdLibs:m(_f),componentsTree:Mf,assets:m(D(A()))}),so=t=>(mr({data:t,dataStruct:Vf,throwError:!1}),t),Sr=(t,e,r)=>({...t,componentsTree:new Xt(t.componentsTree,{parent:e,materials:r})});class ye{constructor(e,r){j(this,"nodeType","PAGE"),j(this,"rawData"),j(this,"emitter",Kt),j(this,"data"),j(this,"parent"),j(this,"materialsModel"),j(this,"assetPackagesList"),so(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new vt((r==null?void 0:r.materials)||[]),this.data=Sr(e,this,this.materialsModel),this.assetPackagesList=[...(r==null?void 0:r.assetPackagesList)||[],...this.data.assets||[]]}updatePage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=Sr(e,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=Sr(e,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(e){if(!e)return;const r=this.data.componentsTree;return _r(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Xt)return console.warn("Not found parent node"),!1;if(a instanceof it)return console.warn("CProp can not add node"),!1;if(a instanceof At){const i=a.value.value,c=i.findIndex(u=>u===r)??-1;return c>=0?(n==="BEFORE"?i.splice(c,0,e):i.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ye)return!1;const s=(a==null?void 0:a.value.children.findIndex(i=>i===r))??-1;return s>=0?(n==="BEFORE"?a==null||a.value.children.splice(s,0,e):a==null||a.value.children.splice(s+1,0,e),e.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(n==="CHILD_START")return r.value.children.unshift(e),e.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(e),e.parent=r,r.updateValue(),!0;if(B(n)){const a=n;if(a.type==="CHILD"){const s=a.pos,i=a.index||0;return s==="BEFORE"?r==null||r.value.children.splice(i,0,e):r==null||r.value.children.splice(i+1,0,e),e.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(e){return delete e.id,new M(e,{parent:null,materials:this.materialsModel})}addNodeById(e,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(e,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(e){const r=e.export("design");r.id=Z();const n=new M(r,{parent:e.parent,materials:this.materialsModel});return this.addNode(n,e,"AFTER"),n}copyNodeById(e){const r=this.getNode(e);return r&&r instanceof M?this.copyNode(r):!1}moveNode(e,r,n){this.deleteNode(e);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),e.parent=o,this.addNode(e,r,n)}moveNodeById(e,r,n){const o=this.getNode(e),a=this.getNode(r);return o&&a&&o instanceof M&&a instanceof M?this.moveNode(o,a,n):!1}deleteNode(e){var r;const n=e.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof At){const o=n.value.value,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),s}if(n instanceof M||n instanceof Xt){const o=n.value.children,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),n.updateValue(),s}}deleteNodeById(e){const r=this.getNode(e);if(r)return this.deleteNode(r)}export(e=lr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const u=o.find(l=>{var d;return l.package===((d=c.value.npm)==null?void 0:d.package)});return u&&a.push(u),{componentName:c.componentName,...Rn(c.value.npm||{})}}).filter(c=>c.componentName&&c.package&&c.version?!0:(console.warn(`${c} not a valid material info`),!1));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:br(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(l=>c.package===l.package);u&&a.push(u)}),i.assets=ff(a,c=>c.package),i=Qn(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}Tt.ROOT_CONTAINER;var Gf=typeof global=="object"&&global&&global.Object===Object&&global;const co=Gf;var zf=typeof self=="object"&&self&&self.Object===Object&&self,Hf=co||zf||Function("return this")();const Mt=Hf;var Jf=Mt.Symbol;const Pt=Jf;var uo=Object.prototype,Wf=uo.hasOwnProperty,Qf=uo.toString,Zt=Pt?Pt.toStringTag:void 0;function qf(t){var e=Wf.call(t,Zt),r=t[Zt];try{t[Zt]=void 0;var n=!0}catch{}var o=Qf.call(t);return n&&(e?t[Zt]=r:delete t[Zt]),o}var Yf=Object.prototype,Kf=Yf.toString;function Xf(t){return Kf.call(t)}var Zf="[object Null]",td="[object Undefined]",lo=Pt?Pt.toStringTag:void 0;function te(t){return t==null?t===void 0?td:Zf:lo&&lo in Object(t)?qf(t):Xf(t)}function xt(t){return t!=null&&typeof t=="object"}var ed="[object Symbol]";function rd(t){return typeof t=="symbol"||xt(t)&&te(t)==ed}function nd(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var od=Array.isArray;const Dt=od;var ad=1/0,fo=Pt?Pt.prototype:void 0,po=fo?fo.toString:void 0;function ho(t){if(typeof t=="string")return t;if(Dt(t))return nd(t,ho)+"";if(rd(t))return po?po.call(t):"";var e=t+"";return e=="0"&&1/t==-ad?"-0":e}function gt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function mo(t){return t}var id="[object AsyncFunction]",sd="[object Function]",cd="[object GeneratorFunction]",ud="[object Proxy]";function jr(t){if(!gt(t))return!1;var e=te(t);return e==sd||e==cd||e==id||e==ud}var ld=Mt["__core-js_shared__"];const Or=ld;var vo=function(){var t=/[^.]+$/.exec(Or&&Or.keys&&Or.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function fd(t){return!!vo&&vo in t}var dd=Function.prototype,pd=dd.toString;function hd(t){if(t!=null){try{return pd.call(t)}catch{}try{return t+""}catch{}}return""}var md=/[\\^$.*+?()[\]{}|]/g,vd=/^\[object .+?Constructor\]$/,gd=Function.prototype,yd=Object.prototype,bd=gd.toString,_d=yd.hasOwnProperty,Sd=RegExp("^"+bd.call(_d).replace(md,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jd(t){if(!gt(t)||fd(t))return!1;var e=jr(t)?Sd:vd;return e.test(hd(t))}function Od(t,e){return t==null?void 0:t[e]}function Cr(t,e){var r=Od(t,e);return jd(r)?r:void 0}var go=Object.create,Cd=function(){function t(){}return function(e){if(!gt(e))return{};if(go)return go(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const wd=Cd;function Ed(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function $d(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Nd=800,Td=16,Ad=Date.now;function Md(t){var e=0,r=0;return function(){var n=Ad(),o=Td-(n-r);if(r=n,o>0){if(++e>=Nd)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Pd(t){return function(){return t}}var xd=function(){try{var t=Cr(Object,"defineProperty");return t({},"",{}),t}catch{}}();const be=xd;var Dd=be?function(t,e){return be(t,"toString",{configurable:!0,enumerable:!1,value:Pd(e),writable:!0})}:mo,Id=Md(Dd);const Rd=Id;var Ld=9007199254740991,Bd=/^(?:0|[1-9]\d*)$/;function yo(t,e){var r=typeof t;return e=e??Ld,!!e&&(r=="number"||r!="symbol"&&Bd.test(t))&&t>-1&&t%1==0&&t<e}function wr(t,e,r){e=="__proto__"&&be?be(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function _e(t,e){return t===e||t!==t&&e!==e}var Fd=Object.prototype,Ud=Fd.hasOwnProperty;function kd(t,e,r){var n=t[e];(!(Ud.call(t,e)&&_e(n,r))||r===void 0&&!(e in t))&&wr(t,e,r)}function Vd(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?wr(r,i,c):kd(r,i,c)}return r}var bo=Math.max;function Gd(t,e,r){return e=bo(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=bo(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),Ed(t,this,i)}}function zd(t,e){return Rd(Gd(t,e,mo),t+"")}var Hd=9007199254740991;function _o(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Hd}function Er(t){return t!=null&&_o(t.length)&&!jr(t)}function Jd(t,e,r){if(!gt(r))return!1;var n=typeof e;return(n=="number"?Er(r)&&yo(e,r.length):n=="string"&&e in r)?_e(r[e],t):!1}function Wd(t){return zd(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&Jd(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var Qd=Object.prototype;function So(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Qd;return t===r}function qd(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Yd="[object Arguments]";function jo(t){return xt(t)&&te(t)==Yd}var Oo=Object.prototype,Kd=Oo.hasOwnProperty,Xd=Oo.propertyIsEnumerable,Zd=jo(function(){return arguments}())?jo:function(t){return xt(t)&&Kd.call(t,"callee")&&!Xd.call(t,"callee")};const $r=Zd;function tp(){return!1}var Co=typeof g=="object"&&g&&!g.nodeType&&g,wo=Co&&typeof module=="object"&&module&&!module.nodeType&&module,ep=wo&&wo.exports===Co,Eo=ep?Mt.Buffer:void 0,rp=Eo?Eo.isBuffer:void 0,np=rp||tp;const $o=np;var op="[object Arguments]",ap="[object Array]",ip="[object Boolean]",sp="[object Date]",cp="[object Error]",up="[object Function]",lp="[object Map]",fp="[object Number]",dp="[object Object]",pp="[object RegExp]",hp="[object Set]",mp="[object String]",vp="[object WeakMap]",gp="[object ArrayBuffer]",yp="[object DataView]",bp="[object Float32Array]",_p="[object Float64Array]",Sp="[object Int8Array]",jp="[object Int16Array]",Op="[object Int32Array]",Cp="[object Uint8Array]",wp="[object Uint8ClampedArray]",Ep="[object Uint16Array]",$p="[object Uint32Array]",T={};T[bp]=T[_p]=T[Sp]=T[jp]=T[Op]=T[Cp]=T[wp]=T[Ep]=T[$p]=!0,T[op]=T[ap]=T[gp]=T[ip]=T[yp]=T[sp]=T[cp]=T[up]=T[lp]=T[fp]=T[dp]=T[pp]=T[hp]=T[mp]=T[vp]=!1;function Np(t){return xt(t)&&_o(t.length)&&!!T[te(t)]}function Tp(t){return function(e){return t(e)}}var No=typeof g=="object"&&g&&!g.nodeType&&g,ee=No&&typeof module=="object"&&module&&!module.nodeType&&module,Ap=ee&&ee.exports===No,Nr=Ap&&co.process,Mp=function(){try{var t=ee&&ee.require&&ee.require("util").types;return t||Nr&&Nr.binding&&Nr.binding("util")}catch{}}();const To=Mp;var Ao=To&&To.isTypedArray,Pp=Ao?Tp(Ao):Np;const Mo=Pp;var xp=Object.prototype,Dp=xp.hasOwnProperty;function Ip(t,e){var r=Dt(t),n=!r&&$r(t),o=!r&&!n&&$o(t),a=!r&&!n&&!o&&Mo(t),s=r||n||o||a,i=s?qd(t.length,String):[],c=i.length;for(var u in t)(e||Dp.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yo(u,c)))&&i.push(u);return i}function Rp(t,e){return function(r){return t(e(r))}}function Lp(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Bp=Object.prototype,Fp=Bp.hasOwnProperty;function Up(t){if(!gt(t))return Lp(t);var e=So(t),r=[];for(var n in t)n=="constructor"&&(e||!Fp.call(t,n))||r.push(n);return r}function Po(t){return Er(t)?Ip(t,!0):Up(t)}var kp=Cr(Object,"create");const re=kp;function Vp(){this.__data__=re?re(null):{},this.size=0}function Gp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var zp="__lodash_hash_undefined__",Hp=Object.prototype,Jp=Hp.hasOwnProperty;function Wp(t){var e=this.__data__;if(re){var r=e[t];return r===zp?void 0:r}return Jp.call(e,t)?e[t]:void 0}var Qp=Object.prototype,qp=Qp.hasOwnProperty;function Yp(t){var e=this.__data__;return re?e[t]!==void 0:qp.call(e,t)}var Kp="__lodash_hash_undefined__";function Xp(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=re&&e===void 0?Kp:e,this}function yt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}yt.prototype.clear=Vp,yt.prototype.delete=Gp,yt.prototype.get=Wp,yt.prototype.has=Yp,yt.prototype.set=Xp;function Zp(){this.__data__=[],this.size=0}function Se(t,e){for(var r=t.length;r--;)if(_e(t[r][0],e))return r;return-1}var th=Array.prototype,eh=th.splice;function rh(t){var e=this.__data__,r=Se(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():eh.call(e,r,1),--this.size,!0}function nh(t){var e=this.__data__,r=Se(e,t);return r<0?void 0:e[r][1]}function oh(t){return Se(this.__data__,t)>-1}function ah(t,e){var r=this.__data__,n=Se(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function nt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}nt.prototype.clear=Zp,nt.prototype.delete=rh,nt.prototype.get=nh,nt.prototype.has=oh,nt.prototype.set=ah;var ih=Cr(Mt,"Map");const xo=ih;function sh(){this.size=0,this.__data__={hash:new yt,map:new(xo||nt),string:new yt}}function ch(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function je(t,e){var r=t.__data__;return ch(e)?r[typeof e=="string"?"string":"hash"]:r.map}function uh(t){var e=je(this,t).delete(t);return this.size-=e?1:0,e}function lh(t){return je(this,t).get(t)}function fh(t){return je(this,t).has(t)}function dh(t,e){var r=je(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function It(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}It.prototype.clear=sh,It.prototype.delete=uh,It.prototype.get=lh,It.prototype.has=fh,It.prototype.set=dh;function Do(t){return t==null?"":ho(t)}var ph=Rp(Object.getPrototypeOf,Object);const Io=ph;var hh="[object Object]",mh=Function.prototype,vh=Object.prototype,Ro=mh.toString,gh=vh.hasOwnProperty,yh=Ro.call(Object);function Rt(t){if(!xt(t)||te(t)!=hh)return!1;var e=Io(t);if(e===null)return!0;var r=gh.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Ro.call(r)==yh}function bh(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function _h(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:bh(t,e,r)}var Sh="\\ud800-\\udfff",jh="\\u0300-\\u036f",Oh="\\ufe20-\\ufe2f",Ch="\\u20d0-\\u20ff",wh=jh+Oh+Ch,Eh="\\ufe0e\\ufe0f",$h="\\u200d",Nh=RegExp("["+$h+Sh+wh+Eh+"]");function Lo(t){return Nh.test(t)}function Th(t){return t.split("")}var Bo="\\ud800-\\udfff",Ah="\\u0300-\\u036f",Mh="\\ufe20-\\ufe2f",Ph="\\u20d0-\\u20ff",xh=Ah+Mh+Ph,Dh="\\ufe0e\\ufe0f",Ih="["+Bo+"]",Tr="["+xh+"]",Ar="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Tr+"|"+Ar+")",Fo="[^"+Bo+"]",Uo="(?:\\ud83c[\\udde6-\\uddff]){2}",ko="[\\ud800-\\udbff][\\udc00-\\udfff]",Lh="\\u200d",Vo=Rh+"?",Go="["+Dh+"]?",Bh="(?:"+Lh+"(?:"+[Fo,Uo,ko].join("|")+")"+Go+Vo+")*",Fh=Go+Vo+Bh,Uh="(?:"+[Fo+Tr+"?",Tr,Uo,ko,Ih].join("|")+")",kh=RegExp(Ar+"(?="+Ar+")|"+Uh+Fh,"g");function Vh(t){return t.match(kh)||[]}function Gh(t){return Lo(t)?Vh(t):Th(t)}function zh(t){return function(e){e=Do(e);var r=Lo(e)?Gh(e):void 0,n=r?r[0]:e.charAt(0),o=r?_h(r,1).join(""):e.slice(1);return n[t]()+o}}var Hh=zh("toUpperCase");const Jh=Hh;function Wh(t){return Jh(Do(t).toLowerCase())}function Qh(){this.__data__=new nt,this.size=0}function qh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Yh(t){return this.__data__.get(t)}function Kh(t){return this.__data__.has(t)}var Xh=200;function Zh(t,e){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!xo||n.length<Xh-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new It(n)}return r.set(t,e),this.size=r.size,this}function Lt(t){var e=this.__data__=new nt(t);this.size=e.size}Lt.prototype.clear=Qh,Lt.prototype.delete=qh,Lt.prototype.get=Yh,Lt.prototype.has=Kh,Lt.prototype.set=Zh;var zo=typeof g=="object"&&g&&!g.nodeType&&g,Ho=zo&&typeof module=="object"&&module&&!module.nodeType&&module,tm=Ho&&Ho.exports===zo,Jo=tm?Mt.Buffer:void 0,Wo=Jo?Jo.allocUnsafe:void 0;function em(t,e){if(e)return t.slice();var r=t.length,n=Wo?Wo(r):new t.constructor(r);return t.copy(n),n}var rm=Mt.Uint8Array;const Qo=rm;function nm(t){var e=new t.constructor(t.byteLength);return new Qo(e).set(new Qo(t)),e}function om(t,e){var r=e?nm(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function am(t){return typeof t.constructor=="function"&&!So(t)?wd(Io(t)):{}}function im(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var sm=im();const cm=sm;function Mr(t,e,r){(r!==void 0&&!_e(t[e],r)||r===void 0&&!(e in t))&&wr(t,e,r)}function um(t){return xt(t)&&Er(t)}function Pr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function lm(t){return Vd(t,Po(t))}function fm(t,e,r,n,o,a,s){var i=Pr(t,r),c=Pr(e,r),u=s.get(c);if(u){Mr(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,d=l===void 0;if(d){var f=Dt(c),p=!f&&$o(c),h=!f&&!p&&Mo(c);l=c,f||p||h?Dt(i)?l=i:um(i)?l=$d(i):p?(d=!1,l=em(c,!0)):h?(d=!1,l=om(c,!0)):l=[]:Rt(c)||$r(c)?(l=i,$r(i)?l=lm(i):(!gt(i)||jr(i))&&(l=am(c))):d=!1}d&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),Mr(t,r,l)}function qo(t,e,r,n,o){t!==e&&cm(e,function(a,s){if(o||(o=new Lt),gt(a))fm(t,e,s,r,qo,n,o);else{var i=n?n(Pr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Mr(t,s,i)}},Po)}var dm=Wd(function(t,e,r){qo(t,e,r)});const pm=dm,hm=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Yo(t){const e=t==null?void 0:t.prototype;return!!(e&&e.isReactComponent)}function Ko(t){var n,o;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(t==null?void 0:t.$$typeof)===r||((n=t==null?void 0:t.prototype)==null?void 0:n.isReactComponent)||((o=t==null?void 0:t.prototype)==null?void 0:o.setState)||t._forwardRef}function Xo(t){class e extends S.Component{render(){return S.createElement(t,this.props)}}return e.displayName=t.displayName,e}const bt=(t,e)=>{const r=n=>{const a=`
|
|
5
|
+
data struct format is invalidate`),o},mr=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return Tf(({data:a})=>{try{return Xn(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof Yn&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
|
|
6
|
+
`)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var Tt=(t=>(t.ROOT_CONTAINER="RootContainer",t))(Tt||{});const Mf=w({type:F(G.FUNCTION),value:v()}),Af=sr(Zn(Nt,["componentName"]),w({componentName:F("RootContainer")}));function Pf(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}const Kt=Pf(),xf=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new vt([]);return e&&(o=e.materialsMode||new vt([])),n&&(D(n)?r.value=n.map(a=>new A(a,{parent:e,materials:o})):B(n)&&r.value.push(new A(n,{parent:e,materials:o}))),r};class Mt{constructor(e,r){j(this,"nodeType","SLOT"),j(this,"rawData"),j(this,"parent"),j(this,"emitter",Kt),j(this,"data"),j(this,"id"),j(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new vt([]);this.materialsMode=n,this.id=Z(),this.data=xf(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof A)return o.export(e);if(B(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return D(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const oo=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===hr.SINGLE?e.push(n.content):n.type===hr.GROUP&&(e=[...e,...oo(n.content)]):e.push(r)}),e},vr=(t,e,r)=>{if(t.type)return t.type===G.SLOT?new Mt(t,{parent:e,materials:r}):t;if(B(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=gr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>vr(n,e,r)):t},gr=(t,e,r)=>B(t)?vr(t,e,r):D(t)?t.map(n=>vr(n,e,r)):t;class it{constructor(e,r,n){j(this,"nodeType","PROP"),j(this,"rawData"),j(this,"parent"),j(this,"emitter",Kt),j(this,"data"),j(this,"name"),j(this,"materialsMode");const o=(n==null?void 0:n.materials)||new vt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=gr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=gr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Mt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof A){const r=e.material;return oo((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(e){const r=this.data,n=o=>{if(o instanceof it||o instanceof Mt||o instanceof A)return o.export(e);if(D(o))return o.map(a=>n(a));if(B(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const If=t=>{if(typeof t=="string")return!0;mr({data:t,dataStruct:Nt,throwError:!1})},ao=(t,e,r=new vt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??Z(),children:[],props:{},methods:t.methods||[],configure:Qn(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var s;const i=(s=t.props)==null?void 0:s[a];if(i instanceof it){n.props[a]=i;return}n.props[a]=new it(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof A)return a;if(B(a)){const s=a;return new A(s,{parent:e,materials:r})}else return a}):(t.children instanceof A&&(n.children=[t.children]),n.children=[new A(t.children,{parent:e,materials:r})])),n};class A{constructor(e,r){j(this,"nodeType","NODE"),j(this,"rawData"),j(this,"data"),j(this,"emitter",Kt),j(this,"parent"),j(this,"materialsModel"),j(this,"listenerHandle"),j(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),If(e);const n=(r==null?void 0:r.materials)||new vt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=ao(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}destroy(){this.listenerHandle.forEach(e=>e())}get id(){return this.data.id}get value(){return this.data}clone(e){const r={...this.export("design"),id:e||Z()};return new A(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=ao(r,this),r}updateValue(e){const r=this.data,n=this.updateWithPlainObj(e);this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return _r(this,e)}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof A?l.export(e):l),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(l=>{const d=fn(i,l,!1);d&&(c[l]=d)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let u={...n,configure:s,props:o,children:a,condition:n.condition};return e==="design"&&delete u.id,u=br(u),u}}const io=(t,e,r)=>{const n={...t,id:Z(),props:{},componentName:Tt.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:Qn(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];D(t.children)?o=t.children.map(s=>s instanceof A?s:B(s)?new A(s,{parent:e,materials:r}):s):t.children instanceof A?o.push(t.children):t.children&&B(t.children)&&o.push(new A(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(s=>{var i;const c=(i=t.props)==null?void 0:i[s];c instanceof it?n.props[s]=c:n.props[s]=new it(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Xt{constructor(e,{parent:r,materials:n}){j(this,"rawData"),j(this,"data"),j(this,"nodeType",Tt.ROOT_CONTAINER),j(this,"emitter",Kt),j(this,"materialsModel"),j(this,"listenerHandle"),j(this,"onChangeCbQueue"),j(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=io(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}updateWithPlainObj(e){const r={...this.data,...e};return this.data=io(r,this,this.materialsModel),r}updateValue(e){const r=this.data;this.updateWithPlainObj(e),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return _r(this,e)}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e=lr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c),condition:n.condition};let i=qn(s,["id"]);return i=br(i),i}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(e=>e())}clone(e){const r={...this.export("design"),id:e||Z()};return new Xt(r,{materials:this.materialsModel,parent:null})}}const mt=t=>(t==null?void 0:t.type)===G.EXPRESSION,Df=t=>(t==null?void 0:t.type)===G.FUNCTION,Z=()=>Math.random().toString(32).slice(3,9),Rf=t=>(t==null?void 0:t.nodeType)==="NODE",yr=t=>(t==null?void 0:t.nodeType)==="PROP",Lf=t=>(t==null?void 0:t.nodeType)==="SLOT",br=t=>nf(t,e=>B(e)?!Object.keys(e).length:D(e)?!e.length:!e);function Bf(t,e){const r=[t];for(;r.length;){const n=r.shift();if(n&&e(n))return n;const o=(n==null?void 0:n.props)||{},a=i=>{if(i instanceof A){r.push(i);return}if(i instanceof Mt&&a(i.value.value),i instanceof it){a(i.value);return}if(B(i)){const c=i;Object.keys(c).forEach(u=>{a(c[u])});return}if(D(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof A))||[];r.push(...s)}}function _r(t,e){return Bf(t,r=>r.id===e)}const Ff=t=>{const e=Ln(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${Z()}`,title:n.title||t.title,category:n.category||t.category,tags:[...n.tags||[],...t.tags||[]],groupName:n.groupName||t.groupName,snapshot:n.snapshot||t.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||t.componentName}})),e};class Uf{constructor(e){j(this,"rawData"),j(this,"data"),this.rawData=e,this.data=Ff(e)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(e){return this.data.snippets.find(r=>r.id===e)}}const Sr=t=>{if(!D(t))throw new Error("Materials must be a array");return t.map(e=>new Uf(e))},kf=t=>{t==null||t.forEach(e=>{mr({data:e,dataStruct:Nf,throwError:!1})})};class vt{constructor(e){j(this,"rawData"),j(this,"data"),j(this,"usedMaterials",[]),this.rawData=e,kf(e),this.data=Sr(e)}addMaterials(e){const r=Sr(e),n=[],o=this.data.map(s=>{const i=r.findIndex(c=>c.componentName===s.componentName);return i>=0?(n.push(i),r[i]):s}),a=r.filter((s,i)=>n.includes(i));this.data=[...o,...a]}replaceMaterials(e){const r=Sr(e);this.data=[...r]}removeMaterial(e){const r=this.data.filter(n=>!e.includes(n.componentName));this.data=r}findByComponentName(e){return this.data.find(r=>r.componentName===e)}findSnippetById(e){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(e)}return n}getAllSnippets(){const e=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});let o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(d=>{const f=d.category||"default";s.includes(f)||(s.push(f),i[f]=[]),i[f].push(d)});const u=[];s.forEach(d=>{i[d].length&&u.push({name:d,list:i[d]})});const l={name:a,list:u};o.push(l)}}),o=o.sort((a,s)=>(a.name||"")>(s.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const Vf=w({version:v(),name:v(),css:m(v()),renderType:m(U([F("COMPONENT"),F("PAGE")])),loadType:m(M()),lifecycle:m(M()),props:m(M()),methods:m(I(Mf)),componentsMeta:I(sr(w({componentName:v()}),ur)),thirdLibs:m(_f),componentsTree:Af,assets:m(I(M()))}),so=t=>(mr({data:t,dataStruct:Vf,throwError:!1}),t),jr=(t,e,r)=>({...t,componentsTree:new Xt(t.componentsTree,{parent:e,materials:r})});class ye{constructor(e,r){j(this,"nodeType","PAGE"),j(this,"rawData"),j(this,"emitter",Kt),j(this,"data"),j(this,"parent"),j(this,"materialsModel"),j(this,"assetPackagesList"),so(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new vt((r==null?void 0:r.materials)||[]),this.data=jr(e,this,this.materialsModel),this.assetPackagesList=[...(r==null?void 0:r.assetPackagesList)||[],...this.data.assets||[]]}updatePage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=jr(e,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=jr(e,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(e){if(!e)return;const r=this.data.componentsTree;return _r(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Xt)return console.warn("Not found parent node"),!1;if(a instanceof it)return console.warn("CProp can not add node"),!1;if(a instanceof Mt){const i=a.value.value,c=i.findIndex(u=>u===r)??-1;return c>=0?(n==="BEFORE"?i.splice(c,0,e):i.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ye)return!1;const s=(a==null?void 0:a.value.children.findIndex(i=>i===r))??-1;return s>=0?(n==="BEFORE"?a==null||a.value.children.splice(s,0,e):a==null||a.value.children.splice(s+1,0,e),e.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(n==="CHILD_START")return r.value.children.unshift(e),e.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(e),e.parent=r,r.updateValue(),!0;if(B(n)){const a=n;if(a.type==="CHILD"){const s=a.pos,i=a.index||0;return s==="BEFORE"?r==null||r.value.children.splice(i,0,e):r==null||r.value.children.splice(i+1,0,e),e.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(e){return delete e.id,new A(e,{parent:null,materials:this.materialsModel})}addNodeById(e,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(e,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(e){const r=e.export("design");r.id=Z();const n=new A(r,{parent:e.parent,materials:this.materialsModel});return this.addNode(n,e,"AFTER"),n}copyNodeById(e){const r=this.getNode(e);return r&&r instanceof A?this.copyNode(r):!1}moveNode(e,r,n){this.deleteNode(e);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),e.parent=o,this.addNode(e,r,n)}moveNodeById(e,r,n){const o=this.getNode(e),a=this.getNode(r);return o&&a&&o instanceof A&&a instanceof A?this.moveNode(o,a,n):!1}deleteNode(e){var r;const n=e.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof Mt){const o=n.value.value,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),s}if(n instanceof A||n instanceof Xt){const o=n.value.children,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),n.updateValue(),s}}deleteNodeById(e){const r=this.getNode(e);if(r)return this.deleteNode(r)}export(e=lr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const u=o.find(l=>{var d;return l.package===((d=c.value.npm)==null?void 0:d.package)});return u&&a.push(u),{componentName:c.componentName,...Ln(c.value.npm||{})}}).filter(c=>c.componentName&&c.package&&c.version?!0:(console.warn(`${c} not a valid material info`),!1));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:br(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(l=>c.package===l.package);u&&a.push(u)}),i.assets=ff(a,c=>c.package),i=qn(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}Tt.ROOT_CONTAINER;var Gf=typeof global=="object"&&global&&global.Object===Object&&global;const co=Gf;var zf=typeof self=="object"&&self&&self.Object===Object&&self,Hf=co||zf||Function("return this")();const At=Hf;var Jf=At.Symbol;const Pt=Jf;var uo=Object.prototype,Wf=uo.hasOwnProperty,Qf=uo.toString,Zt=Pt?Pt.toStringTag:void 0;function qf(t){var e=Wf.call(t,Zt),r=t[Zt];try{t[Zt]=void 0;var n=!0}catch{}var o=Qf.call(t);return n&&(e?t[Zt]=r:delete t[Zt]),o}var Yf=Object.prototype,Kf=Yf.toString;function Xf(t){return Kf.call(t)}var Zf="[object Null]",td="[object Undefined]",lo=Pt?Pt.toStringTag:void 0;function te(t){return t==null?t===void 0?td:Zf:lo&&lo in Object(t)?qf(t):Xf(t)}function xt(t){return t!=null&&typeof t=="object"}var ed="[object Symbol]";function rd(t){return typeof t=="symbol"||xt(t)&&te(t)==ed}function nd(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var od=Array.isArray;const It=od;var ad=1/0,fo=Pt?Pt.prototype:void 0,po=fo?fo.toString:void 0;function ho(t){if(typeof t=="string")return t;if(It(t))return nd(t,ho)+"";if(rd(t))return po?po.call(t):"";var e=t+"";return e=="0"&&1/t==-ad?"-0":e}function gt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function mo(t){return t}var id="[object AsyncFunction]",sd="[object Function]",cd="[object GeneratorFunction]",ud="[object Proxy]";function Cr(t){if(!gt(t))return!1;var e=te(t);return e==sd||e==cd||e==id||e==ud}var ld=At["__core-js_shared__"];const Or=ld;var vo=function(){var t=/[^.]+$/.exec(Or&&Or.keys&&Or.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function fd(t){return!!vo&&vo in t}var dd=Function.prototype,pd=dd.toString;function hd(t){if(t!=null){try{return pd.call(t)}catch{}try{return t+""}catch{}}return""}var md=/[\\^$.*+?()[\]{}|]/g,vd=/^\[object .+?Constructor\]$/,gd=Function.prototype,yd=Object.prototype,bd=gd.toString,_d=yd.hasOwnProperty,Sd=RegExp("^"+bd.call(_d).replace(md,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jd(t){if(!gt(t)||fd(t))return!1;var e=Cr(t)?Sd:vd;return e.test(hd(t))}function Cd(t,e){return t==null?void 0:t[e]}function wr(t,e){var r=Cd(t,e);return jd(r)?r:void 0}var go=Object.create,Od=function(){function t(){}return function(e){if(!gt(e))return{};if(go)return go(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const wd=Od;function Ed(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function $d(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Nd=800,Td=16,Md=Date.now;function Ad(t){var e=0,r=0;return function(){var n=Md(),o=Td-(n-r);if(r=n,o>0){if(++e>=Nd)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Pd(t){return function(){return t}}var xd=function(){try{var t=wr(Object,"defineProperty");return t({},"",{}),t}catch{}}();const be=xd;var Id=be?function(t,e){return be(t,"toString",{configurable:!0,enumerable:!1,value:Pd(e),writable:!0})}:mo,Dd=Ad(Id);const Rd=Dd;var Ld=9007199254740991,Bd=/^(?:0|[1-9]\d*)$/;function yo(t,e){var r=typeof t;return e=e??Ld,!!e&&(r=="number"||r!="symbol"&&Bd.test(t))&&t>-1&&t%1==0&&t<e}function Er(t,e,r){e=="__proto__"&&be?be(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function _e(t,e){return t===e||t!==t&&e!==e}var Fd=Object.prototype,Ud=Fd.hasOwnProperty;function kd(t,e,r){var n=t[e];(!(Ud.call(t,e)&&_e(n,r))||r===void 0&&!(e in t))&&Er(t,e,r)}function Vd(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?Er(r,i,c):kd(r,i,c)}return r}var bo=Math.max;function Gd(t,e,r){return e=bo(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=bo(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),Ed(t,this,i)}}function zd(t,e){return Rd(Gd(t,e,mo),t+"")}var Hd=9007199254740991;function _o(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Hd}function $r(t){return t!=null&&_o(t.length)&&!Cr(t)}function Jd(t,e,r){if(!gt(r))return!1;var n=typeof e;return(n=="number"?$r(r)&&yo(e,r.length):n=="string"&&e in r)?_e(r[e],t):!1}function Wd(t){return zd(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&Jd(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var Qd=Object.prototype;function So(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Qd;return t===r}function qd(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Yd="[object Arguments]";function jo(t){return xt(t)&&te(t)==Yd}var Co=Object.prototype,Kd=Co.hasOwnProperty,Xd=Co.propertyIsEnumerable,Zd=jo(function(){return arguments}())?jo:function(t){return xt(t)&&Kd.call(t,"callee")&&!Xd.call(t,"callee")};const Nr=Zd;function tp(){return!1}var Oo=typeof g=="object"&&g&&!g.nodeType&&g,wo=Oo&&typeof module=="object"&&module&&!module.nodeType&&module,ep=wo&&wo.exports===Oo,Eo=ep?At.Buffer:void 0,rp=Eo?Eo.isBuffer:void 0,np=rp||tp;const $o=np;var op="[object Arguments]",ap="[object Array]",ip="[object Boolean]",sp="[object Date]",cp="[object Error]",up="[object Function]",lp="[object Map]",fp="[object Number]",dp="[object Object]",pp="[object RegExp]",hp="[object Set]",mp="[object String]",vp="[object WeakMap]",gp="[object ArrayBuffer]",yp="[object DataView]",bp="[object Float32Array]",_p="[object Float64Array]",Sp="[object Int8Array]",jp="[object Int16Array]",Cp="[object Int32Array]",Op="[object Uint8Array]",wp="[object Uint8ClampedArray]",Ep="[object Uint16Array]",$p="[object Uint32Array]",T={};T[bp]=T[_p]=T[Sp]=T[jp]=T[Cp]=T[Op]=T[wp]=T[Ep]=T[$p]=!0,T[op]=T[ap]=T[gp]=T[ip]=T[yp]=T[sp]=T[cp]=T[up]=T[lp]=T[fp]=T[dp]=T[pp]=T[hp]=T[mp]=T[vp]=!1;function Np(t){return xt(t)&&_o(t.length)&&!!T[te(t)]}function Tp(t){return function(e){return t(e)}}var No=typeof g=="object"&&g&&!g.nodeType&&g,ee=No&&typeof module=="object"&&module&&!module.nodeType&&module,Mp=ee&&ee.exports===No,Tr=Mp&&co.process,Ap=function(){try{var t=ee&&ee.require&&ee.require("util").types;return t||Tr&&Tr.binding&&Tr.binding("util")}catch{}}();const To=Ap;var Mo=To&&To.isTypedArray,Pp=Mo?Tp(Mo):Np;const Ao=Pp;var xp=Object.prototype,Ip=xp.hasOwnProperty;function Dp(t,e){var r=It(t),n=!r&&Nr(t),o=!r&&!n&&$o(t),a=!r&&!n&&!o&&Ao(t),s=r||n||o||a,i=s?qd(t.length,String):[],c=i.length;for(var u in t)(e||Ip.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yo(u,c)))&&i.push(u);return i}function Rp(t,e){return function(r){return t(e(r))}}function Lp(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Bp=Object.prototype,Fp=Bp.hasOwnProperty;function Up(t){if(!gt(t))return Lp(t);var e=So(t),r=[];for(var n in t)n=="constructor"&&(e||!Fp.call(t,n))||r.push(n);return r}function Po(t){return $r(t)?Dp(t,!0):Up(t)}var kp=wr(Object,"create");const re=kp;function Vp(){this.__data__=re?re(null):{},this.size=0}function Gp(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var zp="__lodash_hash_undefined__",Hp=Object.prototype,Jp=Hp.hasOwnProperty;function Wp(t){var e=this.__data__;if(re){var r=e[t];return r===zp?void 0:r}return Jp.call(e,t)?e[t]:void 0}var Qp=Object.prototype,qp=Qp.hasOwnProperty;function Yp(t){var e=this.__data__;return re?e[t]!==void 0:qp.call(e,t)}var Kp="__lodash_hash_undefined__";function Xp(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=re&&e===void 0?Kp:e,this}function yt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}yt.prototype.clear=Vp,yt.prototype.delete=Gp,yt.prototype.get=Wp,yt.prototype.has=Yp,yt.prototype.set=Xp;function Zp(){this.__data__=[],this.size=0}function Se(t,e){for(var r=t.length;r--;)if(_e(t[r][0],e))return r;return-1}var th=Array.prototype,eh=th.splice;function rh(t){var e=this.__data__,r=Se(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():eh.call(e,r,1),--this.size,!0}function nh(t){var e=this.__data__,r=Se(e,t);return r<0?void 0:e[r][1]}function oh(t){return Se(this.__data__,t)>-1}function ah(t,e){var r=this.__data__,n=Se(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function nt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}nt.prototype.clear=Zp,nt.prototype.delete=rh,nt.prototype.get=nh,nt.prototype.has=oh,nt.prototype.set=ah;var ih=wr(At,"Map");const xo=ih;function sh(){this.size=0,this.__data__={hash:new yt,map:new(xo||nt),string:new yt}}function ch(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function je(t,e){var r=t.__data__;return ch(e)?r[typeof e=="string"?"string":"hash"]:r.map}function uh(t){var e=je(this,t).delete(t);return this.size-=e?1:0,e}function lh(t){return je(this,t).get(t)}function fh(t){return je(this,t).has(t)}function dh(t,e){var r=je(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Dt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dt.prototype.clear=sh,Dt.prototype.delete=uh,Dt.prototype.get=lh,Dt.prototype.has=fh,Dt.prototype.set=dh;function Io(t){return t==null?"":ho(t)}var ph=Rp(Object.getPrototypeOf,Object);const Do=ph;var hh="[object Object]",mh=Function.prototype,vh=Object.prototype,Ro=mh.toString,gh=vh.hasOwnProperty,yh=Ro.call(Object);function Rt(t){if(!xt(t)||te(t)!=hh)return!1;var e=Do(t);if(e===null)return!0;var r=gh.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Ro.call(r)==yh}function bh(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function _h(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:bh(t,e,r)}var Sh="\\ud800-\\udfff",jh="\\u0300-\\u036f",Ch="\\ufe20-\\ufe2f",Oh="\\u20d0-\\u20ff",wh=jh+Ch+Oh,Eh="\\ufe0e\\ufe0f",$h="\\u200d",Nh=RegExp("["+$h+Sh+wh+Eh+"]");function Lo(t){return Nh.test(t)}function Th(t){return t.split("")}var Bo="\\ud800-\\udfff",Mh="\\u0300-\\u036f",Ah="\\ufe20-\\ufe2f",Ph="\\u20d0-\\u20ff",xh=Mh+Ah+Ph,Ih="\\ufe0e\\ufe0f",Dh="["+Bo+"]",Mr="["+xh+"]",Ar="\\ud83c[\\udffb-\\udfff]",Rh="(?:"+Mr+"|"+Ar+")",Fo="[^"+Bo+"]",Uo="(?:\\ud83c[\\udde6-\\uddff]){2}",ko="[\\ud800-\\udbff][\\udc00-\\udfff]",Lh="\\u200d",Vo=Rh+"?",Go="["+Ih+"]?",Bh="(?:"+Lh+"(?:"+[Fo,Uo,ko].join("|")+")"+Go+Vo+")*",Fh=Go+Vo+Bh,Uh="(?:"+[Fo+Mr+"?",Mr,Uo,ko,Dh].join("|")+")",kh=RegExp(Ar+"(?="+Ar+")|"+Uh+Fh,"g");function Vh(t){return t.match(kh)||[]}function Gh(t){return Lo(t)?Vh(t):Th(t)}function zh(t){return function(e){e=Io(e);var r=Lo(e)?Gh(e):void 0,n=r?r[0]:e.charAt(0),o=r?_h(r,1).join(""):e.slice(1);return n[t]()+o}}var Hh=zh("toUpperCase");const Jh=Hh;function Wh(t){return Jh(Io(t).toLowerCase())}function Qh(){this.__data__=new nt,this.size=0}function qh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Yh(t){return this.__data__.get(t)}function Kh(t){return this.__data__.has(t)}var Xh=200;function Zh(t,e){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!xo||n.length<Xh-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Dt(n)}return r.set(t,e),this.size=r.size,this}function Lt(t){var e=this.__data__=new nt(t);this.size=e.size}Lt.prototype.clear=Qh,Lt.prototype.delete=qh,Lt.prototype.get=Yh,Lt.prototype.has=Kh,Lt.prototype.set=Zh;var zo=typeof g=="object"&&g&&!g.nodeType&&g,Ho=zo&&typeof module=="object"&&module&&!module.nodeType&&module,tm=Ho&&Ho.exports===zo,Jo=tm?At.Buffer:void 0,Wo=Jo?Jo.allocUnsafe:void 0;function em(t,e){if(e)return t.slice();var r=t.length,n=Wo?Wo(r):new t.constructor(r);return t.copy(n),n}var rm=At.Uint8Array;const Qo=rm;function nm(t){var e=new t.constructor(t.byteLength);return new Qo(e).set(new Qo(t)),e}function om(t,e){var r=e?nm(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function am(t){return typeof t.constructor=="function"&&!So(t)?wd(Do(t)):{}}function im(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var sm=im();const cm=sm;function Pr(t,e,r){(r!==void 0&&!_e(t[e],r)||r===void 0&&!(e in t))&&Er(t,e,r)}function um(t){return xt(t)&&$r(t)}function xr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function lm(t){return Vd(t,Po(t))}function fm(t,e,r,n,o,a,s){var i=xr(t,r),c=xr(e,r),u=s.get(c);if(u){Pr(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,d=l===void 0;if(d){var f=It(c),p=!f&&$o(c),h=!f&&!p&&Ao(c);l=c,f||p||h?It(i)?l=i:um(i)?l=$d(i):p?(d=!1,l=em(c,!0)):h?(d=!1,l=om(c,!0)):l=[]:Rt(c)||Nr(c)?(l=i,Nr(i)?l=lm(i):(!gt(i)||Cr(i))&&(l=am(c))):d=!1}d&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),Pr(t,r,l)}function qo(t,e,r,n,o){t!==e&&cm(e,function(a,s){if(o||(o=new Lt),gt(a))fm(t,e,s,r,qo,n,o);else{var i=n?n(xr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Pr(t,s,i)}},Po)}var dm=Wd(function(t,e,r){qo(t,e,r)});const pm=dm,hm=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Yo(t){const e=t==null?void 0:t.prototype;return!!(e&&e.isReactComponent)}function Ko(t){var n,o;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(t==null?void 0:t.$$typeof)===r||((n=t==null?void 0:t.prototype)==null?void 0:n.isReactComponent)||((o=t==null?void 0:t.prototype)==null?void 0:o.setState)||t._forwardRef}function Xo(t){class e extends S.Component{render(){return S.createElement(t,this.props)}}return e.displayName=t.displayName,e}const bt=(t,e)=>{const r=n=>{const a=`
|
|
7
7
|
${Object.keys(e).map(s=>`const ${s} = $$context['${s}'];`).join(`
|
|
8
8
|
`)}
|
|
9
9
|
return ${n};
|
|
@@ -17,7 +17,7 @@ function $$_run_$$() {
|
|
|
17
17
|
return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
|
|
18
18
|
}
|
|
19
19
|
return $$_run_$$();
|
|
20
|
-
`,new Function(a)(...o,e,r)}catch(s){console.log(a),console.warn(s)}},xr=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},Dr=(t=[])=>{const e={};return t.forEach(({property:r,value:n})=>{let o=r.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((s,i)=>i!==0?Wh(s):s)),e[a.join("")]=n}),e},mm=t=>{let e="";return Object.keys(t||{}).forEach(r=>{e+=`${r}:${t[r]};`}),e},vm=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o,o.__esModule&&o.default&&(r[n.globalName]=o.default))}}),r},gm=(t,e=1)=>{let r=0,n=t,o={},a={};for(;r<e;)Object.keys(n).forEach(s=>{o={...o,...n[s]}}),a=o,n=o,o={},r+=1;return a},ta=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},ea=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},ym=(t,e)=>ea(t,e),bm=(t,e)=>ea(t,e),Oe=t=>{var r;return((r=t.value.css)==null?void 0:r.class)||`c_${t.id}`},ra=(t,e)=>{const r=t.split(".");let n,o=e;return r.forEach(a=>{n=o==null?void 0:o[a],o=n}),n||(()=>`Component [${t}] not found`)},Ce="DYNAMIC",_m=["$$context","$$nodeModel"],na=t=>{let e;const r=new Set,n=(c,u)=>{const l=typeof c=="function"?c(e):c;if(!Object.is(l,e)){const d=e;e=u??typeof l!="object"?l:Object.assign({},e,l),r.forEach(f=>f(e,d))}},o=()=>e,i={setState:n,getState:o,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,o,i),i},Sm=t=>t?na(t):na;class jm{constructor(){b(this,"storeMap",new Map)}addStore(e,r){const n=Sm(r);return this.storeMap.set(e,n),n.name=e,n}setStore(e,r){this.storeMap.set(e,r)}removeStore(e){this.storeMap.delete(e)}getStore(e){return this.storeMap.get(e)}getState(e){var r;return(r=this.storeMap.get(e))==null?void 0:r.getState()}getStateObj(e){return{state:this.getState(e),updateState:r=>{this.setState(e,r)}}}setState(e,r){var n;return(n=this.storeMap.get(e))==null?void 0:n.setState(r)}connect(e,r){const n=this.storeMap.get(e);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const e={};return this.storeMap.forEach((r,n)=>{e[n]=this.getStateObj(n)}),e}destroy(){this.storeMap=new Map}}class Om{constructor(){b(this,"varSpace",new Map)}get(e){return this.varSpace.get(e)}add(e,r){this.varSpace.set(e,r)}remove(e){this.varSpace.delete(e)}destroy(){this.varSpace.clear()}getStateSnapshot(){const e={};return this.varSpace.forEach((r,n)=>{e[n]=r}),e}}class oa{constructor(){b(this,"renderMode","normal");b(this,"components",{});b(this,"storeManager",new jm);b(this,"variableManager",new Om);b(this,"runtimeComponentCache",new Map);b(this,"onGetRef");b(this,"onGetComponent");b(this,"onComponentMount");b(this,"onComponentDestroy");b(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=ra(r,this.components);return Ko(n)||(n=Xo(n),this.components[r]=n),this.onGetComponent&&(n=(o=this.onGetComponent)==null?void 0:o.call(this,n,e)),n}getContext(e={},r){let n=e;return r&&(n={...e},n.__proto__=r||null),n}pageRender(e,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:s,onComponentDestroy:i,renderMode:c,processNodeConfigHook:u}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=u;const l=e.value.componentsTree,d=this.getComponent(l),f=this.convertModelToComponent(d,e.value.componentsTree),p={},h=l.props;return Object.keys(h).forEach(y=>{p[y]=h[y].value}),p.$$context=o,this.render(f,p)}transformProps(e={},{$$context:r}){const n=e,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(yr(s))return o(s.value);if(Lf(s)){const i=s.value,c=i.value;if(!c)return console.warn("slot value is null, this maybe cause some error, pls check it",e),()=>{};const u=l=>{const d=`${l.id}-${Ce}`;if(this.runtimeComponentCache.get(l.id))return{key:d,component:this.runtimeComponentCache.get(l.id)};const f=this.getComponent(l),p=this.convertModelToComponent(f,l),h=i.params||[];return{component:(...O)=>{const C=xr(O,h),P=this.getContext({params:C},r);return this.render(p,{$$context:P,key:d})},key:d}};if(Array.isArray(c)){const l=c==null?void 0:c.map(d=>u(d));return(...d)=>l.map(f=>{if(Yo(f.component)){const h=f.component;return S.createElement(h,{$$context:r,key:f.key})}else{const h=f.component;return h==null?void 0:h(...d)}})}else return u(c).component}else{if(mt(s))return bt(s.value,r||{});if(If(s))return Zo(s.value,r,this.storeManager);if(Rt(s)){let i=s;yr(s)&&(i=s.value);const c=i,u={};return Object.keys(i).forEach(l=>{u[l]=o(c[l])}),u}else return s}},a={};return Object.keys(n).forEach(s=>{const i=n[s];a[s]=o(i)}),a}collectSpecialProps(e={},r){const n=[],o=(a,s)=>{let i=s;yr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):Dt(i)?i.forEach((c,u)=>{o([...a,String(u)],c)}):Rt(i)&&Object.keys(i).forEach(c=>{o([...a,c],i[c])})};return o(["$root"],e),n}convertModelToComponent(e,r){const n=this;class o extends S.Component{constructor(i){super(i);b(this,"_CONDITION",!0);b(this,"_DESIGN_BOX",!1);b(this,"_NODE_MODEL",r);b(this,"_NODE_ID",r.id);b(this,"UNIQUE_ID",`${r.id}_${Z()}`);b(this,"targetComponentRef");b(this,"listenerHandle",[]);b(this,"storeState");b(this,"storeListenDisposeList",[]);b(this,"domHeader");b(this,"mediaStyleDomMap",{});b(this,"variableSpace");b(this,"nodeName");b(this,"updateState",i=>{this.storeState.setState(i),this.forceUpdate()});b(this,"getStyleDomById",i=>{const c=this.mediaStyleDomMap;let u=c[i];return u||(u=document.createElement("style"),c[i]=u),u.id=i,u});b(this,"addMediaCSS",()=>{var u;let i=this.domHeader;if(i||(i=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=i),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(l=>{var p;const d=`${this.UNIQUE_ID}_${l.state}`;let f=Oe(this._NODE_MODEL);if(l.state!=="normal"&&(f=`${f}:${l.state}`),l.text){const h=this.getStyleDomById(d);h.innerText=`.${f} { ${l.text} }`,i==null||i.appendChild(h)}(p=l.media)!=null&&p.length&&l.media.forEach(h=>{const y=`${d}_${h.type}_${h.value}`,_=this.getStyleDomById(y);_.media=`screen and (${h.type}:${h.value}px)`,_.innerHTML=`.${f} { ${h.text} }`,i==null||i.appendChild(_)})})});b(this,"removeMediaCSS",()=>{const i=this.mediaStyleDomMap;Object.keys(i).forEach(c=>{var u;(u=this.domHeader)==null||u.removeChild(i[c])}),this.mediaStyleDomMap={}});b(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(i=>i()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=S.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const u=n.storeManager.getStore(c);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(d=>{this.setState({...d})}),this.connectStore();const l=n.variableManager.get(c);l?this.variableSpace=l:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const i=n.collectSpecialProps(r.props,f=>!!mt(f)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},f=>!!mt(f));let u=[];[...i,...c].map(f=>{const p=f.val,h=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],y=ta(p.value,h);u=[...u,...y]}).filter(Boolean);const l=Array.from(new Set(u)),d=[];l.length&&l.forEach(f=>{n.storeManager.getStore(f)||(n.storeManager.addStore(f,()=>({})),console.warn(n.storeManager,f,"not exits"));const h=n.storeManager.connect(f,()=>{this.forceUpdate()});d.push(h)}),this.storeListenDisposeList=d}componentDidMount(){var c;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(c=n.onComponentMount)==null||c.call(n,this,r);const i=()=>{n.storeManager.setStore(r.value.nodeName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(i)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(c=>c()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var Ee;const{$$context:i,...c}=this.props,u=r.value.nodeName||r.id,l={key:r.id,...r.props,...c},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(u),getStateObj:()=>n.storeManager.getStateObj(u),getStateObjById:R=>n.storeManager.getStateObj(R),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(u).methods,getMethodsById:R=>n.variableManager.get(R).methods,getStaticVar:()=>n.variableManager.get(u).staticVar,getStaticVarById:R=>n.variableManager.get(R).staticVar};r.value.componentName===Tt.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=n.getContext(d,i),y=n.transformProps({methods:r.value.methods},{$$context:f}).methods.reduce((R,Q)=>(R[Q.name]=Q.define,R),{});f.methods=y,this.variableSpace.methods=Object.assign(this.variableSpace.methods,y);const _=r.value.loop;let O=[];if(_&&_.open){this.targetComponentRef.current=[];let R=_.data||[];if(mt(_.data)){const Q=_.data;R=bt(Q.value,f||{})}return O=R.map((...Q)=>{var ha;const oe=Q[1],Bt=[_.forName||"item",_.forIndex||"index"],Ir=xr(Q,Bt);let Rr="loopData";_.name&&(Rr=`${Rr}${_.name}`);const ae=n.getContext({[Rr]:Ir},f),tt=n.transformProps(l,{$$context:ae}),Hm=((ha=r.value.classNames)==null?void 0:ha.map(q=>{var Ne;const ie=q.name;return(mt(q.status)?bt(String(((Ne=q.status)==null?void 0:Ne.value)||""),ae):!1)?ie:""}))||[];let Lr=`${tt.className??""} ${Hm.join(" ")}`.trim();r.value.css&&(Lr=`${Oe(r)} ${Lr}`.trim()),tt.className=Lr;const Jm=n.transformProps({style:r.value.style},{$$context:ae});r.value.style&&(tt.style=Dr(Jm.style||[]));const{children:$e}=tt;let Br=[];if($e!==void 0)delete tt.children,Br=Array.isArray($e)?$e:[$e];else{const q=[];r.value.children.forEach((ma,Ne)=>{const Wm=n.buildComponent(ma,{$$context:ae,idx:Ne});q.push(Wm)}),Br=q}if(tt.key=`${tt.key}-${oe}`,mt(_.key)){const q=_.key,ie=bt(q.value,ae||{});tt.key+=`-${ie}`}return tt.ref=q=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[oe]=q},n.render(e,tt,...Br)}),O}const C=n.transformProps(l,{$$context:f}),{children:P}=C;let x=[];if(P!==void 0)delete C.children,x=Array.isArray(P)?P:[P];else{const R=[];r.value.children.forEach((oe,Bt)=>{const Ir=n.buildComponent(oe,{$$context:f,idx:Bt});R.push(Ir)}),x=R}C.ref=this.targetComponentRef;const L=((Ee=r.value.classNames)==null?void 0:Ee.map(R=>{var Bt;const Q=R.name;return(mt(R.status)?bt(((Bt=R.status)==null?void 0:Bt.value)||"",f):!1)?Q:""}))||[];let z=`${C.className??""} ${L.join(" ")}`.trim();r.value.css&&(z=`${Oe(r)} ${z}`.trim()),C.className=z;const ne=n.transformProps({style:r.value.style},{$$context:f});r.value.style&&(C.style=Dr(ne.style||[]));let E=r.value.condition??!0;typeof E!="boolean"&&(E=bt(E.value,f||{}));let st={condition:E,props:C};n.processNodeConfigHook&&(st=n.processNodeConfigHook(st,r));const _t=n.render(e,st.props,...x);return this._CONDITION=st.condition,st.condition?_t:S.createElement("div",{style:{display:"none"}},_t)}}return b(o,"__CP_TYPE__",Ce),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):Rf(e)?(({currentNode:a})=>{const s=a.value.id;let i=null;if(n.get(s)){const l=n.get(s);i=l==null?void 0:l.component}else{const l=this.getComponent(a);i=this.convertModelToComponent(l,a),!n.get(s)&&this.renderMode!=="design"&&n.set(s,{component:i})}const c=`${s}-${Ce}`,u={$$context:r,$$nodeModel:e,key:c};return this.render(i,u)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(_m.forEach(a=>{a in r&&e.__CP_TYPE__!==Ce&&delete r[a]}),S.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const Cm=Ur(new oa),wm=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var Em=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var aa={exports:{}},we={};/**
|
|
20
|
+
`,new Function(a)(...o,e,r)}catch(s){console.log(a),console.warn(s)}},Ir=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},Dr=(t=[])=>{const e={};return t.forEach(({property:r,value:n})=>{let o=r.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((s,i)=>i!==0?Wh(s):s)),e[a.join("")]=n}),e},mm=t=>{let e="";return Object.keys(t||{}).forEach(r=>{e+=`${r}:${t[r]};`}),e},vm=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o,o.__esModule&&o.default&&(r[n.globalName]=o.default))}}),r},gm=(t,e=1)=>{let r=0,n=t,o={},a={};for(;r<e;)Object.keys(n).forEach(s=>{o={...o,...n[s]}}),a=o,n=o,o={},r+=1;return a},ta=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},ea=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},ym=(t,e)=>ea(t,e),bm=(t,e)=>ea(t,e),Ce=t=>{var r;return((r=t.value.css)==null?void 0:r.class)||`c_${t.id}`},ra=(t,e)=>{const r=t.split(".");let n,o=e;return r.forEach(a=>{n=o==null?void 0:o[a],o=n}),n||(()=>`Component [${t}] not found`)},Oe="DYNAMIC",_m=["$$context","$$nodeModel"],na=t=>{let e;const r=new Set,n=(c,u)=>{const l=typeof c=="function"?c(e):c;if(!Object.is(l,e)){const d=e;e=u??typeof l!="object"?l:Object.assign({},e,l),r.forEach(f=>f(e,d))}},o=()=>e,i={setState:n,getState:o,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,o,i),i},Sm=t=>t?na(t):na;class jm{constructor(){b(this,"storeMap",new Map)}addStore(e,r){const n=Sm(r);return this.storeMap.set(e,n),n.name=e,n}setStore(e,r){this.storeMap.set(e,r)}removeStore(e){this.storeMap.delete(e)}getStore(e){return this.storeMap.get(e)}getState(e){var r;return(r=this.storeMap.get(e))==null?void 0:r.getState()}getStateObj(e){return{state:this.getState(e),updateState:r=>{this.setState(e,r)}}}setState(e,r){var n;return(n=this.storeMap.get(e))==null?void 0:n.setState(r)}connect(e,r){const n=this.storeMap.get(e);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const e={};return this.storeMap.forEach((r,n)=>{e[n]=this.getStateObj(n)}),e}destroy(){this.storeMap=new Map}}class Cm{constructor(){b(this,"varSpace",new Map)}get(e){return this.varSpace.get(e)}add(e,r){this.varSpace.set(e,r)}remove(e){this.varSpace.delete(e)}destroy(){this.varSpace.clear()}getStateSnapshot(){const e={};return this.varSpace.forEach((r,n)=>{e[n]=r}),e}}class oa{constructor(){b(this,"renderMode","normal");b(this,"components",{});b(this,"storeManager",new jm);b(this,"variableManager",new Cm);b(this,"runtimeComponentCache",new Map);b(this,"onGetRef");b(this,"onGetComponent");b(this,"onComponentMount");b(this,"onComponentDestroy");b(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=ra(r,this.components);return Ko(n)||(n=Xo(n),this.components[r]=n),this.onGetComponent&&(n=(o=this.onGetComponent)==null?void 0:o.call(this,n,e)),n}getContext(e={},r){let n=e;return r&&(n={...e},n.__proto__=r||null),n}pageRender(e,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:s,onComponentDestroy:i,renderMode:c,processNodeConfigHook:u}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=u;const l=e.value.componentsTree,d=this.getComponent(l),f=this.convertModelToComponent(d,e.value.componentsTree),p={},h=l.props;return Object.keys(h).forEach(y=>{p[y]=h[y].value}),p.$$context=o,this.render(f,p)}transformProps(e={},{$$context:r}){const n=e,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(yr(s))return o(s.value);if(Lf(s)){const i=s.value,c=i.value;if(!c)return console.warn("slot value is null, this maybe cause some error, pls check it",e),()=>{};const u=l=>{const d=`${l.id}-${Oe}`;if(this.runtimeComponentCache.get(l.id))return{key:d,component:this.runtimeComponentCache.get(l.id)};const f=this.getComponent(l),p=this.convertModelToComponent(f,l),h=i.params||[];return{component:(...C)=>{const O=Ir(C,h),P=this.getContext({params:O},r);return this.render(p,{$$context:P,key:d})},key:d}};if(Array.isArray(c)){const l=c==null?void 0:c.map(d=>u(d));return(...d)=>l.map(f=>{if(Yo(f.component)){const h=f.component;return S.createElement(h,{$$context:r,key:f.key})}else{const h=f.component;return h==null?void 0:h(...d)}})}else return u(c).component}else{if(mt(s))return bt(s.value,r||{});if(Df(s))return Zo(s.value,r,this.storeManager);if(Rt(s)){let i=s;yr(s)&&(i=s.value);const c=i,u={};return Object.keys(i).forEach(l=>{u[l]=o(c[l])}),u}else return s}},a={};return Object.keys(n).forEach(s=>{const i=n[s];a[s]=o(i)}),a}collectSpecialProps(e={},r){const n=[],o=(a,s)=>{let i=s;yr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):It(i)?i.forEach((c,u)=>{o([...a,String(u)],c)}):Rt(i)&&Object.keys(i).forEach(c=>{o([...a,c],i[c])})};return o(["$root"],e),n}convertModelToComponent(e,r){const n=this;class o extends S.Component{constructor(i){super(i);b(this,"_CONDITION",!0);b(this,"_DESIGN_BOX",!1);b(this,"_NODE_MODEL",r);b(this,"_NODE_ID",r.id);b(this,"UNIQUE_ID",`${r.id}_${Z()}`);b(this,"targetComponentRef");b(this,"listenerHandle",[]);b(this,"storeState");b(this,"storeListenDisposeList",[]);b(this,"domHeader");b(this,"mediaStyleDomMap",{});b(this,"variableSpace");b(this,"nodeName");b(this,"updateState",i=>{this.storeState.setState(i),this.forceUpdate()});b(this,"getStyleDomById",i=>{const c=this.mediaStyleDomMap;let u=c[i];return u||(u=document.createElement("style"),c[i]=u),u.id=i,u});b(this,"addMediaCSS",()=>{var u;let i=this.domHeader;if(i||(i=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=i),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(l=>{var p;const d=`${this.UNIQUE_ID}_${l.state}`;let f=Ce(this._NODE_MODEL);if(l.state!=="normal"&&(f=`${f}:${l.state}`),l.text){const h=this.getStyleDomById(d);h.innerText=`.${f} { ${l.text} }`,i==null||i.appendChild(h)}(p=l.media)!=null&&p.length&&l.media.forEach(h=>{const y=`${d}_${h.type}_${h.value}`,_=this.getStyleDomById(y);_.media=`screen and (${h.type}:${h.value}px)`,_.innerHTML=`.${f} { ${h.text} }`,i==null||i.appendChild(_)})})});b(this,"removeMediaCSS",()=>{const i=this.mediaStyleDomMap;Object.keys(i).forEach(c=>{var u;(u=this.domHeader)==null||u.removeChild(i[c])}),this.mediaStyleDomMap={}});b(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(i=>i()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=S.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const u=n.storeManager.getStore(c);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(d=>{this.setState({...d})}),this.connectStore();const l=n.variableManager.get(c);l?this.variableSpace=l:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const i=n.collectSpecialProps(r.props,f=>!!mt(f)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},f=>!!mt(f));let u=[];[...i,...c].map(f=>{const p=f.val,h=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],y=ta(p.value,h);u=[...u,...y]}).filter(Boolean);const l=Array.from(new Set(u)),d=[];l.length&&l.forEach(f=>{n.storeManager.getStore(f)||(n.storeManager.addStore(f,()=>({})),console.warn(n.storeManager,f,"not exits"));const h=n.storeManager.connect(f,()=>{this.forceUpdate()});d.push(h)}),this.storeListenDisposeList=d}componentDidMount(){var c;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(c=n.onComponentMount)==null||c.call(n,this,r);const i=()=>{n.storeManager.setStore(r.value.nodeName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(i)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(c=>c()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var Ee;const{$$context:i,...c}=this.props,u=r.value.nodeName||r.id,l={key:r.id,...r.props,...c},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(u),getStateObj:()=>n.storeManager.getStateObj(u),getStateObjById:R=>n.storeManager.getStateObj(R),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(u).methods,getMethodsById:R=>n.variableManager.get(R).methods,getStaticVar:()=>n.variableManager.get(u).staticVar,getStaticVarById:R=>n.variableManager.get(R).staticVar};r.value.componentName===Tt.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=n.getContext(d,i),y=n.transformProps({methods:r.value.methods},{$$context:f}).methods.reduce((R,Q)=>(R[Q.name]=Q.define,R),{});f.methods=y,this.variableSpace.methods=Object.assign(this.variableSpace.methods,y);const _=r.value.loop;let C=[];if(_&&_.open){this.targetComponentRef.current=[];let R=_.data||[];if(mt(_.data)){const Q=_.data;R=bt(Q.value,f||{})}return C=R.map((...Q)=>{var ha;const oe=Q[1],Bt=[_.forName||"item",_.forIndex||"index"],Rr=Ir(Q,Bt);let Lr="loopData";_.name&&(Lr=`${Lr}${_.name}`);const ae=n.getContext({[Lr]:Rr},f),tt=n.transformProps(l,{$$context:ae}),Hm=((ha=r.value.classNames)==null?void 0:ha.map(q=>{var Ne;const ie=q.name;return(mt(q.status)?bt(String(((Ne=q.status)==null?void 0:Ne.value)||""),ae):!1)?ie:""}))||[];let Br=`${tt.className??""} ${Hm.join(" ")}`.trim();r.value.css&&(Br=`${Ce(r)} ${Br}`.trim()),tt.className=Br;const Jm=n.transformProps({style:r.value.style},{$$context:ae});r.value.style&&(tt.style=Dr(Jm.style||[]));const{children:$e}=tt;let Fr=[];if($e!==void 0)delete tt.children,Fr=Array.isArray($e)?$e:[$e];else{const q=[];r.value.children.forEach((ma,Ne)=>{const Wm=n.buildComponent(ma,{$$context:ae,idx:Ne});q.push(Wm)}),Fr=q}if(tt.key=`${tt.key}-${oe}`,mt(_.key)){const q=_.key,ie=bt(q.value,ae||{});tt.key+=`-${ie}`}return tt.ref=q=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[oe]=q},n.render(e,tt,...Fr)}),C}const O=n.transformProps(l,{$$context:f}),{children:P}=O;let x=[];if(P!==void 0)delete O.children,x=Array.isArray(P)?P:[P];else{const R=[];r.value.children.forEach((oe,Bt)=>{const Rr=n.buildComponent(oe,{$$context:f,idx:Bt});R.push(Rr)}),x=R}O.ref=this.targetComponentRef;const L=((Ee=r.value.classNames)==null?void 0:Ee.map(R=>{var Bt;const Q=R.name;return(mt(R.status)?bt(((Bt=R.status)==null?void 0:Bt.value)||"",f):!1)?Q:""}))||[];let z=`${O.className??""} ${L.join(" ")}`.trim();r.value.css&&(z=`${Ce(r)} ${z}`.trim()),O.className=z;const ne=n.transformProps({style:r.value.style},{$$context:f});r.value.style&&(O.style=Dr(ne.style||[]));let E=r.value.condition??!0;typeof E!="boolean"&&(E=bt(E.value,f||{}));let st={condition:E,props:O};n.processNodeConfigHook&&(st=n.processNodeConfigHook(st,r));const _t=n.render(e,st.props,...x);return this._CONDITION=st.condition,st.condition?_t:S.createElement("div",{style:{display:"none"}},_t)}}return b(o,"__CP_TYPE__",Oe),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):Rf(e)?(({currentNode:a})=>{const s=a.value.id;let i=null;if(n.get(s)){const l=n.get(s);i=l==null?void 0:l.component}else{const l=this.getComponent(a);i=this.convertModelToComponent(l,a),!n.get(s)&&this.renderMode!=="design"&&n.set(s,{component:i})}const c=`${s}-${Oe}`,u={$$context:r,$$nodeModel:e,key:c};return this.render(i,u)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(_m.forEach(a=>{a in r&&e.__CP_TYPE__!==Oe&&delete r[a]}),S.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const Om=kr(new oa),wm=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var Em=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var aa={exports:{}},we={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-jsx-runtime.production.min.js
|
|
23
23
|
*
|
|
@@ -25,5 +25,5 @@ return $$_run_$$();
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var Nm=S,Tm=Symbol.for("react.element"),Am=Symbol.for("react.fragment"),Mm=Object.prototype.hasOwnProperty,Pm=Nm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xm={key:!0,ref:!0,__self:!0,__source:!0};function ia(t,e,r){var n,o={},a=null,s=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)Mm.call(e,n)&&!xm.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:Tm,type:t,key:a,ref:s,props:o,_owner:Pm.current}}we.Fragment=Am,we.jsx=ia,we.jsxs=ia,aa.exports=we;var Dm=aa.exports;const Im=Dm.jsx,ot=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},Rm=[...wm,...Sf].reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),S.createElement(e,{...o,...ot(n)},...a)},t),{}),Lm={RootContainer:({children:t})=>t,...Rm,CContainer:({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),S.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),Im("div",{...o,...ot(e),children:a})},CVideo:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("video",{...r,...ot(e)},...n)},CAudio:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("audio",{...r,...ot(e)},...n)},CBlock:({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(u=>u!==void 0);const{style:s={},...i}=ot(n),c={height:r,width:e,...s,...o.style||{}};return S.createElement("div",{...o,...i,style:c},...a)},CImage:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("img",{...r,...ot(e)},...n)},CText:({$$attributes:t=[],content:e,...r})=>S.createElement("span",{...r,...ot(t)},e),CCanvas:({afterMount:t,beforeDestroy:e,$$attributes:r=[],...n})=>(S.useEffect(()=>(t==null||t(n),()=>{e==null||e(n)}),[]),S.createElement("canvas",{...n,...ot(r)})),CNativeTag:({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...s}=ot(e),i={...a,...n.style||{}};return S.createElement(r,{...n,...s,style:i},...o)}};class Bm{constructor(){b(this,"refMap",new Map)}get(e){return this.refMap.get(e)}add(e,r){this.refMap.set(e,r)}remove(e){this.refMap.delete(e)}destroy(){this.refMap.clear()}}class sa extends S.Component{constructor(r){super(r);b(this,"refManager");b(this,"dynamicComponentInstanceMap",new Map);b(this,"onGetRef",(r,n,o)=>{var a,s;(s=(a=this.props).onGetRef)==null||s.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)});b(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(Rt(r)&&so(r)){const n=r;this.setState({pageModel:new ye(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new ye(r.page)},this.refManager=new Bm}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:r}=this.props;r&&(r.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:r}=this,{adapter:n,onGetComponent:o,onComponentDestroy:a,onComponentMount:s}=r,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const c={...Lm,...r.components},u=this.props.$$context??{};return u.refs=this.refManager,n.pageRender(i,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:s,onComponentDestroy:a,$$context:u,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const Fm=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class Um extends S.Component{constructor(r){super(r);b(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:""}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var o,a;(a=(o=this.props).onError)==null||a.call(o,n)}render(){if(this.state.hasError){const{onDoubleClick:r}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const o=S.createElement("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"}},"Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,S.createElement("p",null,"msg: ",String(this.state.error)),S.createElement("button",{onDoubleClick:r,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"}},"double click to refresh"),S.createElement("div",{style:{display:"none"}}));return S.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class ca{constructor(){b(this,"instanceMap",new Map)}get(e){return this.instanceMap.get(e)}add(e,r){const n=this.instanceMap.get(e);n?n.push(r):this.instanceMap.set(e,[r])}remove(e,r){const n=this.instanceMap.get(e);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(e,o)}else this.instanceMap.delete(e)}destroy(){this.instanceMap.clear()}}const ua=t=>{const{node:e}=t,r=S.useMemo(()=>{const i=e.isContainer();return Rt(i)?i:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[t.node]),{placeholder:n,height:o,width:a,style:s}=r;return S.createElement("div",{style:{margin:0,padding:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",width:a,height:o,...s}},n)};class km extends S.Component{constructor(r){super(r);b(this,"instanceManager",new ca);b(this,"renderRef");b(this,"dropPlaceholder",ua);b(this,"_components",{});b(this,"onGetComponent",(r,n)=>{var c,u;const o=this;let a=r;const s=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.wrapComponent;s&&(a=s(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class i extends S.Component{constructor(){super(...arguments);b(this,"_DESIGN_BOX",!0);b(this,"_NODE_MODEL",n);b(this,"_NODE_ID",n.id);b(this,"_UNIQUE_ID",`${n.id}_${Z()}`);b(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var O,C;const{children:f=[],onlyRenderChild:p,...h}=this.props;let y=f;if(Dt(f)||(y=[f]),!!!y.filter(Boolean).length&&(n.isContainer()||n.value.componentName===Tt.ROOT_CONTAINER)){const P=(C=(O=n.material)==null?void 0:O.value.advanceCustom)==null?void 0:C.dropPlaceholder;y.push(S.createElement(P||o.dropPlaceholder,{node:n}))}return p?y:S.createElement(a,h,...y)}}return S.forwardRef(function(d,f){return S.createElement(Um,{node:n,targetComponent:i},S.createElement(i,{ref:f,...d}))})});this.updateComponents(this.props.components),this.renderRef=S.createRef(),r.dropPlaceholder&&(this.dropPlaceholder=r.dropPlaceholder)}updateComponents(r={}){this._components=Object.assign(this._components,r),this.forceUpdate()}componentDidMount(){var r,n;this.updateComponents(this.props.components),(n=(r=this.props).onMount)==null||n.call(r,this)}getPageModel(){var r;return(r=this.renderRef.current)==null?void 0:r.state.pageModel}rerender(r){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(r)}getInstancesById(r,n){let o=[...this.instanceManager.get(r)||[]];return n!==void 0&&(o=o.filter(a=>n===(a==null?void 0:a._UNIQUE_ID))),o}getInstanceByDom(r){const n=la(r);if(!n)return null;const o=fa(n);return(o==null?void 0:o.stateNode)||null}getDomsById(r,n){const o=this.getInstancesById(r),a=[];return o==null||o.forEach(s=>{var c;if((s==null?void 0:s._STATUS)==="DESTROY")return;const i=ga.findDOMNode(s);if(i&&!(i instanceof Text))if(n){const u=Array.from(((c=i.querySelectorAll)==null?void 0:c.call(i,n))||[]);a.push(...u)}else a.push(i)}),a}getDomRectById(r,n){return this.getDomsById(r,n).map(s=>s==null?void 0:s.getBoundingClientRect()).filter(Boolean)}render(){const{props:r,onGetComponent:n}=this,{render:o,...a}=r;return o&&(o.ref.current=this),S.createElement(sa,{onGetComponent:n,...a,components:this._components,processNodeConfigHook:(s,i)=>{var h,y;if(i.nodeType!=="NODE")return s;const{props:c,condition:u}=s;let l={...c};const d=((h=i.value.configure)==null?void 0:h.devState)||{},f=(y=i.material)==null?void 0:y.value.fixedProps;if(f!==void 0){if(Rt(f))l={...l,...f};else if(typeof f=="function"){const _=f(l);l={...l,..._}}}let p=u;return d.condition===!1&&(p=d.condition),{props:pm(l,d.props||{}),condition:p}},ref:this.renderRef})}}const la=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:la(t.parentElement)},fa=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:fa(t.return):null},Vm=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)},getInstancesById(e,r){var n;return((n=t.current)==null?void 0:n.getInstancesById(e,r))||[]},getInstanceByDom(e){var r;return((r=t.current)==null?void 0:r.getInstanceByDom(e))||null},getDomsById(e,r){var n;return((n=t.current)==null?void 0:n.getDomsById(e,r))||[]},getDomRectById(e,r){var n;return((n=t.current)==null?void 0:n.getDomRectById(e,r))||[]}}};var da={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Em,function(){var r=function(){},n={},o={},a={};function s(f,p){f=f.push?f:[f];var h=[],y=f.length,_=y,O,C,P,x;for(O=function(L,z){z.length&&h.push(L),_--,_||p(h)};y--;){if(C=f[y],P=o[C],P){O(C,P);continue}x=a[C]=a[C]||[],x.push(O)}}function i(f,p){if(f){var h=a[f];if(o[f]=p,!!h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function c(f,p){f.call&&(f={success:f}),p.length?(f.error||r)(p):(f.success||r)(f)}function u(f,p,h,y){var _=document,O=h.async,C=(h.numRetries||0)+1,P=h.before||r,x=f.replace(/[\?|#].*$/,""),L=f.replace(/^(css|img|module|nomodule)!/,""),z,ne,E;if(y=y||0,/(^css!|\.css$)/.test(x))E=_.createElement("link"),E.rel="stylesheet",E.href=L,z="hideFocus"in E,z&&E.relList&&(z=0,E.rel="preload",E.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(x))E=_.createElement("img"),E.src=L;else if(E=_.createElement("script"),E.src=L,E.async=O===void 0?!0:O,ne="noModule"in E,/^module!/.test(x)){if(!ne)return p(f,"l");E.type="module"}else if(/^nomodule!/.test(x)&&ne)return p(f,"l");E.onload=E.onerror=E.onbeforeload=function(st){var _t=st.type[0];if(z)try{E.sheet.cssText.length||(_t="e")}catch(Ee){Ee.code!=18&&(_t="e")}if(_t=="e"){if(y+=1,y<C)return u(f,p,h,y)}else if(E.rel=="preload"&&E.as=="style")return E.rel="stylesheet";p(f,_t,st.defaultPrevented)},P(f,E)!==!1&&_.head.appendChild(E)}function l(f,p,h){f=f.push?f:[f];var y=f.length,_=y,O=[],C,P;for(C=function(x,L,z){if(L=="e"&&O.push(x),L=="b")if(z)O.push(x);else return;y--,y||p(O)},P=0;P<_;P++)u(f[P],C,h)}function d(f,p,h){var y,_;if(p&&p.trim&&(y=p),_=(y?h:p)||{},y){if(y in n)throw"LoadJS";n[y]=!0}function O(C,P){l(f,function(x){c(_,x),C&&c({success:C,error:P},x),i(y,x)},_)}if(_.returnPromise)return new Promise(O);O()}return d.ready=function(p,h){return s(p,function(y){c(h,y)}),d},d.done=function(p){i(p,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(p){return p in n},d})})(da);var Gm=da.exports;const pa=$m(Gm);class zm{constructor(e,r){b(this,"assets");b(this,"loadStatus");b(this,"win",window);b(this,"_onSuccessList",[]);b(this,"_onErrorList",[]);this.assets=JSON.parse(JSON.stringify(e||[])),this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(e){const r=this.assets||[],n=[];for(let o=0;o<r.length;o++){const a=r[o];a.id||(a.id=Z()),n.push(a.id);const s=a.resources.map(i=>i.src);s.length&&pa(s,a.id,{async:(e==null?void 0:e.async)??!1,before:(i,c)=>(this.win.document.body.appendChild(c),!1)})}return new Promise((o,a)=>{if(r.length===0){this._onSuccessList.forEach(s=>s()),o("");return}pa.ready(n,{success:()=>{this._onSuccessList.forEach(s=>s()),o("")},error:s=>{this._onErrorList.forEach(i=>i(s)),a(s)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}g.AssetLoader=zm,g.ComponentInstanceManager=ca,g.DefaultDropPlaceholder=ua,g.DefineReactAdapter=oa,g.DesignRender=km,g.ReactAdapter=Cm,g.Render=sa,g.canAcceptsRef=Ko,g.collectVariable=vm,g.compWrapper=Xo,g.convertCodeStringToFunction=Zo,g.findComponentByChainRefer=ra,g.flatObject=gm,g.formatSourceStylePropertyName=Dr,g.getAdapter=Ur,g.getCSSTextValue=mm,g.getComponentsLibs=ym,g.getMatchVal=ta,g.getNodeCssClassName=Oe,g.getObjFromArrayMap=xr,g.getThirdLibs=bm,g.isClass=hm,g.runExpression=bt,g.shouldConstruct=Yo,g.useDesignRender=Vm,g.useRender=Fm,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
28
|
+
*/var Nm=S,Tm=Symbol.for("react.element"),Mm=Symbol.for("react.fragment"),Am=Object.prototype.hasOwnProperty,Pm=Nm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xm={key:!0,ref:!0,__self:!0,__source:!0};function ia(t,e,r){var n,o={},a=null,s=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)Am.call(e,n)&&!xm.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:Tm,type:t,key:a,ref:s,props:o,_owner:Pm.current}}we.Fragment=Mm,we.jsx=ia,we.jsxs=ia,aa.exports=we;var Im=aa.exports;const Dm=Im.jsx,ot=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},Rm=[...wm,...Sf].reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),S.createElement(e,{...o,...ot(n)},...a)},t),{}),Lm={RootContainer:({children:t})=>t,...Rm,CContainer:({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),S.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),Dm("div",{...o,...ot(e),children:a})},CVideo:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("video",{...r,...ot(e)},...n)},CAudio:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("audio",{...r,...ot(e)},...n)},CBlock:({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(u=>u!==void 0);const{style:s={},...i}=ot(n),c={height:r,width:e,...s,...o.style||{}};return S.createElement("div",{...o,...i,style:c},...a)},CImage:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("img",{...r,...ot(e)},...n)},CText:({$$attributes:t=[],content:e,...r})=>S.createElement("span",{...r,...ot(t)},e),CCanvas:({afterMount:t,beforeDestroy:e,$$attributes:r=[],...n})=>(S.useEffect(()=>(t==null||t(n),()=>{e==null||e(n)}),[]),S.createElement("canvas",{...n,...ot(r)})),CNativeTag:({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...s}=ot(e),i={...a,...n.style||{}};return S.createElement(r,{...n,...s,style:i},...o)}};class Bm{constructor(){b(this,"refMap",new Map)}get(e){return this.refMap.get(e)}add(e,r){this.refMap.set(e,r)}remove(e){this.refMap.delete(e)}destroy(){this.refMap.clear()}}class sa extends S.Component{constructor(r){super(r);b(this,"refManager");b(this,"dynamicComponentInstanceMap",new Map);b(this,"onGetRef",(r,n,o)=>{var a,s;(s=(a=this.props).onGetRef)==null||s.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)});b(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(Rt(r)&&so(r)){const n=r;this.setState({pageModel:new ye(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new ye(r.page)},this.refManager=new Bm}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:r}=this.props;r&&(r.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:r}=this,{adapter:n,onGetComponent:o,onComponentDestroy:a,onComponentMount:s}=r,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const c={...Lm,...r.components},u=this.props.$$context??{};return u.refs=this.refManager,n.pageRender(i,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:s,onComponentDestroy:a,$$context:u,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const Fm=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class Um extends S.Component{constructor(r){super(r);b(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:""}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var o,a;(a=(o=this.props).onError)==null||a.call(o,n)}render(){if(this.state.hasError){const{onDoubleClick:r}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const o=S.createElement("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"}},"Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,S.createElement("p",null,"msg: ",String(this.state.error)),S.createElement("button",{onDoubleClick:r,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"}},"double click to refresh"),S.createElement("div",{style:{display:"none"}}));return S.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class ca{constructor(){b(this,"instanceMap",new Map)}get(e){return this.instanceMap.get(e)}add(e,r){const n=this.instanceMap.get(e);n?n.push(r):this.instanceMap.set(e,[r])}remove(e,r){const n=this.instanceMap.get(e);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(e,o)}else this.instanceMap.delete(e)}destroy(){this.instanceMap.clear()}}const ua=t=>{const{node:e}=t,r=S.useMemo(()=>{const i=e.isContainer();return Rt(i)?i:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[t.node]),{placeholder:n,height:o,width:a,style:s}=r;return S.createElement("div",{style:{margin:0,padding:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",minHeight:"50px",width:a,height:o,...s}},n)};class km extends S.Component{constructor(r){super(r);b(this,"instanceManager",new ca);b(this,"renderRef");b(this,"dropPlaceholder",ua);b(this,"_components",{});b(this,"onGetComponent",(r,n)=>{var c,u;const o=this;let a=r;const s=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.wrapComponent;s&&(a=s(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class i extends S.Component{constructor(){super(...arguments);b(this,"_DESIGN_BOX",!0);b(this,"_NODE_MODEL",n);b(this,"_NODE_ID",n.id);b(this,"_UNIQUE_ID",`${n.id}_${Z()}`);b(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var C,O;const{children:f=[],onlyRenderChild:p,...h}=this.props;let y=f;if(It(f)||(y=[f]),!!!y.filter(Boolean).length&&(n.isContainer()||n.value.componentName===Tt.ROOT_CONTAINER)){const P=(O=(C=n.material)==null?void 0:C.value.advanceCustom)==null?void 0:O.dropPlaceholder;y.push(S.createElement(P||o.dropPlaceholder,{node:n}))}return p?y:S.createElement(a,h,...y)}}return S.forwardRef(function(d,f){return S.createElement(Um,{node:n,targetComponent:i},S.createElement(i,{ref:f,...d}))})});this.updateComponents(this.props.components),this.renderRef=S.createRef(),r.dropPlaceholder&&(this.dropPlaceholder=r.dropPlaceholder)}updateComponents(r={}){this._components=Object.assign(this._components,r),this.forceUpdate()}componentDidMount(){var r,n;this.updateComponents(this.props.components),(n=(r=this.props).onMount)==null||n.call(r,this)}getPageModel(){var r;return(r=this.renderRef.current)==null?void 0:r.state.pageModel}rerender(r){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(r)}getInstancesById(r,n){let o=[...this.instanceManager.get(r)||[]];return n!==void 0&&(o=o.filter(a=>n===(a==null?void 0:a._UNIQUE_ID))),o}getInstanceByDom(r){const n=la(r);if(!n)return null;const o=fa(n);return(o==null?void 0:o.stateNode)||null}getDomsById(r,n){const o=this.getInstancesById(r),a=[];return o==null||o.forEach(s=>{var c;if((s==null?void 0:s._STATUS)==="DESTROY")return;const i=ga.findDOMNode(s);if(i&&!(i instanceof Text))if(n){const u=Array.from(((c=i.querySelectorAll)==null?void 0:c.call(i,n))||[]);a.push(...u)}else a.push(i)}),a}getDomRectById(r,n){return this.getDomsById(r,n).map(s=>s==null?void 0:s.getBoundingClientRect()).filter(Boolean)}render(){const{props:r,onGetComponent:n}=this,{render:o,...a}=r;return o&&(o.ref.current=this),S.createElement(sa,{onGetComponent:n,...a,components:this._components,processNodeConfigHook:(s,i)=>{var h,y;if(i.nodeType!=="NODE")return s;const{props:c,condition:u}=s;let l={...c};const d=((h=i.value.configure)==null?void 0:h.devState)||{},f=(y=i.material)==null?void 0:y.value.fixedProps;if(f!==void 0){if(Rt(f))l={...l,...f};else if(typeof f=="function"){const _=f(l);l={...l,..._}}}let p=u;return d.condition===!1&&(p=d.condition),{props:pm(l,d.props||{}),condition:p}},ref:this.renderRef})}}const la=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:la(t.parentElement)},fa=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:fa(t.return):null},Vm=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)},getInstancesById(e,r){var n;return((n=t.current)==null?void 0:n.getInstancesById(e,r))||[]},getInstanceByDom(e){var r;return((r=t.current)==null?void 0:r.getInstanceByDom(e))||null},getDomsById(e,r){var n;return((n=t.current)==null?void 0:n.getDomsById(e,r))||[]},getDomRectById(e,r){var n;return((n=t.current)==null?void 0:n.getDomRectById(e,r))||[]}}};var da={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Em,function(){var r=function(){},n={},o={},a={};function s(f,p){f=f.push?f:[f];var h=[],y=f.length,_=y,C,O,P,x;for(C=function(L,z){z.length&&h.push(L),_--,_||p(h)};y--;){if(O=f[y],P=o[O],P){C(O,P);continue}x=a[O]=a[O]||[],x.push(C)}}function i(f,p){if(f){var h=a[f];if(o[f]=p,!!h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function c(f,p){f.call&&(f={success:f}),p.length?(f.error||r)(p):(f.success||r)(f)}function u(f,p,h,y){var _=document,C=h.async,O=(h.numRetries||0)+1,P=h.before||r,x=f.replace(/[\?|#].*$/,""),L=f.replace(/^(css|img|module|nomodule)!/,""),z,ne,E;if(y=y||0,/(^css!|\.css$)/.test(x))E=_.createElement("link"),E.rel="stylesheet",E.href=L,z="hideFocus"in E,z&&E.relList&&(z=0,E.rel="preload",E.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(x))E=_.createElement("img"),E.src=L;else if(E=_.createElement("script"),E.src=L,E.async=C===void 0?!0:C,ne="noModule"in E,/^module!/.test(x)){if(!ne)return p(f,"l");E.type="module"}else if(/^nomodule!/.test(x)&&ne)return p(f,"l");E.onload=E.onerror=E.onbeforeload=function(st){var _t=st.type[0];if(z)try{E.sheet.cssText.length||(_t="e")}catch(Ee){Ee.code!=18&&(_t="e")}if(_t=="e"){if(y+=1,y<O)return u(f,p,h,y)}else if(E.rel=="preload"&&E.as=="style")return E.rel="stylesheet";p(f,_t,st.defaultPrevented)},P(f,E)!==!1&&_.head.appendChild(E)}function l(f,p,h){f=f.push?f:[f];var y=f.length,_=y,C=[],O,P;for(O=function(x,L,z){if(L=="e"&&C.push(x),L=="b")if(z)C.push(x);else return;y--,y||p(C)},P=0;P<_;P++)u(f[P],O,h)}function d(f,p,h){var y,_;if(p&&p.trim&&(y=p),_=(y?h:p)||{},y){if(y in n)throw"LoadJS";n[y]=!0}function C(O,P){l(f,function(x){c(_,x),O&&c({success:O,error:P},x),i(y,x)},_)}if(_.returnPromise)return new Promise(C);C()}return d.ready=function(p,h){return s(p,function(y){c(h,y)}),d},d.done=function(p){i(p,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(p){return p in n},d})})(da);var Gm=da.exports;const pa=$m(Gm);class zm{constructor(e,r){b(this,"assets");b(this,"loadStatus");b(this,"win",window);b(this,"_onSuccessList",[]);b(this,"_onErrorList",[]);this.assets=JSON.parse(JSON.stringify(e||[])),this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(e){const r=this.assets||[],n=[];for(let o=0;o<r.length;o++){const a=r[o];a.id||(a.id=Z()),n.push(a.id);const s=a.resources.map(i=>i.src);s.length&&pa(s,a.id,{async:(e==null?void 0:e.async)??!1,before:(i,c)=>(this.win.document.body.appendChild(c),!1)})}return new Promise((o,a)=>{if(r.length===0){this._onSuccessList.forEach(s=>s()),o("");return}pa.ready(n,{success:()=>{this._onSuccessList.forEach(s=>s()),o("")},error:s=>{this._onErrorList.forEach(i=>i(s)),a(s)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}g.AssetLoader=zm,g.ComponentInstanceManager=ca,g.DefaultDropPlaceholder=ua,g.DefineReactAdapter=oa,g.DesignRender=km,g.ReactAdapter=Om,g.Render=sa,g.canAcceptsRef=Ko,g.collectVariable=vm,g.compWrapper=Xo,g.convertCodeStringToFunction=Zo,g.findComponentByChainRefer=ra,g.flatObject=gm,g.formatSourceStylePropertyName=Dr,g.getAdapter=kr,g.getCSSTextValue=mm,g.getComponentsLibs=ym,g.getMatchVal=ta,g.getNodeCssClassName=Ce,g.getObjFromArrayMap=Ir,g.getThirdLibs=bm,g.isClass=hm,g.runExpression=bt,g.shouldConstruct=Yo,g.useDesignRender=Vm,g.useRender=Fm,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
29
29
|
//# sourceMappingURL=index.umd.js.map
|