@chamn/render 0.0.23 → 0.0.24

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.umd.js CHANGED
@@ -1,23 +1,23 @@
1
- (function(_,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],C):(_=typeof globalThis<"u"?globalThis:_||self,C(_.CRender={},_.React,_.ReactDOM))})(this,function(_,C,Tt){"use strict";var Km=Object.defineProperty;var Xm=(_,C,Tt)=>C in _?Km(_,C,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):_[C]=Tt;var j=(_,C,Tt)=>(Xm(_,typeof C!="symbol"?C+"":C,Tt),Tt);function ni(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 oi=ni(Tt),ai=t=>()=>{console.warn(`${t} need to be implement getComponent`)},ii=["customPageRootRender"],gn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],yn=t=>[...gn,...ii].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):gn.includes(n)&&(r[n]=ai),r},{});var si=Object.defineProperty,ci=(t,e,r)=>e in t?si(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e,r)=>(ci(t,typeof e!="symbol"?e+"":e,r),r),ui=typeof global=="object"&&global&&global.Object===Object&&global;const bn=ui;var li=typeof self=="object"&&self&&self.Object===Object&&self,fi=bn||li||Function("return this")();const dt=fi;var di=dt.Symbol;const ot=di;var _n=Object.prototype,pi=_n.hasOwnProperty,hi=_n.toString,de=ot?ot.toStringTag:void 0;function vi(t){var e=pi.call(t,de),r=t[de];try{t[de]=void 0;var n=!0}catch{}var o=hi.call(t);return n&&(e?t[de]=r:delete t[de]),o}var mi=Object.prototype,gi=mi.toString;function yi(t){return gi.call(t)}var bi="[object Null]",_i="[object Undefined]",Sn=ot?ot.toStringTag:void 0;function Nt(t){return t==null?t===void 0?_i:bi:Sn&&Sn in Object(t)?vi(t):yi(t)}function pt(t){return t!=null&&typeof t=="object"}var Si="[object Symbol]";function nr(t){return typeof t=="symbol"||pt(t)&&Nt(t)==Si}function or(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 Oi=Array.isArray;const G=Oi;var ji=1/0,On=ot?ot.prototype:void 0,jn=On?On.toString:void 0;function Cn(t){if(typeof t=="string")return t;if(G(t))return or(t,Cn)+"";if(nr(t))return jn?jn.call(t):"";var e=t+"";return e=="0"&&1/t==-ji?"-0":e}function ct(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ar(t){return t}var Ci="[object AsyncFunction]",wi="[object Function]",Ei="[object GeneratorFunction]",Ti="[object Proxy]";function ir(t){if(!ct(t))return!1;var e=Nt(t);return e==wi||e==Ei||e==Ci||e==Ti}var Ni=dt["__core-js_shared__"];const sr=Ni;var wn=function(){var t=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function $i(t){return!!wn&&wn in t}var Pi=Function.prototype,Ai=Pi.toString;function $t(t){if(t!=null){try{return Ai.call(t)}catch{}try{return t+""}catch{}}return""}var Ri=/[\\^$.*+?()[\]{}|]/g,Mi=/^\[object .+?Constructor\]$/,xi=Function.prototype,Di=Object.prototype,Ii=xi.toString,Li=Di.hasOwnProperty,Fi=RegExp("^"+Ii.call(Li).replace(Ri,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ki(t){if(!ct(t)||$i(t))return!1;var e=ir(t)?Fi:Mi;return e.test($t(t))}function Ui(t,e){return t==null?void 0:t[e]}function Pt(t,e){var r=Ui(t,e);return ki(r)?r:void 0}var Bi=Pt(dt,"WeakMap");const cr=Bi;var En=Object.create,Vi=function(){function t(){}return function(e){if(!ct(e))return{};if(En)return En(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Gi=Vi;function zi(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 Wi(){}function Tn(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Hi=800,Yi=16,Ji=Date.now;function qi(t){var e=0,r=0;return function(){var n=Ji(),o=Yi-(n-r);if(r=n,o>0){if(++e>=Hi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Qi(t){return function(){return t}}var Ki=function(){try{var t=Pt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const xe=Ki;var Xi=xe?function(t,e){return xe(t,"toString",{configurable:!0,enumerable:!1,value:Qi(e),writable:!0})}:ar,Zi=qi(Xi);const Nn=Zi;function ts(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function es(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 rs(t){return t!==t}function ns(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function os(t,e,r){return e===e?ns(t,e,r):es(t,rs,r)}function as(t,e){var r=t==null?0:t.length;return!!r&&os(t,e,0)>-1}var is=9007199254740991,ss=/^(?:0|[1-9]\d*)$/;function De(t,e){var r=typeof t;return e=e??is,!!e&&(r=="number"||r!="symbol"&&ss.test(t))&&t>-1&&t%1==0&&t<e}function ur(t,e,r){e=="__proto__"&&xe?xe(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function pe(t,e){return t===e||t!==t&&e!==e}var cs=Object.prototype,us=cs.hasOwnProperty;function lr(t,e,r){var n=t[e];(!(us.call(t,e)&&pe(n,r))||r===void 0&&!(e in t))&&ur(t,e,r)}function Bt(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?ur(r,i,c):lr(r,i,c)}return r}var $n=Math.max;function Pn(t,e,r){return e=$n(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=$n(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),zi(t,this,i)}}function An(t,e){return Nn(Pn(t,e,ar),t+"")}var ls=9007199254740991;function fr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ls}function Ie(t){return t!=null&&fr(t.length)&&!ir(t)}function fs(t,e,r){if(!ct(r))return!1;var n=typeof e;return(n=="number"?Ie(r)&&De(e,r.length):n=="string"&&e in r)?pe(r[e],t):!1}function ds(t){return An(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&&fs(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 ps=Object.prototype;function dr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ps;return t===r}function hs(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var vs="[object Arguments]";function Rn(t){return pt(t)&&Nt(t)==vs}var Mn=Object.prototype,ms=Mn.hasOwnProperty,gs=Mn.propertyIsEnumerable,ys=Rn(function(){return arguments}())?Rn:function(t){return pt(t)&&ms.call(t,"callee")&&!gs.call(t,"callee")};const he=ys;function bs(){return!1}var xn=typeof _=="object"&&_&&!_.nodeType&&_,Dn=xn&&typeof module=="object"&&module&&!module.nodeType&&module,_s=Dn&&Dn.exports===xn,In=_s?dt.Buffer:void 0,Ss=In?In.isBuffer:void 0,Os=Ss||bs;const ve=Os;var js="[object Arguments]",Cs="[object Array]",ws="[object Boolean]",Es="[object Date]",Ts="[object Error]",Ns="[object Function]",$s="[object Map]",Ps="[object Number]",As="[object Object]",Rs="[object RegExp]",Ms="[object Set]",xs="[object String]",Ds="[object WeakMap]",Is="[object ArrayBuffer]",Ls="[object DataView]",Fs="[object Float32Array]",ks="[object Float64Array]",Us="[object Int8Array]",Bs="[object Int16Array]",Vs="[object Int32Array]",Gs="[object Uint8Array]",zs="[object Uint8ClampedArray]",Ws="[object Uint16Array]",Hs="[object Uint32Array]",I={};I[Fs]=I[ks]=I[Us]=I[Bs]=I[Vs]=I[Gs]=I[zs]=I[Ws]=I[Hs]=!0,I[js]=I[Cs]=I[Is]=I[ws]=I[Ls]=I[Es]=I[Ts]=I[Ns]=I[$s]=I[Ps]=I[As]=I[Rs]=I[Ms]=I[xs]=I[Ds]=!1;function Ys(t){return pt(t)&&fr(t.length)&&!!I[Nt(t)]}function pr(t){return function(e){return t(e)}}var Ln=typeof _=="object"&&_&&!_.nodeType&&_,me=Ln&&typeof module=="object"&&module&&!module.nodeType&&module,Js=me&&me.exports===Ln,hr=Js&&bn.process,qs=function(){try{var t=me&&me.require&&me.require("util").types;return t||hr&&hr.binding&&hr.binding("util")}catch{}}();const Vt=qs;var Fn=Vt&&Vt.isTypedArray,Qs=Fn?pr(Fn):Ys;const vr=Qs;var Ks=Object.prototype,Xs=Ks.hasOwnProperty;function kn(t,e){var r=G(t),n=!r&&he(t),o=!r&&!n&&ve(t),a=!r&&!n&&!o&&vr(t),s=r||n||o||a,i=s?hs(t.length,String):[],c=i.length;for(var l in t)(e||Xs.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||De(l,c)))&&i.push(l);return i}function Un(t,e){return function(r){return t(e(r))}}var Zs=Un(Object.keys,Object);const tc=Zs;var ec=Object.prototype,rc=ec.hasOwnProperty;function nc(t){if(!dr(t))return tc(t);var e=[];for(var r in Object(t))rc.call(t,r)&&r!="constructor"&&e.push(r);return e}function Le(t){return Ie(t)?kn(t):nc(t)}function oc(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ac=Object.prototype,ic=ac.hasOwnProperty;function sc(t){if(!ct(t))return oc(t);var e=dr(t),r=[];for(var n in t)n=="constructor"&&(e||!ic.call(t,n))||r.push(n);return r}function ge(t){return Ie(t)?kn(t,!0):sc(t)}var cc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uc=/^\w*$/;function mr(t,e){if(G(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||nr(t)?!0:uc.test(t)||!cc.test(t)||e!=null&&t in Object(e)}var lc=Pt(Object,"create");const ye=lc;function fc(){this.__data__=ye?ye(null):{},this.size=0}function dc(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var pc="__lodash_hash_undefined__",hc=Object.prototype,vc=hc.hasOwnProperty;function mc(t){var e=this.__data__;if(ye){var r=e[t];return r===pc?void 0:r}return vc.call(e,t)?e[t]:void 0}var gc=Object.prototype,yc=gc.hasOwnProperty;function bc(t){var e=this.__data__;return ye?e[t]!==void 0:yc.call(e,t)}var _c="__lodash_hash_undefined__";function Sc(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ye&&e===void 0?_c:e,this}function At(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])}}At.prototype.clear=fc,At.prototype.delete=dc,At.prototype.get=mc,At.prototype.has=bc,At.prototype.set=Sc;function Oc(){this.__data__=[],this.size=0}function Fe(t,e){for(var r=t.length;r--;)if(pe(t[r][0],e))return r;return-1}var jc=Array.prototype,Cc=jc.splice;function wc(t){var e=this.__data__,r=Fe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Cc.call(e,r,1),--this.size,!0}function Ec(t){var e=this.__data__,r=Fe(e,t);return r<0?void 0:e[r][1]}function Tc(t){return Fe(this.__data__,t)>-1}function Nc(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 mt(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])}}mt.prototype.clear=Oc,mt.prototype.delete=wc,mt.prototype.get=Ec,mt.prototype.has=Tc,mt.prototype.set=Nc;var $c=Pt(dt,"Map");const be=$c;function Pc(){this.size=0,this.__data__={hash:new At,map:new(be||mt),string:new At}}function Ac(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ke(t,e){var r=t.__data__;return Ac(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Rc(t){var e=ke(this,t).delete(t);return this.size-=e?1:0,e}function Mc(t){return ke(this,t).get(t)}function xc(t){return ke(this,t).has(t)}function Dc(t,e){var r=ke(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function gt(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])}}gt.prototype.clear=Pc,gt.prototype.delete=Rc,gt.prototype.get=Mc,gt.prototype.has=xc,gt.prototype.set=Dc;var Ic="Expected a function";function gr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ic);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(gr.Cache||gt),r}gr.Cache=gt;var Lc=500;function Fc(t){var e=gr(t,function(n){return r.size===Lc&&r.clear(),n}),r=e.cache;return e}var kc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uc=/\\(\\)?/g,Bc=Fc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(kc,function(r,n,o,a){e.push(o?a.replace(Uc,"$1"):n||r)}),e});const Vc=Bc;function Gc(t){return t==null?"":Cn(t)}function Gt(t,e){return G(t)?t:mr(t,e)?[t]:Vc(Gc(t))}var zc=1/0;function zt(t){if(typeof t=="string"||nr(t))return t;var e=t+"";return e=="0"&&1/t==-zc?"-0":e}function Ue(t,e){e=Gt(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[zt(e[r++])];return r&&r==n?t:void 0}function Bn(t,e,r){var n=t==null?void 0:Ue(t,e);return n===void 0?r:n}function yr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Vn=ot?ot.isConcatSpreadable:void 0;function Wc(t){return G(t)||he(t)||!!(Vn&&t&&t[Vn])}function br(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=Wc),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?br(i,e-1,r,n,o):yr(o,i):n||(o[o.length]=i)}return o}function Hc(t){var e=t==null?0:t.length;return e?br(t,1):[]}function Yc(t){return Nn(Pn(t,void 0,Hc),t+"")}var Jc=Un(Object.getPrototypeOf,Object);const _r=Jc;var qc="[object Object]",Qc=Function.prototype,Kc=Object.prototype,Gn=Qc.toString,Xc=Kc.hasOwnProperty,Zc=Gn.call(Object);function K(t){if(!pt(t)||Nt(t)!=qc)return!1;var e=_r(t);if(e===null)return!0;var r=Xc.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Gn.call(r)==Zc}function tu(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 eu(){this.__data__=new mt,this.size=0}function ru(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function nu(t){return this.__data__.get(t)}function ou(t){return this.__data__.has(t)}var au=200;function iu(t,e){var r=this.__data__;if(r instanceof mt){var n=r.__data__;if(!be||n.length<au-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new gt(n)}return r.set(t,e),this.size=r.size,this}function ut(t){var e=this.__data__=new mt(t);this.size=e.size}ut.prototype.clear=eu,ut.prototype.delete=ru,ut.prototype.get=nu,ut.prototype.has=ou,ut.prototype.set=iu;function su(t,e){return t&&Bt(e,Le(e),t)}function cu(t,e){return t&&Bt(e,ge(e),t)}var zn=typeof _=="object"&&_&&!_.nodeType&&_,Wn=zn&&typeof module=="object"&&module&&!module.nodeType&&module,uu=Wn&&Wn.exports===zn,Hn=uu?dt.Buffer:void 0,Yn=Hn?Hn.allocUnsafe:void 0;function Jn(t,e){if(e)return t.slice();var r=t.length,n=Yn?Yn(r):new t.constructor(r);return t.copy(n),n}function lu(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 qn(){return[]}var fu=Object.prototype,du=fu.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,pu=Qn?function(t){return t==null?[]:(t=Object(t),lu(Qn(t),function(e){return du.call(t,e)}))}:qn;const Sr=pu;function hu(t,e){return Bt(t,Sr(t),e)}var vu=Object.getOwnPropertySymbols,mu=vu?function(t){for(var e=[];t;)yr(e,Sr(t)),t=_r(t);return e}:qn;const Kn=mu;function gu(t,e){return Bt(t,Kn(t),e)}function Xn(t,e,r){var n=e(t);return G(t)?n:yr(n,r(t))}function Or(t){return Xn(t,Le,Sr)}function jr(t){return Xn(t,ge,Kn)}var yu=Pt(dt,"DataView");const Cr=yu;var bu=Pt(dt,"Promise");const wr=bu;var _u=Pt(dt,"Set");const Wt=_u;var Zn="[object Map]",Su="[object Object]",to="[object Promise]",eo="[object Set]",ro="[object WeakMap]",no="[object DataView]",Ou=$t(Cr),ju=$t(be),Cu=$t(wr),wu=$t(Wt),Eu=$t(cr),Rt=Nt;(Cr&&Rt(new Cr(new ArrayBuffer(1)))!=no||be&&Rt(new be)!=Zn||wr&&Rt(wr.resolve())!=to||Wt&&Rt(new Wt)!=eo||cr&&Rt(new cr)!=ro)&&(Rt=function(t){var e=Nt(t),r=e==Su?t.constructor:void 0,n=r?$t(r):"";if(n)switch(n){case Ou:return no;case ju:return Zn;case Cu:return to;case wu:return eo;case Eu:return ro}return e});const _e=Rt;var Tu=Object.prototype,Nu=Tu.hasOwnProperty;function $u(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Nu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Pu=dt.Uint8Array;const Be=Pu;function Er(t){var e=new t.constructor(t.byteLength);return new Be(e).set(new Be(t)),e}function Au(t,e){var r=e?Er(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Ru=/\w*$/;function Mu(t){var e=new t.constructor(t.source,Ru.exec(t));return e.lastIndex=t.lastIndex,e}var oo=ot?ot.prototype:void 0,ao=oo?oo.valueOf:void 0;function xu(t){return ao?Object(ao.call(t)):{}}function io(t,e){var r=e?Er(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Du="[object Boolean]",Iu="[object Date]",Lu="[object Map]",Fu="[object Number]",ku="[object RegExp]",Uu="[object Set]",Bu="[object String]",Vu="[object Symbol]",Gu="[object ArrayBuffer]",zu="[object DataView]",Wu="[object Float32Array]",Hu="[object Float64Array]",Yu="[object Int8Array]",Ju="[object Int16Array]",qu="[object Int32Array]",Qu="[object Uint8Array]",Ku="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Zu="[object Uint32Array]";function tl(t,e,r){var n=t.constructor;switch(e){case Gu:return Er(t);case Du:case Iu:return new n(+t);case zu:return Au(t,r);case Wu:case Hu:case Yu:case Ju:case qu:case Qu:case Ku:case Xu:case Zu:return io(t,r);case Lu:return new n;case Fu:case Bu:return new n(t);case ku:return Mu(t);case Uu:return new n;case Vu:return xu(t)}}function so(t){return typeof t.constructor=="function"&&!dr(t)?Gi(_r(t)):{}}var el="[object Map]";function rl(t){return pt(t)&&_e(t)==el}var co=Vt&&Vt.isMap,nl=co?pr(co):rl;const ol=nl;var al="[object Set]";function il(t){return pt(t)&&_e(t)==al}var uo=Vt&&Vt.isSet,sl=uo?pr(uo):il;const cl=sl;var ul=1,ll=2,fl=4,lo="[object Arguments]",dl="[object Array]",pl="[object Boolean]",hl="[object Date]",vl="[object Error]",fo="[object Function]",ml="[object GeneratorFunction]",gl="[object Map]",yl="[object Number]",po="[object Object]",bl="[object RegExp]",_l="[object Set]",Sl="[object String]",Ol="[object Symbol]",jl="[object WeakMap]",Cl="[object ArrayBuffer]",wl="[object DataView]",El="[object Float32Array]",Tl="[object Float64Array]",Nl="[object Int8Array]",$l="[object Int16Array]",Pl="[object Int32Array]",Al="[object Uint8Array]",Rl="[object Uint8ClampedArray]",Ml="[object Uint16Array]",xl="[object Uint32Array]",D={};D[lo]=D[dl]=D[Cl]=D[wl]=D[pl]=D[hl]=D[El]=D[Tl]=D[Nl]=D[$l]=D[Pl]=D[gl]=D[yl]=D[po]=D[bl]=D[_l]=D[Sl]=D[Ol]=D[Al]=D[Rl]=D[Ml]=D[xl]=!0,D[vl]=D[fo]=D[jl]=!1;function Se(t,e,r,n,o,a){var s,i=e&ul,c=e&ll,l=e&fl;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!ct(t))return t;var f=G(t);if(f){if(s=$u(t),!i)return Tn(t,s)}else{var p=_e(t),d=p==fo||p==ml;if(ve(t))return Jn(t,i);if(p==po||p==lo||d&&!o){if(s=c||d?{}:so(t),!i)return c?gu(t,cu(s,t)):hu(t,su(s,t))}else{if(!D[p])return o?t:{};s=tl(t,p,i)}}a||(a=new ut);var v=a.get(t);if(v)return v;a.set(t,s),cl(t)?t.forEach(function(O){s.add(Se(O,e,r,O,t,a))}):ol(t)&&t.forEach(function(O,N){s.set(N,Se(O,e,r,N,t,a))});var y=l?c?jr:Or:c?ge:Le,S=f?void 0:y(t);return ts(S||t,function(O,N){S&&(N=O,O=t[N]),lr(s,N,Se(O,e,r,N,t,a))}),s}var Dl=1,Il=4;function ho(t){return Se(t,Dl|Il)}var Ll="__lodash_hash_undefined__";function Fl(t){return this.__data__.set(t,Ll),this}function kl(t){return this.__data__.has(t)}function Oe(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new gt;++e<r;)this.add(t[e])}Oe.prototype.add=Oe.prototype.push=Fl,Oe.prototype.has=kl;function Ul(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 vo(t,e){return t.has(e)}var Bl=1,Vl=2;function mo(t,e,r,n,o,a){var s=r&Bl,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,v=r&Vl?new Oe:void 0;for(a.set(t,e),a.set(e,t);++p<i;){var y=t[p],S=e[p];if(n)var O=s?n(S,y,p,e,t,a):n(y,S,p,t,e,a);if(O!==void 0){if(O)continue;d=!1;break}if(v){if(!Ul(e,function(N,w){if(!vo(v,w)&&(y===N||o(y,N,r,n,a)))return v.push(w)})){d=!1;break}}else if(!(y===S||o(y,S,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}function Gl(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Tr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var zl=1,Wl=2,Hl="[object Boolean]",Yl="[object Date]",Jl="[object Error]",ql="[object Map]",Ql="[object Number]",Kl="[object RegExp]",Xl="[object Set]",Zl="[object String]",tf="[object Symbol]",ef="[object ArrayBuffer]",rf="[object DataView]",go=ot?ot.prototype:void 0,Nr=go?go.valueOf:void 0;function nf(t,e,r,n,o,a,s){switch(r){case rf:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ef:return!(t.byteLength!=e.byteLength||!a(new Be(t),new Be(e)));case Hl:case Yl:case Ql:return pe(+t,+e);case Jl:return t.name==e.name&&t.message==e.message;case Kl:case Zl:return t==e+"";case ql:var i=Gl;case Xl:var c=n&zl;if(i||(i=Tr),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=Wl,s.set(t,e);var f=mo(i(t),i(e),n,o,a,s);return s.delete(t),f;case tf:if(Nr)return Nr.call(t)==Nr.call(e)}return!1}var of=1,af=Object.prototype,sf=af.hasOwnProperty;function cf(t,e,r,n,o,a){var s=r&of,i=Or(t),c=i.length,l=Or(e),f=l.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var d=i[p];if(!(s?d in e:sf.call(e,d)))return!1}var v=a.get(t),y=a.get(e);if(v&&y)return v==e&&y==t;var S=!0;a.set(t,e),a.set(e,t);for(var O=s;++p<c;){d=i[p];var N=t[d],w=e[d];if(n)var U=s?n(w,N,d,e,t,a):n(N,w,d,t,e,a);if(!(U===void 0?N===w||o(N,w,r,n,a):U)){S=!1;break}O||(O=d=="constructor")}if(S&&!O){var F=t.constructor,J=e.constructor;F!=J&&"constructor"in t&&"constructor"in e&&!(typeof F=="function"&&F instanceof F&&typeof J=="function"&&J instanceof J)&&(S=!1)}return a.delete(t),a.delete(e),S}var uf=1,yo="[object Arguments]",bo="[object Array]",Ve="[object Object]",lf=Object.prototype,_o=lf.hasOwnProperty;function ff(t,e,r,n,o,a){var s=G(t),i=G(e),c=s?bo:_e(t),l=i?bo:_e(e);c=c==yo?Ve:c,l=l==yo?Ve:l;var f=c==Ve,p=l==Ve,d=c==l;if(d&&ve(t)){if(!ve(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new ut),s||vr(t)?mo(t,e,r,n,o,a):nf(t,e,c,r,n,o,a);if(!(r&uf)){var v=f&&_o.call(t,"__wrapped__"),y=p&&_o.call(e,"__wrapped__");if(v||y){var S=v?t.value():t,O=y?e.value():e;return a||(a=new ut),o(S,O,r,n,a)}}return d?(a||(a=new ut),cf(t,e,r,n,o,a)):!1}function $r(t,e,r,n,o){return t===e?!0:t==null||e==null||!pt(t)&&!pt(e)?t!==t&&e!==e:ff(t,e,r,n,$r,o)}var df=1,pf=2;function hf(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],l=t[c],f=i[1];if(s&&i[2]){if(l===void 0&&!(c in t))return!1}else{var p=new ut;if(n)var d=n(l,f,c,t,e,p);if(!(d===void 0?$r(f,l,df|pf,n,p):d))return!1}}return!0}function So(t){return t===t&&!ct(t)}function vf(t){for(var e=Le(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,So(o)]}return e}function Oo(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function mf(t){var e=vf(t);return e.length==1&&e[0][2]?Oo(e[0][0],e[0][1]):function(r){return r===t||hf(r,t,e)}}function gf(t,e){return t!=null&&e in Object(t)}function yf(t,e,r){e=Gt(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=zt(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&&fr(o)&&De(s,o)&&(G(t)||he(t)))}function bf(t,e){return t!=null&&yf(t,e,gf)}var _f=1,Sf=2;function Of(t,e){return mr(t)&&So(e)?Oo(zt(t),e):function(r){var n=Bn(r,t);return n===void 0&&n===e?bf(r,t):$r(e,n,_f|Sf)}}function jf(t){return function(e){return e==null?void 0:e[t]}}function Cf(t){return function(e){return Ue(e,t)}}function wf(t){return mr(t)?jf(zt(t)):Cf(t)}function Pr(t){return typeof t=="function"?t:t==null?ar:typeof t=="object"?G(t)?Of(t[0],t[1]):mf(t):wf(t)}function Ef(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 Tf=Ef();const Nf=Tf;function Ar(t,e,r){(r!==void 0&&!pe(t[e],r)||r===void 0&&!(e in t))&&ur(t,e,r)}function Rr(t){return pt(t)&&Ie(t)}function Mr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function $f(t){return Bt(t,ge(t))}function Pf(t,e,r,n,o,a,s){var i=Mr(t,r),c=Mr(e,r),l=s.get(c);if(l){Ar(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,p=f===void 0;if(p){var d=G(c),v=!d&&ve(c),y=!d&&!v&&vr(c);f=c,d||v||y?G(i)?f=i:Rr(i)?f=Tn(i):v?(p=!1,f=Jn(c,!0)):y?(p=!1,f=io(c,!0)):f=[]:K(c)||he(c)?(f=i,he(i)?f=$f(i):(!ct(i)||ir(i))&&(f=so(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),Ar(t,r,f)}function jo(t,e,r,n,o){t!==e&&Nf(e,function(a,s){if(o||(o=new ut),ct(a))Pf(t,e,s,r,jo,n,o);else{var i=n?n(Mr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Ar(t,s,i)}},ge)}function Af(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 Co(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Rf(t,e){return e.length<2?t:Ue(t,tu(e,0,-1))}var Mf=ds(function(t,e,r){jo(t,e,r)});const wo=Mf;var xf="Expected a function";function Df(t){if(typeof t!="function")throw new TypeError(xf);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 If(t,e){return e=Gt(e,t),t=Rf(t,e),t==null||delete t[zt(Co(e))]}function Lf(t){return K(t)?void 0:t}var Ff=1,kf=2,Uf=4,Bf=Yc(function(t,e){var r={};if(t==null)return r;var n=!1;e=or(e,function(a){return a=Gt(a,t),n||(n=a.length>1),a}),Bt(t,jr(t),r),n&&(r=Se(r,Ff|kf|Uf,Lf));for(var o=e.length;o--;)If(r,e[o]);return r});const Eo=Bf;function Vf(t,e,r,n){if(!ct(t))return t;e=Gt(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=zt(e[o]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var f=i[c];l=n?n(f,c,i):void 0,l===void 0&&(l=ct(f)?f:De(e[o+1])?[]:{})}lr(i,c,l),i=i[c]}return t}function Gf(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=Ue(t,s);r(i,s)&&Vf(a,Gt(s,t),i)}return a}function zf(t,e){if(t==null)return{};var r=or(jr(t),function(n){return[n]});return e=Pr(e),Gf(t,r,function(n,o){return e(n,o[0])})}function Wf(t,e){return zf(t,Df(Pr(e)))}var Hf=1/0,Yf=Wt&&1/Tr(new Wt([,-0]))[1]==Hf?function(t){return new Wt(t)}:Wi;const Jf=Yf;var qf=200;function Qf(t,e,r){var n=-1,o=as,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=Af;else if(a>=qf){var l=e?null:Jf(t);if(l)return Tr(l);s=!1,o=vo,c=new Oe}else c=e?[]:i;t:for(;++n<a;){var f=t[n],p=e?e(f):f;if(f=r||f!==0?f:0,s&&p===p){for(var d=c.length;d--;)if(c[d]===p)continue t;e&&c.push(p),i.push(f)}else o(c,p,r)||(c!==i&&c.push(p),i.push(f))}return i}var Kf=An(function(t){var e=Co(t);return Rr(e)&&(e=void 0),Qf(br(t,1,Rr,!0),Pr(e))});const Xf=Kf;class To 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 Zf(t){return lt(t)&&typeof t[Symbol.iterator]=="function"}function lt(t){return typeof t=="object"&&t!=null}function et(t){return typeof t=="string"?JSON.stringify(t):""+t}function td(t){const{done:e,value:r}=t.next();return e?void 0:r}function ed(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: `"+et(n)+"`"}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*No(t,e,r,n){Zf(t)||(t=[t]);for(const o of t){const a=ed(o,e,r,n);a&&(yield a)}}function*xr(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"&&lt(e.schema)&&lt(t)&&!Array.isArray(t)))for(const l in t)e.schema[l]===void 0&&delete t[l];let c="valid";for(const l of e.validator(t,i))c="not_valid",yield[l,void 0];for(let[l,f,p]of e.entries(t,i)){const d=xr(f,p,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:s});for(const v of d)v[0]?(c=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?t=f:t instanceof Map?t.set(l,f):t instanceof Set?t.add(f):lt(t)&&(t[l]=f))}if(c!=="not_valid")for(const l of e.refiner(t,i))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,t])}class ht{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,l)=>{const f=o(c,l);return No(f,l,this,c)}:this.validator=()=>[],a?this.refiner=(c,l)=>{const f=a(c,l);return No(f,l,this,c)}:this.refiner=()=>[]}assert(e){return $o(e,this)}create(e){return rd(e,this)}is(e){return od(e,this)}mask(e){return nd(e,this)}validate(e,r){return r===void 0&&(r={}),Ht(e,this,r)}}function $o(t,e){const r=Ht(t,e);if(r[0])throw r[0]}function rd(t,e){const r=Ht(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function nd(t,e){const r=Ht(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function od(t,e){return!Ht(t,e)[0]}function Ht(t,e,r){r===void 0&&(r={});const n=xr(t,e,r),o=td(n);return o[0]?[new To(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Dr(){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?Mo(a):M(a)}function Ot(t,e){return new ht({type:t,schema:null,validator:e})}function Yt(t){return new ht({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 Po(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Mo(n);default:return M(n)}}function z(){return Ot("any",()=>!0)}function V(t){return new ht({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: "+et(e)}})}function Jt(){return Ot("boolean",t=>typeof t=="boolean")}function Ir(t){const e={},r=t.map(n=>et(n)).join();for(const n of t)e[n]=n;return new ht({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+et(n)}})}function Ao(){return Ot("func",t=>typeof t=="function"||"Expected a function, but received: "+et(t))}function X(t){const e=et(t),r=typeof t;return new ht({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+et(n)}})}function ad(){return Ot("never",()=>!1)}function Ro(){return Ot("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+et(t))}function M(t){const e=t?Object.keys(t):[],r=ad();return new ht({type:"object",schema:t||null,*entries(n){if(t&&lt(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 lt(n)||"Expected an object, but received: "+et(n)},coercer(n){return lt(n)?{...n}:n}})}function b(t){return new ht({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function je(t,e){return new ht({type:"record",schema:null,*entries(r){if(lt(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return lt(r)||"Expected an object, but received: "+et(r)}})}function g(){return Ot("string",t=>typeof t=="string"||"Expected a string, but received: "+et(t))}function Mo(t){const e=Object.keys(t);return new ht({type:"type",schema:t,*entries(r){if(lt(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return lt(r)||"Expected an object, but received: "+et(r)}})}function Z(t){const e=t.map(r=>r.type).join(" | ");return new ht({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||id()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=xr(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: "+et(r),...o]}})}function id(){return Ot("unknown",()=>!0)}const Lr=M({package:g(),version:g(),name:g(),exportName:b(g()),destructuring:b(Jt()),subName:b(g()),main:b(g()),cssPaths:b(V(g()))}),sd=V(Lr),cd=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var at=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(at||{}),Fr=(t=>(t.DESIGN="design",t.SAVE="save",t))(Fr||{}),kr=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(kr||{});const ud=()=>Ot("normalObj",t=>!K(t)||[at.SLOT,at.EXPRESSION,at.FUNCTION].includes(t==null?void 0:t.type)?!1:(Ht(t,je(g(),Ur)),!0)),Ur=Z([g(),Ro(),Jt(),M({type:X(at.SLOT),renderType:Ir([kr.FUNC,kr.COMP]),params:b(V(g())),value:Yt(()=>Z([qt,V(qt)]))}),M({type:X(at.EXPRESSION),value:g()}),M({type:X(at.FUNCTION),value:g()}),ud(),V(Yt(()=>Ur))]),xo=M({type:X(at.EXPRESSION),value:g()}),qt=M({id:b(g()),title:b(g()),componentName:g(),props:b(je(g(),Ur)),nodeName:b(g()),state:b(je(g(),z())),children:Yt(()=>b(V(Z([g(),qt])))),configure:b(z()),css:b(z()),style:b(z()),classNames:b(V(z())),refId:b(g()),extra:b(je(z(),z())),condition:b(Z([Jt(),xo])),loop:b(M({open:Jt(),data:Z([V(z()),xo]),args:b(V(g())),forName:b(g()),forIndex:b(g()),key:b(z()),name:b(g())})),methods:b(V(z()))}),Ge=Z([g(),M({label:g(),tip:b(g())})]),ld=M({type:X("shape"),value:V(M({name:g(),title:Ge,valueType:Yt(()=>ze)}))}),fd=M({type:X("enums"),value:V(g())});M({type:X("array"),value:Yt(()=>ze)});const dd=M({type:X("array"),value:Yt(()=>V(ze))}),ze=Z([Ir(["array","boolean","number","object","string"]),Ir(["component","expression","function"]),ld,fd,dd]),pd=Z([g(),M({componentName:g(),props:b(z()),initialValue:b(z()),component:b(z())})]),Br=M({name:g(),title:Ge,valueType:ze,description:b(g()),defaultValue:z(),setters:b(V(pd)),condition:b(Ao())});Z([g(),Ao()]);var Vr=(t=>(t.SINGLE="single",t.GROUP="group",t))(Vr||{});Z([g(),M({name:g(),describe:b(g()),params:b(M({name:g(),description:g()})),template:g()})]);const hd=M({id:b(g()),title:g(),snapshot:Z([g(),z()]),snapshotText:b(g()),description:b(g()),tags:b(V(g())),groupName:b(g()),category:b(g()),schema:Dr(Po(qt,["id"]),M({componentName:b(g())}))}),vd=M({componentName:g(),title:g(),screenshot:b(g()),icon:b(g()),tags:b(V(g())),groupName:b(g()),category:b(g()),priority:b(Ro()),npm:b(Lr),snippets:V(hd),props:V(Z([Br,M({title:b(Ge),type:X("single"),content:Br}),M({title:b(Ge),type:X("group"),content:V(Br)})])),fixedProps:b(z()),isContainer:b(Z([Jt(),M({placeholder:g(),width:g(),height:g()})])),disableEditorDragDom:b(z()),isLayout:b(Jt()),rootSelector:b(g()),advanceCustom:b(z()),extra:b(je(z(),z()))}),md=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(_,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],C):(_=typeof globalThis<"u"?globalThis:_||self,C(_.CRender={},_.React,_.ReactDOM))})(this,function(_,C,Tt){"use strict";var Km=Object.defineProperty;var Xm=(_,C,Tt)=>C in _?Km(_,C,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):_[C]=Tt;var j=(_,C,Tt)=>(Xm(_,typeof C!="symbol"?C+"":C,Tt),Tt);function ni(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 oi=ni(Tt),ai=t=>()=>{console.warn(`${t} need to be implement getComponent`)},ii=["customPageRootRender"],gn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],yn=t=>[...gn,...ii].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):gn.includes(n)&&(r[n]=ai),r},{});var si=Object.defineProperty,ci=(t,e,r)=>e in t?si(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e,r)=>(ci(t,typeof e!="symbol"?e+"":e,r),r),ui=typeof global=="object"&&global&&global.Object===Object&&global;const bn=ui;var li=typeof self=="object"&&self&&self.Object===Object&&self,fi=bn||li||Function("return this")();const dt=fi;var di=dt.Symbol;const ot=di;var _n=Object.prototype,pi=_n.hasOwnProperty,hi=_n.toString,de=ot?ot.toStringTag:void 0;function vi(t){var e=pi.call(t,de),r=t[de];try{t[de]=void 0;var n=!0}catch{}var o=hi.call(t);return n&&(e?t[de]=r:delete t[de]),o}var mi=Object.prototype,gi=mi.toString;function yi(t){return gi.call(t)}var bi="[object Null]",_i="[object Undefined]",Sn=ot?ot.toStringTag:void 0;function $t(t){return t==null?t===void 0?_i:bi:Sn&&Sn in Object(t)?vi(t):yi(t)}function pt(t){return t!=null&&typeof t=="object"}var Si="[object Symbol]";function nr(t){return typeof t=="symbol"||pt(t)&&$t(t)==Si}function or(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 Oi=Array.isArray;const G=Oi;var ji=1/0,On=ot?ot.prototype:void 0,jn=On?On.toString:void 0;function Cn(t){if(typeof t=="string")return t;if(G(t))return or(t,Cn)+"";if(nr(t))return jn?jn.call(t):"";var e=t+"";return e=="0"&&1/t==-ji?"-0":e}function ct(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ar(t){return t}var Ci="[object AsyncFunction]",Ei="[object Function]",wi="[object GeneratorFunction]",Ti="[object Proxy]";function ir(t){if(!ct(t))return!1;var e=$t(t);return e==Ei||e==wi||e==Ci||e==Ti}var $i=dt["__core-js_shared__"];const sr=$i;var En=function(){var t=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ni(t){return!!En&&En in t}var Pi=Function.prototype,Ai=Pi.toString;function Nt(t){if(t!=null){try{return Ai.call(t)}catch{}try{return t+""}catch{}}return""}var Ri=/[\\^$.*+?()[\]{}|]/g,Mi=/^\[object .+?Constructor\]$/,xi=Function.prototype,Di=Object.prototype,Ii=xi.toString,Li=Di.hasOwnProperty,Fi=RegExp("^"+Ii.call(Li).replace(Ri,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ki(t){if(!ct(t)||Ni(t))return!1;var e=ir(t)?Fi:Mi;return e.test(Nt(t))}function Ui(t,e){return t==null?void 0:t[e]}function Pt(t,e){var r=Ui(t,e);return ki(r)?r:void 0}var Bi=Pt(dt,"WeakMap");const cr=Bi;var wn=Object.create,Vi=function(){function t(){}return function(e){if(!ct(e))return{};if(wn)return wn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Gi=Vi;function zi(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 Wi(){}function Tn(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Hi=800,Yi=16,Ji=Date.now;function qi(t){var e=0,r=0;return function(){var n=Ji(),o=Yi-(n-r);if(r=n,o>0){if(++e>=Hi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Qi(t){return function(){return t}}var Ki=function(){try{var t=Pt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const xe=Ki;var Xi=xe?function(t,e){return xe(t,"toString",{configurable:!0,enumerable:!1,value:Qi(e),writable:!0})}:ar,Zi=qi(Xi);const $n=Zi;function ts(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function es(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 rs(t){return t!==t}function ns(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function os(t,e,r){return e===e?ns(t,e,r):es(t,rs,r)}function as(t,e){var r=t==null?0:t.length;return!!r&&os(t,e,0)>-1}var is=9007199254740991,ss=/^(?:0|[1-9]\d*)$/;function De(t,e){var r=typeof t;return e=e??is,!!e&&(r=="number"||r!="symbol"&&ss.test(t))&&t>-1&&t%1==0&&t<e}function ur(t,e,r){e=="__proto__"&&xe?xe(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function pe(t,e){return t===e||t!==t&&e!==e}var cs=Object.prototype,us=cs.hasOwnProperty;function lr(t,e,r){var n=t[e];(!(us.call(t,e)&&pe(n,r))||r===void 0&&!(e in t))&&ur(t,e,r)}function Bt(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?ur(r,i,c):lr(r,i,c)}return r}var Nn=Math.max;function Pn(t,e,r){return e=Nn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Nn(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),zi(t,this,i)}}function An(t,e){return $n(Pn(t,e,ar),t+"")}var ls=9007199254740991;function fr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ls}function Ie(t){return t!=null&&fr(t.length)&&!ir(t)}function fs(t,e,r){if(!ct(r))return!1;var n=typeof e;return(n=="number"?Ie(r)&&De(e,r.length):n=="string"&&e in r)?pe(r[e],t):!1}function ds(t){return An(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&&fs(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 ps=Object.prototype;function dr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ps;return t===r}function hs(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var vs="[object Arguments]";function Rn(t){return pt(t)&&$t(t)==vs}var Mn=Object.prototype,ms=Mn.hasOwnProperty,gs=Mn.propertyIsEnumerable,ys=Rn(function(){return arguments}())?Rn:function(t){return pt(t)&&ms.call(t,"callee")&&!gs.call(t,"callee")};const he=ys;function bs(){return!1}var xn=typeof _=="object"&&_&&!_.nodeType&&_,Dn=xn&&typeof module=="object"&&module&&!module.nodeType&&module,_s=Dn&&Dn.exports===xn,In=_s?dt.Buffer:void 0,Ss=In?In.isBuffer:void 0,Os=Ss||bs;const ve=Os;var js="[object Arguments]",Cs="[object Array]",Es="[object Boolean]",ws="[object Date]",Ts="[object Error]",$s="[object Function]",Ns="[object Map]",Ps="[object Number]",As="[object Object]",Rs="[object RegExp]",Ms="[object Set]",xs="[object String]",Ds="[object WeakMap]",Is="[object ArrayBuffer]",Ls="[object DataView]",Fs="[object Float32Array]",ks="[object Float64Array]",Us="[object Int8Array]",Bs="[object Int16Array]",Vs="[object Int32Array]",Gs="[object Uint8Array]",zs="[object Uint8ClampedArray]",Ws="[object Uint16Array]",Hs="[object Uint32Array]",I={};I[Fs]=I[ks]=I[Us]=I[Bs]=I[Vs]=I[Gs]=I[zs]=I[Ws]=I[Hs]=!0,I[js]=I[Cs]=I[Is]=I[Es]=I[Ls]=I[ws]=I[Ts]=I[$s]=I[Ns]=I[Ps]=I[As]=I[Rs]=I[Ms]=I[xs]=I[Ds]=!1;function Ys(t){return pt(t)&&fr(t.length)&&!!I[$t(t)]}function pr(t){return function(e){return t(e)}}var Ln=typeof _=="object"&&_&&!_.nodeType&&_,me=Ln&&typeof module=="object"&&module&&!module.nodeType&&module,Js=me&&me.exports===Ln,hr=Js&&bn.process,qs=function(){try{var t=me&&me.require&&me.require("util").types;return t||hr&&hr.binding&&hr.binding("util")}catch{}}();const Vt=qs;var Fn=Vt&&Vt.isTypedArray,Qs=Fn?pr(Fn):Ys;const vr=Qs;var Ks=Object.prototype,Xs=Ks.hasOwnProperty;function kn(t,e){var r=G(t),n=!r&&he(t),o=!r&&!n&&ve(t),a=!r&&!n&&!o&&vr(t),s=r||n||o||a,i=s?hs(t.length,String):[],c=i.length;for(var l in t)(e||Xs.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||De(l,c)))&&i.push(l);return i}function Un(t,e){return function(r){return t(e(r))}}var Zs=Un(Object.keys,Object);const tc=Zs;var ec=Object.prototype,rc=ec.hasOwnProperty;function nc(t){if(!dr(t))return tc(t);var e=[];for(var r in Object(t))rc.call(t,r)&&r!="constructor"&&e.push(r);return e}function Le(t){return Ie(t)?kn(t):nc(t)}function oc(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ac=Object.prototype,ic=ac.hasOwnProperty;function sc(t){if(!ct(t))return oc(t);var e=dr(t),r=[];for(var n in t)n=="constructor"&&(e||!ic.call(t,n))||r.push(n);return r}function ge(t){return Ie(t)?kn(t,!0):sc(t)}var cc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uc=/^\w*$/;function mr(t,e){if(G(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||nr(t)?!0:uc.test(t)||!cc.test(t)||e!=null&&t in Object(e)}var lc=Pt(Object,"create");const ye=lc;function fc(){this.__data__=ye?ye(null):{},this.size=0}function dc(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var pc="__lodash_hash_undefined__",hc=Object.prototype,vc=hc.hasOwnProperty;function mc(t){var e=this.__data__;if(ye){var r=e[t];return r===pc?void 0:r}return vc.call(e,t)?e[t]:void 0}var gc=Object.prototype,yc=gc.hasOwnProperty;function bc(t){var e=this.__data__;return ye?e[t]!==void 0:yc.call(e,t)}var _c="__lodash_hash_undefined__";function Sc(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ye&&e===void 0?_c:e,this}function At(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])}}At.prototype.clear=fc,At.prototype.delete=dc,At.prototype.get=mc,At.prototype.has=bc,At.prototype.set=Sc;function Oc(){this.__data__=[],this.size=0}function Fe(t,e){for(var r=t.length;r--;)if(pe(t[r][0],e))return r;return-1}var jc=Array.prototype,Cc=jc.splice;function Ec(t){var e=this.__data__,r=Fe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Cc.call(e,r,1),--this.size,!0}function wc(t){var e=this.__data__,r=Fe(e,t);return r<0?void 0:e[r][1]}function Tc(t){return Fe(this.__data__,t)>-1}function $c(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 mt(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])}}mt.prototype.clear=Oc,mt.prototype.delete=Ec,mt.prototype.get=wc,mt.prototype.has=Tc,mt.prototype.set=$c;var Nc=Pt(dt,"Map");const be=Nc;function Pc(){this.size=0,this.__data__={hash:new At,map:new(be||mt),string:new At}}function Ac(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ke(t,e){var r=t.__data__;return Ac(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Rc(t){var e=ke(this,t).delete(t);return this.size-=e?1:0,e}function Mc(t){return ke(this,t).get(t)}function xc(t){return ke(this,t).has(t)}function Dc(t,e){var r=ke(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function gt(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])}}gt.prototype.clear=Pc,gt.prototype.delete=Rc,gt.prototype.get=Mc,gt.prototype.has=xc,gt.prototype.set=Dc;var Ic="Expected a function";function gr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ic);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(gr.Cache||gt),r}gr.Cache=gt;var Lc=500;function Fc(t){var e=gr(t,function(n){return r.size===Lc&&r.clear(),n}),r=e.cache;return e}var kc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uc=/\\(\\)?/g,Bc=Fc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(kc,function(r,n,o,a){e.push(o?a.replace(Uc,"$1"):n||r)}),e});const Vc=Bc;function Gc(t){return t==null?"":Cn(t)}function Gt(t,e){return G(t)?t:mr(t,e)?[t]:Vc(Gc(t))}var zc=1/0;function zt(t){if(typeof t=="string"||nr(t))return t;var e=t+"";return e=="0"&&1/t==-zc?"-0":e}function Ue(t,e){e=Gt(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[zt(e[r++])];return r&&r==n?t:void 0}function Bn(t,e,r){var n=t==null?void 0:Ue(t,e);return n===void 0?r:n}function yr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Vn=ot?ot.isConcatSpreadable:void 0;function Wc(t){return G(t)||he(t)||!!(Vn&&t&&t[Vn])}function br(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=Wc),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?br(i,e-1,r,n,o):yr(o,i):n||(o[o.length]=i)}return o}function Hc(t){var e=t==null?0:t.length;return e?br(t,1):[]}function Yc(t){return $n(Pn(t,void 0,Hc),t+"")}var Jc=Un(Object.getPrototypeOf,Object);const _r=Jc;var qc="[object Object]",Qc=Function.prototype,Kc=Object.prototype,Gn=Qc.toString,Xc=Kc.hasOwnProperty,Zc=Gn.call(Object);function K(t){if(!pt(t)||$t(t)!=qc)return!1;var e=_r(t);if(e===null)return!0;var r=Xc.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Gn.call(r)==Zc}function tu(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 eu(){this.__data__=new mt,this.size=0}function ru(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function nu(t){return this.__data__.get(t)}function ou(t){return this.__data__.has(t)}var au=200;function iu(t,e){var r=this.__data__;if(r instanceof mt){var n=r.__data__;if(!be||n.length<au-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new gt(n)}return r.set(t,e),this.size=r.size,this}function ut(t){var e=this.__data__=new mt(t);this.size=e.size}ut.prototype.clear=eu,ut.prototype.delete=ru,ut.prototype.get=nu,ut.prototype.has=ou,ut.prototype.set=iu;function su(t,e){return t&&Bt(e,Le(e),t)}function cu(t,e){return t&&Bt(e,ge(e),t)}var zn=typeof _=="object"&&_&&!_.nodeType&&_,Wn=zn&&typeof module=="object"&&module&&!module.nodeType&&module,uu=Wn&&Wn.exports===zn,Hn=uu?dt.Buffer:void 0,Yn=Hn?Hn.allocUnsafe:void 0;function Jn(t,e){if(e)return t.slice();var r=t.length,n=Yn?Yn(r):new t.constructor(r);return t.copy(n),n}function lu(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 qn(){return[]}var fu=Object.prototype,du=fu.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,pu=Qn?function(t){return t==null?[]:(t=Object(t),lu(Qn(t),function(e){return du.call(t,e)}))}:qn;const Sr=pu;function hu(t,e){return Bt(t,Sr(t),e)}var vu=Object.getOwnPropertySymbols,mu=vu?function(t){for(var e=[];t;)yr(e,Sr(t)),t=_r(t);return e}:qn;const Kn=mu;function gu(t,e){return Bt(t,Kn(t),e)}function Xn(t,e,r){var n=e(t);return G(t)?n:yr(n,r(t))}function Or(t){return Xn(t,Le,Sr)}function jr(t){return Xn(t,ge,Kn)}var yu=Pt(dt,"DataView");const Cr=yu;var bu=Pt(dt,"Promise");const Er=bu;var _u=Pt(dt,"Set");const Wt=_u;var Zn="[object Map]",Su="[object Object]",to="[object Promise]",eo="[object Set]",ro="[object WeakMap]",no="[object DataView]",Ou=Nt(Cr),ju=Nt(be),Cu=Nt(Er),Eu=Nt(Wt),wu=Nt(cr),Rt=$t;(Cr&&Rt(new Cr(new ArrayBuffer(1)))!=no||be&&Rt(new be)!=Zn||Er&&Rt(Er.resolve())!=to||Wt&&Rt(new Wt)!=eo||cr&&Rt(new cr)!=ro)&&(Rt=function(t){var e=$t(t),r=e==Su?t.constructor:void 0,n=r?Nt(r):"";if(n)switch(n){case Ou:return no;case ju:return Zn;case Cu:return to;case Eu:return eo;case wu:return ro}return e});const _e=Rt;var Tu=Object.prototype,$u=Tu.hasOwnProperty;function Nu(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&$u.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Pu=dt.Uint8Array;const Be=Pu;function wr(t){var e=new t.constructor(t.byteLength);return new Be(e).set(new Be(t)),e}function Au(t,e){var r=e?wr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Ru=/\w*$/;function Mu(t){var e=new t.constructor(t.source,Ru.exec(t));return e.lastIndex=t.lastIndex,e}var oo=ot?ot.prototype:void 0,ao=oo?oo.valueOf:void 0;function xu(t){return ao?Object(ao.call(t)):{}}function io(t,e){var r=e?wr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Du="[object Boolean]",Iu="[object Date]",Lu="[object Map]",Fu="[object Number]",ku="[object RegExp]",Uu="[object Set]",Bu="[object String]",Vu="[object Symbol]",Gu="[object ArrayBuffer]",zu="[object DataView]",Wu="[object Float32Array]",Hu="[object Float64Array]",Yu="[object Int8Array]",Ju="[object Int16Array]",qu="[object Int32Array]",Qu="[object Uint8Array]",Ku="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Zu="[object Uint32Array]";function tl(t,e,r){var n=t.constructor;switch(e){case Gu:return wr(t);case Du:case Iu:return new n(+t);case zu:return Au(t,r);case Wu:case Hu:case Yu:case Ju:case qu:case Qu:case Ku:case Xu:case Zu:return io(t,r);case Lu:return new n;case Fu:case Bu:return new n(t);case ku:return Mu(t);case Uu:return new n;case Vu:return xu(t)}}function so(t){return typeof t.constructor=="function"&&!dr(t)?Gi(_r(t)):{}}var el="[object Map]";function rl(t){return pt(t)&&_e(t)==el}var co=Vt&&Vt.isMap,nl=co?pr(co):rl;const ol=nl;var al="[object Set]";function il(t){return pt(t)&&_e(t)==al}var uo=Vt&&Vt.isSet,sl=uo?pr(uo):il;const cl=sl;var ul=1,ll=2,fl=4,lo="[object Arguments]",dl="[object Array]",pl="[object Boolean]",hl="[object Date]",vl="[object Error]",fo="[object Function]",ml="[object GeneratorFunction]",gl="[object Map]",yl="[object Number]",po="[object Object]",bl="[object RegExp]",_l="[object Set]",Sl="[object String]",Ol="[object Symbol]",jl="[object WeakMap]",Cl="[object ArrayBuffer]",El="[object DataView]",wl="[object Float32Array]",Tl="[object Float64Array]",$l="[object Int8Array]",Nl="[object Int16Array]",Pl="[object Int32Array]",Al="[object Uint8Array]",Rl="[object Uint8ClampedArray]",Ml="[object Uint16Array]",xl="[object Uint32Array]",D={};D[lo]=D[dl]=D[Cl]=D[El]=D[pl]=D[hl]=D[wl]=D[Tl]=D[$l]=D[Nl]=D[Pl]=D[gl]=D[yl]=D[po]=D[bl]=D[_l]=D[Sl]=D[Ol]=D[Al]=D[Rl]=D[Ml]=D[xl]=!0,D[vl]=D[fo]=D[jl]=!1;function Se(t,e,r,n,o,a){var s,i=e&ul,c=e&ll,l=e&fl;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!ct(t))return t;var f=G(t);if(f){if(s=Nu(t),!i)return Tn(t,s)}else{var p=_e(t),d=p==fo||p==ml;if(ve(t))return Jn(t,i);if(p==po||p==lo||d&&!o){if(s=c||d?{}:so(t),!i)return c?gu(t,cu(s,t)):hu(t,su(s,t))}else{if(!D[p])return o?t:{};s=tl(t,p,i)}}a||(a=new ut);var v=a.get(t);if(v)return v;a.set(t,s),cl(t)?t.forEach(function(O){s.add(Se(O,e,r,O,t,a))}):ol(t)&&t.forEach(function(O,$){s.set($,Se(O,e,r,$,t,a))});var y=l?c?jr:Or:c?ge:Le,S=f?void 0:y(t);return ts(S||t,function(O,$){S&&($=O,O=t[$]),lr(s,$,Se(O,e,r,$,t,a))}),s}var Dl=1,Il=4;function ho(t){return Se(t,Dl|Il)}var Ll="__lodash_hash_undefined__";function Fl(t){return this.__data__.set(t,Ll),this}function kl(t){return this.__data__.has(t)}function Oe(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new gt;++e<r;)this.add(t[e])}Oe.prototype.add=Oe.prototype.push=Fl,Oe.prototype.has=kl;function Ul(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 vo(t,e){return t.has(e)}var Bl=1,Vl=2;function mo(t,e,r,n,o,a){var s=r&Bl,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,v=r&Vl?new Oe:void 0;for(a.set(t,e),a.set(e,t);++p<i;){var y=t[p],S=e[p];if(n)var O=s?n(S,y,p,e,t,a):n(y,S,p,t,e,a);if(O!==void 0){if(O)continue;d=!1;break}if(v){if(!Ul(e,function($,E){if(!vo(v,E)&&(y===$||o(y,$,r,n,a)))return v.push(E)})){d=!1;break}}else if(!(y===S||o(y,S,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}function Gl(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Tr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var zl=1,Wl=2,Hl="[object Boolean]",Yl="[object Date]",Jl="[object Error]",ql="[object Map]",Ql="[object Number]",Kl="[object RegExp]",Xl="[object Set]",Zl="[object String]",tf="[object Symbol]",ef="[object ArrayBuffer]",rf="[object DataView]",go=ot?ot.prototype:void 0,$r=go?go.valueOf:void 0;function nf(t,e,r,n,o,a,s){switch(r){case rf:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ef:return!(t.byteLength!=e.byteLength||!a(new Be(t),new Be(e)));case Hl:case Yl:case Ql:return pe(+t,+e);case Jl:return t.name==e.name&&t.message==e.message;case Kl:case Zl:return t==e+"";case ql:var i=Gl;case Xl:var c=n&zl;if(i||(i=Tr),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=Wl,s.set(t,e);var f=mo(i(t),i(e),n,o,a,s);return s.delete(t),f;case tf:if($r)return $r.call(t)==$r.call(e)}return!1}var of=1,af=Object.prototype,sf=af.hasOwnProperty;function cf(t,e,r,n,o,a){var s=r&of,i=Or(t),c=i.length,l=Or(e),f=l.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var d=i[p];if(!(s?d in e:sf.call(e,d)))return!1}var v=a.get(t),y=a.get(e);if(v&&y)return v==e&&y==t;var S=!0;a.set(t,e),a.set(e,t);for(var O=s;++p<c;){d=i[p];var $=t[d],E=e[d];if(n)var U=s?n(E,$,d,e,t,a):n($,E,d,t,e,a);if(!(U===void 0?$===E||o($,E,r,n,a):U)){S=!1;break}O||(O=d=="constructor")}if(S&&!O){var F=t.constructor,J=e.constructor;F!=J&&"constructor"in t&&"constructor"in e&&!(typeof F=="function"&&F instanceof F&&typeof J=="function"&&J instanceof J)&&(S=!1)}return a.delete(t),a.delete(e),S}var uf=1,yo="[object Arguments]",bo="[object Array]",Ve="[object Object]",lf=Object.prototype,_o=lf.hasOwnProperty;function ff(t,e,r,n,o,a){var s=G(t),i=G(e),c=s?bo:_e(t),l=i?bo:_e(e);c=c==yo?Ve:c,l=l==yo?Ve:l;var f=c==Ve,p=l==Ve,d=c==l;if(d&&ve(t)){if(!ve(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new ut),s||vr(t)?mo(t,e,r,n,o,a):nf(t,e,c,r,n,o,a);if(!(r&uf)){var v=f&&_o.call(t,"__wrapped__"),y=p&&_o.call(e,"__wrapped__");if(v||y){var S=v?t.value():t,O=y?e.value():e;return a||(a=new ut),o(S,O,r,n,a)}}return d?(a||(a=new ut),cf(t,e,r,n,o,a)):!1}function Nr(t,e,r,n,o){return t===e?!0:t==null||e==null||!pt(t)&&!pt(e)?t!==t&&e!==e:ff(t,e,r,n,Nr,o)}var df=1,pf=2;function hf(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],l=t[c],f=i[1];if(s&&i[2]){if(l===void 0&&!(c in t))return!1}else{var p=new ut;if(n)var d=n(l,f,c,t,e,p);if(!(d===void 0?Nr(f,l,df|pf,n,p):d))return!1}}return!0}function So(t){return t===t&&!ct(t)}function vf(t){for(var e=Le(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,So(o)]}return e}function Oo(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function mf(t){var e=vf(t);return e.length==1&&e[0][2]?Oo(e[0][0],e[0][1]):function(r){return r===t||hf(r,t,e)}}function gf(t,e){return t!=null&&e in Object(t)}function yf(t,e,r){e=Gt(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=zt(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&&fr(o)&&De(s,o)&&(G(t)||he(t)))}function bf(t,e){return t!=null&&yf(t,e,gf)}var _f=1,Sf=2;function Of(t,e){return mr(t)&&So(e)?Oo(zt(t),e):function(r){var n=Bn(r,t);return n===void 0&&n===e?bf(r,t):Nr(e,n,_f|Sf)}}function jf(t){return function(e){return e==null?void 0:e[t]}}function Cf(t){return function(e){return Ue(e,t)}}function Ef(t){return mr(t)?jf(zt(t)):Cf(t)}function Pr(t){return typeof t=="function"?t:t==null?ar:typeof t=="object"?G(t)?Of(t[0],t[1]):mf(t):Ef(t)}function wf(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 Tf=wf();const $f=Tf;function Ar(t,e,r){(r!==void 0&&!pe(t[e],r)||r===void 0&&!(e in t))&&ur(t,e,r)}function Rr(t){return pt(t)&&Ie(t)}function Mr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Nf(t){return Bt(t,ge(t))}function Pf(t,e,r,n,o,a,s){var i=Mr(t,r),c=Mr(e,r),l=s.get(c);if(l){Ar(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,p=f===void 0;if(p){var d=G(c),v=!d&&ve(c),y=!d&&!v&&vr(c);f=c,d||v||y?G(i)?f=i:Rr(i)?f=Tn(i):v?(p=!1,f=Jn(c,!0)):y?(p=!1,f=io(c,!0)):f=[]:K(c)||he(c)?(f=i,he(i)?f=Nf(i):(!ct(i)||ir(i))&&(f=so(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),Ar(t,r,f)}function jo(t,e,r,n,o){t!==e&&$f(e,function(a,s){if(o||(o=new ut),ct(a))Pf(t,e,s,r,jo,n,o);else{var i=n?n(Mr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Ar(t,s,i)}},ge)}function Af(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 Co(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Rf(t,e){return e.length<2?t:Ue(t,tu(e,0,-1))}var Mf=ds(function(t,e,r){jo(t,e,r)});const Eo=Mf;var xf="Expected a function";function Df(t){if(typeof t!="function")throw new TypeError(xf);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 If(t,e){return e=Gt(e,t),t=Rf(t,e),t==null||delete t[zt(Co(e))]}function Lf(t){return K(t)?void 0:t}var Ff=1,kf=2,Uf=4,Bf=Yc(function(t,e){var r={};if(t==null)return r;var n=!1;e=or(e,function(a){return a=Gt(a,t),n||(n=a.length>1),a}),Bt(t,jr(t),r),n&&(r=Se(r,Ff|kf|Uf,Lf));for(var o=e.length;o--;)If(r,e[o]);return r});const wo=Bf;function Vf(t,e,r,n){if(!ct(t))return t;e=Gt(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=zt(e[o]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var f=i[c];l=n?n(f,c,i):void 0,l===void 0&&(l=ct(f)?f:De(e[o+1])?[]:{})}lr(i,c,l),i=i[c]}return t}function Gf(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=Ue(t,s);r(i,s)&&Vf(a,Gt(s,t),i)}return a}function zf(t,e){if(t==null)return{};var r=or(jr(t),function(n){return[n]});return e=Pr(e),Gf(t,r,function(n,o){return e(n,o[0])})}function Wf(t,e){return zf(t,Df(Pr(e)))}var Hf=1/0,Yf=Wt&&1/Tr(new Wt([,-0]))[1]==Hf?function(t){return new Wt(t)}:Wi;const Jf=Yf;var qf=200;function Qf(t,e,r){var n=-1,o=as,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=Af;else if(a>=qf){var l=e?null:Jf(t);if(l)return Tr(l);s=!1,o=vo,c=new Oe}else c=e?[]:i;t:for(;++n<a;){var f=t[n],p=e?e(f):f;if(f=r||f!==0?f:0,s&&p===p){for(var d=c.length;d--;)if(c[d]===p)continue t;e&&c.push(p),i.push(f)}else o(c,p,r)||(c!==i&&c.push(p),i.push(f))}return i}var Kf=An(function(t){var e=Co(t);return Rr(e)&&(e=void 0),Qf(br(t,1,Rr,!0),Pr(e))});const Xf=Kf;class To 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 Zf(t){return lt(t)&&typeof t[Symbol.iterator]=="function"}function lt(t){return typeof t=="object"&&t!=null}function et(t){return typeof t=="string"?JSON.stringify(t):""+t}function td(t){const{done:e,value:r}=t.next();return e?void 0:r}function ed(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: `"+et(n)+"`"}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*$o(t,e,r,n){Zf(t)||(t=[t]);for(const o of t){const a=ed(o,e,r,n);a&&(yield a)}}function*xr(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"&&lt(e.schema)&&lt(t)&&!Array.isArray(t)))for(const l in t)e.schema[l]===void 0&&delete t[l];let c="valid";for(const l of e.validator(t,i))c="not_valid",yield[l,void 0];for(let[l,f,p]of e.entries(t,i)){const d=xr(f,p,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:s});for(const v of d)v[0]?(c=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?t=f:t instanceof Map?t.set(l,f):t instanceof Set?t.add(f):lt(t)&&(t[l]=f))}if(c!=="not_valid")for(const l of e.refiner(t,i))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,t])}class ht{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,l)=>{const f=o(c,l);return $o(f,l,this,c)}:this.validator=()=>[],a?this.refiner=(c,l)=>{const f=a(c,l);return $o(f,l,this,c)}:this.refiner=()=>[]}assert(e){return No(e,this)}create(e){return rd(e,this)}is(e){return od(e,this)}mask(e){return nd(e,this)}validate(e,r){return r===void 0&&(r={}),Ht(e,this,r)}}function No(t,e){const r=Ht(t,e);if(r[0])throw r[0]}function rd(t,e){const r=Ht(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function nd(t,e){const r=Ht(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function od(t,e){return!Ht(t,e)[0]}function Ht(t,e,r){r===void 0&&(r={});const n=xr(t,e,r),o=td(n);return o[0]?[new To(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Dr(){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?Mo(a):M(a)}function Ot(t,e){return new ht({type:t,schema:null,validator:e})}function Yt(t){return new ht({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 Po(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Mo(n);default:return M(n)}}function z(){return Ot("any",()=>!0)}function V(t){return new ht({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: "+et(e)}})}function Jt(){return Ot("boolean",t=>typeof t=="boolean")}function Ir(t){const e={},r=t.map(n=>et(n)).join();for(const n of t)e[n]=n;return new ht({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+et(n)}})}function Ao(){return Ot("func",t=>typeof t=="function"||"Expected a function, but received: "+et(t))}function X(t){const e=et(t),r=typeof t;return new ht({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+et(n)}})}function ad(){return Ot("never",()=>!1)}function Ro(){return Ot("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+et(t))}function M(t){const e=t?Object.keys(t):[],r=ad();return new ht({type:"object",schema:t||null,*entries(n){if(t&&lt(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 lt(n)||"Expected an object, but received: "+et(n)},coercer(n){return lt(n)?{...n}:n}})}function b(t){return new ht({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function je(t,e){return new ht({type:"record",schema:null,*entries(r){if(lt(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return lt(r)||"Expected an object, but received: "+et(r)}})}function g(){return Ot("string",t=>typeof t=="string"||"Expected a string, but received: "+et(t))}function Mo(t){const e=Object.keys(t);return new ht({type:"type",schema:t,*entries(r){if(lt(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return lt(r)||"Expected an object, but received: "+et(r)}})}function Z(t){const e=t.map(r=>r.type).join(" | ");return new ht({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||id()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=xr(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: "+et(r),...o]}})}function id(){return Ot("unknown",()=>!0)}const Lr=M({package:g(),version:g(),name:g(),exportName:b(g()),destructuring:b(Jt()),subName:b(g()),main:b(g()),cssPaths:b(V(g()))}),sd=V(Lr),cd=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var at=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(at||{}),Fr=(t=>(t.DESIGN="design",t.SAVE="save",t))(Fr||{}),kr=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(kr||{});const ud=()=>Ot("normalObj",t=>!K(t)||[at.SLOT,at.EXPRESSION,at.FUNCTION].includes(t==null?void 0:t.type)?!1:(Ht(t,je(g(),Ur)),!0)),Ur=Z([g(),Ro(),Jt(),M({type:X(at.SLOT),renderType:Ir([kr.FUNC,kr.COMP]),params:b(V(g())),value:Yt(()=>Z([qt,V(qt)]))}),M({type:X(at.EXPRESSION),value:g()}),M({type:X(at.FUNCTION),value:g()}),ud(),V(Yt(()=>Ur))]),xo=M({type:X(at.EXPRESSION),value:g()}),qt=M({id:b(g()),title:b(g()),componentName:g(),props:b(je(g(),Ur)),nodeName:b(g()),state:b(je(g(),z())),children:Yt(()=>b(V(Z([g(),qt])))),configure:b(z()),css:b(z()),style:b(z()),classNames:b(V(z())),refId:b(g()),extra:b(je(z(),z())),condition:b(Z([Jt(),xo])),loop:b(M({open:Jt(),data:Z([V(z()),xo]),args:b(V(g())),forName:b(g()),forIndex:b(g()),key:b(z()),name:b(g())})),methods:b(V(z()))}),Ge=Z([g(),M({label:g(),tip:b(g())})]),ld=M({type:X("shape"),value:V(M({name:g(),title:Ge,valueType:Yt(()=>ze)}))}),fd=M({type:X("enums"),value:V(g())});M({type:X("array"),value:Yt(()=>ze)});const dd=M({type:X("array"),value:Yt(()=>V(ze))}),ze=Z([Ir(["array","boolean","number","object","string"]),Ir(["component","expression","function"]),ld,fd,dd]),pd=Z([g(),M({componentName:g(),props:b(z()),initialValue:b(z()),component:b(z())})]),Br=M({name:g(),title:Ge,valueType:ze,description:b(g()),defaultValue:z(),setters:b(V(pd)),condition:b(Ao())});Z([g(),Ao()]);var Vr=(t=>(t.SINGLE="single",t.GROUP="group",t))(Vr||{});Z([g(),M({name:g(),describe:b(g()),params:b(M({name:g(),description:g()})),template:g()})]);const hd=M({id:b(g()),title:g(),snapshot:Z([g(),z()]),snapshotText:b(g()),description:b(g()),tags:b(V(g())),groupName:b(g()),category:b(g()),schema:Dr(Po(qt,["id"]),M({componentName:b(g())}))}),vd=M({componentName:g(),title:g(),screenshot:b(g()),icon:b(g()),tags:b(V(g())),groupName:b(g()),category:b(g()),priority:b(Ro()),npm:b(Lr),snippets:V(hd),props:V(Z([Br,M({title:b(Ge),type:X("single"),content:Br}),M({title:b(Ge),type:X("group"),content:V(Br)})])),fixedProps:b(z()),isContainer:b(Z([Jt(),M({placeholder:g(),width:g(),height:g()})])),disableEditorDragDom:b(z()),isLayout:b(Jt()),rootSelector:b(g()),advanceCustom:b(z()),extra:b(je(z(),z()))}),md=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},Gr=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return md(({data:a})=>{try{return $o(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof To&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
6
- `)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var Qt=(t=>(t.ROOT_CONTAINER="RootContainer",t))(Qt||{});const gd=M({type:X(at.FUNCTION),value:g()}),yd=Dr(Po(qt,["componentName"]),M({componentName:X("RootContainer")}));function bd(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 Ce=bd(),_d=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new xt([]);return e&&(o=e.materialsMode||new xt([])),n&&(G(n)?r.value=n.map(a=>new k(a,{parent:e,materials:o})):K(n)&&r.value.push(new k(n,{parent:e,materials:o}))),r};class Kt{constructor(e,r){T(this,"nodeType","SLOT"),T(this,"rawData"),T(this,"parent"),T(this,"emitter",Ce),T(this,"data"),T(this,"id"),T(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new xt([]);this.materialsMode=n,this.id=vt(),this.data=_d(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof k)return o.export(e);if(K(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return G(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const Do=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===Vr.SINGLE?e.push(n.content):n.type===Vr.GROUP&&(e=[...e,...Do(n.content)]):e.push(r)}),e},zr=(t,e,r)=>{if(t.type)return t.type===at.SLOT?new Kt(t,{parent:e,materials:r}):t;if(K(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=Wr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>zr(n,e,r)):t},Wr=(t,e,r)=>K(t)?zr(t,e,r):G(t)?t.map(n=>zr(n,e,r)):t;class jt{constructor(e,r,n){T(this,"nodeType","PROP"),T(this,"rawData"),T(this,"parent"),T(this,"emitter",Ce),T(this,"data"),T(this,"name"),T(this,"materialsMode");const o=(n==null?void 0:n.materials)||new xt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=Wr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=Wr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Kt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof k){const r=e.material;return Do((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 jt||o instanceof Kt||o instanceof k)return o.export(e);if(G(o))return o.map(a=>n(a));if(K(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Sd=t=>{if(typeof t=="string")return!0;Gr({data:t,dataStruct:qt,throwError:!1})},Io=(t,e,r=new xt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??vt(),children:[],props:{},methods:t.methods||[],configure:wo(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 jt){n.props[a]=i;return}n.props[a]=new jt(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof k)return a;if(K(a)){const s=a;return new k(s,{parent:e,materials:r})}else return a}):(t.children instanceof k&&(n.children=[t.children]),n.children=[new k(t.children,{parent:e,materials:r})])),n};class k{constructor(e,r){T(this,"nodeType","NODE"),T(this,"rawData"),T(this,"data"),T(this,"emitter",Ce),T(this,"parent"),T(this,"materialsModel"),T(this,"listenerHandle"),T(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Sd(e);const n=(r==null?void 0:r.materials)||new xt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=Io(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||vt()};return new k(r,{materials:this.materialsModel})}updateValue(e){const r=this.data,n={...this.data,...e};this.data=Io(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return Jr(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(f=>{o[f]=n.props[f].export(e)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof k?f.export(e):f),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(f=>{const p=Bn(i,f,!1);p&&(c[f]=p)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:s,props:o,children:a};return e==="design"&&delete l.id,l=Yr(l),l}}const Lo=(t,e,r)=>{const n={...t,id:vt(),props:{},componentName:Qt.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:wo(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];G(t.children)?o=t.children.map(s=>s instanceof k?s:K(s)?new k(s,{parent:e,materials:r}):s):t.children instanceof k?o.push(t.children):t.children&&K(t.children)&&o.push(new k(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 jt?n.props[s]=c:n.props[s]=new jt(s,c||"",{parent:e,materials:r})}),n.children=o,n};class we{constructor(e,{parent:r,materials:n}){T(this,"rawData"),T(this,"data"),T(this,"nodeType",Qt.ROOT_CONTAINER),T(this,"emitter",Ce),T(this,"materialsModel"),T(this,"listenerHandle"),T(this,"onChangeCbQueue"),T(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=Lo(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)}updateValue(e){const r=this.data,n={...this.data,...e};this.data=Lo(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return Jr(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=Fr.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 l;return(l=c==null?void 0:c.export)==null?void 0:l.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c)};let i=Eo(s,["id"]);return i=Yr(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||vt()};return new we(r,{materials:this.materialsModel,parent:null})}}const Mt=t=>(t==null?void 0:t.type)===at.EXPRESSION,Od=t=>(t==null?void 0:t.type)===at.FUNCTION,vt=()=>Math.random().toString(32).slice(3,9),jd=t=>(t==null?void 0:t.nodeType)==="NODE",Hr=t=>(t==null?void 0:t.nodeType)==="PROP",Cd=t=>(t==null?void 0:t.nodeType)==="SLOT",Yr=t=>Wf(t,e=>K(e)?!Object.keys(e).length:G(e)?!e.length:!e);function wd(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 k){r.push(i);return}if(i instanceof Kt&&a(i.value.value),i instanceof jt){a(i.value);return}if(K(i)){const c=i;Object.keys(c).forEach(l=>{a(c[l])});return}if(G(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof k))||[];r.push(...s)}}function Jr(t,e){return wd(t,r=>r.id===e)}const Ed=t=>{const e=ho(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${vt()}`,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 Td{constructor(e){T(this,"rawData"),T(this,"data"),this.rawData=e,this.data=Ed(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 Nd=t=>{if(!G(t))throw new Error("Materials must be a array");return t.map(e=>new Td(e))},$d=t=>{t==null||t.forEach(e=>{Gr({data:e,dataStruct:vd,throwError:!1})})};class xt{constructor(e){T(this,"rawData"),T(this,"data"),T(this,"usedMaterials",[]),this.rawData=e,$d(e),this.data=Nd(e)}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(){let e=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]);const r=[],n={default:[]};e=e.sort((a,s)=>(a.category||"")>(s.category||"")?1:-1),e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});const o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(p=>{const d=p.category||"default";s.includes(d)||(s.push(d),i[d]=[]),i[d].push(p)});const l=[];s.forEach(p=>{i[p].length&&l.push({name:p,list:i[p]})});const f={name:a,list:l};o.push(f)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Pd=M({version:g(),name:g(),css:b(g()),renderType:b(Z([X("COMPONENT"),X("PAGE")])),methods:b(V(gd)),componentsMeta:V(Dr(M({componentName:g()}),Lr)),thirdLibs:b(sd),componentsTree:yd,assets:b(V(z()))}),Fo=t=>(Gr({data:t,dataStruct:Pd,throwError:!1}),t),qr=(t,e,r)=>({...t,componentsTree:new we(t.componentsTree,{parent:e,materials:r})});class We{constructor(e,r){T(this,"nodeType","PAGE"),T(this,"rawData"),T(this,"emitter",Ce),T(this,"data"),T(this,"parent"),T(this,"materialsModel"),T(this,"assetPackagesList"),Fo(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new xt((r==null?void 0:r.materials)||[]),this.data=qr(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=qr(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=qr(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 Jr(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof we)return console.warn("Not found parent node"),!1;if(a instanceof jt)return console.warn("CProp can not add node"),!1;if(a instanceof Kt){const i=a.value.value,c=i.findIndex(l=>l===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 We)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(K(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 k(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=vt();const n=new k(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 k?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 k&&a instanceof k?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 Kt){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 k||n instanceof we){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=Fr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const l=o.find(f=>{var p;return f.package===((p=c.value.npm)==null?void 0:p.package)});return l&&a.push(l),{componentName:c.componentName,...ho(c.value.npm||{})}}).filter(c=>!!(c.componentName&&c.package&&c.version));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:Yr(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const l=o.find(f=>c.package===f.package);l&&a.push(l)}),i.assets=Xf(a,c=>c.package),i=Eo(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}Qt.ROOT_CONTAINER;var Ad=typeof global=="object"&&global&&global.Object===Object&&global;const ko=Ad;var Rd=typeof self=="object"&&self&&self.Object===Object&&self,Md=ko||Rd||Function("return this")();const Xt=Md;var xd=Xt.Symbol;const Zt=xd;var Uo=Object.prototype,Dd=Uo.hasOwnProperty,Id=Uo.toString,Ee=Zt?Zt.toStringTag:void 0;function Ld(t){var e=Dd.call(t,Ee),r=t[Ee];try{t[Ee]=void 0;var n=!0}catch{}var o=Id.call(t);return n&&(e?t[Ee]=r:delete t[Ee]),o}var Fd=Object.prototype,kd=Fd.toString;function Ud(t){return kd.call(t)}var Bd="[object Null]",Vd="[object Undefined]",Bo=Zt?Zt.toStringTag:void 0;function Te(t){return t==null?t===void 0?Vd:Bd:Bo&&Bo in Object(t)?Ld(t):Ud(t)}function te(t){return t!=null&&typeof t=="object"}var Gd="[object Symbol]";function zd(t){return typeof t=="symbol"||te(t)&&Te(t)==Gd}function Wd(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 Hd=Array.isArray;const ee=Hd;var Yd=1/0,Vo=Zt?Zt.prototype:void 0,Go=Vo?Vo.toString:void 0;function zo(t){if(typeof t=="string")return t;if(ee(t))return Wd(t,zo)+"";if(zd(t))return Go?Go.call(t):"";var e=t+"";return e=="0"&&1/t==-Yd?"-0":e}function Dt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Wo(t){return t}var Jd="[object AsyncFunction]",qd="[object Function]",Qd="[object GeneratorFunction]",Kd="[object Proxy]";function Qr(t){if(!Dt(t))return!1;var e=Te(t);return e==qd||e==Qd||e==Jd||e==Kd}var Xd=Xt["__core-js_shared__"];const Kr=Xd;var Ho=function(){var t=/[^.]+$/.exec(Kr&&Kr.keys&&Kr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Zd(t){return!!Ho&&Ho in t}var tp=Function.prototype,ep=tp.toString;function rp(t){if(t!=null){try{return ep.call(t)}catch{}try{return t+""}catch{}}return""}var np=/[\\^$.*+?()[\]{}|]/g,op=/^\[object .+?Constructor\]$/,ap=Function.prototype,ip=Object.prototype,sp=ap.toString,cp=ip.hasOwnProperty,up=RegExp("^"+sp.call(cp).replace(np,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lp(t){if(!Dt(t)||Zd(t))return!1;var e=Qr(t)?up:op;return e.test(rp(t))}function fp(t,e){return t==null?void 0:t[e]}function Xr(t,e){var r=fp(t,e);return lp(r)?r:void 0}var Yo=Object.create,dp=function(){function t(){}return function(e){if(!Dt(e))return{};if(Yo)return Yo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const pp=dp;function hp(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 vp(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var mp=800,gp=16,yp=Date.now;function bp(t){var e=0,r=0;return function(){var n=yp(),o=gp-(n-r);if(r=n,o>0){if(++e>=mp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function _p(t){return function(){return t}}var Sp=function(){try{var t=Xr(Object,"defineProperty");return t({},"",{}),t}catch{}}();const He=Sp;var Op=He?function(t,e){return He(t,"toString",{configurable:!0,enumerable:!1,value:_p(e),writable:!0})}:Wo,jp=bp(Op);const Cp=jp;var wp=9007199254740991,Ep=/^(?:0|[1-9]\d*)$/;function Jo(t,e){var r=typeof t;return e=e??wp,!!e&&(r=="number"||r!="symbol"&&Ep.test(t))&&t>-1&&t%1==0&&t<e}function Zr(t,e,r){e=="__proto__"&&He?He(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ye(t,e){return t===e||t!==t&&e!==e}var Tp=Object.prototype,Np=Tp.hasOwnProperty;function $p(t,e,r){var n=t[e];(!(Np.call(t,e)&&Ye(n,r))||r===void 0&&!(e in t))&&Zr(t,e,r)}function Pp(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?Zr(r,i,c):$p(r,i,c)}return r}var qo=Math.max;function Ap(t,e,r){return e=qo(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=qo(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),hp(t,this,i)}}function Rp(t,e){return Cp(Ap(t,e,Wo),t+"")}var Mp=9007199254740991;function Qo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Mp}function tn(t){return t!=null&&Qo(t.length)&&!Qr(t)}function xp(t,e,r){if(!Dt(r))return!1;var n=typeof e;return(n=="number"?tn(r)&&Jo(e,r.length):n=="string"&&e in r)?Ye(r[e],t):!1}function Dp(t){return Rp(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&&xp(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 Ip=Object.prototype;function Ko(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ip;return t===r}function Lp(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Fp="[object Arguments]";function Xo(t){return te(t)&&Te(t)==Fp}var Zo=Object.prototype,kp=Zo.hasOwnProperty,Up=Zo.propertyIsEnumerable,Bp=Xo(function(){return arguments}())?Xo:function(t){return te(t)&&kp.call(t,"callee")&&!Up.call(t,"callee")};const en=Bp;function Vp(){return!1}var ta=typeof _=="object"&&_&&!_.nodeType&&_,ea=ta&&typeof module=="object"&&module&&!module.nodeType&&module,Gp=ea&&ea.exports===ta,ra=Gp?Xt.Buffer:void 0,zp=ra?ra.isBuffer:void 0,Wp=zp||Vp;const na=Wp;var Hp="[object Arguments]",Yp="[object Array]",Jp="[object Boolean]",qp="[object Date]",Qp="[object Error]",Kp="[object Function]",Xp="[object Map]",Zp="[object Number]",th="[object Object]",eh="[object RegExp]",rh="[object Set]",nh="[object String]",oh="[object WeakMap]",ah="[object ArrayBuffer]",ih="[object DataView]",sh="[object Float32Array]",ch="[object Float64Array]",uh="[object Int8Array]",lh="[object Int16Array]",fh="[object Int32Array]",dh="[object Uint8Array]",ph="[object Uint8ClampedArray]",hh="[object Uint16Array]",vh="[object Uint32Array]",L={};L[sh]=L[ch]=L[uh]=L[lh]=L[fh]=L[dh]=L[ph]=L[hh]=L[vh]=!0,L[Hp]=L[Yp]=L[ah]=L[Jp]=L[ih]=L[qp]=L[Qp]=L[Kp]=L[Xp]=L[Zp]=L[th]=L[eh]=L[rh]=L[nh]=L[oh]=!1;function mh(t){return te(t)&&Qo(t.length)&&!!L[Te(t)]}function gh(t){return function(e){return t(e)}}var oa=typeof _=="object"&&_&&!_.nodeType&&_,Ne=oa&&typeof module=="object"&&module&&!module.nodeType&&module,yh=Ne&&Ne.exports===oa,rn=yh&&ko.process,bh=function(){try{var t=Ne&&Ne.require&&Ne.require("util").types;return t||rn&&rn.binding&&rn.binding("util")}catch{}}();const aa=bh;var ia=aa&&aa.isTypedArray,_h=ia?gh(ia):mh;const sa=_h;var Sh=Object.prototype,Oh=Sh.hasOwnProperty;function jh(t,e){var r=ee(t),n=!r&&en(t),o=!r&&!n&&na(t),a=!r&&!n&&!o&&sa(t),s=r||n||o||a,i=s?Lp(t.length,String):[],c=i.length;for(var l in t)(e||Oh.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Jo(l,c)))&&i.push(l);return i}function Ch(t,e){return function(r){return t(e(r))}}function wh(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Eh=Object.prototype,Th=Eh.hasOwnProperty;function Nh(t){if(!Dt(t))return wh(t);var e=Ko(t),r=[];for(var n in t)n=="constructor"&&(e||!Th.call(t,n))||r.push(n);return r}function ca(t){return tn(t)?jh(t,!0):Nh(t)}var $h=Xr(Object,"create");const $e=$h;function Ph(){this.__data__=$e?$e(null):{},this.size=0}function Ah(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Rh="__lodash_hash_undefined__",Mh=Object.prototype,xh=Mh.hasOwnProperty;function Dh(t){var e=this.__data__;if($e){var r=e[t];return r===Rh?void 0:r}return xh.call(e,t)?e[t]:void 0}var Ih=Object.prototype,Lh=Ih.hasOwnProperty;function Fh(t){var e=this.__data__;return $e?e[t]!==void 0:Lh.call(e,t)}var kh="__lodash_hash_undefined__";function Uh(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=$e&&e===void 0?kh:e,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=Ph,It.prototype.delete=Ah,It.prototype.get=Dh,It.prototype.has=Fh,It.prototype.set=Uh;function Bh(){this.__data__=[],this.size=0}function Je(t,e){for(var r=t.length;r--;)if(Ye(t[r][0],e))return r;return-1}var Vh=Array.prototype,Gh=Vh.splice;function zh(t){var e=this.__data__,r=Je(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Gh.call(e,r,1),--this.size,!0}function Wh(t){var e=this.__data__,r=Je(e,t);return r<0?void 0:e[r][1]}function Hh(t){return Je(this.__data__,t)>-1}function Yh(t,e){var r=this.__data__,n=Je(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=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=Bh,yt.prototype.delete=zh,yt.prototype.get=Wh,yt.prototype.has=Hh,yt.prototype.set=Yh;var Jh=Xr(Xt,"Map");const ua=Jh;function qh(){this.size=0,this.__data__={hash:new It,map:new(ua||yt),string:new It}}function Qh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qe(t,e){var r=t.__data__;return Qh(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Kh(t){var e=qe(this,t).delete(t);return this.size-=e?1:0,e}function Xh(t){return qe(this,t).get(t)}function Zh(t){return qe(this,t).has(t)}function tv(t,e){var r=qe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function re(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])}}re.prototype.clear=qh,re.prototype.delete=Kh,re.prototype.get=Xh,re.prototype.has=Zh,re.prototype.set=tv;function la(t){return t==null?"":zo(t)}var ev=Ch(Object.getPrototypeOf,Object);const fa=ev;var rv="[object Object]",nv=Function.prototype,ov=Object.prototype,da=nv.toString,av=ov.hasOwnProperty,iv=da.call(Object);function ne(t){if(!te(t)||Te(t)!=rv)return!1;var e=fa(t);if(e===null)return!0;var r=av.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&da.call(r)==iv}function sv(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 cv(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:sv(t,e,r)}var uv="\\ud800-\\udfff",lv="\\u0300-\\u036f",fv="\\ufe20-\\ufe2f",dv="\\u20d0-\\u20ff",pv=lv+fv+dv,hv="\\ufe0e\\ufe0f",vv="\\u200d",mv=RegExp("["+vv+uv+pv+hv+"]");function pa(t){return mv.test(t)}function gv(t){return t.split("")}var ha="\\ud800-\\udfff",yv="\\u0300-\\u036f",bv="\\ufe20-\\ufe2f",_v="\\u20d0-\\u20ff",Sv=yv+bv+_v,Ov="\\ufe0e\\ufe0f",jv="["+ha+"]",nn="["+Sv+"]",on="\\ud83c[\\udffb-\\udfff]",Cv="(?:"+nn+"|"+on+")",va="[^"+ha+"]",ma="(?:\\ud83c[\\udde6-\\uddff]){2}",ga="[\\ud800-\\udbff][\\udc00-\\udfff]",wv="\\u200d",ya=Cv+"?",ba="["+Ov+"]?",Ev="(?:"+wv+"(?:"+[va,ma,ga].join("|")+")"+ba+ya+")*",Tv=ba+ya+Ev,Nv="(?:"+[va+nn+"?",nn,ma,ga,jv].join("|")+")",$v=RegExp(on+"(?="+on+")|"+Nv+Tv,"g");function Pv(t){return t.match($v)||[]}function Av(t){return pa(t)?Pv(t):gv(t)}function Rv(t){return function(e){e=la(e);var r=pa(e)?Av(e):void 0,n=r?r[0]:e.charAt(0),o=r?cv(r,1).join(""):e.slice(1);return n[t]()+o}}var Mv=Rv("toUpperCase");const xv=Mv;function Dv(t){return xv(la(t).toLowerCase())}function Iv(){this.__data__=new yt,this.size=0}function Lv(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Fv(t){return this.__data__.get(t)}function kv(t){return this.__data__.has(t)}var Uv=200;function Bv(t,e){var r=this.__data__;if(r instanceof yt){var n=r.__data__;if(!ua||n.length<Uv-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new re(n)}return r.set(t,e),this.size=r.size,this}function oe(t){var e=this.__data__=new yt(t);this.size=e.size}oe.prototype.clear=Iv,oe.prototype.delete=Lv,oe.prototype.get=Fv,oe.prototype.has=kv,oe.prototype.set=Bv;var _a=typeof _=="object"&&_&&!_.nodeType&&_,Sa=_a&&typeof module=="object"&&module&&!module.nodeType&&module,Vv=Sa&&Sa.exports===_a,Oa=Vv?Xt.Buffer:void 0,ja=Oa?Oa.allocUnsafe:void 0;function Gv(t,e){if(e)return t.slice();var r=t.length,n=ja?ja(r):new t.constructor(r);return t.copy(n),n}var zv=Xt.Uint8Array;const Ca=zv;function Wv(t){var e=new t.constructor(t.byteLength);return new Ca(e).set(new Ca(t)),e}function Hv(t,e){var r=e?Wv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Yv(t){return typeof t.constructor=="function"&&!Ko(t)?pp(fa(t)):{}}function Jv(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 qv=Jv();const Qv=qv;function an(t,e,r){(r!==void 0&&!Ye(t[e],r)||r===void 0&&!(e in t))&&Zr(t,e,r)}function Kv(t){return te(t)&&tn(t)}function sn(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Xv(t){return Pp(t,ca(t))}function Zv(t,e,r,n,o,a,s){var i=sn(t,r),c=sn(e,r),l=s.get(c);if(l){an(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,p=f===void 0;if(p){var d=ee(c),v=!d&&na(c),y=!d&&!v&&sa(c);f=c,d||v||y?ee(i)?f=i:Kv(i)?f=vp(i):v?(p=!1,f=Gv(c,!0)):y?(p=!1,f=Hv(c,!0)):f=[]:ne(c)||en(c)?(f=i,en(i)?f=Xv(i):(!Dt(i)||Qr(i))&&(f=Yv(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),an(t,r,f)}function wa(t,e,r,n,o){t!==e&&Qv(e,function(a,s){if(o||(o=new oe),Dt(a))Zv(t,e,s,r,wa,n,o);else{var i=n?n(sn(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),an(t,s,i)}},ca)}var tm=Dp(function(t,e,r){wa(t,e,r)});const em=tm,rm=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Ea(t){const e=t.prototype;return!!(e&&e.isReactComponent)}function Ta(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 Na(t){class e extends C.Component{render(){return C.createElement(t,this.props)}}return e.displayName=t.displayName,e}const Lt=(t,e)=>{const r=n=>{const a=`
5
+ data struct format is invalidate`),o},Gr=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return md(({data:a})=>{try{return No(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof To&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
6
+ `)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var Qt=(t=>(t.ROOT_CONTAINER="RootContainer",t))(Qt||{});const gd=M({type:X(at.FUNCTION),value:g()}),yd=Dr(Po(qt,["componentName"]),M({componentName:X("RootContainer")}));function bd(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 Ce=bd(),_d=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new xt([]);return e&&(o=e.materialsMode||new xt([])),n&&(G(n)?r.value=n.map(a=>new k(a,{parent:e,materials:o})):K(n)&&r.value.push(new k(n,{parent:e,materials:o}))),r};class Kt{constructor(e,r){T(this,"nodeType","SLOT"),T(this,"rawData"),T(this,"parent"),T(this,"emitter",Ce),T(this,"data"),T(this,"id"),T(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new xt([]);this.materialsMode=n,this.id=vt(),this.data=_d(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof k)return o.export(e);if(K(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return G(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const Do=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===Vr.SINGLE?e.push(n.content):n.type===Vr.GROUP&&(e=[...e,...Do(n.content)]):e.push(r)}),e},zr=(t,e,r)=>{if(t.type)return t.type===at.SLOT?new Kt(t,{parent:e,materials:r}):t;if(K(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=Wr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>zr(n,e,r)):t},Wr=(t,e,r)=>K(t)?zr(t,e,r):G(t)?t.map(n=>zr(n,e,r)):t;class jt{constructor(e,r,n){T(this,"nodeType","PROP"),T(this,"rawData"),T(this,"parent"),T(this,"emitter",Ce),T(this,"data"),T(this,"name"),T(this,"materialsMode");const o=(n==null?void 0:n.materials)||new xt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=Wr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=Wr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Kt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof k){const r=e.material;return Do((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 jt||o instanceof Kt||o instanceof k)return o.export(e);if(G(o))return o.map(a=>n(a));if(K(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Sd=t=>{if(typeof t=="string")return!0;Gr({data:t,dataStruct:qt,throwError:!1})},Io=(t,e,r=new xt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??vt(),children:[],props:{},methods:t.methods||[],configure:Eo(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 jt){n.props[a]=i;return}n.props[a]=new jt(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof k)return a;if(K(a)){const s=a;return new k(s,{parent:e,materials:r})}else return a}):(t.children instanceof k&&(n.children=[t.children]),n.children=[new k(t.children,{parent:e,materials:r})])),n};class k{constructor(e,r){T(this,"nodeType","NODE"),T(this,"rawData"),T(this,"data"),T(this,"emitter",Ce),T(this,"parent"),T(this,"materialsModel"),T(this,"listenerHandle"),T(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Sd(e);const n=(r==null?void 0:r.materials)||new xt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=Io(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||vt()};return new k(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=Io(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 Jr(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(f=>{o[f]=n.props[f].export(e)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof k?f.export(e):f),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(f=>{const p=Bn(i,f,!1);p&&(c[f]=p)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:s,props:o,children:a};return e==="design"&&delete l.id,l=Yr(l),l}}const Lo=(t,e,r)=>{const n={...t,id:vt(),props:{},componentName:Qt.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:Eo(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];G(t.children)?o=t.children.map(s=>s instanceof k?s:K(s)?new k(s,{parent:e,materials:r}):s):t.children instanceof k?o.push(t.children):t.children&&K(t.children)&&o.push(new k(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 jt?n.props[s]=c:n.props[s]=new jt(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Ee{constructor(e,{parent:r,materials:n}){T(this,"rawData"),T(this,"data"),T(this,"nodeType",Qt.ROOT_CONTAINER),T(this,"emitter",Ce),T(this,"materialsModel"),T(this,"listenerHandle"),T(this,"onChangeCbQueue"),T(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=Lo(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=Lo(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 Jr(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=Fr.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 l;return(l=c==null?void 0:c.export)==null?void 0:l.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c)};let i=wo(s,["id"]);return i=Yr(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||vt()};return new Ee(r,{materials:this.materialsModel,parent:null})}}const Mt=t=>(t==null?void 0:t.type)===at.EXPRESSION,Od=t=>(t==null?void 0:t.type)===at.FUNCTION,vt=()=>Math.random().toString(32).slice(3,9),jd=t=>(t==null?void 0:t.nodeType)==="NODE",Hr=t=>(t==null?void 0:t.nodeType)==="PROP",Cd=t=>(t==null?void 0:t.nodeType)==="SLOT",Yr=t=>Wf(t,e=>K(e)?!Object.keys(e).length:G(e)?!e.length:!e);function Ed(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 k){r.push(i);return}if(i instanceof Kt&&a(i.value.value),i instanceof jt){a(i.value);return}if(K(i)){const c=i;Object.keys(c).forEach(l=>{a(c[l])});return}if(G(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof k))||[];r.push(...s)}}function Jr(t,e){return Ed(t,r=>r.id===e)}const wd=t=>{const e=ho(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${vt()}`,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 Td{constructor(e){T(this,"rawData"),T(this,"data"),this.rawData=e,this.data=wd(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 $d=t=>{if(!G(t))throw new Error("Materials must be a array");return t.map(e=>new Td(e))},Nd=t=>{t==null||t.forEach(e=>{Gr({data:e,dataStruct:vd,throwError:!1})})};class xt{constructor(e){T(this,"rawData"),T(this,"data"),T(this,"usedMaterials",[]),this.rawData=e,Nd(e),this.data=$d(e)}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(p=>{const d=p.category||"default";s.includes(d)||(s.push(d),i[d]=[]),i[d].push(p)});const l=[];s.forEach(p=>{i[p].length&&l.push({name:p,list:i[p]})});const f={name:a,list:l};o.push(f)}}),o=o.sort((a,s)=>(a.name||"")>(s.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const Pd=M({version:g(),name:g(),css:b(g()),renderType:b(Z([X("COMPONENT"),X("PAGE")])),methods:b(V(gd)),componentsMeta:V(Dr(M({componentName:g()}),Lr)),thirdLibs:b(sd),componentsTree:yd,assets:b(V(z()))}),Fo=t=>(Gr({data:t,dataStruct:Pd,throwError:!1}),t),qr=(t,e,r)=>({...t,componentsTree:new Ee(t.componentsTree,{parent:e,materials:r})});class We{constructor(e,r){T(this,"nodeType","PAGE"),T(this,"rawData"),T(this,"emitter",Ce),T(this,"data"),T(this,"parent"),T(this,"materialsModel"),T(this,"assetPackagesList"),Fo(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new xt((r==null?void 0:r.materials)||[]),this.data=qr(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=qr(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=qr(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 Jr(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Ee)return console.warn("Not found parent node"),!1;if(a instanceof jt)return console.warn("CProp can not add node"),!1;if(a instanceof Kt){const i=a.value.value,c=i.findIndex(l=>l===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 We)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(K(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 k(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=vt();const n=new k(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 k?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 k&&a instanceof k?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 Kt){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 k||n instanceof Ee){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=Fr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const l=o.find(f=>{var p;return f.package===((p=c.value.npm)==null?void 0:p.package)});return l&&a.push(l),{componentName:c.componentName,...ho(c.value.npm||{})}}).filter(c=>!!(c.componentName&&c.package&&c.version));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:Yr(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const l=o.find(f=>c.package===f.package);l&&a.push(l)}),i.assets=Xf(a,c=>c.package),i=wo(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}Qt.ROOT_CONTAINER;var Ad=typeof global=="object"&&global&&global.Object===Object&&global;const ko=Ad;var Rd=typeof self=="object"&&self&&self.Object===Object&&self,Md=ko||Rd||Function("return this")();const Xt=Md;var xd=Xt.Symbol;const Zt=xd;var Uo=Object.prototype,Dd=Uo.hasOwnProperty,Id=Uo.toString,we=Zt?Zt.toStringTag:void 0;function Ld(t){var e=Dd.call(t,we),r=t[we];try{t[we]=void 0;var n=!0}catch{}var o=Id.call(t);return n&&(e?t[we]=r:delete t[we]),o}var Fd=Object.prototype,kd=Fd.toString;function Ud(t){return kd.call(t)}var Bd="[object Null]",Vd="[object Undefined]",Bo=Zt?Zt.toStringTag:void 0;function Te(t){return t==null?t===void 0?Vd:Bd:Bo&&Bo in Object(t)?Ld(t):Ud(t)}function te(t){return t!=null&&typeof t=="object"}var Gd="[object Symbol]";function zd(t){return typeof t=="symbol"||te(t)&&Te(t)==Gd}function Wd(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 Hd=Array.isArray;const ee=Hd;var Yd=1/0,Vo=Zt?Zt.prototype:void 0,Go=Vo?Vo.toString:void 0;function zo(t){if(typeof t=="string")return t;if(ee(t))return Wd(t,zo)+"";if(zd(t))return Go?Go.call(t):"";var e=t+"";return e=="0"&&1/t==-Yd?"-0":e}function Dt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Wo(t){return t}var Jd="[object AsyncFunction]",qd="[object Function]",Qd="[object GeneratorFunction]",Kd="[object Proxy]";function Qr(t){if(!Dt(t))return!1;var e=Te(t);return e==qd||e==Qd||e==Jd||e==Kd}var Xd=Xt["__core-js_shared__"];const Kr=Xd;var Ho=function(){var t=/[^.]+$/.exec(Kr&&Kr.keys&&Kr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Zd(t){return!!Ho&&Ho in t}var tp=Function.prototype,ep=tp.toString;function rp(t){if(t!=null){try{return ep.call(t)}catch{}try{return t+""}catch{}}return""}var np=/[\\^$.*+?()[\]{}|]/g,op=/^\[object .+?Constructor\]$/,ap=Function.prototype,ip=Object.prototype,sp=ap.toString,cp=ip.hasOwnProperty,up=RegExp("^"+sp.call(cp).replace(np,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lp(t){if(!Dt(t)||Zd(t))return!1;var e=Qr(t)?up:op;return e.test(rp(t))}function fp(t,e){return t==null?void 0:t[e]}function Xr(t,e){var r=fp(t,e);return lp(r)?r:void 0}var Yo=Object.create,dp=function(){function t(){}return function(e){if(!Dt(e))return{};if(Yo)return Yo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const pp=dp;function hp(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 vp(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var mp=800,gp=16,yp=Date.now;function bp(t){var e=0,r=0;return function(){var n=yp(),o=gp-(n-r);if(r=n,o>0){if(++e>=mp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function _p(t){return function(){return t}}var Sp=function(){try{var t=Xr(Object,"defineProperty");return t({},"",{}),t}catch{}}();const He=Sp;var Op=He?function(t,e){return He(t,"toString",{configurable:!0,enumerable:!1,value:_p(e),writable:!0})}:Wo,jp=bp(Op);const Cp=jp;var Ep=9007199254740991,wp=/^(?:0|[1-9]\d*)$/;function Jo(t,e){var r=typeof t;return e=e??Ep,!!e&&(r=="number"||r!="symbol"&&wp.test(t))&&t>-1&&t%1==0&&t<e}function Zr(t,e,r){e=="__proto__"&&He?He(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ye(t,e){return t===e||t!==t&&e!==e}var Tp=Object.prototype,$p=Tp.hasOwnProperty;function Np(t,e,r){var n=t[e];(!($p.call(t,e)&&Ye(n,r))||r===void 0&&!(e in t))&&Zr(t,e,r)}function Pp(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?Zr(r,i,c):Np(r,i,c)}return r}var qo=Math.max;function Ap(t,e,r){return e=qo(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=qo(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),hp(t,this,i)}}function Rp(t,e){return Cp(Ap(t,e,Wo),t+"")}var Mp=9007199254740991;function Qo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Mp}function tn(t){return t!=null&&Qo(t.length)&&!Qr(t)}function xp(t,e,r){if(!Dt(r))return!1;var n=typeof e;return(n=="number"?tn(r)&&Jo(e,r.length):n=="string"&&e in r)?Ye(r[e],t):!1}function Dp(t){return Rp(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&&xp(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 Ip=Object.prototype;function Ko(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ip;return t===r}function Lp(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Fp="[object Arguments]";function Xo(t){return te(t)&&Te(t)==Fp}var Zo=Object.prototype,kp=Zo.hasOwnProperty,Up=Zo.propertyIsEnumerable,Bp=Xo(function(){return arguments}())?Xo:function(t){return te(t)&&kp.call(t,"callee")&&!Up.call(t,"callee")};const en=Bp;function Vp(){return!1}var ta=typeof _=="object"&&_&&!_.nodeType&&_,ea=ta&&typeof module=="object"&&module&&!module.nodeType&&module,Gp=ea&&ea.exports===ta,ra=Gp?Xt.Buffer:void 0,zp=ra?ra.isBuffer:void 0,Wp=zp||Vp;const na=Wp;var Hp="[object Arguments]",Yp="[object Array]",Jp="[object Boolean]",qp="[object Date]",Qp="[object Error]",Kp="[object Function]",Xp="[object Map]",Zp="[object Number]",th="[object Object]",eh="[object RegExp]",rh="[object Set]",nh="[object String]",oh="[object WeakMap]",ah="[object ArrayBuffer]",ih="[object DataView]",sh="[object Float32Array]",ch="[object Float64Array]",uh="[object Int8Array]",lh="[object Int16Array]",fh="[object Int32Array]",dh="[object Uint8Array]",ph="[object Uint8ClampedArray]",hh="[object Uint16Array]",vh="[object Uint32Array]",L={};L[sh]=L[ch]=L[uh]=L[lh]=L[fh]=L[dh]=L[ph]=L[hh]=L[vh]=!0,L[Hp]=L[Yp]=L[ah]=L[Jp]=L[ih]=L[qp]=L[Qp]=L[Kp]=L[Xp]=L[Zp]=L[th]=L[eh]=L[rh]=L[nh]=L[oh]=!1;function mh(t){return te(t)&&Qo(t.length)&&!!L[Te(t)]}function gh(t){return function(e){return t(e)}}var oa=typeof _=="object"&&_&&!_.nodeType&&_,$e=oa&&typeof module=="object"&&module&&!module.nodeType&&module,yh=$e&&$e.exports===oa,rn=yh&&ko.process,bh=function(){try{var t=$e&&$e.require&&$e.require("util").types;return t||rn&&rn.binding&&rn.binding("util")}catch{}}();const aa=bh;var ia=aa&&aa.isTypedArray,_h=ia?gh(ia):mh;const sa=_h;var Sh=Object.prototype,Oh=Sh.hasOwnProperty;function jh(t,e){var r=ee(t),n=!r&&en(t),o=!r&&!n&&na(t),a=!r&&!n&&!o&&sa(t),s=r||n||o||a,i=s?Lp(t.length,String):[],c=i.length;for(var l in t)(e||Oh.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Jo(l,c)))&&i.push(l);return i}function Ch(t,e){return function(r){return t(e(r))}}function Eh(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var wh=Object.prototype,Th=wh.hasOwnProperty;function $h(t){if(!Dt(t))return Eh(t);var e=Ko(t),r=[];for(var n in t)n=="constructor"&&(e||!Th.call(t,n))||r.push(n);return r}function ca(t){return tn(t)?jh(t,!0):$h(t)}var Nh=Xr(Object,"create");const Ne=Nh;function Ph(){this.__data__=Ne?Ne(null):{},this.size=0}function Ah(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Rh="__lodash_hash_undefined__",Mh=Object.prototype,xh=Mh.hasOwnProperty;function Dh(t){var e=this.__data__;if(Ne){var r=e[t];return r===Rh?void 0:r}return xh.call(e,t)?e[t]:void 0}var Ih=Object.prototype,Lh=Ih.hasOwnProperty;function Fh(t){var e=this.__data__;return Ne?e[t]!==void 0:Lh.call(e,t)}var kh="__lodash_hash_undefined__";function Uh(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ne&&e===void 0?kh:e,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=Ph,It.prototype.delete=Ah,It.prototype.get=Dh,It.prototype.has=Fh,It.prototype.set=Uh;function Bh(){this.__data__=[],this.size=0}function Je(t,e){for(var r=t.length;r--;)if(Ye(t[r][0],e))return r;return-1}var Vh=Array.prototype,Gh=Vh.splice;function zh(t){var e=this.__data__,r=Je(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Gh.call(e,r,1),--this.size,!0}function Wh(t){var e=this.__data__,r=Je(e,t);return r<0?void 0:e[r][1]}function Hh(t){return Je(this.__data__,t)>-1}function Yh(t,e){var r=this.__data__,n=Je(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=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=Bh,yt.prototype.delete=zh,yt.prototype.get=Wh,yt.prototype.has=Hh,yt.prototype.set=Yh;var Jh=Xr(Xt,"Map");const ua=Jh;function qh(){this.size=0,this.__data__={hash:new It,map:new(ua||yt),string:new It}}function Qh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qe(t,e){var r=t.__data__;return Qh(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Kh(t){var e=qe(this,t).delete(t);return this.size-=e?1:0,e}function Xh(t){return qe(this,t).get(t)}function Zh(t){return qe(this,t).has(t)}function tv(t,e){var r=qe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function re(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])}}re.prototype.clear=qh,re.prototype.delete=Kh,re.prototype.get=Xh,re.prototype.has=Zh,re.prototype.set=tv;function la(t){return t==null?"":zo(t)}var ev=Ch(Object.getPrototypeOf,Object);const fa=ev;var rv="[object Object]",nv=Function.prototype,ov=Object.prototype,da=nv.toString,av=ov.hasOwnProperty,iv=da.call(Object);function ne(t){if(!te(t)||Te(t)!=rv)return!1;var e=fa(t);if(e===null)return!0;var r=av.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&da.call(r)==iv}function sv(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 cv(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:sv(t,e,r)}var uv="\\ud800-\\udfff",lv="\\u0300-\\u036f",fv="\\ufe20-\\ufe2f",dv="\\u20d0-\\u20ff",pv=lv+fv+dv,hv="\\ufe0e\\ufe0f",vv="\\u200d",mv=RegExp("["+vv+uv+pv+hv+"]");function pa(t){return mv.test(t)}function gv(t){return t.split("")}var ha="\\ud800-\\udfff",yv="\\u0300-\\u036f",bv="\\ufe20-\\ufe2f",_v="\\u20d0-\\u20ff",Sv=yv+bv+_v,Ov="\\ufe0e\\ufe0f",jv="["+ha+"]",nn="["+Sv+"]",on="\\ud83c[\\udffb-\\udfff]",Cv="(?:"+nn+"|"+on+")",va="[^"+ha+"]",ma="(?:\\ud83c[\\udde6-\\uddff]){2}",ga="[\\ud800-\\udbff][\\udc00-\\udfff]",Ev="\\u200d",ya=Cv+"?",ba="["+Ov+"]?",wv="(?:"+Ev+"(?:"+[va,ma,ga].join("|")+")"+ba+ya+")*",Tv=ba+ya+wv,$v="(?:"+[va+nn+"?",nn,ma,ga,jv].join("|")+")",Nv=RegExp(on+"(?="+on+")|"+$v+Tv,"g");function Pv(t){return t.match(Nv)||[]}function Av(t){return pa(t)?Pv(t):gv(t)}function Rv(t){return function(e){e=la(e);var r=pa(e)?Av(e):void 0,n=r?r[0]:e.charAt(0),o=r?cv(r,1).join(""):e.slice(1);return n[t]()+o}}var Mv=Rv("toUpperCase");const xv=Mv;function Dv(t){return xv(la(t).toLowerCase())}function Iv(){this.__data__=new yt,this.size=0}function Lv(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Fv(t){return this.__data__.get(t)}function kv(t){return this.__data__.has(t)}var Uv=200;function Bv(t,e){var r=this.__data__;if(r instanceof yt){var n=r.__data__;if(!ua||n.length<Uv-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new re(n)}return r.set(t,e),this.size=r.size,this}function oe(t){var e=this.__data__=new yt(t);this.size=e.size}oe.prototype.clear=Iv,oe.prototype.delete=Lv,oe.prototype.get=Fv,oe.prototype.has=kv,oe.prototype.set=Bv;var _a=typeof _=="object"&&_&&!_.nodeType&&_,Sa=_a&&typeof module=="object"&&module&&!module.nodeType&&module,Vv=Sa&&Sa.exports===_a,Oa=Vv?Xt.Buffer:void 0,ja=Oa?Oa.allocUnsafe:void 0;function Gv(t,e){if(e)return t.slice();var r=t.length,n=ja?ja(r):new t.constructor(r);return t.copy(n),n}var zv=Xt.Uint8Array;const Ca=zv;function Wv(t){var e=new t.constructor(t.byteLength);return new Ca(e).set(new Ca(t)),e}function Hv(t,e){var r=e?Wv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Yv(t){return typeof t.constructor=="function"&&!Ko(t)?pp(fa(t)):{}}function Jv(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 qv=Jv();const Qv=qv;function an(t,e,r){(r!==void 0&&!Ye(t[e],r)||r===void 0&&!(e in t))&&Zr(t,e,r)}function Kv(t){return te(t)&&tn(t)}function sn(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Xv(t){return Pp(t,ca(t))}function Zv(t,e,r,n,o,a,s){var i=sn(t,r),c=sn(e,r),l=s.get(c);if(l){an(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,p=f===void 0;if(p){var d=ee(c),v=!d&&na(c),y=!d&&!v&&sa(c);f=c,d||v||y?ee(i)?f=i:Kv(i)?f=vp(i):v?(p=!1,f=Gv(c,!0)):y?(p=!1,f=Hv(c,!0)):f=[]:ne(c)||en(c)?(f=i,en(i)?f=Xv(i):(!Dt(i)||Qr(i))&&(f=Yv(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),an(t,r,f)}function Ea(t,e,r,n,o){t!==e&&Qv(e,function(a,s){if(o||(o=new oe),Dt(a))Zv(t,e,s,r,Ea,n,o);else{var i=n?n(sn(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),an(t,s,i)}},ca)}var tm=Dp(function(t,e,r){Ea(t,e,r)});const em=tm,rm=function(t){return!(!t||typeof t!="function"||!t.prototype)};function wa(t){const e=t.prototype;return!!(e&&e.isReactComponent)}function Ta(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 $a(t){class e extends C.Component{render(){return C.createElement(t,this.props)}}return e.displayName=t.displayName,e}const Lt=(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};
10
- `;return new Function("$$context",a)(e)};try{return r(t)}catch(n){console.warn(n);const o=`[${t}] expression run failed`;return console.warn(o),null}},$a=(t,e,r)=>function(...o){try{const a=`
11
- var args = Array.from(arguments);
12
- function runTimeFunc() {
13
- var f = ${t};
14
- var __$$storeManager__ = args.pop();
15
- var $$context = args.pop();
16
- $$context.stateManager = __$$storeManager__.getStateSnapshot();
17
- return f.apply(f, args)
18
- }
19
- return runTimeFunc();
20
- `;new Function(a)(...o,e,r)}catch(a){console.warn(a)}},cn=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},un=t=>{const e={};return Object.keys(t).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,s)=>s!==0?Dv(a):a)),e[o.join("")]=t[r]}),e},ln=t=>{let e="";return Object.keys(t).forEach(r=>{e+=`${r}:${t[r]};`}),e},nm=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o)}}),r},om=(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},Pa=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},Aa=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},am=(t,e)=>Aa(t,e),im=(t,e)=>Aa(t,e),Qe="DYNAMIC",sm=["$$context","$$nodeModel"],Ra=t=>{let e;const r=new Set,n=(c,l)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const p=e;e=l??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,p))}},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},cm=t=>t?Ra(t):Ra;class um{constructor(){j(this,"storeMap",new Map)}addStore(e,r){const n=cm(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 lm{constructor(){j(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 Ma{constructor(){j(this,"renderMode","normal");j(this,"components",{});j(this,"storeManager",new um);j(this,"variableManager",new lm);j(this,"runtimeComponentCache",new Map);j(this,"onGetRef");j(this,"onGetComponent");j(this,"onComponentMount");j(this,"onComponentDestroy");j(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=this.components[r]||(()=>`Component [${r}] not found`);return Ta(n)||(n=Na(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:l}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=l;const f=e.value.componentsTree,p=this.getComponent(f),d=this.convertModelToComponent(p,e.value.componentsTree),v={},y=f.props;return Object.keys(y).forEach(S=>{v[S]=y[S].value}),v.$$context=o,this.render(d,v)}transformProps(e={},{$$context:r}){const n=e,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(Hr(s))return o(s.value);if(Cd(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 l=f=>{const p=`${f.id}-${Qe}`;if(this.runtimeComponentCache.get(f.id))return{key:p,component:this.runtimeComponentCache.get(f.id)};const d=this.getComponent(f),v=this.convertModelToComponent(d,f),y=i.params||[];return{component:(...N)=>{const w=cn(N,y),U=this.getContext({params:w},r);return this.render(v,{$$context:U,key:p})},key:p}};if(Array.isArray(c)){const f=c==null?void 0:c.map(p=>l(p));return(...p)=>f.map(d=>Ea(d.component)?C.createElement(d.component,{$$context:r,key:d.key}):d.component(...p))}else return l(c).component}else{if(Mt(s))return Lt(s.value,r||{});if(Od(s))return $a(s.value,r,this.storeManager);if(ne(s)){let i=s;Hr(s)&&(i=s.value);const c=i,l={};return Object.keys(i).forEach(f=>{l[f]=o(c[f])}),l}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;Hr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):ee(i)?i.forEach((c,l)=>{o([...a,String(l)],c)}):ne(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 C.Component{constructor(i){super(i);j(this,"_CONDITION",!0);j(this,"_DESIGN_BOX",!1);j(this,"_NODE_MODEL",r);j(this,"_NODE_ID",r.id);j(this,"UNIQUE_ID",`${r.id}_${vt()}`);j(this,"targetComponentRef");j(this,"listenerHandle",[]);j(this,"storeState");j(this,"storeListenDisposeList",[]);j(this,"domHeader");j(this,"mediaStyleDomMap",{});j(this,"variableSpace");j(this,"nodeName");j(this,"updateState",i=>{this.storeState.setState(i),this.forceUpdate()});j(this,"getStyleDomById",i=>{const c=this.mediaStyleDomMap;let l=c[i];return l||(l=document.createElement("style"),c[i]=l),l.id=i,l});j(this,"addMediaCSS",()=>{var l;let i=this.domHeader;if(i||(i=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=i),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(f=>{var v;const p=`${this.UNIQUE_ID}_${f.state}`;let d=`.${c.class}`;if(f.state!=="normal"&&(d=`${d}:${f.state}`),Object.keys(f.style).length!==0){const y=this.getStyleDomById(p);y.innerText=`${d} { ${ln(f.style)} }`,i==null||i.appendChild(y)}(v=f.media)!=null&&v.length&&f.media.forEach(y=>{const S=`${p}_${y.type}_${y.value}`,O=this.getStyleDomById(S);O.media=`screen and (${y.type}:${y.value}px)`,O.innerHTML=`${d} { ${ln(y.style)} }`,i==null||i.appendChild(O)})})});j(this,"removeMediaCSS",()=>{const i=this.mediaStyleDomMap;Object.keys(i).forEach(c=>{var l;(l=this.domHeader)==null||l.removeChild(i[c])}),this.mediaStyleDomMap={}});j(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(i=>i()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=C.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const l=n.storeManager.getStore(c);l?(this.storeState=l,l.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(p=>{this.setState({...p})}),this.connectStore();const f=n.variableManager.get(c);f?this.variableSpace=f:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const i=n.collectSpecialProps(r.props,d=>!!Mt(d)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Mt(d));let l=[];[...i,...c].map(d=>{const v=d.val,y=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],S=Pa(v.value,y);l=[...l,...S]}).filter(Boolean);const f=Array.from(new Set(l)),p=[];f.length&&f.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.warn(n.storeManager,d,"not exits"));const y=n.storeManager.connect(d,()=>{this.forceUpdate()});p.push(y)}),this.storeListenDisposeList=p}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 ae;const{$$context:i,...c}=this.props,l=r.value.nodeName||r.id,f={key:r.id,...r.props,...c},p={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(l),getStateObj:()=>n.storeManager.getStateObj(l),getStateObjById:B=>n.storeManager.getStateObj(B),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(l).methods,getMethodsById:B=>n.variableManager.get(B).methods,getStaticVar:()=>n.variableManager.get(l).staticVar,getStaticVarById:B=>n.variableManager.get(B).staticVar};r.value.componentName===Qt.ROOT_CONTAINER&&(p.globalState=this.state,p.updateGlobalState=this.updateState);const d=n.getContext(p,i),S=n.transformProps({methods:r.value.methods},{$$context:d}).methods.reduce((B,H)=>(B[H.name]=H.define,B),{});d.methods=S,this.variableSpace.methods=Object.assign(this.variableSpace.methods,S);const O=r.value.loop;let N=[];if(O&&O.open){this.targetComponentRef.current=[];let B=O.data||[];if(Mt(O.data)){const H=O.data;B=Lt(H.value,d||{})}return N=B.map((...H)=>{var Ze;const rt=H[1],it=[O.forName||"item",O.forIndex||"index"],ie=cn(H,it);let se="loopData";O.name&&(se=`${se}${O.name}`);const Ct=n.getContext({[se]:ie},d),nt=n.transformProps(f,{$$context:Ct}),Ke=((Ze=r.value.classNames)==null?void 0:Ze.map(q=>{var Et;const wt=q.name;return(Mt(q.status)?Lt(String(((Et=q.status)==null?void 0:Et.value)||""),Ct):!1)?wt:""}))||[];let ce=`${nt.className??""} ${Ke.join(" ")}`.trim();r.value.css&&(ce=`${r.value.css.class} ${ce}`.trim()),nt.className=ce;const Xe=n.transformProps(r.value.style,{$$context:Ct});r.value.style&&(nt.style=un(Xe||{}));const{children:kt}=nt;let Re=[];if(kt!==void 0)delete nt.children,Re=Array.isArray(kt)?kt:[kt];else{const q=[];r.value.children.forEach((Ut,Et)=>{const ue=n.buildComponent(Ut,{$$context:Ct,idx:Et});q.push(ue)}),Re=q}if(nt.key=`${nt.key}-${rt}`,Mt(O.key)){const q=O.key,wt=Lt(q.value,Ct||{});nt.key+=`-${wt}`}return nt.ref=q=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[rt]=q},n.render(e,nt,...Re)}),N}const w=n.transformProps(f,{$$context:d}),{children:U}=w;let F=[];if(U!==void 0)delete w.children,F=Array.isArray(U)?U:[U];else{const B=[];r.value.children.forEach((rt,it)=>{const ie=n.buildComponent(rt,{$$context:d,idx:it});B.push(ie)}),F=B}w.ref=this.targetComponentRef;const J=((ae=r.value.classNames)==null?void 0:ae.map(B=>{var it;const H=B.name;return(Mt(B.status)?Lt(((it=B.status)==null?void 0:it.value)||"",d):!1)?H:""}))||[];let tt=`${w.className??""} ${J.join(" ")}`.trim();r.value.css&&(tt=`${r.value.css.class} ${tt}`.trim()),w.className=tt;const Ft=n.transformProps(r.value.style,{$$context:d});r.value.style&&(w.style=un(Ft||{}));let R=r.value.condition??!0;typeof R!="boolean"&&(R=Lt(R.value,d||{}));let ft={condition:R,props:w};n.processNodeConfigHook&&(ft=n.processNodeConfigHook(ft,r));const _t=n.render(e,ft.props,...F);return this._CONDITION=ft.condition,ft.condition?_t:C.createElement("div",{style:{display:"none"}},_t)}}return j(o,"__CP_TYPE__",Qe),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):jd(e)?(({currentNode:a})=>{const s=a.value.id;let i=null;if(n.get(s))i=n.get(s);else{const f=this.getComponent(a);i=this.convertModelToComponent(f,a)}!n.get(s)&&this.renderMode!=="design"&&n.set(s,i);const c=`${s}-${Qe}`,l={$$context:r,$$nodeModel:e,key:c};return this.render(i,l)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(sm.forEach(a=>{a in r&&e.__CP_TYPE__!==Qe&&delete r[a]}),C.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const fm=yn(new Ma),dm=["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 pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fn={exports:{}},Pe={};/**
10
+ `;return new Function("$$context",a)(e)};try{return r(t)}catch(n){console.warn(n);const o=`[${t}] expression run failed`;return console.warn(o),null}},Na=(t,e,r)=>function(...o){let a;try{a=`
11
+ var $$$__args__$$$ = Array.from(arguments);
12
+ function $$_run_$$() {
13
+ var $$_f_$$ = ${t||"function () {}"};
14
+ var __$$storeManager__ = $$$__args__$$$.pop();
15
+ var $$context = $$$__args__$$$.pop();
16
+ $$context.stateManager = __$$storeManager__.getStateSnapshot();
17
+ return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
18
+ }
19
+ return $$_run_$$();
20
+ `,new Function(a)(...o,e,r)}catch(s){console.log(a),console.warn(s)}},cn=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},un=t=>{const e={};return Object.keys(t).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,s)=>s!==0?Dv(a):a)),e[o.join("")]=t[r]}),e},ln=t=>{let e="";return Object.keys(t).forEach(r=>{e+=`${r}:${t[r]};`}),e},nm=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o)}}),r},om=(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},Pa=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},Aa=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},am=(t,e)=>Aa(t,e),im=(t,e)=>Aa(t,e),Qe="DYNAMIC",sm=["$$context","$$nodeModel"],Ra=t=>{let e;const r=new Set,n=(c,l)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const p=e;e=l??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,p))}},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},cm=t=>t?Ra(t):Ra;class um{constructor(){j(this,"storeMap",new Map)}addStore(e,r){const n=cm(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 lm{constructor(){j(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 Ma{constructor(){j(this,"renderMode","normal");j(this,"components",{});j(this,"storeManager",new um);j(this,"variableManager",new lm);j(this,"runtimeComponentCache",new Map);j(this,"onGetRef");j(this,"onGetComponent");j(this,"onComponentMount");j(this,"onComponentDestroy");j(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=this.components[r]||(()=>`Component [${r}] not found`);return Ta(n)||(n=$a(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:l}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=l;const f=e.value.componentsTree,p=this.getComponent(f),d=this.convertModelToComponent(p,e.value.componentsTree),v={},y=f.props;return Object.keys(y).forEach(S=>{v[S]=y[S].value}),v.$$context=o,this.render(d,v)}transformProps(e={},{$$context:r}){const n=e,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(Hr(s))return o(s.value);if(Cd(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 l=f=>{const p=`${f.id}-${Qe}`;if(this.runtimeComponentCache.get(f.id))return{key:p,component:this.runtimeComponentCache.get(f.id)};const d=this.getComponent(f),v=this.convertModelToComponent(d,f),y=i.params||[];return{component:(...$)=>{const E=cn($,y),U=this.getContext({params:E},r);return this.render(v,{$$context:U,key:p})},key:p}};if(Array.isArray(c)){const f=c==null?void 0:c.map(p=>l(p));return(...p)=>f.map(d=>wa(d.component)?C.createElement(d.component,{$$context:r,key:d.key}):d.component(...p))}else return l(c).component}else{if(Mt(s))return Lt(s.value,r||{});if(Od(s))return Na(s.value,r,this.storeManager);if(ne(s)){let i=s;Hr(s)&&(i=s.value);const c=i,l={};return Object.keys(i).forEach(f=>{l[f]=o(c[f])}),l}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;Hr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):ee(i)?i.forEach((c,l)=>{o([...a,String(l)],c)}):ne(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 C.Component{constructor(i){super(i);j(this,"_CONDITION",!0);j(this,"_DESIGN_BOX",!1);j(this,"_NODE_MODEL",r);j(this,"_NODE_ID",r.id);j(this,"UNIQUE_ID",`${r.id}_${vt()}`);j(this,"targetComponentRef");j(this,"listenerHandle",[]);j(this,"storeState");j(this,"storeListenDisposeList",[]);j(this,"domHeader");j(this,"mediaStyleDomMap",{});j(this,"variableSpace");j(this,"nodeName");j(this,"updateState",i=>{this.storeState.setState(i),this.forceUpdate()});j(this,"getStyleDomById",i=>{const c=this.mediaStyleDomMap;let l=c[i];return l||(l=document.createElement("style"),c[i]=l),l.id=i,l});j(this,"addMediaCSS",()=>{var l;let i=this.domHeader;if(i||(i=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=i),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(f=>{var v;const p=`${this.UNIQUE_ID}_${f.state}`;let d=`.${c.class}`;if(f.state!=="normal"&&(d=`${d}:${f.state}`),Object.keys(f.style).length!==0){const y=this.getStyleDomById(p);y.innerText=`${d} { ${ln(f.style)} }`,i==null||i.appendChild(y)}(v=f.media)!=null&&v.length&&f.media.forEach(y=>{const S=`${p}_${y.type}_${y.value}`,O=this.getStyleDomById(S);O.media=`screen and (${y.type}:${y.value}px)`,O.innerHTML=`${d} { ${ln(y.style)} }`,i==null||i.appendChild(O)})})});j(this,"removeMediaCSS",()=>{const i=this.mediaStyleDomMap;Object.keys(i).forEach(c=>{var l;(l=this.domHeader)==null||l.removeChild(i[c])}),this.mediaStyleDomMap={}});j(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(i=>i()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=C.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const l=n.storeManager.getStore(c);l?(this.storeState=l,l.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(p=>{this.setState({...p})}),this.connectStore();const f=n.variableManager.get(c);f?this.variableSpace=f:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const i=n.collectSpecialProps(r.props,d=>!!Mt(d)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Mt(d));let l=[];[...i,...c].map(d=>{const v=d.val,y=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],S=Pa(v.value,y);l=[...l,...S]}).filter(Boolean);const f=Array.from(new Set(l)),p=[];f.length&&f.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.warn(n.storeManager,d,"not exits"));const y=n.storeManager.connect(d,()=>{this.forceUpdate()});p.push(y)}),this.storeListenDisposeList=p}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 ae;const{$$context:i,...c}=this.props,l=r.value.nodeName||r.id,f={key:r.id,...r.props,...c},p={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(l),getStateObj:()=>n.storeManager.getStateObj(l),getStateObjById:B=>n.storeManager.getStateObj(B),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(l).methods,getMethodsById:B=>n.variableManager.get(B).methods,getStaticVar:()=>n.variableManager.get(l).staticVar,getStaticVarById:B=>n.variableManager.get(B).staticVar};r.value.componentName===Qt.ROOT_CONTAINER&&(p.globalState=this.state,p.updateGlobalState=this.updateState);const d=n.getContext(p,i),S=n.transformProps({methods:r.value.methods},{$$context:d}).methods.reduce((B,H)=>(B[H.name]=H.define,B),{});d.methods=S,this.variableSpace.methods=Object.assign(this.variableSpace.methods,S);const O=r.value.loop;let $=[];if(O&&O.open){this.targetComponentRef.current=[];let B=O.data||[];if(Mt(O.data)){const H=O.data;B=Lt(H.value,d||{})}return $=B.map((...H)=>{var Ze;const rt=H[1],it=[O.forName||"item",O.forIndex||"index"],ie=cn(H,it);let se="loopData";O.name&&(se=`${se}${O.name}`);const Ct=n.getContext({[se]:ie},d),nt=n.transformProps(f,{$$context:Ct}),Ke=((Ze=r.value.classNames)==null?void 0:Ze.map(q=>{var wt;const Et=q.name;return(Mt(q.status)?Lt(String(((wt=q.status)==null?void 0:wt.value)||""),Ct):!1)?Et:""}))||[];let ce=`${nt.className??""} ${Ke.join(" ")}`.trim();r.value.css&&(ce=`${r.value.css.class} ${ce}`.trim()),nt.className=ce;const Xe=n.transformProps(r.value.style,{$$context:Ct});r.value.style&&(nt.style=un(Xe||{}));const{children:kt}=nt;let Re=[];if(kt!==void 0)delete nt.children,Re=Array.isArray(kt)?kt:[kt];else{const q=[];r.value.children.forEach((Ut,wt)=>{const ue=n.buildComponent(Ut,{$$context:Ct,idx:wt});q.push(ue)}),Re=q}if(nt.key=`${nt.key}-${rt}`,Mt(O.key)){const q=O.key,Et=Lt(q.value,Ct||{});nt.key+=`-${Et}`}return nt.ref=q=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[rt]=q},n.render(e,nt,...Re)}),$}const E=n.transformProps(f,{$$context:d}),{children:U}=E;let F=[];if(U!==void 0)delete E.children,F=Array.isArray(U)?U:[U];else{const B=[];r.value.children.forEach((rt,it)=>{const ie=n.buildComponent(rt,{$$context:d,idx:it});B.push(ie)}),F=B}E.ref=this.targetComponentRef;const J=((ae=r.value.classNames)==null?void 0:ae.map(B=>{var it;const H=B.name;return(Mt(B.status)?Lt(((it=B.status)==null?void 0:it.value)||"",d):!1)?H:""}))||[];let tt=`${E.className??""} ${J.join(" ")}`.trim();r.value.css&&(tt=`${r.value.css.class} ${tt}`.trim()),E.className=tt;const Ft=n.transformProps(r.value.style,{$$context:d});r.value.style&&(E.style=un(Ft||{}));let R=r.value.condition??!0;typeof R!="boolean"&&(R=Lt(R.value,d||{}));let ft={condition:R,props:E};n.processNodeConfigHook&&(ft=n.processNodeConfigHook(ft,r));const _t=n.render(e,ft.props,...F);return this._CONDITION=ft.condition,ft.condition?_t:C.createElement("div",{style:{display:"none"}},_t)}}return j(o,"__CP_TYPE__",Qe),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):jd(e)?(({currentNode:a})=>{const s=a.value.id;let i=null;if(n.get(s))i=n.get(s);else{const f=this.getComponent(a);i=this.convertModelToComponent(f,a)}!n.get(s)&&this.renderMode!=="design"&&n.set(s,i);const c=`${s}-${Qe}`,l={$$context:r,$$nodeModel:e,key:c};return this.render(i,l)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(sm.forEach(a=>{a in r&&e.__CP_TYPE__!==Qe&&delete r[a]}),C.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const fm=yn(new Ma),dm=["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 pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fn={exports:{}},Pe={};/**
21
21
  * @license React
22
22
  * react-jsx-runtime.production.min.js
23
23
  *
@@ -33,15 +33,15 @@
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var Da;function mm(){return Da||(Da=1,process.env.NODE_ENV!=="production"&&function(){var t=C,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,S="@@iterator";function O(u){if(u===null||typeof u!="object")return null;var h=y&&u[y]||u[S];return typeof h=="function"?h:null}var N=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(u){{for(var h=arguments.length,m=new Array(h>1?h-1:0),E=1;E<h;E++)m[E-1]=arguments[E];U("error",u,m)}}function U(u,h,m){{var E=N.ReactDebugCurrentFrame,A=E.getStackAddendum();A!==""&&(h+="%s",m=m.concat([A]));var x=m.map(function(P){return String(P)});x.unshift("Warning: "+h),Function.prototype.apply.call(console[u],console,x)}}var F=!1,J=!1,tt=!1,Ft=!1,R=!1,ft;ft=Symbol.for("react.module.reference");function _t(u){return!!(typeof u=="string"||typeof u=="function"||u===n||u===a||R||u===o||u===l||u===f||Ft||u===v||F||J||tt||typeof u=="object"&&u!==null&&(u.$$typeof===d||u.$$typeof===p||u.$$typeof===s||u.$$typeof===i||u.$$typeof===c||u.$$typeof===ft||u.getModuleId!==void 0))}function ae(u,h,m){var E=u.displayName;if(E)return E;var A=h.displayName||h.name||"";return A!==""?m+"("+A+")":m}function B(u){return u.displayName||"Context"}function H(u){if(u==null)return null;if(typeof u.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case i:var h=u;return B(h)+".Consumer";case s:var m=u;return B(m._context)+".Provider";case c:return ae(u,u.render,"ForwardRef");case p:var E=u.displayName||null;return E!==null?E:H(u.type)||"Memo";case d:{var A=u,x=A._payload,P=A._init;try{return H(P(x))}catch{return null}}}return null}var rt=Object.assign,it=0,ie,se,Ct,nt,Ke,ce,Xe;function kt(){}kt.__reactDisabledLog=!0;function Re(){{if(it===0){ie=console.log,se=console.info,Ct=console.warn,nt=console.error,Ke=console.group,ce=console.groupCollapsed,Xe=console.groupEnd;var u={configurable:!0,enumerable:!0,value:kt,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}it++}}function Ze(){{if(it--,it===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:rt({},u,{value:ie}),info:rt({},u,{value:se}),warn:rt({},u,{value:Ct}),error:rt({},u,{value:nt}),group:rt({},u,{value:Ke}),groupCollapsed:rt({},u,{value:ce}),groupEnd:rt({},u,{value:Xe})})}it<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=N.ReactCurrentDispatcher,wt;function Ut(u,h,m){{if(wt===void 0)try{throw Error()}catch(A){var E=A.stack.trim().match(/\n( *(at )?)/);wt=E&&E[1]||""}return`
37
- `+wt+u}}var Et=!1,ue;{var Nm=typeof WeakMap=="function"?WeakMap:Map;ue=new Nm}function Ga(u,h){if(!u||Et)return"";{var m=ue.get(u);if(m!==void 0)return m}var E;Et=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=q.current,q.current=null,Re();try{if(h){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(St){E=St}Reflect.construct(u,[],P)}else{try{P.call()}catch(St){E=St}u.call(P.prototype)}}else{try{throw Error()}catch(St){E=St}u()}}catch(St){if(St&&E&&typeof St.stack=="string"){for(var $=St.stack.split(`
38
- `),Q=E.stack.split(`
39
- `),W=$.length-1,Y=Q.length-1;W>=1&&Y>=0&&$[W]!==Q[Y];)Y--;for(;W>=1&&Y>=0;W--,Y--)if($[W]!==Q[Y]){if(W!==1||Y!==1)do if(W--,Y--,Y<0||$[W]!==Q[Y]){var st=`
40
- `+$[W].replace(" at new "," at ");return u.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",u.displayName)),typeof u=="function"&&ue.set(u,st),st}while(W>=1&&Y>=0);break}}}finally{Et=!1,q.current=x,Ze(),Error.prepareStackTrace=A}var fe=u?u.displayName||u.name:"",ri=fe?Ut(fe):"";return typeof u=="function"&&ue.set(u,ri),ri}function $m(u,h,m){return Ga(u,!1)}function Pm(u){var h=u.prototype;return!!(h&&h.isReactComponent)}function tr(u,h,m){if(u==null)return"";if(typeof u=="function")return Ga(u,Pm(u));if(typeof u=="string")return Ut(u);switch(u){case l:return Ut("Suspense");case f:return Ut("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case c:return $m(u.render);case p:return tr(u.type,h,m);case d:{var E=u,A=E._payload,x=E._init;try{return tr(x(A),h,m)}catch{}}}return""}var er=Object.prototype.hasOwnProperty,za={},Wa=N.ReactDebugCurrentFrame;function rr(u){if(u){var h=u._owner,m=tr(u.type,u._source,h?h.type:null);Wa.setExtraStackFrame(m)}else Wa.setExtraStackFrame(null)}function Am(u,h,m,E,A){{var x=Function.call.bind(er);for(var P in u)if(x(u,P)){var $=void 0;try{if(typeof u[P]!="function"){var Q=Error((E||"React class")+": "+m+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Q.name="Invariant Violation",Q}$=u[P](h,P,E,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(W){$=W}$&&!($ instanceof Error)&&(rr(A),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",m,P,typeof $),rr(null)),$ instanceof Error&&!($.message in za)&&(za[$.message]=!0,rr(A),w("Failed %s type: %s",m,$.message),rr(null))}}}var Rm=Array.isArray;function dn(u){return Rm(u)}function Mm(u){{var h=typeof Symbol=="function"&&Symbol.toStringTag,m=h&&u[Symbol.toStringTag]||u.constructor.name||"Object";return m}}function xm(u){try{return Ha(u),!1}catch{return!0}}function Ha(u){return""+u}function Ya(u){if(xm(u))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Mm(u)),Ha(u)}var Me=N.ReactCurrentOwner,Dm={key:!0,ref:!0,__self:!0,__source:!0},Ja,qa,pn;pn={};function Im(u){if(er.call(u,"ref")){var h=Object.getOwnPropertyDescriptor(u,"ref").get;if(h&&h.isReactWarning)return!1}return u.ref!==void 0}function Lm(u){if(er.call(u,"key")){var h=Object.getOwnPropertyDescriptor(u,"key").get;if(h&&h.isReactWarning)return!1}return u.key!==void 0}function Fm(u,h){if(typeof u.ref=="string"&&Me.current&&h&&Me.current.stateNode!==h){var m=H(Me.current.type);pn[m]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H(Me.current.type),u.ref),pn[m]=!0)}}function km(u,h){{var m=function(){Ja||(Ja=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};m.isReactWarning=!0,Object.defineProperty(u,"key",{get:m,configurable:!0})}}function Um(u,h){{var m=function(){qa||(qa=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};m.isReactWarning=!0,Object.defineProperty(u,"ref",{get:m,configurable:!0})}}var Bm=function(u,h,m,E,A,x,P){var $={$$typeof:e,type:u,key:h,ref:m,props:P,_owner:x};return $._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty($,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty($,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$};function Vm(u,h,m,E,A){{var x,P={},$=null,Q=null;m!==void 0&&(Ya(m),$=""+m),Lm(h)&&(Ya(h.key),$=""+h.key),Im(h)&&(Q=h.ref,Fm(h,A));for(x in h)er.call(h,x)&&!Dm.hasOwnProperty(x)&&(P[x]=h[x]);if(u&&u.defaultProps){var W=u.defaultProps;for(x in W)P[x]===void 0&&(P[x]=W[x])}if($||Q){var Y=typeof u=="function"?u.displayName||u.name||"Unknown":u;$&&km(P,Y),Q&&Um(P,Y)}return Bm(u,$,Q,A,E,Me.current,P)}}var hn=N.ReactCurrentOwner,Qa=N.ReactDebugCurrentFrame;function le(u){if(u){var h=u._owner,m=tr(u.type,u._source,h?h.type:null);Qa.setExtraStackFrame(m)}else Qa.setExtraStackFrame(null)}var vn;vn=!1;function mn(u){return typeof u=="object"&&u!==null&&u.$$typeof===e}function Ka(){{if(hn.current){var u=H(hn.current.type);if(u)return`
36
+ */var Da;function mm(){return Da||(Da=1,process.env.NODE_ENV!=="production"&&function(){var t=C,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,S="@@iterator";function O(u){if(u===null||typeof u!="object")return null;var h=y&&u[y]||u[S];return typeof h=="function"?h:null}var $=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(u){{for(var h=arguments.length,m=new Array(h>1?h-1:0),w=1;w<h;w++)m[w-1]=arguments[w];U("error",u,m)}}function U(u,h,m){{var w=$.ReactDebugCurrentFrame,A=w.getStackAddendum();A!==""&&(h+="%s",m=m.concat([A]));var x=m.map(function(P){return String(P)});x.unshift("Warning: "+h),Function.prototype.apply.call(console[u],console,x)}}var F=!1,J=!1,tt=!1,Ft=!1,R=!1,ft;ft=Symbol.for("react.module.reference");function _t(u){return!!(typeof u=="string"||typeof u=="function"||u===n||u===a||R||u===o||u===l||u===f||Ft||u===v||F||J||tt||typeof u=="object"&&u!==null&&(u.$$typeof===d||u.$$typeof===p||u.$$typeof===s||u.$$typeof===i||u.$$typeof===c||u.$$typeof===ft||u.getModuleId!==void 0))}function ae(u,h,m){var w=u.displayName;if(w)return w;var A=h.displayName||h.name||"";return A!==""?m+"("+A+")":m}function B(u){return u.displayName||"Context"}function H(u){if(u==null)return null;if(typeof u.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case i:var h=u;return B(h)+".Consumer";case s:var m=u;return B(m._context)+".Provider";case c:return ae(u,u.render,"ForwardRef");case p:var w=u.displayName||null;return w!==null?w:H(u.type)||"Memo";case d:{var A=u,x=A._payload,P=A._init;try{return H(P(x))}catch{return null}}}return null}var rt=Object.assign,it=0,ie,se,Ct,nt,Ke,ce,Xe;function kt(){}kt.__reactDisabledLog=!0;function Re(){{if(it===0){ie=console.log,se=console.info,Ct=console.warn,nt=console.error,Ke=console.group,ce=console.groupCollapsed,Xe=console.groupEnd;var u={configurable:!0,enumerable:!0,value:kt,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}it++}}function Ze(){{if(it--,it===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:rt({},u,{value:ie}),info:rt({},u,{value:se}),warn:rt({},u,{value:Ct}),error:rt({},u,{value:nt}),group:rt({},u,{value:Ke}),groupCollapsed:rt({},u,{value:ce}),groupEnd:rt({},u,{value:Xe})})}it<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=$.ReactCurrentDispatcher,Et;function Ut(u,h,m){{if(Et===void 0)try{throw Error()}catch(A){var w=A.stack.trim().match(/\n( *(at )?)/);Et=w&&w[1]||""}return`
37
+ `+Et+u}}var wt=!1,ue;{var $m=typeof WeakMap=="function"?WeakMap:Map;ue=new $m}function Ga(u,h){if(!u||wt)return"";{var m=ue.get(u);if(m!==void 0)return m}var w;wt=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=q.current,q.current=null,Re();try{if(h){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(St){w=St}Reflect.construct(u,[],P)}else{try{P.call()}catch(St){w=St}u.call(P.prototype)}}else{try{throw Error()}catch(St){w=St}u()}}catch(St){if(St&&w&&typeof St.stack=="string"){for(var N=St.stack.split(`
38
+ `),Q=w.stack.split(`
39
+ `),W=N.length-1,Y=Q.length-1;W>=1&&Y>=0&&N[W]!==Q[Y];)Y--;for(;W>=1&&Y>=0;W--,Y--)if(N[W]!==Q[Y]){if(W!==1||Y!==1)do if(W--,Y--,Y<0||N[W]!==Q[Y]){var st=`
40
+ `+N[W].replace(" at new "," at ");return u.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",u.displayName)),typeof u=="function"&&ue.set(u,st),st}while(W>=1&&Y>=0);break}}}finally{wt=!1,q.current=x,Ze(),Error.prepareStackTrace=A}var fe=u?u.displayName||u.name:"",ri=fe?Ut(fe):"";return typeof u=="function"&&ue.set(u,ri),ri}function Nm(u,h,m){return Ga(u,!1)}function Pm(u){var h=u.prototype;return!!(h&&h.isReactComponent)}function tr(u,h,m){if(u==null)return"";if(typeof u=="function")return Ga(u,Pm(u));if(typeof u=="string")return Ut(u);switch(u){case l:return Ut("Suspense");case f:return Ut("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case c:return Nm(u.render);case p:return tr(u.type,h,m);case d:{var w=u,A=w._payload,x=w._init;try{return tr(x(A),h,m)}catch{}}}return""}var er=Object.prototype.hasOwnProperty,za={},Wa=$.ReactDebugCurrentFrame;function rr(u){if(u){var h=u._owner,m=tr(u.type,u._source,h?h.type:null);Wa.setExtraStackFrame(m)}else Wa.setExtraStackFrame(null)}function Am(u,h,m,w,A){{var x=Function.call.bind(er);for(var P in u)if(x(u,P)){var N=void 0;try{if(typeof u[P]!="function"){var Q=Error((w||"React class")+": "+m+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Q.name="Invariant Violation",Q}N=u[P](h,P,w,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(W){N=W}N&&!(N instanceof Error)&&(rr(A),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",m,P,typeof N),rr(null)),N instanceof Error&&!(N.message in za)&&(za[N.message]=!0,rr(A),E("Failed %s type: %s",m,N.message),rr(null))}}}var Rm=Array.isArray;function dn(u){return Rm(u)}function Mm(u){{var h=typeof Symbol=="function"&&Symbol.toStringTag,m=h&&u[Symbol.toStringTag]||u.constructor.name||"Object";return m}}function xm(u){try{return Ha(u),!1}catch{return!0}}function Ha(u){return""+u}function Ya(u){if(xm(u))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Mm(u)),Ha(u)}var Me=$.ReactCurrentOwner,Dm={key:!0,ref:!0,__self:!0,__source:!0},Ja,qa,pn;pn={};function Im(u){if(er.call(u,"ref")){var h=Object.getOwnPropertyDescriptor(u,"ref").get;if(h&&h.isReactWarning)return!1}return u.ref!==void 0}function Lm(u){if(er.call(u,"key")){var h=Object.getOwnPropertyDescriptor(u,"key").get;if(h&&h.isReactWarning)return!1}return u.key!==void 0}function Fm(u,h){if(typeof u.ref=="string"&&Me.current&&h&&Me.current.stateNode!==h){var m=H(Me.current.type);pn[m]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H(Me.current.type),u.ref),pn[m]=!0)}}function km(u,h){{var m=function(){Ja||(Ja=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};m.isReactWarning=!0,Object.defineProperty(u,"key",{get:m,configurable:!0})}}function Um(u,h){{var m=function(){qa||(qa=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};m.isReactWarning=!0,Object.defineProperty(u,"ref",{get:m,configurable:!0})}}var Bm=function(u,h,m,w,A,x,P){var N={$$typeof:e,type:u,key:h,ref:m,props:P,_owner:x};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function Vm(u,h,m,w,A){{var x,P={},N=null,Q=null;m!==void 0&&(Ya(m),N=""+m),Lm(h)&&(Ya(h.key),N=""+h.key),Im(h)&&(Q=h.ref,Fm(h,A));for(x in h)er.call(h,x)&&!Dm.hasOwnProperty(x)&&(P[x]=h[x]);if(u&&u.defaultProps){var W=u.defaultProps;for(x in W)P[x]===void 0&&(P[x]=W[x])}if(N||Q){var Y=typeof u=="function"?u.displayName||u.name||"Unknown":u;N&&km(P,Y),Q&&Um(P,Y)}return Bm(u,N,Q,A,w,Me.current,P)}}var hn=$.ReactCurrentOwner,Qa=$.ReactDebugCurrentFrame;function le(u){if(u){var h=u._owner,m=tr(u.type,u._source,h?h.type:null);Qa.setExtraStackFrame(m)}else Qa.setExtraStackFrame(null)}var vn;vn=!1;function mn(u){return typeof u=="object"&&u!==null&&u.$$typeof===e}function Ka(){{if(hn.current){var u=H(hn.current.type);if(u)return`
41
41
 
42
42
  Check the render method of \``+u+"`."}return""}}function Gm(u){{if(u!==void 0){var h=u.fileName.replace(/^.*[\\\/]/,""),m=u.lineNumber;return`
43
43
 
44
44
  Check your code at `+h+":"+m+"."}return""}}var Xa={};function zm(u){{var h=Ka();if(!h){var m=typeof u=="string"?u:u.displayName||u.name;m&&(h=`
45
45
 
46
- Check the top-level render call using <`+m+">.")}return h}}function Za(u,h){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var m=zm(h);if(Xa[m])return;Xa[m]=!0;var E="";u&&u._owner&&u._owner!==hn.current&&(E=" It was passed a child from "+H(u._owner.type)+"."),le(u),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,E),le(null)}}function ti(u,h){{if(typeof u!="object")return;if(dn(u))for(var m=0;m<u.length;m++){var E=u[m];mn(E)&&Za(E,h)}else if(mn(u))u._store&&(u._store.validated=!0);else if(u){var A=O(u);if(typeof A=="function"&&A!==u.entries)for(var x=A.call(u),P;!(P=x.next()).done;)mn(P.value)&&Za(P.value,h)}}}function Wm(u){{var h=u.type;if(h==null||typeof h=="string")return;var m;if(typeof h=="function")m=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===c||h.$$typeof===p))m=h.propTypes;else return;if(m){var E=H(h);Am(m,u.props,"prop",E,u)}else if(h.PropTypes!==void 0&&!vn){vn=!0;var A=H(h);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hm(u){{for(var h=Object.keys(u.props),m=0;m<h.length;m++){var E=h[m];if(E!=="children"&&E!=="key"){le(u),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),le(null);break}}u.ref!==null&&(le(u),w("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}function ei(u,h,m,E,A,x){{var P=_t(u);if(!P){var $="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&($+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Q=Gm(A);Q?$+=Q:$+=Ka();var W;u===null?W="null":dn(u)?W="array":u!==void 0&&u.$$typeof===e?(W="<"+(H(u.type)||"Unknown")+" />",$=" Did you accidentally export a JSX literal instead of a component?"):W=typeof u,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",W,$)}var Y=Vm(u,h,m,A,x);if(Y==null)return Y;if(P){var st=h.children;if(st!==void 0)if(E)if(dn(st)){for(var fe=0;fe<st.length;fe++)ti(st[fe],u);Object.freeze&&Object.freeze(st)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ti(st,u)}return u===n?Hm(Y):Wm(Y),Y}}function Ym(u,h,m){return ei(u,h,m,!0)}function Jm(u,h,m){return ei(u,h,m,!1)}var qm=Jm,Qm=Ym;Ae.Fragment=n,Ae.jsx=qm,Ae.jsxs=Qm}()),Ae}process.env.NODE_ENV==="production"?fn.exports=vm():fn.exports=mm();var gm=fn.exports;const ym=gm.jsx,bt=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},bm=[...dm,...cd].reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),C.createElement(e,{...o,...bt(n)},...a)},t),{}),_m={RootContainer:({children:t})=>t,...bm,CContainer:({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),C.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),ym("div",{...o,...bt(e),children:a})},CVideo:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("video",{...r,...bt(e)},...n)},CAudio:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("audio",{...r,...bt(e)},...n)},CBlock:({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(l=>l!==void 0);const{style:s={},...i}=bt(n),c={height:r,width:e,...s,...o.style||{}};return C.createElement("div",{...o,...i,style:c},...a)},CImage:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("img",{...r,...bt(e)},...n)},CText:({$$attributes:t=[],content:e,...r})=>C.createElement("span",{...r,...bt(t)},e),CCanvas:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("canvas",{...r,...bt(e)},...n)},CNativeTag:({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...s}=bt(e),i={...a,...n.style||{}};return C.createElement(r,{...n,...s,style:i},...o)}};class Sm{constructor(){j(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 Ia extends C.Component{constructor(r){super(r);j(this,"refManager");j(this,"dynamicComponentInstanceMap",new Map);j(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)});j(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(ne(r)&&Fo(r)){const n=r;this.setState({pageModel:new We(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new We(r.page)},this.refManager=new Sm}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={..._m,...r.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:s,onComponentDestroy:a,$$context:l,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const Om=()=>{const t=C.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class jm extends C.Component{constructor(r){super(r);j(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=C.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,C.createElement("p",null,"msg: ",String(this.state.error)),C.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"),C.createElement("div",{style:{display:"none"}}));return C.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class La{constructor(){j(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 Fa=t=>{const{node:e}=t,r=C.useMemo(()=>{const i=e.isContainer();return ne(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 C.createElement("div",{style:{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",minWidth:"300px",minHeight:"50px",width:a,height:o,...s}},n)};class Cm extends C.Component{constructor(r){super(r);j(this,"instanceManager",new La);j(this,"renderRef");j(this,"dropPlaceholder",Fa);j(this,"onGetComponent",(r,n)=>{var c,l;const o=this;let a=r;const s=(l=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:l.wrapComponent;s&&(a=s(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class i extends C.Component{constructor(){super(...arguments);j(this,"_DESIGN_BOX",!0);j(this,"_NODE_MODEL",n);j(this,"_NODE_ID",n.id);j(this,"_UNIQUE_ID",`${n.id}_${vt()}`);j(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){const{children:d=[],onlyRenderChild:v,...y}=this.props;let S=d;return ee(d)||(S=[d]),!!!S.filter(Boolean).length&&(n.isContainer()||n.value.componentName===Qt.ROOT_CONTAINER)&&S.push(C.createElement(o.dropPlaceholder,{node:n})),v?S:C.createElement(a,y,...S)}}return C.forwardRef(function(p,d){return C.createElement(jm,{node:n,targetComponent:i},C.createElement(i,{ref:d,...p}))})});this.renderRef=C.createRef(),r.dropPlaceholder&&(this.dropPlaceholder=r.dropPlaceholder)}componentDidMount(){var r,n;(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=ka(r);if(!n)return null;const o=Ua(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=oi.findDOMNode(s);if(i&&!(i instanceof Text))if(n){const l=Array.from(((c=i.querySelectorAll)==null?void 0:c.call(i,n))||[]);a.push(...l)}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),C.createElement(Ia,{onGetComponent:n,...a,processNodeConfigHook:(s,i)=>{var y,S;if(i.nodeType!=="NODE")return s;const{props:c,condition:l}=s;let f={...c};const p=((y=i.value.configure)==null?void 0:y.devState)||{},d=(S=i.material)==null?void 0:S.value.fixedProps;if(d!==void 0){if(ne(d))f={...f,...d};else if(typeof d=="function"){const O=d(f);f={...f,...O}}}let v=l;return p.condition===!1&&(v=p.condition),{props:em(f,p.props||{}),condition:v}},ref:this.renderRef})}}const ka=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:ka(t.parentElement)},Ua=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:Ua(t.return):null},wm=()=>{const t=C.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 Ba={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(pm,function(){var r=function(){},n={},o={},a={};function s(d,v){d=d.push?d:[d];var y=[],S=d.length,O=S,N,w,U,F;for(N=function(J,tt){tt.length&&y.push(J),O--,O||v(y)};S--;){if(w=d[S],U=o[w],U){N(w,U);continue}F=a[w]=a[w]||[],F.push(N)}}function i(d,v){if(d){var y=a[d];if(o[d]=v,!!y)for(;y.length;)y[0](d,v),y.splice(0,1)}}function c(d,v){d.call&&(d={success:d}),v.length?(d.error||r)(v):(d.success||r)(d)}function l(d,v,y,S){var O=document,N=y.async,w=(y.numRetries||0)+1,U=y.before||r,F=d.replace(/[\?|#].*$/,""),J=d.replace(/^(css|img|module|nomodule)!/,""),tt,Ft,R;if(S=S||0,/(^css!|\.css$)/.test(F))R=O.createElement("link"),R.rel="stylesheet",R.href=J,tt="hideFocus"in R,tt&&R.relList&&(tt=0,R.rel="preload",R.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(F))R=O.createElement("img"),R.src=J;else if(R=O.createElement("script"),R.src=J,R.async=N===void 0?!0:N,Ft="noModule"in R,/^module!/.test(F)){if(!Ft)return v(d,"l");R.type="module"}else if(/^nomodule!/.test(F)&&Ft)return v(d,"l");R.onload=R.onerror=R.onbeforeload=function(ft){var _t=ft.type[0];if(tt)try{R.sheet.cssText.length||(_t="e")}catch(ae){ae.code!=18&&(_t="e")}if(_t=="e"){if(S+=1,S<w)return l(d,v,y,S)}else if(R.rel=="preload"&&R.as=="style")return R.rel="stylesheet";v(d,_t,ft.defaultPrevented)},U(d,R)!==!1&&O.head.appendChild(R)}function f(d,v,y){d=d.push?d:[d];var S=d.length,O=S,N=[],w,U;for(w=function(F,J,tt){if(J=="e"&&N.push(F),J=="b")if(tt)N.push(F);else return;S--,S||v(N)},U=0;U<O;U++)l(d[U],w,y)}function p(d,v,y){var S,O;if(v&&v.trim&&(S=v),O=(S?y:v)||{},S){if(S in n)throw"LoadJS";n[S]=!0}function N(w,U){f(d,function(F){c(O,F),w&&c({success:w,error:U},F),i(S,F)},O)}if(O.returnPromise)return new Promise(N);N()}return p.ready=function(v,y){return s(v,function(S){c(y,S)}),p},p.done=function(v){i(v,[])},p.reset=function(){n={},o={},a={}},p.isDefined=function(v){return v in n},p})})(Ba);var Em=Ba.exports;const Va=hm(Em);class Tm{constructor(e,r){j(this,"assets");j(this,"loadStatus");j(this,"win",window);j(this,"_onSuccessList",[]);j(this,"_onErrorList",[]);this.assets=JSON.parse(JSON.stringify(e||[])),this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const e=this.assets||[],r=[];for(let n=0;n<e.length;n++){const o=e[n];o.id||(o.id=vt()),r.push(o.id);const a=o.resources.map(s=>s.src);a.length&&Va(a,o.id,{async:!1,before:(s,i)=>(this.win.document.body.appendChild(i),!1)})}return new Promise((n,o)=>{if(e.length===0){this._onSuccessList.forEach(a=>a()),n("");return}Va.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(s=>s(a)),o(a)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}_.AssetLoader=Tm,_.ComponentInstanceManager=La,_.DefaultDropPlaceholder=Fa,_.DefineReactAdapter=Ma,_.DesignRender=Cm,_.ReactAdapter=fm,_.Render=Ia,_.canAcceptsRef=Ta,_.collectVariable=nm,_.compWrapper=Na,_.convertCodeStringToFunction=$a,_.flatObject=om,_.formatSourceStylePropertyName=un,_.getAdapter=yn,_.getCSSTextValue=ln,_.getComponentsLibs=am,_.getMatchVal=Pa,_.getObjFromArrayMap=cn,_.getThirdLibs=im,_.isClass=rm,_.runExpression=Lt,_.shouldConstruct=Ea,_.useDesignRender=wm,_.useRender=Om,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
46
+ Check the top-level render call using <`+m+">.")}return h}}function Za(u,h){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var m=zm(h);if(Xa[m])return;Xa[m]=!0;var w="";u&&u._owner&&u._owner!==hn.current&&(w=" It was passed a child from "+H(u._owner.type)+"."),le(u),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,w),le(null)}}function ti(u,h){{if(typeof u!="object")return;if(dn(u))for(var m=0;m<u.length;m++){var w=u[m];mn(w)&&Za(w,h)}else if(mn(u))u._store&&(u._store.validated=!0);else if(u){var A=O(u);if(typeof A=="function"&&A!==u.entries)for(var x=A.call(u),P;!(P=x.next()).done;)mn(P.value)&&Za(P.value,h)}}}function Wm(u){{var h=u.type;if(h==null||typeof h=="string")return;var m;if(typeof h=="function")m=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===c||h.$$typeof===p))m=h.propTypes;else return;if(m){var w=H(h);Am(m,u.props,"prop",w,u)}else if(h.PropTypes!==void 0&&!vn){vn=!0;var A=H(h);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hm(u){{for(var h=Object.keys(u.props),m=0;m<h.length;m++){var w=h[m];if(w!=="children"&&w!=="key"){le(u),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),le(null);break}}u.ref!==null&&(le(u),E("Invalid attribute `ref` supplied to `React.Fragment`."),le(null))}}function ei(u,h,m,w,A,x){{var P=_t(u);if(!P){var N="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Q=Gm(A);Q?N+=Q:N+=Ka();var W;u===null?W="null":dn(u)?W="array":u!==void 0&&u.$$typeof===e?(W="<"+(H(u.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):W=typeof u,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",W,N)}var Y=Vm(u,h,m,A,x);if(Y==null)return Y;if(P){var st=h.children;if(st!==void 0)if(w)if(dn(st)){for(var fe=0;fe<st.length;fe++)ti(st[fe],u);Object.freeze&&Object.freeze(st)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ti(st,u)}return u===n?Hm(Y):Wm(Y),Y}}function Ym(u,h,m){return ei(u,h,m,!0)}function Jm(u,h,m){return ei(u,h,m,!1)}var qm=Jm,Qm=Ym;Ae.Fragment=n,Ae.jsx=qm,Ae.jsxs=Qm}()),Ae}process.env.NODE_ENV==="production"?fn.exports=vm():fn.exports=mm();var gm=fn.exports;const ym=gm.jsx,bt=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},bm=[...dm,...cd].reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),C.createElement(e,{...o,...bt(n)},...a)},t),{}),_m={RootContainer:({children:t})=>t,...bm,CContainer:({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),C.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),ym("div",{...o,...bt(e),children:a})},CVideo:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("video",{...r,...bt(e)},...n)},CAudio:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("audio",{...r,...bt(e)},...n)},CBlock:({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(l=>l!==void 0);const{style:s={},...i}=bt(n),c={height:r,width:e,...s,...o.style||{}};return C.createElement("div",{...o,...i,style:c},...a)},CImage:({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),C.createElement("img",{...r,...bt(e)},...n)},CText:({$$attributes:t=[],content:e,...r})=>C.createElement("span",{...r,...bt(t)},e),CCanvas:({afterMount:t,beforeDestroy:e,$$attributes:r=[],...n})=>(C.useEffect(()=>(t==null||t(n),()=>{e==null||e(n)}),[]),C.createElement("canvas",{...n,...bt(r)})),CNativeTag:({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...s}=bt(e),i={...a,...n.style||{}};return C.createElement(r,{...n,...s,style:i},...o)}};class Sm{constructor(){j(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 Ia extends C.Component{constructor(r){super(r);j(this,"refManager");j(this,"dynamicComponentInstanceMap",new Map);j(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)});j(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(ne(r)&&Fo(r)){const n=r;this.setState({pageModel:new We(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new We(r.page)},this.refManager=new Sm}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={..._m,...r.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:s,onComponentDestroy:a,$$context:l,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const Om=()=>{const t=C.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class jm extends C.Component{constructor(r){super(r);j(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=C.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,C.createElement("p",null,"msg: ",String(this.state.error)),C.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"),C.createElement("div",{style:{display:"none"}}));return C.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class La{constructor(){j(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 Fa=t=>{const{node:e}=t,r=C.useMemo(()=>{const i=e.isContainer();return ne(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 C.createElement("div",{style:{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",minWidth:"300px",minHeight:"50px",width:a,height:o,...s}},n)};class Cm extends C.Component{constructor(r){super(r);j(this,"instanceManager",new La);j(this,"renderRef");j(this,"dropPlaceholder",Fa);j(this,"onGetComponent",(r,n)=>{var c,l;const o=this;let a=r;const s=(l=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:l.wrapComponent;s&&(a=s(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class i extends C.Component{constructor(){super(...arguments);j(this,"_DESIGN_BOX",!0);j(this,"_NODE_MODEL",n);j(this,"_NODE_ID",n.id);j(this,"_UNIQUE_ID",`${n.id}_${vt()}`);j(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){const{children:d=[],onlyRenderChild:v,...y}=this.props;let S=d;return ee(d)||(S=[d]),!!!S.filter(Boolean).length&&(n.isContainer()||n.value.componentName===Qt.ROOT_CONTAINER)&&S.push(C.createElement(o.dropPlaceholder,{node:n})),v?S:C.createElement(a,y,...S)}}return C.forwardRef(function(p,d){return C.createElement(jm,{node:n,targetComponent:i},C.createElement(i,{ref:d,...p}))})});this.renderRef=C.createRef(),r.dropPlaceholder&&(this.dropPlaceholder=r.dropPlaceholder)}componentDidMount(){var r,n;(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=ka(r);if(!n)return null;const o=Ua(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=oi.findDOMNode(s);if(i&&!(i instanceof Text))if(n){const l=Array.from(((c=i.querySelectorAll)==null?void 0:c.call(i,n))||[]);a.push(...l)}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),C.createElement(Ia,{onGetComponent:n,...a,processNodeConfigHook:(s,i)=>{var y,S;if(i.nodeType!=="NODE")return s;const{props:c,condition:l}=s;let f={...c};const p=((y=i.value.configure)==null?void 0:y.devState)||{},d=(S=i.material)==null?void 0:S.value.fixedProps;if(d!==void 0){if(ne(d))f={...f,...d};else if(typeof d=="function"){const O=d(f);f={...f,...O}}}let v=l;return p.condition===!1&&(v=p.condition),{props:em(f,p.props||{}),condition:v}},ref:this.renderRef})}}const ka=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:ka(t.parentElement)},Ua=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:Ua(t.return):null},Em=()=>{const t=C.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 Ba={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(pm,function(){var r=function(){},n={},o={},a={};function s(d,v){d=d.push?d:[d];var y=[],S=d.length,O=S,$,E,U,F;for($=function(J,tt){tt.length&&y.push(J),O--,O||v(y)};S--;){if(E=d[S],U=o[E],U){$(E,U);continue}F=a[E]=a[E]||[],F.push($)}}function i(d,v){if(d){var y=a[d];if(o[d]=v,!!y)for(;y.length;)y[0](d,v),y.splice(0,1)}}function c(d,v){d.call&&(d={success:d}),v.length?(d.error||r)(v):(d.success||r)(d)}function l(d,v,y,S){var O=document,$=y.async,E=(y.numRetries||0)+1,U=y.before||r,F=d.replace(/[\?|#].*$/,""),J=d.replace(/^(css|img|module|nomodule)!/,""),tt,Ft,R;if(S=S||0,/(^css!|\.css$)/.test(F))R=O.createElement("link"),R.rel="stylesheet",R.href=J,tt="hideFocus"in R,tt&&R.relList&&(tt=0,R.rel="preload",R.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(F))R=O.createElement("img"),R.src=J;else if(R=O.createElement("script"),R.src=J,R.async=$===void 0?!0:$,Ft="noModule"in R,/^module!/.test(F)){if(!Ft)return v(d,"l");R.type="module"}else if(/^nomodule!/.test(F)&&Ft)return v(d,"l");R.onload=R.onerror=R.onbeforeload=function(ft){var _t=ft.type[0];if(tt)try{R.sheet.cssText.length||(_t="e")}catch(ae){ae.code!=18&&(_t="e")}if(_t=="e"){if(S+=1,S<E)return l(d,v,y,S)}else if(R.rel=="preload"&&R.as=="style")return R.rel="stylesheet";v(d,_t,ft.defaultPrevented)},U(d,R)!==!1&&O.head.appendChild(R)}function f(d,v,y){d=d.push?d:[d];var S=d.length,O=S,$=[],E,U;for(E=function(F,J,tt){if(J=="e"&&$.push(F),J=="b")if(tt)$.push(F);else return;S--,S||v($)},U=0;U<O;U++)l(d[U],E,y)}function p(d,v,y){var S,O;if(v&&v.trim&&(S=v),O=(S?y:v)||{},S){if(S in n)throw"LoadJS";n[S]=!0}function $(E,U){f(d,function(F){c(O,F),E&&c({success:E,error:U},F),i(S,F)},O)}if(O.returnPromise)return new Promise($);$()}return p.ready=function(v,y){return s(v,function(S){c(y,S)}),p},p.done=function(v){i(v,[])},p.reset=function(){n={},o={},a={}},p.isDefined=function(v){return v in n},p})})(Ba);var wm=Ba.exports;const Va=hm(wm);class Tm{constructor(e,r){j(this,"assets");j(this,"loadStatus");j(this,"win",window);j(this,"_onSuccessList",[]);j(this,"_onErrorList",[]);this.assets=JSON.parse(JSON.stringify(e||[])),this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const e=this.assets||[],r=[];for(let n=0;n<e.length;n++){const o=e[n];o.id||(o.id=vt()),r.push(o.id);const a=o.resources.map(s=>s.src);a.length&&Va(a,o.id,{async:!1,before:(s,i)=>(this.win.document.body.appendChild(i),!1)})}return new Promise((n,o)=>{if(e.length===0){this._onSuccessList.forEach(a=>a()),n("");return}Va.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(s=>s(a)),o(a)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}_.AssetLoader=Tm,_.ComponentInstanceManager=La,_.DefaultDropPlaceholder=Fa,_.DefineReactAdapter=Ma,_.DesignRender=Cm,_.ReactAdapter=fm,_.Render=Ia,_.canAcceptsRef=Ta,_.collectVariable=nm,_.compWrapper=$a,_.convertCodeStringToFunction=Na,_.flatObject=om,_.formatSourceStylePropertyName=un,_.getAdapter=yn,_.getCSSTextValue=ln,_.getComponentsLibs=am,_.getMatchVal=Pa,_.getObjFromArrayMap=cn,_.getThirdLibs=im,_.isClass=rm,_.runExpression=Lt,_.shouldConstruct=wa,_.useDesignRender=Em,_.useRender=Om,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
47
47
  //# sourceMappingURL=index.umd.js.map