@chamn/render 0.3.20 → 0.4.0
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.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +364 -371
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
package/dist/index.umd.js
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
|
|
20
20
|
}
|
|
21
21
|
return $$_run_$$();
|
|
22
|
-
`,new Function(f)(...u,{$$context:n,storeManager:o,$$response:a,actionVariableSpace:s})}catch(p){console.log(f),console.warn(p)}}}[i]},Le=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},In=(t=[])=>{const e={};return t.forEach(({property:r,value:n})=>{let o=r.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((s,i)=>i!==0?cc(s):s)),e[a.join("")]=n}),e},Nc=t=>{let e="";return Object.keys(t||{}).forEach(r=>{e+=`${r}:${t[r]};`}),e},$c=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o,o.__esModule&&o.default&&(r[n.globalName]=o.default))}}),r},Tc=(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},Rn=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},Pn=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},Ac=(t,e)=>Pn(t,e),Mc=(t,e)=>Pn(t,e),Fe=t=>{var r;return((r=t.value.css)==null?void 0:r.class)||`c_${t.id}`},Dn=(t,e)=>{const r=t.split(".");let n,o=e;return r.forEach(a=>{n=o==null?void 0:o[a],o=n}),n||(()=>`Component [${t}] not found`)},Ve=(t,e)=>{const r={...t};return r.__proto__=e,r},xc={},Ln=t=>{let e;const r=new Set,n=(f,l)=>{const d=typeof f=="function"?f(e):f;if(!Object.is(d,e)){const p=e;e=l??(typeof d!="object"||d===null)?d:Object.assign({},e,d),r.forEach(b=>b(e,p))}},o=()=>e,c={setState:n,getState:o,getInitialState:()=>u,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(xc?"production":void 0)!=="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()}},u=e=t(n,o,c);return c},Ic=t=>t?Ln(t):Ln;class Rc{constructor(){w(this,"storeMap",new Map)}addStore(e,r){const n=Ic(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 Pc{constructor(){w(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 ke{constructor(){w(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()}}var Dc=Object.defineProperty,Lc=(t,e,r)=>e in t?Dc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e,r)=>Lc(t,typeof e!="symbol"?e+"":e,r),Fn=typeof global=="object"&&global&&global.Object===Object&&global,Fc=typeof self=="object"&&self&&self.Object===Object&&self,K=Fn||Fc||Function("return this")(),G=K.Symbol,Vn=Object.prototype,Vc=Vn.hasOwnProperty,kc=Vn.toString,qt=G?G.toStringTag:void 0;function Uc(t){var e=Vc.call(t,qt),r=t[qt];try{t[qt]=void 0;var n=!0}catch{}var o=kc.call(t);return n&&(e?t[qt]=r:delete t[qt]),o}var Bc=Object.prototype,zc=Bc.toString;function Gc(t){return zc.call(t)}var Hc="[object Null]",qc="[object Undefined]",kn=G?G.toStringTag:void 0;function ft(t){return t==null?t===void 0?qc:Hc:kn&&kn in Object(t)?Uc(t):Gc(t)}function X(t){return t!=null&&typeof t=="object"}var Jc="[object Symbol]";function Ue(t){return typeof t=="symbol"||X(t)&&ft(t)==Jc}function Be(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 F=Array.isArray,Un=G?G.prototype:void 0,Bn=Un?Un.toString:void 0;function zn(t){if(typeof t=="string")return t;if(F(t))return Be(t,zn)+"";if(Ue(t))return Bn?Bn.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function q(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ze(t){return t}var Wc="[object AsyncFunction]",Qc="[object Function]",Yc="[object GeneratorFunction]",Kc="[object Proxy]";function Ge(t){if(!q(t))return!1;var e=ft(t);return e==Qc||e==Yc||e==Wc||e==Kc}var He=K["__core-js_shared__"],Gn=function(){var t=/[^.]+$/.exec(He&&He.keys&&He.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Xc(t){return!!Gn&&Gn in t}var Zc=Function.prototype,tu=Zc.toString;function dt(t){if(t!=null){try{return tu.call(t)}catch{}try{return t+""}catch{}}return""}var eu=/[\\^$.*+?()[\]{}|]/g,ru=/^\[object .+?Constructor\]$/,nu=Function.prototype,ou=Object.prototype,au=nu.toString,su=ou.hasOwnProperty,iu=RegExp("^"+au.call(su).replace(eu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cu(t){if(!q(t)||Xc(t))return!1;var e=Ge(t)?iu:ru;return e.test(dt(t))}function uu(t,e){return t==null?void 0:t[e]}function pt(t,e){var r=uu(t,e);return cu(r)?r:void 0}var qe=pt(K,"WeakMap"),Hn=Object.create,lu=function(){function t(){}return function(e){if(!q(e))return{};if(Hn)return Hn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function fu(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 du(){}function qn(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var pu=800,hu=16,mu=Date.now;function gu(t){var e=0,r=0;return function(){var n=mu(),o=hu-(n-r);if(r=n,o>0){if(++e>=pu)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function vu(t){return function(){return t}}var de=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),yu=de?function(t,e){return de(t,"toString",{configurable:!0,enumerable:!1,value:vu(e),writable:!0})}:ze,Jn=gu(yu);function bu(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function _u(t,e,r,n){for(var o=t.length,a=r+-1;++a<o;)if(e(t[a],a,t))return a;return-1}function Su(t){return t!==t}function Cu(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function Ou(t,e,r){return e===e?Cu(t,e,r):_u(t,Su,r)}function ju(t,e){var r=t==null?0:t.length;return!!r&&Ou(t,e,0)>-1}var wu=9007199254740991,Eu=/^(?:0|[1-9]\d*)$/;function pe(t,e){var r=typeof t;return e=e??wu,!!e&&(r=="number"||r!="symbol"&&Eu.test(t))&&t>-1&&t%1==0&&t<e}function Je(t,e,r){e=="__proto__"&&de?de(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Jt(t,e){return t===e||t!==t&&e!==e}var Nu=Object.prototype,$u=Nu.hasOwnProperty;function We(t,e,r){var n=t[e];(!($u.call(t,e)&&Jt(n,r))||r===void 0&&!(e in t))&&Je(t,e,r)}function $t(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=void 0;c===void 0&&(c=t[i]),o?Je(r,i,c):We(r,i,c)}return r}var Wn=Math.max;function Qn(t,e,r){return e=Wn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Wn(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),fu(t,this,i)}}function Yn(t,e){return Jn(Qn(t,e,ze),t+"")}var Tu=9007199254740991;function Qe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tu}function he(t){return t!=null&&Qe(t.length)&&!Ge(t)}function Au(t,e,r){if(!q(r))return!1;var n=typeof e;return(n=="number"?he(r)&&pe(e,r.length):n=="string"&&e in r)?Jt(r[e],t):!1}function Mu(t){return Yn(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&&Au(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 xu=Object.prototype;function Ye(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xu;return t===r}function Iu(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ru="[object Arguments]";function Kn(t){return X(t)&&ft(t)==Ru}var Xn=Object.prototype,Pu=Xn.hasOwnProperty,Du=Xn.propertyIsEnumerable,Wt=Kn(function(){return arguments}())?Kn:function(t){return X(t)&&Pu.call(t,"callee")&&!Du.call(t,"callee")};function Lu(){return!1}var Zn=typeof S=="object"&&S&&!S.nodeType&&S,to=Zn&&typeof module=="object"&&module&&!module.nodeType&&module,Fu=to&&to.exports===Zn,eo=Fu?K.Buffer:void 0,Vu=eo?eo.isBuffer:void 0,Qt=Vu||Lu,ku="[object Arguments]",Uu="[object Array]",Bu="[object Boolean]",zu="[object Date]",Gu="[object Error]",Hu="[object Function]",qu="[object Map]",Ju="[object Number]",Wu="[object Object]",Qu="[object RegExp]",Yu="[object Set]",Ku="[object String]",Xu="[object WeakMap]",Zu="[object ArrayBuffer]",tl="[object DataView]",el="[object Float32Array]",rl="[object Float64Array]",nl="[object Int8Array]",ol="[object Int16Array]",al="[object Int32Array]",sl="[object Uint8Array]",il="[object Uint8ClampedArray]",cl="[object Uint16Array]",ul="[object Uint32Array]",P={};P[el]=P[rl]=P[nl]=P[ol]=P[al]=P[sl]=P[il]=P[cl]=P[ul]=!0,P[ku]=P[Uu]=P[Zu]=P[Bu]=P[tl]=P[zu]=P[Gu]=P[Hu]=P[qu]=P[Ju]=P[Wu]=P[Qu]=P[Yu]=P[Ku]=P[Xu]=!1;function ll(t){return X(t)&&Qe(t.length)&&!!P[ft(t)]}function Ke(t){return function(e){return t(e)}}var ro=typeof S=="object"&&S&&!S.nodeType&&S,Yt=ro&&typeof module=="object"&&module&&!module.nodeType&&module,fl=Yt&&Yt.exports===ro,Xe=fl&&Fn.process,Tt=function(){try{var t=Yt&&Yt.require&&Yt.require("util").types;return t||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),no=Tt&&Tt.isTypedArray,Ze=no?Ke(no):ll,dl=Object.prototype,pl=dl.hasOwnProperty;function oo(t,e){var r=F(t),n=!r&&Wt(t),o=!r&&!n&&Qt(t),a=!r&&!n&&!o&&Ze(t),s=r||n||o||a,i=s?Iu(t.length,String):[],c=i.length;for(var u in t)(e||pl.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||pe(u,c)))&&i.push(u);return i}function ao(t,e){return function(r){return t(e(r))}}var hl=ao(Object.keys,Object),ml=Object.prototype,gl=ml.hasOwnProperty;function vl(t){if(!Ye(t))return hl(t);var e=[];for(var r in Object(t))gl.call(t,r)&&r!="constructor"&&e.push(r);return e}function me(t){return he(t)?oo(t):vl(t)}function yl(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var bl=Object.prototype,_l=bl.hasOwnProperty;function Sl(t){if(!q(t))return yl(t);var e=Ye(t),r=[];for(var n in t)n=="constructor"&&(e||!_l.call(t,n))||r.push(n);return r}function Kt(t){return he(t)?oo(t,!0):Sl(t)}var Cl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ol=/^\w*$/;function tr(t,e){if(F(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ue(t)?!0:Ol.test(t)||!Cl.test(t)||e!=null&&t in Object(e)}var Xt=pt(Object,"create");function jl(){this.__data__=Xt?Xt(null):{},this.size=0}function wl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var El="__lodash_hash_undefined__",Nl=Object.prototype,$l=Nl.hasOwnProperty;function Tl(t){var e=this.__data__;if(Xt){var r=e[t];return r===El?void 0:r}return $l.call(e,t)?e[t]:void 0}var Al=Object.prototype,Ml=Al.hasOwnProperty;function xl(t){var e=this.__data__;return Xt?e[t]!==void 0:Ml.call(e,t)}var Il="__lodash_hash_undefined__";function Rl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Xt&&e===void 0?Il:e,this}function ht(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])}}ht.prototype.clear=jl,ht.prototype.delete=wl,ht.prototype.get=Tl,ht.prototype.has=xl,ht.prototype.set=Rl;function Pl(){this.__data__=[],this.size=0}function ge(t,e){for(var r=t.length;r--;)if(Jt(t[r][0],e))return r;return-1}var Dl=Array.prototype,Ll=Dl.splice;function Fl(t){var e=this.__data__,r=ge(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ll.call(e,r,1),--this.size,!0}function Vl(t){var e=this.__data__,r=ge(e,t);return r<0?void 0:e[r][1]}function kl(t){return ge(this.__data__,t)>-1}function Ul(t,e){var r=this.__data__,n=ge(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function nt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}nt.prototype.clear=Pl,nt.prototype.delete=Fl,nt.prototype.get=Vl,nt.prototype.has=kl,nt.prototype.set=Ul;var Zt=pt(K,"Map");function Bl(){this.size=0,this.__data__={hash:new ht,map:new(Zt||nt),string:new ht}}function zl(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ve(t,e){var r=t.__data__;return zl(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Gl(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e}function Hl(t){return ve(this,t).get(t)}function ql(t){return ve(this,t).has(t)}function Jl(t,e){var r=ve(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ot(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])}}ot.prototype.clear=Bl,ot.prototype.delete=Gl,ot.prototype.get=Hl,ot.prototype.has=ql,ot.prototype.set=Jl;var Wl="Expected a function";function er(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Wl);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(er.Cache||ot),r}er.Cache=ot;var Ql=500;function Yl(t){var e=er(t,function(n){return r.size===Ql&&r.clear(),n}),r=e.cache;return e}var Kl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xl=/\\(\\)?/g,Zl=Yl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Kl,function(r,n,o,a){e.push(o?a.replace(Xl,"$1"):n||r)}),e});function tf(t){return t==null?"":zn(t)}function At(t,e){return F(t)?t:tr(t,e)?[t]:Zl(tf(t))}function Mt(t){if(typeof t=="string"||Ue(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ye(t,e){e=At(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Mt(e[r++])];return r&&r==n?t:void 0}function so(t,e,r){var n=t==null?void 0:ye(t,e);return n===void 0?r:n}function rr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var io=G?G.isConcatSpreadable:void 0;function ef(t){return F(t)||Wt(t)||!!(io&&t&&t[io])}function co(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=ef),o||(o=[]);++a<s;){var i=t[a];r(i)?rr(o,i):n||(o[o.length]=i)}return o}function rf(t){var e=t==null?0:t.length;return e?co(t):[]}function nf(t){return Jn(Qn(t,void 0,rf),t+"")}var nr=ao(Object.getPrototypeOf,Object),of="[object Object]",af=Function.prototype,sf=Object.prototype,uo=af.toString,cf=sf.hasOwnProperty,uf=uo.call(Object);function k(t){if(!X(t)||ft(t)!=of)return!1;var e=nr(t);if(e===null)return!0;var r=cf.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&uo.call(r)==uf}function lf(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 ff(){this.__data__=new nt,this.size=0}function df(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function pf(t){return this.__data__.get(t)}function hf(t){return this.__data__.has(t)}var mf=200;function gf(t,e){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!Zt||n.length<mf-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(t,e),this.size=r.size,this}function J(t){var e=this.__data__=new nt(t);this.size=e.size}J.prototype.clear=ff,J.prototype.delete=df,J.prototype.get=pf,J.prototype.has=hf,J.prototype.set=gf;function vf(t,e){return t&&$t(e,me(e),t)}function yf(t,e){return t&&$t(e,Kt(e),t)}var lo=typeof S=="object"&&S&&!S.nodeType&&S,fo=lo&&typeof module=="object"&&module&&!module.nodeType&&module,bf=fo&&fo.exports===lo,po=bf?K.Buffer:void 0,ho=po?po.allocUnsafe:void 0;function mo(t,e){if(e)return t.slice();var r=t.length,n=ho?ho(r):new t.constructor(r);return t.copy(n),n}function _f(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 go(){return[]}var Sf=Object.prototype,Cf=Sf.propertyIsEnumerable,vo=Object.getOwnPropertySymbols,or=vo?function(t){return t==null?[]:(t=Object(t),_f(vo(t),function(e){return Cf.call(t,e)}))}:go;function Of(t,e){return $t(t,or(t),e)}var jf=Object.getOwnPropertySymbols,yo=jf?function(t){for(var e=[];t;)rr(e,or(t)),t=nr(t);return e}:go;function wf(t,e){return $t(t,yo(t),e)}function bo(t,e,r){var n=e(t);return F(t)?n:rr(n,r(t))}function ar(t){return bo(t,me,or)}function sr(t){return bo(t,Kt,yo)}var ir=pt(K,"DataView"),cr=pt(K,"Promise"),xt=pt(K,"Set"),_o="[object Map]",Ef="[object Object]",So="[object Promise]",Co="[object Set]",Oo="[object WeakMap]",jo="[object DataView]",Nf=dt(ir),$f=dt(Zt),Tf=dt(cr),Af=dt(xt),Mf=dt(qe),W=ft;(ir&&W(new ir(new ArrayBuffer(1)))!=jo||Zt&&W(new Zt)!=_o||cr&&W(cr.resolve())!=So||xt&&W(new xt)!=Co||qe&&W(new qe)!=Oo)&&(W=function(t){var e=ft(t),r=e==Ef?t.constructor:void 0,n=r?dt(r):"";if(n)switch(n){case Nf:return jo;case $f:return _o;case Tf:return So;case Af:return Co;case Mf:return Oo}return e});var xf=Object.prototype,If=xf.hasOwnProperty;function Rf(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&If.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var be=K.Uint8Array;function ur(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e}function Pf(t,e){var r=e?ur(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Df=/\w*$/;function Lf(t){var e=new t.constructor(t.source,Df.exec(t));return e.lastIndex=t.lastIndex,e}var wo=G?G.prototype:void 0,Eo=wo?wo.valueOf:void 0;function Ff(t){return Eo?Object(Eo.call(t)):{}}function No(t,e){var r=e?ur(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Vf="[object Boolean]",kf="[object Date]",Uf="[object Map]",Bf="[object Number]",zf="[object RegExp]",Gf="[object Set]",Hf="[object String]",qf="[object Symbol]",Jf="[object ArrayBuffer]",Wf="[object DataView]",Qf="[object Float32Array]",Yf="[object Float64Array]",Kf="[object Int8Array]",Xf="[object Int16Array]",Zf="[object Int32Array]",td="[object Uint8Array]",ed="[object Uint8ClampedArray]",rd="[object Uint16Array]",nd="[object Uint32Array]";function od(t,e,r){var n=t.constructor;switch(e){case Jf:return ur(t);case Vf:case kf:return new n(+t);case Wf:return Pf(t,r);case Qf:case Yf:case Kf:case Xf:case Zf:case td:case ed:case rd:case nd:return No(t,r);case Uf:return new n;case Bf:case Hf:return new n(t);case zf:return Lf(t);case Gf:return new n;case qf:return Ff(t)}}function $o(t){return typeof t.constructor=="function"&&!Ye(t)?lu(nr(t)):{}}var ad="[object Map]";function sd(t){return X(t)&&W(t)==ad}var To=Tt&&Tt.isMap,id=To?Ke(To):sd,cd="[object Set]";function ud(t){return X(t)&&W(t)==cd}var Ao=Tt&&Tt.isSet,ld=Ao?Ke(Ao):ud,fd=1,dd=2,pd=4,Mo="[object Arguments]",hd="[object Array]",md="[object Boolean]",gd="[object Date]",vd="[object Error]",xo="[object Function]",yd="[object GeneratorFunction]",bd="[object Map]",_d="[object Number]",Io="[object Object]",Sd="[object RegExp]",Cd="[object Set]",Od="[object String]",jd="[object Symbol]",wd="[object WeakMap]",Ed="[object ArrayBuffer]",Nd="[object DataView]",$d="[object Float32Array]",Td="[object Float64Array]",Ad="[object Int8Array]",Md="[object Int16Array]",xd="[object Int32Array]",Id="[object Uint8Array]",Rd="[object Uint8ClampedArray]",Pd="[object Uint16Array]",Dd="[object Uint32Array]",I={};I[Mo]=I[hd]=I[Ed]=I[Nd]=I[md]=I[gd]=I[$d]=I[Td]=I[Ad]=I[Md]=I[xd]=I[bd]=I[_d]=I[Io]=I[Sd]=I[Cd]=I[Od]=I[jd]=I[Id]=I[Rd]=I[Pd]=I[Dd]=!0,I[vd]=I[xo]=I[wd]=!1;function te(t,e,r,n,o,a){var s,i=e&fd,c=e&dd,u=e&pd;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!q(t))return t;var f=F(t);if(f){if(s=Rf(t),!i)return qn(t,s)}else{var l=W(t),d=l==xo||l==yd;if(Qt(t))return mo(t,i);if(l==Io||l==Mo||d&&!o){if(s=c||d?{}:$o(t),!i)return c?wf(t,yf(s,t)):Of(t,vf(s,t))}else{if(!I[l])return o?t:{};s=od(t,l,i)}}a||(a=new J);var p=a.get(t);if(p)return p;a.set(t,s),ld(t)?t.forEach(function(h){s.add(te(h,e,r,h,t,a))}):id(t)&&t.forEach(function(h,m){s.set(m,te(h,e,r,m,t,a))});var b=u?c?sr:ar:c?Kt:me,O=f?void 0:b(t);return bu(O||t,function(h,m){O&&(m=h,h=t[m]),We(s,m,te(h,e,r,m,t,a))}),s}var Ld=1,Fd=4;function Ro(t){return te(t,Ld|Fd)}var Vd="__lodash_hash_undefined__";function kd(t){return this.__data__.set(t,Vd),this}function Ud(t){return this.__data__.has(t)}function ee(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ot;++e<r;)this.add(t[e])}ee.prototype.add=ee.prototype.push=kd,ee.prototype.has=Ud;function Bd(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 Po(t,e){return t.has(e)}var zd=1,Gd=2;function Do(t,e,r,n,o,a){var s=r&zd,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var u=a.get(t),f=a.get(e);if(u&&f)return u==e&&f==t;var l=-1,d=!0,p=r&Gd?new ee:void 0;for(a.set(t,e),a.set(e,t);++l<i;){var b=t[l],O=e[l];if(n)var h=s?n(O,b,l,e,t,a):n(b,O,l,t,e,a);if(h!==void 0){if(h)continue;d=!1;break}if(p){if(!Bd(e,function(m,v){if(!Po(p,v)&&(b===m||o(b,m,r,n,a)))return p.push(v)})){d=!1;break}}else if(!(b===O||o(b,O,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}function Hd(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function lr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var qd=1,Jd=2,Wd="[object Boolean]",Qd="[object Date]",Yd="[object Error]",Kd="[object Map]",Xd="[object Number]",Zd="[object RegExp]",tp="[object Set]",ep="[object String]",rp="[object Symbol]",np="[object ArrayBuffer]",op="[object DataView]",Lo=G?G.prototype:void 0,fr=Lo?Lo.valueOf:void 0;function ap(t,e,r,n,o,a,s){switch(r){case op:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case np:return!(t.byteLength!=e.byteLength||!a(new be(t),new be(e)));case Wd:case Qd:case Xd:return Jt(+t,+e);case Yd:return t.name==e.name&&t.message==e.message;case Zd:case ep:return t==e+"";case Kd:var i=Hd;case tp:var c=n&qd;if(i||(i=lr),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=Jd,s.set(t,e);var f=Do(i(t),i(e),n,o,a,s);return s.delete(t),f;case rp:if(fr)return fr.call(t)==fr.call(e)}return!1}var sp=1,ip=Object.prototype,cp=ip.hasOwnProperty;function up(t,e,r,n,o,a){var s=r&sp,i=ar(t),c=i.length,u=ar(e),f=u.length;if(c!=f&&!s)return!1;for(var l=c;l--;){var d=i[l];if(!(s?d in e:cp.call(e,d)))return!1}var p=a.get(t),b=a.get(e);if(p&&b)return p==e&&b==t;var O=!0;a.set(t,e),a.set(e,t);for(var h=s;++l<c;){d=i[l];var m=t[d],v=e[d];if(n)var g=s?n(v,m,d,e,t,a):n(m,v,d,t,e,a);if(!(g===void 0?m===v||o(m,v,r,n,a):g)){O=!1;break}h||(h=d=="constructor")}if(O&&!h){var _=t.constructor,j=e.constructor;_!=j&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof j=="function"&&j instanceof j)&&(O=!1)}return a.delete(t),a.delete(e),O}var lp=1,Fo="[object Arguments]",Vo="[object Array]",_e="[object Object]",fp=Object.prototype,ko=fp.hasOwnProperty;function dp(t,e,r,n,o,a){var s=F(t),i=F(e),c=s?Vo:W(t),u=i?Vo:W(e);c=c==Fo?_e:c,u=u==Fo?_e:u;var f=c==_e,l=u==_e,d=c==u;if(d&&Qt(t)){if(!Qt(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new J),s||Ze(t)?Do(t,e,r,n,o,a):ap(t,e,c,r,n,o,a);if(!(r&lp)){var p=f&&ko.call(t,"__wrapped__"),b=l&&ko.call(e,"__wrapped__");if(p||b){var O=p?t.value():t,h=b?e.value():e;return a||(a=new J),o(O,h,r,n,a)}}return d?(a||(a=new J),up(t,e,r,n,o,a)):!1}function dr(t,e,r,n,o){return t===e?!0:t==null||e==null||!X(t)&&!X(e)?t!==t&&e!==e:dp(t,e,r,n,dr,o)}var pp=1,hp=2;function mp(t,e,r,n){var o=r.length,a=o;if(t==null)return!a;for(t=Object(t);o--;){var s=r[o];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){s=r[o];var i=s[0],c=t[i],u=s[1];if(s[2]){if(c===void 0&&!(i in t))return!1}else{var f=new J,l;if(!(l===void 0?dr(u,c,pp|hp,n,f):l))return!1}}return!0}function Uo(t){return t===t&&!q(t)}function gp(t){for(var e=me(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Uo(o)]}return e}function Bo(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function vp(t){var e=gp(t);return e.length==1&&e[0][2]?Bo(e[0][0],e[0][1]):function(r){return r===t||mp(r,t,e)}}function yp(t,e){return t!=null&&e in Object(t)}function bp(t,e,r){e=At(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=Mt(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&&Qe(o)&&pe(s,o)&&(F(t)||Wt(t)))}function _p(t,e){return t!=null&&bp(t,e,yp)}var Sp=1,Cp=2;function Op(t,e){return tr(t)&&Uo(e)?Bo(Mt(t),e):function(r){var n=so(r,t);return n===void 0&&n===e?_p(r,t):dr(e,n,Sp|Cp)}}function jp(t){return function(e){return e==null?void 0:e[t]}}function wp(t){return function(e){return ye(e,t)}}function Ep(t){return tr(t)?jp(Mt(t)):wp(t)}function pr(t){return typeof t=="function"?t:t==null?ze:typeof t=="object"?F(t)?Op(t[0],t[1]):vp(t):Ep(t)}function Np(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[++o];if(r(a[c],c,a)===!1)break}return e}}var $p=Np();function hr(t,e,r){(r!==void 0&&!Jt(t[e],r)||r===void 0&&!(e in t))&&Je(t,e,r)}function mr(t){return X(t)&&he(t)}function gr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Tp(t){return $t(t,Kt(t))}function Ap(t,e,r,n,o,a,s){var i=gr(t,r),c=gr(e,r),u=s.get(c);if(u){hr(t,r,u);return}var f=a?a(i,c,r+"",t,e,s):void 0,l=f===void 0;if(l){var d=F(c),p=!d&&Qt(c),b=!d&&!p&&Ze(c);f=c,d||p||b?F(i)?f=i:mr(i)?f=qn(i):p?(l=!1,f=mo(c,!0)):b?(l=!1,f=No(c,!0)):f=[]:k(c)||Wt(c)?(f=i,Wt(i)?f=Tp(i):(!q(i)||Ge(i))&&(f=$o(c))):l=!1}l&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),hr(t,r,f)}function zo(t,e,r,n,o){t!==e&&$p(e,function(a,s){if(o||(o=new J),q(a))Ap(t,e,s,r,zo,n,o);else{var i=n?n(gr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),hr(t,s,i)}},Kt)}function Go(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Mp(t,e){return e.length<2?t:ye(t,lf(e,0,-1))}var Ho=Mu(function(t,e,r){zo(t,e,r)}),xp="Expected a function";function Ip(t){if(typeof t!="function")throw new TypeError(xp);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 Rp(t,e){return e=At(e,t),t=Mp(t,e),t==null||delete t[Mt(Go(e))]}function Pp(t){return k(t)?void 0:t}var Dp=1,Lp=2,Fp=4,qo=nf(function(t,e){var r={};if(t==null)return r;var n=!1;e=Be(e,function(a){return a=At(a,t),n||(n=a.length>1),a}),$t(t,sr(t),r),n&&(r=te(r,Dp|Lp|Fp,Pp));for(var o=e.length;o--;)Rp(r,e[o]);return r});function Vp(t,e,r,n){if(!q(t))return t;e=At(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=Mt(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var f=i[c];u=void 0,u===void 0&&(u=q(f)?f:pe(e[o+1])?[]:{})}We(i,c,u),i=i[c]}return t}function kp(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=ye(t,s);r(i,s)&&Vp(a,At(s,t),i)}return a}function Up(t,e){if(t==null)return{};var r=Be(sr(t),function(n){return[n]});return e=pr(e),kp(t,r,function(n,o){return e(n,o[0])})}function Bp(t,e){return Up(t,Ip(pr(e)))}var zp=1/0,Gp=xt&&1/lr(new xt([,-0]))[1]==zp?function(t){return new xt(t)}:du,Hp=200;function qp(t,e,r){var n=-1,o=ju,a=t.length,s=!0,i=[],c=i;if(a>=Hp){var u=e?null:Gp(t);if(u)return lr(u);s=!1,o=Po,c=new ee}else c=e?[]:i;t:for(;++n<a;){var f=t[n],l=e?e(f):f;if(f=f!==0?f:0,s&&l===l){for(var d=c.length;d--;)if(c[d]===l)continue t;e&&c.push(l),i.push(f)}else o(c,l,r)||(c!==i&&c.push(l),i.push(f))}return i}var Jp=Yn(function(t){var e=Go(t);return mr(e)&&(e=void 0),qp(co(t,1,mr,!0),pr(e))});class Jo 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=()=>n??(n=[e,...r()])}}function Wp(t){return Q(t)&&typeof t[Symbol.iterator]=="function"}function Q(t){return typeof t=="object"&&t!=null}function z(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Qp(t){const{done:e,value:r}=t.next();return e?void 0:r}function Yp(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: \`${z(n)}\``}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*Wo(t,e,r,n){Wp(t)||(t=[t]);for(const o of t){const a=Yp(o,e,r,n);a&&(yield a)}}function*vr(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"&&Q(e.schema)&&Q(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,i))c="not_valid",yield[u,void 0];for(let[u,f,l]of e.entries(t,i)){const d=vr(f,l,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,f],coerce:a,mask:s});for(const p of d)p[0]?(c=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(f=p[1],u===void 0?t=f:t instanceof Map?t.set(u,f):t instanceof Set?t.add(f):Q(t)&&(f!==void 0||u in t)&&(t[u]=f))}if(c!=="not_valid")for(const u of e.refiner(t,i))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class Z{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:o,refiner:a,coercer:s=c=>c,entries:i=function*(){}}=e;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(c,u)=>{const f=o(c,u);return Wo(f,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const f=a(c,u);return Wo(f,u,this,c)}:this.refiner=()=>[]}assert(e){return Qo(e,this)}create(e){return Kp(e,this)}is(e){return Zp(e,this)}mask(e){return Xp(e,this)}validate(e,r){return r===void 0&&(r={}),It(e,this,r)}}function Qo(t,e){const r=It(t,e);if(r[0])throw r[0]}function Kp(t,e){const r=It(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function Xp(t,e){const r=It(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function Zp(t,e){return!It(t,e)[0]}function It(t,e,r){r===void 0&&(r={});const n=vr(t,e,r),o=Qp(n);return o[0]?[new Jo(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function yr(){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?Zo(a):M(a)}function st(t,e){return new Z({type:t,schema:null,validator:e})}function Rt(t){return new Z({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 Yo(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Zo(n);default:return M(n)}}function x(){return st("any",()=>!0)}function D(t){return new Z({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: ${z(e)}`}})}function mt(){return st("boolean",t=>typeof t=="boolean")}function br(t){const e={},r=t.map(n=>z(n)).join();for(const n of t)e[n]=n;return new Z({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${z(n)}`}})}function Ko(){return st("func",t=>typeof t=="function"||`Expected a function, but received: ${z(t)}`)}function V(t){const e=z(t),r=typeof t;return new Z({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${z(n)}`}})}function th(){return st("never",()=>!1)}function Xo(){return st("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${z(t)}`)}function M(t){const e=t?Object.keys(t):[],r=th();return new Z({type:"object",schema:t||null,*entries(n){if(t&&Q(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 Q(n)||`Expected an object, but received: ${z(n)}`},coercer(n){return Q(n)?{...n}:n}})}function y(t){return new Z({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function re(t,e){return new Z({type:"record",schema:null,*entries(r){if(Q(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return Q(r)||`Expected an object, but received: ${z(r)}`}})}function C(){return st("string",t=>typeof t=="string"||`Expected a string, but received: ${z(t)}`)}function Zo(t){const e=Object.keys(t);return new Z({type:"type",schema:t,*entries(r){if(Q(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return Q(r)||`Expected an object, but received: ${z(r)}`}})}function U(t){const e=t.map(r=>r.type).join(" | ");return new Z({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||eh()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=vr(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: ${z(r)}`,...o]}})}function eh(){return st("unknown",()=>!0)}const _r=M({package:C(),version:C(),name:C(),exportName:y(C()),destructuring:y(mt()),subName:y(C()),main:y(C()),cssPaths:y(D(C()))}),rh=D(_r),nh=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var B=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t.ACTION="ACTION",t.EVENT="EVENT",t))(B||{}),Sr=(t=>(t.DESIGN="design",t.SAVE="save",t))(Sr||{}),Cr=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(Cr||{});const oh=()=>st("normalObj",t=>!k(t)||[B.SLOT,B.EXPRESSION,B.FUNCTION].includes(t==null?void 0:t.type)?!1:(It(t,re(C(),Or)),!0)),Or=U([C(),Xo(),mt(),M({type:V(B.SLOT),renderType:br([Cr.FUNC,Cr.COMP]),params:y(D(C())),value:Rt(()=>U([Pt,D(Pt)]))}),M({type:V(B.EXPRESSION),value:C()}),M({type:V(B.FUNCTION),value:C()}),M({type:V(B.ACTION),handler:x()}),oh(),D(Rt(()=>Or))]);var ta=(t=>(t.COMPONENTS="COMPONENTS",t))(ta||{});const ea=M({type:V(B.EXPRESSION),value:C()}),Pt=M({id:y(C()),title:y(C()),componentName:C(),props:y(re(C(),Or)),nodeName:y(C()),state:y(re(C(),x())),children:Rt(()=>y(D(U([C(),Pt])))),eventListener:y(D(x())),configure:y(x()),css:y(x()),style:y(x()),classNames:y(D(x())),refId:y(C()),extra:y(re(x(),x())),condition:y(U([mt(),ea])),loop:y(M({open:mt(),data:U([D(x()),ea]),args:y(D(C())),forName:y(C()),forIndex:y(C()),key:y(x()),name:y(C())})),injectEnvList:y(D(x())),methods:y(D(x()))}),Se=U([C(),M({label:C(),tip:y(C())})]),ah=M({type:V("shape"),value:D(M({name:C(),title:Se,valueType:Rt(()=>Ce)}))}),sh=M({type:V("enums"),value:D(C())});M({type:V("array"),value:Rt(()=>Ce)});const ih=M({type:V("array"),value:Rt(()=>D(Ce))}),Ce=U([br(["array","boolean","number","object","string"]),br(["component","expression","function"]),ah,sh,ih]),ch=U([C(),M({componentName:C(),props:y(x()),initialValue:y(x()),component:y(x()),hiddenLabel:y(mt())})]),jr=M({name:C(),title:Se,valueType:Ce,description:y(C()),defaultValue:x(),setters:y(D(ch)),condition:y(Ko())});U([C(),Ko()]);var wr=(t=>(t.SINGLE="single",t.GROUP="group",t))(wr||{});U([C(),M({event:C(),name:y(C()),describe:y(C()),params:y(D(M({name:C(),description:C(),example:C()}))),template:y(C())})]);const uh=M({id:y(C()),title:C(),snapshot:U([C(),x()]),snapshotText:y(C()),description:y(C()),tags:y(D(C())),groupName:y(C()),category:y(C()),schema:yr(Yo(Pt,["id"]),M({componentName:y(C())}))}),lh=M({componentName:C(),title:C(),screenshot:y(C()),icon:y(C()),tags:y(D(C())),groupName:y(C()),category:y(C()),priority:y(Xo()),npm:y(_r),snippets:D(uh),props:D(U([jr,M({title:y(Se),type:V("single"),content:jr}),M({title:y(Se),type:V("group"),content:D(jr)})])),events:y(x()),methods:y(x()),fixedProps:y(x()),isContainer:y(U([mt(),M({placeholder:C(),width:C(),height:C()})])),disableEditorDragDom:y(x()),isLayout:y(mt()),rootSelector:y(C()),advanceCustom:y(x()),extra:y(re(x(),x()))}),fh=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}
|
|
22
|
+
`,new Function(f)(...u,{$$context:n,storeManager:o,$$response:a,actionVariableSpace:s})}catch(p){console.log(f),console.warn(p)}}}[i]},Le=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},In=(t=[])=>{const e={};return t.forEach(({property:r,value:n})=>{let o=r.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((s,i)=>i!==0?cc(s):s)),e[a.join("")]=n}),e},Nc=t=>{let e="";return Object.keys(t||{}).forEach(r=>{e+=`${r}:${t[r]};`}),e},$c=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o,o.__esModule&&o.default&&(r[n.globalName]=o.default))}}),r},Tc=(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},Rn=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},Pn=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},Ac=(t,e)=>Pn(t,e),Mc=(t,e)=>Pn(t,e),Fe=t=>{var r;return((r=t.value.css)==null?void 0:r.class)||`c_${t.id}`},Dn=(t,e)=>{const r=t.split(".");let n,o=e;return r.forEach(a=>{n=o==null?void 0:o[a],o=n}),n||(()=>`Component [${t}] not found`)},Ve=(t,e)=>{const r={...t};return r.__proto__=e,r},xc={},Ln=t=>{let e;const r=new Set,n=(f,l)=>{const d=typeof f=="function"?f(e):f;if(!Object.is(d,e)){const p=e;e=l??(typeof d!="object"||d===null)?d:Object.assign({},e,d),r.forEach(b=>b(e,p))}},o=()=>e,c={setState:n,getState:o,getInitialState:()=>u,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(xc?"production":void 0)!=="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()}},u=e=t(n,o,c);return c},Ic=t=>t?Ln(t):Ln;class Rc{constructor(){w(this,"storeMap",new Map)}addStore(e,r){const n=Ic(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 Pc{constructor(){w(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 ke{constructor(){w(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()}}var Dc=Object.defineProperty,Lc=(t,e,r)=>e in t?Dc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e,r)=>Lc(t,typeof e!="symbol"?e+"":e,r),Fn=typeof global=="object"&&global&&global.Object===Object&&global,Fc=typeof self=="object"&&self&&self.Object===Object&&self,K=Fn||Fc||Function("return this")(),G=K.Symbol,Vn=Object.prototype,Vc=Vn.hasOwnProperty,kc=Vn.toString,qt=G?G.toStringTag:void 0;function Uc(t){var e=Vc.call(t,qt),r=t[qt];try{t[qt]=void 0;var n=!0}catch{}var o=kc.call(t);return n&&(e?t[qt]=r:delete t[qt]),o}var Bc=Object.prototype,zc=Bc.toString;function Gc(t){return zc.call(t)}var Hc="[object Null]",qc="[object Undefined]",kn=G?G.toStringTag:void 0;function ft(t){return t==null?t===void 0?qc:Hc:kn&&kn in Object(t)?Uc(t):Gc(t)}function X(t){return t!=null&&typeof t=="object"}var Jc="[object Symbol]";function Ue(t){return typeof t=="symbol"||X(t)&&ft(t)==Jc}function Be(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 F=Array.isArray,Un=G?G.prototype:void 0,Bn=Un?Un.toString:void 0;function zn(t){if(typeof t=="string")return t;if(F(t))return Be(t,zn)+"";if(Ue(t))return Bn?Bn.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function q(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ze(t){return t}var Wc="[object AsyncFunction]",Qc="[object Function]",Yc="[object GeneratorFunction]",Kc="[object Proxy]";function Ge(t){if(!q(t))return!1;var e=ft(t);return e==Qc||e==Yc||e==Wc||e==Kc}var He=K["__core-js_shared__"],Gn=function(){var t=/[^.]+$/.exec(He&&He.keys&&He.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Xc(t){return!!Gn&&Gn in t}var Zc=Function.prototype,tu=Zc.toString;function dt(t){if(t!=null){try{return tu.call(t)}catch{}try{return t+""}catch{}}return""}var eu=/[\\^$.*+?()[\]{}|]/g,ru=/^\[object .+?Constructor\]$/,nu=Function.prototype,ou=Object.prototype,au=nu.toString,su=ou.hasOwnProperty,iu=RegExp("^"+au.call(su).replace(eu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cu(t){if(!q(t)||Xc(t))return!1;var e=Ge(t)?iu:ru;return e.test(dt(t))}function uu(t,e){return t==null?void 0:t[e]}function pt(t,e){var r=uu(t,e);return cu(r)?r:void 0}var qe=pt(K,"WeakMap"),Hn=Object.create,lu=function(){function t(){}return function(e){if(!q(e))return{};if(Hn)return Hn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function fu(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 du(){}function qn(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var pu=800,hu=16,mu=Date.now;function gu(t){var e=0,r=0;return function(){var n=mu(),o=hu-(n-r);if(r=n,o>0){if(++e>=pu)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function vu(t){return function(){return t}}var de=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),yu=de?function(t,e){return de(t,"toString",{configurable:!0,enumerable:!1,value:vu(e),writable:!0})}:ze,Jn=gu(yu);function bu(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function _u(t,e,r,n){for(var o=t.length,a=r+-1;++a<o;)if(e(t[a],a,t))return a;return-1}function Su(t){return t!==t}function Cu(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function Ou(t,e,r){return e===e?Cu(t,e,r):_u(t,Su,r)}function ju(t,e){var r=t==null?0:t.length;return!!r&&Ou(t,e,0)>-1}var wu=9007199254740991,Eu=/^(?:0|[1-9]\d*)$/;function pe(t,e){var r=typeof t;return e=e??wu,!!e&&(r=="number"||r!="symbol"&&Eu.test(t))&&t>-1&&t%1==0&&t<e}function Je(t,e,r){e=="__proto__"&&de?de(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Jt(t,e){return t===e||t!==t&&e!==e}var Nu=Object.prototype,$u=Nu.hasOwnProperty;function We(t,e,r){var n=t[e];(!($u.call(t,e)&&Jt(n,r))||r===void 0&&!(e in t))&&Je(t,e,r)}function $t(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=void 0;c===void 0&&(c=t[i]),o?Je(r,i,c):We(r,i,c)}return r}var Wn=Math.max;function Qn(t,e,r){return e=Wn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Wn(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),fu(t,this,i)}}function Yn(t,e){return Jn(Qn(t,e,ze),t+"")}var Tu=9007199254740991;function Qe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tu}function he(t){return t!=null&&Qe(t.length)&&!Ge(t)}function Au(t,e,r){if(!q(r))return!1;var n=typeof e;return(n=="number"?he(r)&&pe(e,r.length):n=="string"&&e in r)?Jt(r[e],t):!1}function Mu(t){return Yn(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&&Au(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 xu=Object.prototype;function Ye(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xu;return t===r}function Iu(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ru="[object Arguments]";function Kn(t){return X(t)&&ft(t)==Ru}var Xn=Object.prototype,Pu=Xn.hasOwnProperty,Du=Xn.propertyIsEnumerable,Wt=Kn(function(){return arguments}())?Kn:function(t){return X(t)&&Pu.call(t,"callee")&&!Du.call(t,"callee")};function Lu(){return!1}var Zn=typeof S=="object"&&S&&!S.nodeType&&S,to=Zn&&typeof module=="object"&&module&&!module.nodeType&&module,Fu=to&&to.exports===Zn,eo=Fu?K.Buffer:void 0,Vu=eo?eo.isBuffer:void 0,Qt=Vu||Lu,ku="[object Arguments]",Uu="[object Array]",Bu="[object Boolean]",zu="[object Date]",Gu="[object Error]",Hu="[object Function]",qu="[object Map]",Ju="[object Number]",Wu="[object Object]",Qu="[object RegExp]",Yu="[object Set]",Ku="[object String]",Xu="[object WeakMap]",Zu="[object ArrayBuffer]",tl="[object DataView]",el="[object Float32Array]",rl="[object Float64Array]",nl="[object Int8Array]",ol="[object Int16Array]",al="[object Int32Array]",sl="[object Uint8Array]",il="[object Uint8ClampedArray]",cl="[object Uint16Array]",ul="[object Uint32Array]",P={};P[el]=P[rl]=P[nl]=P[ol]=P[al]=P[sl]=P[il]=P[cl]=P[ul]=!0,P[ku]=P[Uu]=P[Zu]=P[Bu]=P[tl]=P[zu]=P[Gu]=P[Hu]=P[qu]=P[Ju]=P[Wu]=P[Qu]=P[Yu]=P[Ku]=P[Xu]=!1;function ll(t){return X(t)&&Qe(t.length)&&!!P[ft(t)]}function Ke(t){return function(e){return t(e)}}var ro=typeof S=="object"&&S&&!S.nodeType&&S,Yt=ro&&typeof module=="object"&&module&&!module.nodeType&&module,fl=Yt&&Yt.exports===ro,Xe=fl&&Fn.process,Tt=function(){try{var t=Yt&&Yt.require&&Yt.require("util").types;return t||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),no=Tt&&Tt.isTypedArray,Ze=no?Ke(no):ll,dl=Object.prototype,pl=dl.hasOwnProperty;function oo(t,e){var r=F(t),n=!r&&Wt(t),o=!r&&!n&&Qt(t),a=!r&&!n&&!o&&Ze(t),s=r||n||o||a,i=s?Iu(t.length,String):[],c=i.length;for(var u in t)(e||pl.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||pe(u,c)))&&i.push(u);return i}function ao(t,e){return function(r){return t(e(r))}}var hl=ao(Object.keys,Object),ml=Object.prototype,gl=ml.hasOwnProperty;function vl(t){if(!Ye(t))return hl(t);var e=[];for(var r in Object(t))gl.call(t,r)&&r!="constructor"&&e.push(r);return e}function me(t){return he(t)?oo(t):vl(t)}function yl(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var bl=Object.prototype,_l=bl.hasOwnProperty;function Sl(t){if(!q(t))return yl(t);var e=Ye(t),r=[];for(var n in t)n=="constructor"&&(e||!_l.call(t,n))||r.push(n);return r}function Kt(t){return he(t)?oo(t,!0):Sl(t)}var Cl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ol=/^\w*$/;function tr(t,e){if(F(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ue(t)?!0:Ol.test(t)||!Cl.test(t)||e!=null&&t in Object(e)}var Xt=pt(Object,"create");function jl(){this.__data__=Xt?Xt(null):{},this.size=0}function wl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var El="__lodash_hash_undefined__",Nl=Object.prototype,$l=Nl.hasOwnProperty;function Tl(t){var e=this.__data__;if(Xt){var r=e[t];return r===El?void 0:r}return $l.call(e,t)?e[t]:void 0}var Al=Object.prototype,Ml=Al.hasOwnProperty;function xl(t){var e=this.__data__;return Xt?e[t]!==void 0:Ml.call(e,t)}var Il="__lodash_hash_undefined__";function Rl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Xt&&e===void 0?Il:e,this}function ht(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])}}ht.prototype.clear=jl,ht.prototype.delete=wl,ht.prototype.get=Tl,ht.prototype.has=xl,ht.prototype.set=Rl;function Pl(){this.__data__=[],this.size=0}function ge(t,e){for(var r=t.length;r--;)if(Jt(t[r][0],e))return r;return-1}var Dl=Array.prototype,Ll=Dl.splice;function Fl(t){var e=this.__data__,r=ge(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ll.call(e,r,1),--this.size,!0}function Vl(t){var e=this.__data__,r=ge(e,t);return r<0?void 0:e[r][1]}function kl(t){return ge(this.__data__,t)>-1}function Ul(t,e){var r=this.__data__,n=ge(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function nt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}nt.prototype.clear=Pl,nt.prototype.delete=Fl,nt.prototype.get=Vl,nt.prototype.has=kl,nt.prototype.set=Ul;var Zt=pt(K,"Map");function Bl(){this.size=0,this.__data__={hash:new ht,map:new(Zt||nt),string:new ht}}function zl(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ve(t,e){var r=t.__data__;return zl(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Gl(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e}function Hl(t){return ve(this,t).get(t)}function ql(t){return ve(this,t).has(t)}function Jl(t,e){var r=ve(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ot(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])}}ot.prototype.clear=Bl,ot.prototype.delete=Gl,ot.prototype.get=Hl,ot.prototype.has=ql,ot.prototype.set=Jl;var Wl="Expected a function";function er(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Wl);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(er.Cache||ot),r}er.Cache=ot;var Ql=500;function Yl(t){var e=er(t,function(n){return r.size===Ql&&r.clear(),n}),r=e.cache;return e}var Kl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xl=/\\(\\)?/g,Zl=Yl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Kl,function(r,n,o,a){e.push(o?a.replace(Xl,"$1"):n||r)}),e});function tf(t){return t==null?"":zn(t)}function At(t,e){return F(t)?t:tr(t,e)?[t]:Zl(tf(t))}function Mt(t){if(typeof t=="string"||Ue(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ye(t,e){e=At(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Mt(e[r++])];return r&&r==n?t:void 0}function so(t,e,r){var n=t==null?void 0:ye(t,e);return n===void 0?r:n}function rr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var io=G?G.isConcatSpreadable:void 0;function ef(t){return F(t)||Wt(t)||!!(io&&t&&t[io])}function co(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=ef),o||(o=[]);++a<s;){var i=t[a];r(i)?rr(o,i):n||(o[o.length]=i)}return o}function rf(t){var e=t==null?0:t.length;return e?co(t):[]}function nf(t){return Jn(Qn(t,void 0,rf),t+"")}var nr=ao(Object.getPrototypeOf,Object),of="[object Object]",af=Function.prototype,sf=Object.prototype,uo=af.toString,cf=sf.hasOwnProperty,uf=uo.call(Object);function V(t){if(!X(t)||ft(t)!=of)return!1;var e=nr(t);if(e===null)return!0;var r=cf.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&uo.call(r)==uf}function lf(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 ff(){this.__data__=new nt,this.size=0}function df(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function pf(t){return this.__data__.get(t)}function hf(t){return this.__data__.has(t)}var mf=200;function gf(t,e){var r=this.__data__;if(r instanceof nt){var n=r.__data__;if(!Zt||n.length<mf-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(t,e),this.size=r.size,this}function J(t){var e=this.__data__=new nt(t);this.size=e.size}J.prototype.clear=ff,J.prototype.delete=df,J.prototype.get=pf,J.prototype.has=hf,J.prototype.set=gf;function vf(t,e){return t&&$t(e,me(e),t)}function yf(t,e){return t&&$t(e,Kt(e),t)}var lo=typeof S=="object"&&S&&!S.nodeType&&S,fo=lo&&typeof module=="object"&&module&&!module.nodeType&&module,bf=fo&&fo.exports===lo,po=bf?K.Buffer:void 0,ho=po?po.allocUnsafe:void 0;function mo(t,e){if(e)return t.slice();var r=t.length,n=ho?ho(r):new t.constructor(r);return t.copy(n),n}function _f(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 go(){return[]}var Sf=Object.prototype,Cf=Sf.propertyIsEnumerable,vo=Object.getOwnPropertySymbols,or=vo?function(t){return t==null?[]:(t=Object(t),_f(vo(t),function(e){return Cf.call(t,e)}))}:go;function Of(t,e){return $t(t,or(t),e)}var jf=Object.getOwnPropertySymbols,yo=jf?function(t){for(var e=[];t;)rr(e,or(t)),t=nr(t);return e}:go;function wf(t,e){return $t(t,yo(t),e)}function bo(t,e,r){var n=e(t);return F(t)?n:rr(n,r(t))}function ar(t){return bo(t,me,or)}function sr(t){return bo(t,Kt,yo)}var ir=pt(K,"DataView"),cr=pt(K,"Promise"),xt=pt(K,"Set"),_o="[object Map]",Ef="[object Object]",So="[object Promise]",Co="[object Set]",Oo="[object WeakMap]",jo="[object DataView]",Nf=dt(ir),$f=dt(Zt),Tf=dt(cr),Af=dt(xt),Mf=dt(qe),W=ft;(ir&&W(new ir(new ArrayBuffer(1)))!=jo||Zt&&W(new Zt)!=_o||cr&&W(cr.resolve())!=So||xt&&W(new xt)!=Co||qe&&W(new qe)!=Oo)&&(W=function(t){var e=ft(t),r=e==Ef?t.constructor:void 0,n=r?dt(r):"";if(n)switch(n){case Nf:return jo;case $f:return _o;case Tf:return So;case Af:return Co;case Mf:return Oo}return e});var xf=Object.prototype,If=xf.hasOwnProperty;function Rf(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&If.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var be=K.Uint8Array;function ur(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e}function Pf(t,e){var r=e?ur(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Df=/\w*$/;function Lf(t){var e=new t.constructor(t.source,Df.exec(t));return e.lastIndex=t.lastIndex,e}var wo=G?G.prototype:void 0,Eo=wo?wo.valueOf:void 0;function Ff(t){return Eo?Object(Eo.call(t)):{}}function No(t,e){var r=e?ur(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Vf="[object Boolean]",kf="[object Date]",Uf="[object Map]",Bf="[object Number]",zf="[object RegExp]",Gf="[object Set]",Hf="[object String]",qf="[object Symbol]",Jf="[object ArrayBuffer]",Wf="[object DataView]",Qf="[object Float32Array]",Yf="[object Float64Array]",Kf="[object Int8Array]",Xf="[object Int16Array]",Zf="[object Int32Array]",td="[object Uint8Array]",ed="[object Uint8ClampedArray]",rd="[object Uint16Array]",nd="[object Uint32Array]";function od(t,e,r){var n=t.constructor;switch(e){case Jf:return ur(t);case Vf:case kf:return new n(+t);case Wf:return Pf(t,r);case Qf:case Yf:case Kf:case Xf:case Zf:case td:case ed:case rd:case nd:return No(t,r);case Uf:return new n;case Bf:case Hf:return new n(t);case zf:return Lf(t);case Gf:return new n;case qf:return Ff(t)}}function $o(t){return typeof t.constructor=="function"&&!Ye(t)?lu(nr(t)):{}}var ad="[object Map]";function sd(t){return X(t)&&W(t)==ad}var To=Tt&&Tt.isMap,id=To?Ke(To):sd,cd="[object Set]";function ud(t){return X(t)&&W(t)==cd}var Ao=Tt&&Tt.isSet,ld=Ao?Ke(Ao):ud,fd=1,dd=2,pd=4,Mo="[object Arguments]",hd="[object Array]",md="[object Boolean]",gd="[object Date]",vd="[object Error]",xo="[object Function]",yd="[object GeneratorFunction]",bd="[object Map]",_d="[object Number]",Io="[object Object]",Sd="[object RegExp]",Cd="[object Set]",Od="[object String]",jd="[object Symbol]",wd="[object WeakMap]",Ed="[object ArrayBuffer]",Nd="[object DataView]",$d="[object Float32Array]",Td="[object Float64Array]",Ad="[object Int8Array]",Md="[object Int16Array]",xd="[object Int32Array]",Id="[object Uint8Array]",Rd="[object Uint8ClampedArray]",Pd="[object Uint16Array]",Dd="[object Uint32Array]",I={};I[Mo]=I[hd]=I[Ed]=I[Nd]=I[md]=I[gd]=I[$d]=I[Td]=I[Ad]=I[Md]=I[xd]=I[bd]=I[_d]=I[Io]=I[Sd]=I[Cd]=I[Od]=I[jd]=I[Id]=I[Rd]=I[Pd]=I[Dd]=!0,I[vd]=I[xo]=I[wd]=!1;function te(t,e,r,n,o,a){var s,i=e&fd,c=e&dd,u=e&pd;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!q(t))return t;var f=F(t);if(f){if(s=Rf(t),!i)return qn(t,s)}else{var l=W(t),d=l==xo||l==yd;if(Qt(t))return mo(t,i);if(l==Io||l==Mo||d&&!o){if(s=c||d?{}:$o(t),!i)return c?wf(t,yf(s,t)):Of(t,vf(s,t))}else{if(!I[l])return o?t:{};s=od(t,l,i)}}a||(a=new J);var p=a.get(t);if(p)return p;a.set(t,s),ld(t)?t.forEach(function(h){s.add(te(h,e,r,h,t,a))}):id(t)&&t.forEach(function(h,m){s.set(m,te(h,e,r,m,t,a))});var b=u?c?sr:ar:c?Kt:me,O=f?void 0:b(t);return bu(O||t,function(h,m){O&&(m=h,h=t[m]),We(s,m,te(h,e,r,m,t,a))}),s}var Ld=1,Fd=4;function Ro(t){return te(t,Ld|Fd)}var Vd="__lodash_hash_undefined__";function kd(t){return this.__data__.set(t,Vd),this}function Ud(t){return this.__data__.has(t)}function ee(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ot;++e<r;)this.add(t[e])}ee.prototype.add=ee.prototype.push=kd,ee.prototype.has=Ud;function Bd(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 Po(t,e){return t.has(e)}var zd=1,Gd=2;function Do(t,e,r,n,o,a){var s=r&zd,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var u=a.get(t),f=a.get(e);if(u&&f)return u==e&&f==t;var l=-1,d=!0,p=r&Gd?new ee:void 0;for(a.set(t,e),a.set(e,t);++l<i;){var b=t[l],O=e[l];if(n)var h=s?n(O,b,l,e,t,a):n(b,O,l,t,e,a);if(h!==void 0){if(h)continue;d=!1;break}if(p){if(!Bd(e,function(m,v){if(!Po(p,v)&&(b===m||o(b,m,r,n,a)))return p.push(v)})){d=!1;break}}else if(!(b===O||o(b,O,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}function Hd(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function lr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var qd=1,Jd=2,Wd="[object Boolean]",Qd="[object Date]",Yd="[object Error]",Kd="[object Map]",Xd="[object Number]",Zd="[object RegExp]",tp="[object Set]",ep="[object String]",rp="[object Symbol]",np="[object ArrayBuffer]",op="[object DataView]",Lo=G?G.prototype:void 0,fr=Lo?Lo.valueOf:void 0;function ap(t,e,r,n,o,a,s){switch(r){case op:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case np:return!(t.byteLength!=e.byteLength||!a(new be(t),new be(e)));case Wd:case Qd:case Xd:return Jt(+t,+e);case Yd:return t.name==e.name&&t.message==e.message;case Zd:case ep:return t==e+"";case Kd:var i=Hd;case tp:var c=n&qd;if(i||(i=lr),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=Jd,s.set(t,e);var f=Do(i(t),i(e),n,o,a,s);return s.delete(t),f;case rp:if(fr)return fr.call(t)==fr.call(e)}return!1}var sp=1,ip=Object.prototype,cp=ip.hasOwnProperty;function up(t,e,r,n,o,a){var s=r&sp,i=ar(t),c=i.length,u=ar(e),f=u.length;if(c!=f&&!s)return!1;for(var l=c;l--;){var d=i[l];if(!(s?d in e:cp.call(e,d)))return!1}var p=a.get(t),b=a.get(e);if(p&&b)return p==e&&b==t;var O=!0;a.set(t,e),a.set(e,t);for(var h=s;++l<c;){d=i[l];var m=t[d],v=e[d];if(n)var g=s?n(v,m,d,e,t,a):n(m,v,d,t,e,a);if(!(g===void 0?m===v||o(m,v,r,n,a):g)){O=!1;break}h||(h=d=="constructor")}if(O&&!h){var _=t.constructor,j=e.constructor;_!=j&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof j=="function"&&j instanceof j)&&(O=!1)}return a.delete(t),a.delete(e),O}var lp=1,Fo="[object Arguments]",Vo="[object Array]",_e="[object Object]",fp=Object.prototype,ko=fp.hasOwnProperty;function dp(t,e,r,n,o,a){var s=F(t),i=F(e),c=s?Vo:W(t),u=i?Vo:W(e);c=c==Fo?_e:c,u=u==Fo?_e:u;var f=c==_e,l=u==_e,d=c==u;if(d&&Qt(t)){if(!Qt(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new J),s||Ze(t)?Do(t,e,r,n,o,a):ap(t,e,c,r,n,o,a);if(!(r&lp)){var p=f&&ko.call(t,"__wrapped__"),b=l&&ko.call(e,"__wrapped__");if(p||b){var O=p?t.value():t,h=b?e.value():e;return a||(a=new J),o(O,h,r,n,a)}}return d?(a||(a=new J),up(t,e,r,n,o,a)):!1}function dr(t,e,r,n,o){return t===e?!0:t==null||e==null||!X(t)&&!X(e)?t!==t&&e!==e:dp(t,e,r,n,dr,o)}var pp=1,hp=2;function mp(t,e,r,n){var o=r.length,a=o;if(t==null)return!a;for(t=Object(t);o--;){var s=r[o];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){s=r[o];var i=s[0],c=t[i],u=s[1];if(s[2]){if(c===void 0&&!(i in t))return!1}else{var f=new J,l;if(!(l===void 0?dr(u,c,pp|hp,n,f):l))return!1}}return!0}function Uo(t){return t===t&&!q(t)}function gp(t){for(var e=me(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Uo(o)]}return e}function Bo(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function vp(t){var e=gp(t);return e.length==1&&e[0][2]?Bo(e[0][0],e[0][1]):function(r){return r===t||mp(r,t,e)}}function yp(t,e){return t!=null&&e in Object(t)}function bp(t,e,r){e=At(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=Mt(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&&Qe(o)&&pe(s,o)&&(F(t)||Wt(t)))}function _p(t,e){return t!=null&&bp(t,e,yp)}var Sp=1,Cp=2;function Op(t,e){return tr(t)&&Uo(e)?Bo(Mt(t),e):function(r){var n=so(r,t);return n===void 0&&n===e?_p(r,t):dr(e,n,Sp|Cp)}}function jp(t){return function(e){return e==null?void 0:e[t]}}function wp(t){return function(e){return ye(e,t)}}function Ep(t){return tr(t)?jp(Mt(t)):wp(t)}function pr(t){return typeof t=="function"?t:t==null?ze:typeof t=="object"?F(t)?Op(t[0],t[1]):vp(t):Ep(t)}function Np(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[++o];if(r(a[c],c,a)===!1)break}return e}}var $p=Np();function hr(t,e,r){(r!==void 0&&!Jt(t[e],r)||r===void 0&&!(e in t))&&Je(t,e,r)}function mr(t){return X(t)&&he(t)}function gr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Tp(t){return $t(t,Kt(t))}function Ap(t,e,r,n,o,a,s){var i=gr(t,r),c=gr(e,r),u=s.get(c);if(u){hr(t,r,u);return}var f=a?a(i,c,r+"",t,e,s):void 0,l=f===void 0;if(l){var d=F(c),p=!d&&Qt(c),b=!d&&!p&&Ze(c);f=c,d||p||b?F(i)?f=i:mr(i)?f=qn(i):p?(l=!1,f=mo(c,!0)):b?(l=!1,f=No(c,!0)):f=[]:V(c)||Wt(c)?(f=i,Wt(i)?f=Tp(i):(!q(i)||Ge(i))&&(f=$o(c))):l=!1}l&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),hr(t,r,f)}function zo(t,e,r,n,o){t!==e&&$p(e,function(a,s){if(o||(o=new J),q(a))Ap(t,e,s,r,zo,n,o);else{var i=n?n(gr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),hr(t,s,i)}},Kt)}function Go(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Mp(t,e){return e.length<2?t:ye(t,lf(e,0,-1))}var Ho=Mu(function(t,e,r){zo(t,e,r)}),xp="Expected a function";function Ip(t){if(typeof t!="function")throw new TypeError(xp);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 Rp(t,e){return e=At(e,t),t=Mp(t,e),t==null||delete t[Mt(Go(e))]}function Pp(t){return V(t)?void 0:t}var Dp=1,Lp=2,Fp=4,qo=nf(function(t,e){var r={};if(t==null)return r;var n=!1;e=Be(e,function(a){return a=At(a,t),n||(n=a.length>1),a}),$t(t,sr(t),r),n&&(r=te(r,Dp|Lp|Fp,Pp));for(var o=e.length;o--;)Rp(r,e[o]);return r});function Vp(t,e,r,n){if(!q(t))return t;e=At(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=Mt(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var f=i[c];u=void 0,u===void 0&&(u=q(f)?f:pe(e[o+1])?[]:{})}We(i,c,u),i=i[c]}return t}function kp(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=ye(t,s);r(i,s)&&Vp(a,At(s,t),i)}return a}function Up(t,e){if(t==null)return{};var r=Be(sr(t),function(n){return[n]});return e=pr(e),kp(t,r,function(n,o){return e(n,o[0])})}function Bp(t,e){return Up(t,Ip(pr(e)))}var zp=1/0,Gp=xt&&1/lr(new xt([,-0]))[1]==zp?function(t){return new xt(t)}:du,Hp=200;function qp(t,e,r){var n=-1,o=ju,a=t.length,s=!0,i=[],c=i;if(a>=Hp){var u=e?null:Gp(t);if(u)return lr(u);s=!1,o=Po,c=new ee}else c=e?[]:i;t:for(;++n<a;){var f=t[n],l=e?e(f):f;if(f=f!==0?f:0,s&&l===l){for(var d=c.length;d--;)if(c[d]===l)continue t;e&&c.push(l),i.push(f)}else o(c,l,r)||(c!==i&&c.push(l),i.push(f))}return i}var Jp=Yn(function(t){var e=Go(t);return mr(e)&&(e=void 0),qp(co(t,1,mr,!0),pr(e))});class Jo 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=()=>n??(n=[e,...r()])}}function Wp(t){return Q(t)&&typeof t[Symbol.iterator]=="function"}function Q(t){return typeof t=="object"&&t!=null}function U(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Qp(t){const{done:e,value:r}=t.next();return e?void 0:r}function Yp(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: \`${U(n)}\``}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*Wo(t,e,r,n){Wp(t)||(t=[t]);for(const o of t){const a=Yp(o,e,r,n);a&&(yield a)}}function*vr(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"&&Q(e.schema)&&Q(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,i))c="not_valid",yield[u,void 0];for(let[u,f,l]of e.entries(t,i)){const d=vr(f,l,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,f],coerce:a,mask:s});for(const p of d)p[0]?(c=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(f=p[1],u===void 0?t=f:t instanceof Map?t.set(u,f):t instanceof Set?t.add(f):Q(t)&&(f!==void 0||u in t)&&(t[u]=f))}if(c!=="not_valid")for(const u of e.refiner(t,i))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class Z{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:r,schema:n,validator:o,refiner:a,coercer:s=c=>c,entries:i=function*(){}}=e;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(c,u)=>{const f=o(c,u);return Wo(f,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const f=a(c,u);return Wo(f,u,this,c)}:this.refiner=()=>[]}assert(e){return Qo(e,this)}create(e){return Kp(e,this)}is(e){return Zp(e,this)}mask(e){return Xp(e,this)}validate(e,r){return r===void 0&&(r={}),It(e,this,r)}}function Qo(t,e){const r=It(t,e);if(r[0])throw r[0]}function Kp(t,e){const r=It(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function Xp(t,e){const r=It(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function Zp(t,e){return!It(t,e)[0]}function It(t,e,r){r===void 0&&(r={});const n=vr(t,e,r),o=Qp(n);return o[0]?[new Jo(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function yr(){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?Zo(a):M(a)}function st(t,e){return new Z({type:t,schema:null,validator:e})}function Rt(t){return new Z({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 Yo(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Zo(n);default:return M(n)}}function x(){return st("any",()=>!0)}function D(t){return new Z({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: ${U(e)}`}})}function mt(){return st("boolean",t=>typeof t=="boolean")}function br(t){const e={},r=t.map(n=>U(n)).join();for(const n of t)e[n]=n;return new Z({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${U(n)}`}})}function Ko(){return st("func",t=>typeof t=="function"||`Expected a function, but received: ${U(t)}`)}function B(t){const e=U(t),r=typeof t;return new Z({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${U(n)}`}})}function th(){return st("never",()=>!1)}function Xo(){return st("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${U(t)}`)}function M(t){const e=t?Object.keys(t):[],r=th();return new Z({type:"object",schema:t||null,*entries(n){if(t&&Q(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 Q(n)||`Expected an object, but received: ${U(n)}`},coercer(n){return Q(n)?{...n}:n}})}function y(t){return new Z({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function re(t,e){return new Z({type:"record",schema:null,*entries(r){if(Q(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return Q(r)||`Expected an object, but received: ${U(r)}`}})}function C(){return st("string",t=>typeof t=="string"||`Expected a string, but received: ${U(t)}`)}function Zo(t){const e=Object.keys(t);return new Z({type:"type",schema:t,*entries(r){if(Q(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return Q(r)||`Expected an object, but received: ${U(r)}`}})}function z(t){const e=t.map(r=>r.type).join(" | ");return new Z({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||eh()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=vr(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: ${U(r)}`,...o]}})}function eh(){return st("unknown",()=>!0)}const _r=M({package:C(),version:C(),name:C(),exportName:y(C()),destructuring:y(mt()),subName:y(C()),main:y(C()),cssPaths:y(D(C()))}),rh=D(_r),nh=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var k=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t.ACTION="ACTION",t.EVENT="EVENT",t))(k||{}),Sr=(t=>(t.DESIGN="design",t.SAVE="save",t))(Sr||{}),Cr=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(Cr||{});const oh=()=>st("normalObj",t=>!V(t)||[k.SLOT,k.EXPRESSION,k.FUNCTION].includes(t==null?void 0:t.type)?!1:(It(t,re(C(),Or)),!0)),Or=z([C(),Xo(),mt(),M({type:B(k.SLOT),renderType:br([Cr.FUNC,Cr.COMP]),params:y(D(C())),value:Rt(()=>z([Pt,D(Pt)]))}),M({type:B(k.EXPRESSION),value:C()}),M({type:B(k.FUNCTION),value:C()}),M({type:B(k.ACTION),handler:x()}),oh(),D(Rt(()=>Or))]);var ta=(t=>(t.COMPONENTS="COMPONENTS",t))(ta||{});const ea=M({type:B(k.EXPRESSION),value:C()}),Pt=M({id:y(C()),title:y(C()),componentName:C(),props:y(re(C(),Or)),nodeName:y(C()),state:y(re(C(),x())),children:Rt(()=>y(D(z([C(),Pt])))),eventListener:y(D(x())),configure:y(x()),css:y(x()),style:y(x()),classNames:y(D(x())),refId:y(C()),extra:y(re(x(),x())),condition:y(z([mt(),ea])),loop:y(M({open:mt(),data:z([D(x()),ea]),args:y(D(C())),forName:y(C()),forIndex:y(C()),key:y(x()),name:y(C())})),injectEnvList:y(D(x())),methods:y(D(x()))}),Se=z([C(),M({label:C(),tip:y(C())})]),ah=M({type:B("shape"),value:D(M({name:C(),title:Se,valueType:Rt(()=>Ce)}))}),sh=M({type:B("enums"),value:D(C())});M({type:B("array"),value:Rt(()=>Ce)});const ih=M({type:B("array"),value:Rt(()=>D(Ce))}),Ce=z([br(["array","boolean","number","object","string"]),br(["component","expression","function"]),ah,sh,ih]),ch=z([C(),M({componentName:C(),props:y(x()),initialValue:y(x()),component:y(x()),hiddenLabel:y(mt())})]),jr=M({name:C(),title:Se,valueType:Ce,description:y(C()),defaultValue:x(),setters:y(D(ch)),condition:y(Ko())});z([C(),Ko()]);var wr=(t=>(t.SINGLE="single",t.GROUP="group",t))(wr||{});z([C(),M({event:C(),name:y(C()),describe:y(C()),params:y(D(M({name:C(),description:C(),example:C()}))),template:y(C())})]);const uh=M({id:y(C()),title:C(),snapshot:z([C(),x()]),snapshotText:y(C()),description:y(C()),tags:y(D(C())),groupName:y(C()),category:y(C()),schema:yr(Yo(Pt,["id"]),M({componentName:y(C())}))}),lh=M({componentName:C(),title:C(),screenshot:y(C()),icon:y(C()),tags:y(D(C())),groupName:y(C()),category:y(C()),priority:y(Xo()),npm:y(_r),snippets:D(uh),props:D(z([jr,M({title:y(Se),type:B("single"),content:jr}),M({title:y(Se),type:B("group"),content:D(jr)})])),events:y(x()),methods:y(x()),fixedProps:y(x()),isContainer:y(z([mt(),M({placeholder:C(),width:C(),height:C()})])),disableEditorDragDom:y(x()),isLayout:y(mt()),rootSelector:y(C()),advanceCustom:y(x()),extra:y(re(x(),x()))}),fh=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}
|
|
23
23
|
originData: ${JSON.stringify(e)}`):new Error(`${JSON.stringify(e)}
|
|
24
24
|
data struct format is invalidate`);return o.message||r?console.warn(`${o.message||r}
|
|
25
25
|
originData: ${JSON.stringify(e)}`):console.warn(`${JSON.stringify(e)}
|
|
26
26
|
data struct format is invalidate`),o},Er=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return fh(({data:a})=>{try{return Qo(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof Jo&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
|
|
27
|
-
`)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var Dt=(t=>(t.ROOT_CONTAINER="RootContainer",t))(Dt||{});const dh=M({type:V(B.FUNCTION),value:C()}),ph=yr(Yo(Pt,["componentName"]),M({componentName:V("RootContainer")}));function hh(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 ne=hh(),mh=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new Ft([]);return e&&(o=e.materialsMode||new Ft([])),n&&(F(n)?r.value=n.map(a=>new L(a,{parent:e,materials:o})):k(n)&&r.value.push(new L(n,{parent:e,materials:o}))),r};class Lt{constructor(e,r){N(this,"nodeType","SLOT"),N(this,"rawData"),N(this,"parent"),N(this,"emitter",ne),N(this,"data"),N(this,"id"),N(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new Ft([]);this.materialsMode=n,this.id=tt(),this.data=mh(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof L)return o.export(e);if(k(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return F(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const ra=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===wr.SINGLE?e.push(n.content):n.type===wr.GROUP&&(e=[...e,...ra(n.content)]):e.push(r)}),e},Nr=(t,e,r)=>{if(t.type)return t.type===B.SLOT?new Lt(t,{parent:e,materials:r}):t;if(k(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=$r(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>Nr(n,e,r)):t},$r=(t,e,r)=>k(t)?Nr(t,e,r):F(t)?t.map(n=>Nr(n,e,r)):t;class it{constructor(e,r,n){N(this,"nodeType","PROP"),N(this,"rawData"),N(this,"parent"),N(this,"emitter",ne),N(this,"data"),N(this,"name"),N(this,"materialsMode");const o=(n==null?void 0:n.materials)||new Ft([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=$r(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=$r(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Lt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof L){const r=e.material;return ra((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(e){const r=this.data,n=o=>{if(o instanceof it||o instanceof Lt||o instanceof L)return o.export(e);if(F(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 gh=t=>{if(typeof t=="string")return!0;Er({data:t,dataStruct:Pt,throwError:!1})},na=(t,e,r)=>{if(typeof t=="string")return t;const n={...t,id:t.id??tt(),children:[],props:{},methods:t.methods||[],configure:Ho(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var s;const i=(s=t.props)==null?void 0:s[a];if(i instanceof it){n.props[a]=i;return}n.props[a]=new it(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof L)return a;if(k(a)){const s=a;return new L(s,{parent:e,materials:r})}else return a}):(t.children instanceof L&&(n.children=[t.children]),n.children=[new L(t.children,{parent:e,materials:r})])),n};class L{constructor(e,r){N(this,"nodeType","NODE"),N(this,"rawData"),N(this,"data"),N(this,"emitter",ne),N(this,"parent"),N(this,"materialsModel"),N(this,"listenerHandle"),N(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),gh(e);const n=(r==null?void 0:r.materials)||new Ft([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=na(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||tt()};return new L(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=na(r,this,this.materialsModel),r}updateValue(e){const r=this.data,n=this.updateWithPlainObj(e);this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return Mr(this,e)}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof L?l.export(e):l),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(l=>{const d=so(i,l,!1);d&&(c[l]=d)}),s.propsSetter=c;const u=this.materialsModel.usedMaterials.find(l=>{var d;return l.componentName===((d=this.material)==null?void 0:d.componentName)});this.material&&!u&&this.materialsModel.usedMaterials.push(this.material);let f={...n,configure:s,props:o,children:a,condition:n.condition};return e==="design"&&delete f.id,f=Ar(f),f}}const oa=(t,e,r)=>{const n={...t,id:tt(),props:{},componentName:Dt.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:Ho(t.configure||{},{propsSetter:{},advanceSetter:{}}),injectEnvList:t.injectEnvList};let o=[];F(t.children)?o=t.children.map(s=>s instanceof L?s:k(s)?new L(s,{parent:e,materials:r}):s):t.children instanceof L?o.push(t.children):t.children&&k(t.children)&&o.push(new L(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(s=>{var i;const c=(i=t.props)==null?void 0:i[s];c instanceof it?n.props[s]=c:n.props[s]=new it(s,c||"",{parent:e,materials:r})}),n.children=o,n};class oe{constructor(e,{parent:r,materials:n}){N(this,"rawData"),N(this,"data"),N(this,"nodeType",Dt.ROOT_CONTAINER),N(this,"emitter",ne),N(this,"materialsModel"),N(this,"listenerHandle"),N(this,"onChangeCbQueue"),N(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=oa(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=oa(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 Mr(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=Sr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c),condition:n.condition};let i=qo(s,["id"]);return i=Ar(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||tt()};return new oe(r,{materials:this.materialsModel,parent:null})}}const gt=t=>(t==null?void 0:t.type)===B.EXPRESSION,aa=t=>(t==null?void 0:t.type)===B.FUNCTION,vh=t=>(t==null?void 0:t.type)===B.ACTION,tt=()=>Math.random().toString(32).slice(3,9),yh=t=>(t==null?void 0:t.nodeType)==="NODE",Tr=t=>(t==null?void 0:t.nodeType)==="PROP",bh=t=>(t==null?void 0:t.nodeType)==="SLOT",Ar=t=>Bp(t,e=>k(e)?!Object.keys(e).length:F(e)?!e.length:!e);function _h(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 L){r.push(i);return}if(i instanceof Lt&&a(i.value.value),i instanceof it){a(i.value);return}if(k(i)){const c=i;Object.keys(c).forEach(u=>{a(c[u])});return}if(F(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof L))||[];r.push(...s)}}function Mr(t,e){return _h(t,r=>r.id===e)}const Sh=t=>{const e=Ro(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${tt()}`,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 Ch{constructor(e){N(this,"rawData"),N(this,"data"),this.rawData=e,this.data=Sh(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 xr=t=>{if(!F(t))throw new Error("Materials must be a array");return t.map(e=>new Ch(e))},Oh=t=>{t==null||t.forEach(e=>{Er({data:e,dataStruct:lh,throwError:!1})})};class Ft{constructor(e){N(this,"rawData"),N(this,"data"),N(this,"usedMaterials",[]),this.rawData=e,Oh(e),this.data=xr(e)}addMaterials(e){const r=xr(e),n=[],o=this.data.map(s=>{const i=r.findIndex(c=>c.componentName===s.componentName);return i>=0?(n.push(i),r[i]):s}),a=r.filter((s,i)=>!n.includes(i));this.data=[...o,...a]}replaceMaterials(e){const r=xr(e);this.data=[...r]}removeMaterial(e){const r=this.data.filter(n=>!e.includes(n.componentName));this.data=r}findByComponentName(e){return this.data.find(r=>r.componentName===e)}findSnippetById(e){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(e)}return n}getAllSnippets(){const e=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});let o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(l=>{const d=l.category||"default";s.includes(d)||(s.push(d),i[d]=[]),i[d].push(l)});const u=[];s.forEach(l=>{i[l].length&&u.push({name:l,list:i[l]})});const f={name:a,list:u};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 jh=M({version:y(C()),name:y(C()),css:y(C()),renderType:y(U([V("COMPONENT"),V("PAGE")])),loadType:y(x()),lifecycle:y(x()),props:y(x()),methods:y(D(dh)),componentsMeta:D(yr(M({componentName:C()}),_r)),thirdLibs:y(rh),componentsTree:ph,assets:y(D(x()))}),sa=t=>(Er({data:t,dataStruct:jh,throwError:!1}),t),Ir=(t,e,r)=>({...t,componentsTree:new oe(t.componentsTree,{parent:e,materials:r})});class Oe{constructor(e,r){N(this,"nodeType","PAGE"),N(this,"rawData"),N(this,"emitter",ne),N(this,"data"),N(this,"parent"),N(this,"materialsModel"),N(this,"assetPackagesList"),sa(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new Ft((r==null?void 0:r.materials)||[]),this.data=Ir(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=Ir(e,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(e){const r=this.data;e&&(this.rawData=JSON.parse(JSON.stringify(e)),this.data=Ir(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 Mr(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof oe)return console.warn("Not found parent node"),!1;if(a instanceof it)return console.warn("CProp can not add node"),!1;if(a instanceof Lt){const i=a.value.value,c=i.findIndex(u=>u===r)??-1;return c>=0?(n==="BEFORE"?i.splice(c,0,e):i.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof Oe)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 L(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=tt();const n=new L(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 L?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 L&&a instanceof L?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 Lt){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 L||n instanceof oe){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=Sr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const u=o.find(f=>{var l;return f.package===((l=c.value.npm)==null?void 0:l.package)});return u&&a.push(u),{componentName:c.componentName,...Ro(c.value.npm||{})}}).filter(c=>c.componentName&&c.package&&c.version?!0:(console.warn(`${JSON.stringify(c,null,2)} not a valid material info`),!1));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:Ar(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(f=>c.package===f.package);u&&a.push(u)}),i.assets=Jp(a,c=>c.package),i=qo(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}Dt.ROOT_CONTAINER;const ae="DYNAMIC",ia=["$$context","$$nodeModel"],Rr="ON_DID_RENDER",Pr="ON_WILL_DESTROY",ca=[Rr,Pr],Dr=(t,e)=>{let r=t;return e&&(r={...t},r.__proto__=e||null),r},se=(t,e={},...r)=>typeof t=="string"||typeof t=="number"?String(t):(ia.forEach(o=>{o in e&&t.__CP_TYPE__!==ae&&delete e[o]}),E.createElement(t,e,...r)),ua=(t={},e)=>{const r=[],n=(o,a)=>{let s=a;Tr(a)&&(s=a.value),e(s)?r.push({keyPath:o,val:s}):jt(s)?s.forEach((i,c)=>{n([...o,String(c)],i)}):Et(s)&&Object.keys(s).forEach(i=>{n([...o,i],s[i])})};return n(["$root"],t),r},Vt=(t,e)=>{const r=t.handler,{context:n,storeManager:o}=e;return e.actionVariableSpace||(e.actionVariableSpace={}),async function(...a){const s={},i=async f=>{const l=f;if(l.type==="RUN_CODE"){const d=Ht({funcName:"",funcBody:`function() {
|
|
27
|
+
`)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var Dt=(t=>(t.ROOT_CONTAINER="RootContainer",t))(Dt||{});const dh=M({type:B(k.FUNCTION),value:C()}),ph=yr(Yo(Pt,["componentName"]),M({componentName:B("RootContainer")}));function hh(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 ne=hh(),mh=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new Ft([]);return e&&(o=e.materialsMode||new Ft([])),n&&(F(n)?r.value=n.map(a=>new L(a,{parent:e,materials:o})):V(n)&&r.value.push(new L(n,{parent:e,materials:o}))),r};class Lt{constructor(e,r){N(this,"nodeType","SLOT"),N(this,"rawData"),N(this,"parent"),N(this,"emitter",ne),N(this,"data"),N(this,"id"),N(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new Ft([]);this.materialsMode=n,this.id=tt(),this.data=mh(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof L)return o.export(e);if(V(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return F(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const ra=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===wr.SINGLE?e.push(n.content):n.type===wr.GROUP&&(e=[...e,...ra(n.content)]):e.push(r)}),e},Nr=(t,e,r)=>{if(t.type)return t.type===k.SLOT?new Lt(t,{parent:e,materials:r}):t;if(V(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=$r(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>Nr(n,e,r)):t},$r=(t,e,r)=>V(t)?Nr(t,e,r):F(t)?t.map(n=>Nr(n,e,r)):t;class it{constructor(e,r,n){N(this,"nodeType","PROP"),N(this,"rawData"),N(this,"parent"),N(this,"emitter",ne),N(this,"data"),N(this,"name"),N(this,"materialsMode");const o=(n==null?void 0:n.materials)||new Ft([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=$r(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=$r(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Lt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof L){const r=e.material;return ra((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(e){const r=this.data,n=o=>{if(o instanceof it||o instanceof Lt||o instanceof L)return o.export(e);if(F(o))return o.map(a=>n(a));if(V(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const gh=t=>{if(typeof t=="string")return!0;Er({data:t,dataStruct:Pt,throwError:!1})},na=(t,e,r)=>{if(typeof t=="string")return t;const n={...t,id:t.id??tt(),children:[],props:{},methods:t.methods||[],configure:Ho(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var s;const i=(s=t.props)==null?void 0:s[a];if(i instanceof it){n.props[a]=i;return}n.props[a]=new it(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof L)return a;if(V(a)){const s=a;return new L(s,{parent:e,materials:r})}else return a}):(t.children instanceof L&&(n.children=[t.children]),n.children=[new L(t.children,{parent:e,materials:r})])),n};class L{constructor(e,r){N(this,"nodeType","NODE"),N(this,"rawData"),N(this,"data"),N(this,"emitter",ne),N(this,"parent"),N(this,"materialsModel"),N(this,"listenerHandle"),N(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),gh(e);const n=(r==null?void 0:r.materials)||new Ft([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=na(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||tt()};return new L(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=na(r,this,this.materialsModel),r}updateValue(e){const r=this.data,n=this.updateWithPlainObj(e);this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return Mr(this,e)}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof L?l.export(e):l),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(l=>{const d=so(i,l,!1);d&&(c[l]=d)}),s.propsSetter=c;const u=this.materialsModel.usedMaterials.find(l=>{var d;return l.componentName===((d=this.material)==null?void 0:d.componentName)});this.material&&!u&&this.materialsModel.usedMaterials.push(this.material);let f={...n,configure:s,props:o,children:a,condition:n.condition};return e==="design"&&delete f.id,f=Ar(f),f}}const oa=(t,e,r)=>{const n={...t,id:tt(),props:{},componentName:Dt.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:Ho(t.configure||{},{propsSetter:{},advanceSetter:{}}),injectEnvList:t.injectEnvList};let o=[];F(t.children)?o=t.children.map(s=>s instanceof L?s:V(s)?new L(s,{parent:e,materials:r}):s):t.children instanceof L?o.push(t.children):t.children&&V(t.children)&&o.push(new L(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(s=>{var i;const c=(i=t.props)==null?void 0:i[s];c instanceof it?n.props[s]=c:n.props[s]=new it(s,c||"",{parent:e,materials:r})}),n.children=o,n};class oe{constructor(e,{parent:r,materials:n}){N(this,"rawData"),N(this,"data"),N(this,"nodeType",Dt.ROOT_CONTAINER),N(this,"emitter",ne),N(this,"materialsModel"),N(this,"listenerHandle"),N(this,"onChangeCbQueue"),N(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=oa(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=oa(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 Mr(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=Sr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c),condition:n.condition};let i=qo(s,["id"]);return i=Ar(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||tt()};return new oe(r,{materials:this.materialsModel,parent:null})}}const gt=t=>(t==null?void 0:t.type)===k.EXPRESSION,aa=t=>(t==null?void 0:t.type)===k.FUNCTION,vh=t=>(t==null?void 0:t.type)===k.ACTION,tt=()=>Math.random().toString(32).slice(3,9),yh=t=>(t==null?void 0:t.nodeType)==="NODE",Tr=t=>(t==null?void 0:t.nodeType)==="PROP",bh=t=>(t==null?void 0:t.nodeType)==="SLOT",Ar=t=>Bp(t,e=>V(e)?!Object.keys(e).length:F(e)?!e.length:!e);function _h(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 L){r.push(i);return}if(i instanceof Lt&&a(i.value.value),i instanceof it){a(i.value);return}if(V(i)){const c=i;Object.keys(c).forEach(u=>{a(c[u])});return}if(F(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof L))||[];r.push(...s)}}function Mr(t,e){return _h(t,r=>r.id===e)}const Sh=t=>{const e=Ro(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${tt()}`,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 Ch{constructor(e){N(this,"rawData"),N(this,"data"),this.rawData=e,this.data=Sh(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 xr=t=>{if(!F(t))throw new Error("Materials must be a array");return t.map(e=>new Ch(e))},Oh=t=>{t==null||t.forEach(e=>{Er({data:e,dataStruct:lh,throwError:!1})})};class Ft{constructor(e){N(this,"rawData"),N(this,"data"),N(this,"usedMaterials",[]),this.rawData=e,Oh(e),this.data=xr(e)}addMaterials(e){const r=xr(e),n=[],o=this.data.map(s=>{const i=r.findIndex(c=>c.componentName===s.componentName);return i>=0?(n.push(i),r[i]):s}),a=r.filter((s,i)=>!n.includes(i));this.data=[...o,...a]}replaceMaterials(e){const r=xr(e);this.data=[...r]}removeMaterial(e){const r=this.data.filter(n=>!e.includes(n.componentName));this.data=r}findByComponentName(e){return this.data.find(r=>r.componentName===e)}findSnippetById(e){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(e)}return n}getAllSnippets(){const e=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});let o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(l=>{const d=l.category||"default";s.includes(d)||(s.push(d),i[d]=[]),i[d].push(l)});const u=[];s.forEach(l=>{i[l].length&&u.push({name:l,list:i[l]})});const f={name:a,list:u};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 jh=M({version:y(C()),name:y(C()),css:y(C()),lifecycle:y(x()),props:y(x()),methods:y(D(dh)),componentsMeta:D(yr(M({componentName:C()}),_r)),thirdLibs:y(rh),componentsTree:ph,assets:y(D(x())),extra:y(x())}),sa=t=>(Er({data:t,dataStruct:jh,throwError:!1}),t),Ir=(t,e,r)=>({...t,componentsTree:new oe(t.componentsTree,{parent:e,materials:r})});class Oe{constructor(e,r){N(this,"nodeType","PAGE"),N(this,"rawData"),N(this,"emitter",ne),N(this,"data"),N(this,"parent"),N(this,"materialsModel"),N(this,"assetPackagesList"),sa(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new Ft((r==null?void 0:r.materials)||[]),this.data=Ir(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=Ir(e,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(e){const r=this.data;e&&(this.rawData=JSON.parse(JSON.stringify(e)),this.data=Ir(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 Mr(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof oe)return console.warn("Not found parent node"),!1;if(a instanceof it)return console.warn("CProp can not add node"),!1;if(a instanceof Lt){const i=a.value.value,c=i.findIndex(u=>u===r)??-1;return c>=0?(n==="BEFORE"?i.splice(c,0,e):i.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof Oe)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(V(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 L(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=tt();const n=new L(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 L?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 L&&a instanceof L?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 Lt){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 L||n instanceof oe){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=Sr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const u=o.find(f=>{var l;return f.package===((l=c.value.npm)==null?void 0:l.package)});return u&&a.push(u),{componentName:c.componentName,...Ro(c.value.npm||{})}}).filter(c=>c.componentName&&c.package&&c.version?!0:(console.warn(`${JSON.stringify(c,null,2)} not a valid material info`),!1));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:Ar(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(f=>c.package===f.package);u&&a.push(u)}),i.assets=Jp(a,c=>c.package),i=qo(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}Dt.ROOT_CONTAINER;const ae="DYNAMIC",ia=["$$context","$$nodeModel"],Rr="ON_DID_RENDER",Pr="ON_WILL_DESTROY",ca=[Rr,Pr],Dr=(t,e)=>{let r=t;return e&&(r={...t},r.__proto__=e||null),r},se=(t,e={},...r)=>typeof t=="string"||typeof t=="number"?String(t):(ia.forEach(o=>{o in e&&t.__CP_TYPE__!==ae&&delete e[o]}),E.createElement(t,e,...r)),ua=(t={},e)=>{const r=[],n=(o,a)=>{let s=a;Tr(a)&&(s=a.value),e(s)?r.push({keyPath:o,val:s}):jt(s)?s.forEach((i,c)=>{n([...o,String(c)],i)}):Et(s)&&Object.keys(s).forEach(i=>{n([...o,i],s[i])})};return n(["$root"],t),r},Vt=(t,e)=>{const r=t.handler,{context:n,storeManager:o}=e;return e.actionVariableSpace||(e.actionVariableSpace={}),async function(...a){const s={},i=async f=>{const l=f;if(l.type==="RUN_CODE"){const d=Ht({funcName:"",funcBody:`function() {
|
|
28
28
|
${l.value} }`,nodeContext:n,storeManager:o,$$response:e.$$response,actionVariableSpace:e.actionVariableSpace});let p;e.$$response!==void 0?p=d(e.$$response,...a):p=d(...a),p!=null&&p.then?s[l.id]=await p:s[l.id]=p}if(l.type==="JUMP_LINK"){const p=wh(l,e)(...a);p!=null&&p.then?s[l.id]=await p:s[l.id]=p}if(l.type==="REQUEST_API"){const{run:d,afterFailedResponse:p,afterSuccessResponse:b}=Eh(l,e);try{const O=d(...a);O!=null&&O.then?s[l.id]=await O:s[l.id]=O,l.responseVarName&&(e.actionVariableSpace[l.responseVarName]=s[l.id]);const h=b(s[l.id],...a);return h!=null&&h.then?await h:h}catch(O){const h=await p(O);return h!=null&&h.then?await h:h}}if(l.type==="CALL_NODE_METHOD"){const p=Nh(l,e)(...a);p!=null&&p.then?s[l.id]=await p:s[l.id]=p,l.returnVarName&&(e.actionVariableSpace[l.returnVarName]=s[l.id])}if(l.type==="ASSIGN_VALUE"){const d=$h(l,e);let p=[...a];e.$$response!==void 0&&(p=[e.$$response,p]);const b=d(...p);s[l.id]=await b}};let c=r[0];const u=new Set;for(;c;){if(u.has(c.id))return;await i(c),u.add(c.id),c=r.find(l=>(c==null?void 0:c.next)&&l.id===(c==null?void 0:c.next))}}};function wh(t,e){return vt(t.link,e)}const vt=(t,e)=>function(...r){return gt(t)?lt(t.value,{...e.context,nodeContext:e.context,storeManager:e.storeManager,$$response:e.$$response,actionVariableSpace:e.actionVariableSpace}):aa(t)?Ht({funcName:t.name||"",funcBody:t.value,nodeContext:e.context,storeManager:e.storeManager,$$response:e.$$response,actionVariableSpace:e.actionVariableSpace})(...r):t},Eh=(t,e)=>({run:function(...a){var d,p;let s="";t.apiPath&&(s=vt(t.apiPath,e)(...a));const i=t.body||{};Object.keys(i).forEach(b=>{i[b]=vt(i[b],e)(...a)});const c=t.query||{};Object.keys(c).forEach(b=>{c[b]=vt(c[b],e)(...a)});const u=t.header||{};Object.keys(u).forEach(b=>{u[b]=vt(u[b],e)(...a)});const f=t.method||"GET";return(p=(d=e.context).requestAPI)==null?void 0:p.call(d,{url:s,method:f,header:u,body:i,query:c})},afterSuccessResponse:async(a,...s)=>{if(!t.afterSuccessResponse)return a;const i=[...t.afterSuccessResponse||[],...t.afterFailedResponse||[]];return Vt({handler:i},{...e,$$response:a})(...s)},afterFailedResponse:async(a,...s)=>{if(!t.afterFailedResponse)return a;const i=[...t.afterFailedResponse||[],...t.afterSuccessResponse||[]];return Vt({handler:i},{...e,$$response:a})(...s)}}),Nh=(t,e)=>(...r)=>{const n=Ht({funcName:"",funcBody:`
|
|
29
29
|
function () {
|
|
30
30
|
var args = arguments;
|