@chamn/engine 0.0.4 → 0.0.7

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.
Files changed (173) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +31 -0
  4. package/build.config.js +4 -3
  5. package/dist/Engine.module.scss.d.ts +5 -0
  6. package/dist/component/CSSEditor/index.d.ts +16 -0
  7. package/dist/component/CSSEditor/style.module.scss.d.ts +6 -0
  8. package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
  9. package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
  10. package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  11. package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
  12. package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
  13. package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
  14. package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  15. package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
  16. package/dist/component/ClassNameEditor/index.d.ts +16 -0
  17. package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
  18. package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  19. package/dist/component/CustomSchemaForm/components/Form/context.d.ts +10 -0
  20. package/dist/component/CustomSchemaForm/components/Form/index.d.ts +17 -0
  21. package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +12 -0
  22. package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  23. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
  24. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
  25. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
  26. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  27. package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
  28. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
  29. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  30. package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
  31. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
  32. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
  33. package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
  34. package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
  35. package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
  36. package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
  37. package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
  38. package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
  39. package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
  40. package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
  41. package/dist/component/CustomSchemaForm/context.d.ts +15 -0
  42. package/dist/component/CustomSchemaForm/index.d.ts +17 -0
  43. package/dist/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  44. package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
  45. package/dist/component/MonacoEditor/index.d.ts +15 -0
  46. package/dist/component/Workbench/style.module.scss.d.ts +26 -0
  47. package/dist/core/pluginManager.d.ts +1 -1
  48. package/dist/index.cjs.js +295 -39
  49. package/dist/index.cjs.js.map +1 -1
  50. package/dist/index.d.ts +4 -2
  51. package/dist/index.es.js +44920 -9933
  52. package/dist/index.es.js.map +1 -1
  53. package/dist/material/innerMaterial.d.ts +2 -0
  54. package/dist/monacoeditorwork/css.worker.bundle.js +45072 -0
  55. package/dist/monacoeditorwork/editor.worker.bundle.js +8294 -0
  56. package/dist/monacoeditorwork/html.worker.bundle.js +24321 -0
  57. package/dist/monacoeditorwork/json.worker.bundle.js +15550 -0
  58. package/dist/monacoeditorwork/ts.worker.bundle.js +169967 -0
  59. package/dist/plugins/AdvancePanel/index.d.ts +10 -0
  60. package/dist/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  61. package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
  62. package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  63. package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
  64. package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  65. package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
  66. package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
  67. package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
  68. package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
  69. package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  70. package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
  71. package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
  72. package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
  73. package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  74. package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
  75. package/dist/plugins/Designer/config.d.ts +1 -0
  76. package/dist/plugins/Designer/index.d.ts +15 -0
  77. package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
  78. package/dist/plugins/Designer/localize/index.d.ts +2 -0
  79. package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
  80. package/dist/plugins/Designer/style.module.scss.d.ts +5 -0
  81. package/dist/plugins/Designer/util.d.ts +2 -0
  82. package/dist/plugins/Designer/view.d.ts +30 -0
  83. package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
  84. package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
  85. package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
  86. package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
  87. package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
  88. package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  89. package/dist/plugins/History/index.d.ts +2 -0
  90. package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
  91. package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
  92. package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
  93. package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  94. package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
  95. package/dist/plugins/OutlineTree/index.d.ts +3 -0
  96. package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
  97. package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
  98. package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
  99. package/dist/plugins/OutlineTree/util.d.ts +15 -0
  100. package/dist/plugins/PropertyPanel/index.d.ts +9 -0
  101. package/dist/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  102. package/dist/plugins/RightPanel/index.d.ts +2 -0
  103. package/dist/plugins/RightPanel/style.module.scss.d.ts +10 -0
  104. package/dist/plugins/RightPanel/view.d.ts +34 -0
  105. package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
  106. package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  107. package/dist/plugins/index.d.ts +9 -0
  108. package/dist/style.css +1 -1
  109. package/dist/utils/css.d.ts +19 -0
  110. package/dist/utils/logger.d.ts +1 -0
  111. package/package.json +16 -8
  112. package/public/Engine.module.scss.d.ts +5 -0
  113. package/public/component/CSSEditor/style.module.scss.d.ts +6 -0
  114. package/public/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  115. package/public/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  116. package/public/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  117. package/public/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  118. package/public/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  119. package/public/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  120. package/public/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  121. package/public/component/Workbench/style.module.scss.d.ts +26 -0
  122. package/public/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  123. package/public/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  124. package/public/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  125. package/public/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  126. package/public/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  127. package/public/plugins/Designer/style.module.scss.d.ts +5 -0
  128. package/public/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  129. package/public/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  130. package/public/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  131. package/public/plugins/RightPanel/style.module.scss.d.ts +10 -0
  132. package/public/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  133. package/public/render.umd.js +14 -14
  134. package/public/render.umd.js.map +1 -1
  135. package/src/Engine.module.scss.d.ts +5 -0
  136. package/src/_dev_/page/Editor/index.tsx +1 -1
  137. package/src/component/CSSEditor/index.tsx +4 -5
  138. package/src/component/CSSEditor/style.module.scss.d.ts +6 -0
  139. package/src/component/CSSPropertiesEditor/index.tsx +1 -5
  140. package/src/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  141. package/src/component/CSSPropertiesVariableBindEditor/index.tsx +1 -1
  142. package/src/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  143. package/src/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  144. package/src/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  145. package/src/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  146. package/src/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  147. package/src/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  148. package/src/component/MonacoEditor/index.tsx +1 -41
  149. package/src/component/Workbench/style.module.scss.d.ts +26 -0
  150. package/src/core/pluginManager.ts +1 -1
  151. package/src/index.tsx +5 -2
  152. package/src/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  153. package/src/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  154. package/src/plugins/ComponentLibrary/components/ListView/index.tsx +0 -1
  155. package/src/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  156. package/src/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  157. package/src/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  158. package/src/plugins/Designer/style.module.scss.d.ts +5 -0
  159. package/src/plugins/DisplaySourceSchema/index.tsx +1 -1
  160. package/src/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  161. package/src/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  162. package/src/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  163. package/src/plugins/RightPanel/style.module.scss.d.ts +10 -0
  164. package/src/plugins/VisualPanelPlus/index.tsx +3 -19
  165. package/src/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  166. package/src/plugins/index.tsx +3 -1
  167. package/src/style.d.ts +2 -0
  168. package/src/typing.d.ts +5 -0
  169. package/dist/typing.d.ts +0 -4
  170. package/dist/vite-env.d.ts +0 -1
  171. package/public/typing.d.ts +0 -4
  172. package/public/vite-env.d.ts +0 -1
  173. package/src/component/MonacoEditor/index copy.tsx +0 -119
