@chamn/engine 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/CSSEditor/index.d.ts +1 -1
- package/dist/component/CSSPropertiesEditor/index.d.ts +3 -27
- package/dist/component/CSSPropertiesEditor/signleProperty.d.ts +25 -0
- package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +3 -1
- package/dist/component/CSSPropertiesVariableBindEditor/SingleProperty.d.ts +24 -0
- package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +5 -26
- package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +1 -0
- package/dist/component/CSSSizeInput/index.d.ts +39 -0
- package/dist/component/CSSSizeInput/style.module.scss.d.ts +10 -0
- package/dist/component/CSSUIPanel/BackgroundInput/index.d.ts +10 -0
- package/dist/component/CSSUIPanel/BorderInput/index.d.ts +10 -0
- package/dist/component/CSSUIPanel/DimensionInput/index.d.ts +11 -0
- package/dist/component/CSSUIPanel/FontInput/index.d.ts +10 -0
- package/dist/component/CSSUIPanel/MarginAndPaddingInput/index.d.ts +11 -0
- package/dist/component/CSSUIPanel/ShadowInput/index.d.ts +10 -0
- package/dist/component/CSSUIPanel/index.d.ts +9 -0
- package/dist/component/CSSUIPanel/style.module.scss.d.ts +11 -0
- package/dist/component/CSSUIPanel/type.d.ts +3 -0
- package/dist/component/ClassNameEditor/index.d.ts +3 -9
- package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +1 -0
- package/dist/component/CustomSchemaForm/components/Setters/AntDColorSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/CSSSizeSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/ColorSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/RadioGroupSetter/index.d.ts +2 -0
- package/dist/component/CustomSchemaForm/components/Setters/SliderSetter/index.d.ts +3 -0
- package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +3 -3
- package/dist/component/InputNumberPlus/index.d.ts +9 -0
- package/dist/component/InputNumberPlus/style.module.scss.d.ts +6 -0
- package/dist/config/colorPickerColorList.d.ts +4 -0
- package/dist/index.js +141 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28517 -18256
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/RightPanel/view.d.ts +1 -0
- package/dist/plugins/VisualPanelPlus/index.d.ts +2 -7
- package/dist/style.css +1 -1
- package/dist/utils/css.d.ts +26 -5
- package/dist/utils/index.d.ts +4 -1
- package/package.json +28 -18
- package/dist/component/CSSPropertiesEditor/util.d.ts +0 -1
- package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +0 -1
- package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m2=Object.defineProperty;var b2=(e,t,n)=>t in e?m2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(b2(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),gn=require("react-dom"),A=require("antd"),De=require("@chamn/model"),Mn=require("@chamn/layout");function tb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Z=tb(b),y2=tb(gn);var Wa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mu={exports:{}},ja={};/**
|
|
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
|
|
9
|
+
*/var np;function x2(){if(np)return ja;np=1;var e=b,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=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,l,c){var u,f={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(f[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)f[u]===void 0&&(f[u]=l[u]);return{$$typeof:t,type:s,key:d,ref:h,props:f,_owner:o.current}}return ja.Fragment=n,ja.jsx=i,ja.jsxs=i,ja}var Da={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,22 +14,22 @@
|
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var rp;function w2(){return rp||(rp=1,"{}".NODE_ENV!=="production"&&function(){var e=b,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=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"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function m(E){if(E===null||typeof E!="object")return null;var z=v&&E[v]||E[g];return typeof z=="function"?z:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(E){{for(var z=arguments.length,X=new Array(z>1?z-1:0),he=1;he<z;he++)X[he-1]=arguments[he];_("error",E,X)}}function _(E,z,X){{var he=y.ReactDebugCurrentFrame,Ce=he.getStackAddendum();Ce!==""&&(z+="%s",X=X.concat([Ce]));var ke=X.map(function(we){return String(we)});ke.unshift("Warning: "+z),Function.prototype.apply.call(console[E],console,ke)}}var S=!1,x=!1,C=!1,O=!1,$=!1,k;k=Symbol.for("react.module.reference");function P(E){return!!(typeof E=="string"||typeof E=="function"||E===r||E===a||$||E===o||E===c||E===u||O||E===h||S||x||C||typeof E=="object"&&E!==null&&(E.$$typeof===d||E.$$typeof===f||E.$$typeof===i||E.$$typeof===s||E.$$typeof===l||E.$$typeof===k||E.getModuleId!==void 0))}function j(E,z,X){var he=E.displayName;if(he)return he;var Ce=z.displayName||z.name||"";return Ce!==""?X+"("+Ce+")":X}function L(E){return E.displayName||"Context"}function F(E){if(E==null)return null;if(typeof E.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case s:var z=E;return L(z)+".Consumer";case i:var X=E;return L(X._context)+".Provider";case l:return j(E,E.render,"ForwardRef");case f:var he=E.displayName||null;return he!==null?he:F(E.type)||"Memo";case d:{var Ce=E,ke=Ce._payload,we=Ce._init;try{return F(we(ke))}catch{return null}}}return null}var W=Object.assign,B=0,G,ne,fe,D,R,T,N;function I(){}I.__reactDisabledLog=!0;function H(){{if(B===0){G=console.log,ne=console.info,fe=console.warn,D=console.error,R=console.group,T=console.groupCollapsed,N=console.groupEnd;var E={configurable:!0,enumerable:!0,value:I,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}B++}}function Y(){{if(B--,B===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},E,{value:G}),info:W({},E,{value:ne}),warn:W({},E,{value:fe}),error:W({},E,{value:D}),group:W({},E,{value:R}),groupCollapsed:W({},E,{value:T}),groupEnd:W({},E,{value:N})})}B<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=y.ReactCurrentDispatcher,re;function oe(E,z,X){{if(re===void 0)try{throw Error()}catch(Ce){var he=Ce.stack.trim().match(/\n( *(at )?)/);re=he&&he[1]||""}return`
|
|
18
|
+
`+re+E}}var ue=!1,q;{var me=typeof WeakMap=="function"?WeakMap:Map;q=new me}function U(E,z){if(!E||ue)return"";{var X=q.get(E);if(X!==void 0)return X}var he;ue=!0;var Ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ke;ke=J.current,J.current=null,H();try{if(z){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(Yn){he=Yn}Reflect.construct(E,[],we)}else{try{we.call()}catch(Yn){he=Yn}E.call(we.prototype)}}else{try{throw Error()}catch(Yn){he=Yn}E()}}catch(Yn){if(Yn&&he&&typeof Yn.stack=="string"){for(var ye=Yn.stack.split(`
|
|
19
|
+
`),Pt=he.stack.split(`
|
|
20
|
+
`),rt=ye.length-1,at=Pt.length-1;rt>=1&&at>=0&&ye[rt]!==Pt[at];)at--;for(;rt>=1&&at>=0;rt--,at--)if(ye[rt]!==Pt[at]){if(rt!==1||at!==1)do if(rt--,at--,at<0||ye[rt]!==Pt[at]){var en=`
|
|
21
|
+
`+ye[rt].replace(" at new "," at ");return E.displayName&&en.includes("<anonymous>")&&(en=en.replace("<anonymous>",E.displayName)),typeof E=="function"&&q.set(E,en),en}while(rt>=1&&at>=0);break}}}finally{ue=!1,J.current=ke,Y(),Error.prepareStackTrace=Ce}var fo=E?E.displayName||E.name:"",tp=fo?oe(fo):"";return typeof E=="function"&&q.set(E,tp),tp}function Te(E,z,X){return U(E,!1)}function Ze(E){var z=E.prototype;return!!(z&&z.isReactComponent)}function qe(E,z,X){if(E==null)return"";if(typeof E=="function")return U(E,Ze(E));if(typeof E=="string")return oe(E);switch(E){case c:return oe("Suspense");case u:return oe("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return Te(E.render);case f:return qe(E.type,z,X);case d:{var he=E,Ce=he._payload,ke=he._init;try{return qe(ke(Ce),z,X)}catch{}}}return""}var Tt=Object.prototype.hasOwnProperty,ln={},cn=y.ReactDebugCurrentFrame;function Le(E){if(E){var z=E._owner,X=qe(E.type,E._source,z?z.type:null);cn.setExtraStackFrame(X)}else cn.setExtraStackFrame(null)}function Ee(E,z,X,he,Ce){{var ke=Function.call.bind(Tt);for(var we in E)if(ke(E,we)){var ye=void 0;try{if(typeof E[we]!="function"){var Pt=Error((he||"React class")+": "+X+" type `"+we+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[we]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Pt.name="Invariant Violation",Pt}ye=E[we](z,we,he,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(rt){ye=rt}ye&&!(ye instanceof Error)&&(Le(Ce),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",he||"React class",X,we,typeof ye),Le(null)),ye instanceof Error&&!(ye.message in ln)&&(ln[ye.message]=!0,Le(Ce),w("Failed %s type: %s",X,ye.message),Le(null))}}}var Be=Array.isArray;function nt(E){return Be(E)}function Qt(E){{var z=typeof Symbol=="function"&&Symbol.toStringTag,X=z&&E[Symbol.toStringTag]||E.constructor.name||"Object";return X}}function so(E){try{return lo(E),!1}catch{return!0}}function lo(E){return""+E}function co(E){if(so(E))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qt(E)),lo(E)}var At=y.ReactCurrentOwner,$n={key:!0,ref:!0,__self:!0,__source:!0},Tn,$r,ct;ct={};function uo(E){if(Tt.call(E,"ref")){var z=Object.getOwnPropertyDescriptor(E,"ref").get;if(z&&z.isReactWarning)return!1}return E.ref!==void 0}function Wn(E){if(Tt.call(E,"key")){var z=Object.getOwnPropertyDescriptor(E,"key").get;if(z&&z.isReactWarning)return!1}return E.key!==void 0}function Ma(E,z){if(typeof E.ref=="string"&&At.current&&z&&At.current.stateNode!==z){var X=F(At.current.type);ct[X]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(At.current.type),E.ref),ct[X]=!0)}}function pr(E,z){{var X=function(){Tn||(Tn=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};X.isReactWarning=!0,Object.defineProperty(E,"key",{get:X,configurable:!0})}}function Tr(E,z){{var X=function(){$r||($r=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};X.isReactWarning=!0,Object.defineProperty(E,"ref",{get:X,configurable:!0})}}var Gn=function(E,z,X,he,Ce,ke,we){var ye={$$typeof:t,type:E,key:z,ref:X,props:we,_owner:ke};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:he}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function gr(E,z,X,he,Ce){{var ke,we={},ye=null,Pt=null;X!==void 0&&(co(X),ye=""+X),Wn(z)&&(co(z.key),ye=""+z.key),uo(z)&&(Pt=z.ref,Ma(z,Ce));for(ke in z)Tt.call(z,ke)&&!$n.hasOwnProperty(ke)&&(we[ke]=z[ke]);if(E&&E.defaultProps){var rt=E.defaultProps;for(ke in rt)we[ke]===void 0&&(we[ke]=rt[ke])}if(ye||Pt){var at=typeof E=="function"?E.displayName||E.name||"Unknown":E;ye&&pr(we,at),Pt&&Tr(we,at)}return Gn(E,ye,Pt,Ce,he,At.current,we)}}var Pr=y.ReactCurrentOwner,ut=y.ReactDebugCurrentFrame;function Pe(E){if(E){var z=E._owner,X=qe(E.type,E._source,z?z.type:null);ut.setExtraStackFrame(X)}else ut.setExtraStackFrame(null)}var ft;ft=!1;function be(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function Re(){{if(Pr.current){var E=F(Pr.current.type);if(E)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+E+"`."}return""}}function Fe(E){{if(E!==void 0){var z=E.fileName.replace(/^.*[\\\/]/,""),X=E.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at
|
|
25
|
+
Check your code at `+z+":"+X+"."}return""}}var ze={};function wt(E){{var z=Re();if(!z){var X=typeof E=="string"?E:E.displayName||E.name;X&&(z=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+V+">.")}return $}}function ln(_,$){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var V=_t($);if(ct[V])return;ct[V]=!0;var Q="";_&&_._owner&&_._owner!==uo.current&&(Q=" It was passed a child from "+L(_._owner.type)+"."),Pe(_),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,Q),Pe(null)}}function ut(_,$){{if(typeof _!="object")return;if(Ge(_))for(var V=0;V<_.length;V++){var Q=_[V];et(Q)&&ln(Q,$)}else if(et(_))_._store&&(_._store.validated=!0);else if(_){var pe=b(_);if(typeof pe=="function"&&pe!==_.entries)for(var ye=pe.call(_),le;!(le=ye.next()).done;)et(le.value)&&ln(le.value,$)}}}function $n(_){{var $=_.type;if($==null||typeof $=="string")return;var V;if(typeof $=="function")V=$.propTypes;else if(typeof $=="object"&&($.$$typeof===l||$.$$typeof===d))V=$.propTypes;else return;if(V){var Q=L($);me(V,_.props,"prop",Q,_)}else if($.PropTypes!==void 0&&!Ze){Ze=!0;var pe=L($);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pe||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function In(_){{for(var $=Object.keys(_.props),V=0;V<$.length;V++){var Q=$[V];if(Q!=="children"&&Q!=="key"){Pe(_),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),Pe(null);break}}_.ref!==null&&(Pe(_),S("Invalid attribute `ref` supplied to `React.Fragment`."),Pe(null))}}function Ln(_,$,V,Q,pe,ye){{var le=T(_);if(!le){var se="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(se+=" 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 ot=lt(pe);ot?se+=ot:se+=Mt();var Be;_===null?Be="null":Ge(_)?Be="array":_!==void 0&&_.$$typeof===t?(Be="<"+(L(_.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):Be=typeof _,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Be,se)}var Fe=Ji(_,$,V,pe,ye);if(Fe==null)return Fe;if(le){var Rt=$.children;if(Rt!==void 0)if(Q)if(Ge(Rt)){for(var ur=0;ur<Rt.length;ur++)ut(Rt[ur],_);Object.freeze&&Object.freeze(Rt)}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 ut(Rt,_)}return _===r?In(Fe):$n(Fe),Fe}}function cr(_,$,V){return Ln(_,$,V,!0)}function ma(_,$,V){return Ln(_,$,V,!1)}var Bn=ma,zn=cr;po.Fragment=r,po.jsx=Bn,po.jsxs=zn}()),po}"{}".NODE_ENV==="production"?Hs.exports=Gy():Hs.exports=Ky();var Xl=Hs.exports;const Ye=Xl.Fragment,w=Xl.jsx,ee=Xl.jsxs;var qy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=globalThis&&globalThis.__assign||function(){return He=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},He.apply(this,arguments)},xu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Cu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ya={width:"20px",height:"20px",position:"absolute"},Yy={top:He(He({},xu),{top:"-5px"}),right:He(He({},Cu),{left:void 0,right:"-5px"}),bottom:He(He({},xu),{top:void 0,bottom:"-5px"}),left:He(He({},Cu),{left:"-5px"}),topRight:He(He({},ya),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:He(He({},ya),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:He(He({},ya),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:He(He({},ya),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Xy=function(e){qy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return w("div",{className:this.props.className||"",style:He(He({position:"absolute",userSelect:"none"},Yy[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(W.PureComponent),Jy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=globalThis&&globalThis.__assign||function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Yt.apply(this,arguments)},Qy={width:"auto",height:"auto"},ba=function(e,t,n){return Math.max(Math.min(e,n),t)},Ou=function(e,t){return Math.round(e/t)*t},dr=function(e,t){return new RegExp(e,"i").test(t)},wa=function(e){return!!(e.touches&&e.touches.length)},Zy=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Eu=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(a,i,s){return Math.abs(i-e)<Math.abs(t[a]-e)?s:a},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},Qi=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Sa=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},eb=function(e,t,n,r,o,a,i){return r=Sa(r,e.width,t,n),o=Sa(o,e.height,t,n),a=Sa(a,e.width,t,n),i=Sa(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof i>"u"?void 0:Number(i)}},tb=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],_u="__resizable_base__",Ru=function(e){Jy(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(_u):a.className+=_u,o.appendChild(a),a},r.removeBase=function(o){var a=r.parentNode;a&&a.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Qy},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),u=c/l[s]*100;return u+"%"}return Qi(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?Qi(r.width):o("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?Qi(r.height):o("height");return{width:a,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,a=this.state.direction,i=o&&dr("left",a),s=o&&dr("top",a),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=i?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,a=this.props.resizeRatio||1,i=this.state,s=i.direction,l=i.original,c=this.props,u=c.lockAspectRatio,d=c.lockAspectRatioExtraHeight,f=c.lockAspectRatioExtraWidth,p=l.width,h=l.height,m=d||0,b=f||0;return dr("right",s)&&(p=l.width+(n-l.x)*a/o,u&&(h=(p-b)/this.ratio+m)),dr("left",s)&&(p=l.width-(n-l.x)*a/o,u&&(h=(p-b)/this.ratio+m)),dr("bottom",s)&&(h=l.height+(r-l.y)*a/o,u&&(p=(h-m)*this.ratio+b)),dr("top",s)&&(h=l.height-(r-l.y)*a/o,u&&(p=(h-m)*this.ratio+b)),{newWidth:p,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,a){var i=this.props,s=i.lockAspectRatio,l=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,u=typeof a.width>"u"?10:a.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof a.height>"u"?10:a.height,p=typeof o.height>"u"||o.height<0?r:o.height,h=l||0,m=c||0;if(s){var b=(f-h)*this.ratio+m,y=(p-h)*this.ratio+m,S=(u-m)/this.ratio+h,E=(d-m)/this.ratio+h,x=Math.max(u,b),v=Math.min(d,y),O=Math.max(f,S),C=Math.min(p,E);n=ba(n,x,v),r=ba(r,O,C)}else n=ba(n,u,d),r=ba(r,f,p);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var a=this.resizable.getBoundingClientRect(),i=a.left,s=a.top,l=a.right,c=a.bottom;this.resizableLeft=i,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,a=0;if(n.nativeEvent&&Zy(n.nativeEvent)?(o=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&wa(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Yt(Yt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&wa(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,i=o.maxHeight,s=o.minWidth,l=o.minHeight,c=wa(n)?n.touches[0].clientX:n.clientX,u=wa(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,p=d.original,h=d.width,m=d.height,b=this.getParentSize(),y=eb(b,this.window.innerWidth,this.window.innerHeight,a,i,s,l);a=y.maxWidth,i=y.maxHeight,s=y.minWidth,l=y.minHeight;var S=this.calculateNewSizeFromDirection(c,u),E=S.newHeight,x=S.newWidth,v=this.calculateNewMaxFromBoundary(a,i);this.props.snap&&this.props.snap.x&&(x=Eu(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=Eu(E,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(x,E,{width:v.maxWidth,height:v.maxHeight},{width:s,height:l});if(x=O.newWidth,E=O.newHeight,this.props.grid){var C=Ou(x,this.props.grid[0]),R=Ou(E,this.props.grid[1]),N=this.props.snapGap||0;x=N===0||Math.abs(C-x)<=N?C:x,E=N===0||Math.abs(R-E)<=N?R:E}var T={width:x-p.width,height:E-p.height};if(h&&typeof h=="string"){if(h.endsWith("%")){var k=x/b.width*100;x=k+"%"}else if(h.endsWith("vw")){var j=x/this.window.innerWidth*100;x=j+"vw"}else if(h.endsWith("vh")){var L=x/this.window.innerHeight*100;x=L+"vh"}}if(m&&typeof m=="string"){if(m.endsWith("%")){var k=E/b.height*100;E=k+"%"}else if(m.endsWith("vw")){var j=E/this.window.innerWidth*100;E=j+"vw"}else if(m.endsWith("vh")){var L=E/this.window.innerHeight*100;E=L+"vh"}}var M={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?M.flexBasis=M.width:this.flexDir==="column"&&(M.flexBasis=M.height),Lt.flushSync(function(){r.setState(M)}),this.props.onResize&&this.props.onResize(n,f,this.resizable,T)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,a=r.direction,i=r.original;if(!(!o||!this.resizable)){var s={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Yt(Yt({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,a=r.handleStyles,i=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?w(Xy,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:a&&a[d],className:i&&i[d],children:c&&c[d]?c[d]:null},d):null});return w("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,s){return tb.indexOf(s)!==-1||(i[s]=n.props[s]),i},{}),o=Yt(Yt(Yt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return ee(a,{...Yt({ref:this.ref,style:o,className:this.props.className},r),children:[this.state.isResizing&&w("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(W.PureComponent);const nb="_workbenchContainer_b7h5o_2",rb="_topToolBarBox_b7h5o_8",ob="_topToolBarView_b7h5o_14",ab="_bodyContent_b7h5o_17",ib="_leftBox_b7h5o_23",sb="_pluginIconBar_b7h5o_29",lb="_pluginIconItem_b7h5o_34",cb="_active_b7h5o_44",ub="_pluginPanelBoxResizeBox_b7h5o_60",db="_pluginHeader_b7h5o_67",fb="_pluginNameText_b7h5o_75",pb="_closeBtn_b7h5o_82",hb="_fixedBtn_b7h5o_83",gb="_pluginPanelBox_b7h5o_60",vb="_rightResizeBox_b7h5o_98",mb="_arrowCursor_b7h5o_101",yb="_rightBox_b7h5o_116",bb="_centerBox_b7h5o_122",wb="_subTopToolbarBox_b7h5o_128",Sb="_canvasBox_b7h5o_133",xb="_scrollBox_b7h5o_140",Cb="_customViewBox_b7h5o_146",ke={workbenchContainer:nb,topToolBarBox:rb,topToolBarView:ob,bodyContent:ab,leftBox:ib,pluginIconBar:sb,pluginIconItem:lb,active:cb,pluginPanelBoxResizeBox:ub,pluginHeader:db,pluginNameText:fb,closeBtn:pb,fixedBtn:hb,pluginPanelBox:gb,rightResizeBox:vb,arrowCursor:mb,rightBox:yb,centerBox:bb,subTopToolbarBox:wb,canvasBox:Sb,scrollBox:xb,customViewBox:Cb};var Ob=g.createContext({});const Gp=Ob;function Oe(e){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}function Eb(e,t){if(Oe(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Oe(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kp(e){var t=Eb(e,"string");return Oe(t)==="symbol"?t:String(t)}function ae(e,t,n){return t=Kp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nu(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qp(e){if(Array.isArray(e))return e}function _b(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function Us(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jl(e,t){if(e){if(typeof e=="string")return Us(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Us(e,t)}}function Yp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
27
|
+
Check the top-level render call using <`+X+">.")}return z}}function Zt(E,z){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var X=wt(z);if(ze[X])return;ze[X]=!0;var he="";E&&E._owner&&E._owner!==Pr.current&&(he=" It was passed a child from "+F(E._owner.type)+"."),Pe(E),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,he),Pe(null)}}function St(E,z){{if(typeof E!="object")return;if(nt(E))for(var X=0;X<E.length;X++){var he=E[X];be(he)&&Zt(he,z)}else if(be(E))E._store&&(E._store.validated=!0);else if(E){var Ce=m(E);if(typeof Ce=="function"&&Ce!==E.entries)for(var ke=Ce.call(E),we;!(we=ke.next()).done;)be(we.value)&&Zt(we.value,z)}}}function Kn(E){{var z=E.type;if(z==null||typeof z=="string")return;var X;if(typeof z=="function")X=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===l||z.$$typeof===f))X=z.propTypes;else return;if(X){var he=F(z);Ee(X,E.props,"prop",he,E)}else if(z.PropTypes!==void 0&&!ft){ft=!0;var Ce=F(z);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ce||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qn(E){{for(var z=Object.keys(E.props),X=0;X<z.length;X++){var he=z[X];if(he!=="children"&&he!=="key"){Pe(E),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",he),Pe(null);break}}E.ref!==null&&(Pe(E),w("Invalid attribute `ref` supplied to `React.Fragment`."),Pe(null))}}function Xn(E,z,X,he,Ce,ke){{var we=P(E);if(!we){var ye="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ye+=" 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 Pt=Fe(Ce);Pt?ye+=Pt:ye+=Re();var rt;E===null?rt="null":nt(E)?rt="array":E!==void 0&&E.$$typeof===t?(rt="<"+(F(E.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):rt=typeof E,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",rt,ye)}var at=gr(E,z,X,Ce,ke);if(at==null)return at;if(we){var en=z.children;if(en!==void 0)if(he)if(nt(en)){for(var fo=0;fo<en.length;fo++)St(en[fo],E);Object.freeze&&Object.freeze(en)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else St(en,E)}return E===r?qn(at):Kn(at),at}}function Ot(E,z,X){return Xn(E,z,X,!0)}function es(E,z,X){return Xn(E,z,X,!1)}var kr=es,Nr=Ot;Da.Fragment=r,Da.jsx=kr,Da.jsxs=Nr}()),Da}"{}".NODE_ENV==="production"?mu.exports=x2():mu.exports=w2();var Vf=mu.exports;const vt=Vf.Fragment,p=Vf.jsx,M=Vf.jsxs;var S2=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=globalThis&&globalThis.__assign||function(){return it=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},it.apply(this,arguments)},op={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},ap={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ts={width:"20px",height:"20px",position:"absolute"},C2={top:it(it({},op),{top:"-5px"}),right:it(it({},ap),{left:void 0,right:"-5px"}),bottom:it(it({},op),{top:void 0,bottom:"-5px"}),left:it(it({},ap),{left:"-5px"}),topRight:it(it({},ts),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:it(it({},ts),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:it(it({},ts),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:it(it({},ts),{left:"-10px",top:"-10px",cursor:"nw-resize"})},_2=function(e){S2(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return p("div",{className:this.props.className||"",style:it(it({position:"absolute",userSelect:"none"},C2[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(Z.PureComponent),O2=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nn=globalThis&&globalThis.__assign||function(){return Nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Nn.apply(this,arguments)},E2={width:"auto",height:"auto"},ns=function(e,t,n){return Math.max(Math.min(e,n),t)},ip=function(e,t){return Math.round(e/t)*t},ho=function(e,t){return new RegExp(e,"i").test(t)},rs=function(e){return!!(e.touches&&e.touches.length)},R2=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},sp=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(a,i,s){return Math.abs(i-e)<Math.abs(t[a]-e)?s:a},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},fc=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},os=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},$2=function(e,t,n,r,o,a,i){return r=os(r,e.width,t,n),o=os(o,e.height,t,n),a=os(a,e.width,t,n),i=os(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof i>"u"?void 0:Number(i)}},T2=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],lp="__resizable_base__",cp=function(e){O2(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(lp):a.className+=lp,o.appendChild(a),a},r.removeBase=function(o){var a=r.parentNode;a&&a.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||E2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),u=c/l[s]*100;return u+"%"}return fc(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?fc(r.width):o("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?fc(r.height):o("height");return{width:a,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,a=this.state.direction,i=o&&ho("left",a),s=o&&ho("top",a),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=i?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,a=this.props.resizeRatio||1,i=this.state,s=i.direction,l=i.original,c=this.props,u=c.lockAspectRatio,f=c.lockAspectRatioExtraHeight,d=c.lockAspectRatioExtraWidth,h=l.width,v=l.height,g=f||0,m=d||0;return ho("right",s)&&(h=l.width+(n-l.x)*a/o,u&&(v=(h-m)/this.ratio+g)),ho("left",s)&&(h=l.width-(n-l.x)*a/o,u&&(v=(h-m)/this.ratio+g)),ho("bottom",s)&&(v=l.height+(r-l.y)*a/o,u&&(h=(v-g)*this.ratio+m)),ho("top",s)&&(v=l.height-(r-l.y)*a/o,u&&(h=(v-g)*this.ratio+m)),{newWidth:h,newHeight:v}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,a){var i=this.props,s=i.lockAspectRatio,l=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,u=typeof a.width>"u"?10:a.width,f=typeof o.width>"u"||o.width<0?n:o.width,d=typeof a.height>"u"?10:a.height,h=typeof o.height>"u"||o.height<0?r:o.height,v=l||0,g=c||0;if(s){var m=(d-v)*this.ratio+g,y=(h-v)*this.ratio+g,w=(u-g)/this.ratio+v,_=(f-g)/this.ratio+v,S=Math.max(u,m),x=Math.min(f,y),C=Math.max(d,w),O=Math.min(h,_);n=ns(n,S,x),r=ns(r,C,O)}else n=ns(n,u,f),r=ns(r,d,h);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var a=this.resizable.getBoundingClientRect(),i=a.left,s=a.top,l=a.right,c=a.bottom;this.resizableLeft=i,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,a=0;if(n.nativeEvent&&R2(n.nativeEvent)?(o=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&rs(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var f={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Nn(Nn({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(f)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&rs(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,i=o.maxHeight,s=o.minWidth,l=o.minHeight,c=rs(n)?n.touches[0].clientX:n.clientX,u=rs(n)?n.touches[0].clientY:n.clientY,f=this.state,d=f.direction,h=f.original,v=f.width,g=f.height,m=this.getParentSize(),y=$2(m,this.window.innerWidth,this.window.innerHeight,a,i,s,l);a=y.maxWidth,i=y.maxHeight,s=y.minWidth,l=y.minHeight;var w=this.calculateNewSizeFromDirection(c,u),_=w.newHeight,S=w.newWidth,x=this.calculateNewMaxFromBoundary(a,i);this.props.snap&&this.props.snap.x&&(S=sp(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=sp(_,this.props.snap.y,this.props.snapGap));var C=this.calculateNewSizeFromAspectRatio(S,_,{width:x.maxWidth,height:x.maxHeight},{width:s,height:l});if(S=C.newWidth,_=C.newHeight,this.props.grid){var O=ip(S,this.props.grid[0]),$=ip(_,this.props.grid[1]),k=this.props.snapGap||0;S=k===0||Math.abs(O-S)<=k?O:S,_=k===0||Math.abs($-_)<=k?$:_}var P={width:S-h.width,height:_-h.height};if(v&&typeof v=="string"){if(v.endsWith("%")){var j=S/m.width*100;S=j+"%"}else if(v.endsWith("vw")){var L=S/this.window.innerWidth*100;S=L+"vw"}else if(v.endsWith("vh")){var F=S/this.window.innerHeight*100;S=F+"vh"}}if(g&&typeof g=="string"){if(g.endsWith("%")){var j=_/m.height*100;_=j+"%"}else if(g.endsWith("vw")){var L=_/this.window.innerWidth*100;_=L+"vw"}else if(g.endsWith("vh")){var F=_/this.window.innerHeight*100;_=F+"vh"}}var W={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?W.flexBasis=W.width:this.flexDir==="column"&&(W.flexBasis=W.height),gn.flushSync(function(){r.setState(W)}),this.props.onResize&&this.props.onResize(n,d,this.resizable,P)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,a=r.direction,i=r.original;if(!(!o||!this.resizable)){var s={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Nn(Nn({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,a=r.handleStyles,i=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(f){return o[f]!==!1?p(_2,{direction:f,onResizeStart:n.onResizeStart,replaceStyles:a&&a[f],className:i&&i[f],children:c&&c[f]?c[f]:null},f):null});return p("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,s){return T2.indexOf(s)!==-1||(i[s]=n.props[s]),i},{}),o=Nn(Nn(Nn({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return M(a,{...Nn({ref:this.ref,style:o,className:this.props.className},r),children:[this.state.isResizing&&p("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(Z.PureComponent);const P2="_workbenchContainer_b7h5o_2",k2="_topToolBarBox_b7h5o_8",N2="_topToolBarView_b7h5o_14",A2="_bodyContent_b7h5o_17",M2="_leftBox_b7h5o_23",j2="_pluginIconBar_b7h5o_29",D2="_pluginIconItem_b7h5o_34",I2="_active_b7h5o_44",L2="_pluginPanelBoxResizeBox_b7h5o_60",B2="_pluginHeader_b7h5o_67",F2="_pluginNameText_b7h5o_75",z2="_closeBtn_b7h5o_82",H2="_fixedBtn_b7h5o_83",V2="_pluginPanelBox_b7h5o_60",U2="_rightResizeBox_b7h5o_98",W2="_arrowCursor_b7h5o_101",G2="_rightBox_b7h5o_116",K2="_centerBox_b7h5o_122",q2="_subTopToolbarBox_b7h5o_128",X2="_canvasBox_b7h5o_133",Y2="_scrollBox_b7h5o_140",J2="_customViewBox_b7h5o_146",Xe={workbenchContainer:P2,topToolBarBox:k2,topToolBarView:N2,bodyContent:A2,leftBox:M2,pluginIconBar:j2,pluginIconItem:D2,active:I2,pluginPanelBoxResizeBox:L2,pluginHeader:B2,pluginNameText:F2,closeBtn:z2,fixedBtn:H2,pluginPanelBox:V2,rightResizeBox:U2,arrowCursor:W2,rightBox:G2,centerBox:K2,subTopToolbarBox:q2,canvasBox:X2,scrollBox:Y2,customViewBox:J2};var Q2=b.createContext({});const nb=Q2;function Ie(e){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ie(e)}function Z2(e,t){if(Ie(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ie(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rb(e){var t=Z2(e,"string");return Ie(t)==="symbol"?t:String(t)}function ve(e,t,n){return t=rb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?up(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ob(e){if(Array.isArray(e))return e}function eC(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function bu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uf(e,t){if(e){if(typeof e=="string")return bu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bu(e,t)}}function ab(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(e,t){return ob(e)||eC(e,t)||Uf(e,t)||ab()}function tC(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Wo(e,t){if(e==null)return{};var n=tC(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var ib={exports:{}};/*!
|
|
29
29
|
Copyright (c) 2018 Jed Watson.
|
|
30
30
|
Licensed under the MIT License (MIT), see
|
|
31
31
|
http://jedwatson.github.io/classnames
|
|
32
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Xp);var Nb=Xp.exports;const Ql=Yl(Nb);function tt(e,t){Tb(e)&&(e="100%");var n=Pb(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xa(e){return Math.min(1,Math.max(0,e))}function Tb(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Pb(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Jp(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ca(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gn(e){return e.length===1?"0"+e:String(e)}function kb(e,t,n){return{r:tt(e,255)*255,g:tt(t,255)*255,b:tt(n,255)*255}}function Tu(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,s=(r+o)/2;if(r===o)i=0,a=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function Zi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jb(e,t,n){var r,o,a;if(e=tt(e,360),t=tt(t,100),n=tt(n,100),t===0)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=Zi(s,i,e+1/3),o=Zi(s,i,e),a=Zi(s,i,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function Qa(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,s=r-o,l=r===0?0:s/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break}a/=6}return{h:a,s:l,v:i}}function Mb(e,t,n){e=tt(e,360)*6,t=tt(t,100),n=tt(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],d=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:d*255}}function Za(e,t,n,r){var o=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Ab(e,t,n,r,o){var a=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16)),Gn(Db(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Db(e){return Math.round(parseFloat(e)*255).toString(16)}function Pu(e){return yt(e)/255}function yt(e){return parseInt(e,16)}function $b(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ws={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Bt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Bb(e)),typeof e=="object"&&(un(e.r)&&un(e.g)&&un(e.b)?(t=kb(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):un(e.h)&&un(e.s)&&un(e.v)?(r=Ca(e.s),o=Ca(e.v),t=Mb(e.h,r,o),i=!0,s="hsv"):un(e.h)&&un(e.s)&&un(e.l)&&(r=Ca(e.s),a=Ca(e.l),t=jb(e.h,r,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Jp(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ib="[-\\+]?\\d+%?",Lb="[-\\+]?\\d*\\.\\d+%?",_n="(?:".concat(Lb,")|(?:").concat(Ib,")"),es="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),ts="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),Dt={CSS_UNIT:new RegExp(_n),rgb:new RegExp("rgb"+es),rgba:new RegExp("rgba"+ts),hsl:new RegExp("hsl"+es),hsla:new RegExp("hsla"+ts),hsv:new RegExp("hsv"+es),hsva:new RegExp("hsva"+ts),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bb(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ws[e])e=Ws[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Dt.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Dt.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Dt.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Dt.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Dt.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Dt.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Dt.hex8.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),a:Pu(n[4]),format:t?"name":"hex8"}:(n=Dt.hex6.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),format:t?"name":"hex"}:(n=Dt.hex4.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),a:Pu(n[4]+n[4]),format:t?"name":"hex8"}:(n=Dt.hex3.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function un(e){return!!Dt.CSS_UNIT.exec(String(e))}var wt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=$b(t)),this.originalInput=t;var o=Bt(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Jp(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Qa(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Qa(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Tu(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Tu(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Za(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Ab(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(tt(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(tt(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Za(this.r,this.g,this.b,!1),n=0,r=Object.entries(Ws);n<r.length;n++){var o=r[n],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0,a=!n&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=xa(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=xa(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=xa(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=xa(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Oa=2,ku=.16,zb=.05,Vb=.05,Fb=.15,Qp=5,Zp=4,Hb=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ju(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ea(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function Ub(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Mu(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Oa*t:Math.round(e.h)+Oa*t:r=n?Math.round(e.h)+Oa*t:Math.round(e.h)-Oa*t,r<0?r+=360:r>=360&&(r-=360),r}function Au(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-ku*t:t===Zp?r=e.s+ku:r=e.s+zb*t,r>1&&(r=1),n&&t===Qp&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Du(e,t,n){var r;return n?r=e.v+Vb*t:r=e.v-Fb*t,r>1&&(r=1),Number(r.toFixed(2))}function Gs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Bt(e),o=Qp;o>0;o-=1){var a=ju(r),i=Ea(Bt({h:Mu(a,o,!0),s:Au(a,o,!0),v:Du(a,o,!0)}));n.push(i)}n.push(Ea(r));for(var s=1;s<=Zp;s+=1){var l=ju(r),c=Ea(Bt({h:Mu(l,s),s:Au(l,s),v:Du(l,s)}));n.push(c)}return t.theme==="dark"?Hb.map(function(u){var d=u.index,f=u.opacity,p=Ea(Ub(Bt(t.backgroundColor||"#141414"),Bt(n[d]),f*100));return p}):n}var ns={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},rs={},os={};Object.keys(ns).forEach(function(e){rs[e]=Gs(ns[e]),rs[e].primary=rs[e][5],os[e]=Gs(ns[e],{theme:"dark",backgroundColor:"#141414"}),os[e].primary=os[e][5]});var Ks={},Zl=[],Wb=function(t){Zl.push(t)};function eh(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Gb(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function th(){Ks={}}function nh(e,t,n){!t&&!Ks[n]&&(e(!1,n),Ks[n]=!0)}function Mn(e,t){nh(eh,e,t)}function Kb(e,t){nh(Gb,e,t)}Mn.preMessage=Wb;Mn.resetWarned=th;Mn.noteOnce=Kb;function en(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qb(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var $u="data-rc-order",Yb="rc-util-key",qs=new Map;function rh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Yb}function yi(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Xb(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function oh(e){return Array.from((qs.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function ah(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!en())return null;var n=t.csp,r=t.prepend,o=document.createElement("style");o.setAttribute($u,Xb(r)),n!=null&&n.nonce&&(o.nonce=n==null?void 0:n.nonce),o.innerHTML=e;var a=yi(t),i=a.firstChild;if(r){if(r==="queue"){var s=oh(a).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute($u))});if(s.length)return a.insertBefore(o,s[s.length-1].nextSibling),o}a.insertBefore(o,i)}else a.appendChild(o);return o}function ih(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yi(t);return oh(n).find(function(r){return r.getAttribute(rh(t))===e})}function sh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ih(e,t);if(n){var r=yi(t);r.removeChild(n)}}function Jb(e,t){var n=qs.get(e);if(!n||!qb(document,n)){var r=ah("",t),o=r.parentNode;qs.set(e,o),e.removeChild(r)}}function Do(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=yi(n);Jb(r,n);var o=ih(t,n);if(o){var a,i;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)){var s;o.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var l=ah(e,n);return l.setAttribute(rh(n),t),l}function Qb(e,t){Mn(e,"[@ant-design/icons] ".concat(t))}function Iu(e){return Oe(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(Oe(e.icon)==="object"||typeof e.icon=="function")}function Lu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function Ys(e,t,n){return n?g.createElement(e.tag,H(H({key:t},Lu(e.attrs)),n),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):g.createElement(e.tag,H({key:t},Lu(e.attrs)),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function lh(e){return Gs(e)[0]}function ch(e){return e?Array.isArray(e)?e:[e]:[]}var Zb=`
|
|
32
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ib);var nC=ib.exports;const Wf=Sl(nC);function Ct(e,t){rC(e)&&(e="100%");var n=oC(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function as(e){return Math.min(1,Math.max(0,e))}function rC(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function oC(e){return typeof e=="string"&&e.indexOf("%")!==-1}function sb(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function is(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Fr(e){return e.length===1?"0"+e:String(e)}function aC(e,t,n){return{r:Ct(e,255)*255,g:Ct(t,255)*255,b:Ct(n,255)*255}}function fp(e,t,n){e=Ct(e,255),t=Ct(t,255),n=Ct(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,s=(r+o)/2;if(r===o)i=0,a=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function dc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iC(e,t,n){var r,o,a;if(e=Ct(e,360),t=Ct(t,100),n=Ct(n,100),t===0)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=dc(s,i,e+1/3),o=dc(s,i,e),a=dc(s,i,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function Gs(e,t,n){e=Ct(e,255),t=Ct(t,255),n=Ct(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,s=r-o,l=r===0?0:s/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break}a/=6}return{h:a,s:l,v:i}}function sC(e,t,n){e=Ct(e,360)*6,t=Ct(t,100),n=Ct(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],f=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:f*255}}function Ks(e,t,n,r){var o=[Fr(Math.round(e).toString(16)),Fr(Math.round(t).toString(16)),Fr(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function lC(e,t,n,r,o){var a=[Fr(Math.round(e).toString(16)),Fr(Math.round(t).toString(16)),Fr(Math.round(n).toString(16)),Fr(cC(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function cC(e){return Math.round(parseFloat(e)*255).toString(16)}function dp(e){return Ht(e)/255}function Ht(e){return parseInt(e,16)}function uC(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var yu={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function vn(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=hC(e)),typeof e=="object"&&(Jn(e.r)&&Jn(e.g)&&Jn(e.b)?(t=aC(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Jn(e.h)&&Jn(e.s)&&Jn(e.v)?(r=is(e.s),o=is(e.v),t=sC(e.h,r,o),i=!0,s="hsv"):Jn(e.h)&&Jn(e.s)&&Jn(e.l)&&(r=is(e.s),a=is(e.l),t=iC(e.h,r,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=sb(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var fC="[-\\+]?\\d+%?",dC="[-\\+]?\\d*\\.\\d+%?",br="(?:".concat(dC,")|(?:").concat(fC,")"),hc="[\\s|\\(]+(".concat(br,")[,|\\s]+(").concat(br,")[,|\\s]+(").concat(br,")\\s*\\)?"),pc="[\\s|\\(]+(".concat(br,")[,|\\s]+(").concat(br,")[,|\\s]+(").concat(br,")[,|\\s]+(").concat(br,")\\s*\\)?"),fn={CSS_UNIT:new RegExp(br),rgb:new RegExp("rgb"+hc),rgba:new RegExp("rgba"+pc),hsl:new RegExp("hsl"+hc),hsla:new RegExp("hsla"+pc),hsv:new RegExp("hsv"+hc),hsva:new RegExp("hsva"+pc),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function hC(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(yu[e])e=yu[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=fn.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=fn.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=fn.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=fn.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=fn.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=fn.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=fn.hex8.exec(e),n?{r:Ht(n[1]),g:Ht(n[2]),b:Ht(n[3]),a:dp(n[4]),format:t?"name":"hex8"}:(n=fn.hex6.exec(e),n?{r:Ht(n[1]),g:Ht(n[2]),b:Ht(n[3]),format:t?"name":"hex"}:(n=fn.hex4.exec(e),n?{r:Ht(n[1]+n[1]),g:Ht(n[2]+n[2]),b:Ht(n[3]+n[3]),a:dp(n[4]+n[4]),format:t?"name":"hex8"}:(n=fn.hex3.exec(e),n?{r:Ht(n[1]+n[1]),g:Ht(n[2]+n[2]),b:Ht(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Jn(e){return!!fn.CSS_UNIT.exec(String(e))}var Gt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=uC(t)),this.originalInput=t;var o=vn(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=sb(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Gs(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Gs(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=fp(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=fp(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Ks(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),lC(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ct(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ct(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Ks(this.r,this.g,this.b,!1),n=0,r=Object.entries(yu);n<r.length;n++){var o=r[n],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0,a=!n&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=as(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=as(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=as(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=as(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),ss=2,hp=.16,pC=.05,gC=.05,vC=.15,lb=5,cb=4,mC=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function pp(e){var t=e.r,n=e.g,r=e.b,o=Gs(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function ls(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Ks(t,n,r,!1))}function bC(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function gp(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-ss*t:Math.round(e.h)+ss*t:r=n?Math.round(e.h)+ss*t:Math.round(e.h)-ss*t,r<0?r+=360:r>=360&&(r-=360),r}function vp(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-hp*t:t===cb?r=e.s+hp:r=e.s+pC*t,r>1&&(r=1),n&&t===lb&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function mp(e,t,n){var r;return n?r=e.v+gC*t:r=e.v-vC*t,r>1&&(r=1),Number(r.toFixed(2))}function xu(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=vn(e),o=lb;o>0;o-=1){var a=pp(r),i=ls(vn({h:gp(a,o,!0),s:vp(a,o,!0),v:mp(a,o,!0)}));n.push(i)}n.push(ls(r));for(var s=1;s<=cb;s+=1){var l=pp(r),c=ls(vn({h:gp(l,s),s:vp(l,s),v:mp(l,s)}));n.push(c)}return t.theme==="dark"?mC.map(function(u){var f=u.index,d=u.opacity,h=ls(bC(vn(t.backgroundColor||"#141414"),vn(n[f]),d*100));return h}):n}var gc={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},vc={},mc={};Object.keys(gc).forEach(function(e){vc[e]=xu(gc[e]),vc[e].primary=vc[e][5],mc[e]=xu(gc[e],{theme:"dark",backgroundColor:"#141414"}),mc[e].primary=mc[e][5]});var wu={},Gf=[],yC=function(t){Gf.push(t)};function Kf(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Gf.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function xC(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Gf.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function ub(){wu={}}function fb(e,t,n){!t&&!wu[n]&&(e(!1,n),wu[n]=!0)}function _r(e,t){fb(Kf,e,t)}function wC(e,t){fb(xC,e,t)}_r.preMessage=yC;_r.resetWarned=ub;_r.noteOnce=wC;function Fn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function SC(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var bp="data-rc-order",yp="data-rc-priority",CC="rc-util-key",Su=new Map;function db(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):CC}function Cl(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function _C(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function hb(e){return Array.from((Su.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function pb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Fn())return null;var n=t.csp,r=t.prepend,o=t.priority,a=o===void 0?0:o,i=_C(r),s=i==="prependQueue",l=document.createElement("style");l.setAttribute(bp,i),s&&a&&l.setAttribute(yp,"".concat(a)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=e;var c=Cl(t),u=c.firstChild;if(r){if(s){var f=hb(c).filter(function(d){if(!["prepend","prependQueue"].includes(d.getAttribute(bp)))return!1;var h=Number(d.getAttribute(yp)||0);return a>=h});if(f.length)return c.insertBefore(l,f[f.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function gb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Cl(t);return hb(n).find(function(r){return r.getAttribute(db(t))===e})}function vb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=gb(e,t);if(n){var r=Cl(t);r.removeChild(n)}}function OC(e,t){var n=Su.get(e);if(!n||!SC(document,n)){var r=pb("",t),o=r.parentNode;Su.set(e,o),e.removeChild(r)}}function ci(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Cl(n);OC(r,n);var o=gb(t,n);if(o){var a,i;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)){var s;o.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var l=pb(e,n);return l.setAttribute(db(n),t),l}function EC(e,t){_r(e,"[@ant-design/icons] ".concat(t))}function xp(e){return Ie(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(Ie(e.icon)==="object"||typeof e.icon=="function")}function wp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function Cu(e,t,n){return n?b.createElement(e.tag,Q(Q({key:t},wp(e.attrs)),n),(e.children||[]).map(function(r,o){return Cu(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):b.createElement(e.tag,Q({key:t},wp(e.attrs)),(e.children||[]).map(function(r,o){return Cu(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function mb(e){return xu(e)[0]}function bb(e){return e?Array.isArray(e)?e:[e]:[]}var RC=`
|
|
33
33
|
.anticon {
|
|
34
34
|
display: inline-block;
|
|
35
35
|
color: inherit;
|
|
@@ -83,16 +83,51 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
83
83
|
transform: rotate(360deg);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
`,e0=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zb,n=g.useContext(Gp),r=n.csp;g.useEffect(function(){Do(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},t0=["icon","className","onClick","style","primaryColor","secondaryColor"],Co={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function n0(e){var t=e.primaryColor,n=e.secondaryColor;Co.primaryColor=t,Co.secondaryColor=n||lh(t),Co.calculated=!!n}function r0(){return H({},Co)}var bi=function(t){var n=t.icon,r=t.className,o=t.onClick,a=t.style,i=t.primaryColor,s=t.secondaryColor,l=Rr(t,t0),c=Co;if(i&&(c={primaryColor:i,secondaryColor:s||lh(i)}),e0(),Qb(Iu(n),"icon should be icon definiton, but got ".concat(n)),!Iu(n))return null;var u=n;return u&&typeof u.icon=="function"&&(u=H(H({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Ys(u.icon,"svg-".concat(u.name),H({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};bi.displayName="IconReact";bi.getTwoToneColors=r0;bi.setTwoToneColors=n0;const ec=bi;function uh(e){var t=ch(e),n=Ce(t,2),r=n[0],o=n[1];return ec.setTwoToneColors({primaryColor:r,secondaryColor:o})}function o0(){var e=ec.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var a0=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];uh("#1890ff");var wi=W.forwardRef(function(e,t){var n,r=e.className,o=e.icon,a=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Rr(e,a0),d=W.useContext(Gp),f=d.prefixCls,p=f===void 0?"anticon":f,h=d.rootClassName,m=Ql(h,p,(n={},ae(n,"".concat(p,"-").concat(o.name),!!o.name),ae(n,"".concat(p,"-spin"),!!a||o.name==="loading"),n),r),b=s;b===void 0&&l&&(b=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,S=ch(c),E=Ce(S,2),x=E[0],v=E[1];return w("span",{...H(H({role:"img","aria-label":o.name},u),{},{ref:t,tabIndex:b,onClick:l,className:m}),children:w(ec,{icon:o,primaryColor:x,secondaryColor:v,style:y})})});wi.displayName="AntdIcon";wi.getTwoToneColor=o0;wi.setTwoToneColor=uh;const st=wi;var i0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};const s0=i0;var dh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:s0})})};dh.displayName="ApartmentOutlined";const l0=W.forwardRef(dh);var c0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const u0=c0;var fh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:u0})})};fh.displayName="AppstoreAddOutlined";const d0=W.forwardRef(fh);var f0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const p0=f0;var ph=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:p0})})};ph.displayName="CloseOutlined";const h0=W.forwardRef(ph);var g0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const v0=g0;var hh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:v0})})};hh.displayName="CopyOutlined";const gh=W.forwardRef(hh);var m0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const y0=m0;var vh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:y0})})};vh.displayName="DatabaseOutlined";const b0=W.forwardRef(vh);var w0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const S0=w0;var mh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:S0})})};mh.displayName="DeleteOutlined";const tc=W.forwardRef(mh);var x0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const C0=x0;var yh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:C0})})};yh.displayName="DoubleRightOutlined";const O0=W.forwardRef(yh);var E0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const _0=E0;var bh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:_0})})};bh.displayName="EyeInvisibleOutlined";const wh=W.forwardRef(bh);var R0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const N0=R0;var Sh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:N0})})};Sh.displayName="EyeOutlined";const T0=W.forwardRef(Sh);var P0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const k0=P0;var xh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:k0})})};xh.displayName="MinusCircleOutlined";const j0=W.forwardRef(xh);var M0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const A0=M0;var Ch=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:A0})})};Ch.displayName="MinusOutlined";const Oh=W.forwardRef(Ch);var D0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const $0=D0;var Eh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:$0})})};Eh.displayName="PlusOutlined";const nc=W.forwardRef(Eh);var I0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"};const L0=I0;var _h=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:L0})})};_h.displayName="PushpinOutlined";const B0=W.forwardRef(_h);var z0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const V0=z0;var Rh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:V0})})};Rh.displayName="RightOutlined";const F0=W.forwardRef(Rh);var H0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const U0=H0;var Nh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:U0})})};Nh.displayName="SwapOutlined";const W0=W.forwardRef(Nh);function Th(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Th(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function dt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Th(e))&&(r&&(r+=" "),r+=t);return r}function ei(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const rc=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},ti=e=>{const t=[],n=[];return Object.keys(e).forEach(o=>{const a=e[o];be.isExpression(a)?n.push({key:o,value:a}):t.push({key:o,value:a})}),{normalProperty:t,expressionProperty:n}},Ph=(e,t)=>{const n={class:e,value:[]},r=[];return Object.keys(t).forEach(o=>{const a=t[o],i={state:o,media:[],style:(a==null?void 0:a.normal)||{}};Object.keys(a||{}).forEach(s=>{s!=="normal"&&i.media.push({type:"max-width",value:s,style:(a==null?void 0:a[s])||{}})}),r.push(i)}),n.value=r,n},kh=e=>{if(!e)return{};const t=e.value,n={};return t.forEach(r=>{const o={normal:r.style};r.media.forEach(a=>{o[a.value]=a.style}),n[r.state]=o}),n};var G0=Object.defineProperty,K0=(e,t,n)=>t in e?G0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>(K0(e,typeof t!="symbol"?t+"":t,n),n);const q0=e=>()=>{console.warn(`${e} need to be implement getComponent`)},Y0=["customPageRootRender"],Bu=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],X0=e=>[...Bu,...Y0].reduce((t,n)=>{var r;return e!=null&&e[n]?t[n]=(r=e[n])==null?void 0:r.bind(e):Bu.includes(n)&&(t[n]=q0),t},{});var J0=Object.defineProperty,Q0=(e,t,n)=>t in e?J0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>(Q0(e,typeof t!="symbol"?t+"":t,n),n),Z0=typeof global=="object"&&global&&global.Object===Object&&global;const jh=Z0;var e1=typeof self=="object"&&self&&self.Object===Object&&self,t1=jh||e1||Function("return this")();const tn=t1;var n1=tn.Symbol;const Pt=n1;var Mh=Object.prototype,r1=Mh.hasOwnProperty,o1=Mh.toString,ho=Pt?Pt.toStringTag:void 0;function a1(e){var t=r1.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var o=o1.call(e);return r&&(t?e[ho]=n:delete e[ho]),o}var i1=Object.prototype,s1=i1.toString;function l1(e){return s1.call(e)}var c1="[object Null]",u1="[object Undefined]",zu=Pt?Pt.toStringTag:void 0;function tr(e){return e==null?e===void 0?u1:c1:zu&&zu in Object(e)?a1(e):l1(e)}function Zt(e){return e!=null&&typeof e=="object"}var d1="[object Symbol]";function oc(e){return typeof e=="symbol"||Zt(e)&&tr(e)==d1}function ac(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var f1=Array.isArray;const Ve=f1;var p1=1/0,Vu=Pt?Pt.prototype:void 0,Fu=Vu?Vu.toString:void 0;function Ah(e){if(typeof e=="string")return e;if(Ve(e))return ac(e,Ah)+"";if(oc(e))return Fu?Fu.call(e):"";var t=e+"";return t=="0"&&1/e==-p1?"-0":t}function Ut(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ic(e){return e}var h1="[object AsyncFunction]",g1="[object Function]",v1="[object GeneratorFunction]",m1="[object Proxy]";function sc(e){if(!Ut(e))return!1;var t=tr(e);return t==g1||t==v1||t==h1||t==m1}var y1=tn["__core-js_shared__"];const as=y1;var Hu=function(){var e=/[^.]+$/.exec(as&&as.keys&&as.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function b1(e){return!!Hu&&Hu in e}var w1=Function.prototype,S1=w1.toString;function nr(e){if(e!=null){try{return S1.call(e)}catch{}try{return e+""}catch{}}return""}var x1=/[\\^$.*+?()[\]{}|]/g,C1=/^\[object .+?Constructor\]$/,O1=Function.prototype,E1=Object.prototype,_1=O1.toString,R1=E1.hasOwnProperty,N1=RegExp("^"+_1.call(R1).replace(x1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T1(e){if(!Ut(e)||b1(e))return!1;var t=sc(e)?N1:C1;return t.test(nr(e))}function P1(e,t){return e==null?void 0:e[t]}function rr(e,t){var n=P1(e,t);return T1(n)?n:void 0}var k1=rr(tn,"WeakMap");const Xs=k1;var Uu=Object.create,j1=function(){function e(){}return function(t){if(!Ut(t))return{};if(Uu)return Uu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const M1=j1;function A1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function D1(){}function Dh(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $1=800,I1=16,L1=Date.now;function B1(e){var t=0,n=0;return function(){var r=L1(),o=I1-(r-n);if(n=r,o>0){if(++t>=$1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function z1(e){return function(){return e}}var V1=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ni=V1;var F1=ni?function(e,t){return ni(e,"toString",{configurable:!0,enumerable:!1,value:z1(t),writable:!0})}:ic;const H1=F1;var U1=B1(H1);const $h=U1;function W1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function G1(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function K1(e){return e!==e}function q1(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function Y1(e,t,n){return t===t?q1(e,t,n):G1(e,K1,n)}function X1(e,t){var n=e==null?0:e.length;return!!n&&Y1(e,t,0)>-1}var J1=9007199254740991,Q1=/^(?:0|[1-9]\d*)$/;function Si(e,t){var n=typeof e;return t=t??J1,!!t&&(n=="number"||n!="symbol"&&Q1.test(e))&&e>-1&&e%1==0&&e<t}function lc(e,t,n){t=="__proto__"&&ni?ni(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qo(e,t){return e===t||e!==e&&t!==t}var Z1=Object.prototype,ew=Z1.hasOwnProperty;function cc(e,t,n){var r=e[t];(!(ew.call(e,t)&&Qo(r,n))||n===void 0&&!(t in e))&&lc(e,t,n)}function Ur(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?lc(n,s,l):cc(n,s,l)}return n}var Wu=Math.max;function Ih(e,t,n){return t=Wu(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Wu(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),A1(e,this,s)}}function Lh(e,t){return $h(Ih(e,t,ic),e+"")}var tw=9007199254740991;function uc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tw}function xi(e){return e!=null&&uc(e.length)&&!sc(e)}function nw(e,t,n){if(!Ut(n))return!1;var r=typeof t;return(r=="number"?xi(n)&&Si(t,n.length):r=="string"&&t in n)?Qo(n[t],e):!1}function rw(e){return Lh(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&nw(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var ow=Object.prototype;function dc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ow;return e===n}function aw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var iw="[object Arguments]";function Gu(e){return Zt(e)&&tr(e)==iw}var Bh=Object.prototype,sw=Bh.hasOwnProperty,lw=Bh.propertyIsEnumerable,cw=Gu(function(){return arguments}())?Gu:function(e){return Zt(e)&&sw.call(e,"callee")&&!lw.call(e,"callee")};const $o=cw;function uw(){return!1}var zh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ku=zh&&typeof module=="object"&&module&&!module.nodeType&&module,dw=Ku&&Ku.exports===zh,qu=dw?tn.Buffer:void 0,fw=qu?qu.isBuffer:void 0,pw=fw||uw;const Io=pw;var hw="[object Arguments]",gw="[object Array]",vw="[object Boolean]",mw="[object Date]",yw="[object Error]",bw="[object Function]",ww="[object Map]",Sw="[object Number]",xw="[object Object]",Cw="[object RegExp]",Ow="[object Set]",Ew="[object String]",_w="[object WeakMap]",Rw="[object ArrayBuffer]",Nw="[object DataView]",Tw="[object Float32Array]",Pw="[object Float64Array]",kw="[object Int8Array]",jw="[object Int16Array]",Mw="[object Int32Array]",Aw="[object Uint8Array]",Dw="[object Uint8ClampedArray]",$w="[object Uint16Array]",Iw="[object Uint32Array]",_e={};_e[Tw]=_e[Pw]=_e[kw]=_e[jw]=_e[Mw]=_e[Aw]=_e[Dw]=_e[$w]=_e[Iw]=!0;_e[hw]=_e[gw]=_e[Rw]=_e[vw]=_e[Nw]=_e[mw]=_e[yw]=_e[bw]=_e[ww]=_e[Sw]=_e[xw]=_e[Cw]=_e[Ow]=_e[Ew]=_e[_w]=!1;function Lw(e){return Zt(e)&&uc(e.length)&&!!_e[tr(e)]}function fc(e){return function(t){return e(t)}}var Vh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oo=Vh&&typeof module=="object"&&module&&!module.nodeType&&module,Bw=Oo&&Oo.exports===Vh,is=Bw&&jh.process,zw=function(){try{var e=Oo&&Oo.require&&Oo.require("util").types;return e||is&&is.binding&&is.binding("util")}catch{}}();const Nr=zw;var Yu=Nr&&Nr.isTypedArray,Vw=Yu?fc(Yu):Lw;const pc=Vw;var Fw=Object.prototype,Hw=Fw.hasOwnProperty;function Fh(e,t){var n=Ve(e),r=!n&&$o(e),o=!n&&!r&&Io(e),a=!n&&!r&&!o&&pc(e),i=n||r||o||a,s=i?aw(e.length,String):[],l=s.length;for(var c in e)(t||Hw.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Si(c,l)))&&s.push(c);return s}function Hh(e,t){return function(n){return e(t(n))}}var Uw=Hh(Object.keys,Object);const Ww=Uw;var Gw=Object.prototype,Kw=Gw.hasOwnProperty;function qw(e){if(!dc(e))return Ww(e);var t=[];for(var n in Object(e))Kw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ci(e){return xi(e)?Fh(e):qw(e)}function Yw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Xw=Object.prototype,Jw=Xw.hasOwnProperty;function Qw(e){if(!Ut(e))return Yw(e);var t=dc(e),n=[];for(var r in e)r=="constructor"&&(t||!Jw.call(e,r))||n.push(r);return n}function Zo(e){return xi(e)?Fh(e,!0):Qw(e)}var Zw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eS=/^\w*$/;function hc(e,t){if(Ve(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oc(e)?!0:eS.test(e)||!Zw.test(e)||t!=null&&e in Object(t)}var tS=rr(Object,"create");const Lo=tS;function nS(){this.__data__=Lo?Lo(null):{},this.size=0}function rS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oS="__lodash_hash_undefined__",aS=Object.prototype,iS=aS.hasOwnProperty;function sS(e){var t=this.__data__;if(Lo){var n=t[e];return n===oS?void 0:n}return iS.call(t,e)?t[e]:void 0}var lS=Object.prototype,cS=lS.hasOwnProperty;function uS(e){var t=this.__data__;return Lo?t[e]!==void 0:cS.call(t,e)}var dS="__lodash_hash_undefined__";function fS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lo&&t===void 0?dS:t,this}function Jn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jn.prototype.clear=nS;Jn.prototype.delete=rS;Jn.prototype.get=sS;Jn.prototype.has=uS;Jn.prototype.set=fS;function pS(){this.__data__=[],this.size=0}function Oi(e,t){for(var n=e.length;n--;)if(Qo(e[n][0],t))return n;return-1}var hS=Array.prototype,gS=hS.splice;function vS(e){var t=this.__data__,n=Oi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():gS.call(t,n,1),--this.size,!0}function mS(e){var t=this.__data__,n=Oi(t,e);return n<0?void 0:t[n][1]}function yS(e){return Oi(this.__data__,e)>-1}function bS(e,t){var n=this.__data__,r=Oi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function vn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vn.prototype.clear=pS;vn.prototype.delete=vS;vn.prototype.get=mS;vn.prototype.has=yS;vn.prototype.set=bS;var wS=rr(tn,"Map");const Bo=wS;function SS(){this.size=0,this.__data__={hash:new Jn,map:new(Bo||vn),string:new Jn}}function xS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ei(e,t){var n=e.__data__;return xS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function CS(e){var t=Ei(this,e).delete(e);return this.size-=t?1:0,t}function OS(e){return Ei(this,e).get(e)}function ES(e){return Ei(this,e).has(e)}function _S(e,t){var n=Ei(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mn.prototype.clear=SS;mn.prototype.delete=CS;mn.prototype.get=OS;mn.prototype.has=ES;mn.prototype.set=_S;var RS="Expected a function";function gc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(RS);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(gc.Cache||mn),n}gc.Cache=mn;var NS=500;function TS(e){var t=gc(e,function(r){return n.size===NS&&n.clear(),r}),n=t.cache;return t}var PS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kS=/\\(\\)?/g,jS=TS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(PS,function(n,r,o,a){t.push(o?a.replace(kS,"$1"):r||n)}),t});const MS=jS;function AS(e){return e==null?"":Ah(e)}function Wr(e,t){return Ve(e)?e:hc(e,t)?[e]:MS(AS(e))}var DS=1/0;function Gr(e){if(typeof e=="string"||oc(e))return e;var t=e+"";return t=="0"&&1/e==-DS?"-0":t}function _i(e,t){t=Wr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Gr(t[n++])];return n&&n==r?e:void 0}function Uh(e,t,n){var r=e==null?void 0:_i(e,t);return r===void 0?n:r}function vc(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Xu=Pt?Pt.isConcatSpreadable:void 0;function $S(e){return Ve(e)||$o(e)||!!(Xu&&e&&e[Xu])}function mc(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=$S),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?mc(s,t-1,n,r,o):vc(o,s):r||(o[o.length]=s)}return o}function IS(e){var t=e==null?0:e.length;return t?mc(e,1):[]}function LS(e){return $h(Ih(e,void 0,IS),e+"")}var BS=Hh(Object.getPrototypeOf,Object);const yc=BS;var zS="[object Object]",VS=Function.prototype,FS=Object.prototype,Wh=VS.toString,HS=FS.hasOwnProperty,US=Wh.call(Object);function ht(e){if(!Zt(e)||tr(e)!=zS)return!1;var t=yc(e);if(t===null)return!0;var n=HS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Wh.call(n)==US}function WS(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function GS(){this.__data__=new vn,this.size=0}function KS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qS(e){return this.__data__.get(e)}function YS(e){return this.__data__.has(e)}var XS=200;function JS(e,t){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!Bo||r.length<XS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mn(r)}return n.set(e,t),this.size=n.size,this}function zt(e){var t=this.__data__=new vn(e);this.size=t.size}zt.prototype.clear=GS;zt.prototype.delete=KS;zt.prototype.get=qS;zt.prototype.has=YS;zt.prototype.set=JS;function QS(e,t){return e&&Ur(t,Ci(t),e)}function ZS(e,t){return e&&Ur(t,Zo(t),e)}var Gh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ju=Gh&&typeof module=="object"&&module&&!module.nodeType&&module,ex=Ju&&Ju.exports===Gh,Qu=ex?tn.Buffer:void 0,Zu=Qu?Qu.allocUnsafe:void 0;function Kh(e,t){if(t)return e.slice();var n=e.length,r=Zu?Zu(n):new e.constructor(n);return e.copy(r),r}function tx(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function qh(){return[]}var nx=Object.prototype,rx=nx.propertyIsEnumerable,ed=Object.getOwnPropertySymbols,ox=ed?function(e){return e==null?[]:(e=Object(e),tx(ed(e),function(t){return rx.call(e,t)}))}:qh;const bc=ox;function ax(e,t){return Ur(e,bc(e),t)}var ix=Object.getOwnPropertySymbols,sx=ix?function(e){for(var t=[];e;)vc(t,bc(e)),e=yc(e);return t}:qh;const Yh=sx;function lx(e,t){return Ur(e,Yh(e),t)}function Xh(e,t,n){var r=t(e);return Ve(e)?r:vc(r,n(e))}function Js(e){return Xh(e,Ci,bc)}function wc(e){return Xh(e,Zo,Yh)}var cx=rr(tn,"DataView");const Qs=cx;var ux=rr(tn,"Promise");const Zs=ux;var dx=rr(tn,"Set");const Er=dx;var td="[object Map]",fx="[object Object]",nd="[object Promise]",rd="[object Set]",od="[object WeakMap]",ad="[object DataView]",px=nr(Qs),hx=nr(Bo),gx=nr(Zs),vx=nr(Er),mx=nr(Xs),Fn=tr;(Qs&&Fn(new Qs(new ArrayBuffer(1)))!=ad||Bo&&Fn(new Bo)!=td||Zs&&Fn(Zs.resolve())!=nd||Er&&Fn(new Er)!=rd||Xs&&Fn(new Xs)!=od)&&(Fn=function(e){var t=tr(e),n=t==fx?e.constructor:void 0,r=n?nr(n):"";if(r)switch(r){case px:return ad;case hx:return td;case gx:return nd;case vx:return rd;case mx:return od}return t});const zo=Fn;var yx=Object.prototype,bx=yx.hasOwnProperty;function wx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&bx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Sx=tn.Uint8Array;const ri=Sx;function Sc(e){var t=new e.constructor(e.byteLength);return new ri(t).set(new ri(e)),t}function xx(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Cx=/\w*$/;function Ox(e){var t=new e.constructor(e.source,Cx.exec(e));return t.lastIndex=e.lastIndex,t}var id=Pt?Pt.prototype:void 0,sd=id?id.valueOf:void 0;function Ex(e){return sd?Object(sd.call(e)):{}}function Jh(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var _x="[object Boolean]",Rx="[object Date]",Nx="[object Map]",Tx="[object Number]",Px="[object RegExp]",kx="[object Set]",jx="[object String]",Mx="[object Symbol]",Ax="[object ArrayBuffer]",Dx="[object DataView]",$x="[object Float32Array]",Ix="[object Float64Array]",Lx="[object Int8Array]",Bx="[object Int16Array]",zx="[object Int32Array]",Vx="[object Uint8Array]",Fx="[object Uint8ClampedArray]",Hx="[object Uint16Array]",Ux="[object Uint32Array]";function Wx(e,t,n){var r=e.constructor;switch(t){case Ax:return Sc(e);case _x:case Rx:return new r(+e);case Dx:return xx(e,n);case $x:case Ix:case Lx:case Bx:case zx:case Vx:case Fx:case Hx:case Ux:return Jh(e,n);case Nx:return new r;case Tx:case jx:return new r(e);case Px:return Ox(e);case kx:return new r;case Mx:return Ex(e)}}function Qh(e){return typeof e.constructor=="function"&&!dc(e)?M1(yc(e)):{}}var Gx="[object Map]";function Kx(e){return Zt(e)&&zo(e)==Gx}var ld=Nr&&Nr.isMap,qx=ld?fc(ld):Kx;const Yx=qx;var Xx="[object Set]";function Jx(e){return Zt(e)&&zo(e)==Xx}var cd=Nr&&Nr.isSet,Qx=cd?fc(cd):Jx;const Zx=Qx;var eC=1,tC=2,nC=4,Zh="[object Arguments]",rC="[object Array]",oC="[object Boolean]",aC="[object Date]",iC="[object Error]",eg="[object Function]",sC="[object GeneratorFunction]",lC="[object Map]",cC="[object Number]",tg="[object Object]",uC="[object RegExp]",dC="[object Set]",fC="[object String]",pC="[object Symbol]",hC="[object WeakMap]",gC="[object ArrayBuffer]",vC="[object DataView]",mC="[object Float32Array]",yC="[object Float64Array]",bC="[object Int8Array]",wC="[object Int16Array]",SC="[object Int32Array]",xC="[object Uint8Array]",CC="[object Uint8ClampedArray]",OC="[object Uint16Array]",EC="[object Uint32Array]",Se={};Se[Zh]=Se[rC]=Se[gC]=Se[vC]=Se[oC]=Se[aC]=Se[mC]=Se[yC]=Se[bC]=Se[wC]=Se[SC]=Se[lC]=Se[cC]=Se[tg]=Se[uC]=Se[dC]=Se[fC]=Se[pC]=Se[xC]=Se[CC]=Se[OC]=Se[EC]=!0;Se[iC]=Se[eg]=Se[hC]=!1;function Eo(e,t,n,r,o,a){var i,s=t&eC,l=t&tC,c=t&nC;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Ut(e))return e;var u=Ve(e);if(u){if(i=wx(e),!s)return Dh(e,i)}else{var d=zo(e),f=d==eg||d==sC;if(Io(e))return Kh(e,s);if(d==tg||d==Zh||f&&!o){if(i=l||f?{}:Qh(e),!s)return l?lx(e,ZS(i,e)):ax(e,QS(i,e))}else{if(!Se[d])return o?e:{};i=Wx(e,d,s)}}a||(a=new zt);var p=a.get(e);if(p)return p;a.set(e,i),Zx(e)?e.forEach(function(b){i.add(Eo(b,t,n,b,e,a))}):Yx(e)&&e.forEach(function(b,y){i.set(y,Eo(b,t,n,y,e,a))});var h=c?l?wc:Js:l?Zo:Ci,m=u?void 0:h(e);return W1(m||e,function(b,y){m&&(y=b,b=e[y]),cc(i,y,Eo(b,t,n,y,e,a))}),i}var _C=1,RC=4;function ng(e){return Eo(e,_C|RC)}var NC="__lodash_hash_undefined__";function TC(e){return this.__data__.set(e,NC),this}function PC(e){return this.__data__.has(e)}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mn;++t<n;)this.add(e[t])}Vo.prototype.add=Vo.prototype.push=TC;Vo.prototype.has=PC;function kC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function rg(e,t){return e.has(t)}var jC=1,MC=2;function og(e,t,n,r,o,a){var i=n&jC,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&MC?new Vo:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var b=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(b!==void 0){if(b)continue;f=!1;break}if(p){if(!kC(t,function(y,S){if(!rg(p,S)&&(h===y||o(h,y,n,r,a)))return p.push(S)})){f=!1;break}}else if(!(h===m||o(h,m,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function AC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function xc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var DC=1,$C=2,IC="[object Boolean]",LC="[object Date]",BC="[object Error]",zC="[object Map]",VC="[object Number]",FC="[object RegExp]",HC="[object Set]",UC="[object String]",WC="[object Symbol]",GC="[object ArrayBuffer]",KC="[object DataView]",ud=Pt?Pt.prototype:void 0,ss=ud?ud.valueOf:void 0;function qC(e,t,n,r,o,a,i){switch(n){case KC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case GC:return!(e.byteLength!=t.byteLength||!a(new ri(e),new ri(t)));case IC:case LC:case VC:return Qo(+e,+t);case BC:return e.name==t.name&&e.message==t.message;case FC:case UC:return e==t+"";case zC:var s=AC;case HC:var l=r&DC;if(s||(s=xc),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=$C,i.set(e,t);var u=og(s(e),s(t),r,o,a,i);return i.delete(e),u;case WC:if(ss)return ss.call(e)==ss.call(t)}return!1}var YC=1,XC=Object.prototype,JC=XC.hasOwnProperty;function QC(e,t,n,r,o,a){var i=n&YC,s=Js(e),l=s.length,c=Js(t),u=c.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:JC.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=i;++d<l;){f=s[d];var y=e[f],S=t[f];if(r)var E=i?r(S,y,f,t,e,a):r(y,S,f,e,t,a);if(!(E===void 0?y===S||o(y,S,n,r,a):E)){m=!1;break}b||(b=f=="constructor")}if(m&&!b){var x=e.constructor,v=t.constructor;x!=v&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof v=="function"&&v instanceof v)&&(m=!1)}return a.delete(e),a.delete(t),m}var ZC=1,dd="[object Arguments]",fd="[object Array]",_a="[object Object]",eO=Object.prototype,pd=eO.hasOwnProperty;function tO(e,t,n,r,o,a){var i=Ve(e),s=Ve(t),l=i?fd:zo(e),c=s?fd:zo(t);l=l==dd?_a:l,c=c==dd?_a:c;var u=l==_a,d=c==_a,f=l==c;if(f&&Io(e)){if(!Io(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new zt),i||pc(e)?og(e,t,n,r,o,a):qC(e,t,l,n,r,o,a);if(!(n&ZC)){var p=u&&pd.call(e,"__wrapped__"),h=d&&pd.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,b=h?t.value():t;return a||(a=new zt),o(m,b,n,r,a)}}return f?(a||(a=new zt),QC(e,t,n,r,o,a)):!1}function Cc(e,t,n,r,o){return e===t?!0:e==null||t==null||!Zt(e)&&!Zt(t)?e!==e&&t!==t:tO(e,t,n,r,Cc,o)}var nO=1,rO=2;function oO(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new zt;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?Cc(u,c,nO|rO,r,d):f))return!1}}return!0}function ag(e){return e===e&&!Ut(e)}function aO(e){for(var t=Ci(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ag(o)]}return t}function ig(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function iO(e){var t=aO(e);return t.length==1&&t[0][2]?ig(t[0][0],t[0][1]):function(n){return n===e||oO(n,e,t)}}function sO(e,t){return e!=null&&t in Object(e)}function lO(e,t,n){t=Wr(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=Gr(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&uc(o)&&Si(i,o)&&(Ve(e)||$o(e)))}function cO(e,t){return e!=null&&lO(e,t,sO)}var uO=1,dO=2;function fO(e,t){return hc(e)&&ag(t)?ig(Gr(e),t):function(n){var r=Uh(n,e);return r===void 0&&r===t?cO(n,e):Cc(t,r,uO|dO)}}function pO(e){return function(t){return t==null?void 0:t[e]}}function hO(e){return function(t){return _i(t,e)}}function gO(e){return hc(e)?pO(Gr(e)):hO(e)}function Oc(e){return typeof e=="function"?e:e==null?ic:typeof e=="object"?Ve(e)?fO(e[0],e[1]):iO(e):gO(e)}function vO(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var mO=vO();const yO=mO;function el(e,t,n){(n!==void 0&&!Qo(e[t],n)||n===void 0&&!(t in e))&&lc(e,t,n)}function tl(e){return Zt(e)&&xi(e)}function nl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function bO(e){return Ur(e,Zo(e))}function wO(e,t,n,r,o,a,i){var s=nl(e,n),l=nl(t,n),c=i.get(l);if(c){el(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Ve(l),p=!f&&Io(l),h=!f&&!p&&pc(l);u=l,f||p||h?Ve(s)?u=s:tl(s)?u=Dh(s):p?(d=!1,u=Kh(l,!0)):h?(d=!1,u=Jh(l,!0)):u=[]:ht(l)||$o(l)?(u=s,$o(s)?u=bO(s):(!Ut(s)||sc(s))&&(u=Qh(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),el(e,n,u)}function sg(e,t,n,r,o){e!==t&&yO(t,function(a,i){if(o||(o=new zt),Ut(a))wO(e,t,i,n,sg,r,o);else{var s=r?r(nl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),el(e,i,s)}},Zo)}function SO(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function lg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function xO(e,t){return t.length<2?e:_i(e,WS(t,0,-1))}var CO=rw(function(e,t,n){sg(e,t,n)});const cg=CO;var OO="Expected a function";function EO(e){if(typeof e!="function")throw new TypeError(OO);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 _O(e,t){return t=Wr(t,e),e=xO(e,t),e==null||delete e[Gr(lg(t))]}function RO(e){return ht(e)?void 0:e}var NO=1,TO=2,PO=4,kO=LS(function(e,t){var n={};if(e==null)return n;var r=!1;t=ac(t,function(a){return a=Wr(a,e),r||(r=a.length>1),a}),Ur(e,wc(e),n),r&&(n=Eo(n,NO|TO|PO,RO));for(var o=t.length;o--;)_O(n,t[o]);return n});const ug=kO;function jO(e,t,n,r){if(!Ut(e))return e;t=Wr(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var l=Gr(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=i){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Ut(u)?u:Si(t[o+1])?[]:{})}cc(s,l,c),s=s[l]}return e}function MO(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=_i(e,i);n(s,i)&&jO(a,Wr(i,e),s)}return a}function AO(e,t){if(e==null)return{};var n=ac(wc(e),function(r){return[r]});return t=Oc(t),MO(e,n,function(r,o){return t(r,o[0])})}function DO(e,t){return AO(e,EO(Oc(t)))}var $O=1/0,IO=Er&&1/xc(new Er([,-0]))[1]==$O?function(e){return new Er(e)}:D1;const LO=IO;var BO=200;function zO(e,t,n){var r=-1,o=X1,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=SO;else if(a>=BO){var c=t?null:LO(e);if(c)return xc(c);i=!1,o=rg,l=new Vo}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,i&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var VO=Lh(function(e){var t=lg(e);return tl(t)&&(t=void 0),zO(mc(e,1,tl,!0),Oc(t))});const FO=VO;class dg extends TypeError{constructor(t,n){let r;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=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function HO(e){return Vt(e)&&typeof e[Symbol.iterator]=="function"}function Vt(e){return typeof e=="object"&&e!=null}function xt(e){return typeof e=="string"?JSON.stringify(e):""+e}function UO(e){const{done:t,value:n}=e.next();return t?void 0:n}function WO(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+xt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*hd(e,t,n,r){HO(e)||(e=[e]);for(const o of e){const a=WO(o,t,n,r);a&&(yield a)}}function*Ec(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Vt(t.schema)&&Vt(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=Ec(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Vt(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class nn{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:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return hd(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return hd(u,c,this,l)}:this.refiner=()=>[]}assert(t){return fg(t,this)}create(t){return GO(t,this)}is(t){return qO(t,this)}mask(t){return KO(t,this)}validate(t,n){return n===void 0&&(n={}),Kr(t,this,n)}}function fg(e,t){const n=Kr(e,t);if(n[0])throw n[0]}function GO(e,t){const n=Kr(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function KO(e,t){const n=Kr(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function qO(e,t){return!Kr(e,t)[0]}function Kr(e,t,n){n===void 0&&(n={});const r=Ec(e,t,n),o=UO(r);return o[0]?[new dg(o[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function _c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?vg(a):ve(a)}function An(e,t){return new nn({type:e,schema:null,validator:t})}function Tr(e){return new nn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function pg(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return vg(r);default:return ve(r)}}function ze(){return An("any",()=>!0)}function Ie(e){return new nn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+xt(t)}})}function Pr(){return An("boolean",e=>typeof e=="boolean")}function rl(e){const t={},n=e.map(r=>xt(r)).join();for(const r of e)t[r]=r;return new nn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+xt(r)}})}function hg(){return An("func",e=>typeof e=="function"||"Expected a function, but received: "+xt(e))}function ft(e){const t=xt(e),n=typeof e;return new nn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+xt(r)}})}function YO(){return An("never",()=>!1)}function gg(){return An("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+xt(e))}function ve(e){const t=e?Object.keys(e):[],n=YO();return new nn({type:"object",schema:e||null,*entries(r){if(e&&Vt(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Vt(r)||"Expected an object, but received: "+xt(r)},coercer(r){return Vt(r)?{...r}:r}})}function K(e){return new nn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function _o(e,t){return new nn({type:"record",schema:null,*entries(n){if(Vt(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Vt(n)||"Expected an object, but received: "+xt(n)}})}function U(){return An("string",e=>typeof e=="string"||"Expected a string, but received: "+xt(e))}function vg(e){const t=Object.keys(e);return new nn({type:"type",schema:e,*entries(n){if(Vt(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Vt(n)||"Expected an object, but received: "+xt(n)}})}function pt(e){const t=e.map(n=>n.type).join(" | ");return new nn({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||XO()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Ec(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+xt(n),...o]}})}function XO(){return An("unknown",()=>!0)}const Rc=ve({package:U(),version:U(),name:U(),exportName:K(U()),destructuring:K(Pr()),subName:K(U()),main:K(U()),cssPaths:K(Ie(U()))}),JO=Ie(Rc),QO=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var Tt=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Tt||{}),Nc=(e=>(e.DESIGN="design",e.SAVE="save",e))(Nc||{}),ol=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(ol||{});const ZO=()=>An("normalObj",e=>!ht(e)||[Tt.SLOT,Tt.EXPRESSION,Tt.FUNCTION].includes(e==null?void 0:e.type)?!1:(Kr(e,_o(U(),Tc)),!0)),Tc=pt([U(),gg(),Pr(),ve({type:ft(Tt.SLOT),renderType:rl([ol.FUNC,ol.COMP]),params:K(Ie(U())),value:Tr(()=>pt([kr,Ie(kr)]))}),ve({type:ft(Tt.EXPRESSION),value:U()}),ve({type:ft(Tt.FUNCTION),value:U()}),ZO(),Ie(Tr(()=>Tc))]),gd=ve({type:ft(Tt.EXPRESSION),value:U()}),kr=ve({id:K(U()),title:K(U()),componentName:U(),props:K(_o(U(),Tc)),nodeName:K(U()),state:K(_o(U(),ze())),children:Tr(()=>K(Ie(pt([U(),kr])))),configure:K(ze()),css:K(ze()),style:K(ze()),classNames:K(Ie(ze())),refId:K(U()),extra:K(_o(ze(),ze())),condition:K(pt([Pr(),gd])),loop:K(ve({open:Pr(),data:pt([Ie(ze()),gd]),args:K(Ie(U())),forName:K(U()),forIndex:K(U()),key:K(ze()),name:K(U())})),methods:K(Ie(ze()))}),oi=pt([U(),ve({label:U(),tip:K(U())})]),eE=ve({type:ft("shape"),value:Ie(ve({name:U(),title:oi,valueType:Tr(()=>Ri)}))}),tE=ve({type:ft("enums"),value:Ie(U())});ve({type:ft("array"),value:Tr(()=>Ri)});const nE=ve({type:ft("array"),value:Tr(()=>Ie(Ri))}),Ri=pt([rl(["array","boolean","number","object","string"]),rl(["component","expression","function"]),eE,tE,nE]),rE=pt([U(),ve({componentName:U(),props:K(ze()),initialValue:K(ze()),component:K(ze())})]),ls=ve({name:U(),title:oi,valueType:Ri,description:K(U()),defaultValue:ze(),setters:K(Ie(rE)),condition:K(hg())});pt([U(),hg()]);var al=(e=>(e.SINGLE="single",e.GROUP="group",e))(al||{});pt([U(),ve({name:U(),describe:K(U()),params:K(ve({name:U(),description:U()})),template:U()})]);const oE=ve({id:K(U()),title:U(),snapshot:pt([U(),ze()]),snapshotText:K(U()),description:K(U()),tags:K(Ie(U())),groupName:K(U()),category:K(U()),schema:_c(pg(kr,["id"]),ve({componentName:K(U())}))}),aE=ve({componentName:U(),title:U(),screenshot:K(U()),icon:K(U()),tags:K(Ie(U())),groupName:K(U()),category:K(U()),priority:K(gg()),npm:K(Rc),snippets:Ie(oE),props:Ie(pt([ls,ve({title:K(oi),type:ft("single"),content:ls}),ve({title:K(oi),type:ft("group"),content:Ie(ls)})])),fixedProps:K(ze()),isContainer:K(pt([Pr(),ve({placeholder:U(),width:U(),height:U()})])),disableEditorDragDom:K(ze()),isLayout:K(Pr()),rootSelector:K(U()),advanceCustom:K(ze()),extra:K(_o(ze(),ze()))}),iE=e=>({data:t,message:n,throwError:r})=>{const o=e({data:t,message:n,throwError:r});if(o.isValidate)return o;if(r)throw o.message||n?new Error(`${o.message||n}
|
|
86
|
+
`,$C=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:RC,n=b.useContext(nb),r=n.csp;b.useEffect(function(){ci(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},TC=["icon","className","onClick","style","primaryColor","secondaryColor"],Ya={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function PC(e){var t=e.primaryColor,n=e.secondaryColor;Ya.primaryColor=t,Ya.secondaryColor=n||mb(t),Ya.calculated=!!n}function kC(){return Q({},Ya)}var _l=function(t){var n=t.icon,r=t.className,o=t.onClick,a=t.style,i=t.primaryColor,s=t.secondaryColor,l=Wo(t,TC),c=Ya;if(i&&(c={primaryColor:i,secondaryColor:s||mb(i)}),$C(),EC(xp(n),"icon should be icon definiton, but got ".concat(n)),!xp(n))return null;var u=n;return u&&typeof u.icon=="function"&&(u=Q(Q({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Cu(u.icon,"svg-".concat(u.name),Q({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};_l.displayName="IconReact";_l.getTwoToneColors=kC;_l.setTwoToneColors=PC;const qf=_l;function yb(e){var t=bb(e),n=je(t,2),r=n[0],o=n[1];return qf.setTwoToneColors({primaryColor:r,secondaryColor:o})}function NC(){var e=qf.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var AC=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];yb("#1890ff");var Ol=Z.forwardRef(function(e,t){var n,r=e.className,o=e.icon,a=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Wo(e,AC),f=Z.useContext(nb),d=f.prefixCls,h=d===void 0?"anticon":d,v=f.rootClassName,g=Wf(v,h,(n={},ve(n,"".concat(h,"-").concat(o.name),!!o.name),ve(n,"".concat(h,"-spin"),!!a||o.name==="loading"),n),r),m=s;m===void 0&&l&&(m=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,w=bb(c),_=je(w,2),S=_[0],x=_[1];return p("span",{...Q(Q({role:"img","aria-label":o.name},u),{},{ref:t,tabIndex:m,onClick:l,className:g}),children:p(qf,{icon:o,primaryColor:S,secondaryColor:x,style:y})})});Ol.displayName="AntdIcon";Ol.getTwoToneColor=NC;Ol.setTwoToneColor=yb;const Et=Ol;var MC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};const jC=MC;var xb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:jC})})};xb.displayName="ApartmentOutlined";const DC=Z.forwardRef(xb);var IC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const LC=IC;var wb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:LC})})};wb.displayName="AppstoreAddOutlined";const BC=Z.forwardRef(wb);var FC={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"};const zC=FC;var Sb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:zC})})};Sb.displayName="CloseCircleOutlined";const Cb=Z.forwardRef(Sb);var HC={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const VC=HC;var _b=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:VC})})};_b.displayName="CloseOutlined";const UC=Z.forwardRef(_b);var WC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const GC=WC;var Ob=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:GC})})};Ob.displayName="CopyOutlined";const Eb=Z.forwardRef(Ob);var KC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const qC=KC;var Rb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:qC})})};Rb.displayName="DatabaseOutlined";const XC=Z.forwardRef(Rb);var YC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const JC=YC;var $b=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:JC})})};$b.displayName="DeleteOutlined";const Xf=Z.forwardRef($b);var QC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const ZC=QC;var Tb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:ZC})})};Tb.displayName="DoubleRightOutlined";const e_=Z.forwardRef(Tb);var t_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const n_=t_;var Pb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:n_})})};Pb.displayName="EyeInvisibleOutlined";const kb=Z.forwardRef(Pb);var r_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const o_=r_;var Nb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:o_})})};Nb.displayName="EyeOutlined";const a_=Z.forwardRef(Nb);var i_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const s_=i_;var Ab=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:s_})})};Ab.displayName="MinusCircleOutlined";const l_=Z.forwardRef(Ab);var c_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const u_=c_;var Mb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:u_})})};Mb.displayName="MinusOutlined";const jb=Z.forwardRef(Mb);var f_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const d_=f_;var Db=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:d_})})};Db.displayName="PlusOutlined";const Yf=Z.forwardRef(Db);var h_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"};const p_=h_;var Ib=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:p_})})};Ib.displayName="PushpinOutlined";const g_=Z.forwardRef(Ib);var v_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const m_=v_;var Lb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:m_})})};Lb.displayName="RightOutlined";const b_=Z.forwardRef(Lb);var y_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const x_=y_;var Bb=function(t,n){return p(Et,{...Q(Q({},t),{},{ref:n,icon:x_})})};Bb.displayName="SwapOutlined";const w_=Z.forwardRef(Bb);function Fb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Fb(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ge(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Fb(e))&&(r&&(r+=" "),r+=t);return r}function qs(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}var zb={exports:{}},Hb={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Vb={exports:{}},S_=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},C_=S_,__=Array.prototype.concat,O_=Array.prototype.slice,Sp=Vb.exports=function(t){for(var n=[],r=0,o=t.length;r<o;r++){var a=t[r];C_(a)?n=__.call(n,O_.call(a)):n.push(a)}return n};Sp.wrap=function(e){return function(){return e(Sp(arguments))}};var E_=Vb.exports,Ja=Hb,Ti=E_,Ub=Object.hasOwnProperty,Wb=Object.create(null);for(var bc in Ja)Ub.call(Ja,bc)&&(Wb[Ja[bc]]=bc);var Kt=zb.exports={to:{},get:{}};Kt.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case"hsl":n=Kt.get.hsl(e),r="hsl";break;case"hwb":n=Kt.get.hwb(e),r="hwb";break;default:n=Kt.get.rgb(e),r="rgb";break}return n?{model:r,value:n}:null};Kt.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,a=/^(\w+)$/,i=[0,0,0,1],s,l,c;if(s=e.match(n)){for(c=s[2],s=s[1],l=0;l<3;l++){var u=l*2;i[l]=parseInt(s.slice(u,u+2),16)}c&&(i[3]=parseInt(c,16)/255)}else if(s=e.match(t)){for(s=s[1],c=s[3],l=0;l<3;l++)i[l]=parseInt(s[l]+s[l],16);c&&(i[3]=parseInt(c+c,16)/255)}else if(s=e.match(r)){for(l=0;l<3;l++)i[l]=parseInt(s[l+1],0);s[4]&&(s[5]?i[3]=parseFloat(s[4])*.01:i[3]=parseFloat(s[4]))}else if(s=e.match(o)){for(l=0;l<3;l++)i[l]=Math.round(parseFloat(s[l+1])*2.55);s[4]&&(s[5]?i[3]=parseFloat(s[4])*.01:i[3]=parseFloat(s[4]))}else return(s=e.match(a))?s[1]==="transparent"?[0,0,0,0]:Ub.call(Ja,s[1])?(i=Ja[s[1]],i[3]=1,i):null:null;for(l=0;l<3;l++)i[l]=yr(i[l],0,255);return i[3]=yr(i[3],0,1),i};Kt.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,a=yr(parseFloat(n[2]),0,100),i=yr(parseFloat(n[3]),0,100),s=yr(isNaN(r)?1:r,0,1);return[o,a,i,s]}return null};Kt.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,a=yr(parseFloat(n[2]),0,100),i=yr(parseFloat(n[3]),0,100),s=yr(isNaN(r)?1:r,0,1);return[o,a,i,s]}return null};Kt.to.hex=function(){var e=Ti(arguments);return"#"+cs(e[0])+cs(e[1])+cs(e[2])+(e[3]<1?cs(Math.round(e[3]*255)):"")};Kt.to.rgb=function(){var e=Ti(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Kt.to.rgb.percent=function(){var e=Ti(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"};Kt.to.hsl=function(){var e=Ti(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Kt.to.hwb=function(){var e=Ti(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Kt.to.keyword=function(e){return Wb[e.slice(0,3)]};function yr(e,t,n){return Math.min(Math.max(t,e),n)}function cs(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var R_=zb.exports;const ui=Hb,Gb={};for(const e of Object.keys(ui))Gb[ui[e]]=e;const se={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Kb=se;for(const e of Object.keys(se)){if(!("channels"in se[e]))throw new Error("missing channels property: "+e);if(!("labels"in se[e]))throw new Error("missing channel labels property: "+e);if(se[e].labels.length!==se[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=se[e];delete se[e].channels,delete se[e].labels,Object.defineProperty(se[e],"channels",{value:t}),Object.defineProperty(se[e],"labels",{value:n})}se.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=a-o;let s,l;a===o?s=0:t===a?s=(n-r)/i:n===a?s=2+(r-t)/i:r===a&&(s=4+(t-n)/i),s=Math.min(s*60,360),s<0&&(s+=360);const c=(o+a)/2;return a===o?l=0:c<=.5?l=i/(a+o):l=i/(2-a-o),[s,l*100,c*100]};se.rgb.hsv=function(e){let t,n,r,o,a;const i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),f=function(d){return(c-d)/6/u+1/2};return u===0?(o=0,a=0):(a=u/c,t=f(i),n=f(s),r=f(l),i===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};se.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=se.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};se.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,i=(1-n-o)/(1-o)||0,s=(1-r-o)/(1-o)||0;return[a*100,i*100,s*100,o*100]};function $_(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}se.rgb.keyword=function(e){const t=Gb[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(ui)){const a=ui[o],i=$_(e,a);i<n&&(n=i,r=o)}return r};se.keyword.rgb=function(e){return ui[e]};se.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,i=t*.0193+n*.1192+r*.9505;return[o*100,a*100,i*100]};se.rgb.lab=function(e){const t=se.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,i=500*(n-r),s=200*(r-o);return[a,i,s]};se.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,i;if(n===0)return i=r*255,[i,i,i];r<.5?o=r*(1+n):o=r+n-r*n;const s=2*r-o,l=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?i=s+(o-s)*6*a:2*a<1?i=o:3*a<2?i=s+(o-s)*(2/3-a)*6:i=s,l[c]=i*255;return l};se.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const i=(r+n)/2,s=r===0?2*o/(a+o):2*n/(r+n);return[t,s*100,i*100]};se.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}};se.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,i;i=(2-n)*r;const s=(2-n)*o;return a=n*o,a/=s<=1?s:2-s,a=a||0,i/=2,[t,a*100,i*100]};se.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),s=1-r;a=6*t-i,i&1&&(a=1-a);const l=n+a*(s-n);let c,u,f;switch(i){default:case 6:case 0:c=s,u=l,f=n;break;case 1:c=l,u=s,f=n;break;case 2:c=n,u=s,f=l;break;case 3:c=n,u=l,f=s;break;case 4:c=l,u=n,f=s;break;case 5:c=s,u=n,f=l;break}return[c*255,u*255,f*255]};se.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),i=1-Math.min(1,n*(1-o)+o),s=1-Math.min(1,r*(1-o)+o);return[a*255,i*255,s*255]};se.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,i;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,i=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),i=Math.min(Math.max(0,i),1),[o*255,a*255,i*255]};se.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),i=200*(n-r);return[o,a,i]};se.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,i;a=(t+16)/116,o=n/500+a,i=a-r/200;const s=a**3,l=o**3,c=i**3;return a=s>.008856?s:(a-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o*=95.047,a*=100,i*=108.883,[o,a,i]};se.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const i=Math.sqrt(n*n+r*r);return[t,i,o]};se.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),i=n*Math.sin(o);return[t,a,i]};se.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?se.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let i=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(i+=60),i};se.hsv.ansi16=function(e){return se.rgb.ansi16(se.hsv.rgb(e),e[2])};se.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};se.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};se.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};se.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};se.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(s=>s+s).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,i=r&255;return[o,a,i]};se.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),i=o-a;let s,l;return i<1?s=a/(1-i):s=0,i<=0?l=0:o===t?l=(n-r)/i%6:o===n?l=2+(r-t)/i:l=4+(t-n)/i,l/=6,l%=1,[l*360,i*100,s*100]};se.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};se.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};se.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,i=a%1,s=1-i;let l=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[(n*o[0]+l)*255,(n*o[1]+l)*255,(n*o[2]+l)*255]};se.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};se.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};se.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};se.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};se.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};se.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};se.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};se.gray.hsl=function(e){return[0,0,e[0]]};se.gray.hsv=se.gray.hsl;se.gray.hwb=function(e){return[0,100,e[0]]};se.gray.cmyk=function(e){return[0,0,0,e[0]]};se.gray.lab=function(e){return[e[0],0,0]};se.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};se.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Xs=Kb;function T_(){const e={},t=Object.keys(Xs);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function P_(e){const t=T_(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),o=Object.keys(Xs[r]);for(let a=o.length,i=0;i<a;i++){const s=o[i],l=t[s];l.distance===-1&&(l.distance=t[r].distance+1,l.parent=r,n.unshift(s))}}return t}function k_(e,t){return function(n){return t(e(n))}}function N_(e,t){const n=[t[e].parent,e];let r=Xs[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),r=k_(Xs[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var A_=function(e){const t=P_(e),n={},r=Object.keys(t);for(let o=r.length,a=0;a<o;a++){const i=r[a];t[i].parent!==null&&(n[i]=N_(i,t))}return n};const _u=Kb,M_=A_,bo={},j_=Object.keys(_u);function D_(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function I_(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,i=0;i<a;i++)o[i]=Math.round(o[i]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}j_.forEach(e=>{bo[e]={},Object.defineProperty(bo[e],"channels",{value:_u[e].channels}),Object.defineProperty(bo[e],"labels",{value:_u[e].labels});const t=M_(e);Object.keys(t).forEach(r=>{const o=t[r];bo[e][r]=I_(o),bo[e][r].raw=D_(o)})});var L_=bo;const yo=R_,Wt=L_,qb=["keyword","gray","hex"],Ou={};for(const e of Object.keys(Wt))Ou[[...Wt[e].labels].sort().join("")]=e;const Ys={};function bt(e,t){if(!(this instanceof bt))return new bt(e,t);if(t&&t in qb&&(t=null),t&&!(t in Wt))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof bt)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const o=yo.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,r=Wt[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=Wt[this.model].channels;const o=Array.prototype.slice.call(e,0,r);this.color=Eu(o,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const a=o.sort().join("");if(!(a in Ou))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ou[a];const{labels:i}=Wt[this.model],s=[];for(n=0;n<i.length;n++)s.push(e[i[n]]);this.color=Eu(s)}if(Ys[this.model])for(r=Wt[this.model].channels,n=0;n<r;n++){const o=Ys[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}bt.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in yo.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const n=t.valpha===1?t.color:[...t.color,this.valpha];return yo.to[t.model](n)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return yo.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Wt[this.model],{labels:n}=Wt[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new bt([...this.color.map(F_(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new bt([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:et("rgb",0,dt(255)),green:et("rgb",1,dt(255)),blue:et("rgb",2,dt(255)),hue:et(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:et("hsl",1,dt(100)),lightness:et("hsl",2,dt(100)),saturationv:et("hsv",1,dt(100)),value:et("hsv",2,dt(100)),chroma:et("hcg",1,dt(100)),gray:et("hcg",2,dt(100)),white:et("hwb",1,dt(100)),wblack:et("hwb",2,dt(100)),cyan:et("cmyk",0,dt(100)),magenta:et("cmyk",1,dt(100)),yellow:et("cmyk",2,dt(100)),black:et("cmyk",3,dt(100)),x:et("xyz",0,dt(95.047)),y:et("xyz",1,dt(100)),z:et("xyz",2,dt(108.833)),l:et("lab",0,dt(100)),a:et("lab",1),b:et("lab",2),keyword(e){return e!==void 0?new bt(e):Wt[this.model].keyword(this.color)},hex(e){return e!==void 0?new bt(e):yo.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new bt(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),yo.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const o=r/255;t[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return bt.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),o=t===void 0?.5:t,a=2*o-1,i=n.alpha()-r.alpha(),s=((a*i===-1?a:(a+i)/(1+a*i))+1)/2,l=1-s;return bt.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(const e of Object.keys(Wt)){if(qb.includes(e))continue;const{channels:t}=Wt[e];bt.prototype[e]=function(...n){return this.model===e?new bt(this):n.length>0?new bt(n,e):new bt([...z_(Wt[this.model][e].raw(this.color)),this.valpha],e)},bt[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=Eu(n,t)),new bt(r,e)}}function B_(e,t){return Number(e.toFixed(t))}function F_(e){return function(t){return B_(t,e)}}function et(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(Ys[r]||(Ys[r]=[]))[t]=n;return e=e[0],function(r){let o;return r!==void 0?(n&&(r=n(r)),o=this[e](),o.color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function dt(e){return function(t){return Math.max(0,Math.min(e,t))}}function z_(e){return Array.isArray(e)?e:[e]}function Eu(e,t){for(let n=0;n<t;n++)typeof e[n]!="number"&&(e[n]=0);return e}var H_=bt;const V_=Sl(H_);var Cp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,U_=function(e,t){t=t||{};var n=1,r=1;function o(D){var R=D.match(/\n/g);R&&(n+=R.length);var T=D.lastIndexOf(`
|
|
87
|
+
`);r=~T?D.length-T:r+D.length}function a(){var D={line:n,column:r};return function(R){return R.position=new i(D),v(),R}}function i(D){this.start=D,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var s=[];function l(D){var R=new Error(t.source+":"+n+":"+r+": "+D);if(R.reason=D,R.filename=t.source,R.line=n,R.column=r,R.source=e,t.silent)s.push(R);else throw R}function c(){var D=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:D,parsingErrors:s}}}function u(){return h(/^{\s*/)}function f(){return h(/^}/)}function d(){var D,R=[];for(v(),g(R);e.length&&e.charAt(0)!="}"&&(D=ne()||fe());)D!==!1&&(R.push(D),g(R));return R}function h(D){var R=D.exec(e);if(R){var T=R[0];return o(T),e=e.slice(T.length),R}}function v(){h(/^\s*/)}function g(D){var R;for(D=D||[];R=m();)R!==!1&&D.push(R);return D}function m(){var D=a();if(!(e.charAt(0)!="/"||e.charAt(1)!="*")){for(var R=2;e.charAt(R)!=""&&(e.charAt(R)!="*"||e.charAt(R+1)!="/");)++R;if(R+=2,e.charAt(R-1)==="")return l("End of comment missing");var T=e.slice(2,R-2);return r+=2,o(T),e=e.slice(R),r+=2,D({type:"comment",comment:T})}}function y(){var D=h(/^([^{]+)/);if(D)return Qn(D[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(R){return R.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(R){return R.replace(/\u200C/g,",")})}function w(){var D=a(),R=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(R){if(R=Qn(R[0]),!h(/^:\s*/))return l("property missing ':'");var T=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),N=D({type:"declaration",property:R.replace(Cp,""),value:T?Qn(T[0]).replace(Cp,""):""});return h(/^[;\s]*/),N}}function _(){var D=[];if(!u())return l("missing '{'");g(D);for(var R;R=w();)R!==!1&&(D.push(R),g(D));return f()?D:l("missing '}'")}function S(){for(var D,R=[],T=a();D=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)R.push(D[1]),h(/^,\s*/);if(R.length)return T({type:"keyframe",values:R,declarations:_()})}function x(){var D=a(),T=h(/^@([-\w]+)?keyframes\s*/);if(T){var R=T[1],T=h(/^([-\w]+)\s*/);if(!T)return l("@keyframes missing name");var N=T[1];if(!u())return l("@keyframes missing '{'");for(var I,H=g();I=S();)H.push(I),H=H.concat(g());return f()?D({type:"keyframes",name:N,vendor:R,keyframes:H}):l("@keyframes missing '}'")}}function C(){var D=a(),R=h(/^@supports *([^{]+)/);if(R){var T=Qn(R[1]);if(!u())return l("@supports missing '{'");var N=g().concat(d());return f()?D({type:"supports",supports:T,rules:N}):l("@supports missing '}'")}}function O(){var D=a(),R=h(/^@host\s*/);if(R){if(!u())return l("@host missing '{'");var T=g().concat(d());return f()?D({type:"host",rules:T}):l("@host missing '}'")}}function $(){var D=a(),R=h(/^@media *([^{]+)/);if(R){var T=Qn(R[1]);if(!u())return l("@media missing '{'");var N=g().concat(d());return f()?D({type:"media",media:T,rules:N}):l("@media missing '}'")}}function k(){var D=a(),R=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(R)return D({type:"custom-media",name:Qn(R[1]),media:Qn(R[2])})}function P(){var D=a(),R=h(/^@page */);if(R){var T=y()||[];if(!u())return l("@page missing '{'");for(var N=g(),I;I=w();)N.push(I),N=N.concat(g());return f()?D({type:"page",selectors:T,declarations:N}):l("@page missing '}'")}}function j(){var D=a(),R=h(/^@([-\w]+)?document *([^{]+)/);if(R){var T=Qn(R[1]),N=Qn(R[2]);if(!u())return l("@document missing '{'");var I=g().concat(d());return f()?D({type:"document",document:N,vendor:T,rules:I}):l("@document missing '}'")}}function L(){var D=a(),R=h(/^@font-face\s*/);if(R){if(!u())return l("@font-face missing '{'");for(var T=g(),N;N=w();)T.push(N),T=T.concat(g());return f()?D({type:"font-face",declarations:T}):l("@font-face missing '}'")}}var F=G("import"),W=G("charset"),B=G("namespace");function G(D){var R=new RegExp("^@"+D+"\\s*([^;]+);");return function(){var T=a(),N=h(R);if(N){var I={type:D};return I[D]=N[1].trim(),T(I)}}}function ne(){if(e[0]=="@")return x()||$()||k()||C()||F()||W()||B()||j()||P()||O()||L()}function fe(){var D=a(),R=y();return R?(g(),D({type:"rule",selectors:R,declarations:_()})):l("selector missing")}return Ru(c())};function Qn(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ru(e,t){var n=e&&typeof e.type=="string",r=n?e:t;for(var o in e){var a=e[o];Array.isArray(a)?a.forEach(function(i){Ru(i,r)}):a&&typeof a=="object"&&Ru(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Xb=El;function El(e){this.options=e||{}}El.prototype.emit=function(e){return e};El.prototype.visit=function(e){return this[e.type](e)};El.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var $u={exports:{}};typeof Object.create=="function"?$u.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:$u.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var Yb=$u.exports,Jb=Xb,W_=Yb;function _t(e){Jb.call(this,e)}W_(_t,Jb);_t.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")};_t.prototype.comment=function(e){return this.emit("",e.position)};_t.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)};_t.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};_t.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};_t.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)};_t.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)};_t.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};_t.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")};_t.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")};_t.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")};_t.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")};_t.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};_t.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)};_t.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""};_t.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var Qb=Xb,G_=Yb;function mt(e){e=e||{},Qb.call(this,e),this.indentation=e.indent}G_(mt,Qb);mt.prototype.compile=function(e){return this.stylesheet(e)};mt.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,`
|
|
88
|
+
|
|
89
|
+
`)};mt.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)};mt.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)};mt.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(` {
|
|
90
|
+
`+this.indent(1))+this.mapVisit(e.rules,`
|
|
91
|
+
|
|
92
|
+
`)+this.emit(this.indent(-1)+`
|
|
93
|
+
}`)};mt.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(` {
|
|
94
|
+
`+this.indent(1))+this.mapVisit(e.rules,`
|
|
95
|
+
|
|
96
|
+
`)+this.emit(this.indent(-1)+`
|
|
97
|
+
}`)};mt.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)};mt.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)};mt.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(` {
|
|
98
|
+
`+this.indent(1))+this.mapVisit(e.rules,`
|
|
99
|
+
|
|
100
|
+
`)+this.emit(this.indent(-1)+`
|
|
101
|
+
}`)};mt.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(` {
|
|
102
|
+
`+this.indent(1))+this.mapVisit(e.keyframes,`
|
|
103
|
+
`)+this.emit(this.indent(-1)+"}")};mt.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(` {
|
|
104
|
+
`+this.indent(1))+this.mapVisit(t,`
|
|
105
|
+
`)+this.emit(this.indent(-1)+`
|
|
106
|
+
`+this.indent()+`}
|
|
107
|
+
`)};mt.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit(`{
|
|
108
|
+
`)+this.emit(this.indent(1))+this.mapVisit(e.declarations,`
|
|
109
|
+
`)+this.emit(this.indent(-1))+this.emit(`
|
|
110
|
+
}`)};mt.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit(`{
|
|
111
|
+
`)+this.emit(this.indent(1))+this.mapVisit(e.declarations,`
|
|
112
|
+
`)+this.emit(this.indent(-1))+this.emit(`
|
|
113
|
+
}`)};mt.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(` {
|
|
114
|
+
`+this.indent(1))+this.mapVisit(e.rules,`
|
|
115
|
+
|
|
116
|
+
`)+this.emit(this.indent(-1)+`
|
|
117
|
+
}`)};mt.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)};mt.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map(function(r){return t+r}).join(`,
|
|
118
|
+
`),e.position)+this.emit(` {
|
|
119
|
+
`)+this.emit(this.indent(1))+this.mapVisit(n,`
|
|
120
|
+
`)+this.emit(this.indent(-1))+this.emit(`
|
|
121
|
+
`+this.indent()+"}"):""};mt.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")};mt.prototype.indent=function(e){return this.level=this.level||1,e!=null?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var K_=U_,q_=typeof global=="object"&&global&&global.Object===Object&&global;const Zb=q_;var X_=typeof self=="object"&&self&&self.Object===Object&&self,Y_=Zb||X_||Function("return this")();const En=Y_;var J_=En.Symbol;const In=J_;var ey=Object.prototype,Q_=ey.hasOwnProperty,Z_=ey.toString,Ia=In?In.toStringTag:void 0;function eO(e){var t=Q_.call(e,Ia),n=e[Ia];try{e[Ia]=void 0;var r=!0}catch{}var o=Z_.call(e);return r&&(t?e[Ia]=n:delete e[Ia]),o}var tO=Object.prototype,nO=tO.toString;function rO(e){return nO.call(e)}var oO="[object Null]",aO="[object Undefined]",_p=In?In.toStringTag:void 0;function Yr(e){return e==null?e===void 0?aO:oO:_p&&_p in Object(e)?eO(e):rO(e)}function Ln(e){return e!=null&&typeof e=="object"}var iO="[object Symbol]";function Rl(e){return typeof e=="symbol"||Ln(e)&&Yr(e)==iO}function ty(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var sO=Array.isArray;const Dt=sO;var lO=1/0,Op=In?In.prototype:void 0,Ep=Op?Op.toString:void 0;function ny(e){if(typeof e=="string")return e;if(Dt(e))return ty(e,ny)+"";if(Rl(e))return Ep?Ep.call(e):"";var t=e+"";return t=="0"&&1/e==-lO?"-0":t}var cO=/\s/;function uO(e){for(var t=e.length;t--&&cO.test(e.charAt(t)););return t}var fO=/^\s+/;function dO(e){return e&&e.slice(0,uO(e)+1).replace(fO,"")}function Xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rp=0/0,hO=/^[-+]0x[0-9a-f]+$/i,pO=/^0b[01]+$/i,gO=/^0o[0-7]+$/i,vO=parseInt;function $p(e){if(typeof e=="number")return e;if(Rl(e))return Rp;if(Xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dO(e);var n=pO.test(e);return n||gO.test(e)?vO(e.slice(2),n?2:8):hO.test(e)?Rp:+e}function $l(e){return e}var mO="[object AsyncFunction]",bO="[object Function]",yO="[object GeneratorFunction]",xO="[object Proxy]";function Jf(e){if(!Xt(e))return!1;var t=Yr(e);return t==bO||t==yO||t==mO||t==xO}var wO=En["__core-js_shared__"];const yc=wO;var Tp=function(){var e=/[^.]+$/.exec(yc&&yc.keys&&yc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function SO(e){return!!Tp&&Tp in e}var CO=Function.prototype,_O=CO.toString;function Jr(e){if(e!=null){try{return _O.call(e)}catch{}try{return e+""}catch{}}return""}var OO=/[\\^$.*+?()[\]{}|]/g,EO=/^\[object .+?Constructor\]$/,RO=Function.prototype,$O=Object.prototype,TO=RO.toString,PO=$O.hasOwnProperty,kO=RegExp("^"+TO.call(PO).replace(OO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NO(e){if(!Xt(e)||SO(e))return!1;var t=Jf(e)?kO:EO;return t.test(Jr(e))}function AO(e,t){return e==null?void 0:e[t]}function Qr(e,t){var n=AO(e,t);return NO(n)?n:void 0}var MO=Qr(En,"WeakMap");const Tu=MO;var Pp=Object.create,jO=function(){function e(){}return function(t){if(!Xt(t))return{};if(Pp)return Pp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const DO=jO;function IO(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ry(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var LO=800,BO=16,FO=Date.now;function zO(e){var t=0,n=0;return function(){var r=FO(),o=BO-(r-n);if(n=r,o>0){if(++t>=LO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function HO(e){return function(){return e}}var VO=function(){try{var e=Qr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Js=VO;var UO=Js?function(e,t){return Js(e,"toString",{configurable:!0,enumerable:!1,value:HO(t),writable:!0})}:$l;const WO=UO;var GO=zO(WO);const KO=GO;function oy(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var qO=9007199254740991,XO=/^(?:0|[1-9]\d*)$/;function Qf(e,t){var n=typeof e;return t=t??qO,!!t&&(n=="number"||n!="symbol"&&XO.test(e))&&e>-1&&e%1==0&&e<t}function Zf(e,t,n){t=="__proto__"&&Js?Js(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Pi(e,t){return e===t||e!==e&&t!==t}var YO=Object.prototype,JO=YO.hasOwnProperty;function ay(e,t,n){var r=e[t];(!(JO.call(e,t)&&Pi(r,n))||n===void 0&&!(t in e))&&Zf(e,t,n)}function ki(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Zf(n,s,l):ay(n,s,l)}return n}var kp=Math.max;function QO(e,t,n){return t=kp(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=kp(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),IO(e,this,s)}}function ZO(e,t){return KO(QO(e,t,$l),e+"")}var eE=9007199254740991;function ed(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=eE}function ia(e){return e!=null&&ed(e.length)&&!Jf(e)}function tE(e,t,n){if(!Xt(n))return!1;var r=typeof t;return(r=="number"?ia(n)&&Qf(t,n.length):r=="string"&&t in n)?Pi(n[t],e):!1}function nE(e){return ZO(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&tE(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var rE=Object.prototype;function td(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||rE;return e===n}function oE(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var aE="[object Arguments]";function Np(e){return Ln(e)&&Yr(e)==aE}var iy=Object.prototype,iE=iy.hasOwnProperty,sE=iy.propertyIsEnumerable,lE=Np(function(){return arguments}())?Np:function(e){return Ln(e)&&iE.call(e,"callee")&&!sE.call(e,"callee")};const Qs=lE;function cE(){return!1}var sy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ap=sy&&typeof module=="object"&&module&&!module.nodeType&&module,uE=Ap&&Ap.exports===sy,Mp=uE?En.Buffer:void 0,fE=Mp?Mp.isBuffer:void 0,dE=fE||cE;const fi=dE;var hE="[object Arguments]",pE="[object Array]",gE="[object Boolean]",vE="[object Date]",mE="[object Error]",bE="[object Function]",yE="[object Map]",xE="[object Number]",wE="[object Object]",SE="[object RegExp]",CE="[object Set]",_E="[object String]",OE="[object WeakMap]",EE="[object ArrayBuffer]",RE="[object DataView]",$E="[object Float32Array]",TE="[object Float64Array]",PE="[object Int8Array]",kE="[object Int16Array]",NE="[object Int32Array]",AE="[object Uint8Array]",ME="[object Uint8ClampedArray]",jE="[object Uint16Array]",DE="[object Uint32Array]",He={};He[$E]=He[TE]=He[PE]=He[kE]=He[NE]=He[AE]=He[ME]=He[jE]=He[DE]=!0;He[hE]=He[pE]=He[EE]=He[gE]=He[RE]=He[vE]=He[mE]=He[bE]=He[yE]=He[xE]=He[wE]=He[SE]=He[CE]=He[_E]=He[OE]=!1;function IE(e){return Ln(e)&&ed(e.length)&&!!He[Yr(e)]}function nd(e){return function(t){return e(t)}}var ly=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qa=ly&&typeof module=="object"&&module&&!module.nodeType&&module,LE=Qa&&Qa.exports===ly,xc=LE&&Zb.process,BE=function(){try{var e=Qa&&Qa.require&&Qa.require("util").types;return e||xc&&xc.binding&&xc.binding("util")}catch{}}();const Go=BE;var jp=Go&&Go.isTypedArray,FE=jp?nd(jp):IE;const rd=FE;var zE=Object.prototype,HE=zE.hasOwnProperty;function cy(e,t){var n=Dt(e),r=!n&&Qs(e),o=!n&&!r&&fi(e),a=!n&&!r&&!o&&rd(e),i=n||r||o||a,s=i?oE(e.length,String):[],l=s.length;for(var c in e)(t||HE.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Qf(c,l)))&&s.push(c);return s}function uy(e,t){return function(n){return e(t(n))}}var VE=uy(Object.keys,Object);const UE=VE;var WE=Object.prototype,GE=WE.hasOwnProperty;function KE(e){if(!td(e))return UE(e);var t=[];for(var n in Object(e))GE.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ni(e){return ia(e)?cy(e):KE(e)}function qE(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var XE=Object.prototype,YE=XE.hasOwnProperty;function JE(e){if(!Xt(e))return qE(e);var t=td(e),n=[];for(var r in e)r=="constructor"&&(t||!YE.call(e,r))||n.push(r);return n}function Ai(e){return ia(e)?cy(e,!0):JE(e)}var QE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ZE=/^\w*$/;function od(e,t){if(Dt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Rl(e)?!0:ZE.test(e)||!QE.test(e)||t!=null&&e in Object(t)}var eR=Qr(Object,"create");const di=eR;function tR(){this.__data__=di?di(null):{},this.size=0}function nR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rR="__lodash_hash_undefined__",oR=Object.prototype,aR=oR.hasOwnProperty;function iR(e){var t=this.__data__;if(di){var n=t[e];return n===rR?void 0:n}return aR.call(t,e)?t[e]:void 0}var sR=Object.prototype,lR=sR.hasOwnProperty;function cR(e){var t=this.__data__;return di?t[e]!==void 0:lR.call(t,e)}var uR="__lodash_hash_undefined__";function fR(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=di&&t===void 0?uR:t,this}function Ur(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ur.prototype.clear=tR;Ur.prototype.delete=nR;Ur.prototype.get=iR;Ur.prototype.has=cR;Ur.prototype.set=fR;function dR(){this.__data__=[],this.size=0}function Tl(e,t){for(var n=e.length;n--;)if(Pi(e[n][0],t))return n;return-1}var hR=Array.prototype,pR=hR.splice;function gR(e){var t=this.__data__,n=Tl(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():pR.call(t,n,1),--this.size,!0}function vR(e){var t=this.__data__,n=Tl(t,e);return n<0?void 0:t[n][1]}function mR(e){return Tl(this.__data__,e)>-1}function bR(e,t){var n=this.__data__,r=Tl(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ir(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ir.prototype.clear=dR;ir.prototype.delete=gR;ir.prototype.get=vR;ir.prototype.has=mR;ir.prototype.set=bR;var yR=Qr(En,"Map");const hi=yR;function xR(){this.size=0,this.__data__={hash:new Ur,map:new(hi||ir),string:new Ur}}function wR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pl(e,t){var n=e.__data__;return wR(t)?n[typeof t=="string"?"string":"hash"]:n.map}function SR(e){var t=Pl(this,e).delete(e);return this.size-=t?1:0,t}function CR(e){return Pl(this,e).get(e)}function _R(e){return Pl(this,e).has(e)}function OR(e,t){var n=Pl(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sr.prototype.clear=xR;sr.prototype.delete=SR;sr.prototype.get=CR;sr.prototype.has=_R;sr.prototype.set=OR;var ER="Expected a function";function ad(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ER);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(ad.Cache||sr),n}ad.Cache=sr;var RR=500;function $R(e){var t=ad(e,function(r){return n.size===RR&&n.clear(),r}),n=t.cache;return t}var TR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PR=/\\(\\)?/g,kR=$R(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(TR,function(n,r,o,a){t.push(o?a.replace(PR,"$1"):r||n)}),t});const NR=kR;function id(e){return e==null?"":ny(e)}function fy(e,t){return Dt(e)?e:od(e,t)?[e]:NR(id(e))}var AR=1/0;function kl(e){if(typeof e=="string"||Rl(e))return e;var t=e+"";return t=="0"&&1/e==-AR?"-0":t}function dy(e,t){t=fy(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[kl(t[n++])];return n&&n==r?e:void 0}function MR(e,t,n){var r=e==null?void 0:dy(e,t);return r===void 0?n:r}function hy(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var jR=uy(Object.getPrototypeOf,Object);const sd=jR;var DR="[object Object]",IR=Function.prototype,LR=Object.prototype,py=IR.toString,BR=LR.hasOwnProperty,FR=py.call(Object);function sa(e){if(!Ln(e)||Yr(e)!=DR)return!1;var t=sd(e);if(t===null)return!0;var n=BR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&py.call(n)==FR}function zR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function HR(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:zR(e,t,n)}var VR="\\ud800-\\udfff",UR="\\u0300-\\u036f",WR="\\ufe20-\\ufe2f",GR="\\u20d0-\\u20ff",KR=UR+WR+GR,qR="\\ufe0e\\ufe0f",XR="\\u200d",YR=RegExp("["+XR+VR+KR+qR+"]");function gy(e){return YR.test(e)}function JR(e){return e.split("")}var vy="\\ud800-\\udfff",QR="\\u0300-\\u036f",ZR="\\ufe20-\\ufe2f",e$="\\u20d0-\\u20ff",t$=QR+ZR+e$,n$="\\ufe0e\\ufe0f",r$="["+vy+"]",Pu="["+t$+"]",ku="\\ud83c[\\udffb-\\udfff]",o$="(?:"+Pu+"|"+ku+")",my="[^"+vy+"]",by="(?:\\ud83c[\\udde6-\\uddff]){2}",yy="[\\ud800-\\udbff][\\udc00-\\udfff]",a$="\\u200d",xy=o$+"?",wy="["+n$+"]?",i$="(?:"+a$+"(?:"+[my,by,yy].join("|")+")"+wy+xy+")*",s$=wy+xy+i$,l$="(?:"+[my+Pu+"?",Pu,by,yy,r$].join("|")+")",c$=RegExp(ku+"(?="+ku+")|"+l$+s$,"g");function u$(e){return e.match(c$)||[]}function f$(e){return gy(e)?u$(e):JR(e)}function d$(e){return function(t){t=id(t);var n=gy(t)?f$(t):void 0,r=n?n[0]:t.charAt(0),o=n?HR(n,1).join(""):t.slice(1);return r[e]()+o}}var h$=d$("toUpperCase");const p$=h$;function Sy(e){return p$(id(e).toLowerCase())}function g$(){this.__data__=new ir,this.size=0}function v$(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function m$(e){return this.__data__.get(e)}function b$(e){return this.__data__.has(e)}var y$=200;function x$(e,t){var n=this.__data__;if(n instanceof ir){var r=n.__data__;if(!hi||r.length<y$-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new sr(r)}return n.set(e,t),this.size=n.size,this}function bn(e){var t=this.__data__=new ir(e);this.size=t.size}bn.prototype.clear=g$;bn.prototype.delete=v$;bn.prototype.get=m$;bn.prototype.has=b$;bn.prototype.set=x$;function w$(e,t){return e&&ki(t,Ni(t),e)}function S$(e,t){return e&&ki(t,Ai(t),e)}var Cy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dp=Cy&&typeof module=="object"&&module&&!module.nodeType&&module,C$=Dp&&Dp.exports===Cy,Ip=C$?En.Buffer:void 0,Lp=Ip?Ip.allocUnsafe:void 0;function _y(e,t){if(t)return e.slice();var n=e.length,r=Lp?Lp(n):new e.constructor(n);return e.copy(r),r}function _$(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Oy(){return[]}var O$=Object.prototype,E$=O$.propertyIsEnumerable,Bp=Object.getOwnPropertySymbols,R$=Bp?function(e){return e==null?[]:(e=Object(e),_$(Bp(e),function(t){return E$.call(e,t)}))}:Oy;const ld=R$;function $$(e,t){return ki(e,ld(e),t)}var T$=Object.getOwnPropertySymbols,P$=T$?function(e){for(var t=[];e;)hy(t,ld(e)),e=sd(e);return t}:Oy;const Ey=P$;function k$(e,t){return ki(e,Ey(e),t)}function Ry(e,t,n){var r=t(e);return Dt(e)?r:hy(r,n(e))}function Nu(e){return Ry(e,Ni,ld)}function N$(e){return Ry(e,Ai,Ey)}var A$=Qr(En,"DataView");const Au=A$;var M$=Qr(En,"Promise");const Mu=M$;var j$=Qr(En,"Set");const ju=j$;var Fp="[object Map]",D$="[object Object]",zp="[object Promise]",Hp="[object Set]",Vp="[object WeakMap]",Up="[object DataView]",I$=Jr(Au),L$=Jr(hi),B$=Jr(Mu),F$=Jr(ju),z$=Jr(Tu),jr=Yr;(Au&&jr(new Au(new ArrayBuffer(1)))!=Up||hi&&jr(new hi)!=Fp||Mu&&jr(Mu.resolve())!=zp||ju&&jr(new ju)!=Hp||Tu&&jr(new Tu)!=Vp)&&(jr=function(e){var t=Yr(e),n=t==D$?e.constructor:void 0,r=n?Jr(n):"";if(r)switch(r){case I$:return Up;case L$:return Fp;case B$:return zp;case F$:return Hp;case z$:return Vp}return t});const pi=jr;var H$=Object.prototype,V$=H$.hasOwnProperty;function U$(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&V$.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var W$=En.Uint8Array;const Zs=W$;function cd(e){var t=new e.constructor(e.byteLength);return new Zs(t).set(new Zs(e)),t}function G$(e,t){var n=t?cd(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var K$=/\w*$/;function q$(e){var t=new e.constructor(e.source,K$.exec(e));return t.lastIndex=e.lastIndex,t}var Wp=In?In.prototype:void 0,Gp=Wp?Wp.valueOf:void 0;function X$(e){return Gp?Object(Gp.call(e)):{}}function $y(e,t){var n=t?cd(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Y$="[object Boolean]",J$="[object Date]",Q$="[object Map]",Z$="[object Number]",e5="[object RegExp]",t5="[object Set]",n5="[object String]",r5="[object Symbol]",o5="[object ArrayBuffer]",a5="[object DataView]",i5="[object Float32Array]",s5="[object Float64Array]",l5="[object Int8Array]",c5="[object Int16Array]",u5="[object Int32Array]",f5="[object Uint8Array]",d5="[object Uint8ClampedArray]",h5="[object Uint16Array]",p5="[object Uint32Array]";function g5(e,t,n){var r=e.constructor;switch(t){case o5:return cd(e);case Y$:case J$:return new r(+e);case a5:return G$(e,n);case i5:case s5:case l5:case c5:case u5:case f5:case d5:case h5:case p5:return $y(e,n);case Q$:return new r;case Z$:case n5:return new r(e);case e5:return q$(e);case t5:return new r;case r5:return X$(e)}}function Ty(e){return typeof e.constructor=="function"&&!td(e)?DO(sd(e)):{}}var v5="[object Map]";function m5(e){return Ln(e)&&pi(e)==v5}var Kp=Go&&Go.isMap,b5=Kp?nd(Kp):m5;const y5=b5;var x5="[object Set]";function w5(e){return Ln(e)&&pi(e)==x5}var qp=Go&&Go.isSet,S5=qp?nd(qp):w5;const C5=S5;var _5=1,O5=2,E5=4,Py="[object Arguments]",R5="[object Array]",$5="[object Boolean]",T5="[object Date]",P5="[object Error]",ky="[object Function]",k5="[object GeneratorFunction]",N5="[object Map]",A5="[object Number]",Ny="[object Object]",M5="[object RegExp]",j5="[object Set]",D5="[object String]",I5="[object Symbol]",L5="[object WeakMap]",B5="[object ArrayBuffer]",F5="[object DataView]",z5="[object Float32Array]",H5="[object Float64Array]",V5="[object Int8Array]",U5="[object Int16Array]",W5="[object Int32Array]",G5="[object Uint8Array]",K5="[object Uint8ClampedArray]",q5="[object Uint16Array]",X5="[object Uint32Array]",Ne={};Ne[Py]=Ne[R5]=Ne[B5]=Ne[F5]=Ne[$5]=Ne[T5]=Ne[z5]=Ne[H5]=Ne[V5]=Ne[U5]=Ne[W5]=Ne[N5]=Ne[A5]=Ne[Ny]=Ne[M5]=Ne[j5]=Ne[D5]=Ne[I5]=Ne[G5]=Ne[K5]=Ne[q5]=Ne[X5]=!0;Ne[P5]=Ne[ky]=Ne[L5]=!1;function Is(e,t,n,r,o,a){var i,s=t&_5,l=t&O5,c=t&E5;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Xt(e))return e;var u=Dt(e);if(u){if(i=U$(e),!s)return ry(e,i)}else{var f=pi(e),d=f==ky||f==k5;if(fi(e))return _y(e,s);if(f==Ny||f==Py||d&&!o){if(i=l||d?{}:Ty(e),!s)return l?k$(e,S$(i,e)):$$(e,w$(i,e))}else{if(!Ne[f])return o?e:{};i=g5(e,f,s)}}a||(a=new bn);var h=a.get(e);if(h)return h;a.set(e,i),C5(e)?e.forEach(function(m){i.add(Is(m,t,n,m,e,a))}):y5(e)&&e.forEach(function(m,y){i.set(y,Is(m,t,n,y,e,a))});var v=c?l?N$:Nu:l?Ai:Ni,g=u?void 0:v(e);return oy(g||e,function(m,y){g&&(y=m,m=e[y]),ay(i,y,Is(m,t,n,y,e,a))}),i}var Y5=1,J5=4;function Xp(e){return Is(e,Y5|J5)}var Q5="__lodash_hash_undefined__";function Z5(e){return this.__data__.set(e,Q5),this}function eT(e){return this.__data__.has(e)}function el(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sr;++t<n;)this.add(e[t])}el.prototype.add=el.prototype.push=Z5;el.prototype.has=eT;function tT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function nT(e,t){return e.has(t)}var rT=1,oT=2;function Ay(e,t,n,r,o,a){var i=n&rT,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=n&oT?new el:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var v=e[f],g=t[f];if(r)var m=i?r(g,v,f,t,e,a):r(v,g,f,e,t,a);if(m!==void 0){if(m)continue;d=!1;break}if(h){if(!tT(t,function(y,w){if(!nT(h,w)&&(v===y||o(v,y,n,r,a)))return h.push(w)})){d=!1;break}}else if(!(v===g||o(v,g,n,r,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function aT(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function iT(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var sT=1,lT=2,cT="[object Boolean]",uT="[object Date]",fT="[object Error]",dT="[object Map]",hT="[object Number]",pT="[object RegExp]",gT="[object Set]",vT="[object String]",mT="[object Symbol]",bT="[object ArrayBuffer]",yT="[object DataView]",Yp=In?In.prototype:void 0,wc=Yp?Yp.valueOf:void 0;function xT(e,t,n,r,o,a,i){switch(n){case yT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case bT:return!(e.byteLength!=t.byteLength||!a(new Zs(e),new Zs(t)));case cT:case uT:case hT:return Pi(+e,+t);case fT:return e.name==t.name&&e.message==t.message;case pT:case vT:return e==t+"";case dT:var s=aT;case gT:var l=r&sT;if(s||(s=iT),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=lT,i.set(e,t);var u=Ay(s(e),s(t),r,o,a,i);return i.delete(e),u;case mT:if(wc)return wc.call(e)==wc.call(t)}return!1}var wT=1,ST=Object.prototype,CT=ST.hasOwnProperty;function _T(e,t,n,r,o,a){var i=n&wT,s=Nu(e),l=s.length,c=Nu(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:CT.call(t,d)))return!1}var h=a.get(e),v=a.get(t);if(h&&v)return h==t&&v==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=i;++f<l;){d=s[f];var y=e[d],w=t[d];if(r)var _=i?r(w,y,d,t,e,a):r(y,w,d,e,t,a);if(!(_===void 0?y===w||o(y,w,n,r,a):_)){g=!1;break}m||(m=d=="constructor")}if(g&&!m){var S=e.constructor,x=t.constructor;S!=x&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof x=="function"&&x instanceof x)&&(g=!1)}return a.delete(e),a.delete(t),g}var OT=1,Jp="[object Arguments]",Qp="[object Array]",us="[object Object]",ET=Object.prototype,Zp=ET.hasOwnProperty;function RT(e,t,n,r,o,a){var i=Dt(e),s=Dt(t),l=i?Qp:pi(e),c=s?Qp:pi(t);l=l==Jp?us:l,c=c==Jp?us:c;var u=l==us,f=c==us,d=l==c;if(d&&fi(e)){if(!fi(t))return!1;i=!0,u=!1}if(d&&!u)return a||(a=new bn),i||rd(e)?Ay(e,t,n,r,o,a):xT(e,t,l,n,r,o,a);if(!(n&OT)){var h=u&&Zp.call(e,"__wrapped__"),v=f&&Zp.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;return a||(a=new bn),o(g,m,n,r,a)}}return d?(a||(a=new bn),_T(e,t,n,r,o,a)):!1}function ud(e,t,n,r,o){return e===t?!0:e==null||t==null||!Ln(e)&&!Ln(t)?e!==e&&t!==t:RT(e,t,n,r,ud,o)}var $T=1,TT=2;function PT(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new bn;if(r)var d=r(c,u,l,e,t,f);if(!(d===void 0?ud(u,c,$T|TT,r,f):d))return!1}}return!0}function My(e){return e===e&&!Xt(e)}function kT(e){for(var t=Ni(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,My(o)]}return t}function jy(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function NT(e){var t=kT(e);return t.length==1&&t[0][2]?jy(t[0][0],t[0][1]):function(n){return n===e||PT(n,e,t)}}function AT(e,t){return e!=null&&t in Object(e)}function MT(e,t,n){t=fy(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=kl(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&ed(o)&&Qf(i,o)&&(Dt(e)||Qs(e)))}function jT(e,t){return e!=null&&MT(e,t,AT)}var DT=1,IT=2;function LT(e,t){return od(e)&&My(t)?jy(kl(e),t):function(n){var r=MR(n,e);return r===void 0&&r===t?jT(n,e):ud(t,r,DT|IT)}}function BT(e){return function(t){return t==null?void 0:t[e]}}function FT(e){return function(t){return dy(t,e)}}function zT(e){return od(e)?BT(kl(e)):FT(e)}function HT(e){return typeof e=="function"?e:e==null?$l:typeof e=="object"?Dt(e)?LT(e[0],e[1]):NT(e):zT(e)}function VT(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var UT=VT();const Dy=UT;function WT(e,t){return e&&Dy(e,t,Ni)}function GT(e,t){return function(n,r){if(n==null)return n;if(!ia(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Object(n);(t?a--:++a<o)&&r(i[a],a,i)!==!1;);return n}}var KT=GT(WT);const Iy=KT;var qT=function(){return En.Date.now()};const Sc=qT;var XT="Expected a function",YT=Math.max,JT=Math.min;function Ly(e,t,n){var r,o,a,i,s,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(XT);t=$p(t)||0,Xt(n)&&(u=!!n.leading,f="maxWait"in n,a=f?YT($p(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d);function h(C){var O=r,$=o;return r=o=void 0,c=C,i=e.apply($,O),i}function v(C){return c=C,s=setTimeout(y,t),u?h(C):i}function g(C){var O=C-l,$=C-c,k=t-O;return f?JT(k,a-$):k}function m(C){var O=C-l,$=C-c;return l===void 0||O>=t||O<0||f&&$>=a}function y(){var C=Sc();if(m(C))return w(C);s=setTimeout(y,g(C))}function w(C){return s=void 0,d&&r?h(C):(r=o=void 0,i)}function _(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function S(){return s===void 0?i:w(Sc())}function x(){var C=Sc(),O=m(C);if(r=arguments,o=this,l=C,O){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(y,t),h(l)}return s===void 0&&(s=setTimeout(y,t)),i}return x.cancel=_,x.flush=S,x}function Du(e,t,n){(n!==void 0&&!Pi(e[t],n)||n===void 0&&!(t in e))&&Zf(e,t,n)}function QT(e){return Ln(e)&&ia(e)}function Iu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ZT(e){return ki(e,Ai(e))}function eP(e,t,n,r,o,a,i){var s=Iu(e,n),l=Iu(t,n),c=i.get(l);if(c){Du(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,f=u===void 0;if(f){var d=Dt(l),h=!d&&fi(l),v=!d&&!h&&rd(l);u=l,d||h||v?Dt(s)?u=s:QT(s)?u=ry(s):h?(f=!1,u=_y(l,!0)):v?(f=!1,u=$y(l,!0)):u=[]:sa(l)||Qs(l)?(u=s,Qs(s)?u=ZT(s):(!Xt(s)||Jf(s))&&(u=Ty(l))):f=!1}f&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),Du(e,n,u)}function By(e,t,n,r,o){e!==t&&Dy(t,function(a,i){if(o||(o=new bn),Xt(a))eP(e,t,i,n,By,r,o);else{var s=r?r(Iu(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),Du(e,i,s)}},Ai)}function tP(e){return typeof e=="function"?e:$l}function nP(e,t){var n=Dt(e)?oy:Iy;return n(e,tP(t))}function rP(e,t){var n=-1,r=ia(e)?Array(e.length):[];return Iy(e,function(o,a,i){r[++n]=t(o,a,i)}),r}function Zr(e,t){var n=Dt(e)?ty:rP;return n(e,HT(t))}function eg(e){return e===void 0}var oP=nE(function(e,t,n){By(e,t,n)});const Lt=oP;var aP="Expected a function";function iP(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(aP);return Xt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ly(e,t,{leading:r,maxWait:t,trailing:o})}const Fy=e=>{const t={};return e.forEach(n=>{t[n.property]=n.value}),t},zy=(e={})=>Object.keys(e).reduce((n,r)=>[...n,{property:r,value:e[r]}],[]),Hy=e=>{let t="";return e.forEach(n=>{t+=`${n.property}:${n.value};`}),t},Lu=(e=[])=>{sa(e)&&(e=Object.keys(e).map(a=>({property:a,value:e[a]})));const t=[],n=[],r=[];return e.forEach(a=>{const i=a.value,s={property:a.property,value:i};r.push(s),De.isExpression(i)?n.push({...s,value:i}):t.push({...s,value:i})}),{normalProperty:t,expressionProperty:n,allProperty:r}},fd=e=>{var o,a;return((a=((o=K_(`.node {${e}}`).stylesheet)==null?void 0:o.rules[0]).declarations)==null?void 0:a.map(i=>({id:De.getRandomStr(),property:i.property||"",value:i.value||""})))||[]};fd("");const Vy=(e,t)=>{const n={class:e,value:[]},r=[];return Object.keys(t).forEach(o=>{const a=t[o],i={state:o,media:[],text:(a==null?void 0:a.normal)||""};Object.keys(a||{}).forEach(s=>{i.media=i.media||[],s!=="normal"&&i.media.push({type:"max-width",value:s,text:(a==null?void 0:a[s])||""})}),r.push(i)}),n.value=r,n},Uy=e=>{if(!e)return{};const t=e.value,n={};return t.forEach(r=>{var i;const o=r.style;!r.text&&o&&(r.text=Object.keys(o).reduce((s,l)=>(s+=`${l}: ${o[l]};`,s),""));const a={normal:r.text||""};(i=r.media)==null||i.forEach(s=>{a[s.value]=s.text||""}),n[r.state]=a}),n},Bu=e=>{const t=/#(?:[0-9a-fA-F]{3}){1,2}\b/g,n=/rgba?\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*(?:\d*\.\d+|\d+\.\d*|\d+)\s*\)/g,r=/rgb?\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)/g,o=/hsb?\(\s*\d+\s*,\s*\d+%\s*,\s*\d+%\s*\)/g,a=e.match(t)||[],i=e.match(n)||[],s=e.match(r)||[],l=e.match(o)||[];return[...a,...i,...s,...l]},Ls=e=>{const t=Bu(e),n=t.reduce((a,i)=>(a[i]=V_(i).hexa(),a),{});let r=e;return t.forEach(a=>{r=r.replaceAll(a,n[a])}),r.split(",").map(a=>{const i={offsetX:void 0,offsetY:void 0,blur:void 0,spread:void 0,color:void 0,type:void 0};let s=a;s.includes("inset")&&(i.type="inset",s=s.replace("inset","").trim());const l=Bu(s);l.length&&(i.color=l[0],s=s.replace(i.color,"").trim());const c=s.split(" "),u=[];for(let f=0;f<c.length&&!isNaN(parseInt(c[f]));f++)u.push(c[f]);return i.offsetX=u[0],i.offsetY=u[1],i.blur=u[2]||"",i.spread=u[3]||"",i.color||(i.color=c[u.length]),i})};var sP=Object.defineProperty,lP=(e,t,n)=>t in e?sP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,de=(e,t,n)=>(lP(e,typeof t!="symbol"?t+"":t,n),n);const cP=e=>()=>{console.warn(`${e} need to be implement getComponent`)},uP=["customPageRootRender"],tg=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],fP=e=>[...tg,...uP].reduce((t,n)=>{var r;return e!=null&&e[n]?t[n]=(r=e[n])==null?void 0:r.bind(e):tg.includes(n)&&(t[n]=cP),t},{});var dP=Object.defineProperty,hP=(e,t,n)=>t in e?dP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ge=(e,t,n)=>(hP(e,typeof t!="symbol"?t+"":t,n),n),pP=typeof global=="object"&&global&&global.Object===Object&&global;const Wy=pP;var gP=typeof self=="object"&&self&&self.Object===Object&&self,vP=Wy||gP||Function("return this")();const zn=vP;var mP=zn.Symbol;const on=mP;var Gy=Object.prototype,bP=Gy.hasOwnProperty,yP=Gy.toString,La=on?on.toStringTag:void 0;function xP(e){var t=bP.call(e,La),n=e[La];try{e[La]=void 0;var r=!0}catch{}var o=yP.call(e);return r&&(t?e[La]=n:delete e[La]),o}var wP=Object.prototype,SP=wP.toString;function CP(e){return SP.call(e)}var _P="[object Null]",OP="[object Undefined]",ng=on?on.toStringTag:void 0;function eo(e){return e==null?e===void 0?OP:_P:ng&&ng in Object(e)?xP(e):CP(e)}function Bn(e){return e!=null&&typeof e=="object"}var EP="[object Symbol]";function dd(e){return typeof e=="symbol"||Bn(e)&&eo(e)==EP}function hd(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var RP=Array.isArray;const ot=RP;var $P=1/0,rg=on?on.prototype:void 0,og=rg?rg.toString:void 0;function Ky(e){if(typeof e=="string")return e;if(ot(e))return hd(e,Ky)+"";if(dd(e))return og?og.call(e):"";var t=e+"";return t=="0"&&1/e==-$P?"-0":t}function Cn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function pd(e){return e}var TP="[object AsyncFunction]",PP="[object Function]",kP="[object GeneratorFunction]",NP="[object Proxy]";function gd(e){if(!Cn(e))return!1;var t=eo(e);return t==PP||t==kP||t==TP||t==NP}var AP=zn["__core-js_shared__"];const Cc=AP;var ag=function(){var e=/[^.]+$/.exec(Cc&&Cc.keys&&Cc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function MP(e){return!!ag&&ag in e}var jP=Function.prototype,DP=jP.toString;function to(e){if(e!=null){try{return DP.call(e)}catch{}try{return e+""}catch{}}return""}var IP=/[\\^$.*+?()[\]{}|]/g,LP=/^\[object .+?Constructor\]$/,BP=Function.prototype,FP=Object.prototype,zP=BP.toString,HP=FP.hasOwnProperty,VP=RegExp("^"+zP.call(HP).replace(IP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function UP(e){if(!Cn(e)||MP(e))return!1;var t=gd(e)?VP:LP;return t.test(to(e))}function WP(e,t){return e==null?void 0:e[t]}function no(e,t){var n=WP(e,t);return UP(n)?n:void 0}var GP=no(zn,"WeakMap");const Fu=GP;var ig=Object.create,KP=function(){function e(){}return function(t){if(!Cn(t))return{};if(ig)return ig(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const qP=KP;function XP(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function YP(){}function qy(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var JP=800,QP=16,ZP=Date.now;function ek(e){var t=0,n=0;return function(){var r=ZP(),o=QP-(r-n);if(n=r,o>0){if(++t>=JP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function tk(e){return function(){return e}}var nk=function(){try{var e=no(Object,"defineProperty");return e({},"",{}),e}catch{}}();const tl=nk;var rk=tl?function(e,t){return tl(e,"toString",{configurable:!0,enumerable:!1,value:tk(t),writable:!0})}:pd;const ok=rk;var ak=ek(ok);const Xy=ak;function ik(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function sk(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function lk(e){return e!==e}function ck(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function uk(e,t,n){return t===t?ck(e,t,n):sk(e,lk,n)}function fk(e,t){var n=e==null?0:e.length;return!!n&&uk(e,t,0)>-1}var dk=9007199254740991,hk=/^(?:0|[1-9]\d*)$/;function Nl(e,t){var n=typeof e;return t=t??dk,!!t&&(n=="number"||n!="symbol"&&hk.test(e))&&e>-1&&e%1==0&&e<t}function vd(e,t,n){t=="__proto__"&&tl?tl(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Mi(e,t){return e===t||e!==e&&t!==t}var pk=Object.prototype,gk=pk.hasOwnProperty;function md(e,t,n){var r=e[t];(!(gk.call(e,t)&&Mi(r,n))||n===void 0&&!(t in e))&&vd(e,t,n)}function la(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?vd(n,s,l):md(n,s,l)}return n}var sg=Math.max;function Yy(e,t,n){return t=sg(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=sg(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),XP(e,this,s)}}function Jy(e,t){return Xy(Yy(e,t,pd),e+"")}var vk=9007199254740991;function bd(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vk}function Al(e){return e!=null&&bd(e.length)&&!gd(e)}function mk(e,t,n){if(!Cn(n))return!1;var r=typeof t;return(r=="number"?Al(n)&&Nl(t,n.length):r=="string"&&t in n)?Mi(n[t],e):!1}function bk(e){return Jy(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&mk(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var yk=Object.prototype;function yd(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yk;return e===n}function xk(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var wk="[object Arguments]";function lg(e){return Bn(e)&&eo(e)==wk}var Qy=Object.prototype,Sk=Qy.hasOwnProperty,Ck=Qy.propertyIsEnumerable,_k=lg(function(){return arguments}())?lg:function(e){return Bn(e)&&Sk.call(e,"callee")&&!Ck.call(e,"callee")};const gi=_k;function Ok(){return!1}var Zy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cg=Zy&&typeof module=="object"&&module&&!module.nodeType&&module,Ek=cg&&cg.exports===Zy,ug=Ek?zn.Buffer:void 0,Rk=ug?ug.isBuffer:void 0,$k=Rk||Ok;const vi=$k;var Tk="[object Arguments]",Pk="[object Array]",kk="[object Boolean]",Nk="[object Date]",Ak="[object Error]",Mk="[object Function]",jk="[object Map]",Dk="[object Number]",Ik="[object Object]",Lk="[object RegExp]",Bk="[object Set]",Fk="[object String]",zk="[object WeakMap]",Hk="[object ArrayBuffer]",Vk="[object DataView]",Uk="[object Float32Array]",Wk="[object Float64Array]",Gk="[object Int8Array]",Kk="[object Int16Array]",qk="[object Int32Array]",Xk="[object Uint8Array]",Yk="[object Uint8ClampedArray]",Jk="[object Uint16Array]",Qk="[object Uint32Array]",Ve={};Ve[Uk]=Ve[Wk]=Ve[Gk]=Ve[Kk]=Ve[qk]=Ve[Xk]=Ve[Yk]=Ve[Jk]=Ve[Qk]=!0;Ve[Tk]=Ve[Pk]=Ve[Hk]=Ve[kk]=Ve[Vk]=Ve[Nk]=Ve[Ak]=Ve[Mk]=Ve[jk]=Ve[Dk]=Ve[Ik]=Ve[Lk]=Ve[Bk]=Ve[Fk]=Ve[zk]=!1;function Zk(e){return Bn(e)&&bd(e.length)&&!!Ve[eo(e)]}function xd(e){return function(t){return e(t)}}var e1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Za=e1&&typeof module=="object"&&module&&!module.nodeType&&module,eN=Za&&Za.exports===e1,_c=eN&&Wy.process,tN=function(){try{var e=Za&&Za.require&&Za.require("util").types;return e||_c&&_c.binding&&_c.binding("util")}catch{}}();const Ko=tN;var fg=Ko&&Ko.isTypedArray,nN=fg?xd(fg):Zk;const wd=nN;var rN=Object.prototype,oN=rN.hasOwnProperty;function t1(e,t){var n=ot(e),r=!n&&gi(e),o=!n&&!r&&vi(e),a=!n&&!r&&!o&&wd(e),i=n||r||o||a,s=i?xk(e.length,String):[],l=s.length;for(var c in e)(t||oN.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Nl(c,l)))&&s.push(c);return s}function n1(e,t){return function(n){return e(t(n))}}var aN=n1(Object.keys,Object);const iN=aN;var sN=Object.prototype,lN=sN.hasOwnProperty;function cN(e){if(!yd(e))return iN(e);var t=[];for(var n in Object(e))lN.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ml(e){return Al(e)?t1(e):cN(e)}function uN(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var fN=Object.prototype,dN=fN.hasOwnProperty;function hN(e){if(!Cn(e))return uN(e);var t=yd(e),n=[];for(var r in e)r=="constructor"&&(t||!dN.call(e,r))||n.push(r);return n}function ji(e){return Al(e)?t1(e,!0):hN(e)}var pN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gN=/^\w*$/;function Sd(e,t){if(ot(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||dd(e)?!0:gN.test(e)||!pN.test(e)||t!=null&&e in Object(t)}var vN=no(Object,"create");const mi=vN;function mN(){this.__data__=mi?mi(null):{},this.size=0}function bN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yN="__lodash_hash_undefined__",xN=Object.prototype,wN=xN.hasOwnProperty;function SN(e){var t=this.__data__;if(mi){var n=t[e];return n===yN?void 0:n}return wN.call(t,e)?t[e]:void 0}var CN=Object.prototype,_N=CN.hasOwnProperty;function ON(e){var t=this.__data__;return mi?t[e]!==void 0:_N.call(t,e)}var EN="__lodash_hash_undefined__";function RN(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=mi&&t===void 0?EN:t,this}function Wr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wr.prototype.clear=mN;Wr.prototype.delete=bN;Wr.prototype.get=SN;Wr.prototype.has=ON;Wr.prototype.set=RN;function $N(){this.__data__=[],this.size=0}function jl(e,t){for(var n=e.length;n--;)if(Mi(e[n][0],t))return n;return-1}var TN=Array.prototype,PN=TN.splice;function kN(e){var t=this.__data__,n=jl(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():PN.call(t,n,1),--this.size,!0}function NN(e){var t=this.__data__,n=jl(t,e);return n<0?void 0:t[n][1]}function AN(e){return jl(this.__data__,e)>-1}function MN(e,t){var n=this.__data__,r=jl(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function lr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lr.prototype.clear=$N;lr.prototype.delete=kN;lr.prototype.get=NN;lr.prototype.has=AN;lr.prototype.set=MN;var jN=no(zn,"Map");const bi=jN;function DN(){this.size=0,this.__data__={hash:new Wr,map:new(bi||lr),string:new Wr}}function IN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Dl(e,t){var n=e.__data__;return IN(t)?n[typeof t=="string"?"string":"hash"]:n.map}function LN(e){var t=Dl(this,e).delete(e);return this.size-=t?1:0,t}function BN(e){return Dl(this,e).get(e)}function FN(e){return Dl(this,e).has(e)}function zN(e,t){var n=Dl(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function cr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}cr.prototype.clear=DN;cr.prototype.delete=LN;cr.prototype.get=BN;cr.prototype.has=FN;cr.prototype.set=zN;var HN="Expected a function";function Cd(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(HN);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(Cd.Cache||cr),n}Cd.Cache=cr;var VN=500;function UN(e){var t=Cd(e,function(r){return n.size===VN&&n.clear(),r}),n=t.cache;return t}var WN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,GN=/\\(\\)?/g,KN=UN(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WN,function(n,r,o,a){t.push(o?a.replace(GN,"$1"):r||n)}),t});const qN=KN;function XN(e){return e==null?"":Ky(e)}function ca(e,t){return ot(e)?e:Sd(e,t)?[e]:qN(XN(e))}var YN=1/0;function ua(e){if(typeof e=="string"||dd(e))return e;var t=e+"";return t=="0"&&1/e==-YN?"-0":t}function Il(e,t){t=ca(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ua(t[n++])];return n&&n==r?e:void 0}function r1(e,t,n){var r=e==null?void 0:Il(e,t);return r===void 0?n:r}function _d(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var dg=on?on.isConcatSpreadable:void 0;function JN(e){return ot(e)||gi(e)||!!(dg&&e&&e[dg])}function Od(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=JN),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?Od(s,t-1,n,r,o):_d(o,s):r||(o[o.length]=s)}return o}function QN(e){var t=e==null?0:e.length;return t?Od(e,1):[]}function ZN(e){return Xy(Yy(e,void 0,QN),e+"")}var eA=n1(Object.getPrototypeOf,Object);const Ed=eA;var tA="[object Object]",nA=Function.prototype,rA=Object.prototype,o1=nA.toString,oA=rA.hasOwnProperty,aA=o1.call(Object);function It(e){if(!Bn(e)||eo(e)!=tA)return!1;var t=Ed(e);if(t===null)return!0;var n=oA.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&o1.call(n)==aA}function iA(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function sA(){this.__data__=new lr,this.size=0}function lA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function cA(e){return this.__data__.get(e)}function uA(e){return this.__data__.has(e)}var fA=200;function dA(e,t){var n=this.__data__;if(n instanceof lr){var r=n.__data__;if(!bi||r.length<fA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new cr(r)}return n.set(e,t),this.size=n.size,this}function yn(e){var t=this.__data__=new lr(e);this.size=t.size}yn.prototype.clear=sA;yn.prototype.delete=lA;yn.prototype.get=cA;yn.prototype.has=uA;yn.prototype.set=dA;function hA(e,t){return e&&la(t,Ml(t),e)}function pA(e,t){return e&&la(t,ji(t),e)}var a1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hg=a1&&typeof module=="object"&&module&&!module.nodeType&&module,gA=hg&&hg.exports===a1,pg=gA?zn.Buffer:void 0,gg=pg?pg.allocUnsafe:void 0;function i1(e,t){if(t)return e.slice();var n=e.length,r=gg?gg(n):new e.constructor(n);return e.copy(r),r}function vA(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function s1(){return[]}var mA=Object.prototype,bA=mA.propertyIsEnumerable,vg=Object.getOwnPropertySymbols,yA=vg?function(e){return e==null?[]:(e=Object(e),vA(vg(e),function(t){return bA.call(e,t)}))}:s1;const Rd=yA;function xA(e,t){return la(e,Rd(e),t)}var wA=Object.getOwnPropertySymbols,SA=wA?function(e){for(var t=[];e;)_d(t,Rd(e)),e=Ed(e);return t}:s1;const l1=SA;function CA(e,t){return la(e,l1(e),t)}function c1(e,t,n){var r=t(e);return ot(e)?r:_d(r,n(e))}function zu(e){return c1(e,Ml,Rd)}function $d(e){return c1(e,ji,l1)}var _A=no(zn,"DataView");const Hu=_A;var OA=no(zn,"Promise");const Vu=OA;var EA=no(zn,"Set");const Vo=EA;var mg="[object Map]",RA="[object Object]",bg="[object Promise]",yg="[object Set]",xg="[object WeakMap]",wg="[object DataView]",$A=to(Hu),TA=to(bi),PA=to(Vu),kA=to(Vo),NA=to(Fu),Dr=eo;(Hu&&Dr(new Hu(new ArrayBuffer(1)))!=wg||bi&&Dr(new bi)!=mg||Vu&&Dr(Vu.resolve())!=bg||Vo&&Dr(new Vo)!=yg||Fu&&Dr(new Fu)!=xg)&&(Dr=function(e){var t=eo(e),n=t==RA?e.constructor:void 0,r=n?to(n):"";if(r)switch(r){case $A:return wg;case TA:return mg;case PA:return bg;case kA:return yg;case NA:return xg}return t});const yi=Dr;var AA=Object.prototype,MA=AA.hasOwnProperty;function jA(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&MA.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var DA=zn.Uint8Array;const nl=DA;function Td(e){var t=new e.constructor(e.byteLength);return new nl(t).set(new nl(e)),t}function IA(e,t){var n=t?Td(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var LA=/\w*$/;function BA(e){var t=new e.constructor(e.source,LA.exec(e));return t.lastIndex=e.lastIndex,t}var Sg=on?on.prototype:void 0,Cg=Sg?Sg.valueOf:void 0;function FA(e){return Cg?Object(Cg.call(e)):{}}function u1(e,t){var n=t?Td(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var zA="[object Boolean]",HA="[object Date]",VA="[object Map]",UA="[object Number]",WA="[object RegExp]",GA="[object Set]",KA="[object String]",qA="[object Symbol]",XA="[object ArrayBuffer]",YA="[object DataView]",JA="[object Float32Array]",QA="[object Float64Array]",ZA="[object Int8Array]",eM="[object Int16Array]",tM="[object Int32Array]",nM="[object Uint8Array]",rM="[object Uint8ClampedArray]",oM="[object Uint16Array]",aM="[object Uint32Array]";function iM(e,t,n){var r=e.constructor;switch(t){case XA:return Td(e);case zA:case HA:return new r(+e);case YA:return IA(e,n);case JA:case QA:case ZA:case eM:case tM:case nM:case rM:case oM:case aM:return u1(e,n);case VA:return new r;case UA:case KA:return new r(e);case WA:return BA(e);case GA:return new r;case qA:return FA(e)}}function f1(e){return typeof e.constructor=="function"&&!yd(e)?qP(Ed(e)):{}}var sM="[object Map]";function lM(e){return Bn(e)&&yi(e)==sM}var _g=Ko&&Ko.isMap,cM=_g?xd(_g):lM;const uM=cM;var fM="[object Set]";function dM(e){return Bn(e)&&yi(e)==fM}var Og=Ko&&Ko.isSet,hM=Og?xd(Og):dM;const pM=hM;var gM=1,vM=2,mM=4,d1="[object Arguments]",bM="[object Array]",yM="[object Boolean]",xM="[object Date]",wM="[object Error]",h1="[object Function]",SM="[object GeneratorFunction]",CM="[object Map]",_M="[object Number]",p1="[object Object]",OM="[object RegExp]",EM="[object Set]",RM="[object String]",$M="[object Symbol]",TM="[object WeakMap]",PM="[object ArrayBuffer]",kM="[object DataView]",NM="[object Float32Array]",AM="[object Float64Array]",MM="[object Int8Array]",jM="[object Int16Array]",DM="[object Int32Array]",IM="[object Uint8Array]",LM="[object Uint8ClampedArray]",BM="[object Uint16Array]",FM="[object Uint32Array]",Ae={};Ae[d1]=Ae[bM]=Ae[PM]=Ae[kM]=Ae[yM]=Ae[xM]=Ae[NM]=Ae[AM]=Ae[MM]=Ae[jM]=Ae[DM]=Ae[CM]=Ae[_M]=Ae[p1]=Ae[OM]=Ae[EM]=Ae[RM]=Ae[$M]=Ae[IM]=Ae[LM]=Ae[BM]=Ae[FM]=!0;Ae[wM]=Ae[h1]=Ae[TM]=!1;function ei(e,t,n,r,o,a){var i,s=t&gM,l=t&vM,c=t&mM;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Cn(e))return e;var u=ot(e);if(u){if(i=jA(e),!s)return qy(e,i)}else{var f=yi(e),d=f==h1||f==SM;if(vi(e))return i1(e,s);if(f==p1||f==d1||d&&!o){if(i=l||d?{}:f1(e),!s)return l?CA(e,pA(i,e)):xA(e,hA(i,e))}else{if(!Ae[f])return o?e:{};i=iM(e,f,s)}}a||(a=new yn);var h=a.get(e);if(h)return h;a.set(e,i),pM(e)?e.forEach(function(m){i.add(ei(m,t,n,m,e,a))}):uM(e)&&e.forEach(function(m,y){i.set(y,ei(m,t,n,y,e,a))});var v=c?l?$d:zu:l?ji:Ml,g=u?void 0:v(e);return ik(g||e,function(m,y){g&&(y=m,m=e[y]),md(i,y,ei(m,t,n,y,e,a))}),i}var zM=1,HM=4;function g1(e){return ei(e,zM|HM)}var VM="__lodash_hash_undefined__";function UM(e){return this.__data__.set(e,VM),this}function WM(e){return this.__data__.has(e)}function xi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new cr;++t<n;)this.add(e[t])}xi.prototype.add=xi.prototype.push=UM;xi.prototype.has=WM;function GM(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function v1(e,t){return e.has(t)}var KM=1,qM=2;function m1(e,t,n,r,o,a){var i=n&KM,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=n&qM?new xi:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var v=e[f],g=t[f];if(r)var m=i?r(g,v,f,t,e,a):r(v,g,f,e,t,a);if(m!==void 0){if(m)continue;d=!1;break}if(h){if(!GM(t,function(y,w){if(!v1(h,w)&&(v===y||o(v,y,n,r,a)))return h.push(w)})){d=!1;break}}else if(!(v===g||o(v,g,n,r,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function XM(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Pd(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var YM=1,JM=2,QM="[object Boolean]",ZM="[object Date]",e3="[object Error]",t3="[object Map]",n3="[object Number]",r3="[object RegExp]",o3="[object Set]",a3="[object String]",i3="[object Symbol]",s3="[object ArrayBuffer]",l3="[object DataView]",Eg=on?on.prototype:void 0,Oc=Eg?Eg.valueOf:void 0;function c3(e,t,n,r,o,a,i){switch(n){case l3:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case s3:return!(e.byteLength!=t.byteLength||!a(new nl(e),new nl(t)));case QM:case ZM:case n3:return Mi(+e,+t);case e3:return e.name==t.name&&e.message==t.message;case r3:case a3:return e==t+"";case t3:var s=XM;case o3:var l=r&YM;if(s||(s=Pd),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=JM,i.set(e,t);var u=m1(s(e),s(t),r,o,a,i);return i.delete(e),u;case i3:if(Oc)return Oc.call(e)==Oc.call(t)}return!1}var u3=1,f3=Object.prototype,d3=f3.hasOwnProperty;function h3(e,t,n,r,o,a){var i=n&u3,s=zu(e),l=s.length,c=zu(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:d3.call(t,d)))return!1}var h=a.get(e),v=a.get(t);if(h&&v)return h==t&&v==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=i;++f<l;){d=s[f];var y=e[d],w=t[d];if(r)var _=i?r(w,y,d,t,e,a):r(y,w,d,e,t,a);if(!(_===void 0?y===w||o(y,w,n,r,a):_)){g=!1;break}m||(m=d=="constructor")}if(g&&!m){var S=e.constructor,x=t.constructor;S!=x&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof x=="function"&&x instanceof x)&&(g=!1)}return a.delete(e),a.delete(t),g}var p3=1,Rg="[object Arguments]",$g="[object Array]",fs="[object Object]",g3=Object.prototype,Tg=g3.hasOwnProperty;function v3(e,t,n,r,o,a){var i=ot(e),s=ot(t),l=i?$g:yi(e),c=s?$g:yi(t);l=l==Rg?fs:l,c=c==Rg?fs:c;var u=l==fs,f=c==fs,d=l==c;if(d&&vi(e)){if(!vi(t))return!1;i=!0,u=!1}if(d&&!u)return a||(a=new yn),i||wd(e)?m1(e,t,n,r,o,a):c3(e,t,l,n,r,o,a);if(!(n&p3)){var h=u&&Tg.call(e,"__wrapped__"),v=f&&Tg.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;return a||(a=new yn),o(g,m,n,r,a)}}return d?(a||(a=new yn),h3(e,t,n,r,o,a)):!1}function kd(e,t,n,r,o){return e===t?!0:e==null||t==null||!Bn(e)&&!Bn(t)?e!==e&&t!==t:v3(e,t,n,r,kd,o)}var m3=1,b3=2;function y3(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new yn;if(r)var d=r(c,u,l,e,t,f);if(!(d===void 0?kd(u,c,m3|b3,r,f):d))return!1}}return!0}function b1(e){return e===e&&!Cn(e)}function x3(e){for(var t=Ml(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,b1(o)]}return t}function y1(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function w3(e){var t=x3(e);return t.length==1&&t[0][2]?y1(t[0][0],t[0][1]):function(n){return n===e||y3(n,e,t)}}function S3(e,t){return e!=null&&t in Object(e)}function C3(e,t,n){t=ca(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=ua(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&bd(o)&&Nl(i,o)&&(ot(e)||gi(e)))}function _3(e,t){return e!=null&&C3(e,t,S3)}var O3=1,E3=2;function R3(e,t){return Sd(e)&&b1(t)?y1(ua(e),t):function(n){var r=r1(n,e);return r===void 0&&r===t?_3(n,e):kd(t,r,O3|E3)}}function $3(e){return function(t){return t==null?void 0:t[e]}}function T3(e){return function(t){return Il(t,e)}}function P3(e){return Sd(e)?$3(ua(e)):T3(e)}function Nd(e){return typeof e=="function"?e:e==null?pd:typeof e=="object"?ot(e)?R3(e[0],e[1]):w3(e):P3(e)}function k3(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var N3=k3();const A3=N3;function Uu(e,t,n){(n!==void 0&&!Mi(e[t],n)||n===void 0&&!(t in e))&&vd(e,t,n)}function Wu(e){return Bn(e)&&Al(e)}function Gu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function M3(e){return la(e,ji(e))}function j3(e,t,n,r,o,a,i){var s=Gu(e,n),l=Gu(t,n),c=i.get(l);if(c){Uu(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,f=u===void 0;if(f){var d=ot(l),h=!d&&vi(l),v=!d&&!h&&wd(l);u=l,d||h||v?ot(s)?u=s:Wu(s)?u=qy(s):h?(f=!1,u=i1(l,!0)):v?(f=!1,u=u1(l,!0)):u=[]:It(l)||gi(l)?(u=s,gi(s)?u=M3(s):(!Cn(s)||gd(s))&&(u=f1(l))):f=!1}f&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),Uu(e,n,u)}function x1(e,t,n,r,o){e!==t&&A3(t,function(a,i){if(o||(o=new yn),Cn(a))j3(e,t,i,n,x1,r,o);else{var s=r?r(Gu(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),Uu(e,i,s)}},ji)}function D3(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function w1(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function I3(e,t){return t.length<2?e:Il(e,iA(t,0,-1))}var L3=bk(function(e,t,n){x1(e,t,n)});const S1=L3;var B3="Expected a function";function F3(e){if(typeof e!="function")throw new TypeError(B3);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 z3(e,t){return t=ca(t,e),e=I3(e,t),e==null||delete e[ua(w1(t))]}function H3(e){return It(e)?void 0:e}var V3=1,U3=2,W3=4,G3=ZN(function(e,t){var n={};if(e==null)return n;var r=!1;t=hd(t,function(a){return a=ca(a,e),r||(r=a.length>1),a}),la(e,$d(e),n),r&&(n=ei(n,V3|U3|W3,H3));for(var o=t.length;o--;)z3(n,t[o]);return n});const C1=G3;function K3(e,t,n,r){if(!Cn(e))return e;t=ca(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var l=ua(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=i){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Cn(u)?u:Nl(t[o+1])?[]:{})}md(s,l,c),s=s[l]}return e}function q3(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=Il(e,i);n(s,i)&&K3(a,ca(i,e),s)}return a}function X3(e,t){if(e==null)return{};var n=hd($d(e),function(r){return[r]});return t=Nd(t),q3(e,n,function(r,o){return t(r,o[0])})}function Y3(e,t){return X3(e,F3(Nd(t)))}var J3=1/0,Q3=Vo&&1/Pd(new Vo([,-0]))[1]==J3?function(e){return new Vo(e)}:YP;const Z3=Q3;var e6=200;function t6(e,t,n){var r=-1,o=fk,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=D3;else if(a>=e6){var c=t?null:Z3(e);if(c)return Pd(c);i=!1,o=v1,l=new xi}else l=t?[]:s;e:for(;++r<a;){var u=e[r],f=t?t(u):u;if(u=n||u!==0?u:0,i&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else o(l,f,n)||(l!==s&&l.push(f),s.push(u))}return s}var n6=Jy(function(e){var t=w1(e);return Wu(t)&&(t=void 0),t6(Od(e,1,Wu,!0),Nd(t))});const r6=n6;class _1 extends TypeError{constructor(t,n){let r;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=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function o6(e){return xn(e)&&typeof e[Symbol.iterator]=="function"}function xn(e){return typeof e=="object"&&e!=null}function Yt(e){return typeof e=="string"?JSON.stringify(e):""+e}function a6(e){const{done:t,value:n}=e.next();return t?void 0:n}function i6(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Yt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*Pg(e,t,n,r){o6(e)||(e=[e]);for(const o of e){const a=i6(o,t,n,r);a&&(yield a)}}function*Ad(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&xn(t.schema)&&xn(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,f]of t.entries(e,s)){const d=Ad(u,f,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const h of d)h[0]?(l=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):a&&(u=h[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):xn(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}let Hn=class{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:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return Pg(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return Pg(u,c,this,l)}:this.refiner=()=>[]}assert(t){return O1(t,this)}create(t){return s6(t,this)}is(t){return c6(t,this)}mask(t){return l6(t,this)}validate(t,n){return n===void 0&&(n={}),fa(t,this,n)}};function O1(e,t){const n=fa(e,t);if(n[0])throw n[0]}function s6(e,t){const n=fa(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function l6(e,t){const n=fa(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function c6(e,t){return!fa(e,t)[0]}function fa(e,t,n){n===void 0&&(n={});const r=Ad(e,t,n),o=a6(r);return o[0]?[new _1(o[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Md(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?T1(a):$e(a)}function Or(e,t){return new Hn({type:e,schema:null,validator:t})}function qo(e){return new Hn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function E1(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return T1(r);default:return $e(r)}}function Ye(){return Or("any",()=>!0)}function tt(e){return new Hn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Yt(t)}})}function Gr(){return Or("boolean",e=>typeof e=="boolean")}function Ku(e){const t={},n=e.map(r=>Yt(r)).join();for(const r of e)t[r]=r;return new Hn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Yt(r)}})}function R1(){return Or("func",e=>typeof e=="function"||"Expected a function, but received: "+Yt(e))}function Mt(e){const t=Yt(e),n=typeof e;return new Hn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Yt(r)}})}function u6(){return Or("never",()=>!1)}function $1(){return Or("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Yt(e))}function $e(e){const t=e?Object.keys(e):[],n=u6();return new Hn({type:"object",schema:e||null,*entries(r){if(e&&xn(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return xn(r)||"Expected an object, but received: "+Yt(r)},coercer(r){return xn(r)?{...r}:r}})}function ee(e){return new Hn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function ti(e,t){return new Hn({type:"record",schema:null,*entries(n){if(xn(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return xn(n)||"Expected an object, but received: "+Yt(n)}})}function te(){return Or("string",e=>typeof e=="string"||"Expected a string, but received: "+Yt(e))}function T1(e){const t=Object.keys(e);return new Hn({type:"type",schema:e,*entries(n){if(xn(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return xn(n)||"Expected an object, but received: "+Yt(n)}})}function jt(e){const t=e.map(n=>n.type).join(" | ");return new Hn({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||f6()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Ad(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Yt(n),...o]}})}function f6(){return Or("unknown",()=>!0)}const jd=$e({package:te(),version:te(),name:te(),exportName:ee(te()),destructuring:ee(Gr()),subName:ee(te()),main:ee(te()),cssPaths:ee(tt(te()))}),d6=tt(jd),h6=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var rn=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(rn||{}),Dd=(e=>(e.DESIGN="design",e.SAVE="save",e))(Dd||{}),qu=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(qu||{});const p6=()=>Or("normalObj",e=>!It(e)||[rn.SLOT,rn.EXPRESSION,rn.FUNCTION].includes(e==null?void 0:e.type)?!1:(fa(e,ti(te(),Id)),!0)),Id=jt([te(),$1(),Gr(),$e({type:Mt(rn.SLOT),renderType:Ku([qu.FUNC,qu.COMP]),params:ee(tt(te())),value:qo(()=>jt([Xo,tt(Xo)]))}),$e({type:Mt(rn.EXPRESSION),value:te()}),$e({type:Mt(rn.FUNCTION),value:te()}),p6(),tt(qo(()=>Id))]),kg=$e({type:Mt(rn.EXPRESSION),value:te()}),Xo=$e({id:ee(te()),title:ee(te()),componentName:te(),props:ee(ti(te(),Id)),nodeName:ee(te()),state:ee(ti(te(),Ye())),children:qo(()=>ee(tt(jt([te(),Xo])))),configure:ee(Ye()),css:ee(Ye()),style:ee(Ye()),classNames:ee(tt(Ye())),refId:ee(te()),extra:ee(ti(Ye(),Ye())),condition:ee(jt([Gr(),kg])),loop:ee($e({open:Gr(),data:jt([tt(Ye()),kg]),args:ee(tt(te())),forName:ee(te()),forIndex:ee(te()),key:ee(Ye()),name:ee(te())})),methods:ee(tt(Ye()))}),rl=jt([te(),$e({label:te(),tip:ee(te())})]),g6=$e({type:Mt("shape"),value:tt($e({name:te(),title:rl,valueType:qo(()=>Ll)}))}),v6=$e({type:Mt("enums"),value:tt(te())});$e({type:Mt("array"),value:qo(()=>Ll)});const m6=$e({type:Mt("array"),value:qo(()=>tt(Ll))}),Ll=jt([Ku(["array","boolean","number","object","string"]),Ku(["component","expression","function"]),g6,v6,m6]),b6=jt([te(),$e({componentName:te(),props:ee(Ye()),initialValue:ee(Ye()),component:ee(Ye()),hiddenLabel:ee(Gr())})]),Ec=$e({name:te(),title:rl,valueType:Ll,description:ee(te()),defaultValue:Ye(),setters:ee(tt(b6)),condition:ee(R1())});jt([te(),R1()]);var Xu=(e=>(e.SINGLE="single",e.GROUP="group",e))(Xu||{});jt([te(),$e({name:te(),describe:ee(te()),params:ee($e({name:te(),description:te()})),template:te()})]);const y6=$e({id:ee(te()),title:te(),snapshot:jt([te(),Ye()]),snapshotText:ee(te()),description:ee(te()),tags:ee(tt(te())),groupName:ee(te()),category:ee(te()),schema:Md(E1(Xo,["id"]),$e({componentName:ee(te())}))}),x6=$e({componentName:te(),title:te(),screenshot:ee(te()),icon:ee(te()),tags:ee(tt(te())),groupName:ee(te()),category:ee(te()),priority:ee($1()),npm:ee(jd),snippets:tt(y6),props:tt(jt([Ec,$e({title:ee(rl),type:Mt("single"),content:Ec}),$e({title:ee(rl),type:Mt("group"),content:tt(Ec)})])),fixedProps:ee(Ye()),isContainer:ee(jt([Gr(),$e({placeholder:te(),width:te(),height:te()})])),disableEditorDragDom:ee(Ye()),isLayout:ee(Gr()),rootSelector:ee(te()),advanceCustom:ee(Ye()),extra:ee(ti(Ye(),Ye()))}),w6=e=>({data:t,message:n,throwError:r})=>{const o=e({data:t,message:n,throwError:r});if(o.isValidate)return o;if(r)throw o.message||n?new Error(`${o.message||n}
|
|
87
122
|
originData: ${JSON.stringify(t)}`):new Error(`${JSON.stringify(t)}
|
|
88
123
|
data struct format is invalidate`);return o.message||n?console.warn(`${o.message||n}
|
|
89
124
|
originData: ${JSON.stringify(t)}`):console.warn(`${JSON.stringify(t)}
|
|
90
|
-
data struct format is invalidate`),o},
|
|
91
|
-
`)),{isValidate:!1,message:s,error:i}}})({data:t,message:n,throwError:r})};var qr=(e=>(e.ROOT_CONTAINER="RootContainer",e))(qr||{});const sE=ve({type:ft(Tt.FUNCTION),value:U()}),lE=_c(pg(kr,["componentName"]),ve({componentName:ft("RootContainer")}));function cE(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const ea=cE(),uE=(e,t)=>{const n={...e,value:[]},r=e.value;let o=new Qn([]);return t&&(o=t.materialsMode||new Qn([])),r&&(Ve(r)?n.value=r.map(a=>new je(a,{parent:t,materials:o})):ht(r)&&n.value.push(new je(r,{parent:t,materials:o}))),n};class jr{constructor(t,n){oe(this,"nodeType","SLOT"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"id"),oe(this,"materialsMode"),this.parent=(n==null?void 0:n.parent)||null,this.rawData=t;const r=(n==null?void 0:n.materials)||new Qn([]);this.materialsMode=r,this.id=yn(),this.data=uE(t,this)}get value(){return this.data}export(t){const n=this.data,r=o=>{if(o instanceof je)return o.export(t);if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return Ve(o)?o.map(a=>r(a)):(t==="design"&&delete o.id,o)};return r(n)}}const mg=e=>{let t=[];return e.forEach(n=>{const r=n;r.type?r.type===al.SINGLE?t.push(r.content):r.type===al.GROUP&&(t=[...t,...mg(r.content)]):t.push(n)}),t},il=(e,t,n)=>{if(e.type)return e.type===Tt.SLOT?new jr(e,{parent:t,materials:n}):e;if(ht(e)){const r={};return Object.keys(e).forEach(o=>{r[o]=sl(e[o],t,n)}),r}else return Array.isArray(e)?e.map(r=>il(r,t,n)):e},sl=(e,t,n)=>ht(e)?il(e,t,n):Ve(e)?e.map(r=>il(r,t,n)):e;let Mr=class yg{constructor(t,n,r){oe(this,"nodeType","PROP"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"name"),oe(this,"materialsMode");const o=(r==null?void 0:r.materials)||new Qn([]);this.materialsMode=o,this.parent=r==null?void 0:r.parent,this.rawData=n,this.name=t,this.data=sl(n,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const n=this.data;this.data=sl(t??n,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:n,node:this}),this.parent&&!(this.parent instanceof jr)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof je){const n=t.material;return mg((n==null?void 0:n.value.props)||[]).find(r=>r.name===this.name)}else return null}export(t){const n=this.data,r=o=>{if(o instanceof yg||o instanceof jr||o instanceof je)return o.export(t);if(Ve(o))return o.map(a=>r(a));if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return o};return r(n)}};const dE=e=>{if(typeof e=="string")return!0;Pc({data:e,dataStruct:kr,throwError:!1})},vd=(e,t,n=new Qn([]))=>{if(typeof e=="string")return e;const r={...e,id:e.id??yn(),children:[],props:{},methods:e.methods||[],configure:cg(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 Mr){r.props[a]=s;return}r.props[a]=new Mr(a,s||"",{parent:t,materials:n})}),e.children&&(Array.isArray(e.children)?r.children=e.children.map(a=>{if(a instanceof je)return a;if(ht(a)){const i=a;return new je(i,{parent:t,materials:n})}else return a}):(e.children instanceof je&&(r.children=[e.children]),r.children=[new je(e.children,{parent:t,materials:n})])),r};class je{constructor(t,n){oe(this,"nodeType","NODE"),oe(this,"rawData"),oe(this,"data"),oe(this,"emitter",ea),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),dE(t);const r=(n==null?void 0:n.materials)||new Qn([]);this.parent=(n==null?void 0:n.parent)||null,this.materialsModel=r,this.data=vd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};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(n=>n!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const n={...this.export("design"),id:t||yn()};return new je(n,{materials:this.materialsModel})}updateWithPlainObj(t){const n={...this.data,...t};return this.data=vd(n,this),n}updateValue(t){const n=this.data,r=this.updateWithPlainObj(t);this.emitter.emit("onNodeChange",{value:r,preValue:n,node:this})}contains(t){return jc(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,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t){var n;const r=this.data;if(typeof r=="string")return r;const o={};Object.keys(r.props||{}).forEach(u=>{o[u]=r.props[u].export(t)});const a=(n=r.children)==null?void 0:n.map(u=>u instanceof je?u.export(t):u),i=r.configure||{},s=i.propsSetter||{},l={};Object.keys(s).forEach(u=>{const d=Uh(s,u,!1);d&&(l[u]=d)}),i.propsSetter=l,this.material&&this.materialsModel.usedMaterials.push(this.material);let c={...r,configure:i,props:o,children:a};return t==="design"&&delete c.id,c=kc(c),c}}const md=(e,t,n)=>{const r={...e,id:yn(),props:{},componentName:qr.ROOT_CONTAINER,children:[],methods:e.methods||[],configure:cg(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];Ve(e.children)?o=e.children.map(i=>i instanceof je?i:ht(i)?new je(i,{parent:t,materials:n}):i):e.children instanceof je?o.push(e.children):e.children&&ht(e.children)&&o.push(new je(e.children,{parent:t,materials:n}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const l=(s=e.props)==null?void 0:s[i];l instanceof Mr?r.props[i]=l:r.props[i]=new Mr(i,l||"",{parent:t,materials:n})}),r.children=o,r};class Fo{constructor(t,{parent:n,materials:r}){oe(this,"rawData"),oe(this,"data"),oe(this,"nodeType",qr.ROOT_CONTAINER),oe(this,"emitter",ea),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),oe(this,"parent"),this.materialsModel=r,this.rawData=JSON.parse(JSON.stringify(t)),this.data=md(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=n}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};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(n=>n!==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)}updateWithPlainObj(t){const n={...this.data,...t};return this.data=md(n,this,this.materialsModel),n}updateValue(t){const n=this.data;this.updateWithPlainObj(t),this.emitter.emit("onNodeChange",{value:this.data,preValue:n,node:this})}contains(t){return jc(this,t)}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t=Nc.SAVE){var n;const r=this.data,o={};Object.keys(r.props||{}).forEach(l=>{o[l]=r.props[l].export(t)});const a=((n=r.children)==null?void 0:n.map(l=>{var c;return(c=l==null?void 0:l.export)==null?void 0:c.call(l,t)}))||[],i={...r,props:o,children:a.filter(l=>l)};let s=ug(i,["id"]);return s=kc(s),s}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const n={...this.export("design"),id:t||yn()};return new Fo(n,{materials:this.materialsModel,parent:null})}}const Vn=e=>(e==null?void 0:e.type)===Tt.EXPRESSION,fE=e=>(e==null?void 0:e.type)===Tt.FUNCTION,yn=()=>Math.random().toString(32).slice(3,9),pE=e=>(e==null?void 0:e.nodeType)==="NODE",cs=e=>(e==null?void 0:e.nodeType)==="PROP",hE=e=>(e==null?void 0:e.nodeType)==="SLOT",kc=e=>DO(e,t=>ht(t)?!Object.keys(t).length:Ve(t)?!t.length:!t);function gE(e,t){const n=[e];for(;n.length;){const r=n.shift();if(r&&t(r))return r;const o=(r==null?void 0:r.props)||{},a=s=>{if(s instanceof je){n.push(s);return}if(s instanceof jr&&a(s.value.value),s instanceof Mr){a(s.value);return}if(ht(s)){const l=s;Object.keys(l).forEach(c=>{a(l[c])});return}if(Ve(s)){s.forEach(l=>{a(l)});return}};a(o);const i=(r==null?void 0:r.value.children.filter(s=>s instanceof je))||[];n.push(...i)}}function jc(e,t){return gE(e,n=>n.id===t)}const vE=e=>{const t=ng(e),n=t.snippets;return delete t.snippets,t.snippets=n.map(r=>({...t,...r,id:r.id||`${e.componentName}-${yn()}`,title:r.title||e.title,category:r.category||e.category,tags:[...r.tags||[],...e.tags||[]],groupName:r.groupName||e.groupName,snapshot:r.snapshot||e.icon,snapshotText:r.snapshotText,schema:{...r.schema,componentName:r.schema.componentName||e.componentName}})),t};class mE{constructor(t){oe(this,"rawData"),oe(this,"data"),this.rawData=t,this.data=vE(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(n=>n.id===t)}}const yE=e=>{if(!Ve(e))throw new Error("Materials must be a array");return e.map(t=>new mE(t))},bE=e=>{e==null||e.forEach(t=>{Pc({data:t,dataStruct:aE,throwError:!1})})};let Qn=class{constructor(t){oe(this,"rawData"),oe(this,"data"),oe(this,"usedMaterials",[]),this.rawData=t,bE(t),this.data=yE(t)}findByComponentName(t){return this.data.find(n=>n.componentName===t)}findSnippetById(t){const n=[...this.data];let r=null;for(;!r&&n.length;){const o=n.pop();r=o==null?void 0:o.getSnippetById(t)}return r}getAllSnippets(){const t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),n=[],r={default:[]};t.forEach(a=>{const i=a.groupName||"default";n.includes(i)||(n.push(i),r[i]=[]),r[i].push(a)});let o=[];return n.forEach(a=>{const i=["default"],s={default:[]},l=r[a];if(l.length!==0){l.forEach(d=>{const f=d.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(d)});const c=[];i.forEach(d=>{s[d].length&&c.push({name:d,list:s[d]})});const u={name:a,list:c};o.push(u)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}};const wE=ve({version:U(),name:U(),css:K(U()),renderType:K(pt([ft("COMPONENT"),ft("PAGE")])),methods:K(Ie(sE)),componentsMeta:Ie(_c(ve({componentName:U()}),Rc)),thirdLibs:K(JO),componentsTree:lE,assets:K(Ie(ze()))}),bg=e=>(Pc({data:e,dataStruct:wE,throwError:!1}),e),us=(e,t,n)=>({...e,componentsTree:new Fo(e.componentsTree,{parent:t,materials:n})});class ai{constructor(t,n){oe(this,"nodeType","PAGE"),oe(this,"rawData"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"assetPackagesList"),bg(t),this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Qn((n==null?void 0:n.materials)||[]),this.data=us(t,this,this.materialsModel),this.assetPackagesList=[...(n==null?void 0:n.assetPackagesList)||[],...this.data.assets||[]]}updatePage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:n,node:this})}reloadPage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:n,node:this})}get value(){return this.data}getNode(t){if(!t)return;const n=this.data.componentsTree;return jc(n,t)}addNode(t,n,r="AFTER"){var o;if(r==="AFTER"||r==="BEFORE"){const a=n.parent;if(a===null&&n instanceof Fo)return console.warn("Not found parent node"),!1;if(a instanceof Mr)return console.warn("CProp can not add node"),!1;if(a instanceof jr){const s=a.value.value,l=s.findIndex(c=>c===n)??-1;return l>=0?(r==="BEFORE"?s.splice(l,0,t):s.splice(l+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ai)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===n))??-1;return i>=0?(r==="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(r==="CHILD_START")return n.value.children.unshift(t),t.parent=n,n.updateValue(),!0;if(r==="CHILD_END")return n.value.children.push(t),t.parent=n,n.updateValue(),!0;if(ht(r)){const a=r;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?n==null||n.value.children.splice(s,0,t):n==null||n.value.children.splice(s+1,0,t),t.parent=n,n.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new je(t,{parent:null,materials:this.materialsModel})}addNodeById(t,n,r="AFTER"){const o=this.getNode(n);return o?this.addNode(t,o,r):(console.warn(`Not find a node by ${n}, pls check it`),!1)}copyNode(t){const n=t.export("design");n.id=yn();const r=new je(n,{parent:t.parent,materials:this.materialsModel});return this.addNode(r,t,"AFTER"),r}copyNodeById(t){const n=this.getNode(t);return n&&n instanceof je?this.copyNode(n):!1}moveNode(t,n,r){this.deleteNode(t);let o=n;return["AFTER","BEFORE"].includes(r)&&(o=n.parent),t.parent=o,this.addNode(t,n,r)}moveNodeById(t,n,r){const o=this.getNode(t),a=this.getNode(n);return o&&a&&o instanceof je&&a instanceof je?this.moveNode(o,a,r):!1}deleteNode(t){var n;const r=t.parent;if(!r)throw new Error("parent node is null or undefined, pls check it");if(r instanceof jr){const o=r.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(n=r.parent)==null||n.updateValue(),i}if(r instanceof je||r instanceof Fo){const o=r.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),r.updateValue(),i}}deleteNodeById(t){const n=this.getNode(t);if(n)return this.deleteNode(n)}export(t=Nc.SAVE){var n;const r=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(l=>{const c=o.find(u=>{var d;return u.package===((d=l.value.npm)==null?void 0:d.package)});return c&&a.push(c),{componentName:l.componentName,...ng(l.value.npm||{})}}).filter(l=>!!(l.componentName&&l.package&&l.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:kc(r),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(n=this.data.thirdLibs)==null||n.forEach(l=>{const c=o.find(u=>l.package===u.package);c&&a.push(c)}),s.assets=FO(a,l=>l.package),s=ug(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}qr.ROOT_CONTAINER;var SE=typeof global=="object"&&global&&global.Object===Object&&global;const wg=SE;var xE=typeof self=="object"&&self&&self.Object===Object&&self,CE=wg||xE||Function("return this")();const Yr=CE;var OE=Yr.Symbol;const Ar=OE;var Sg=Object.prototype,EE=Sg.hasOwnProperty,_E=Sg.toString,go=Ar?Ar.toStringTag:void 0;function RE(e){var t=EE.call(e,go),n=e[go];try{e[go]=void 0;var r=!0}catch{}var o=_E.call(e);return r&&(t?e[go]=n:delete e[go]),o}var NE=Object.prototype,TE=NE.toString;function PE(e){return TE.call(e)}var kE="[object Null]",jE="[object Undefined]",yd=Ar?Ar.toStringTag:void 0;function ta(e){return e==null?e===void 0?jE:kE:yd&&yd in Object(e)?RE(e):PE(e)}function Xr(e){return e!=null&&typeof e=="object"}var ME="[object Symbol]";function AE(e){return typeof e=="symbol"||Xr(e)&&ta(e)==ME}function DE(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var $E=Array.isArray;const Dr=$E;var IE=1/0,bd=Ar?Ar.prototype:void 0,wd=bd?bd.toString:void 0;function xg(e){if(typeof e=="string")return e;if(Dr(e))return DE(e,xg)+"";if(AE(e))return wd?wd.call(e):"";var t=e+"";return t=="0"&&1/e==-IE?"-0":t}function or(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Cg(e){return e}var LE="[object AsyncFunction]",BE="[object Function]",zE="[object GeneratorFunction]",VE="[object Proxy]";function Mc(e){if(!or(e))return!1;var t=ta(e);return t==BE||t==zE||t==LE||t==VE}var FE=Yr["__core-js_shared__"];const ds=FE;var Sd=function(){var e=/[^.]+$/.exec(ds&&ds.keys&&ds.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function HE(e){return!!Sd&&Sd in e}var UE=Function.prototype,WE=UE.toString;function GE(e){if(e!=null){try{return WE.call(e)}catch{}try{return e+""}catch{}}return""}var KE=/[\\^$.*+?()[\]{}|]/g,qE=/^\[object .+?Constructor\]$/,YE=Function.prototype,XE=Object.prototype,JE=YE.toString,QE=XE.hasOwnProperty,ZE=RegExp("^"+JE.call(QE).replace(KE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function e_(e){if(!or(e)||HE(e))return!1;var t=Mc(e)?ZE:qE;return t.test(GE(e))}function t_(e,t){return e==null?void 0:e[t]}function Ac(e,t){var n=t_(e,t);return e_(n)?n:void 0}var xd=Object.create,n_=function(){function e(){}return function(t){if(!or(t))return{};if(xd)return xd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const r_=n_;function o_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a_(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var i_=800,s_=16,l_=Date.now;function c_(e){var t=0,n=0;return function(){var r=l_(),o=s_-(r-n);if(n=r,o>0){if(++t>=i_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function u_(e){return function(){return e}}var d_=function(){try{var e=Ac(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ii=d_;var f_=ii?function(e,t){return ii(e,"toString",{configurable:!0,enumerable:!1,value:u_(t),writable:!0})}:Cg;const p_=f_;var h_=c_(p_);const g_=h_;var v_=9007199254740991,m_=/^(?:0|[1-9]\d*)$/;function Og(e,t){var n=typeof e;return t=t??v_,!!t&&(n=="number"||n!="symbol"&&m_.test(e))&&e>-1&&e%1==0&&e<t}function Dc(e,t,n){t=="__proto__"&&ii?ii(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ni(e,t){return e===t||e!==e&&t!==t}var y_=Object.prototype,b_=y_.hasOwnProperty;function w_(e,t,n){var r=e[t];(!(b_.call(e,t)&&Ni(r,n))||n===void 0&&!(t in e))&&Dc(e,t,n)}function S_(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Dc(n,s,l):w_(n,s,l)}return n}var Cd=Math.max;function x_(e,t,n){return t=Cd(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Cd(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),o_(e,this,s)}}function C_(e,t){return g_(x_(e,t,Cg),e+"")}var O_=9007199254740991;function Eg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=O_}function $c(e){return e!=null&&Eg(e.length)&&!Mc(e)}function E_(e,t,n){if(!or(n))return!1;var r=typeof t;return(r=="number"?$c(n)&&Og(t,n.length):r=="string"&&t in n)?Ni(n[t],e):!1}function __(e){return C_(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&E_(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var R_=Object.prototype;function _g(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||R_;return e===n}function N_(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var T_="[object Arguments]";function Od(e){return Xr(e)&&ta(e)==T_}var Rg=Object.prototype,P_=Rg.hasOwnProperty,k_=Rg.propertyIsEnumerable,j_=Od(function(){return arguments}())?Od:function(e){return Xr(e)&&P_.call(e,"callee")&&!k_.call(e,"callee")};const ll=j_;function M_(){return!1}var Ng=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ed=Ng&&typeof module=="object"&&module&&!module.nodeType&&module,A_=Ed&&Ed.exports===Ng,_d=A_?Yr.Buffer:void 0,D_=_d?_d.isBuffer:void 0,$_=D_||M_;const Tg=$_;var I_="[object Arguments]",L_="[object Array]",B_="[object Boolean]",z_="[object Date]",V_="[object Error]",F_="[object Function]",H_="[object Map]",U_="[object Number]",W_="[object Object]",G_="[object RegExp]",K_="[object Set]",q_="[object String]",Y_="[object WeakMap]",X_="[object ArrayBuffer]",J_="[object DataView]",Q_="[object Float32Array]",Z_="[object Float64Array]",eR="[object Int8Array]",tR="[object Int16Array]",nR="[object Int32Array]",rR="[object Uint8Array]",oR="[object Uint8ClampedArray]",aR="[object Uint16Array]",iR="[object Uint32Array]",Re={};Re[Q_]=Re[Z_]=Re[eR]=Re[tR]=Re[nR]=Re[rR]=Re[oR]=Re[aR]=Re[iR]=!0;Re[I_]=Re[L_]=Re[X_]=Re[B_]=Re[J_]=Re[z_]=Re[V_]=Re[F_]=Re[H_]=Re[U_]=Re[W_]=Re[G_]=Re[K_]=Re[q_]=Re[Y_]=!1;function sR(e){return Xr(e)&&Eg(e.length)&&!!Re[ta(e)]}function lR(e){return function(t){return e(t)}}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ro=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,cR=Ro&&Ro.exports===Pg,fs=cR&&wg.process,uR=function(){try{var e=Ro&&Ro.require&&Ro.require("util").types;return e||fs&&fs.binding&&fs.binding("util")}catch{}}();const Rd=uR;var Nd=Rd&&Rd.isTypedArray,dR=Nd?lR(Nd):sR;const kg=dR;var fR=Object.prototype,pR=fR.hasOwnProperty;function hR(e,t){var n=Dr(e),r=!n&&ll(e),o=!n&&!r&&Tg(e),a=!n&&!r&&!o&&kg(e),i=n||r||o||a,s=i?N_(e.length,String):[],l=s.length;for(var c in e)(t||pR.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Og(c,l)))&&s.push(c);return s}function gR(e,t){return function(n){return e(t(n))}}function vR(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mR=Object.prototype,yR=mR.hasOwnProperty;function bR(e){if(!or(e))return vR(e);var t=_g(e),n=[];for(var r in e)r=="constructor"&&(t||!yR.call(e,r))||n.push(r);return n}function jg(e){return $c(e)?hR(e,!0):bR(e)}var wR=Ac(Object,"create");const Ho=wR;function SR(){this.__data__=Ho?Ho(null):{},this.size=0}function xR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CR="__lodash_hash_undefined__",OR=Object.prototype,ER=OR.hasOwnProperty;function _R(e){var t=this.__data__;if(Ho){var n=t[e];return n===CR?void 0:n}return ER.call(t,e)?t[e]:void 0}var RR=Object.prototype,NR=RR.hasOwnProperty;function TR(e){var t=this.__data__;return Ho?t[e]!==void 0:NR.call(t,e)}var PR="__lodash_hash_undefined__";function kR(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ho&&t===void 0?PR:t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zn.prototype.clear=SR;Zn.prototype.delete=xR;Zn.prototype.get=_R;Zn.prototype.has=TR;Zn.prototype.set=kR;function jR(){this.__data__=[],this.size=0}function Ti(e,t){for(var n=e.length;n--;)if(Ni(e[n][0],t))return n;return-1}var MR=Array.prototype,AR=MR.splice;function DR(e){var t=this.__data__,n=Ti(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():AR.call(t,n,1),--this.size,!0}function $R(e){var t=this.__data__,n=Ti(t,e);return n<0?void 0:t[n][1]}function IR(e){return Ti(this.__data__,e)>-1}function LR(e,t){var n=this.__data__,r=Ti(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bn.prototype.clear=jR;bn.prototype.delete=DR;bn.prototype.get=$R;bn.prototype.has=IR;bn.prototype.set=LR;var BR=Ac(Yr,"Map");const Mg=BR;function zR(){this.size=0,this.__data__={hash:new Zn,map:new(Mg||bn),string:new Zn}}function VR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pi(e,t){var n=e.__data__;return VR(t)?n[typeof t=="string"?"string":"hash"]:n.map}function FR(e){var t=Pi(this,e).delete(e);return this.size-=t?1:0,t}function HR(e){return Pi(this,e).get(e)}function UR(e){return Pi(this,e).has(e)}function WR(e,t){var n=Pi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Jr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jr.prototype.clear=zR;Jr.prototype.delete=FR;Jr.prototype.get=HR;Jr.prototype.has=UR;Jr.prototype.set=WR;function Ag(e){return e==null?"":xg(e)}var GR=gR(Object.getPrototypeOf,Object);const Dg=GR;var KR="[object Object]",qR=Function.prototype,YR=Object.prototype,$g=qR.toString,XR=YR.hasOwnProperty,JR=$g.call(Object);function $r(e){if(!Xr(e)||ta(e)!=KR)return!1;var t=Dg(e);if(t===null)return!0;var n=XR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$g.call(n)==JR}function QR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function ZR(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:QR(e,t,n)}var e2="\\ud800-\\udfff",t2="\\u0300-\\u036f",n2="\\ufe20-\\ufe2f",r2="\\u20d0-\\u20ff",o2=t2+n2+r2,a2="\\ufe0e\\ufe0f",i2="\\u200d",s2=RegExp("["+i2+e2+o2+a2+"]");function Ig(e){return s2.test(e)}function l2(e){return e.split("")}var Lg="\\ud800-\\udfff",c2="\\u0300-\\u036f",u2="\\ufe20-\\ufe2f",d2="\\u20d0-\\u20ff",f2=c2+u2+d2,p2="\\ufe0e\\ufe0f",h2="["+Lg+"]",cl="["+f2+"]",ul="\\ud83c[\\udffb-\\udfff]",g2="(?:"+cl+"|"+ul+")",Bg="[^"+Lg+"]",zg="(?:\\ud83c[\\udde6-\\uddff]){2}",Vg="[\\ud800-\\udbff][\\udc00-\\udfff]",v2="\\u200d",Fg=g2+"?",Hg="["+p2+"]?",m2="(?:"+v2+"(?:"+[Bg,zg,Vg].join("|")+")"+Hg+Fg+")*",y2=Hg+Fg+m2,b2="(?:"+[Bg+cl+"?",cl,zg,Vg,h2].join("|")+")",w2=RegExp(ul+"(?="+ul+")|"+b2+y2,"g");function S2(e){return e.match(w2)||[]}function x2(e){return Ig(e)?S2(e):l2(e)}function C2(e){return function(t){t=Ag(t);var n=Ig(t)?x2(t):void 0,r=n?n[0]:t.charAt(0),o=n?ZR(n,1).join(""):t.slice(1);return r[e]()+o}}var O2=C2("toUpperCase");const E2=O2;function _2(e){return E2(Ag(e).toLowerCase())}function R2(){this.__data__=new bn,this.size=0}function N2(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function T2(e){return this.__data__.get(e)}function P2(e){return this.__data__.has(e)}var k2=200;function j2(e,t){var n=this.__data__;if(n instanceof bn){var r=n.__data__;if(!Mg||r.length<k2-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jr(r)}return n.set(e,t),this.size=n.size,this}function Qr(e){var t=this.__data__=new bn(e);this.size=t.size}Qr.prototype.clear=R2;Qr.prototype.delete=N2;Qr.prototype.get=T2;Qr.prototype.has=P2;Qr.prototype.set=j2;var Ug=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Td=Ug&&typeof module=="object"&&module&&!module.nodeType&&module,M2=Td&&Td.exports===Ug,Pd=M2?Yr.Buffer:void 0,kd=Pd?Pd.allocUnsafe:void 0;function A2(e,t){if(t)return e.slice();var n=e.length,r=kd?kd(n):new e.constructor(n);return e.copy(r),r}var D2=Yr.Uint8Array;const jd=D2;function $2(e){var t=new e.constructor(e.byteLength);return new jd(t).set(new jd(e)),t}function I2(e,t){var n=t?$2(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function L2(e){return typeof e.constructor=="function"&&!_g(e)?r_(Dg(e)):{}}function B2(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var z2=B2();const V2=z2;function dl(e,t,n){(n!==void 0&&!Ni(e[t],n)||n===void 0&&!(t in e))&&Dc(e,t,n)}function F2(e){return Xr(e)&&$c(e)}function fl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function H2(e){return S_(e,jg(e))}function U2(e,t,n,r,o,a,i){var s=fl(e,n),l=fl(t,n),c=i.get(l);if(c){dl(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Dr(l),p=!f&&Tg(l),h=!f&&!p&&kg(l);u=l,f||p||h?Dr(s)?u=s:F2(s)?u=a_(s):p?(d=!1,u=A2(l,!0)):h?(d=!1,u=I2(l,!0)):u=[]:$r(l)||ll(l)?(u=s,ll(s)?u=H2(s):(!or(s)||Mc(s))&&(u=L2(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),dl(e,n,u)}function Wg(e,t,n,r,o){e!==t&&V2(t,function(a,i){if(o||(o=new Qr),or(a))U2(e,t,i,n,Wg,r,o);else{var s=r?r(fl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),dl(e,i,s)}},jg)}var W2=__(function(e,t,n){Wg(e,t,n)});const G2=W2;function K2(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function q2(e){var t,n;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===r||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((n=e==null?void 0:e.prototype)==null?void 0:n.setState)||e._forwardRef}function Y2(e){class t extends g.Component{render(){return g.createElement(e,this.props)}}return t.displayName=e.displayName,t}const fr=(e,t)=>{const n=r=>{const o=`
|
|
125
|
+
data struct format is invalidate`),o},Ld=e=>{const{data:t,message:n,throwError:r,dataStruct:o}=e;return w6(({data:a})=>{try{return O1(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof _1&&(s=i.failures().map(l=>`【${l.path.join(".")}】: ${l.message}
|
|
126
|
+
`)),{isValidate:!1,message:s,error:i}}})({data:t,message:n,throwError:r})};var da=(e=>(e.ROOT_CONTAINER="RootContainer",e))(da||{});const S6=$e({type:Mt(rn.FUNCTION),value:te()}),C6=Md(E1(Xo,["componentName"]),$e({componentName:Mt("RootContainer")}));function _6(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const Di=_6(),O6=(e,t)=>{const n={...e,value:[]},r=e.value;let o=new Kr([]);return t&&(o=t.materialsMode||new Kr([])),r&&(ot(r)?n.value=r.map(a=>new Qe(a,{parent:t,materials:o})):It(r)&&n.value.push(new Qe(r,{parent:t,materials:o}))),n};let Yo=class{constructor(t,n){ge(this,"nodeType","SLOT"),ge(this,"rawData"),ge(this,"parent"),ge(this,"emitter",Di),ge(this,"data"),ge(this,"id"),ge(this,"materialsMode"),this.parent=(n==null?void 0:n.parent)||null,this.rawData=t;const r=(n==null?void 0:n.materials)||new Kr([]);this.materialsMode=r,this.id=ur(),this.data=O6(t,this)}get value(){return this.data}export(t){const n=this.data,r=o=>{if(o instanceof Qe)return o.export(t);if(It(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return ot(o)?o.map(a=>r(a)):(t==="design"&&delete o.id,o)};return r(n)}};const P1=e=>{let t=[];return e.forEach(n=>{const r=n;r.type?r.type===Xu.SINGLE?t.push(r.content):r.type===Xu.GROUP&&(t=[...t,...P1(r.content)]):t.push(n)}),t},Yu=(e,t,n)=>{if(e.type)return e.type===rn.SLOT?new Yo(e,{parent:t,materials:n}):e;if(It(e)){const r={};return Object.keys(e).forEach(o=>{r[o]=Ju(e[o],t,n)}),r}else return Array.isArray(e)?e.map(r=>Yu(r,t,n)):e},Ju=(e,t,n)=>It(e)?Yu(e,t,n):ot(e)?e.map(r=>Yu(r,t,n)):e;let Jo=class k1{constructor(t,n,r){ge(this,"nodeType","PROP"),ge(this,"rawData"),ge(this,"parent"),ge(this,"emitter",Di),ge(this,"data"),ge(this,"name"),ge(this,"materialsMode");const o=(r==null?void 0:r.materials)||new Kr([]);this.materialsMode=o,this.parent=r==null?void 0:r.parent,this.rawData=n,this.name=t,this.data=Ju(n,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const n=this.data;this.data=Ju(t??n,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:n,node:this}),this.parent&&!(this.parent instanceof Yo)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof Qe){const n=t.material;return P1((n==null?void 0:n.value.props)||[]).find(r=>r.name===this.name)}else return null}export(t){const n=this.data,r=o=>{if(o instanceof k1||o instanceof Yo||o instanceof Qe)return o.export(t);if(ot(o))return o.map(a=>r(a));if(It(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return o};return r(n)}};const E6=e=>{if(typeof e=="string")return!0;Ld({data:e,dataStruct:Xo,throwError:!1})},Ng=(e,t,n=new Kr([]))=>{if(typeof e=="string")return e;const r={...e,id:e.id??ur(),children:[],props:{},methods:e.methods||[],configure:S1(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 Jo){r.props[a]=s;return}r.props[a]=new Jo(a,s||"",{parent:t,materials:n})}),e.children&&(Array.isArray(e.children)?r.children=e.children.map(a=>{if(a instanceof Qe)return a;if(It(a)){const i=a;return new Qe(i,{parent:t,materials:n})}else return a}):(e.children instanceof Qe&&(r.children=[e.children]),r.children=[new Qe(e.children,{parent:t,materials:n})])),r};class Qe{constructor(t,n){ge(this,"nodeType","NODE"),ge(this,"rawData"),ge(this,"data"),ge(this,"emitter",Di),ge(this,"parent"),ge(this,"materialsModel"),ge(this,"listenerHandle"),ge(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),E6(t);const r=(n==null?void 0:n.materials)||new Kr([]);this.parent=(n==null?void 0:n.parent)||null,this.materialsModel=r,this.data=Ng(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};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(n=>n!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const n={...this.export("design"),id:t||ur()};return new Qe(n,{materials:this.materialsModel})}updateWithPlainObj(t){const n={...this.data,...t};return this.data=Ng(n,this),n}updateValue(t){const n=this.data,r=this.updateWithPlainObj(t);this.emitter.emit("onNodeChange",{value:r,preValue:n,node:this})}contains(t){return Fd(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,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t){var n;const r=this.data;if(typeof r=="string")return r;const o={};Object.keys(r.props||{}).forEach(u=>{o[u]=r.props[u].export(t)});const a=(n=r.children)==null?void 0:n.map(u=>u instanceof Qe?u.export(t):u),i=r.configure||{},s=i.propsSetter||{},l={};Object.keys(s).forEach(u=>{const f=r1(s,u,!1);f&&(l[u]=f)}),i.propsSetter=l,this.material&&this.materialsModel.usedMaterials.push(this.material);let c={...r,configure:i,props:o,children:a};return t==="design"&&delete c.id,c=Bd(c),c}}const Ag=(e,t,n)=>{const r={...e,id:ur(),props:{},componentName:da.ROOT_CONTAINER,children:[],methods:e.methods||[],configure:S1(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];ot(e.children)?o=e.children.map(i=>i instanceof Qe?i:It(i)?new Qe(i,{parent:t,materials:n}):i):e.children instanceof Qe?o.push(e.children):e.children&&It(e.children)&&o.push(new Qe(e.children,{parent:t,materials:n}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const l=(s=e.props)==null?void 0:s[i];l instanceof Jo?r.props[i]=l:r.props[i]=new Jo(i,l||"",{parent:t,materials:n})}),r.children=o,r};class wi{constructor(t,{parent:n,materials:r}){ge(this,"rawData"),ge(this,"data"),ge(this,"nodeType",da.ROOT_CONTAINER),ge(this,"emitter",Di),ge(this,"materialsModel"),ge(this,"listenerHandle"),ge(this,"onChangeCbQueue"),ge(this,"parent"),this.materialsModel=r,this.rawData=JSON.parse(JSON.stringify(t)),this.data=Ag(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=n}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};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(n=>n!==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)}updateWithPlainObj(t){const n={...this.data,...t};return this.data=Ag(n,this,this.materialsModel),n}updateValue(t){const n=this.data;this.updateWithPlainObj(t),this.emitter.emit("onNodeChange",{value:this.data,preValue:n,node:this})}contains(t){return Fd(this,t)}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t=Dd.SAVE){var n;const r=this.data,o={};Object.keys(r.props||{}).forEach(l=>{o[l]=r.props[l].export(t)});const a=((n=r.children)==null?void 0:n.map(l=>{var c;return(c=l==null?void 0:l.export)==null?void 0:c.call(l,t)}))||[],i={...r,props:o,children:a.filter(l=>l)};let s=C1(i,["id"]);return s=Bd(s),s}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const n={...this.export("design"),id:t||ur()};return new wi(n,{materials:this.materialsModel,parent:null})}}const Ar=e=>(e==null?void 0:e.type)===rn.EXPRESSION,R6=e=>(e==null?void 0:e.type)===rn.FUNCTION,ur=()=>Math.random().toString(32).slice(3,9),$6=e=>(e==null?void 0:e.nodeType)==="NODE",Rc=e=>(e==null?void 0:e.nodeType)==="PROP",T6=e=>(e==null?void 0:e.nodeType)==="SLOT",Bd=e=>Y3(e,t=>It(t)?!Object.keys(t).length:ot(t)?!t.length:!t);function P6(e,t){const n=[e];for(;n.length;){const r=n.shift();if(r&&t(r))return r;const o=(r==null?void 0:r.props)||{},a=s=>{if(s instanceof Qe){n.push(s);return}if(s instanceof Yo&&a(s.value.value),s instanceof Jo){a(s.value);return}if(It(s)){const l=s;Object.keys(l).forEach(c=>{a(l[c])});return}if(ot(s)){s.forEach(l=>{a(l)});return}};a(o);const i=(r==null?void 0:r.value.children.filter(s=>s instanceof Qe))||[];n.push(...i)}}function Fd(e,t){return P6(e,n=>n.id===t)}const k6=e=>{const t=g1(e),n=t.snippets;return delete t.snippets,t.snippets=n.map(r=>({...t,...r,id:r.id||`${e.componentName}-${ur()}`,title:r.title||e.title,category:r.category||e.category,tags:[...r.tags||[],...e.tags||[]],groupName:r.groupName||e.groupName,snapshot:r.snapshot||e.icon,snapshotText:r.snapshotText,schema:{...r.schema,componentName:r.schema.componentName||e.componentName}})),t};class N6{constructor(t){ge(this,"rawData"),ge(this,"data"),this.rawData=t,this.data=k6(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(n=>n.id===t)}}const A6=e=>{if(!ot(e))throw new Error("Materials must be a array");return e.map(t=>new N6(t))},M6=e=>{e==null||e.forEach(t=>{Ld({data:t,dataStruct:x6,throwError:!1})})};let Kr=class{constructor(t){ge(this,"rawData"),ge(this,"data"),ge(this,"usedMaterials",[]),this.rawData=t,M6(t),this.data=A6(t)}findByComponentName(t){return this.data.find(n=>n.componentName===t)}findSnippetById(t){const n=[...this.data];let r=null;for(;!r&&n.length;){const o=n.pop();r=o==null?void 0:o.getSnippetById(t)}return r}getAllSnippets(){const t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),n=[],r={default:[]};t.forEach(a=>{const i=a.groupName||"default";n.includes(i)||(n.push(i),r[i]=[]),r[i].push(a)});let o=[];return n.forEach(a=>{const i=["default"],s={default:[]},l=r[a];if(l.length!==0){l.forEach(f=>{const d=f.category||"default";i.includes(d)||(i.push(d),s[d]=[]),s[d].push(f)});const c=[];i.forEach(f=>{s[f].length&&c.push({name:f,list:s[f]})});const u={name:a,list:c};o.push(u)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}};const j6=$e({version:te(),name:te(),css:ee(te()),renderType:ee(jt([Mt("COMPONENT"),Mt("PAGE")])),loadType:ee(Ye()),lifecycle:ee(Ye()),props:ee(Ye()),methods:ee(tt(S6)),componentsMeta:tt(Md($e({componentName:te()}),jd)),thirdLibs:ee(d6),componentsTree:C6,assets:ee(tt(Ye()))}),N1=e=>(Ld({data:e,dataStruct:j6,throwError:!1}),e),$c=(e,t,n)=>({...e,componentsTree:new wi(e.componentsTree,{parent:t,materials:n})});class ol{constructor(t,n){ge(this,"nodeType","PAGE"),ge(this,"rawData"),ge(this,"emitter",Di),ge(this,"data"),ge(this,"parent"),ge(this,"materialsModel"),ge(this,"assetPackagesList"),N1(t),this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Kr((n==null?void 0:n.materials)||[]),this.data=$c(t,this,this.materialsModel),this.assetPackagesList=[...(n==null?void 0:n.assetPackagesList)||[],...this.data.assets||[]]}updatePage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=$c(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:n,node:this})}reloadPage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=$c(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:n,node:this})}get value(){return this.data}getNode(t){if(!t)return;const n=this.data.componentsTree;return Fd(n,t)}addNode(t,n,r="AFTER"){var o;if(r==="AFTER"||r==="BEFORE"){const a=n.parent;if(a===null&&n instanceof wi)return console.warn("Not found parent node"),!1;if(a instanceof Jo)return console.warn("CProp can not add node"),!1;if(a instanceof Yo){const s=a.value.value,l=s.findIndex(c=>c===n)??-1;return l>=0?(r==="BEFORE"?s.splice(l,0,t):s.splice(l+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ol)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===n))??-1;return i>=0?(r==="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(r==="CHILD_START")return n.value.children.unshift(t),t.parent=n,n.updateValue(),!0;if(r==="CHILD_END")return n.value.children.push(t),t.parent=n,n.updateValue(),!0;if(It(r)){const a=r;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?n==null||n.value.children.splice(s,0,t):n==null||n.value.children.splice(s+1,0,t),t.parent=n,n.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new Qe(t,{parent:null,materials:this.materialsModel})}addNodeById(t,n,r="AFTER"){const o=this.getNode(n);return o?this.addNode(t,o,r):(console.warn(`Not find a node by ${n}, pls check it`),!1)}copyNode(t){const n=t.export("design");n.id=ur();const r=new Qe(n,{parent:t.parent,materials:this.materialsModel});return this.addNode(r,t,"AFTER"),r}copyNodeById(t){const n=this.getNode(t);return n&&n instanceof Qe?this.copyNode(n):!1}moveNode(t,n,r){this.deleteNode(t);let o=n;return["AFTER","BEFORE"].includes(r)&&(o=n.parent),t.parent=o,this.addNode(t,n,r)}moveNodeById(t,n,r){const o=this.getNode(t),a=this.getNode(n);return o&&a&&o instanceof Qe&&a instanceof Qe?this.moveNode(o,a,r):!1}deleteNode(t){var n;const r=t.parent;if(!r)throw new Error("parent node is null or undefined, pls check it");if(r instanceof Yo){const o=r.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(n=r.parent)==null||n.updateValue(),i}if(r instanceof Qe||r instanceof wi){const o=r.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),r.updateValue(),i}}deleteNodeById(t){const n=this.getNode(t);if(n)return this.deleteNode(n)}export(t=Dd.SAVE){var n;const r=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(l=>{const c=o.find(u=>{var f;return u.package===((f=l.value.npm)==null?void 0:f.package)});return c&&a.push(c),{componentName:l.componentName,...g1(l.value.npm||{})}}).filter(l=>!!(l.componentName&&l.package&&l.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Bd(r),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(n=this.data.thirdLibs)==null||n.forEach(l=>{const c=o.find(u=>l.package===u.package);c&&a.push(c)}),s.assets=r6(a,l=>l.package),s=C1(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}da.ROOT_CONTAINER;var D6=typeof global=="object"&&global&&global.Object===Object&&global;const A1=D6;var I6=typeof self=="object"&&self&&self.Object===Object&&self,L6=A1||I6||Function("return this")();const ha=L6;var B6=ha.Symbol;const Qo=B6;var M1=Object.prototype,F6=M1.hasOwnProperty,z6=M1.toString,Ba=Qo?Qo.toStringTag:void 0;function H6(e){var t=F6.call(e,Ba),n=e[Ba];try{e[Ba]=void 0;var r=!0}catch{}var o=z6.call(e);return r&&(t?e[Ba]=n:delete e[Ba]),o}var V6=Object.prototype,U6=V6.toString;function W6(e){return U6.call(e)}var G6="[object Null]",K6="[object Undefined]",Mg=Qo?Qo.toStringTag:void 0;function Ii(e){return e==null?e===void 0?K6:G6:Mg&&Mg in Object(e)?H6(e):W6(e)}function pa(e){return e!=null&&typeof e=="object"}var q6="[object Symbol]";function X6(e){return typeof e=="symbol"||pa(e)&&Ii(e)==q6}function Y6(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var J6=Array.isArray;const Zo=J6;var Q6=1/0,jg=Qo?Qo.prototype:void 0,Dg=jg?jg.toString:void 0;function j1(e){if(typeof e=="string")return e;if(Zo(e))return Y6(e,j1)+"";if(X6(e))return Dg?Dg.call(e):"";var t=e+"";return t=="0"&&1/e==-Q6?"-0":t}function ro(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function D1(e){return e}var Z6="[object AsyncFunction]",e8="[object Function]",t8="[object GeneratorFunction]",n8="[object Proxy]";function zd(e){if(!ro(e))return!1;var t=Ii(e);return t==e8||t==t8||t==Z6||t==n8}var r8=ha["__core-js_shared__"];const Tc=r8;var Ig=function(){var e=/[^.]+$/.exec(Tc&&Tc.keys&&Tc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function o8(e){return!!Ig&&Ig in e}var a8=Function.prototype,i8=a8.toString;function s8(e){if(e!=null){try{return i8.call(e)}catch{}try{return e+""}catch{}}return""}var l8=/[\\^$.*+?()[\]{}|]/g,c8=/^\[object .+?Constructor\]$/,u8=Function.prototype,f8=Object.prototype,d8=u8.toString,h8=f8.hasOwnProperty,p8=RegExp("^"+d8.call(h8).replace(l8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g8(e){if(!ro(e)||o8(e))return!1;var t=zd(e)?p8:c8;return t.test(s8(e))}function v8(e,t){return e==null?void 0:e[t]}function Hd(e,t){var n=v8(e,t);return g8(n)?n:void 0}var Lg=Object.create,m8=function(){function e(){}return function(t){if(!ro(t))return{};if(Lg)return Lg(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const b8=m8;function y8(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function x8(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var w8=800,S8=16,C8=Date.now;function _8(e){var t=0,n=0;return function(){var r=C8(),o=S8-(r-n);if(n=r,o>0){if(++t>=w8)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function O8(e){return function(){return e}}var E8=function(){try{var e=Hd(Object,"defineProperty");return e({},"",{}),e}catch{}}();const al=E8;var R8=al?function(e,t){return al(e,"toString",{configurable:!0,enumerable:!1,value:O8(t),writable:!0})}:D1;const $8=R8;var T8=_8($8);const P8=T8;var k8=9007199254740991,N8=/^(?:0|[1-9]\d*)$/;function I1(e,t){var n=typeof e;return t=t??k8,!!t&&(n=="number"||n!="symbol"&&N8.test(e))&&e>-1&&e%1==0&&e<t}function Vd(e,t,n){t=="__proto__"&&al?al(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Bl(e,t){return e===t||e!==e&&t!==t}var A8=Object.prototype,M8=A8.hasOwnProperty;function j8(e,t,n){var r=e[t];(!(M8.call(e,t)&&Bl(r,n))||n===void 0&&!(t in e))&&Vd(e,t,n)}function D8(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Vd(n,s,l):j8(n,s,l)}return n}var Bg=Math.max;function I8(e,t,n){return t=Bg(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Bg(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),y8(e,this,s)}}function L8(e,t){return P8(I8(e,t,D1),e+"")}var B8=9007199254740991;function L1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=B8}function Ud(e){return e!=null&&L1(e.length)&&!zd(e)}function F8(e,t,n){if(!ro(n))return!1;var r=typeof t;return(r=="number"?Ud(n)&&I1(t,n.length):r=="string"&&t in n)?Bl(n[t],e):!1}function z8(e){return L8(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&F8(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var H8=Object.prototype;function B1(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||H8;return e===n}function V8(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var U8="[object Arguments]";function Fg(e){return pa(e)&&Ii(e)==U8}var F1=Object.prototype,W8=F1.hasOwnProperty,G8=F1.propertyIsEnumerable,K8=Fg(function(){return arguments}())?Fg:function(e){return pa(e)&&W8.call(e,"callee")&&!G8.call(e,"callee")};const Qu=K8;function q8(){return!1}var z1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zg=z1&&typeof module=="object"&&module&&!module.nodeType&&module,X8=zg&&zg.exports===z1,Hg=X8?ha.Buffer:void 0,Y8=Hg?Hg.isBuffer:void 0,J8=Y8||q8;const H1=J8;var Q8="[object Arguments]",Z8="[object Array]",e4="[object Boolean]",t4="[object Date]",n4="[object Error]",r4="[object Function]",o4="[object Map]",a4="[object Number]",i4="[object Object]",s4="[object RegExp]",l4="[object Set]",c4="[object String]",u4="[object WeakMap]",f4="[object ArrayBuffer]",d4="[object DataView]",h4="[object Float32Array]",p4="[object Float64Array]",g4="[object Int8Array]",v4="[object Int16Array]",m4="[object Int32Array]",b4="[object Uint8Array]",y4="[object Uint8ClampedArray]",x4="[object Uint16Array]",w4="[object Uint32Array]",Ue={};Ue[h4]=Ue[p4]=Ue[g4]=Ue[v4]=Ue[m4]=Ue[b4]=Ue[y4]=Ue[x4]=Ue[w4]=!0;Ue[Q8]=Ue[Z8]=Ue[f4]=Ue[e4]=Ue[d4]=Ue[t4]=Ue[n4]=Ue[r4]=Ue[o4]=Ue[a4]=Ue[i4]=Ue[s4]=Ue[l4]=Ue[c4]=Ue[u4]=!1;function S4(e){return pa(e)&&L1(e.length)&&!!Ue[Ii(e)]}function C4(e){return function(t){return e(t)}}var V1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ni=V1&&typeof module=="object"&&module&&!module.nodeType&&module,_4=ni&&ni.exports===V1,Pc=_4&&A1.process,O4=function(){try{var e=ni&&ni.require&&ni.require("util").types;return e||Pc&&Pc.binding&&Pc.binding("util")}catch{}}();const Vg=O4;var Ug=Vg&&Vg.isTypedArray,E4=Ug?C4(Ug):S4;const U1=E4;var R4=Object.prototype,$4=R4.hasOwnProperty;function T4(e,t){var n=Zo(e),r=!n&&Qu(e),o=!n&&!r&&H1(e),a=!n&&!r&&!o&&U1(e),i=n||r||o||a,s=i?V8(e.length,String):[],l=s.length;for(var c in e)(t||$4.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||I1(c,l)))&&s.push(c);return s}function P4(e,t){return function(n){return e(t(n))}}function k4(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var N4=Object.prototype,A4=N4.hasOwnProperty;function M4(e){if(!ro(e))return k4(e);var t=B1(e),n=[];for(var r in e)r=="constructor"&&(t||!A4.call(e,r))||n.push(r);return n}function W1(e){return Ud(e)?T4(e,!0):M4(e)}var j4=Hd(Object,"create");const Si=j4;function D4(){this.__data__=Si?Si(null):{},this.size=0}function I4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var L4="__lodash_hash_undefined__",B4=Object.prototype,F4=B4.hasOwnProperty;function z4(e){var t=this.__data__;if(Si){var n=t[e];return n===L4?void 0:n}return F4.call(t,e)?t[e]:void 0}var H4=Object.prototype,V4=H4.hasOwnProperty;function U4(e){var t=this.__data__;return Si?t[e]!==void 0:V4.call(t,e)}var W4="__lodash_hash_undefined__";function G4(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Si&&t===void 0?W4:t,this}function qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qr.prototype.clear=D4;qr.prototype.delete=I4;qr.prototype.get=z4;qr.prototype.has=U4;qr.prototype.set=G4;function K4(){this.__data__=[],this.size=0}function Fl(e,t){for(var n=e.length;n--;)if(Bl(e[n][0],t))return n;return-1}var q4=Array.prototype,X4=q4.splice;function Y4(e){var t=this.__data__,n=Fl(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():X4.call(t,n,1),--this.size,!0}function J4(e){var t=this.__data__,n=Fl(t,e);return n<0?void 0:t[n][1]}function Q4(e){return Fl(this.__data__,e)>-1}function Z4(e,t){var n=this.__data__,r=Fl(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function fr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fr.prototype.clear=K4;fr.prototype.delete=Y4;fr.prototype.get=J4;fr.prototype.has=Q4;fr.prototype.set=Z4;var ej=Hd(ha,"Map");const G1=ej;function tj(){this.size=0,this.__data__={hash:new qr,map:new(G1||fr),string:new qr}}function nj(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function zl(e,t){var n=e.__data__;return nj(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rj(e){var t=zl(this,e).delete(e);return this.size-=t?1:0,t}function oj(e){return zl(this,e).get(e)}function aj(e){return zl(this,e).has(e)}function ij(e,t){var n=zl(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ga(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ga.prototype.clear=tj;ga.prototype.delete=rj;ga.prototype.get=oj;ga.prototype.has=aj;ga.prototype.set=ij;function K1(e){return e==null?"":j1(e)}var sj=P4(Object.getPrototypeOf,Object);const q1=sj;var lj="[object Object]",cj=Function.prototype,uj=Object.prototype,X1=cj.toString,fj=uj.hasOwnProperty,dj=X1.call(Object);function ea(e){if(!pa(e)||Ii(e)!=lj)return!1;var t=q1(e);if(t===null)return!0;var n=fj.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&X1.call(n)==dj}function hj(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function pj(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:hj(e,t,n)}var gj="\\ud800-\\udfff",vj="\\u0300-\\u036f",mj="\\ufe20-\\ufe2f",bj="\\u20d0-\\u20ff",yj=vj+mj+bj,xj="\\ufe0e\\ufe0f",wj="\\u200d",Sj=RegExp("["+wj+gj+yj+xj+"]");function Y1(e){return Sj.test(e)}function Cj(e){return e.split("")}var J1="\\ud800-\\udfff",_j="\\u0300-\\u036f",Oj="\\ufe20-\\ufe2f",Ej="\\u20d0-\\u20ff",Rj=_j+Oj+Ej,$j="\\ufe0e\\ufe0f",Tj="["+J1+"]",Zu="["+Rj+"]",ef="\\ud83c[\\udffb-\\udfff]",Pj="(?:"+Zu+"|"+ef+")",Q1="[^"+J1+"]",Z1="(?:\\ud83c[\\udde6-\\uddff]){2}",ex="[\\ud800-\\udbff][\\udc00-\\udfff]",kj="\\u200d",tx=Pj+"?",nx="["+$j+"]?",Nj="(?:"+kj+"(?:"+[Q1,Z1,ex].join("|")+")"+nx+tx+")*",Aj=nx+tx+Nj,Mj="(?:"+[Q1+Zu+"?",Zu,Z1,ex,Tj].join("|")+")",jj=RegExp(ef+"(?="+ef+")|"+Mj+Aj,"g");function Dj(e){return e.match(jj)||[]}function Ij(e){return Y1(e)?Dj(e):Cj(e)}function Lj(e){return function(t){t=K1(t);var n=Y1(t)?Ij(t):void 0,r=n?n[0]:t.charAt(0),o=n?pj(n,1).join(""):t.slice(1);return r[e]()+o}}var Bj=Lj("toUpperCase");const Fj=Bj;function zj(e){return Fj(K1(e).toLowerCase())}function Hj(){this.__data__=new fr,this.size=0}function Vj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Uj(e){return this.__data__.get(e)}function Wj(e){return this.__data__.has(e)}var Gj=200;function Kj(e,t){var n=this.__data__;if(n instanceof fr){var r=n.__data__;if(!G1||r.length<Gj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ga(r)}return n.set(e,t),this.size=n.size,this}function va(e){var t=this.__data__=new fr(e);this.size=t.size}va.prototype.clear=Hj;va.prototype.delete=Vj;va.prototype.get=Uj;va.prototype.has=Wj;va.prototype.set=Kj;var rx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wg=rx&&typeof module=="object"&&module&&!module.nodeType&&module,qj=Wg&&Wg.exports===rx,Gg=qj?ha.Buffer:void 0,Kg=Gg?Gg.allocUnsafe:void 0;function Xj(e,t){if(t)return e.slice();var n=e.length,r=Kg?Kg(n):new e.constructor(n);return e.copy(r),r}var Yj=ha.Uint8Array;const qg=Yj;function Jj(e){var t=new e.constructor(e.byteLength);return new qg(t).set(new qg(e)),t}function Qj(e,t){var n=t?Jj(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Zj(e){return typeof e.constructor=="function"&&!B1(e)?b8(q1(e)):{}}function eD(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var tD=eD();const nD=tD;function tf(e,t,n){(n!==void 0&&!Bl(e[t],n)||n===void 0&&!(t in e))&&Vd(e,t,n)}function rD(e){return pa(e)&&Ud(e)}function nf(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function oD(e){return D8(e,W1(e))}function aD(e,t,n,r,o,a,i){var s=nf(e,n),l=nf(t,n),c=i.get(l);if(c){tf(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,f=u===void 0;if(f){var d=Zo(l),h=!d&&H1(l),v=!d&&!h&&U1(l);u=l,d||h||v?Zo(s)?u=s:rD(s)?u=x8(s):h?(f=!1,u=Xj(l,!0)):v?(f=!1,u=Qj(l,!0)):u=[]:ea(l)||Qu(l)?(u=s,Qu(s)?u=oD(s):(!ro(s)||zd(s))&&(u=Zj(l))):f=!1}f&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),tf(e,n,u)}function ox(e,t,n,r,o){e!==t&&nD(t,function(a,i){if(o||(o=new va),ro(a))aD(e,t,i,n,ox,r,o);else{var s=r?r(nf(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),tf(e,i,s)}},W1)}var iD=z8(function(e,t,n){ox(e,t,n)});const sD=iD;function lD(e){const t=e==null?void 0:e.prototype;return!!(t&&t.isReactComponent)}function cD(e){var t,n;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===r||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((n=e==null?void 0:e.prototype)==null?void 0:n.setState)||e._forwardRef}function uD(e){class t extends b.Component{render(){return b.createElement(e,this.props)}}return t.displayName=e.displayName,t}const po=(e,t)=>{const n=r=>{const o=`
|
|
92
127
|
${Object.keys(t).map(a=>`const ${a} = $$context['${a}'];`).join(`
|
|
93
128
|
`)}
|
|
94
129
|
return ${r};
|
|
95
|
-
`;return new Function("$$context",o)(t)};try{return n(e)}catch(r){console.warn(r);const o=`[${e}] expression run failed`;return console.warn(o),null}},
|
|
130
|
+
`;return new Function("$$context",o)(t)};try{return n(e)}catch(r){console.warn(r);const o=`[${e}] expression run failed`;return console.warn(o),null}},fD=(e,t,n)=>function(...r){let o;try{o=`
|
|
96
131
|
var $$$__args__$$$ = Array.from(arguments);
|
|
97
132
|
function $$_run_$$() {
|
|
98
133
|
var $$_f_$$ = ${e||"function () {}"};
|
|
@@ -102,7 +137,7 @@ function $$_run_$$() {
|
|
|
102
137
|
return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
|
|
103
138
|
}
|
|
104
139
|
return $$_run_$$();
|
|
105
|
-
`,new Function(o)(...r,t,n)}catch(a){console.log(o),console.warn(a)}},Md=(e,t)=>{const n={};return t.forEach((r,o)=>{n[r]=e[o]}),n},Ad=e=>{const t={};return Object.keys(e).forEach(n=>{let r=n.replace("-webkit","Webkit");r=r.replace("-ms","ms"),r=r.replace("-moz","Moz"),r=r.replace("-o","O");let o=r.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?_2(a):a)),t[o.join("")]=e[n]}),t},Dd=e=>{let t="";return Object.keys(e).forEach(n=>{t+=`${n}:${e[n]};`}),t},J2=(e,t)=>{const n=[];return t.forEach(r=>{const o=r.exec(e);o!=null&&o.length&&n.push(o[1])}),n},Q2=(e,t)=>{const n={};return t.forEach(r=>{e[r.name]&&(n[r.name]=e[r.name])}),n},Z2=(e,t)=>Q2(e,t),Ra="DYNAMIC",eN=["$$context","$$nodeModel"],$d=e=>{let t;const n=new Set,r=(i,s)=>{const l=typeof i=="function"?i(t):i;if(!Object.is(l,t)){const c=t;t=s??typeof l!="object"?l:Object.assign({},t,l),n.forEach(u=>u(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:i=>(n.add(i),()=>n.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."),n.clear()}};return t=e(r,o,a),a},tN=e=>e?$d(e):$d;class nN{constructor(){J(this,"storeMap",new Map)}addStore(t,n){const r=tN(n);return this.storeMap.set(t,r),r.name=t,r}setStore(t,n){this.storeMap.set(t,n)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}getState(t){var n;return(n=this.storeMap.get(t))==null?void 0:n.getState()}getStateObj(t){return{state:this.getState(t),updateState:n=>{this.setState(t,n)}}}setState(t,n){var r;return(r=this.storeMap.get(t))==null?void 0:r.setState(n)}connect(t,n){const r=this.storeMap.get(t);return r?r.subscribe(n):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((n,r)=>{t[r]=this.getStateObj(r)}),t}destroy(){this.storeMap=new Map}}class rN{constructor(){J(this,"varSpace",new Map)}get(t){return this.varSpace.get(t)}add(t,n){this.varSpace.set(t,n)}remove(t){this.varSpace.delete(t)}destroy(){this.varSpace.clear()}getStateSnapshot(){const t={};return this.varSpace.forEach((n,r)=>{t[r]=n}),t}}class oN{constructor(){J(this,"renderMode","normal"),J(this,"components",{}),J(this,"storeManager",new nN),J(this,"variableManager",new rN),J(this,"runtimeComponentCache",new Map),J(this,"onGetRef"),J(this,"onGetComponent"),J(this,"onComponentMount"),J(this,"onComponentDestroy"),J(this,"processNodeConfigHook")}getComponent(t){var n;const r=t.value.componentName;let o=this.components[r]||(()=>`Component [${r}] not found`);return q2(o)||(o=Y2(o),this.components[r]=o),this.onGetComponent&&(o=(n=this.onGetComponent)==null?void 0:n.call(this,o,t)),o}getContext(t={},n){let r=t;return n&&(r={...t},r.__proto__=n||null),r}pageRender(t,{components:n,onGetRef:r,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:l,processNodeConfigHook:c}){this.renderMode=l,this.components=n,this.onGetRef=r,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=c;const u=t.value.componentsTree,d=this.getComponent(u),f=this.convertModelToComponent(d,t.value.componentsTree),p={},h=u.props;return Object.keys(h).forEach(m=>{p[m]=h[m].value}),p.$$context=o,this.render(f,p)}transformProps(t={},{$$context:n}){const r=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(cs(i))return o(i.value);if(hE(i)){const s=i.value,l=s.value;if(!l)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const c=u=>{const d=`${u.id}-${Ra}`;if(this.runtimeComponentCache.get(u.id))return{key:d,component:this.runtimeComponentCache.get(u.id)};const f=this.getComponent(u),p=this.convertModelToComponent(f,u),h=s.params||[];return{component:(...m)=>{const b=Md(m,h),y=this.getContext({params:b},n);return this.render(p,{$$context:y,key:d})},key:d}};if(Array.isArray(l)){const u=l==null?void 0:l.map(d=>c(d));return(...d)=>u.map(f=>K2(f.component)?g.createElement(f.component,{$$context:n,key:f.key}):f.component(...d))}else return c(l).component}else{if(Vn(i))return fr(i.value,n||{});if(fE(i))return X2(i.value,n,this.storeManager);if($r(i)){let s=i;cs(i)&&(s=i.value);const l=s,c={};return Object.keys(s).forEach(u=>{c[u]=o(l[u])}),c}else return i}},a={};return Object.keys(r).forEach(i=>{const s=r[i];a[i]=o(s)}),a}collectSpecialProps(t={},n){const r=[],o=(a,i)=>{let s=i;cs(i)&&(s=i.value),n(s)?r.push({keyPath:a,val:s}):Dr(s)?s.forEach((l,c)=>{o([...a,String(c)],l)}):$r(s)&&Object.keys(s).forEach(l=>{o([...a,l],s[l])})};return o(["$root"],t),r}convertModelToComponent(t,n){const r=this;class o extends g.Component{constructor(i){super(i),J(this,"_CONDITION",!0),J(this,"_DESIGN_BOX",!1),J(this,"_NODE_MODEL",n),J(this,"_NODE_ID",n.id),J(this,"UNIQUE_ID",`${n.id}_${yn()}`),J(this,"targetComponentRef"),J(this,"listenerHandle",[]),J(this,"storeState"),J(this,"storeListenDisposeList",[]),J(this,"domHeader"),J(this,"mediaStyleDomMap",{}),J(this,"variableSpace"),J(this,"nodeName"),J(this,"updateState",u=>{this.storeState.setState(u),this.forceUpdate()}),J(this,"getStyleDomById",u=>{const d=this.mediaStyleDomMap;let f=d[u];return f||(f=document.createElement("style"),d[u]=f),f.id=u,f}),J(this,"addMediaCSS",()=>{var u;let d=this.domHeader;if(d||(d=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=d),!this.domHeader)return;const f=this._NODE_MODEL.value.css;f&&f.value.forEach(p=>{var h;const m=`${this.UNIQUE_ID}_${p.state}`;let b=`.${f.class}`;if(p.state!=="normal"&&(b=`${b}:${p.state}`),Object.keys(p.style).length!==0){const y=this.getStyleDomById(m);y.innerText=`${b} { ${Dd(p.style)} }`,d==null||d.appendChild(y)}(h=p.media)!=null&&h.length&&p.media.forEach(y=>{const S=`${m}_${y.type}_${y.value}`,E=this.getStyleDomById(S);E.media=`screen and (${y.type}:${y.value}px)`,E.innerHTML=`${b} { ${Dd(y.style)} }`,d==null||d.appendChild(E)})})}),J(this,"removeMediaCSS",()=>{const u=this.mediaStyleDomMap;Object.keys(u).forEach(d=>{var f;(f=this.domHeader)==null||f.removeChild(u[d])}),this.mediaStyleDomMap={}}),J(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(u=>u()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=g.createRef(),this.state=n.value.state||{};const s=n.value.nodeName||n.id;this.nodeName=s;const l=r.storeManager.getStore(s);l?(this.storeState=l,l.setState({...n.value.state||{}})):this.storeState=r.storeManager.addStore(s,()=>({...n.value.state||{}})),this.storeState.subscribe(u=>{this.setState({...u})}),this.connectStore();const c=r.variableManager.get(s);c?this.variableSpace=c:(this.variableSpace={staticVar:{},methods:{}},r.variableManager.add(s,this.variableSpace))}connectStore(){const i=r.collectSpecialProps(n.props,d=>!!Vn(d)),s=r.collectSpecialProps({css:n.value.css,class:n.value.classNames},d=>!!Vn(d));let l=[];[...i,...s].map(d=>{const f=d.val,p=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],h=J2(f.value,p);l=[...l,...h]}).filter(Boolean);const c=Array.from(new Set(l)),u=[];c.length&&c.forEach(d=>{r.storeManager.getStore(d)||(r.storeManager.addStore(d,()=>({})),console.warn(r.storeManager,d,"not exits"));const f=r.storeManager.connect(d,()=>{this.forceUpdate()});u.push(f)}),this.storeListenDisposeList=u}componentDidMount(){var i;this.addMediaCSS(),r.onGetRef&&r.onGetRef(this.targetComponentRef,n,this),(i=r.onComponentMount)==null||i.call(r,this,n);const s=()=>{r.storeManager.setStore(n.value.nodeName||n.id,this.storeState),this.storeState.setState({...this.state,...n.value.state||{}}),this.rebuildNode()};n.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),(i=r.onComponentDestroy)==null||i.call(r,this,n)}render(){var i;const{$$context:s,...l}=this.props,c=n.value.nodeName||n.id,u={key:n.id,...n.props,...l},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:r.storeManager,getState:()=>r.storeManager.getStateObj(c),getStateObj:()=>r.storeManager.getStateObj(c),getStateObjById:N=>r.storeManager.getStateObj(N),stateManager:r.storeManager.getStateSnapshot(),getMethods:()=>r.variableManager.get(c).methods,getMethodsById:N=>r.variableManager.get(N).methods,getStaticVar:()=>r.variableManager.get(c).staticVar,getStaticVarById:N=>r.variableManager.get(N).staticVar};n.value.componentName===qr.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=r.getContext(d,s),p=r.transformProps({methods:n.value.methods},{$$context:f}).methods.reduce((N,T)=>(N[T.name]=T.define,N),{});f.methods=p,this.variableSpace.methods=Object.assign(this.variableSpace.methods,p);const h=n.value.loop;let m=[];if(h&&h.open){this.targetComponentRef.current=[];let N=h.data||[];if(Vn(h.data)){const T=h.data;N=fr(T.value,f||{})}return m=N.map((...T)=>{var k;const j=T[1],L=[h.forName||"item",h.forIndex||"index"],M=Md(T,L);let P="loopData";h.name&&(P=`${P}${h.name}`);const D=r.getContext({[P]:M},f),F=r.transformProps(u,{$$context:D}),ne=((k=n.value.classNames)==null?void 0:k.map(G=>{var te;const ie=G.name;return Vn(G.status)&&fr(String(((te=G.status)==null?void 0:te.value)||""),D)?ie:""}))||[];let Z=`${F.className??""} ${ne.join(" ")}`.trim();n.value.css&&(Z=`${n.value.css.class} ${Z}`.trim()),F.className=Z;const ue=r.transformProps(n.value.style,{$$context:D});n.value.style&&(F.style=Ad(ue||{}));const{children:A}=F;let I=[];if(A!==void 0)delete F.children,I=Array.isArray(A)?A:[A];else{const G=[];n.value.children.forEach((te,ie)=>{const de=r.buildComponent(te,{$$context:D,idx:ie});G.push(de)}),I=G}if(F.key=`${F.key}-${j}`,Vn(h.key)){const G=h.key,te=fr(G.value,D||{});F.key+=`-${te}`}return F.ref=G=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[j]=G},r.render(t,F,...I)}),m}const b=r.transformProps(u,{$$context:f}),{children:y}=b;let S=[];if(y!==void 0)delete b.children,S=Array.isArray(y)?y:[y];else{const N=[];n.value.children.forEach((T,k)=>{const j=r.buildComponent(T,{$$context:f,idx:k});N.push(j)}),S=N}b.ref=this.targetComponentRef;const E=((i=n.value.classNames)==null?void 0:i.map(N=>{var T;const k=N.name;return Vn(N.status)&&fr(((T=N.status)==null?void 0:T.value)||"",f)?k:""}))||[];let x=`${b.className??""} ${E.join(" ")}`.trim();n.value.css&&(x=`${n.value.css.class} ${x}`.trim()),b.className=x;const v=r.transformProps(n.value.style,{$$context:f});n.value.style&&(b.style=Ad(v||{}));let O=n.value.condition??!0;typeof O!="boolean"&&(O=fr(O.value,f||{}));let C={condition:O,props:b};r.processNodeConfigHook&&(C=r.processNodeConfigHook(C,n));const R=r.render(t,C.props,...S);return this._CONDITION=C.condition,C.condition?R:w("div",{style:{display:"none"},children:R})}}return J(o,"__CP_TYPE__",Ra),o.displayName=`${n.value.componentName}Dynamic`,o}buildComponent(t,{$$context:n={}}){const r=this.runtimeComponentCache;return typeof t=="string"?this.render(t):pE(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(r.get(a))i=r.get(a);else{const c=this.getComponent(o);i=this.convertModelToComponent(c,o)}!r.get(a)&&this.renderMode!=="design"&&r.set(a,i);const s=`${a}-${Ra}`,l={$$context:n,$$nodeModel:t,key:s};return this.render(i,l)})({currentNode:t}):void 0}render(t,n={},...r){return typeof t=="string"||typeof t=="number"?String(t):(eN.forEach(o=>{o in n&&t.__CP_TYPE__!==Ra&&delete n[o]}),g.createElement(t,n,...r))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}X0(new oN);const aN=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var iN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gg={exports:{}},ki={};/**
|
|
140
|
+
`,new Function(o)(...r,t,n)}catch(a){console.log(o),console.warn(a)}},Xg=(e,t)=>{const n={};return t.forEach((r,o)=>{n[r]=e[o]}),n},Yg=(e=[])=>{const t={};return e.forEach(({property:n,value:r})=>{let o=n.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((i,s)=>s!==0?zj(i):i)),t[a.join("")]=r}),t},dD=(e,t)=>{const n=[];return t.forEach(r=>{const o=r.exec(e);o!=null&&o.length&&n.push(o[1])}),n},hD=(e,t)=>{const n={};return t.forEach(r=>{e[r.name]&&(n[r.name]=e[r.name])}),n},pD=(e,t)=>hD(e,t),kc=e=>{var t;return((t=e.value.css)==null?void 0:t.class)||`c_${e.id}`},ds="DYNAMIC",gD=["$$context","$$nodeModel"],Jg=e=>{let t;const n=new Set,r=(i,s)=>{const l=typeof i=="function"?i(t):i;if(!Object.is(l,t)){const c=t;t=s??typeof l!="object"?l:Object.assign({},t,l),n.forEach(u=>u(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:i=>(n.add(i),()=>n.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."),n.clear()}};return t=e(r,o,a),a},vD=e=>e?Jg(e):Jg;class mD{constructor(){de(this,"storeMap",new Map)}addStore(t,n){const r=vD(n);return this.storeMap.set(t,r),r.name=t,r}setStore(t,n){this.storeMap.set(t,n)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}getState(t){var n;return(n=this.storeMap.get(t))==null?void 0:n.getState()}getStateObj(t){return{state:this.getState(t),updateState:n=>{this.setState(t,n)}}}setState(t,n){var r;return(r=this.storeMap.get(t))==null?void 0:r.setState(n)}connect(t,n){const r=this.storeMap.get(t);return r?r.subscribe(n):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((n,r)=>{t[r]=this.getStateObj(r)}),t}destroy(){this.storeMap=new Map}}class bD{constructor(){de(this,"varSpace",new Map)}get(t){return this.varSpace.get(t)}add(t,n){this.varSpace.set(t,n)}remove(t){this.varSpace.delete(t)}destroy(){this.varSpace.clear()}getStateSnapshot(){const t={};return this.varSpace.forEach((n,r)=>{t[r]=n}),t}}const Qg={};class yD{constructor(){de(this,"renderMode","normal"),de(this,"components",{}),de(this,"storeManager",new mD),de(this,"variableManager",new bD),de(this,"runtimeComponentCache",new Map),de(this,"onGetRef"),de(this,"onGetComponent"),de(this,"onComponentMount"),de(this,"onComponentDestroy"),de(this,"processNodeConfigHook")}getComponent(t){var n;const r=t.value.componentName;let o=this.components[r]||(()=>`Component [${r}] not found`);return cD(o)||(o=uD(o),this.components[r]=o),this.onGetComponent&&(o=(n=this.onGetComponent)==null?void 0:n.call(this,o,t)),o}getContext(t={},n){let r=t;return n&&(r={...t},r.__proto__=n||null),r}pageRender(t,{components:n,onGetRef:r,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:l,processNodeConfigHook:c}){this.renderMode=l,this.components=n,this.onGetRef=r,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=c;const u=t.value.componentsTree,f=this.getComponent(u),d=this.convertModelToComponent(f,t.value.componentsTree),h={},v=u.props;return Object.keys(v).forEach(g=>{h[g]=v[g].value}),h.$$context=o,this.render(d,h)}transformProps(t={},{$$context:n}){const r=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(Rc(i))return o(i.value);if(T6(i)){const s=i.value,l=s.value;if(!l)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const c=u=>{const f=`${u.id}-${ds}`;if(this.runtimeComponentCache.get(u.id))return{key:f,component:this.runtimeComponentCache.get(u.id)};const d=this.getComponent(u),h=this.convertModelToComponent(d,u),v=s.params||[];return{component:(...g)=>{const m=Xg(g,v),y=this.getContext({params:m},n);return this.render(h,{$$context:y,key:f})},key:f}};if(Array.isArray(l)){const u=l==null?void 0:l.map(f=>c(f));return(...f)=>u.map(d=>{if(lD(d.component)){const h=d.component;return b.createElement(h,{$$context:n,key:d.key})}else{const h=d.component;return h==null?void 0:h(...f)}})}else return c(l).component}else{if(Ar(i))return po(i.value,n||{});if(R6(i))return fD(i.value,n,this.storeManager);if(ea(i)){let s=i;Rc(i)&&(s=i.value);const l=s,c={};return Object.keys(s).forEach(u=>{c[u]=o(l[u])}),c}else return i}},a={};return Object.keys(r).forEach(i=>{const s=r[i];a[i]=o(s)}),a}collectSpecialProps(t={},n){const r=[],o=(a,i)=>{let s=i;Rc(i)&&(s=i.value),n(s)?r.push({keyPath:a,val:s}):Zo(s)?s.forEach((l,c)=>{o([...a,String(c)],l)}):ea(s)&&Object.keys(s).forEach(l=>{o([...a,l],s[l])})};return o(["$root"],t),r}convertModelToComponent(t,n){const r=this;class o extends b.Component{constructor(i){super(i),de(this,"_CONDITION",!0),de(this,"_DESIGN_BOX",!1),de(this,"_NODE_MODEL",n),de(this,"_NODE_ID",n.id),de(this,"UNIQUE_ID",`${n.id}_${ur()}`),de(this,"targetComponentRef"),de(this,"listenerHandle",[]),de(this,"storeState"),de(this,"storeListenDisposeList",[]),de(this,"domHeader"),de(this,"mediaStyleDomMap",{}),de(this,"variableSpace"),de(this,"nodeName"),de(this,"updateState",u=>{this.storeState.setState(u),this.forceUpdate()}),de(this,"getStyleDomById",u=>{const f=this.mediaStyleDomMap;let d=f[u];return d||(d=document.createElement("style"),f[u]=d),d.id=u,d}),de(this,"addMediaCSS",()=>{var u;let f=this.domHeader;if(f||(f=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=f),!this.domHeader)return;const d=this._NODE_MODEL.value.css;d&&d.value.forEach(h=>{var v;const g=`${this.UNIQUE_ID}_${h.state}`;let m=kc(this._NODE_MODEL);if(h.state!=="normal"&&(m=`${m}:${h.state}`),h.text){const y=this.getStyleDomById(g);y.innerText=`.${m} { ${h.text} }`,f==null||f.appendChild(y)}(v=h.media)!=null&&v.length&&h.media.forEach(y=>{const w=`${g}_${y.type}_${y.value}`,_=this.getStyleDomById(w);_.media=`screen and (${y.type}:${y.value}px)`,_.innerHTML=`.${m} { ${y.text} }`,f==null||f.appendChild(_)})})}),de(this,"removeMediaCSS",()=>{const u=this.mediaStyleDomMap;Object.keys(u).forEach(f=>{var d;(d=this.domHeader)==null||d.removeChild(u[f])}),this.mediaStyleDomMap={}}),de(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(u=>u()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=b.createRef(),this.state=n.value.state||{};const s=n.value.nodeName||n.id;this.nodeName=s;const l=r.storeManager.getStore(s);l?(this.storeState=l,l.setState({...n.value.state||{}})):this.storeState=r.storeManager.addStore(s,()=>({...n.value.state||{}})),this.storeState.subscribe(u=>{this.setState({...u})}),this.connectStore();const c=r.variableManager.get(s);c?this.variableSpace=c:(this.variableSpace={staticVar:{},methods:{}},r.variableManager.add(s,this.variableSpace))}connectStore(){const i=r.collectSpecialProps(n.props,f=>!!Ar(f)),s=r.collectSpecialProps({css:n.value.css,class:n.value.classNames},f=>!!Ar(f));let l=[];[...i,...s].map(f=>{const d=f.val,h=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],v=dD(d.value,h);l=[...l,...v]}).filter(Boolean);const c=Array.from(new Set(l)),u=[];c.length&&c.forEach(f=>{r.storeManager.getStore(f)||(r.storeManager.addStore(f,()=>({})),console.warn(r.storeManager,f,"not exits"));const d=r.storeManager.connect(f,()=>{this.forceUpdate()});u.push(d)}),this.storeListenDisposeList=u}componentDidMount(){var i;this.addMediaCSS(),r.onGetRef&&r.onGetRef(this.targetComponentRef,n,this),(i=r.onComponentMount)==null||i.call(r,this,n);const s=()=>{r.storeManager.setStore(n.value.nodeName||n.id,this.storeState),this.storeState.setState({...this.state,...n.value.state||{}}),this.rebuildNode()};n.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),(i=r.onComponentDestroy)==null||i.call(r,this,n)}render(){var i;console.log("rerender",this.nodeName);const{$$context:s,...l}=this.props,c=n.value.nodeName||n.id,u={key:n.id,...n.props,...l},f={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:r.storeManager,getState:()=>r.storeManager.getStateObj(c),getStateObj:()=>r.storeManager.getStateObj(c),getStateObjById:P=>r.storeManager.getStateObj(P),stateManager:r.storeManager.getStateSnapshot(),getMethods:()=>r.variableManager.get(c).methods,getMethodsById:P=>r.variableManager.get(P).methods,getStaticVar:()=>r.variableManager.get(c).staticVar,getStaticVarById:P=>r.variableManager.get(P).staticVar};n.value.componentName===da.ROOT_CONTAINER&&(f.globalState=this.state,f.updateGlobalState=this.updateState);const d=r.getContext(f,s),h=r.transformProps({methods:n.value.methods},{$$context:d}).methods.reduce((P,j)=>(P[j.name]=j.define,P),{});d.methods=h,this.variableSpace.methods=Object.assign(this.variableSpace.methods,h);const v=n.value.loop;let g=[];if(v&&v.open){this.targetComponentRef.current=[];let P=v.data||[];if(Ar(v.data)){const j=v.data;P=po(j.value,d||{})}return g=P.map((...j)=>{var L;const F=j[1],W=[v.forName||"item",v.forIndex||"index"],B=Xg(j,W);let G="loopData";v.name&&(G=`${G}${v.name}`);const ne=r.getContext({[G]:B},d),fe=r.transformProps(u,{$$context:ne}),D=((L=n.value.classNames)==null?void 0:L.map(H=>{var Y;const J=H.name;return Ar(H.status)&&po(String(((Y=H.status)==null?void 0:Y.value)||""),ne)?J:""}))||[];let R=`${fe.className??""} ${D.join(" ")}`.trim();n.value.css&&(R=`${kc(n)} ${R}`.trim()),fe.className=R;const T=r.transformProps({style:n.value.style},{$$context:ne});n.value.style&&(fe.style=Yg(T.style||[]));const{children:N}=fe;let I=[];if(N!==void 0)delete fe.children,I=Array.isArray(N)?N:[N];else{const H=[];n.value.children.forEach((Y,J)=>{const re=r.buildComponent(Y,{$$context:ne,idx:J});H.push(re)}),I=H}if(fe.key=`${fe.key}-${F}`,Ar(v.key)){const H=v.key,Y=po(H.value,ne||{});fe.key+=`-${Y}`}return fe.ref=H=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[F]=H},r.render(t,fe,...I)}),g}const m=r.transformProps(u,{$$context:d}),{children:y}=m;let w=[];const _=Qg[n.id];if(_)w=_;else{if(y!==void 0)delete m.children,w=Array.isArray(y)?y:[y];else{const P=[];n.value.children.forEach((j,L)=>{const F=r.buildComponent(j,{$$context:d,idx:L});P.push(F)}),w=P}Qg[n.id]=w}m.ref=this.targetComponentRef;const S=((i=n.value.classNames)==null?void 0:i.map(P=>{var j;const L=P.name;return Ar(P.status)&&po(((j=P.status)==null?void 0:j.value)||"",d)?L:""}))||[];let x=`${m.className??""} ${S.join(" ")}`.trim();n.value.css&&(x=`${kc(n)} ${x}`.trim()),m.className=x;const C=r.transformProps({style:n.value.style},{$$context:d});n.value.style&&(m.style=Yg(C.style||[]));let O=n.value.condition??!0;typeof O!="boolean"&&(O=po(O.value,d||{}));let $={condition:O,props:m};r.processNodeConfigHook&&($=r.processNodeConfigHook($,n));const k=r.render(t,$.props,...w);return this._CONDITION=$.condition,$.condition?k:p("div",{style:{display:"none"},children:k})}}return de(o,"__CP_TYPE__",ds),o.displayName=`${n.value.componentName}Dynamic`,o}buildComponent(t,{$$context:n={}}){const r=this.runtimeComponentCache;return typeof t=="string"?this.render(t):$6(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(r.get(a)){const c=r.get(a);i=c==null?void 0:c.component}else{const c=this.getComponent(o);i=this.convertModelToComponent(c,o),!r.get(a)&&this.renderMode!=="design"&&r.set(a,{component:i})}const s=`${a}-${ds}`,l={$$context:n,$$nodeModel:t,key:s};return this.render(i,l)})({currentNode:t}):void 0}render(t,n={},...r){return typeof t=="string"||typeof t=="number"?String(t):(gD.forEach(o=>{o in n&&t.__CP_TYPE__!==ds&&delete n[o]}),b.createElement(t,n,...r))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}fP(new yD);const xD=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var wD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ax={exports:{}},Hl={};/**
|
|
106
141
|
* @license React
|
|
107
142
|
* react-jsx-runtime.production.min.js
|
|
108
143
|
*
|
|
@@ -110,23 +145,23 @@ return $$_run_$$();
|
|
|
110
145
|
*
|
|
111
146
|
* This source code is licensed under the MIT license found in the
|
|
112
147
|
* LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/var sN=g,lN=Symbol.for("react.element"),cN=Symbol.for("react.fragment"),uN=Object.prototype.hasOwnProperty,dN=sN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fN={key:!0,ref:!0,__self:!0,__source:!0};function Kg(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)uN.call(t,r)&&!fN.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:lN,type:e,key:a,ref:i,props:o,_owner:dN.current}}ki.Fragment=cN;ki.jsx=Kg;ki.jsxs=Kg;Gg.exports=ki;var pN=Gg.exports;const hN=pN.jsx,wn=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},gN=[...aN,...QO],vN=gN.reduce((e,t)=>(e[t]=({children:n,$$attributes:r=[],...o})=>{let a=n;return Array.isArray(n)||(a=[n]),g.createElement(t,{...o,...wn(r)},...a)},e),{}),mN=({children:e,width:t,height:n,$$attributes:r=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(c=>c!==void 0);const{style:i={},...s}=wn(r),l={height:n,width:t,...i,...o.style||{}};return React.createElement("div",{...o,...s,style:l},...a)},yN=({afterMount:e,beforeDestroy:t,$$attributes:n=[],...r})=>(g.useEffect(()=>(e==null||e(r),()=>{t==null||t(r)}),[]),w("canvas",{...r,...wn(n)})),bN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("img",{...n,...wn(t)},...r)},wN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("video",{...n,...wn(t)},...r)},SN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("audio",{...n,...wn(t)},...r)},xN=({$$attributes:e=[],content:t,...n})=>w("span",{...n,...wn(e),children:t}),CN=({children:e,$$attributes:t=[],afterMount:n,beforeDestroy:r,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),g.useEffect(()=>(n==null||n(o),()=>{r==null||r(o)}),[]),hN("div",{...o,...wn(t),children:a})},ON=({children:e,$$attributes:t=[],htmlTag:n="div",...r})=>{let o=e;Array.isArray(e)||(o=[e]);const{style:a={},...i}=wn(t),s={...a,...r.style||{}};return g.createElement(n,{...r,...i,style:s},...o)},EN={RootContainer:({children:e})=>e,...vN,CContainer:CN,CVideo:wN,CAudio:SN,CBlock:mN,CImage:bN,CText:xN,CCanvas:yN,CNativeTag:ON};class _N{constructor(){J(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,n){this.refMap.set(t,n)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class RN extends g.Component{constructor(t){super(t),J(this,"refManager"),J(this,"dynamicComponentInstanceMap",new Map),J(this,"onGetRef",(n,r,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,n,r,o),this.dynamicComponentInstanceMap.set(r.id,o),this.refManager.add(r.value.refId||r.id,n)}),J(this,"rerender",n=>{if(this.props.adapter.clear(),(n==null?void 0:n.nodeType)==="PAGE"&&n)this.setState({pageModel:n});else if($r(n)&&bg(n)){const r=n;this.setState({pageModel:new ai(r,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new ai(t.page)},this.refManager=new _N}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:n,onGetComponent:r,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...EN,...t.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:r,onComponentMount:a,onComponentDestroy:o,$$context:l,renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}class NN extends g.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,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,n)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const r=ee("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,ee("p",{children:["msg: ",String(this.state.error)]}),w("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"}),w("div",{style:{display:"none"}})]});return g.createElement(this.props.targetComponent,{onlyRenderChild:!0},r)}return this.props.children}}class TN{constructor(){J(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,n){const r=this.instanceMap.get(t);r?r.push(n):this.instanceMap.set(t,[n])}remove(t,n){const r=this.instanceMap.get(t);if(n!==void 0&&Array.isArray(r)){const o=r.filter(a=>a!==n);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const PN=e=>{const{node:t}=e,n=g.useMemo(()=>{const s=t.isContainer();return $r(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:r,height:o,width:a,style:i}=n;return w("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:r})};class Y5 extends g.Component{constructor(t){super(t),J(this,"instanceManager",new TN),J(this,"renderRef"),J(this,"dropPlaceholder",PN),J(this,"onGetComponent",(n,r)=>{var o,a;const i=this;let s=n;const l=(a=(o=r.material)==null?void 0:o.value.advanceCustom)==null?void 0:a.wrapComponent;l&&(s=l(n,{node:r,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class c extends g.Component{constructor(){super(...arguments),J(this,"_DESIGN_BOX",!0),J(this,"_NODE_MODEL",r),J(this,"_NODE_ID",r.id),J(this,"_UNIQUE_ID",`${r.id}_${yn()}`),J(this,"_STATUS")}componentDidMount(){i.instanceManager.add(r.id,this)}componentWillUnmount(){this._STATUS="DESTROY",i.instanceManager.remove(r.id,this)}render(){const{children:d=[],onlyRenderChild:f,...p}=this.props;let h=d;return Dr(d)||(h=[d]),!h.filter(Boolean).length&&(r.isContainer()||r.value.componentName===qr.ROOT_CONTAINER)&&h.push(g.createElement(i.dropPlaceholder,{node:r})),f?h:g.createElement(s,p,...h)}}return g.forwardRef(function(u,d){return w(NN,{node:r,targetComponent:c,children:g.createElement(c,{ref:d,...u})})})}),this.renderRef=g.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,n;(n=(t=this.props).onMount)==null||n.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(t)}getInstancesById(t,n){let r=[...this.instanceManager.get(t)||[]];return n!==void 0&&(r=r.filter(o=>n===(o==null?void 0:o._UNIQUE_ID))),r}getInstanceByDom(t){const n=qg(t);if(!n)return null;const r=Yg(n);return(r==null?void 0:r.stateNode)||null}getDomsById(t,n){const r=this.getInstancesById(t),o=[];return r==null||r.forEach(a=>{var i;if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=Wy.findDOMNode(a);if(s&&!(s instanceof Text))if(n){const l=Array.from(((i=s.querySelectorAll)==null?void 0:i.call(s,n))||[]);o.push(...l)}else o.push(s)}),o}getDomRectById(t,n){return this.getDomsById(t,n).map(r=>r==null?void 0:r.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:n}=this,{render:r,...o}=t;return r&&(r.ref.current=this),w(RN,{onGetComponent:n,...o,processNodeConfigHook:(a,i)=>{var s,l;if(i.nodeType!=="NODE")return a;const{props:c,condition:u}=a;let d={...c};const f=((s=i.value.configure)==null?void 0:s.devState)||{},p=(l=i.material)==null?void 0:l.value.fixedProps;if(p!==void 0){if($r(p))d={...d,...p};else if(typeof p=="function"){const m=p(d);d={...d,...m}}}let h=u;return f.condition===!1&&(h=f.condition),{props:G2(d,f.props||{}),condition:h}},ref:this.renderRef})}}const qg=e=>{if(!e)return null;const t=Object.keys(e).find(n=>n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber$"))||"";return t?e[t]:qg(e.parentElement)},Yg=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Yg(e.return):null};var kN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(iN,function(){var n=function(){},r={},o={},a={};function i(f,p){f=f.push?f:[f];var h=[],m=f.length,b=m,y,S,E,x;for(y=function(v,O){O.length&&h.push(v),b--,b||p(h)};m--;){if(S=f[m],E=o[S],E){y(S,E);continue}x=a[S]=a[S]||[],x.push(y)}}function s(f,p){if(f){var h=a[f];if(o[f]=p,!!h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function l(f,p){f.call&&(f={success:f}),p.length?(f.error||n)(p):(f.success||n)(f)}function c(f,p,h,m){var b=document,y=h.async,S=(h.numRetries||0)+1,E=h.before||n,x=f.replace(/[\?|#].*$/,""),v=f.replace(/^(css|img|module|nomodule)!/,""),O,C,R;if(m=m||0,/(^css!|\.css$)/.test(x))R=b.createElement("link"),R.rel="stylesheet",R.href=v,O="hideFocus"in R,O&&R.relList&&(O=0,R.rel="preload",R.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(x))R=b.createElement("img"),R.src=v;else if(R=b.createElement("script"),R.src=v,R.async=y===void 0?!0:y,C="noModule"in R,/^module!/.test(x)){if(!C)return p(f,"l");R.type="module"}else if(/^nomodule!/.test(x)&&C)return p(f,"l");R.onload=R.onerror=R.onbeforeload=function(N){var T=N.type[0];if(O)try{R.sheet.cssText.length||(T="e")}catch(k){k.code!=18&&(T="e")}if(T=="e"){if(m+=1,m<S)return c(f,p,h,m)}else if(R.rel=="preload"&&R.as=="style")return R.rel="stylesheet";p(f,T,N.defaultPrevented)},E(f,R)!==!1&&b.head.appendChild(R)}function u(f,p,h){f=f.push?f:[f];var m=f.length,b=m,y=[],S,E;for(S=function(x,v,O){if(v=="e"&&y.push(x),v=="b")if(O)y.push(x);else return;m--,m||p(y)},E=0;E<b;E++)c(f[E],S,h)}function d(f,p,h){var m,b;if(p&&p.trim&&(m=p),b=(m?h:p)||{},m){if(m in r)throw"LoadJS";r[m]=!0}function y(S,E){u(f,function(x){l(b,x),S&&l({success:S,error:E},x),s(m,x)},b)}if(b.returnPromise)return new Promise(y);y()}return d.ready=function(f,p){return i(f,function(h){l(p,h)}),d},d.done=function(f){s(f,[])},d.reset=function(){r={},o={},a={}},d.isDefined=function(f){return f in r},d})})(kN);const Xg=async({iframe:e})=>{const t=e.getWindow();t&&(t.React=window.React,t.ReactDOM=window.ReactDOM,t.ReactDOMClient=window.ReactDOMClient)},Jg=e=>async({iframe:n,assets:r,page:o,pageModel:a,ready:i,renderJSUrl:s})=>{await n.injectJS(s||"");const l=n.getWindow(),c=n.getDocument(),u=l.React,d=l.ReactDOMClient,f=l.CRender,p=o||(a==null?void 0:a.export());if(!p){console.log("page schema is empty");return}const h=[...r,...p.assets||[]];new f.AssetLoader(h,{window:n.getWindow()}).onSuccess(()=>{const b=Xn.collectVariable(h,l),y=Xn.flatObject(b),S=Z2(b,p.thirdLibs||[]),E=u==null?void 0:u.createElement(f.DesignRender,{adapter:f==null?void 0:f.ReactAdapter,page:o,pageModel:a,components:{...y,...e},$$context:{thirdLibs:S},onMount:x=>{i(x)}});d.createRoot(c.getElementById("app")).render(E)}).onError(()=>{console.log("资源加载出错")}).load()};var Qg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(So,function(){function n(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function r(x,v){for(var O=0;O<v.length;O++){var C=v[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(x,C.key,C)}}function o(x,v,O){return v&&r(x.prototype,v),O&&r(x,O),x}function a(x,v,O){return v in x?Object.defineProperty(x,v,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[v]=O,x}function i(x,v){var O=Object.keys(x);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(x);v&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(x,R).enumerable})),O.push.apply(O,C)}return O}function s(x){for(var v=1;v<arguments.length;v++){var O=arguments[v]!=null?arguments[v]:{};v%2?i(Object(O),!0).forEach(function(C){a(x,C,O[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(O)):i(Object(O)).forEach(function(C){Object.defineProperty(x,C,Object.getOwnPropertyDescriptor(O,C))})}return x}function l(x){return function(v){if(Array.isArray(v))return u(v)}(x)||function(v){if(typeof Symbol<"u"&&Symbol.iterator in Object(v))return Array.from(v)}(x)||c(x)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
114
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(x
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var
|
|
116
|
-
`)),
|
|
117
|
-
`+
|
|
118
|
-
`)),delete
|
|
119
|
-
background: `.concat(
|
|
148
|
+
*/var SD=b,CD=Symbol.for("react.element"),_D=Symbol.for("react.fragment"),OD=Object.prototype.hasOwnProperty,ED=SD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,RD={key:!0,ref:!0,__self:!0,__source:!0};function ix(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)OD.call(t,r)&&!RD.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:CD,type:e,key:a,ref:i,props:o,_owner:ED.current}}Hl.Fragment=_D;Hl.jsx=ix;Hl.jsxs=ix;ax.exports=Hl;var $D=ax.exports;const TD=$D.jsx,dr=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},PD=[...xD,...h6],kD=PD.reduce((e,t)=>(e[t]=({children:n,$$attributes:r=[],...o})=>{let a=n;return Array.isArray(n)||(a=[n]),b.createElement(t,{...o,...dr(r)},...a)},e),{}),ND=({children:e,width:t,height:n,$$attributes:r=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(c=>c!==void 0);const{style:i={},...s}=dr(r),l={height:n,width:t,...i,...o.style||{}};return React.createElement("div",{...o,...s,style:l},...a)},AD=({afterMount:e,beforeDestroy:t,$$attributes:n=[],...r})=>(b.useEffect(()=>(e==null||e(r),()=>{t==null||t(r)}),[]),p("canvas",{...r,...dr(n)})),MD=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("img",{...n,...dr(t)},...r)},jD=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("video",{...n,...dr(t)},...r)},DD=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("audio",{...n,...dr(t)},...r)},ID=({$$attributes:e=[],content:t,...n})=>p("span",{...n,...dr(e),children:t}),LD=({children:e,$$attributes:t=[],afterMount:n,beforeDestroy:r,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),b.useEffect(()=>(n==null||n(o),()=>{r==null||r(o)}),[]),TD("div",{...o,...dr(t),children:a})},BD=({children:e,$$attributes:t=[],htmlTag:n="div",...r})=>{let o=e;Array.isArray(e)||(o=[e]);const{style:a={},...i}=dr(t),s={...a,...r.style||{}};return b.createElement(n,{...r,...i,style:s},...o)},FD={RootContainer:({children:e})=>e,...kD,CContainer:LD,CVideo:jD,CAudio:DD,CBlock:ND,CImage:MD,CText:ID,CCanvas:AD,CNativeTag:BD};class zD{constructor(){de(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,n){this.refMap.set(t,n)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class HD extends b.Component{constructor(t){super(t),de(this,"refManager"),de(this,"dynamicComponentInstanceMap",new Map),de(this,"onGetRef",(n,r,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,n,r,o),this.dynamicComponentInstanceMap.set(r.id,o),this.refManager.add(r.value.refId||r.id,n)}),de(this,"rerender",n=>{if(this.props.adapter.clear(),(n==null?void 0:n.nodeType)==="PAGE"&&n)this.setState({pageModel:n});else if(ea(n)&&N1(n)){const r=n;this.setState({pageModel:new ol(r,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new ol(t.page)},this.refManager=new zD}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:n,onGetComponent:r,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...FD,...t.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:r,onComponentMount:a,onComponentDestroy:o,$$context:l,renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}class VD extends b.Component{constructor(t){super(t),de(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,n)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const r=M("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,M("p",{children:["msg: ",String(this.state.error)]}),p("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"}),p("div",{style:{display:"none"}})]});return b.createElement(this.props.targetComponent,{onlyRenderChild:!0},r)}return this.props.children}}class UD{constructor(){de(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,n){const r=this.instanceMap.get(t);r?r.push(n):this.instanceMap.set(t,[n])}remove(t,n){const r=this.instanceMap.get(t);if(n!==void 0&&Array.isArray(r)){const o=r.filter(a=>a!==n);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const WD=e=>{const{node:t}=e,n=b.useMemo(()=>{const s=t.isContainer();return ea(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:r,height:o,width:a,style:i}=n;return p("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",width:a,height:o,...i},children:r})};class eie extends b.Component{constructor(t){super(t),de(this,"instanceManager",new UD),de(this,"renderRef"),de(this,"dropPlaceholder",WD),de(this,"onGetComponent",(n,r)=>{var o,a;const i=this;let s=n;const l=(a=(o=r.material)==null?void 0:o.value.advanceCustom)==null?void 0:a.wrapComponent;l&&(s=l(n,{node:r,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class c extends b.Component{constructor(){super(...arguments),de(this,"_DESIGN_BOX",!0),de(this,"_NODE_MODEL",r),de(this,"_NODE_ID",r.id),de(this,"_UNIQUE_ID",`${r.id}_${ur()}`),de(this,"_STATUS")}componentDidMount(){i.instanceManager.add(r.id,this)}componentWillUnmount(){this._STATUS="DESTROY",i.instanceManager.remove(r.id,this)}render(){var f,d;const{children:h=[],onlyRenderChild:v,...g}=this.props;let m=h;if(Zo(h)||(m=[h]),!m.filter(Boolean).length&&(r.isContainer()||r.value.componentName===da.ROOT_CONTAINER)){const y=(d=(f=r.material)==null?void 0:f.value.advanceCustom)==null?void 0:d.dropPlaceholder;m.push(React.createElement(y||i.dropPlaceholder,{node:r}))}return v?m:b.createElement(s,g,...m)}}return b.forwardRef(function(u,f){return p(VD,{node:r,targetComponent:c,children:b.createElement(c,{ref:f,...u})})})}),this.renderRef=b.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,n;(n=(t=this.props).onMount)==null||n.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(t)}getInstancesById(t,n){let r=[...this.instanceManager.get(t)||[]];return n!==void 0&&(r=r.filter(o=>n===(o==null?void 0:o._UNIQUE_ID))),r}getInstanceByDom(t){const n=sx(t);if(!n)return null;const r=lx(n);return(r==null?void 0:r.stateNode)||null}getDomsById(t,n){const r=this.getInstancesById(t),o=[];return r==null||r.forEach(a=>{var i;if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=y2.findDOMNode(a);if(s&&!(s instanceof Text))if(n){const l=Array.from(((i=s.querySelectorAll)==null?void 0:i.call(s,n))||[]);o.push(...l)}else o.push(s)}),o}getDomRectById(t,n){return this.getDomsById(t,n).map(r=>r==null?void 0:r.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:n}=this,{render:r,...o}=t;return r&&(r.ref.current=this),p(HD,{onGetComponent:n,...o,processNodeConfigHook:(a,i)=>{var s,l;if(i.nodeType!=="NODE")return a;const{props:c,condition:u}=a;let f={...c};const d=((s=i.value.configure)==null?void 0:s.devState)||{},h=(l=i.material)==null?void 0:l.value.fixedProps;if(h!==void 0){if(ea(h))f={...f,...h};else if(typeof h=="function"){const g=h(f);f={...f,...g}}}let v=u;return d.condition===!1&&(v=d.condition),{props:sD(f,d.props||{}),condition:v}},ref:this.renderRef})}}const sx=e=>{if(!e)return null;const t=Object.keys(e).find(n=>n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber$"))||"";return t?e[t]:sx(e.parentElement)},lx=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:lx(e.return):null};var GD={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(wD,function(){var n=function(){},r={},o={},a={};function i(d,h){d=d.push?d:[d];var v=[],g=d.length,m=g,y,w,_,S;for(y=function(x,C){C.length&&v.push(x),m--,m||h(v)};g--;){if(w=d[g],_=o[w],_){y(w,_);continue}S=a[w]=a[w]||[],S.push(y)}}function s(d,h){if(d){var v=a[d];if(o[d]=h,!!v)for(;v.length;)v[0](d,h),v.splice(0,1)}}function l(d,h){d.call&&(d={success:d}),h.length?(d.error||n)(h):(d.success||n)(d)}function c(d,h,v,g){var m=document,y=v.async,w=(v.numRetries||0)+1,_=v.before||n,S=d.replace(/[\?|#].*$/,""),x=d.replace(/^(css|img|module|nomodule)!/,""),C,O,$;if(g=g||0,/(^css!|\.css$)/.test(S))$=m.createElement("link"),$.rel="stylesheet",$.href=x,C="hideFocus"in $,C&&$.relList&&(C=0,$.rel="preload",$.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(S))$=m.createElement("img"),$.src=x;else if($=m.createElement("script"),$.src=x,$.async=y===void 0?!0:y,O="noModule"in $,/^module!/.test(S)){if(!O)return h(d,"l");$.type="module"}else if(/^nomodule!/.test(S)&&O)return h(d,"l");$.onload=$.onerror=$.onbeforeload=function(k){var P=k.type[0];if(C)try{$.sheet.cssText.length||(P="e")}catch(j){j.code!=18&&(P="e")}if(P=="e"){if(g+=1,g<w)return c(d,h,v,g)}else if($.rel=="preload"&&$.as=="style")return $.rel="stylesheet";h(d,P,k.defaultPrevented)},_(d,$)!==!1&&m.head.appendChild($)}function u(d,h,v){d=d.push?d:[d];var g=d.length,m=g,y=[],w,_;for(w=function(S,x,C){if(x=="e"&&y.push(S),x=="b")if(C)y.push(S);else return;g--,g||h(y)},_=0;_<m;_++)c(d[_],w,v)}function f(d,h,v){var g,m;if(h&&h.trim&&(g=h),m=(g?v:h)||{},g){if(g in r)throw"LoadJS";r[g]=!0}function y(w,_){u(d,function(S){l(m,S),w&&l({success:w,error:_},S),s(g,S)},m)}if(m.returnPromise)return new Promise(y);y()}return f.ready=function(d,h){return i(d,function(v){l(h,v)}),f},f.done=function(d){s(d,[])},f.reset=function(){r={},o={},a={}},f.isDefined=function(d){return d in r},f})})(GD);const cx=async({iframe:e})=>{const t=e.getWindow();t&&(t.React=window.React,t.ReactDOM=window.ReactDOM,t.ReactDOMClient=window.ReactDOMClient)},ux=e=>async({iframe:n,assets:r,page:o,pageModel:a,ready:i,renderJSUrl:s})=>{await n.injectJS(s||"");const l=n.getWindow(),c=n.getDocument(),u=l.React,f=l.ReactDOMClient,d=l.CRender,h=o||(a==null?void 0:a.export());if(!h){console.log("page schema is empty");return}const v=[...r,...h.assets||[]];new d.AssetLoader(v,{window:n.getWindow()}).onSuccess(()=>{const m=Mn.collectVariable(v,l),y=Mn.flatObject(m),w=pD(m,h.thirdLibs||[]),_=u==null?void 0:u.createElement(d.DesignRender,{adapter:d==null?void 0:d.ReactAdapter,page:o,pageModel:a,components:{...y,...e},$$context:{thirdLibs:w},onMount:S=>{i(S)}});f.createRoot(c.getElementById("app")).render(_)}).onError(()=>{console.log("资源加载出错")}).load()};var fx={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Wa,function(){function n(S,x){if(!(S instanceof x))throw new TypeError("Cannot call a class as a function")}function r(S,x){for(var C=0;C<x.length;C++){var O=x[C];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(S,O.key,O)}}function o(S,x,C){return x&&r(S.prototype,x),C&&r(S,C),S}function a(S,x,C){return x in S?Object.defineProperty(S,x,{value:C,enumerable:!0,configurable:!0,writable:!0}):S[x]=C,S}function i(S,x){var C=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);x&&(O=O.filter(function($){return Object.getOwnPropertyDescriptor(S,$).enumerable})),C.push.apply(C,O)}return C}function s(S){for(var x=1;x<arguments.length;x++){var C=arguments[x]!=null?arguments[x]:{};x%2?i(Object(C),!0).forEach(function(O){a(S,O,C[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(C)):i(Object(C)).forEach(function(O){Object.defineProperty(S,O,Object.getOwnPropertyDescriptor(C,O))})}return S}function l(S){return function(x){if(Array.isArray(x))return u(x)}(S)||function(x){if(typeof Symbol<"u"&&Symbol.iterator in Object(x))return Array.from(x)}(S)||c(S)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
149
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(S,x){if(S){if(typeof S=="string")return u(S,x);var C=Object.prototype.toString.call(S).slice(8,-1);return C==="Object"&&S.constructor&&(C=S.constructor.name),C==="Map"||C==="Set"?Array.from(S):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?u(S,x):void 0}}function u(S,x){(x==null||x>S.length)&&(x=S.length);for(var C=0,O=new Array(x);C<x;C++)O[C]=S[C];return O}function f(S){if(typeof Symbol>"u"||S[Symbol.iterator]==null){if(Array.isArray(S)||(S=c(S))){var x=0,C=function(){};return{s:C,n:function(){return x>=S.length?{done:!0}:{done:!1,value:S[x++]}},e:function(j){throw j},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
150
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var O,$,k=!0,P=!1;return{s:function(){O=S[Symbol.iterator]()},n:function(){var j=O.next();return k=j.done,j},e:function(j){P=!0,$=j},f:function(){try{k||O.return==null||O.return()}finally{if(P)throw $}}}}var d={};d[d.Fatal=0]="Fatal",d[d.Error=0]="Error",d[d.Warn=1]="Warn",d[d.Log=2]="Log",d[d.Info=3]="Info",d[d.Success=3]="Success",d[d.Debug=4]="Debug",d[d.Trace=5]="Trace",d[d.Silent=-1/0]="Silent",d[d.Verbose=1/0]="Verbose";var h={silent:{level:-1},fatal:{level:d.Fatal},error:{level:d.Error},warn:{level:d.Warn},log:{level:d.Log},info:{level:d.Info},success:{level:d.Success},debug:{level:d.Debug},trace:{level:d.Trace},verbose:{level:d.Trace},ready:{level:d.Info},start:{level:d.Info}};function v(S){return x=S,Object.prototype.toString.call(x)==="[object Object]"&&!(!S.message&&!S.args)&&!S.stack;var x}var g=!1,m=[],y=function(){function S(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var C in n(this,S),this._reporters=x.reporters||[],this._types=x.types||h,this.level=x.level!==void 0?x.level:3,this._defaults=x.defaults||{},this._async=x.async!==void 0?x.async:void 0,this._stdout=x.stdout,this._stderr=x.stderr,this._mockFn=x.mockFn,this._throttle=x.throttle||1e3,this._throttleMin=x.throttleMin||5,this._types){var O=s(s({type:C},this._types[C]),this._defaults);this[C]=this._wrapLogFn(O),this[C].raw=this._wrapLogFn(O,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return o(S,[{key:"create",value:function(x){return new S(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},x))}},{key:"withDefaults",value:function(x){return this.create({defaults:Object.assign({},this._defaults,x)})}},{key:"withTag",value:function(x){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+x:x})}},{key:"addReporter",value:function(x){return this._reporters.push(x),this}},{key:"removeReporter",value:function(x){if(x){var C=this._reporters.indexOf(x);if(C>=0)return this._reporters.splice(C,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(x){return this._reporters=Array.isArray(x)?x:[x],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var x in this._types)console["__"+x]||(console["__"+x]=console[x]),console[x]=this[x].raw}},{key:"restoreConsole",value:function(){for(var x in this._types)console["__"+x]&&(console[x]=console["__"+x],delete console["__"+x])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(x,C){var O=this;x&&(x.__write||(x.__write=x.write),x.write=function($){O[C].raw(String($).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(x){x&&x.__write&&(x.write=x.__write,delete x.__write)}},{key:"pauseLogs",value:function(){g=!0}},{key:"resumeLogs",value:function(){g=!1;var x,C=f(m.splice(0));try{for(C.s();!(x=C.n()).done;){var O=x.value;O[0]._logFn(O[1],O[2])}}catch($){C.e($)}finally{C.f()}}},{key:"mockTypes",value:function(x){if(this._mockFn=x||this._mockFn,typeof this._mockFn=="function")for(var C in this._types)this[C]=this._mockFn(C,this._types[C])||this[C],this[C].raw=this[C]}},{key:"_wrapLogFn",value:function(x,C){var O=this;return function(){for(var $=arguments.length,k=new Array($),P=0;P<$;P++)k[P]=arguments[P];if(!g)return O._logFn(x,k,C);m.push([O,x,k,C])}}},{key:"_logFn",value:function(x,C,O){var $=this;if(x.level>this.level)return!!this._async&&Promise.resolve(!1);var k=Object.assign({date:new Date,args:[]},x);!O&&C.length===1&&v(C[0])?Object.assign(k,C[0]):k.args=Array.from(C),k.message&&(k.args.unshift(k.message),delete k.message),k.additional&&(Array.isArray(k.additional)||(k.additional=k.additional.split(`
|
|
151
|
+
`)),k.args.push(`
|
|
152
|
+
`+k.additional.join(`
|
|
153
|
+
`)),delete k.additional),k.type=typeof k.type=="string"?k.type.toLowerCase():"",k.tag=typeof k.tag=="string"?k.tag.toLowerCase():"";var P=function(){var W=arguments.length>0&&arguments[0]!==void 0&&arguments[0],B=$._lastLogCount-$._throttleMin;if($._lastLog&&B>0){var G=l($._lastLog.args);B>1&&G.push("(repeated ".concat(B," times)")),$._log(s(s({},$._lastLog),{},{args:G})),$._lastLogCount=1}if(W){if($._lastLog=k,$._async)return $._logAsync(k);$._log(k)}};clearTimeout(this._throttleTimeout);var j=this._lastLogTime?k.date-this._lastLogTime:0;if(this._lastLogTime=k.date,j<this._throttle)try{var L=JSON.stringify([k.type,k.tag,k.args]),F=this._lastLogSerialized===L;if(this._lastLogSerialized=L,F&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(P,this._throttle))}catch{}P(!0)}},{key:"_log",value:function(x){var C,O=f(this._reporters);try{for(O.s();!(C=O.n()).done;)C.value.log(x,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch($){O.e($)}finally{O.f()}}},{key:"_logAsync",value:function(x){var C=this;return Promise.all(this._reporters.map(function(O){return O.log(x,{async:!0,stdout:C.stdout,stderr:C.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),S}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var w,_=function(){function S(x){n(this,S),this.options=Object.assign({},x),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return o(S,[{key:"log",value:function(x){var C=x.level<1?console.__error||console.error:x.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,O=x.type!=="log"?x.type:"",$=x.tag?x.tag:"",k=this.typeColorMap[x.type]||this.levelColorMap[x.level]||this.defaultColor,P=`
|
|
154
|
+
background: `.concat(k,`;
|
|
120
155
|
border-radius: 0.5em;
|
|
121
156
|
color: white;
|
|
122
157
|
font-weight: bold;
|
|
123
158
|
padding: 2px 0.5em;
|
|
124
|
-
`),k="%c".concat([R,C].filter(Boolean).join(":"));typeof v.args[0]=="string"?O.apply(void 0,["".concat(k,"%c ").concat(v.args[0]),T,""].concat(l(v.args.slice(1)))):O.apply(void 0,[k,T].concat(l(v.args)))}}]),x}();return typeof window<"u"&&window.consola||((S=new y({reporters:[new E]})).Consola=y,S.LogLevel=f,S.BrowserReporter=E,S)})})(Qg);var jN=Qg.exports;const MN=Yl(jN),$t=MN.create({level:1}),Tn=e=>new Promise(t=>{setTimeout(()=>{t("ok")},e??1e3/60*2)});class AN extends g.Component{constructor(n){super(n);B(this,"emitter");B(this,"leftPanelContentRef");B(this,"addLeftPanel",n=>{this.state.leftPanels.push(n),this.setState({leftPanels:[...this.state.leftPanels]})});B(this,"replaceLeftPanel",(n,r)=>{const o=this.state.leftPanels.findIndex(a=>a.name===n);if(o>-1){const a=[...this.state.leftPanels];a[o]=r,this.setState({leftPanels:a})}});B(this,"openLeftPanel",async n=>{const r=n||this.state.currentActiveLeftPanel;this.setState({leftBoxVisible:!0,leftBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:r}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!0,panelName:r})});B(this,"closeLeftPanel",async()=>{this.setState({leftBoxVisible:!1,leftBoxSize:{width:0,height:"100%"}}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!1,panelName:this.state.currentActiveLeftPanel})});B(this,"toggleLeftPanel",()=>{const{leftBoxVisible:n}=this.state;!n?this.openLeftPanel():this.closeLeftPanel()});B(this,"onPluginIconClick",n=>{const{currentActiveLeftPanel:r}=this.state;r===n.name&&this.state.leftBoxVisible?this.closeLeftPanel():this.openLeftPanel(n.name)});B(this,"openRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!0,rightBoxSize:{width:400,height:n.height}})});B(this,"closeRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!1,rightBoxSize:{width:0,height:n.height}})});B(this,"replaceBodyView",n=>{this.setState({bodyView:n})});B(this,"replaceRightView",n=>{this.setState({rightView:n})});B(this,"replaceTopBarView",n=>{this.setState({topToolBarView:n})});B(this,"replaceSubTopBarView",n=>{this.setState({subTopToolBarView:n})});B(this,"toggleRightPanel",()=>{const{rightBoxVisible:n,rightBoxSize:r}=this.state,o=!n;this.setState({rightBoxVisible:o,rightBoxSize:{width:o?400:0,height:r.height}})});B(this,"onLeftBoxResizeStop",(n,r,o,a)=>{const i=this.state.leftBoxSize.width+a.width;this.setState({leftBoxSize:{width:i,height:this.state.leftBoxSize.height}})});B(this,"onGlobalClick",n=>{var r;n.target&&((r=this.leftPanelContentRef.current)!=null&&r.contains(n.target))||!this.state.leftBoxFixed&&this.state.leftBoxVisible&&this.closeLeftPanel()});this.emitter=n.emitter||ei(),this.leftPanelContentRef=g.createRef(),this.state={leftBoxVisible:!0,leftBoxSize:{width:300,height:"100%"},leftBoxFixed:!0,rightBoxVisible:!0,rightBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:"OutlineTree",leftPanels:[],bodyView:null,rightView:null,topToolBarView:null,subTopToolBarView:null,customViewList:[]}}addCustomView(n){const r=this.state.customViewList;return r.push(n),this.setState({customViewList:[...r]}),()=>{const o=this.state.customViewList.filter(a=>a!==n);this.setState({customViewList:[...o]})}}componentDidMount(){document.addEventListener("click",this.onGlobalClick)}render(){const{leftBoxVisible:n,leftBoxSize:r,leftBoxFixed:o,rightBoxSize:a,rightBoxVisible:i,leftPanels:s,currentActiveLeftPanel:l,bodyView:c,rightView:u,topToolBarView:d,subTopToolBarView:f,customViewList:p}=this.state,h={};o||(h.position="absolute",h.left="50px",h.top=0);const m=s.find(v=>v.name===l),b=(m==null?void 0:m.render)||null,{onPluginIconClick:y,toggleRightPanel:S,toggleLeftPanel:E,onLeftBoxResizeStop:x}=this;return ee("div",{className:ke.workbenchContainer,children:[w("div",{className:ke.topToolBarBox,children:w("div",{className:ke.topToolBarView,children:d})}),ee("div",{className:ke.bodyContent,children:[ee("div",{className:ke.leftBox,ref:this.leftPanelContentRef,children:[w("div",{className:ke.pluginIconBar,children:s.map(v=>w("div",{onClick:()=>y(v),className:dt([ke.pluginIconItem,(m==null?void 0:m.name)===v.name&&ke.active]),children:v.icon},v.name))}),n&&ee(Ru,{className:ke.pluginPanelBoxResizeBox,size:r,style:h,minWidth:300,maxWidth:600,enable:{right:n},onResizeStop:x,children:[ee("div",{className:ke.pluginHeader,children:[w("span",{className:ke.pluginNameText,children:(m==null?void 0:m.title)||(m==null?void 0:m.name)}),w(Y.Button,{className:dt([ke.fixedBtn]),type:"text",size:"small",onClick:()=>{this.setState({leftBoxFixed:!this.state.leftBoxFixed})},children:w(B0,{className:dt([o&&ke.active])})}),w(Y.Button,{className:ke.closeBtn,type:"text",size:"small",onClick:E,children:w(h0,{})})]}),w("div",{className:ke.pluginPanelBox,children:b})]})]}),ee("div",{className:ke.centerBox,children:[f&&w("div",{className:ke.subTopToolbarBox,children:f}),w("div",{className:ke.canvasBox,children:w("div",{className:ke.scrollBox,children:c})})]}),ee("div",{className:ke.rightResizeBox,children:[w("div",{className:ke.arrowCursor,onClick:S,children:w(O0,{className:dt([!i&&ke.active])})}),w("div",{style:{display:i?"block":"none",height:"100%"},children:w(Ru,{minWidth:400,maxWidth:600,enable:{left:i},size:a,onResizeStop:(v,O,C,R)=>{this.setState({rightBoxSize:{width:this.state.rightBoxSize.width+R.width,height:this.state.rightBoxSize.height}})},children:w("div",{className:ke.rightBox,children:u})})})]})]}),Lt.createPortal(w("div",{className:ke.customViewBox,children:p.map(v=>w("div",{style:{pointerEvents:"auto",display:"inline-block"},children:v.view},v.key))}),document.body)]})}}const DN="_engineContainer_f3ly9_2",$N={engineContainer:DN};function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Id(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kp(r.key),r)}}function rt(e,t,n){return t&&Id(e.prototype,t),n&&Id(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e,t){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},pl(e,t)}function Zr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pl(e,t)}function eo(e,t){if(t&&(Oe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kt(e)}function Zg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ev(e){return qp(e)||Zg(e)||Jl(e)||Yp()}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var IN={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},LN=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.init(t,n)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||IN,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,a){return a&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,Bd(Bd({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Xt=new LN,Pn=function(){function e(){nt(this,e),this.observers={}}return rt(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.observers[n]){var i=[].concat(this.observers[n]);i.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function vo(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function zd(e){return e==null?"":""+e}function BN(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Ic(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={}}return o()?{}:{obj:e,k:r(a.shift())}}function Vd(e,t,n){var r=Ic(e,t,Object),o=r.obj,a=r.k;o[a]=n}function zN(e,t,n,r){var o=Ic(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}function si(e,t){var n=Ic(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Fd(e,t,n){var r=si(e,n);return r!==void 0?r:si(t,n)}function tv(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):tv(e[r],t[r],n):e[r]=t[r]);return e}function pr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var VN={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function FN(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return VN[t]}):e}var ji=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,HN=[" ",",","?","!",";"];function UN(e,t,n){t=t||"",n=n||"";var r=HN.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WN(e){var t=GN();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function GN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nv(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o||typeof o[r[a]]=="string"&&a+1<r.length)return;if(o[r[a]]===void 0){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];l===void 0&&r.length>a+i;)i++,s=r.slice(a,a+i).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var c=r.slice(a+i).join(n);return c?nv(l,c,n):void 0}o=o[r[a]]}return o}}var KN=function(e){Zr(n,e);var t=WN(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),o.data=r||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return rt(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[o,a];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(l?i.split(l):i)),o.indexOf(".")>-1&&(u=o.split("."));var d=si(this.data,u);return d||!c||typeof i!="string"?d:nv(this.data&&this.data[o]&&this.data[o][a],i,l)}},{key:"addResource",value:function(o,a,i,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[o,a];i&&(u=u.concat(c?i.split(c):i)),o.indexOf(".")>-1&&(u=o.split("."),s=a,a=u[1]),this.addNamespaces(a),Vd(this.data,u,s),l.silent||this.emit("added",o,a,i,s)}},{key:"addResources",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in i)(typeof i[l]=="string"||Object.prototype.toString.apply(i[l])==="[object Array]")&&this.addResource(o,a,l,i[l],{silent:!0});s.silent||this.emit("added",o,a,i)}},{key:"addResourceBundle",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[o,a];o.indexOf(".")>-1&&(u=o.split("."),s=i,i=a,a=u[1]),this.addNamespaces(a);var d=si(this.data,u)||{};s?tv(d,i,l):d=Na(Na({},d),i),Vd(this.data,u,d),c.silent||this.emit("added",o,a,i)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Na(Na({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),i=a&&Object.keys(a)||[];return!!i.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Pn),rv={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,a){var i=this;return t.forEach(function(s){i.processors[s]&&(n=i.processors[s].process(n,r,o,a))}),n}};function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qN(e){var t=YN();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function YN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wd={},Gd=function(e){Zr(n,e);var t=qN(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),BN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Jt(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Xt.create("translator"),o}return rt(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var i=this.resolve(o,a);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(o,a){var i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ns||this.options.defaultNS||[],c=i&&o.indexOf(i)>-1,u=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!UN(o,i,s);if(c&&!u){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var f=o.split(i);(i!==s||i===s&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),o=f.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,a,i){var s=this;if(Oe(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(o[o.length-1],a),d=u.key,f=u.namespaces,p=f[f.length-1],h=a.lng||this.language,m=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){var b=a.nsSeparator||this.options.nsSeparator;return l?(y.res="".concat(p).concat(b).concat(d),y):"".concat(p).concat(b).concat(d)}return l?(y.res=d,y):d}var y=this.resolve(o,a),S=y&&y.res,E=y&&y.usedKey||d,x=y&&y.exactUsedKey||d,v=Object.prototype.toString.apply(S),O=["[object Number]","[object Function]","[object RegExp]"],C=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,N=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(R&&S&&N&&O.indexOf(v)<0&&!(typeof C=="string"&&v==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,S,at(at({},a),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(y.res=T,y):T}if(c){var k=v==="[object Array]",j=k?[]:{},L=k?x:E;for(var M in S)if(Object.prototype.hasOwnProperty.call(S,M)){var P="".concat(L).concat(c).concat(M);j[M]=this.translate(P,at(at({},a),{joinArrays:!1,ns:f})),j[M]===P&&(j[M]=S[M])}S=j}}else if(R&&typeof C=="string"&&v==="[object Array]")S=S.join(C),S&&(S=this.extendTranslation(S,o,a,i));else{var D=!1,F=!1,ne=a.count!==void 0&&typeof a.count!="string",Z=n.hasDefaultValue(a),ue=ne?this.pluralResolver.getSuffix(h,a.count,a):"",A=a["defaultValue".concat(ue)]||a.defaultValue;!this.isValidLookup(S)&&Z&&(D=!0,S=A),this.isValidLookup(S)||(F=!0,S=d);var I=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,G=I&&F?void 0:S,te=Z&&A!==S&&this.options.updateMissing;if(F||D||te){if(this.logger.log(te?"updateKey":"missingKey",h,p,d,te?A:S),c){var ie=this.resolve(d,at(at({},a),{},{keySeparator:!1}));ie&&ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var de=[],we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(var fe=0;fe<we.length;fe++)de.push(we[fe]);else this.options.saveMissingTo==="all"?de=this.languageUtils.toResolveHierarchy(a.lng||this.language):de.push(a.lng||this.language);var Ee=function(De,z,Xe){var Le=Z&&Xe!==S?Xe:G;s.options.missingKeyHandler?s.options.missingKeyHandler(De,p,z,Le,te,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(De,p,z,Le,te,a),s.emit("missingKey",De,p,z,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?de.forEach(function(re){s.pluralResolver.getSuffixes(re,a).forEach(function(De){Ee([re],d+De,a["defaultValue".concat(De)]||A)})}):Ee(de,d,A))}S=this.extendTranslation(S,o,a,y,i),F&&S===d&&this.options.appendNamespaceToMissingKey&&(S="".concat(p,":").concat(d)),(F||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(d):d,D?S:void 0):S=this.options.parseMissingKeyHandler(S))}return l?(y.res=S,y):S}},{key:"extendTranslation",value:function(o,a,i,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,at(at({},this.options.interpolation.defaultVariables),i),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(at(at({},i),{interpolation:at(at({},this.options.interpolation),i.interpolation)}));var u=typeof o=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var f=o.match(this.interpolator.nestingRegexp);d=f&&f.length}var p=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(p=at(at({},this.options.interpolation.defaultVariables),p)),o=this.interpolator.interpolate(o,p,i.lng||this.language,i),u){var h=o.match(this.interpolator.nestingRegexp),m=h&&h.length;d<m&&(i.nest=!1)}i.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var S=arguments.length,E=new Array(S),x=0;x<S;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!i.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):c.translate.apply(c,E.concat([a]))},i)),i.interpolation&&this.interpolator.reset()}var b=i.postProcess||this.options.postProcess,y=typeof b=="string"?[b]:b;return o!=null&&y&&y.length&&i.applyPostProcessor!==!1&&(o=rv.handle(y,o,a,this.options&&this.options.postProcessPassResolved?at({i18nResolved:s},i):i,this)),o}},{key:"resolve",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,d;return typeof o=="string"&&(o=[o]),o.forEach(function(f){if(!a.isValidLookup(s)){var p=a.extractFromKey(f,i),h=p.key;l=h;var m=p.namespaces;a.options.fallbackNS&&(m=m.concat(a.options.fallbackNS));var b=i.count!==void 0&&typeof i.count!="string",y=b&&!i.ordinal&&i.count===0&&a.pluralResolver.shouldUseIntlApi(),S=i.context!==void 0&&(typeof i.context=="string"||typeof i.context=="number")&&i.context!=="",E=i.lngs?i.lngs:a.languageUtils.toResolveHierarchy(i.lng||a.language,i.fallbackLng);m.forEach(function(x){a.isValidLookup(s)||(d=x,!Wd["".concat(E[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(d)&&(Wd["".concat(E[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(v){if(!a.isValidLookup(s)){u=v;var O=[h];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(O,h,v,x,i);else{var C;b&&(C=a.pluralResolver.getSuffix(v,i.count,i));var R="".concat(a.options.pluralSeparator,"zero");if(b&&(O.push(h+C),y&&O.push(h+R)),S){var N="".concat(h).concat(a.options.contextSeparator).concat(i.context);O.push(N),b&&(O.push(N+C),y&&O.push(N+R))}}for(var T;T=O.pop();)a.isValidLookup(s)||(c=T,s=a.getResource(v,x,T,i))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,i,s):this.resourceStore.getResource(o,a,i,s)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i)&&a===i.substring(0,a.length)&&o[i]!==void 0)return!0;return!1}}]),n}(Pn);function ps(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Kd=function(){function e(t){nt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xt.create("languageUtils")}return rt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=ps(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(a){if(!o){var i=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(i))&&(o=i)}}),!o&&this.options.supportedLngs&&n.forEach(function(a){if(!o){var i=r.getLanguagePartFromCode(a);if(r.isSupportedCode(i))return o=i;o=r.options.supportedLngs.find(function(s){if(s.indexOf(i)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],s=function(c){c&&(o.isSupportedCode(c)?i.push(c):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),a.forEach(function(l){i.indexOf(l)<0&&s(o.formatLanguageCode(l))}),i}}]),e}(),XN=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],JN={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},QN=["v1","v2","v3"],qd={zero:0,one:1,two:2,few:3,many:4,other:5};function ZN(){var e={};return XN.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:JN[t.fc]}})}),e}var eT=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.languageUtils=t,this.options=n,this.logger=Xt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=ZN()}return rt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(i,s){return qd[i]-qd[s]}).map(function(i){return"".concat(r.options.prepend).concat(i)}):a.numbers.map(function(i){return r.getSuffix(n,i,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),i=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));var s=function(){return o.options.prepend&&i.toString()?o.options.prepend+i.toString():i.toString()};return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?"_plural_".concat(i.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!QN.includes(this.options.compatibilityJSON)}}]),e}();function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var tT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return rt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:FN,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?pr(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?pr(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?pr(r.nestingPrefix):r.nestingPrefixEscaped||pr("$t("),this.nestingSuffix=r.nestingSuffix?pr(r.nestingSuffix):r.nestingSuffixEscaped||pr(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,a){var i=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(b){return b.replace(/\$/g,"$$$$")}var f=function(y){if(y.indexOf(i.formatSeparator)<0){var S=Fd(r,u,y);return i.alwaysFormat?i.format(S,void 0,o,At(At(At({},a),r),{},{interpolationkey:y})):S}var E=y.split(i.formatSeparator),x=E.shift().trim(),v=E.join(i.formatSeparator).trim();return i.format(Fd(r,u,x),v,o,At(At(At({},a),r),{},{interpolationkey:x}))};this.resetRegExp();var p=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,h=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,m=[{regex:this.regexpUnescape,safeValue:function(y){return d(y)}},{regex:this.regexp,safeValue:function(y){return i.escapeValue?d(i.escape(y)):d(y)}}];return m.forEach(function(b){for(c=0;s=b.regex.exec(n);){var y=s[1].trim();if(l=f(y),l===void 0)if(typeof p=="function"){var S=p(n,s,a);l=typeof S=="string"?S:""}else if(a&&a.hasOwnProperty(y))l="";else if(h){l=s[0];continue}else i.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(n)),l="";else typeof l!="string"&&!i.useRawValueToEscape&&(l=zd(l));var E=b.safeValue(l);if(n=n.replace(s[0],E),h?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,c++,c>=i.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,l;function c(p,h){var m=this.nestingOptionsSeparator;if(p.indexOf(m)<0)return p;var b=p.split(new RegExp("".concat(m,"[ ]*{"))),y="{".concat(b[1]);p=b[0],y=this.interpolate(y,l);var S=y.match(/'/g),E=y.match(/"/g);(S&&S.length%2===0&&!E||E.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),h&&(l=At(At({},h),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),x),"".concat(p).concat(m).concat(y)}return delete l.defaultValue,p}for(;i=this.nestingRegexp.exec(n);){var u=[];l=At({},a),l.applyPostProcessor=!1,delete l.defaultValue;var d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var f=i[1].split(this.formatSeparator).map(function(p){return p.trim()});i[1]=f.shift(),u=f,d=!0}if(s=r(c.call(this,i[1].trim(),l),l),s&&i[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=zd(s)),s||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(n)),s=""),d&&(s=u.reduce(function(p,h){return o.format(p,h,a.lng,At(At({},a),{},{interpolationkey:i[1].trim()}))},s.trim())),n=n.replace(i[0],s),this.regexp.lastIndex=0}return n}}]),e}();function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nT(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var a=o.split(";");a.forEach(function(i){if(i){var s=i.split(":"),l=ev(s),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function hr(e){var t={};return function(r,o,a){var i=o+JSON.stringify(a),s=t[i];return s||(s=e(o,a),t[i]=s),s(r)}}var rT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("formatter"),this.options=t,this.formats={number:hr(function(n,r){var o=new Intl.NumberFormat(n,r);return function(a){return o.format(a)}}),currency:hr(function(n,r){var o=new Intl.NumberFormat(n,On(On({},r),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:hr(function(n,r){var o=new Intl.DateTimeFormat(n,On({},r));return function(a){return o.format(a)}}),relativetime:hr(function(n,r){var o=new Intl.RelativeTimeFormat(n,On({},r));return function(a){return o.format(a,r.range||"day")}}),list:hr(function(n,r){var o=new Intl.ListFormat(n,On({},r));return function(a){return o.format(a)}})},this.init(t)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=hr(r)}},{key:"format",value:function(n,r,o,a){var i=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var d=nT(u),f=d.formatName,p=d.formatOptions;if(i.formats[f]){var h=c;try{var m=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},b=m.locale||m.lng||a.locale||a.lng||o;h=i.formats[f](c,b,On(On(On({},p),a),m))}catch(y){i.logger.warn(y)}return h}else i.logger.warn("there was no format function for ".concat(f));return c},n);return l}}]),e}();function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oT(e){var t=aT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function aT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function iT(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var sT=function(e){Zr(n,e);var t=oT(n);function n(r,o,a){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return nt(this,n),i=t.call(this),ji&&Pn.call(Jt(i)),i.backend=r,i.store=o,i.services=a,i.languageUtils=a.languageUtils,i.options=s,i.logger=Xt.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(a,s.backend,s),i}return rt(n,[{key:"queueLoad",value:function(o,a,i,s){var l=this,c={},u={},d={},f={};return o.forEach(function(p){var h=!0;a.forEach(function(m){var b="".concat(p,"|").concat(m);!i.reload&&l.store.hasResourceBundle(p,m)?l.state[b]=2:l.state[b]<0||(l.state[b]===1?u[b]===void 0&&(u[b]=!0):(l.state[b]=1,h=!1,u[b]===void 0&&(u[b]=!0),c[b]===void 0&&(c[b]=!0),f[m]===void 0&&(f[m]=!0)))}),h||(d[p]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(o,a,i){var s=o.split("|"),l=s[0],c=s[1];a&&this.emit("failedLoading",l,c,a),i&&this.store.addResourceBundle(l,c,i),this.state[o]=a?-1:2;var u={};this.queue.forEach(function(d){zN(d.loaded,[l],c),iT(d,o),a&&d.errors.push(a),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){u[f]||(u[f]={});var p=d.loaded[f];p.length&&p.forEach(function(h){u[f][h]===void 0&&(u[f][h]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,a,i){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!o.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:i,tried:l,wait:c,callback:u});return}this.readingCalls++;var d=function(m,b){if(s.readingCalls--,s.waitingReads.length>0){var y=s.waitingReads.shift();s.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&b&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,a,i,l+1,c*2,u)},c);return}u(m,b)},f=this.backend[i].bind(this.backend);if(f.length===2){try{var p=f(o,a);p&&typeof p.then=="function"?p.then(function(h){return d(null,h)}).catch(d):d(null,p)}catch(h){d(h)}return}return f(o,a,d)}},{key:"prepareLoading",value:function(o,a){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(o,a,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(o,a,i){this.prepareLoading(o,a,{},i)}},{key:"reload",value:function(o,a,i){this.prepareLoading(o,a,{reload:!0},i)}},{key:"loadOne",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&a.logger.warn("".concat(i,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&a.logger.log("".concat(i,"loaded namespace ").concat(c," for language ").concat(l),d),a.loaded(o,u,d)})}},{key:"saveMissing",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){var d=Qd(Qd({},c),{},{isUpdate:l}),f=this.backend.create.bind(this.backend);if(f.length<6)try{var p;f.length===5?p=f(o,a,i,s,d):p=f(o,a,i,s),p&&typeof p.then=="function"?p.then(function(h){return u(null,h)}).catch(u):u(null,p)}catch(h){u(h)}else f(o,a,i,s,u,d)}!o||!o[0]||this.store.addResource(o[0],a,i,s)}}}]),n}(Pn);function Zd(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Oe(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Oe(t[2])==="object"||Oe(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ef(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lT(e){var t=cT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function cT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ta(){}function uT(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var li=function(e){Zr(n,e);var t=lT(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(nt(this,n),r=t.call(this),ji&&Pn.call(Jt(r)),r.options=ef(o),r.services={},r.logger=Xt,r.modules={external:[]},uT(Jt(r)),a&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,a),eo(r,Jt(r));setTimeout(function(){r.init(o,a)},0)}return r}return rt(n,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(i=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=Zd();this.options=qt(qt(qt({},s),this.options),ef(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=qt(qt({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function l(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Xt.init(l(this.modules.logger),this.options):Xt.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=rT);var u=new Kd(this.options);this.store=new KN(this.options.resources,this.options);var d=this.services;d.logger=Xt,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new eT(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new tT(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new sT(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Gd(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.external.forEach(function(y){y.init&&y.init(o)})}if(this.format=this.options.interpolation.format,i||(i=Ta),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments),o}});var m=vo(),b=function(){var S=function(x,v){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),m.resolve(v),i(x,v)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return S(null,o.t.bind(o));o.changeLanguage(o.options.lng,S)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),m}},{key:"loadResources",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=i,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(p){if(p){var h=a.services.languageUtils.toResolveHierarchy(p);h.forEach(function(m){c.indexOf(m)<0&&c.push(m)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(f)})}else s(null)}},{key:"reloadResources",value:function(o,a,i){var s=vo();return o||(o=this.languages),a||(a=this.options.ns),i||(i=Ta),this.services.backendConnector.reload(o,a,function(l){s.resolve(),i(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&rv.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(o,a){var i=this;this.isLanguageChangingTo=o;var s=vo();this.emit("languageChanging",o);var l=function(f){i.language=f,i.languages=i.services.languageUtils.toResolveHierarchy(f),i.resolvedLanguage=void 0,i.setResolvedLanguage(f)},c=function(f,p){p?(l(p),i.translator.changeLanguage(p),i.isLanguageChangingTo=void 0,i.emit("languageChanged",p),i.logger.log("languageChanged",p)):i.isLanguageChangingTo=void 0,s.resolve(function(){return i.t.apply(i,arguments)}),a&&a(f,function(){return i.t.apply(i,arguments)})},u=function(f){!o&&!f&&i.services.languageDetector&&(f=[]);var p=typeof f=="string"?f:i.services.languageUtils.getBestMatchFromCodes(f);p&&(i.language||l(p),i.translator.language||i.translator.changeLanguage(p),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(p)),i.loadResources(p,function(h){c(h,p)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(o),s}},{key:"getFixedT",value:function(o,a,i){var s=this,l=function c(u,d){var f;if(Oe(d)!=="object"){for(var p=arguments.length,h=new Array(p>2?p-2:0),m=2;m<p;m++)h[m-2]=arguments[m];f=s.options.overloadTranslationOptionHandler([u,d].concat(h))}else f=qt({},d);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||i||c.keyPrefix;var b=s.options.keySeparator||".",y=f.keyPrefix?"".concat(f.keyPrefix).concat(b).concat(u):u;return s.t(y,f)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=a,l.keyPrefix=i,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(p,h){var m=a.services.backendConnector.state["".concat(p,"|").concat(h)];return m===-1||m===2};if(i.precheck){var d=i.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,o)&&(!l||u(c,o)))}},{key:"loadNamespaces",value:function(o,a){var i=this,s=vo();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){i.options.ns.indexOf(l)<0&&i.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),a&&a(l)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var i=vo();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){i.resolve(),a&&a(c)}),i):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Kd(Zd());return a.indexOf(i.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=qt(qt(qt({},this.options),a),{isClone:!0}),l=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(l.logger=l.logger.clone(a));var c=["store","services","language"];return c.forEach(function(u){l[u]=o[u]}),l.services=qt({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Gd(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];l.emit.apply(l,[u].concat(f))}),l.init(s,i),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Pn);ae(li,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new li(e,t)});var Qe=li.createInstance();Qe.createInstance=li.createInstance;Qe.createInstance;Qe.dir;Qe.init;Qe.loadResources;Qe.reloadResources;Qe.use;Qe.changeLanguage;Qe.getFixedT;Qe.t;Qe.exists;Qe.setDefaultNamespace;Qe.hasLoadedNamespace;Qe.loadNamespaces;Qe.loadLanguages;function dT(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var nf={};function hl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&nf[t[0]]||(typeof t[0]=="string"&&(nf[t[0]]=new Date),dT.apply(void 0,t))}function rf(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function o(){setTimeout(function(){e.off("initialized",o)},0),n()};e.on("initialized",r)}})}function fT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var i=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function pT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return hl("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!i(a.isLanguageChangingTo,e))return!1}}):fT(e,t,n)}function hT(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var gT=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vT={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},mT=function(t){return vT[t]},yT=function(t){return t.replace(gT,mT)};function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function af(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?of(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var gl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:yT};function bT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gl=af(af({},gl),e)}function wT(){return gl}var ov;function ST(e){ov=e}function xT(){return ov}var CT={type:"3rdParty",init:function(t){bT(t.options.react),ST(t)}},OT=g.createContext(),ET=function(){function e(){nt(this,e),this.usedNamespaces={}}return rt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var _T=function(t,n){var r=g.useRef();return g.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function RT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=g.useContext(OT)||{},o=r.i18n,a=r.defaultNS,i=n||o||xT();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new ET),!i){hl("You will need to pass in an i18next instance by using initReactI18next");var s=function(N){return Array.isArray(N)?N[N.length-1]:N},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}i.options.react&&i.options.react.wait!==void 0&&hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=hs(hs(hs({},wT()),i.options.react),t),u=c.useSuspense,d=c.keyPrefix,f=e||a||i.options&&i.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(f);var p=(i.isInitialized||i.initializedStoreOnce)&&f.every(function(R){return pT(R,i,c)});function h(){return i.getFixedT(null,c.nsMode==="fallback"?f:f[0],d)}var m=g.useState(h),b=Ce(m,2),y=b[0],S=b[1],E=f.join(),x=_T(E),v=g.useRef(!0);g.useEffect(function(){var R=c.bindI18n,N=c.bindI18nStore;v.current=!0,!p&&!u&&rf(i,f,function(){v.current&&S(h)}),p&&x&&x!==E&&v.current&&S(h);function T(){v.current&&S(h)}return R&&i&&i.on(R,T),N&&i&&i.store.on(N,T),function(){v.current=!1,R&&i&&R.split(" ").forEach(function(k){return i.off(k,T)}),N&&i&&N.split(" ").forEach(function(k){return i.store.off(k,T)})}},[i,E]);var O=g.useRef(!0);g.useEffect(function(){v.current&&!O.current&&S(h),O.current=!1},[i,d]);var C=[y,i,p];if(C.t=y,C.i18n=i,C.ready=p,p||!p&&!u)return C;throw new Promise(function(R){rf(i,f,function(){R()})})}var NT=["forwardedRef"];function lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ir(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function o(i){var s=i.forwardedRef,l=Rr(i,NT),c=RT(e,Pa(Pa({},l),{},{keyPrefix:t.keyPrefix})),u=Ce(c,3),d=u[0],f=u[1],p=u[2],h=Pa(Pa({},l),{},{t:d,i18n:f,tReady:p});return t.withRef&&s?h.ref=s:!t.withRef&&s&&(h.forwardedRef=s),g.createElement(r,h)}o.displayName="withI18nextTranslation(".concat(hT(r),")"),o.WrappedComponent=r;var a=function(s,l){return g.createElement(o,Object.assign({},s,{forwardedRef:l}))};return t.withRef?g.forwardRef(a):o}}const TT={translation:{"Welcome to React":"欢迎使用 React"}},PT={translation:{"Welcome to React":"Welcome to React and react-i18next"}},kT={zh_CN:TT,en_US:PT};Qe.use(CT).init({resources:kT,lng:"zh_CN",react:{bindI18n:"added languageChanged",bindI18nStore:"added"}});const av=Qe;av.update=()=>{setTimeout(()=>{Qe.emit("added")},0)};class jT{constructor({getWorkbench:t,emitter:n,pageModel:r,i18n:o,assets:a,engine:i}){B(this,"plugins",new Map);B(this,"emitter",ei());B(this,"getWorkbench");B(this,"pageModel");B(this,"i18n");B(this,"assets");B(this,"engine");B(this,"customPluginHooks",{});B(this,"customPlugin",(t,n)=>{const r=this.customPluginHooks,o=r[t]||[];o.push(n),r[t]=o,this.customPluginHooks=r});B(this,"createPluginCtx",()=>({globalEmitter:this.emitter,emitter:ei(),config:{},getWorkbench:this.getWorkbench,pluginManager:this,pageModel:this.pageModel,i18n:this.i18n,assets:this.assets,engine:this.engine,pluginReadyOk:()=>{}}));this.getWorkbench=t,this.emitter=n,this.pageModel=r,this.i18n=o,this.assets=a,this.engine=i}async add(t){var i;const n=this.createPluginCtx();let r;typeof t=="function"?r=t(n):r=t;let o={source:r,ctx:n,export:((i=r.export)==null?void 0:i.call(r,n))||{},ready:!1};(this.customPluginHooks[r.name]||[]).forEach(s=>{o=s(o)}),n.pluginReadyOk=()=>{this.emitter.emit(`${r.name}:ready`),o.ready=!0},this.plugins.set(r.name,o),await r.init(n)}async get(t){const n=this.plugins.get(t);return n!=null&&n.ready||await this.onPluginReadyOk(t),n}async remove(t){const n=this.plugins.get(t);await(n==null?void 0:n.source.destroy(n.ctx)),this.plugins.delete(t)}onPluginReadyOk(t,n){const r=this.plugins.get(t);if(!(r!=null&&r.ready))return r===void 0&&console.warn(`plugin: ${t} not found.`),new Promise(o=>{this.emitter.on(`${t}:ready`,()=>{r&&(r.ready=!0,n==null||n(r),o(r))})})}}const MT={pluginName:"组件库"},AT={pluginName:"Component Store"},cf={zh_CN:MT,en_US:AT},DT="_container_191p3_2",$T="_tabTitle_191p3_23",iv={container:DT,tabTitle:$T},IT="_square_1b87f_2",LT="_componentItem_1b87f_18",BT="_iconImg_1b87f_41",zT="_iconBox_1b87f_45",VT="_iconText_1b87f_54",mo={square:IT,componentItem:LT,iconImg:BT,iconBox:zT,iconText:VT},FT=e=>{const t={[sv]:e.id},n=g.useMemo(()=>e.iconText?w("div",{className:mo.iconText,children:String(e.iconText).toUpperCase()}):typeof e.icon=="string"?w("img",{className:mo.iconImg,src:e.icon,draggable:!1}):e.icon,[e.icon]),r=w("div",{className:dt([mo.square,e.containerClassName]),children:ee("div",{...t,className:mo.componentItem,style:e.style,children:[w("div",{className:mo.iconBox,children:n}),w("span",{children:e.name})]})});return e.description?w(Y.Popover,{overlayInnerStyle:{maxWidth:"300px",maxHeight:"200px",overflow:"auto"},content:e.description||"",zIndex:1e3,placement:"right",children:r}):r},sv="data-drag-key",HT="_ListBox_1q7zr_2",UT="_collapsePanel_1q7zr_23",uf={ListBox:HT,collapsePanel:UT},WT=e=>{const{dataSource:t}=e,n=t.map(o=>o.name||"");if(!t.length)return null;const r=g.useMemo(()=>t.map(o=>{const a=o.name||"",i=w("div",{className:uf.collapsePanel,children:o.list.map(s=>w(FT,{id:s.id,name:s.title,icon:s.snapshot||s.snapshotText,iconText:s.snapshotText,description:s.description||""},s.id))});return{key:a,label:a,children:i}}),[]);return w("div",{className:uf.ListBox,children:w(Y.Collapse,{style:{width:"100%"},defaultActiveKey:n,items:r})})},lv=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||lv(e.parentElement,t)};var GT=typeof global=="object"&&global&&global.Object===Object&&global;const cv=GT;var KT=typeof self=="object"&&self&&self.Object===Object&&self,qT=cv||KT||Function("return this")();const rn=qT;var YT=rn.Symbol;const kn=YT;var uv=Object.prototype,XT=uv.hasOwnProperty,JT=uv.toString,yo=kn?kn.toStringTag:void 0;function QT(e){var t=XT.call(e,yo),n=e[yo];try{e[yo]=void 0;var r=!0}catch{}var o=JT.call(e);return r&&(t?e[yo]=n:delete e[yo]),o}var ZT=Object.prototype,eP=ZT.toString;function tP(e){return eP.call(e)}var nP="[object Null]",rP="[object Undefined]",df=kn?kn.toStringTag:void 0;function ar(e){return e==null?e===void 0?rP:nP:df&&df in Object(e)?QT(e):tP(e)}function ir(e){return e!=null&&typeof e=="object"}var oP="[object Symbol]";function aP(e){return typeof e=="symbol"||ir(e)&&ar(e)==oP}function iP(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var sP=Array.isArray;const Mi=sP;var lP=1/0,ff=kn?kn.prototype:void 0,pf=ff?ff.toString:void 0;function dv(e){if(typeof e=="string")return e;if(Mi(e))return iP(e,dv)+"";if(aP(e))return pf?pf.call(e):"";var t=e+"";return t=="0"&&1/e==-lP?"-0":t}function na(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cP="[object AsyncFunction]",uP="[object Function]",dP="[object GeneratorFunction]",fP="[object Proxy]";function fv(e){if(!na(e))return!1;var t=ar(e);return t==uP||t==dP||t==cP||t==fP}var pP=rn["__core-js_shared__"];const gs=pP;var hf=function(){var e=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function hP(e){return!!hf&&hf in e}var gP=Function.prototype,vP=gP.toString;function sr(e){if(e!=null){try{return vP.call(e)}catch{}try{return e+""}catch{}}return""}var mP=/[\\^$.*+?()[\]{}|]/g,yP=/^\[object .+?Constructor\]$/,bP=Function.prototype,wP=Object.prototype,SP=bP.toString,xP=wP.hasOwnProperty,CP=RegExp("^"+SP.call(xP).replace(mP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OP(e){if(!na(e)||hP(e))return!1;var t=fv(e)?CP:yP;return t.test(sr(e))}function EP(e,t){return e==null?void 0:e[t]}function lr(e,t){var n=EP(e,t);return OP(n)?n:void 0}var _P=lr(rn,"WeakMap");const vl=_P;var gf=Object.create,RP=function(){function e(){}return function(t){if(!na(t))return{};if(gf)return gf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const NP=RP;function TP(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var PP=function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const vf=PP;function kP(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var jP=9007199254740991,MP=/^(?:0|[1-9]\d*)$/;function AP(e,t){var n=typeof e;return t=t??jP,!!t&&(n=="number"||n!="symbol"&&MP.test(e))&&e>-1&&e%1==0&&e<t}function pv(e,t,n){t=="__proto__"&&vf?vf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function hv(e,t){return e===t||e!==e&&t!==t}var DP=Object.prototype,$P=DP.hasOwnProperty;function gv(e,t,n){var r=e[t];(!($P.call(e,t)&&hv(r,n))||n===void 0&&!(t in e))&&pv(e,t,n)}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?pv(n,s,l):gv(n,s,l)}return n}var IP=9007199254740991;function vv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=IP}function mv(e){return e!=null&&vv(e.length)&&!fv(e)}var LP=Object.prototype;function Lc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LP;return e===n}function BP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zP="[object Arguments]";function mf(e){return ir(e)&&ar(e)==zP}var yv=Object.prototype,VP=yv.hasOwnProperty,FP=yv.propertyIsEnumerable,HP=mf(function(){return arguments}())?mf:function(e){return ir(e)&&VP.call(e,"callee")&&!FP.call(e,"callee")};const UP=HP;function WP(){return!1}var bv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yf=bv&&typeof module=="object"&&module&&!module.nodeType&&module,GP=yf&&yf.exports===bv,bf=GP?rn.Buffer:void 0,KP=bf?bf.isBuffer:void 0,qP=KP||WP;const wv=qP;var YP="[object Arguments]",XP="[object Array]",JP="[object Boolean]",QP="[object Date]",ZP="[object Error]",ek="[object Function]",tk="[object Map]",nk="[object Number]",rk="[object Object]",ok="[object RegExp]",ak="[object Set]",ik="[object String]",sk="[object WeakMap]",lk="[object ArrayBuffer]",ck="[object DataView]",uk="[object Float32Array]",dk="[object Float64Array]",fk="[object Int8Array]",pk="[object Int16Array]",hk="[object Int32Array]",gk="[object Uint8Array]",vk="[object Uint8ClampedArray]",mk="[object Uint16Array]",yk="[object Uint32Array]",Ne={};Ne[uk]=Ne[dk]=Ne[fk]=Ne[pk]=Ne[hk]=Ne[gk]=Ne[vk]=Ne[mk]=Ne[yk]=!0;Ne[YP]=Ne[XP]=Ne[lk]=Ne[JP]=Ne[ck]=Ne[QP]=Ne[ZP]=Ne[ek]=Ne[tk]=Ne[nk]=Ne[rk]=Ne[ok]=Ne[ak]=Ne[ik]=Ne[sk]=!1;function bk(e){return ir(e)&&vv(e.length)&&!!Ne[ar(e)]}function Bc(e){return function(t){return e(t)}}var Sv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,No=Sv&&typeof module=="object"&&module&&!module.nodeType&&module,wk=No&&No.exports===Sv,vs=wk&&cv.process,Sk=function(){try{var e=No&&No.require&&No.require("util").types;return e||vs&&vs.binding&&vs.binding("util")}catch{}}();const Lr=Sk;var wf=Lr&&Lr.isTypedArray,xk=wf?Bc(wf):bk;const Ck=xk;var Ok=Object.prototype,Ek=Ok.hasOwnProperty;function xv(e,t){var n=Mi(e),r=!n&&UP(e),o=!n&&!r&&wv(e),a=!n&&!r&&!o&&Ck(e),i=n||r||o||a,s=i?BP(e.length,String):[],l=s.length;for(var c in e)(t||Ek.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||AP(c,l)))&&s.push(c);return s}function Cv(e,t){return function(n){return e(t(n))}}var _k=Cv(Object.keys,Object);const Rk=_k;var Nk=Object.prototype,Tk=Nk.hasOwnProperty;function Pk(e){if(!Lc(e))return Rk(e);var t=[];for(var n in Object(e))Tk.call(e,n)&&n!="constructor"&&t.push(n);return t}function zc(e){return mv(e)?xv(e):Pk(e)}function kk(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var jk=Object.prototype,Mk=jk.hasOwnProperty;function Ak(e){if(!na(e))return kk(e);var t=Lc(e),n=[];for(var r in e)r=="constructor"&&(t||!Mk.call(e,r))||n.push(r);return n}function Vc(e){return mv(e)?xv(e,!0):Ak(e)}var Dk=lr(Object,"create");const Uo=Dk;function $k(){this.__data__=Uo?Uo(null):{},this.size=0}function Ik(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lk="__lodash_hash_undefined__",Bk=Object.prototype,zk=Bk.hasOwnProperty;function Vk(e){var t=this.__data__;if(Uo){var n=t[e];return n===Lk?void 0:n}return zk.call(t,e)?t[e]:void 0}var Fk=Object.prototype,Hk=Fk.hasOwnProperty;function Uk(e){var t=this.__data__;return Uo?t[e]!==void 0:Hk.call(t,e)}var Wk="__lodash_hash_undefined__";function Gk(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Uo&&t===void 0?Wk:t,this}function er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}er.prototype.clear=$k;er.prototype.delete=Ik;er.prototype.get=Vk;er.prototype.has=Uk;er.prototype.set=Gk;function Kk(){this.__data__=[],this.size=0}function Di(e,t){for(var n=e.length;n--;)if(hv(e[n][0],t))return n;return-1}var qk=Array.prototype,Yk=qk.splice;function Xk(e){var t=this.__data__,n=Di(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Yk.call(t,n,1),--this.size,!0}function Jk(e){var t=this.__data__,n=Di(t,e);return n<0?void 0:t[n][1]}function Qk(e){return Di(this.__data__,e)>-1}function Zk(e,t){var n=this.__data__,r=Di(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Sn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sn.prototype.clear=Kk;Sn.prototype.delete=Xk;Sn.prototype.get=Jk;Sn.prototype.has=Qk;Sn.prototype.set=Zk;var ej=lr(rn,"Map");const Wo=ej;function tj(){this.size=0,this.__data__={hash:new er,map:new(Wo||Sn),string:new er}}function nj(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $i(e,t){var n=e.__data__;return nj(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rj(e){var t=$i(this,e).delete(e);return this.size-=t?1:0,t}function oj(e){return $i(this,e).get(e)}function aj(e){return $i(this,e).has(e)}function ij(e,t){var n=$i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function to(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}to.prototype.clear=tj;to.prototype.delete=rj;to.prototype.get=oj;to.prototype.has=aj;to.prototype.set=ij;function Ov(e){return e==null?"":dv(e)}function Ev(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var sj=Cv(Object.getPrototypeOf,Object);const Fc=sj;var lj="[object Object]",cj=Function.prototype,uj=Object.prototype,_v=cj.toString,dj=uj.hasOwnProperty,fj=_v.call(Object);function Ii(e){if(!ir(e)||ar(e)!=lj)return!1;var t=Fc(e);if(t===null)return!0;var n=dj.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_v.call(n)==fj}function pj(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function hj(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:pj(e,t,n)}var gj="\\ud800-\\udfff",vj="\\u0300-\\u036f",mj="\\ufe20-\\ufe2f",yj="\\u20d0-\\u20ff",bj=vj+mj+yj,wj="\\ufe0e\\ufe0f",Sj="\\u200d",xj=RegExp("["+Sj+gj+bj+wj+"]");function Rv(e){return xj.test(e)}function Cj(e){return e.split("")}var Nv="\\ud800-\\udfff",Oj="\\u0300-\\u036f",Ej="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Rj=Oj+Ej+_j,Nj="\\ufe0e\\ufe0f",Tj="["+Nv+"]",ml="["+Rj+"]",yl="\\ud83c[\\udffb-\\udfff]",Pj="(?:"+ml+"|"+yl+")",Tv="[^"+Nv+"]",Pv="(?:\\ud83c[\\udde6-\\uddff]){2}",kv="[\\ud800-\\udbff][\\udc00-\\udfff]",kj="\\u200d",jv=Pj+"?",Mv="["+Nj+"]?",jj="(?:"+kj+"(?:"+[Tv,Pv,kv].join("|")+")"+Mv+jv+")*",Mj=Mv+jv+jj,Aj="(?:"+[Tv+ml+"?",ml,Pv,kv,Tj].join("|")+")",Dj=RegExp(yl+"(?="+yl+")|"+Aj+Mj,"g");function $j(e){return e.match(Dj)||[]}function Ij(e){return Rv(e)?$j(e):Cj(e)}function Lj(e){return function(t){t=Ov(t);var n=Rv(t)?Ij(t):void 0,r=n?n[0]:t.charAt(0),o=n?hj(n,1).join(""):t.slice(1);return r[e]()+o}}var Bj=Lj("toUpperCase");const zj=Bj;function Av(e){return zj(Ov(e).toLowerCase())}function Vj(){this.__data__=new Sn,this.size=0}function Fj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Hj(e){return this.__data__.get(e)}function Uj(e){return this.__data__.has(e)}var Wj=200;function Gj(e,t){var n=this.__data__;if(n instanceof Sn){var r=n.__data__;if(!Wo||r.length<Wj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new to(r)}return n.set(e,t),this.size=n.size,this}function no(e){var t=this.__data__=new Sn(e);this.size=t.size}no.prototype.clear=Vj;no.prototype.delete=Fj;no.prototype.get=Hj;no.prototype.has=Uj;no.prototype.set=Gj;function Kj(e,t){return e&&Ai(t,zc(t),e)}function qj(e,t){return e&&Ai(t,Vc(t),e)}var Dv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sf=Dv&&typeof module=="object"&&module&&!module.nodeType&&module,Yj=Sf&&Sf.exports===Dv,xf=Yj?rn.Buffer:void 0,Cf=xf?xf.allocUnsafe:void 0;function Xj(e,t){if(t)return e.slice();var n=e.length,r=Cf?Cf(n):new e.constructor(n);return e.copy(r),r}function Jj(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function $v(){return[]}var Qj=Object.prototype,Zj=Qj.propertyIsEnumerable,Of=Object.getOwnPropertySymbols,eM=Of?function(e){return e==null?[]:(e=Object(e),Jj(Of(e),function(t){return Zj.call(e,t)}))}:$v;const Hc=eM;function tM(e,t){return Ai(e,Hc(e),t)}var nM=Object.getOwnPropertySymbols,rM=nM?function(e){for(var t=[];e;)Ev(t,Hc(e)),e=Fc(e);return t}:$v;const Iv=rM;function oM(e,t){return Ai(e,Iv(e),t)}function Lv(e,t,n){var r=t(e);return Mi(e)?r:Ev(r,n(e))}function aM(e){return Lv(e,zc,Hc)}function iM(e){return Lv(e,Vc,Iv)}var sM=lr(rn,"DataView");const bl=sM;var lM=lr(rn,"Promise");const wl=lM;var cM=lr(rn,"Set");const Sl=cM;var Ef="[object Map]",uM="[object Object]",_f="[object Promise]",Rf="[object Set]",Nf="[object WeakMap]",Tf="[object DataView]",dM=sr(bl),fM=sr(Wo),pM=sr(wl),hM=sr(Sl),gM=sr(vl),Hn=ar;(bl&&Hn(new bl(new ArrayBuffer(1)))!=Tf||Wo&&Hn(new Wo)!=Ef||wl&&Hn(wl.resolve())!=_f||Sl&&Hn(new Sl)!=Rf||vl&&Hn(new vl)!=Nf)&&(Hn=function(e){var t=ar(e),n=t==uM?e.constructor:void 0,r=n?sr(n):"";if(r)switch(r){case dM:return Tf;case fM:return Ef;case pM:return _f;case hM:return Rf;case gM:return Nf}return t});const Uc=Hn;var vM=Object.prototype,mM=vM.hasOwnProperty;function yM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&mM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var bM=rn.Uint8Array;const Pf=bM;function Wc(e){var t=new e.constructor(e.byteLength);return new Pf(t).set(new Pf(e)),t}function wM(e,t){var n=t?Wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var SM=/\w*$/;function xM(e){var t=new e.constructor(e.source,SM.exec(e));return t.lastIndex=e.lastIndex,t}var kf=kn?kn.prototype:void 0,jf=kf?kf.valueOf:void 0;function CM(e){return jf?Object(jf.call(e)):{}}function OM(e,t){var n=t?Wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var EM="[object Boolean]",_M="[object Date]",RM="[object Map]",NM="[object Number]",TM="[object RegExp]",PM="[object Set]",kM="[object String]",jM="[object Symbol]",MM="[object ArrayBuffer]",AM="[object DataView]",DM="[object Float32Array]",$M="[object Float64Array]",IM="[object Int8Array]",LM="[object Int16Array]",BM="[object Int32Array]",zM="[object Uint8Array]",VM="[object Uint8ClampedArray]",FM="[object Uint16Array]",HM="[object Uint32Array]";function UM(e,t,n){var r=e.constructor;switch(t){case MM:return Wc(e);case EM:case _M:return new r(+e);case AM:return wM(e,n);case DM:case $M:case IM:case LM:case BM:case zM:case VM:case FM:case HM:return OM(e,n);case RM:return new r;case NM:case kM:return new r(e);case TM:return xM(e);case PM:return new r;case jM:return CM(e)}}function WM(e){return typeof e.constructor=="function"&&!Lc(e)?NP(Fc(e)):{}}var GM="[object Map]";function KM(e){return ir(e)&&Uc(e)==GM}var Mf=Lr&&Lr.isMap,qM=Mf?Bc(Mf):KM;const YM=qM;var XM="[object Set]";function JM(e){return ir(e)&&Uc(e)==XM}var Af=Lr&&Lr.isSet,QM=Af?Bc(Af):JM;const ZM=QM;var eA=1,tA=2,nA=4,Bv="[object Arguments]",rA="[object Array]",oA="[object Boolean]",aA="[object Date]",iA="[object Error]",zv="[object Function]",sA="[object GeneratorFunction]",lA="[object Map]",cA="[object Number]",Vv="[object Object]",uA="[object RegExp]",dA="[object Set]",fA="[object String]",pA="[object Symbol]",hA="[object WeakMap]",gA="[object ArrayBuffer]",vA="[object DataView]",mA="[object Float32Array]",yA="[object Float64Array]",bA="[object Int8Array]",wA="[object Int16Array]",SA="[object Int32Array]",xA="[object Uint8Array]",CA="[object Uint8ClampedArray]",OA="[object Uint16Array]",EA="[object Uint32Array]",xe={};xe[Bv]=xe[rA]=xe[gA]=xe[vA]=xe[oA]=xe[aA]=xe[mA]=xe[yA]=xe[bA]=xe[wA]=xe[SA]=xe[lA]=xe[cA]=xe[Vv]=xe[uA]=xe[dA]=xe[fA]=xe[pA]=xe[xA]=xe[CA]=xe[OA]=xe[EA]=!0;xe[iA]=xe[zv]=xe[hA]=!1;function Ga(e,t,n,r,o,a){var i,s=t&eA,l=t&tA,c=t&nA;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!na(e))return e;var u=Mi(e);if(u){if(i=yM(e),!s)return TP(e,i)}else{var d=Uc(e),f=d==zv||d==sA;if(wv(e))return Xj(e,s);if(d==Vv||d==Bv||f&&!o){if(i=l||f?{}:WM(e),!s)return l?oM(e,qj(i,e)):tM(e,Kj(i,e))}else{if(!xe[d])return o?e:{};i=UM(e,d,s)}}a||(a=new no);var p=a.get(e);if(p)return p;a.set(e,i),ZM(e)?e.forEach(function(b){i.add(Ga(b,t,n,b,e,a))}):YM(e)&&e.forEach(function(b,y){i.set(y,Ga(b,t,n,y,e,a))});var h=c?l?iM:aM:l?Vc:zc,m=u?void 0:h(e);return kP(m||e,function(b,y){m&&(y=b,b=e[y]),gv(i,y,Ga(b,t,n,y,e,a))}),i}var _A=1,RA=4;function Df(e){return Ga(e,_A|RA)}const ci="ComponentLib",xl=`plugin:${ci}`,NA=({children:e})=>w("div",{className:iv.tabTitle,children:e});class TA extends g.Component{constructor(n){super(n);B(this,"containerRef");B(this,"disposeList",[]);B(this,"leftPanelVisibleCb",async({visible:n,panelName:r})=>{await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),r===ci&&n&&this.registerDragEvent()});B(this,"registerDragEvent",async()=>{const{containerRef:n}=this,{pluginCtx:r}=this.props,o=await r.pluginManager.get("Designer");if(!o||!n.current)return;const a=r.pageModel,s=o.export.getDnd(),l=new Xn.Sensor({name:"ComponentListBox",container:n.current}),c=f=>{const p=f.event.target;if(!p)return;const h=lv(p,sv);if(!h)return;const m=a.materialsModel.findSnippetById(h);if(m)return a==null?void 0:a.createNode(m.schema)};l.setCanDrag(async f=>{const p=c(f);return this.props.pluginCtx.pluginManager.get("Designer").then(h=>{const m=h==null?void 0:h.export;m==null||m.selectNode("")}),{...f,extraData:{dropType:"NEW_ADD",dragNode:p}}}),s.registerSensor(l);const u=()=>{const{getWorkbench:f}=this.props.pluginCtx,p=f();p.state.leftBoxFixed||p.closeLeftPanel()};this.disposeList.push(()=>{s.emitter.off("dragStart",u)}),s.emitter.on("dragStart",u);const d=async f=>{const p=c(f);if(!p)return;const{pageModel:h}=this.props.pluginCtx;return this.props.pluginCtx.pluginManager.get("Designer").then(async m=>{var N;const b=m==null?void 0:m.export,y=b==null?void 0:b.getSelectedNodeId(),S=h.getNode(y),E=be.findContainerNode(S);let x="CHILD_END",v=S??null;if(S)E===S.parent?S.isContainer()?(x="CHILD_END",v=S,h.addNode(p,S,x)):(x="AFTER",v=S):E&&!be.isPageModel(E)&&(x="CHILD_END",v=E);else{const T=h.getRootNode();T&&(x="CHILD_END",v=T)}const O=b==null?void 0:b.getInstance(),C=await(O==null?void 0:O.customAdvanceHook.onNewAdd({dragNode:p,dropNode:v,eventObj:{...f,from:f.event,fromSensor:l,pointer:null,fromPointer:null,extraData:{}}}));if(C===!1)return;let R={dragNode:p,dropNode:v,pos:x};typeof C=="object"&&(R={...R,dragNode:C.addNode??R.dragNode,dropNode:C.dropNode??R.dropNode,pos:((N=C.dropPosInfo)==null?void 0:N.pos)??R.pos}),h.addNode(R.dragNode,R.dropNode,R.pos),setTimeout(()=>{b==null||b.selectNode(R.dragNode.id)},200)})};this.disposeList.push(()=>{l.emitter.off("onClick",d)}),l.emitter.on("onClick",d)});this.containerRef=g.createRef(),this.state={componentsList:[]}}async componentDidMount(){const{pluginCtx:n}=this.props,{pageModel:r,i18n:o}=n,{materialsModel:a}=r;await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent(),Object.keys(cf).forEach(s=>{o.addResourceBundle(s,xl,cf[s],!0,!0)}),o.update();const i=a.getAllSnippets();if(i.length&&i[0].name==="default"){const s=i.shift();s&&i.push(s)}this.setState({componentsList:i})}componentWillUnmount(){this.disposeList.map(n=>n())}render(){const{componentsList:n}=this.state,r=n.map(o=>({label:w(NA,{children:Av(o.name)}),key:o.name,children:w(WT,{dataSource:o.list})}));return w("div",{ref:this.containerRef,className:iv.container,children:w(Y.Tabs,{defaultActiveKey:"BaseComponent",items:r,style:{flex:1}})})}}const Fv={name:ci,async init(e){const t=Ir(xl)(TA),n=Ir(xl)(({t:o})=>w(Ye,{children:o("pluginName")}));e.getWorkbench().addLeftPanel({title:w(n,{}),name:"ComponentLib",icon:w(d0,{}),render:w(t,{pluginCtx:e})})},reload:async()=>{console.log(ci,"not suooprt reload")},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Hv="Designer",PA={pluginName:"组件库"},kA={pluginName:"Component Store"},$f={zh_CN:PA,en_US:kA},jA="_toolBarBox_h5ljb_2",MA="_item_h5ljb_10",AA="_layoutSelectBox_h5ljb_20",DA="_hoverBox_h5ljb_25",$A="_hoverBoxActive_h5ljb_35",IA="_hoverItem_h5ljb_39",LA="_placeholder_h5ljb_47",gn={toolBarBox:jA,item:MA,layoutSelectBox:AA,hoverBox:DA,hoverBoxActive:$A,hoverItem:IA,placeholder:LA},BA=({dataSource:e,children:t,onSelect:n})=>{const[r,o]=g.useState(!1);return ee("div",{className:gn.layoutSelectBox,children:[w("div",{className:dt([gn.hoverBox,r&&gn.hoverBoxActive]),children:e.map(a=>w("div",{className:gn.hoverItem,onClick:()=>n(a.key),children:a.label},a.key))}),w("div",{className:gn.placeholder,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),children:t})]})},Uv=e=>{var p;const{nodeList:t,toSelectNode:n,toDelete:r,toCopy:o,toHidden:a}=e,i=[...t],s=i.shift(),l=i.map(h=>{var S;const m=h,b=(S=m.materialsModel.findByComponentName(m.value.componentName))==null?void 0:S.value.title,y=m.value.title||b||m.value.componentName||"";return{key:h.id,label:y||"Empty"}}),c=w("div",{className:gn.item,onClick:()=>o((s==null?void 0:s.id)||""),children:w(gh,{})}),u=w("div",{className:gn.item,onClick:()=>r((s==null?void 0:s.id)||""),children:w(tc,{})}),d=w("div",{className:gn.item,onClick:()=>a((s==null?void 0:s.id)||""),children:w(wh,{})}),f=w(BA,{dataSource:l.reverse(),onSelect:n,children:w("div",{children:(s==null?void 0:s.value.title)||((p=s==null?void 0:s.material)==null?void 0:p.value.title)||"Empty"})});return{copyItem:c,deleteItem:u,visibleItem:d,nodeLayout:f}},zA=e=>{const{copyItem:t,deleteItem:n,visibleItem:r,nodeLayout:o}=g.useMemo(()=>Uv(e),[e]);return ee("div",{className:gn.toolBarBox,children:[o,r,t,n]})},VA=(e,t=5)=>{const n=[];let r=0,o=e;for(;r<t&&o;)be.isNodeModel(o)&&(n.push(o),r++),o=o.parent||null;return n},FA=({node:e})=>w("div",{style:{backgroundColor:"rgba(100,100,100)",padding:"3px 10px 3px 15px",borderRadius:"2px",opacity:.9,color:"rgba(220,220,220)"},children:e.value.componentName}),HA="_hoverTips_k3vn7_2",UA={hoverTips:HA};class WA{constructor(t){B(this,"getPortalViewCtx");B(this,"ctx");B(this,"layoutRef");this.getPortalViewCtx=t.getPortalViewCtx,this.ctx=t.ctx,this.layoutRef=t.layoutRef}async canDrag({dragNode:t,eventObj:n}){var o;const r=(o=t.material)==null?void 0:o.value.advanceCustom;return r!=null&&r.canDragNode?r==null?void 0:r.canDragNode(t,{context:this.ctx,viewPortal:this.getPortalViewCtx(),event:n,extra:n.extraData}):!0}async canDrop({dragNode:t,dropNode:n,eventObj:r}){var s;const o=(s=t.material)==null?void 0:s.value.advanceCustom;let a={};const i={dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData};if(o!=null&&o.canDropNode)if(a=await o.canDropNode(t,i),o!=null&&o.canAcceptNode){let l;return typeof a=="object"?l=await(o==null?void 0:o.canAcceptNode(a.dragNode,{...i,...a})):l=await(o==null?void 0:o.canAcceptNode(t,{...i})),l}else return a;return!0}async onNewAdd({dragNode:t,dropNode:n,eventObj:r}){var a,i,s;const o=await((s=(i=(a=t.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onNewAdd)==null?void 0:s.call(i,t,{dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData}));return o===!1?!1:o}getSelectRectViewRender(t){var r;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.selectRectViewRender}getHoverRectViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.hoverRectViewRender}getDropViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.dropViewRender}getGhostViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.ghostViewRender}getToolbarViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.toolbarViewRender}async onCopy(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onCopy;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.copyNode??n)}return n&&r.pageModel.copyNode(n)&&await Tn(),n}async onDelete(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onDelete;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.deleteNode??n)}return n&&r.pageModel.deleteNode(n)&&await Tn(),n}}class GA extends g.Component{constructor(n){super(n);B(this,"layoutRef");B(this,"customAdvanceHook");B(this,"getPortalViewCtx",()=>({setView:n=>{this.setState({portalView:n})},clearView:()=>{this.setState({portalView:null})}}));B(this,"onNodeDragging",async n=>{var a,i,s;const r=n.extraData,o=r==null?void 0:r.dragNode;if(o)return(s=(i=(a=o.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onDragging)==null?void 0:s.call(i,o,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r})});B(this,"onNodeDragEnd",async()=>{this.setState({...this.state,dropViewRender:this.props.pluginCtx.config.dropViewRender})});B(this,"onNodeDrop",async n=>{var c,u,d,f,p,h,m,b,y,S,E;const{layoutRef:r}=this,o=this.props.pluginCtx.pageModel,a=n.extraData,i=a==null?void 0:a.dropPosInfo,s={before:"BEFORE",after:"AFTER",current:"CHILD_START"}[(i==null?void 0:i.pos)||"after"],l=a==null?void 0:a.dragNode;if(l&&await((d=(u=(c=l.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onDrop)==null?void 0:d.call(u,l,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;if(!(a!=null&&a.dropNode))return console.warn("cancel drop, because drop node is null"),!1;if(a.dropType==="NEW_ADD"){if(l&&await((h=(p=(f=l.material)==null?void 0:f.value.advanceCustom)==null?void 0:p.onNewAdd)==null?void 0:h.call(p,l,{dropNode:a.dropNode,context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;((m=a.dropNode)==null?void 0:m.nodeType)!=="NODE"?o==null||o.addNode(a.dragNode,a.dropNode,"CHILD_START"):o==null||o.addNode(a.dragNode,a.dropNode,s)}else{if(((b=a.dropNode)==null?void 0:b.id)===((y=a.dragNode)==null?void 0:y.id)){console.warn("dragNode and dropNode id is the same");return}if(!o.moveNodeById(((S=a.dragNode)==null?void 0:S.id)||"",((E=a==null?void 0:a.dropNode)==null?void 0:E.id)||"",s))return console.warn("drop failed"),!1}setTimeout(async()=>{var x,v,O;if(l&&await this.onSelectNode(l,null)===!1){(x=r.current)==null||x.selectNode("");return}(O=r.current)==null||O.selectNode(((v=a.dragNode)==null?void 0:v.id)||"")},150),this.props.pluginCtx.emitter.emit("onDrop",n)});B(this,"onSelectNode",async(n,r)=>{var l,c,u,d;const{pluginCtx:o}=this.props,{layoutRef:a}=this;if(!n){o.engine.updateCurrentSelectNode(null),(l=a.current)==null||l.selectNode(""),this.setState({selectToolbarView:null});return}const i=await((d=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onSelect)==null?void 0:d.call(u,n,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:r,extra:{}}));if(i===!1)return i;o.engine.updateCurrentSelectNode(n);const s=this.getToolbarView(n);this.setState({selectToolbarView:s,selectRectViewRender:this.customAdvanceHook.getSelectRectViewRender(n)||this.props.pluginCtx.config.selectRectViewRender})});B(this,"onDragStart",async n=>{var l,c,u;const r=n.extraData,o=r==null?void 0:r.dragNode;if(!o)return;const a={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r},i=await((u=(c=(l=o.material)==null?void 0:l.value.advanceCustom)==null?void 0:c.onDragStart)==null?void 0:u.call(c,o,{...a}));if(i===!1)return i;const s=this.getGhostView(o,a);this.setState({...this.state,ghostView:s,dropViewRender:this.customAdvanceHook.getDropViewRender(o)||this.props.pluginCtx.config.dropViewRender})});B(this,"getGhostView",(n,r)=>{let o=w(FA,{node:n});const i=this.customAdvanceHook.getGhostViewRender(n)||this.props.pluginCtx.config.ghostViewRender;return i&&(o=w(i,{node:n,params:r})),o});B(this,"toSelectNode",async n=>{var i;const o=this.props.pluginCtx.pageModel.getNode(n);if(await this.onSelectNode(o||null,null)!==!1)return(i=this.layoutRef.current)==null||i.selectNode(n),!0});B(this,"toCopyNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n),a=await this.customAdvanceHook.onCopy(o);a&&this.toSelectNode(a.id)});B(this,"toDeleteNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n);!o||await this.customAdvanceHook.onDelete(o)===!1||this.toSelectNode("")});B(this,"toHidden",n=>{const r=this.props.pluginCtx.pageModel.getNode(n);if(!r)return;const o=r.value.configure.devState??{};o.condition=!1,r.value.configure.devState=o,r.updateValue()});B(this,"getToolbarView",n=>{const o={nodeList:VA(n,5),toSelectNode:this.toSelectNode,toCopy:this.toCopyNode,toDelete:this.toDeleteNode,toHidden:this.toHidden},a=Uv(o);let i=w(zA,{...o});const s=this.customAdvanceHook.getToolbarViewRender(n)||this.props.pluginCtx.config.toolbarViewRender;return s&&(i=w(s,{node:n,context:this.context,toolBarItems:a})),i});B(this,"onHoverNode",(n,r,o)=>{this.props.pluginCtx.emitter.emit("onHover",n);const a=n==null?void 0:n.material;a||console.warn("material not found",n);const i={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:o,extra:{}},s=this.getGhostView(r,i),l={hoverToolbarView:w("div",{className:UA.hoverTips,children:(a==null?void 0:a.value.title)||(a==null?void 0:a.componentName)}),ghostView:s,hoverRectViewRender:this.customAdvanceHook.getHoverRectViewRender(n)||this.props.pluginCtx.config.hoverRectViewRender};r||(l.ghostView=null),this.setState({...l})});B(this,"nodeCanDrag",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrag({dragNode:o,eventObj:n})});B(this,"nodeCanDrop",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrop({dragNode:o,eventObj:n,...r})});B(this,"innerSelectRectViewRender",n=>{const{selectRectViewRender:r}=this.state,{pluginCtx:o}=this.props,a=r,i=o.engine.getActiveNode();return!a||!i?w(Ye,{}):w(a,{node:i,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}})});B(this,"innerHoverRectViewRender",n=>{const{hoverRectViewRender:r}=this.state,o=r;return o?w(o,{node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(Ye,{})});B(this,"innerDropViewRender",n=>{const{dropViewRender:r}=this.state,o=r;return o?w(o,{...n,node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(Ye,{})});this.state={pageModel:n.pluginCtx.pageModel,hoverToolbarView:null,selectToolbarView:null,ghostView:null,assets:n.pluginCtx.assets||[],portalView:null,selectRectViewRender:null,hoverRectViewRender:null,dropViewRender:null},this.layoutRef=g.createRef(),this.customAdvanceHook=new WA({getPortalViewCtx:this.getPortalViewCtx,ctx:this.props.pluginCtx,layoutRef:this.layoutRef})}componentDidMount(){const{i18n:n}=this.props.pluginCtx;Object.keys($f).forEach(r=>{n.addResourceBundle(r,`plugin:${Hv}`,$f[r],!0,!0)}),this.init()}updateAssets(n){this.setState({assets:n})}reloadRender({assets:n}){var r;(r=this.layoutRef.current)==null||r.reload({assets:n})}async init(){const{layoutRef:n}=this,{pluginCtx:r}=this.props;if(!n.current){console.warn("layout not ready ok");return}await n.current.ready();const o=n.current;r.emitter.emit("ready",{UIInstance:this}),o.dnd.emitter.on("click",({event:a})=>{r.getWorkbench().onGlobalClick(a)}),this.props.pluginCtx.pageModel.emitter.on("onPageChange",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),this.props.pluginCtx.pageModel.emitter.on("onReloadPage",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),r.pluginReadyOk()}render(){const{layoutRef:n,props:r,onSelectNode:o,onDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDragEnd:c}=this,{pageModel:u,hoverToolbarView:d,selectToolbarView:f,ghostView:p,assets:h,portalView:m,selectRectViewRender:b,hoverRectViewRender:y,dropViewRender:S}=this.state,{pluginCtx:E}=r,x=E.engine.props.renderJSUrl||"./render.umd.js",v={};return b&&(v.selectRectViewRender=this.innerSelectRectViewRender),y&&(v.hoverRectViewRender=this.innerHoverRectViewRender),S&&(v.dropViewRender=this.innerDropViewRender),f&&(v.selectToolbarView=this.state.selectToolbarView),ee(Ye,{children:[w(Xn.Layout,{beforeInitRender:r.pluginCtx.config.beforeInitRender,customRender:r.pluginCtx.config.customRender,ref:n,pageModel:u,renderJSUrl:x,...r,hoverToolBarView:d,selectBoxStyle:{},hoverBoxStyle:{},nodeCanDrag:this.nodeCanDrag,nodeCanDrop:this.nodeCanDrop,onSelectNode:o,onNodeDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDraEnd:c,...v,ghostView:p,assets:h,pluginCtx:this.props.pluginCtx}),m&&Lt.createPortal(m,document.body)]})}}const Wv=e=>{const t=g.createRef();return{name:Hv,async init(n){n.getWorkbench().replaceBodyView(w(GA,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:()=>({getInstance:()=>t.current,getDnd:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.dnd},selectNode:async n=>{var r;(r=t.current)==null||r.toSelectNode(n)},copyNode:async n=>{var r;(r=t.current)==null||r.toCopyNode(n)},deleteNode:async n=>{var r;(r=t.current)==null||r.toDeleteNode(n)},getSelectedNodeId:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.state.currentSelectId},updatePage:n=>{var r,o,a,i;(i=(a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef)==null?void 0:a.current)==null||i.rerender(n)},reload:({assets:n}={})=>{var r;(r=t.current)==null||r.reloadRender({assets:n})},getComponentInstances:n=>{var r,o,a;return((a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef.current)==null?void 0:a.getInstancesById(n))||[]},getDynamicComponentInstances:n=>{var o,a,i,s;const r=(s=(i=(a=(o=t.current)==null?void 0:o.layoutRef.current)==null?void 0:a.designRenderRef.current)==null?void 0:i.renderRef.current)==null?void 0:s.dynamicComponentInstanceMap;return(r==null?void 0:r.get(n))||[]},getLayoutRef:()=>{var n;return(n=t.current)==null?void 0:n.layoutRef},getDesignerWindow:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.iframeContainer.getWindow()}}),meta:{engine:{version:"1.0.0"}}}},Cl=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||Cl(e.parentElement,t)},Gv=(e,t,n)=>{const r=(o,a)=>{var m,b,y;let i=o.children||[];Array.isArray(i)||(i=[]),i=i.filter(S=>typeof S!="string");const s=(m=n.materialsModel.findByComponentName(o.componentName))==null?void 0:m.value.title,l={title:o.title||s||o.componentName,key:o.id,children:[],parent:a,canDropPos:(b=n.getNode(o.id||""))!=null&&b.isContainer()?void 0:["after","before"]},c=[],u={title:"SLOT",key:`${o.id}-SLOT`,children:c,canBeSelected:!1,canDropPos:!1,parent:null,containerRender:({treeNodeView:S})=>w("div",{style:{border:"1px solid #a97cf8",borderTopWidth:"6px",marginRight:"2px",marginTop:"5px"},children:S})},d=o.props||{},f=(S,E,x)=>{if(be.isJSSlotPropNode(S)){const O=S,C=n.getNode(o.id);let R="";if(C){const j=p(C,[...x,E]);R=be.getMTitle(j)}let N=E;R&&(N=be.getMTitle(R)||E);const T={title:N,key:`${o.id}-${x.join("_")}`,children:[],canBeSelected:!1,canDrag:!1,canDropPos:["current"],parent:u};let k=[];O.value&&!Array.isArray(O.value)?k=[O.value]:k=O.value,T.children=Gv(k,T,n),c.push(T);return}if(Ii(S)){const O=S;Object.keys(O).forEach(C=>{f(O[C],C,[...x,E])})}Array.isArray(S)&&S.forEach((C,R)=>{f(C,String(R),[...x,E])})},p=(S,E)=>{const x=YA(S),v=E.map(O=>String(parseInt(O,10))===O?"$NUM":O);return x[v.join(".")]||""};Object.keys(d).forEach(S=>{f(d[S],S,[])}),c.length>0&&((y=l.children)==null||y.push(u),u.parent=l);const h=i.map(S=>r(S,l))||[];return l.children=[...l.children,...h],l};return Array.isArray(e)?e.map(o=>r(o,t)):r(e,t)},KA=(e,t)=>{const n=e.componentsTree;let r=n.children||[];Array.isArray(r)||(r=[]);const o={title:"Page",key:n.id||"Page",rootNode:!0,children:[]};return o.children=Gv(r,o,t),[o]},ms=(e,t)=>{let n=[];Array.isArray(e)?n=e:n=[e];let r=!1;const o=(a,i)=>{var l;if(r)return;i(a)?r=!0:(l=a.children)==null||l.forEach(c=>{o(c,i)})};n.forEach(a=>{o(a,t)})};function qA(e){const{point:t,dom:n}=e;let r;const o=t,a=n.getBoundingClientRect(),i=a.height,s=a.x+50,l=a.y+Math.round(i/2);return o.y>l?r="after":r="before",o.x>s&&r==="after"&&(r="current"),{pos:r,direction:"vertical"}}const YA=e=>{var o;const t={},n=(o=e.material)==null?void 0:o.value.props;if(!n)return t;const r=(a,i)=>{var s,l;if(Ii(a)){const c=[...i],u=a,d=u.componentName;if(d==="ArraySetter"){const p=((s=u.props)==null?void 0:s.item.setters)||[],h=t[i.join(".")];let m="";typeof h=="string"?m=h:m=h.label,c.push("$NUM"),p.forEach(b=>{m=`${m}`,t[c.join(".")]=m,r(b,c)})}else d==="ShapeSetter"&&(((l=u.props)==null?void 0:l.elements)||[]).forEach(h=>{const m=[...c];m.push(h.name),t[m.join(".")]=h.title,(h.setters||[]).forEach(y=>{r(y,[...m])})})}};return n.forEach(a=>{let i=null;be.isSpecialMaterialPropType(a)?i=a.content:i=a;let s=[];Array.isArray(i)?s=i:s=[i],s.forEach(l=>{var u;const c=[l.name];t[c.join(".")]=l.title,(u=l.setters)==null||u.forEach(d=>{r(d,c)})})}),t};var wr=(e=>(e.DRAGGING="DRAGGING",e.NORMAL="NORMAL",e))(wr||{});const Kv=g.createContext({state:{treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:!1,dragState:"NORMAL",pageModel:null},updateState:()=>{},onSelectNode:()=>{},onDeleteNode:e=>{},onCopyNode:e=>{}}),XA="_contentBox_1tkrj_2",JA="_nodeBox_1tkrj_13",QA="_toolbarBox_1tkrj_17",ZA="_iconItem_1tkrj_21",eD="_nodeContent_1tkrj_25",tD="_selected_1tkrj_35",nD="_nodeArrow_1tkrj_38",rD="_expanded_1tkrj_41",oD="_nodeRenderView_1tkrj_45",aD="_nodeChildren_1tkrj_56",iD="_dropAnchorLine_1tkrj_73",sD="_arrowSpan_1tkrj_82",it={contentBox:XA,nodeBox:JA,toolbarBox:QA,iconItem:ZA,nodeContent:eD,selected:tD,nodeArrow:nD,expanded:rD,nodeRenderView:oD,nodeChildren:aD,dropAnchorLine:iD,arrowSpan:sD},yr="data-drag-key",qv=e=>{var F,ne,Z,ue;const t=g.useRef({titleEditable:!1}),{level:n=0,item:r,paths:o=["0"]}=e,[a,i]=g.useState(!0),{state:s,updateState:l,onSelectNode:c,onDeleteNode:u,getDesignerHandler:d,onCopyNode:f}=g.useContext(Kv),[p,h]=g.useState((F=t.current)==null?void 0:F.titleEditable),[m,b]=g.useState("");t.current.titleEditable=p;const y=s.expandKeys.find(A=>A===r.key),S=A=>{let I=s.expandKeys;A!==void 0?A===!0?y||I.push(r.key||""):y&&(I=I.filter(G=>G!==r.key)):y?I=I.filter(G=>G!==r.key):I.push(r.key||""),l({expandKeys:I})},E=s.currentSelectNodeKeys.find(A=>A===r.key),x=g.useRef(null),v=()=>{var I;if(S(!0),p){(I=x==null?void 0:x.current)==null||I.focus();return}if(r.canBeSelected!==void 0&&r.canBeSelected===!1)return;let A=s.currentSelectNodeKeys;if(!s.multiSelect){r.key?c==null||c({keys:[r.key],node:r}):c==null||c({keys:[],node:r}),l({currentSelectNodeKeys:[String(r.key)]});return}E?A=A.filter(G=>G!==r.key):A.push(String(r.key)),c==null||c({keys:A,node:r}),l({currentSelectNodeKeys:A})},O=20,C=O*n,R=r.canBeSelected??!0,N={[yr]:r.key},T=g.useRef(),k=g.useRef();k.current=s,T.current=A=>{const I=s.expandKeys,G=Array.from(new Set([...I,A]));l({expandKeys:G})};const j=g.useRef(null);g.useEffect(()=>{var ie,de;let A=0;(ie=j.current)==null||ie.addEventListener("mouseenter",()=>{A=window.setTimeout(()=>{var we,fe;((we=k.current)==null?void 0:we.dragState)===wr.DRAGGING&&((fe=T.current)==null||fe.call(T,r.key||""))},.8*1e3)}),(de=j.current)==null||de.addEventListener("mouseleave",()=>{clearTimeout(A)});const I=we=>{var fe;if(t.current.titleEditable){if(we.target===((fe=x.current)==null?void 0:fe.input))return;h(!1),L.updateValue()}};let G;return(async()=>{const we=await e.pluginCtx.pluginManager.get("Designer"),fe=we==null?void 0:we.export,Ee=fe==null?void 0:fe.getDesignerWindow();Ee==null||Ee.addEventListener("click",I),G=Ee||null})(),document.addEventListener("click",I),()=>{A&&clearTimeout(A),document.removeEventListener("click",I),G==null||G.removeEventListener("click",I)}},[]);const L=(ne=s.pageModel)==null?void 0:ne.getNode(r.key||""),M=()=>{const A=!a;if(!L)return;const I=L.value.configure.devState??{};I.condition=A,L.value.configure.devState=I,L.updateValue(),i(A)};let P=r.title;r.titleViewRender&&(P=r.titleViewRender({item:r,titleView:r.title}));const D=ee("div",{className:it.nodeBox,children:[ee("div",{className:dt([it.nodeContent,E&&R&&it.selected]),style:{marginLeft:`${-C}px`,paddingLeft:`${C+8}px`},onMouseMove:async()=>{if(!r.key)return;const A=await(d==null?void 0:d()),I=A==null?void 0:A.getDynamicComponentInstances(r.key);typeof(I==null?void 0:I._CONDITION)<"u"&&i(I==null?void 0:I._CONDITION)},children:[(Z=r.children)!=null&&Z.length?w("span",{style:{paddingRight:"5px"},className:it.arrowSpan,onClickCapture:()=>S(),children:w(F0,{className:dt([it.nodeArrow,y&&it.expanded])})}):null,ee("div",{className:it.nodeRenderView,...N,ref:j,onClick:v,onDoubleClick:()=>{var te;if(!L)return;const A=L,I=(te=A.materialsModel.findByComponentName(A.value.componentName))==null?void 0:te.value.title,G=A.value.title||I||A.value.componentName||"";b(G),h(!0),setTimeout(()=>{var ie;(ie=x.current)==null||ie.focus()},16.66)},children:[!p&&P,p&&w("div",{style:{paddingRight:"10px"},children:w(Y.Input,{size:"small",maxLength:20,style:{},ref:x,value:m,onPressEnter:()=>{h(!1),L.updateValue()},onChange:A=>{L.value.title=A.target.value,b(A.target.value)}})})]}),!p&&!r.rootNode&&ee("div",{className:it.toolbarBox,children:[ee("div",{className:it.iconItem,children:[!a&&w(T0,{onClick:M}),a&&w(wh,{onClick:M})]}),w("div",{className:it.iconItem,onClick:()=>{f(r.key||"")},children:w(gh,{})}),w("div",{className:it.iconItem,onClick:()=>{u(r.key||"")},children:w(tc,{})})]})]}),w("div",{className:dt([it.nodeChildren,E&&it.selected]),style:{paddingLeft:`${O}px`,height:y?"auto":"0"},children:y&&((ue=r.children)==null?void 0:ue.map((A,I)=>{const G=`${A.key}-${I}`;return w(qv,{item:A,paths:[...o,I],level:n+1,pluginCtx:e.pluginCtx},G)}))})]});return r.containerRender?r.containerRender({item:r,treeNodeView:D}):D};class lD extends g.Component{constructor(n){super(n);B(this,"domRef");B(this,"disposeCbList",[]);B(this,"sensor");B(this,"getDesignerHandler",async()=>{const n=await this.props.pluginCtx.pluginManager.get("Designer");return n==null?void 0:n.export});B(this,"updateTreeDataFromNode",()=>{const{pluginCtx:n}=this.props,{pageModel:r}=n,o=r.export(),a=KA(o,r);this.setState({treeData:a})});B(this,"getParentKeyPaths",n=>{const{treeData:r}=this.state;let o=null;if(ms(r,a=>a.key===n?(o=a,!0):!1),o){let a=o==null?void 0:o.parent;const i=[];for(;a;)a.key&&i.push(a.key),a=a.parent;return i}else return[]});B(this,"scrollNodeToView",n=>{var o;const r=document.querySelector(`[${yr}="${n}"]`);(o=r==null?void 0:r.scrollIntoView)==null||o.call(r,{behavior:"smooth",block:"center"})});B(this,"toSelectTreeNode",n=>{if(!n){this.setState({currentSelectNodeKeys:[]});return}const r=this.getParentKeyPaths(n.id);$t.debug("onSelectNodeChange parent path",r,n);const o=Array.from(new Set([...this.state.expandKeys,...r]));$t.debug("onSelectNodeChange newExpandKeys",o,n),this.setState({currentSelectNodeKeys:[n.id],expandKeys:o}),setTimeout(()=>{this.scrollNodeToView(n.id)},100)});B(this,"containNode",(n,r)=>{let o=null;return ms(n,a=>a.key===r.key?(o=a,!0):!1),o});B(this,"getTreeNodeByKey",n=>{const{treeData:r}=this.state;let o=null;return ms(r,a=>a.key===n?(o=a,!0):!1),o});B(this,"registerDragEvent",async()=>{if(!this.domRef.current)return;const n=new Xn.Sensor({container:this.domRef.current,name:"OutlineTree",eventPriority:999}),{pluginCtx:r}=this.props,o=r.pageModel,a=await this.getDesignerHandler(),i=a.getDnd();n.setCanDrag(async s=>{var m;const l=s.event.target;if(!l)return;const c=Cl(l,yr);if(!c)return;const u=o.getNode(c),d=this.getTreeNodeByKey(c);if((d==null?void 0:d.canDrag)!==void 0&&(d==null?void 0:d.canDrag)===!1)return;const f=a.getInstance(),p=await(f==null?void 0:f.customAdvanceHook.canDrag({dragNode:u,eventObj:{extraData:{},...s,from:s.event,fromSensor:n,fromPointer:s.pointer}}));if(p===!1)return!1;if(!u){console.log("targetNode not found");return}const h={...s,extraData:{dragNode:u,dragNodeUID:u.id}};return typeof p=="object"&&(h.extraData.dragNode=p.dragNode,h.extraData.dragNodeUID=((m=p.dragNode)==null?void 0:m.id)||""),h}),n.setCanDrop(async s=>{var S;const l=s.event.target;if(!l)return $t.debug("drop dom not found"),s;const c=Cl(l,yr);if(!c)return $t.debug("targetNodeId dom not found",s,l,yr),s;const u=this.getTreeNodeByKey(c);if((u==null?void 0:u.canDropPos)!==void 0&&u.canDropPos===!1)return $t.debug("node can not be drop by tree node config"),s;const d=o.getNode(c);if(!d)return $t.debug("targetNode not found"),s;const f=(S=s.extraData)==null?void 0:S.dragNode;if(!f)return $t.debug("startNode not found"),s;if((f==null?void 0:f.id)===d.id)return $t.debug("startNode and dropNode is the same"),s;if(f.contains(d.id))return $t.debug("startNode contain dropNode"),s;const h=qA({point:s.pointer,dom:l});if(Array.isArray(u==null?void 0:u.canDropPos)&&!(u!=null&&u.canDropPos.includes(h.pos)))return!1;$t.info("can dropNode",d);const m={...s,extraData:{...s.extraData,dropPosInfo:h,dropNode:d,dropNodeUID:d.id}},b=a.getInstance(),y=await(b==null?void 0:b.customAdvanceHook.canDrop({dragNode:m.extraData.dragNode,dropNode:d,eventObj:{...m,from:m.event,fromSensor:n,fromPointer:m.pointer}}));return y===!1?!1:(typeof y=="object"&&(m.extraData={...m.extraData,...y}),m)}),i.registerSensor(n),n.emitter.on("dragging",s=>{var p,h;const l=s.extraData.dropNode;if(this.setState({dragState:wr.DRAGGING}),!l){this.setState({dropPosInfo:null});return}const c=(p=document.querySelectorAll(`[${yr}="${l.id}"]`))==null?void 0:p[0];if(!c)return;const u=((h=s.extraData)==null?void 0:h.dropPosInfo)||{},d=c.getBoundingClientRect(),f={x:0,y:0};f.x=d.x,u.pos==="before"?f.y=d.y:u.pos==="after"?f.y=d.y+d.height:(f.y=d.y+d.height,f.x=d.x+20),this.setState({dropPosInfo:f})}),n.emitter.on("dragEnd",()=>{this.setState({dragState:wr.NORMAL})}),this.sensor=n});this.domRef=g.createRef(),this.state={treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:n.multiSelect||!1,dropPosInfo:{x:0,y:0},pageModel:n.pluginCtx.pageModel,dragState:wr.NORMAL}}async componentDidMount(){this.updateTreeDataFromNode();const{pluginCtx:n}=this.props,{pageModel:r}=n;r.emitter.on("*",()=>{this.updateTreeDataFromNode()}),n.globalEmitter.on("onSelectNodeChange",({node:i})=>{this.toSelectTreeNode(i)}),n.getWorkbench().emitter.on("leftPanelVisible",({visible:i,panelName:s})=>{if(i&&s==="OutlineTree"){console.log("visible, panelName",i,s);const l=n.engine.getActiveNode();l&&this.toSelectTreeNode(l)}});const a=n.engine.getActiveNode();a&&this.toSelectTreeNode(a),await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent()}render(){const{treeData:n,dragState:r,dropPosInfo:o}=this.state,{pluginCtx:a}=this.props;return w(Kv.Provider,{value:{sensor:this.sensor,state:this.state,getDesignerHandler:this.getDesignerHandler,onSelectNode:async({keys:i})=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}const l=(i==null?void 0:i[0])||"",c=a.pageModel.getNode(l);s.export.selectNode(l),c&&a.engine.updateCurrentSelectNode(c)},updateState:i=>{this.setState(i)},onDeleteNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.deleteNode(i)},onCopyNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.copyNode(i)}},children:ee("div",{className:it.contentBox,ref:this.domRef,children:[n.map((i,s)=>w(qv,{item:i,pluginCtx:this.props.pluginCtx},i.key+`${s}`)),r===wr.DRAGGING&&o&&w("div",{className:it.dropAnchorLine,style:{left:`${o.x}px`,top:`${o.y}px`}})]})})}}const cD={pluginName:"大纲树"},uD={pluginName:"Layout Tree"},If={zh_CN:cD,en_US:uD},Ol="OutlineTree",ys=`plugin:${Ol}`,dD={name:Ol,async init(e){const{i18n:t}=e;Object.keys(If).forEach(a=>{t.addResourceBundle(a,ys,If[a],!0,!0)});const n=Ir(ys)(lD),r=Ir(ys)(({t:a})=>w(Ye,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:Ol,icon:w(l0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},fD="_CFromRenderBox_1vsdm_2",pD={CFromRenderBox:fD},Gc=g.createContext({formName:"",formState:{},conditionConfig:{},updateContext:()=>{},updateConditionConfig:()=>{},customSetterMap:{}}),Yv={},hD=e=>{Object.assign(Yv,e)};class Kc extends g.Component{constructor(n){super(n);B(this,"updateContext");B(this,"getFieldsValue",()=>this.formatValue(this.state.formState));B(this,"setFields",n=>{this.setState({formState:n})});B(this,"formatValue",n=>{const r={},o=this.state.conditionConfig;return Object.keys(n).forEach(a=>{var s;(((s=o[a])==null?void 0:s.call(o,n))??!0)&&(r[a]=n[a])}),r});this.updateContext=r=>{var o,a;this.setState({formState:r,customSetterMap:Yv}),(a=(o=this.props).onValueChange)==null||a.call(o,this.formatValue(r))},this.state={formName:n.name,formState:n.initialValue??{},conditionConfig:{},customSetterMap:n.customSetterMap||{},updateContext:this.updateContext,updateConditionConfig:(r,o)=>{this.setState({conditionConfig:{...this.state.conditionConfig,[r]:o}})}}}render(){const{state:n}=this,{children:r}=this.props;return w(Gc.Provider,{value:n,children:r})}}class gD extends TypeError{constructor(t,n){let r;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=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function vD(e){return Ft(e)&&typeof e[Symbol.iterator]=="function"}function Ft(e){return typeof e=="object"&&e!=null}function Ct(e){return typeof e=="string"?JSON.stringify(e):""+e}function mD(e){const{done:t,value:n}=e.next();return t?void 0:n}function yD(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Ct(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*Lf(e,t,n,r){vD(e)||(e=[e]);for(const o of e){const a=yD(o,t,n,r);a&&(yield a)}}function*qc(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Ft(t.schema)&&Ft(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=qc(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Ft(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class on{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:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return Lf(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return Lf(u,c,this,l)}:this.refiner=()=>[]}assert(t){return bD(t,this)}create(t){return wD(t,this)}is(t){return xD(t,this)}mask(t){return SD(t,this)}validate(t,n){return n===void 0&&(n={}),ro(t,this,n)}}function bD(e,t){const n=ro(e,t);if(n[0])throw n[0]}function wD(e,t){const n=ro(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function SD(e,t){const n=ro(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function xD(e,t){return!ro(e,t)[0]}function ro(e,t,n){n===void 0&&(n={});const r=qc(e,t,n),o=mD(r);return o[0]?[new gD(o[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function CD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?Qv(a):Te(a)}function Dn(e,t){return new on({type:e,schema:null,validator:t})}function Br(e){return new on({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function OD(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return Qv(r);default:return Te(r)}}function Ue(){return Dn("any",()=>!0)}function qe(e){return new on({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Ct(t)}})}function zr(){return Dn("boolean",e=>typeof e=="boolean")}function El(e){const t={},n=e.map(r=>Ct(r)).join();for(const r of e)t[r]=r;return new on({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Ct(r)}})}function Xv(){return Dn("func",e=>typeof e=="function"||"Expected a function, but received: "+Ct(e))}function Qt(e){const t=Ct(e),n=typeof e;return new on({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Ct(r)}})}function ED(){return Dn("never",()=>!1)}function Jv(){return Dn("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Ct(e))}function Te(e){const t=e?Object.keys(e):[],n=ED();return new on({type:"object",schema:e||null,*entries(r){if(e&&Ft(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Ft(r)||"Expected an object, but received: "+Ct(r)},coercer(r){return Ft(r)?{...r}:r}})}function X(e){return new on({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function To(e,t){return new on({type:"record",schema:null,*entries(n){if(Ft(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function q(){return Dn("string",e=>typeof e=="string"||"Expected a string, but received: "+Ct(e))}function Qv(e){const t=Object.keys(e);return new on({type:"type",schema:e,*entries(n){if(Ft(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function St(e){const t=e.map(n=>n.type).join(" | ");return new on({type:"union",schema:null,coercer(n,r){return(e.find(a=>{const[i]=a.validate(n,{coerce:!0});return!i})||_D()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=qc(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Ct(n),...o]}})}function _D(){return Dn("unknown",()=>!0)}const Zv=Te({package:q(),version:q(),name:q(),exportName:X(q()),destructuring:X(zr()),subName:X(q()),main:X(q()),cssPaths:X(qe(q()))});qe(Zv);var Rn=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Rn||{}),_l=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(_l||{});const RD=()=>Dn("normalObj",e=>!Ii(e)||[Rn.SLOT,Rn.EXPRESSION,Rn.FUNCTION].includes(e==null?void 0:e.type)?!1:(ro(e,To(q(),Yc)),!0)),Yc=St([q(),Jv(),zr(),Te({type:Qt(Rn.SLOT),renderType:El([_l.FUNC,_l.COMP]),params:X(qe(q())),value:Br(()=>St([ui,qe(ui)]))}),Te({type:Qt(Rn.EXPRESSION),value:q()}),Te({type:Qt(Rn.FUNCTION),value:q()}),RD(),qe(Br(()=>Yc))]),Bf=Te({type:Qt(Rn.EXPRESSION),value:q()}),ui=Te({id:X(q()),title:X(q()),componentName:q(),props:X(To(q(),Yc)),nodeName:X(q()),state:X(To(q(),Ue())),children:Br(()=>X(qe(St([q(),ui])))),configure:X(Ue()),css:X(Ue()),style:X(Ue()),classNames:X(qe(Ue())),refId:X(q()),extra:X(To(Ue(),Ue())),condition:X(St([zr(),Bf])),loop:X(Te({open:zr(),data:St([qe(Ue()),Bf]),args:X(qe(q())),forName:X(q()),forIndex:X(q()),key:X(Ue()),name:X(q())})),methods:X(qe(Ue()))}),ND=e=>Ii(e)?e.label:e,di=St([q(),Te({label:q(),tip:X(q())})]),TD=Te({type:Qt("shape"),value:qe(Te({name:q(),title:di,valueType:Br(()=>Li)}))}),PD=Te({type:Qt("enums"),value:qe(q())});Te({type:Qt("array"),value:Br(()=>Li)});const kD=Te({type:Qt("array"),value:Br(()=>qe(Li))}),Li=St([El(["array","boolean","number","object","string"]),El(["component","expression","function"]),TD,PD,kD]),jD=St([q(),Te({componentName:q(),props:X(Ue()),initialValue:X(Ue()),component:X(Ue())})]),bs=Te({name:q(),title:di,valueType:Li,description:X(q()),defaultValue:Ue(),setters:X(qe(jD)),condition:X(Xv())});St([q(),Xv()]);St([q(),Te({name:q(),describe:X(q()),params:X(Te({name:q(),description:q()})),template:q()})]);const MD=Te({id:X(q()),title:q(),snapshot:St([q(),Ue()]),snapshotText:X(q()),description:X(q()),tags:X(qe(q())),groupName:X(q()),category:X(q()),schema:CD(OD(ui,["id"]),Te({componentName:X(q())}))});Te({componentName:q(),title:q(),screenshot:X(q()),icon:X(q()),tags:X(qe(q())),groupName:X(q()),category:X(q()),priority:X(Jv()),npm:X(Zv),snippets:qe(MD),props:qe(St([bs,Te({title:X(di),type:Qt("single"),content:bs}),Te({title:X(di),type:Qt("group"),content:qe(bs)})])),fixedProps:X(Ue()),isContainer:X(St([zr(),Te({placeholder:q(),width:q(),height:q()})])),disableEditorDragDom:X(Ue()),isLayout:X(zr()),rootSelector:X(q()),advanceCustom:X(Ue()),extra:X(To(Ue(),Ue()))});const em=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});em.setterName="字符设置器";const tm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.InputNumber,{style:{width:"100%"},...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}})});tm.setterName="数字设置器";const Xc=(e=[])=>e.map(t=>typeof t=="string"?{componentName:t}:t);function AD(e){const{index:t,keyPaths:n,setters:r}=e,o={...e.style},a={[t]:e.value},i=g.useRef(null);return g.useEffect(()=>{var s;(s=i.current)==null||s.setFields({[t]:e.value})},[e.value]),w("div",{style:o,children:w(Kc,{ref:i,name:String(t),initialValue:a||{},onValueChange:e.onValueChange,customSetterMap:{},children:w(lu,{suffix:w("div",{onClick:e.onDelete,style:{marginLeft:"8px",cursor:"pointer",fontSize:"12px"},children:w(tc,{})}),name:String(t),label:`元素${t}`,keyPaths:[...n,String(t)],setters:r})})})}function DD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Bi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function oo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Jc(e){return"nodeType"in e}function gt(e){var t,n;return e?oo(e)?e:Jc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Qc(e){const{Document:t}=gt(e);return e instanceof t}function ra(e){return oo(e)?!1:e instanceof gt(e).HTMLElement}function $D(e){return e instanceof gt(e).SVGElement}function ao(e){return e?oo(e)?e.document:Jc(e)?Qc(e)?e:ra(e)?e.ownerDocument:document:document:document}const Wt=Bi?g.useLayoutEffect:g.useEffect;function Zc(e){const t=g.useRef(e);return Wt(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function ID(){const e=g.useRef(null),t=g.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Go(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Wt(()=>{n.current!==e&&(n.current=e)},t),n}function oa(e,t){const n=g.useRef();return g.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fi(e){const t=Zc(e),n=g.useRef(null),r=g.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Rl(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let ws={};function aa(e,t){return g.useMemo(()=>{if(t)return t;const n=ws[e]==null?0:ws[e]+1;return ws[e]=n,e+"-"+n},[e,t])}function nm(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,i)=>{const s=Object.entries(i);for(const[l,c]of s){const u=a[l];u!=null&&(a[l]=u+e*c)}return a},{...t})}}const _r=nm(1),Ko=nm(-1);function LD(e){return"clientX"in e&&"clientY"in e}function eu(e){if(!e)return!1;const{KeyboardEvent:t}=gt(e.target);return t&&e instanceof t}function BD(e){if(!e)return!1;const{TouchEvent:t}=gt(e.target);return t&&e instanceof t}function Nl(e){if(BD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return LD(e)?{x:e.clientX,y:e.clientY}:null}const Vr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Vr.Translate.toString(e),Vr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),zf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function zD(e){return e.matches(zf)?e:e.querySelector(zf)}const VD={display:"none"};function FD(e){let{id:t,value:n}=e;return w("div",{id:t,style:VD,children:n})}const HD={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function UD(e){let{id:t,announcement:n}=e;return w("div",{id:t,style:HD,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function WD(){const[e,t]=g.useState("");return{announce:g.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const rm=g.createContext(null);function GD(e){const t=g.useContext(rm);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function KD(){const[e]=g.useState(()=>new Set),t=g.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[g.useCallback(r=>{let{type:o,event:a}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,a)})},[e]),t]}const qD={draggable:`
|
|
159
|
+
`),j="%c".concat([$,O].filter(Boolean).join(":"));typeof x.args[0]=="string"?C.apply(void 0,["".concat(j,"%c ").concat(x.args[0]),P,""].concat(l(x.args.slice(1)))):C.apply(void 0,[j,P].concat(l(x.args)))}}]),S}();return typeof window<"u"&&window.consola||((w=new y({reporters:[new _]})).Consola=y,w.LogLevel=d,w.BrowserReporter=_,w)})})(fx);var KD=fx.exports;const qD=Sl(KD),dn=qD.create({level:1}),ar=({time:e=1e3/60*2,cb:t}={})=>new Promise(n=>{setTimeout(()=>{n("ok"),t==null||t()},e)});class XD extends b.Component{constructor(n){super(n);V(this,"emitter");V(this,"leftPanelContentRef");V(this,"addLeftPanel",n=>{this.state.leftPanels.push(n),this.setState({leftPanels:[...this.state.leftPanels]})});V(this,"replaceLeftPanel",(n,r)=>{const o=this.state.leftPanels.findIndex(a=>a.name===n);if(o>-1){const a=[...this.state.leftPanels];a[o]=r,this.setState({leftPanels:a})}});V(this,"openLeftPanel",async n=>{const r=n||this.state.currentActiveLeftPanel;this.setState({leftBoxVisible:!0,leftBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:r}),await ar(),this.emitter.emit("leftPanelVisible",{visible:!0,panelName:r})});V(this,"closeLeftPanel",async()=>{this.setState({leftBoxVisible:!1,leftBoxSize:{width:0,height:"100%"}}),await ar(),this.emitter.emit("leftPanelVisible",{visible:!1,panelName:this.state.currentActiveLeftPanel})});V(this,"toggleLeftPanel",()=>{const{leftBoxVisible:n}=this.state;!n?this.openLeftPanel():this.closeLeftPanel()});V(this,"onPluginIconClick",n=>{const{currentActiveLeftPanel:r}=this.state;r===n.name&&this.state.leftBoxVisible?this.closeLeftPanel():this.openLeftPanel(n.name)});V(this,"openRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!0,rightBoxSize:{width:400,height:n.height}})});V(this,"closeRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!1,rightBoxSize:{width:0,height:n.height}})});V(this,"replaceBodyView",n=>{this.setState({bodyView:n})});V(this,"replaceRightView",n=>{this.setState({rightView:n})});V(this,"replaceTopBarView",n=>{this.setState({topToolBarView:n})});V(this,"replaceSubTopBarView",n=>{this.setState({subTopToolBarView:n})});V(this,"toggleRightPanel",()=>{const{rightBoxVisible:n,rightBoxSize:r}=this.state,o=!n;this.setState({rightBoxVisible:o,rightBoxSize:{width:o?400:0,height:r.height}})});V(this,"onLeftBoxResizeStop",(n,r,o,a)=>{const i=this.state.leftBoxSize.width+a.width;this.setState({leftBoxSize:{width:i,height:this.state.leftBoxSize.height}})});V(this,"onGlobalClick",n=>{var r;n.target&&((r=this.leftPanelContentRef.current)!=null&&r.contains(n.target))||!this.state.leftBoxFixed&&this.state.leftBoxVisible&&this.closeLeftPanel()});this.emitter=n.emitter||qs(),this.leftPanelContentRef=b.createRef(),this.state={leftBoxVisible:!0,leftBoxSize:{width:300,height:"100%"},leftBoxFixed:!0,rightBoxVisible:!0,rightBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:"OutlineTree",leftPanels:[],bodyView:null,rightView:null,topToolBarView:null,subTopToolBarView:null,customViewList:[]}}addCustomView(n){const r=this.state.customViewList;return r.push(n),this.setState({customViewList:[...r]}),()=>{const o=this.state.customViewList.filter(a=>a!==n);this.setState({customViewList:[...o]})}}componentDidMount(){document.addEventListener("click",this.onGlobalClick)}render(){const{leftBoxVisible:n,leftBoxSize:r,leftBoxFixed:o,rightBoxSize:a,rightBoxVisible:i,leftPanels:s,currentActiveLeftPanel:l,bodyView:c,rightView:u,topToolBarView:f,subTopToolBarView:d,customViewList:h}=this.state,v={};o||(v.position="absolute",v.left="50px",v.top=0);const g=s.find(x=>x.name===l),m=(g==null?void 0:g.render)||null,{onPluginIconClick:y,toggleRightPanel:w,toggleLeftPanel:_,onLeftBoxResizeStop:S}=this;return M("div",{className:Xe.workbenchContainer,children:[p("div",{className:Xe.topToolBarBox,children:p("div",{className:Xe.topToolBarView,children:f})}),M("div",{className:Xe.bodyContent,children:[M("div",{className:Xe.leftBox,ref:this.leftPanelContentRef,children:[p("div",{className:Xe.pluginIconBar,children:s.map(x=>p("div",{onClick:()=>y(x),className:Ge([Xe.pluginIconItem,(g==null?void 0:g.name)===x.name&&Xe.active]),children:x.icon},x.name))}),n&&M(cp,{className:Xe.pluginPanelBoxResizeBox,size:r,style:v,minWidth:300,maxWidth:600,enable:{right:n},onResizeStop:S,children:[M("div",{className:Xe.pluginHeader,children:[p("span",{className:Xe.pluginNameText,children:(g==null?void 0:g.title)||(g==null?void 0:g.name)}),p(A.Button,{className:Ge([Xe.fixedBtn]),type:"text",size:"small",onClick:()=>{this.setState({leftBoxFixed:!this.state.leftBoxFixed})},children:p(g_,{className:Ge([o&&Xe.active])})}),p(A.Button,{className:Xe.closeBtn,type:"text",size:"small",onClick:_,children:p(UC,{})})]}),p("div",{className:Xe.pluginPanelBox,children:m})]})]}),M("div",{className:Xe.centerBox,children:[d&&p("div",{className:Xe.subTopToolbarBox,children:d}),p("div",{className:Xe.canvasBox,children:p("div",{className:Xe.scrollBox,children:c})})]}),M("div",{className:Xe.rightResizeBox,children:[p("div",{className:Xe.arrowCursor,onClick:w,children:p(e_,{className:Ge([!i&&Xe.active])})}),p("div",{style:{display:i?"block":"none",height:"100%"},children:p(cp,{minWidth:400,maxWidth:600,enable:{left:i},size:a,onResizeStop:(x,C,O,$)=>{this.setState({rightBoxSize:{width:this.state.rightBoxSize.width+$.width,height:this.state.rightBoxSize.height}})},children:p("div",{className:Xe.rightBox,children:u})})})]})]}),gn.createPortal(p("div",{className:Xe.customViewBox,children:h.map(x=>p("div",{style:{pointerEvents:"auto",display:"inline-block"},children:x.view},x.key))}),document.body)]})}}const YD="_engineContainer_f3ly9_2",JD={engineContainer:YD};function Rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rb(r.key),r)}}function $t(e,t,n){return t&&Zg(e.prototype,t),n&&Zg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rf(e,t){return rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},rf(e,t)}function ma(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rf(e,t)}function ba(e,t){if(t&&(Ie(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jn(e)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},an(e)}function dx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hx(e){return ob(e)||dx(e)||Uf(e)||ab()}function ev(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ev(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ev(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var QD={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},ZD=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Rt(this,e),this.init(t,n)}return $t(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||QD,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,a){return a&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,tv(tv({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),An=new ZD,Sr=function(){function e(){Rt(this,e),this.observers={}}return $t(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.observers[n]){var i=[].concat(this.observers[n]);i.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function Fa(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function nv(e){return e==null?"":""+e}function eI(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Wd(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={}}return o()?{}:{obj:e,k:r(a.shift())}}function rv(e,t,n){var r=Wd(e,t,Object),o=r.obj,a=r.k;o[a]=n}function tI(e,t,n,r){var o=Wd(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}function il(e,t){var n=Wd(e,t),r=n.obj,o=n.k;if(r)return r[o]}function ov(e,t,n){var r=il(e,n);return r!==void 0?r:il(t,n)}function px(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):px(e[r],t[r],n):e[r]=t[r]);return e}function go(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var nI={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function rI(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return nI[t]}):e}var Vl=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,oI=[" ",",","?","!",";"];function aI(e,t,n){t=t||"",n=n||"";var r=oI.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function av(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?av(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):av(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iI(e){var t=sI();return function(){var r=an(e),o;if(t){var a=an(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return ba(this,o)}}function sI(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gx(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o||typeof o[r[a]]=="string"&&a+1<r.length)return;if(o[r[a]]===void 0){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];l===void 0&&r.length>a+i;)i++,s=r.slice(a,a+i).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var c=r.slice(a+i).join(n);return c?gx(l,c,n):void 0}o=o[r[a]]}return o}}var lI=function(e){ma(n,e);var t=iI(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Rt(this,n),o=t.call(this),Vl&&Sr.call(jn(o)),o.data=r||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return $t(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[o,a];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(l?i.split(l):i)),o.indexOf(".")>-1&&(u=o.split("."));var f=il(this.data,u);return f||!c||typeof i!="string"?f:gx(this.data&&this.data[o]&&this.data[o][a],i,l)}},{key:"addResource",value:function(o,a,i,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[o,a];i&&(u=u.concat(c?i.split(c):i)),o.indexOf(".")>-1&&(u=o.split("."),s=a,a=u[1]),this.addNamespaces(a),rv(this.data,u,s),l.silent||this.emit("added",o,a,i,s)}},{key:"addResources",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in i)(typeof i[l]=="string"||Object.prototype.toString.apply(i[l])==="[object Array]")&&this.addResource(o,a,l,i[l],{silent:!0});s.silent||this.emit("added",o,a,i)}},{key:"addResourceBundle",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[o,a];o.indexOf(".")>-1&&(u=o.split("."),s=i,i=a,a=u[1]),this.addNamespaces(a);var f=il(this.data,u)||{};s?px(f,i,l):f=hs(hs({},f),i),rv(this.data,u,f),c.silent||this.emit("added",o,a,i)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?hs(hs({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),i=a&&Object.keys(a)||[];return!!i.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Sr),vx={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,a){var i=this;return t.forEach(function(s){i.processors[s]&&(n=i.processors[s].process(n,r,o,a))}),n}};function iv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cI(e){var t=uI();return function(){var r=an(e),o;if(t){var a=an(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return ba(this,o)}}function uI(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var sv={},lv=function(e){ma(n,e);var t=cI(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Rt(this,n),o=t.call(this),Vl&&Sr.call(jn(o)),eI(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,jn(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=An.create("translator"),o}return $t(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var i=this.resolve(o,a);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(o,a){var i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ns||this.options.defaultNS||[],c=i&&o.indexOf(i)>-1,u=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!aI(o,i,s);if(c&&!u){var f=o.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:o,namespaces:l};var d=o.split(i);(i!==s||i===s&&this.options.ns.indexOf(d[0])>-1)&&(l=d.shift()),o=d.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,a,i){var s=this;if(Ie(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(o[o.length-1],a),f=u.key,d=u.namespaces,h=d[d.length-1],v=a.lng||this.language,g=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(g){var m=a.nsSeparator||this.options.nsSeparator;return l?(y.res="".concat(h).concat(m).concat(f),y):"".concat(h).concat(m).concat(f)}return l?(y.res=f,y):f}var y=this.resolve(o,a),w=y&&y.res,_=y&&y.usedKey||f,S=y&&y.exactUsedKey||f,x=Object.prototype.toString.apply(w),C=["[object Number]","[object Function]","[object RegExp]"],O=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,k=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if($&&w&&k&&C.indexOf(x)<0&&!(typeof O=="string"&&x==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,w,kt(kt({},a),{},{ns:d})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(y.res=P,y):P}if(c){var j=x==="[object Array]",L=j?[]:{},F=j?S:_;for(var W in w)if(Object.prototype.hasOwnProperty.call(w,W)){var B="".concat(F).concat(c).concat(W);L[W]=this.translate(B,kt(kt({},a),{joinArrays:!1,ns:d})),L[W]===B&&(L[W]=w[W])}w=L}}else if($&&typeof O=="string"&&x==="[object Array]")w=w.join(O),w&&(w=this.extendTranslation(w,o,a,i));else{var G=!1,ne=!1,fe=a.count!==void 0&&typeof a.count!="string",D=n.hasDefaultValue(a),R=fe?this.pluralResolver.getSuffix(v,a.count,a):"",T=a["defaultValue".concat(R)]||a.defaultValue;!this.isValidLookup(w)&&D&&(G=!0,w=T),this.isValidLookup(w)||(ne=!0,w=f);var N=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,I=N&&ne?void 0:w,H=D&&T!==w&&this.options.updateMissing;if(ne||G||H){if(this.logger.log(H?"updateKey":"missingKey",v,h,f,H?T:w),c){var Y=this.resolve(f,kt(kt({},a),{},{keySeparator:!1}));Y&&Y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var J=[],re=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&re&&re[0])for(var oe=0;oe<re.length;oe++)J.push(re[oe]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(a.lng||this.language):J.push(a.lng||this.language);var ue=function(me,U,Te){var Ze=D&&Te!==w?Te:I;s.options.missingKeyHandler?s.options.missingKeyHandler(me,h,U,Ze,H,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(me,h,U,Ze,H,a),s.emit("missingKey",me,h,U,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&fe?J.forEach(function(q){s.pluralResolver.getSuffixes(q,a).forEach(function(me){ue([q],f+me,a["defaultValue".concat(me)]||T)})}):ue(J,f,T))}w=this.extendTranslation(w,o,a,y,i),ne&&w===f&&this.options.appendNamespaceToMissingKey&&(w="".concat(h,":").concat(f)),(ne||G)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(f):f,G?w:void 0):w=this.options.parseMissingKeyHandler(w))}return l?(y.res=w,y):w}},{key:"extendTranslation",value:function(o,a,i,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,kt(kt({},this.options.interpolation.defaultVariables),i),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(kt(kt({},i),{interpolation:kt(kt({},this.options.interpolation),i.interpolation)}));var u=typeof o=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(u){var d=o.match(this.interpolator.nestingRegexp);f=d&&d.length}var h=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(h=kt(kt({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,i.lng||this.language,i),u){var v=o.match(this.interpolator.nestingRegexp),g=v&&v.length;f<g&&(i.nest=!1)}i.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var w=arguments.length,_=new Array(w),S=0;S<w;S++)_[S]=arguments[S];return l&&l[0]===_[0]&&!i.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(_[0]," in key: ").concat(a[0])),null):c.translate.apply(c,_.concat([a]))},i)),i.interpolation&&this.interpolator.reset()}var m=i.postProcess||this.options.postProcess,y=typeof m=="string"?[m]:m;return o!=null&&y&&y.length&&i.applyPostProcessor!==!1&&(o=vx.handle(y,o,a,this.options&&this.options.postProcessPassResolved?kt({i18nResolved:s},i):i,this)),o}},{key:"resolve",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,f;return typeof o=="string"&&(o=[o]),o.forEach(function(d){if(!a.isValidLookup(s)){var h=a.extractFromKey(d,i),v=h.key;l=v;var g=h.namespaces;a.options.fallbackNS&&(g=g.concat(a.options.fallbackNS));var m=i.count!==void 0&&typeof i.count!="string",y=m&&!i.ordinal&&i.count===0&&a.pluralResolver.shouldUseIntlApi(),w=i.context!==void 0&&(typeof i.context=="string"||typeof i.context=="number")&&i.context!=="",_=i.lngs?i.lngs:a.languageUtils.toResolveHierarchy(i.lng||a.language,i.fallbackLng);g.forEach(function(S){a.isValidLookup(s)||(f=S,!sv["".concat(_[0],"-").concat(S)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(sv["".concat(_[0],"-").concat(S)]=!0,a.logger.warn('key "'.concat(l,'" for languages "').concat(_.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(function(x){if(!a.isValidLookup(s)){u=x;var C=[v];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(C,v,x,S,i);else{var O;m&&(O=a.pluralResolver.getSuffix(x,i.count,i));var $="".concat(a.options.pluralSeparator,"zero");if(m&&(C.push(v+O),y&&C.push(v+$)),w){var k="".concat(v).concat(a.options.contextSeparator).concat(i.context);C.push(k),m&&(C.push(k+O),y&&C.push(k+$))}}for(var P;P=C.pop();)a.isValidLookup(s)||(c=P,s=a.getResource(x,S,P,i))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:f}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,i,s):this.resourceStore.getResource(o,a,i,s)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i)&&a===i.substring(0,a.length)&&o[i]!==void 0)return!0;return!1}}]),n}(Sr);function Nc(e){return e.charAt(0).toUpperCase()+e.slice(1)}var cv=function(){function e(t){Rt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=An.create("languageUtils")}return $t(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nc(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nc(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Nc(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(a){if(!o){var i=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(i))&&(o=i)}}),!o&&this.options.supportedLngs&&n.forEach(function(a){if(!o){var i=r.getLanguagePartFromCode(a);if(r.isSupportedCode(i))return o=i;o=r.options.supportedLngs.find(function(s){if(s.indexOf(i)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],s=function(c){c&&(o.isSupportedCode(c)?i.push(c):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),a.forEach(function(l){i.indexOf(l)<0&&s(o.formatLanguageCode(l))}),i}}]),e}(),fI=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],dI={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},hI=["v1","v2","v3"],uv={zero:0,one:1,two:2,few:3,many:4,other:5};function pI(){var e={};return fI.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:dI[t.fc]}})}),e}var gI=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Rt(this,e),this.languageUtils=t,this.options=n,this.logger=An.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=pI()}return $t(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(i,s){return uv[i]-uv[s]}).map(function(i){return"".concat(r.options.prepend).concat(i)}):a.numbers.map(function(i){return r.getSuffix(n,i,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),i=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));var s=function(){return o.options.prepend&&i.toString()?o.options.prepend+i.toString():i.toString()};return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?"_plural_".concat(i.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!hI.includes(this.options.compatibilityJSON)}}]),e}();function fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var vI=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rt(this,e),this.logger=An.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return $t(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:rI,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?go(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?go(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?go(r.nestingPrefix):r.nestingPrefixEscaped||go("$t("),this.nestingSuffix=r.nestingSuffix?go(r.nestingSuffix):r.nestingSuffixEscaped||go(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,a){var i=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(m){return m.replace(/\$/g,"$$$$")}var d=function(y){if(y.indexOf(i.formatSeparator)<0){var w=ov(r,u,y);return i.alwaysFormat?i.format(w,void 0,o,un(un(un({},a),r),{},{interpolationkey:y})):w}var _=y.split(i.formatSeparator),S=_.shift().trim(),x=_.join(i.formatSeparator).trim();return i.format(ov(r,u,S),x,o,un(un(un({},a),r),{},{interpolationkey:S}))};this.resetRegExp();var h=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,v=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,g=[{regex:this.regexpUnescape,safeValue:function(y){return f(y)}},{regex:this.regexp,safeValue:function(y){return i.escapeValue?f(i.escape(y)):f(y)}}];return g.forEach(function(m){for(c=0;s=m.regex.exec(n);){var y=s[1].trim();if(l=d(y),l===void 0)if(typeof h=="function"){var w=h(n,s,a);l=typeof w=="string"?w:""}else if(a&&a.hasOwnProperty(y))l="";else if(v){l=s[0];continue}else i.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(n)),l="";else typeof l!="string"&&!i.useRawValueToEscape&&(l=nv(l));var _=m.safeValue(l);if(n=n.replace(s[0],_),v?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,c++,c>=i.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,l;function c(h,v){var g=this.nestingOptionsSeparator;if(h.indexOf(g)<0)return h;var m=h.split(new RegExp("".concat(g,"[ ]*{"))),y="{".concat(m[1]);h=m[0],y=this.interpolate(y,l);var w=y.match(/'/g),_=y.match(/"/g);(w&&w.length%2===0&&!_||_.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),v&&(l=un(un({},v),l))}catch(S){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),S),"".concat(h).concat(g).concat(y)}return delete l.defaultValue,h}for(;i=this.nestingRegexp.exec(n);){var u=[];l=un({},a),l.applyPostProcessor=!1,delete l.defaultValue;var f=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var d=i[1].split(this.formatSeparator).map(function(h){return h.trim()});i[1]=d.shift(),u=d,f=!0}if(s=r(c.call(this,i[1].trim(),l),l),s&&i[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=nv(s)),s||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(n)),s=""),f&&(s=u.reduce(function(h,v){return o.format(h,v,a.lng,un(un({},a),{},{interpolationkey:i[1].trim()}))},s.trim())),n=n.replace(i[0],s),this.regexp.lastIndex=0}return n}}]),e}();function dv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mI(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var a=o.split(";");a.forEach(function(i){if(i){var s=i.split(":"),l=hx(s),c=l[0],u=l.slice(1),f=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=f),f==="false"&&(n[c.trim()]=!1),f==="true"&&(n[c.trim()]=!0),isNaN(f)||(n[c.trim()]=parseInt(f,10))}})}}return{formatName:t,formatOptions:n}}function vo(e){var t={};return function(r,o,a){var i=o+JSON.stringify(a),s=t[i];return s||(s=e(o,a),t[i]=s),s(r)}}var bI=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rt(this,e),this.logger=An.create("formatter"),this.options=t,this.formats={number:vo(function(n,r){var o=new Intl.NumberFormat(n,r);return function(a){return o.format(a)}}),currency:vo(function(n,r){var o=new Intl.NumberFormat(n,vr(vr({},r),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:vo(function(n,r){var o=new Intl.DateTimeFormat(n,vr({},r));return function(a){return o.format(a)}}),relativetime:vo(function(n,r){var o=new Intl.RelativeTimeFormat(n,vr({},r));return function(a){return o.format(a,r.range||"day")}}),list:vo(function(n,r){var o=new Intl.ListFormat(n,vr({},r));return function(a){return o.format(a)}})},this.init(t)}return $t(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=vo(r)}},{key:"format",value:function(n,r,o,a){var i=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var f=mI(u),d=f.formatName,h=f.formatOptions;if(i.formats[d]){var v=c;try{var g=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},m=g.locale||g.lng||a.locale||a.lng||o;v=i.formats[d](c,m,vr(vr(vr({},h),a),g))}catch(y){i.logger.warn(y)}return v}else i.logger.warn("there was no format function for ".concat(d));return c},n);return l}}]),e}();function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yI(e){var t=xI();return function(){var r=an(e),o;if(t){var a=an(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return ba(this,o)}}function xI(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wI(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var SI=function(e){ma(n,e);var t=yI(n);function n(r,o,a){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Rt(this,n),i=t.call(this),Vl&&Sr.call(jn(i)),i.backend=r,i.store=o,i.services=a,i.languageUtils=a.languageUtils,i.options=s,i.logger=An.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(a,s.backend,s),i}return $t(n,[{key:"queueLoad",value:function(o,a,i,s){var l=this,c={},u={},f={},d={};return o.forEach(function(h){var v=!0;a.forEach(function(g){var m="".concat(h,"|").concat(g);!i.reload&&l.store.hasResourceBundle(h,g)?l.state[m]=2:l.state[m]<0||(l.state[m]===1?u[m]===void 0&&(u[m]=!0):(l.state[m]=1,v=!1,u[m]===void 0&&(u[m]=!0),c[m]===void 0&&(c[m]=!0),d[g]===void 0&&(d[g]=!0)))}),v||(f[h]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(d)}}},{key:"loaded",value:function(o,a,i){var s=o.split("|"),l=s[0],c=s[1];a&&this.emit("failedLoading",l,c,a),i&&this.store.addResourceBundle(l,c,i),this.state[o]=a?-1:2;var u={};this.queue.forEach(function(f){tI(f.loaded,[l],c),wI(f,o),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(d){u[d]||(u[d]={});var h=f.loaded[d];h.length&&h.forEach(function(v){u[d][v]===void 0&&(u[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(o,a,i){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!o.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:i,tried:l,wait:c,callback:u});return}this.readingCalls++;var f=function(g,m){if(s.readingCalls--,s.waitingReads.length>0){var y=s.waitingReads.shift();s.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(g&&m&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,a,i,l+1,c*2,u)},c);return}u(g,m)},d=this.backend[i].bind(this.backend);if(d.length===2){try{var h=d(o,a);h&&typeof h.then=="function"?h.then(function(v){return f(null,v)}).catch(f):f(null,h)}catch(v){f(v)}return}return d(o,a,f)}},{key:"prepareLoading",value:function(o,a){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(o,a,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(o,a,i){this.prepareLoading(o,a,{},i)}},{key:"reload",value:function(o,a,i){this.prepareLoading(o,a,{reload:!0},i)}},{key:"loadOne",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,f){u&&a.logger.warn("".concat(i,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&f&&a.logger.log("".concat(i,"loaded namespace ").concat(c," for language ").concat(l),f),a.loaded(o,u,f)})}},{key:"saveMissing",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){var f=pv(pv({},c),{},{isUpdate:l}),d=this.backend.create.bind(this.backend);if(d.length<6)try{var h;d.length===5?h=d(o,a,i,s,f):h=d(o,a,i,s),h&&typeof h.then=="function"?h.then(function(v){return u(null,v)}).catch(u):u(null,h)}catch(v){u(v)}else d(o,a,i,s,u,f)}!o||!o[0]||this.store.addResource(o[0],a,i,s)}}}]),n}(Sr);function gv(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Ie(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Ie(t[2])==="object"||Ie(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function vv(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function mv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CI(e){var t=_I();return function(){var r=an(e),o;if(t){var a=an(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return ba(this,o)}}function _I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ps(){}function OI(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var sl=function(e){ma(n,e);var t=CI(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Rt(this,n),r=t.call(this),Vl&&Sr.call(jn(r)),r.options=vv(o),r.services={},r.logger=An,r.modules={external:[]},OI(jn(r)),a&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,a),ba(r,jn(r));setTimeout(function(){r.init(o,a)},0)}return r}return $t(n,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(i=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=gv();this.options=Pn(Pn(Pn({},s),this.options),vv(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Pn(Pn({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function l(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?An.init(l(this.modules.logger),this.options):An.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=bI);var u=new cv(this.options);this.store=new lI(this.options.resources,this.options);var f=this.services;f.logger=An,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new gI(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=l(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new vI(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new SI(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(y){for(var w=arguments.length,_=new Array(w>1?w-1:0),S=1;S<w;S++)_[S-1]=arguments[S];o.emit.apply(o,[y].concat(_))}),this.modules.languageDetector&&(f.languageDetector=l(this.modules.languageDetector),f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=l(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new lv(this.services,this.options),this.translator.on("*",function(y){for(var w=arguments.length,_=new Array(w>1?w-1:0),S=1;S<w;S++)_[S-1]=arguments[S];o.emit.apply(o,[y].concat(_))}),this.modules.external.forEach(function(y){y.init&&y.init(o)})}if(this.format=this.options.interpolation.format,i||(i=ps),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(y){o[y]=function(){var w;return(w=o.store)[y].apply(w,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(y){o[y]=function(){var w;return(w=o.store)[y].apply(w,arguments),o}});var g=Fa(),m=function(){var w=function(S,x){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),g.resolve(x),i(S,x)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return w(null,o.t.bind(o));o.changeLanguage(o.options.lng,w)};return this.options.resources||!this.options.initImmediate?m():setTimeout(m,0),g}},{key:"loadResources",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ps,s=i,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(h){if(h){var v=a.services.languageUtils.toResolveHierarchy(h);v.forEach(function(g){c.indexOf(g)<0&&c.push(g)})}};if(l)u(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(d){return u(d)})}this.options.preload&&this.options.preload.forEach(function(d){return u(d)}),this.services.backendConnector.load(c,this.options.ns,function(d){!d&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(d)})}else s(null)}},{key:"reloadResources",value:function(o,a,i){var s=Fa();return o||(o=this.languages),a||(a=this.options.ns),i||(i=ps),this.services.backendConnector.reload(o,a,function(l){s.resolve(),i(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&vx.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(o,a){var i=this;this.isLanguageChangingTo=o;var s=Fa();this.emit("languageChanging",o);var l=function(d){i.language=d,i.languages=i.services.languageUtils.toResolveHierarchy(d),i.resolvedLanguage=void 0,i.setResolvedLanguage(d)},c=function(d,h){h?(l(h),i.translator.changeLanguage(h),i.isLanguageChangingTo=void 0,i.emit("languageChanged",h),i.logger.log("languageChanged",h)):i.isLanguageChangingTo=void 0,s.resolve(function(){return i.t.apply(i,arguments)}),a&&a(d,function(){return i.t.apply(i,arguments)})},u=function(d){!o&&!d&&i.services.languageDetector&&(d=[]);var h=typeof d=="string"?d:i.services.languageUtils.getBestMatchFromCodes(d);h&&(i.language||l(h),i.translator.language||i.translator.changeLanguage(h),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(h)),i.loadResources(h,function(v){c(v,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(o),s}},{key:"getFixedT",value:function(o,a,i){var s=this,l=function c(u,f){var d;if(Ie(f)!=="object"){for(var h=arguments.length,v=new Array(h>2?h-2:0),g=2;g<h;g++)v[g-2]=arguments[g];d=s.options.overloadTranslationOptionHandler([u,f].concat(v))}else d=Pn({},f);d.lng=d.lng||c.lng,d.lngs=d.lngs||c.lngs,d.ns=d.ns||c.ns,d.keyPrefix=d.keyPrefix||i||c.keyPrefix;var m=s.options.keySeparator||".",y=d.keyPrefix?"".concat(d.keyPrefix).concat(m).concat(u):u;return s.t(y,d)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=a,l.keyPrefix=i,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(h,v){var g=a.services.backendConnector.state["".concat(h,"|").concat(v)];return g===-1||g===2};if(i.precheck){var f=i.precheck(this,u);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,o)&&(!l||u(c,o)))}},{key:"loadNamespaces",value:function(o,a){var i=this,s=Fa();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){i.options.ns.indexOf(l)<0&&i.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),a&&a(l)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var i=Fa();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){i.resolve(),a&&a(c)}),i):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new cv(gv());return a.indexOf(i.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ps,s=Pn(Pn(Pn({},this.options),a),{isClone:!0}),l=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(l.logger=l.logger.clone(a));var c=["store","services","language"];return c.forEach(function(u){l[u]=o[u]}),l.services=Pn({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new lv(l.services,l.options),l.translator.on("*",function(u){for(var f=arguments.length,d=new Array(f>1?f-1:0),h=1;h<f;h++)d[h-1]=arguments[h];l.emit.apply(l,[u].concat(d))}),l.init(s,i),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Sr);ve(sl,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new sl(e,t)});var xt=sl.createInstance();xt.createInstance=sl.createInstance;xt.createInstance;xt.dir;xt.init;xt.loadResources;xt.reloadResources;xt.use;xt.changeLanguage;xt.getFixedT;xt.t;xt.exists;xt.setDefaultNamespace;xt.hasLoadedNamespace;xt.loadNamespaces;xt.loadLanguages;function EI(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var bv={};function of(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&bv[t[0]]||(typeof t[0]=="string"&&(bv[t[0]]=new Date),EI.apply(void 0,t))}function yv(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function o(){setTimeout(function(){e.off("initialized",o)},0),n()};e.on("initialized",r)}})}function RI(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var i=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function $I(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return of("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!i(a.isLanguageChangingTo,e))return!1}}):RI(e,t,n)}function TI(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var PI=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,kI={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},NI=function(t){return kI[t]},AI=function(t){return t.replace(PI,NI)};function xv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var af={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:AI};function MI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};af=wv(wv({},af),e)}function jI(){return af}var mx;function DI(e){mx=e}function II(){return mx}var LI={type:"3rdParty",init:function(t){MI(t.options.react),DI(t)}},BI=b.createContext(),FI=function(){function e(){Rt(this,e),this.usedNamespaces={}}return $t(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function Sv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var zI=function(t,n){var r=b.useRef();return b.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function HI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=b.useContext(BI)||{},o=r.i18n,a=r.defaultNS,i=n||o||II();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new FI),!i){of("You will need to pass in an i18next instance by using initReactI18next");var s=function(k){return Array.isArray(k)?k[k.length-1]:k},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}i.options.react&&i.options.react.wait!==void 0&&of("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=Ac(Ac(Ac({},jI()),i.options.react),t),u=c.useSuspense,f=c.keyPrefix,d=e||a||i.options&&i.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(d);var h=(i.isInitialized||i.initializedStoreOnce)&&d.every(function($){return $I($,i,c)});function v(){return i.getFixedT(null,c.nsMode==="fallback"?d:d[0],f)}var g=b.useState(v),m=je(g,2),y=m[0],w=m[1],_=d.join(),S=zI(_),x=b.useRef(!0);b.useEffect(function(){var $=c.bindI18n,k=c.bindI18nStore;x.current=!0,!h&&!u&&yv(i,d,function(){x.current&&w(v)}),h&&S&&S!==_&&x.current&&w(v);function P(){x.current&&w(v)}return $&&i&&i.on($,P),k&&i&&i.store.on(k,P),function(){x.current=!1,$&&i&&$.split(" ").forEach(function(j){return i.off(j,P)}),k&&i&&k.split(" ").forEach(function(j){return i.store.off(j,P)})}},[i,_]);var C=b.useRef(!0);b.useEffect(function(){x.current&&!C.current&&w(v),C.current=!1},[i,f]);var O=[y,i,h];if(O.t=y,O.i18n=i,O.ready=h,h||!h&&!u)return O;throw new Promise(function($){yv(i,d,function(){$()})})}var VI=["forwardedRef"];function Cv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cv(Object(n),!0).forEach(function(r){ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function o(i){var s=i.forwardedRef,l=Wo(i,VI),c=HI(e,gs(gs({},l),{},{keyPrefix:t.keyPrefix})),u=je(c,3),f=u[0],d=u[1],h=u[2],v=gs(gs({},l),{},{t:f,i18n:d,tReady:h});return t.withRef&&s?v.ref=s:!t.withRef&&s&&(v.forwardedRef=s),b.createElement(r,v)}o.displayName="withI18nextTranslation(".concat(TI(r),")"),o.WrappedComponent=r;var a=function(s,l){return b.createElement(o,Object.assign({},s,{forwardedRef:l}))};return t.withRef?b.forwardRef(a):o}}const UI={translation:{"Welcome to React":"欢迎使用 React"}},WI={translation:{"Welcome to React":"Welcome to React and react-i18next"}},GI={zh_CN:UI,en_US:WI};xt.use(LI).init({resources:GI,lng:"zh_CN",react:{bindI18n:"added languageChanged",bindI18nStore:"added"}});const bx=xt;bx.update=()=>{setTimeout(()=>{xt.emit("added")},0)};class KI{constructor({getWorkbench:t,emitter:n,pageModel:r,i18n:o,assets:a,engine:i}){V(this,"plugins",new Map);V(this,"emitter",qs());V(this,"getWorkbench");V(this,"pageModel");V(this,"i18n");V(this,"assets");V(this,"engine");V(this,"customPluginHooks",{});V(this,"customPlugin",(t,n)=>{const r=this.customPluginHooks,o=r[t]||[];o.push(n),r[t]=o,this.customPluginHooks=r});V(this,"createPluginCtx",()=>({globalEmitter:this.emitter,emitter:qs(),config:{},getWorkbench:this.getWorkbench,pluginManager:this,pageModel:this.pageModel,i18n:this.i18n,assets:this.assets,engine:this.engine,pluginReadyOk:()=>{}}));this.getWorkbench=t,this.emitter=n,this.pageModel=r,this.i18n=o,this.assets=a,this.engine=i}async add(t){var i;const n=this.createPluginCtx();let r;typeof t=="function"?r=t(n):r=t;let o={source:r,ctx:n,export:((i=r.export)==null?void 0:i.call(r,n))||{},ready:!1};(this.customPluginHooks[r.name]||[]).forEach(s=>{o=s(o)}),n.pluginReadyOk=()=>{this.emitter.emit(`${r.name}:ready`),o.ready=!0},this.plugins.set(r.name,o),await r.init(n)}async get(t){const n=this.plugins.get(t);return n!=null&&n.ready||await this.onPluginReadyOk(t),n}async remove(t){const n=this.plugins.get(t);await(n==null?void 0:n.source.destroy(n.ctx)),this.plugins.delete(t)}onPluginReadyOk(t,n){const r=this.plugins.get(t);if(!(r!=null&&r.ready))return r===void 0&&console.warn(`plugin: ${t} not found.`),new Promise(o=>{this.emitter.on(`${t}:ready`,()=>{r&&(r.ready=!0,n==null||n(r),o(r))})})}}const qI={pluginName:"组件库"},XI={pluginName:"Component Store"},_v={zh_CN:qI,en_US:XI},YI="_container_191p3_2",JI="_tabTitle_191p3_23",yx={container:YI,tabTitle:JI},QI="_square_1b87f_2",ZI="_componentItem_1b87f_18",eL="_iconImg_1b87f_41",tL="_iconBox_1b87f_45",nL="_iconText_1b87f_54",za={square:QI,componentItem:ZI,iconImg:eL,iconBox:tL,iconText:nL},rL=e=>{const t={[xx]:e.id},n=b.useMemo(()=>e.iconText?p("div",{className:za.iconText,children:String(e.iconText).toUpperCase()}):typeof e.icon=="string"?p("img",{className:za.iconImg,src:e.icon,draggable:!1}):e.icon,[e.icon]),r=p("div",{className:Ge([za.square,e.containerClassName]),children:M("div",{...t,className:za.componentItem,style:e.style,children:[p("div",{className:za.iconBox,children:n}),p("span",{children:e.name})]})});return e.description?p(A.Popover,{overlayInnerStyle:{maxWidth:"300px",maxHeight:"200px",overflow:"auto"},content:e.description||"",zIndex:1e3,placement:"right",children:r}):r},xx="data-drag-key",oL="_ListBox_1q7zr_2",aL="_collapsePanel_1q7zr_23",Ov={ListBox:oL,collapsePanel:aL},iL=e=>{const{dataSource:t}=e,n=t.map(o=>o.name||""),r=b.useMemo(()=>t.map(o=>{const a=o.name||"",i=p("div",{className:Ov.collapsePanel,children:o.list.map(s=>p(rL,{id:s.id,name:s.title,icon:s.snapshot||s.snapshotText,iconText:s.snapshotText,description:s.description||""},s.id))});return{key:a,label:a,children:i}}),[t]);return t.length?p("div",{className:Ov.ListBox,children:p(A.Collapse,{style:{width:"100%"},defaultActiveKey:n,items:r})}):null},wx=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||wx(e.parentElement,t)},ll="ComponentLib",sf=`plugin:${ll}`,sL=({children:e})=>p("div",{className:yx.tabTitle,children:e});class lL extends b.Component{constructor(n){super(n);V(this,"containerRef");V(this,"disposeList",[]);V(this,"boxSensor");V(this,"leftPanelVisibleCb",async({visible:n,panelName:r})=>{await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),r===ll&&n&&this.registerDragEvent()});V(this,"getNewNode",n=>{const{pluginCtx:r}=this.props,o=r.pageModel;if(!n)return;const a=wx(n,xx);if(!a)return;const i=o.materialsModel.findSnippetById(a);if(i)return o==null?void 0:o.createNode(i.schema)});V(this,"registerDragEvent",async()=>{const{containerRef:n}=this,{pluginCtx:r}=this.props,o=await r.pluginManager.get("Designer");if(!o||!n.current)return;const i=o.export.getDnd(),s=new Mn.Sensor({name:"ComponentListBox",container:n.current});this.boxSensor=s,s.setCanDrag(async c=>{const u=this.getNewNode(c.event.target);return this.props.pluginCtx.pluginManager.get("Designer").then(f=>{const d=f==null?void 0:f.export;d==null||d.selectNode("")}),{...c,extraData:{dropType:"NEW_ADD",dragNode:u}}}),i.registerSensor(s);const l=()=>{const{getWorkbench:c}=this.props.pluginCtx,u=c();u.state.leftBoxFixed||u.closeLeftPanel()};this.disposeList.push(()=>{i.emitter.off("dragStart",l)}),i.emitter.on("dragStart",l)});V(this,"toAddNewNode",async n=>{const r=this.getNewNode(n.nativeEvent.target);if(!r)return;const{pageModel:o}=this.props.pluginCtx;return this.props.pluginCtx.pluginManager.get("Designer").then(async a=>{var g;const i=a==null?void 0:a.export,s=i==null?void 0:i.getSelectedNodeId(),l=o.getNode(s),c=De.findContainerNode(l);let u="CHILD_END",f=l??null;if(l)c===l.parent?l.isContainer()?(u="CHILD_END",f=l,o.addNode(r,l,u)):(u="AFTER",f=l):c&&!De.isPageModel(c)&&(u="CHILD_END",f=c);else{const m=o.getRootNode();m&&(u="CHILD_END",f=m)}const d=i==null?void 0:i.getInstance(),h=await(d==null?void 0:d.customAdvanceHook.onNewAdd({dragNode:r,dropNode:f,eventObj:{from:n.nativeEvent,fromSensor:this.boxSensor,pointer:null,fromPointer:null,extraData:{}}}));if(h===!1)return;let v={dragNode:r,dropNode:f,pos:u};typeof h=="object"&&(v={...v,dragNode:h.addNode??v.dragNode,dropNode:h.dropNode??v.dropNode,pos:((g=h.dropPosInfo)==null?void 0:g.pos)??v.pos}),o.addNode(v.dragNode,v.dropNode,v.pos),setTimeout(()=>{i==null||i.selectNode(v.dragNode.id)},200)})});this.containerRef=b.createRef(),this.state={componentsList:[]}}async componentDidMount(){const{pluginCtx:n}=this.props,{pageModel:r,i18n:o}=n,{materialsModel:a}=r;await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent(),Object.keys(_v).forEach(s=>{o.addResourceBundle(s,sf,_v[s],!0,!0)}),o.update();const i=a.getAllSnippets();if(i.length&&i[0].name==="default"){const s=i.shift();s&&i.push(s)}this.setState({componentsList:i})}componentWillUnmount(){this.disposeList.map(n=>n())}render(){const{componentsList:n}=this.state,{toAddNewNode:r}=this,o=n.map(a=>({label:p(sL,{children:Sy(a.name)}),key:a.name,children:p(iL,{dataSource:a.list})}));return p("div",{ref:this.containerRef,className:yx.container,onClick:r,children:p(A.Tabs,{defaultActiveKey:"BaseComponent",items:o,style:{flex:1}})})}}const Sx={name:ll,async init(e){const t=ta(sf)(lL),n=ta(sf)(({t:o})=>p(vt,{children:o("pluginName")}));e.getWorkbench().addLeftPanel({title:p(n,{}),name:"ComponentLib",icon:p(BC,{}),render:p(t,{pluginCtx:e})})},reload:async()=>{console.log(ll,"not suooprt reload")},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Cx="Designer",cL={pluginName:"组件库"},uL={pluginName:"Component Store"},Ev={zh_CN:cL,en_US:uL},fL="_toolBarBox_h5ljb_2",dL="_item_h5ljb_10",hL="_layoutSelectBox_h5ljb_20",pL="_hoverBox_h5ljb_25",gL="_hoverBoxActive_h5ljb_35",vL="_hoverItem_h5ljb_39",mL="_placeholder_h5ljb_47",or={toolBarBox:fL,item:dL,layoutSelectBox:hL,hoverBox:pL,hoverBoxActive:gL,hoverItem:vL,placeholder:mL},bL=({dataSource:e,children:t,onSelect:n})=>{const[r,o]=b.useState(!1);return M("div",{className:or.layoutSelectBox,children:[p("div",{className:Ge([or.hoverBox,r&&or.hoverBoxActive]),children:e.map(a=>p("div",{className:or.hoverItem,onClick:()=>n(a.key),children:a.label},a.key))}),p("div",{className:or.placeholder,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),children:t})]})},_x=e=>{var h;const{nodeList:t,toSelectNode:n,toDelete:r,toCopy:o,toHidden:a}=e,i=[...t],s=i.shift(),l=i.map(v=>{var w;const g=v,m=(w=g.materialsModel.findByComponentName(g.value.componentName))==null?void 0:w.value.title,y=g.value.title||m||g.value.componentName||"";return{key:v.id,label:y||"Empty"}}),c=p("div",{className:or.item,onClick:()=>o((s==null?void 0:s.id)||""),children:p(Eb,{})}),u=p("div",{className:or.item,onClick:()=>r((s==null?void 0:s.id)||""),children:p(Xf,{})}),f=p("div",{className:or.item,onClick:()=>a((s==null?void 0:s.id)||""),children:p(kb,{})}),d=p(bL,{dataSource:l.reverse(),onSelect:n,children:p("div",{children:(s==null?void 0:s.value.title)||((h=s==null?void 0:s.material)==null?void 0:h.value.title)||"Empty"})});return{copyItem:c,deleteItem:u,visibleItem:f,nodeLayout:d}},yL=e=>{const{copyItem:t,deleteItem:n,visibleItem:r,nodeLayout:o}=b.useMemo(()=>_x(e),[e]);return M("div",{className:or.toolBarBox,children:[o,r,t,n]})},xL=(e,t=5)=>{const n=[];let r=0,o=e;for(;r<t&&o;)De.isNodeModel(o)&&(n.push(o),r++),o=o.parent||null;return n},wL=({node:e})=>p("div",{style:{backgroundColor:"rgba(100,100,100)",padding:"3px 10px 3px 15px",borderRadius:"2px",opacity:.9,color:"rgba(220,220,220)"},children:e.value.componentName}),SL="_hoverTips_k3vn7_2",CL={hoverTips:SL};class _L{constructor(t){V(this,"getPortalViewCtx");V(this,"ctx");V(this,"layoutRef");this.getPortalViewCtx=t.getPortalViewCtx,this.ctx=t.ctx,this.layoutRef=t.layoutRef}async canDrag({dragNode:t,eventObj:n}){var o;const r=(o=t.material)==null?void 0:o.value.advanceCustom;return r!=null&&r.canDragNode?r==null?void 0:r.canDragNode(t,{context:this.ctx,viewPortal:this.getPortalViewCtx(),event:n,extra:n.extraData}):!0}async canDrop({dragNode:t,dropNode:n,eventObj:r}){var s;const o=(s=t.material)==null?void 0:s.value.advanceCustom;let a={};const i={dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData};if(o!=null&&o.canDropNode)if(a=await o.canDropNode(t,i),o!=null&&o.canAcceptNode){let l;return typeof a=="object"?l=await(o==null?void 0:o.canAcceptNode(a.dragNode,{...i,...a})):l=await(o==null?void 0:o.canAcceptNode(t,{...i})),l}else return a;return!0}async onNewAdd({dragNode:t,dropNode:n,eventObj:r}){var a,i,s;const o=await((s=(i=(a=t.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onNewAdd)==null?void 0:s.call(i,t,{dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData}));return o===!1?!1:o}getSelectRectViewRender(t){var r;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.selectRectViewRender}getHoverRectViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.hoverRectViewRender}getDropViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.dropViewRender}getGhostViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.ghostViewRender}getToolbarViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.toolbarViewRender}async onCopy(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onCopy;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.copyNode??n)}return n&&r.pageModel.copyNode(n)&&await ar(),n}async onDelete(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onDelete;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.deleteNode??n)}return n&&r.pageModel.deleteNode(n)&&await ar(),n}}class OL extends b.Component{constructor(n){super(n);V(this,"layoutRef");V(this,"customAdvanceHook");V(this,"getPortalViewCtx",()=>({setView:n=>{this.setState({portalView:n})},clearView:()=>{this.setState({portalView:null})}}));V(this,"onNodeDragging",async n=>{var a,i,s;const r=n.extraData,o=r==null?void 0:r.dragNode;if(o)return(s=(i=(a=o.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onDragging)==null?void 0:s.call(i,o,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r})});V(this,"onNodeDragEnd",async()=>{this.setState({...this.state,dropViewRender:this.props.pluginCtx.config.dropViewRender})});V(this,"onNodeDrop",async n=>{var c,u,f,d,h,v,g,m,y,w,_;const{layoutRef:r}=this,o=this.props.pluginCtx.pageModel,a=n.extraData,i=a==null?void 0:a.dropPosInfo,s={before:"BEFORE",after:"AFTER",current:"CHILD_START"}[(i==null?void 0:i.pos)||"after"],l=a==null?void 0:a.dragNode;if(l&&await((f=(u=(c=l.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onDrop)==null?void 0:f.call(u,l,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;if(!(a!=null&&a.dropNode))return console.warn("cancel drop, because drop node is null"),!1;if(a.dropType==="NEW_ADD"){if(l&&await((v=(h=(d=l.material)==null?void 0:d.value.advanceCustom)==null?void 0:h.onNewAdd)==null?void 0:v.call(h,l,{dropNode:a.dropNode,context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;((g=a.dropNode)==null?void 0:g.nodeType)!=="NODE"?o==null||o.addNode(a.dragNode,a.dropNode,"CHILD_START"):o==null||o.addNode(a.dragNode,a.dropNode,s)}else{if(((m=a.dropNode)==null?void 0:m.id)===((y=a.dragNode)==null?void 0:y.id)){console.warn("dragNode and dropNode id is the same");return}if(!o.moveNodeById(((w=a.dragNode)==null?void 0:w.id)||"",((_=a==null?void 0:a.dropNode)==null?void 0:_.id)||"",s))return console.warn("drop failed"),!1}setTimeout(async()=>{var S,x,C;if(l&&await this.onSelectNode(l,null)===!1){(S=r.current)==null||S.selectNode("");return}(C=r.current)==null||C.selectNode(((x=a.dragNode)==null?void 0:x.id)||"")},150),this.props.pluginCtx.emitter.emit("onDrop",n)});V(this,"onSelectNode",async(n,r)=>{var l,c,u,f;const{pluginCtx:o}=this.props,{layoutRef:a}=this;if(!n){o.engine.updateCurrentSelectNode(null),(l=a.current)==null||l.selectNode(""),this.setState({selectToolbarView:null});return}const i=await((f=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onSelect)==null?void 0:f.call(u,n,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:r,extra:{}}));if(i===!1)return i;o.engine.updateCurrentSelectNode(n);const s=this.getToolbarView(n);this.setState({selectToolbarView:s,selectRectViewRender:this.customAdvanceHook.getSelectRectViewRender(n)||this.props.pluginCtx.config.selectRectViewRender})});V(this,"onDragStart",async n=>{var l,c,u;const r=n.extraData,o=r==null?void 0:r.dragNode;if(!o)return;const a={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r},i=await((u=(c=(l=o.material)==null?void 0:l.value.advanceCustom)==null?void 0:c.onDragStart)==null?void 0:u.call(c,o,{...a}));if(i===!1)return i;const s=this.getGhostView(o,a);this.setState({...this.state,ghostView:s,dropViewRender:this.customAdvanceHook.getDropViewRender(o)||this.props.pluginCtx.config.dropViewRender})});V(this,"getGhostView",(n,r)=>{let o=p(wL,{node:n});const i=this.customAdvanceHook.getGhostViewRender(n)||this.props.pluginCtx.config.ghostViewRender;return i&&(o=p(i,{node:n,params:r})),o});V(this,"toSelectNode",async n=>{var i;const o=this.props.pluginCtx.pageModel.getNode(n);if(await this.onSelectNode(o||null,null)!==!1)return(i=this.layoutRef.current)==null||i.selectNode(n),!0});V(this,"toCopyNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n),a=await this.customAdvanceHook.onCopy(o);a&&this.toSelectNode(a.id)});V(this,"toDeleteNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n);!o||await this.customAdvanceHook.onDelete(o)===!1||this.toSelectNode("")});V(this,"toHidden",n=>{const r=this.props.pluginCtx.pageModel.getNode(n);if(!r)return;const o=r.value.configure.devState??{};o.condition=!1,r.value.configure.devState=o,r.updateValue()});V(this,"getToolbarView",n=>{const o={nodeList:xL(n,5),toSelectNode:this.toSelectNode,toCopy:this.toCopyNode,toDelete:this.toDeleteNode,toHidden:this.toHidden},a=_x(o);let i=p(yL,{...o});const s=this.customAdvanceHook.getToolbarViewRender(n)||this.props.pluginCtx.config.toolbarViewRender;return s&&(i=p(s,{node:n,context:this.context,toolBarItems:a})),i});V(this,"onHoverNode",(n,r,o)=>{this.props.pluginCtx.emitter.emit("onHover",n);const a=n==null?void 0:n.material;a||console.warn("material not found",n);const i={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:o,extra:{}},s=this.getGhostView(r,i),l={hoverToolbarView:p("div",{className:CL.hoverTips,children:(a==null?void 0:a.value.title)||(a==null?void 0:a.componentName)}),ghostView:s,hoverRectViewRender:this.customAdvanceHook.getHoverRectViewRender(n)||this.props.pluginCtx.config.hoverRectViewRender};r||(l.ghostView=null),this.setState({...l})});V(this,"nodeCanDrag",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrag({dragNode:o,eventObj:n})});V(this,"nodeCanDrop",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrop({dragNode:o,eventObj:n,...r})});V(this,"innerSelectRectViewRender",n=>{const{selectRectViewRender:r}=this.state,{pluginCtx:o}=this.props,a=r,i=o.engine.getActiveNode();return!a||!i?p(vt,{}):p(a,{node:i,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}})});V(this,"innerHoverRectViewRender",n=>{const{hoverRectViewRender:r}=this.state,o=r;return o?p(o,{node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):p(vt,{})});V(this,"innerDropViewRender",n=>{const{dropViewRender:r}=this.state,o=r;return o?p(o,{...n,node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):p(vt,{})});this.state={pageModel:n.pluginCtx.pageModel,hoverToolbarView:null,selectToolbarView:null,ghostView:null,assets:n.pluginCtx.assets||[],portalView:null,selectRectViewRender:null,hoverRectViewRender:null,dropViewRender:null},this.layoutRef=b.createRef(),this.customAdvanceHook=new _L({getPortalViewCtx:this.getPortalViewCtx,ctx:this.props.pluginCtx,layoutRef:this.layoutRef})}componentDidMount(){const{i18n:n}=this.props.pluginCtx;Object.keys(Ev).forEach(r=>{n.addResourceBundle(r,`plugin:${Cx}`,Ev[r],!0,!0)}),this.init()}updateAssets(n){this.setState({assets:n})}reloadRender({assets:n}){var r;(r=this.layoutRef.current)==null||r.reload({assets:n})}async init(){const{layoutRef:n}=this,{pluginCtx:r}=this.props;if(!n.current){console.warn("layout not ready ok");return}await n.current.ready();const o=n.current;r.emitter.emit("ready",{UIInstance:this}),o.dnd.emitter.on("click",({event:a})=>{r.getWorkbench().onGlobalClick(a)}),this.props.pluginCtx.pageModel.emitter.on("onPageChange",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),this.props.pluginCtx.pageModel.emitter.on("onReloadPage",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),r.pluginReadyOk()}render(){const{layoutRef:n,props:r,onSelectNode:o,onDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDragEnd:c}=this,{pageModel:u,hoverToolbarView:f,selectToolbarView:d,ghostView:h,assets:v,portalView:g,selectRectViewRender:m,hoverRectViewRender:y,dropViewRender:w}=this.state,{pluginCtx:_}=r,S=_.engine.props.renderJSUrl||"./render.umd.js",x={};return m&&(x.selectRectViewRender=this.innerSelectRectViewRender),y&&(x.hoverRectViewRender=this.innerHoverRectViewRender),w&&(x.dropViewRender=this.innerDropViewRender),d&&(x.selectToolbarView=this.state.selectToolbarView),M(vt,{children:[p(Mn.Layout,{beforeInitRender:r.pluginCtx.config.beforeInitRender,customRender:r.pluginCtx.config.customRender,ref:n,pageModel:u,renderJSUrl:S,...r,hoverToolBarView:f,selectBoxStyle:{},hoverBoxStyle:{},nodeCanDrag:this.nodeCanDrag,nodeCanDrop:this.nodeCanDrop,onSelectNode:o,onNodeDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDraEnd:c,...x,ghostView:h,assets:v,pluginCtx:this.props.pluginCtx}),g&&gn.createPortal(g,document.body)]})}}const Ox=e=>{const t=b.createRef();return{name:Cx,async init(n){n.getWorkbench().replaceBodyView(p(OL,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:()=>({getInstance:()=>t.current,getDnd:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.dnd},selectNode:async n=>{var r;(r=t.current)==null||r.toSelectNode(n)},copyNode:async n=>{var r;(r=t.current)==null||r.toCopyNode(n)},deleteNode:async n=>{var r;(r=t.current)==null||r.toDeleteNode(n)},getSelectedNodeId:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.state.currentSelectId},updatePage:n=>{var r,o,a,i;(i=(a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef)==null?void 0:a.current)==null||i.rerender(n)},reload:({assets:n}={})=>{var r;(r=t.current)==null||r.reloadRender({assets:n})},getComponentInstances:n=>{var r,o,a;return((a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef.current)==null?void 0:a.getInstancesById(n))||[]},getDynamicComponentInstances:n=>{var o,a,i,s;const r=(s=(i=(a=(o=t.current)==null?void 0:o.layoutRef.current)==null?void 0:a.designRenderRef.current)==null?void 0:i.renderRef.current)==null?void 0:s.dynamicComponentInstanceMap;return(r==null?void 0:r.get(n))||[]},getLayoutRef:()=>{var n;return(n=t.current)==null?void 0:n.layoutRef},getDesignerWindow:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.iframeContainer.getWindow()}}),meta:{engine:{version:"1.0.0"}}}},lf=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||lf(e.parentElement,t)},Ex=(e,t,n)=>{const r=(o,a)=>{var g,m,y;let i=o.children||[];Array.isArray(i)||(i=[]),i=i.filter(w=>typeof w!="string");const s=(g=n.materialsModel.findByComponentName(o.componentName))==null?void 0:g.value.title,l={title:o.title||s||o.componentName,key:o.id,children:[],parent:a,canDropPos:(m=n.getNode(o.id||""))!=null&&m.isContainer()?void 0:["after","before"]},c=[],u={title:"SLOT",key:`${o.id}-SLOT`,children:c,canBeSelected:!1,canDropPos:!1,parent:null,containerRender:({treeNodeView:w})=>p("div",{style:{border:"1px solid #a97cf8",borderTopWidth:"6px",marginRight:"2px",marginTop:"5px"},children:w})},f=o.props||{},d=(w,_,S)=>{if(De.isJSSlotPropNode(w)){const C=w,O=n.getNode(o.id);let $="";if(O){const L=h(O,[...S,_]);$=De.getMTitle(L)}let k=_;$&&(k=De.getMTitle($)||_);const P={title:k,key:`${o.id}-${S.join("_")}`,children:[],canBeSelected:!1,canDrag:!1,canDropPos:["current"],parent:u};let j=[];C.value&&!Array.isArray(C.value)?j=[C.value]:j=C.value,P.children=Ex(j,P,n),c.push(P);return}if(sa(w)){const C=w;Object.keys(C).forEach(O=>{d(C[O],O,[...S,_])})}Array.isArray(w)&&w.forEach((O,$)=>{d(O,String($),[...S,_])})},h=(w,_)=>{const S=$L(w),x=_.map(C=>String(parseInt(C,10))===C?"$NUM":C);return S[x.join(".")]||""};Object.keys(f).forEach(w=>{d(f[w],w,[])}),c.length>0&&((y=l.children)==null||y.push(u),u.parent=l);const v=i.map(w=>r(w,l))||[];return l.children=[...l.children,...v],l};return Array.isArray(e)?e.map(o=>r(o,t)):r(e,t)},EL=(e,t)=>{const n=e.componentsTree;let r=n.children||[];Array.isArray(r)||(r=[]);const o={title:"Page",key:n.id||"Page",rootNode:!0,children:[]};return o.children=Ex(r,o,t),[o]},Mc=(e,t)=>{let n=[];Array.isArray(e)?n=e:n=[e];let r=!1;const o=(a,i)=>{var l;if(r)return;i(a)?r=!0:(l=a.children)==null||l.forEach(c=>{o(c,i)})};n.forEach(a=>{o(a,t)})};function RL(e){const{point:t,dom:n}=e;let r;const o=t,a=n.getBoundingClientRect(),i=a.height,s=a.x+50,l=a.y+Math.round(i/2);return o.y>l?r="after":r="before",o.x>s&&r==="after"&&(r="current"),{pos:r,direction:"vertical"}}const $L=e=>{var o;const t={},n=(o=e.material)==null?void 0:o.value.props;if(!n)return t;const r=(a,i)=>{var s,l;if(sa(a)){const c=[...i],u=a,f=u.componentName;if(f==="ArraySetter"){const h=((s=u.props)==null?void 0:s.item.setters)||[],v=t[i.join(".")];let g="";typeof v=="string"?g=v:g=v.label,c.push("$NUM"),h.forEach(m=>{g=`${g}`,t[c.join(".")]=g,r(m,c)})}else f==="ShapeSetter"&&(((l=u.props)==null?void 0:l.elements)||[]).forEach(v=>{const g=[...c];g.push(v.name),t[g.join(".")]=v.title,(v.setters||[]).forEach(y=>{r(y,[...g])})})}};return n.forEach(a=>{let i=null;De.isSpecialMaterialPropType(a)?i=a.content:i=a;let s=[];Array.isArray(i)?s=i:s=[i],s.forEach(l=>{var u;const c=[l.name];t[c.join(".")]=l.title,(u=l.setters)==null||u.forEach(f=>{r(f,c)})})}),t};var Lo=(e=>(e.DRAGGING="DRAGGING",e.NORMAL="NORMAL",e))(Lo||{});const Rx=b.createContext({state:{treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:!1,dragState:"NORMAL",pageModel:null},updateState:()=>{},onSelectNode:()=>{},onDeleteNode:e=>{},onCopyNode:e=>{}}),TL="_contentBox_1tkrj_2",PL="_nodeBox_1tkrj_13",kL="_toolbarBox_1tkrj_17",NL="_iconItem_1tkrj_21",AL="_nodeContent_1tkrj_25",ML="_selected_1tkrj_35",jL="_nodeArrow_1tkrj_38",DL="_expanded_1tkrj_41",IL="_nodeRenderView_1tkrj_45",LL="_nodeChildren_1tkrj_56",BL="_dropAnchorLine_1tkrj_73",FL="_arrowSpan_1tkrj_82",Nt={contentBox:TL,nodeBox:PL,toolbarBox:kL,iconItem:NL,nodeContent:AL,selected:ML,nodeArrow:jL,expanded:DL,nodeRenderView:IL,nodeChildren:LL,dropAnchorLine:BL,arrowSpan:FL},xo="data-drag-key",$x=e=>{var ne,fe,D,R;const t=b.useRef({titleEditable:!1}),{level:n=0,item:r,paths:o=["0"]}=e,[a,i]=b.useState(!0),{state:s,updateState:l,onSelectNode:c,onDeleteNode:u,getDesignerHandler:f,onCopyNode:d}=b.useContext(Rx),[h,v]=b.useState((ne=t.current)==null?void 0:ne.titleEditable),[g,m]=b.useState("");t.current.titleEditable=h;const y=s.expandKeys.find(T=>T===r.key),w=T=>{let N=s.expandKeys;T!==void 0?T===!0?y||N.push(r.key||""):y&&(N=N.filter(I=>I!==r.key)):y?N=N.filter(I=>I!==r.key):N.push(r.key||""),l({expandKeys:N})},_=s.currentSelectNodeKeys.find(T=>T===r.key),S=b.useRef(null),x=()=>{var N;if(w(!0),h){(N=S==null?void 0:S.current)==null||N.focus();return}if(r.canBeSelected!==void 0&&r.canBeSelected===!1)return;let T=s.currentSelectNodeKeys;if(!s.multiSelect){r.key?c==null||c({keys:[r.key],node:r}):c==null||c({keys:[],node:r}),l({currentSelectNodeKeys:[String(r.key)]});return}_?T=T.filter(I=>I!==r.key):T.push(String(r.key)),c==null||c({keys:T,node:r}),l({currentSelectNodeKeys:T})},C=20,O=C*n,$=r.canBeSelected??!0,k={[xo]:r.key},P=b.useRef(),j=b.useRef();j.current=s,P.current=T=>{const N=s.expandKeys,I=Array.from(new Set([...N,T]));l({expandKeys:I})};const L=b.useRef(null);b.useEffect(()=>{var Y,J;let T=0;(Y=L.current)==null||Y.addEventListener("mouseenter",()=>{T=window.setTimeout(()=>{var re,oe;((re=j.current)==null?void 0:re.dragState)===Lo.DRAGGING&&((oe=P.current)==null||oe.call(P,r.key||""))},.8*1e3)}),(J=L.current)==null||J.addEventListener("mouseleave",()=>{clearTimeout(T)});const N=re=>{var oe;if(t.current.titleEditable){if(re.target===((oe=S.current)==null?void 0:oe.input))return;v(!1),F.updateValue()}};let I;return(async()=>{const re=await e.pluginCtx.pluginManager.get("Designer"),oe=re==null?void 0:re.export,ue=oe==null?void 0:oe.getDesignerWindow();ue==null||ue.addEventListener("click",N),I=ue||null})(),document.addEventListener("click",N),()=>{T&&clearTimeout(T),document.removeEventListener("click",N),I==null||I.removeEventListener("click",N)}},[]);const F=(fe=s.pageModel)==null?void 0:fe.getNode(r.key||""),W=()=>{const T=!a;if(!F)return;const N=F.value.configure.devState??{};N.condition=T,F.value.configure.devState=N,F.updateValue(),i(T)};let B=r.title;r.titleViewRender&&(B=r.titleViewRender({item:r,titleView:r.title}));const G=M("div",{className:Nt.nodeBox,children:[M("div",{className:Ge([Nt.nodeContent,_&&$&&Nt.selected]),style:{marginLeft:`${-O}px`,paddingLeft:`${O+8}px`},onMouseMove:async()=>{if(!r.key)return;const T=await(f==null?void 0:f()),N=T==null?void 0:T.getDynamicComponentInstances(r.key);typeof(N==null?void 0:N._CONDITION)<"u"&&i(N==null?void 0:N._CONDITION)},children:[(D=r.children)!=null&&D.length?p("span",{style:{paddingRight:"5px"},className:Nt.arrowSpan,onClickCapture:()=>w(),children:p(b_,{className:Ge([Nt.nodeArrow,y&&Nt.expanded])})}):null,M("div",{className:Nt.nodeRenderView,...k,ref:L,onClick:x,onDoubleClick:()=>{var H;if(!F)return;const T=F,N=(H=T.materialsModel.findByComponentName(T.value.componentName))==null?void 0:H.value.title,I=T.value.title||N||T.value.componentName||"";m(I),v(!0),setTimeout(()=>{var Y;(Y=S.current)==null||Y.focus()},16.66)},children:[!h&&B,h&&p("div",{style:{paddingRight:"10px"},children:p(A.Input,{size:"small",maxLength:20,style:{},ref:S,value:g,onPressEnter:()=>{v(!1),F.updateValue()},onChange:T=>{F.value.title=T.target.value,m(T.target.value)}})})]}),!h&&!r.rootNode&&M("div",{className:Nt.toolbarBox,children:[M("div",{className:Nt.iconItem,children:[!a&&p(a_,{onClick:W}),a&&p(kb,{onClick:W})]}),p("div",{className:Nt.iconItem,onClick:()=>{d(r.key||"")},children:p(Eb,{})}),p("div",{className:Nt.iconItem,onClick:()=>{u(r.key||"")},children:p(Xf,{})})]})]}),p("div",{className:Ge([Nt.nodeChildren,_&&Nt.selected]),style:{paddingLeft:`${C}px`,height:y?"auto":"0"},children:y&&((R=r.children)==null?void 0:R.map((T,N)=>{const I=`${T.key}-${N}`;return p($x,{item:T,paths:[...o,N],level:n+1,pluginCtx:e.pluginCtx},I)}))})]});return r.containerRender?r.containerRender({item:r,treeNodeView:G}):G};class zL extends b.Component{constructor(n){super(n);V(this,"domRef");V(this,"disposeCbList",[]);V(this,"sensor");V(this,"getDesignerHandler",async()=>{const n=await this.props.pluginCtx.pluginManager.get("Designer");return n==null?void 0:n.export});V(this,"updateTreeDataFromNode",()=>{const{pluginCtx:n}=this.props,{pageModel:r}=n,o=r.export(),a=EL(o,r);this.setState({treeData:a})});V(this,"getParentKeyPaths",n=>{const{treeData:r}=this.state;let o=null;if(Mc(r,a=>a.key===n?(o=a,!0):!1),o){let a=o==null?void 0:o.parent;const i=[];for(;a;)a.key&&i.push(a.key),a=a.parent;return i}else return[]});V(this,"scrollNodeToView",n=>{var o;const r=document.querySelector(`[${xo}="${n}"]`);(o=r==null?void 0:r.scrollIntoView)==null||o.call(r,{behavior:"smooth",block:"center"})});V(this,"toSelectTreeNode",n=>{if(!n){this.setState({currentSelectNodeKeys:[]});return}const r=this.getParentKeyPaths(n.id);dn.debug("onSelectNodeChange parent path",r,n);const o=Array.from(new Set([...this.state.expandKeys,...r]));dn.debug("onSelectNodeChange newExpandKeys",o,n),this.setState({currentSelectNodeKeys:[n.id],expandKeys:o}),setTimeout(()=>{this.scrollNodeToView(n.id)},100)});V(this,"containNode",(n,r)=>{let o=null;return Mc(n,a=>a.key===r.key?(o=a,!0):!1),o});V(this,"getTreeNodeByKey",n=>{const{treeData:r}=this.state;let o=null;return Mc(r,a=>a.key===n?(o=a,!0):!1),o});V(this,"registerDragEvent",async()=>{if(!this.domRef.current)return;const n=new Mn.Sensor({container:this.domRef.current,name:"OutlineTree",eventPriority:999}),{pluginCtx:r}=this.props,o=r.pageModel,a=await this.getDesignerHandler(),i=a.getDnd();n.setCanDrag(async s=>{var g;const l=s.event.target;if(!l)return;const c=lf(l,xo);if(!c)return;const u=o.getNode(c),f=this.getTreeNodeByKey(c);if((f==null?void 0:f.canDrag)!==void 0&&(f==null?void 0:f.canDrag)===!1)return;const d=a.getInstance(),h=await(d==null?void 0:d.customAdvanceHook.canDrag({dragNode:u,eventObj:{extraData:{},...s,from:s.event,fromSensor:n,fromPointer:s.pointer}}));if(h===!1)return!1;if(!u){console.log("targetNode not found");return}const v={...s,extraData:{dragNode:u,dragNodeUID:u.id}};return typeof h=="object"&&(v.extraData.dragNode=h.dragNode,v.extraData.dragNodeUID=((g=h.dragNode)==null?void 0:g.id)||""),v}),n.setCanDrop(async s=>{var w;const l=s.event.target;if(!l)return dn.debug("drop dom not found"),s;const c=lf(l,xo);if(!c)return dn.debug("targetNodeId dom not found",s,l,xo),s;const u=this.getTreeNodeByKey(c);if((u==null?void 0:u.canDropPos)!==void 0&&u.canDropPos===!1)return dn.debug("node can not be drop by tree node config"),s;const f=o.getNode(c);if(!f)return dn.debug("targetNode not found"),s;const d=(w=s.extraData)==null?void 0:w.dragNode;if(!d)return dn.debug("startNode not found"),s;if((d==null?void 0:d.id)===f.id)return dn.debug("startNode and dropNode is the same"),s;if(d.contains(f.id))return dn.debug("startNode contain dropNode"),s;const v=RL({point:s.pointer,dom:l});if(Array.isArray(u==null?void 0:u.canDropPos)&&!(u!=null&&u.canDropPos.includes(v.pos)))return!1;dn.info("can dropNode",f);const g={...s,extraData:{...s.extraData,dropPosInfo:v,dropNode:f,dropNodeUID:f.id}},m=a.getInstance(),y=await(m==null?void 0:m.customAdvanceHook.canDrop({dragNode:g.extraData.dragNode,dropNode:f,eventObj:{...g,from:g.event,fromSensor:n,fromPointer:g.pointer}}));return y===!1?!1:(typeof y=="object"&&(g.extraData={...g.extraData,...y}),g)}),i.registerSensor(n),n.emitter.on("dragging",s=>{var h,v;const l=s.extraData.dropNode;if(this.setState({dragState:Lo.DRAGGING}),!l){this.setState({dropPosInfo:null});return}const c=(h=document.querySelectorAll(`[${xo}="${l.id}"]`))==null?void 0:h[0];if(!c)return;const u=((v=s.extraData)==null?void 0:v.dropPosInfo)||{},f=c.getBoundingClientRect(),d={x:0,y:0};d.x=f.x,u.pos==="before"?d.y=f.y:u.pos==="after"?d.y=f.y+f.height:(d.y=f.y+f.height,d.x=f.x+20),this.setState({dropPosInfo:d})}),n.emitter.on("dragEnd",()=>{this.setState({dragState:Lo.NORMAL})}),this.sensor=n});this.domRef=b.createRef(),this.state={treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:n.multiSelect||!1,dropPosInfo:{x:0,y:0},pageModel:n.pluginCtx.pageModel,dragState:Lo.NORMAL}}async componentDidMount(){this.updateTreeDataFromNode();const{pluginCtx:n}=this.props,{pageModel:r}=n;r.emitter.on("*",()=>{this.updateTreeDataFromNode()}),n.globalEmitter.on("onSelectNodeChange",({node:i})=>{this.toSelectTreeNode(i)}),n.getWorkbench().emitter.on("leftPanelVisible",({visible:i,panelName:s})=>{if(i&&s==="OutlineTree"){console.log("visible, panelName",i,s);const l=n.engine.getActiveNode();l&&this.toSelectTreeNode(l)}});const a=n.engine.getActiveNode();a&&this.toSelectTreeNode(a),await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent()}render(){const{treeData:n,dragState:r,dropPosInfo:o}=this.state,{pluginCtx:a}=this.props;return p(Rx.Provider,{value:{sensor:this.sensor,state:this.state,getDesignerHandler:this.getDesignerHandler,onSelectNode:async({keys:i})=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}const l=(i==null?void 0:i[0])||"",c=a.pageModel.getNode(l);s.export.selectNode(l),c&&a.engine.updateCurrentSelectNode(c)},updateState:i=>{this.setState(i)},onDeleteNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.deleteNode(i)},onCopyNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.copyNode(i)}},children:M("div",{className:Nt.contentBox,ref:this.domRef,children:[n.map((i,s)=>p($x,{item:i,pluginCtx:this.props.pluginCtx},i.key+`${s}`)),r===Lo.DRAGGING&&o&&p("div",{className:Nt.dropAnchorLine,style:{left:`${o.x}px`,top:`${o.y}px`}})]})})}}const HL={pluginName:"大纲树"},VL={pluginName:"Layout Tree"},Rv={zh_CN:HL,en_US:VL},cf="OutlineTree",jc=`plugin:${cf}`,UL={name:cf,async init(e){const{i18n:t}=e;Object.keys(Rv).forEach(a=>{t.addResourceBundle(a,jc,Rv[a],!0,!0)});const n=ta(jc)(zL),r=ta(jc)(({t:a})=>p(vt,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:p(r,{}),name:cf,icon:p(DC,{}),render:p(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},WL="_CFromRenderBox_1vsdm_2",GL={CFromRenderBox:WL},Gd=b.createContext({formName:"",formState:{},conditionConfig:{},updateContext:()=>{},updateConditionConfig:()=>{},customSetterMap:{}}),Tx={},KL=e=>{Object.assign(Tx,e)};class Kd extends b.Component{constructor(n){super(n);V(this,"updateContext");V(this,"getFieldsValue",()=>this.formatValue(this.state.formState));V(this,"setFields",n=>{this.setState({formState:n})});V(this,"formatValue",n=>{const r={},o=this.state.conditionConfig;return Object.keys(n).forEach(a=>{var s;(((s=o[a])==null?void 0:s.call(o,n))??!0)&&(r[a]=n[a])}),r});this.updateContext=r=>{var o,a;this.setState({formState:r,customSetterMap:Tx}),(a=(o=this.props).onValueChange)==null||a.call(o,this.formatValue(r))},this.state={formName:n.name,formState:n.initialValue??{},conditionConfig:{},customSetterMap:n.customSetterMap||{},updateContext:this.updateContext,updateConditionConfig:(r,o)=>{this.setState({conditionConfig:{...this.state.conditionConfig,[r]:o}})}}}render(){const{state:n}=this,{children:r}=this.props;return p(Gd.Provider,{value:n,children:r})}}class qL extends TypeError{constructor(t,n){let r;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=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function XL(e){return wn(e)&&typeof e[Symbol.iterator]=="function"}function wn(e){return typeof e=="object"&&e!=null}function Jt(e){return typeof e=="string"?JSON.stringify(e):""+e}function YL(e){const{done:t,value:n}=e.next();return t?void 0:n}function JL(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Jt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*$v(e,t,n,r){XL(e)||(e=[e]);for(const o of e){const a=JL(o,t,n,r);a&&(yield a)}}function*qd(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&wn(t.schema)&&wn(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,f]of t.entries(e,s)){const d=qd(u,f,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const h of d)h[0]?(l=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):a&&(u=h[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):wn(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class Vn{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:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return $v(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return $v(u,c,this,l)}:this.refiner=()=>[]}assert(t){return QL(t,this)}create(t){return ZL(t,this)}is(t){return tB(t,this)}mask(t){return eB(t,this)}validate(t,n){return n===void 0&&(n={}),ya(t,this,n)}}function QL(e,t){const n=ya(e,t);if(n[0])throw n[0]}function ZL(e,t){const n=ya(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function eB(e,t){const n=ya(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function tB(e,t){return!ya(e,t)[0]}function ya(e,t,n){n===void 0&&(n={});const r=qd(e,t,n),o=YL(r);return o[0]?[new qL(o[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function nB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?Nx(a):Ke(a)}function Er(e,t){return new Vn({type:e,schema:null,validator:t})}function na(e){return new Vn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function rB(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return Nx(r);default:return Ke(r)}}function st(){return Er("any",()=>!0)}function gt(e){return new Vn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Jt(t)}})}function Xr(){return Er("boolean",e=>typeof e=="boolean")}function uf(e){const t={},n=e.map(r=>Jt(r)).join();for(const r of e)t[r]=r;return new Vn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Jt(r)}})}function Px(){return Er("func",e=>typeof e=="function"||"Expected a function, but received: "+Jt(e))}function Dn(e){const t=Jt(e),n=typeof e;return new Vn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Jt(r)}})}function oB(){return Er("never",()=>!1)}function kx(){return Er("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Jt(e))}function Ke(e){const t=e?Object.keys(e):[],n=oB();return new Vn({type:"object",schema:e||null,*entries(r){if(e&&wn(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return wn(r)||"Expected an object, but received: "+Jt(r)},coercer(r){return wn(r)?{...r}:r}})}function ce(e){return new Vn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function ri(e,t){return new Vn({type:"record",schema:null,*entries(n){if(wn(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return wn(n)||"Expected an object, but received: "+Jt(n)}})}function ie(){return Er("string",e=>typeof e=="string"||"Expected a string, but received: "+Jt(e))}function Nx(e){const t=Object.keys(e);return new Vn({type:"type",schema:e,*entries(n){if(wn(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return wn(n)||"Expected an object, but received: "+Jt(n)}})}function qt(e){const t=e.map(n=>n.type).join(" | ");return new Vn({type:"union",schema:null,coercer(n,r){return(e.find(a=>{const[i]=a.validate(n,{coerce:!0});return!i})||aB()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=qd(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Jt(n),...o]}})}function aB(){return Er("unknown",()=>!0)}const Ax=Ke({package:ie(),version:ie(),name:ie(),exportName:ce(ie()),destructuring:ce(Xr()),subName:ce(ie()),main:ce(ie()),cssPaths:ce(gt(ie()))});gt(Ax);var xr=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(xr||{}),ff=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(ff||{});const iB=()=>Er("normalObj",e=>!sa(e)||[xr.SLOT,xr.EXPRESSION,xr.FUNCTION].includes(e==null?void 0:e.type)?!1:(ya(e,ri(ie(),Xd)),!0)),Xd=qt([ie(),kx(),Xr(),Ke({type:Dn(xr.SLOT),renderType:uf([ff.FUNC,ff.COMP]),params:ce(gt(ie())),value:na(()=>qt([cl,gt(cl)]))}),Ke({type:Dn(xr.EXPRESSION),value:ie()}),Ke({type:Dn(xr.FUNCTION),value:ie()}),iB(),gt(na(()=>Xd))]),Tv=Ke({type:Dn(xr.EXPRESSION),value:ie()}),cl=Ke({id:ce(ie()),title:ce(ie()),componentName:ie(),props:ce(ri(ie(),Xd)),nodeName:ce(ie()),state:ce(ri(ie(),st())),children:na(()=>ce(gt(qt([ie(),cl])))),configure:ce(st()),css:ce(st()),style:ce(st()),classNames:ce(gt(st())),refId:ce(ie()),extra:ce(ri(st(),st())),condition:ce(qt([Xr(),Tv])),loop:ce(Ke({open:Xr(),data:qt([gt(st()),Tv]),args:ce(gt(ie())),forName:ce(ie()),forIndex:ce(ie()),key:ce(st()),name:ce(ie())})),methods:ce(gt(st()))}),sB=e=>sa(e)?e.label:e,ul=qt([ie(),Ke({label:ie(),tip:ce(ie())})]),lB=Ke({type:Dn("shape"),value:gt(Ke({name:ie(),title:ul,valueType:na(()=>Ul)}))}),cB=Ke({type:Dn("enums"),value:gt(ie())});Ke({type:Dn("array"),value:na(()=>Ul)});const uB=Ke({type:Dn("array"),value:na(()=>gt(Ul))}),Ul=qt([uf(["array","boolean","number","object","string"]),uf(["component","expression","function"]),lB,cB,uB]),fB=qt([ie(),Ke({componentName:ie(),props:ce(st()),initialValue:ce(st()),component:ce(st()),hiddenLabel:ce(Xr())})]),Dc=Ke({name:ie(),title:ul,valueType:Ul,description:ce(ie()),defaultValue:st(),setters:ce(gt(fB)),condition:ce(Px())});qt([ie(),Px()]);qt([ie(),Ke({name:ie(),describe:ce(ie()),params:ce(Ke({name:ie(),description:ie()})),template:ie()})]);const dB=Ke({id:ce(ie()),title:ie(),snapshot:qt([ie(),st()]),snapshotText:ce(ie()),description:ce(ie()),tags:ce(gt(ie())),groupName:ce(ie()),category:ce(ie()),schema:nB(rB(cl,["id"]),Ke({componentName:ce(ie())}))});Ke({componentName:ie(),title:ie(),screenshot:ce(ie()),icon:ce(ie()),tags:ce(gt(ie())),groupName:ce(ie()),category:ce(ie()),priority:ce(kx()),npm:ce(Ax),snippets:gt(dB),props:gt(qt([Dc,Ke({title:ce(ul),type:Dn("single"),content:Dc}),Ke({title:ce(ul),type:Dn("group"),content:gt(Dc)})])),fixedProps:ce(st()),isContainer:ce(qt([Xr(),Ke({placeholder:ie(),width:ie(),height:ie()})])),disableEditorDragDom:ce(st()),isLayout:ce(Xr()),rootSelector:ce(ie()),advanceCustom:ce(st()),extra:ce(ri(st(),st()))});const Mx=({onValueChange:e,setterContext:t,initialValue:n,...r})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Input,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});Mx.setterName="字符设置器";const jx=({onValueChange:e,setterContext:t,initialValue:n,...r})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.InputNumber,{style:{width:"100%"},...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}})});jx.setterName="数字设置器";const Yd=(e=[])=>e.map(t=>typeof t=="string"?{componentName:t}:t);function hB(e){const{index:t,keyPaths:n,setters:r}=e,o={...e.style},a={[t]:e.value},i=b.useRef(null);return b.useEffect(()=>{var s;(s=i.current)==null||s.setFields({[t]:e.value})},[e.value]),p("div",{style:o,children:p(Kd,{ref:i,name:String(t),initialValue:a||{},onValueChange:e.onValueChange,customSetterMap:{},children:p(Uh,{suffix:p("div",{onClick:e.onDelete,style:{marginLeft:"8px",cursor:"pointer",fontSize:"12px"},children:p(Xf,{})}),name:String(t),label:`元素${t}`,keyPaths:[...n,String(t)],setters:r})})})}function pB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Wl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xa(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Jd(e){return"nodeType"in e}function Bt(e){var t,n;return e?xa(e)?e:Jd(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Qd(e){const{Document:t}=Bt(e);return e instanceof t}function Li(e){return xa(e)?!1:e instanceof Bt(e).HTMLElement}function gB(e){return e instanceof Bt(e).SVGElement}function wa(e){return e?xa(e)?e.document:Jd(e)?Qd(e)?e:Li(e)?e.ownerDocument:document:document:document}const _n=Wl?b.useLayoutEffect:b.useEffect;function Zd(e){const t=b.useRef(e);return _n(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function vB(){const e=b.useRef(null),t=b.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=b.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ci(e,t){t===void 0&&(t=[e]);const n=b.useRef(e);return _n(()=>{n.current!==e&&(n.current=e)},t),n}function Bi(e,t){const n=b.useRef();return b.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fl(e){const t=Zd(e),n=b.useRef(null),r=b.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function df(e){const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}let Ic={};function Fi(e,t){return b.useMemo(()=>{if(t)return t;const n=Ic[e]==null?0:Ic[e]+1;return Ic[e]=n,e+"-"+n},[e,t])}function Dx(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,i)=>{const s=Object.entries(i);for(const[l,c]of s){const u=a[l];u!=null&&(a[l]=u+e*c)}return a},{...t})}}const Uo=Dx(1),_i=Dx(-1);function mB(e){return"clientX"in e&&"clientY"in e}function eh(e){if(!e)return!1;const{KeyboardEvent:t}=Bt(e.target);return t&&e instanceof t}function bB(e){if(!e)return!1;const{TouchEvent:t}=Bt(e.target);return t&&e instanceof t}function hf(e){if(bB(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return mB(e)?{x:e.clientX,y:e.clientY}:null}const ra=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ra.Translate.toString(e),ra.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Pv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function yB(e){return e.matches(Pv)?e:e.querySelector(Pv)}const xB={display:"none"};function wB(e){let{id:t,value:n}=e;return p("div",{id:t,style:xB,children:n})}const SB={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function CB(e){let{id:t,announcement:n}=e;return p("div",{id:t,style:SB,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function _B(){const[e,t]=b.useState("");return{announce:b.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ix=b.createContext(null);function OB(e){const t=b.useContext(Ix);b.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function EB(){const[e]=b.useState(()=>new Set),t=b.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[b.useCallback(r=>{let{type:o,event:a}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,a)})},[e]),t]}const RB={draggable:`
|
|
125
160
|
To pick up a draggable item, press the space bar.
|
|
126
161
|
While dragging, use the arrow keys to move the item.
|
|
127
162
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
128
|
-
`},YD={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function XD(e){let{announcements:t=YD,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=qD}=e;const{announce:a,announcement:i}=WD(),s=aa("DndLiveRegion"),[l,c]=g.useState(!1);if(g.useEffect(()=>{c(!0)},[]),GD(g.useMemo(()=>({onDragStart(d){let{active:f}=d;a(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:p}=d;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(d){let{active:f,over:p}=d;a(t.onDragOver({active:f,over:p}))},onDragEnd(d){let{active:f,over:p}=d;a(t.onDragEnd({active:f,over:p}))},onDragCancel(d){let{active:f,over:p}=d;a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!l)return null;const u=ee(Ye,{children:[w(FD,{id:r,value:o.draggable}),w(UD,{id:s,announcement:i})]});return n?Lt.createPortal(u,n):u}var Ke;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ke||(Ke={}));function pi(){}function Vf(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function JD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Gt=Object.freeze({x:0,y:0});function QD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ZD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function e$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ff(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function om(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}const t$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ff(t),a=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Ff(l),u=o.reduce((f,p,h)=>f+QD(c[h],p),0),d=Number((u/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:d}})}}return a.sort(ZD)};function n$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const l=t.width*t.height,c=e.width*e.height,u=i*s,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const r$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:i}=a,s=n.get(i);if(s){const l=n$(s,t);l>0&&o.push({id:i,data:{droppableContainer:a,value:l}})}}return o.sort(e$)};function o$(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function am(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Gt}function a$(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const i$=a$(1);function s$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function l$(e,t,n){const r=s$(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const c$={ignoreTransform:!1};function io(e,t){t===void 0&&(t=c$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=gt(e),{transform:u,transformOrigin:d}=c(e);u&&(n=l$(n,u,d))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function Hf(e){return io(e,{ignoreTransform:!0})}function u$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function d$(e,t){return t===void 0&&(t=gt(e).getComputedStyle(e)),t.position==="fixed"}function f$(e,t){t===void 0&&(t=gt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function zi(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Qc(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ra(o)||$D(o)||n.includes(o))return n;const{getComputedStyle:a}=gt(o),i=a(o);return o!==e&&f$(o,i)&&n.push(o),d$(o,i)?n:r(o.parentNode)}return e?r(e):n}function im(e){const[t]=zi(e,1);return t??null}function Ss(e){return!Bi||!e?null:oo(e)?e:Jc(e)?Qc(e)||e===ao(e).scrollingElement?window:ra(e)?e:null:null}function sm(e){return oo(e)?e.scrollX:e.scrollLeft}function lm(e){return oo(e)?e.scrollY:e.scrollTop}function Tl(e){return{x:sm(e),y:lm(e)}}var Je;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Je||(Je={}));function cm(e){return!Bi||!e?!1:e===document.scrollingElement}function um(e){const t={x:0,y:0},n=cm(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const p$={x:.2,y:.2};function h$(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=p$);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=um(e),p={x:0,y:0},h={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+m.height?(p.y=Je.Backward,h.y=r*Math.abs((t.top+m.height-a)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Je.Forward,h.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!f&&s>=t.right-m.width?(p.x=Je.Forward,h.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&i<=t.left+m.width&&(p.x=Je.Backward,h.x=r*Math.abs((t.left+m.width-i)/m.width)),{direction:p,speed:h}}function g$(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function dm(e){return e.reduce((t,n)=>_r(t,Tl(n)),Gt)}function v$(e){return e.reduce((t,n)=>t+sm(n),0)}function m$(e){return e.reduce((t,n)=>t+lm(n),0)}function y$(e,t){if(t===void 0&&(t=io),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);im(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const b$=[["x",["left","right"],v$],["y",["top","bottom"],m$]];class tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=zi(n),o=dm(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,i,s]of b$)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=s(r),u=o[a]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Po{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function w$(e){const{EventTarget:t}=gt(e);return e instanceof t?e:ao(e)}function xs(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Nt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Nt||(Nt={}));function Uf(e){e.preventDefault()}function S$(e){e.stopPropagation()}var ce;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(ce||(ce={}));const fm={start:[ce.Space,ce.Enter],cancel:[ce.Esc],end:[ce.Space,ce.Enter]},x$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ce.Right:return{...n,x:n.x+25};case ce.Left:return{...n,x:n.x-25};case ce.Down:return{...n,y:n.y+25};case ce.Up:return{...n,y:n.y-25}}};class nu{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Po(ao(n)),this.windowListeners=new Po(gt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Nt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&y$(r),n(Gt)}handleKeyDown(t){if(eu(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=fm,coordinateGetter:i=x$,scrollBehavior:s="smooth"}=o,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:Gt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(t,{active:n,context:r.current,currentCoordinates:u});if(d){const f=Ko(d,u),p={x:0,y:0},{scrollableAncestors:h}=r.current;for(const m of h){const b=t.code,{isTop:y,isRight:S,isLeft:E,isBottom:x,maxScroll:v,minScroll:O}=um(m),C=g$(m),R={x:Math.min(b===ce.Right?C.right-C.width/2:C.right,Math.max(b===ce.Right?C.left:C.left+C.width/2,d.x)),y:Math.min(b===ce.Down?C.bottom-C.height/2:C.bottom,Math.max(b===ce.Down?C.top:C.top+C.height/2,d.y))},N=b===ce.Right&&!S||b===ce.Left&&!E,T=b===ce.Down&&!x||b===ce.Up&&!y;if(N&&R.x!==d.x){const k=m.scrollLeft+f.x,j=b===ce.Right&&k<=v.x||b===ce.Left&&k>=O.x;if(j&&!f.y){m.scrollTo({left:k,behavior:s});return}j?p.x=m.scrollLeft-k:p.x=b===ce.Right?m.scrollLeft-v.x:m.scrollLeft-O.x,p.x&&m.scrollBy({left:-p.x,behavior:s});break}else if(T&&R.y!==d.y){const k=m.scrollTop+f.y,j=b===ce.Down&&k<=v.y||b===ce.Up&&k>=O.y;if(j&&!f.x){m.scrollTo({top:k,behavior:s});return}j?p.y=m.scrollTop-k:p.y=b===ce.Down?m.scrollTop-v.y:m.scrollTop-O.y,p.y&&m.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,_r(Ko(d,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}nu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=fm,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Wf(e){return!!(e&&"distance"in e)}function Gf(e){return!!(e&&"delay"in e)}class ru{constructor(t,n,r){var o;r===void 0&&(r=w$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:i}=a;this.props=t,this.events=n,this.document=ao(i),this.documentListeners=new Po(this.document),this.listeners=new Po(r),this.windowListeners=new Po(gt(i)),this.initialCoordinates=(o=Nl(a))!=null?o:Gt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.DragStart,Uf),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),this.windowListeners.add(Nt.ContextMenu,Uf),this.documentListeners.add(Nt.Keydown,this.handleKeydown),n){if(Wf(n))return;if(Gf(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Nt.Click,S$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Nt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!o)return;const l=(n=Nl(t))!=null?n:Gt,c=Ko(o,l);if(!r&&s){if(Gf(s))return xs(c,s.tolerance)?this.handleCancel():void 0;if(Wf(s))return s.tolerance!=null&&xs(c,s.tolerance)?this.handleCancel():xs(c,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===ce.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const C$={move:{name:"pointermove"},end:{name:"pointerup"}};class ou extends ru{constructor(t){const{event:n}=t,r=ao(n.target);super(t,C$,r)}}ou.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const O$={move:{name:"mousemove"},end:{name:"mouseup"}};var Pl;(function(e){e[e.RightClick=2]="RightClick"})(Pl||(Pl={}));class E$ extends ru{constructor(t){super(t,O$,ao(t.event.target))}}E$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Pl.RightClick?!1:(r==null||r({event:n}),!0)}}];const Cs={move:{name:"touchmove"},end:{name:"touchend"}};class _$ extends ru{constructor(t){super(t,Cs)}static setup(){return window.addEventListener(Cs.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Cs.move.name,t)};function t(){}}}_$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ko;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ko||(ko={}));var hi;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hi||(hi={}));function R$(e){let{acceleration:t,activator:n=ko.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=hi.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=T$({delta:d,disabled:!a}),[h,m]=ID(),b=g.useRef({x:0,y:0}),y=g.useRef({x:0,y:0}),S=g.useMemo(()=>{switch(n){case ko.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ko.DraggableRect:return o}},[n,o,l]),E=g.useRef(null),x=g.useCallback(()=>{const O=E.current;if(!O)return;const C=b.current.x*y.current.x,R=b.current.y*y.current.y;O.scrollBy(C,R)},[]),v=g.useMemo(()=>s===hi.TreeOrder?[...c].reverse():c,[s,c]);g.useEffect(()=>{if(!a||!c.length||!S){m();return}for(const O of v){if((r==null?void 0:r(O))===!1)continue;const C=c.indexOf(O),R=u[C];if(!R)continue;const{direction:N,speed:T}=h$(O,R,S,t,f);for(const k of["x","y"])p[k][N[k]]||(T[k]=0,N[k]=0);if(T.x>0||T.y>0){m(),E.current=O,h(x,i),b.current=T,y.current=N;return}}b.current={x:0,y:0},y.current={x:0,y:0},m()},[t,x,r,m,a,i,JSON.stringify(S),JSON.stringify(p),h,c,v,u,JSON.stringify(f)])}const N$={x:{[Je.Backward]:!1,[Je.Forward]:!1},y:{[Je.Backward]:!1,[Je.Forward]:!1}};function T$(e){let{delta:t,disabled:n}=e;const r=Rl(t);return oa(o=>{if(n||!r||!o)return N$;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Je.Backward]:o.x[Je.Backward]||a.x===-1,[Je.Forward]:o.x[Je.Forward]||a.x===1},y:{[Je.Backward]:o.y[Je.Backward]||a.y===-1,[Je.Forward]:o.y[Je.Forward]||a.y===1}}},[n,t,r])}function P$(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return oa(o=>{var a;return t===null?null:(a=r??o)!=null?a:null},[r,t])}function k$(e,t){return g.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...a]},[]),[e,t])}var qo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qo||(qo={}));var kl;(function(e){e.Optimized="optimized"})(kl||(kl={}));const Kf=new Map;function j$(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=g.useState(null),{frequency:s,measure:l,strategy:c}=o,u=g.useRef(e),d=b(),f=Go(d),p=g.useCallback(function(y){y===void 0&&(y=[]),!f.current&&i(S=>S===null?y:S.concat(y.filter(E=>!S.includes(E))))},[f]),h=g.useRef(null),m=oa(y=>{if(d&&!n)return Kf;if(!y||y===Kf||u.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const x=E.node.current,v=x?new tu(l(x),x):null;E.rect.current=v,v&&S.set(E.id,v)}return S}return y},[e,a,n,d,l]);return g.useEffect(()=>{u.current=e},[e]),g.useEffect(()=>{d||p()},[n,d]),g.useEffect(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),g.useEffect(()=>{d||typeof s!="number"||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function b(){switch(c){case qo.Always:return!1;case qo.BeforeDragging:return n;default:return!n}}}function pm(e,t){return oa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function M$(e,t){return pm(e,t)}function A$(e){let{callback:t,disabled:n}=e;const r=Zc(t),o=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Vi(e){let{callback:t,disabled:n}=e;const r=Zc(t),o=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function D$(e){return new tu(io(e),e)}function qf(e,t,n){t===void 0&&(t=D$);const[r,o]=g.useReducer(s,null),a=A$({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),i=Vi({callback:o});return Wt(()=>{o(),e?(i==null||i.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),a==null||a.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function $$(e){const t=pm(e);return am(e,t)}const Yf=[];function I$(e){const t=g.useRef(e),n=oa(r=>e?r&&r!==Yf&&e&&t.current&&e.parentNode===t.current.parentNode?r:zi(e):Yf,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function L$(e){const[t,n]=g.useState(null),r=g.useRef(e),o=g.useCallback(a=>{const i=Ss(a.target);i&&n(s=>s?(s.set(i,Tl(i)),new Map(s)):null)},[]);return g.useEffect(()=>{const a=r.current;if(e!==a){i(a);const s=e.map(l=>{const c=Ss(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,Tl(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{const c=Ss(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>_r(a,i),Gt):dm(e):Gt,[e,t])}function Xf(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const r=e!==Gt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ko(e,n.current):Gt}function B$(e){g.useEffect(()=>{if(!Bi)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function z$(e,t){return g.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=i=>{a(i,t)},n},{}),[e,t])}function hm(e){return g.useMemo(()=>e?u$(e):null,[e])}const Os=[];function V$(e,t){t===void 0&&(t=io);const[n]=e,r=hm(n?gt(n):null),[o,a]=g.useReducer(s,Os),i=Vi({callback:a});return e.length>0&&o===Os&&a(),Wt(()=>{e.length?e.forEach(l=>i==null?void 0:i.observe(l)):(i==null||i.disconnect(),a())},[e]),o;function s(){return e.length?e.map(l=>cm(l)?r:new tu(t(l),l)):Os}}function F$(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ra(t)?t:e}function H$(e){let{measure:t}=e;const[n,r]=g.useState(null),o=g.useCallback(c=>{for(const{target:u}of c)if(ra(u)){r(d=>{const f=t(u);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),a=Vi({callback:o}),i=g.useCallback(c=>{const u=F$(c);a==null||a.disconnect(),u&&(a==null||a.observe(u)),r(u?t(u):null)},[t,a]),[s,l]=fi(i);return g.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const U$=[{sensor:ou,options:{}},{sensor:nu,options:{}}],W$={current:{}},Ka={draggable:{measure:Hf},droppable:{measure:Hf,strategy:qo.WhileDragging,frequency:kl.Optimized},dragOverlay:{measure:io}};class jo extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const G$={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ka,measureDroppableContainers:pi,windowRect:null,measuringScheduled:!1},K$={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pi,draggableNodes:new Map,over:null,measureDroppableContainers:pi},Fi=g.createContext(K$),gm=g.createContext(G$);function q$(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jo}}}function Y$(e,t){switch(t.type){case Ke.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ke.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Ke.DragEnd:case Ke.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ke.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new jo(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ke.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new jo(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Ke.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new jo(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function X$(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=g.useContext(Fi),a=Rl(r),i=Rl(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!r&&a&&i!=null){if(!eu(a)||document.activeElement===a.target)return;const s=o.get(i);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=zD(u);if(d){d.focus();break}}})}},[r,t,o,i,a]),null}function J$(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function Q$(e){return g.useMemo(()=>({draggable:{...Ka.draggable,...e==null?void 0:e.draggable},droppable:{...Ka.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ka.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Z$(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=g.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;Wt(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=am(u,r);if(i||(d.x=0),s||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=im(c);f&&f.scrollBy({top:d.y,left:d.x})}},[t,i,s,r,n])}const vm=g.createContext({...Gt,scaleX:1,scaleY:1});var En;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(En||(En={}));const Jf=g.memo(function(t){var n,r,o,a;let{id:i,accessibility:s,autoScroll:l=!0,children:c,sensors:u=U$,collisionDetection:d=r$,measuring:f,modifiers:p,...h}=t;const m=g.useReducer(Y$,void 0,q$),[b,y]=m,[S,E]=KD(),[x,v]=g.useState(En.Uninitialized),O=x===En.Initialized,{draggable:{active:C,nodes:R,translate:N},droppable:{containers:T}}=b,k=C?R.get(C):null,j=g.useRef({initial:null,translated:null}),L=g.useMemo(()=>{var Pe;return C!=null?{id:C,data:(Pe=k==null?void 0:k.data)!=null?Pe:W$,rect:j}:null},[C,k]),M=g.useRef(null),[P,D]=g.useState(null),[F,ne]=g.useState(null),Z=Go(h,Object.values(h)),ue=aa("DndDescribedBy",i),A=g.useMemo(()=>T.getEnabled(),[T]),I=Q$(f),{droppableRects:G,measureDroppableContainers:te,measuringScheduled:ie}=j$(A,{dragging:O,dependencies:[N.x,N.y],config:I.droppable}),de=P$(R,C),we=g.useMemo(()=>F?Nl(F):null,[F]),fe=va(),Ee=M$(de,I.draggable.measure);Z$({activeNode:C?R.get(C):null,config:fe.layoutShiftCompensation,initialRect:Ee,measure:I.draggable.measure});const re=qf(de,I.draggable.measure,Ee),De=qf(de?de.parentElement:null),z=g.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:G,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Xe=T.getNodeFor((n=z.current.over)==null?void 0:n.id),Le=H$({measure:I.dragOverlay.measure}),$e=(r=Le.nodeRef.current)!=null?r:de,vt=O?(o=Le.rect)!=null?o:re:null,an=!!(Le.nodeRef.current&&Le.rect),sn=$$(an?null:re),Me=hm($e?gt($e):null),me=I$(O?Xe??de:null),Ae=V$(me),Ge=J$(p,{transform:{x:N.x-sn.x,y:N.y-sn.y,scaleX:1,scaleY:1},activatorEvent:F,active:L,activeNodeRect:re,containerNodeRect:De,draggingNodeRect:vt,over:z.current.over,overlayNodeRect:Le.rect,scrollableAncestors:me,scrollableAncestorRects:Ae,windowRect:Me}),Kt=we?_r(we,N):null,ua=L$(me),da=Xf(ua),fa=Xf(ua,[re]),Ot=_r(Ge,da),xn=vt?i$(vt,Ge):null,Cn=L&&xn?d({active:L,collisionRect:xn,droppableRects:G,droppableContainers:A,pointerCoordinates:Kt}):null,co=om(Cn,"id"),[Et,pa]=g.useState(null),qi=an?Ge:_r(Ge,fa),Yi=o$(qi,(a=Et==null?void 0:Et.rect)!=null?a:null,re),ha=g.useCallback((Pe,Ze)=>{let{sensor:et,options:Mt}=Ze;if(M.current==null)return;const lt=R.get(M.current);if(!lt)return;const ct=Pe.nativeEvent,_t=new et({active:M.current,activeNode:lt,event:ct,options:Mt,context:z,onStart(ut){const $n=M.current;if($n==null)return;const In=R.get($n);if(!In)return;const{onDragStart:Ln}=Z.current,cr={active:{id:$n,data:In.data,rect:j}};Lt.unstable_batchedUpdates(()=>{Ln==null||Ln(cr),v(En.Initializing),y({type:Ke.DragStart,initialCoordinates:ut,active:$n}),S({type:"onDragStart",event:cr})})},onMove(ut){y({type:Ke.DragMove,coordinates:ut})},onEnd:ln(Ke.DragEnd),onCancel:ln(Ke.DragCancel)});Lt.unstable_batchedUpdates(()=>{D(_t),ne(Pe.nativeEvent)});function ln(ut){return async function(){const{active:In,collisions:Ln,over:cr,scrollAdjustedTranslate:ma}=z.current;let Bn=null;if(In&&ma){const{cancelDrop:zn}=Z.current;Bn={activatorEvent:ct,active:In,collisions:Ln,delta:ma,over:cr},ut===Ke.DragEnd&&typeof zn=="function"&&await Promise.resolve(zn(Bn))&&(ut=Ke.DragCancel)}M.current=null,Lt.unstable_batchedUpdates(()=>{y({type:ut}),v(En.Uninitialized),pa(null),D(null),ne(null);const zn=ut===Ke.DragEnd?"onDragEnd":"onDragCancel";if(Bn){const _=Z.current[zn];_==null||_(Bn),S({type:zn,event:Bn})}})}}},[R]),Xi=g.useCallback((Pe,Ze)=>(et,Mt)=>{const lt=et.nativeEvent,ct=R.get(Mt);if(M.current!==null||!ct||lt.dndKit||lt.defaultPrevented)return;const _t={active:ct};Pe(et,Ze.options,_t)===!0&&(lt.dndKit={capturedBy:Ze.sensor},M.current=Mt,ha(et,Ze))},[R,ha]),ga=k$(u,Xi);B$(u),Wt(()=>{re&&x===En.Initializing&&v(En.Initialized)},[re,x]),g.useEffect(()=>{const{onDragMove:Pe}=Z.current,{active:Ze,activatorEvent:et,collisions:Mt,over:lt}=z.current;if(!Ze||!et)return;const ct={active:Ze,activatorEvent:et,collisions:Mt,delta:{x:Ot.x,y:Ot.y},over:lt};Lt.unstable_batchedUpdates(()=>{Pe==null||Pe(ct),S({type:"onDragMove",event:ct})})},[Ot.x,Ot.y]),g.useEffect(()=>{const{active:Pe,activatorEvent:Ze,collisions:et,droppableContainers:Mt,scrollAdjustedTranslate:lt}=z.current;if(!Pe||M.current==null||!Ze||!lt)return;const{onDragOver:ct}=Z.current,_t=Mt.get(co),ln=_t&&_t.rect.current?{id:_t.id,rect:_t.rect.current,data:_t.data,disabled:_t.disabled}:null,ut={active:Pe,activatorEvent:Ze,collisions:et,delta:{x:lt.x,y:lt.y},over:ln};Lt.unstable_batchedUpdates(()=>{pa(ln),ct==null||ct(ut),S({type:"onDragOver",event:ut})})},[co]),Wt(()=>{z.current={activatorEvent:F,active:L,activeNode:de,collisionRect:xn,collisions:Cn,droppableRects:G,draggableNodes:R,draggingNode:$e,draggingNodeRect:vt,droppableContainers:T,over:Et,scrollableAncestors:me,scrollAdjustedTranslate:Ot},j.current={initial:vt,translated:xn}},[L,de,Cn,xn,R,$e,vt,G,T,Et,me,Ot]),R$({...fe,delta:N,draggingRect:xn,pointerCoordinates:Kt,scrollableAncestors:me,scrollableAncestorRects:Ae});const Ji=g.useMemo(()=>({active:L,activeNode:de,activeNodeRect:re,activatorEvent:F,collisions:Cn,containerNodeRect:De,dragOverlay:Le,draggableNodes:R,droppableContainers:T,droppableRects:G,over:Et,measureDroppableContainers:te,scrollableAncestors:me,scrollableAncestorRects:Ae,measuringConfiguration:I,measuringScheduled:ie,windowRect:Me}),[L,de,re,F,Cn,De,Le,R,T,G,Et,te,me,Ae,I,ie,Me]),uo=g.useMemo(()=>({activatorEvent:F,activators:ga,active:L,activeNodeRect:re,ariaDescribedById:{draggable:ue},dispatch:y,draggableNodes:R,over:Et,measureDroppableContainers:te}),[F,ga,L,re,y,ue,R,Et,te]);return ee(rm.Provider,{value:E,children:[ee(Fi.Provider,{value:uo,children:[w(gm.Provider,{value:Ji,children:w(vm.Provider,{value:Yi,children:c})}),w(X$,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),w(XD,{...s,hiddenTextDescribedById:ue})]});function va(){const Pe=(P==null?void 0:P.autoScrollEnabled)===!1,Ze=typeof l=="object"?l.enabled===!1:l===!1,et=O&&!Pe&&!Ze;return typeof l=="object"?{...l,enabled:et}:{enabled:et}}}),e8=g.createContext(null),Qf="button",t8="Droppable";function mm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=aa(t8),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=g.useContext(Fi),{role:p=Qf,roleDescription:h="draggable",tabIndex:m=0}=o??{},b=(l==null?void 0:l.id)===t,y=g.useContext(b?vm:e8),[S,E]=fi(),[x,v]=fi(),O=z$(i,t),C=Go(n);Wt(()=>(d.set(t,{id:t,key:a,node:S,activatorNode:x,data:C}),()=>{const N=d.get(t);N&&N.key===a&&d.delete(t)}),[d,t]);const R=g.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&p===Qf?!0:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,m,b,h,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:R,isDragging:b,listeners:r?void 0:O,node:S,over:f,setNodeRef:E,setActivatorNodeRef:v,transform:y}}function n8(){return g.useContext(gm)}const r8="Droppable",o8={timeout:25};function a8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=aa(r8),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=g.useContext(Fi),u=g.useRef({disabled:n}),d=g.useRef(!1),f=g.useRef(null),p=g.useRef(null),{disabled:h,updateMeasurementsFor:m,timeout:b}={...o8,...o},y=Go(m??r),S=g.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),p.current=null},b)},[b]),E=Vi({callback:S,disabled:h||!i}),x=g.useCallback((R,N)=>{E&&(N&&(E.unobserve(N),d.current=!1),R&&E.observe(R))},[E]),[v,O]=fi(x),C=Go(t);return g.useEffect(()=>{!E||!v.current||(E.disconnect(),d.current=!1,E.observe(v.current))},[v,E]),Wt(()=>(s({type:Ke.RegisterDroppable,element:{id:r,key:a,disabled:n,node:v,rect:f,data:C}}),()=>s({type:Ke.UnregisterDroppable,key:a,id:r})),[r]),g.useEffect(()=>{n!==u.current.disabled&&(s({type:Ke.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:f,isOver:(l==null?void 0:l.id)===r,node:v,over:l,setNodeRef:O}}function au(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function i8(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function ka(e){return e!==null&&e>=0}function s8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function l8(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ym=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=au(t,r,n),i=t[o],s=a[o];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}},bm="Sortable",wm=g.createContext({activeIndex:-1,containerId:bm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ym,disabled:{draggable:!1,droppable:!1}});function c8(e){let{children:t,id:n,items:r,strategy:o=ym,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=n8(),d=aa(bm,n),f=s.rect!==null,p=g.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,m=i?p.indexOf(i.id):-1,b=c?p.indexOf(c.id):-1,y=g.useRef(p),S=!s8(p,y.current),E=b!==-1&&m===-1||S,x=l8(a);Wt(()=>{S&&h&&u(p)},[S,p,h,u]),g.useEffect(()=>{y.current=p},[p]);const v=g.useMemo(()=>({activeIndex:m,containerId:d,disabled:x,disableTransforms:E,items:p,overIndex:b,useDragOverlay:f,sortedRects:i8(p,l),strategy:o}),[m,d,x.draggable,x.droppable,E,p,b,l,f,o]);return w(wm.Provider,{value:v,children:t})}const u8=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return au(n,r,o).indexOf(t)},d8=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==a&&o===i?!1:n?!0:i!==o&&t===l},f8={duration:200,easing:"ease"},Sm="transform",p8=Vr.Transition.toString({property:Sm,duration:0,easing:"linear"}),h8={roleDescription:"sortable"};function g8(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=g.useState(null),s=g.useRef(n);return Wt(()=>{if(!t&&n!==s.current&&r.current){const l=o.current;if(l){const c=io(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==s.current&&(s.current=n)},[t,n,r,o]),g.useEffect(()=>{a&&i(null)},[a]),a}function v8(e){let{animateLayoutChanges:t=d8,attributes:n,disabled:r,data:o,getNewIndex:a=u8,id:i,strategy:s,resizeObserverConfig:l,transition:c=f8}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:m,overIndex:b,useDragOverlay:y,strategy:S}=g.useContext(wm),E=m8(r,p),x=u.indexOf(i),v=g.useMemo(()=>({sortable:{containerId:d,index:x,items:u},...o}),[d,o,x,u]),O=g.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:C,node:R,isOver:N,setNodeRef:T}=a8({id:i,data:v,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:k,activatorEvent:j,activeNodeRect:L,attributes:M,setNodeRef:P,listeners:D,isDragging:F,over:ne,setActivatorNodeRef:Z,transform:ue}=mm({id:i,data:v,attributes:{...h8,...n},disabled:E.draggable}),A=DD(T,P),I=!!k,G=I&&!h&&ka(f)&&ka(b),te=!y&&F,ie=te&&G?ue:null,we=G?ie??(s??S)({rects:m,activeNodeRect:L,activeIndex:f,overIndex:b,index:x}):null,fe=ka(f)&&ka(b)?a({id:i,items:u,activeIndex:f,overIndex:b}):x,Ee=k==null?void 0:k.id,re=g.useRef({activeId:Ee,items:u,newIndex:fe,containerId:d}),De=u!==re.current.items,z=t({active:k,containerId:d,isDragging:F,isSorting:I,id:i,index:x,items:u,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:c,wasDragging:re.current.activeId!=null}),Xe=g8({disabled:!z,index:x,node:R,rect:C});return g.useEffect(()=>{I&&re.current.newIndex!==fe&&(re.current.newIndex=fe),d!==re.current.containerId&&(re.current.containerId=d),u!==re.current.items&&(re.current.items=u)},[I,fe,d,u]),g.useEffect(()=>{if(Ee===re.current.activeId)return;if(Ee&&!re.current.activeId){re.current.activeId=Ee;return}const $e=setTimeout(()=>{re.current.activeId=Ee},50);return()=>clearTimeout($e)},[Ee]),{active:k,activeIndex:f,attributes:M,data:v,rect:C,index:x,newIndex:fe,items:u,isOver:N,isSorting:I,isDragging:F,listeners:D,node:R,overIndex:b,over:ne,setNodeRef:A,setActivatorNodeRef:Z,setDroppableNodeRef:T,setDraggableNodeRef:P,transform:Xe??we,transition:Le()};function Le(){if(Xe||De&&re.current.newIndex===x)return p8;if(!(te&&!eu(j)||!c)&&(I||z))return Vr.Transition.toString({...c,property:Sm})}}function m8(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function gi(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const y8=[ce.Down,ce.Right,ce.Up,ce.Left],b8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(y8.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=o.get(d.id);if(f)switch(e.code){case ce.Down:r.top<f.top&&l.push(d);break;case ce.Up:r.top>f.top&&l.push(d);break;case ce.Left:r.left>f.left&&l.push(d);break;case ce.Right:r.left<f.left&&l.push(d);break}});const c=t$({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=om(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const d=a.get(n.id),f=a.get(u),p=f?o.get(f.id):null,h=f==null?void 0:f.node.current;if(h&&p&&d&&f){const b=zi(h).some((O,C)=>s[C]!==O),y=xm(d,f),S=w8(d,f),E=b||!y?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},x={x:p.left,y:p.top};return E.x&&E.y?x:Ko(x,E)}}}};function xm(e,t){return!gi(e)||!gi(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function w8(e,t){return!gi(e)||!gi(t)||!xm(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const S8=e=>{let{transform:t}=e;return{...t,x:0}},x8="_dragItem_xzliq_2",C8="_sortModalBox_xzliq_13",O8="_addOneBtn_xzliq_19",iu={dragItem:x8,sortModalBox:C8,addOneBtn:O8},E8=({list:e,onValueChange:t,keyPaths:n,label:r,sortLabelKey:o,...a})=>{const[i,s]=g.useState([]);g.useEffect(()=>{const f=e.map((p,h)=>({val:p,oldIndex:h,id:be.getRandomStr()}));s(f)},[a.open]);const l=JD(Vf(ou,{activationConstraint:{distance:15}}),Vf(nu,{coordinateGetter:b8}));function c(f){const{active:p,over:h}=f;if(p.id!==(h==null?void 0:h.id)){const m=i.findIndex(E=>E.id===(p==null?void 0:p.id)),b=i.findIndex(E=>E.id===(h==null?void 0:h.id)),y=au(i,m,b),S=y.map(E=>E.val);s(y),t==null||t(S)}}const[u,d]=g.useState({x:0,y:0,scaleX:1,scaleY:1});return w(Y.Modal,{...a,title:`Sort: ${r} [${n.join(".")}]`,maskStyle:{backgroundColor:"rgba(0, 0, 0, 0.1)"},modalRender:f=>w(Jf,{sensors:l,onDragEnd:({delta:p})=>{const h={...u,...p,x:u.x+((p==null?void 0:p.x)||0),y:u.y+((p==null?void 0:p.y)||0)};d(h)},children:w(_8,{modal:f,transform:u})}),children:w("div",{className:iu.sortModalBox,children:w(Jf,{sensors:l,onDragEnd:c,modifiers:[S8],children:w(c8,{items:i,children:i.map(({id:f,val:p},h)=>w(R8,{id:f,index:h,label:p[o||""]},f))})})})})},_8=({modal:e,transform:t})=>{const n=g.useRef(be.getRandomStr()),{setNodeRef:r,attributes:o,listeners:a,transform:i}=mm({id:n.current}),s={...t,...i,x:t.x+((i==null?void 0:i.x)||0),y:t.y+((i==null?void 0:i.y)||0)};return w("div",{ref:r,style:{pointerEvents:"auto",transform:Vr.Transform.toString(s)},...o,...a,children:e})},R8=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:a}=v8({id:e.id}),i={transform:Vr.Transform.toString(o),transition:a},s=e.label||`Ele ${e.index}`;return w("div",{className:iu.dragItem,ref:r,style:i,...t,...n,children:s})};function N8(e){return Array.isArray(e)?e:[]}const Cm=({onValueChange:e,setterContext:t,item:{setters:n,initialValue:r},sortLabelKey:o,initialValue:a,...i})=>{const{keyPaths:s,label:l}=t,c=g.useMemo(()=>N8(i.value??a),[i.value]),[u,d]=g.useState(!1),f=Xc(n||[{component:"StringSetter"}]);return g.useEffect(()=>{var p;t.setCollapseHeaderExt&&((p=t.setCollapseHeaderExt)==null||p.call(t,w(Y.Button,{type:"text",size:"small",style:{color:"gray"},onClick:h=>{h.preventDefault(),h.stopPropagation(),d(!0)},children:"sort"})))},[]),ee(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[c.map((p,h)=>w(AD,{style:{paddingBottom:"10px"},index:h,keyPaths:s,value:p,onValueChange:m=>{c[h]=m[h],e==null||e([...c])},setters:f,onDelete:()=>{const m=[...c];m.splice(h),e==null||e(m)}},h)),w(Y.Button,{className:iu.addOneBtn,size:"small",onClick:()=>{const p=[...c];e==null||e([...p,r??""])},children:"Add One"}),w(E8,{label:l,sortLabelKey:o,onValueChange:p=>{e==null||e([...p])},open:u,list:c,keyPaths:s,onCancel:()=>{d(!1)},onOk:()=>{d(!1)}})]})};Cm.setterName="数组设置器";const Om=({onValueChange:e,elements:t,value:n,setterContext:r,initialValue:o})=>{const{keyPaths:a}=r,i=g.useRef(null);return g.useEffect(()=>{var s;(s=i.current)==null||s.setFields(n||{})},[n]),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Kc,{ref:i,name:a.join("."),initialValue:n||o||{},onValueChange:s=>{e==null||e(s)},customSetterMap:{},children:t.map((s,l)=>{const c=Xc(s.setters),u=be.getMTitle(s.title),d=be.getMTitleTip(s.title);return w("div",{children:w(lu,{name:s.name,label:u,tips:d,condition:s.condition,keyPaths:[...a,s.name],setters:c})},l)})})})};Om.setterName="对象设置器";const Em=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var o;return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:((o=r.value)==null?void 0:o.value)??(t||""),onChange:a=>{var i;(i=r.onChange)==null||i.call(r,a),e==null||e({type:be.CNodePropsTypeEnum.EXPRESSION,value:a.target.value})}})})};Em.setterName="表达式设置器";const _m=({onValueChange:e,initialValue:t,setterContext:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Switch,{...r,checked:r.value??t,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});_m.setterName="Bool 设置器";const Rm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Select,{showSearch:!0,style:{width:"100%"},...r,value:r.value??n,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Rm.setterName="选择设置器";function T8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ep(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zf(Object(n),!0).forEach(function(r){T8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P8(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function k8(e,t){if(e==null)return{};var n=P8(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j8(e,t){return M8(e)||A8(e,t)||D8(e,t)||$8()}function M8(e){if(Array.isArray(e))return e}function A8(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function D8(e,t){if(e){if(typeof e=="string")return tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(e,t)}}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
129
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
163
|
+
`},$B={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function TB(e){let{announcements:t=$B,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=RB}=e;const{announce:a,announcement:i}=_B(),s=Fi("DndLiveRegion"),[l,c]=b.useState(!1);if(b.useEffect(()=>{c(!0)},[]),OB(b.useMemo(()=>({onDragStart(f){let{active:d}=f;a(t.onDragStart({active:d}))},onDragMove(f){let{active:d,over:h}=f;t.onDragMove&&a(t.onDragMove({active:d,over:h}))},onDragOver(f){let{active:d,over:h}=f;a(t.onDragOver({active:d,over:h}))},onDragEnd(f){let{active:d,over:h}=f;a(t.onDragEnd({active:d,over:h}))},onDragCancel(f){let{active:d,over:h}=f;a(t.onDragCancel({active:d,over:h}))}}),[a,t])),!l)return null;const u=M(vt,{children:[p(wB,{id:r,value:o.draggable}),p(CB,{id:s,announcement:i})]});return n?gn.createPortal(u,n):u}var ht;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ht||(ht={}));function dl(){}function kv(e,t){return b.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function PB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const On=Object.freeze({x:0,y:0});function kB(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function NB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function AB(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Nv(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Lx(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}const MB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Nv(t),a=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Nv(l),u=o.reduce((d,h,v)=>d+kB(c[v],h),0),f=Number((u/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:f}})}}return a.sort(NB)};function jB(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const l=t.width*t.height,c=e.width*e.height,u=i*s,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const DB=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:i}=a,s=n.get(i);if(s){const l=jB(s,t);l>0&&o.push({id:i,data:{droppableContainer:a,value:l}})}}return o.sort(AB)};function IB(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Bx(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:On}function LB(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const BB=LB(1);function FB(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function zB(e,t,n){const r=FB(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,f=a?e.height/a:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const HB={ignoreTransform:!1};function Sa(e,t){t===void 0&&(t=HB);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=Bt(e),{transform:u,transformOrigin:f}=c(e);u&&(n=zB(n,u,f))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function Av(e){return Sa(e,{ignoreTransform:!0})}function VB(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function UB(e,t){return t===void 0&&(t=Bt(e).getComputedStyle(e)),t.position==="fixed"}function WB(e,t){t===void 0&&(t=Bt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function Gl(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Qd(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Li(o)||gB(o)||n.includes(o))return n;const{getComputedStyle:a}=Bt(o),i=a(o);return o!==e&&WB(o,i)&&n.push(o),UB(o,i)?n:r(o.parentNode)}return e?r(e):n}function Fx(e){const[t]=Gl(e,1);return t??null}function Lc(e){return!Wl||!e?null:xa(e)?e:Jd(e)?Qd(e)||e===wa(e).scrollingElement?window:Li(e)?e:null:null}function zx(e){return xa(e)?e.scrollX:e.scrollLeft}function Hx(e){return xa(e)?e.scrollY:e.scrollTop}function pf(e){return{x:zx(e),y:Hx(e)}}var yt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(yt||(yt={}));function Vx(e){return!Wl||!e?!1:e===document.scrollingElement}function Ux(e){const t={x:0,y:0},n=Vx(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const GB={x:.2,y:.2};function KB(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=GB);const{isTop:c,isBottom:u,isLeft:f,isRight:d}=Ux(e),h={x:0,y:0},v={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+g.height?(h.y=yt.Backward,v.y=r*Math.abs((t.top+g.height-a)/g.height)):!u&&l>=t.bottom-g.height&&(h.y=yt.Forward,v.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!d&&s>=t.right-g.width?(h.x=yt.Forward,v.x=r*Math.abs((t.right-g.width-s)/g.width)):!f&&i<=t.left+g.width&&(h.x=yt.Backward,v.x=r*Math.abs((t.left+g.width-i)/g.width)),{direction:h,speed:v}}function qB(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Wx(e){return e.reduce((t,n)=>Uo(t,pf(n)),On)}function XB(e){return e.reduce((t,n)=>t+zx(n),0)}function YB(e){return e.reduce((t,n)=>t+Hx(n),0)}function JB(e,t){if(t===void 0&&(t=Sa),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);Fx(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const QB=[["x",["left","right"],XB],["y",["top","bottom"],YB]];class th{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Gl(n),o=Wx(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,i,s]of QB)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=s(r),u=o[a]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class oi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ZB(e){const{EventTarget:t}=Bt(e);return e instanceof t?e:wa(e)}function Bc(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var tn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(tn||(tn={}));function Mv(e){e.preventDefault()}function e7(e){e.stopPropagation()}var Se;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(Se||(Se={}));const Gx={start:[Se.Space,Se.Enter],cancel:[Se.Esc],end:[Se.Space,Se.Enter]},t7=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Se.Right:return{...n,x:n.x+25};case Se.Left:return{...n,x:n.x-25};case Se.Down:return{...n,y:n.y+25};case Se.Up:return{...n,y:n.y-25}}};class nh{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new oi(wa(n)),this.windowListeners=new oi(Bt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(tn.Resize,this.handleCancel),this.windowListeners.add(tn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(tn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&JB(r),n(On)}handleKeyDown(t){if(eh(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=Gx,coordinateGetter:i=t7,scrollBehavior:s="smooth"}=o,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:On;this.referenceCoordinates||(this.referenceCoordinates=u);const f=i(t,{active:n,context:r.current,currentCoordinates:u});if(f){const d=_i(f,u),h={x:0,y:0},{scrollableAncestors:v}=r.current;for(const g of v){const m=t.code,{isTop:y,isRight:w,isLeft:_,isBottom:S,maxScroll:x,minScroll:C}=Ux(g),O=qB(g),$={x:Math.min(m===Se.Right?O.right-O.width/2:O.right,Math.max(m===Se.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(m===Se.Down?O.bottom-O.height/2:O.bottom,Math.max(m===Se.Down?O.top:O.top+O.height/2,f.y))},k=m===Se.Right&&!w||m===Se.Left&&!_,P=m===Se.Down&&!S||m===Se.Up&&!y;if(k&&$.x!==f.x){const j=g.scrollLeft+d.x,L=m===Se.Right&&j<=x.x||m===Se.Left&&j>=C.x;if(L&&!d.y){g.scrollTo({left:j,behavior:s});return}L?h.x=g.scrollLeft-j:h.x=m===Se.Right?g.scrollLeft-x.x:g.scrollLeft-C.x,h.x&&g.scrollBy({left:-h.x,behavior:s});break}else if(P&&$.y!==f.y){const j=g.scrollTop+d.y,L=m===Se.Down&&j<=x.y||m===Se.Up&&j>=C.y;if(L&&!d.x){g.scrollTo({top:j,behavior:s});return}L?h.y=g.scrollTop-j:h.y=m===Se.Down?g.scrollTop-x.y:g.scrollTop-C.y,h.y&&g.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,Uo(_i(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}nh.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Gx,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function jv(e){return!!(e&&"distance"in e)}function Dv(e){return!!(e&&"delay"in e)}class rh{constructor(t,n,r){var o;r===void 0&&(r=ZB(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:i}=a;this.props=t,this.events=n,this.document=wa(i),this.documentListeners=new oi(this.document),this.listeners=new oi(r),this.windowListeners=new oi(Bt(i)),this.initialCoordinates=(o=hf(a))!=null?o:On,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(tn.Resize,this.handleCancel),this.windowListeners.add(tn.DragStart,Mv),this.windowListeners.add(tn.VisibilityChange,this.handleCancel),this.windowListeners.add(tn.ContextMenu,Mv),this.documentListeners.add(tn.Keydown,this.handleKeydown),n){if(jv(n))return;if(Dv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(tn.Click,e7,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(tn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!o)return;const l=(n=hf(t))!=null?n:On,c=_i(o,l);if(!r&&s){if(Dv(s))return Bc(c,s.tolerance)?this.handleCancel():void 0;if(jv(s))return s.tolerance!=null&&Bc(c,s.tolerance)?this.handleCancel():Bc(c,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Se.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const n7={move:{name:"pointermove"},end:{name:"pointerup"}};class oh extends rh{constructor(t){const{event:n}=t,r=wa(n.target);super(t,n7,r)}}oh.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const r7={move:{name:"mousemove"},end:{name:"mouseup"}};var gf;(function(e){e[e.RightClick=2]="RightClick"})(gf||(gf={}));class o7 extends rh{constructor(t){super(t,r7,wa(t.event.target))}}o7.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===gf.RightClick?!1:(r==null||r({event:n}),!0)}}];const Fc={move:{name:"touchmove"},end:{name:"touchend"}};class a7 extends rh{constructor(t){super(t,Fc)}static setup(){return window.addEventListener(Fc.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Fc.move.name,t)};function t(){}}}a7.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ai;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ai||(ai={}));var hl;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hl||(hl={}));function i7(e){let{acceleration:t,activator:n=ai.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=hl.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:d}=e;const h=l7({delta:f,disabled:!a}),[v,g]=vB(),m=b.useRef({x:0,y:0}),y=b.useRef({x:0,y:0}),w=b.useMemo(()=>{switch(n){case ai.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ai.DraggableRect:return o}},[n,o,l]),_=b.useRef(null),S=b.useCallback(()=>{const C=_.current;if(!C)return;const O=m.current.x*y.current.x,$=m.current.y*y.current.y;C.scrollBy(O,$)},[]),x=b.useMemo(()=>s===hl.TreeOrder?[...c].reverse():c,[s,c]);b.useEffect(()=>{if(!a||!c.length||!w){g();return}for(const C of x){if((r==null?void 0:r(C))===!1)continue;const O=c.indexOf(C),$=u[O];if(!$)continue;const{direction:k,speed:P}=KB(C,$,w,t,d);for(const j of["x","y"])h[j][k[j]]||(P[j]=0,k[j]=0);if(P.x>0||P.y>0){g(),_.current=C,v(S,i),m.current=P,y.current=k;return}}m.current={x:0,y:0},y.current={x:0,y:0},g()},[t,S,r,g,a,i,JSON.stringify(w),JSON.stringify(h),v,c,x,u,JSON.stringify(d)])}const s7={x:{[yt.Backward]:!1,[yt.Forward]:!1},y:{[yt.Backward]:!1,[yt.Forward]:!1}};function l7(e){let{delta:t,disabled:n}=e;const r=df(t);return Bi(o=>{if(n||!r||!o)return s7;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[yt.Backward]:o.x[yt.Backward]||a.x===-1,[yt.Forward]:o.x[yt.Forward]||a.x===1},y:{[yt.Backward]:o.y[yt.Backward]||a.y===-1,[yt.Forward]:o.y[yt.Forward]||a.y===1}}},[n,t,r])}function c7(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Bi(o=>{var a;return t===null?null:(a=r??o)!=null?a:null},[r,t])}function u7(e,t){return b.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...a]},[]),[e,t])}var Oi;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Oi||(Oi={}));var vf;(function(e){e.Optimized="optimized"})(vf||(vf={}));const Iv=new Map;function f7(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=b.useState(null),{frequency:s,measure:l,strategy:c}=o,u=b.useRef(e),f=m(),d=Ci(f),h=b.useCallback(function(y){y===void 0&&(y=[]),!d.current&&i(w=>w===null?y:w.concat(y.filter(_=>!w.includes(_))))},[d]),v=b.useRef(null),g=Bi(y=>{if(f&&!n)return Iv;if(!y||y===Iv||u.current!==e||a!=null){const w=new Map;for(let _ of e){if(!_)continue;if(a&&a.length>0&&!a.includes(_.id)&&_.rect.current){w.set(_.id,_.rect.current);continue}const S=_.node.current,x=S?new th(l(S),S):null;_.rect.current=x,x&&w.set(_.id,x)}return w}return y},[e,a,n,f,l]);return b.useEffect(()=>{u.current=e},[e]),b.useEffect(()=>{f||h()},[n,f]),b.useEffect(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),b.useEffect(()=>{f||typeof s!="number"||v.current!==null||(v.current=setTimeout(()=>{h(),v.current=null},s))},[s,f,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:a!=null};function m(){switch(c){case Oi.Always:return!1;case Oi.BeforeDragging:return n;default:return!n}}}function Kx(e,t){return Bi(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function d7(e,t){return Kx(e,t)}function h7(e){let{callback:t,disabled:n}=e;const r=Zd(t),o=b.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return b.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Kl(e){let{callback:t,disabled:n}=e;const r=Zd(t),o=b.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return b.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function p7(e){return new th(Sa(e),e)}function Lv(e,t,n){t===void 0&&(t=p7);const[r,o]=b.useReducer(s,null),a=h7({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),i=Kl({callback:o});return _n(()=>{o(),e?(i==null||i.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),a==null||a.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function g7(e){const t=Kx(e);return Bx(e,t)}const Bv=[];function v7(e){const t=b.useRef(e),n=Bi(r=>e?r&&r!==Bv&&e&&t.current&&e.parentNode===t.current.parentNode?r:Gl(e):Bv,[e]);return b.useEffect(()=>{t.current=e},[e]),n}function m7(e){const[t,n]=b.useState(null),r=b.useRef(e),o=b.useCallback(a=>{const i=Lc(a.target);i&&n(s=>s?(s.set(i,pf(i)),new Map(s)):null)},[]);return b.useEffect(()=>{const a=r.current;if(e!==a){i(a);const s=e.map(l=>{const c=Lc(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,pf(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{const c=Lc(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),b.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>Uo(a,i),On):Wx(e):On,[e,t])}function Fv(e,t){t===void 0&&(t=[]);const n=b.useRef(null);return b.useEffect(()=>{n.current=null},t),b.useEffect(()=>{const r=e!==On;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_i(e,n.current):On}function b7(e){b.useEffect(()=>{if(!Wl)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function y7(e,t){return b.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=i=>{a(i,t)},n},{}),[e,t])}function qx(e){return b.useMemo(()=>e?VB(e):null,[e])}const zc=[];function x7(e,t){t===void 0&&(t=Sa);const[n]=e,r=qx(n?Bt(n):null),[o,a]=b.useReducer(s,zc),i=Kl({callback:a});return e.length>0&&o===zc&&a(),_n(()=>{e.length?e.forEach(l=>i==null?void 0:i.observe(l)):(i==null||i.disconnect(),a())},[e]),o;function s(){return e.length?e.map(l=>Vx(l)?r:new th(t(l),l)):zc}}function w7(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Li(t)?t:e}function S7(e){let{measure:t}=e;const[n,r]=b.useState(null),o=b.useCallback(c=>{for(const{target:u}of c)if(Li(u)){r(f=>{const d=t(u);return f?{...f,width:d.width,height:d.height}:d});break}},[t]),a=Kl({callback:o}),i=b.useCallback(c=>{const u=w7(c);a==null||a.disconnect(),u&&(a==null||a.observe(u)),r(u?t(u):null)},[t,a]),[s,l]=fl(i);return b.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const C7=[{sensor:oh,options:{}},{sensor:nh,options:{}}],_7={current:{}},Bs={draggable:{measure:Av},droppable:{measure:Av,strategy:Oi.WhileDragging,frequency:vf.Optimized},dragOverlay:{measure:Sa}};class ii extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const O7={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ii,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:dl},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Bs,measureDroppableContainers:dl,windowRect:null,measuringScheduled:!1},E7={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:dl,draggableNodes:new Map,over:null,measureDroppableContainers:dl},ql=b.createContext(E7),Xx=b.createContext(O7);function R7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ii}}}function $7(e,t){switch(t.type){case ht.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ht.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case ht.DragEnd:case ht.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ht.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ii(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ht.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new ii(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case ht.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new ii(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function T7(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=b.useContext(ql),a=df(r),i=df(n==null?void 0:n.id);return b.useEffect(()=>{if(!t&&!r&&a&&i!=null){if(!eh(a)||document.activeElement===a.target)return;const s=o.get(i);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=yB(u);if(f){f.focus();break}}})}},[r,t,o,i,a]),null}function P7(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function k7(e){return b.useMemo(()=>({draggable:{...Bs.draggable,...e==null?void 0:e.draggable},droppable:{...Bs.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Bs.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function N7(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=b.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;_n(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=Bx(u,r);if(i||(f.x=0),s||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const d=Fx(c);d&&d.scrollBy({top:f.y,left:f.x})}},[t,i,s,r,n])}const Yx=b.createContext({...On,scaleX:1,scaleY:1});var mr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(mr||(mr={}));const zv=b.memo(function(t){var n,r,o,a;let{id:i,accessibility:s,autoScroll:l=!0,children:c,sensors:u=C7,collisionDetection:f=DB,measuring:d,modifiers:h,...v}=t;const g=b.useReducer($7,void 0,R7),[m,y]=g,[w,_]=EB(),[S,x]=b.useState(mr.Uninitialized),C=S===mr.Initialized,{draggable:{active:O,nodes:$,translate:k},droppable:{containers:P}}=m,j=O?$.get(O):null,L=b.useRef({initial:null,translated:null}),F=b.useMemo(()=>{var Pe;return O!=null?{id:O,data:(Pe=j==null?void 0:j.data)!=null?Pe:_7,rect:L}:null},[O,j]),W=b.useRef(null),[B,G]=b.useState(null),[ne,fe]=b.useState(null),D=Ci(v,Object.values(v)),R=Fi("DndDescribedBy",i),T=b.useMemo(()=>P.getEnabled(),[P]),N=k7(d),{droppableRects:I,measureDroppableContainers:H,measuringScheduled:Y}=f7(T,{dragging:C,dependencies:[k.x,k.y],config:N.droppable}),J=c7($,O),re=b.useMemo(()=>ne?hf(ne):null,[ne]),oe=ut(),ue=d7(J,N.draggable.measure);N7({activeNode:O?$.get(O):null,config:oe.layoutShiftCompensation,initialRect:ue,measure:N.draggable.measure});const q=Lv(J,N.draggable.measure,ue),me=Lv(J?J.parentElement:null),U=b.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:$,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=P.getNodeFor((n=U.current.over)==null?void 0:n.id),Ze=S7({measure:N.dragOverlay.measure}),qe=(r=Ze.nodeRef.current)!=null?r:J,Tt=C?(o=Ze.rect)!=null?o:q:null,ln=!!(Ze.nodeRef.current&&Ze.rect),cn=g7(ln?null:q),Le=qx(qe?Bt(qe):null),Ee=v7(C?Te??J:null),Be=x7(Ee),nt=P7(h,{transform:{x:k.x-cn.x,y:k.y-cn.y,scaleX:1,scaleY:1},activatorEvent:ne,active:F,activeNodeRect:q,containerNodeRect:me,draggingNodeRect:Tt,over:U.current.over,overlayNodeRect:Ze.rect,scrollableAncestors:Ee,scrollableAncestorRects:Be,windowRect:Le}),Qt=re?Uo(re,k):null,so=m7(Ee),lo=Fv(so),co=Fv(so,[q]),At=Uo(nt,lo),$n=Tt?BB(Tt,nt):null,Tn=F&&$n?f({active:F,collisionRect:$n,droppableRects:I,droppableContainers:T,pointerCoordinates:Qt}):null,$r=Lx(Tn,"id"),[ct,uo]=b.useState(null),Wn=ln?nt:Uo(nt,co),Ma=IB(Wn,(a=ct==null?void 0:ct.rect)!=null?a:null,q),pr=b.useCallback((Pe,ft)=>{let{sensor:be,options:Re}=ft;if(W.current==null)return;const Fe=$.get(W.current);if(!Fe)return;const ze=Pe.nativeEvent,wt=new be({active:W.current,activeNode:Fe,event:ze,options:Re,context:U,onStart(St){const Kn=W.current;if(Kn==null)return;const qn=$.get(Kn);if(!qn)return;const{onDragStart:Xn}=D.current,Ot={active:{id:Kn,data:qn.data,rect:L}};gn.unstable_batchedUpdates(()=>{Xn==null||Xn(Ot),x(mr.Initializing),y({type:ht.DragStart,initialCoordinates:St,active:Kn}),w({type:"onDragStart",event:Ot})})},onMove(St){y({type:ht.DragMove,coordinates:St})},onEnd:Zt(ht.DragEnd),onCancel:Zt(ht.DragCancel)});gn.unstable_batchedUpdates(()=>{G(wt),fe(Pe.nativeEvent)});function Zt(St){return async function(){const{active:qn,collisions:Xn,over:Ot,scrollAdjustedTranslate:es}=U.current;let kr=null;if(qn&&es){const{cancelDrop:Nr}=D.current;kr={activatorEvent:ze,active:qn,collisions:Xn,delta:es,over:Ot},St===ht.DragEnd&&typeof Nr=="function"&&await Promise.resolve(Nr(kr))&&(St=ht.DragCancel)}W.current=null,gn.unstable_batchedUpdates(()=>{y({type:St}),x(mr.Uninitialized),uo(null),G(null),fe(null);const Nr=St===ht.DragEnd?"onDragEnd":"onDragCancel";if(kr){const E=D.current[Nr];E==null||E(kr),w({type:Nr,event:kr})}})}}},[$]),Tr=b.useCallback((Pe,ft)=>(be,Re)=>{const Fe=be.nativeEvent,ze=$.get(Re);if(W.current!==null||!ze||Fe.dndKit||Fe.defaultPrevented)return;const wt={active:ze};Pe(be,ft.options,wt)===!0&&(Fe.dndKit={capturedBy:ft.sensor},W.current=Re,pr(be,ft))},[$,pr]),Gn=u7(u,Tr);b7(u),_n(()=>{q&&S===mr.Initializing&&x(mr.Initialized)},[q,S]),b.useEffect(()=>{const{onDragMove:Pe}=D.current,{active:ft,activatorEvent:be,collisions:Re,over:Fe}=U.current;if(!ft||!be)return;const ze={active:ft,activatorEvent:be,collisions:Re,delta:{x:At.x,y:At.y},over:Fe};gn.unstable_batchedUpdates(()=>{Pe==null||Pe(ze),w({type:"onDragMove",event:ze})})},[At.x,At.y]),b.useEffect(()=>{const{active:Pe,activatorEvent:ft,collisions:be,droppableContainers:Re,scrollAdjustedTranslate:Fe}=U.current;if(!Pe||W.current==null||!ft||!Fe)return;const{onDragOver:ze}=D.current,wt=Re.get($r),Zt=wt&&wt.rect.current?{id:wt.id,rect:wt.rect.current,data:wt.data,disabled:wt.disabled}:null,St={active:Pe,activatorEvent:ft,collisions:be,delta:{x:Fe.x,y:Fe.y},over:Zt};gn.unstable_batchedUpdates(()=>{uo(Zt),ze==null||ze(St),w({type:"onDragOver",event:St})})},[$r]),_n(()=>{U.current={activatorEvent:ne,active:F,activeNode:J,collisionRect:$n,collisions:Tn,droppableRects:I,draggableNodes:$,draggingNode:qe,draggingNodeRect:Tt,droppableContainers:P,over:ct,scrollableAncestors:Ee,scrollAdjustedTranslate:At},L.current={initial:Tt,translated:$n}},[F,J,Tn,$n,$,qe,Tt,I,P,ct,Ee,At]),i7({...oe,delta:k,draggingRect:$n,pointerCoordinates:Qt,scrollableAncestors:Ee,scrollableAncestorRects:Be});const gr=b.useMemo(()=>({active:F,activeNode:J,activeNodeRect:q,activatorEvent:ne,collisions:Tn,containerNodeRect:me,dragOverlay:Ze,draggableNodes:$,droppableContainers:P,droppableRects:I,over:ct,measureDroppableContainers:H,scrollableAncestors:Ee,scrollableAncestorRects:Be,measuringConfiguration:N,measuringScheduled:Y,windowRect:Le}),[F,J,q,ne,Tn,me,Ze,$,P,I,ct,H,Ee,Be,N,Y,Le]),Pr=b.useMemo(()=>({activatorEvent:ne,activators:Gn,active:F,activeNodeRect:q,ariaDescribedById:{draggable:R},dispatch:y,draggableNodes:$,over:ct,measureDroppableContainers:H}),[ne,Gn,F,q,y,R,$,ct,H]);return M(Ix.Provider,{value:_,children:[M(ql.Provider,{value:Pr,children:[p(Xx.Provider,{value:gr,children:p(Yx.Provider,{value:Ma,children:c})}),p(T7,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),p(TB,{...s,hiddenTextDescribedById:R})]});function ut(){const Pe=(B==null?void 0:B.autoScrollEnabled)===!1,ft=typeof l=="object"?l.enabled===!1:l===!1,be=C&&!Pe&&!ft;return typeof l=="object"?{...l,enabled:be}:{enabled:be}}}),A7=b.createContext(null),Hv="button",M7="Droppable";function Jx(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=Fi(M7),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:d}=b.useContext(ql),{role:h=Hv,roleDescription:v="draggable",tabIndex:g=0}=o??{},m=(l==null?void 0:l.id)===t,y=b.useContext(m?Yx:A7),[w,_]=fl(),[S,x]=fl(),C=y7(i,t),O=Ci(n);_n(()=>(f.set(t,{id:t,key:a,node:w,activatorNode:S,data:O}),()=>{const k=f.get(t);k&&k.key===a&&f.delete(t)}),[f,t]);const $=b.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":m&&h===Hv?!0:void 0,"aria-roledescription":v,"aria-describedby":u.draggable}),[r,h,g,m,v,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:$,isDragging:m,listeners:r?void 0:C,node:w,over:d,setNodeRef:_,setActivatorNodeRef:x,transform:y}}function j7(){return b.useContext(Xx)}const D7="Droppable",I7={timeout:25};function L7(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=Fi(D7),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=b.useContext(ql),u=b.useRef({disabled:n}),f=b.useRef(!1),d=b.useRef(null),h=b.useRef(null),{disabled:v,updateMeasurementsFor:g,timeout:m}={...I7,...o},y=Ci(g??r),w=b.useCallback(()=>{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),h.current=null},m)},[m]),_=Kl({callback:w,disabled:v||!i}),S=b.useCallback(($,k)=>{_&&(k&&(_.unobserve(k),f.current=!1),$&&_.observe($))},[_]),[x,C]=fl(S),O=Ci(t);return b.useEffect(()=>{!_||!x.current||(_.disconnect(),f.current=!1,_.observe(x.current))},[x,_]),_n(()=>(s({type:ht.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:d,data:O}}),()=>s({type:ht.UnregisterDroppable,key:a,id:r})),[r]),b.useEffect(()=>{n!==u.current.disabled&&(s({type:ht.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:d,isOver:(l==null?void 0:l.id)===r,node:x,over:l,setNodeRef:C}}function ah(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function B7(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function vs(e){return e!==null&&e>=0}function F7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function z7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Qx=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=ah(t,r,n),i=t[o],s=a[o];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}},Zx="Sortable",ew=b.createContext({activeIndex:-1,containerId:Zx,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Qx,disabled:{draggable:!1,droppable:!1}});function H7(e){let{children:t,id:n,items:r,strategy:o=Qx,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=j7(),f=Fi(Zx,n),d=s.rect!==null,h=b.useMemo(()=>r.map(C=>typeof C=="object"&&"id"in C?C.id:C),[r]),v=i!=null,g=i?h.indexOf(i.id):-1,m=c?h.indexOf(c.id):-1,y=b.useRef(h),w=!F7(h,y.current),_=m!==-1&&g===-1||w,S=z7(a);_n(()=>{w&&v&&u(h)},[w,h,v,u]),b.useEffect(()=>{y.current=h},[h]);const x=b.useMemo(()=>({activeIndex:g,containerId:f,disabled:S,disableTransforms:_,items:h,overIndex:m,useDragOverlay:d,sortedRects:B7(h,l),strategy:o}),[g,f,S.draggable,S.droppable,_,h,m,l,d,o]);return p(ew.Provider,{value:x,children:t})}const V7=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return ah(n,r,o).indexOf(t)},U7=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==a&&o===i?!1:n?!0:i!==o&&t===l},W7={duration:200,easing:"ease"},tw="transform",G7=ra.Transition.toString({property:tw,duration:0,easing:"linear"}),K7={roleDescription:"sortable"};function q7(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=b.useState(null),s=b.useRef(n);return _n(()=>{if(!t&&n!==s.current&&r.current){const l=o.current;if(l){const c=Sa(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==s.current&&(s.current=n)},[t,n,r,o]),b.useEffect(()=>{a&&i(null)},[a]),a}function X7(e){let{animateLayoutChanges:t=U7,attributes:n,disabled:r,data:o,getNewIndex:a=V7,id:i,strategy:s,resizeObserverConfig:l,transition:c=W7}=e;const{items:u,containerId:f,activeIndex:d,disabled:h,disableTransforms:v,sortedRects:g,overIndex:m,useDragOverlay:y,strategy:w}=b.useContext(ew),_=Y7(r,h),S=u.indexOf(i),x=b.useMemo(()=>({sortable:{containerId:f,index:S,items:u},...o}),[f,o,S,u]),C=b.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:O,node:$,isOver:k,setNodeRef:P}=L7({id:i,data:x,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...l}}),{active:j,activatorEvent:L,activeNodeRect:F,attributes:W,setNodeRef:B,listeners:G,isDragging:ne,over:fe,setActivatorNodeRef:D,transform:R}=Jx({id:i,data:x,attributes:{...K7,...n},disabled:_.draggable}),T=pB(P,B),N=!!j,I=N&&!v&&vs(d)&&vs(m),H=!y&&ne,Y=H&&I?R:null,re=I?Y??(s??w)({rects:g,activeNodeRect:F,activeIndex:d,overIndex:m,index:S}):null,oe=vs(d)&&vs(m)?a({id:i,items:u,activeIndex:d,overIndex:m}):S,ue=j==null?void 0:j.id,q=b.useRef({activeId:ue,items:u,newIndex:oe,containerId:f}),me=u!==q.current.items,U=t({active:j,containerId:f,isDragging:ne,isSorting:N,id:i,index:S,items:u,newIndex:q.current.newIndex,previousItems:q.current.items,previousContainerId:q.current.containerId,transition:c,wasDragging:q.current.activeId!=null}),Te=q7({disabled:!U,index:S,node:$,rect:O});return b.useEffect(()=>{N&&q.current.newIndex!==oe&&(q.current.newIndex=oe),f!==q.current.containerId&&(q.current.containerId=f),u!==q.current.items&&(q.current.items=u)},[N,oe,f,u]),b.useEffect(()=>{if(ue===q.current.activeId)return;if(ue&&!q.current.activeId){q.current.activeId=ue;return}const qe=setTimeout(()=>{q.current.activeId=ue},50);return()=>clearTimeout(qe)},[ue]),{active:j,activeIndex:d,attributes:W,data:x,rect:O,index:S,newIndex:oe,items:u,isOver:k,isSorting:N,isDragging:ne,listeners:G,node:$,overIndex:m,over:fe,setNodeRef:T,setActivatorNodeRef:D,setDroppableNodeRef:P,setDraggableNodeRef:B,transform:Te??re,transition:Ze()};function Ze(){if(Te||me&&q.current.newIndex===S)return G7;if(!(H&&!eh(L)||!c)&&(N||U))return ra.Transition.toString({...c,property:tw})}}function Y7(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function pl(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const J7=[Se.Down,Se.Right,Se.Up,Se.Left],Q7=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(J7.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];a.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const d=o.get(f.id);if(d)switch(e.code){case Se.Down:r.top<d.top&&l.push(f);break;case Se.Up:r.top>d.top&&l.push(f);break;case Se.Left:r.left>d.left&&l.push(f);break;case Se.Right:r.left<d.left&&l.push(f);break}});const c=MB({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=Lx(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const f=a.get(n.id),d=a.get(u),h=d?o.get(d.id):null,v=d==null?void 0:d.node.current;if(v&&h&&f&&d){const m=Gl(v).some((C,O)=>s[O]!==C),y=nw(f,d),w=Z7(f,d),_=m||!y?{x:0,y:0}:{x:w?r.width-h.width:0,y:w?r.height-h.height:0},S={x:h.left,y:h.top};return _.x&&_.y?S:_i(S,_)}}}};function nw(e,t){return!pl(e)||!pl(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Z7(e,t){return!pl(e)||!pl(t)||!nw(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const e9=e=>{let{transform:t}=e;return{...t,x:0}},t9="_dragItem_xzliq_2",n9="_sortModalBox_xzliq_13",r9="_addOneBtn_xzliq_19",ih={dragItem:t9,sortModalBox:n9,addOneBtn:r9},o9=({list:e,onValueChange:t,keyPaths:n,label:r,sortLabelKey:o,...a})=>{const[i,s]=b.useState([]);b.useEffect(()=>{const d=e.map((h,v)=>({val:h,oldIndex:v,id:De.getRandomStr()}));s(d)},[a.open]);const l=PB(kv(oh,{activationConstraint:{distance:15}}),kv(nh,{coordinateGetter:Q7}));function c(d){const{active:h,over:v}=d;if(h.id!==(v==null?void 0:v.id)){const g=i.findIndex(_=>_.id===(h==null?void 0:h.id)),m=i.findIndex(_=>_.id===(v==null?void 0:v.id)),y=ah(i,g,m),w=y.map(_=>_.val);s(y),t==null||t(w)}}const[u,f]=b.useState({x:0,y:0,scaleX:1,scaleY:1});return p(A.Modal,{...a,title:`Sort: ${r} [${n.join(".")}]`,maskStyle:{backgroundColor:"rgba(0, 0, 0, 0.1)"},modalRender:d=>p(zv,{sensors:l,onDragEnd:({delta:h})=>{const v={...u,...h,x:u.x+((h==null?void 0:h.x)||0),y:u.y+((h==null?void 0:h.y)||0)};f(v)},children:p(a9,{modal:d,transform:u})}),children:p("div",{className:ih.sortModalBox,children:p(zv,{sensors:l,onDragEnd:c,modifiers:[e9],children:p(H7,{items:i,children:i.map(({id:d,val:h},v)=>p(i9,{id:d,index:v,label:h[o||""]},d))})})})})},a9=({modal:e,transform:t})=>{const n=b.useRef(De.getRandomStr()),{setNodeRef:r,attributes:o,listeners:a,transform:i}=Jx({id:n.current}),s={...t,...i,x:t.x+((i==null?void 0:i.x)||0),y:t.y+((i==null?void 0:i.y)||0)};return p("div",{ref:r,style:{pointerEvents:"auto",transform:ra.Transform.toString(s)},...o,...a,children:e})},i9=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:a}=X7({id:e.id}),i={transform:ra.Transform.toString(o),transition:a},s=e.label||`Ele ${e.index}`;return p("div",{className:ih.dragItem,ref:r,style:i,...t,...n,children:s})};function s9(e){return Array.isArray(e)?e:[]}const rw=({onValueChange:e,setterContext:t,item:{setters:n,initialValue:r},sortLabelKey:o,initialValue:a,...i})=>{const{keyPaths:s,label:l}=t,c=b.useMemo(()=>s9(i.value??a),[i.value]),[u,f]=b.useState(!1),d=Yd(n||[{component:"StringSetter"}]);return b.useEffect(()=>{var h;t.setCollapseHeaderExt&&((h=t.setCollapseHeaderExt)==null||h.call(t,p(A.Button,{type:"text",size:"small",style:{color:"gray"},onClick:v=>{v.preventDefault(),v.stopPropagation(),f(!0)},children:"sort"})))},[]),M(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:[c.map((h,v)=>p(hB,{style:{paddingBottom:"10px"},index:v,keyPaths:s,value:h,onValueChange:g=>{c[v]=g[v],e==null||e([...c])},setters:d,onDelete:()=>{const g=[...c];g.splice(v),e==null||e(g)}},v)),p(A.Button,{className:ih.addOneBtn,size:"small",onClick:()=>{const h=[...c];e==null||e([...h,r??""])},children:"Add One"}),p(o9,{label:l,sortLabelKey:o,onValueChange:h=>{e==null||e([...h])},open:u,list:c,keyPaths:s,onCancel:()=>{f(!1)},onOk:()=>{f(!1)}})]})};rw.setterName="数组设置器";const ow=({onValueChange:e,elements:t,value:n,setterContext:r,initialValue:o})=>{const{keyPaths:a}=r,i=b.useRef(null);return b.useEffect(()=>{var s;(s=i.current)==null||s.setFields(n||{})},[n]),p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(Kd,{ref:i,name:a.join("."),initialValue:n||o||{},onValueChange:s=>{e==null||e(s)},customSetterMap:{},children:t.map((s,l)=>{const c=Yd(s.setters),u=De.getMTitle(s.title),f=De.getMTitleTip(s.title);return p("div",{children:p(Uh,{name:s.name,label:u,tips:f,condition:s.condition,keyPaths:[...a,s.name],setters:c})},l)})})})};ow.setterName="对象设置器";const aw=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var o;return p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Input.TextArea,{...r,value:((o=r.value)==null?void 0:o.value)??(t||""),onChange:a=>{var i;(i=r.onChange)==null||i.call(r,a),e==null||e({type:De.CNodePropsTypeEnum.EXPRESSION,value:a.target.value})}})})};aw.setterName="表达式设置器";const iw=({onValueChange:e,initialValue:t,setterContext:n,...r})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Switch,{...r,checked:r.value??t,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});iw.setterName="Bool 设置器";const sw=({onValueChange:e,setterContext:t,initialValue:n,...r})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Select,{showSearch:!0,style:{width:"100%"},...r,value:r.value??n,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});sw.setterName="选择设置器";function l9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Uv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vv(Object(n),!0).forEach(function(r){l9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c9(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function u9(e,t){if(e==null)return{};var n=c9(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f9(e,t){return d9(e)||h9(e,t)||p9(e,t)||g9()}function d9(e){if(Array.isArray(e))return e}function h9(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function p9(e,t){if(e){if(typeof e=="string")return Wv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wv(e,t)}}function Wv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
164
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Kv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(n),!0).forEach(function(r){v9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,a){return a(o)},r)}}function Ga(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function gl(e){return{}.toString.call(e).includes("Object")}function b9(e){return!Object.keys(e).length}function Ei(e){return typeof e=="function"}function y9(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x9(e,t){return gl(t)||wr("changeType"),Object.keys(t).some(function(n){return!y9(e,n)})&&wr("changeField"),t}function w9(e){Ei(e)||wr("selectorType")}function S9(e){Ei(e)||gl(e)||wr("handlerType"),gl(e)&&Object.values(e).some(function(t){return!Ei(t)})&&wr("handlersType")}function C9(e){e||wr("initialIsRequired"),gl(e)||wr("initialType"),b9(e)&&wr("initialContent")}function _9(e,t){throw new Error(e[t]||e.default)}var O9={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wr=Ga(_9)(O9),ms={changes:x9,selector:w9,handler:S9,initial:C9};function E9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ms.initial(e),ms.handler(t);var n={current:e},r=Ga(T9)(n,t),o=Ga($9)(n),a=Ga(ms.changes)(e),i=Ga(R9)(n);function s(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return ms.selector(c),c(n.current)}function l(c){m9(r,o,a,i)(c)}return[s,l]}function R9(e,t){return Ei(t)?t(e.current):t}function $9(e,t){return e.current=Kv(Kv({},e.current),t),t}function T9(e,t,n){return Ei(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var P9={create:E9},k9={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function N9(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function A9(e){return{}.toString.call(e).includes("Object")}function M9(e){return e||qv("configIsRequired"),A9(e)||qv("configType"),e.urls?(j9(),{paths:{vs:e.urls.monacoBase}}):e}function j9(){console.warn(lw.deprecation)}function D9(e,t){throw new Error(e[t]||e.default)}var lw={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
130
165
|
You are using deprecated way of configuration.
|
|
131
166
|
|
|
132
167
|
Instead of using
|
|
@@ -135,7 +170,40 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
135
170
|
monaco.config({ paths: { vs: '...' } })
|
|
136
171
|
|
|
137
172
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
138
|
-
`},
|
|
173
|
+
`},qv=N9(D9)(lw),I9={config:M9},L9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(a,i){return i(a)},o)}};function cw(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],cw(e[n],t[n]))}),Uv(Uv({},e),t)}var B9={type:"cancelation",msg:"operation is manually canceled"};function Hc(e){var t=!1,n=new Promise(function(r,o){e.then(function(a){return t?o(B9):r(a)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var F9=P9.create({config:k9,isInitialized:!1,resolve:null,reject:null,monaco:null}),uw=f9(F9,2),zi=uw[0],Xl=uw[1];function z9(e){var t=I9.config(e),n=t.monaco,r=u9(t,["monaco"]);Xl(function(o){return{config:cw(o.config,r),monaco:n}})}function H9(){var e=zi(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Xl({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Hc(Vc);if(window.monaco&&window.monaco.editor)return fw(window.monaco),e.resolve(window.monaco),Hc(Vc);L9(V9,W9)(G9)}return Hc(Vc)}function V9(e){return document.body.appendChild(e)}function U9(e){var t=document.createElement("script");return e&&(t.src=e),t}function W9(e){var t=zi(function(r){var o=r.config,a=r.reject;return{config:o,reject:a}}),n=U9("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function G9(){var e=zi(function(n){var r=n.config,o=n.resolve,a=n.reject;return{config:r,resolve:o,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){fw(n),e.resolve(n)},function(n){e.reject(n)})}function fw(e){zi().monaco||Xl({monaco:e})}function K9(){return zi(function(e){var t=e.monaco;return t})}var Vc=new Promise(function(e,t){return Xl({resolve:e,reject:t})}),dw={config:z9,init:H9,__getMonacoInstance:K9},q9={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Uc=q9,X9={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Y9=X9;function J9({children:e}){return b.createElement("div",{style:Y9.container},e)}var Q9=J9,Z9=Q9;function eF({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return b.createElement("section",{style:{...Uc.wrapper,width:e,height:t},...i},!n&&b.createElement(Z9,null,r),b.createElement("div",{ref:o,style:{...Uc.fullWidth,...!n&&Uc.hide},className:a}))}var tF=eF,hw=b.memo(tF);function nF(e){b.useEffect(e,[])}var pw=nF;function rF(e,t,n=!0){let r=b.useRef(!0);b.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Ut=rF;function si(){}function Bo(e,t,n,r){return oF(e,r)||aF(e,t,n,r)}function oF(e,t){return e.editor.getModel(gw(e,t))}function aF(e,t,n,r){return e.editor.createModel(t,n,r?gw(e,r):void 0)}function gw(e,t){return e.Uri.parse(t)}function iF({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:f={},height:d="100%",width:h="100%",className:v,wrapperProps:g={},beforeMount:m=si,onMount:y=si}){let[w,_]=b.useState(!1),[S,x]=b.useState(!0),C=b.useRef(null),O=b.useRef(null),$=b.useRef(null),k=b.useRef(y),P=b.useRef(m),j=b.useRef(!1);pw(()=>{let B=dw.init();return B.then(G=>(O.current=G)&&x(!1)).catch(G=>(G==null?void 0:G.type)!=="cancelation"&&console.error("Monaco initialization: error:",G)),()=>C.current?W():B.cancel()}),Ut(()=>{let B=C.current.getModifiedEditor();B.getOption(O.current.editor.EditorOption.readOnly)?B.setValue(t||""):t!==B.getValue()&&(B.executeEdits("",[{range:B.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),B.pushUndoStop())},[t],w),Ut(()=>{var B,G;(G=(B=C.current)==null?void 0:B.getModel())==null||G.original.setValue(e||"")},[e],w),Ut(()=>{let{original:B,modified:G}=C.current.getModel();O.current.editor.setModelLanguage(B,r||n||"text"),O.current.editor.setModelLanguage(G,o||n||"text")},[n,r,o],w),Ut(()=>{var B;(B=O.current)==null||B.editor.setTheme(c)},[c],w),Ut(()=>{var B;(B=C.current)==null||B.updateOptions(f)},[f],w);let L=b.useCallback(()=>{var ne;if(!O.current)return;P.current(O.current);let B=Bo(O.current,e||"",r||n||"text",a||""),G=Bo(O.current,t||"",o||n||"text",i||"");(ne=C.current)==null||ne.setModel({original:B,modified:G})},[n,t,o,e,r,a,i]),F=b.useCallback(()=>{var B;!j.current&&$.current&&(C.current=O.current.editor.createDiffEditor($.current,{automaticLayout:!0,...f}),L(),(B=O.current)==null||B.editor.setTheme(c),_(!0),j.current=!0)},[f,c,L]);b.useEffect(()=>{w&&k.current(C.current,O.current)},[w]),b.useEffect(()=>{!S&&!w&&F()},[S,w,F]),Ut(()=>{if(C.current&&O.current){let B=C.current.getOriginalEditor(),G=Bo(O.current,e||"",r||n||"text",a||"");G!==B.getModel()&&B.setModel(G)}},[a],w),Ut(()=>{if(C.current&&O.current){let B=C.current.getModifiedEditor(),G=Bo(O.current,t||"",o||n||"text",i||"");G!==B.getModel()&&B.setModel(G)}},[i],w);function W(){var G,ne,fe,D;let B=(G=C.current)==null?void 0:G.getModel();s||((ne=B==null?void 0:B.original)==null||ne.dispose()),l||((fe=B==null?void 0:B.modified)==null||fe.dispose()),(D=C.current)==null||D.dispose()}return b.createElement(hw,{width:h,height:d,isEditorReady:w,loading:u,_ref:$,className:v,wrapperProps:g})}var sF=iF;b.memo(sF);function lF(e){let t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}var cF=lF,bs=new Map;function uF({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:f=!0,keepCurrentModel:d=!1,width:h="100%",height:v="100%",className:g,wrapperProps:m={},beforeMount:y=si,onMount:w=si,onChange:_,onValidate:S=si}){let[x,C]=b.useState(!1),[O,$]=b.useState(!0),k=b.useRef(null),P=b.useRef(null),j=b.useRef(null),L=b.useRef(w),F=b.useRef(y),W=b.useRef(),B=b.useRef(r),G=cF(a),ne=b.useRef(!1),fe=b.useRef(!1);pw(()=>{let T=dw.init();return T.then(N=>(k.current=N)&&$(!1)).catch(N=>(N==null?void 0:N.type)!=="cancelation"&&console.error("Monaco initialization: error:",N)),()=>P.current?R():T.cancel()}),Ut(()=>{var N,I,H,Y;let T=Bo(k.current,e||r||"",t||o||"",a||n||"");T!==((N=P.current)==null?void 0:N.getModel())&&(f&&bs.set(G,(I=P.current)==null?void 0:I.saveViewState()),(H=P.current)==null||H.setModel(T),f&&((Y=P.current)==null||Y.restoreViewState(bs.get(a))))},[a],x),Ut(()=>{var T;(T=P.current)==null||T.updateOptions(c)},[c],x),Ut(()=>{!P.current||r===void 0||(P.current.getOption(k.current.editor.EditorOption.readOnly)?P.current.setValue(r):r!==P.current.getValue()&&(fe.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),P.current.pushUndoStop(),fe.current=!1))},[r],x),Ut(()=>{var N,I;let T=(N=P.current)==null?void 0:N.getModel();T&&o&&((I=k.current)==null||I.editor.setModelLanguage(T,o))},[o],x),Ut(()=>{var T;s!==void 0&&((T=P.current)==null||T.revealLine(s))},[s],x),Ut(()=>{var T;(T=k.current)==null||T.editor.setTheme(i)},[i],x);let D=b.useCallback(()=>{var T;if(!(!j.current||!k.current)&&!ne.current){F.current(k.current);let N=a||n,I=Bo(k.current,r||e||"",t||o||"",N||"");P.current=(T=k.current)==null?void 0:T.editor.create(j.current,{model:I,automaticLayout:!0,...c},u),f&&P.current.restoreViewState(bs.get(N)),k.current.editor.setTheme(i),C(!0),ne.current=!0}},[e,t,n,r,o,a,c,u,f,i]);b.useEffect(()=>{x&&L.current(P.current,k.current)},[x]),b.useEffect(()=>{!O&&!x&&D()},[O,x,D]),B.current=r,b.useEffect(()=>{var T,N;x&&_&&((T=W.current)==null||T.dispose(),W.current=(N=P.current)==null?void 0:N.onDidChangeModelContent(I=>{fe.current||_(P.current.getValue(),I)}))},[x,_]),b.useEffect(()=>{if(x){let T=k.current.editor.onDidChangeMarkers(N=>{var H;let I=(H=P.current.getModel())==null?void 0:H.uri;if(I&&N.find(Y=>Y.path===I.path)){let Y=k.current.editor.getModelMarkers({resource:I});S==null||S(Y)}});return()=>{T==null||T.dispose()}}return()=>{}},[x,S]);function R(){var T,N;(T=W.current)==null||T.dispose(),d?f&&bs.set(a,P.current.saveViewState()):(N=P.current.getModel())==null||N.dispose(),P.current.dispose()}return b.createElement(hw,{width:h,height:v,isEditorReady:x,loading:l,_ref:j,className:g,wrapperProps:m})}var fF=uF,dF=b.memo(fF),hF=dF;const Hi=e=>{const t=r=>{var o;(o=e.beforeMount)==null||o.call(e,r)},n=r=>{var o;(o=e.onDidMount)==null||o.call(e,r)};return p(vt,{children:p(hF,{height:"100%",width:"100%",defaultLanguage:e.language,defaultValue:e.initialValue,beforeMount:t,onMount:n,options:e.options,onChange:e.onChange})})},vw=({onValueChange:e,setterContext:t,initialValue:n,...r})=>{const o=b.useRef(null),[a,i]=b.useState(!1),s=()=>{var c;const l=((c=o.current)==null?void 0:c.getValue())||"";try{const u=JSON.parse(l);e(u)}catch(u){console.warn(u)}};return M(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:[p(A.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),p(A.Modal,{destroyOnClose:!0,open:a,title:"JSON Editor",width:"800px",onCancel:()=>i(!1),onOk:()=>{s(),i(!1)},style:{},children:p("div",{style:{height:"500px"},children:a&&p(Hi,{onDidMount:l=>{o.current=l},initialValue:JSON.stringify(r.value??(n||{}),null,2),language:"json",options:{automaticLayout:!0,tabSize:2,suggestOnTriggerCharacters:!1}})})})]})};vw.setterName="JSON 设置器";const Xv=`type SetStateInternal<T> = {
|
|
174
|
+
_(
|
|
175
|
+
partial:
|
|
176
|
+
| T
|
|
177
|
+
| Partial<T>
|
|
178
|
+
| {
|
|
179
|
+
_(state: T): T | Partial<T>;
|
|
180
|
+
}['_'],
|
|
181
|
+
replace?: boolean | undefined
|
|
182
|
+
): void;
|
|
183
|
+
}['_'];
|
|
184
|
+
export interface StoreApi<T> {
|
|
185
|
+
setState: SetStateInternal<T>;
|
|
186
|
+
getState: () => T;
|
|
187
|
+
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
|
|
188
|
+
/**
|
|
189
|
+
* @deprecated Use \`unsubscribe\` returned by \`subscribe\`
|
|
190
|
+
*/
|
|
191
|
+
destroy: () => void;
|
|
192
|
+
}
|
|
193
|
+
export declare class StoreManager {
|
|
194
|
+
storeMap: Map<string, StoreApi<any>>;
|
|
195
|
+
getStore(storeName: string): StoreApi<any> | undefined;
|
|
196
|
+
getState(nodeId: string): any;
|
|
197
|
+
getStateObj(nodeId: string): {
|
|
198
|
+
state: any;
|
|
199
|
+
updateState: (newState: Record<any, any>) => void;
|
|
200
|
+
};
|
|
201
|
+
setState(nodeId: string, newState: Record<any, any>): void | undefined;
|
|
202
|
+
connect<T extends Record<any, any> = any>(name: string, cb: (newState: T) => void): () => void;
|
|
203
|
+
getStateSnapshot(): Record<string, any>;
|
|
204
|
+
destroy(): void;
|
|
205
|
+
}
|
|
206
|
+
|
|
139
207
|
type ContextType = {
|
|
140
208
|
/** 渲染函数的入口参数 */
|
|
141
209
|
params?: Record<any, any>;
|
|
@@ -166,27 +234,54 @@ type ContextType = {
|
|
|
166
234
|
updateState?: (newState: any) => void;
|
|
167
235
|
};
|
|
168
236
|
/** 用于访访问和管理页面被注册为全局的局部 state 快照,在闭包中使用会存在值不是最新的情况 */
|
|
169
|
-
stateManager
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
237
|
+
stateManager: Record<
|
|
238
|
+
string,
|
|
239
|
+
{
|
|
240
|
+
state: any;
|
|
241
|
+
updateState: (newState: Record<string, any>) => void;
|
|
242
|
+
}
|
|
243
|
+
>;
|
|
173
244
|
/** 循环数据 */
|
|
174
245
|
loopData?: Record<any, any>;
|
|
175
246
|
/** 组件节点的 Ref */
|
|
176
|
-
refs?: {get: (nodeId: string) => any};
|
|
247
|
+
refs?: { get: (nodeId: string) => any };
|
|
177
248
|
storeManager?: StoreManager;
|
|
178
249
|
/** 第三方辅助库 */
|
|
179
250
|
thirdLibs?: Record<string, any>;
|
|
180
251
|
};
|
|
181
252
|
|
|
182
253
|
/** 渲染上下文 */
|
|
183
|
-
declare
|
|
184
|
-
`,Im=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var l;const o=g.useRef(null),[a,i]=g.useState(!1),s=()=>{var u;const c=((u=o.current)==null?void 0:u.getValue())||"";e({type:be.CNodePropsTypeEnum.FUNCTION,value:c})};return ee(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{centered:!0,destroyOnClose:!0,open:a,title:"Function Editor",onCancel:()=>i(!1),width:"calc(100vw - 100px)",onOk:()=>{s(),i(!1)},style:{maxWidth:"1300px"},bodyStyle:{minHeight:"500px",height:"calc(100vh - 280px)"},children:w("div",{style:{height:"100%"},children:a&&w(sa,{beforeMount:c=>{c.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),c.languages.typescript.javascriptDefaults.setCompilerOptions({target:c.languages.typescript.ScriptTarget.ES5,allowNonTsExtensions:!0});const u="ts:filename/chameleon.default.variable.d.ts";c.languages.typescript.javascriptDefaults.addExtraLib(ap,u),c.editor.getModel(c.Uri.parse(u))||c.editor.createModel(ap,"typescript",c.Uri.parse(u))},onDidMount:c=>{o.current=c},initialValue:((l=r.value)==null?void 0:l.value)??(t||""),language:"javascript",options:{automaticLayout:!0,tabSize:2}})})})]})};Im.setterName="函数 设置器";const Lm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});Lm.setterName="长文本设置器";const Bm=e=>typeof e=="function",DI="{}".NODE_ENV==="development"||"{}".NODE_ENV==="test",zm=DI;function Vm(e){const t=g.useRef(e);return t.current=e,t}const $I=e=>{zm&&(Bm(e)||console.error(`useUnmount expected parameter is a function, got ${typeof e}`));const t=Vm(e);g.useEffect(()=>()=>{t.current()},[])},II=$I;function LI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fm=LI,BI=typeof So=="object"&&So&&So.Object===Object&&So,zI=BI,VI=zI,FI=typeof self=="object"&&self&&self.Object===Object&&self,HI=VI||FI||Function("return this")(),Hm=HI,UI=Hm,WI=function(){return UI.Date.now()},GI=WI,KI=/\s/;function qI(e){for(var t=e.length;t--&&KI.test(e.charAt(t)););return t}var YI=qI,XI=YI,JI=/^\s+/;function QI(e){return e&&e.slice(0,XI(e)+1).replace(JI,"")}var ZI=QI,e6=Hm,t6=e6.Symbol,Um=t6,ip=Um,Wm=Object.prototype,n6=Wm.hasOwnProperty,r6=Wm.toString,bo=ip?ip.toStringTag:void 0;function o6(e){var t=n6.call(e,bo),n=e[bo];try{e[bo]=void 0;var r=!0}catch{}var o=r6.call(e);return r&&(t?e[bo]=n:delete e[bo]),o}var a6=o6,i6=Object.prototype,s6=i6.toString;function l6(e){return s6.call(e)}var c6=l6,sp=Um,u6=a6,d6=c6,f6="[object Null]",p6="[object Undefined]",lp=sp?sp.toStringTag:void 0;function h6(e){return e==null?e===void 0?p6:f6:lp&&lp in Object(e)?u6(e):d6(e)}var g6=h6;function v6(e){return e!=null&&typeof e=="object"}var m6=v6,y6=g6,b6=m6,w6="[object Symbol]";function S6(e){return typeof e=="symbol"||b6(e)&&y6(e)==w6}var x6=S6,C6=ZI,cp=Fm,O6=x6,up=0/0,E6=/^[-+]0x[0-9a-f]+$/i,_6=/^0b[01]+$/i,R6=/^0o[0-7]+$/i,N6=parseInt;function T6(e){if(typeof e=="number")return e;if(O6(e))return up;if(cp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=C6(e);var n=_6.test(e);return n||R6.test(e)?N6(e.slice(2),n?2:8):E6.test(e)?up:+e}var P6=T6,k6=Fm,Ns=GI,dp=P6,j6="Expected a function",M6=Math.max,A6=Math.min;function D6(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(j6);t=dp(t)||0,k6(n)&&(u=!!n.leading,d="maxWait"in n,a=d?M6(dp(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function p(O){var C=r,R=o;return r=o=void 0,c=O,i=e.apply(R,C),i}function h(O){return c=O,s=setTimeout(y,t),u?p(O):i}function m(O){var C=O-l,R=O-c,N=t-C;return d?A6(N,a-R):N}function b(O){var C=O-l,R=O-c;return l===void 0||C>=t||C<0||d&&R>=a}function y(){var O=Ns();if(b(O))return S(O);s=setTimeout(y,m(O))}function S(O){return s=void 0,f&&r?p(O):(r=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function x(){return s===void 0?i:S(Ns())}function v(){var O=Ns(),C=b(O);if(r=arguments,o=this,l=O,C){if(s===void 0)return h(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),i}return v.cancel=E,v.flush=x,v}var $6=D6;const I6=Yl($6);function su(e,t){var n;zm&&(Bm(e)||console.error(`useDebounceFn expected parameter is a function, got ${typeof e}`));const r=Vm(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,a=g.useMemo(()=>I6((...i)=>r.current(...i),o,t),[]);return II(()=>{a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}const L6="_inputAuto_gk0d2_2",B6="_active_gk0d2_6",fp={inputAuto:L6,active:B6},Gm={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},Km=Gm.cssKeyValue,z6=Object.keys(Gm.cssKeyValue),qm=({onValueChange:e,setterContext:t,propertyKey:n="",value:r,initialValue:o,...a})=>{const i=g.useRef(null),[s,l]=g.useState(r??(o||"")),[c,u]=g.useState(!1),d=()=>{e==null||e(s)};g.useLayoutEffect(()=>{l(r)},[r]);const{run:f}=su(d,{wait:10}),p=g.useMemo(()=>{var m;return(((m=Km[n])==null?void 0:m.values)||[]).map(b=>({value:b}))},[n]);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.AutoComplete,{ref:i,popupMatchSelectWidth:200,bordered:!1,value:s,onChange:h=>{l(h),f()},style:{flex:1},onFocus:()=>{u(!0)},onBlur:()=>{u(!1)},className:dt([fp.inputAuto,c&&fp.active]),placeholder:"value",options:p})})};qm.setterName="CSS值设置器";const V6={StringSetter:em,ArraySetter:Cm,ShapeSetter:Om,NumberSetter:tm,ExpressionSetter:Em,BooleanSetter:_m,SelectSetter:Rm,JSONSetter:$m,FunctionSetter:Im,TextAreaSetter:Lm,CSSValueSetter:qm},F6="_fieldBox_nltxm_3",H6="_label_nltxm_11",U6="_tipsLabel_nltxm_25",W6="_content_nltxm_32",Aa={fieldBox:F6,label:H6,tipsLabel:U6,content:W6},Da=e=>{const{children:t,label:n,tips:r,name:o}=e;let a=n;const{formState:i,updateContext:s,updateConditionConfig:l}=g.useContext(Gc);if(g.useEffect(()=>{e.condition&&l(o,e.condition)},[]),g.useEffect(()=>{var h;const p=(e.condition??(()=>!0))(i);(h=e.onConditionValueChange)==null||h.call(e,p)},[i,e]),r){let f=r;typeof r=="function"&&(f=r()),a=w(Y.Tooltip,{title:w("span",{style:{color:"rgba(255,255,255,0.9",fontSize:"12px"},children:f}),color:"rgba(50,50,50,0.8)",children:w("span",{className:Aa.tipsLabel,children:n})})}let c=t;if(g.isValidElement(t)){const f={onValueChange:p=>{s({...i,[o]:p})}};i[o]!==void 0&&(f.value=i[o]),c=g.cloneElement(t,f)}return(e.condition??(()=>!0))(i)?e.noStyle?w(Ye,{children:c}):ee("div",{className:Aa.fieldBox,children:[w("div",{className:Aa.label,children:a}),w("div",{className:Aa.content,children:c})]}):null},G6="_switchBtn_k17cr_2",K6="_shapeFieldBox_k17cr_8",q6="_collapseHeader_k17cr_9",$a={switchBtn:G6,shapeFieldBox:K6,collapseHeader:q6},Ym=g.createContext({defaultSetterConfig:{},onSetterChange:()=>{}}),lu=({setters:e,keyPaths:t,condition:n,useField:r=!0,...o})=>{var T,k;const[a,i]=g.useState(!0),{customSetterMap:s}=g.useContext(Gc),{onSetterChange:l,defaultSetterConfig:c,formRef:u,pluginCtx:d}=g.useContext(Ym),f={...V6,...s},[p,h]=g.useState(()=>{var L;const j=((L=c[t.join(".")])==null?void 0:L.setter)||"";return[...e].find(M=>M.componentName===j)||e[0]});let m=null;p!=null&&p.componentName&&(m=f[p==null?void 0:p.componentName]||p.component),m||(m=function(){return w("div",{style:{backgroundColor:"whitesmoke",margin:"5px 0",padding:"5px",borderRadius:"2px",color:"gray"},children:`${p==null?void 0:p.componentName} is not found.`})});const b=e.map(j=>{const L=(j==null?void 0:j.componentName)||"",M=f[L];return{key:j.componentName,label:(M==null?void 0:M.setterName)||j.componentName}}),y=({key:j})=>{const L=e.find(M=>M.componentName===j);L&&(h(L),l==null||l(t,L.componentName))};let S=w("div",{className:$a.switchBtn,onClick:j=>{j.preventDefault(),j.stopPropagation()},children:w(Y.Dropdown,{trigger:["click"],menu:{selectable:!0,items:b,onClick:y,defaultSelectedKeys:[(p==null?void 0:p.componentName)||""]},children:w(W0,{})})});b.length===1&&(S=null);const E=g.useMemo(()=>{let j={...(p==null?void 0:p.props)||{},initialValue:p==null?void 0:p.initialValue};const L=e.find(M=>M.componentName===(p==null?void 0:p.componentName));return L&&(j={...j,...L.props}),j},[e]),x={formRef:u,pluginCtx:d},[v,O]=g.useState([]),C={condition:n,onConditionValueChange:j=>{i(j)}};let R=null;const N=r===!1||(p==null?void 0:p.hiddenLabel)===!0;return["ArraySetter"].includes((p==null?void 0:p.componentName)||"")?R=w(Y.Collapse,{bordered:!1,style:{marginBottom:"10px"},defaultActiveKey:[o.name],items:[{label:ee("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),v,S]}),children:N?w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:O}}):w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:O}})})}]}):["ShapeSetter"].includes((p==null?void 0:p.componentName)||"")?R=ee("div",{className:$a.shapeFieldBox,children:[o.prefix??null,((T=p==null?void 0:p.props)==null?void 0:T.collapse)===!1&&ee("div",{style:{width:"100%"},children:[!N&&w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}})]}),((k=p==null?void 0:p.props)==null?void 0:k.collapse)!==!1&&w(Y.Collapse,{bordered:!1,style:{flex:1},items:[{key:o.name,label:ee("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),S]}),children:w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})})}]}),o.suffix??null]}):R=ee("div",{style:{display:"flex",alignItems:"center",paddingBottom:"8px"},children:[o.prefix??null,!N&&w(Da,{...o,condition:n,onConditionValueChange:j=>{i(j)},children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}}),S,o.suffix??null]}),w("div",{style:{display:a?"block":"none",overflow:"auto"},children:R})},Y6="_CFromRenderBox_13lda_2",X6={CFromRenderBox:Y6},J6=(e,t)=>{const{properties:n,initialValue:r,onValueChange:o,onSetterChange:a,defaultSetterConfig:i,pluginCtx:s,customSetterMap:l}=e,c=n;return w(Ym.Provider,{value:{defaultSetterConfig:i,onSetterChange:a,formRef:t,pluginCtx:s},children:w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{className:X6.CFromRenderBox,style:{overflow:"auto",height:"100%"},children:w(Kc,{ref:t,name:"root-form",initialValue:r,customSetterMap:l,onValueChange:u=>{o==null||o(u)},children:c.map(u=>{if(be.isSpecialMaterialPropType(u))console.log("Current not Support type config for props, wait future....");else{const d=ND(u.title),f=be.getMTitleTip(u.title),p=Xc(u.setters),h=[u.name];return w(lu,{condition:u.condition,keyPaths:h,setters:p,label:d,name:u.name||"",tips:f},u.name)}})})})})})},cu=g.forwardRef(J6),Q6=e=>{var l,c,u;const{node:t}=e,n=((l=t==null?void 0:t.material)==null?void 0:l.value.props)||[],r=g.useRef(null);g.useEffect(()=>{const d=()=>{var p,h;const f=((p=t==null?void 0:t.getPlainProps)==null?void 0:p.call(t))||{};(h=r.current)==null||h.setFields(f)};d(),t==null||t.emitter.on("onNodeChange",d)},[t]);const o=((c=t==null?void 0:t.getPlainProps)==null?void 0:c.call(t))||{},a=d=>{t==null||t.updateValue({props:d})},i=(d,f)=>{t&&(t.value.configure=t.value.configure||{},t.value.configure.propsSetter=t.value.configure.propsSetter||{},t.value.configure.propsSetter[d.join(".")]={name:d.join("."),setter:f})},s=(u=e.pluginCtx.config)==null?void 0:u.customPropertySetterMap;return w("div",{className:pD.CFromRenderBox,children:w(cu,{pluginCtx:e.pluginCtx,defaultSetterConfig:(t==null?void 0:t.value.configure.propsSetter)||{},onSetterChange:i,properties:n,initialValue:o,ref:r,customSetterMap:s,onValueChange:a},t==null?void 0:t.id)})},Z6={key:"Property",name:"Property",view:({node:e,pluginCtx:t})=>w(Q6,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.property)!==!1}},eL=e=>{const{node:t}=e;if(!t)return w(Ye,{});const n=t.value.state||{},r=g.useRef(null);g.useEffect(()=>{var i;const a=t.value.state||{};(i=r==null?void 0:r.current)==null||i.setValue(JSON.stringify(a,null,2))},[t]);const o=a=>{try{const i=JSON.parse(a||"{}");t.value.state=i,t.updateValue()}catch(i){console.warn(i)}};return w(Ye,{children:w(sa,{initialValue:JSON.stringify(n,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:a=>{r.current=a},onChange:o})})},tL={key:"State",name:"State",view:({node:e,pluginCtx:t})=>w(eL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.state)!==!1}},nL="_advanceBox_9o3af_2",rL={advanceBox:nL},oL=[{name:"id",title:{label:"id",tip:"node unique id"},valueType:"string",setters:[{componentName:"StringSetter",props:{disabled:!0,bordered:!1}}]},{name:"condition",title:{label:"Render",tip:"controller component render"},valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"loop",title:"loop render",valueType:"object",setters:[{componentName:"ShapeSetter",props:{elements:[{name:"open",title:"open",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"data",title:"data",valueType:"array",setters:[{componentName:"ArraySetter",initialValue:[],props:{item:{setters:["JSONSetter","ExpressionSetter"],initialValue:{}}}},"JSONSetter","ExpressionSetter"]},{name:"forName",title:{label:"name",tip:"loop element name"},valueType:"string",setters:["StringSetter"]},{name:"forIndex",title:{label:"index",tip:"loop element index"},valueType:"string",setters:["StringSetter"]},{name:"key",title:{label:"key",tip:"loop element key"},valueType:"expression",setters:["ExpressionSetter"]},{name:"name",title:{label:`variable
|
|
185
|
-
name`,tip:"loop variable name"},valueType:"string",setters:[{componentName:"StringSetter",props:{prefix:"loopData"}}]}]},initialValue:{open:!1,data:[]}}]},{name:"refId",title:{label:"refId",tip:"unique node flag"},valueType:"string",setters:["StringSetter"]},{name:"nodeName",title:{label:ee(Ye,{children:["node ",w("br",{})," name"]}),tip:"alias for node"},valueType:"string",setters:["StringSetter"]}],aL=e=>{var i;const{node:t}=e;if(!t)return w(Ye,{});const n=(s,l)=>{t.value.configure=t.value.configure||{},t.value.configure.advanceSetter=t.value.configure.advanceSetter||{},t.value.configure.advanceSetter[s.join(".")]={name:s.join("."),setter:l}},r=t.value.loop,o=g.useRef(null);g.useEffect(()=>{var l;const s={id:t.id,condition:t.value.condition||!0,loop:{open:(r==null?void 0:r.open)||!1,data:(r==null?void 0:r.data)||[],forName:(r==null?void 0:r.forName)||"item",forIndex:(r==null?void 0:r.forIndex)||"index",key:(r==null?void 0:r.key)||"",name:(r==null?void 0:r.name)||""},refId:t.value.refId,nodeName:t.value.nodeName};(l=o.current)==null||l.setFields(s)},[t]);const a=s=>{t.value.loop=s.loop,t.value.condition=s.condition,t.value.refId=s.refId,t.value.nodeName=s.nodeName,t.updateValue()};return w("div",{className:rL.advanceBox,children:w(cu,{defaultSetterConfig:((i=t.value.configure)==null?void 0:i.advanceSetter)||{},onSetterChange:n,properties:oL,initialValue:{},ref:o,onValueChange:a},t.id)})},iL={key:"Advance",name:"Advance",view:({node:e,pluginCtx:t})=>w(aL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.advance)!==!1}},sL="_rightPanelContainer_1p332_2",lL={rightPanelContainer:sL},cL="_visualPanelBox_6q12v_2",uL="_header_6q12v_5",pp={visualPanelBox:cL,header:uL},dL={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},fL=Object.keys(dL.cssKeyValue),pL="_cssFieldBox_15f2h_2",hL="_row_15f2h_9",gL="_fieldLabel_15f2h_14",vL="_leftBox_15f2h_20",mL="_rightBox_15f2h_23",yL="_inputBox_15f2h_26",bL="_cssBox_15f2h_30",fn={cssFieldBox:pL,row:hL,fieldLabel:gL,leftBox:vL,rightBox:mL,inputBox:yL,cssBox:bL},wL=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Ts=fL.map(e=>({value:e})),hp=g.forwardRef(function(t,n){var v,O;const[r,o]=g.useState(""),[a,i]=g.useState(""),{mod:s="create"}=t,[l,c]=g.useState({key:((v=t.value)==null?void 0:v.key)||"",value:((O=t.value)==null?void 0:O.value)||{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}});g.useEffect(()=>{t.value&&c(t.value)},[t.value]);const[u,d]=g.useState(Ts),f=C=>{const R=Ts.filter(N=>N.value.includes(C));d(C?R:Ts)},p=()=>{t.onValueChange({...l})},{run:h}=su(p,{wait:20}),[m,b]=g.useState(0);g.useEffect(()=>{wL(l.key,13.33).then(C=>{let R=parseFloat(C);l.key===""&&(R=200),b(R+6)})},[l.key]);const y=g.useRef(null),[S,E]=g.useState({key:!1,value:!1});g.useImperativeHandle(n,()=>({reset:()=>{var C;c({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}}),(C=y.current)==null||C.focus()}}),[]);const x=()=>{var R,N,T;if(l.key===""){o("error");return}if(l.value.value===""){i("error");return}o(""),i("");const C=(R=t.onCreate)==null?void 0:R.call(t,l);(N=C==null?void 0:C.errorKey)!=null&&N.includes("key")&&o("error"),(T=C==null?void 0:C.errorKey)!=null&&T.includes("value")&&i("error")};return w(Ye,{children:ee("div",{className:fn.cssFieldBox,children:[ee("div",{className:fn.leftBox,children:[ee("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Name"}),w(Y.AutoComplete,{status:r,disabled:s==="edit",ref:y,onSearch:f,popupMatchSelectWidth:200,value:l.key,onChange:C=>{o(""),c({...l,key:C})},style:{width:`${m}px`},className:dt([fn.inputBox]),onFocus:()=>{E({key:!0,value:!1})},onBlur:()=>{E({key:!1,value:!1}),h()},placeholder:"property",options:u})]}),ee("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Value"}),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{status:a,value:l.value.value,onChange:C=>{i("");const R={type:be.CNodePropsTypeEnum.EXPRESSION,value:C.target.value};c({...l,value:R})},onPressEnter:()=>{h()},onKeyDown:C=>{var R;C.code==="Enter"&&s==="create"&&(x(),(R=y.current)==null||R.focus())}})})]})]}),w("div",{className:fn.rightBox,children:t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var C;(C=t.onDelete)==null||C.call(t)},children:w(Oh,{style:{display:"inline-flex",fontSize:"12px"}})})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(nc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:x})})]})})}),SL=g.forwardRef(function(t,n){const[r,o]=g.useState([]);g.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),g.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=g.useState({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=g.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:ee("div",{className:fn.cssBox,children:[r.map((c,u)=>w("div",{children:w(hp,{value:c,mod:"edit",onValueChange:d=>{if(d.key===""){r.splice(u,1),o([...r]);return}r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(hp,{value:a,ref:l,mod:"create",onValueChange:c=>{i(c)},onCreate:c=>{if(r.find(d=>d.key===c.key))return Y.message.error("The attribute name already exists, please replace"),{errorKey:["key"]};r.push(c),o([...r]),s(r),i({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}})}})]})})}),xL=[{title:"Class Names",name:"className",valueType:"array",setters:[{componentName:"ArraySetter",props:{sortLabelKey:"name",item:{setters:[{componentName:"ShapeSetter",props:{collapse:!1,elements:[{name:"name",title:"类名",valueType:"string",setters:["StringSetter"]},{name:"status",title:"启用",valueType:"boolean",setters:["ExpressionSetter"]}]},initialValue:{}}],initialValue:{name:"",status:{type:be.CNodePropsTypeEnum.EXPRESSION,value:!0}}}},initialValue:[]}]}],CL=g.forwardRef(function(t,n){return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{children:w(cu,{initialValue:[],properties:xL,onSetterChange:function(){},onValueChange:r=>{var o;(o=t.onValueChange)==null||o.call(t,r.className||[])},defaultSetterConfig:{}})})})});function OL(e){if(Array.isArray(e))return Us(e)}function EL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
186
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(e){return OL(e)||Zg(e)||Jl(e)||EL()}function uu(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Xm(e,t,n){var r=W.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function _L(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(a,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(a);if(Mn(!l,"Warning: There may be circular references"),l)return!1;if(a===i)return!0;if(n&&s>1)return!1;r.add(a);var c=s+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var u=0;u<a.length;u++)if(!o(a[u],i[u],c))return!1;return!0}if(a&&i&&Oe(a)==="object"&&Oe(i)==="object"){var d=Object.keys(a);return d.length!==Object.keys(i).length?!1:d.every(function(f){return o(a[f],i[f],c)})}return!1}return o(e,t)}var gp="%",RL=function(){function e(t){nt(this,e),ae(this,"instanceId",void 0),ae(this,"cache",new Map),this.instanceId=t}return rt(e,[{key:"get",value:function(n){return this.cache.get(n.join(gp))||null}},{key:"update",value:function(n,r){var o=n.join(gp),a=this.cache.get(o),i=r(a);i===null?this.cache.delete(o):this.cache.set(o,i)}}]),e}(),jl="data-token-hash",Kn="data-css-hash",NL="data-cache-path",xr="__cssinjs_instance__";function TL(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Kn,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[xr]=o[xr]||e,o[xr]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Kn,"]"))).forEach(function(o){var a=o.getAttribute(Kn);if(r[a]){if(o[xr]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else r[a]=!0})}return new RL(e)}var PL=W.createContext({hashPriority:"low",cache:TL(),defaultCache:!0});const du=PL;function mi(e){var t="";return Object.keys(e).forEach(function(n){var r=e[n];t+=n,r&&Oe(r)==="object"?t+=mi(r):t+=r}),t}function kL(e,t){return uu("".concat(t,"_").concat(mi(e)))}var Ao="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),Jm="_bAmBoO_";function jL(e,t,n){if(en()){var r,o;Do(e,Ao);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),"{}".NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");var i=n?n(a):(r=getComputedStyle(a).content)===null||r===void 0?void 0:r.includes(Jm);return(o=a.parentNode)===null||o===void 0||o.removeChild(a),sh(Ao),i}return!1}var Ps=void 0;function ML(){return Ps===void 0&&(Ps=jL("@layer ".concat(Ao," { .").concat(Ao,' { content: "').concat(Jm,'"!important; } }'),function(e){e.className=Ao})),Ps}var vp="{}".NODE_ENV!=="test"&&en()?W.useLayoutEffect:W.useEffect,AL=function(t,n){var r=W.useRef(!0);vp(function(){return t(r.current)},n),vp(function(){return r.current=!1,function(){r.current=!0}},[])},DL=H({},W),mp=DL.useInsertionEffect,$L=function(t,n,r){W.useMemo(t,r),AL(function(){return n(!0)},r)},IL=mp?function(e,t,n){return mp(function(){return e(),t()},n)}:$L;const LL=IL;function BL(){return!1}var Ml=!1;function zL(){return Ml}const VL="{}".NODE_ENV==="production"?BL:zL;if("{}".NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot){var ks=window;if(typeof ks.webpackHotUpdate=="function"){var FL=ks.webpackHotUpdate;ks.webpackHotUpdate=function(){return Ml=!0,setTimeout(function(){Ml=!1},0),FL.apply(void 0,arguments)}}}function Qm(e,t,n,r,o){var a=W.useContext(du),i=a.cache,s=[e].concat(jn(t)),l=s.join("_"),c=VL(),u=function(p){i.update(s,function(h){var m=h||[],b=Ce(m,2),y=b[0],S=y===void 0?0:y,E=b[1],x=E;"{}".NODE_ENV!=="production"&&E&&c&&(r==null||r(x,c),x=null);var v=x||n(),O=[S,v];return p?p(O):O})};W.useMemo(function(){return u()},[l]);var d=i.get(s)[1];return LL(function(){o==null||o(d)},function(f){return u(function(p){var h=Ce(p,2),m=h[0],b=h[1];return f&&m===0&&(o==null||o(d)),[m+1,b]}),function(){i.update(s,function(p){var h=p||[],m=Ce(h,2),b=m[0],y=b===void 0?0:b,S=m[1],E=y-1;return E===0?(r==null||r(S,!1),null):[y-1,S]})}},[l]),d}var HL={},UL="{}".NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Wn=new Map;function WL(e){Wn.set(e,(Wn.get(e)||0)+1)}function GL(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(jl,'="').concat(e,'"]'));n.forEach(function(r){if(r[xr]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var KL=0;function qL(e,t){Wn.set(e,(Wn.get(e)||0)-1);var n=Array.from(Wn.keys()),r=n.filter(function(o){var a=Wn.get(o)||0;return a<=0});n.length-r.length>KL&&r.forEach(function(o){GL(o,t),Wn.delete(o)})}var YL=function(t,n,r,o){var a=r.getDerivativeToken(t),i=H(H({},a),n);return o&&(i=o(i)),i};function XL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=g.useContext(du),o=r.cache.instanceId,a=n.salt,i=a===void 0?"":a,s=n.override,l=s===void 0?HL:s,c=n.formatToken,u=W.useMemo(function(){return Object.assign.apply(Object,[{}].concat(jn(t)))},[t]),d=W.useMemo(function(){return mi(u)},[u]),f=W.useMemo(function(){return mi(l)},[l]),p=Qm("token",[i,e.id,d,f],function(){var h=YL(u,l,e,c),m=kL(h,i);h._tokenKey=m,WL(m);var b="".concat(UL,"-").concat(uu(m));return h._hashId=b,[h,b]},function(h){qL(h[0]._tokenKey,o)});return p}var JL={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Zm="comm",ey="rule",ty="decl",QL="@import",ZL="@keyframes",e3="@layer",t3=Math.abs,fu=String.fromCharCode;function ny(e){return e.trim()}function qa(e,t,n){return e.replace(t,n)}function n3(e,t){return e.indexOf(t)}function Xo(e,t){return e.charCodeAt(t)|0}function Jo(e,t,n){return e.slice(t,n)}function hn(e){return e.length}function r3(e){return e.length}function Ia(e,t){return t.push(e),e}var Ui=1,Fr=1,ry=0,jt=0,We=0,so="";function pu(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Ui,column:Fr,length:i,return:"",siblings:s}}function o3(){return We}function a3(){return We=jt>0?Xo(so,--jt):0,Fr--,We===10&&(Fr=1,Ui--),We}function Ht(){return We=jt<ry?Xo(so,jt++):0,Fr++,We===10&&(Fr=1,Ui++),We}function qn(){return Xo(so,jt)}function Ya(){return jt}function Wi(e,t){return Jo(so,e,t)}function Al(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function i3(e){return Ui=Fr=1,ry=hn(so=e),jt=0,[]}function s3(e){return so="",e}function js(e){return ny(Wi(jt-1,Dl(e===91?e+2:e===40?e+1:e)))}function l3(e){for(;(We=qn())&&We<33;)Ht();return Al(e)>2||Al(We)>3?"":" "}function c3(e,t){for(;--t&&Ht()&&!(We<48||We>102||We>57&&We<65||We>70&&We<97););return Wi(e,Ya()+(t<6&&qn()==32&&Ht()==32))}function Dl(e){for(;Ht();)switch(We){case e:return jt;case 34:case 39:e!==34&&e!==39&&Dl(We);break;case 40:e===41&&Dl(e);break;case 92:Ht();break}return jt}function u3(e,t){for(;Ht()&&e+We!==47+10;)if(e+We===42+42&&qn()===47)break;return"/*"+Wi(t,jt-1)+"*"+fu(e===47?e:Ht())}function d3(e){for(;!Al(qn());)Ht();return Wi(e,jt)}function f3(e){return s3(Xa("",null,null,null,[""],e=i3(e),0,[0],e))}function Xa(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,h=0,m=1,b=1,y=1,S=0,E="",x=o,v=a,O=r,C=E;b;)switch(h=S,S=Ht()){case 40:if(h!=108&&Xo(C,d-1)==58){n3(C+=qa(js(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=js(S);break;case 9:case 10:case 13:case 32:C+=l3(h);break;case 92:C+=c3(Ya()-1,7);continue;case 47:switch(qn()){case 42:case 47:Ia(p3(u3(Ht(),Ya()),t,n,l),l);break;default:C+="/"}break;case 123*m:s[c++]=hn(C)*y;case 125*m:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:y==-1&&(C=qa(C,/\f/g,"")),p>0&&hn(C)-d&&Ia(p>32?bp(C+";",r,n,d-1,l):bp(qa(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ia(O=yp(C,t,n,c,u,o,s,E,x=[],v=[],d,a),a),S===123)if(u===0)Xa(C,t,O,O,x,a,d,s,v);else switch(f===99&&Xo(C,3)===110?100:f){case 100:case 108:case 109:case 115:Xa(e,O,O,r&&Ia(yp(e,O,O,0,0,o,s,E,o,x=[],d,v),v),o,v,d,s,r?x:v);break;default:Xa(C,O,O,O,[""],v,0,s,v)}}c=u=p=0,m=y=1,E=C="",d=i;break;case 58:d=1+hn(C),p=h;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&a3()==125)continue}switch(C+=fu(S),S*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(hn(C)-1)*y,y=1;break;case 64:qn()===45&&(C+=js(Ht())),f=qn(),u=d=hn(E=C+=d3(Ya())),S++;break;case 45:h===45&&hn(C)==2&&(m=0)}}return a}function yp(e,t,n,r,o,a,i,s,l,c,u,d){for(var f=o-1,p=o===0?a:[""],h=r3(p),m=0,b=0,y=0;m<r;++m)for(var S=0,E=Jo(e,f+1,f=t3(b=i[m])),x=e;S<h;++S)(x=ny(b>0?p[S]+" "+E:qa(E,/&\f/g,p[S])))&&(l[y++]=x);return pu(e,t,n,o===0?ey:s,l,c,u,d)}function p3(e,t,n,r){return pu(e,t,n,Zm,fu(o3()),Jo(e,2,-2),0,r)}function bp(e,t,n,r,o){return pu(e,t,n,ty,Jo(e,0,r),Jo(e,r+1,-1),r,o)}function $l(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function h3(e,t,n,r){switch(e.type){case e3:if(e.children.length)break;case QL:case ty:return e.return=e.return||e.value;case Zm:return"";case ZL:return e.return=e.value+"{"+$l(e.children,r)+"}";case ey:if(!hn(e.value=e.props.join(",")))return""}return hn(n=$l(e.children,r))?e.return=e.value+"{"+n+"}":""}function oy(e,t){var n=t.path,r=t.parentSelectors;Mn(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var g3=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof n!="string"||a.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&oy("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},v3=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&oy("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},wp="data-ant-cssinjs-cache-path",ay="_FILE_STYLE__",Yn,iy=!0;function m3(){if(!Yn&&(Yn={},en())){var e=document.createElement("div");e.className=wp,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=Ce(a,2),s=i[0],l=i[1];Yn[s]=l});var n=document.querySelector("style[".concat(wp,"]"));if(n){var r;iy=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function y3(e){return m3(),!!Yn[e]}function b3(e){var t=Yn[e],n=null;if(t&&en())if(iy)n=ay;else{var r=document.querySelector("style[".concat(Kn,'="').concat(Yn[e],'"]'));r?n=r.innerHTML:delete Yn[e]}return[n,t]}var Sp=en(),sy="_skip_check_",ly="_multi_value_";function xp(e){var t=$l(f3(e),h3);return t.replace(/\{%%%\:[^;];}/g,";")}function w3(e){return Oe(e)==="object"&&e&&(sy in e||ly in e)}function S3(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,a=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(jn(l.slice(1))).join(" ")});return a.join(",")}var x3=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,h=p===void 0?[]:p,m="",b={};function y(O){var C=O.getName(s);if(!b[C]){var R=e(O.style,n,{root:!1,parentSelectors:i}),N=Ce(R,1),T=N[0];b[C]="@keyframes ".concat(O.getName(s)).concat(T)}}function S(O){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return O.forEach(function(R){Array.isArray(R)?S(R,C):R&&C.push(R)}),C}var E=S(Array.isArray(t)?t:[t]);if(E.forEach(function(O){var C=typeof O=="string"&&!o?{}:O;if(typeof C=="string")m+="".concat(C,`
|
|
187
|
-
`);else if(C._keyframe)y(C);else{var R=f.reduce(function(N,T){var k;return(T==null||(k=T.visit)===null||k===void 0?void 0:k.call(T,N))||N},C);Object.keys(R).forEach(function(N){var T=R[N];if(Oe(T)==="object"&&T&&(N!=="animationName"||!T._keyframe)&&!w3(T)){var k=!1,j=N.trim(),L=!1;(o||a)&&s?j.startsWith("@")?k=!0:j=S3(N,s,u):o&&!s&&(j==="&"||j==="")&&(j="",L=!0);var M=e(T,n,{root:L,injectHash:k,parentSelectors:[].concat(jn(i),[j])}),P=Ce(M,2),D=P[0],F=P[1];b=H(H({},b),F),m+="".concat(j).concat(D)}else{let ue=function(A,I){"{}".NODE_ENV!=="production"&&(Oe(T)!=="object"||!(T!=null&&T[sy]))&&[g3,v3].concat(jn(h)).forEach(function(ie){return ie(A,I,{path:c,hashId:s,parentSelectors:i})});var G=A.replace(/[A-Z]/g,function(ie){return"-".concat(ie.toLowerCase())}),te=I;!JL[A]&&typeof te=="number"&&te!==0&&(te="".concat(te,"px")),A==="animationName"&&I!==null&&I!==void 0&&I._keyframe&&(y(I),te=I.getName(s)),m+="".concat(G,":").concat(te,";")};var ne,Z=(ne=T==null?void 0:T.value)!==null&&ne!==void 0?ne:T;Oe(T)==="object"&&T!==null&&T!==void 0&&T[ly]&&Array.isArray(Z)?Z.forEach(function(A){ue(N,A)}):ue(N,Z)}})}}),!o)m="{".concat(m,"}");else if(l&&ML()){var x=l.split(","),v=x[x.length-1].trim();m="@layer ".concat(v," {").concat(m,"}"),x.length>1&&(m="@layer ".concat(l,"{%%%:%}").concat(m))}return[m,b]};function C3(e,t){return uu("".concat(e.join("%")).concat(t))}function O3(){return null}function Il(e,t){var n=e.token,r=e.path,o=e.hashId,a=e.layer,i=e.nonce,s=W.useContext(du),l=s.autoClear,c=s.mock,u=s.defaultCache,d=s.hashPriority,f=s.container,p=s.ssrInline,h=s.transformers,m=s.linters,b=s.cache,y=n._tokenKey,S=[y].concat(jn(r)),E=Sp;"{}".NODE_ENV!=="production"&&c!==void 0&&(E=c==="client");var x=Qm("style",S,function(){var N=S.join("|");if(y3(N)){var T=b3(N),k=Ce(T,2),j=k[0],L=k[1];if(j)return[j,y,L,{}]}var M=t(),P=x3(M,{hashId:o,hashPriority:d,layer:a,path:r.join("-"),transformers:h,linters:m}),D=Ce(P,2),F=D[0],ne=D[1],Z=xp(F),ue=C3(S,Z);return[Z,y,ue,ne]},function(N,T){var k=Ce(N,3),j=k[2];(T||l)&&Sp&&sh(j,{mark:Kn})},function(N){var T=Ce(N,4),k=T[0];T[1];var j=T[2],L=T[3];if(E&&k!==ay){var M={mark:Kn,prepend:"queue",attachTo:f},P=typeof i=="function"?i():i;P&&(M.csp={nonce:P});var D=Do(k,j,M);D[xr]=b.instanceId,D.setAttribute(jl,y),"{}".NODE_ENV!=="production"&&D.setAttribute(NL,S.join("|")),Object.keys(L).forEach(function(F){Do(xp(L[F]),"_effect-".concat(F),M)})}}),v=Ce(x,3),O=v[0],C=v[1],R=v[2];return function(N){var T;if(!p||E||!u)T=w(O3,{});else{var k;T=w("style",{...(k={},ae(k,jl,C),ae(k,Kn,R),k),dangerouslySetInnerHTML:{__html:O}})}return ee(Ye,{children:[T,N]})}}function E3(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var hu=function(){function e(){nt(this,e),ae(this,"cache",void 0),ae(this,"keys",void 0),ae(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return rt(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return n.forEach(function(s){if(!i)i=void 0;else{var l,c;i=(l=i)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(r=i)!==null&&r!==void 0&&r.value&&a&&(i.value[1]=this.cacheCallTimes++),(o=i)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(c,u){var d=Ce(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),i=Ce(a,1),s=i[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var a;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(a=o.value)===null||a===void 0?void 0:a[0]}var i=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),i}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!E3(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();ae(hu,"MAX_CACHE_SIZE",20);ae(hu,"MAX_CACHE_OFFSET",5);var Cp=0,_3=function(){function e(t){nt(this,e),ae(this,"derivatives",void 0),ae(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Cp,t.length===0&&eh(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Cp+=1}return rt(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),Ms=new hu;function cy(e){var t=Array.isArray(e)?e:[e];return Ms.has(t)||Ms.set(t,new _3(t)),Ms.get(t)}function gr(e){return e.notSplit=!0,e}gr(["borderTop","borderBottom"]),gr(["borderTop"]),gr(["borderBottom"]),gr(["borderLeft","borderRight"]),gr(["borderLeft"]),gr(["borderRight"]);var R3=g.createContext({});const N3=R3;function Ll(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function uy(e,t,n,r){if(!t.length)return n;var o=ev(t),a=o[0],i=o.slice(1),s;return!e&&typeof a=="number"?s=[]:Array.isArray(e)?s=jn(e):s=H({},e),r&&n===void 0&&i.length===1?delete s[a][i[0]]:s[a]=uy(s[a],i,n,r),s}function As(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Ll(e,t.slice(0,-1))?e:uy(e,t,n,r)}function T3(e){return Oe(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Op(e){return Array.isArray(e)?[]:{}}var P3=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function k3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Op(t[0]);return t.forEach(function(o){function a(i,s){var l=new Set(s),c=Ll(o,i),u=Array.isArray(c);if(u||T3(c)){if(!l.has(c)){l.add(c);var d=Ll(r,i);u?r=As(r,i,[]):(!d||Oe(d)!=="object")&&(r=As(r,i,Op(c))),P3(c).forEach(function(f){a([].concat(jn(i),[f]),l)})}}else r=As(r,i,c)}a([])}),r}function j3(){}let dy=j3;"{}".NODE_ENV!=="production"&&(dy=(e,t,n)=>{Mn(e,`[antd: ${t}] ${n}`),"{}".NODE_ENV==="test"&&th()});const la=dy,M3=g.createContext(void 0),A3={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var D3={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const $3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},fy=$3,I3={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},D3),timePickerLocale:Object.assign({},fy)},Ep=I3,mt="${label} is not a valid ${type}",L3={locale:"en",Pagination:A3,DatePicker:Ep,TimePicker:fy,Calendar:Ep,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mt,method:mt,array:mt,object:mt,number:mt,date:mt,boolean:mt,integer:mt,float:mt,regexp:mt,email:mt,url:mt,hex:mt},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}},gu=L3;let Ds=Object.assign({},gu.Modal);function _p(e){e?Ds=Object.assign(Object.assign({},Ds),e):Ds=Object.assign({},gu.Modal)}const B3=g.createContext(void 0),py=B3,hy="internalMark",gy=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(r===hy,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),W.useEffect(()=>(_p(t&&t.Modal),()=>{_p()}),[t]);const o=W.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return w(py.Provider,{value:o,children:n})};"{}".NODE_ENV!=="production"&&(gy.displayName="LocaleProvider");const z3=gy,V3="5.6.3",F3=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var La=2,Rp=.16,H3=.05,U3=.05,W3=.15,vy=5,my=4,G3=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Np(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ba(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function K3(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Tp(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-La*t:Math.round(e.h)+La*t:r=n?Math.round(e.h)+La*t:Math.round(e.h)-La*t,r<0?r+=360:r>=360&&(r-=360),r}function Pp(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Rp*t:t===my?r=e.s+Rp:r=e.s+H3*t,r>1&&(r=1),n&&t===vy&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function kp(e,t,n){var r;return n?r=e.v+U3*t:r=e.v-W3*t,r>1&&(r=1),Number(r.toFixed(2))}function Hr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Bt(e),o=vy;o>0;o-=1){var a=Np(r),i=Ba(Bt({h:Tp(a,o,!0),s:Pp(a,o,!0),v:kp(a,o,!0)}));n.push(i)}n.push(Ba(r));for(var s=1;s<=my;s+=1){var l=Np(r),c=Ba(Bt({h:Tp(l,s),s:Pp(l,s),v:kp(l,s)}));n.push(c)}return t.theme==="dark"?G3.map(function(u){var d=u.index,f=u.opacity,p=Ba(K3(Bt(t.backgroundColor||"#141414"),Bt(n[d]),f*100));return p}):n}var $s={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Is={},Ls={};Object.keys($s).forEach(function(e){Is[e]=Hr($s[e]),Is[e].primary=Is[e][5],Ls[e]=Hr($s[e],{theme:"dark",backgroundColor:"#141414"}),Ls[e].primary=Ls[e][5]});const q3=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Y3=q3;function X3(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const yy={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},J3=Object.assign(Object.assign({},yy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
254
|
+
declare global {
|
|
255
|
+
const $$context: ContextType;
|
|
256
|
+
}
|
|
257
|
+
`,mw=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var l;const o=b.useRef(null),[a,i]=b.useState(!1),s=()=>{var u;const c=((u=o.current)==null?void 0:u.getValue())||"";e({type:De.CNodePropsTypeEnum.FUNCTION,value:c})};return M(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:[p(A.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),p(A.Modal,{centered:!0,destroyOnClose:!0,open:a,title:"Function Editor",onCancel:()=>i(!1),width:"calc(100vw - 100px)",onOk:()=>{s(),i(!1)},style:{maxWidth:"1300px"},bodyStyle:{minHeight:"500px",height:"calc(100vh - 280px)"},children:p("div",{style:{height:"100%"},children:a&&p(Hi,{beforeMount:c=>{c.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),c.languages.typescript.javascriptDefaults.setCompilerOptions({target:c.languages.typescript.ScriptTarget.ES5,allowNonTsExtensions:!0});const u="ts:filename/chameleon.default.variable.d.ts";c.languages.typescript.javascriptDefaults.addExtraLib(Xv,u),c.editor.getModel(c.Uri.parse(u))||c.editor.createModel(Xv,"typescript",c.Uri.parse(u))},onDidMount:c=>{o.current=c},initialValue:((l=r.value)==null?void 0:l.value)??(t||""),language:"javascript",options:{automaticLayout:!0,tabSize:2}})})})]})};mw.setterName="函数设置器";const bw=({onValueChange:e,setterContext:t,initialValue:n,...r})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Input.TextArea,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});bw.setterName="长文本设置器";const pF="_inputAuto_gk0d2_2",gF="_active_gk0d2_6",Yv={inputAuto:pF,active:gF},yw={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},xw=yw.cssKeyValue,vF=Object.keys(yw.cssKeyValue),ww=({onValueChange:e,setterContext:t,propertyKey:n="",value:r,initialValue:o})=>{const a=b.useRef(null),[i,s]=b.useState(r??(o||"")),[l,c]=b.useState(!1),u=()=>{e==null||e(i)};b.useEffect(()=>{s(r)},[r]);const f=b.useMemo(()=>{var h;return(((h=xw[n])==null?void 0:h.values)||[]).map(v=>({value:v}))},[n]);return p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.AutoComplete,{ref:a,popupMatchSelectWidth:200,bordered:!1,value:i,onChange:d=>{s(d),u()},style:{flex:1},onFocus:()=>{c(!0)},onBlur:()=>{c(!1)},className:Ge([Yv.inputAuto,l&&Yv.active]),placeholder:"value",options:f})})};ww.setterName="CSS值设置器";var nn={},Vi={},mF=typeof Wa=="object"&&Wa&&Wa.Object===Object&&Wa,Sw=mF,bF=Sw,yF=typeof self=="object"&&self&&self.Object===Object&&self,xF=bF||yF||Function("return this")(),Un=xF,wF=Un,SF=wF.Symbol,Ui=SF,Jv=Ui,Cw=Object.prototype,CF=Cw.hasOwnProperty,_F=Cw.toString,Ha=Jv?Jv.toStringTag:void 0;function OF(e){var t=CF.call(e,Ha),n=e[Ha];try{e[Ha]=void 0;var r=!0}catch{}var o=_F.call(e);return r&&(t?e[Ha]=n:delete e[Ha]),o}var EF=OF,RF=Object.prototype,$F=RF.toString;function TF(e){return $F.call(e)}var PF=TF,Qv=Ui,kF=EF,NF=PF,AF="[object Null]",MF="[object Undefined]",Zv=Qv?Qv.toStringTag:void 0;function jF(e){return e==null?e===void 0?MF:AF:Zv&&Zv in Object(e)?kF(e):NF(e)}var oo=jF,DF=Array.isArray,Rn=DF;function IF(e){return e!=null&&typeof e=="object"}var hr=IF,LF=oo,BF=Rn,FF=hr,zF="[object String]";function HF(e){return typeof e=="string"||!BF(e)&&FF(e)&&LF(e)==zF}var VF=HF;function UF(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var WF=UF,GF=WF,KF=GF(),qF=KF;function XF(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var YF=XF,JF=oo,QF=hr,ZF="[object Arguments]";function ez(e){return QF(e)&&JF(e)==ZF}var tz=ez,e0=tz,nz=hr,_w=Object.prototype,rz=_w.hasOwnProperty,oz=_w.propertyIsEnumerable,az=e0(function(){return arguments}())?e0:function(e){return nz(e)&&rz.call(e,"callee")&&!oz.call(e,"callee")},Ow=az,vl={exports:{}};function iz(){return!1}var sz=iz;vl.exports;(function(e,t){var n=Un,r=sz,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===o,s=i?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c})(vl,vl.exports);var sh=vl.exports,lz=9007199254740991,cz=/^(?:0|[1-9]\d*)$/;function uz(e,t){var n=typeof e;return t=t??lz,!!t&&(n=="number"||n!="symbol"&&cz.test(e))&&e>-1&&e%1==0&&e<t}var Ew=uz,fz=9007199254740991;function dz(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fz}var lh=dz,hz=oo,pz=lh,gz=hr,vz="[object Arguments]",mz="[object Array]",bz="[object Boolean]",yz="[object Date]",xz="[object Error]",wz="[object Function]",Sz="[object Map]",Cz="[object Number]",_z="[object Object]",Oz="[object RegExp]",Ez="[object Set]",Rz="[object String]",$z="[object WeakMap]",Tz="[object ArrayBuffer]",Pz="[object DataView]",kz="[object Float32Array]",Nz="[object Float64Array]",Az="[object Int8Array]",Mz="[object Int16Array]",jz="[object Int32Array]",Dz="[object Uint8Array]",Iz="[object Uint8ClampedArray]",Lz="[object Uint16Array]",Bz="[object Uint32Array]",We={};We[kz]=We[Nz]=We[Az]=We[Mz]=We[jz]=We[Dz]=We[Iz]=We[Lz]=We[Bz]=!0;We[vz]=We[mz]=We[Tz]=We[bz]=We[Pz]=We[yz]=We[xz]=We[wz]=We[Sz]=We[Cz]=We[_z]=We[Oz]=We[Ez]=We[Rz]=We[$z]=!1;function Fz(e){return gz(e)&&pz(e.length)&&!!We[hz(e)]}var zz=Fz;function Hz(e){return function(t){return e(t)}}var ch=Hz,ml={exports:{}};ml.exports;(function(e,t){var n=Sw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===r,i=a&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s})(ml,ml.exports);var uh=ml.exports,Vz=zz,Uz=ch,t0=uh,n0=t0&&t0.isTypedArray,Wz=n0?Uz(n0):Vz,Rw=Wz,Gz=YF,Kz=Ow,qz=Rn,Xz=sh,Yz=Ew,Jz=Rw,Qz=Object.prototype,Zz=Qz.hasOwnProperty;function eH(e,t){var n=qz(e),r=!n&&Kz(e),o=!n&&!r&&Xz(e),a=!n&&!r&&!o&&Jz(e),i=n||r||o||a,s=i?Gz(e.length,String):[],l=s.length;for(var c in e)(t||Zz.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Yz(c,l)))&&s.push(c);return s}var $w=eH,tH=Object.prototype;function nH(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||tH;return e===n}var fh=nH;function rH(e,t){return function(n){return e(t(n))}}var Tw=rH,oH=Tw,aH=oH(Object.keys,Object),iH=aH,sH=fh,lH=iH,cH=Object.prototype,uH=cH.hasOwnProperty;function fH(e){if(!sH(e))return lH(e);var t=[];for(var n in Object(e))uH.call(e,n)&&n!="constructor"&&t.push(n);return t}var dH=fH;function hH(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ca=hH,pH=oo,gH=Ca,vH="[object AsyncFunction]",mH="[object Function]",bH="[object GeneratorFunction]",yH="[object Proxy]";function xH(e){if(!gH(e))return!1;var t=pH(e);return t==mH||t==bH||t==vH||t==yH}var Pw=xH,wH=Pw,SH=lh;function CH(e){return e!=null&&SH(e.length)&&!wH(e)}var Yl=CH,_H=$w,OH=dH,EH=Yl;function RH(e){return EH(e)?_H(e):OH(e)}var Wi=RH,$H=qF,TH=Wi;function PH(e,t){return e&&$H(e,t,TH)}var kw=PH;function kH(e){return e}var Nw=kH,NH=Nw;function AH(e){return typeof e=="function"?e:NH}var MH=AH,jH=kw,DH=MH;function IH(e,t){return e&&jH(e,DH(t))}var dh=IH,LH=Tw,BH=LH(Object.getPrototypeOf,Object),hh=BH,FH=oo,zH=hh,HH=hr,VH="[object Object]",UH=Function.prototype,WH=Object.prototype,Aw=UH.toString,GH=WH.hasOwnProperty,KH=Aw.call(Object);function qH(e){if(!HH(e)||FH(e)!=VH)return!1;var t=zH(e);if(t===null)return!0;var n=GH.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Aw.call(n)==KH}var XH=qH;function YH(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Mw=YH;function JH(){this.__data__=[],this.size=0}var QH=JH;function ZH(e,t){return e===t||e!==e&&t!==t}var ph=ZH,eV=ph;function tV(e,t){for(var n=e.length;n--;)if(eV(e[n][0],t))return n;return-1}var Jl=tV,nV=Jl,rV=Array.prototype,oV=rV.splice;function aV(e){var t=this.__data__,n=nV(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():oV.call(t,n,1),--this.size,!0}var iV=aV,sV=Jl;function lV(e){var t=this.__data__,n=sV(t,e);return n<0?void 0:t[n][1]}var cV=lV,uV=Jl;function fV(e){return uV(this.__data__,e)>-1}var dV=fV,hV=Jl;function pV(e,t){var n=this.__data__,r=hV(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var gV=pV,vV=QH,mV=iV,bV=cV,yV=dV,xV=gV;function _a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_a.prototype.clear=vV;_a.prototype.delete=mV;_a.prototype.get=bV;_a.prototype.has=yV;_a.prototype.set=xV;var Ql=_a,wV=Ql;function SV(){this.__data__=new wV,this.size=0}var CV=SV;function _V(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var OV=_V;function EV(e){return this.__data__.get(e)}var RV=EV;function $V(e){return this.__data__.has(e)}var TV=$V,PV=Un,kV=PV["__core-js_shared__"],NV=kV,Wc=NV,r0=function(){var e=/[^.]+$/.exec(Wc&&Wc.keys&&Wc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function AV(e){return!!r0&&r0 in e}var MV=AV,jV=Function.prototype,DV=jV.toString;function IV(e){if(e!=null){try{return DV.call(e)}catch{}try{return e+""}catch{}}return""}var jw=IV,LV=Pw,BV=MV,FV=Ca,zV=jw,HV=/[\\^$.*+?()[\]{}|]/g,VV=/^\[object .+?Constructor\]$/,UV=Function.prototype,WV=Object.prototype,GV=UV.toString,KV=WV.hasOwnProperty,qV=RegExp("^"+GV.call(KV).replace(HV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function XV(e){if(!FV(e)||BV(e))return!1;var t=LV(e)?qV:VV;return t.test(zV(e))}var YV=XV;function JV(e,t){return e==null?void 0:e[t]}var QV=JV,ZV=YV,eU=QV;function tU(e,t){var n=eU(e,t);return ZV(n)?n:void 0}var ao=tU,nU=ao,rU=Un,oU=nU(rU,"Map"),gh=oU,aU=ao,iU=aU(Object,"create"),Zl=iU,o0=Zl;function sU(){this.__data__=o0?o0(null):{},this.size=0}var lU=sU;function cU(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var uU=cU,fU=Zl,dU="__lodash_hash_undefined__",hU=Object.prototype,pU=hU.hasOwnProperty;function gU(e){var t=this.__data__;if(fU){var n=t[e];return n===dU?void 0:n}return pU.call(t,e)?t[e]:void 0}var vU=gU,mU=Zl,bU=Object.prototype,yU=bU.hasOwnProperty;function xU(e){var t=this.__data__;return mU?t[e]!==void 0:yU.call(t,e)}var wU=xU,SU=Zl,CU="__lodash_hash_undefined__";function _U(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=SU&&t===void 0?CU:t,this}var OU=_U,EU=lU,RU=uU,$U=vU,TU=wU,PU=OU;function Oa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Oa.prototype.clear=EU;Oa.prototype.delete=RU;Oa.prototype.get=$U;Oa.prototype.has=TU;Oa.prototype.set=PU;var kU=Oa,a0=kU,NU=Ql,AU=gh;function MU(){this.size=0,this.__data__={hash:new a0,map:new(AU||NU),string:new a0}}var jU=MU;function DU(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var IU=DU,LU=IU;function BU(e,t){var n=e.__data__;return LU(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ec=BU,FU=ec;function zU(e){var t=FU(this,e).delete(e);return this.size-=t?1:0,t}var HU=zU,VU=ec;function UU(e){return VU(this,e).get(e)}var WU=UU,GU=ec;function KU(e){return GU(this,e).has(e)}var qU=KU,XU=ec;function YU(e,t){var n=XU(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var JU=YU,QU=jU,ZU=HU,eW=WU,tW=qU,nW=JU;function Ea(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ea.prototype.clear=QU;Ea.prototype.delete=ZU;Ea.prototype.get=eW;Ea.prototype.has=tW;Ea.prototype.set=nW;var vh=Ea,rW=Ql,oW=gh,aW=vh,iW=200;function sW(e,t){var n=this.__data__;if(n instanceof rW){var r=n.__data__;if(!oW||r.length<iW-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new aW(r)}return n.set(e,t),this.size=n.size,this}var lW=sW,cW=Ql,uW=CV,fW=OV,dW=RV,hW=TV,pW=lW;function Ra(e){var t=this.__data__=new cW(e);this.size=t.size}Ra.prototype.clear=uW;Ra.prototype.delete=fW;Ra.prototype.get=dW;Ra.prototype.has=hW;Ra.prototype.set=pW;var mh=Ra,gW="__lodash_hash_undefined__";function vW(e){return this.__data__.set(e,gW),this}var mW=vW;function bW(e){return this.__data__.has(e)}var yW=bW,xW=vh,wW=mW,SW=yW;function bl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xW;++t<n;)this.add(e[t])}bl.prototype.add=bl.prototype.push=wW;bl.prototype.has=SW;var CW=bl;function _W(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var OW=_W;function EW(e,t){return e.has(t)}var RW=EW,$W=CW,TW=OW,PW=RW,kW=1,NW=2;function AW(e,t,n,r,o,a){var i=n&kW,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,h=n&NW?new $W:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var v=e[f],g=t[f];if(r)var m=i?r(g,v,f,t,e,a):r(v,g,f,e,t,a);if(m!==void 0){if(m)continue;d=!1;break}if(h){if(!TW(t,function(y,w){if(!PW(h,w)&&(v===y||o(v,y,n,r,a)))return h.push(w)})){d=!1;break}}else if(!(v===g||o(v,g,n,r,a))){d=!1;break}}return a.delete(e),a.delete(t),d}var Dw=AW,MW=Un,jW=MW.Uint8Array,Iw=jW;function DW(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var IW=DW;function LW(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var BW=LW,i0=Ui,s0=Iw,FW=ph,zW=Dw,HW=IW,VW=BW,UW=1,WW=2,GW="[object Boolean]",KW="[object Date]",qW="[object Error]",XW="[object Map]",YW="[object Number]",JW="[object RegExp]",QW="[object Set]",ZW="[object String]",eG="[object Symbol]",tG="[object ArrayBuffer]",nG="[object DataView]",l0=i0?i0.prototype:void 0,Gc=l0?l0.valueOf:void 0;function rG(e,t,n,r,o,a,i){switch(n){case nG:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tG:return!(e.byteLength!=t.byteLength||!a(new s0(e),new s0(t)));case GW:case KW:case YW:return FW(+e,+t);case qW:return e.name==t.name&&e.message==t.message;case JW:case ZW:return e==t+"";case XW:var s=HW;case QW:var l=r&UW;if(s||(s=VW),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=WW,i.set(e,t);var u=zW(s(e),s(t),r,o,a,i);return i.delete(e),u;case eG:if(Gc)return Gc.call(e)==Gc.call(t)}return!1}var oG=rG;function aG(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Lw=aG,iG=Lw,sG=Rn;function lG(e,t,n){var r=t(e);return sG(e)?r:iG(r,n(e))}var Bw=lG;function cG(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}var uG=cG;function fG(){return[]}var Fw=fG,dG=uG,hG=Fw,pG=Object.prototype,gG=pG.propertyIsEnumerable,c0=Object.getOwnPropertySymbols,vG=c0?function(e){return e==null?[]:(e=Object(e),dG(c0(e),function(t){return gG.call(e,t)}))}:hG,bh=vG,mG=Bw,bG=bh,yG=Wi;function xG(e){return mG(e,yG,bG)}var zw=xG,u0=zw,wG=1,SG=Object.prototype,CG=SG.hasOwnProperty;function _G(e,t,n,r,o,a){var i=n&wG,s=u0(e),l=s.length,c=u0(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:CG.call(t,d)))return!1}var h=a.get(e),v=a.get(t);if(h&&v)return h==t&&v==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=i;++f<l;){d=s[f];var y=e[d],w=t[d];if(r)var _=i?r(w,y,d,t,e,a):r(y,w,d,e,t,a);if(!(_===void 0?y===w||o(y,w,n,r,a):_)){g=!1;break}m||(m=d=="constructor")}if(g&&!m){var S=e.constructor,x=t.constructor;S!=x&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof x=="function"&&x instanceof x)&&(g=!1)}return a.delete(e),a.delete(t),g}var OG=_G,EG=ao,RG=Un,$G=EG(RG,"DataView"),TG=$G,PG=ao,kG=Un,NG=PG(kG,"Promise"),AG=NG,MG=ao,jG=Un,DG=MG(jG,"Set"),IG=DG,LG=ao,BG=Un,FG=LG(BG,"WeakMap"),zG=FG,mf=TG,bf=gh,yf=AG,xf=IG,wf=zG,Hw=oo,$a=jw,f0="[object Map]",HG="[object Object]",d0="[object Promise]",h0="[object Set]",p0="[object WeakMap]",g0="[object DataView]",VG=$a(mf),UG=$a(bf),WG=$a(yf),GG=$a(xf),KG=$a(wf),Ir=Hw;(mf&&Ir(new mf(new ArrayBuffer(1)))!=g0||bf&&Ir(new bf)!=f0||yf&&Ir(yf.resolve())!=d0||xf&&Ir(new xf)!=h0||wf&&Ir(new wf)!=p0)&&(Ir=function(e){var t=Hw(e),n=t==HG?e.constructor:void 0,r=n?$a(n):"";if(r)switch(r){case VG:return g0;case UG:return f0;case WG:return d0;case GG:return h0;case KG:return p0}return t});var tc=Ir,Kc=mh,qG=Dw,XG=oG,YG=OG,v0=tc,m0=Rn,b0=sh,JG=Rw,QG=1,y0="[object Arguments]",x0="[object Array]",ys="[object Object]",ZG=Object.prototype,w0=ZG.hasOwnProperty;function eK(e,t,n,r,o,a){var i=m0(e),s=m0(t),l=i?x0:v0(e),c=s?x0:v0(t);l=l==y0?ys:l,c=c==y0?ys:c;var u=l==ys,f=c==ys,d=l==c;if(d&&b0(e)){if(!b0(t))return!1;i=!0,u=!1}if(d&&!u)return a||(a=new Kc),i||JG(e)?qG(e,t,n,r,o,a):XG(e,t,l,n,r,o,a);if(!(n&QG)){var h=u&&w0.call(e,"__wrapped__"),v=f&&w0.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,m=v?t.value():t;return a||(a=new Kc),o(g,m,n,r,a)}}return d?(a||(a=new Kc),YG(e,t,n,r,o,a)):!1}var tK=eK,nK=tK,S0=hr;function Vw(e,t,n,r,o){return e===t?!0:e==null||t==null||!S0(e)&&!S0(t)?e!==e&&t!==t:nK(e,t,n,r,Vw,o)}var Uw=Vw,rK=mh,oK=Uw,aK=1,iK=2;function sK(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new rK;if(r)var d=r(c,u,l,e,t,f);if(!(d===void 0?oK(u,c,aK|iK,r,f):d))return!1}}return!0}var lK=sK,cK=Ca;function uK(e){return e===e&&!cK(e)}var Ww=uK,fK=Ww,dK=Wi;function hK(e){for(var t=dK(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,fK(o)]}return t}var pK=hK;function gK(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Gw=gK,vK=lK,mK=pK,bK=Gw;function yK(e){var t=mK(e);return t.length==1&&t[0][2]?bK(t[0][0],t[0][1]):function(n){return n===e||vK(n,e,t)}}var xK=yK,wK=oo,SK=hr,CK="[object Symbol]";function _K(e){return typeof e=="symbol"||SK(e)&&wK(e)==CK}var yh=_K,OK=Rn,EK=yh,RK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$K=/^\w*$/;function TK(e,t){if(OK(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||EK(e)?!0:$K.test(e)||!RK.test(e)||t!=null&&e in Object(t)}var xh=TK,Kw=vh,PK="Expected a function";function wh(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(PK);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(wh.Cache||Kw),n}wh.Cache=Kw;var kK=wh,NK=kK,AK=500;function MK(e){var t=NK(e,function(r){return n.size===AK&&n.clear(),r}),n=t.cache;return t}var jK=MK,DK=jK,IK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LK=/\\(\\)?/g,BK=DK(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(IK,function(n,r,o,a){t.push(o?a.replace(LK,"$1"):r||n)}),t}),FK=BK,C0=Ui,zK=Mw,HK=Rn,VK=yh,UK=1/0,_0=C0?C0.prototype:void 0,O0=_0?_0.toString:void 0;function qw(e){if(typeof e=="string")return e;if(HK(e))return zK(e,qw)+"";if(VK(e))return O0?O0.call(e):"";var t=e+"";return t=="0"&&1/e==-UK?"-0":t}var WK=qw,GK=WK;function KK(e){return e==null?"":GK(e)}var qK=KK,XK=Rn,YK=xh,JK=FK,QK=qK;function ZK(e,t){return XK(e)?e:YK(e,t)?[e]:JK(QK(e))}var Xw=ZK,eq=yh,tq=1/0;function nq(e){if(typeof e=="string"||eq(e))return e;var t=e+"";return t=="0"&&1/e==-tq?"-0":t}var nc=nq,rq=Xw,oq=nc;function aq(e,t){t=rq(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[oq(t[n++])];return n&&n==r?e:void 0}var Yw=aq,iq=Yw;function sq(e,t,n){var r=e==null?void 0:iq(e,t);return r===void 0?n:r}var lq=sq;function cq(e,t){return e!=null&&t in Object(e)}var uq=cq,fq=Xw,dq=Ow,hq=Rn,pq=Ew,gq=lh,vq=nc;function mq(e,t,n){t=fq(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=vq(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&gq(o)&&pq(i,o)&&(hq(e)||dq(e)))}var bq=mq,yq=uq,xq=bq;function wq(e,t){return e!=null&&xq(e,t,yq)}var Sq=wq,Cq=Uw,_q=lq,Oq=Sq,Eq=xh,Rq=Ww,$q=Gw,Tq=nc,Pq=1,kq=2;function Nq(e,t){return Eq(e)&&Rq(t)?$q(Tq(e),t):function(n){var r=_q(n,e);return r===void 0&&r===t?Oq(n,e):Cq(t,r,Pq|kq)}}var Aq=Nq;function Mq(e){return function(t){return t==null?void 0:t[e]}}var jq=Mq,Dq=Yw;function Iq(e){return function(t){return Dq(t,e)}}var Lq=Iq,Bq=jq,Fq=Lq,zq=xh,Hq=nc;function Vq(e){return zq(e)?Bq(Hq(e)):Fq(e)}var Uq=Vq,Wq=xK,Gq=Aq,Kq=Nw,qq=Rn,Xq=Uq;function Yq(e){return typeof e=="function"?e:e==null?Kq:typeof e=="object"?qq(e)?Gq(e[0],e[1]):Wq(e):Xq(e)}var Jq=Yq,Qq=Yl;function Zq(e,t){return function(n,r){if(n==null)return n;if(!Qq(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Object(n);(t?a--:++a<o)&&r(i[a],a,i)!==!1;);return n}}var eX=Zq,tX=kw,nX=eX,rX=nX(tX),oX=rX,aX=oX,iX=Yl;function sX(e,t){var n=-1,r=iX(e)?Array(e.length):[];return aX(e,function(o,a,i){r[++n]=t(o,a,i)}),r}var lX=sX,cX=Mw,uX=Jq,fX=lX,dX=Rn;function hX(e,t){var n=dX(e)?cX:fX;return n(e,uX(t))}var pX=hX;Object.defineProperty(Vi,"__esModule",{value:!0});Vi.flattenNames=void 0;var gX=VF,vX=rc(gX),mX=dh,bX=rc(mX),yX=XH,xX=rc(yX),wX=pX,SX=rc(wX);function rc(e){return e&&e.__esModule?e:{default:e}}var CX=Vi.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,SX.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,xX.default)(r)?(0,bX.default)(r,function(o,a){o===!0&&n.push(a),n.push(a+"-"+o)}):(0,vX.default)(r)&&n.push(r)}),n};Vi.default=CX;var Gi={};function _X(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var OX=_X,EX=ao,RX=function(){try{var e=EX(Object,"defineProperty");return e({},"",{}),e}catch{}}(),$X=RX,E0=$X;function TX(e,t,n){t=="__proto__"&&E0?E0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Jw=TX,PX=Jw,kX=ph,NX=Object.prototype,AX=NX.hasOwnProperty;function MX(e,t,n){var r=e[t];(!(AX.call(e,t)&&kX(r,n))||n===void 0&&!(t in e))&&PX(e,t,n)}var Qw=MX,jX=Qw,DX=Jw;function IX(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?DX(n,s,l):jX(n,s,l)}return n}var oc=IX,LX=oc,BX=Wi;function FX(e,t){return e&&LX(t,BX(t),e)}var zX=FX;function HX(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var VX=HX,UX=Ca,WX=fh,GX=VX,KX=Object.prototype,qX=KX.hasOwnProperty;function XX(e){if(!UX(e))return GX(e);var t=WX(e),n=[];for(var r in e)r=="constructor"&&(t||!qX.call(e,r))||n.push(r);return n}var YX=XX,JX=$w,QX=YX,ZX=Yl;function eY(e){return ZX(e)?JX(e,!0):QX(e)}var Sh=eY,tY=oc,nY=Sh;function rY(e,t){return e&&tY(t,nY(t),e)}var oY=rY,yl={exports:{}};yl.exports;(function(e,t){var n=Un,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===r,i=a?n.Buffer:void 0,s=i?i.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var f=c.length,d=s?s(f):new c.constructor(f);return c.copy(d),d}e.exports=l})(yl,yl.exports);var aY=yl.exports;function iY(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var sY=iY,lY=oc,cY=bh;function uY(e,t){return lY(e,cY(e),t)}var fY=uY,dY=Lw,hY=hh,pY=bh,gY=Fw,vY=Object.getOwnPropertySymbols,mY=vY?function(e){for(var t=[];e;)dY(t,pY(e)),e=hY(e);return t}:gY,Zw=mY,bY=oc,yY=Zw;function xY(e,t){return bY(e,yY(e),t)}var wY=xY,SY=Bw,CY=Zw,_Y=Sh;function OY(e){return SY(e,_Y,CY)}var EY=OY,RY=Object.prototype,$Y=RY.hasOwnProperty;function TY(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&$Y.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var PY=TY,R0=Iw;function kY(e){var t=new e.constructor(e.byteLength);return new R0(t).set(new R0(e)),t}var Ch=kY,NY=Ch;function AY(e,t){var n=t?NY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var MY=AY,jY=/\w*$/;function DY(e){var t=new e.constructor(e.source,jY.exec(e));return t.lastIndex=e.lastIndex,t}var IY=DY,$0=Ui,T0=$0?$0.prototype:void 0,P0=T0?T0.valueOf:void 0;function LY(e){return P0?Object(P0.call(e)):{}}var BY=LY,FY=Ch;function zY(e,t){var n=t?FY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var HY=zY,VY=Ch,UY=MY,WY=IY,GY=BY,KY=HY,qY="[object Boolean]",XY="[object Date]",YY="[object Map]",JY="[object Number]",QY="[object RegExp]",ZY="[object Set]",eJ="[object String]",tJ="[object Symbol]",nJ="[object ArrayBuffer]",rJ="[object DataView]",oJ="[object Float32Array]",aJ="[object Float64Array]",iJ="[object Int8Array]",sJ="[object Int16Array]",lJ="[object Int32Array]",cJ="[object Uint8Array]",uJ="[object Uint8ClampedArray]",fJ="[object Uint16Array]",dJ="[object Uint32Array]";function hJ(e,t,n){var r=e.constructor;switch(t){case nJ:return VY(e);case qY:case XY:return new r(+e);case rJ:return UY(e,n);case oJ:case aJ:case iJ:case sJ:case lJ:case cJ:case uJ:case fJ:case dJ:return KY(e,n);case YY:return new r;case JY:case eJ:return new r(e);case QY:return WY(e);case ZY:return new r;case tJ:return GY(e)}}var pJ=hJ,gJ=Ca,k0=Object.create,vJ=function(){function e(){}return function(t){if(!gJ(t))return{};if(k0)return k0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),mJ=vJ,bJ=mJ,yJ=hh,xJ=fh;function wJ(e){return typeof e.constructor=="function"&&!xJ(e)?bJ(yJ(e)):{}}var SJ=wJ,CJ=tc,_J=hr,OJ="[object Map]";function EJ(e){return _J(e)&&CJ(e)==OJ}var RJ=EJ,$J=RJ,TJ=ch,N0=uh,A0=N0&&N0.isMap,PJ=A0?TJ(A0):$J,kJ=PJ,NJ=tc,AJ=hr,MJ="[object Set]";function jJ(e){return AJ(e)&&NJ(e)==MJ}var DJ=jJ,IJ=DJ,LJ=ch,M0=uh,j0=M0&&M0.isSet,BJ=j0?LJ(j0):IJ,FJ=BJ,zJ=mh,HJ=OX,VJ=Qw,UJ=zX,WJ=oY,GJ=aY,KJ=sY,qJ=fY,XJ=wY,YJ=zw,JJ=EY,QJ=tc,ZJ=PY,eQ=pJ,tQ=SJ,nQ=Rn,rQ=sh,oQ=kJ,aQ=Ca,iQ=FJ,sQ=Wi,lQ=Sh,cQ=1,uQ=2,fQ=4,eS="[object Arguments]",dQ="[object Array]",hQ="[object Boolean]",pQ="[object Date]",gQ="[object Error]",tS="[object Function]",vQ="[object GeneratorFunction]",mQ="[object Map]",bQ="[object Number]",nS="[object Object]",yQ="[object RegExp]",xQ="[object Set]",wQ="[object String]",SQ="[object Symbol]",CQ="[object WeakMap]",_Q="[object ArrayBuffer]",OQ="[object DataView]",EQ="[object Float32Array]",RQ="[object Float64Array]",$Q="[object Int8Array]",TQ="[object Int16Array]",PQ="[object Int32Array]",kQ="[object Uint8Array]",NQ="[object Uint8ClampedArray]",AQ="[object Uint16Array]",MQ="[object Uint32Array]",Me={};Me[eS]=Me[dQ]=Me[_Q]=Me[OQ]=Me[hQ]=Me[pQ]=Me[EQ]=Me[RQ]=Me[$Q]=Me[TQ]=Me[PQ]=Me[mQ]=Me[bQ]=Me[nS]=Me[yQ]=Me[xQ]=Me[wQ]=Me[SQ]=Me[kQ]=Me[NQ]=Me[AQ]=Me[MQ]=!0;Me[gQ]=Me[tS]=Me[CQ]=!1;function Fs(e,t,n,r,o,a){var i,s=t&cQ,l=t&uQ,c=t&fQ;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!aQ(e))return e;var u=nQ(e);if(u){if(i=ZJ(e),!s)return KJ(e,i)}else{var f=QJ(e),d=f==tS||f==vQ;if(rQ(e))return GJ(e,s);if(f==nS||f==eS||d&&!o){if(i=l||d?{}:tQ(e),!s)return l?XJ(e,WJ(i,e)):qJ(e,UJ(i,e))}else{if(!Me[f])return o?e:{};i=eQ(e,f,s)}}a||(a=new zJ);var h=a.get(e);if(h)return h;a.set(e,i),iQ(e)?e.forEach(function(m){i.add(Fs(m,t,n,m,e,a))}):oQ(e)&&e.forEach(function(m,y){i.set(y,Fs(m,t,n,y,e,a))});var v=c?l?JJ:YJ:l?lQ:sQ,g=u?void 0:v(e);return HJ(g||e,function(m,y){g&&(y=m,m=e[y]),VJ(i,y,Fs(m,t,n,y,e,a))}),i}var jQ=Fs,DQ=jQ,IQ=1,LQ=4;function BQ(e){return DQ(e,IQ|LQ)}var FQ=BQ;Object.defineProperty(Gi,"__esModule",{value:!0});Gi.mergeClasses=void 0;var zQ=dh,HQ=rS(zQ),VQ=FQ,UQ=rS(VQ),WQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function rS(e){return e&&e.__esModule?e:{default:e}}var GQ=Gi.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,UQ.default)(t.default)||{};return n.map(function(o){var a=t[o];return a&&(0,HQ.default)(a,function(i,s){r[s]||(r[s]={}),r[s]=WQ({},r[s],a[s])}),o}),r};Gi.default=GQ;var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.autoprefix=void 0;var KQ=dh,D0=XQ(KQ),qQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function XQ(e){return e&&e.__esModule?e:{default:e}}var YQ={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},JQ=Ki.autoprefix=function(t){var n={};return(0,D0.default)(t,function(r,o){var a={};(0,D0.default)(r,function(i,s){var l=YQ[s];l?a=qQ({},a,l(i)):a[s]=i}),n[o]=a}),n};Ki.default=JQ;var qi={};Object.defineProperty(qi,"__esModule",{value:!0});qi.hover=void 0;var QQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZQ=b,qc=eZ(ZQ);function eZ(e){return e&&e.__esModule?e:{default:e}}function tZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function nZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var rZ=qi.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){nZ(o,r);function o(){var a,i,s,l;tZ(this,o);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return l=(i=(s=I0(this,(a=o.__proto__||Object.getPrototypeOf(o)).call.apply(a,[this].concat(u))),s),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return qc.default.createElement(n,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},qc.default.createElement(t,QQ({},s.props,s.state)))},i),I0(s,l)}return o}(qc.default.Component)};qi.default=rZ;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.active=void 0;var oZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aZ=b,Xc=iZ(aZ);function iZ(e){return e&&e.__esModule?e:{default:e}}function sZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function lZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var cZ=Xi.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){lZ(o,r);function o(){var a,i,s,l;sZ(this,o);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return l=(i=(s=L0(this,(a=o.__proto__||Object.getPrototypeOf(o)).call.apply(a,[this].concat(u))),s),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return Xc.default.createElement(n,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},Xc.default.createElement(t,oZ({},s.props,s.state)))},i),L0(s,l)}return o}(Xc.default.Component)};Xi.default=cZ;var _h={};Object.defineProperty(_h,"__esModule",{value:!0});var uZ=function(t,n){var r={},o=function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[i]=s};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};_h.default=uZ;Object.defineProperty(nn,"__esModule",{value:!0});nn.ReactCSS=nn.loop=nn.handleActive=Oh=nn.handleHover=nn.hover=void 0;var fZ=Vi,dZ=Ta(fZ),hZ=Gi,pZ=Ta(hZ),gZ=Ki,vZ=Ta(gZ),mZ=qi,oS=Ta(mZ),bZ=Xi,yZ=Ta(bZ),xZ=_h,wZ=Ta(xZ);function Ta(e){return e&&e.__esModule?e:{default:e}}nn.hover=oS.default;var Oh=nn.handleHover=oS.default;nn.handleActive=yZ.default;nn.loop=wZ.default;var SZ=nn.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=(0,dZ.default)(r),i=(0,pZ.default)(t,a);return(0,vZ.default)(i)},pe=nn.default=SZ,CZ=function(t,n,r,o,a){var i=a.clientWidth,s=a.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,c=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(a.getBoundingClientRect().left+window.pageXOffset),f=c-(a.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var d=void 0;if(f<0?d=0:f>s?d=1:d=Math.round(f*100/s)/100,n.a!==d)return{h:n.h,s:n.s,l:n.l,a:d,source:"rgb"}}else{var h=void 0;if(u<0?h=0:u>i?h=1:h=Math.round(u*100/i)/100,o!==h)return{h:n.h,s:n.s,l:n.l,a:h,source:"rgb"}}return null},Yc={},_Z=function(t,n,r,o){if(typeof document>"u"&&!o)return null;var a=o?new o:document.createElement("canvas");a.width=r*2,a.height=r*2;var i=a.getContext("2d");return i?(i.fillStyle=t,i.fillRect(0,0,a.width,a.height),i.fillStyle=n,i.fillRect(0,0,r,r),i.translate(r,r),i.fillRect(0,0,r,r),a.toDataURL()):null},OZ=function(t,n,r,o){var a=t+"-"+n+"-"+r+(o?"-server":"");if(Yc[a])return Yc[a];var i=_Z(t,n,r,o);return Yc[a]=i,i},B0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pa=function(t){var n=t.white,r=t.grey,o=t.size,a=t.renderers,i=t.borderRadius,s=t.boxShadow,l=t.children,c=pe({default:{grid:{borderRadius:i,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+OZ(n,r,o,a.canvas)+") center left"}}});return b.isValidElement(l)?b.cloneElement(l,B0({},l.props,{style:B0({},l.props.style,c.grid)})):p("div",{style:c.grid})};Pa.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var EZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function $Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function TZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Eh=function(e){TZ(t,e);function t(){var n,r,o,a;$Z(this,t);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return a=(r=(o=F0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(s))),o),o.handleChange=function(c){var u=CZ(c,o.props.hsl,o.props.direction,o.props.a,o.container);u&&typeof o.props.onChange=="function"&&o.props.onChange(u,c)},o.handleMouseDown=function(c){o.handleChange(c),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},r),F0(o,a)}return RZ(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,o=this.props.rgb,a=pe({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
258
|
+
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
259
|
+
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:EZ({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return M("div",{style:a.alpha,children:[p("div",{style:a.checkboard,children:p(Pa,{renderers:this.props.renderers})}),p("div",{style:a.gradient}),p("div",{style:a.container,ref:function(s){return r.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:p("div",{style:a.pointer,children:this.props.pointer?b.createElement(this.props.pointer,this.props):p("div",{style:a.slider})})})]})}}]),t}(b.PureComponent||b.Component),PZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function kZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AZ(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function MZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var jZ=1,aS=38,DZ=40,IZ=[aS,DZ],LZ=function(t){return IZ.indexOf(t)>-1},BZ=function(t){return Number(String(t).replace(/%/g,""))},FZ=1,xe=function(e){MZ(t,e);function t(n){NZ(this,t);var r=AZ(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var a=BZ(o.target.value);if(!isNaN(a)&&LZ(o.keyCode)){var i=r.getArrowOffset(),s=o.keyCode===aS?a+i:a-i;r.setUpdatedValue(s,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var a=Math.round(r.props.value+o.movementX);a>=0&&a<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(a),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+FZ++,r}return PZ(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return kZ({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||jZ}},{key:"setUpdatedValue",value:function(r,o){var a=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(a,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=pe({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return M("div",{style:o.wrap,children:[p("input",{id:this.inputId,style:o.input,ref:function(i){return r.input=i},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?p("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown,children:this.props.label}):null]})}}]),t}(b.PureComponent||b.Component),zZ=function(t,n,r,o){var a=o.clientWidth,i=o.clientHeight,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,c=s-(o.getBoundingClientRect().left+window.pageXOffset),u=l-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(u<0)f=359;else if(u>i)f=0;else{var d=-(u*100/i)+100;f=360*d/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var h=void 0;if(c<0)h=0;else if(c>a)h=359;else{var v=c*100/a;h=360*v/100}if(r.h!==h)return{h,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},HZ=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function VZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function UZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ka=function(e){UZ(t,e);function t(){var n,r,o,a;VZ(this,t);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return a=(r=(o=z0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(s))),o),o.handleChange=function(c){var u=zZ(c,o.props.direction,o.props.hsl,o.container);u&&typeof o.props.onChange=="function"&&o.props.onChange(u,c)},o.handleMouseDown=function(c){o.handleChange(c),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},r),z0(o,a)}return HZ(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.direction,a=o===void 0?"horizontal":o,i=pe({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:a==="vertical"});return p("div",{style:i.hue,children:M("div",{className:"hue-"+a,style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[p("style",{children:".hue-horizontal { background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); background: -webkit-linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); } .hue-vertical { background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }"}),p("div",{style:i.pointer,children:this.props.pointer?b.createElement(this.props.pointer,this.props):p("div",{style:i.slider})})]})})}}]),t}(b.PureComponent||b.Component),Sf={exports:{}},Cf={exports:{}},_e={};/** @license React v16.13.1
|
|
260
|
+
* react-is.production.min.js
|
|
261
|
+
*
|
|
262
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the MIT license found in the
|
|
265
|
+
* LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/var H0;function WZ(){if(H0)return _e;H0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function _(x){if(typeof x=="object"&&x!==null){var C=x.$$typeof;switch(C){case t:switch(x=x.type,x){case l:case c:case r:case a:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case u:case v:case h:case i:return x;default:return C}}case n:return C}}}function S(x){return _(x)===c}return _e.AsyncMode=l,_e.ConcurrentMode=c,_e.ContextConsumer=s,_e.ContextProvider=i,_e.Element=t,_e.ForwardRef=u,_e.Fragment=r,_e.Lazy=v,_e.Memo=h,_e.Portal=n,_e.Profiler=a,_e.StrictMode=o,_e.Suspense=f,_e.isAsyncMode=function(x){return S(x)||_(x)===l},_e.isConcurrentMode=S,_e.isContextConsumer=function(x){return _(x)===s},_e.isContextProvider=function(x){return _(x)===i},_e.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},_e.isForwardRef=function(x){return _(x)===u},_e.isFragment=function(x){return _(x)===r},_e.isLazy=function(x){return _(x)===v},_e.isMemo=function(x){return _(x)===h},_e.isPortal=function(x){return _(x)===n},_e.isProfiler=function(x){return _(x)===a},_e.isStrictMode=function(x){return _(x)===o},_e.isSuspense=function(x){return _(x)===f},_e.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===a||x===o||x===f||x===d||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===h||x.$$typeof===i||x.$$typeof===s||x.$$typeof===u||x.$$typeof===m||x.$$typeof===y||x.$$typeof===w||x.$$typeof===g)},_e.typeOf=_,_e}var Oe={};/** @license React v16.13.1
|
|
267
|
+
* react-is.development.js
|
|
268
|
+
*
|
|
269
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the MIT license found in the
|
|
272
|
+
* LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/var V0;function GZ(){return V0||(V0=1,"{}".NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function _(U){return typeof U=="string"||typeof U=="function"||U===r||U===c||U===a||U===o||U===f||U===d||typeof U=="object"&&U!==null&&(U.$$typeof===v||U.$$typeof===h||U.$$typeof===i||U.$$typeof===s||U.$$typeof===u||U.$$typeof===m||U.$$typeof===y||U.$$typeof===w||U.$$typeof===g)}function S(U){if(typeof U=="object"&&U!==null){var Te=U.$$typeof;switch(Te){case t:var Ze=U.type;switch(Ze){case l:case c:case r:case a:case o:case f:return Ze;default:var qe=Ze&&Ze.$$typeof;switch(qe){case s:case u:case v:case h:case i:return qe;default:return Te}}case n:return Te}}}var x=l,C=c,O=s,$=i,k=t,P=u,j=r,L=v,F=h,W=n,B=a,G=o,ne=f,fe=!1;function D(U){return fe||(fe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(U)||S(U)===l}function R(U){return S(U)===c}function T(U){return S(U)===s}function N(U){return S(U)===i}function I(U){return typeof U=="object"&&U!==null&&U.$$typeof===t}function H(U){return S(U)===u}function Y(U){return S(U)===r}function J(U){return S(U)===v}function re(U){return S(U)===h}function oe(U){return S(U)===n}function ue(U){return S(U)===a}function q(U){return S(U)===o}function me(U){return S(U)===f}Oe.AsyncMode=x,Oe.ConcurrentMode=C,Oe.ContextConsumer=O,Oe.ContextProvider=$,Oe.Element=k,Oe.ForwardRef=P,Oe.Fragment=j,Oe.Lazy=L,Oe.Memo=F,Oe.Portal=W,Oe.Profiler=B,Oe.StrictMode=G,Oe.Suspense=ne,Oe.isAsyncMode=D,Oe.isConcurrentMode=R,Oe.isContextConsumer=T,Oe.isContextProvider=N,Oe.isElement=I,Oe.isForwardRef=H,Oe.isFragment=Y,Oe.isLazy=J,Oe.isMemo=re,Oe.isPortal=oe,Oe.isProfiler=ue,Oe.isStrictMode=q,Oe.isSuspense=me,Oe.isValidElementType=_,Oe.typeOf=S}()),Oe}"{}".NODE_ENV==="production"?Cf.exports=WZ():Cf.exports=GZ();var Rh=Cf.exports;/*
|
|
274
|
+
object-assign
|
|
275
|
+
(c) Sindre Sorhus
|
|
276
|
+
@license MIT
|
|
277
|
+
*/var Jc,U0;function KZ(){if(U0)return Jc;U0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},s=0;s<10;s++)i["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jc=o()?Object.assign:function(a,i){for(var s,l=r(a),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var d=0;d<c.length;d++)n.call(s,c[d])&&(l[c[d]]=s[c[d]])}}return l},Jc}var Qc,W0;function $h(){if(W0)return Qc;W0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qc=e,Qc}var Zc,G0;function iS(){return G0||(G0=1,Zc=Function.call.bind(Object.prototype.hasOwnProperty)),Zc}var eu,K0;function qZ(){if(K0)return eu;K0=1;var e=function(){};if("{}".NODE_ENV!=="production"){var t=$h(),n={},r=iS();e=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(a,i,s,l,c){if("{}".NODE_ENV!=="production"){for(var u in a)if(r(a,u)){var f;try{if(typeof a[u]!="function"){var d=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=a[u](i,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){"{}".NODE_ENV!=="production"&&(n={})},eu=o,eu}var tu,q0;function XZ(){if(q0)return tu;q0=1;var e=Rh,t=KZ(),n=$h(),r=iS(),o=qZ(),a=function(){};"{}".NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return tu=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(R){var T=R&&(c&&R[c]||R[u]);if(typeof T=="function")return T}var d="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:w(),arrayOf:_,element:S(),elementType:x(),instanceOf:C,node:P(),objectOf:$,oneOf:O,oneOfType:k,shape:L,exact:F};function v(R,T){return R===T?R!==0||1/R===1/T:R!==R&&T!==T}function g(R,T){this.message=R,this.data=T&&typeof T=="object"?T:{},this.stack=""}g.prototype=Error.prototype;function m(R){if("{}".NODE_ENV!=="production")var T={},N=0;function I(Y,J,re,oe,ue,q,me){if(oe=oe||d,q=q||re,me!==n){if(l){var U=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw U.name="Invariant Violation",U}else if("{}".NODE_ENV!=="production"&&typeof console<"u"){var Te=oe+":"+re;!T[Te]&&N<3&&(a("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),T[Te]=!0,N++)}}return J[re]==null?Y?J[re]===null?new g("The "+ue+" `"+q+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new g("The "+ue+" `"+q+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:R(J,re,oe,ue,q)}var H=I.bind(null,!1);return H.isRequired=I.bind(null,!0),H}function y(R){function T(N,I,H,Y,J,re){var oe=N[I],ue=G(oe);if(ue!==R){var q=ne(oe);return new g("Invalid "+Y+" `"+J+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("`"+R+"`."),{expectedType:R})}return null}return m(T)}function w(){return m(i)}function _(R){function T(N,I,H,Y,J){if(typeof R!="function")return new g("Property `"+J+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var re=N[I];if(!Array.isArray(re)){var oe=G(re);return new g("Invalid "+Y+" `"+J+"` of type "+("`"+oe+"` supplied to `"+H+"`, expected an array."))}for(var ue=0;ue<re.length;ue++){var q=R(re,ue,H,Y,J+"["+ue+"]",n);if(q instanceof Error)return q}return null}return m(T)}function S(){function R(T,N,I,H,Y){var J=T[N];if(!s(J)){var re=G(J);return new g("Invalid "+H+" `"+Y+"` of type "+("`"+re+"` supplied to `"+I+"`, expected a single ReactElement."))}return null}return m(R)}function x(){function R(T,N,I,H,Y){var J=T[N];if(!e.isValidElementType(J)){var re=G(J);return new g("Invalid "+H+" `"+Y+"` of type "+("`"+re+"` supplied to `"+I+"`, expected a single ReactElement type."))}return null}return m(R)}function C(R){function T(N,I,H,Y,J){if(!(N[I]instanceof R)){var re=R.name||d,oe=D(N[I]);return new g("Invalid "+Y+" `"+J+"` of type "+("`"+oe+"` supplied to `"+H+"`, expected ")+("instance of `"+re+"`."))}return null}return m(T)}function O(R){if(!Array.isArray(R))return"{}".NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function T(N,I,H,Y,J){for(var re=N[I],oe=0;oe<R.length;oe++)if(v(re,R[oe]))return null;var ue=JSON.stringify(R,function(me,U){var Te=ne(U);return Te==="symbol"?String(U):U});return new g("Invalid "+Y+" `"+J+"` of value `"+String(re)+"` "+("supplied to `"+H+"`, expected one of "+ue+"."))}return m(T)}function $(R){function T(N,I,H,Y,J){if(typeof R!="function")return new g("Property `"+J+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var re=N[I],oe=G(re);if(oe!=="object")return new g("Invalid "+Y+" `"+J+"` of type "+("`"+oe+"` supplied to `"+H+"`, expected an object."));for(var ue in re)if(r(re,ue)){var q=R(re,ue,H,Y,J+"."+ue,n);if(q instanceof Error)return q}return null}return m(T)}function k(R){if(!Array.isArray(R))return"{}".NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var T=0;T<R.length;T++){var N=R[T];if(typeof N!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+fe(N)+" at index "+T+"."),i}function I(H,Y,J,re,oe){for(var ue=[],q=0;q<R.length;q++){var me=R[q],U=me(H,Y,J,re,oe,n);if(U==null)return null;U.data&&r(U.data,"expectedType")&&ue.push(U.data.expectedType)}var Te=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new g("Invalid "+re+" `"+oe+"` supplied to "+("`"+J+"`"+Te+"."))}return m(I)}function P(){function R(T,N,I,H,Y){return W(T[N])?null:new g("Invalid "+H+" `"+Y+"` supplied to "+("`"+I+"`, expected a ReactNode."))}return m(R)}function j(R,T,N,I,H){return new g((R||"React class")+": "+T+" type `"+N+"."+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function L(R){function T(N,I,H,Y,J){var re=N[I],oe=G(re);if(oe!=="object")return new g("Invalid "+Y+" `"+J+"` of type `"+oe+"` "+("supplied to `"+H+"`, expected `object`."));for(var ue in R){var q=R[ue];if(typeof q!="function")return j(H,Y,J,ue,ne(q));var me=q(re,ue,H,Y,J+"."+ue,n);if(me)return me}return null}return m(T)}function F(R){function T(N,I,H,Y,J){var re=N[I],oe=G(re);if(oe!=="object")return new g("Invalid "+Y+" `"+J+"` of type `"+oe+"` "+("supplied to `"+H+"`, expected `object`."));var ue=t({},N[I],R);for(var q in ue){var me=R[q];if(r(R,q)&&typeof me!="function")return j(H,Y,J,q,ne(me));if(!me)return new g("Invalid "+Y+" `"+J+"` key `"+q+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(N[I],null," ")+`
|
|
278
|
+
Valid keys: `+JSON.stringify(Object.keys(R),null," "));var U=me(re,q,H,Y,J+"."+q,n);if(U)return U}return null}return m(T)}function W(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(W);if(R===null||s(R))return!0;var T=f(R);if(T){var N=T.call(R),I;if(T!==R.entries){for(;!(I=N.next()).done;)if(!W(I.value))return!1}else for(;!(I=N.next()).done;){var H=I.value;if(H&&!W(H[1]))return!1}}else return!1;return!0;default:return!1}}function B(R,T){return R==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function G(R){var T=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":B(T,R)?"symbol":T}function ne(R){if(typeof R>"u"||R===null)return""+R;var T=G(R);if(T==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return T}function fe(R){var T=ne(R);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function D(R){return!R.constructor||!R.constructor.name?d:R.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},tu}var nu,X0;function YZ(){if(X0)return nu;X0=1;var e=$h();function t(){}function n(){}return n.resetWarningCache=t,nu=function(){function r(i,s,l,c,u,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},nu}if("{}".NODE_ENV!=="production"){var JZ=Rh,QZ=!0;Sf.exports=XZ()(JZ.isElement,QZ)}else Sf.exports=YZ()();var ZZ=Sf.exports;const K=Sl(ZZ);var Yi=function(t){var n=t.zDepth,r=t.radius,o=t.background,a=t.children,i=t.styles,s=i===void 0?{}:i,l=pe(Lt({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":n===1});return M("div",{style:l.wrap,children:[p("div",{style:l.bg}),p("div",{style:l.content,children:a})]})};Yi.propTypes={background:K.string,zDepth:K.oneOf([0,1,2,3,4,5]),radius:K.number,styles:K.object};Yi.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var eee=function(t,n,r){var o=r.getBoundingClientRect(),a=o.width,i=o.height,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,c=s-(r.getBoundingClientRect().left+window.pageXOffset),u=l-(r.getBoundingClientRect().top+window.pageYOffset);c<0?c=0:c>a&&(c=a),u<0?u=0:u>i&&(u=i);var f=c/a,d=1-u/i;return{h:n.h,s:f,v:d,a:n.a,source:"hsv"}},tee=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function nee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ree(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function oee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ac=function(e){oee(t,e);function t(n){nee(this,t);var r=ree(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(o){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,eee(o,r.props.hsl,r.container),o)},r.handleMouseDown=function(o){r.handleChange(o);var a=r.getContainerRenderWindow();a.addEventListener("mousemove",r.handleChange),a.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=iP(function(o,a,i){o(a,i)},50),r}return tee(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,o=window;!o.document.contains(r)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.style||{},a=o.color,i=o.white,s=o.black,l=o.pointer,c=o.circle,u=pe({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
279
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:a,white:i,black:s,pointer:l,circle:c}},{custom:!!this.props.style});return M("div",{style:u.color,ref:function(d){return r.container=d},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[p("style",{children:".saturation-white { background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0)); background: linear-gradient(to right, #fff, rgba(255,255,255,0)); } .saturation-black { background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0)); background: linear-gradient(to top, #000, rgba(0,0,0,0)); }"}),M("div",{style:u.white,className:"saturation-white",children:[p("div",{style:u.black,className:"saturation-black"}),p("div",{style:u.pointer,children:this.props.pointer?b.createElement(this.props.pointer,this.props):p("div",{style:u.circle})})]})]})}}]),t}(b.PureComponent||b.Component);function xl(e){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}var aee=/^\s+/,iee=/\s+$/;function le(e,t){if(e=e||"",t=t||{},e instanceof le)return e;if(!(this instanceof le))return new le(e,t);var n=see(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}le.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,a,i,s;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*i+.0722*s},setAlpha:function(t){return this._a=sS(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=J0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=J0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=Y0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Y0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return Q0(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return fee(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Je(this._r,255)*100)+"%",g:Math.round(Je(this._g,255)*100)+"%",b:Math.round(Je(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Je(this._r,255)*100)+"%, "+Math.round(Je(this._g,255)*100)+"%, "+Math.round(Je(this._b,255)*100)+"%)":"rgba("+Math.round(Je(this._r,255)*100)+"%, "+Math.round(Je(this._g,255)*100)+"%, "+Math.round(Je(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Cee[Q0(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+Z0(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var a=le(t);r="#"+Z0(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,a=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return le(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(gee,arguments)},brighten:function(){return this._applyModification(vee,arguments)},darken:function(){return this._applyModification(mee,arguments)},desaturate:function(){return this._applyModification(dee,arguments)},saturate:function(){return this._applyModification(hee,arguments)},greyscale:function(){return this._applyModification(pee,arguments)},spin:function(){return this._applyModification(bee,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(wee,arguments)},complement:function(){return this._applyCombination(yee,arguments)},monochromatic:function(){return this._applyCombination(See,arguments)},splitcomplement:function(){return this._applyCombination(xee,arguments)},triad:function(){return this._applyCombination(em,[3])},tetrad:function(){return this._applyCombination(em,[4])}};le.fromRatio=function(e,t){if(xl(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Ka(e[r]));e=n}return le(e,t)};function see(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Ree(e)),xl(e)=="object"&&(Zn(e.r)&&Zn(e.g)&&Zn(e.b)?(t=lee(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zn(e.h)&&Zn(e.s)&&Zn(e.v)?(r=Ka(e.s),o=Ka(e.v),t=uee(e.h,r,o),i=!0,s="hsv"):Zn(e.h)&&Zn(e.s)&&Zn(e.l)&&(r=Ka(e.s),a=Ka(e.l),t=cee(e.h,r,a),i=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=sS(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function lee(e,t,n){return{r:Je(e,255)*255,g:Je(t,255)*255,b:Je(n,255)*255}}function Y0(e,t,n){e=Je(e,255),t=Je(t,255),n=Je(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a,i,s=(r+o)/2;if(r==o)a=i=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function cee(e,t,n){var r,o,a;e=Je(e,360),t=Je(t,100),n=Je(n,100);function i(c,u,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?c+(u-c)*6*f:f<1/2?u:f<2/3?c+(u-c)*(2/3-f)*6:c}if(t===0)r=o=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=i(l,s,e+1/3),o=i(l,s,e),a=i(l,s,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function J0(e,t,n){e=Je(e,255),t=Je(t,255),n=Je(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a,i,s=r,l=r-o;if(i=r===0?0:l/r,r==o)a=0;else{switch(r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,v:s}}function uee(e,t,n){e=Je(e,360)*6,t=Je(t,100),n=Je(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],f=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:f*255}}function Q0(e,t,n,r){var o=[mn(Math.round(e).toString(16)),mn(Math.round(t).toString(16)),mn(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function fee(e,t,n,r,o){var a=[mn(Math.round(e).toString(16)),mn(Math.round(t).toString(16)),mn(Math.round(n).toString(16)),mn(lS(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Z0(e,t,n,r){var o=[mn(lS(r)),mn(Math.round(e).toString(16)),mn(Math.round(t).toString(16)),mn(Math.round(n).toString(16))];return o.join("")}le.equals=function(e,t){return!e||!t?!1:le(e).toRgbString()==le(t).toRgbString()};le.random=function(){return le.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function dee(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.s-=t/100,n.s=ic(n.s),le(n)}function hee(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.s+=t/100,n.s=ic(n.s),le(n)}function pee(e){return le(e).desaturate(100)}function gee(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.l+=t/100,n.l=ic(n.l),le(n)}function vee(e,t){t=t===0?0:t||10;var n=le(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),le(n)}function mee(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.l-=t/100,n.l=ic(n.l),le(n)}function bee(e,t){var n=le(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,le(n)}function yee(e){var t=le(e).toHsl();return t.h=(t.h+180)%360,le(t)}function em(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=le(e).toHsl(),r=[le(e)],o=360/t,a=1;a<t;a++)r.push(le({h:(n.h+a*o)%360,s:n.s,l:n.l}));return r}function xee(e){var t=le(e).toHsl(),n=t.h;return[le(e),le({h:(n+72)%360,s:t.s,l:t.l}),le({h:(n+216)%360,s:t.s,l:t.l})]}function wee(e,t,n){t=t||6,n=n||30;var r=le(e).toHsl(),o=360/n,a=[le(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(le(r));return a}function See(e,t){t=t||6;for(var n=le(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(le({h:r,s:o,v:a})),a=(a+s)%1;return i}le.mix=function(e,t,n){n=n===0?0:n||50;var r=le(e).toRgb(),o=le(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return le(i)};le.readability=function(e,t){var n=le(e),r=le(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};le.isReadable=function(e,t,n){var r=le.readability(e,t),o,a;switch(a=!1,o=$ee(n),o.level+o.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};le.mostReadable=function(e,t,n){var r=null,o=0,a,i,s,l;n=n||{},i=n.includeFallbackColors,s=n.level,l=n.size;for(var c=0;c<t.length;c++)a=le.readability(e,t[c]),a>o&&(o=a,r=le(t[c]));return le.isReadable(e,r,{level:s,size:l})||!i?r:(n.includeFallbackColors=!1,le.mostReadable(e,["#fff","#000"],n))};var _f=le.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Cee=le.hexNames=_ee(_f);function _ee(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function sS(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Je(e,t){Oee(e)&&(e="100%");var n=Eee(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function ic(e){return Math.min(1,Math.max(0,e))}function Vt(e){return parseInt(e,16)}function Oee(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Eee(e){return typeof e=="string"&&e.indexOf("%")!=-1}function mn(e){return e.length==1?"0"+e:""+e}function Ka(e){return e<=1&&(e=e*100+"%"),e}function lS(e){return Math.round(parseFloat(e)*255).toString(16)}function tm(e){return Vt(e)/255}var hn=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Zn(e){return!!hn.CSS_UNIT.exec(e)}function Ree(e){e=e.replace(aee,"").replace(iee,"").toLowerCase();var t=!1;if(_f[e])e=_f[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=hn.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=hn.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=hn.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=hn.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=hn.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=hn.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=hn.hex8.exec(e))?{r:Vt(n[1]),g:Vt(n[2]),b:Vt(n[3]),a:tm(n[4]),format:t?"name":"hex8"}:(n=hn.hex6.exec(e))?{r:Vt(n[1]),g:Vt(n[2]),b:Vt(n[3]),format:t?"name":"hex"}:(n=hn.hex4.exec(e))?{r:Vt(n[1]+""+n[1]),g:Vt(n[2]+""+n[2]),b:Vt(n[3]+""+n[3]),a:tm(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=hn.hex3.exec(e))?{r:Vt(n[1]+""+n[1]),g:Vt(n[2]+""+n[2]),b:Vt(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function $ee(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var nm=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return nP(n,function(a){if(t[a]&&(r+=1,isNaN(t[a])||(o+=1),a==="s"||a==="l")){var i=/^\d+%$/;i.test(t[a])&&(o+=1)}}),r===o?t:!1},qa=function(t,n){var r=t.hex?le(t.hex):le(t),o=r.toHsl(),a=r.toHsv(),i=r.toRgb(),s=r.toHex();o.s===0&&(o.h=n||0,a.h=n||0);var l=s==="000000"&&i.a===0;return{hsl:o,hex:l?"transparent":"#"+s,rgb:i,hsv:a,oldHue:t.h||n||o.h,source:t.source}},Rr=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&le(t).isValid()},Th=function(t){if(!t)return"#fff";var n=qa(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},ru=function(t,n){var r=t.replace("°","");return le(n+" ("+r+")")._ok},xs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tee=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Pee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kee(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Nee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Ft=function(t){var n=function(r){Nee(o,r);function o(a){Pee(this,o);var i=kee(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return i.handleChange=function(s,l){var c=nm(s);if(c){var u=qa(s,s.h||i.state.oldHue);i.setState(u),i.props.onChangeComplete&&i.debounce(i.props.onChangeComplete,u,l),i.props.onChange&&i.props.onChange(u,l)}},i.handleSwatchHover=function(s,l){var c=nm(s);if(c){var u=qa(s,s.h||i.state.oldHue);i.props.onSwatchHover&&i.props.onSwatchHover(u,l)}},i.state=xs({},qa(a.color,0)),i.debounce=Ly(function(s,l,c){s(l,c)},100),i}return Tee(o,[{key:"render",value:function(){var i={};return this.props.onSwatchHover&&(i.onSwatchHover=this.handleSwatchHover),p(t,{...this.props,...this.state,onChange:this.handleChange,...i})}}],[{key:"getDerivedStateFromProps",value:function(i,s){return xs({},qa(i.color,s.oldHue))}}]),o}(b.PureComponent||b.Component);return n.propTypes=xs({},t.propTypes),n.defaultProps=xs({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},Aee=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Mee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function jee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Dee=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){jee(o,r);function o(){var a,i,s,l;Mee(this,o);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return l=(i=(s=rm(this,(a=o.__proto__||Object.getPrototypeOf(o)).call.apply(a,[this].concat(u))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},i),rm(s,l)}return Aee(o,[{key:"render",value:function(){return p(n,{onFocus:this.handleFocus,onBlur:this.handleBlur,children:p(t,{...this.props,...this.state})})}}]),o}(b.Component)},Iee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lee=13,Bee=function(t){var n=t.color,r=t.style,o=t.onClick,a=o===void 0?function(){}:o,i=t.onHover,s=t.title,l=s===void 0?n:s,c=t.children,u=t.focus,f=t.focusStyle,d=f===void 0?{}:f,h=n==="transparent",v=pe({default:{swatch:Iee({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,u?d:{})}}),g=function(S){return a(n,S)},m=function(S){return S.keyCode===Lee&&a(n,S)},y=function(S){return i(n,S)},w={};return i&&(w.onMouseOver=y),M("div",{style:v.swatch,onClick:g,title:l,tabIndex:0,onKeyDown:m,...w,children:[c,h&&p(Pa,{borderRadius:v.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"})]})};const io=Dee(Bee);var Fee=function(t){var n=t.direction,r=pe({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return p("div",{style:r.picker})},cS=function(t){var n=t.rgb,r=t.hsl,o=t.width,a=t.height,i=t.onChange,s=t.direction,l=t.style,c=t.renderers,u=t.pointer,f=t.className,d=f===void 0?"":f,h=pe({default:{picker:{position:"relative",width:o,height:a},alpha:{radius:"2px",style:l}}});return p("div",{style:h.picker,className:"alpha-picker "+d,children:p(Eh,{...h.alpha,rgb:n,hsl:r,pointer:u,renderers:c,onChange:i,direction:s})})};cS.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Fee};Ft(cS);var zee=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,a=pe({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return M("div",{style:a.swatches,children:[Zr(n,function(i){return p(io,{color:i,style:a.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+i}},i)}),p("div",{style:a.clear})]})},Ph=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,a=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,f=u===void 0?"":u,d=o==="transparent",h=function(m,y){Rr(m)&&n({hex:m,source:"hex"},y)},v=pe(Lt({default:{card:{width:i,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Th(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},c),{"hide-triangle":s==="hide"});return M("div",{style:v.card,className:"block-picker "+f,children:[p("div",{style:v.triangle}),M("div",{style:v.head,children:[d&&p(Pa,{borderRadius:"6px 6px 0 0"}),p("div",{style:v.label,children:o})]}),M("div",{style:v.body,children:[p(zee,{colors:a,onClick:h,onSwatchHover:r}),p(xe,{style:{input:v.input},value:o,onChange:h})]})]})};Ph.propTypes={width:K.oneOfType([K.string,K.number]),colors:K.arrayOf(K.string),triangle:K.oneOf(["top","hide"]),styles:K.object};Ph.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Ft(Ph);var wo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},So={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Co={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},_o={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Oo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Eo={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Ro={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},$o={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},To={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Xa={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},Po={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},ko={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},No={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Ao={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Mo={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},jo={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Do={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Io={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},uS=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,a=t.hover,i=t.active,s=t.circleSize,l=t.circleSpacing,c=pe({default:{swatch:{width:s,height:s,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:a,active:i});return p("div",{style:c.swatch,children:p(io,{style:c.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:c.Swatch.boxShadow+", 0 0 5px "+n}})})};uS.defaultProps={circleSize:28,circleSpacing:14};const Hee=Oh(uS);var kh=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,a=t.colors,i=t.hex,s=t.circleSize,l=t.styles,c=l===void 0?{}:l,u=t.circleSpacing,f=t.className,d=f===void 0?"":f,h=pe(Lt({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-u,marginBottom:-u}}},c)),v=function(m,y){return r({hex:m,source:"hex"},y)};return p("div",{style:h.card,className:"circle-picker "+d,children:Zr(a,function(g){return p(Hee,{color:g,onClick:v,onSwatchHover:o,active:i===g.toLowerCase(),circleSize:s,circleSpacing:u},g)})})};kh.propTypes={width:K.oneOfType([K.string,K.number]),circleSize:K.number,circleSpacing:K.number,styles:K.object};kh.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[wo[500],So[500],Co[500],_o[500],Oo[500],Eo[500],Ro[500],$o[500],To[500],Xa[500],Po[500],ko[500],No[500],Ao[500],Mo[500],jo[500],Do[500],Io[500]],styles:{}};Ft(kh);var fS={};Object.defineProperty(fS,"__esModule",{value:!0});var om=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vee=b,am=Uee(Vee);function Uee(e){return e&&e.__esModule?e:{default:e}}function Wee(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var ws=24,Gee=fS.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?ws:r,a=e.height,i=a===void 0?ws:a,s=e.style,l=s===void 0?{}:s,c=Wee(e,["fill","width","height","style"]);return am.default.createElement("svg",om({viewBox:"0 0 "+ws+" "+ws,style:om({fill:n,width:o,height:i},l)},c),am.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},Kee=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function qee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xee(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Yee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var dS=function(e){Yee(t,e);function t(n){qee(this,t);var r=Xee(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(o,a){o.hex?Rr(o.hex)&&r.props.onChange({hex:o.hex,source:"hex"},a):o.r||o.g||o.b?r.props.onChange({r:o.r||r.props.rgb.r,g:o.g||r.props.rgb.g,b:o.b||r.props.rgb.b,source:"rgb"},a):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},a)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(eg(o.s)?r.props.hsl.s:o.s),l:Number(eg(o.l)?r.props.hsl.l:o.l),source:"hsl"},a))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return Kee(t,[{key:"render",value:function(){var r=this,o=pe({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),a=void 0;return this.state.view==="hex"?a=p("div",{style:o.fields,className:"flexbox-fix",children:p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange})})}):this.state.view==="rgb"?a=M("div",{style:o.fields,className:"flexbox-fix",children:[p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})}),p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})}),p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})}),p("div",{style:o.alpha,children:p(xe,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange})})]}):this.state.view==="hsl"&&(a=M("div",{style:o.fields,className:"flexbox-fix",children:[p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})}),p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})}),p("div",{style:o.field,children:p(xe,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})}),p("div",{style:o.alpha,children:p(xe,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})})]})),M("div",{style:o.wrap,className:"flexbox-fix",children:[a,p("div",{style:o.toggle,children:p("div",{style:o.icon,onClick:this.toggleViews,ref:function(s){return r.icon=s},children:p(Gee,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight})})})]})}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(b.Component);dS.defaultProps={view:"hex"};var im=function(){var t=pe({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return p("div",{style:t.picker})},Jee=function(){var t=pe({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return p("div",{style:t.picker})},Nh=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,a=t.rgb,i=t.hsl,s=t.hsv,l=t.hex,c=t.renderers,u=t.styles,f=u===void 0?{}:u,d=t.className,h=d===void 0?"":d,v=t.defaultView,g=pe(Lt({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:o});return M("div",{style:g.picker,className:"chrome-picker "+h,children:[p("div",{style:g.saturation,children:p(ac,{style:g.Saturation,hsl:i,hsv:s,pointer:Jee,onChange:r})}),M("div",{style:g.body,children:[M("div",{style:g.controls,className:"flexbox-fix",children:[p("div",{style:g.color,children:M("div",{style:g.swatch,children:[p("div",{style:g.active}),p(Pa,{renderers:c})]})}),M("div",{style:g.toggles,children:[p("div",{style:g.hue,children:p(ka,{style:g.Hue,hsl:i,pointer:im,onChange:r})}),p("div",{style:g.alpha,children:p(Eh,{style:g.Alpha,rgb:a,hsl:i,pointer:im,renderers:c,onChange:r})})]})]}),p(dS,{rgb:a,hsl:i,hex:l,view:v,onChange:r,disableAlpha:o})]})]})};Nh.propTypes={width:K.oneOfType([K.string,K.number]),disableAlpha:K.bool,styles:K.object,defaultView:K.oneOf(["hex","rgb","hsl"])};Nh.defaultProps={width:225,disableAlpha:!1,styles:{}};Ft(Nh);var Qee=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,a=t.onSwatchHover,i=t.active,s=pe({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Th(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:i,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return p(io,{style:s.color,color:n,onClick:o,onHover:a,focusStyle:{boxShadow:"0 0 4px "+n},children:p("div",{style:s.dot})})},Zee=function(t){var n=t.hex,r=t.rgb,o=t.onChange,a=pe({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),i=function(l,c){l.r||l.g||l.b?o({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},c):o({hex:l.hex,source:"hex"},c)};return M("div",{style:a.fields,className:"flexbox-fix",children:[p("div",{style:a.active}),p(xe,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:n,onChange:i}),p(xe,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:i}),p(xe,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:i}),p(xe,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:i})]})},Ah=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,a=t.hex,i=t.rgb,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,f=pe(Lt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(v,g){v.hex?Rr(v.hex)&&n({hex:v.hex,source:"hex"},g):n(v,g)};return p(Yi,{style:f.Compact,styles:l,children:M("div",{style:f.compact,className:"compact-picker "+u,children:[M("div",{children:[Zr(o,function(h){return p(Qee,{color:h,active:h.toLowerCase()===a,onClick:d,onSwatchHover:r},h)}),p("div",{style:f.clear})]}),p(Zee,{hex:a,rgb:i,onChange:d})]})})};Ah.propTypes={colors:K.arrayOf(K.string),styles:K.object};Ah.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Ft(Ah);var ete=function(t){var n=t.hover,r=t.color,o=t.onClick,a=t.onSwatchHover,i={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=pe({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:i}},{hover:n});return p("div",{style:s.swatch,children:p(io,{color:r,onClick:o,onHover:a,focusStyle:i})})};const tte=Oh(ete);var Mh=function(t){var n=t.width,r=t.colors,o=t.onChange,a=t.onSwatchHover,i=t.triangle,s=t.styles,l=s===void 0?{}:s,c=t.className,u=c===void 0?"":c,f=pe(Lt({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":i==="hide","top-left-triangle":i==="top-left","top-right-triangle":i==="top-right","bottom-left-triangle":i==="bottom-left","bottom-right-triangle":i==="bottom-right"}),d=function(v,g){return o({hex:v,source:"hex"},g)};return M("div",{style:f.card,className:"github-picker "+u,children:[p("div",{style:f.triangleShadow}),p("div",{style:f.triangle}),Zr(r,function(h){return p(tte,{color:h,onClick:d,onSwatchHover:a},h)})]})};Mh.propTypes={width:K.oneOfType([K.string,K.number]),colors:K.arrayOf(K.string),triangle:K.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:K.object};Mh.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Ft(Mh);var nte=function(t){var n=t.direction,r=pe({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return p("div",{style:r.picker})},jh=function(t){var n=t.width,r=t.height,o=t.onChange,a=t.hsl,i=t.direction,s=t.pointer,l=t.styles,c=l===void 0?{}:l,u=t.className,f=u===void 0?"":u,d=pe(Lt({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},c)),h=function(g){return o({a:1,h:g.h,l:.5,s:1})};return p("div",{style:d.picker,className:"hue-picker "+f,children:p(ka,{...d.hue,hsl:a,pointer:s,onChange:h,direction:i})})};jh.propTypes={styles:K.object};jh.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:nte,styles:{}};Ft(jh);var rte=function(t){var n=t.onChange,r=t.hex,o=t.rgb,a=t.styles,i=a===void 0?{}:a,s=t.className,l=s===void 0?"":s,c=pe(Lt({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},i)),u=function(d,h){d.hex?Rr(d.hex)&&n({hex:d.hex,source:"hex"},h):(d.r||d.g||d.b)&&n({r:d.r||o.r,g:d.g||o.g,b:d.b||o.b,source:"rgb"},h)};return p(Yi,{styles:i,children:M("div",{style:c.material,className:"material-picker "+l,children:[p(xe,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:r,onChange:u}),M("div",{style:c.split,className:"flexbox-fix",children:[p("div",{style:c.third,children:p(xe,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:o.r,onChange:u})}),p("div",{style:c.third,children:p(xe,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:o.g,onChange:u})}),p("div",{style:c.third,children:p(xe,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:o.b,onChange:u})})]})]})})};Ft(rte);var ote=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,a=t.hex,i=pe({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(c,u){c["#"]?Rr(c["#"])&&n({hex:c["#"],source:"hex"},u):c.r||c.g||c.b?n({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,source:"rgb"},u):(c.h||c.s||c.v)&&n({h:c.h||o.h,s:c.s||o.s,v:c.v||o.v,source:"hsv"},u)};return M("div",{style:i.fields,children:[p(xe,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"h",value:Math.round(o.h),onChange:s}),p(xe,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:s}),p(xe,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:s}),p("div",{style:i.divider}),p(xe,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:s}),p(xe,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:s}),p(xe,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:s}),p("div",{style:i.divider}),p(xe,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"#",value:a.replace("#",""),onChange:s}),M("div",{style:i.fieldSymbols,children:[p("div",{style:i.symbol,children:"°"}),p("div",{style:i.symbol,children:"%"}),p("div",{style:i.symbol,children:"%"})]})]})},ate=function(t){var n=t.hsl,r=pe({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return p("div",{style:r.picker})},ite=function(){var t=pe({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return M("div",{style:t.pointer,children:[p("div",{style:t.left,children:p("div",{style:t.leftInside})}),p("div",{style:t.right,children:p("div",{style:t.rightInside})})]})},sm=function(t){var n=t.onClick,r=t.label,o=t.children,a=t.active,i=pe({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:a});return p("div",{style:i.button,onClick:n,children:r||o})},ste=function(t){var n=t.rgb,r=t.currentColor,o=pe({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return M("div",{children:[p("div",{style:o.label,children:"new"}),M("div",{style:o.swatches,children:[p("div",{style:o.new}),p("div",{style:o.current})]}),p("div",{style:o.label,children:"current"})]})},lte=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function cte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ute(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function fte(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Dh=function(e){fte(t,e);function t(n){cte(this,t);var r=ute(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return lte(t,[{key:"render",value:function(){var r=this.props,o=r.styles,a=o===void 0?{}:o,i=r.className,s=i===void 0?"":i,l=pe(Lt({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},a));return M("div",{style:l.picker,className:"photoshop-picker "+s,children:[p("div",{style:l.head,children:this.props.header}),M("div",{style:l.body,className:"flexbox-fix",children:[p("div",{style:l.saturation,children:p(ac,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:ate,onChange:this.props.onChange})}),p("div",{style:l.hue,children:p(ka,{direction:"vertical",hsl:this.props.hsl,pointer:ite,onChange:this.props.onChange})}),p("div",{style:l.controls,children:M("div",{style:l.top,className:"flexbox-fix",children:[p("div",{style:l.previews,children:p(ste,{rgb:this.props.rgb,currentColor:this.state.currentColor})}),M("div",{style:l.actions,children:[p(sm,{label:"OK",onClick:this.props.onAccept,active:!0}),p(sm,{label:"Cancel",onClick:this.props.onCancel}),p(ote,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex})]})]})})]})]})}}]),t}(b.Component);Dh.propTypes={header:K.string,styles:K.object};Dh.defaultProps={header:"Color Picker",styles:{}};Ft(Dh);var dte=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,a=t.hex,i=t.disableAlpha,s=pe({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:i}),l=function(u,f){u.hex?Rr(u.hex)&&n({hex:u.hex,source:"hex"},f):u.r||u.g||u.b?n({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,a:r.a,source:"rgb"},f):u.a&&(u.a<0?u.a=0:u.a>100&&(u.a=100),u.a/=100,n({h:o.h,s:o.s,l:o.l,a:u.a,source:"rgb"},f))};return M("div",{style:s.fields,className:"flexbox-fix",children:[p("div",{style:s.double,children:p(xe,{style:{input:s.input,label:s.label},label:"hex",value:a.replace("#",""),onChange:l})}),p("div",{style:s.single,children:p(xe,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})}),p("div",{style:s.single,children:p(xe,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})}),p("div",{style:s.single,children:p(xe,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})}),p("div",{style:s.alpha,children:p(xe,{style:{input:s.input,label:s.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})})]})},hS=function(t){var n=t.colors,r=t.onClick,o=r===void 0?function(){}:r,a=t.onSwatchHover,i=pe({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),s=function(c,u){o({hex:c,source:"hex"},u)};return p("div",{style:i.colors,className:"flexbox-fix",children:n.map(function(l){var c=typeof l=="string"?{color:l}:l,u=""+c.color+(c.title||"");return p("div",{style:i.swatchWrap,children:p(io,{...c,style:i.swatch,onClick:s,onHover:a,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+c.color}})},u)})})};hS.propTypes={colors:K.arrayOf(K.oneOfType([K.string,K.shape({color:K.string,title:K.string})])).isRequired};var hte=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ih=function(t){var n=t.width,r=t.rgb,o=t.hex,a=t.hsv,i=t.hsl,s=t.onChange,l=t.onSwatchHover,c=t.disableAlpha,u=t.presetColors,f=t.renderers,d=t.styles,h=d===void 0?{}:d,v=t.className,g=v===void 0?"":v,m=pe(Lt({default:hte({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},h),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},h),{disableAlpha:c});return M("div",{style:m.picker,className:"sketch-picker "+g,children:[p("div",{style:m.saturation,children:p(ac,{style:m.Saturation,hsl:i,hsv:a,onChange:s})}),M("div",{style:m.controls,className:"flexbox-fix",children:[M("div",{style:m.sliders,children:[p("div",{style:m.hue,children:p(ka,{style:m.Hue,hsl:i,onChange:s})}),p("div",{style:m.alpha,children:p(Eh,{style:m.Alpha,rgb:r,hsl:i,renderers:f,onChange:s})})]}),M("div",{style:m.color,children:[p(Pa,{}),p("div",{style:m.activeColor})]})]}),p(dte,{rgb:r,hsl:i,hex:o,onChange:s,disableAlpha:c}),p(hS,{colors:u,onClick:s,onSwatchHover:l})]})};Ih.propTypes={disableAlpha:K.bool,width:K.oneOfType([K.string,K.number]),styles:K.object};Ih.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const pte=Ft(Ih);var Va=function(t){var n=t.hsl,r=t.offset,o=t.onClick,a=o===void 0?function(){}:o,i=t.active,s=t.first,l=t.last,c=pe({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:i,first:s,last:l}),u=function(d){return a({h:n.h,s:.5,l:r,source:"hsl"},d)};return p("div",{style:c.swatch,onClick:u})},gte=function(t){var n=t.onClick,r=t.hsl,o=pe({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),a=.1;return M("div",{style:o.swatches,children:[p("div",{style:o.swatch,children:p(Va,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<a&&Math.abs(r.s-.5)<a,onClick:n,first:!0})}),p("div",{style:o.swatch,children:p(Va,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<a&&Math.abs(r.s-.5)<a,onClick:n})}),p("div",{style:o.swatch,children:p(Va,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<a&&Math.abs(r.s-.5)<a,onClick:n})}),p("div",{style:o.swatch,children:p(Va,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<a&&Math.abs(r.s-.5)<a,onClick:n})}),p("div",{style:o.swatch,children:p(Va,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<a&&Math.abs(r.s-.5)<a,onClick:n,last:!0})}),p("div",{style:o.clear})]})},vte=function(){var t=pe({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return p("div",{style:t.picker})},Lh=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,a=t.styles,i=a===void 0?{}:a,s=t.className,l=s===void 0?"":s,c=pe(Lt({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},i));return M("div",{style:c.wrap||{},className:"slider-picker "+l,children:[p("div",{style:c.hue,children:p(ka,{style:c.Hue,hsl:n,pointer:o,onChange:r})}),p("div",{style:c.swatches,children:p(gte,{hsl:n,onClick:r})})]})};Lh.propTypes={styles:K.object};Lh.defaultProps={pointer:vte,styles:{}};Ft(Lh);var pS={};Object.defineProperty(pS,"__esModule",{value:!0});var lm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mte=b,cm=bte(mte);function bte(e){return e&&e.__esModule?e:{default:e}}function yte(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Ss=24,xte=pS.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Ss:r,a=e.height,i=a===void 0?Ss:a,s=e.style,l=s===void 0?{}:s,c=yte(e,["fill","width","height","style"]);return cm.default.createElement("svg",lm({viewBox:"0 0 "+Ss+" "+Ss,style:lm({fill:n,width:o,height:i},l)},c),cm.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},wte=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,a=t.onSwatchHover,i=t.first,s=t.last,l=t.active,c=pe({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Th(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:i,last:s,active:l,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return p(io,{color:n,style:c.color,onClick:o,onHover:a,focusStyle:{boxShadow:"0 0 4px "+n},children:p("div",{style:c.check,children:p(xte,{})})})},Ste=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,a=t.active,i=pe({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return p("div",{style:i.group,children:Zr(o,function(s,l){return p(wte,{color:s,active:s.toLowerCase()===a,first:l===0,last:l===o.length-1,onClick:n,onSwatchHover:r},s)})})},Bh=function(t){var n=t.width,r=t.height,o=t.onChange,a=t.onSwatchHover,i=t.colors,s=t.hex,l=t.styles,c=l===void 0?{}:l,u=t.className,f=u===void 0?"":u,d=pe(Lt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},c)),h=function(g,m){return o({hex:g,source:"hex"},m)};return p("div",{style:d.picker,className:"swatches-picker "+f,children:p(Yi,{children:p("div",{style:d.overflow,children:M("div",{style:d.body,children:[Zr(i,function(v){return p(Ste,{group:v,active:s,onClick:h,onSwatchHover:a},v.toString())}),p("div",{style:d.clear})]})})})})};Bh.propTypes={width:K.oneOfType([K.string,K.number]),height:K.oneOfType([K.string,K.number]),colors:K.arrayOf(K.arrayOf(K.string)),styles:K.object};Bh.defaultProps={width:320,height:240,colors:[[wo[900],wo[700],wo[500],wo[300],wo[100]],[So[900],So[700],So[500],So[300],So[100]],[Co[900],Co[700],Co[500],Co[300],Co[100]],[_o[900],_o[700],_o[500],_o[300],_o[100]],[Oo[900],Oo[700],Oo[500],Oo[300],Oo[100]],[Eo[900],Eo[700],Eo[500],Eo[300],Eo[100]],[Ro[900],Ro[700],Ro[500],Ro[300],Ro[100]],[$o[900],$o[700],$o[500],$o[300],$o[100]],[To[900],To[700],To[500],To[300],To[100]],["#194D33",Xa[700],Xa[500],Xa[300],Xa[100]],[Po[900],Po[700],Po[500],Po[300],Po[100]],[ko[900],ko[700],ko[500],ko[300],ko[100]],[No[900],No[700],No[500],No[300],No[100]],[Ao[900],Ao[700],Ao[500],Ao[300],Ao[100]],[Mo[900],Mo[700],Mo[500],Mo[300],Mo[100]],[jo[900],jo[700],jo[500],jo[300],jo[100]],[Do[900],Do[700],Do[500],Do[300],Do[100]],[Io[900],Io[700],Io[500],Io[300],Io[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Ft(Bh);var Fh=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,a=t.colors,i=t.width,s=t.triangle,l=t.styles,c=l===void 0?{}:l,u=t.className,f=u===void 0?"":u,d=pe(Lt({default:{card:{width:i,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},c),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),h=function(g,m){Rr(g)&&n({hex:g,source:"hex"},m)};return M("div",{style:d.card,className:"twitter-picker "+f,children:[p("div",{style:d.triangleShadow}),p("div",{style:d.triangle}),M("div",{style:d.body,children:[Zr(a,function(v,g){return p(io,{color:v,hex:v,style:d.swatch,onClick:h,onHover:r,focusStyle:{boxShadow:"0 0 4px "+v}},g)}),p("div",{style:d.hash,children:"#"}),p(xe,{label:null,style:{input:d.input},value:o.replace("#",""),onChange:h}),p("div",{style:d.clear})]})]})};Fh.propTypes={width:K.oneOfType([K.string,K.number]),triangle:K.oneOf(["hide","top-left","top-right"]),colors:K.arrayOf(K.string),styles:K.object};Fh.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Ft(Fh);var zh=function(t){var n=pe({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return p("div",{style:n.picker})};zh.propTypes={hsl:K.shape({h:K.number,s:K.number,l:K.number,a:K.number})};zh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Hh=function(t){var n=pe({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return p("div",{style:n.picker})};Hh.propTypes={hsl:K.shape({h:K.number,s:K.number,l:K.number,a:K.number})};Hh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Cte=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,a=t.hex,i=t.hsv,s=function(h,v){if(h.hex)Rr(h.hex)&&n({hex:h.hex,source:"hex"},v);else if(h.rgb){var g=h.rgb.split(",");ru(h.rgb,"rgb")&&n({r:g[0],g:g[1],b:g[2],a:1,source:"rgb"},v)}else if(h.hsv){var m=h.hsv.split(",");ru(h.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),n({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},v))}else if(h.hsl){var y=h.hsl.split(",");ru(h.hsl,"hsl")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsl"},v))}},l=pe({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),c=r.r+", "+r.g+", "+r.b,u=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",f=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.v*100)+"%";return p("div",{style:l.wrap,className:"flexbox-fix",children:M("div",{style:l.fields,children:[p("div",{style:l.double,children:p(xe,{style:{input:l.input,label:l.label},label:"hex",value:a,onChange:s})}),M("div",{style:l.column,children:[p("div",{style:l.single,children:p(xe,{style:{input:l.input2,label:l.label2},label:"rgb",value:c,onChange:s})}),p("div",{style:l.single,children:p(xe,{style:{input:l.input2,label:l.label2},label:"hsv",value:f,onChange:s})}),p("div",{style:l.single,children:p(xe,{style:{input:l.input2,label:l.label2},label:"hsl",value:u,onChange:s})})]})]})})},Vh=function(t){var n=t.width,r=t.onChange,o=t.rgb,a=t.hsl,i=t.hsv,s=t.hex,l=t.header,c=t.styles,u=c===void 0?{}:c,f=t.className,d=f===void 0?"":f,h=pe(Lt({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},u));return M("div",{style:h.picker,className:"google-picker "+d,children:[p("div",{style:h.head,children:l}),p("div",{style:h.swatch}),p("div",{style:h.saturation,children:p(ac,{hsl:a,hsv:i,pointer:zh,onChange:r})}),M("div",{style:h.body,children:[p("div",{style:h.controls,className:"flexbox-fix",children:p("div",{style:h.hue,children:p(ka,{style:h.Hue,hsl:a,radius:"4px",pointer:Hh,onChange:r})})}),p(Cte,{rgb:o,hsl:a,hex:s,hsv:i,onChange:r})]})]})};Vh.propTypes={width:K.oneOfType([K.string,K.number]),styles:K.object,header:K.string};Vh.defaultProps={width:652,styles:{},header:"Color picker"};Ft(Vh);const gS=({onValueChange:e,initialValue:t,value:n})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Popover,{trigger:"click",content:p(pte,{color:n||t,onChange:r=>{const o=`rgba(${r.rgb.r},${r.rgb.g},${r.rgb.b}, ${r.rgb.a||1})`;e==null||e(o)}}),placement:"bottomLeft",overlayInnerStyle:{padding:0},arrow:{pointAtCenter:!1},children:p(A.Input,{placeholder:"color",value:n,onChange:r=>{e==null||e(r.target.value)},prefix:p("div",{style:{backgroundColor:n||"transparent",width:"10px",height:"10px",borderRadius:"4px",overflow:"hidden"}})})})});gS.setterName="颜色设置器";const Ji=[{label:"Recommended",colors:["#000000","#000000E0","#000000A6","#00000073","#00000040","#00000026","#0000001A","#00000012","#0000000A","#00000005","#F5222D","#FA8C16","#FADB14","#8BBB11","#52C41A","#13A8A8","#1677FF","#2F54EB","#722ED1","#EB2F96","#F5222D4D","#FA8C164D","#FADB144D","#8BBB114D","#52C41A4D","#13A8A84D","#1677FF4D","#2F54EB4D","#722ED14D","#EB2F964D"]}],vS=({onValueChange:e,initialValue:t,value:n,setterContext:r,...o})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.ColorPicker,{showText:!0,allowClear:!0,value:n??t,onChangeComplete:a=>{e==null||e(a.toRgbString())},presets:Ji,...o})});vS.setterName="颜色设置器";const mS=({onValueChange:e,setterContext:t,initialValue:n,...r})=>p(A.Slider,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}});mS.setterName="滑动条设置器";const bS=({onValueChange:e,value:t,initialValue:n,setterContext:r,...o})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Radio.Group,{onChange:a=>{e==null||e(a.target.value)},defaultValue:n,value:t,...o})});bS.setterName="单选设置器";const _te="_cssSizeInput_1ig9c_2",Ote="_unitSelect_1ig9c_5",um={cssSizeInput:_te,unitSelect:Ote},Ete="_inputNumberPlus_1hb66_2",Rte="_delIcon_1hb66_5",fm={inputNumberPlus:Ete,delIcon:Rte},$te=({min:e,max:t,value:n,onChange:r,addonAfter:o,...a})=>{const i=c=>{r==null||r(c)},s=c=>{let u=c;e!==void 0&&(u=Math.max(e,u)),t!==void 0&&(u=Math.min(t,u)),i(u)},l=b.useMemo(()=>{if(n===void 0)return!0;let c=n;return e!==void 0&&(c=Math.max(e,c)),t!==void 0&&(c=Math.min(t,c)),c===n},[t,e,n]);return M("div",{className:fm.inputNumberPlus,children:[M("div",{style:{display:"flex",position:"relative"},children:[p(A.Input,{...a,status:l?void 0:"error",value:n,onChange:c=>{const u=parseInt(c.target.value||"0",10);s(u)}}),p(Cb,{className:fm.delIcon,style:{position:"absolute",color:"gray",right:"2px",top:"5px"},onClickCapture:()=>{i(void 0)}})]}),o]})},dm=[{value:"px",label:"px"},{value:"%",label:"%"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"rem",label:"rem"}],Tte=function(e){const t=b.useRef({status:"",start:{x:0,y:0,cumulativeX:0,cumulativeY:0},processing:{x:0,y:0,cumulativeX:0,cumulativeY:0},mouseDown:!1}),n=b.useCallback(a=>{var s;t.current.mouseDown=!1;const{processing:i}=t.current;(s=e==null?void 0:e.onEnd)==null||s.call(e,{...i}),t.current.status="",t.current.processing.cumulativeX=0,t.current.processing.cumulativeY=0},[e]),r=b.useCallback(a=>{t.current.mouseDown=!0},[]),o=b.useCallback(a=>{var h,v,g;if(!t.current.mouseDown)return;const{start:i,processing:s}=t.current,l=a.clientX-i.x,c=a.clientY-i.y,u=10;if(t.current.status!=="running"&&(Math.abs(l)>u||Math.abs(c)>u)){t.current.status="running";const m=t.current.start;m.x=a.clientX,m.y=a.clientY,(h=e==null?void 0:e.onStart)==null||h.call(e,{...m})}if(t.current.status!=="running")return;s.x=a.clientX,s.y=a.clientY,s.cumulativeX=a.clientX-i.x,s.cumulativeY=a.clientY-i.y;const[f,d]=((v=e==null?void 0:e.limitCumulative)==null?void 0:v.x)||[];if(f!==void 0&&s.cumulativeX<f){n(a);return}if(d!==void 0&&s.cumulativeX>d){n(a);return}(g=e==null?void 0:e.onChange)==null||g.call(e,{...s})},[e,n]);return b.useEffect(()=>{const a=Mn.addEventListenerReturnCancel(document.body,"mousemove",l=>{o(l)}),i=Mn.addEventListenerReturnCancel(document.body,"mouseup",l=>{n(l)}),s=Mn.addEventListenerReturnCancel(document.body,"mouseleave",l=>{n(l)});return()=>{a(),i(),s()}},[n,o]),{onMouseDown:r}},pt=e=>{const t=String(e.value),[n,r]=b.useState({value:0,status:""}),o=b.useMemo(()=>{const m={value:void 0,unit:"px"};if(e.value===void 0)return m;const y=parseFloat(e.value||"");isNaN(y)||(m.value=y);let w="px";return m.value!==void 0&&(w=t.replace(String(m.value),"").trim()),["px","%","rem","vw","vx"].includes(w)&&(m.unit=w||"px"),m},[t,e.value]),a=b.useMemo(()=>e.unitList?e.unitList.map(m=>dm.find(y=>y.value===m)).filter(Boolean):dm,[e.unitList]),i=b.useMemo(()=>{var m,y;return{min:typeof e.min=="number"?e.min:(m=e.min)==null?void 0:m[o.unit],max:typeof e.max=="number"?e.max:(y=e.max)==null?void 0:y[o.unit]}},[e,o]),s=b.useMemo(()=>{const m={...o};return n.status==="dragging"&&(m.value=n.value),m},[o,n]),l=b.useCallback(m=>{var w;let y=`${m.value}${m.unit}`;m.value===void 0&&(y=void 0),(w=e.onValueChange)==null||w.call(e,y)},[e]),c=b.useCallback((m,y)=>{let w={...m};e.cumulativeTransform&&(w=e.cumulativeTransform(w));let _=y??0;isNaN(_)&&(_=0);let S=_+w.cumulativeX;return i.min!==void 0&&(S=Math.max(S,i.min)),i.max!==void 0&&(S=Math.min(S,i.max)),S},[i.max,i.min,e]),u=b.useCallback(m=>{r({status:"dragging",value:c(m,o.value)})},[o.value,c]),f=b.useCallback(m=>{const y=c(m,o.value);r({status:"dragging",value:y})},[o.unit,o.value]),d=b.useCallback(m=>{const y=c(m,o.value);n.status==="dragging"&&(l({value:y,unit:o.unit}),r({status:"",value:0}))},[n.status,o,c,l]),h=b.useRef({onStart:u,onChange:f,onEnd:d});h.current={onStart:u,onChange:f,onEnd:d};const v=Tte({onStart:m=>h.current.onStart(m),onChange:m=>h.current.onChange(m),onEnd:m=>h.current.onEnd(m),limitCumulative:{x:[-60,void 0]}}),g=p("span",{className:um.unitSelect,children:p(A.Select,{size:e.size,disabled:s.value===void 0,defaultValue:"px",value:s.unit,onChange:m=>{l({value:s.value,unit:m})},style:{width:"40px"},popupMatchSelectWidth:!1,options:a})});return p(A.ConfigProvider,{theme:{token:{borderRadius:2}},children:p("div",{className:um.cssSizeInput,...v,style:e.style,children:p($te,{size:e.size,value:s.value,addonAfter:e.unit===!1?"":g,min:i.min,max:i.max,onChange:m=>{l({value:m,unit:s.unit})}})})})},yS=({onValueChange:e,setterContext:t,initialValue:n,...r})=>p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(pt,{min:0,...r,value:r.value??n,onValueChange:o=>{e==null||e(o)}})});yS.setterName="CSS size 设置器";const Pte={StringSetter:Mx,ArraySetter:rw,ShapeSetter:ow,NumberSetter:jx,ExpressionSetter:aw,BooleanSetter:iw,SelectSetter:sw,JSONSetter:vw,FunctionSetter:mw,TextAreaSetter:bw,CSSValueSetter:ww,ColorSetter:gS,SliderSetter:mS,AntDColorSetter:vS,RadioGroupSetter:bS,CSSSizeSetter:yS},kte="_fieldBox_nltxm_3",Nte="_label_nltxm_11",Ate="_tipsLabel_nltxm_25",Mte="_content_nltxm_32",Cs={fieldBox:kte,label:Nte,tipsLabel:Ate,content:Mte},_s=e=>{const{children:t,label:n,tips:r,name:o,hiddenLabel:a}=e;let i=n;const{formState:s,updateContext:l,updateConditionConfig:c}=b.useContext(Gd);if(b.useEffect(()=>{e.condition&&c(o,e.condition)},[]),b.useEffect(()=>{var g;const v=(e.condition??(()=>!0))(s);(g=e.onConditionValueChange)==null||g.call(e,v)},[s,e]),r){let h=r;typeof r=="function"&&(h=r()),i=p(A.Tooltip,{title:p("span",{style:{color:"rgba(255,255,255,0.9",fontSize:"12px"},children:h}),color:"rgba(50,50,50,0.8)",children:p("span",{className:Cs.tipsLabel,children:n})})}let u=t;if(b.isValidElement(t)){const h={onValueChange:v=>{l({...s,[o]:v})}};s[o]!==void 0&&(h.value=s[o]),u=b.cloneElement(t,h)}return(e.condition??(()=>!0))(s)?e.noStyle?p(vt,{children:u}):M("div",{className:Cs.fieldBox,children:[a!==!0&&p("div",{className:Cs.label,children:i}),p("div",{className:Cs.content,children:u})]}):null},jte="_switchBtn_k17cr_2",Dte="_shapeFieldBox_k17cr_8",Ite="_collapseHeader_k17cr_9",Os={switchBtn:jte,shapeFieldBox:Dte,collapseHeader:Ite},xS=b.createContext({defaultSetterConfig:{},onSetterChange:()=>{}}),Uh=({setters:e,keyPaths:t,condition:n,useField:r=!0,...o})=>{var P,j;const[a,i]=b.useState(!0),{customSetterMap:s}=b.useContext(Gd),{onSetterChange:l,defaultSetterConfig:c,formRef:u,pluginCtx:f}=b.useContext(xS),d={...Pte,...s},[h,v]=b.useState(()=>{var F;const L=((F=c[t.join(".")])==null?void 0:F.setter)||"";return[...e].find(W=>W.componentName===L)||e[0]});let g=null;h!=null&&h.componentName&&(g=d[h==null?void 0:h.componentName]||h.component),g||(g=function(){return p("div",{style:{backgroundColor:"whitesmoke",margin:"5px 0",padding:"5px",borderRadius:"2px",color:"gray"},children:`${h==null?void 0:h.componentName} is not found.`})});const m=e.map(L=>{const F=(L==null?void 0:L.componentName)||"",W=d[F];return{key:L.componentName,label:(W==null?void 0:W.setterName)||L.componentName}}),y=({key:L})=>{const F=e.find(W=>W.componentName===L);F&&(v(F),l==null||l(t,F.componentName))};let w=p("div",{className:Os.switchBtn,onClick:L=>{L.preventDefault(),L.stopPropagation()},children:p(A.Dropdown,{trigger:["click"],menu:{selectable:!0,items:m,onClick:y,defaultSelectedKeys:[(h==null?void 0:h.componentName)||""]},children:p(w_,{})})});m.length===1&&(w=null);const _=b.useMemo(()=>{let L={...(h==null?void 0:h.props)||{},initialValue:h==null?void 0:h.initialValue};const F=e.find(W=>W.componentName===(h==null?void 0:h.componentName));return F&&(L={...L,...F.props}),L},[e,h]),S={formRef:u,pluginCtx:f},[x,C]=b.useState([]),O={condition:n,onConditionValueChange:L=>{i(L)}};let $=null;const k=r===!1||(h==null?void 0:h.hiddenLabel)===!0;return["ArraySetter"].includes((h==null?void 0:h.componentName)||"")?$=p(A.Collapse,{bordered:!1,style:{marginBottom:"10px"},defaultActiveKey:[o.name],items:[{label:M("div",{className:Os.collapseHeader,children:[p("span",{style:{flex:1},children:o.label}),x,w]}),children:k?p(g,{..._,setterContext:{...S,keyPaths:[...t],label:o.label,setCollapseHeaderExt:C}}):p(_s,{...o,noStyle:!0,...O,children:p(g,{..._,setterContext:{...S,keyPaths:[...t],label:o.label,setCollapseHeaderExt:C}})})}]}):["ShapeSetter"].includes((h==null?void 0:h.componentName)||"")?$=M("div",{className:Os.shapeFieldBox,children:[o.prefix??null,((P=h==null?void 0:h.props)==null?void 0:P.collapse)===!1&&p("div",{style:{width:"100%"},children:p(_s,{...o,noStyle:!0,...O,hiddenLabel:k,children:p(g,{..._,setterContext:{...S,keyPaths:[...t]}})})}),((j=h==null?void 0:h.props)==null?void 0:j.collapse)!==!1&&p(A.Collapse,{bordered:!1,style:{flex:1},items:[{key:o.name,label:M("div",{className:Os.collapseHeader,children:[p("span",{style:{flex:1},children:o.label}),w]}),children:p(_s,{...o,noStyle:!0,...O,children:p(g,{..._,setterContext:{...S,keyPaths:[...t]}})})}]}),o.suffix??null]}):$=M("div",{style:{display:"flex",alignItems:"center",paddingBottom:"8px"},children:[o.prefix??null,p(_s,{...o,hiddenLabel:k,condition:n,onConditionValueChange:L=>{i(L)},children:p(g,{..._,setterContext:{...S,keyPaths:[...t]}})}),w,o.suffix??null]}),p("div",{style:{display:a?"block":"none",overflow:"auto"},children:$})},Lte="_CFromRenderBox_13lda_2",Bte={CFromRenderBox:Lte},Fte=(e,t)=>{const{properties:n,initialValue:r,onValueChange:o,onSetterChange:a,defaultSetterConfig:i,pluginCtx:s,customSetterMap:l}=e,c=n;return p(xS.Provider,{value:{defaultSetterConfig:i,onSetterChange:a,formRef:t,pluginCtx:s},children:p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p("div",{className:Bte.CFromRenderBox,style:{overflow:"auto",height:"100%"},children:p(Kd,{ref:t,name:"root-form",initialValue:r,customSetterMap:l,onValueChange:u=>{o==null||o(u)},children:c.map(u=>{if(De.isSpecialMaterialPropType(u))console.log("Current not Support type config for props, wait future....");else{const f=sB(u.title),d=De.getMTitleTip(u.title),h=Yd(u.setters),v=[u.name];return p(Uh,{condition:u.condition,keyPaths:v,setters:h,label:f,name:u.name||"",tips:d},u.name)}})})})})})},Wh=b.forwardRef(Fte),zte=e=>{var l,c,u;const{node:t}=e,n=((l=t==null?void 0:t.material)==null?void 0:l.value.props)||[],r=b.useRef(null);b.useEffect(()=>{const f=()=>{var h,v;const d=((h=t==null?void 0:t.getPlainProps)==null?void 0:h.call(t))||{};(v=r.current)==null||v.setFields(d)};f(),t==null||t.emitter.on("onNodeChange",f)},[t]);const o=((c=t==null?void 0:t.getPlainProps)==null?void 0:c.call(t))||{},a=f=>{t==null||t.updateValue({props:f})},i=(f,d)=>{t&&(t.value.configure=t.value.configure||{},t.value.configure.propsSetter=t.value.configure.propsSetter||{},t.value.configure.propsSetter[f.join(".")]={name:f.join("."),setter:d})},s=(u=e.pluginCtx.config)==null?void 0:u.customPropertySetterMap;return p("div",{className:GL.CFromRenderBox,children:p(Wh,{pluginCtx:e.pluginCtx,defaultSetterConfig:(t==null?void 0:t.value.configure.propsSetter)||{},onSetterChange:i,properties:n,initialValue:o,ref:r,customSetterMap:s,onValueChange:a},t==null?void 0:t.id)})},Hte={key:"Property",name:"Property",view:({node:e,pluginCtx:t})=>p(zte,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.property)!==!1}},Vte=e=>{const t=e.node,n=t.value.state||{},r=b.useRef(null);b.useEffect(()=>{var i;const a=t.value.state||{};(i=r==null?void 0:r.current)==null||i.setValue(JSON.stringify(a,null,2))},[t]);const o=a=>{try{const i=JSON.parse(a||"{}");t.value.state=i,t.updateValue()}catch(i){console.warn(i)}};return p(vt,{children:p(Hi,{initialValue:JSON.stringify(n,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:a=>{r.current=a},onChange:o})})},Ute={key:"State",name:"State",view:({node:e,pluginCtx:t})=>e?p(Vte,{node:e,pluginCtx:t}):p(vt,{}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.state)!==!1}},Wte="_advanceBox_9o3af_2",Gte={advanceBox:Wte},Kte=[{name:"id",title:{label:"id",tip:"node unique id"},valueType:"string",setters:[{componentName:"StringSetter",props:{disabled:!0,bordered:!1}}]},{name:"condition",title:{label:"Render",tip:"controller component render"},valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"loop",title:"loop render",valueType:"object",setters:[{componentName:"ShapeSetter",props:{elements:[{name:"open",title:"open",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"data",title:"data",valueType:"array",setters:[{componentName:"ArraySetter",initialValue:[],props:{item:{setters:["JSONSetter","ExpressionSetter"],initialValue:{}}}},"JSONSetter","ExpressionSetter"]},{name:"forName",title:{label:"name",tip:"loop element name"},valueType:"string",setters:["StringSetter"]},{name:"forIndex",title:{label:"index",tip:"loop element index"},valueType:"string",setters:["StringSetter"]},{name:"key",title:{label:"key",tip:"loop element key"},valueType:"expression",setters:["ExpressionSetter"]},{name:"name",title:{label:`variable
|
|
280
|
+
name`,tip:"loop variable name"},valueType:"string",setters:[{componentName:"StringSetter",props:{prefix:"loopData"}}]}]},initialValue:{open:!1,data:[]}}]},{name:"refId",title:{label:"refId",tip:"unique node flag"},valueType:"string",setters:["StringSetter"]},{name:"nodeName",title:{label:M(vt,{children:["node ",p("br",{})," name"]}),tip:"alias for node"},valueType:"string",setters:["StringSetter"]}],qte=e=>{var i;const{node:t}=e,n=(s,l)=>{t.value.configure=t.value.configure||{},t.value.configure.advanceSetter=t.value.configure.advanceSetter||{},t.value.configure.advanceSetter[s.join(".")]={name:s.join("."),setter:l}},r=t.value.loop,o=b.useRef(null);b.useEffect(()=>{var l;const s={id:t.id,condition:t.value.condition||!0,loop:{open:(r==null?void 0:r.open)||!1,data:(r==null?void 0:r.data)||[],forName:(r==null?void 0:r.forName)||"item",forIndex:(r==null?void 0:r.forIndex)||"index",key:(r==null?void 0:r.key)||"",name:(r==null?void 0:r.name)||""},refId:t.value.refId,nodeName:t.value.nodeName};(l=o.current)==null||l.setFields(s)},[t]);const a=s=>{t.value.loop=s.loop,t.value.condition=s.condition,t.value.refId=s.refId,t.value.nodeName=s.nodeName,t.updateValue()};return p("div",{className:Gte.advanceBox,children:p(Wh,{defaultSetterConfig:((i=t.value.configure)==null?void 0:i.advanceSetter)||{},onSetterChange:n,properties:Kte,initialValue:{},ref:o,onValueChange:a},t.id)})},Xte={key:"Advance",name:"Advance",view:({node:e,pluginCtx:t})=>e?p(qte,{node:e,pluginCtx:t}):p(vt,{}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.advance)!==!1}},Yte="_rightPanelContainer_1p332_2",Jte={rightPanelContainer:Yte},Qte="_visualPanelBox_6q12v_2",Zte="_header_6q12v_5",hm={visualPanelBox:Qte,header:Zte},ene="_cssFieldBox_tzq0n_2",tne="_row_tzq0n_9",nne="_fieldLabel_tzq0n_14",rne="_leftBox_tzq0n_20",one="_rightBox_tzq0n_23",ane="_inputBox_tzq0n_26",ine="_cssBox_tzq0n_30",sne="_switchBtn_tzq0n_43",kn={cssFieldBox:ene,row:tne,fieldLabel:nne,leftBox:rne,rightBox:one,inputBox:ane,cssBox:ine,switchBtn:sne},lne={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},cne=Object.keys(lne.cssKeyValue),ou=cne.map(e=>({value:e})),pm=b.forwardRef(function(t,n){var w,_;const[r,o]=b.useState(""),[a,i]=b.useState(""),{mod:s="create"}=t,[l,c]=b.useState({property:((w=t.value)==null?void 0:w.property)||"",value:((_=t.value)==null?void 0:_.value)||""}),u=S=>{var O;let x,C;return De.isExpression(S==null?void 0:S.value)?(x=!0,C=(O=S==null?void 0:S.value)==null?void 0:O.value):(x=!1,C=S==null?void 0:S.value),{isExp:x,value:C}},f=b.useMemo(()=>u(t.value),[t.value]);b.useEffect(()=>{t.value&&c(t.value)},[t.value]);const[d,h]=b.useState(ou),v=S=>{const x=ou.filter(C=>C.value.includes(S));h(S?x:ou)},g=S=>{t.onValueChange({...S})},m=b.useRef(null);b.useImperativeHandle(n,()=>({reset:()=>{var S;c({property:"",value:{type:De.CNodePropsTypeEnum.EXPRESSION,value:""}}),(S=m.current)==null||S.focus()}}),[]);const y=()=>{var x,C,O;if(l.property===""){o("error");return}if(f.isExp&&!l.value){i("error");return}o(""),i("");const S=(x=t.onCreate)==null?void 0:x.call(t,l);(C=S==null?void 0:S.errorKey)!=null&&C.includes("key")&&o("error"),(O=S==null?void 0:S.errorKey)!=null&&O.includes("value")&&i("error")};return p(vt,{children:M("div",{className:kn.cssFieldBox,children:[M("div",{className:kn.leftBox,children:[M("div",{className:kn.row,children:[p("span",{className:kn.fieldLabel,children:"Name"}),p(A.AutoComplete,{status:r,disabled:s==="edit",ref:m,onSearch:v,popupMatchSelectWidth:200,value:l.property,onChange:S=>{o("");const x={...l,property:S};c(x),g(x)},className:Ge([kn.inputBox]),onBlur:()=>{g(l)},placeholder:"property",options:d})]}),M("div",{className:kn.row,children:[p("span",{className:kn.fieldLabel,children:"Value"}),p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p(A.Input.TextArea,{status:a,value:u(l).value,autoSize:{minRows:f.isExp?2:1},onChange:S=>{i("");const x={type:De.CNodePropsTypeEnum.EXPRESSION,value:S.target.value},C=f.isExp,O={...l,value:C?x:S.target.value};c(O),g(O)},onPressEnter:()=>{s==="create"&&setTimeout(()=>{var S;y(),(S=m.current)==null||S.focus()},0)}})})]})]}),M("div",{className:kn.rightBox,children:[M("div",{style:{height:"30px"},children:[t.onDelete&&s==="edit"&&p(A.Button,{size:"small",type:"text",onClick:()=>{var S;(S=t.onDelete)==null||S.call(t)},children:p(jb,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&p("div",{children:p(A.Button,{size:"small",type:"text",icon:p(Yf,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:y})})]}),p("div",{className:kn.switchBtn,onClick:S=>{S.preventDefault(),S.stopPropagation()}})]})]})})}),une=b.forwardRef(function(t,n){const[r,o]=b.useState([]);b.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),b.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=b.useState({property:"",value:{type:"EXPRESSION",value:""}}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=b.useRef(null);return p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:M("div",{className:kn.cssBox,children:[r.map((c,u)=>p("div",{children:p(pm,{value:c,mod:"edit",onValueChange:f=>{if(f.property===""){r.splice(u,1),o([...r]);return}r[u]=f,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),p(pm,{value:a,ref:l,mod:"create",onValueChange:c=>{i(c)},onCreate:c=>{if(r.find(f=>f.property===c.property))return A.message.error("The attribute name already exists, please replace"),{errorKey:[c.property]};r.push(c),o([...r]),s(r),i({property:"",value:{type:"EXPRESSION",value:""}})}})]})})}),fne=[{title:"Class Names",name:"className",valueType:"array",setters:[{componentName:"ArraySetter",props:{sortLabelKey:"name",item:{setters:[{componentName:"ShapeSetter",props:{collapse:!1,elements:[{name:"name",title:"类名",valueType:"string",setters:["StringSetter"]},{name:"status",title:"启用",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]}]},initialValue:{}}],initialValue:{name:"",status:{type:De.CNodePropsTypeEnum.EXPRESSION,value:!0}}}},initialValue:[]}]}],dne=b.forwardRef(function(t,n){const r=b.useRef(null);return b.useImperativeHandle(n,()=>({setValue(o){var a;(a=r==null?void 0:r.current)==null||a.setFields({className:o||[]})}})),p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:p("div",{children:p(Wh,{ref:r,initialValue:[],properties:fne,onSetterChange:function(){},onValueChange:o=>{var a;(a=t.onValueChange)==null||a.call(t,o.className||[])},defaultSetterConfig:{}})})})});function hne(e){if(Array.isArray(e))return bu(e)}function pne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
281
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cr(e){return hne(e)||dx(e)||Uf(e)||pne()}function Gh(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function wS(e,t,n){var r=Z.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function gne(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(a,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(a);if(_r(!l,"Warning: There may be circular references"),l)return!1;if(a===i)return!0;if(n&&s>1)return!1;r.add(a);var c=s+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var u=0;u<a.length;u++)if(!o(a[u],i[u],c))return!1;return!0}if(a&&i&&Ie(a)==="object"&&Ie(i)==="object"){var f=Object.keys(a);return f.length!==Object.keys(i).length?!1:f.every(function(d){return o(a[d],i[d],c)})}return!1}return o(e,t)}var gm="%",vne=function(){function e(t){Rt(this,e),ve(this,"instanceId",void 0),ve(this,"cache",new Map),this.instanceId=t}return $t(e,[{key:"get",value:function(n){return this.cache.get(n.join(gm))||null}},{key:"update",value:function(n,r){var o=n.join(gm),a=this.cache.get(o),i=r(a);i===null?this.cache.delete(o):this.cache.set(o,i)}}]),e}(),Of="data-token-hash",zr="data-css-hash",mne="data-cache-path",Fo="__cssinjs_instance__";function bne(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(zr,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[Fo]=o[Fo]||e,o[Fo]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(zr,"]"))).forEach(function(o){var a=o.getAttribute(zr);if(r[a]){if(o[Fo]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else r[a]=!0})}return new vne(e)}var yne=Z.createContext({hashPriority:"low",cache:bne(),defaultCache:!0});const Kh=yne;function xne(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var qh=function(){function e(){Rt(this,e),ve(this,"cache",void 0),ve(this,"keys",void 0),ve(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return $t(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return n.forEach(function(s){if(!i)i=void 0;else{var l,c;i=(l=i)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(r=i)!==null&&r!==void 0&&r.value&&a&&(i.value[1]=this.cacheCallTimes++),(o=i)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(c,u){var f=je(c,2),d=f[1];return o.internalGet(u)[1]<d?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),i=je(a,1),s=i[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var f=l.get(c);f?f.map||(f.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var a;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(a=o.value)===null||a===void 0?void 0:a[0]}var i=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),i}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!xne(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();ve(qh,"MAX_CACHE_SIZE",20);ve(qh,"MAX_CACHE_OFFSET",5);var vm=0,SS=function(){function e(t){Rt(this,e),ve(this,"derivatives",void 0),ve(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=vm,t.length===0&&Kf(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),vm+=1}return $t(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),au=new qh;function Ef(e){var t=Array.isArray(e)?e:[e];return au.has(t)||au.set(t,new SS(t)),au.get(t)}var mm=new WeakMap;function wl(e){var t=mm.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof SS?t+=r.id:r&&Ie(r)==="object"?t+=wl(r):t+=r}),mm.set(e,t)),t}function wne(e,t){return Gh("".concat(t,"_").concat(wl(e)))}var li="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),CS="_bAmBoO_";function Sne(e,t,n){if(Fn()){var r,o;ci(e,li);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),"{}".NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");var i=n?n(a):(r=getComputedStyle(a).content)===null||r===void 0?void 0:r.includes(CS);return(o=a.parentNode)===null||o===void 0||o.removeChild(a),vb(li),i}return!1}var iu=void 0;function Cne(){return iu===void 0&&(iu=Sne("@layer ".concat(li," { .").concat(li,' { content: "').concat(CS,'"!important; } }'),function(e){e.className=li})),iu}var bm="{}".NODE_ENV!=="test"&&Fn()?Z.useLayoutEffect:Z.useEffect,_ne=function(t,n){var r=Z.useRef(!0);bm(function(){return t(r.current)},n),bm(function(){return r.current=!1,function(){r.current=!0}},[])},One=Q({},Z),ym=One.useInsertionEffect,Ene=function(t,n,r){Z.useMemo(t,r),_ne(function(){return n(!0)},r)},Rne=ym?function(e,t,n){return ym(function(){return e(),t()},n)}:Ene;const $ne=Rne;var Tne=Q({},Z),Pne=Tne.useInsertionEffect,kne=function(t){var n=[],r=!1;function o(a){if(r){"{}".NODE_ENV!=="production"&&Kf(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}n.push(a)}return Z.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(a){return a()})}},t),o},Nne=function(){return function(t){t()}},Ane=typeof Pne<"u"?kne:Nne;const Mne=Ane;function jne(){return!1}var Rf=!1;function Dne(){return Rf}const Ine="{}".NODE_ENV==="production"?jne:Dne;if("{}".NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var su=window;if(typeof su.webpackHotUpdate=="function"){var Lne=su.webpackHotUpdate;su.webpackHotUpdate=function(){return Rf=!0,setTimeout(function(){Rf=!1},0),Lne.apply(void 0,arguments)}}}function _S(e,t,n,r,o){var a=Z.useContext(Kh),i=a.cache,s=[e].concat(Cr(t)),l=s.join("_"),c=Mne([l]),u=Ine(),f=function(g){i.update(s,function(m){var y=m||[],w=je(y,2),_=w[0],S=_===void 0?0:_,x=w[1],C=x;"{}".NODE_ENV!=="production"&&x&&u&&(r==null||r(C,u),C=null);var O=C||n(),$=[S,O];return g?g($):$})};Z.useMemo(function(){f()},[l]);var d=i.get(s);"{}".NODE_ENV!=="production"&&!d&&(f(),d=i.get(s));var h=d[1];return $ne(function(){o==null||o(h)},function(v){return f(function(g){var m=je(g,2),y=m[0],w=m[1];return v&&y===0&&(o==null||o(h)),[y+1,w]}),function(){i.update(s,function(g){var m=g||[],y=je(m,2),w=y[0],_=w===void 0?0:w,S=y[1],x=_-1;return x===0?(c(function(){return r==null?void 0:r(S,!1)}),null):[_-1,S]})}},[l]),h}var Bne={},Fne="{}".NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Br=new Map;function zne(e){Br.set(e,(Br.get(e)||0)+1)}function Hne(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Of,'="').concat(e,'"]'));n.forEach(function(r){if(r[Fo]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var Vne=0;function Une(e,t){Br.set(e,(Br.get(e)||0)-1);var n=Array.from(Br.keys()),r=n.filter(function(o){var a=Br.get(o)||0;return a<=0});n.length-r.length>Vne&&r.forEach(function(o){Hne(o,t),Br.delete(o)})}var Wne=function(t,n,r,o){var a=r.getDerivativeToken(t),i=Q(Q({},a),n);return o&&(i=o(i)),i};function Gne(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=b.useContext(Kh),o=r.cache.instanceId,a=n.salt,i=a===void 0?"":a,s=n.override,l=s===void 0?Bne:s,c=n.formatToken,u=n.getComputedToken,f=Z.useMemo(function(){return Object.assign.apply(Object,[{}].concat(Cr(t)))},[t]),d=Z.useMemo(function(){return wl(f)},[f]),h=Z.useMemo(function(){return wl(l)},[l]),v=_S("token",[i,e.id,d,h],function(){var g=u?u(f,l,e):Wne(f,l,e,c),m=wne(g,i);g._tokenKey=m,zne(m);var y="".concat(Fne,"-").concat(Gh(m));return g._hashId=y,[g,y]},function(g){Une(g[0]._tokenKey,o)});return v}var Kne={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},OS="comm",ES="rule",RS="decl",qne="@import",Xne="@keyframes",Yne="@layer",Jne=Math.abs,Xh=String.fromCharCode;function $S(e){return e.trim()}function zs(e,t,n){return e.replace(t,n)}function Qne(e,t){return e.indexOf(t)}function Ri(e,t){return e.charCodeAt(t)|0}function $i(e,t,n){return e.slice(t,n)}function rr(e){return e.length}function Zne(e){return e.length}function Es(e,t){return t.push(e),e}var sc=1,oa=1,TS=0,sn=0,lt=0,Na="";function Yh(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:sc,column:oa,length:i,return:"",siblings:s}}function ere(){return lt}function tre(){return lt=sn>0?Ri(Na,--sn):0,oa--,lt===10&&(oa=1,sc--),lt}function Sn(){return lt=sn<TS?Ri(Na,sn++):0,oa++,lt===10&&(oa=1,sc++),lt}function Hr(){return Ri(Na,sn)}function Hs(){return sn}function lc(e,t){return $i(Na,e,t)}function $f(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nre(e){return sc=oa=1,TS=rr(Na=e),sn=0,[]}function rre(e){return Na="",e}function lu(e){return $S(lc(sn-1,Tf(e===91?e+2:e===40?e+1:e)))}function ore(e){for(;(lt=Hr())&<<33;)Sn();return $f(e)>2||$f(lt)>3?"":" "}function are(e,t){for(;--t&&Sn()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return lc(e,Hs()+(t<6&&Hr()==32&&Sn()==32))}function Tf(e){for(;Sn();)switch(lt){case e:return sn;case 34:case 39:e!==34&&e!==39&&Tf(lt);break;case 40:e===41&&Tf(e);break;case 92:Sn();break}return sn}function ire(e,t){for(;Sn()&&e+lt!==47+10;)if(e+lt===42+42&&Hr()===47)break;return"/*"+lc(t,sn-1)+"*"+Xh(e===47?e:Sn())}function sre(e){for(;!$f(Hr());)Sn();return lc(e,sn)}function lre(e){return rre(Vs("",null,null,null,[""],e=nre(e),0,[0],e))}function Vs(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,f=i,d=0,h=0,v=0,g=1,m=1,y=1,w=0,_="",S=o,x=a,C=r,O=_;m;)switch(v=w,w=Sn()){case 40:if(v!=108&&Ri(O,f-1)==58){Qne(O+=zs(lu(w),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:O+=lu(w);break;case 9:case 10:case 13:case 32:O+=ore(v);break;case 92:O+=are(Hs()-1,7);continue;case 47:switch(Hr()){case 42:case 47:Es(cre(ire(Sn(),Hs()),t,n,l),l);break;default:O+="/"}break;case 123*g:s[c++]=rr(O)*y;case 125*g:case 59:case 0:switch(w){case 0:case 125:m=0;case 59+u:y==-1&&(O=zs(O,/\f/g,"")),h>0&&rr(O)-f&&Es(h>32?wm(O+";",r,n,f-1,l):wm(zs(O," ","")+";",r,n,f-2,l),l);break;case 59:O+=";";default:if(Es(C=xm(O,t,n,c,u,o,s,_,S=[],x=[],f,a),a),w===123)if(u===0)Vs(O,t,C,C,S,a,f,s,x);else switch(d===99&&Ri(O,3)===110?100:d){case 100:case 108:case 109:case 115:Vs(e,C,C,r&&Es(xm(e,C,C,0,0,o,s,_,o,S=[],f,x),x),o,x,f,s,r?S:x);break;default:Vs(O,C,C,C,[""],x,0,s,x)}}c=u=h=0,g=y=1,_=O="",f=i;break;case 58:f=1+rr(O),h=v;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&tre()==125)continue}switch(O+=Xh(w),w*g){case 38:y=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(rr(O)-1)*y,y=1;break;case 64:Hr()===45&&(O+=lu(Sn())),d=Hr(),u=f=rr(_=O+=sre(Hs())),w++;break;case 45:v===45&&rr(O)==2&&(g=0)}}return a}function xm(e,t,n,r,o,a,i,s,l,c,u,f){for(var d=o-1,h=o===0?a:[""],v=Zne(h),g=0,m=0,y=0;g<r;++g)for(var w=0,_=$i(e,d+1,d=Jne(m=i[g])),S=e;w<v;++w)(S=$S(m>0?h[w]+" "+_:zs(_,/&\f/g,h[w])))&&(l[y++]=S);return Yh(e,t,n,o===0?ES:s,l,c,u,f)}function cre(e,t,n,r){return Yh(e,t,n,OS,Xh(ere()),$i(e,2,-2),0,r)}function wm(e,t,n,r,o){return Yh(e,t,n,RS,$i(e,0,r),$i(e,r+1,-1),r,o)}function Pf(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function ure(e,t,n,r){switch(e.type){case Yne:if(e.children.length)break;case qne:case RS:return e.return=e.return||e.value;case OS:return"";case Xne:return e.return=e.value+"{"+Pf(e.children,r)+"}";case ES:if(!rr(e.value=e.props.join(",")))return""}return rr(n=Pf(e.children,r))?e.return=e.value+"{"+n+"}":""}function PS(e,t){var n=t.path,r=t.parentSelectors;_r(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var fre=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof n!="string"||a.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&PS("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},dre=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&PS("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},Sm="data-ant-cssinjs-cache-path",kS="_FILE_STYLE__",Vr,NS=!0;function hre(){if(!Vr&&(Vr={},Fn())){var e=document.createElement("div");e.className=Sm,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=je(a,2),s=i[0],l=i[1];Vr[s]=l});var n=document.querySelector("style[".concat(Sm,"]"));if(n){var r;NS=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function pre(e){return hre(),!!Vr[e]}function gre(e){var t=Vr[e],n=null;if(t&&Fn())if(NS)n=kS;else{var r=document.querySelector("style[".concat(zr,'="').concat(Vr[e],'"]'));r?n=r.innerHTML:delete Vr[e]}return[n,t]}var Cm=Fn(),AS="_skip_check_",MS="_multi_value_";function _m(e){var t=Pf(lre(e),ure);return t.replace(/\{%%%\:[^;];}/g,";")}function vre(e){return Ie(e)==="object"&&e&&(AS in e||MS in e)}function mre(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,a=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(Cr(l.slice(1))).join(" ")});return a.join(",")}var bre=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,f=n.transformers,d=f===void 0?[]:f,h=n.linters,v=h===void 0?[]:h,g="",m={};function y(C){var O=C.getName(s);if(!m[O]){var $=e(C.style,n,{root:!1,parentSelectors:i}),k=je($,1),P=k[0];m[O]="@keyframes ".concat(C.getName(s)).concat(P)}}function w(C){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return C.forEach(function($){Array.isArray($)?w($,O):$&&O.push($)}),O}var _=w(Array.isArray(t)?t:[t]);if(_.forEach(function(C){var O=typeof C=="string"&&!o?{}:C;if(typeof O=="string")g+="".concat(O,`
|
|
282
|
+
`);else if(O._keyframe)y(O);else{var $=d.reduce(function(k,P){var j;return(P==null||(j=P.visit)===null||j===void 0?void 0:j.call(P,k))||k},O);Object.keys($).forEach(function(k){var P=$[k];if(Ie(P)==="object"&&P&&(k!=="animationName"||!P._keyframe)&&!vre(P)){var j=!1,L=k.trim(),F=!1;(o||a)&&s?L.startsWith("@")?j=!0:L=mre(k,s,u):o&&!s&&(L==="&"||L==="")&&(L="",F=!0);var W=e(P,n,{root:F,injectHash:j,parentSelectors:[].concat(Cr(i),[L])}),B=je(W,2),G=B[0],ne=B[1];m=Q(Q({},m),ne),g+="".concat(L).concat(G)}else{let R=function(T,N){"{}".NODE_ENV!=="production"&&(Ie(P)!=="object"||!(P!=null&&P[AS]))&&[fre,dre].concat(Cr(v)).forEach(function(Y){return Y(T,N,{path:c,hashId:s,parentSelectors:i})});var I=T.replace(/[A-Z]/g,function(Y){return"-".concat(Y.toLowerCase())}),H=N;!Kne[T]&&typeof H=="number"&&H!==0&&(H="".concat(H,"px")),T==="animationName"&&N!==null&&N!==void 0&&N._keyframe&&(y(N),H=N.getName(s)),g+="".concat(I,":").concat(H,";")};var fe,D=(fe=P==null?void 0:P.value)!==null&&fe!==void 0?fe:P;Ie(P)==="object"&&P!==null&&P!==void 0&&P[MS]&&Array.isArray(D)?D.forEach(function(T){R(k,T)}):R(k,D)}})}}),!o)g="{".concat(g,"}");else if(l&&Cne()){var S=l.split(","),x=S[S.length-1].trim();g="@layer ".concat(x," {").concat(g,"}"),S.length>1&&(g="@layer ".concat(l,"{%%%:%}").concat(g))}return[g,m]};function yre(e,t){return Gh("".concat(e.join("%")).concat(t))}function xre(){return null}function kf(e,t){var n=e.token,r=e.path,o=e.hashId,a=e.layer,i=e.nonce,s=e.clientOnly,l=e.order,c=l===void 0?0:l,u=Z.useContext(Kh),f=u.autoClear,d=u.mock,h=u.defaultCache,v=u.hashPriority,g=u.container,m=u.ssrInline,y=u.transformers,w=u.linters,_=u.cache,S=n._tokenKey,x=[S].concat(Cr(r)),C=Cm;"{}".NODE_ENV!=="production"&&d!==void 0&&(C=d==="client");var O=_S("style",x,function(){var L=x.join("|");if(pre(L)){var F=gre(L),W=je(F,2),B=W[0],G=W[1];if(B)return[B,S,G,{},s,c]}var ne=t(),fe=bre(ne,{hashId:o,hashPriority:v,layer:a,path:r.join("-"),transformers:y,linters:w}),D=je(fe,2),R=D[0],T=D[1],N=_m(R),I=yre(x,N);return[N,S,I,T,s,c]},function(L,F){var W=je(L,3),B=W[2];(F||f)&&Cm&&vb(B,{mark:zr})},function(L){var F=je(L,4),W=F[0];F[1];var B=F[2],G=F[3];if(C&&W!==kS){var ne={mark:zr,prepend:"queue",attachTo:g,priority:c},fe=typeof i=="function"?i():i;fe&&(ne.csp={nonce:fe});var D=ci(W,B,ne);D[Fo]=_.instanceId,D.setAttribute(Of,S),"{}".NODE_ENV!=="production"&&D.setAttribute(mne,x.join("|")),Object.keys(G).forEach(function(R){ci(_m(G[R]),"_effect-".concat(R),ne)})}}),$=je(O,3),k=$[0],P=$[1],j=$[2];return function(L){var F;if(!m||C||!h)F=p(xre,{});else{var W;F=p("style",{...(W={},ve(W,Of,P),ve(W,zr,j),W),dangerouslySetInnerHTML:{__html:k}})}return M(vt,{children:[F,L]})}}function mo(e){return e.notSplit=!0,e}mo(["borderTop","borderBottom"]),mo(["borderTop"]),mo(["borderBottom"]),mo(["borderLeft","borderRight"]),mo(["borderLeft"]),mo(["borderRight"]);var wre=b.createContext({});const Sre=wre;function Nf(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function jS(e,t,n,r){if(!t.length)return n;var o=hx(t),a=o[0],i=o.slice(1),s;return!e&&typeof a=="number"?s=[]:Array.isArray(e)?s=Cr(e):s=Q({},e),r&&n===void 0&&i.length===1?delete s[a][i[0]]:s[a]=jS(s[a],i,n,r),s}function cu(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Nf(e,t.slice(0,-1))?e:jS(e,t,n,r)}function Cre(e){return Ie(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Om(e){return Array.isArray(e)?[]:{}}var _re=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ore(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Om(t[0]);return t.forEach(function(o){function a(i,s){var l=new Set(s),c=Nf(o,i),u=Array.isArray(c);if(u||Cre(c)){if(!l.has(c)){l.add(c);var f=Nf(r,i);u?r=cu(r,i,[]):(!f||Ie(f)!=="object")&&(r=cu(r,i,Om(c))),_re(c).forEach(function(d){a([].concat(Cr(i),[d]),l)})}}else r=cu(r,i,c)}a([])}),r}function Ere(){}let DS=Ere;"{}".NODE_ENV!=="production"&&(DS=(e,t,n)=>{_r(e,`[antd: ${t}] ${n}`),"{}".NODE_ENV==="test"&&ub()});const Qi=DS,Rre=b.createContext(void 0),$re={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var Tre={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const Pre={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},IS=Pre,kre={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Tre),timePickerLocale:Object.assign({},IS)},Em=kre,zt="${label} is not a valid ${type}",Nre={locale:"en",Pagination:$re,DatePicker:Em,TimePicker:IS,Calendar:Em,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:zt,method:zt,array:zt,object:zt,number:zt,date:zt,boolean:zt,integer:zt,float:zt,regexp:zt,email:zt,url:zt,hex:zt},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}},cc=Nre;Object.assign({},cc.Modal);let Us=[];const Rm=()=>Us.reduce((e,t)=>Object.assign(Object.assign({},e),t),cc.Modal);function Are(e){if(e){const t=Object.assign({},e);return Us.push(t),Rm(),()=>{Us=Us.filter(n=>n!==t),Rm()}}Object.assign({},cc.Modal)}const Mre=b.createContext(void 0),LS=Mre,BS="internalMark",FS=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&Qi(r===BS,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),Z.useEffect(()=>Are(t&&t.Modal),[t]);const o=Z.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return p(LS.Provider,{value:o,children:n})};"{}".NODE_ENV!=="production"&&(FS.displayName="LocaleProvider");const jre=FS,Dre=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Ire="5.8.5";var Rs=2,$m=.16,Lre=.05,Bre=.05,Fre=.15,zS=5,HS=4,zre=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Tm(e){var t=e.r,n=e.g,r=e.b,o=Gs(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function $s(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Ks(t,n,r,!1))}function Hre(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Pm(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Rs*t:Math.round(e.h)+Rs*t:r=n?Math.round(e.h)+Rs*t:Math.round(e.h)-Rs*t,r<0?r+=360:r>=360&&(r-=360),r}function km(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-$m*t:t===HS?r=e.s+$m:r=e.s+Lre*t,r>1&&(r=1),n&&t===zS&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Nm(e,t,n){var r;return n?r=e.v+Bre*t:r=e.v-Fre*t,r>1&&(r=1),Number(r.toFixed(2))}function aa(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=vn(e),o=zS;o>0;o-=1){var a=Tm(r),i=$s(vn({h:Pm(a,o,!0),s:km(a,o,!0),v:Nm(a,o,!0)}));n.push(i)}n.push($s(r));for(var s=1;s<=HS;s+=1){var l=Tm(r),c=$s(vn({h:Pm(l,s),s:km(l,s),v:Nm(l,s)}));n.push(c)}return t.theme==="dark"?zre.map(function(u){var f=u.index,d=u.opacity,h=$s(Hre(vn(t.backgroundColor||"#141414"),vn(n[f]),d*100));return h}):n}var uu={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},fu={},du={};Object.keys(uu).forEach(function(e){fu[e]=aa(uu[e]),fu[e].primary=fu[e][5],du[e]=aa(uu[e],{theme:"dark",backgroundColor:"#141414"}),du[e].primary=du[e][5]});const Vre=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Ure=Vre;function Wre(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const VS={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Gre=Object.assign(Object.assign({},VS),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
188
283
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
189
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),
|
|
284
|
+
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),uc=Gre;function Kre(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,f=n(l),d=n(o),h=n(a),v=n(i),g=n(s),m=r(c,u),y=e.colorLink||e.colorInfo,w=n(y);return Object.assign(Object.assign({},m),{colorPrimaryBg:f[1],colorPrimaryBgHover:f[2],colorPrimaryBorder:f[3],colorPrimaryBorderHover:f[4],colorPrimaryHover:f[5],colorPrimary:f[6],colorPrimaryActive:f[7],colorPrimaryTextHover:f[8],colorPrimaryText:f[9],colorPrimaryTextActive:f[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],colorBgMask:new Gt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const qre=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}},Xre=qre;function Yre(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},Xre(r))}const er=(e,t)=>new Gt(e).setAlpha(t).toRgbString(),Ua=(e,t)=>new Gt(e).darken(t).toHexString(),Jre=e=>{const t=aa(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Qre=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:er(r,.88),colorTextSecondary:er(r,.65),colorTextTertiary:er(r,.45),colorTextQuaternary:er(r,.25),colorFill:er(r,.15),colorFillSecondary:er(r,.06),colorFillTertiary:er(r,.04),colorFillQuaternary:er(r,.02),colorBgLayout:Ua(n,4),colorBgContainer:Ua(n,0),colorBgElevated:Ua(n,0),colorBgSpotlight:er(r,.85),colorBorder:Ua(n,15),colorBorderSecondary:Ua(n,6)}};function Zre(e){const t=new Array(10).fill(null).map((n,r)=>{const o=r-1,a=e*Math.pow(2.71828,o/5),i=r>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>{const r=n+8;return{size:n,lineHeight:r/n}})}const eoe=e=>{const t=Zre(e),n=t.map(o=>o.size),r=t.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}},toe=eoe;function noe(e){const t=Object.keys(VS).map(n=>{const r=aa(e[n]);return new Array(10).fill(1).reduce((o,a,i)=>(o[`${n}-${i+1}`]=r[i],o[`${n}${i+1}`]=r[i],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),Kre(e,{generateColorPalettes:Jre,generateNeutralColorPalettes:Qre})),toe(e.fontSize)),Wre(e)),Ure(e)),Yre(e))}const US=Ef(noe),WS={token:uc,hashed:!0},GS=b.createContext(WS);function hu(e){return e>=0&&e<=255}function Ts(e,t){const{r:n,g:r,b:o,a}=new Gt(e).toRgb();if(a<1)return e;const{r:i,g:s,b:l}=new Gt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),f=Math.round((r-s*(1-c))/c),d=Math.round((o-l*(1-c))/c);if(hu(u)&&hu(f)&&hu(d))return new Gt({r:u,g:f,b:d,a:Math.round(c*100)/100}).toRgbString()}return new Gt({r:n,g:r,b:o,a:1}).toRgbString()}var roe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function KS(e){const{override:t}=e,n=roe(e,["override"]),r=Object.assign({},t);Object.keys(uc).forEach(d=>{delete r[d]});const o=Object.assign(Object.assign({},n),r),a=480,i=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const d="0s";o.motionDurationFast=d,o.motionDurationMid=d,o.motionDurationSlow=d}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Ts(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Ts(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Ts(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*4,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Ts(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
190
285
|
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
191
286
|
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
192
287
|
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
@@ -199,9 +294,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
199
294
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
200
295
|
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
201
296
|
`,screenXS:a,screenXSMin:a,screenXSMax:i-1,screenSM:i,screenSMMin:i,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
|
202
|
-
0 1px 2px -2px ${new
|
|
203
|
-
0 3px 6px 0 ${new
|
|
204
|
-
0 5px 12px 4px ${new
|
|
297
|
+
0 1px 2px -2px ${new Gt("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
298
|
+
0 3px 6px 0 ${new Gt("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
299
|
+
0 5px 12px 4px ${new Gt("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
205
300
|
`,boxShadowDrawerRight:`
|
|
206
301
|
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
207
302
|
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
@@ -218,31 +313,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
218
313
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
219
314
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
220
315
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
221
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}function
|
|
222
|
-
&:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),
|
|
316
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var Am=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const qS=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,a=Am(t,["override"]);let i=Object.assign(Object.assign({},r),{override:o});return i=KS(i),a&&Object.entries(a).forEach(s=>{let[l,c]=s;const{theme:u}=c,f=Am(c,["theme"]);let d=f;u&&(d=qS(Object.assign(Object.assign({},i),f),{override:f},u)),i[l]=d}),i};function Jh(){const{token:e,hashed:t,theme:n,components:r}=b.useContext(GS),o=`${Ire}-${t||""}`,a=n||US,[i,s]=Gne(a,[uc,e],{salt:o,override:Object.assign({override:e},r),getComputedToken:qS,formatToken:KS});return[a,i,t?s:""]}function Ws(e){var t=Z.useRef(!1),n=Z.useState(e),r=je(n,2),o=r[0],a=r[1];Z.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,l){l&&t.current||a(s)}return[o,i]}function ooe(e,t){typeof e=="function"?e(t):Ie(e)==="object"&&e&&"current"in e&&(e.current=t)}function aoe(e){var t,n,r=Rh.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}const XS="anticon",ioe=(e,t)=>t||(e?`ant-${e}`:"ant"),Zi=Z.createContext({getPrefixCls:ioe,iconPrefixCls:XS}),soe=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),loe=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),coe=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},[`&:active,
|
|
317
|
+
&:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),uoe=(e,t)=>{const{fontFamily:n,fontSize:r}=e,o=`[class^="${t}"], [class*=" ${t}"]`;return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},YS="{}".NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let Af=!0;function Mf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!YS)return Object.assign.apply(Object,[{}].concat(t));Af=!1;const r={};return t.forEach(o=>{Object.keys(o).forEach(i=>{Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:()=>o[i]})})}),Af=!0,r}const Mm={};function foe(){}function doe(e){let t,n=e,r=foe;return YS&&(t=new Set,n=new Proxy(e,{get(o,a){return Af&&t.add(a),o[a]}}),r=(o,a)=>{var i;Mm[o]={global:Array.from(t),component:Object.assign(Object.assign({},(i=Mm[o])===null||i===void 0?void 0:i.component),a)}}),{token:n,keys:t,flush:r}}const hoe=(e,t)=>{const[n,r]=Jh();return kf({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},loe()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},JS=hoe;function poe(e,t,n,r){const o=Array.isArray(e)?e:[e,e],[a]=o,i=o.join("-");return s=>{const[l,c,u]=Jh(),{getPrefixCls:f,iconPrefixCls:d,csp:h}=b.useContext(Zi),v=f(),g={theme:l,token:c,hashId:u,nonce:()=>h==null?void 0:h.nonce,clientOnly:r==null?void 0:r.clientOnly,order:-999};return kf(Object.assign(Object.assign({},g),{clientOnly:!1,path:["Shared",v]}),()=>[{"&":coe(c)}]),JS(d),[kf(Object.assign(Object.assign({},g),{path:[i,s,d]}),()=>{const{token:m,flush:y}=doe(c),w=Object.assign({},c[a]);if(r!=null&&r.deprecatedTokens){const{deprecatedTokens:$}=r;$.forEach(k=>{let[P,j]=k;var L;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&_r(!(w!=null&&w[P]),`The token '${String(P)}' of ${a} had deprecated, use '${String(j)}' instead.`),(w!=null&&w[P]||w!=null&&w[j])&&((L=w[j])!==null&&L!==void 0||(w[j]=w==null?void 0:w[P]))})}const _=typeof n=="function"?n(Mf(m,w??{})):n,S=Object.assign(Object.assign({},_),w),x=`.${s}`,C=Mf(m,{componentCls:x,prefixCls:s,iconCls:`.${d}`,antCls:`.${v}`},S),O=t(C,{hashId:u,prefixCls:s,rootPrefixCls:v,iconPrefixCls:d,overrideComponentToken:w});return y(a,S),[(r==null?void 0:r.resetStyle)===!1?null:uoe(c,s),O]}),u]}}function goe(e,t){return Dre.reduce((n,r)=>{const o=e[`${r}1`],a=e[`${r}3`],i=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:s}))},{})}const voe=`-ant-${Date.now()}-${Math.random()}`;function moe(e,t){const n={},r=(i,s)=>{let l=i.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(i,s)=>{const l=new Gt(i),c=aa(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");const i=new Gt(t.primaryColor),s=aa(i.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(i,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(i,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(i,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(i,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(i,c=>c.setAlpha(c.getAlpha()*.12));const l=new Gt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
|
|
223
318
|
:root {
|
|
224
319
|
${Object.keys(n).map(i=>`--${e}-${i}: ${n[i]};`).join(`
|
|
225
320
|
`)}
|
|
226
321
|
}
|
|
227
|
-
`.trim()}function x4(e,t){const n=S4(e,t);en()?Do(n,`${w4}-dynamic-theme`):"{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Vl=W.createContext(!1),C4=e=>{let{children:t,disabled:n}=e;const r=W.useContext(Vl);return w(Vl.Provider,{value:n??r,children:t})},O4=Vl,E4=e=>{const t=g.useContext(Ki);return g.useMemo(()=>e?typeof e=="string"?e??t:e instanceof Function?e(t):t:t,[e,t])},_4=E4,Cy=W.createContext(void 0),R4=e=>{let{children:t,size:n}=e;const r=_4(n);return w(Cy.Provider,{value:r,children:t})},Ki=Cy;function N4(){const e=g.useContext(O4),t=g.useContext(Ki);return{componentDisabled:e,componentSize:t}}function T4(e,t){const n=e||{},r=n.inherit===!1||!t?Sy:t;return Xm(()=>{if(!e)return t;const a=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(i=>{a[i]=Object.assign(Object.assign({},a[i]),e.components[i])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:a})},[n,r],(a,i)=>a.some((s,l)=>{const c=i[l];return!_L(s,c,!0)}))}function P4(e){return e instanceof HTMLElement||e instanceof SVGElement}function k4(e){return P4(e)?e:e instanceof g.Component?Lt.findDOMNode(e):null}var Fl={exports:{}},he={};/** @license React v16.13.1
|
|
228
|
-
* react-is.production.min.js
|
|
229
|
-
*
|
|
230
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
231
|
-
*
|
|
232
|
-
* This source code is licensed under the MIT license found in the
|
|
233
|
-
* LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/var jp;function j4(){if(jp)return he;jp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var O=v.$$typeof;switch(O){case t:switch(v=v.type,v){case l:case c:case r:case a:case o:case d:return v;default:switch(v=v&&v.$$typeof,v){case s:case u:case h:case p:case i:return v;default:return O}}case n:return O}}}function x(v){return E(v)===c}return he.AsyncMode=l,he.ConcurrentMode=c,he.ContextConsumer=s,he.ContextProvider=i,he.Element=t,he.ForwardRef=u,he.Fragment=r,he.Lazy=h,he.Memo=p,he.Portal=n,he.Profiler=a,he.StrictMode=o,he.Suspense=d,he.isAsyncMode=function(v){return x(v)||E(v)===l},he.isConcurrentMode=x,he.isContextConsumer=function(v){return E(v)===s},he.isContextProvider=function(v){return E(v)===i},he.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},he.isForwardRef=function(v){return E(v)===u},he.isFragment=function(v){return E(v)===r},he.isLazy=function(v){return E(v)===h},he.isMemo=function(v){return E(v)===p},he.isPortal=function(v){return E(v)===n},he.isProfiler=function(v){return E(v)===a},he.isStrictMode=function(v){return E(v)===o},he.isSuspense=function(v){return E(v)===d},he.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===a||v===o||v===d||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===p||v.$$typeof===i||v.$$typeof===s||v.$$typeof===u||v.$$typeof===b||v.$$typeof===y||v.$$typeof===S||v.$$typeof===m)},he.typeOf=E,he}var ge={};/** @license React v16.13.1
|
|
235
|
-
* react-is.development.js
|
|
236
|
-
*
|
|
237
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the MIT license found in the
|
|
240
|
-
* LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/var Mp;function M4(){return Mp||(Mp=1,"{}".NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===a||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===h||z.$$typeof===p||z.$$typeof===i||z.$$typeof===s||z.$$typeof===u||z.$$typeof===b||z.$$typeof===y||z.$$typeof===S||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var Xe=z.$$typeof;switch(Xe){case t:var Le=z.type;switch(Le){case l:case c:case r:case a:case o:case d:return Le;default:var $e=Le&&Le.$$typeof;switch($e){case s:case u:case h:case p:case i:return $e;default:return Xe}}case n:return Xe}}}var v=l,O=c,C=s,R=i,N=t,T=u,k=r,j=h,L=p,M=n,P=a,D=o,F=d,ne=!1;function Z(z){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ue(z)||x(z)===l}function ue(z){return x(z)===c}function A(z){return x(z)===s}function I(z){return x(z)===i}function G(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function te(z){return x(z)===u}function ie(z){return x(z)===r}function de(z){return x(z)===h}function we(z){return x(z)===p}function fe(z){return x(z)===n}function Ee(z){return x(z)===a}function re(z){return x(z)===o}function De(z){return x(z)===d}ge.AsyncMode=v,ge.ConcurrentMode=O,ge.ContextConsumer=C,ge.ContextProvider=R,ge.Element=N,ge.ForwardRef=T,ge.Fragment=k,ge.Lazy=j,ge.Memo=L,ge.Portal=M,ge.Profiler=P,ge.StrictMode=D,ge.Suspense=F,ge.isAsyncMode=Z,ge.isConcurrentMode=ue,ge.isContextConsumer=A,ge.isContextProvider=I,ge.isElement=G,ge.isForwardRef=te,ge.isFragment=ie,ge.isLazy=de,ge.isMemo=we,ge.isPortal=fe,ge.isProfiler=Ee,ge.isStrictMode=re,ge.isSuspense=De,ge.isValidElementType=E,ge.typeOf=x}()),ge}"{}".NODE_ENV==="production"?Fl.exports=j4():Fl.exports=M4();var A4=Fl.exports;function D4(e,t){typeof e=="function"?e(t):Oe(e)==="object"&&e&&"current"in e&&(e.current=t)}function $4(e){var t,n,r=A4.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}var I4=["children"],Oy=W.createContext({});function L4(e){var t=e.children,n=Rr(e,I4);return w(Oy.Provider,{value:n,children:t})}function B4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ey(e){var t=B4();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}var z4=function(e){Zr(n,e);var t=Ey(n);function n(){return nt(this,n),t.apply(this,arguments)}return rt(n,[{key:"render",value:function(){return this.props.children}}]),n}(W.Component),Un="none",Va="appear",Fa="enter",Ha="leave",Ap="none",It="prepare",Cr="start",Or="active",mu="end",_y="prepared";function Dp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function V4(e,t){var n={animationend:Dp("Animation","AnimationEnd"),transitionend:Dp("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var F4=V4(en(),typeof window<"u"?window:{}),Ry={};if(en()){var H4=document.createElement("div");Ry=H4.style}var Ua={};function Ny(e){if(Ua[e])return Ua[e];var t=F4[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in Ry)return Ua[e]=t[a],Ua[e]}return""}var Ty=Ny("animationend"),Py=Ny("transitionend"),ky=!!(Ty&&Py),$p=Ty||"animationend",Ip=Py||"transitionend";function Lp(e,t){if(!e)return null;if(Oe(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const U4=function(e){var t=g.useRef(),n=g.useRef(e);n.current=e;var r=W.useCallback(function(i){n.current(i)},[]);function o(i){i&&(i.removeEventListener(Ip,r),i.removeEventListener($p,r))}function a(i){t.current&&t.current!==i&&o(t.current),i&&i!==t.current&&(i.addEventListener(Ip,r),i.addEventListener($p,r),t.current=i)}return W.useEffect(function(){return function(){o(t.current)}},[]),[a,o]};var jy=en()?g.useLayoutEffect:g.useEffect,My=function(t){return+setTimeout(t,16)},Ay=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(My=function(t){return window.requestAnimationFrame(t)},Ay=function(t){return window.cancelAnimationFrame(t)});var Bp=0,yu=new Map;function Dy(e){yu.delete(e)}var Hl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Bp+=1;var r=Bp;function o(a){if(a===0)Dy(r),t();else{var i=My(function(){o(a-1)});yu.set(r,i)}}return o(n),r};Hl.cancel=function(e){var t=yu.get(e);return Dy(t),Ay(t)};const W4=function(){var e=W.useRef(null);function t(){Hl.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Hl(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a}return W.useEffect(function(){return function(){t()}},[]),[n,t]};var G4=[It,Cr,Or,mu],K4=[It,_y],$y=!1,q4=!0;function Iy(e){return e===Or||e===mu}const Y4=function(e,t,n){var r=Ja(Ap),o=Ce(r,2),a=o[0],i=o[1],s=W4(),l=Ce(s,2),c=l[0],u=l[1];function d(){i(It,!0)}var f=t?K4:G4;return jy(function(){if(a!==Ap&&a!==mu){var p=f.indexOf(a),h=f[p+1],m=n(a);m===$y?i(h,!0):h&&c(function(b){function y(){b.isCanceled()||i(h,!0)}m===!0?y():Promise.resolve(m).then(y)})}},[e,a]),W.useEffect(function(){return function(){u()}},[]),[d,a]};function X4(e,t,n,r){var o=r.motionEnter,a=o===void 0?!0:o,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,h=r.onLeavePrepare,m=r.onAppearStart,b=r.onEnterStart,y=r.onLeaveStart,S=r.onAppearActive,E=r.onEnterActive,x=r.onLeaveActive,v=r.onAppearEnd,O=r.onEnterEnd,C=r.onLeaveEnd,R=r.onVisibleChanged,N=Ja(),T=Ce(N,2),k=T[0],j=T[1],L=Ja(Un),M=Ce(L,2),P=M[0],D=M[1],F=Ja(null),ne=Ce(F,2),Z=ne[0],ue=ne[1],A=g.useRef(!1),I=g.useRef(null);function G(){return n()}var te=g.useRef(!1);function ie(){D(Un,!0),ue(null,!0)}function de(Me){var me=G();if(!(Me&&!Me.deadline&&Me.target!==me)){var Ae=te.current,Ge;P===Va&&Ae?Ge=v==null?void 0:v(me,Me):P===Fa&&Ae?Ge=O==null?void 0:O(me,Me):P===Ha&&Ae&&(Ge=C==null?void 0:C(me,Me)),P!==Un&&Ae&&Ge!==!1&&ie()}}var we=U4(de),fe=Ce(we,1),Ee=fe[0],re=function(me){var Ae,Ge,Kt;switch(me){case Va:return Ae={},ae(Ae,It,f),ae(Ae,Cr,m),ae(Ae,Or,S),Ae;case Fa:return Ge={},ae(Ge,It,p),ae(Ge,Cr,b),ae(Ge,Or,E),Ge;case Ha:return Kt={},ae(Kt,It,h),ae(Kt,Cr,y),ae(Kt,Or,x),Kt;default:return{}}},De=W.useMemo(function(){return re(P)},[P]),z=Y4(P,!e,function(Me){if(Me===It){var me=De[It];return me?me(G()):$y}if($e in De){var Ae;ue(((Ae=De[$e])===null||Ae===void 0?void 0:Ae.call(De,G(),null))||null)}return $e===Or&&(Ee(G()),u>0&&(clearTimeout(I.current),I.current=setTimeout(function(){de({deadline:!0})},u))),$e===_y&&ie(),q4}),Xe=Ce(z,2),Le=Xe[0],$e=Xe[1],vt=Iy($e);te.current=vt,jy(function(){j(t);var Me=A.current;A.current=!0;var me;!Me&&t&&s&&(me=Va),Me&&t&&a&&(me=Fa),(Me&&!t&&c||!Me&&d&&!t&&c)&&(me=Ha);var Ae=re(me);me&&(e||Ae[It])?(D(me),Le()):D(Un)},[t]),g.useEffect(function(){(P===Va&&!s||P===Fa&&!a||P===Ha&&!c)&&D(Un)},[s,a,c]),g.useEffect(function(){return function(){A.current=!1,clearTimeout(I.current)}},[]);var an=W.useRef(!1);g.useEffect(function(){k&&(an.current=!0),k!==void 0&&P===Un&&((an.current||k)&&(R==null||R(k)),an.current=!0)},[k,P]);var sn=Z;return De[It]&&$e===Cr&&(sn=H({transition:"none"},sn)),[P,$e,sn,k??t]}function J4(e){var t=e;Oe(e)==="object"&&(t=e.transitionSupport);function n(o,a){return!!(o.motionName&&t&&a!==!1)}var r=W.forwardRef(function(o,a){var i=o.visible,s=i===void 0?!0:i,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,h=o.eventProps,m=W.useContext(Oy),b=m.motion,y=n(o,b),S=g.useRef(),E=g.useRef();function x(){try{return S.current instanceof HTMLElement?S.current:k4(E.current)}catch{return null}}var v=X4(y,s,x,o),O=Ce(v,4),C=O[0],R=O[1],N=O[2],T=O[3],k=W.useRef(T);T&&(k.current=!0);var j=W.useCallback(function(ue){S.current=ue,D4(a,ue)},[a]),L,M=H(H({},h),{},{visible:s});if(!d)L=null;else if(C===Un)T?L=d(H({},M),j):!c&&k.current&&p?L=d(H(H({},M),{},{className:p}),j):u||!c&&!p?L=d(H(H({},M),{},{style:{display:"none"}}),j):L=null;else{var P,D;R===It?D="prepare":Iy(R)?D="active":R===Cr&&(D="start");var F=Lp(f,"".concat(C,"-").concat(D));L=d(H(H({},M),{},{className:Ql(Lp(f,C),(P={},ae(P,F,F&&D),ae(P,f,typeof f=="string"),P)),style:N}),j)}if(W.isValidElement(L)&&$4(L)){var ne=L,Z=ne.ref;Z||(L=W.cloneElement(L,{ref:j}))}return w(z4,{ref:E,children:L})});return r.displayName="CSSMotion",r}const Q4=J4(ky);var Ul="add",Wl="keep",Gl="remove",zs="removed";function Z4(e){var t;return e&&Oe(e)==="object"&&"key"in e?t=e:t={key:e},H(H({},t),{},{key:String(t.key)})}function Kl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Z4)}function e5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,a=Kl(e),i=Kl(t);a.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=i[d];if(f.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(p){return H(H({},p),{},{status:Ul})})),r=d),n.push(H(H({},f),{},{status:Wl})),r+=1,u=!0;break}}u||n.push(H(H({},c),{},{status:Gl}))}),r<o&&(n=n.concat(i.slice(r).map(function(c){return H(H({},c),{},{status:Ul})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Gl}),n.forEach(function(u){u.key===c&&(u.status=Wl)})}),n}var t5=["component","children","onVisibleChanged","onAllRemoved"],n5=["status"],r5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function o5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q4,n=function(r){Zr(a,r);var o=Ey(a);function a(){var i;nt(this,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=o.call.apply(o,[this].concat(l)),ae(Jt(i),"state",{keyEntities:[]}),ae(Jt(i),"removeKey",function(u){var d=i.state.keyEntities,f=d.map(function(p){return p.key!==u?p:H(H({},p),{},{status:zs})});return i.setState({keyEntities:f}),f.filter(function(p){var h=p.status;return h!==zs}).length}),i}return rt(a,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged,p=c.onAllRemoved,h=Rr(c,t5),m=u||W.Fragment,b={};return r5.forEach(function(y){b[y]=h[y],delete h[y]}),delete h.keys,w(m,{...h,children:l.map(function(y){var S=y.status,E=Rr(y,n5),x=S===Ul||S===Wl;return g.createElement(t,{...b,key:E.key,visible:x,eventProps:E,onVisibleChanged:function(O){if(f==null||f(O,{key:E.key}),!O){var C=s.removeKey(E.key);C===0&&p&&p()}}},d)})})}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Kl(c),f=e5(u,d);return{keyEntities:f.filter(function(p){var h=u.find(function(m){var b=m.key;return p.key===b});return!(h&&h.status===zs&&p.status===Gl)})}}}]),a}(W.Component);return ae(n,"defaultProps",{component:"div"}),n}o5(ky);function a5(e){const{children:t}=e,[,n]=vu(),{motion:r}=n,o=W.useRef(!1);return o.current=o.current||r===!1,o.current?w(L4,{motion:r,children:t}):t}const i5=(e,t)=>{const[n,r]=vu();return Il({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},f4()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},s5=i5;var l5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const c5=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"],u5="ant";let Ly;function d5(){return Ly||u5}function f5(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const p5=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(Ly=t),r&&f5(r)&&("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),x4(d5(),r))},h5=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,form:o,locale:a,componentSize:i,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,popupMatchSelectWidth:d,popupOverflow:f,legacyLocale:p,parentContext:h,iconPrefixCls:m,theme:b,componentDisabled:y}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(u===void 0,"ConfigProvider","`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");const S=W.useCallback((P,D)=>{const{prefixCls:F}=e;if(D)return D;const ne=F||h.getPrefixCls("");return P?`${ne}-${P}`:ne},[h.getPrefixCls,e.prefixCls]),E=m||h.iconPrefixCls||by,x=E!==h.iconPrefixCls,v=n||h.csp,O=s5(E,v),C=T4(b,h.theme),R={csp:v,autoInsertSpaceInButton:r,locale:a||p,direction:s,space:l,virtual:c,popupMatchSelectWidth:d??u,popupOverflow:f,getPrefixCls:S,iconPrefixCls:E,theme:C},N=Object.assign({},h);Object.keys(R).forEach(P=>{R[P]!==void 0&&(N[P]=R[P])}),c5.forEach(P=>{const D=e[P];D&&(N[P]=D)});const T=Xm(()=>N,N,(P,D)=>{const F=Object.keys(P),ne=Object.keys(D);return F.length!==ne.length||F.some(Z=>P[Z]!==D[Z])}),k=W.useMemo(()=>({prefixCls:E,csp:v}),[E,v]);let j=x?O(t):t;const L=W.useMemo(()=>{var P,D,F;return k3(((P=gu.Form)===null||P===void 0?void 0:P.defaultValidateMessages)||{},((F=(D=T.locale)===null||D===void 0?void 0:D.Form)===null||F===void 0?void 0:F.defaultValidateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[T,o==null?void 0:o.validateMessages]);Object.keys(L).length>0&&(j=w(M3.Provider,{value:L,children:t})),a&&(j=w(z3,{locale:a,_ANT_MARK__:hy,children:j})),(E||v)&&(j=w(N3.Provider,{value:k,children:j})),i&&(j=w(R4,{size:i,children:j})),j=w(a5,{children:j});const M=W.useMemo(()=>{const P=C||{},{algorithm:D,token:F}=P,ne=l5(P,["algorithm","token"]),Z=D&&(!Array.isArray(D)||D.length>0)?cy(D):void 0;return Object.assign(Object.assign({},ne),{theme:Z,token:Object.assign(Object.assign({},Gi),F)})},[C]);return b&&(j=w(xy.Provider,{value:M,children:j})),y!==void 0&&(j=w(C4,{disabled:y,children:j})),w(ca.Provider,{value:T,children:j})},lo=e=>{const t=W.useContext(ca),n=W.useContext(py);return w(h5,{...Object.assign({parentContext:t,legacyLocale:n},e)})};lo.ConfigContext=ca;lo.SizeContext=Ki;lo.config=p5;lo.useConfig=N4;Object.defineProperty(lo,"SizeContext",{get:()=>("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Ki)});"{}".NODE_ENV!=="production"&&(lo.displayName="ConfigProvider");function g5(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Wa=(e,t,n)=>{const r=g5(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},v5=e=>y4(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),m5=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o}=e,a=r-n,i=t-n;return{[o]:Object.assign(Object.assign({},d4(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},y5=g4("Tag",e=>{const{lineWidth:t,fontSizeIcon:n}=e,r=e.fontSizeSM,o=`${e.lineHeightSM*r}px`,a=zl(e,{tagFontSize:r,tagLineHeight:o,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[m5(a),v5(a),Wa(a,"success","Success"),Wa(a,"processing","Info"),Wa(a,"error","Error"),Wa(a,"warning","Warning")]},e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText}));var b5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const w5=e=>{const{prefixCls:t,className:n,checked:r,onChange:o,onClick:a}=e,i=b5(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=W.useContext(ca),l=p=>{o==null||o(!r),a==null||a(p)},c=s("tag",t),[u,d]=y5(c),f=Ql(c,{[`${c}-checkable`]:!0,[`${c}-checkable-checked`]:r},n,d);return u(w("span",{...Object.assign({},i,{className:f,onClick:l})}))},S5=w5,x5="_cssFieldBox_4b8an_2",C5="_inputAuto_4b8an_20",O5="_active_4b8an_23",E5="_cssBox_4b8an_27",br={cssFieldBox:x5,inputAuto:C5,active:O5,cssBox:E5},_5=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Vs=z6.map(e=>({value:e})),zp=g.forwardRef(function(t,n){const[r,o]=g.useState(""),[a,i]=g.useState(""),{mode:s="edit"}=t,l=g.useMemo(()=>s==="create",[s]),[c,u]=g.useState({key:t.value.key,value:t.value.value});g.useEffect(()=>{u(t.value)},[t.value]);const[d,f]=g.useState(Vs),[p,h]=g.useState([]),[m,b]=g.useState([]),y=M=>{const P=Vs.filter(D=>D.value.includes(M));f(M?P:Vs)},S=()=>{var D;let M=[];const P=Km[c.key];P&&(M=((D=P.values)==null?void 0:D.map(F=>({value:F})))||[]),h(M),b(M)},E=M=>{const P=m.filter(D=>D.value.includes(M));h(M?P:m)},x=()=>t.allValues.find(M=>M.key===c.key)?(Y.message.error(`${c.key} is exits`),o("error"),!1):!0,v=()=>{var M;l?c.value?(M=t.onCreate)==null||M.call(t,c):i("error"):C()},O=()=>{o(""),i(""),t.onValueChange({...c})},{run:C}=su(O,{wait:20}),[R,N]=g.useState(0);g.useEffect(()=>{_5(c.key,13.33).then(M=>{let P=parseFloat(M);c.key===""&&(P=200),N(P+6)})},[c.key]);const T=g.useRef(null),k=g.useRef(null),[j,L]=g.useState({key:!1,value:!1});return g.useImperativeHandle(n,()=>({reset:()=>{var M;u({key:"",value:""}),(M=k.current)==null||M.focus()}}),[]),ee("div",{className:br.cssFieldBox,children:[w(Y.AutoComplete,{ref:k,bordered:!1,disabled:!l,onSearch:y,status:r,popupMatchSelectWidth:200,value:c.key,onChange:M=>{u({...c,key:M}),o("")},style:{width:`${R}px`},className:dt([l&&br.inputAuto,l&&j.key&&br.active]),onFocus:()=>{L({key:!0,value:!1})},onBlur:()=>{L({key:!1,value:!1}),x()},onKeyDown:M=>{var P;M.code==="Enter"&&x()&&((P=T.current)==null||P.focus())},placeholder:"property",options:d}),w("span",{children:":"}),w(Y.AutoComplete,{bordered:!1,ref:T,status:a,popupMatchSelectWidth:200,value:c.value,onChange:M=>{var P;S(),u({...c,value:M}),i(""),l||((P=t.onCreate)==null||P.call(t,c),C())},style:{flex:1},onFocus:()=>{L({key:!1,value:!0})},onBlur:()=>{L({key:!1,value:!1}),C()},className:dt([br.inputAuto,j.value&&br.active]),placeholder:"value",onSearch:E,options:p,onKeyDown:M=>{M.code==="Enter"&&v()}}),t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var M;(M=t.onDelete)==null||M.call(t)},children:w(Oh,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(nc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:v})})]})}),Vp=g.forwardRef(function(t,n){const[r,o]=g.useState([]);g.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),g.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=g.useState({key:"",value:""}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=g.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:ee("div",{className:br.cssBox,children:[r.map((c,u)=>w("div",{children:w(zp,{mode:"edit",allValues:r,value:c,onValueChange:d=>{r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(zp,{allValues:r,mode:"create",value:a,ref:l,onCreate:c=>{var u;if(c.key&&c.value){const d=r.filter(f=>f.key!==c.key);d.push(c),o(d),s(d),(u=l.current)==null||u.reset(),i({key:"",value:""})}},onValueChange:c=>{i(c)}})]})})}),R5="_stateTag_5a8hc_2",N5="_stateTagClose_5a8hc_5",Fp={stateTag:R5,stateTagClose:N5},T5=["normal","hover","focus","focus-within","focus-visible","checked","disable","active"],Hp=T5.map(e=>({key:e,label:e})),P5=e=>{const[t,n]=g.useState("normal"),[r]=g.useState([{key:"991",maxWidth:"991",label:"Medial Query ( <= 991 px )"},{key:"767",maxWidth:"767",label:"Medial Query ( <= 767 px )"},{key:"479",maxWidth:"479",label:"Medial Query ( <= 479 px )"}]),o=g.useRef({}),a=b=>{n(b)},[i,s]=g.useState(["normal"]),l=g.useMemo(()=>Hp.filter(b=>!i.includes(b.key)),[i]),c=g.useMemo(()=>Hp.filter(b=>i.includes(b.key)),[i]),[u,d]=g.useState(e.initialValue??{});g.useEffect(()=>{const b=Object.keys(u);s(b)},[u]);const f=g.useMemo(()=>{const b=u==null?void 0:u[t];if(!b)return{};const y={};return Object.keys(b).forEach(S=>{y[S]=ti(b[S]||{}).normalProperty}),y},[t,u]),p=g.useCallback(()=>{Object.keys(o.current).forEach(b=>{var E;const y=(E=o.current)==null?void 0:E[b],S=f[b]||[];y&&y.setValue(S)})},[f]),h=g.useRef();h.current=p,e.handler&&(e.handler.current={setValue:async b=>{var y;d(b),await Tn(),(y=h.current)==null||y.call(h)}}),g.useEffect(()=>{p()},[t]);const m=g.useCallback((b,y)=>{var E;const S={...u,[t]:{...u[t]||{},[b]:rc(y)}};(E=e.onValueChange)==null||E.call(e,S)},[u,t]);return w(Ye,{children:ee(Y.Card,{size:"small",type:"inner",title:w("span",{style:{fontSize:"12px"},children:"CSS"}),extra:w(Y.Dropdown,{menu:{items:l,onClick:b=>{s(y=>[...y,b.key])}},children:w(nc,{})}),children:[w(Y.Space,{size:[0,8],wrap:!0,style:{paddingBottom:"10px"},children:c.map(b=>{const y=t.includes(b.key);return ee(S5,{style:{border:y?"1px solid rgba(0,0,0,0))":"1px solid rgb(216 216 216 / 82%)"},checked:y,onChange:()=>a(b.key),className:Fp.stateTag,children:[b.label,b.key!=="normal"&&w(j0,{className:Fp.stateTagClose,onClick:S=>{S.stopPropagation(),S.preventDefault(),s(E=>E.filter(x=>x!==b.key)),n("normal")}})]},b.key)})}),w(Y.Collapse,{defaultActiveKey:["normal"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"normal",label:w("span",{children:"Normal"}),children:w(Vp,{ref:b=>{o.current.normal=b},onValueChange:b=>m("normal",b),initialValue:f.normal})},...r.map(b=>({key:b.key,label:w("span",{children:b.label}),children:w(Vp,{ref:y=>{o.current[b.key]=y},onValueChange:y=>m(b.key,y)})}))]})]})})},k5=e=>{const t=g.useRef(null),n=e.node;if(!n)return w(Ye,{});const r=g.useRef(null),o=g.useRef(null),[a,i]=g.useState({}),s=g.useMemo(()=>ti(a),[a]),l=g.useRef();g.useEffect(()=>{const d=()=>{var b,y,S;l.current=n;const f=n.value.style||{};i(f);const{normalProperty:p,expressionProperty:h}=ti(f);(b=r.current)==null||b.setValue(p),(y=t.current)==null||y.setValue(h);const m=kh(n.value.css);(S=o.current)==null||S.setValue(m)};d(),n.emitter.on("onNodeChange",d),n.emitter.on("onReloadPage",d)},[n]);const c=d=>{const f=rc([...d]);i(f),n.value.style=f,n.updateValue()},u=d=>{n.value.css=Ph(`c_${n.id}`,d),n.updateValue()};return ee("div",{className:pp.visualPanelBox,children:[w("div",{style:{marginBottom:"10px"},children:w(CL,{onValueChange:d=>{n.value.classNames=d,n.updateValue()}})}),w(Y.Collapse,{defaultActiveKey:["origin-css-edit"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"origin-css-edit",label:w("span",{className:pp.header,children:"Style Variable Bind"}),children:w(SL,{ref:t,initialValue:s.expressionProperty,onValueChange:d=>{c([...s.normalProperty,...d])}})}]}),w(P5,{handler:o,onValueChange:u})]})},j5={key:"VisualPanelPlus",name:"Visual",view:({node:e,pluginCtx:t})=>w(k5,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.visual)!==!1}};class M5 extends g.Component{constructor(n){super(n);B(this,"addPanel",n=>{const r=[...this.state.panels,n];this.setState({panels:r}),this.updatePanels()});B(this,"removePanel",n=>{const r=this.state.panels.filter(o=>o.name!==n);this.setState({panels:r}),this.updatePanels()});B(this,"replacePanel",(n,r)=>{const o=this.state.panels.findIndex(i=>i.name===n),a=[...this.state.panels];o>-1&&(a[o]=r),this.setState({panels:a}),this.updatePanels()});B(this,"choosePanel",n=>{this.setState({activeKey:n}),this.updatePanels()});B(this,"updatePanels",()=>{var s,l,c;const{pluginCtx:n}=this.props,{node:r,panels:o}=this.state,a=o;let i={panels:[],displayPanels:[]};if(r){const u={node:r,pluginCtx:n},d=a.filter(p=>p.show===void 0?!0:p.show(u)),f=((c=(l=(s=r.material)==null?void 0:s.value.advanceCustom)==null?void 0:l.rightPanel)==null?void 0:c.customTabs)||[];d.concat(f),i={panels:a,displayPanels:d}}else i={panels:a,displayPanels:[]};return this.setState(i),i});B(this,"onNodeChange",({node:n})=>{var u;const{pluginCtx:r}=this.props,{panels:o,activeKey:a}=this.state,i={node:n,pluginCtx:r},s=o.filter(d=>d.show===void 0?!0:d.show(i)),l=((u=s.find((d,f)=>f===0))==null?void 0:u.key)||"";s.find(d=>d.key===a)?this.setState({node:n,displayPanels:s}):this.setState({activeKey:l,node:n,displayPanels:s})});this.state={node:n.pluginCtx.engine.getActiveNode(),activeKey:"Visual",panels:[Z6,j5,tL,iL],displayPanels:[]}}componentDidMount(){var i;const{pluginCtx:n}=this.props;n.globalEmitter.on("onSelectNodeChange",this.onNodeChange),n.pageModel.emitter.on("*",()=>{const s=n.engine.getActiveNode();this.onNodeChange({node:s})});const{displayPanels:r}=this.updatePanels(),o=((i=r.find((s,l)=>l===0))==null?void 0:i.key)||"";r.find(s=>s.key===this.state.activeKey)||this.setState({activeKey:o}),n.pluginReadyOk()}render(){const{displayPanels:n,node:r,activeKey:o}=this.state,{pluginCtx:a}=this.props;if(!r)return w("div",{style:{overflow:"hidden"},children:w(Y.Empty,{image:Y.Empty.PRESENTED_IMAGE_SIMPLE,description:"Please select a node from left view"})});const i={node:r,pluginCtx:a};return w("div",{className:lL.rightPanelContainer,children:w(Y.Tabs,{activeKey:o,tabPosition:"top",style:{flex:1,height:"100%"},onChange:s=>{this.setState({activeKey:s})},items:n.map(s=>{var l;return{label:w("div",{style:{padding:"0 10px"},children:typeof s.name=="string"?s.name:(l=s.name)==null?void 0:l.call(s,i)}),key:s.key,children:s.view(i)}})})})}}const A5="RightPanel",By=e=>{const t=g.createRef();return{name:A5,async init(n){n.getWorkbench().replaceRightView(w(M5,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:n=>t==null?void 0:t.current,meta:{engine:{version:"1.0.0"}}}},D5={pluginName:"全局状态"},$5={pluginName:"Global State"},Up={zh_CN:D5,en_US:$5},I5="_box_tl0hm_2",L5={box:I5},ql="GlobalState",Fs=`plugin:${ql}`,B5=e=>{const{pluginCtx:t}=e,n=t.pageModel.value.componentsTree.value.state||{};let r=!1;const o=g.useRef(null);g.useEffect(()=>{var i;(i=o==null?void 0:o.current)==null||i.setValue(JSON.stringify(n,null,2)),t.pageModel.emitter.on("onReloadPage",s=>{var l;if(console.log(s),r){r=!1;return}(l=o.current)==null||l.setValue(JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2))})},[]);const a=i=>{try{const s=JSON.parse(i||"{}");t.pageModel.value.componentsTree.value.state=s,r=!0,t.pageModel.value.componentsTree.updateValue()}catch(s){console.warn(s)}};return w("div",{className:L5.box,children:w(sa,{language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:i=>{o.current=i},onChange:a})})},zy={name:ql,async init(e){const{i18n:t}=e;Object.keys(Up).forEach(a=>{t.addResourceBundle(a,Fs,Up[a],!0,!0)});const n=Ir(Fs)(B5),r=Ir(Fs)(({t:a})=>w(Ye,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:ql,icon:w(b0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},z5=e=>{const t=e.pageModel.export(),{engineCtx:n}=e,[r,o]=g.useState(!1),a=g.useRef(null);return ee(Ye,{children:[w("div",{onClick:()=>{o(!0)},children:e.children}),w(Y.Modal,{open:r,title:"Source Schema",width:"100%",onCancel:()=>o(!1),onOk:async()=>{var d;o(!1);const i=(d=a.current)==null?void 0:d.getValue();if(!i)return;const s=JSON.parse(i);e.pageModel.updatePage(s),await Tn();const l=n.engine.getActiveNode(),c=await n.pluginManager.get("Designer"),u=(l==null?void 0:l.id)||"";c==null||c.ctx.emitter.on("ready",()=>{c.export.selectNode(u)}),c&&c.export.selectNode(u)},style:{height:"calc(100vh - 50px)",top:"25px"},destroyOnClose:!0,children:w("div",{style:{width:"100%",height:"calc(100vh - 200px)"},children:w(sa,{initialValue:JSON.stringify(t,null,2),language:"json",options:{automaticLayout:!0},onDidMount:i=>{a.current=i}})})})]})},V5="History",Vy=e=>{const t=e,n={historyRecords:[],currentStepIndex:0};let r=null;const o=e.pageModel.export();r=o,n.historyRecords.push(o);const a=async s=>{t&&(t.pageModel.reloadPage(s),await Tn())},i={addStep:()=>{const{currentStepIndex:s,historyRecords:l}=n,c=e.pageModel.export();s!==l.length-1&&(n.historyRecords=l.slice(0,s+1)),n.historyRecords.push(c),n.currentStepIndex=l.length-1},reset:async()=>{if(!t){console.warn("plugin ctx is null, pls check it");return}r&&(n.historyRecords=[],a(r))},preStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;if(!i.canGoPreStep())return;const c=s-1;n.currentStepIndex=c;const u=Df(l[c]);a(u)},nextStep:()=>{if(!i.canGoNextStep())return;const{currentStepIndex:s,historyRecords:l}=n,c=s+1;n.currentStepIndex=c;const u=Df(l[c]);return a(u)},canGoPreStep:()=>{const{currentStepIndex:s}=n;return!(s<=0)},canGoNextStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;return!(s>=l.length-1)}};return{name:V5,async init(s){s.pageModel.emitter.on("onNodeChange",()=>{i.addStep()}),s.pageModel.emitter.on("onPageChange",()=>{i.addStep()}),s.pluginReadyOk()},async destroy(s){console.log("destroy",s)},export:()=>i,meta:{engine:{version:"1.0.0"}}}},F5=[Wv,dD,Fv,zy,By,Vy],H5=Object.freeze(Object.defineProperty({__proto__:null,ComponentLibPlugin:Fv,DEFAULT_PLUGIN_LIST:F5,DesignerPlugin:Wv,DisplaySourceSchema:z5,GlobalStatePanelPlugin:zy,HistoryPlugin:Vy,RightPanelPlugin:By},Symbol.toStringTag,{value:"Module"})),pn={name:"$$attributes",title:"属性",valueType:"object",setters:[{componentName:"ArraySetter",props:{item:{setters:[{componentName:"ShapeSetter",props:{elements:[{name:"key",title:"属性名",valueType:"string",setters:["StringSetter"]},{name:"value",title:"值",valueType:"string",setters:["StringSetter","NumberSetter","JSONSetter","FunctionSetter","ExpressionSetter"]}],collapse:!1},initialValue:{}}],initialValue:{}}},initialValue:[]}]},vr={name:"width",title:"宽度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},mr={name:"height",title:"高度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},U5=be.HTMl_TAGS.map(e=>({title:Av(e),componentName:e,props:[pn],snippets:[]})),W5=[{title:"块",componentName:"CBlock",props:[vr,mr,{name:"children",title:"文本",valueType:"string",setters:["StringSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"块",snapshotText:"Block",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"容器",componentName:"CContainer",isContainer:!0,props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"容器",snapshotText:"Con",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"图片",componentName:"CImage",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},vr,mr,pn],groupName:"原子组件",snippets:[{title:"图片",snapshotText:"Img",category:"基础组件",schema:{props:{width:"300px",height:"150px"}}}]},{title:"视频",componentName:"CVideo",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],fixedProps:{autoPlay:!1},advanceCustom:{wrapComponent:e=>t=>w(e,{...t,style:{pointerEvents:"none",...t.style}})},groupName:"原子组件",snippets:[{title:"视频",snapshotText:"Video",category:"基础组件",schema:{props:{width:"300px",height:"150px",src:"https://vjs.zencdn.net/v/oceans.mp4"}}}]},{title:"音频",groupName:"原子组件",componentName:"CAudio",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],advanceCustom:{wrapComponent:()=>e=>w("div",{style:{display:"inline-block",fontSize:0},children:w("audio",{...e,style:{pointerEvents:"none",...e.style}})})},snippets:[{title:"音频",snapshotText:"Audio",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4",controls:!0}}}]},{title:"文本",componentName:"CText",groupName:"原子组件",props:[{name:"content",title:"内容",valueType:"string",setters:["TextAreaSetter","ExpressionSetter"]},pn],snippets:[{title:"文本",snapshotText:"Text",category:"基础组件",schema:{props:{content:"text"}}}]},{title:"Canvas",componentName:"CCanvas",props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",advanceCustom:{onNewAdd:async(e,t)=>{const n=e.getPlainProps(),r=Math.random().toString(32).slice(3,9);return n.$$attributes=[{key:"id",value:r},{key:"style",value:{display:"block",margin:"0 auto"}}],n.afterMount.value=n.afterMount.value.replace("$[id]",r),e.updateWithPlainObj({props:n}),{addNode:e}}},snippets:[{title:"画布",snapshotText:"Cavs",category:"基础组件",schema:{props:{width:"600px",height:"150px",style:{margin:"0 auto"},afterMount:{type:"FUNCTION",value:`
|
|
322
|
+
`.trim()}function boe(e,t){const n=moe(e,t);Fn()?ci(n,`${voe}-dynamic-theme`):"{}".NODE_ENV!=="production"&&Qi(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const jf=Z.createContext(!1),yoe=e=>{let{children:t,disabled:n}=e;const r=Z.useContext(jf);return p(jf.Provider,{value:n??r,children:t})},xoe=jf,Df=Z.createContext(void 0),woe=e=>{let{children:t,size:n}=e;const r=Z.useContext(Df);return p(Df.Provider,{value:n||r,children:t})},Qh=Df;function Soe(){const e=b.useContext(xoe),t=b.useContext(Qh);return{componentDisabled:e,componentSize:t}}function Coe(e,t){const n=e||{},r=n.inherit===!1||!t?WS:t;return wS(()=>{if(!e)return t;const o=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(a=>{o[a]=Object.assign(Object.assign({},o[a]),e.components[a])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:o})},[n,r],(o,a)=>o.some((i,s)=>{const l=a[s];return!gne(i,l,!0)}))}function _oe(e){return e instanceof HTMLElement||e instanceof SVGElement}function Ooe(e){return _oe(e)?e:e instanceof b.Component?gn.findDOMNode(e):null}var Eoe=["children"],QS=Z.createContext({});function Roe(e){var t=e.children,n=Wo(e,Eoe);return p(QS.Provider,{value:n,children:t})}function $oe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ZS(e){var t=$oe();return function(){var r=an(e),o;if(t){var a=an(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return ba(this,o)}}var Toe=function(e){ma(n,e);var t=ZS(n);function n(){return Rt(this,n),t.apply(this,arguments)}return $t(n,[{key:"render",value:function(){return this.props.children}}]),n}(Z.Component),Lr="none",Ps="appear",ks="enter",Ns="leave",jm="none",pn="prepare",zo="start",Ho="active",Zh="end",e2="prepared";function Dm(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function Poe(e,t){var n={animationend:Dm("Animation","AnimationEnd"),transitionend:Dm("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var koe=Poe(Fn(),typeof window<"u"?window:{}),t2={};if(Fn()){var Noe=document.createElement("div");t2=Noe.style}var As={};function n2(e){if(As[e])return As[e];var t=koe[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in t2)return As[e]=t[a],As[e]}return""}var r2=n2("animationend"),o2=n2("transitionend"),a2=!!(r2&&o2),Im=r2||"animationend",Lm=o2||"transitionend";function Bm(e,t){if(!e)return null;if(Ie(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const Aoe=function(e){var t=b.useRef(),n=b.useRef(e);n.current=e;var r=Z.useCallback(function(i){n.current(i)},[]);function o(i){i&&(i.removeEventListener(Lm,r),i.removeEventListener(Im,r))}function a(i){t.current&&t.current!==i&&o(t.current),i&&i!==t.current&&(i.addEventListener(Lm,r),i.addEventListener(Im,r),t.current=i)}return Z.useEffect(function(){return function(){o(t.current)}},[]),[a,o]};var i2=Fn()?b.useLayoutEffect:b.useEffect,s2=function(t){return+setTimeout(t,16)},l2=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(s2=function(t){return window.requestAnimationFrame(t)},l2=function(t){return window.cancelAnimationFrame(t)});var Fm=0,ep=new Map;function c2(e){ep.delete(e)}var If=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Fm+=1;var r=Fm;function o(a){if(a===0)c2(r),t();else{var i=s2(function(){o(a-1)});ep.set(r,i)}}return o(n),r};If.cancel=function(e){var t=ep.get(e);return c2(t),l2(t)};const Moe=function(){var e=Z.useRef(null);function t(){If.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=If(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a}return Z.useEffect(function(){return function(){t()}},[]),[n,t]};var joe=[pn,zo,Ho,Zh],Doe=[pn,e2],u2=!1,Ioe=!0;function f2(e){return e===Ho||e===Zh}const Loe=function(e,t,n){var r=Ws(jm),o=je(r,2),a=o[0],i=o[1],s=Moe(),l=je(s,2),c=l[0],u=l[1];function f(){i(pn,!0)}var d=t?Doe:joe;return i2(function(){if(a!==jm&&a!==Zh){var h=d.indexOf(a),v=d[h+1],g=n(a);g===u2?i(v,!0):v&&c(function(m){function y(){m.isCanceled()||i(v,!0)}g===!0?y():Promise.resolve(g).then(y)})}},[e,a]),Z.useEffect(function(){return function(){u()}},[]),[f,a]};function Boe(e,t,n,r){var o=r.motionEnter,a=o===void 0?!0:o,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,f=r.motionLeaveImmediately,d=r.onAppearPrepare,h=r.onEnterPrepare,v=r.onLeavePrepare,g=r.onAppearStart,m=r.onEnterStart,y=r.onLeaveStart,w=r.onAppearActive,_=r.onEnterActive,S=r.onLeaveActive,x=r.onAppearEnd,C=r.onEnterEnd,O=r.onLeaveEnd,$=r.onVisibleChanged,k=Ws(),P=je(k,2),j=P[0],L=P[1],F=Ws(Lr),W=je(F,2),B=W[0],G=W[1],ne=Ws(null),fe=je(ne,2),D=fe[0],R=fe[1],T=b.useRef(!1),N=b.useRef(null);function I(){return n()}var H=b.useRef(!1);function Y(){G(Lr,!0),R(null,!0)}function J(Le){var Ee=I();if(!(Le&&!Le.deadline&&Le.target!==Ee)){var Be=H.current,nt;B===Ps&&Be?nt=x==null?void 0:x(Ee,Le):B===ks&&Be?nt=C==null?void 0:C(Ee,Le):B===Ns&&Be&&(nt=O==null?void 0:O(Ee,Le)),B!==Lr&&Be&&nt!==!1&&Y()}}var re=Aoe(J),oe=je(re,1),ue=oe[0],q=function(Ee){var Be,nt,Qt;switch(Ee){case Ps:return Be={},ve(Be,pn,d),ve(Be,zo,g),ve(Be,Ho,w),Be;case ks:return nt={},ve(nt,pn,h),ve(nt,zo,m),ve(nt,Ho,_),nt;case Ns:return Qt={},ve(Qt,pn,v),ve(Qt,zo,y),ve(Qt,Ho,S),Qt;default:return{}}},me=Z.useMemo(function(){return q(B)},[B]),U=Loe(B,!e,function(Le){if(Le===pn){var Ee=me[pn];return Ee?Ee(I()):u2}if(qe in me){var Be;R(((Be=me[qe])===null||Be===void 0?void 0:Be.call(me,I(),null))||null)}return qe===Ho&&(ue(I()),u>0&&(clearTimeout(N.current),N.current=setTimeout(function(){J({deadline:!0})},u))),qe===e2&&Y(),Ioe}),Te=je(U,2),Ze=Te[0],qe=Te[1],Tt=f2(qe);H.current=Tt,i2(function(){L(t);var Le=T.current;T.current=!0;var Ee;!Le&&t&&s&&(Ee=Ps),Le&&t&&a&&(Ee=ks),(Le&&!t&&c||!Le&&f&&!t&&c)&&(Ee=Ns);var Be=q(Ee);Ee&&(e||Be[pn])?(G(Ee),Ze()):G(Lr)},[t]),b.useEffect(function(){(B===Ps&&!s||B===ks&&!a||B===Ns&&!c)&&G(Lr)},[s,a,c]),b.useEffect(function(){return function(){T.current=!1,clearTimeout(N.current)}},[]);var ln=Z.useRef(!1);b.useEffect(function(){j&&(ln.current=!0),j!==void 0&&B===Lr&&((ln.current||j)&&($==null||$(j)),ln.current=!0)},[j,B]);var cn=D;return me[pn]&&qe===zo&&(cn=Q({transition:"none"},cn)),[B,qe,cn,j??t]}function Foe(e){var t=e;Ie(e)==="object"&&(t=e.transitionSupport);function n(o,a){return!!(o.motionName&&t&&a!==!1)}var r=Z.forwardRef(function(o,a){var i=o.visible,s=i===void 0?!0:i,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,f=o.children,d=o.motionName,h=o.leavedClassName,v=o.eventProps,g=Z.useContext(QS),m=g.motion,y=n(o,m),w=b.useRef(),_=b.useRef();function S(){try{return w.current instanceof HTMLElement?w.current:Ooe(_.current)}catch{return null}}var x=Boe(y,s,S,o),C=je(x,4),O=C[0],$=C[1],k=C[2],P=C[3],j=Z.useRef(P);P&&(j.current=!0);var L=Z.useCallback(function(R){w.current=R,ooe(a,R)},[a]),F,W=Q(Q({},v),{},{visible:s});if(!f)F=null;else if(O===Lr)P?F=f(Q({},W),L):!c&&j.current&&h?F=f(Q(Q({},W),{},{className:h}),L):u||!c&&!h?F=f(Q(Q({},W),{},{style:{display:"none"}}),L):F=null;else{var B,G;$===pn?G="prepare":f2($)?G="active":$===zo&&(G="start");var ne=Bm(d,"".concat(O,"-").concat(G));F=f(Q(Q({},W),{},{className:Wf(Bm(d,O),(B={},ve(B,ne,ne&&G),ve(B,d,typeof d=="string"),B)),style:k}),L)}if(Z.isValidElement(F)&&aoe(F)){var fe=F,D=fe.ref;D||(F=Z.cloneElement(F,{ref:L}))}return p(Toe,{ref:_,children:F})});return r.displayName="CSSMotion",r}const zoe=Foe(a2);var Lf="add",Bf="keep",Ff="remove",pu="removed";function Hoe(e){var t;return e&&Ie(e)==="object"&&"key"in e?t=e:t={key:e},Q(Q({},t),{},{key:String(t.key)})}function zf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Hoe)}function Voe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,a=zf(e),i=zf(t);a.forEach(function(c){for(var u=!1,f=r;f<o;f+=1){var d=i[f];if(d.key===c.key){r<f&&(n=n.concat(i.slice(r,f).map(function(h){return Q(Q({},h),{},{status:Lf})})),r=f),n.push(Q(Q({},d),{},{status:Bf})),r+=1,u=!0;break}}u||n.push(Q(Q({},c),{},{status:Ff}))}),r<o&&(n=n.concat(i.slice(r).map(function(c){return Q(Q({},c),{},{status:Lf})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var f=u.key,d=u.status;return f!==c||d!==Ff}),n.forEach(function(u){u.key===c&&(u.status=Bf)})}),n}var Uoe=["component","children","onVisibleChanged","onAllRemoved"],Woe=["status"],Goe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Koe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zoe,n=function(r){ma(a,r);var o=ZS(a);function a(){var i;Rt(this,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=o.call.apply(o,[this].concat(l)),ve(jn(i),"state",{keyEntities:[]}),ve(jn(i),"removeKey",function(u){var f=i.state.keyEntities,d=f.map(function(h){return h.key!==u?h:Q(Q({},h),{},{status:pu})});return i.setState({keyEntities:d}),d.filter(function(h){var v=h.status;return v!==pu}).length}),i}return $t(a,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,f=c.children,d=c.onVisibleChanged,h=c.onAllRemoved,v=Wo(c,Uoe),g=u||Z.Fragment,m={};return Goe.forEach(function(y){m[y]=v[y],delete v[y]}),delete v.keys,p(g,{...v,children:l.map(function(y){var w=y.status,_=Wo(y,Woe),S=w===Lf||w===Bf;return b.createElement(t,{...m,key:_.key,visible:S,eventProps:_,onVisibleChanged:function(C){if(d==null||d(C,{key:_.key}),!C){var O=s.removeKey(_.key);O===0&&h&&h()}}},f)})})}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,f=zf(c),d=Voe(u,f);return{keyEntities:d.filter(function(h){var v=u.find(function(g){var m=g.key;return h.key===m});return!(v&&v.status===pu&&h.status===Ff)})}}}]),a}(Z.Component);return ve(n,"defaultProps",{component:"div"}),n}Koe(a2);function qoe(e){const{children:t}=e,[,n]=Jh(),{motion:r}=n,o=Z.useRef(!1);return o.current=o.current||r===!1,o.current?p(Roe,{motion:r,children:t}):t}var Xoe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Yoe=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"],Joe="ant";let d2;function Qoe(){return d2||Joe}function Zoe(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const eae=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(d2=t),r&&Zoe(r)&&("{}".NODE_ENV!=="production"&&Qi(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),boe(Qoe(),r))},tae=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:a,form:i,locale:s,componentSize:l,direction:c,space:u,virtual:f,dropdownMatchSelectWidth:d,popupMatchSelectWidth:h,popupOverflow:v,legacyLocale:g,parentContext:m,iconPrefixCls:y,theme:w,componentDisabled:_,segmented:S,statistic:x,spin:C,calendar:O,carousel:$,cascader:k,collapse:P,typography:j,checkbox:L,descriptions:F,divider:W,drawer:B,skeleton:G,steps:ne,image:fe,layout:D,list:R,mentions:T,modal:N,progress:I,result:H,slider:Y,breadcrumb:J,menu:re,pagination:oe,input:ue,empty:q,badge:me,radio:U,rate:Te,switch:Ze,transfer:qe,avatar:Tt,message:ln,tag:cn,table:Le,card:Ee,tabs:Be,timeline:nt,timePicker:Qt,upload:so,notification:lo,tree:co,colorPicker:At,datePicker:$n,wave:Tn}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&Qi(d===void 0,"ConfigProvider","`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");const $r=Z.useCallback((be,Re)=>{const{prefixCls:Fe}=e;if(Re)return Re;const ze=Fe||m.getPrefixCls("");return be?`${ze}-${be}`:ze},[m.getPrefixCls,e.prefixCls]),ct=y||m.iconPrefixCls||XS,uo=ct!==m.iconPrefixCls,Wn=n||m.csp,Ma=JS(ct,Wn),pr=Coe(w,m.theme),Tr={csp:Wn,autoInsertSpaceInButton:r,alert:o,anchor:a,locale:s||g,direction:c,space:u,virtual:f,popupMatchSelectWidth:h??d,popupOverflow:v,getPrefixCls:$r,iconPrefixCls:ct,theme:pr,segmented:S,statistic:x,spin:C,calendar:O,carousel:$,cascader:k,collapse:P,typography:j,checkbox:L,descriptions:F,divider:W,drawer:B,skeleton:G,steps:ne,image:fe,input:ue,layout:D,list:R,mentions:T,modal:N,progress:I,result:H,slider:Y,breadcrumb:J,menu:re,pagination:oe,empty:q,badge:me,radio:U,rate:Te,switch:Ze,transfer:qe,avatar:Tt,message:ln,tag:cn,table:Le,card:Ee,tabs:Be,timeline:nt,timePicker:Qt,upload:so,notification:lo,tree:co,colorPicker:At,datePicker:$n,wave:Tn},Gn=Object.assign({},m);Object.keys(Tr).forEach(be=>{Tr[be]!==void 0&&(Gn[be]=Tr[be])}),Yoe.forEach(be=>{const Re=e[be];Re&&(Gn[be]=Re)});const gr=wS(()=>Gn,Gn,(be,Re)=>{const Fe=Object.keys(be),ze=Object.keys(Re);return Fe.length!==ze.length||Fe.some(wt=>be[wt]!==Re[wt])}),Pr=Z.useMemo(()=>({prefixCls:ct,csp:Wn}),[ct,Wn]);let ut=uo?Ma(t):t;const Pe=Z.useMemo(()=>{var be,Re,Fe,ze;return Ore(((be=cc.Form)===null||be===void 0?void 0:be.defaultValidateMessages)||{},((Fe=(Re=gr.locale)===null||Re===void 0?void 0:Re.Form)===null||Fe===void 0?void 0:Fe.defaultValidateMessages)||{},((ze=gr.form)===null||ze===void 0?void 0:ze.validateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[gr,i==null?void 0:i.validateMessages]);Object.keys(Pe).length>0&&(ut=p(Rre.Provider,{value:Pe,children:t})),s&&(ut=p(jre,{locale:s,_ANT_MARK__:BS,children:ut})),(ct||Wn)&&(ut=p(Sre.Provider,{value:Pr,children:ut})),l&&(ut=p(woe,{size:l,children:ut})),ut=p(qoe,{children:ut});const ft=Z.useMemo(()=>{const be=pr||{},{algorithm:Re,token:Fe,components:ze}=be,wt=Xoe(be,["algorithm","token","components"]),Zt=Re&&(!Array.isArray(Re)||Re.length>0)?Ef(Re):US,St={};return Object.entries(ze||{}).forEach(Kn=>{let[qn,Xn]=Kn;const Ot=Object.assign({},Xn);"algorithm"in Ot&&(Ot.algorithm===!0?Ot.theme=Zt:(Array.isArray(Ot.algorithm)||typeof Ot.algorithm=="function")&&(Ot.theme=Ef(Ot.algorithm)),delete Ot.algorithm),St[qn]=Ot}),Object.assign(Object.assign({},wt),{theme:Zt,token:Object.assign(Object.assign({},uc),Fe),components:St})},[pr]);return w&&(ut=p(GS.Provider,{value:ft,children:ut})),_!==void 0&&(ut=p(yoe,{disabled:_,children:ut})),p(Zi.Provider,{value:gr,children:ut})},Aa=e=>{const t=Z.useContext(Zi),n=Z.useContext(LS);return p(tae,{...Object.assign({parentContext:t,legacyLocale:n},e)})};Aa.ConfigContext=Zi;Aa.SizeContext=Qh;Aa.config=eae;Aa.useConfig=Soe;Object.defineProperty(Aa,"SizeContext",{get:()=>("{}".NODE_ENV!=="production"&&Qi(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Qh)});"{}".NODE_ENV!=="production"&&(Aa.displayName="ConfigProvider");function nae(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Ms=(e,t,n)=>{const r=nae(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},rae=e=>goe(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),oae=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o}=e,a=r-n,i=t-n;return{[o]:Object.assign(Object.assign({},soe(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},aae=poe("Tag",e=>{const{lineWidth:t,fontSizeIcon:n}=e,r=e.fontSizeSM,o=`${e.lineHeightSM*r}px`,a=Mf(e,{tagFontSize:r,tagLineHeight:o,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[oae(a),rae(a),Ms(a,"success","Success"),Ms(a,"processing","Info"),Ms(a,"error","Error"),Ms(a,"warning","Warning")]},e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText}));var iae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const sae=e=>{const{prefixCls:t,className:n,checked:r,onChange:o,onClick:a}=e,i=iae(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=Z.useContext(Zi),l=h=>{o==null||o(!r),a==null||a(h)},c=s("tag",t),[u,f]=aae(c),d=Wf(c,`${c}-checkable`,{[`${c}-checkable-checked`]:r},n,f);return u(p("span",{...Object.assign({},i,{className:d,onClick:l})}))},lae=sae,cae="_cssFieldBox_1t7y7_2",uae="_inputAuto_1t7y7_17",fae="_error_1t7y7_22",dae="_keyField_1t7y7_25",hae="_notEdit_1t7y7_30",pae="_active_1t7y7_33",gae="_cssBox_1t7y7_37",tr={cssFieldBox:cae,inputAuto:uae,error:fae,keyField:dae,notEdit:hae,active:pae,cssBox:gae},zm=b.forwardRef(function(t,n){const[r,o]=b.useState(""),[a,i]=b.useState(""),{mode:s="edit"}=t,l=b.useMemo(()=>s==="create",[s]),c=t.value,[u,f]=b.useState(gu),[d,h]=b.useState([]),[v,g]=b.useState([]),m=$=>{const k=gu.filter(P=>P.value.includes($));f($?k:gu)},y=()=>{var P;let $=[];const k=xw[c==null?void 0:c.property];k&&($=((P=k.values)==null?void 0:P.map(j=>({value:j})))||[]),h($),g($)},w=$=>{const k=v.filter(P=>P.value.includes($));h($?k:v)},_=$=>{var k;return(k=t.onValueChange)==null||k.call(t,{property:$,value:(c==null?void 0:c.value)||""}),!0},S=b.useRef(null),x=b.useRef(null),[C,O]=b.useState({key:!1,value:!1});return b.useImperativeHandle(n,()=>({reset:()=>{var $;($=x.current)==null||$.focus()}}),[]),M("div",{className:tr.cssFieldBox,children:[M("div",{className:Ge([tr.keyField,l&&tr.inputAuto,l&&C.key&&tr.active,r==="error"&&tr.error,!l&&tr.notEdit]),children:[p(A.AutoComplete,{ref:x,bordered:!1,disabled:!l,onSearch:m,status:r,popupMatchSelectWidth:200,value:c==null?void 0:c.property,onChange:$=>{_($)},style:{width:"100%",position:"absolute",left:0,top:0},onFocus:()=>{O({key:!0,value:!1})},onBlur:()=>{O({key:!1,value:!1})},onKeyDown:$=>{var k;$.code==="Enter"&&(r||(k=S.current)==null||k.focus())},placeholder:"property",options:u}),p("span",{style:{display:"inline-block",visibility:"hidden",minWidth:"60px",padding:"0 2px"},children:c==null?void 0:c.property})]}),p("span",{style:{padding:"0 2px"},children:":"}),p(A.AutoComplete,{bordered:!1,ref:S,status:a,popupMatchSelectWidth:200,value:c==null?void 0:c.value,onChange:$=>{var k;y(),(k=t.onValueChange)==null||k.call(t,{property:(c==null?void 0:c.property)||"",value:$||""})},style:{flex:1},onFocus:()=>{O({key:!1,value:!0})},onBlur:()=>{O({key:!1,value:!1})},className:Ge([tr.inputAuto,C.value&&tr.active]),placeholder:"value",onSearch:w,options:d,onKeyDown:$=>{var k;$.code==="Enter"&&l&&((k=t.onCreate)==null||k.call(t,{property:(c==null?void 0:c.property)||"",value:(c==null?void 0:c.value)||""}))}}),t.onDelete&&s==="edit"&&p(A.Button,{size:"small",type:"text",onClick:()=>{var $;($=t.onDelete)==null||$.call(t)},children:p(jb,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&p("div",{children:p(A.Button,{size:"small",type:"text",icon:p(Yf,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:()=>{var $;($=t.onCreate)==null||$.call(t,{property:(c==null?void 0:c.property)||"",value:(c==null?void 0:c.value)||""})}})})]})}),gu=vF.map(e=>({value:e})),Hm=b.forwardRef(function(t,n){const[r,o]=b.useState([]),[a,i]=b.useState({property:"",value:""});b.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),b.useEffect(()=>{t.initialValue&&(t.initialValue,o([...t.initialValue]))},[]);const s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=b.useRef(null);return p(A.ConfigProvider,{theme:{token:{borderRadius:4}},children:M("div",{className:tr.cssBox,children:[r.map((c,u)=>p("div",{children:p(zm,{mode:"edit",allValues:r,value:c,onValueChange:f=>{r[u]=f;const d=JSON.parse(JSON.stringify(r));o(d),s(d)},onDelete:()=>{r.splice(u,1);const f=JSON.parse(JSON.stringify(r));o(f),s(f)}})},u)),p(zm,{allValues:r,mode:"create",value:a,ref:l,onValueChange:c=>{i({...c})},onCreate:c=>{var u;if(c.property&&c.value){const f=[...r];f.push(c),o(f),i({property:"",value:""}),s(f),(u=l.current)==null||u.reset()}}},"newInput")]})})}),vae="_stateTag_5a8hc_2",mae="_stateTagClose_5a8hc_5",Vm={stateTag:vae,stateTagClose:mae},bae=["normal","hover","focus","focus-within","focus-visible","checked","disable","active"],Um=bae.map(e=>({key:e,label:e})),yae=e=>{const[t,n]=b.useState("normal"),[r]=b.useState([{key:"991",maxWidth:"991",label:"Medial Query ( <= 991 px )"},{key:"767",maxWidth:"767",label:"Medial Query ( <= 767 px )"},{key:"479",maxWidth:"479",label:"Medial Query ( <= 479 px )"}]),o=b.useRef({}),a=m=>{n(m)},[i,s]=b.useState([]),l=b.useMemo(()=>Um.filter(m=>!i.includes(m.key)),[i]),c=b.useMemo(()=>Um.filter(m=>i.includes(m.key)),[i]),[u,f]=b.useState(e.initialValue??{});b.useEffect(()=>{const m=Object.keys(u);s(m)},[u]);const d=b.useMemo(()=>{const m=u==null?void 0:u[t];if(!m)return{};const y={};return Object.keys(m).forEach(w=>{y[w]=fd(m[w]||"")}),y},[t,u]),h=b.useCallback(()=>{Object.keys(o.current).forEach(m=>{var _;const y=(_=o.current)==null?void 0:_[m],w=d[m]||[];y&&y.setValue(w)})},[d]),v=b.useRef();v.current=h,e.handler&&(e.handler.current={setValue:async m=>{var y;f(m),await ar(),(y=v.current)==null||y.call(v)}}),b.useEffect(()=>{h()},[h,t]);const g=b.useCallback((m,y)=>{var _;const w={...u,[t]:{...u[t]||{},[m]:Hy(y)}};(_=e.onValueChange)==null||_.call(e,w)},[u,e,t]);return p(vt,{children:M(A.Card,{size:"small",type:"inner",title:p("span",{style:{fontSize:"12px"},children:"CSS"}),extra:p(A.Dropdown,{menu:{items:l,onClick:m=>{s(y=>[...y,m.key])}},children:p(Yf,{})}),children:[p(A.Space,{size:[0,8],wrap:!0,style:{paddingBottom:"10px"},children:c.map(m=>{const y=t.includes(m.key);return M(lae,{style:{border:y?"1px solid rgba(0,0,0,0))":"1px solid rgb(216 216 216 / 82%)"},checked:y,onChange:()=>a(m.key),className:Vm.stateTag,children:[m.label,m.key!=="normal"&&p(l_,{className:Vm.stateTagClose,onClick:w=>{w.stopPropagation(),w.preventDefault(),s(_=>_.filter(S=>S!==m.key)),n("normal")}})]},m.key)})}),p(A.Collapse,{defaultActiveKey:["normal"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"normal",label:p("span",{children:"Default"}),children:p(Hm,{ref:m=>{o.current.normal=m},onValueChange:m=>g("normal",m),initialValue:d.normal})},...r.map(m=>({key:m.key,label:p("span",{children:m.label}),children:p(Hm,{ref:y=>{o.current[m.key]=y},onValueChange:y=>g(m.key,y)})}))]})]})})},xae="_label_1850u_2",wae="_font_1850u_9",Sae="_fontOption_1850u_16",Cae="_row_1850u_21",_ae="_CSSUIPanel_1850u_25",ae={label:xae,font:wae,"m-p":"_m-p_1850u_12",fontOption:Sae,row:Cae,CSSUIPanel:_ae},Wm=["width","height","min-width","max-width","min-height","max-height","flex","display"];function Gm(e){return e.reduce((t,n)=>({...t,[n]:""}),{})}const Mr={px:2048,vw:100,vh:100,rem:100},Oae=b.forwardRef((e,t)=>{const[n,r]=b.useState(e.initialValue??Gm(Wm)),o=b.useCallback((i,s)=>{r(l=>{var u;const c={...l,...i};return s!==!0&&((u=e.onChange)==null||u.call(e,c)),c})},[e]);b.useImperativeHandle(t,()=>({setValue:i=>o({...Gm(Wm),...i},!0)}),[o]);const a=b.useMemo(()=>e.value??n,[e.value,n]);return M("div",{children:[p(A.Row,{className:ae.row,children:M(A.Col,{span:24,style:{display:"flex"},children:[p("span",{className:ae.label,children:"layout:"}),M(A.Radio.Group,{value:a.display,size:"small",buttonStyle:"solid",onChange:i=>{o({display:i.target.value})},children:[p(A.Radio.Button,{value:"block",children:"Block"}),p(A.Radio.Button,{value:"inline-block",children:"InlineB"}),p(A.Radio.Button,{value:"inline",children:"Inline"}),p(A.Radio.Button,{value:"none",children:"None"})]})]})}),M(A.Row,{className:ae.row,children:[M(A.Col,{span:12,style:{display:"flex"},children:[p("span",{className:ae.label,children:"width:"}),p(pt,{min:0,max:Mr,value:a.width,onValueChange:i=>{o({width:i})},style:{width:"90px"},size:"small"})]}),M(A.Col,{span:12,children:[p("span",{className:ae.label,children:"height:"}),p(pt,{min:0,max:Mr,value:a.height,onValueChange:i=>{o({height:i})},style:{width:"90px"},size:"small"})]})]}),M("div",{children:[M(A.Row,{className:ae.row,children:[M(A.Col,{span:12,style:{display:"flex"},children:[p("span",{className:ae.label,children:"minW:"}),p(pt,{style:{width:"90px"},min:0,max:Mr,value:a["min-width"],onValueChange:i=>{o({"min-width":i})},size:"small"})]}),M(A.Col,{span:12,children:[p("span",{className:ae.label,children:"minH:"}),p(pt,{min:0,max:Mr,value:a["min-height"],onValueChange:i=>{o({"min-height":i})},style:{width:"90px"},size:"small"})]})]}),M(A.Row,{className:ae.row,children:[M(A.Col,{span:12,style:{display:"flex"},children:[p("span",{className:ae.label,children:"maxW:"}),p(pt,{style:{width:"90px"},min:0,max:Mr,value:a["max-width"],onValueChange:i=>{o({"max-width":i})},size:"small"})]}),M(A.Col,{span:12,children:[p("span",{className:ae.label,children:"maxH:"}),p(pt,{style:{width:"90px"},min:0,max:Mr,value:a["max-height"],onValueChange:i=>{o({"max-height":i})},size:"small"})]})]}),p(A.Row,{className:ae.row,children:M(A.Col,{span:12,style:{display:"flex"},children:[p("span",{className:ae.label,children:"flex:"}),p(pt,{style:{width:"90px"},unit:!1,min:0,max:Mr,value:a.flex,onValueChange:i=>{o({flex:i||""})},size:"small"})]})})]})]})}),js={px:2048,vw:100,vh:100,rem:100},Ds="100px",Km=()=>({left:"",right:"",top:"",bottom:"",all:""}),qm=b.forwardRef((e,t)=>{const[n,r]=b.useState(e.initialValue??Km()),o=b.useCallback((s,l)=>{r(c=>{var d;const u={...c,...s},f=Object.keys(u).reduce((h,v)=>(v==="all"?h[`${e.prefix}`]=u==null?void 0:u[v]:h[`${e.prefix}-${v}`]=u==null?void 0:u[v],h),{});return l!==!0&&((d=e.onChange)==null||d.call(e,f)),u})},[e]);b.useImperativeHandle(t,()=>({setValue:s=>{o({...Km(),...a(s,e.prefix)},!0)}}),[e.prefix,o]);const a=(s,l)=>Object.keys(s||{}).filter(f=>f.includes(l)).reduce((f,d)=>(d.replace(`${e.prefix}`,"")===""?f.all=s==null?void 0:s[d]:f[d.replace(`${e.prefix}-`,"")]=s==null?void 0:s[d],f),{}),i=b.useMemo(()=>{const s=a(e.value||{},e.prefix);return e.value===void 0?n:s},[e.value,e.prefix,n]);return M("div",{children:[M(A.Row,{className:ae.row,children:[M(A.Col,{span:12,style:{display:"flex"},children:[p("span",{className:Ge([ae.label,ae["m-p"]]),children:"T:"}),p(pt,{min:0,max:js,value:i.top,onValueChange:s=>{o({top:s})},style:{width:Ds},size:"small"})]}),M(A.Col,{span:12,children:[p("span",{className:Ge([ae.label,ae["m-p"]]),children:"L:"}),p(pt,{min:0,max:js,value:i.left,onValueChange:s=>{o({left:s})},style:{width:Ds},size:"small"})]})]}),p("div",{children:M(A.Row,{className:ae.row,children:[M(A.Col,{span:12,children:[p("span",{className:Ge([ae.label,ae["m-p"]]),children:"B:"}),p(pt,{min:0,max:js,value:i.bottom,onValueChange:s=>{o({bottom:s})},style:{width:Ds},size:"small"})]}),M(A.Col,{span:12,style:{display:"flex"},children:[p("span",{className:Ge([ae.label,ae["m-p"]]),children:"R:"}),p(pt,{style:{width:Ds},min:0,max:js,value:i.right,onValueChange:s=>{o({right:s})},size:"small"})]})]})})]})}),Eae={px:100,vw:100,vh:100,rem:100},Rae=[{label:p("span",{className:ae.fontOption,children:"Left"}),value:"left"},{label:p("span",{className:ae.fontOption,children:"Center"}),value:"center"},{label:p("span",{className:ae.fontOption,children:"Right"}),value:"Right"}],$ae=[{label:p("span",{className:ae.fontOption,children:"Regular"}),value:"400"},{label:p("span",{className:ae.fontOption,children:"Medium"}),value:"500"},{label:p("span",{className:ae.fontOption,children:"Bold"}),value:"700"}],Xm=()=>({"font-size":"",color:"","text-align":"","font-weight":""}),Tae=b.forwardRef((e,t)=>{const[n,r]=b.useState(e.initialValue??Xm()),o=b.useCallback((i,s)=>{r(l=>{var u;const c={...l,...i};return s!==!0&&((u=e.onChange)==null||u.call(e,c)),c})},[e]);b.useImperativeHandle(t,()=>({setValue:i=>{console.log("🚀 ~ file: index.tsx:68 ~ FontInput ~ newVal:",i),o({...Xm(),...i},!0)}}),[o]);const a=b.useMemo(()=>e.value??n,[e.value,n]);return M("div",{children:[p(A.Row,{className:ae.row,children:M(A.Col,{style:{display:"flex"},children:[p("span",{className:Ge([ae.label]),children:"Color:"}),p(A.ColorPicker,{showText:!0,size:"small",value:a.color||"",onChangeComplete:i=>{o({color:i.toRgbString()})},presets:Ji},a.color)]})}),p(A.Row,{className:ae.row,children:M(A.Col,{children:[p("span",{className:ae.label,children:"Size:"}),p(pt,{min:0,max:Eae,value:a["font-size"],onValueChange:i=>{o({"font-size":i})},style:{width:"158px"},size:"small"})]})}),M(A.Row,{className:ae.row,children:[p("span",{className:Ge([ae.label]),children:"Align:"}),p(A.Radio.Group,{options:Rae,onChange:({target:{value:i}})=>{o({"text-align":i})},value:a["text-align"]})]}),M(A.Row,{className:ae.row,children:[p("span",{className:Ge([ae.label]),children:"Weight:"}),p(A.Radio.Group,{options:$ae,onChange:({target:{value:i}})=>{o({"font-weight":i})},value:a["font-weight"]})]})]})}),Ym={px:100,vw:100,vh:100,rem:100},Jm=()=>({border:"","border-radius":""}),Pae=b.forwardRef((e,t)=>{const[n,r]=b.useState(e.initialValue??Jm()),o=b.useCallback((s,l)=>{r(c=>{var f;const u={...c,...s};return l!==!0&&((f=e.onChange)==null||f.call(e,u)),u})},[e]);b.useImperativeHandle(t,()=>({setValue:s=>{const l=Jm();Object.keys(s).length?o({...l,...s},!0):o(l,!0)}}),[o]);const a=b.useMemo(()=>{const s=n.border||"",l=s.split(" ");return{size:l[0]||"",type:l[1]||"",color:s.replace(" ","").replace(l[0],"").replace(l[1],"")}},[n]),i=s=>{o({border:`${s.size||"0px"} ${s.type||"none"} ${s.color||"transparent"}`.trim()})};return M("div",{children:[p(A.Row,{className:ae.row,children:M(A.Col,{style:{position:"relative"},span:24,children:[p(Cb,{style:{position:"absolute",right:0,top:"5px",color:"#4e4e4e",cursor:"pointer"},onClick:()=>{o({border:void 0})}}),p("span",{className:ae.label,children:"Size:"}),p(pt,{min:0,max:Ym,value:a.size,style:{width:"100px"},unitList:["px"],onValueChange:s=>{i({...a,size:s||""})},size:"small"})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{style:{display:"flex"},children:[p("span",{className:Ge([ae.label]),children:"Color:"}),p(A.ColorPicker,{showText:!0,size:"small",value:a.color||"",onChangeComplete:s=>{i({...a,color:s.toRgbString()})},presets:Ji})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{style:{display:"flex"},children:[p("span",{className:Ge([ae.label]),children:"Type:"}),M(A.Radio.Group,{value:a.type,size:"small",onChange:s=>{i({...a,type:s.target.value||""})},children:[p(A.Radio.Button,{value:"solid",children:"Solid"}),p(A.Radio.Button,{value:"dashed",children:"Dashed"}),p(A.Radio.Button,{value:"dotted",children:"Dotted"}),p(A.Radio.Button,{value:"none",children:"None"})]})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{children:[p("span",{className:ae.label,children:"Radius:"}),p(pt,{min:0,max:Ym,value:n["border-radius"],onValueChange:s=>{o({"border-radius":s})},style:{width:"158px"},size:"small"})]})})]})}),Qm=()=>({"background-color":"","background-image":"","background-size":"","background-repeat":""}),kae=b.forwardRef((e,t)=>{var i;const[n,r]=b.useState(e.initialValue??Qm()),o=b.useCallback((s,l)=>{r(c=>{var f;const u={...c,...s};return l!==!0&&((f=e.onChange)==null||f.call(e,u)),u})},[e]);b.useImperativeHandle(t,()=>({setValue:s=>{const l=Qm();Object.keys(s).length?o({...l,...s},!0):o(l,!0)}}),[o]);const a=b.useMemo(()=>e.value??n,[e.value,n]);return M("div",{children:[p(A.Row,{className:ae.row,children:M(A.Col,{span:24,style:{display:"flex"},children:[p("span",{className:Ge([ae.label]),children:"Color:"}),p(A.ColorPicker,{showText:!0,size:"small",value:a["background-color"]||"",onChangeComplete:s=>{o({"background-color":s.toRgbString()})},presets:Ji})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{span:24,style:{display:"flex"},children:[p("span",{className:ae.label,children:"Image:"}),p(A.Input,{style:{flex:1},size:"small",value:((i=/url\(['|"|*]?(.+?)['|"|*]?\)/.exec(a["background-image"]))==null?void 0:i[1])||"",onChange:s=>{console.log(`url("${s.target.value}")`),o({"background-image":`url("${s.target.value}")`})}})]})}),M(A.Row,{className:ae.row,children:[p("span",{className:ae.label,children:"Size:"}),M(A.Radio.Group,{size:"small",defaultValue:"a",buttonStyle:"solid",value:a["background-size"],onChange:s=>{o({"background-size":s.target.value})},children:[p(A.Radio.Button,{value:"contain",children:"Contain"}),p(A.Radio.Button,{value:"cover",children:"Cover"}),p(A.Radio.Button,{value:"auto",children:"Auto"})]})]}),M(A.Row,{className:ae.row,children:[p("span",{className:ae.label,children:"Repeat:"}),M(A.Radio.Group,{size:"small",buttonStyle:"solid",value:a["background-repeat"],onChange:s=>{o({"background-repeat":s.target.value})},children:[p(A.Radio.Button,{value:"repeat",children:"Repeat"}),p(A.Radio.Button,{value:"no-repeat",children:"NoRepeat"})]})]})]})}),Zm=()=>({"box-shadow":""}),Nae=b.forwardRef((e,t)=>{const[n,r]=b.useState(e.initialValue??Zm()),o=b.useMemo(()=>{var l;const i=((l=e.value)==null?void 0:l["box-shadow"])??n["box-shadow"];return Ls(i||"")[0]||{}},[e.value,n]),a=b.useCallback((i,s)=>{r(l=>{var v,g;const c=(v=e.value)==null?void 0:v["box-shadow"],f={...Ls(c||"")[0]||{},...i},d=`${f.offsetX||"0"} ${f.offsetY||"0"} ${f.blur||"0"} ${f.spread||"0"} ${f.color||"transparent"}`,h={...l,"box-shadow":d};return s!==!0&&((g=e.onChange)==null||g.call(e,h)),h})},[e]);return b.useImperativeHandle(t,()=>({setValue:i=>{a({...Zm(),...Ls(i["box-shadow"]||"")[0]},!0)}}),[a]),M("div",{children:[p(A.Row,{className:ae.row,children:M(A.Col,{children:[p("span",{className:ae.label,children:"OffsetX:"}),p(pt,{min:-40,max:40,unitList:["px"],value:o.offsetX,onValueChange:i=>{a({offsetX:i})},style:{width:"158px"},size:"small"})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{children:[p("span",{className:ae.label,children:"OffsetY:"}),p(pt,{min:-40,max:40,unitList:["px"],value:o.offsetY,onValueChange:i=>{a({offsetY:i})},style:{width:"158px"},size:"small"})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{children:[p("span",{className:ae.label,children:"Blur:"}),p(pt,{min:-40,max:40,unitList:["px"],value:o.blur,onValueChange:i=>{a({blur:i})},style:{width:"158px"},size:"small"})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{children:[p("span",{className:ae.label,children:"Spread:"}),p(pt,{min:-40,max:40,unitList:["px"],value:o.spread,onValueChange:i=>{a({spread:i})},style:{width:"158px"},size:"small"})]})}),p(A.Row,{className:ae.row,children:M(A.Col,{span:24,style:{display:"flex"},children:[p("span",{className:Ge([ae.label]),children:"Color:"}),p(A.ColorPicker,{showText:!0,size:"small",value:o.color||"",onChangeComplete:i=>{a({color:i.toRgbString()})},presets:Ji})]})})]})}),Aae=b.forwardRef(({value:e,initialVal:t,onValueChange:n},r)=>{const o=b.useRef(null),a=b.useRef(null),i=b.useRef(null),s=b.useRef(null),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),f=[o,a,i,s,l,c,u],d=b.useRef(null),h=()=>{const g=d.current??e;f.forEach(m=>{var y;(y=m.current)==null||y.setValue(g||{})})};b.useImperativeHandle(r,()=>({setValue:g=>{d.current=g,f.forEach(m=>{var y;(y=m.current)==null||y.setValue(g)})}}),[]);const v=b.useMemo(()=>[{key:"dimension",label:"Dimension",children:p(Oae,{ref:o,initialValue:t,value:e,onChange:g=>{n==null||n({...e,...g})}})},{key:"margin",label:"Margin",children:p(qm,{prefix:"margin",ref:a,initialValue:t,value:e,onChange:g=>{n==null||n({...e,...g})}})},{key:"padding",label:"Padding",children:p(qm,{ref:i,initialValue:t,prefix:"padding",value:e,onChange:g=>{n==null||n({...e,...g})}})},{key:"font",label:"Font",children:p(Tae,{ref:u,initialValue:t,value:e,onChange:g=>{n==null||n({...e,...g})}})},{key:"background",label:"Background",children:p(kae,{ref:l,value:e,initialValue:t,onChange:g=>{n==null||n({...e,...g})}})},{key:"border",label:"Border",children:p(Pae,{ref:s,initialValue:t,onChange:g=>{n==null||n({...e,...g})}})},{key:"shadow",label:"Shadow",children:p(Nae,{ref:c,initialValue:t,value:e,onChange:g=>{n==null||n({...e,...g})}})}],[t,n,e]);return p(A.ConfigProvider,{theme:{token:{borderRadius:2}},children:p(A.Collapse,{className:ae.CSSUIPanel,items:v,defaultActiveKey:["dimension"],onChange:async()=>{await ar(),h()},style:{marginBottom:"10px"}})})}),Mae=e=>{const t=b.useRef(null),n=e.node,r=b.useMemo(()=>n.value.classNames||[],[n]),o=b.useRef(null),a=b.useRef(null),i=b.useRef(null),s=b.useMemo(()=>Lu(n.value.style||[]),[n.value.style]),l=b.useRef(),c=b.useCallback(()=>{var y,w,_,S;l.current=n;const h=n.value.style||[],{expressionProperty:v,normalProperty:g}=Lu(h),m=Uy(n.value.css);(y=t.current)==null||y.setValue([...v]),(w=o.current)==null||w.setValue(m),(_=i.current)==null||_.setValue(n.value.classNames||[]),(S=a.current)==null||S.setValue(Fy(g)||{})},[n]);b.useEffect(()=>(c(),n.emitter.on("onNodeChange",c),n.emitter.on("onReloadPage",c),()=>{n.emitter.off("onNodeChange",c),n.emitter.off("onReloadPage",c)}),[n.emitter,n.id,e.activeTab,c]);const u=h=>{const v=[...s.normalProperty,...h];n.value.style=v,n.updateValue()},f=h=>{const v=[...h,...s.expressionProperty];n.value.style=v,n.updateValue()},d=h=>{n.value.css=Vy(`c_${n.id}`,h),n.updateValue()};return p("div",{className:hm.visualPanelBox,children:M("div",{style:{marginBottom:"10px"},children:[p(Aae,{ref:a,onValueChange:h=>{f(zy(h))}}),p(A.Collapse,{bordered:!1,style:{marginBottom:"10px"},onChange:h=>{h.length&&c()},items:[{key:"origin-css-edit",label:p("span",{className:hm.header,children:"Style Variable"}),children:p(une,{ref:t,initialValue:s.expressionProperty,onValueChange:h=>{u(h)}})}]}),p("div",{style:{paddingTop:"10px"},children:p(dne,{initialValue:r,ref:i,onValueChange:h=>{n.value.classNames=h,n.updateValue()}})}),p(yae,{handler:o,onValueChange:d})]})})},jae={key:"VisualPanelPlus",name:"Visual",view:({node:e,pluginCtx:t,activeTab:n})=>e?p(Mae,{node:e,pluginCtx:t,activeTab:n}):p(vt,{}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.visual)!==!1}};class Dae extends b.Component{constructor(n){super(n);V(this,"addPanel",n=>{const r=[...this.state.panels,n];this.setState({panels:r}),this.updatePanels()});V(this,"removePanel",n=>{const r=this.state.panels.filter(o=>o.name!==n);this.setState({panels:r}),this.updatePanels()});V(this,"replacePanel",(n,r)=>{const o=this.state.panels.findIndex(i=>i.name===n),a=[...this.state.panels];o>-1&&(a[o]=r),this.setState({panels:a}),this.updatePanels()});V(this,"choosePanel",n=>{this.setState({activeKey:n}),this.updatePanels()});V(this,"updatePanels",()=>{var s,l,c;const{pluginCtx:n}=this.props,{node:r,panels:o}=this.state,a=o;let i={panels:[],displayPanels:[]};if(r){const u={node:r,pluginCtx:n},f=a.filter(h=>h.show===void 0?!0:h.show(u)),d=((c=(l=(s=r.material)==null?void 0:s.value.advanceCustom)==null?void 0:l.rightPanel)==null?void 0:c.customTabs)||[];f.concat(d),i={panels:a,displayPanels:f}}else i={panels:a,displayPanels:[]};return this.setState(i),i});V(this,"onNodeChange",({node:n})=>{var u;const{pluginCtx:r}=this.props,{panels:o,activeKey:a}=this.state,i={node:n,pluginCtx:r},s=o.filter(f=>f.show===void 0?!0:f.show(i)),l=((u=s.find((f,d)=>d===0))==null?void 0:u.key)||"";s.find(f=>f.key===a)?this.setState({node:n,displayPanels:s}):this.setState({activeKey:l,node:n,displayPanels:s})});this.state={node:n.pluginCtx.engine.getActiveNode(),activeKey:"Visual",panels:[Hte,jae,Ute,Xte],displayPanels:[]}}componentDidMount(){var i;const{pluginCtx:n}=this.props;n.globalEmitter.on("onSelectNodeChange",this.onNodeChange),n.pageModel.emitter.on("*",()=>{const s=n.engine.getActiveNode();this.onNodeChange({node:s})});const{displayPanels:r}=this.updatePanels(),o=((i=r.find((s,l)=>l===0))==null?void 0:i.key)||"";r.find(s=>s.key===this.state.activeKey)||this.setState({activeKey:o}),n.pluginReadyOk()}render(){const{displayPanels:n,node:r,activeKey:o}=this.state,{pluginCtx:a}=this.props;if(!r)return p("div",{style:{overflow:"hidden"},children:p(A.Empty,{image:A.Empty.PRESENTED_IMAGE_SIMPLE,description:"Please select a node from left view"})});const i={node:r,pluginCtx:a,activeTab:this.state.activeKey};return p("div",{className:Jte.rightPanelContainer,children:p(A.Tabs,{activeKey:o,tabPosition:"top",style:{flex:1,height:"100%"},onChange:s=>{this.setState({activeKey:s})},items:n.map(s=>{var l;return{label:p("div",{style:{padding:"0 10px"},children:typeof s.name=="string"?s.name:(l=s.name)==null?void 0:l.call(s,i)}),key:s.key,children:s.view(i)}})})})}}const Iae="RightPanel",h2=e=>{const t=b.createRef();return{name:Iae,async init(n){n.getWorkbench().replaceRightView(p(Dae,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:n=>t==null?void 0:t.current,meta:{engine:{version:"1.0.0"}}}},Lae={pluginName:"全局状态"},Bae={pluginName:"Global State"},eb={zh_CN:Lae,en_US:Bae},Fae="_box_tl0hm_2",zae={box:Fae},Hf="GlobalState",vu=`plugin:${Hf}`,Hae=e=>{const{pluginCtx:t}=e,n=t.pageModel.value.componentsTree.value.state||{};let r=!1;const o=b.useRef(null);b.useEffect(()=>{var i;(i=o==null?void 0:o.current)==null||i.setValue(JSON.stringify(n,null,2)),t.pageModel.emitter.on("onReloadPage",s=>{var l;if(console.log(s),r){r=!1;return}(l=o.current)==null||l.setValue(JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2))})},[]);const a=i=>{try{const s=JSON.parse(i||"{}");t.pageModel.value.componentsTree.value.state=s,r=!0,t.pageModel.value.componentsTree.updateValue()}catch(s){console.warn(s)}};return p("div",{className:zae.box,children:p(Hi,{initialValue:JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:i=>{o.current=i},onChange:a})})},p2={name:Hf,async init(e){const{i18n:t}=e;Object.keys(eb).forEach(a=>{t.addResourceBundle(a,vu,eb[a],!0,!0)});const n=ta(vu)(Hae),r=ta(vu)(({t:a})=>p(vt,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:p(r,{}),name:Hf,icon:p(XC,{}),render:p(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Vae=e=>{const t=e.pageModel.export(),{engineCtx:n}=e,[r,o]=b.useState(!1),a=b.useRef(null);return M(vt,{children:[p("div",{onClick:()=>{o(!0)},children:e.children}),p(A.Modal,{open:r,title:"Source Schema",width:"100%",onCancel:()=>o(!1),onOk:async()=>{var f;o(!1);const i=(f=a.current)==null?void 0:f.getValue();if(!i)return;const s=JSON.parse(i);e.pageModel.updatePage(s),await ar();const l=n.engine.getActiveNode(),c=await n.pluginManager.get("Designer"),u=(l==null?void 0:l.id)||"";c==null||c.ctx.emitter.on("ready",()=>{c.export.selectNode(u)}),c&&c.export.selectNode(u)},style:{height:"calc(100vh - 50px)",top:"25px"},destroyOnClose:!0,children:p("div",{style:{width:"100%",height:"calc(100vh - 200px)"},children:p(Hi,{initialValue:JSON.stringify(t,null,2),language:"json",options:{automaticLayout:!0},onDidMount:i=>{a.current=i}})})})]})},Uae="History",g2=e=>{const t=e,n={historyRecords:[],currentStepIndex:0};let r=null;const o=e.pageModel.export();r=o,n.historyRecords.push(o);const a=async s=>{t&&(t.pageModel.reloadPage(s),await ar())},i={addStep:()=>{const{currentStepIndex:s,historyRecords:l}=n,c=e.pageModel.export();s!==l.length-1&&(n.historyRecords=l.slice(0,s+1)),n.historyRecords.push(c),n.currentStepIndex=l.length-1},reset:async()=>{if(!t){console.warn("plugin ctx is null, pls check it");return}r&&(n.historyRecords=[],a(r))},preStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;if(!i.canGoPreStep())return;const c=s-1;n.currentStepIndex=c;const u=Xp(l[c]);a(u)},nextStep:()=>{if(!i.canGoNextStep())return;const{currentStepIndex:s,historyRecords:l}=n,c=s+1;n.currentStepIndex=c;const u=Xp(l[c]);return a(u)},canGoPreStep:()=>{const{currentStepIndex:s}=n;return!(s<=0)},canGoNextStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;return!(s>=l.length-1)}};return{name:Uae,async init(s){s.pageModel.emitter.on("onNodeChange",()=>{i.addStep()}),s.pageModel.emitter.on("onPageChange",()=>{i.addStep()}),s.pluginReadyOk()},async destroy(s){console.log("destroy",s)},export:()=>i,meta:{engine:{version:"1.0.0"}}}},Wae=[Ox,UL,Sx,p2,h2,g2],Gae=Object.freeze(Object.defineProperty({__proto__:null,ComponentLibPlugin:Sx,DEFAULT_PLUGIN_LIST:Wae,DesignerPlugin:Ox,DisplaySourceSchema:Vae,GlobalStatePanelPlugin:p2,HistoryPlugin:g2,RightPanelPlugin:h2},Symbol.toStringTag,{value:"Module"})),nr={name:"$$attributes",title:"属性",valueType:"object",setters:[{componentName:"ArraySetter",props:{item:{setters:[{componentName:"ShapeSetter",props:{elements:[{name:"key",title:"属性名",valueType:"string",setters:["StringSetter"]},{name:"value",title:"值",valueType:"string",setters:["StringSetter","NumberSetter","JSONSetter","FunctionSetter","ExpressionSetter"]}],collapse:!1},initialValue:{}}],initialValue:{}}},initialValue:[]}]},Kae=De.HTMl_TAGS.map(e=>({title:Sy(e),componentName:e,props:[nr],snippets:[]})),qae=[{title:"块",componentName:"CBlock",props:[{name:"children",title:"文本",valueType:"string",setters:["StringSetter","ExpressionSetter"]},nr],groupName:"原子组件",snippets:[{title:"块",snapshotText:"Block",category:"基础组件",schema:{props:{},css:{value:[{state:"normal",media:[],style:{background:"white",width:"100%",height:"100px"}}]}}}]},{title:"容器",componentName:"CContainer",isContainer:!0,props:[{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},nr],groupName:"原子组件",snippets:[{title:"容器",snapshotText:"Con",category:"基础组件",schema:{css:{value:[{state:"normal",media:[],style:{background:"white",width:"100%",height:"100px"}}]}}}]},{title:"图片",componentName:"CImage",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},nr],groupName:"原子组件",snippets:[{title:"图片",snapshotText:"Img",category:"基础组件",schema:{css:{value:[{state:"normal",media:[],style:{background:"white",width:"300px",height:"150px"}}]}}}]},{title:"视频",componentName:"CVideo",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},nr],fixedProps:{autoPlay:!1},advanceCustom:{wrapComponent:e=>t=>p(e,{...t,style:{pointerEvents:"none",...t.style}})},groupName:"原子组件",snippets:[{title:"视频",snapshotText:"Video",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4"},css:{value:[{state:"normal",media:[],style:{background:"white",width:"300px",height:"150px"}}]}}}]},{title:"音频",groupName:"原子组件",componentName:"CAudio",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},nr],advanceCustom:{wrapComponent:()=>e=>p("div",{style:{display:"inline-block",fontSize:0},children:p("audio",{...e,style:{pointerEvents:"none",...e.style}})})},snippets:[{title:"音频",snapshotText:"Audio",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4",controls:!0}}}]},{title:"文本",componentName:"CText",groupName:"原子组件",props:[{name:"content",title:"内容",valueType:"string",setters:["TextAreaSetter","ExpressionSetter"]},nr],snippets:[{title:"文本",snapshotText:"Text",category:"基础组件",schema:{props:{content:"text"}}}]},{title:"Canvas",componentName:"CCanvas",props:[{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},nr],groupName:"原子组件",advanceCustom:{onNewAdd:async(e,t)=>{const n=e.getPlainProps(),r=Math.random().toString(32).slice(3,9);return n.$$attributes=[{key:"id",value:r},{key:"style",value:{display:"block",margin:"0 auto"}}],n.afterMount.value=n.afterMount.value.replace("$[id]",r),e.updateWithPlainObj({props:n}),{addNode:e}}},snippets:[{title:"画布",snapshotText:"Cavs",category:"基础组件",schema:{props:{width:"600px",height:"150px",style:{margin:"0 auto"},afterMount:{type:"FUNCTION",value:`
|
|
242
323
|
function run () {
|
|
243
324
|
var ctx = document.getElementById("$[id]").getContext("2d");
|
|
244
325
|
ctx.font = "48px serif";
|
|
245
326
|
ctx.fillText("Hello Canvas", 10, 50);
|
|
246
327
|
}
|
|
247
|
-
`}}}}]},{title:"HTML 标签",componentName:"CNativeTag",props:[{name:"htmlTag",title:"标签名",valueType:"string",setters:[{componentName:"SelectSetter",props:{options:
|
|
328
|
+
`}}}}]},{title:"HTML 标签",componentName:"CNativeTag",props:[{name:"htmlTag",title:"标签名",valueType:"string",setters:[{componentName:"SelectSetter",props:{options:De.HTMl_TAGS.map(e=>({name:e,value:e}))}}]},nr],isContainer:!0,groupName:"原子组件",snippets:[{title:"HTML",snapshotText:"HTML",category:"基础组件",schema:{props:{htmlTag:"div"}}}]}],Xae=[...qae,...Kae];class v2 extends b.Component{constructor(n){super(n);V(this,"currentSelectNode");V(this,"pluginManager");V(this,"workbenchRef",b.createRef());V(this,"pageSchema");V(this,"pageModel");V(this,"material");V(this,"emitter");V(this,"updatePage",n=>{this.emitter.emit("updatePage"),console.log(n)});V(this,"updateDesignerAssets",n=>{console.log("updateDesignerAssets",n)});V(this,"updateMaterial",n=>{this.emitter.emit("updateMaterial"),console.log(n)});V(this,"refresh",()=>{this.emitter.emit("refresh"),console.log("refresh engine")});V(this,"getWorkbench",()=>this.workbenchRef.current);this.pageSchema=n.schema,this.material=n.material,this.currentSelectNode=null,window.__CHAMELEON_ENG__=this;try{this.pageModel=new De.CPage(this.pageSchema,{materials:this.material||[],assetPackagesList:n.assetPackagesList||[]})}catch(r){console.error(r),this.pageModel=new De.CPage(De.EmptyPage)}this.emitter=qs()}updateCurrentSelectNode(n){this.currentSelectNode=n,this.emitter.emit("onSelectNodeChange",{node:n})}async componentDidMount(){var a,i,s,l,c,u;window.__C_ENGINE__=this;const n=this.props.plugins,r=new KI({engine:this,getWorkbench:()=>this.workbenchRef.current,emitter:this.emitter,pageModel:this.pageModel,i18n:bx,assets:this.props.assetPackagesList||[]});this.pluginManager=r,r.customPlugin("Designer",f=>(f.ctx.config.beforeInitRender=cx,f.ctx.config.customRender=ux(this.props.components||{}),f.ctx.config.components=this.props.components,f)),(i=(a=this.props).beforePluginRun)==null||i.call(a,{pluginManager:this.pluginManager});const o=n.map(f=>this.pluginManager.add(f));(l=(s=this.props).onMount)==null||l.call(s,{pluginManager:this.pluginManager,engine:this}),await Promise.all(o),this.pageModel.emitter.on("onReloadPage",()=>{var d;if(!this.currentSelectNode)return;const f=this.pageModel.getNode((d=this.currentSelectNode)==null?void 0:d.id);f&&this.updateCurrentSelectNode(f)}),(u=(c=this.props).onReady)==null||u.call(c,{pluginManager:this.pluginManager,engine:this})}getActiveNode(){var r;if(!((r=this.currentSelectNode)!=null&&r.id))return null;const n=this.pageModel.getNode(this.currentSelectNode.id)??null;return this.currentSelectNode=n,n}render(){return p("div",{className:Ge([JD.engineContainer,this.props.className]),style:this.props.style,children:p(XD,{ref:this.workbenchRef,emitter:this.emitter})})}}V(v2,"version","0.0.29");exports.Engine=v2;exports.InnerComponentMeta=Xae;exports.LOGGER=dn;exports.beforeInitRender=cx;exports.formatCSSTextProperty=fd;exports.formatCssToNodeVal=Vy;exports.formatNodeValToEditor=Uy;exports.formatStyleProperty=Lu;exports.getColorFromStr=Bu;exports.getDefaultRender=ux;exports.parseBoxShadowString=Ls;exports.plugins=Gae;exports.registerCustomSetter=KL;exports.styleArr2Obj=Fy;exports.styleList2Text=Hy;exports.styleObjToArr=zy;exports.waitReactUpdate=ar;Object.keys(Mn).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Mn[e]})});
|
|
248
329
|
//# sourceMappingURL=index.js.map
|