@@ -1,4 +1,4 @@
1
- (function(Z,lt){typeof exports=="object"&&typeof module<"u"?module.exports=lt(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],lt):(Z=typeof globalThis<"u"?globalThis:Z||self,Z.CRender=lt(Z.React,Z.ReactDOM))})(this,function(Z,lt){"use strict";const Za=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function ei(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const P=Za(Z),ti=ei(lt);var nr={exports:{}},ft={};/**
1
+ (function(x,ot){typeof exports=="object"&&typeof module<"u"?module.exports=ot(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],ot):(x=typeof globalThis<"u"?globalThis:x||self,x.CRender=ot(x.React,x.ReactDOM))})(this,function(x,ot){"use strict";function Qa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Xa=Qa(ot);var xt={},Ka={get exports(){return xt},set exports(e){xt=e}},at={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var vn;function ri(){if(vn)return ft;vn=1;var e=P.default,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,u,l){var f,d={},p=null,v=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(d[f]=u[f]);if(i&&i.defaultProps)for(f in u=i.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:i,key:p,ref:v,props:d,_owner:o.current}}return ft.Fragment=r,ft.jsx=s,ft.jsxs=s,ft}var dt={};/**
9
+ */var hn;function Za(){if(hn)return at;hn=1;var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,u,l){var f,d={},p=null,v=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(d[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:s,key:p,ref:v,props:d,_owner:o.current}}return at.Fragment=r,at.jsx=i,at.jsxs=i,at}var it={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,29 +14,29 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var yn;function ni(){return yn||(yn=1,{}.NODE_ENV!=="production"&&function(){var e=P.default,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),g=Symbol.iterator,j="@@iterator";function _(c){if(c===null||typeof c!="object")return null;var h=g&&c[g]||c[j];return typeof h=="function"?h:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(c){{for(var h=arguments.length,y=new Array(h>1?h-1:0),O=1;O<h;O++)y[O-1]=arguments[O];G("error",c,y)}}function G(c,h,y){{var O=w.ReactDebugCurrentFrame,N=O.getStackAddendum();N!==""&&(h+="%s",y=y.concat([N]));var M=y.map(function(R){return String(R)});M.unshift("Warning: "+h),Function.prototype.apply.call(console[c],console,M)}}var I=!1,W=!1,J=!1,le=!1,T=!1,q;q=Symbol.for("react.module.reference");function H(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===a||T||c===o||c===l||c===f||le||c===v||I||W||J||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===d||c.$$typeof===s||c.$$typeof===i||c.$$typeof===u||c.$$typeof===q||c.getModuleId!==void 0))}function ve(c,h,y){var O=c.displayName;if(O)return O;var N=h.displayName||h.name||"";return N!==""?y+"("+N+")":y}function ke(c){return c.displayName||"Context"}function oe(c){if(c==null)return null;if(typeof c.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case i:var h=c;return ke(h)+".Consumer";case s:var y=c;return ke(y._context)+".Provider";case u:return ve(c,c.render,"ForwardRef");case d:var O=c.displayName||null;return O!==null?O:oe(c.type)||"Memo";case p:{var N=c,M=N._payload,R=N._init;try{return oe(R(M))}catch{return null}}}return null}var je=Object.assign,Ie=0,at,Se,te,Qt,it,Xt,Fe;function st(){}st.__reactDisabledLog=!0;function ae(){{if(Ie===0){at=console.log,Se=console.info,te=console.warn,Qt=console.error,it=console.group,Xt=console.groupCollapsed,Fe=console.groupEnd;var c={configurable:!0,enumerable:!0,value:st,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}Ie++}}function Ce(){{if(Ie--,Ie===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:je({},c,{value:at}),info:je({},c,{value:Se}),warn:je({},c,{value:te}),error:je({},c,{value:Qt}),group:je({},c,{value:it}),groupCollapsed:je({},c,{value:Xt}),groupEnd:je({},c,{value:Fe})})}Ie<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Le=w.ReactCurrentDispatcher,Tt;function Kt(c,h,y){{if(Tt===void 0)try{throw Error()}catch(N){var O=N.stack.trim().match(/\n( *(at )?)/);Tt=O&&O[1]||""}return`
18
- `+Tt+c}}var cn=!1,Zt;{var Ty=typeof WeakMap=="function"?WeakMap:Map;Zt=new Ty}function La(c,h){if(!c||cn)return"";{var y=Zt.get(c);if(y!==void 0)return y}var O;cn=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var M;M=Le.current,Le.current=null,ae();try{if(h){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(Ee){O=Ee}Reflect.construct(c,[],R)}else{try{R.call()}catch(Ee){O=Ee}c.call(R.prototype)}}else{try{throw Error()}catch(Ee){O=Ee}c()}}catch(Ee){if(Ee&&O&&typeof Ee.stack=="string"){for(var x=Ee.stack.split(`
19
- `),Q=O.stack.split(`
20
- `),U=x.length-1,z=Q.length-1;U>=1&&z>=0&&x[U]!==Q[z];)z--;for(;U>=1&&z>=0;U--,z--)if(x[U]!==Q[z]){if(U!==1||z!==1)do if(U--,z--,z<0||x[U]!==Q[z]){var ie=`
21
- `+x[U].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&Zt.set(c,ie),ie}while(U>=1&&z>=0);break}}}finally{cn=!1,Le.current=M,Ce(),Error.prepareStackTrace=N}var ct=c?c.displayName||c.name:"",Ka=ct?Kt(ct):"";return typeof c=="function"&&Zt.set(c,Ka),Ka}function My(c,h,y){return La(c,!1)}function $y(c){var h=c.prototype;return!!(h&&h.isReactComponent)}function er(c,h,y){if(c==null)return"";if(typeof c=="function")return La(c,$y(c));if(typeof c=="string")return Kt(c);switch(c){case l:return Kt("Suspense");case f:return Kt("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return My(c.render);case d:return er(c.type,h,y);case p:{var O=c,N=O._payload,M=O._init;try{return er(M(N),h,y)}catch{}}}return""}var tr=Object.prototype.hasOwnProperty,Ba={},Ua=w.ReactDebugCurrentFrame;function rr(c){if(c){var h=c._owner,y=er(c.type,c._source,h?h.type:null);Ua.setExtraStackFrame(y)}else Ua.setExtraStackFrame(null)}function Py(c,h,y,O,N){{var M=Function.call.bind(tr);for(var R in c)if(M(c,R)){var x=void 0;try{if(typeof c[R]!="function"){var Q=Error((O||"React class")+": "+y+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Q.name="Invariant Violation",Q}x=c[R](h,R,O,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(U){x=U}x&&!(x instanceof Error)&&(rr(N),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",O||"React class",y,R,typeof x),rr(null)),x instanceof Error&&!(x.message in Ba)&&(Ba[x.message]=!0,rr(N),S("Failed %s type: %s",y,x.message),rr(null))}}}var Dy=Array.isArray;function ln(c){return Dy(c)}function ky(c){{var h=typeof Symbol=="function"&&Symbol.toStringTag,y=h&&c[Symbol.toStringTag]||c.constructor.name||"Object";return y}}function Iy(c){try{return za(c),!1}catch{return!0}}function za(c){return""+c}function Va(c){if(Iy(c))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ky(c)),za(c)}var Mt=w.ReactCurrentOwner,Fy={key:!0,ref:!0,__self:!0,__source:!0},Ga,Wa,fn;fn={};function Ly(c){if(tr.call(c,"ref")){var h=Object.getOwnPropertyDescriptor(c,"ref").get;if(h&&h.isReactWarning)return!1}return c.ref!==void 0}function By(c){if(tr.call(c,"key")){var h=Object.getOwnPropertyDescriptor(c,"key").get;if(h&&h.isReactWarning)return!1}return c.key!==void 0}function Uy(c,h){if(typeof c.ref=="string"&&Mt.current&&h&&Mt.current.stateNode!==h){var y=oe(Mt.current.type);fn[y]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',oe(Mt.current.type),c.ref),fn[y]=!0)}}function zy(c,h){{var y=function(){Ga||(Ga=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};y.isReactWarning=!0,Object.defineProperty(c,"key",{get:y,configurable:!0})}}function Vy(c,h){{var y=function(){Wa||(Wa=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};y.isReactWarning=!0,Object.defineProperty(c,"ref",{get:y,configurable:!0})}}var Gy=function(c,h,y,O,N,M,R){var x={$$typeof:t,type:c,key:h,ref:y,props:R,_owner:M};return x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(x,"_self",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.defineProperty(x,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x};function Wy(c,h,y,O,N){{var M,R={},x=null,Q=null;y!==void 0&&(Va(y),x=""+y),By(h)&&(Va(h.key),x=""+h.key),Ly(h)&&(Q=h.ref,Uy(h,N));for(M in h)tr.call(h,M)&&!Fy.hasOwnProperty(M)&&(R[M]=h[M]);if(c&&c.defaultProps){var U=c.defaultProps;for(M in U)R[M]===void 0&&(R[M]=U[M])}if(x||Q){var z=typeof c=="function"?c.displayName||c.name||"Unknown":c;x&&zy(R,z),Q&&Vy(R,z)}return Gy(c,x,Q,N,O,Mt.current,R)}}var dn=w.ReactCurrentOwner,Ha=w.ReactDebugCurrentFrame;function ut(c){if(c){var h=c._owner,y=er(c.type,c._source,h?h.type:null);Ha.setExtraStackFrame(y)}else Ha.setExtraStackFrame(null)}var pn;pn=!1;function hn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function Ya(){{if(dn.current){var c=oe(dn.current.type);if(c)return`
17
+ */var vn;function ei(){return vn||(vn=1,{}.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,_="@@iterator";function E(c){if(c===null||typeof c!="object")return null;var h=b&&c[b]||c[_];return typeof h=="function"?h:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(c){{for(var h=arguments.length,y=new Array(h>1?h-1:0),O=1;O<h;O++)y[O-1]=arguments[O];W("error",c,y)}}function W(c,h,y){{var O=w.ReactDebugCurrentFrame,A=O.getStackAddendum();A!==""&&(h+="%s",y=y.concat([A]));var $=y.map(function(T){return String(T)});$.unshift("Warning: "+h),Function.prototype.apply.call(console[c],console,$)}}var D=!1,U=!1,Z=!1,J=!1,N=!1,ae;ae=Symbol.for("react.module.reference");function le(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===a||N||c===o||c===l||c===f||J||c===v||D||U||Z||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===d||c.$$typeof===i||c.$$typeof===s||c.$$typeof===u||c.$$typeof===ae||c.getModuleId!==void 0))}function Ct(c,h,y){var O=c.displayName;if(O)return O;var A=h.displayName||h.name||"";return A!==""?y+"("+A+")":y}function Ht(c){return c.displayName||"Context"}function ee(c){if(c==null)return null;if(typeof c.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var h=c;return Ht(h)+".Consumer";case i:var y=c;return Ht(y._context)+".Provider";case u:return Ct(c,c.render,"ForwardRef");case d:var O=c.displayName||null;return O!==null?O:ee(c.type)||"Memo";case p:{var A=c,$=A._payload,T=A._init;try{return ee(T($))}catch{return null}}}return null}var te=Object.assign,H=0,Yt,Ze,Jt,$e,et,re,_e;function tt(){}tt.__reactDisabledLog=!0;function on(){{if(H===0){Yt=console.log,Ze=console.info,Jt=console.warn,$e=console.error,et=console.group,re=console.groupCollapsed,_e=console.groupEnd;var c={configurable:!0,enumerable:!0,value:tt,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}H++}}function Ny(){{if(H--,H===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},c,{value:Yt}),info:te({},c,{value:Ze}),warn:te({},c,{value:Jt}),error:te({},c,{value:$e}),group:te({},c,{value:et}),groupCollapsed:te({},c,{value:re}),groupEnd:te({},c,{value:_e})})}H<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var an=w.ReactCurrentDispatcher,sn;function qt(c,h,y){{if(sn===void 0)try{throw Error()}catch(A){var O=A.stack.trim().match(/\n( *(at )?)/);sn=O&&O[1]||""}return`
18
+ `+sn+c}}var cn=!1,Qt;{var Ty=typeof WeakMap=="function"?WeakMap:Map;Qt=new Ty}function ka(c,h){if(!c||cn)return"";{var y=Qt.get(c);if(y!==void 0)return y}var O;cn=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=an.current,an.current=null,on();try{if(h){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(je){O=je}Reflect.construct(c,[],T)}else{try{T.call()}catch(je){O=je}c.call(T.prototype)}}else{try{throw Error()}catch(je){O=je}c()}}catch(je){if(je&&O&&typeof je.stack=="string"){for(var R=je.stack.split(`
19
+ `),q=O.stack.split(`
20
+ `),z=R.length-1,V=q.length-1;z>=1&&V>=0&&R[z]!==q[V];)V--;for(;z>=1&&V>=0;z--,V--)if(R[z]!==q[V]){if(z!==1||V!==1)do if(z--,V--,V<0||R[z]!==q[V]){var ie=`
21
+ `+R[z].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&Qt.set(c,ie),ie}while(z>=1&&V>=0);break}}}finally{cn=!1,an.current=$,Ny(),Error.prepareStackTrace=A}var nt=c?c.displayName||c.name:"",qa=nt?qt(nt):"";return typeof c=="function"&&Qt.set(c,qa),qa}function Ay(c,h,y){return ka(c,!1)}function My(c){var h=c.prototype;return!!(h&&h.isReactComponent)}function Xt(c,h,y){if(c==null)return"";if(typeof c=="function")return ka(c,My(c));if(typeof c=="string")return qt(c);switch(c){case l:return qt("Suspense");case f:return qt("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return Ay(c.render);case d:return Xt(c.type,h,y);case p:{var O=c,A=O._payload,$=O._init;try{return Xt($(A),h,y)}catch{}}}return""}var Kt=Object.prototype.hasOwnProperty,Ia={},Fa=w.ReactDebugCurrentFrame;function Zt(c){if(c){var h=c._owner,y=Xt(c.type,c._source,h?h.type:null);Fa.setExtraStackFrame(y)}else Fa.setExtraStackFrame(null)}function $y(c,h,y,O,A){{var $=Function.call.bind(Kt);for(var T in c)if($(c,T)){var R=void 0;try{if(typeof c[T]!="function"){var q=Error((O||"React class")+": "+y+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}R=c[T](h,T,O,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){R=z}R&&!(R instanceof Error)&&(Zt(A),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",O||"React class",y,T,typeof R),Zt(null)),R instanceof Error&&!(R.message in Ia)&&(Ia[R.message]=!0,Zt(A),S("Failed %s type: %s",y,R.message),Zt(null))}}}var Py=Array.isArray;function un(c){return Py(c)}function Dy(c){{var h=typeof Symbol=="function"&&Symbol.toStringTag,y=h&&c[Symbol.toStringTag]||c.constructor.name||"Object";return y}}function ky(c){try{return La(c),!1}catch{return!0}}function La(c){return""+c}function Ba(c){if(ky(c))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dy(c)),La(c)}var wt=w.ReactCurrentOwner,Iy={key:!0,ref:!0,__self:!0,__source:!0},Ua,za,ln;ln={};function Fy(c){if(Kt.call(c,"ref")){var h=Object.getOwnPropertyDescriptor(c,"ref").get;if(h&&h.isReactWarning)return!1}return c.ref!==void 0}function Ly(c){if(Kt.call(c,"key")){var h=Object.getOwnPropertyDescriptor(c,"key").get;if(h&&h.isReactWarning)return!1}return c.key!==void 0}function By(c,h){if(typeof c.ref=="string"&&wt.current&&h&&wt.current.stateNode!==h){var y=ee(wt.current.type);ln[y]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ee(wt.current.type),c.ref),ln[y]=!0)}}function Uy(c,h){{var y=function(){Ua||(Ua=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};y.isReactWarning=!0,Object.defineProperty(c,"key",{get:y,configurable:!0})}}function zy(c,h){{var y=function(){za||(za=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};y.isReactWarning=!0,Object.defineProperty(c,"ref",{get:y,configurable:!0})}}var Vy=function(c,h,y,O,A,$,T){var R={$$typeof:t,type:c,key:h,ref:y,props:T,_owner:$};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function Gy(c,h,y,O,A){{var $,T={},R=null,q=null;y!==void 0&&(Ba(y),R=""+y),Ly(h)&&(Ba(h.key),R=""+h.key),Fy(h)&&(q=h.ref,By(h,A));for($ in h)Kt.call(h,$)&&!Iy.hasOwnProperty($)&&(T[$]=h[$]);if(c&&c.defaultProps){var z=c.defaultProps;for($ in z)T[$]===void 0&&(T[$]=z[$])}if(R||q){var V=typeof c=="function"?c.displayName||c.name||"Unknown":c;R&&Uy(T,V),q&&zy(T,V)}return Vy(c,R,q,A,O,wt.current,T)}}var fn=w.ReactCurrentOwner,Va=w.ReactDebugCurrentFrame;function rt(c){if(c){var h=c._owner,y=Xt(c.type,c._source,h?h.type:null);Va.setExtraStackFrame(y)}else Va.setExtraStackFrame(null)}var dn;dn=!1;function pn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function Ga(){{if(fn.current){var c=ee(fn.current.type);if(c)return`
22
22
 
23
- Check the render method of \``+c+"`."}return""}}function Hy(c){{if(c!==void 0){var h=c.fileName.replace(/^.*[\\\/]/,""),y=c.lineNumber;return`
23
+ Check the render method of \``+c+"`."}return""}}function Wy(c){{if(c!==void 0){var h=c.fileName.replace(/^.*[\\\/]/,""),y=c.lineNumber;return`
24
24
 
25
- Check your code at `+h+":"+y+"."}return""}}var Ja={};function Yy(c){{var h=Ya();if(!h){var y=typeof c=="string"?c:c.displayName||c.name;y&&(h=`
25
+ Check your code at `+h+":"+y+"."}return""}}var Wa={};function Hy(c){{var h=Ga();if(!h){var y=typeof c=="string"?c:c.displayName||c.name;y&&(h=`
26
26
 
27
- Check the top-level render call using <`+y+">.")}return h}}function qa(c,h){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var y=Yy(h);if(Ja[y])return;Ja[y]=!0;var O="";c&&c._owner&&c._owner!==dn.current&&(O=" It was passed a child from "+oe(c._owner.type)+"."),ut(c),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,O),ut(null)}}function Qa(c,h){{if(typeof c!="object")return;if(ln(c))for(var y=0;y<c.length;y++){var O=c[y];hn(O)&&qa(O,h)}else if(hn(c))c._store&&(c._store.validated=!0);else if(c){var N=_(c);if(typeof N=="function"&&N!==c.entries)for(var M=N.call(c),R;!(R=M.next()).done;)hn(R.value)&&qa(R.value,h)}}}function Jy(c){{var h=c.type;if(h==null||typeof h=="string")return;var y;if(typeof h=="function")y=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===u||h.$$typeof===d))y=h.propTypes;else return;if(y){var O=oe(h);Py(y,c.props,"prop",O,c)}else if(h.PropTypes!==void 0&&!pn){pn=!0;var N=oe(h);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",N||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qy(c){{for(var h=Object.keys(c.props),y=0;y<h.length;y++){var O=h[y];if(O!=="children"&&O!=="key"){ut(c),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),ut(null);break}}c.ref!==null&&(ut(c),S("Invalid attribute `ref` supplied to `React.Fragment`."),ut(null))}}function Xa(c,h,y,O,N,M){{var R=H(c);if(!R){var x="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Q=Hy(N);Q?x+=Q:x+=Ya();var U;c===null?U="null":ln(c)?U="array":c!==void 0&&c.$$typeof===t?(U="<"+(oe(c.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):U=typeof c,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",U,x)}var z=Wy(c,h,y,N,M);if(z==null)return z;if(R){var ie=h.children;if(ie!==void 0)if(O)if(ln(ie)){for(var ct=0;ct<ie.length;ct++)Qa(ie[ct],c);Object.freeze&&Object.freeze(ie)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Qa(ie,c)}return c===n?qy(z):Jy(z),z}}function Qy(c,h,y){return Xa(c,h,y,!0)}function Xy(c,h,y){return Xa(c,h,y,!1)}var Ky=Xy,Zy=Qy;dt.Fragment=n,dt.jsx=Ky,dt.jsxs=Zy}()),dt}(function(e){({}).NODE_ENV==="production"?e.exports=ri():e.exports=ni()})(nr);const Be=nr.exports.jsx,mn=nr.exports.jsxs;var oi=Object.defineProperty,ai=(e,t,r)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E=(e,t,r)=>(ai(e,typeof t!="symbol"?t+"":t,r),r);const ii=e=>()=>{console.warn(`${e} need to be implement getComponent`)},si=["customPageRootRender"],gn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],bn=e=>[...gn,...si].reduce((t,r)=>{var n;return e!=null&&e[r]?t[r]=(n=e[r])==null?void 0:n.bind(e):gn.includes(r)&&(t[r]=ii),t},{});var ui=Object.defineProperty,ci=(e,t,r)=>t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t,r)=>(ci(e,typeof t!="symbol"?t+"":t,r),r),li=typeof global=="object"&&global&&global.Object===Object&&global;const _n=li;var fi=typeof self=="object"&&self&&self.Object===Object&&self,di=_n||fi||Function("return this")();const fe=di;var pi=fe.Symbol;const re=pi;var jn=Object.prototype,hi=jn.hasOwnProperty,vi=jn.toString,pt=re?re.toStringTag:void 0;function yi(e){var t=hi.call(e,pt),r=e[pt];try{e[pt]=void 0;var n=!0}catch{}var o=vi.call(e);return n&&(t?e[pt]=r:delete e[pt]),o}var mi=Object.prototype,gi=mi.toString;function bi(e){return gi.call(e)}var _i="[object Null]",ji="[object Undefined]",En=re?re.toStringTag:void 0;function xe(e){return e==null?e===void 0?ji:_i:En&&En in Object(e)?yi(e):bi(e)}function de(e){return e!=null&&typeof e=="object"}var Ei="[object Symbol]";function or(e){return typeof e=="symbol"||de(e)&&xe(e)==Ei}function ar(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Oi=Array.isArray;const L=Oi;var wi=1/0,On=re?re.prototype:void 0,wn=On?On.toString:void 0;function Sn(e){if(typeof e=="string")return e;if(L(e))return ar(e,Sn)+"";if(or(e))return wn?wn.call(e):"";var t=e+"";return t=="0"&&1/e==-wi?"-0":t}function se(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ir(e){return e}var Si="[object AsyncFunction]",Ci="[object Function]",xi="[object GeneratorFunction]",Ri="[object Proxy]";function sr(e){if(!se(e))return!1;var t=xe(e);return t==Ci||t==xi||t==Si||t==Ri}var Ni=fe["__core-js_shared__"];const ur=Ni;var Cn=function(){var e=/[^.]+$/.exec(ur&&ur.keys&&ur.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ai(e){return!!Cn&&Cn in e}var Ti=Function.prototype,Mi=Ti.toString;function Re(e){if(e!=null){try{return Mi.call(e)}catch{}try{return e+""}catch{}}return""}var $i=/[\\^$.*+?()[\]{}|]/g,Pi=/^\[object .+?Constructor\]$/,Di=Function.prototype,ki=Object.prototype,Ii=Di.toString,Fi=ki.hasOwnProperty,Li=RegExp("^"+Ii.call(Fi).replace($i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bi(e){if(!se(e)||Ai(e))return!1;var t=sr(e)?Li:Pi;return t.test(Re(e))}function Ui(e,t){return e==null?void 0:e[t]}function Ne(e,t){var r=Ui(e,t);return Bi(r)?r:void 0}var zi=Ne(fe,"WeakMap");const cr=zi;var xn=Object.create,Vi=function(){function e(){}return function(t){if(!se(t))return{};if(xn)return xn(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Gi=Vi;function Wi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Hi(){}function Rn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Yi=800,Ji=16,qi=Date.now;function Qi(e){var t=0,r=0;return function(){var n=qi(),o=Ji-(n-r);if(r=n,o>0){if(++t>=Yi)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Xi(e){return function(){return e}}var Ki=function(){try{var e=Ne(Object,"defineProperty");return e({},"",{}),e}catch{}}();const $t=Ki;var Zi=$t?function(e,t){return $t(e,"toString",{configurable:!0,enumerable:!1,value:Xi(t),writable:!0})}:ir,es=Qi(Zi);const Nn=es;function ts(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function rs(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function ns(e){return e!==e}function os(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function as(e,t,r){return t===t?os(e,t,r):rs(e,ns,r)}function is(e,t){var r=e==null?0:e.length;return!!r&&as(e,t,0)>-1}var ss=9007199254740991,us=/^(?:0|[1-9]\d*)$/;function Pt(e,t){var r=typeof e;return t=t==null?ss:t,!!t&&(r=="number"||r!="symbol"&&us.test(e))&&e>-1&&e%1==0&&e<t}function lr(e,t,r){t=="__proto__"&&$t?$t(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ht(e,t){return e===t||e!==e&&t!==t}var cs=Object.prototype,ls=cs.hasOwnProperty;function fr(e,t,r){var n=e[t];(!(ls.call(e,t)&&ht(n,r))||r===void 0&&!(t in e))&&lr(e,t,r)}function Ue(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var i=t[a],u=n?n(r[i],e[i],i,r,e):void 0;u===void 0&&(u=e[i]),o?lr(r,i,u):fr(r,i,u)}return r}var An=Math.max;function Tn(e,t,r){return t=An(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=An(n.length-t,0),s=Array(a);++o<a;)s[o]=n[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=n[o];return i[t]=r(s),Wi(e,this,i)}}function Mn(e,t){return Nn(Tn(e,t,ir),e+"")}var fs=9007199254740991;function dr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fs}function Dt(e){return e!=null&&dr(e.length)&&!sr(e)}function ds(e,t,r){if(!se(r))return!1;var n=typeof t;return(n=="number"?Dt(r)&&Pt(t,r.length):n=="string"&&t in r)?ht(r[t],e):!1}function ps(e){return Mn(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,s&&ds(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var i=r[n];i&&e(t,i,n,a)}return t})}var hs=Object.prototype;function pr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||hs;return e===r}function vs(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ys="[object Arguments]";function $n(e){return de(e)&&xe(e)==ys}var Pn=Object.prototype,ms=Pn.hasOwnProperty,gs=Pn.propertyIsEnumerable,bs=$n(function(){return arguments}())?$n:function(e){return de(e)&&ms.call(e,"callee")&&!gs.call(e,"callee")};const vt=bs;function _s(){return!1}var Dn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kn=Dn&&typeof module=="object"&&module&&!module.nodeType&&module,js=kn&&kn.exports===Dn,In=js?fe.Buffer:void 0,Es=In?In.isBuffer:void 0,Os=Es||_s;const yt=Os;var ws="[object Arguments]",Ss="[object Array]",Cs="[object Boolean]",xs="[object Date]",Rs="[object Error]",Ns="[object Function]",As="[object Map]",Ts="[object Number]",Ms="[object Object]",$s="[object RegExp]",Ps="[object Set]",Ds="[object String]",ks="[object WeakMap]",Is="[object ArrayBuffer]",Fs="[object DataView]",Ls="[object Float32Array]",Bs="[object Float64Array]",Us="[object Int8Array]",zs="[object Int16Array]",Vs="[object Int32Array]",Gs="[object Uint8Array]",Ws="[object Uint8ClampedArray]",Hs="[object Uint16Array]",Ys="[object Uint32Array]",D={};D[Ls]=D[Bs]=D[Us]=D[zs]=D[Vs]=D[Gs]=D[Ws]=D[Hs]=D[Ys]=!0,D[ws]=D[Ss]=D[Is]=D[Cs]=D[Fs]=D[xs]=D[Rs]=D[Ns]=D[As]=D[Ts]=D[Ms]=D[$s]=D[Ps]=D[Ds]=D[ks]=!1;function Js(e){return de(e)&&dr(e.length)&&!!D[xe(e)]}function hr(e){return function(t){return e(t)}}var Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mt=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,qs=mt&&mt.exports===Fn,vr=qs&&_n.process,Qs=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||vr&&vr.binding&&vr.binding("util")}catch{}}();const ze=Qs;var Ln=ze&&ze.isTypedArray,Xs=Ln?hr(Ln):Js;const yr=Xs;var Ks=Object.prototype,Zs=Ks.hasOwnProperty;function Bn(e,t){var r=L(e),n=!r&&vt(e),o=!r&&!n&&yt(e),a=!r&&!n&&!o&&yr(e),s=r||n||o||a,i=s?vs(e.length,String):[],u=i.length;for(var l in e)(t||Zs.call(e,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Pt(l,u)))&&i.push(l);return i}function Un(e,t){return function(r){return e(t(r))}}var eu=Un(Object.keys,Object);const tu=eu;var ru=Object.prototype,nu=ru.hasOwnProperty;function ou(e){if(!pr(e))return tu(e);var t=[];for(var r in Object(e))nu.call(e,r)&&r!="constructor"&&t.push(r);return t}function kt(e){return Dt(e)?Bn(e):ou(e)}function au(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var iu=Object.prototype,su=iu.hasOwnProperty;function uu(e){if(!se(e))return au(e);var t=pr(e),r=[];for(var n in e)n=="constructor"&&(t||!su.call(e,n))||r.push(n);return r}function gt(e){return Dt(e)?Bn(e,!0):uu(e)}var cu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lu=/^\w*$/;function mr(e,t){if(L(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||or(e)?!0:lu.test(e)||!cu.test(e)||t!=null&&e in Object(t)}var fu=Ne(Object,"create");const bt=fu;function du(){this.__data__=bt?bt(null):{},this.size=0}function pu(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hu="__lodash_hash_undefined__",vu=Object.prototype,yu=vu.hasOwnProperty;function mu(e){var t=this.__data__;if(bt){var r=t[e];return r===hu?void 0:r}return yu.call(t,e)?t[e]:void 0}var gu=Object.prototype,bu=gu.hasOwnProperty;function _u(e){var t=this.__data__;return bt?t[e]!==void 0:bu.call(t,e)}var ju="__lodash_hash_undefined__";function Eu(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bt&&t===void 0?ju:t,this}function Ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ae.prototype.clear=du,Ae.prototype.delete=pu,Ae.prototype.get=mu,Ae.prototype.has=_u,Ae.prototype.set=Eu;function Ou(){this.__data__=[],this.size=0}function It(e,t){for(var r=e.length;r--;)if(ht(e[r][0],t))return r;return-1}var wu=Array.prototype,Su=wu.splice;function Cu(e){var t=this.__data__,r=It(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Su.call(t,r,1),--this.size,!0}function xu(e){var t=this.__data__,r=It(t,e);return r<0?void 0:t[r][1]}function Ru(e){return It(this.__data__,e)>-1}function Nu(e,t){var r=this.__data__,n=It(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ye.prototype.clear=Ou,ye.prototype.delete=Cu,ye.prototype.get=xu,ye.prototype.has=Ru,ye.prototype.set=Nu;var Au=Ne(fe,"Map");const _t=Au;function Tu(){this.size=0,this.__data__={hash:new Ae,map:new(_t||ye),string:new Ae}}function Mu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ft(e,t){var r=e.__data__;return Mu(t)?r[typeof t=="string"?"string":"hash"]:r.map}function $u(e){var t=Ft(this,e).delete(e);return this.size-=t?1:0,t}function Pu(e){return Ft(this,e).get(e)}function Du(e){return Ft(this,e).has(e)}function ku(e,t){var r=Ft(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}me.prototype.clear=Tu,me.prototype.delete=$u,me.prototype.get=Pu,me.prototype.has=Du,me.prototype.set=ku;var Iu="Expected a function";function gr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Iu);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var s=e.apply(this,n);return r.cache=a.set(o,s)||a,s};return r.cache=new(gr.Cache||me),r}gr.Cache=me;var Fu=500;function Lu(e){var t=gr(e,function(n){return r.size===Fu&&r.clear(),n}),r=t.cache;return t}var Bu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uu=/\\(\\)?/g,zu=Lu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Bu,function(r,n,o,a){t.push(o?a.replace(Uu,"$1"):n||r)}),t});const Vu=zu;function Gu(e){return e==null?"":Sn(e)}function Ve(e,t){return L(e)?e:mr(e,t)?[e]:Vu(Gu(e))}var Wu=1/0;function Ge(e){if(typeof e=="string"||or(e))return e;var t=e+"";return t=="0"&&1/e==-Wu?"-0":t}function Lt(e,t){t=Ve(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Ge(t[r++])];return r&&r==n?e:void 0}function zn(e,t,r){var n=e==null?void 0:Lt(e,t);return n===void 0?r:n}function br(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Vn=re?re.isConcatSpreadable:void 0;function Hu(e){return L(e)||vt(e)||!!(Vn&&e&&e[Vn])}function _r(e,t,r,n,o){var a=-1,s=e.length;for(r||(r=Hu),o||(o=[]);++a<s;){var i=e[a];t>0&&r(i)?t>1?_r(i,t-1,r,n,o):br(o,i):n||(o[o.length]=i)}return o}function Yu(e){var t=e==null?0:e.length;return t?_r(e,1):[]}function Ju(e){return Nn(Tn(e,void 0,Yu),e+"")}var qu=Un(Object.getPrototypeOf,Object);const jr=qu;var Qu="[object Object]",Xu=Function.prototype,Ku=Object.prototype,Gn=Xu.toString,Zu=Ku.hasOwnProperty,ec=Gn.call(Object);function X(e){if(!de(e)||xe(e)!=Qu)return!1;var t=jr(e);if(t===null)return!0;var r=Zu.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Gn.call(r)==ec}function tc(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function rc(){this.__data__=new ye,this.size=0}function nc(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function oc(e){return this.__data__.get(e)}function ac(e){return this.__data__.has(e)}var ic=200;function sc(e,t){var r=this.__data__;if(r instanceof ye){var n=r.__data__;if(!_t||n.length<ic-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new me(n)}return r.set(e,t),this.size=r.size,this}function ue(e){var t=this.__data__=new ye(e);this.size=t.size}ue.prototype.clear=rc,ue.prototype.delete=nc,ue.prototype.get=oc,ue.prototype.has=ac,ue.prototype.set=sc;function uc(e,t){return e&&Ue(t,kt(t),e)}function cc(e,t){return e&&Ue(t,gt(t),e)}var Wn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hn=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,lc=Hn&&Hn.exports===Wn,Yn=lc?fe.Buffer:void 0,Jn=Yn?Yn.allocUnsafe:void 0;function qn(e,t){if(t)return e.slice();var r=e.length,n=Jn?Jn(r):new e.constructor(r);return e.copy(n),n}function fc(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[o++]=s)}return a}function Qn(){return[]}var dc=Object.prototype,pc=dc.propertyIsEnumerable,Xn=Object.getOwnPropertySymbols,hc=Xn?function(e){return e==null?[]:(e=Object(e),fc(Xn(e),function(t){return pc.call(e,t)}))}:Qn;const Er=hc;function vc(e,t){return Ue(e,Er(e),t)}var yc=Object.getOwnPropertySymbols,mc=yc?function(e){for(var t=[];e;)br(t,Er(e)),e=jr(e);return t}:Qn;const Kn=mc;function gc(e,t){return Ue(e,Kn(e),t)}function Zn(e,t,r){var n=t(e);return L(e)?n:br(n,r(e))}function Or(e){return Zn(e,kt,Er)}function wr(e){return Zn(e,gt,Kn)}var bc=Ne(fe,"DataView");const Sr=bc;var _c=Ne(fe,"Promise");const Cr=_c;var jc=Ne(fe,"Set");const We=jc;var eo="[object Map]",Ec="[object Object]",to="[object Promise]",ro="[object Set]",no="[object WeakMap]",oo="[object DataView]",Oc=Re(Sr),wc=Re(_t),Sc=Re(Cr),Cc=Re(We),xc=Re(cr),Te=xe;(Sr&&Te(new Sr(new ArrayBuffer(1)))!=oo||_t&&Te(new _t)!=eo||Cr&&Te(Cr.resolve())!=to||We&&Te(new We)!=ro||cr&&Te(new cr)!=no)&&(Te=function(e){var t=xe(e),r=t==Ec?e.constructor:void 0,n=r?Re(r):"";if(n)switch(n){case Oc:return oo;case wc:return eo;case Sc:return to;case Cc:return ro;case xc:return no}return t});const jt=Te;var Rc=Object.prototype,Nc=Rc.hasOwnProperty;function Ac(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Nc.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Tc=fe.Uint8Array;const Bt=Tc;function xr(e){var t=new e.constructor(e.byteLength);return new Bt(t).set(new Bt(e)),t}function Mc(e,t){var r=t?xr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var $c=/\w*$/;function Pc(e){var t=new e.constructor(e.source,$c.exec(e));return t.lastIndex=e.lastIndex,t}var ao=re?re.prototype:void 0,io=ao?ao.valueOf:void 0;function Dc(e){return io?Object(io.call(e)):{}}function so(e,t){var r=t?xr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var kc="[object Boolean]",Ic="[object Date]",Fc="[object Map]",Lc="[object Number]",Bc="[object RegExp]",Uc="[object Set]",zc="[object String]",Vc="[object Symbol]",Gc="[object ArrayBuffer]",Wc="[object DataView]",Hc="[object Float32Array]",Yc="[object Float64Array]",Jc="[object Int8Array]",qc="[object Int16Array]",Qc="[object Int32Array]",Xc="[object Uint8Array]",Kc="[object Uint8ClampedArray]",Zc="[object Uint16Array]",el="[object Uint32Array]";function tl(e,t,r){var n=e.constructor;switch(t){case Gc:return xr(e);case kc:case Ic:return new n(+e);case Wc:return Mc(e,r);case Hc:case Yc:case Jc:case qc:case Qc:case Xc:case Kc:case Zc:case el:return so(e,r);case Fc:return new n;case Lc:case zc:return new n(e);case Bc:return Pc(e);case Uc:return new n;case Vc:return Dc(e)}}function uo(e){return typeof e.constructor=="function"&&!pr(e)?Gi(jr(e)):{}}var rl="[object Map]";function nl(e){return de(e)&&jt(e)==rl}var co=ze&&ze.isMap,ol=co?hr(co):nl;const al=ol;var il="[object Set]";function sl(e){return de(e)&&jt(e)==il}var lo=ze&&ze.isSet,ul=lo?hr(lo):sl;const cl=ul;var ll=1,fl=2,dl=4,fo="[object Arguments]",pl="[object Array]",hl="[object Boolean]",vl="[object Date]",yl="[object Error]",po="[object Function]",ml="[object GeneratorFunction]",gl="[object Map]",bl="[object Number]",ho="[object Object]",_l="[object RegExp]",jl="[object Set]",El="[object String]",Ol="[object Symbol]",wl="[object WeakMap]",Sl="[object ArrayBuffer]",Cl="[object DataView]",xl="[object Float32Array]",Rl="[object Float64Array]",Nl="[object Int8Array]",Al="[object Int16Array]",Tl="[object Int32Array]",Ml="[object Uint8Array]",$l="[object Uint8ClampedArray]",Pl="[object Uint16Array]",Dl="[object Uint32Array]",$={};$[fo]=$[pl]=$[Sl]=$[Cl]=$[hl]=$[vl]=$[xl]=$[Rl]=$[Nl]=$[Al]=$[Tl]=$[gl]=$[bl]=$[ho]=$[_l]=$[jl]=$[El]=$[Ol]=$[Ml]=$[$l]=$[Pl]=$[Dl]=!0,$[yl]=$[po]=$[wl]=!1;function Et(e,t,r,n,o,a){var s,i=t&ll,u=t&fl,l=t&dl;if(r&&(s=o?r(e,n,o,a):r(e)),s!==void 0)return s;if(!se(e))return e;var f=L(e);if(f){if(s=Ac(e),!i)return Rn(e,s)}else{var d=jt(e),p=d==po||d==ml;if(yt(e))return qn(e,i);if(d==ho||d==fo||p&&!o){if(s=u||p?{}:uo(e),!i)return u?gc(e,cc(s,e)):vc(e,uc(s,e))}else{if(!$[d])return o?e:{};s=tl(e,d,i)}}a||(a=new ue);var v=a.get(e);if(v)return v;a.set(e,s),cl(e)?e.forEach(function(_){s.add(Et(_,t,r,_,e,a))}):al(e)&&e.forEach(function(_,w){s.set(w,Et(_,t,r,w,e,a))});var g=l?u?wr:Or:u?gt:kt,j=f?void 0:g(e);return ts(j||e,function(_,w){j&&(w=_,_=e[w]),fr(s,w,Et(_,t,r,w,e,a))}),s}var kl=1,Il=4;function vo(e){return Et(e,kl|Il)}var Fl="__lodash_hash_undefined__";function Ll(e){return this.__data__.set(e,Fl),this}function Bl(e){return this.__data__.has(e)}function Ot(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new me;++t<r;)this.add(e[t])}Ot.prototype.add=Ot.prototype.push=Ll,Ot.prototype.has=Bl;function Ul(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function yo(e,t){return e.has(t)}var zl=1,Vl=2;function mo(e,t,r,n,o,a){var s=r&zl,i=e.length,u=t.length;if(i!=u&&!(s&&u>i))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,v=r&Vl?new Ot:void 0;for(a.set(e,t),a.set(t,e);++d<i;){var g=e[d],j=t[d];if(n)var _=s?n(j,g,d,t,e,a):n(g,j,d,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(v){if(!Ul(t,function(w,S){if(!yo(v,S)&&(g===w||o(g,w,r,n,a)))return v.push(S)})){p=!1;break}}else if(!(g===j||o(g,j,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Gl(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Rr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Wl=1,Hl=2,Yl="[object Boolean]",Jl="[object Date]",ql="[object Error]",Ql="[object Map]",Xl="[object Number]",Kl="[object RegExp]",Zl="[object Set]",ef="[object String]",tf="[object Symbol]",rf="[object ArrayBuffer]",nf="[object DataView]",go=re?re.prototype:void 0,Nr=go?go.valueOf:void 0;function of(e,t,r,n,o,a,s){switch(r){case nf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rf:return!(e.byteLength!=t.byteLength||!a(new Bt(e),new Bt(t)));case Yl:case Jl:case Xl:return ht(+e,+t);case ql:return e.name==t.name&&e.message==t.message;case Kl:case ef:return e==t+"";case Ql:var i=Gl;case Zl:var u=n&Wl;if(i||(i=Rr),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;n|=Hl,s.set(e,t);var f=mo(i(e),i(t),n,o,a,s);return s.delete(e),f;case tf:if(Nr)return Nr.call(e)==Nr.call(t)}return!1}var af=1,sf=Object.prototype,uf=sf.hasOwnProperty;function cf(e,t,r,n,o,a){var s=r&af,i=Or(e),u=i.length,l=Or(t),f=l.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=i[d];if(!(s?p in t:uf.call(t,p)))return!1}var v=a.get(e),g=a.get(t);if(v&&g)return v==t&&g==e;var j=!0;a.set(e,t),a.set(t,e);for(var _=s;++d<u;){p=i[d];var w=e[p],S=t[p];if(n)var G=s?n(S,w,p,t,e,a):n(w,S,p,e,t,a);if(!(G===void 0?w===S||o(w,S,r,n,a):G)){j=!1;break}_||(_=p=="constructor")}if(j&&!_){var I=e.constructor,W=t.constructor;I!=W&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof W=="function"&&W instanceof W)&&(j=!1)}return a.delete(e),a.delete(t),j}var lf=1,bo="[object Arguments]",_o="[object Array]",Ut="[object Object]",ff=Object.prototype,jo=ff.hasOwnProperty;function df(e,t,r,n,o,a){var s=L(e),i=L(t),u=s?_o:jt(e),l=i?_o:jt(t);u=u==bo?Ut:u,l=l==bo?Ut:l;var f=u==Ut,d=l==Ut,p=u==l;if(p&&yt(e)){if(!yt(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new ue),s||yr(e)?mo(e,t,r,n,o,a):of(e,t,u,r,n,o,a);if(!(r&lf)){var v=f&&jo.call(e,"__wrapped__"),g=d&&jo.call(t,"__wrapped__");if(v||g){var j=v?e.value():e,_=g?t.value():t;return a||(a=new ue),o(j,_,r,n,a)}}return p?(a||(a=new ue),cf(e,t,r,n,o,a)):!1}function Ar(e,t,r,n,o){return e===t?!0:e==null||t==null||!de(e)&&!de(t)?e!==e&&t!==t:df(e,t,r,n,Ar,o)}var pf=1,hf=2;function vf(e,t,r,n){var o=r.length,a=o,s=!n;if(e==null)return!a;for(e=Object(e);o--;){var i=r[o];if(s&&i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++o<a;){i=r[o];var u=i[0],l=e[u],f=i[1];if(s&&i[2]){if(l===void 0&&!(u in e))return!1}else{var d=new ue;if(n)var p=n(l,f,u,e,t,d);if(!(p===void 0?Ar(f,l,pf|hf,n,d):p))return!1}}return!0}function Eo(e){return e===e&&!se(e)}function yf(e){for(var t=kt(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Eo(o)]}return t}function Oo(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function mf(e){var t=yf(e);return t.length==1&&t[0][2]?Oo(t[0][0],t[0][1]):function(r){return r===e||vf(r,e,t)}}function gf(e,t){return e!=null&&t in Object(e)}function bf(e,t,r){t=Ve(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var s=Ge(t[n]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&dr(o)&&Pt(s,o)&&(L(e)||vt(e)))}function _f(e,t){return e!=null&&bf(e,t,gf)}var jf=1,Ef=2;function Of(e,t){return mr(e)&&Eo(t)?Oo(Ge(e),t):function(r){var n=zn(r,e);return n===void 0&&n===t?_f(r,e):Ar(t,n,jf|Ef)}}function wf(e){return function(t){return t==null?void 0:t[e]}}function Sf(e){return function(t){return Lt(t,e)}}function Cf(e){return mr(e)?wf(Ge(e)):Sf(e)}function Tr(e){return typeof e=="function"?e:e==null?ir:typeof e=="object"?L(e)?Of(e[0],e[1]):mf(e):Cf(e)}function xf(e){return function(t,r,n){for(var o=-1,a=Object(t),s=n(t),i=s.length;i--;){var u=s[e?i:++o];if(r(a[u],u,a)===!1)break}return t}}var Rf=xf();const Nf=Rf;function Mr(e,t,r){(r!==void 0&&!ht(e[t],r)||r===void 0&&!(t in e))&&lr(e,t,r)}function $r(e){return de(e)&&Dt(e)}function Pr(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Af(e){return Ue(e,gt(e))}function Tf(e,t,r,n,o,a,s){var i=Pr(e,r),u=Pr(t,r),l=s.get(u);if(l){Mr(e,r,l);return}var f=a?a(i,u,r+"",e,t,s):void 0,d=f===void 0;if(d){var p=L(u),v=!p&&yt(u),g=!p&&!v&&yr(u);f=u,p||v||g?L(i)?f=i:$r(i)?f=Rn(i):v?(d=!1,f=qn(u,!0)):g?(d=!1,f=so(u,!0)):f=[]:X(u)||vt(u)?(f=i,vt(i)?f=Af(i):(!se(i)||sr(i))&&(f=uo(u))):d=!1}d&&(s.set(u,f),o(f,u,n,a,s),s.delete(u)),Mr(e,r,f)}function wo(e,t,r,n,o){e!==t&&Nf(t,function(a,s){if(o||(o=new ue),se(a))Tf(e,t,s,r,wo,n,o);else{var i=n?n(Pr(e,s),a,s+"",e,t,o):void 0;i===void 0&&(i=a),Mr(e,s,i)}},gt)}function Mf(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function So(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function $f(e,t){return t.length<2?e:Lt(e,tc(t,0,-1))}var Pf=ps(function(e,t,r){wo(e,t,r)});const Co=Pf;var Df="Expected a function";function kf(e){if(typeof e!="function")throw new TypeError(Df);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function If(e,t){return t=Ve(t,e),e=$f(e,t),e==null||delete e[Ge(So(t))]}function Ff(e){return X(e)?void 0:e}var Lf=1,Bf=2,Uf=4,zf=Ju(function(e,t){var r={};if(e==null)return r;var n=!1;t=ar(t,function(a){return a=Ve(a,e),n||(n=a.length>1),a}),Ue(e,wr(e),r),n&&(r=Et(r,Lf|Bf|Uf,Ff));for(var o=t.length;o--;)If(r,t[o]);return r});const xo=zf;function Vf(e,t,r,n){if(!se(e))return e;t=Ve(t,e);for(var o=-1,a=t.length,s=a-1,i=e;i!=null&&++o<a;){var u=Ge(t[o]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=s){var f=i[u];l=n?n(f,u,i):void 0,l===void 0&&(l=se(f)?f:Pt(t[o+1])?[]:{})}fr(i,u,l),i=i[u]}return e}function Gf(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var s=t[n],i=Lt(e,s);r(i,s)&&Vf(a,Ve(s,e),i)}return a}function Wf(e,t){if(e==null)return{};var r=ar(wr(e),function(n){return[n]});return t=Tr(t),Gf(e,r,function(n,o){return t(n,o[0])})}function Hf(e,t){return Wf(e,kf(Tr(t)))}var Yf=1/0,Jf=We&&1/Rr(new We([,-0]))[1]==Yf?function(e){return new We(e)}:Hi;const qf=Jf;var Qf=200;function Xf(e,t,r){var n=-1,o=is,a=e.length,s=!0,i=[],u=i;if(r)s=!1,o=Mf;else if(a>=Qf){var l=t?null:qf(e);if(l)return Rr(l);s=!1,o=yo,u=new Ot}else u=t?[]:i;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,s&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;t&&u.push(d),i.push(f)}else o(u,d,r)||(u!==i&&u.push(d),i.push(f))}return i}var Kf=Mn(function(e){var t=So(e);return $r(t)&&(t=void 0),Xf(_r(e,1,$r,!0),Tr(t))});const Zf=Kf;class Ro extends TypeError{constructor(t,r){let n;const{message:o,...a}=t,{path:s}=t,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!=null?n:n=[t,...r()]}}function ed(e){return ce(e)&&typeof e[Symbol.iterator]=="function"}function ce(e){return typeof e=="object"&&e!=null}function ee(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function td(e){const{done:t,value:r}=e.next();return t?void 0:r}function rd(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:s}=r,{refinement:i,message:u=`Expected a value of type \`${s}\`${i?` with refinement \`${i}\``:""}, but received: \`${ee(n)}\``}=e;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...e,message:u}}function*No(e,t,r,n){ed(e)||(e=[e]);for(const o of e){const a=rd(o,t,r,n);a&&(yield a)}}function*Dr(e,t,r){r===void 0&&(r={});const{path:n=[],branch:o=[e],coerce:a=!1,mask:s=!1}=r,i={path:n,branch:o};if(a&&(e=t.coercer(e,i),s&&t.type!=="type"&&ce(t.schema)&&ce(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let u="valid";for(const l of t.validator(e,i))u="not_valid",yield[l,void 0];for(let[l,f,d]of t.entries(e,i)){const p=Dr(f,d,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:s});for(const v of p)v[0]?(u=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?e=f:e instanceof Map?e.set(l,f):e instanceof Set?e.add(f):ce(e)&&(f!==void 0||l in e)&&(e[l]=f))}if(u!=="not_valid")for(const l of t.refiner(e,i))u="not_refined",yield[l,void 0];u==="valid"&&(yield[void 0,e])}class pe{constructor(t){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=u=>u,entries:i=function*(){}}=t;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(u,l)=>{const f=o(u,l);return No(f,l,this,u)}:this.validator=()=>[],a?this.refiner=(u,l)=>{const f=a(u,l);return No(f,l,this,u)}:this.refiner=()=>[]}assert(t){return Ao(t,this)}create(t){return nd(t,this)}is(t){return ad(t,this)}mask(t){return od(t,this)}validate(t,r){return r===void 0&&(r={}),He(t,this,r)}}function Ao(e,t){const r=He(e,t);if(r[0])throw r[0]}function nd(e,t){const r=He(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function od(e,t){const r=He(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function ad(e,t){return!He(e,t)[0]}function He(e,t,r){r===void 0&&(r={});const n=Dr(e,t,r),o=td(n);return o[0]?[new Ro(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function kr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=t[0].type==="type",o=t.map(s=>s.schema),a=Object.assign({},...o);return n?Po(a):A(a)}function Oe(e,t){return new pe({type:e,schema:null,validator:t})}function Ye(e){return new pe({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function To(e,t){const{schema:r}=e,n={...r};for(const o of t)delete n[o];switch(e.type){case"type":return Po(n);default:return A(n)}}function V(){return Oe("any",()=>!0)}function B(e){return new pe({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ee(t)}`}})}function ge(){return Oe("boolean",e=>typeof e=="boolean")}function Ir(e){const t={},r=e.map(n=>ee(n)).join();for(const n of e)t[n]=n;return new pe({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${ee(n)}`}})}function Mo(){return Oe("func",e=>typeof e=="function"||`Expected a function, but received: ${ee(e)}`)}function K(e){const t=ee(e),r=typeof e;return new pe({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${ee(n)}`}})}function id(){return Oe("never",()=>!1)}function $o(){return Oe("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ee(e)}`)}function A(e){const t=e?Object.keys(e):[],r=id();return new pe({type:"object",schema:e||null,*entries(n){if(e&&ce(n)){const o=new Set(Object.keys(n));for(const a of t)o.delete(a),yield[a,n[a],e[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return ce(n)||`Expected an object, but received: ${ee(n)}`},coercer(n){return ce(n)?{...n}:n}})}function b(e){return new pe({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function wt(e,t){return new pe({type:"record",schema:null,*entries(r){if(ce(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator(r){return ce(r)||`Expected an object, but received: ${ee(r)}`}})}function m(){return Oe("string",e=>typeof e=="string"||`Expected a string, but received: ${ee(e)}`)}function Po(e){const t=Object.keys(e);return new pe({type:"type",schema:e,*entries(r){if(ce(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return ce(r)||`Expected an object, but received: ${ee(r)}`}})}function Y(e){const t=e.map(r=>r.type).join(" | ");return new pe({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||sd()).coercer(r,n)},validator(r,n){const o=[];for(const a of e){const[...s]=Dr(r,a,n),[i]=s;if(i[0])for(const[u]of s)u&&o.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ee(r)}`,...o]}})}function sd(){return Oe("unknown",()=>!0)}const Fr=A({package:m(),version:m(),exportName:m(),destructuring:b(ge()),subName:b(m()),main:b(m())}),ud=B(Fr),cd=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var ne=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(ne||{}),Lr=(e=>(e.DESIGN="design",e.SAVE="save",e))(Lr||{}),Br=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(Br||{});const ld=()=>Oe("normalObj",e=>!X(e)||[ne.SLOT,ne.EXPRESSION,ne.FUNCTION].includes(e==null?void 0:e.type)?!1:(He(e,wt(m(),Ur)),!0)),Ur=Y([m(),$o(),ge(),A({type:K(ne.SLOT),renderType:Ir([Br.FUNC,Br.COMP]),params:b(B(m())),value:Ye(()=>Y([Je,B(Je)]))}),A({type:K(ne.EXPRESSION),value:m()}),A({type:K(ne.FUNCTION),value:m()}),ld(),B(Ye(()=>Ur))]),Do=A({type:K(ne.EXPRESSION),value:m()}),Je=A({id:b(m()),title:b(m()),componentName:m(),props:b(wt(m(),Ur)),stateName:b(m()),state:b(wt(m(),V())),children:Ye(()=>b(B(Y([m(),Je])))),configure:b(V()),css:b(V()),style:b(V()),classNames:b(B(V())),refId:b(m()),extra:b(wt(V(),V())),condition:b(Y([ge(),Do])),tempDevConfig:b(V()),loop:b(A({open:ge(),data:Y([B(V()),Do]),args:b(B(m())),forName:b(m()),forIndex:b(m()),key:b(V()),name:b(m())}))}),zt=Y([m(),A({label:m(),tip:b(m())})]),fd=A({type:K("shape"),value:B(A({name:m(),title:zt,valueType:Ye(()=>Vt)}))}),dd=A({type:K("enums"),value:B(m())});A({type:K("array"),value:Ye(()=>Vt)});const pd=A({type:K("array"),value:Ye(()=>B(Vt))}),Vt=Y([Ir(["array","boolean","number","object","string"]),Ir(["component","expression","function"]),fd,dd,pd]),hd=Y([m(),A({componentName:m(),props:b(V()),initialValue:b(V()),component:b(V())})]),zr=A({name:m(),title:zt,valueType:Vt,description:b(m()),defaultValue:V(),setters:b(B(hd)),condition:b(Mo())}),vd=Y([m(),Mo()]);var Vr=(e=>(e.SINGLE="single",e.GROUP="group",e))(Vr||{});Y([m(),A({name:m(),describe:b(m()),params:b(A({name:m(),description:m()})),template:m()})]);const yd=A({id:b(m()),title:m(),snapshot:Y([m(),V()]),snapshotText:b(m()),description:b(m()),tags:b(B(m())),groupName:b(m()),category:b(m()),schema:kr(To(Je,["id"]),A({componentName:b(m())}))}),md=A({componentName:m(),title:m(),screenshot:b(m()),icon:b(m()),tags:b(B(m())),groupName:b(m()),category:b(m()),priority:b($o()),npm:b(Fr),snippets:B(yd),props:B(Y([zr,A({title:b(zt),type:K("single"),content:zr}),A({title:b(zt),type:K("group"),content:B(zr)})])),fixedProps:b(V()),isContainer:b(Y([ge(),A({placeholder:m(),width:m(),height:m()})])),isModal:b(Y([ge(),A({visibleKey:m()})])),isSupportStyle:b(ge()),isSupportDispatchNativeEvent:b(ge()),isLayout:b(ge()),rootSelector:b(m()),selectionToolBars:b(B(vd)),extra:b(wt(V(),V()))}),gd=e=>({data:t,message:r,throwError:n})=>{const o=e({data:t,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
27
+ Check the top-level render call using <`+y+">.")}return h}}function Ha(c,h){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var y=Hy(h);if(Wa[y])return;Wa[y]=!0;var O="";c&&c._owner&&c._owner!==fn.current&&(O=" It was passed a child from "+ee(c._owner.type)+"."),rt(c),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,O),rt(null)}}function Ya(c,h){{if(typeof c!="object")return;if(un(c))for(var y=0;y<c.length;y++){var O=c[y];pn(O)&&Ha(O,h)}else if(pn(c))c._store&&(c._store.validated=!0);else if(c){var A=E(c);if(typeof A=="function"&&A!==c.entries)for(var $=A.call(c),T;!(T=$.next()).done;)pn(T.value)&&Ha(T.value,h)}}}function Yy(c){{var h=c.type;if(h==null||typeof h=="string")return;var y;if(typeof h=="function")y=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===u||h.$$typeof===d))y=h.propTypes;else return;if(y){var O=ee(h);$y(y,c.props,"prop",O,c)}else if(h.PropTypes!==void 0&&!dn){dn=!0;var A=ee(h);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Jy(c){{for(var h=Object.keys(c.props),y=0;y<h.length;y++){var O=h[y];if(O!=="children"&&O!=="key"){rt(c),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),rt(null);break}}c.ref!==null&&(rt(c),S("Invalid attribute `ref` supplied to `React.Fragment`."),rt(null))}}function Ja(c,h,y,O,A,$){{var T=le(c);if(!T){var R="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var q=Wy(A);q?R+=q:R+=Ga();var z;c===null?z="null":un(c)?z="array":c!==void 0&&c.$$typeof===t?(z="<"+(ee(c.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):z=typeof c,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,R)}var V=Gy(c,h,y,A,$);if(V==null)return V;if(T){var ie=h.children;if(ie!==void 0)if(O)if(un(ie)){for(var nt=0;nt<ie.length;nt++)Ya(ie[nt],c);Object.freeze&&Object.freeze(ie)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ya(ie,c)}return c===n?Jy(V):Yy(V),V}}function qy(c,h,y){return Ja(c,h,y,!0)}function Qy(c,h,y){return Ja(c,h,y,!1)}var Xy=Qy,Ky=qy;it.Fragment=n,it.jsx=Xy,it.jsxs=Ky}()),it}(function(e){({}).NODE_ENV==="production"?e.exports=Za():e.exports=ei()})(Ka);const Pe=xt.jsx,yn=xt.jsxs;var ti=Object.defineProperty,ri=(e,t,r)=>t in e?ti(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t,r)=>(ri(e,typeof t!="symbol"?t+"":t,r),r);const ni=e=>()=>{console.warn(`${e} need to be implement getComponent`)},oi=["customPageRootRender"],mn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],gn=e=>[...mn,...oi].reduce((t,r)=>{var n;return e!=null&&e[r]?t[r]=(n=e[r])==null?void 0:n.bind(e):mn.includes(r)&&(t[r]=ni),t},{});var ai=Object.defineProperty,ii=(e,t,r)=>t in e?ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t,r)=>(ii(e,typeof t!="symbol"?t+"":t,r),r),si=typeof global=="object"&&global&&global.Object===Object&&global;const bn=si;var ci=typeof self=="object"&&self&&self.Object===Object&&self,ui=bn||ci||Function("return this")();const fe=ui;var li=fe.Symbol;const ne=li;var _n=Object.prototype,fi=_n.hasOwnProperty,di=_n.toString,st=ne?ne.toStringTag:void 0;function pi(e){var t=fi.call(e,st),r=e[st];try{e[st]=void 0;var n=!0}catch{}var o=di.call(e);return n&&(t?e[st]=r:delete e[st]),o}var hi=Object.prototype,vi=hi.toString;function yi(e){return vi.call(e)}var mi="[object Null]",gi="[object Undefined]",jn=ne?ne.toStringTag:void 0;function Se(e){return e==null?e===void 0?gi:mi:jn&&jn in Object(e)?pi(e):yi(e)}function de(e){return e!=null&&typeof e=="object"}var bi="[object Symbol]";function er(e){return typeof e=="symbol"||de(e)&&Se(e)==bi}function tr(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _i=Array.isArray;const L=_i;var ji=1/0,En=ne?ne.prototype:void 0,On=En?En.toString:void 0;function Sn(e){if(typeof e=="string")return e;if(L(e))return tr(e,Sn)+"";if(er(e))return On?On.call(e):"";var t=e+"";return t=="0"&&1/e==-ji?"-0":t}function se(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function rr(e){return e}var Ei="[object AsyncFunction]",Oi="[object Function]",Si="[object GeneratorFunction]",Ci="[object Proxy]";function nr(e){if(!se(e))return!1;var t=Se(e);return t==Oi||t==Si||t==Ei||t==Ci}var wi=fe["__core-js_shared__"];const or=wi;var Cn=function(){var e=/[^.]+$/.exec(or&&or.keys&&or.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xi(e){return!!Cn&&Cn in e}var Ri=Function.prototype,Ni=Ri.toString;function Ce(e){if(e!=null){try{return Ni.call(e)}catch{}try{return e+""}catch{}}return""}var Ti=/[\\^$.*+?()[\]{}|]/g,Ai=/^\[object .+?Constructor\]$/,Mi=Function.prototype,$i=Object.prototype,Pi=Mi.toString,Di=$i.hasOwnProperty,ki=RegExp("^"+Pi.call(Di).replace(Ti,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ii(e){if(!se(e)||xi(e))return!1;var t=nr(e)?ki:Ai;return t.test(Ce(e))}function Fi(e,t){return e==null?void 0:e[t]}function we(e,t){var r=Fi(e,t);return Ii(r)?r:void 0}var Li=we(fe,"WeakMap");const ar=Li;var wn=Object.create,Bi=function(){function e(){}return function(t){if(!se(t))return{};if(wn)return wn(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Ui=Bi;function zi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Vi(){}function xn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Gi=800,Wi=16,Hi=Date.now;function Yi(e){var t=0,r=0;return function(){var n=Hi(),o=Wi-(n-r);if(r=n,o>0){if(++t>=Gi)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ji(e){return function(){return e}}var qi=function(){try{var e=we(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Rt=qi;var Qi=Rt?function(e,t){return Rt(e,"toString",{configurable:!0,enumerable:!1,value:Ji(t),writable:!0})}:rr,Xi=Yi(Qi);const Rn=Xi;function Ki(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Zi(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function es(e){return e!==e}function ts(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function rs(e,t,r){return t===t?ts(e,t,r):Zi(e,es,r)}function ns(e,t){var r=e==null?0:e.length;return!!r&&rs(e,t,0)>-1}var os=9007199254740991,as=/^(?:0|[1-9]\d*)$/;function Nt(e,t){var r=typeof e;return t=t??os,!!t&&(r=="number"||r!="symbol"&&as.test(e))&&e>-1&&e%1==0&&e<t}function ir(e,t,r){t=="__proto__"&&Rt?Rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ct(e,t){return e===t||e!==e&&t!==t}var is=Object.prototype,ss=is.hasOwnProperty;function sr(e,t,r){var n=e[t];(!(ss.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&ir(e,t,r)}function De(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),o?ir(r,s,u):sr(r,s,u)}return r}var Nn=Math.max;function Tn(e,t,r){return t=Nn(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Nn(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),zi(e,this,s)}}function An(e,t){return Rn(Tn(e,t,rr),e+"")}var cs=9007199254740991;function cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cs}function Tt(e){return e!=null&&cr(e.length)&&!nr(e)}function us(e,t,r){if(!se(r))return!1;var n=typeof t;return(n=="number"?Tt(r)&&Nt(t,r.length):n=="string"&&t in r)?ct(r[t],e):!1}function ls(e){return An(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&us(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var fs=Object.prototype;function ur(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fs;return e===r}function ds(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ps="[object Arguments]";function Mn(e){return de(e)&&Se(e)==ps}var $n=Object.prototype,hs=$n.hasOwnProperty,vs=$n.propertyIsEnumerable,ys=Mn(function(){return arguments}())?Mn:function(e){return de(e)&&hs.call(e,"callee")&&!vs.call(e,"callee")};const ut=ys;function ms(){return!1}var Pn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dn=Pn&&typeof module=="object"&&module&&!module.nodeType&&module,gs=Dn&&Dn.exports===Pn,kn=gs?fe.Buffer:void 0,bs=kn?kn.isBuffer:void 0,_s=bs||ms;const lt=_s;var js="[object Arguments]",Es="[object Array]",Os="[object Boolean]",Ss="[object Date]",Cs="[object Error]",ws="[object Function]",xs="[object Map]",Rs="[object Number]",Ns="[object Object]",Ts="[object RegExp]",As="[object Set]",Ms="[object String]",$s="[object WeakMap]",Ps="[object ArrayBuffer]",Ds="[object DataView]",ks="[object Float32Array]",Is="[object Float64Array]",Fs="[object Int8Array]",Ls="[object Int16Array]",Bs="[object Int32Array]",Us="[object Uint8Array]",zs="[object Uint8ClampedArray]",Vs="[object Uint16Array]",Gs="[object Uint32Array]",k={};k[ks]=k[Is]=k[Fs]=k[Ls]=k[Bs]=k[Us]=k[zs]=k[Vs]=k[Gs]=!0,k[js]=k[Es]=k[Ps]=k[Os]=k[Ds]=k[Ss]=k[Cs]=k[ws]=k[xs]=k[Rs]=k[Ns]=k[Ts]=k[As]=k[Ms]=k[$s]=!1;function Ws(e){return de(e)&&cr(e.length)&&!!k[Se(e)]}function lr(e){return function(t){return e(t)}}var In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ft=In&&typeof module=="object"&&module&&!module.nodeType&&module,Hs=ft&&ft.exports===In,fr=Hs&&bn.process,Ys=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||fr&&fr.binding&&fr.binding("util")}catch{}}();const ke=Ys;var Fn=ke&&ke.isTypedArray,Js=Fn?lr(Fn):Ws;const dr=Js;var qs=Object.prototype,Qs=qs.hasOwnProperty;function Ln(e,t){var r=L(e),n=!r&&ut(e),o=!r&&!n&&lt(e),a=!r&&!n&&!o&&dr(e),i=r||n||o||a,s=i?ds(e.length,String):[],u=s.length;for(var l in e)(t||Qs.call(e,l))&&!(i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Nt(l,u)))&&s.push(l);return s}function Bn(e,t){return function(r){return e(t(r))}}var Xs=Bn(Object.keys,Object);const Ks=Xs;var Zs=Object.prototype,ec=Zs.hasOwnProperty;function tc(e){if(!ur(e))return Ks(e);var t=[];for(var r in Object(e))ec.call(e,r)&&r!="constructor"&&t.push(r);return t}function At(e){return Tt(e)?Ln(e):tc(e)}function rc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var nc=Object.prototype,oc=nc.hasOwnProperty;function ac(e){if(!se(e))return rc(e);var t=ur(e),r=[];for(var n in e)n=="constructor"&&(t||!oc.call(e,n))||r.push(n);return r}function dt(e){return Tt(e)?Ln(e,!0):ac(e)}var ic=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sc=/^\w*$/;function pr(e,t){if(L(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||er(e)?!0:sc.test(e)||!ic.test(e)||t!=null&&e in Object(t)}var cc=we(Object,"create");const pt=cc;function uc(){this.__data__=pt?pt(null):{},this.size=0}function lc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fc="__lodash_hash_undefined__",dc=Object.prototype,pc=dc.hasOwnProperty;function hc(e){var t=this.__data__;if(pt){var r=t[e];return r===fc?void 0:r}return pc.call(t,e)?t[e]:void 0}var vc=Object.prototype,yc=vc.hasOwnProperty;function mc(e){var t=this.__data__;return pt?t[e]!==void 0:yc.call(t,e)}var gc="__lodash_hash_undefined__";function bc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pt&&t===void 0?gc:t,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xe.prototype.clear=uc,xe.prototype.delete=lc,xe.prototype.get=hc,xe.prototype.has=mc,xe.prototype.set=bc;function _c(){this.__data__=[],this.size=0}function Mt(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}var jc=Array.prototype,Ec=jc.splice;function Oc(e){var t=this.__data__,r=Mt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ec.call(t,r,1),--this.size,!0}function Sc(e){var t=this.__data__,r=Mt(t,e);return r<0?void 0:t[r][1]}function Cc(e){return Mt(this.__data__,e)>-1}function wc(e,t){var r=this.__data__,n=Mt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ve.prototype.clear=_c,ve.prototype.delete=Oc,ve.prototype.get=Sc,ve.prototype.has=Cc,ve.prototype.set=wc;var xc=we(fe,"Map");const ht=xc;function Rc(){this.size=0,this.__data__={hash:new xe,map:new(ht||ve),string:new xe}}function Nc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $t(e,t){var r=e.__data__;return Nc(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Tc(e){var t=$t(this,e).delete(e);return this.size-=t?1:0,t}function Ac(e){return $t(this,e).get(e)}function Mc(e){return $t(this,e).has(e)}function $c(e,t){var r=$t(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ye.prototype.clear=Rc,ye.prototype.delete=Tc,ye.prototype.get=Ac,ye.prototype.has=Mc,ye.prototype.set=$c;var Pc="Expected a function";function hr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Pc);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(hr.Cache||ye),r}hr.Cache=ye;var Dc=500;function kc(e){var t=hr(e,function(n){return r.size===Dc&&r.clear(),n}),r=t.cache;return t}var Ic=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fc=/\\(\\)?/g,Lc=kc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ic,function(r,n,o,a){t.push(o?a.replace(Fc,"$1"):n||r)}),t});const Bc=Lc;function Uc(e){return e==null?"":Sn(e)}function Ie(e,t){return L(e)?e:pr(e,t)?[e]:Bc(Uc(e))}var zc=1/0;function Fe(e){if(typeof e=="string"||er(e))return e;var t=e+"";return t=="0"&&1/e==-zc?"-0":t}function Pt(e,t){t=Ie(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Fe(t[r++])];return r&&r==n?e:void 0}function Un(e,t,r){var n=e==null?void 0:Pt(e,t);return n===void 0?r:n}function vr(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var zn=ne?ne.isConcatSpreadable:void 0;function Vc(e){return L(e)||ut(e)||!!(zn&&e&&e[zn])}function yr(e,t,r,n,o){var a=-1,i=e.length;for(r||(r=Vc),o||(o=[]);++a<i;){var s=e[a];t>0&&r(s)?t>1?yr(s,t-1,r,n,o):vr(o,s):n||(o[o.length]=s)}return o}function Gc(e){var t=e==null?0:e.length;return t?yr(e,1):[]}function Wc(e){return Rn(Tn(e,void 0,Gc),e+"")}var Hc=Bn(Object.getPrototypeOf,Object);const mr=Hc;var Yc="[object Object]",Jc=Function.prototype,qc=Object.prototype,Vn=Jc.toString,Qc=qc.hasOwnProperty,Xc=Vn.call(Object);function Q(e){if(!de(e)||Se(e)!=Yc)return!1;var t=mr(e);if(t===null)return!0;var r=Qc.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Vn.call(r)==Xc}function Kc(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function Zc(){this.__data__=new ve,this.size=0}function eu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function tu(e){return this.__data__.get(e)}function ru(e){return this.__data__.has(e)}var nu=200;function ou(e,t){var r=this.__data__;if(r instanceof ve){var n=r.__data__;if(!ht||n.length<nu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ye(n)}return r.set(e,t),this.size=r.size,this}function ce(e){var t=this.__data__=new ve(e);this.size=t.size}ce.prototype.clear=Zc,ce.prototype.delete=eu,ce.prototype.get=tu,ce.prototype.has=ru,ce.prototype.set=ou;function au(e,t){return e&&De(t,At(t),e)}function iu(e,t){return e&&De(t,dt(t),e)}var Gn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wn=Gn&&typeof module=="object"&&module&&!module.nodeType&&module,su=Wn&&Wn.exports===Gn,Hn=su?fe.Buffer:void 0,Yn=Hn?Hn.allocUnsafe:void 0;function Jn(e,t){if(t)return e.slice();var r=e.length,n=Yn?Yn(r):new e.constructor(r);return e.copy(n),n}function cu(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}function qn(){return[]}var uu=Object.prototype,lu=uu.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,fu=Qn?function(e){return e==null?[]:(e=Object(e),cu(Qn(e),function(t){return lu.call(e,t)}))}:qn;const gr=fu;function du(e,t){return De(e,gr(e),t)}var pu=Object.getOwnPropertySymbols,hu=pu?function(e){for(var t=[];e;)vr(t,gr(e)),e=mr(e);return t}:qn;const Xn=hu;function vu(e,t){return De(e,Xn(e),t)}function Kn(e,t,r){var n=t(e);return L(e)?n:vr(n,r(e))}function br(e){return Kn(e,At,gr)}function _r(e){return Kn(e,dt,Xn)}var yu=we(fe,"DataView");const jr=yu;var mu=we(fe,"Promise");const Er=mu;var gu=we(fe,"Set");const Le=gu;var Zn="[object Map]",bu="[object Object]",eo="[object Promise]",to="[object Set]",ro="[object WeakMap]",no="[object DataView]",_u=Ce(jr),ju=Ce(ht),Eu=Ce(Er),Ou=Ce(Le),Su=Ce(ar),Re=Se;(jr&&Re(new jr(new ArrayBuffer(1)))!=no||ht&&Re(new ht)!=Zn||Er&&Re(Er.resolve())!=eo||Le&&Re(new Le)!=to||ar&&Re(new ar)!=ro)&&(Re=function(e){var t=Se(e),r=t==bu?e.constructor:void 0,n=r?Ce(r):"";if(n)switch(n){case _u:return no;case ju:return Zn;case Eu:return eo;case Ou:return to;case Su:return ro}return t});const vt=Re;var Cu=Object.prototype,wu=Cu.hasOwnProperty;function xu(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&wu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ru=fe.Uint8Array;const Dt=Ru;function Or(e){var t=new e.constructor(e.byteLength);return new Dt(t).set(new Dt(e)),t}function Nu(e,t){var r=t?Or(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Tu=/\w*$/;function Au(e){var t=new e.constructor(e.source,Tu.exec(e));return t.lastIndex=e.lastIndex,t}var oo=ne?ne.prototype:void 0,ao=oo?oo.valueOf:void 0;function Mu(e){return ao?Object(ao.call(e)):{}}function io(e,t){var r=t?Or(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var $u="[object Boolean]",Pu="[object Date]",Du="[object Map]",ku="[object Number]",Iu="[object RegExp]",Fu="[object Set]",Lu="[object String]",Bu="[object Symbol]",Uu="[object ArrayBuffer]",zu="[object DataView]",Vu="[object Float32Array]",Gu="[object Float64Array]",Wu="[object Int8Array]",Hu="[object Int16Array]",Yu="[object Int32Array]",Ju="[object Uint8Array]",qu="[object Uint8ClampedArray]",Qu="[object Uint16Array]",Xu="[object Uint32Array]";function Ku(e,t,r){var n=e.constructor;switch(t){case Uu:return Or(e);case $u:case Pu:return new n(+e);case zu:return Nu(e,r);case Vu:case Gu:case Wu:case Hu:case Yu:case Ju:case qu:case Qu:case Xu:return io(e,r);case Du:return new n;case ku:case Lu:return new n(e);case Iu:return Au(e);case Fu:return new n;case Bu:return Mu(e)}}function so(e){return typeof e.constructor=="function"&&!ur(e)?Ui(mr(e)):{}}var Zu="[object Map]";function el(e){return de(e)&&vt(e)==Zu}var co=ke&&ke.isMap,tl=co?lr(co):el;const rl=tl;var nl="[object Set]";function ol(e){return de(e)&&vt(e)==nl}var uo=ke&&ke.isSet,al=uo?lr(uo):ol;const il=al;var sl=1,cl=2,ul=4,lo="[object Arguments]",ll="[object Array]",fl="[object Boolean]",dl="[object Date]",pl="[object Error]",fo="[object Function]",hl="[object GeneratorFunction]",vl="[object Map]",yl="[object Number]",po="[object Object]",ml="[object RegExp]",gl="[object Set]",bl="[object String]",_l="[object Symbol]",jl="[object WeakMap]",El="[object ArrayBuffer]",Ol="[object DataView]",Sl="[object Float32Array]",Cl="[object Float64Array]",wl="[object Int8Array]",xl="[object Int16Array]",Rl="[object Int32Array]",Nl="[object Uint8Array]",Tl="[object Uint8ClampedArray]",Al="[object Uint16Array]",Ml="[object Uint32Array]",P={};P[lo]=P[ll]=P[El]=P[Ol]=P[fl]=P[dl]=P[Sl]=P[Cl]=P[wl]=P[xl]=P[Rl]=P[vl]=P[yl]=P[po]=P[ml]=P[gl]=P[bl]=P[_l]=P[Nl]=P[Tl]=P[Al]=P[Ml]=!0,P[pl]=P[fo]=P[jl]=!1;function yt(e,t,r,n,o,a){var i,s=t&sl,u=t&cl,l=t&ul;if(r&&(i=o?r(e,n,o,a):r(e)),i!==void 0)return i;if(!se(e))return e;var f=L(e);if(f){if(i=xu(e),!s)return xn(e,i)}else{var d=vt(e),p=d==fo||d==hl;if(lt(e))return Jn(e,s);if(d==po||d==lo||p&&!o){if(i=u||p?{}:so(e),!s)return u?vu(e,iu(i,e)):du(e,au(i,e))}else{if(!P[d])return o?e:{};i=Ku(e,d,s)}}a||(a=new ce);var v=a.get(e);if(v)return v;a.set(e,i),il(e)?e.forEach(function(E){i.add(yt(E,t,r,E,e,a))}):rl(e)&&e.forEach(function(E,w){i.set(w,yt(E,t,r,w,e,a))});var b=l?u?_r:br:u?dt:At,_=f?void 0:b(e);return Ki(_||e,function(E,w){_&&(w=E,E=e[w]),sr(i,w,yt(E,t,r,w,e,a))}),i}var $l=1,Pl=4;function ho(e){return yt(e,$l|Pl)}var Dl="__lodash_hash_undefined__";function kl(e){return this.__data__.set(e,Dl),this}function Il(e){return this.__data__.has(e)}function mt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ye;++t<r;)this.add(e[t])}mt.prototype.add=mt.prototype.push=kl,mt.prototype.has=Il;function Fl(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function vo(e,t){return e.has(t)}var Ll=1,Bl=2;function yo(e,t,r,n,o,a){var i=r&Ll,s=e.length,u=t.length;if(s!=u&&!(i&&u>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,v=r&Bl?new mt:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var b=e[d],_=t[d];if(n)var E=i?n(_,b,d,t,e,a):n(b,_,d,e,t,a);if(E!==void 0){if(E)continue;p=!1;break}if(v){if(!Fl(t,function(w,S){if(!vo(v,S)&&(b===w||o(b,w,r,n,a)))return v.push(S)})){p=!1;break}}else if(!(b===_||o(b,_,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Ul(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Sr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var zl=1,Vl=2,Gl="[object Boolean]",Wl="[object Date]",Hl="[object Error]",Yl="[object Map]",Jl="[object Number]",ql="[object RegExp]",Ql="[object Set]",Xl="[object String]",Kl="[object Symbol]",Zl="[object ArrayBuffer]",ef="[object DataView]",mo=ne?ne.prototype:void 0,Cr=mo?mo.valueOf:void 0;function tf(e,t,r,n,o,a,i){switch(r){case ef:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zl:return!(e.byteLength!=t.byteLength||!a(new Dt(e),new Dt(t)));case Gl:case Wl:case Jl:return ct(+e,+t);case Hl:return e.name==t.name&&e.message==t.message;case ql:case Xl:return e==t+"";case Yl:var s=Ul;case Ql:var u=n&zl;if(s||(s=Sr),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;n|=Vl,i.set(e,t);var f=yo(s(e),s(t),n,o,a,i);return i.delete(e),f;case Kl:if(Cr)return Cr.call(e)==Cr.call(t)}return!1}var rf=1,nf=Object.prototype,of=nf.hasOwnProperty;function af(e,t,r,n,o,a){var i=r&rf,s=br(e),u=s.length,l=br(t),f=l.length;if(u!=f&&!i)return!1;for(var d=u;d--;){var p=s[d];if(!(i?p in t:of.call(t,p)))return!1}var v=a.get(e),b=a.get(t);if(v&&b)return v==t&&b==e;var _=!0;a.set(e,t),a.set(t,e);for(var E=i;++d<u;){p=s[d];var w=e[p],S=t[p];if(n)var W=i?n(S,w,p,t,e,a):n(w,S,p,e,t,a);if(!(W===void 0?w===S||o(w,S,r,n,a):W)){_=!1;break}E||(E=p=="constructor")}if(_&&!E){var D=e.constructor,U=t.constructor;D!=U&&"constructor"in e&&"constructor"in t&&!(typeof D=="function"&&D instanceof D&&typeof U=="function"&&U instanceof U)&&(_=!1)}return a.delete(e),a.delete(t),_}var sf=1,go="[object Arguments]",bo="[object Array]",kt="[object Object]",cf=Object.prototype,_o=cf.hasOwnProperty;function uf(e,t,r,n,o,a){var i=L(e),s=L(t),u=i?bo:vt(e),l=s?bo:vt(t);u=u==go?kt:u,l=l==go?kt:l;var f=u==kt,d=l==kt,p=u==l;if(p&&lt(e)){if(!lt(t))return!1;i=!0,f=!1}if(p&&!f)return a||(a=new ce),i||dr(e)?yo(e,t,r,n,o,a):tf(e,t,u,r,n,o,a);if(!(r&sf)){var v=f&&_o.call(e,"__wrapped__"),b=d&&_o.call(t,"__wrapped__");if(v||b){var _=v?e.value():e,E=b?t.value():t;return a||(a=new ce),o(_,E,r,n,a)}}return p?(a||(a=new ce),af(e,t,r,n,o,a)):!1}function wr(e,t,r,n,o){return e===t?!0:e==null||t==null||!de(e)&&!de(t)?e!==e&&t!==t:uf(e,t,r,n,wr,o)}var lf=1,ff=2;function df(e,t,r,n){var o=r.length,a=o,i=!n;if(e==null)return!a;for(e=Object(e);o--;){var s=r[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=r[o];var u=s[0],l=e[u],f=s[1];if(i&&s[2]){if(l===void 0&&!(u in e))return!1}else{var d=new ce;if(n)var p=n(l,f,u,e,t,d);if(!(p===void 0?wr(f,l,lf|ff,n,d):p))return!1}}return!0}function jo(e){return e===e&&!se(e)}function pf(e){for(var t=At(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,jo(o)]}return t}function Eo(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function hf(e){var t=pf(e);return t.length==1&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===e||df(r,e,t)}}function vf(e,t){return e!=null&&t in Object(e)}function yf(e,t,r){t=Ie(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var i=Fe(t[n]);if(!(a=e!=null&&r(e,i)))break;e=e[i]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&cr(o)&&Nt(i,o)&&(L(e)||ut(e)))}function mf(e,t){return e!=null&&yf(e,t,vf)}var gf=1,bf=2;function _f(e,t){return pr(e)&&jo(t)?Eo(Fe(e),t):function(r){var n=Un(r,e);return n===void 0&&n===t?mf(r,e):wr(t,n,gf|bf)}}function jf(e){return function(t){return t==null?void 0:t[e]}}function Ef(e){return function(t){return Pt(t,e)}}function Of(e){return pr(e)?jf(Fe(e)):Ef(e)}function xr(e){return typeof e=="function"?e:e==null?rr:typeof e=="object"?L(e)?_f(e[0],e[1]):hf(e):Of(e)}function Sf(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var u=i[e?s:++o];if(r(a[u],u,a)===!1)break}return t}}var Cf=Sf();const wf=Cf;function Rr(e,t,r){(r!==void 0&&!ct(e[t],r)||r===void 0&&!(t in e))&&ir(e,t,r)}function Nr(e){return de(e)&&Tt(e)}function Tr(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function xf(e){return De(e,dt(e))}function Rf(e,t,r,n,o,a,i){var s=Tr(e,r),u=Tr(t,r),l=i.get(u);if(l){Rr(e,r,l);return}var f=a?a(s,u,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=L(u),v=!p&&lt(u),b=!p&&!v&&dr(u);f=u,p||v||b?L(s)?f=s:Nr(s)?f=xn(s):v?(d=!1,f=Jn(u,!0)):b?(d=!1,f=io(u,!0)):f=[]:Q(u)||ut(u)?(f=s,ut(s)?f=xf(s):(!se(s)||nr(s))&&(f=so(u))):d=!1}d&&(i.set(u,f),o(f,u,n,a,i),i.delete(u)),Rr(e,r,f)}function Oo(e,t,r,n,o){e!==t&&wf(t,function(a,i){if(o||(o=new ce),se(a))Rf(e,t,i,r,Oo,n,o);else{var s=n?n(Tr(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),Rr(e,i,s)}},dt)}function Nf(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function So(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Tf(e,t){return t.length<2?e:Pt(e,Kc(t,0,-1))}var Af=ls(function(e,t,r){Oo(e,t,r)});const Co=Af;var Mf="Expected a function";function $f(e){if(typeof e!="function")throw new TypeError(Mf);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Pf(e,t){return t=Ie(t,e),e=Tf(e,t),e==null||delete e[Fe(So(t))]}function Df(e){return Q(e)?void 0:e}var kf=1,If=2,Ff=4,Lf=Wc(function(e,t){var r={};if(e==null)return r;var n=!1;t=tr(t,function(a){return a=Ie(a,e),n||(n=a.length>1),a}),De(e,_r(e),r),n&&(r=yt(r,kf|If|Ff,Df));for(var o=t.length;o--;)Pf(r,t[o]);return r});const wo=Lf;function Bf(e,t,r,n){if(!se(e))return e;t=Ie(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var u=Fe(t[o]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=i){var f=s[u];l=n?n(f,u,s):void 0,l===void 0&&(l=se(f)?f:Nt(t[o+1])?[]:{})}sr(s,u,l),s=s[u]}return e}function Uf(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var i=t[n],s=Pt(e,i);r(s,i)&&Bf(a,Ie(i,e),s)}return a}function zf(e,t){if(e==null)return{};var r=tr(_r(e),function(n){return[n]});return t=xr(t),Uf(e,r,function(n,o){return t(n,o[0])})}function Vf(e,t){return zf(e,$f(xr(t)))}var Gf=1/0,Wf=Le&&1/Sr(new Le([,-0]))[1]==Gf?function(e){return new Le(e)}:Vi;const Hf=Wf;var Yf=200;function Jf(e,t,r){var n=-1,o=ns,a=e.length,i=!0,s=[],u=s;if(r)i=!1,o=Nf;else if(a>=Yf){var l=t?null:Hf(e);if(l)return Sr(l);i=!1,o=vo,u=new mt}else u=t?[]:s;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,i&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;t&&u.push(d),s.push(f)}else o(u,d,r)||(u!==s&&u.push(d),s.push(f))}return s}var qf=An(function(e){var t=So(e);return Nr(t)&&(t=void 0),Jf(yr(e,1,Nr,!0),xr(t))});const Qf=qf;class xo extends TypeError{constructor(t,r){let n;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:`At path: ${i.join(".")} -- ${o}`;super(s),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=[t,...r()])}}function Xf(e){return ue(e)&&typeof e[Symbol.iterator]=="function"}function ue(e){return typeof e=="object"&&e!=null}function K(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Kf(e){const{done:t,value:r}=e.next();return t?void 0:r}function Zf(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=r,{refinement:s,message:u=`Expected a value of type \`${i}\`${s?` with refinement \`${s}\``:""}, but received: \`${K(n)}\``}=e;return{value:n,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:u}}function*Ro(e,t,r,n){Xf(e)||(e=[e]);for(const o of e){const a=Zf(o,t,r,n);a&&(yield a)}}function*Ar(e,t,r){r===void 0&&(r={});const{path:n=[],branch:o=[e],coerce:a=!1,mask:i=!1}=r,s={path:n,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&ue(t.schema)&&ue(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let u="valid";for(const l of t.validator(e,s))u="not_valid",yield[l,void 0];for(let[l,f,d]of t.entries(e,s)){const p=Ar(f,d,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:i});for(const v of p)v[0]?(u=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?e=f:e instanceof Map?e.set(l,f):e instanceof Set?e.add(f):ue(e)&&(f!==void 0||l in e)&&(e[l]=f))}if(u!=="not_valid")for(const l of t.refiner(e,s))u="not_refined",yield[l,void 0];u==="valid"&&(yield[void 0,e])}class pe{constructor(t){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:i=u=>u,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=i,o?this.validator=(u,l)=>{const f=o(u,l);return Ro(f,l,this,u)}:this.validator=()=>[],a?this.refiner=(u,l)=>{const f=a(u,l);return Ro(f,l,this,u)}:this.refiner=()=>[]}assert(t){return No(t,this)}create(t){return ed(t,this)}is(t){return rd(t,this)}mask(t){return td(t,this)}validate(t,r){return r===void 0&&(r={}),Be(t,this,r)}}function No(e,t){const r=Be(e,t);if(r[0])throw r[0]}function ed(e,t){const r=Be(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function td(e,t){const r=Be(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function rd(e,t){return!Be(e,t)[0]}function Be(e,t,r){r===void 0&&(r={});const n=Ar(e,t,r),o=Kf(n);return o[0]?[new xo(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Mr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return n?$o(a):M(a)}function Ee(e,t){return new pe({type:e,schema:null,validator:t})}function Ue(e){return new pe({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function To(e,t){const{schema:r}=e,n={...r};for(const o of t)delete n[o];switch(e.type){case"type":return $o(n);default:return M(n)}}function G(){return Ee("any",()=>!0)}function B(e){return new pe({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${K(t)}`}})}function me(){return Ee("boolean",e=>typeof e=="boolean")}function $r(e){const t={},r=e.map(n=>K(n)).join();for(const n of e)t[n]=n;return new pe({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${K(n)}`}})}function Ao(){return Ee("func",e=>typeof e=="function"||`Expected a function, but received: ${K(e)}`)}function X(e){const t=K(e),r=typeof e;return new pe({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${K(n)}`}})}function nd(){return Ee("never",()=>!1)}function Mo(){return Ee("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${K(e)}`)}function M(e){const t=e?Object.keys(e):[],r=nd();return new pe({type:"object",schema:e||null,*entries(n){if(e&&ue(n)){const o=new Set(Object.keys(n));for(const a of t)o.delete(a),yield[a,n[a],e[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return ue(n)||`Expected an object, but received: ${K(n)}`},coercer(n){return ue(n)?{...n}:n}})}function g(e){return new pe({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function gt(e,t){return new pe({type:"record",schema:null,*entries(r){if(ue(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator(r){return ue(r)||`Expected an object, but received: ${K(r)}`}})}function m(){return Ee("string",e=>typeof e=="string"||`Expected a string, but received: ${K(e)}`)}function $o(e){const t=Object.keys(e);return new pe({type:"type",schema:e,*entries(r){if(ue(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return ue(r)||`Expected an object, but received: ${K(r)}`}})}function Y(e){const t=e.map(r=>r.type).join(" | ");return new pe({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||od()).coercer(r,n)},validator(r,n){const o=[];for(const a of e){const[...i]=Ar(r,a,n),[s]=i;if(s[0])for(const[u]of i)u&&o.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${K(r)}`,...o]}})}function od(){return Ee("unknown",()=>!0)}const Pr=M({package:m(),version:m(),exportName:m(),destructuring:g(me()),subName:g(m()),main:g(m())}),ad=B(Pr),id=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var oe=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(oe||{}),Dr=(e=>(e.DESIGN="design",e.SAVE="save",e))(Dr||{}),kr=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(kr||{});const sd=()=>Ee("normalObj",e=>!Q(e)||[oe.SLOT,oe.EXPRESSION,oe.FUNCTION].includes(e==null?void 0:e.type)?!1:(Be(e,gt(m(),Ir)),!0)),Ir=Y([m(),Mo(),me(),M({type:X(oe.SLOT),renderType:$r([kr.FUNC,kr.COMP]),params:g(B(m())),value:Ue(()=>Y([ze,B(ze)]))}),M({type:X(oe.EXPRESSION),value:m()}),M({type:X(oe.FUNCTION),value:m()}),sd(),B(Ue(()=>Ir))]),Po=M({type:X(oe.EXPRESSION),value:m()}),ze=M({id:g(m()),title:g(m()),componentName:m(),props:g(gt(m(),Ir)),stateName:g(m()),state:g(gt(m(),G())),children:Ue(()=>g(B(Y([m(),ze])))),configure:g(G()),css:g(G()),style:g(G()),classNames:g(B(G())),refId:g(m()),extra:g(gt(G(),G())),condition:g(Y([me(),Po])),tempDevConfig:g(G()),loop:g(M({open:me(),data:Y([B(G()),Po]),args:g(B(m())),forName:g(m()),forIndex:g(m()),key:g(G()),name:g(m())}))}),It=Y([m(),M({label:m(),tip:g(m())})]),cd=M({type:X("shape"),value:B(M({name:m(),title:It,valueType:Ue(()=>Ft)}))}),ud=M({type:X("enums"),value:B(m())});M({type:X("array"),value:Ue(()=>Ft)});const ld=M({type:X("array"),value:Ue(()=>B(Ft))}),Ft=Y([$r(["array","boolean","number","object","string"]),$r(["component","expression","function"]),cd,ud,ld]),fd=Y([m(),M({componentName:m(),props:g(G()),initialValue:g(G()),component:g(G())})]),Fr=M({name:m(),title:It,valueType:Ft,description:g(m()),defaultValue:G(),setters:g(B(fd)),condition:g(Ao())}),dd=Y([m(),Ao()]);var Lr=(e=>(e.SINGLE="single",e.GROUP="group",e))(Lr||{});Y([m(),M({name:m(),describe:g(m()),params:g(M({name:m(),description:m()})),template:m()})]);const pd=M({id:g(m()),title:m(),snapshot:Y([m(),G()]),snapshotText:g(m()),description:g(m()),tags:g(B(m())),groupName:g(m()),category:g(m()),schema:Mr(To(ze,["id"]),M({componentName:g(m())}))}),hd=M({componentName:m(),title:m(),screenshot:g(m()),icon:g(m()),tags:g(B(m())),groupName:g(m()),category:g(m()),priority:g(Mo()),npm:g(Pr),snippets:B(pd),props:B(Y([Fr,M({title:g(It),type:X("single"),content:Fr}),M({title:g(It),type:X("group"),content:B(Fr)})])),fixedProps:g(G()),isContainer:g(Y([me(),M({placeholder:m(),width:m(),height:m()})])),isModal:g(Y([me(),M({visibleKey:m()})])),isSupportStyle:g(me()),isSupportDispatchNativeEvent:g(me()),isLayout:g(me()),rootSelector:g(m()),selectionToolBars:g(B(dd)),extra:g(gt(G(),G()))}),vd=e=>({data:t,message:r,throwError:n})=>{const o=e({data:t,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
28
28
  originData: ${JSON.stringify(t)}`):new Error(`${JSON.stringify(t)}
29
- data struct format is invalidate`);return o},Gr=e=>{const{data:t,message:r,throwError:n,dataStruct:o}=e;return gd(({data:a})=>{try{return Ao(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof Ro&&(i=s.failures().map(u=>`\u3010${u.path.join(".")}\u3011: ${u.message}
30
- `)),{isValidate:!1,message:i,error:s}}})({data:t,message:r,throwError:n})};var qe=(e=>(e.ROOT_CONTAINER="RootContainer",e))(qe||{});const bd=A({type:K(ne.FUNCTION),value:m()}),_d=kr(To(Je,["componentName"]),A({componentName:K("RootContainer")}));function jd(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(o){o(r)}),(n=e.get("*"))&&n.slice().map(function(o){o(t,r)})}}}const St=jd(),Ed=(e,t)=>{const r={...e,value:[]},n=e.value;let o=new $e([]);return t&&(o=t.materialsMode||new $e([])),n&&(L(n)?r.value=n.map(a=>new F(a,{parent:t,materials:o})):X(n)&&r.value.push(new F(n,{parent:t,materials:o}))),r};class Qe{constructor(t,r){C(this,"nodeType","SLOT"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",St),C(this,"data"),C(this,"id"),C(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=t;const n=(r==null?void 0:r.materials)||new $e([]);this.materialsMode=n,this.id=he(),this.data=Ed(t,this)}get value(){return this.data}export(t){const r=this.data,n=o=>{if(o instanceof F)return o.export(t);if(X(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return L(o)?o.map(a=>n(a)):(t==="design"&&delete o.id,o)};return n(r)}}const ko=e=>{let t=[];return e.forEach(r=>{const n=r;n.type?n.type===Vr.SINGLE?t.push(n.content):n.type===Vr.GROUP&&(t=[...t,...ko(n.content)]):t.push(r)}),t},Wr=(e,t,r)=>{if(e.type)return e.type===ne.SLOT?new Qe(e,{parent:t,materials:r}):e;if(X(e)){const n={};return Object.keys(e).forEach(o=>{n[o]=Hr(e[o],t,r)}),n}else return Array.isArray(e)?e.map(n=>Wr(n,t,r)):e},Hr=(e,t,r)=>X(e)?Wr(e,t,r):L(e)?e.map(n=>Wr(n,t,r)):e;class we{constructor(t,r,n){C(this,"nodeType","PROP"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",St),C(this,"data"),C(this,"name"),C(this,"materialsMode");const o=(n==null?void 0:n.materials)||new $e([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=t,this.data=Hr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const r=this.data;this.data=Hr(t!=null?t:r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Qe)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof F){const r=t.material;return ko((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(t){const r=this.data,n=o=>{if(o instanceof we||o instanceof Qe||o instanceof F)return o.export(t);if(L(o))return o.map(a=>n(a));if(X(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Od=e=>{if(typeof e=="string")return!0;Gr({data:e,dataStruct:Je,throwError:!0})},Io=(e,t,r=new $e([]))=>{var n;if(typeof e=="string")return e;const o={...e,id:(n=e.id)!=null?n:he(),children:[],props:{},configure:Co(e.configure||{},{propsSetter:{},advanceSetter:{}})},a=Object.keys(e.props||{});return a.length&&a.forEach(s=>{var i;const u=(i=e.props)==null?void 0:i[s];if(u instanceof we){o.props[s]=u;return}o.props[s]=new we(s,u||"",{parent:t,materials:r})}),e.children&&(Array.isArray(e.children)?o.children=e.children.map(s=>{if(s instanceof F)return s;if(X(s)){const i=s;return new F(i,{parent:t,materials:r})}else return s}):(e.children instanceof F&&(o.children=[e.children]),o.children=[new F(e.children,{parent:t,materials:r})])),o};class F{constructor(t,r){C(this,"nodeType","NODE"),C(this,"rawData"),C(this,"data"),C(this,"emitter",St),C(this,"parent"),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),Od(t);const n=(r==null?void 0:r.materials)||new $e([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=Io(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const r={...this.export("design"),id:t||he()};return new F(r,{materials:this.materialsModel})}updateValue(t){const r=this.data,n={...this.data,...t};this.data=Io(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(t){return qr(this,t)}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}getPlainProps(){const t=this.data,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}export(t){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(f=>{o[f]=n.props[f].export(t)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof F?f.export(t):f),s=n.configure||{},i=s.propsSetter||{},u={};Object.keys(i).forEach(f=>{const d=zn(i,f,!1);d&&(u[f]=d)}),s.propsSetter=u,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:s,props:o,children:a};return t==="design"&&delete l.id,l=Jr(l),l}}const Fo=(e,t,r)=>{const n={...e,id:he(),props:{},componentName:qe.ROOT_CONTAINER,children:[],configure:Co(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];L(e.children)?o=e.children.map(s=>s instanceof F?s:X(s)?new F(s,{parent:t,materials:r}):s):e.children instanceof F?o.push(e.children):e.children&&X(e.children)&&o.push(new F(e.children,{parent:t,materials:r}));const a=Object.keys(e.props||{});return a.length&&a.forEach(s=>{var i;const u=(i=e.props)==null?void 0:i[s];u instanceof we?n.props[s]=u:n.props[s]=new we(s,u||"",{parent:t,materials:r})}),n.children=o,n};class Ct{constructor(t,{parent:r,materials:n}){C(this,"rawData"),C(this,"data"),C(this,"nodeType",qe.ROOT_CONTAINER),C(this,"emitter",St),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),C(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(t)),this.data=Fo(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==t)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}updateValue(t){const r=this.data,n={...this.data,...t};this.data=Fo(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(t){return qr(this,t)}export(t=Lr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(u=>{o[u]=n.props[u].export(t)});const a=((r=n.children)==null?void 0:r.map(u=>{var l;return(l=u==null?void 0:u.export)==null?void 0:l.call(u,t)}))||[],s={...n,props:o,children:a.filter(u=>u)};let i=xo(s,["id"]);return i=Jr(i),i}getPlainProps(){const t=this.data,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const r={...this.export("design"),id:t||he()};return new Ct(r,{materials:this.materialsModel,parent:null})}}const Me=e=>(e==null?void 0:e.type)===ne.EXPRESSION,wd=e=>(e==null?void 0:e.type)==ne.FUNCTION,he=()=>Math.random().toString(32).slice(3,9),Sd=e=>(e==null?void 0:e.nodeType)==="NODE",Yr=e=>(e==null?void 0:e.nodeType)==="PROP",Cd=e=>(e==null?void 0:e.nodeType)==="SLOT",Jr=e=>Hf(e,t=>X(t)?!Object.keys(t).length:L(t)?!t.length:!t);function qr(e,t){const r=[e];for(;r.length;){const n=r.shift();if((n==null?void 0:n.id)===t)return n;const o=(n==null?void 0:n.props)||{},a=i=>{if(i instanceof F){r.push(i);return}if(i instanceof Qe&&a(i.value.value),i instanceof we){a(i.value);return}if(X(i)){const u=i;Object.keys(u).map(l=>{a(u[l])});return}if(L(i)){i.forEach(u=>{a(u)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof F))||[];r.push(...s)}return null}const xd=e=>{const t=vo(e),r=t.snippets;return delete t.snippets,t.snippets=r.map(n=>({...t,...n,id:n.id||`${e.componentName}-${he()}`,title:n.title||e.title,category:n.category||e.category,tags:[...n.tags||[],...e.tags||[]],groupName:n.groupName||e.groupName,snapshot:n.snapshot||e.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||e.componentName}})),t};class Rd{constructor(t){C(this,"rawData"),C(this,"data"),this.rawData=t,this.data=xd(t)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(t){return this.data.snippets.find(r=>r.id===t)}}const Nd=e=>{if(!L(e))throw new Error("Materials must be a array");return e.map(t=>new Rd(t))},Ad=e=>{e==null||e.forEach(t=>{Gr({data:t,dataStruct:md,throwError:!0})})};class $e{constructor(t){C(this,"rawData"),C(this,"data"),C(this,"usedMaterials",[]),this.rawData=t,Ad(t),this.data=Nd(t)}findByComponentName(t){return this.data.find(r=>r.componentName===t)}findSnippetById(t){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(t)}return n}getAllSnippets(){let t=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]);const r=[],n={default:[]};t=t.sort((a,s)=>(a.category||"")>(s.category||"")?1:-1),t.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});const o=[];return r.forEach(a=>{const s=["default"],i={default:[]},u=n[a];if(u.length!==0){u.forEach(d=>{const p=d.category||"default";s.includes(p)||(s.push(p),i[p]=[]),i[p].push(d)});const l=[];s.forEach(d=>{i[d].length&&l.push({name:d,list:i[d]})});const f={name:a,list:l};o.push(f)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Td=A({version:m(),name:m(),css:b(m()),renderType:b(Y([K("COMPONENT"),K("PAGE")])),methods:b(B(bd)),componentsMeta:B(kr(A({componentName:m()}),Fr)),thirdLibs:b(ud),componentsTree:_d,assets:b(B(V()))}),Lo=e=>(Gr({data:e,dataStruct:Td,throwError:!0}),e),Qr=(e,t,r)=>({...e,componentsTree:new Ct(e.componentsTree,{parent:t,materials:r})});class Gt{constructor(t,r){C(this,"nodeType","PAGE"),C(this,"rawData"),C(this,"emitter",St),C(this,"data"),C(this,"parent"),C(this,"materialsModel"),C(this,"assetPackagesList"),Lo(t),this.assetPackagesList=(r==null?void 0:r.assetPackagesList)||[],this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new $e((r==null?void 0:r.materials)||[]),this.data=Qr(t,this,this.materialsModel)}updatePage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Qr(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Qr(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(t){const r=this.data.componentsTree;return qr(r,t)}addNode(t,r,n="AFTER"){var o,a,s;if(n==="AFTER"||n==="BEFORE"){const i=r.parent;if(i===null&&r instanceof Ct)return console.warn("Not found parent node"),!1;if(i instanceof we)return console.warn("CProp can not add node"),!1;if(i instanceof Qe){const l=i.value.value,f=(o=l.findIndex(d=>d===r))!=null?o:-1;return f>=0?(n==="BEFORE"?l.splice(f,0,t):l.splice(f+1,0,t),t.parent=i,(a=i.parent)==null||a.updateValue(),!0):!1}if(i instanceof Gt)return!1;const u=(s=i==null?void 0:i.value.children.findIndex(l=>l===r))!=null?s:-1;return u>=0?(n==="BEFORE"?i==null||i.value.children.splice(u,0,t):i==null||i.value.children.splice(u+1,0,t),t.parent=i,i==null||i.updateValue(),!0):(console.warn("Not found target node"),!1)}if(n==="CHILD_START")return r.value.children.unshift(t),t.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(t),t.parent=r,r.updateValue(),!0;if(X(n)){const i=n;if(i.type==="CHILD"){const u=i.pos,l=i.index||0;return u==="BEFORE"?r==null||r.value.children.splice(l,0,t):r==null||r.value.children.splice(l+1,0,t),t.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new F(t,{parent:null,materials:this.materialsModel})}addNodeById(t,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(t,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(t){const r=t.export("design");r.id=he();const n=new F(r,{parent:t.parent,materials:this.materialsModel});return this.addNode(n,t,"AFTER"),n}copyNodeById(t){const r=this.getNode(t);return r&&r instanceof F?this.copyNode(r):!1}moveNode(t,r,n){this.deleteNode(t);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),t.parent=o,this.addNode(t,r,n)}moveNodeById(t,r,n){const o=this.getNode(t),a=this.getNode(r);return o&&a&&o instanceof F&&a instanceof F?this.moveNode(o,a,n):!1}deleteNode(t){var r;const n=t.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof Qe){const o=n.value.value,a=o.findIndex(i=>i===t),s=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),s}if(n instanceof F||n instanceof Ct){const o=n.value.children,a=o.findIndex(i=>i===t),s=o[a];return o.splice(a,1),n.updateValue(),s}}deleteNodeById(t){const r=this.getNode(t);if(r)return this.deleteNode(r)}export(t=Lr.SAVE){var r;const n=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(u=>{const l=o.find(f=>{var d;return f.package===((d=u.value.npm)==null?void 0:d.package)});return l&&a.push(l),{componentName:u.componentName,...vo(u.value.npm||{})}}).filter(u=>{if(u.componentName&&u.package&&u.version)return!0});this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:Jr(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(u=>{const l=o.find(f=>{f.package,f.package});l&&a.push(l)}),i.assets=Zf(a,u=>u.package),i=xo(i,["id"]),JSON.parse(JSON.stringify(i))}}qe.ROOT_CONTAINER;var Md=typeof global=="object"&&global&&global.Object===Object&&global;const Bo=Md;var $d=typeof self=="object"&&self&&self.Object===Object&&self,Pd=Bo||$d||Function("return this")();const Xe=Pd;var Dd=Xe.Symbol;const Ke=Dd;var Uo=Object.prototype,kd=Uo.hasOwnProperty,Id=Uo.toString,xt=Ke?Ke.toStringTag:void 0;function Fd(e){var t=kd.call(e,xt),r=e[xt];try{e[xt]=void 0;var n=!0}catch{}var o=Id.call(e);return n&&(t?e[xt]=r:delete e[xt]),o}var Ld=Object.prototype,Bd=Ld.toString;function Ud(e){return Bd.call(e)}var zd="[object Null]",Vd="[object Undefined]",zo=Ke?Ke.toStringTag:void 0;function Rt(e){return e==null?e===void 0?Vd:zd:zo&&zo in Object(e)?Fd(e):Ud(e)}function Ze(e){return e!=null&&typeof e=="object"}var Gd="[object Symbol]";function Wd(e){return typeof e=="symbol"||Ze(e)&&Rt(e)==Gd}function Hd(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Yd=Array.isArray;const et=Yd;var Jd=1/0,Vo=Ke?Ke.prototype:void 0,Go=Vo?Vo.toString:void 0;function Wo(e){if(typeof e=="string")return e;if(et(e))return Hd(e,Wo)+"";if(Wd(e))return Go?Go.call(e):"";var t=e+"";return t=="0"&&1/e==-Jd?"-0":t}function Pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ho(e){return e}var qd="[object AsyncFunction]",Qd="[object Function]",Xd="[object GeneratorFunction]",Kd="[object Proxy]";function Xr(e){if(!Pe(e))return!1;var t=Rt(e);return t==Qd||t==Xd||t==qd||t==Kd}var Zd=Xe["__core-js_shared__"];const Kr=Zd;var Yo=function(){var e=/[^.]+$/.exec(Kr&&Kr.keys&&Kr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ep(e){return!!Yo&&Yo in e}var tp=Function.prototype,rp=tp.toString;function np(e){if(e!=null){try{return rp.call(e)}catch{}try{return e+""}catch{}}return""}var op=/[\\^$.*+?()[\]{}|]/g,ap=/^\[object .+?Constructor\]$/,ip=Function.prototype,sp=Object.prototype,up=ip.toString,cp=sp.hasOwnProperty,lp=RegExp("^"+up.call(cp).replace(op,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fp(e){if(!Pe(e)||ep(e))return!1;var t=Xr(e)?lp:ap;return t.test(np(e))}function dp(e,t){return e==null?void 0:e[t]}function Zr(e,t){var r=dp(e,t);return fp(r)?r:void 0}var Jo=Object.create,pp=function(){function e(){}return function(t){if(!Pe(t))return{};if(Jo)return Jo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const hp=pp;function vp(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function yp(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var mp=800,gp=16,bp=Date.now;function _p(e){var t=0,r=0;return function(){var n=bp(),o=gp-(n-r);if(r=n,o>0){if(++t>=mp)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function jp(e){return function(){return e}}var Ep=function(){try{var e=Zr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Wt=Ep;var Op=Wt?function(e,t){return Wt(e,"toString",{configurable:!0,enumerable:!1,value:jp(t),writable:!0})}:Ho,wp=_p(Op);const Sp=wp;var Cp=9007199254740991,xp=/^(?:0|[1-9]\d*)$/;function qo(e,t){var r=typeof e;return t=t==null?Cp:t,!!t&&(r=="number"||r!="symbol"&&xp.test(e))&&e>-1&&e%1==0&&e<t}function en(e,t,r){t=="__proto__"&&Wt?Wt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ht(e,t){return e===t||e!==e&&t!==t}var Rp=Object.prototype,Np=Rp.hasOwnProperty;function Ap(e,t,r){var n=e[t];(!(Np.call(e,t)&&Ht(n,r))||r===void 0&&!(t in e))&&en(e,t,r)}function Tp(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var i=t[a],u=n?n(r[i],e[i],i,r,e):void 0;u===void 0&&(u=e[i]),o?en(r,i,u):Ap(r,i,u)}return r}var Qo=Math.max;function Mp(e,t,r){return t=Qo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Qo(n.length-t,0),s=Array(a);++o<a;)s[o]=n[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=n[o];return i[t]=r(s),vp(e,this,i)}}function $p(e,t){return Sp(Mp(e,t,Ho),e+"")}var Pp=9007199254740991;function Xo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Pp}function tn(e){return e!=null&&Xo(e.length)&&!Xr(e)}function Dp(e,t,r){if(!Pe(r))return!1;var n=typeof t;return(n=="number"?tn(r)&&qo(t,r.length):n=="string"&&t in r)?Ht(r[t],e):!1}function kp(e){return $p(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,s&&Dp(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var i=r[n];i&&e(t,i,n,a)}return t})}var Ip=Object.prototype;function Ko(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ip;return e===r}function Fp(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Lp="[object Arguments]";function Zo(e){return Ze(e)&&Rt(e)==Lp}var ea=Object.prototype,Bp=ea.hasOwnProperty,Up=ea.propertyIsEnumerable,zp=Zo(function(){return arguments}())?Zo:function(e){return Ze(e)&&Bp.call(e,"callee")&&!Up.call(e,"callee")};const rn=zp;function Vp(){return!1}var ta=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ra=ta&&typeof module=="object"&&module&&!module.nodeType&&module,Gp=ra&&ra.exports===ta,na=Gp?Xe.Buffer:void 0,Wp=na?na.isBuffer:void 0,Hp=Wp||Vp;const oa=Hp;var Yp="[object Arguments]",Jp="[object Array]",qp="[object Boolean]",Qp="[object Date]",Xp="[object Error]",Kp="[object Function]",Zp="[object Map]",eh="[object Number]",th="[object Object]",rh="[object RegExp]",nh="[object Set]",oh="[object String]",ah="[object WeakMap]",ih="[object ArrayBuffer]",sh="[object DataView]",uh="[object Float32Array]",ch="[object Float64Array]",lh="[object Int8Array]",fh="[object Int16Array]",dh="[object Int32Array]",ph="[object Uint8Array]",hh="[object Uint8ClampedArray]",vh="[object Uint16Array]",yh="[object Uint32Array]",k={};k[uh]=k[ch]=k[lh]=k[fh]=k[dh]=k[ph]=k[hh]=k[vh]=k[yh]=!0,k[Yp]=k[Jp]=k[ih]=k[qp]=k[sh]=k[Qp]=k[Xp]=k[Kp]=k[Zp]=k[eh]=k[th]=k[rh]=k[nh]=k[oh]=k[ah]=!1;function mh(e){return Ze(e)&&Xo(e.length)&&!!k[Rt(e)]}function gh(e){return function(t){return e(t)}}var aa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nt=aa&&typeof module=="object"&&module&&!module.nodeType&&module,bh=Nt&&Nt.exports===aa,nn=bh&&Bo.process,_h=function(){try{var e=Nt&&Nt.require&&Nt.require("util").types;return e||nn&&nn.binding&&nn.binding("util")}catch{}}();const ia=_h;var sa=ia&&ia.isTypedArray,jh=sa?gh(sa):mh;const ua=jh;var Eh=Object.prototype,Oh=Eh.hasOwnProperty;function wh(e,t){var r=et(e),n=!r&&rn(e),o=!r&&!n&&oa(e),a=!r&&!n&&!o&&ua(e),s=r||n||o||a,i=s?Fp(e.length,String):[],u=i.length;for(var l in e)(t||Oh.call(e,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||qo(l,u)))&&i.push(l);return i}function Sh(e,t){return function(r){return e(t(r))}}function Ch(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var xh=Object.prototype,Rh=xh.hasOwnProperty;function Nh(e){if(!Pe(e))return Ch(e);var t=Ko(e),r=[];for(var n in e)n=="constructor"&&(t||!Rh.call(e,n))||r.push(n);return r}function ca(e){return tn(e)?wh(e,!0):Nh(e)}var Ah=Zr(Object,"create");const At=Ah;function Th(){this.__data__=At?At(null):{},this.size=0}function Mh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $h="__lodash_hash_undefined__",Ph=Object.prototype,Dh=Ph.hasOwnProperty;function kh(e){var t=this.__data__;if(At){var r=t[e];return r===$h?void 0:r}return Dh.call(t,e)?t[e]:void 0}var Ih=Object.prototype,Fh=Ih.hasOwnProperty;function Lh(e){var t=this.__data__;return At?t[e]!==void 0:Fh.call(t,e)}var Bh="__lodash_hash_undefined__";function Uh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=At&&t===void 0?Bh:t,this}function De(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}De.prototype.clear=Th,De.prototype.delete=Mh,De.prototype.get=kh,De.prototype.has=Lh,De.prototype.set=Uh;function zh(){this.__data__=[],this.size=0}function Yt(e,t){for(var r=e.length;r--;)if(Ht(e[r][0],t))return r;return-1}var Vh=Array.prototype,Gh=Vh.splice;function Wh(e){var t=this.__data__,r=Yt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Gh.call(t,r,1),--this.size,!0}function Hh(e){var t=this.__data__,r=Yt(t,e);return r<0?void 0:t[r][1]}function Yh(e){return Yt(this.__data__,e)>-1}function Jh(e,t){var r=this.__data__,n=Yt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function be(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}be.prototype.clear=zh,be.prototype.delete=Wh,be.prototype.get=Hh,be.prototype.has=Yh,be.prototype.set=Jh;var qh=Zr(Xe,"Map");const la=qh;function Qh(){this.size=0,this.__data__={hash:new De,map:new(la||be),string:new De}}function Xh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jt(e,t){var r=e.__data__;return Xh(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kh(e){var t=Jt(this,e).delete(e);return this.size-=t?1:0,t}function Zh(e){return Jt(this,e).get(e)}function ev(e){return Jt(this,e).has(e)}function tv(e,t){var r=Jt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tt.prototype.clear=Qh,tt.prototype.delete=Kh,tt.prototype.get=Zh,tt.prototype.has=ev,tt.prototype.set=tv;function fa(e){return e==null?"":Wo(e)}var rv=Sh(Object.getPrototypeOf,Object);const da=rv;var nv="[object Object]",ov=Function.prototype,av=Object.prototype,pa=ov.toString,iv=av.hasOwnProperty,sv=pa.call(Object);function rt(e){if(!Ze(e)||Rt(e)!=nv)return!1;var t=da(e);if(t===null)return!0;var r=iv.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&pa.call(r)==sv}function uv(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function cv(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:uv(e,t,r)}var lv="\\ud800-\\udfff",fv="\\u0300-\\u036f",dv="\\ufe20-\\ufe2f",pv="\\u20d0-\\u20ff",hv=fv+dv+pv,vv="\\ufe0e\\ufe0f",yv="\\u200d",mv=RegExp("["+yv+lv+hv+vv+"]");function ha(e){return mv.test(e)}function gv(e){return e.split("")}var va="\\ud800-\\udfff",bv="\\u0300-\\u036f",_v="\\ufe20-\\ufe2f",jv="\\u20d0-\\u20ff",Ev=bv+_v+jv,Ov="\\ufe0e\\ufe0f",wv="["+va+"]",on="["+Ev+"]",an="\\ud83c[\\udffb-\\udfff]",Sv="(?:"+on+"|"+an+")",ya="[^"+va+"]",ma="(?:\\ud83c[\\udde6-\\uddff]){2}",ga="[\\ud800-\\udbff][\\udc00-\\udfff]",Cv="\\u200d",ba=Sv+"?",_a="["+Ov+"]?",xv="(?:"+Cv+"(?:"+[ya,ma,ga].join("|")+")"+_a+ba+")*",Rv=_a+ba+xv,Nv="(?:"+[ya+on+"?",on,ma,ga,wv].join("|")+")",Av=RegExp(an+"(?="+an+")|"+Nv+Rv,"g");function Tv(e){return e.match(Av)||[]}function Mv(e){return ha(e)?Tv(e):gv(e)}function $v(e){return function(t){t=fa(t);var r=ha(t)?Mv(t):void 0,n=r?r[0]:t.charAt(0),o=r?cv(r,1).join(""):t.slice(1);return n[e]()+o}}var Pv=$v("toUpperCase");const Dv=Pv;function kv(e){return Dv(fa(e).toLowerCase())}function Iv(){this.__data__=new be,this.size=0}function Fv(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Lv(e){return this.__data__.get(e)}function Bv(e){return this.__data__.has(e)}var Uv=200;function zv(e,t){var r=this.__data__;if(r instanceof be){var n=r.__data__;if(!la||n.length<Uv-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new tt(n)}return r.set(e,t),this.size=r.size,this}function nt(e){var t=this.__data__=new be(e);this.size=t.size}nt.prototype.clear=Iv,nt.prototype.delete=Fv,nt.prototype.get=Lv,nt.prototype.has=Bv,nt.prototype.set=zv;var ja=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ea=ja&&typeof module=="object"&&module&&!module.nodeType&&module,Vv=Ea&&Ea.exports===ja,Oa=Vv?Xe.Buffer:void 0,wa=Oa?Oa.allocUnsafe:void 0;function Gv(e,t){if(t)return e.slice();var r=e.length,n=wa?wa(r):new e.constructor(r);return e.copy(n),n}var Wv=Xe.Uint8Array;const Sa=Wv;function Hv(e){var t=new e.constructor(e.byteLength);return new Sa(t).set(new Sa(e)),t}function Yv(e,t){var r=t?Hv(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Jv(e){return typeof e.constructor=="function"&&!Ko(e)?hp(da(e)):{}}function qv(e){return function(t,r,n){for(var o=-1,a=Object(t),s=n(t),i=s.length;i--;){var u=s[e?i:++o];if(r(a[u],u,a)===!1)break}return t}}var Qv=qv();const Xv=Qv;function sn(e,t,r){(r!==void 0&&!Ht(e[t],r)||r===void 0&&!(t in e))&&en(e,t,r)}function Kv(e){return Ze(e)&&tn(e)}function un(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Zv(e){return Tp(e,ca(e))}function ey(e,t,r,n,o,a,s){var i=un(e,r),u=un(t,r),l=s.get(u);if(l){sn(e,r,l);return}var f=a?a(i,u,r+"",e,t,s):void 0,d=f===void 0;if(d){var p=et(u),v=!p&&oa(u),g=!p&&!v&&ua(u);f=u,p||v||g?et(i)?f=i:Kv(i)?f=yp(i):v?(d=!1,f=Gv(u,!0)):g?(d=!1,f=Yv(u,!0)):f=[]:rt(u)||rn(u)?(f=i,rn(i)?f=Zv(i):(!Pe(i)||Xr(i))&&(f=Jv(u))):d=!1}d&&(s.set(u,f),o(f,u,n,a,s),s.delete(u)),sn(e,r,f)}function Ca(e,t,r,n,o){e!==t&&Xv(t,function(a,s){if(o||(o=new nt),Pe(a))ey(e,t,s,r,Ca,n,o);else{var i=n?n(un(e,s),a,s+"",e,t,o):void 0;i===void 0&&(i=a),sn(e,s,i)}},ca)}var ty=kp(function(e,t,r){Ca(e,t,r)});const ry=ty;function ny(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function oy(e){var t,r;const n=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===n||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((r=e==null?void 0:e.prototype)==null?void 0:r.setState)||e._forwardRef}function ay(e){class t extends Z.Component{render(){return Z.createElement(e,this.props)}}return t.displayName=e.displayName,t}const ot=(e,t)=>{const r=n=>{const o=`
29
+ data struct format is invalidate`);return o},Br=e=>{const{data:t,message:r,throwError:n,dataStruct:o}=e;return vd(({data:a})=>{try{return No(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof xo&&(s=i.failures().map(u=>`【${u.path.join(".")}】: ${u.message}
30
+ `)),{isValidate:!1,message:s,error:i}}})({data:t,message:r,throwError:n})};var Ve=(e=>(e.ROOT_CONTAINER="RootContainer",e))(Ve||{});const yd=M({type:X(oe.FUNCTION),value:m()}),md=Mr(To(ze,["componentName"]),M({componentName:X("RootContainer")}));function gd(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(o){o(r)}),(n=e.get("*"))&&n.slice().map(function(o){o(t,r)})}}}const bt=gd(),bd=(e,t)=>{const r={...e,value:[]},n=e.value;let o=new Te([]);return t&&(o=t.materialsMode||new Te([])),n&&(L(n)?r.value=n.map(a=>new F(a,{parent:t,materials:o})):Q(n)&&r.value.push(new F(n,{parent:t,materials:o}))),r};class Ge{constructor(t,r){C(this,"nodeType","SLOT"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",bt),C(this,"data"),C(this,"id"),C(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=t;const n=(r==null?void 0:r.materials)||new Te([]);this.materialsMode=n,this.id=he(),this.data=bd(t,this)}get value(){return this.data}export(t){const r=this.data,n=o=>{if(o instanceof F)return o.export(t);if(Q(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return L(o)?o.map(a=>n(a)):(t==="design"&&delete o.id,o)};return n(r)}}const Do=e=>{let t=[];return e.forEach(r=>{const n=r;n.type?n.type===Lr.SINGLE?t.push(n.content):n.type===Lr.GROUP&&(t=[...t,...Do(n.content)]):t.push(r)}),t},Ur=(e,t,r)=>{if(e.type)return e.type===oe.SLOT?new Ge(e,{parent:t,materials:r}):e;if(Q(e)){const n={};return Object.keys(e).forEach(o=>{n[o]=zr(e[o],t,r)}),n}else return Array.isArray(e)?e.map(n=>Ur(n,t,r)):e},zr=(e,t,r)=>Q(e)?Ur(e,t,r):L(e)?e.map(n=>Ur(n,t,r)):e;class Oe{constructor(t,r,n){C(this,"nodeType","PROP"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",bt),C(this,"data"),C(this,"name"),C(this,"materialsMode");const o=(n==null?void 0:n.materials)||new Te([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=t,this.data=zr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const r=this.data;this.data=zr(t??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Ge)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof F){const r=t.material;return Do((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(t){const r=this.data,n=o=>{if(o instanceof Oe||o instanceof Ge||o instanceof F)return o.export(t);if(L(o))return o.map(a=>n(a));if(Q(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return o};return n(r)}}const _d=e=>{if(typeof e=="string")return!0;Br({data:e,dataStruct:ze,throwError:!0})},ko=(e,t,r=new Te([]))=>{if(typeof e=="string")return e;const n={...e,id:e.id??he(),children:[],props:{},configure:Co(e.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(e.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=e.props)==null?void 0:i[a];if(s instanceof Oe){n.props[a]=s;return}n.props[a]=new Oe(a,s||"",{parent:t,materials:r})}),e.children&&(Array.isArray(e.children)?n.children=e.children.map(a=>{if(a instanceof F)return a;if(Q(a)){const i=a;return new F(i,{parent:t,materials:r})}else return a}):(e.children instanceof F&&(n.children=[e.children]),n.children=[new F(e.children,{parent:t,materials:r})])),n};class F{constructor(t,r){C(this,"nodeType","NODE"),C(this,"rawData"),C(this,"data"),C(this,"emitter",bt),C(this,"parent"),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),_d(t);const n=(r==null?void 0:r.materials)||new Te([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=ko(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const r={...this.export("design"),id:t||he()};return new F(r,{materials:this.materialsModel})}updateValue(t){const r=this.data,n={...this.data,...t};this.data=ko(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(t){return Wr(this,t)}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}getPlainProps(){const t=this.data,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}export(t){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(f=>{o[f]=n.props[f].export(t)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof F?f.export(t):f),i=n.configure||{},s=i.propsSetter||{},u={};Object.keys(s).forEach(f=>{const d=Un(s,f,!1);d&&(u[f]=d)}),i.propsSetter=u,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:i,props:o,children:a};return t==="design"&&delete l.id,l=Gr(l),l}}const Io=(e,t,r)=>{const n={...e,id:he(),props:{},componentName:Ve.ROOT_CONTAINER,children:[],configure:Co(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];L(e.children)?o=e.children.map(i=>i instanceof F?i:Q(i)?new F(i,{parent:t,materials:r}):i):e.children instanceof F?o.push(e.children):e.children&&Q(e.children)&&o.push(new F(e.children,{parent:t,materials:r}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const u=(s=e.props)==null?void 0:s[i];u instanceof Oe?n.props[i]=u:n.props[i]=new Oe(i,u||"",{parent:t,materials:r})}),n.children=o,n};class _t{constructor(t,{parent:r,materials:n}){C(this,"rawData"),C(this,"data"),C(this,"nodeType",Ve.ROOT_CONTAINER),C(this,"emitter",bt),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),C(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(t)),this.data=Io(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==t)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}updateValue(t){const r=this.data,n={...this.data,...t};this.data=Io(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(t){return Wr(this,t)}export(t=Dr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(u=>{o[u]=n.props[u].export(t)});const a=((r=n.children)==null?void 0:r.map(u=>{var l;return(l=u==null?void 0:u.export)==null?void 0:l.call(u,t)}))||[],i={...n,props:o,children:a.filter(u=>u)};let s=wo(i,["id"]);return s=Gr(s),s}getPlainProps(){const t=this.data,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const r={...this.export("design"),id:t||he()};return new _t(r,{materials:this.materialsModel,parent:null})}}const Ne=e=>(e==null?void 0:e.type)===oe.EXPRESSION,jd=e=>(e==null?void 0:e.type)==oe.FUNCTION,he=()=>Math.random().toString(32).slice(3,9),Ed=e=>(e==null?void 0:e.nodeType)==="NODE",Vr=e=>(e==null?void 0:e.nodeType)==="PROP",Od=e=>(e==null?void 0:e.nodeType)==="SLOT",Gr=e=>Vf(e,t=>Q(t)?!Object.keys(t).length:L(t)?!t.length:!t);function Wr(e,t){const r=[e];for(;r.length;){const n=r.shift();if((n==null?void 0:n.id)===t)return n;const o=(n==null?void 0:n.props)||{},a=s=>{if(s instanceof F){r.push(s);return}if(s instanceof Ge&&a(s.value.value),s instanceof Oe){a(s.value);return}if(Q(s)){const u=s;Object.keys(u).map(l=>{a(u[l])});return}if(L(s)){s.forEach(u=>{a(u)});return}};a(o);const i=(n==null?void 0:n.value.children.filter(s=>s instanceof F))||[];r.push(...i)}return null}const Sd=e=>{const t=ho(e),r=t.snippets;return delete t.snippets,t.snippets=r.map(n=>({...t,...n,id:n.id||`${e.componentName}-${he()}`,title:n.title||e.title,category:n.category||e.category,tags:[...n.tags||[],...e.tags||[]],groupName:n.groupName||e.groupName,snapshot:n.snapshot||e.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||e.componentName}})),t};class Cd{constructor(t){C(this,"rawData"),C(this,"data"),this.rawData=t,this.data=Sd(t)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(t){return this.data.snippets.find(r=>r.id===t)}}const wd=e=>{if(!L(e))throw new Error("Materials must be a array");return e.map(t=>new Cd(t))},xd=e=>{e==null||e.forEach(t=>{Br({data:t,dataStruct:hd,throwError:!0})})};class Te{constructor(t){C(this,"rawData"),C(this,"data"),C(this,"usedMaterials",[]),this.rawData=t,xd(t),this.data=wd(t)}findByComponentName(t){return this.data.find(r=>r.componentName===t)}findSnippetById(t){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(t)}return n}getAllSnippets(){let t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]);const r=[],n={default:[]};t=t.sort((a,i)=>(a.category||"")>(i.category||"")?1:-1),t.forEach(a=>{const i=a.groupName||"default";r.includes(i)||(r.push(i),n[i]=[]),n[i].push(a)});const o=[];return r.forEach(a=>{const i=["default"],s={default:[]},u=n[a];if(u.length!==0){u.forEach(d=>{const p=d.category||"default";i.includes(p)||(i.push(p),s[p]=[]),s[p].push(d)});const l=[];i.forEach(d=>{s[d].length&&l.push({name:d,list:s[d]})});const f={name:a,list:l};o.push(f)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Rd=M({version:m(),name:m(),css:g(m()),renderType:g(Y([X("COMPONENT"),X("PAGE")])),methods:g(B(yd)),componentsMeta:B(Mr(M({componentName:m()}),Pr)),thirdLibs:g(ad),componentsTree:md,assets:g(B(G()))}),Fo=e=>(Br({data:e,dataStruct:Rd,throwError:!0}),e),Hr=(e,t,r)=>({...e,componentsTree:new _t(e.componentsTree,{parent:t,materials:r})});class Lt{constructor(t,r){C(this,"nodeType","PAGE"),C(this,"rawData"),C(this,"emitter",bt),C(this,"data"),C(this,"parent"),C(this,"materialsModel"),C(this,"assetPackagesList"),Fo(t),this.assetPackagesList=(r==null?void 0:r.assetPackagesList)||[],this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Te((r==null?void 0:r.materials)||[]),this.data=Hr(t,this,this.materialsModel)}updatePage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Hr(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Hr(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(t){const r=this.data.componentsTree;return Wr(r,t)}addNode(t,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof _t)return console.warn("Not found parent node"),!1;if(a instanceof Oe)return console.warn("CProp can not add node"),!1;if(a instanceof Ge){const s=a.value.value,u=s.findIndex(l=>l===r)??-1;return u>=0?(n==="BEFORE"?s.splice(u,0,t):s.splice(u+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof Lt)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===r))??-1;return i>=0?(n==="BEFORE"?a==null||a.value.children.splice(i,0,t):a==null||a.value.children.splice(i+1,0,t),t.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(n==="CHILD_START")return r.value.children.unshift(t),t.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(t),t.parent=r,r.updateValue(),!0;if(Q(n)){const a=n;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?r==null||r.value.children.splice(s,0,t):r==null||r.value.children.splice(s+1,0,t),t.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new F(t,{parent:null,materials:this.materialsModel})}addNodeById(t,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(t,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(t){const r=t.export("design");r.id=he();const n=new F(r,{parent:t.parent,materials:this.materialsModel});return this.addNode(n,t,"AFTER"),n}copyNodeById(t){const r=this.getNode(t);return r&&r instanceof F?this.copyNode(r):!1}moveNode(t,r,n){this.deleteNode(t);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),t.parent=o,this.addNode(t,r,n)}moveNodeById(t,r,n){const o=this.getNode(t),a=this.getNode(r);return o&&a&&o instanceof F&&a instanceof F?this.moveNode(o,a,n):!1}deleteNode(t){var r;const n=t.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof Ge){const o=n.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),i}if(n instanceof F||n instanceof _t){const o=n.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),n.updateValue(),i}}deleteNodeById(t){const r=this.getNode(t);if(r)return this.deleteNode(r)}export(t=Dr.SAVE){var r;const n=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(u=>{const l=o.find(f=>{var d;return f.package===((d=u.value.npm)==null?void 0:d.package)});return l&&a.push(l),{componentName:u.componentName,...ho(u.value.npm||{})}}).filter(u=>{if(u.componentName&&u.package&&u.version)return!0});this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Gr(n),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(u=>{const l=o.find(f=>{f.package,f.package});l&&a.push(l)}),s.assets=Qf(a,u=>u.package),s=wo(s,["id"]),JSON.parse(JSON.stringify(s))}}Ve.ROOT_CONTAINER;var Nd=typeof global=="object"&&global&&global.Object===Object&&global;const Lo=Nd;var Td=typeof self=="object"&&self&&self.Object===Object&&self,Ad=Lo||Td||Function("return this")();const We=Ad;var Md=We.Symbol;const He=Md;var Bo=Object.prototype,$d=Bo.hasOwnProperty,Pd=Bo.toString,jt=He?He.toStringTag:void 0;function Dd(e){var t=$d.call(e,jt),r=e[jt];try{e[jt]=void 0;var n=!0}catch{}var o=Pd.call(e);return n&&(t?e[jt]=r:delete e[jt]),o}var kd=Object.prototype,Id=kd.toString;function Fd(e){return Id.call(e)}var Ld="[object Null]",Bd="[object Undefined]",Uo=He?He.toStringTag:void 0;function Et(e){return e==null?e===void 0?Bd:Ld:Uo&&Uo in Object(e)?Dd(e):Fd(e)}function Ye(e){return e!=null&&typeof e=="object"}var Ud="[object Symbol]";function zd(e){return typeof e=="symbol"||Ye(e)&&Et(e)==Ud}function Vd(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Gd=Array.isArray;const Je=Gd;var Wd=1/0,zo=He?He.prototype:void 0,Vo=zo?zo.toString:void 0;function Go(e){if(typeof e=="string")return e;if(Je(e))return Vd(e,Go)+"";if(zd(e))return Vo?Vo.call(e):"";var t=e+"";return t=="0"&&1/e==-Wd?"-0":t}function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Wo(e){return e}var Hd="[object AsyncFunction]",Yd="[object Function]",Jd="[object GeneratorFunction]",qd="[object Proxy]";function Yr(e){if(!Ae(e))return!1;var t=Et(e);return t==Yd||t==Jd||t==Hd||t==qd}var Qd=We["__core-js_shared__"];const Jr=Qd;var Ho=function(){var e=/[^.]+$/.exec(Jr&&Jr.keys&&Jr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xd(e){return!!Ho&&Ho in e}var Kd=Function.prototype,Zd=Kd.toString;function ep(e){if(e!=null){try{return Zd.call(e)}catch{}try{return e+""}catch{}}return""}var tp=/[\\^$.*+?()[\]{}|]/g,rp=/^\[object .+?Constructor\]$/,np=Function.prototype,op=Object.prototype,ap=np.toString,ip=op.hasOwnProperty,sp=RegExp("^"+ap.call(ip).replace(tp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cp(e){if(!Ae(e)||Xd(e))return!1;var t=Yr(e)?sp:rp;return t.test(ep(e))}function up(e,t){return e==null?void 0:e[t]}function qr(e,t){var r=up(e,t);return cp(r)?r:void 0}var Yo=Object.create,lp=function(){function e(){}return function(t){if(!Ae(t))return{};if(Yo)return Yo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const fp=lp;function dp(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function pp(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var hp=800,vp=16,yp=Date.now;function mp(e){var t=0,r=0;return function(){var n=yp(),o=vp-(n-r);if(r=n,o>0){if(++t>=hp)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function gp(e){return function(){return e}}var bp=function(){try{var e=qr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Bt=bp;var _p=Bt?function(e,t){return Bt(e,"toString",{configurable:!0,enumerable:!1,value:gp(t),writable:!0})}:Wo,jp=mp(_p);const Ep=jp;var Op=9007199254740991,Sp=/^(?:0|[1-9]\d*)$/;function Jo(e,t){var r=typeof e;return t=t??Op,!!t&&(r=="number"||r!="symbol"&&Sp.test(e))&&e>-1&&e%1==0&&e<t}function Qr(e,t,r){t=="__proto__"&&Bt?Bt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ut(e,t){return e===t||e!==e&&t!==t}var Cp=Object.prototype,wp=Cp.hasOwnProperty;function xp(e,t,r){var n=e[t];(!(wp.call(e,t)&&Ut(n,r))||r===void 0&&!(t in e))&&Qr(e,t,r)}function Rp(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),o?Qr(r,s,u):xp(r,s,u)}return r}var qo=Math.max;function Np(e,t,r){return t=qo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=qo(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),dp(e,this,s)}}function Tp(e,t){return Ep(Np(e,t,Wo),e+"")}var Ap=9007199254740991;function Qo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ap}function Xr(e){return e!=null&&Qo(e.length)&&!Yr(e)}function Mp(e,t,r){if(!Ae(r))return!1;var n=typeof t;return(n=="number"?Xr(r)&&Jo(t,r.length):n=="string"&&t in r)?Ut(r[t],e):!1}function $p(e){return Tp(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&Mp(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var Pp=Object.prototype;function Xo(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Pp;return e===r}function Dp(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kp="[object Arguments]";function Ko(e){return Ye(e)&&Et(e)==kp}var Zo=Object.prototype,Ip=Zo.hasOwnProperty,Fp=Zo.propertyIsEnumerable,Lp=Ko(function(){return arguments}())?Ko:function(e){return Ye(e)&&Ip.call(e,"callee")&&!Fp.call(e,"callee")};const Kr=Lp;function Bp(){return!1}var ea=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ta=ea&&typeof module=="object"&&module&&!module.nodeType&&module,Up=ta&&ta.exports===ea,ra=Up?We.Buffer:void 0,zp=ra?ra.isBuffer:void 0,Vp=zp||Bp;const na=Vp;var Gp="[object Arguments]",Wp="[object Array]",Hp="[object Boolean]",Yp="[object Date]",Jp="[object Error]",qp="[object Function]",Qp="[object Map]",Xp="[object Number]",Kp="[object Object]",Zp="[object RegExp]",eh="[object Set]",th="[object String]",rh="[object WeakMap]",nh="[object ArrayBuffer]",oh="[object DataView]",ah="[object Float32Array]",ih="[object Float64Array]",sh="[object Int8Array]",ch="[object Int16Array]",uh="[object Int32Array]",lh="[object Uint8Array]",fh="[object Uint8ClampedArray]",dh="[object Uint16Array]",ph="[object Uint32Array]",I={};I[ah]=I[ih]=I[sh]=I[ch]=I[uh]=I[lh]=I[fh]=I[dh]=I[ph]=!0,I[Gp]=I[Wp]=I[nh]=I[Hp]=I[oh]=I[Yp]=I[Jp]=I[qp]=I[Qp]=I[Xp]=I[Kp]=I[Zp]=I[eh]=I[th]=I[rh]=!1;function hh(e){return Ye(e)&&Qo(e.length)&&!!I[Et(e)]}function vh(e){return function(t){return e(t)}}var oa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ot=oa&&typeof module=="object"&&module&&!module.nodeType&&module,yh=Ot&&Ot.exports===oa,Zr=yh&&Lo.process,mh=function(){try{var e=Ot&&Ot.require&&Ot.require("util").types;return e||Zr&&Zr.binding&&Zr.binding("util")}catch{}}();const aa=mh;var ia=aa&&aa.isTypedArray,gh=ia?vh(ia):hh;const sa=gh;var bh=Object.prototype,_h=bh.hasOwnProperty;function jh(e,t){var r=Je(e),n=!r&&Kr(e),o=!r&&!n&&na(e),a=!r&&!n&&!o&&sa(e),i=r||n||o||a,s=i?Dp(e.length,String):[],u=s.length;for(var l in e)(t||_h.call(e,l))&&!(i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Jo(l,u)))&&s.push(l);return s}function Eh(e,t){return function(r){return e(t(r))}}function Oh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Sh=Object.prototype,Ch=Sh.hasOwnProperty;function wh(e){if(!Ae(e))return Oh(e);var t=Xo(e),r=[];for(var n in e)n=="constructor"&&(t||!Ch.call(e,n))||r.push(n);return r}function ca(e){return Xr(e)?jh(e,!0):wh(e)}var xh=qr(Object,"create");const St=xh;function Rh(){this.__data__=St?St(null):{},this.size=0}function Nh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Th="__lodash_hash_undefined__",Ah=Object.prototype,Mh=Ah.hasOwnProperty;function $h(e){var t=this.__data__;if(St){var r=t[e];return r===Th?void 0:r}return Mh.call(t,e)?t[e]:void 0}var Ph=Object.prototype,Dh=Ph.hasOwnProperty;function kh(e){var t=this.__data__;return St?t[e]!==void 0:Dh.call(t,e)}var Ih="__lodash_hash_undefined__";function Fh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=St&&t===void 0?Ih:t,this}function Me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Me.prototype.clear=Rh,Me.prototype.delete=Nh,Me.prototype.get=$h,Me.prototype.has=kh,Me.prototype.set=Fh;function Lh(){this.__data__=[],this.size=0}function zt(e,t){for(var r=e.length;r--;)if(Ut(e[r][0],t))return r;return-1}var Bh=Array.prototype,Uh=Bh.splice;function zh(e){var t=this.__data__,r=zt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Uh.call(t,r,1),--this.size,!0}function Vh(e){var t=this.__data__,r=zt(t,e);return r<0?void 0:t[r][1]}function Gh(e){return zt(this.__data__,e)>-1}function Wh(e,t){var r=this.__data__,n=zt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ge.prototype.clear=Lh,ge.prototype.delete=zh,ge.prototype.get=Vh,ge.prototype.has=Gh,ge.prototype.set=Wh;var Hh=qr(We,"Map");const ua=Hh;function Yh(){this.size=0,this.__data__={hash:new Me,map:new(ua||ge),string:new Me}}function Jh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vt(e,t){var r=e.__data__;return Jh(t)?r[typeof t=="string"?"string":"hash"]:r.map}function qh(e){var t=Vt(this,e).delete(e);return this.size-=t?1:0,t}function Qh(e){return Vt(this,e).get(e)}function Xh(e){return Vt(this,e).has(e)}function Kh(e,t){var r=Vt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}qe.prototype.clear=Yh,qe.prototype.delete=qh,qe.prototype.get=Qh,qe.prototype.has=Xh,qe.prototype.set=Kh;function la(e){return e==null?"":Go(e)}var Zh=Eh(Object.getPrototypeOf,Object);const fa=Zh;var ev="[object Object]",tv=Function.prototype,rv=Object.prototype,da=tv.toString,nv=rv.hasOwnProperty,ov=da.call(Object);function Qe(e){if(!Ye(e)||Et(e)!=ev)return!1;var t=fa(e);if(t===null)return!0;var r=nv.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&da.call(r)==ov}function av(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function iv(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:av(e,t,r)}var sv="\\ud800-\\udfff",cv="\\u0300-\\u036f",uv="\\ufe20-\\ufe2f",lv="\\u20d0-\\u20ff",fv=cv+uv+lv,dv="\\ufe0e\\ufe0f",pv="\\u200d",hv=RegExp("["+pv+sv+fv+dv+"]");function pa(e){return hv.test(e)}function vv(e){return e.split("")}var ha="\\ud800-\\udfff",yv="\\u0300-\\u036f",mv="\\ufe20-\\ufe2f",gv="\\u20d0-\\u20ff",bv=yv+mv+gv,_v="\\ufe0e\\ufe0f",jv="["+ha+"]",en="["+bv+"]",tn="\\ud83c[\\udffb-\\udfff]",Ev="(?:"+en+"|"+tn+")",va="[^"+ha+"]",ya="(?:\\ud83c[\\udde6-\\uddff]){2}",ma="[\\ud800-\\udbff][\\udc00-\\udfff]",Ov="\\u200d",ga=Ev+"?",ba="["+_v+"]?",Sv="(?:"+Ov+"(?:"+[va,ya,ma].join("|")+")"+ba+ga+")*",Cv=ba+ga+Sv,wv="(?:"+[va+en+"?",en,ya,ma,jv].join("|")+")",xv=RegExp(tn+"(?="+tn+")|"+wv+Cv,"g");function Rv(e){return e.match(xv)||[]}function Nv(e){return pa(e)?Rv(e):vv(e)}function Tv(e){return function(t){t=la(t);var r=pa(t)?Nv(t):void 0,n=r?r[0]:t.charAt(0),o=r?iv(r,1).join(""):t.slice(1);return n[e]()+o}}var Av=Tv("toUpperCase");const Mv=Av;function $v(e){return Mv(la(e).toLowerCase())}function Pv(){this.__data__=new ge,this.size=0}function Dv(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function kv(e){return this.__data__.get(e)}function Iv(e){return this.__data__.has(e)}var Fv=200;function Lv(e,t){var r=this.__data__;if(r instanceof ge){var n=r.__data__;if(!ua||n.length<Fv-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new qe(n)}return r.set(e,t),this.size=r.size,this}function Xe(e){var t=this.__data__=new ge(e);this.size=t.size}Xe.prototype.clear=Pv,Xe.prototype.delete=Dv,Xe.prototype.get=kv,Xe.prototype.has=Iv,Xe.prototype.set=Lv;var _a=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ja=_a&&typeof module=="object"&&module&&!module.nodeType&&module,Bv=ja&&ja.exports===_a,Ea=Bv?We.Buffer:void 0,Oa=Ea?Ea.allocUnsafe:void 0;function Uv(e,t){if(t)return e.slice();var r=e.length,n=Oa?Oa(r):new e.constructor(r);return e.copy(n),n}var zv=We.Uint8Array;const Sa=zv;function Vv(e){var t=new e.constructor(e.byteLength);return new Sa(t).set(new Sa(e)),t}function Gv(e,t){var r=t?Vv(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Wv(e){return typeof e.constructor=="function"&&!Xo(e)?fp(fa(e)):{}}function Hv(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var u=i[e?s:++o];if(r(a[u],u,a)===!1)break}return t}}var Yv=Hv();const Jv=Yv;function rn(e,t,r){(r!==void 0&&!Ut(e[t],r)||r===void 0&&!(t in e))&&Qr(e,t,r)}function qv(e){return Ye(e)&&Xr(e)}function nn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Qv(e){return Rp(e,ca(e))}function Xv(e,t,r,n,o,a,i){var s=nn(e,r),u=nn(t,r),l=i.get(u);if(l){rn(e,r,l);return}var f=a?a(s,u,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=Je(u),v=!p&&na(u),b=!p&&!v&&sa(u);f=u,p||v||b?Je(s)?f=s:qv(s)?f=pp(s):v?(d=!1,f=Uv(u,!0)):b?(d=!1,f=Gv(u,!0)):f=[]:Qe(u)||Kr(u)?(f=s,Kr(s)?f=Qv(s):(!Ae(s)||Yr(s))&&(f=Wv(u))):d=!1}d&&(i.set(u,f),o(f,u,n,a,i),i.delete(u)),rn(e,r,f)}function Ca(e,t,r,n,o){e!==t&&Jv(t,function(a,i){if(o||(o=new Xe),Ae(a))Xv(e,t,i,r,Ca,n,o);else{var s=n?n(nn(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),rn(e,i,s)}},ca)}var Kv=$p(function(e,t,r){Ca(e,t,r)});const Zv=Kv;function ey(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function ty(e){var t,r;const n=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===n||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((r=e==null?void 0:e.prototype)==null?void 0:r.setState)||e._forwardRef}function ry(e){class t extends x.Component{render(){return x.createElement(e,this.props)}}return t.displayName=e.displayName,t}const Ke=(e,t)=>{const r=n=>{const o=`
31
31
  ${Object.keys(t).map(a=>`const ${a} = $$context['${a}'];`).join(`
32
32
  `)}
33
33
  return ${n};
34
- `;return new Function("$$context",o)(t)};try{return r(e)}catch(n){console.warn(n);const o=`[${e}] expression run failed`;return console.warn(o),null}},iy=(e,t,r)=>function(...n){try{const o=`
34
+ `;return new Function("$$context",o)(t)};try{return r(e)}catch(n){console.warn(n);const o=`[${e}] expression run failed`;return console.warn(o),null}},ny=(e,t,r)=>function(...n){try{const o=`
35
35
  var f = ${e};
36
36
  var args = Array.from(arguments);
37
37
  var __$$storeManager__ = args.pop();
38
38
  var $$context = args.pop();
39
39
  $$context.stateManager = __$$storeManager__.getStateSnapshot();
40
40
  return f.apply(f, args)
41
- `;new Function(o)(...n,t,r)}catch(o){console.warn(o)}},xa=(e,t)=>{const r={};return t.forEach((n,o)=>{r[n]=e[o]}),r},Ra=e=>{const t={};return Object.keys(e).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,s)=>s!==0?kv(a):a)),t[o.join("")]=e[r]}),t},Na=e=>{let t="";return Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),t},qt="DYNAMIC",sy=["$$context","$$nodeModel"],Aa=e=>{let t;const r=new Set,n=(s,i)=>{const u=typeof s=="function"?s(t):s;if(!Object.is(u,t)){const l=t;t=(i!=null?i:typeof u!="object")?u:Object.assign({},t,u),r.forEach(f=>f(t,l))}},o=()=>t,a={setState:n,getState:o,subscribe:s=>(r.add(s),()=>r.delete(s)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,o,a),a},uy=e=>e?Aa(e):Aa;var cy=e=>(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'."),uy(e));class ly{constructor(){E(this,"storeMap",new Map)}addStore(t,r){const n=cy(r);return this.storeMap.set(t,n),n.name=t,n}setStore(t,r){this.storeMap.set(t,r)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}connect(t,r){const n=this.storeMap.get(t);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((r,n)=>{t[n]={state:r.getState(),updateState:o=>{r.setState(o)}}}),t}destroy(){this.storeMap.forEach(t=>{t.destroy()}),this.storeMap=new Map}}class Ta{constructor(){E(this,"renderMode","normal"),E(this,"components",{}),E(this,"storeManager",new ly),E(this,"runtimeComponentCache",new Map),E(this,"onGetRef"),E(this,"onGetComponent"),E(this,"onComponentMount"),E(this,"onComponentDestroy"),E(this,"processNodeConfigHook")}getComponent(t){var r;const n=t.value.componentName;let o=this.components[n]||(()=>`Component [${n}] not found`);return oy(o)||(o=ay(o),this.components[n]=o),this.onGetComponent&&(o=(r=this.onGetComponent)==null?void 0:r.call(this,o,t)),o}getContext(t={},r){let n=t;return r&&(n={...t},n.__proto__=r||null),n}pageRender(t,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:s,onComponentDestroy:i,renderMode:u,processNodeConfigHook:l}){this.renderMode=u,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=l;const f=t.value.componentsTree,d=this.getComponent(f),p=this.convertModelToComponent(d,t.value.componentsTree),v={},g=f.props;return Object.keys(g).forEach(j=>{v[j]=g[j].value}),v.$$context=o,this.render(p,v)}transformProps(t={},{$$context:r}){const n=t,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(Yr(s))return o(s.value);if(Cd(s)){const i=s.value,u=i.value;if(!u)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const l=f=>{const d=`${f.id}-${qt}`;if(this.runtimeComponentCache.get(f.id))return{key:d,component:this.runtimeComponentCache.get(f.id)};const p=this.getComponent(f),v=this.convertModelToComponent(p,f),g=i.params||[];return{component:(...j)=>{const _=xa(j,g),w=this.getContext({params:_},r);return this.render(v,{$$context:w,key:d})},key:d}};if(Array.isArray(u)){const f=u==null?void 0:u.map(d=>l(d));return(...d)=>f.map(p=>ny(p.component)?P.default.createElement(p.component,{$$context:r,key:p.key}):p.component(...d))}else return l(u).component}else{if(Me(s))return ot(s.value,r||{});if(wd(s))return iy(s.value,r,this.storeManager);if(rt(s)){let i=s;Yr(s)&&(i=s.value);const u=i,l={};return Object.keys(i).forEach(f=>{l[f]=o(u[f])}),l}else return s}},a={};return Object.keys(n).forEach(s=>{const i=n[s];a[s]=o(i)}),a}collectSpecialProps(t={},r){const n=[],o=(a,s)=>{let i=s;Yr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):et(i)?i.forEach((u,l)=>{o([...a,String(l)],u)}):rt(i)&&Object.keys(i).forEach(u=>{o([...a,u],i[u])})};return o(["$root"],t),n}convertModelToComponent(t,r){const n=this;class o extends P.default.Component{constructor(s){super(s),E(this,"_CONDITION",!0),E(this,"_DESIGN_BOX",!1),E(this,"_NODE_MODEL",r),E(this,"_NODE_ID",r.id),E(this,"UNIQUE_ID",`${r.id}_${he()}`),E(this,"targetComponentRef"),E(this,"listenerHandle",[]),E(this,"storeState"),E(this,"staticState",{}),E(this,"storeListenDisposeLint",[]),E(this,"domHeader"),E(this,"mediaStyleDomMap",{}),E(this,"updateState",l=>{this.storeState.setState(l),this.forceUpdate()}),E(this,"getStyleDomById",l=>{const f=this.mediaStyleDomMap;let d=f[l];return d||(d=document.createElement("style"),d.type="text/css",f[l]=d),d.id=l,d}),E(this,"addMediaCSS",()=>{var l;let f=this.domHeader;if(f||(f=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=f),!this.domHeader)return;const d=this._NODE_MODEL.value.css;!d||d.value.forEach(p=>{var v;const g=`${this.UNIQUE_ID}_${p.state}`;let j=`.${d.class}`;if(p.state!=="normal"&&(j=`${j}:${p.state}`),Object.keys(p.style).length!==0){const _=this.getStyleDomById(g);_.innerText=`${j} { ${Na(p.style)} }`,f==null||f.appendChild(_)}(v=p.media)!=null&&v.length&&p.media.forEach(_=>{const w=`${g}_${_.type}_${_.value}`,S=this.getStyleDomById(w);S.media=`screen and (${_.type}:${_.value}px)`,S.innerHTML=`${j} { ${Na(_.style)} }`,f==null||f.appendChild(S)})})}),E(this,"removeMediaCSS",()=>{const l=this.mediaStyleDomMap;Object.keys(l).forEach(f=>{var d;(d=this.domHeader)==null||d.removeChild(l[f])})}),E(this,"rebuildNode",()=>{this.storeListenDisposeLint.forEach(l=>l()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=P.default.createRef(),this.state=r.value.state||{};const i=r.value.stateName||r.id,u=n.storeManager.getStore(i);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(i,()=>({...r.value.state||{}})),this.storeState.subscribe(l=>{this.setState({...l})}),this.connectStore()}connectStore(){const s=n.collectSpecialProps(r.props,d=>!!Me(d)),i=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Me(d)),u=[...s,...i].map(d=>{const p=d.val,v=/\$\$context.stateManager\.(.+?)\./gim.exec(p.value);return v!=null&&v.length?v[1]:""}).filter(Boolean),l=Array.from(new Set(u)),f=[];l.length&&l.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.log(n.storeManager,d,"not exits"));const p=n.storeManager.connect(d,()=>{this.forceUpdate()});f.push(p)}),this.storeListenDisposeLint=f}componentDidMount(){var s;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(s=n.onComponentMount)==null||s.call(n,this,r);const i=()=>{n.storeManager.setStore(r.value.stateName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(i)}componentWillUnmount(){var s;this.storeListenDisposeLint.forEach(i=>i()),this.removeMediaCSS(),(s=n.onComponentDestroy)==null||s.call(n,this,r)}render(){var s,i,u;const{$$context:l,...f}=this.props,d={key:r.id,...r.props,...f},p={state:this.state||{},updateState:this.updateState,staticState:this.staticState};r.value.componentName===qe.ROOT_CONTAINER&&(p.globalState=this.state,p.updateGlobalState=this.updateState),p.stateManager=n.storeManager.getStateSnapshot();const v=n.getContext(p,l),g=r.value.loop;let j=[];if(g&&g.open){this.targetComponentRef.current=[];let q=g.data||[];if(Me(g.data)){const H=g.data;q=ot(H.value,v||{})}return j=q.map((...H)=>{var ve,ke;const oe=H[1],je=[g.forName||"item",g.forIndex||"index"],Ie=xa(H,je);let at="loopData";g.name&&(at=`${at}${g.name}`);const Se=n.getContext({[at]:Ie,staticState:this.staticState},v),te=n.transformProps(d,{$$context:Se}),Qt=((ve=r.value.classNames)==null?void 0:ve.map(ae=>{var Ce;const Le=ae.name;return Me(ae.status)&&ot(String(((Ce=ae.status)==null?void 0:Ce.value)||""),Se)?Le:""}))||[];let it=`${(ke=te.className)!=null?ke:""} ${Qt.join(" ")}`.trim();r.value.css&&(it=`${r.value.css.class} ${it}`.trim()),te.className=it;const Xt=n.transformProps(r.value.style,{$$context:Se});r.value.style&&(te.style=Ra(Xt||{}));const{children:Fe}=te;let st=[];if(Fe!==void 0)delete te.children,st=Array.isArray(Fe)?Fe:[Fe];else{const ae=[];r.value.children.forEach((Ce,Le)=>{const Tt=n.buildComponent(Ce,{$$context:Se,idx:Le});ae.push(Tt)}),st=ae}if(te.key=`${te.key}-${oe}`,Me(g.key)){const ae=g.key,Ce=ot(ae.value,Se||{});te.key+=`-${Ce}`}return te.ref=ae=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[oe]=ae},n.render(t,te,...st)}),j}const _=n.transformProps(d,{$$context:v}),{children:w}=_;let S=[];if(w!==void 0)delete _.children,S=Array.isArray(w)?w:[w];else{const q=[];r.value.children.forEach((H,ve)=>{const ke=n.buildComponent(H,{$$context:v,idx:ve});q.push(ke)}),S=q}_.ref=this.targetComponentRef;const G=((s=r.value.classNames)==null?void 0:s.map(q=>{var H;const ve=q.name;return Me(q.status)&&ot(((H=q.status)==null?void 0:H.value)||"",v)?ve:""}))||[];let I=`${(i=_.className)!=null?i:""} ${G.join(" ")}`.trim();r.value.css&&(I=`${r.value.css.class} ${I}`.trim()),_.className=I;const W=n.transformProps(r.value.style,{$$context:v});r.value.style&&(_.style=Ra(W||{}));let J=(u=r.value.condition)!=null?u:!0;typeof J!="boolean"&&(J=ot(J.value,v||{}));let le={condition:J,props:_};n.processNodeConfigHook&&(le=n.processNodeConfigHook(le,r));const T=n.render(t,le.props,...S);return this._CONDITION=le.condition,le.condition?T:Be("div",{style:{display:"none"},children:T})}}return E(o,"__CP_TYPE__",qt),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(t,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof t=="string"?this.render(t):Sd(t)?(({currentNode:o})=>{const a=o.value.id;let s=null;if(n.get(a))s=n.get(a);else{const l=this.getComponent(o);s=this.convertModelToComponent(l,o)}!n.get(a)&&this.renderMode!=="design"&&n.set(a,s);const i=`${a}-${qt}`,u={$$context:r,$$nodeModel:t,key:i};return this.render(s,u)})({currentNode:t}):void 0}render(t,r={},...n){return typeof t=="string"||typeof t=="number"?String(t):(sy.forEach(o=>{o in r&&t.__CP_TYPE__!==qt&&delete r[o]}),P.default.createElement(t,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const fy=bn(new Ta),dy=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],_e=e=>{const t={};return e.forEach(r=>{t[r.key]=r.value}),t},py=[...dy,...cd],hy=py.reduce((e,t)=>(e[t]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),P.default.createElement(t,{...o,..._e(n)},...a)},e),{}),vy=({children:e,width:t,height:r,$$attributes:n=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(l=>l!==void 0);const{style:s={},...i}=_e(n),u={height:r,width:t,...s,...o.style||{}};return P.default.createElement("div",{...o,...i,style:u},...a)},yy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),P.default.createElement("canvas",{...r,..._e(t)},...n)},my=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),P.default.createElement("img",{...r,..._e(t)},...n)},gy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),P.default.createElement("video",{...r,..._e(t)},...n)},by=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),P.default.createElement("video",{...r,..._e(t)},...n)},_y=({children:e,$$attributes:t=[],content:r,...n})=>Be("span",{...n,..._e(t),children:r}),jy=({children:e,$$attributes:t=[],afterMount:r,beforeDestroy:n,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),Z.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),P.default.createElement("div",{...o,..._e(t)},...a)},Ey=({children:e,$$attributes:t=[],htmlTag:r="div",...n})=>{let o=e;return Array.isArray(e)||(o=[e]),P.default.createElement(r,{...n,..._e(t)},...o)},Oy={RootContainer:({children:e})=>e,...hy,CContainer:jy,CVideo:gy,CAudio:by,CBlock:vy,CImage:my,CText:_y,CCanvas:yy,CNativeTag:Ey};class wy{constructor(){E(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,r){this.refMap.set(t,r)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class Ma extends P.default.Component{constructor(t){super(t),E(this,"refManager"),E(this,"dynamicComponentInstanceMap",new Map),E(this,"onGetRef",(r,n,o)=>{var a,s;(s=(a=this.props).onGetRef)==null||s.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)}),E(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(rt(r)&&Lo(r)){const n=r;this.setState({pageModel:new Gt(n,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new Gt(t.page)},this.refManager=new wy}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:t}=this.props;t&&(t.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:t}=this,{adapter:r,onGetComponent:n,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:s}=this.state;if(!s)return console.warn("pageModel is null"),null;const i={...Oy,...t.components};return r.pageRender(s,{libs:{},components:i,onGetRef:this.onGetRef,onGetComponent:n,onComponentMount:a,onComponentDestroy:o,$$context:{refs:this.refManager},renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}const Sy=()=>{const e=Z.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)}}};class Cy extends P.default.Component{constructor(t){super(t),E(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){var n,o;(o=(n=this.props).onError)==null||o.call(n,r)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,r=this.props.node.value;console.error(this.props.node,this.props.children);const n=mn("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",r.id,", node name\uFF1A",r.title," component name\uFF1A",r.title||r.componentName,mn("p",{children:["msg: ",String(this.state.error)]}),Be("button",{onDoubleClick:t,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"},children:"double click to refresh"}),Be("div",{style:{display:"none"}})]});return P.default.createElement(this.props.targetComponent,{onlyRenderChild:!0},n)}return this.props.children}}class $a{constructor(){E(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,r){const n=this.instanceMap.get(t);n?n.push(r):this.instanceMap.set(t,[r])}remove(t,r){const n=this.instanceMap.get(t);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const Pa=e=>{const{node:t}=e,r=Z.useMemo(()=>{var i,u;const l=(u=(i=t.material)==null?void 0:i.value)==null?void 0:u.isContainer;return rt(l)?l:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:n,height:o,width:a,style:s}=r;return Be("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",minWidth:"300px",minHeight:"50px",width:a,height:o,...s},children:n})};class xy extends P.default.Component{constructor(t){super(t),E(this,"instanceManager",new $a),E(this,"renderRef"),E(this,"dropPlaceholder",Pa),E(this,"onGetComponent",(r,n)=>{const o=this;class a extends P.default.Component{constructor(){super(...arguments),E(this,"_DESIGN_BOX",!0),E(this,"_NODE_MODEL",n),E(this,"_NODE_ID",n.id),E(this,"_UNIQUE_ID",`${n.id}_${he()}`),E(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var i;const{children:u=[],onlyRenderChild:l,...f}=this.props;let d=u;return et(u)||(d=[u]),!Boolean(d.filter(Boolean).length)&&(((i=n.material)==null?void 0:i.value.isContainer)||n.value.componentName===qe.ROOT_CONTAINER)&&d.push(P.default.createElement(o.dropPlaceholder,{node:n})),l?d:P.default.createElement(r,f,...d)}}return P.default.forwardRef(function(s,i){return P.default.createElement(Cy,{node:n,targetComponent:a},P.default.createElement(a,{ref:i,...s}))})}),this.renderRef=P.default.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,r;(r=(t=this.props).onMount)==null||r.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var r;return(r=this.renderRef.current)==null?void 0:r.rerender(t)}getInstancesById(t,r){let n=[...this.instanceManager.get(t)||[]];return r!==void 0&&(n=n.filter(o=>r===(o==null?void 0:o._UNIQUE_ID))),n}getInstanceByDom(t){const r=Da(t);if(!r)return null;const n=ka(r);return(n==null?void 0:n.stateNode)||null}getDomsById(t,r){const n=this.getInstancesById(t),o=[];return n==null||n.forEach(a=>{if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=ti.findDOMNode(a);if(s&&!(s instanceof Text))if(r){const i=Array.from(s.querySelectorAll(r));o.push(...i)}else o.push(s)}),o}getDomRectById(t,r){return this.getDomsById(t,r).map(n=>n==null?void 0:n.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:r}=this,{render:n,...o}=t;return n&&(n.ref.current=this),Be(Ma,{onGetComponent:r,...o,processNodeConfigHook:(a,s)=>{var i,u;if(s.nodeType!=="NODE")return a;const{props:l,condition:f}=a;let d={...l};const p=((i=s.value.configure)==null?void 0:i.devState)||{},v=(u=s.material)==null?void 0:u.value.fixedProps;if(v!==void 0){if(rt(v))d={...d,...v};else if(typeof v=="function"){const j=v(d);d={...d,...j}}}let g=f;return p.condition===!1&&(g=p.condition),{props:ry(d,p.props||{}),condition:g}},ref:this.renderRef})}}const Da=e=>{if(!e)return null;const t=Object.keys(e).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return t?e[t]:Da(e.parentElement)},ka=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:ka(e.return):null},Ry=()=>{const e=Z.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)},getInstancesById(t,r){var n;return((n=e.current)==null?void 0:n.getInstancesById(t,r))||[]},getInstanceByDom(t){var r;return((r=e.current)==null?void 0:r.getInstanceByDom(t))||null},getDomsById(t,r){var n;return((n=e.current)==null?void 0:n.getDomsById(t,r))||[]},getDomRectById(t,r){var n;return((n=e.current)==null?void 0:n.getDomRectById(t,r))||[]}}};var Ny=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ia={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ny,function(){var r=function(){},n={},o={},a={};function s(p,v){p=p.push?p:[p];var g=[],j=p.length,_=j,w,S,G,I;for(w=function(W,J){J.length&&g.push(W),_--,_||v(g)};j--;){if(S=p[j],G=o[S],G){w(S,G);continue}I=a[S]=a[S]||[],I.push(w)}}function i(p,v){if(p){var g=a[p];if(o[p]=v,!!g)for(;g.length;)g[0](p,v),g.splice(0,1)}}function u(p,v){p.call&&(p={success:p}),v.length?(p.error||r)(v):(p.success||r)(p)}function l(p,v,g,j){var _=document,w=g.async,S=(g.numRetries||0)+1,G=g.before||r,I=p.replace(/[\?|#].*$/,""),W=p.replace(/^(css|img|module|nomodule)!/,""),J,le,T;if(j=j||0,/(^css!|\.css$)/.test(I))T=_.createElement("link"),T.rel="stylesheet",T.href=W,J="hideFocus"in T,J&&T.relList&&(J=0,T.rel="preload",T.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(I))T=_.createElement("img"),T.src=W;else if(T=_.createElement("script"),T.src=W,T.async=w===void 0?!0:w,le="noModule"in T,/^module!/.test(I)){if(!le)return v(p,"l");T.type="module"}else if(/^nomodule!/.test(I)&&le)return v(p,"l");T.onload=T.onerror=T.onbeforeload=function(q){var H=q.type[0];if(J)try{T.sheet.cssText.length||(H="e")}catch(ve){ve.code!=18&&(H="e")}if(H=="e"){if(j+=1,j<S)return l(p,v,g,j)}else if(T.rel=="preload"&&T.as=="style")return T.rel="stylesheet";v(p,H,q.defaultPrevented)},G(p,T)!==!1&&_.head.appendChild(T)}function f(p,v,g){p=p.push?p:[p];var j=p.length,_=j,w=[],S,G;for(S=function(I,W,J){if(W=="e"&&w.push(I),W=="b")if(J)w.push(I);else return;j--,j||v(w)},G=0;G<_;G++)l(p[G],S,g)}function d(p,v,g){var j,_;if(v&&v.trim&&(j=v),_=(j?g:v)||{},j){if(j in n)throw"LoadJS";n[j]=!0}function w(S,G){f(p,function(I){u(_,I),S&&u({success:S,error:G},I),i(j,I)},_)}if(_.returnPromise)return new Promise(w);w()}return d.ready=function(p,v){return s(p,function(g){u(v,g)}),d},d.done=function(p){i(p,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(p){return p in n},d})})(Ia);const Fa=Ia.exports;class Ay{constructor(t,r){E(this,"assets"),E(this,"loadStatus"),E(this,"win",window),E(this,"_onSuccessList",[]),E(this,"_onErrorList",[]),this.assets=t,this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const t=this.assets||[],r=[];for(let n=0;n<t.length;n++){const o=t[n];o.id||(o.id=he()),r.push(o.id);const a=o.resources.map(s=>s.src);Fa(a,o.id,{async:!1,before:(s,i)=>(this.win.document.body.appendChild(i),!1)})}if(t.length===0){this._onSuccessList.forEach(n=>n());return}return setTimeout(()=>{Fa.ready(r,{success:()=>{this._onSuccessList.forEach(n=>n())},error:n=>{this._onErrorList.forEach(o=>o(n))}})},0),this}onSuccess(t){return this._onSuccessList.push(t),this}onError(t){return this._onErrorList.push(t),this}}return Object.freeze(Object.defineProperty({__proto__:null,AssetLoader:Ay,ComponentInstanceManager:$a,DefaultDropPlaceholder:Pa,DefineReactAdapter:Ta,DesignRender:xy,ReactAdapter:fy,Render:Ma,getAdapter:bn,useDesignRender:Ry,useRender:Sy},Symbol.toStringTag,{value:"Module"}))});
41
+ `;new Function(o)(...n,t,r)}catch(o){console.warn(o)}},wa=(e,t)=>{const r={};return t.forEach((n,o)=>{r[n]=e[o]}),r},xa=e=>{const t={};return Object.keys(e).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?$v(a):a)),t[o.join("")]=e[r]}),t},Ra=e=>{let t="";return Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),t},Gt="DYNAMIC",oy=["$$context","$$nodeModel"],Na=e=>{let t;const r=new Set,n=(i,s)=>{const u=typeof i=="function"?i(t):i;if(!Object.is(u,t)){const l=t;t=s??typeof u!="object"?u:Object.assign({},t,u),r.forEach(f=>f(t,l))}},o=()=>t,a={setState:n,getState:o,subscribe:i=>(r.add(i),()=>r.delete(i)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,o,a),a},ay=e=>e?Na(e):Na;var iy=e=>(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'."),ay(e));class sy{constructor(){j(this,"storeMap",new Map)}addStore(t,r){const n=iy(r);return this.storeMap.set(t,n),n.name=t,n}setStore(t,r){this.storeMap.set(t,r)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}connect(t,r){const n=this.storeMap.get(t);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((r,n)=>{t[n]={state:r.getState(),updateState:o=>{r.setState(o)}}}),t}destroy(){this.storeMap.forEach(t=>{t.destroy()}),this.storeMap=new Map}}class Ta{constructor(){j(this,"renderMode","normal"),j(this,"components",{}),j(this,"storeManager",new sy),j(this,"runtimeComponentCache",new Map),j(this,"onGetRef"),j(this,"onGetComponent"),j(this,"onComponentMount"),j(this,"onComponentDestroy"),j(this,"processNodeConfigHook")}getComponent(t){var r;const n=t.value.componentName;let o=this.components[n]||(()=>`Component [${n}] not found`);return ty(o)||(o=ry(o),this.components[n]=o),this.onGetComponent&&(o=(r=this.onGetComponent)==null?void 0:r.call(this,o,t)),o}getContext(t={},r){let n=t;return r&&(n={...t},n.__proto__=r||null),n}pageRender(t,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:u,processNodeConfigHook:l}){this.renderMode=u,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=l;const f=t.value.componentsTree,d=this.getComponent(f),p=this.convertModelToComponent(d,t.value.componentsTree),v={},b=f.props;return Object.keys(b).forEach(_=>{v[_]=b[_].value}),v.$$context=o,this.render(p,v)}transformProps(t={},{$$context:r}){const n=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(Vr(i))return o(i.value);if(Od(i)){const s=i.value,u=s.value;if(!u)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const l=f=>{const d=`${f.id}-${Gt}`;if(this.runtimeComponentCache.get(f.id))return{key:d,component:this.runtimeComponentCache.get(f.id)};const p=this.getComponent(f),v=this.convertModelToComponent(p,f),b=s.params||[];return{component:(..._)=>{const E=wa(_,b),w=this.getContext({params:E},r);return this.render(v,{$$context:w,key:d})},key:d}};if(Array.isArray(u)){const f=u==null?void 0:u.map(d=>l(d));return(...d)=>f.map(p=>ey(p.component)?x.createElement(p.component,{$$context:r,key:p.key}):p.component(...d))}else return l(u).component}else{if(Ne(i))return Ke(i.value,r||{});if(jd(i))return ny(i.value,r,this.storeManager);if(Qe(i)){let s=i;Vr(i)&&(s=i.value);const u=s,l={};return Object.keys(s).forEach(f=>{l[f]=o(u[f])}),l}else return i}},a={};return Object.keys(n).forEach(i=>{const s=n[i];a[i]=o(s)}),a}collectSpecialProps(t={},r){const n=[],o=(a,i)=>{let s=i;Vr(i)&&(s=i.value),r(s)?n.push({keyPath:a,val:s}):Je(s)?s.forEach((u,l)=>{o([...a,String(l)],u)}):Qe(s)&&Object.keys(s).forEach(u=>{o([...a,u],s[u])})};return o(["$root"],t),n}convertModelToComponent(t,r){const n=this;class o extends x.Component{constructor(i){super(i),j(this,"_CONDITION",!0),j(this,"_DESIGN_BOX",!1),j(this,"_NODE_MODEL",r),j(this,"_NODE_ID",r.id),j(this,"UNIQUE_ID",`${r.id}_${he()}`),j(this,"targetComponentRef"),j(this,"listenerHandle",[]),j(this,"storeState"),j(this,"staticState",{}),j(this,"storeListenDisposeLint",[]),j(this,"domHeader"),j(this,"mediaStyleDomMap",{}),j(this,"updateState",l=>{this.storeState.setState(l),this.forceUpdate()}),j(this,"getStyleDomById",l=>{const f=this.mediaStyleDomMap;let d=f[l];return d||(d=document.createElement("style"),d.type="text/css",f[l]=d),d.id=l,d}),j(this,"addMediaCSS",()=>{var l;let f=this.domHeader;if(f||(f=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=f),!this.domHeader)return;const d=this._NODE_MODEL.value.css;d&&d.value.forEach(p=>{var v;const b=`${this.UNIQUE_ID}_${p.state}`;let _=`.${d.class}`;if(p.state!=="normal"&&(_=`${_}:${p.state}`),Object.keys(p.style).length!==0){const E=this.getStyleDomById(b);E.innerText=`${_} { ${Ra(p.style)} }`,f==null||f.appendChild(E)}(v=p.media)!=null&&v.length&&p.media.forEach(E=>{const w=`${b}_${E.type}_${E.value}`,S=this.getStyleDomById(w);S.media=`screen and (${E.type}:${E.value}px)`,S.innerHTML=`${_} { ${Ra(E.style)} }`,f==null||f.appendChild(S)})})}),j(this,"removeMediaCSS",()=>{const l=this.mediaStyleDomMap;Object.keys(l).forEach(f=>{var d;(d=this.domHeader)==null||d.removeChild(l[f])})}),j(this,"rebuildNode",()=>{this.storeListenDisposeLint.forEach(l=>l()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=x.createRef(),this.state=r.value.state||{};const s=r.value.stateName||r.id,u=n.storeManager.getStore(s);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(s,()=>({...r.value.state||{}})),this.storeState.subscribe(l=>{this.setState({...l})}),this.connectStore()}connectStore(){const i=n.collectSpecialProps(r.props,d=>!!Ne(d)),s=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Ne(d)),u=[...i,...s].map(d=>{const p=d.val,v=/\$\$context.stateManager\.(.+?)\./gim.exec(p.value);return v!=null&&v.length?v[1]:""}).filter(Boolean),l=Array.from(new Set(u)),f=[];l.length&&l.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.log(n.storeManager,d,"not exits"));const p=n.storeManager.connect(d,()=>{this.forceUpdate()});f.push(p)}),this.storeListenDisposeLint=f}componentDidMount(){var i;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(i=n.onComponentMount)==null||i.call(n,this,r);const s=()=>{n.storeManager.setStore(r.value.stateName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeLint.forEach(s=>s()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var i;const{$$context:s,...u}=this.props,l={key:r.id,...r.props,...u},f={state:this.state||{},updateState:this.updateState,staticState:this.staticState};r.value.componentName===Ve.ROOT_CONTAINER&&(f.globalState=this.state,f.updateGlobalState=this.updateState),f.stateManager=n.storeManager.getStateSnapshot();const d=n.getContext(f,s),p=r.value.loop;let v=[];if(p&&p.open){this.targetComponentRef.current=[];let J=p.data||[];if(Ne(p.data)){const N=p.data;J=Ke(N.value,d||{})}return v=J.map((...N)=>{var ae;const le=N[1],Ct=[p.forName||"item",p.forIndex||"index"],Ht=wa(N,Ct);let ee="loopData";p.name&&(ee=`${ee}${p.name}`);const te=n.getContext({[ee]:Ht,staticState:this.staticState},d),H=n.transformProps(l,{$$context:te}),Yt=((ae=r.value.classNames)==null?void 0:ae.map(re=>{var _e;const tt=re.name;return Ne(re.status)&&Ke(String(((_e=re.status)==null?void 0:_e.value)||""),te)?tt:""}))||[];let Ze=`${H.className??""} ${Yt.join(" ")}`.trim();r.value.css&&(Ze=`${r.value.css.class} ${Ze}`.trim()),H.className=Ze;const Jt=n.transformProps(r.value.style,{$$context:te});r.value.style&&(H.style=xa(Jt||{}));const{children:$e}=H;let et=[];if($e!==void 0)delete H.children,et=Array.isArray($e)?$e:[$e];else{const re=[];r.value.children.forEach((_e,tt)=>{const on=n.buildComponent(_e,{$$context:te,idx:tt});re.push(on)}),et=re}if(H.key=`${H.key}-${le}`,Ne(p.key)){const re=p.key,_e=Ke(re.value,te||{});H.key+=`-${_e}`}return H.ref=re=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[le]=re},n.render(t,H,...et)}),v}const b=n.transformProps(l,{$$context:d}),{children:_}=b;let E=[];if(_!==void 0)delete b.children,E=Array.isArray(_)?_:[_];else{const J=[];r.value.children.forEach((N,ae)=>{const le=n.buildComponent(N,{$$context:d,idx:ae});J.push(le)}),E=J}b.ref=this.targetComponentRef;const w=((i=r.value.classNames)==null?void 0:i.map(J=>{var N;const ae=J.name;return Ne(J.status)&&Ke(((N=J.status)==null?void 0:N.value)||"",d)?ae:""}))||[];let S=`${b.className??""} ${w.join(" ")}`.trim();r.value.css&&(S=`${r.value.css.class} ${S}`.trim()),b.className=S;const W=n.transformProps(r.value.style,{$$context:d});r.value.style&&(b.style=xa(W||{}));let D=r.value.condition??!0;typeof D!="boolean"&&(D=Ke(D.value,d||{}));let U={condition:D,props:b};n.processNodeConfigHook&&(U=n.processNodeConfigHook(U,r));const Z=n.render(t,U.props,...E);return this._CONDITION=U.condition,U.condition?Z:Pe("div",{style:{display:"none"},children:Z})}}return j(o,"__CP_TYPE__",Gt),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(t,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof t=="string"?this.render(t):Ed(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(n.get(a))i=n.get(a);else{const l=this.getComponent(o);i=this.convertModelToComponent(l,o)}!n.get(a)&&this.renderMode!=="design"&&n.set(a,i);const s=`${a}-${Gt}`,u={$$context:r,$$nodeModel:t,key:s};return this.render(i,u)})({currentNode:t}):void 0}render(t,r={},...n){return typeof t=="string"||typeof t=="number"?String(t):(oy.forEach(o=>{o in r&&t.__CP_TYPE__!==Gt&&delete r[o]}),x.createElement(t,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const cy=gn(new Ta),uy=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],be=e=>{const t={};return e.forEach(r=>{t[r.key]=r.value}),t},ly=[...uy,...id],fy=ly.reduce((e,t)=>(e[t]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),x.createElement(t,{...o,...be(n)},...a)},e),{}),dy=({children:e,width:t,height:r,$$attributes:n=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(l=>l!==void 0);const{style:i={},...s}=be(n),u={height:r,width:t,...i,...o.style||{}};return x.createElement("div",{...o,...s,style:u},...a)},py=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("canvas",{...r,...be(t)},...n)},hy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("img",{...r,...be(t)},...n)},vy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("video",{...r,...be(t)},...n)},yy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("video",{...r,...be(t)},...n)},my=({children:e,$$attributes:t=[],content:r,...n})=>Pe("span",{...n,...be(t),children:r}),gy=({children:e,$$attributes:t=[],afterMount:r,beforeDestroy:n,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),x.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),x.createElement("div",{...o,...be(t)},...a)},by=({children:e,$$attributes:t=[],htmlTag:r="div",...n})=>{let o=e;return Array.isArray(e)||(o=[e]),x.createElement(r,{...n,...be(t)},...o)},_y={RootContainer:({children:e})=>e,...fy,CContainer:gy,CVideo:vy,CAudio:yy,CBlock:dy,CImage:hy,CText:my,CCanvas:py,CNativeTag:by};class jy{constructor(){j(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,r){this.refMap.set(t,r)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class Aa extends x.Component{constructor(t){super(t),j(this,"refManager"),j(this,"dynamicComponentInstanceMap",new Map),j(this,"onGetRef",(r,n,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)}),j(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(Qe(r)&&Fo(r)){const n=r;this.setState({pageModel:new Lt(n,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new Lt(t.page)},this.refManager=new jy}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:t}=this.props;t&&(t.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:t}=this,{adapter:r,onGetComponent:n,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={..._y,...t.components};return r.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:n,onComponentMount:a,onComponentDestroy:o,$$context:{refs:this.refManager},renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}const Ey=()=>{const e=x.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)}}};class Oy extends x.Component{constructor(t){super(t),j(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){var n,o;(o=(n=this.props).onError)==null||o.call(n,r)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,r=this.props.node.value;console.error(this.props.node,this.props.children);const n=yn("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",r.id,", node name:",r.title," component name:",r.title||r.componentName,yn("p",{children:["msg: ",String(this.state.error)]}),Pe("button",{onDoubleClick:t,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"},children:"double click to refresh"}),Pe("div",{style:{display:"none"}})]});return x.createElement(this.props.targetComponent,{onlyRenderChild:!0},n)}return this.props.children}}class Ma{constructor(){j(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,r){const n=this.instanceMap.get(t);n?n.push(r):this.instanceMap.set(t,[r])}remove(t,r){const n=this.instanceMap.get(t);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const $a=e=>{const{node:t}=e,r=x.useMemo(()=>{var s,u;const l=(u=(s=t.material)==null?void 0:s.value)==null?void 0:u.isContainer;return Qe(l)?l:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:n,height:o,width:a,style:i}=r;return Pe("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",minWidth:"300px",minHeight:"50px",width:a,height:o,...i},children:n})};class Sy extends x.Component{constructor(t){super(t),j(this,"instanceManager",new Ma),j(this,"renderRef"),j(this,"dropPlaceholder",$a),j(this,"onGetComponent",(r,n)=>{const o=this;class a extends x.Component{constructor(){super(...arguments),j(this,"_DESIGN_BOX",!0),j(this,"_NODE_MODEL",n),j(this,"_NODE_ID",n.id),j(this,"_UNIQUE_ID",`${n.id}_${he()}`),j(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var s;const{children:u=[],onlyRenderChild:l,...f}=this.props;let d=u;return Je(u)||(d=[u]),!d.filter(Boolean).length&&((s=n.material)!=null&&s.value.isContainer||n.value.componentName===Ve.ROOT_CONTAINER)&&d.push(x.createElement(o.dropPlaceholder,{node:n})),l?d:x.createElement(r,f,...d)}}return x.forwardRef(function(i,s){return x.createElement(Oy,{node:n,targetComponent:a},x.createElement(a,{ref:s,...i}))})}),this.renderRef=x.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,r;(r=(t=this.props).onMount)==null||r.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var r;return(r=this.renderRef.current)==null?void 0:r.rerender(t)}getInstancesById(t,r){let n=[...this.instanceManager.get(t)||[]];return r!==void 0&&(n=n.filter(o=>r===(o==null?void 0:o._UNIQUE_ID))),n}getInstanceByDom(t){const r=Pa(t);if(!r)return null;const n=Da(r);return(n==null?void 0:n.stateNode)||null}getDomsById(t,r){const n=this.getInstancesById(t),o=[];return n==null||n.forEach(a=>{if((a==null?void 0:a._STATUS)==="DESTROY")return;const i=Xa.findDOMNode(a);if(i&&!(i instanceof Text))if(r){const s=Array.from(i.querySelectorAll(r));o.push(...s)}else o.push(i)}),o}getDomRectById(t,r){return this.getDomsById(t,r).map(n=>n==null?void 0:n.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:r}=this,{render:n,...o}=t;return n&&(n.ref.current=this),Pe(Aa,{onGetComponent:r,...o,processNodeConfigHook:(a,i)=>{var s,u;if(i.nodeType!=="NODE")return a;const{props:l,condition:f}=a;let d={...l};const p=((s=i.value.configure)==null?void 0:s.devState)||{},v=(u=i.material)==null?void 0:u.value.fixedProps;if(v!==void 0){if(Qe(v))d={...d,...v};else if(typeof v=="function"){const _=v(d);d={...d,..._}}}let b=f;return p.condition===!1&&(b=p.condition),{props:Zv(d,p.props||{}),condition:b}},ref:this.renderRef})}}const Pa=e=>{if(!e)return null;const t=Object.keys(e).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return t?e[t]:Pa(e.parentElement)},Da=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Da(e.return):null},Cy=()=>{const e=x.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)},getInstancesById(t,r){var n;return((n=e.current)==null?void 0:n.getInstancesById(t,r))||[]},getInstanceByDom(t){var r;return((r=e.current)==null?void 0:r.getInstanceByDom(t))||null},getDomsById(t,r){var n;return((n=e.current)==null?void 0:n.getDomsById(t,r))||[]},getDomRectById(t,r){var n;return((n=e.current)==null?void 0:n.getDomRectById(t,r))||[]}}};var wy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wt={},xy={get exports(){return Wt},set exports(e){Wt=e}};(function(e,t){(function(r,n){e.exports=n()})(wy,function(){var r=function(){},n={},o={},a={};function i(p,v){p=p.push?p:[p];var b=[],_=p.length,E=_,w,S,W,D;for(w=function(U,Z){Z.length&&b.push(U),E--,E||v(b)};_--;){if(S=p[_],W=o[S],W){w(S,W);continue}D=a[S]=a[S]||[],D.push(w)}}function s(p,v){if(p){var b=a[p];if(o[p]=v,!!b)for(;b.length;)b[0](p,v),b.splice(0,1)}}function u(p,v){p.call&&(p={success:p}),v.length?(p.error||r)(v):(p.success||r)(p)}function l(p,v,b,_){var E=document,w=b.async,S=(b.numRetries||0)+1,W=b.before||r,D=p.replace(/[\?|#].*$/,""),U=p.replace(/^(css|img|module|nomodule)!/,""),Z,J,N;if(_=_||0,/(^css!|\.css$)/.test(D))N=E.createElement("link"),N.rel="stylesheet",N.href=U,Z="hideFocus"in N,Z&&N.relList&&(Z=0,N.rel="preload",N.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D))N=E.createElement("img"),N.src=U;else if(N=E.createElement("script"),N.src=U,N.async=w===void 0?!0:w,J="noModule"in N,/^module!/.test(D)){if(!J)return v(p,"l");N.type="module"}else if(/^nomodule!/.test(D)&&J)return v(p,"l");N.onload=N.onerror=N.onbeforeload=function(ae){var le=ae.type[0];if(Z)try{N.sheet.cssText.length||(le="e")}catch(Ct){Ct.code!=18&&(le="e")}if(le=="e"){if(_+=1,_<S)return l(p,v,b,_)}else if(N.rel=="preload"&&N.as=="style")return N.rel="stylesheet";v(p,le,ae.defaultPrevented)},W(p,N)!==!1&&E.head.appendChild(N)}function f(p,v,b){p=p.push?p:[p];var _=p.length,E=_,w=[],S,W;for(S=function(D,U,Z){if(U=="e"&&w.push(D),U=="b")if(Z)w.push(D);else return;_--,_||v(w)},W=0;W<E;W++)l(p[W],S,b)}function d(p,v,b){var _,E;if(v&&v.trim&&(_=v),E=(_?b:v)||{},_){if(_ in n)throw"LoadJS";n[_]=!0}function w(S,W){f(p,function(D){u(E,D),S&&u({success:S,error:W},D),s(_,D)},E)}if(E.returnPromise)return new Promise(w);w()}return d.ready=function(p,v){return i(p,function(b){u(v,b)}),d},d.done=function(p){s(p,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(p){return p in n},d})})(xy);class Ry{constructor(t,r){j(this,"assets"),j(this,"loadStatus"),j(this,"win",window),j(this,"_onSuccessList",[]),j(this,"_onErrorList",[]),this.assets=t,this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const t=this.assets||[],r=[];for(let n=0;n<t.length;n++){const o=t[n];o.id||(o.id=he()),r.push(o.id);const a=o.resources.map(i=>i.src);Wt(a,o.id,{async:!1,before:(i,s)=>(this.win.document.body.appendChild(s),!1)})}if(t.length===0){this._onSuccessList.forEach(n=>n());return}return setTimeout(()=>{Wt.ready(r,{success:()=>{this._onSuccessList.forEach(n=>n())},error:n=>{this._onErrorList.forEach(o=>o(n))}})},0),this}onSuccess(t){return this._onSuccessList.push(t),this}onError(t){return this._onErrorList.push(t),this}}return Object.freeze(Object.defineProperty({__proto__:null,AssetLoader:Ry,ComponentInstanceManager:Ma,DefaultDropPlaceholder:$a,DefineReactAdapter:Ta,DesignRender:Sy,ReactAdapter:cy,Render:Aa,getAdapter:gn,useDesignRender:Cy,useRender:Ey},Symbol.toStringTag,{value:"Module"}))});
42
42
  //# sourceMappingURL=render.umd.js.map