/*! For license information please see editor.3b5cdf57.js.LICENSE.txt */ !function(){var e,t,n,r,o,i={45545:function(e,t,n){"use strict";n.d(t,{r:function(){return v}});var r=n(70655),o=n(8679),i=n.n(o),a=n(22188),s=n(29323),c=n(67090),l=n(67294),d=n(9056),u=n(16297),p=(n(980),n(30381),n(94219)),f=n(64136),h=(n(35373),n(13276));function v(e){return function(t){var n=function(n){function o(t,o){var i=n.call(this,t)||this,s=o;i.renderChild=i.renderChild.bind(i),i.refFn=i.refFn.bind(i);var c=s.addStore({id:(0,u.guid)(),path:i.props.$path,storeType:e.storeType,parentId:i.props.store?i.props.store.id:""});i.store=c,!1===("function"==typeof e.extendsData?e.extendsData(t):e.extendsData)?c.initData((0,p.nW)(i.props.data?i.props.data.__super:null,(0,r.pi)((0,r.pi)({},i.formatData((0,f.bu)(i.props.defaultData,i.props.data))),i.formatData(i.props.data)))):i.props.scope||i.props.data&&i.props.data.__super?i.props.store&&i.props.data===i.props.store.data?c.initData((0,p.nW)(i.props.store.data,(0,r.pi)({},i.formatData((0,f.bu)(i.props.defaultData,i.props.data))))):c.initData((0,p.nW)(i.props.data.__super||i.props.scope,(0,r.pi)((0,r.pi)({},i.formatData((0,f.bu)(i.props.defaultData,i.props.data))),i.formatData(i.props.data)))):c.initData((0,r.pi)((0,r.pi)({},i.formatData((0,f.bu)(i.props.defaultData,i.props.data))),i.formatData(i.props.data))),i.state={};var l=t.detectField,h=(0,r._T)(t,["detectField"]),v={};return l&&"data"!==l||(v=(0,d.L)(h,c.data,void 0,h),i.state=(0,r.pi)({},v),i.unReaction=(0,a.U5)((function(){return JSON.stringify((0,d.L)(i.props,c.data,void 0,i.props))}),(function(){return i.setState((0,r.pi)({},(0,d.L)(i.props,c.data,void 0,i.props)))}))),i}return(0,r.ZT)(o,n),o.prototype.getWrappedInstance=function(){return this.ref},o.prototype.refFn=function(e){this.ref=e},o.prototype.formatData=function(e){return Array.isArray(e)?{items:e}:e},o.prototype.componentDidUpdate=function(t){var n,o,i=this.props,a=this.store,s=null===(n=e.shouldSyncSuperStore)||void 0===n?void 0:n.call(e,a,i,t);!1!==s&&(!1===("function"==typeof e.extendsData?e.extendsData(i):e.extendsData)?(!0===s||t.defaultData!==i.defaultData||(0,u.isObjectShallowModified)(t.data,i.data)||i.data&&t.data&&i.data.__super!==t.data.__super)&&a.initData((0,p.kt)(i.data,(0,r.pi)((0,r.pi)((0,r.pi)({},a.hasRemoteData?a.data:null),this.formatData(i.defaultData)),this.formatData(i.data)))):!0===s||(0,u.isObjectShallowModified)(t.data,i.data)||!1!==i.syncSuperStore&&(0,u.isSuperDataModified)(i.data,t.data,a)?i.store&&i.store.data===i.data?a.initData((0,p.nW)(i.store.data,!1===i.syncSuperStore?(0,r.pi)({},a.data):(0,u.syncDataFromSuper)(a.data,i.store.data,t.scope,a,!0===i.syncSuperStore))):i.data&&i.data.__super?a.initData((0,p.kt)(i.data,a.hasRemoteData||"page"===a.path?(0,r.pi)((0,r.pi)({},a.data),i.data):void 0)):a.initData((0,p.nW)(i.scope,i.data)):!0!==s&&i.store&&i.data===i.store.data||!i.data||!i.data.__super?!i.scope||i.data!==i.store.data||!0!==s&&t.data===i.data||a.initData((0,p.nW)(i.scope,(0,r.pi)({},a.data))):t.data&&!(0,u.isObjectShallowModified)(i.data.__super,t.data.__super,!1)||a.initData((0,p.nW)(i.data.__super,(0,r.pi)((0,r.pi)({},i.data),a.data)),"FormStore"===a.storeType&&"CRUDStore"===(null===(o=t.store)||void 0===o?void 0:o.storeType)))},o.prototype.componentWillUnmount=function(){var e,t=this.context,n=this.store;null===(e=this.unReaction)||void 0===e||e.call(this),(0,c.fh)(n)&&t.removeStore(n),delete this.store},o.prototype.renderChild=function(e,t,n){return void 0===n&&(n={}),(0,this.props.render)(e,t,(0,r.pi)((0,r.pi)({data:this.store.data,dataUpdatedAt:this.store.updatedAt},n),{scope:this.store.data,store:this.store}))},o.prototype.render=function(){var e=this.props;e.detectField;var n=(0,r._T)(e,["detectField"]);return this.state.hidden||!1===this.state.visible?null:l.createElement(t,(0,r.pi)({},n,this.state,{ref:this.refFn,data:this.store.data,dataUpdatedAt:this.store.updatedAt,store:this.store,scope:this.store.data,render:this.renderChild}))},o.displayName="WithStore(".concat(t.displayName||t.name,")"),o.ComposedComponent=t,o.contextType=h.y,(0,r.gn)([s.Pi,(0,r.w6)("design:paramtypes",[Object,void 0])],o)}(l.Component);return i()(n,t),n}}},90761:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(70655),o=n(67294),i=n(33082),a=n.n(i),s=function(e){function t(t){var n=e.call(this,t)||this;return n.mounted=!1,n.handleVisibleChange=n.handleVisibleChange.bind(n),n.mounted=!0,n.state={visible:!1,component:t.component},n}return(0,r.ZT)(t,e),t.prototype.componentDidMount=function(){"undefined"!=typeof jest&&this.handleVisibleChange(!0)},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.handleVisibleChange=function(e){var t=this;this.setState({visible:e}),e&&!this.state.component&&this.props.getComponent&&this.props.getComponent().then((function(e){return t.mounted&&"function"==typeof e&&t.setState({component:e})})).catch((function(e){return t.mounted&&t.setState({component:function(){return o.createElement("div",{className:"alert alert-danger"},String(e))}})}))},t.prototype.render=function(){var e=this.props,t=e.placeholder,n=e.unMountOnHidden,i=e.childProps,s=e.visiblilityProps,c=e.partialVisibility,l=e.children,d=(0,r._T)(e,["placeholder","unMountOnHidden","childProps","visiblilityProps","partialVisibility","children"]),u=this.state,p=u.visible,f=u.component;return n?o.createElement(a(),(0,r.pi)({},s,{partialVisibility:c,onChange:this.handleVisibleChange}),o.createElement("div",{className:"visibility-sensor"},f&&p?o.createElement(f,(0,r.pi)({},d,i)):l&&p?l:t)):p?f?o.createElement(f,(0,r.pi)({},d,i)):l||o.createElement("div",null,t):o.createElement(a(),(0,r.pi)({},s,{partialVisibility:c,onChange:this.handleVisibleChange}),o.createElement("div",{className:"visibility-sensor"},t))},t.defaultProps={placeholder:o.createElement("span",null,"Loading..."),unMountOnHidden:!1,partialVisibility:!0},t}(o.Component)},15423:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(70655),o=n(52690),i=n(94184),a=n.n(i),s=n(73935),c=n(67294),l=(n(88731),n(84789),n(8400),n(980),n(68630),n(72557),n(26153),n(30381),n(95209),n(12169)),d=(n(24717),n(8990),n(16297)),u=(n(35373),n(13218),n(47037),n(51584),n(96486),n(8422),n(56197),n(23279),n(50361),n(72993)),p=n(99284);n(60319),n(66604),n(68929),n(14289),n(8679),n(2284),n(7038),n(61110);var f=function(e){function t(t){var n=e.call(this,t)||this;return n.getTarget=function(){var e=n.props.target,t="function"==typeof e?e():e;return t&&s.findDOMNode(t)||null},n.maybeUpdatePosition=function(e){var t=n.getTarget();(n.props.shouldUpdatePosition||t!==n._lastTarget||e)&&n.updatePosition(t)},n.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},n._lastTarget=null,n}return(0,r.ZT)(t,e),t.prototype.updatePosition=function(e){var t,n=this;if(this._lastTarget=e,!e)return this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null});var r,o,i,a=this.props.watchTargetSizeChange,c=(0,s.findDOMNode)(this),p=(0,l.ZO)(this.props.container,(0,l.PG)(this).body);if((!this.watchedTarget||this.watchedTarget!==e)&&"static"!==(0,u.D)(e,"position")){null===(t=this.resizeDispose)||void 0===t||t.forEach((function(e){return e()})),this.watchedTarget=e,this.resizeDispose=[!1!==a?(0,u.A)(e,(function(){return n.updatePosition(e)})):d.noop,(0,u.A)(c,(function(){return n.updatePosition(e)}))];var f=(0,d.getScrollParent)(e);f&&p.contains(f)&&this.resizeDispose.push((o=function(){n.updatePosition(e)},i=function(){requestAnimationFrame(o)},(r=f).addEventListener("scroll",i),function(){r.removeEventListener("scroll",i)}))}this.setState((0,l.kl)(this.props.placement,c,e,p,this.props.containerPadding,this.props.offset))},t.prototype.componentDidMount=function(){this.updatePosition(this.getTarget())},t.prototype.componentDidUpdate=function(e){this.maybeUpdatePosition(this.props.placement!==e.placement)},t.prototype.componentWillUnmount=function(){var e;null===(e=this.resizeDispose)||void 0===e||e.forEach((function(e){return e()}))},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=(0,r._T)(e,["children","className"]),i=this.state,s=i.positionLeft,l=i.positionTop,d=(0,r._T)(i,["positionLeft","positionTop"]);delete o.target,delete o.container,delete o.containerPadding,delete o.shouldUpdatePosition;var u=c.Children.only(t);return(0,c.cloneElement)(u,(0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},o),d),u.props.offset?{offset:u.props.offset}:{}),{positionLeft:s,positionTop:l,className:a()(n,u.props.className),style:(0,r.pi)((0,r.pi)({},u.props.style),{left:s,top:l})}))},t.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},t}(c.Component),h=function(e){function t(t){var n=e.call(this,t)||this;return n.position=null,n.positionRef=function(e){n.position=e},n.state={exited:!t.show},n}return(0,r.ZT)(t,e),t.prototype.updatePosition=function(){var e;null===(e=this.position)||void 0===e||e.maybeUpdatePosition(!0)},t.prototype.componentDidUpdate=function(e){var t=this.props;e.show!==t.show&&t.show?this.setState({exited:!1}):t.transition===e.transition||t.transition||this.setState({exited:!0})},t.prototype.onHiddenListener=function(e){this.setState({exited:!0}),this.props.onExited&&this.props.onExited(e)},t.prototype.getContainerSelector=function(){var e=this.props.containerSelector,t=null;return"string"==typeof e&&(t=document.querySelector(e)),t},t.prototype.render=function(){var e=this.props,t=e.containerPadding,n=e.target,i=e.placement,a=e.shouldUpdatePosition,s=e.rootClose,l=e.children;e.watchTargetSizeChange;var d=e.transition,u=e.offset,h=(0,r._T)(e,["containerPadding","target","placement","shouldUpdatePosition","rootClose","children","watchTargetSizeChange","transition","offset"]),v=this.getContainerSelector()?this.getContainerSelector:this.props.container;if(!(h.show||d&&!this.state.exited))return null;var m=l;if(m=c.createElement(f,(0,r.pi)({},{container:v,containerPadding:t,target:n,placement:i,shouldUpdatePosition:a,offset:u},{ref:this.positionRef}),m),d){var b=h.onExit,g=h.onExiting,y=h.onEnter,w=h.onEntering,E=h.onEntered;m=c.createElement(d,{in:h.show,appear:!0,onExit:b,onExiting:g,onExited:this.onHiddenListener,onEnter:y,onEntering:w,onEntered:E},m)}return s?c.createElement(o.Z,{container:v},c.createElement(p.y,{onRootClose:h.onHide},(function(e){return c.isValidElement(m)?c.cloneElement(m,{ref:e}):c.createElement("div",{ref:e},m)}))):c.createElement(o.Z,{container:v},m)},t.defaultProps={placement:"auto"},(0,r.gn)([d.autobind,(0,r.w6)("design:type",Function),(0,r.w6)("design:paramtypes",[HTMLElement]),(0,r.w6)("design:returntype",void 0)],t.prototype,"onHiddenListener",null),(0,r.gn)([d.autobind,(0,r.w6)("design:type",Function),(0,r.w6)("design:paramtypes",[]),(0,r.w6)("design:returntype",void 0)],t.prototype,"getContainerSelector",null),t}(c.Component)},49300:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(70655),o=n(67294),i=n(73935),a=n(77117),s=(n(88731),n(84789),n(8400),n(980),n(68630),n(72557),n(26153),n(30381),n(95209),n(24717),n(8990),n(16297)),c=(n(94184),n(35373),n(13218),n(47037),n(51584),n(96486),n(8422),n(56197),n(23279),n(50361),n(72993),n(60319),n(66604),n(68929),n(14289),n(8679),n(2284),n(7038),n(61110),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={xOffset:0,yOffset:0},t.wrapperRef=o.createRef(),t}return(0,r.ZT)(t,e),t.prototype.componentDidMount=function(){this.mayUpdateOffset();var e=(0,i.findDOMNode)(this);this.parent=e.parentNode,this.parent.classList.add("has-popover"),this.wrapperRef&&this.wrapperRef.current&&this.wrapperRef.current.addEventListener("touchmove",s.preventDefault,{passive:!1,capture:!1})},t.prototype.componentDidUpdate=function(){this.mayUpdateOffset()},t.prototype.componentWillUnmount=function(){this.parent&&this.parent.classList.remove("has-popover"),this.wrapperRef&&this.wrapperRef.current&&this.wrapperRef.current.removeEventListener("touchmove",s.preventDefault)},t.prototype.mayUpdateOffset=function(){var e,t=this.props.offset;if(t&&"function"==typeof t){var n=this.props,r=n.placement,o=n.positionTop,a=n.positionLeft;e=t((0,i.findDOMNode)(this).getBoundingClientRect(),{x:a,y:o,placement:r})}else e=t;this.setState({xOffset:e&&e.x?e.x:0,yOffset:e&&e.y?e.y:0})},t.prototype.render=function(){var e=this.props;e.placement;var t=e.activePlacement,n=e.positionTop,i=e.positionLeft;e.arrowOffsetLeft,e.arrowOffsetTop;var a=e.style,c=e.children;e.offset;var l=e.overlay,d=e.onHide,u=e.classPrefix,p=e.classnames,f=e.className,h=(0,r._T)(e,["placement","activePlacement","positionTop","positionLeft","arrowOffsetLeft","arrowOffsetTop","style","children","offset","overlay","onHide","classPrefix","classnames","className"]),v=this.state,m=v.xOffset,b=v.yOffset,g=(0,r.pi)((0,r.pi)({display:"block"},a),{top:n+b,left:i+m});return o.createElement("div",(0,r.pi)({ref:this.wrapperRef,className:p("".concat(u,"PopOver"),f,"".concat(u,"PopOver--").concat((0,s.camel)(t))),style:g},h),l?o.createElement("div",{className:"".concat(u,"PopOver-overlay"),onClick:d}):null,c)},t.defaultProps={className:"",offset:{x:0,y:0},overlay:!1,placement:"auto"},t}(o.PureComponent)),l=(0,a.YY)(c)},59623:function(e,t,n){"use strict";n.d(t,{Bj:function(){return A},Gt:function(){return C},OC:function(){return x},SL:function(){return F},T5:function(){return T},Th:function(){return S},YO:function(){return E},b7:function(){return g},e3:function(){return R},ef:function(){return k},gg:function(){return N},vC:function(){return I},zn:function(){return O}});var r,o,i=n(70655),a=n(67294),s=(n(34030),n(67090)),c=(n(88731),n(79694)),l=n(16297),d=n(29323),u=n(68e3),p=n(13311),f=n.n(p),h=n(45545),v=n(90396),m=n(25607),b=[],g={},y=[],w=1;function E(e){y.push(e)}function C(e,t,n){return y.reduce((function(e,r){return r(e,t,n)}),e)}function S(e){return function(t){return O((0,i.pi)((0,i.pi)({},e),{component:t})).component}}function O(e){if(!e.test&&!e.type)throw new TypeError("please set config.test or config.type");if(!e.component)throw new TypeError("config.component is required");if("string"==typeof e.type&&e.type&&(e.type=e.type.toLowerCase(),e.test=e.test||new RegExp("(^|/)".concat((0,m.E)(e.type),"$"),"i")),e.weight=e.weight||0,e.Renderer=e.component,e.name=e.name||e.type||"anonymous-".concat(w++),g[e.name])throw new Error('The renderer with name "'.concat(e.name,'" has already exists, please try another name!'));if(g.hasOwnProperty(e.name)){var t=(0,l.findIndex)(b,(function(t){return t.name===e.name}));~t&&b.splice(t,0,e)}e.storeType&&e.component&&(e.component=(0,h.r)({storeType:e.storeType,extendsData:e.storeExtendsData,shouldSyncSuperStore:e.shouldSyncSuperStore})((0,d.Pi)(e.component))),e.isolateScope&&(e.component=(0,u.BR)(e.component));var n=(0,l.findIndex)(b,(function(t){return e.weight3072)throw new Error("Path太长是不是死循环了?");var r=null;return b.some((function(o){var i=!1;return o.type&&n?(i=o.type===n)&&(P[n]=o):"function"==typeof o.test?i=o.test(e,t,A):o.test instanceof RegExp&&(i=o.test.test(e)),i&&(r=o),i})),null!==r&&r.component!==v.V&&(r.type||r.test instanceof RegExp||"function"==typeof r.test&&r.test.length<2)&&(P[e]=r),r}function T(){return b.concat()}function F(e){return f()(b,(function(t){return t.name===e}))}},34594:function(e,t,n){"use strict";n.d(t,{dkQ:function(){return Ve.d},qh2:function(){return _e.q},qeo:function(){return s.q},tlN:function(){return Me.t},JO1:function(){return d.J},FNf:function(){return Re},xJW:function(){return ve.xJ},$lH:function(){return ve.$l},lTy:function(){return Fe.l},crj:function(){return Pe.Z},oPK:function(){return Le.o},vqG:function(){return $e.v},oZB:function(){return me.oZ},aVW:function(){return Ae.Z},L_I:function(){return He.L},v$m:function(){return Te.Z},Thl:function(){return o.Th},yzG:function(){return D.y},ZHe:function(){return pe.ZH},Y5f:function(){return je.Y},arw:function(){return M.a},dkt:function(){return y.SkipOperation},kDS:function(){return Ze.k},kKk:function(){return ze.kK},QjV:function(){return Be.Qj},NR9:function(){return Ee},YOg:function(){return o.YO},oQ4:function(){return K.Z},aGv:function(){return y.anyChanged},qBE:function(){return a.q},NjZ:function(){return y.autobind},xkX:function(){return i.xk},uBL:function(){return z.u},Ius:function(){return y.bulkBindFunctions},klU:function(){return f.kl},qRO:function(){return y.camel},efX:function(){return o.ef},UOr:function(){return c.U},hGw:function(){return y.convertArrayValueToMoment},nW9:function(){return x.nW},ALw:function(){return R.AL},buJ:function(){return l.bu},M0U:function(){return Z.M},GcO:function(){return y.detectPropValueChanged},e50:function(){return y.difference},oxs:function(){return y.eachTree},Xvb:function(){return h.X},fz_:function(){return L.fz},qZw:function(){return L.qZ},P8h:function(){return y.everyTree},e3m:function(){return o.e3},AfN:function(){return oe},ktx:function(){return x.kt},hXT:function(){return L.hX},kXI:function(){return u.kX},Gtq:function(){return o.Gt},get:function(){return y.filterTree},jbC:function(){return y.findObjectsWithKey},hEs:function(){return y.findTree},L$8:function(){return y.findTreeIndex},fKU:function(){return y.flattenTree},OOX:function(){return y.flattenTreeWithLeafNodes},rew:function(){return E.r},Dx9:function(){return A.D},sYq:function(){return ce},Lti:function(){return v.L},pzs:function(){return C.p},MZz:function(){return y.getLevelFromClassName},v8S:function(){return y.getPropValue},rxh:function(){return y.getRange},SL$:function(){return o.SL},T56:function(){return o.T5},rPZ:function(){return y.getScrollParent},npq:function(){return y.getScrollbarWidth},Mm4:function(){return f.Mm},ghV:function(){return fe.gh},IMU:function(){return y.getTree},kSg:function(){return y.getTreeAncestors},pk8:function(){return y.getTreeDepth},dGi:function(){return y.getTreeParent},E04:function(){return b.E},Y2S:function(){return y.getWidthRate},M8z:function(){return y.guid},GCi:function(){return g.G},rIu:function(){return y.hasAbility},unW:function(){return y.hashCode},CHQ:function(){return w.C},yy$:function(){return U.yy},rMT:function(){return i.rM},di8:function(){return i.di},RBK:function(){return y.isArrayChildrenModified},znt:function(){return y.isBreakpoint},Pbn:function(){return y.isClickOnInput},pKY:function(){return y.isDisabled},X1t:function(){return i.X1},xbD:function(){return y.isEmpty},UTL:function(){return m.UT},tqC:function(){return y.isMobile},kEn:function(){return y.isNumeric},Kn2:function(){return x.Kn},RjM:function(){return y.isObjectShallowModified},SSQ:function(){return S.S},FCL:function(){return y.isUnfolded},Few:function(){return i.Fe},pn4:function(){return y.isVisible},veE:function(){return y.loadScript},eAU:function(){return ue},Kfl:function(){return fe.Kf},HTu:function(){return y.makeHorizontalDeeper},Q2d:function(){return se},Xcl:function(){return y.mapObject},GyU:function(){return y.mapTree},ZTd:function(){return y.noop},_6r:function(){return i._6},Mpd:function(){return i.Mp},LYx:function(){return y.normalizeNodePath},GRe:function(){return O.G},cvk:function(){return I.c},IWw:function(){return N.I},K2U:function(){return y.padArr},Qc3:function(){return X.Qc},RAA:function(){return u.RA},mB4:function(){return y.parseQuery},vMA:function(){return y.pickEventsProps},Hin:function(){return k.H},J1H:function(){return y.qsparse},mUA:function(){return y.qsstringify},w6H:function(){return y.range},I27:function(){return re},B7F:function(){return y.removeHTMLTag},sYA:function(){return Ue},lpb:function(){return P.l},Adl:function(){return A.A},vXk:function(){return R.vX},aCj:function(){return l.aC},Bju:function(){return o.Bj},H_J:function(){return T.H},OgC:function(){return F.O},X1x:function(){return he.X1},onM:function(){return j.o},oz0:function(){return le},NI0:function(){return x.NI},Jyg:function(){return y.someTree},o5f:function(){return y.spliceTree},S0D:function(){return i.S0},PqP:function(){return i.Pq},EvO:function(){return _.E},ZWw:function(){return De.Z},rSc:function(){return fe.rS},YYN:function(){return fe.YY},hz_:function(){return C.h},He2:function(){return V.H},wSD:function(){return B.w},zfV:function(){return y.ucFirst},nmi:function(){return $.n},C4_:function(){return y.until},P6Y:function(){return y},VjN:function(){return y.uuid},k$y:function(){return y.uuidv4},FFq:function(){return H.FF},tVU:function(){return H.tV},B$n:function(){return y.visibilityFilter}});var r=n(70655),o=n(59623),i=(n(28785),n(84532),n(88731)),a=n(74202),s=(n(36970),n(84789)),c=n(79565),l=n(64136),d=n(72557),u=(n(26153),n(19760)),p=n(95209),f=n(12169),h=(n(24717),n(13913)),v=n(9056),m=(n(35373),n(20723)),b=n(43560),g=(n(15804),n(33894)),y=n(16297),w=n(98839),E=n(43104),C=n(8422),S=n(43097),O=(n(69327),n(32818)),x=n(94219),I=n(16622),N=n(47462),k=n(32544),R=n(71570),P=n(46958),A=n(72993),T=n(26747),F=n(41165),D=(n(68062),n(99284)),j=n(22830),M=n(60319),_=n(25607),z=n(73542),B=n(71464),L=(n(45060),n(8990)),$=n(51477),H=n(2284),V=n(57963),Z=n(44478),U=n(71137),K=(n(7038),n(61110)),W=n(34030),J=n(67090),q=n(67294),Y=n(8679),G=n.n(Y),X=n(980),Q=(n(30381),n(68630)),ee=n.n(Q),te="zh-CN",ne={};function re(e,t){oe(e,t)}function oe(e,t){ne[e]=(0,r.pi)((0,r.pi)({},ne[e]||{}),t)}var ie={};function ae(e,t){return e.replace(/(\\)?\{\{([\s\S]+?)\}\}/g,(function(e,n,r){return n?e.substring(1):(0,T.H)(r,t||{})}))}function se(e){if(e&&ie[e])return ie[e];var t=function(t){for(var n,o,i,a=[],s=1;s":">",'"':""","'":"'","/":"/"}),s={raw:function(e){return e},html:function(e){return null==e?e:String(e).replace(/[&<>"'\/]/g,(function(e){return a[e]}))}};function c(e){Object.assign(s,e),r.vX.setDefaultFilters(s)}function l(){return s}var d=n(85576);function u(e,t,n){var o=e;return"string"==typeof e&&(o=(0,i.Q)(e,n)),new r.vX(t,n).evalute(o)}r.vX.setDefaultFilters(l()),o.j.setDefaultFilters(l())},47750:function(e,t,n){"use strict";n.d(t,{T6:function(){return p},Z9:function(){return f},eB:function(){return v},iG:function(){return h}});var r,o=n(70655),i=n(67294),a=n(73935),s=n(54997),c=n(64179),l=n(34594),d=n(61709),u=function(e){function t(n){var r=e.call(this,n)||this;return r.state={show:!1,title:"",content:"",confirm:!1},r.close=r.close.bind(r),r.handleConfirm=r.handleConfirm.bind(r),r.handleCancel=r.handleCancel.bind(r),r.modalRef=r.modalRef.bind(r),r.handleFormSubmit=r.handleFormSubmit.bind(r),r.scopeRef=r.scopeRef.bind(r),n.isolate||(r.originInstance=t.instance,t.instance=r),r}return(0,o.ZT)(t,e),t.getInstance=function(){if(!t.instance){console.warn("Alert 组件应该没有被渲染,所以隐性的渲染到 body 了");var e=document.body,n=document.createElement("div");e.appendChild(n),(0,a.render)(i.createElement(m,null),n)}return t.instance},t.prototype.componentDidMount=function(){this._body&&(this._body.innerHTML=this.state.content)},t.prototype.componentDidUpdate=function(e,t){t.content!==this.state.content&&this._body&&(this._body.innerHTML=this.state.content)},t.prototype.componentWillUnmount=function(){t.instance===this&&(t.instance=this.originInstance||null,this.originInstance=null)},t.prototype.scopeRef=function(e){this.schemaSope=e},t.prototype.handleConfirm=function(){var e,t=null===(e=this.schemaSope)||void 0===e?void 0:e.getComponentByName("form");t?t.doAction({type:"submit"}):this.close(!0)},t.prototype.handleCancel=function(){this.close(!1)},t.prototype.close=function(e){var t=this,n=this.state.confirm||this.state.prompt;this.setState({show:!1,prompt:!1,confirm:!1},n?function(){return t._resolve(e)}:void 0)},t.prototype.alert=function(e,t){this.setState({title:t,content:e,show:!0,confirm:!1})},t.prototype.confirm=function(e,t,n,r){var o=this;return this.setState({title:t,content:e,show:!0,confirm:!0,confirmText:n,cancelText:r}),new Promise((function(e){o._resolve=e}))},t.prototype.prompt=function(e,t,n,r){var o=this;return void 0===n&&(n="placeholder.enter"),void 0===r&&(r="confirm"),"string"==typeof e?(e=[{name:"text",label:e,type:"text"}],"string"==typeof t&&(t={text:t})):Array.isArray(e)||(e=[e]),this.setState({title:n,controls:e,show:!0,prompt:!0,value:t,confirmText:r}),new Promise((function(e){o._resolve=e}))},t.prototype.modalRef=function(e){this._modal=e},t.prototype.handleFormSubmit=function(e){this.close(e)},t.prototype.render=function(){var e,t,n,o=this.props,a=o.container,l=o.cancelText,u=o.confirmText,p=o.title,f=o.confirmBtnLevel,h=o.alertBtnLevel,v=o.classnames,m=this.props.theme||"cxd";"default"===m&&(m="cxd");var b=this.props.translate,g=b(null!==(e=this.state.title)&&void 0!==e?e:p),y=b(null!==(t=this.state.confirmText)&&void 0!==t?t:u),w=b(null!==(n=this.state.cancelText)&&void 0!==n?n:l);return i.createElement(s.Z,{show:this.state.show,onHide:this.handleCancel,container:a,ref:this.modalRef,closeOnEsc:!0},g?i.createElement("div",{className:v("Modal-header")},i.createElement("div",{className:v("Modal-title")},g)):null,i.createElement("div",{className:v("Modal-body")},this.state.prompt?function(e,t,n,o,i){return void 0===t&&(t={}),null==r?void 0:r(e,t,n,o,i)}(this.state.controls,this.state.value,this.handleFormSubmit,this.scopeRef,m):i.createElement(d.Z,{html:this.state.content})),y?i.createElement("div",{className:v("Modal-footer")},this.state.confirm||this.state.prompt?i.createElement(c.Z,{onClick:this.handleCancel},b(w)):null,i.createElement(c.Z,{level:this.state.confirm||this.state.prompt?f:h,onClick:this.handleConfirm},y)):null)},t.instance=null,t.defaultProps={confirmText:"confirm",cancelText:"cancel",title:"Alert.info",alertBtnLevel:"primary",confirmBtnLevel:"danger"},t}(i.Component);function p(e){r=e}var f=function(e,t){return u.getInstance().alert(e,t)},h=function(e,t,n,r){return u.getInstance().confirm(e,t,n,r)},v=function(e,t,n,r){return u.getInstance().prompt(e,t,n,r)},m=(0,l.YYN)((0,l.eAU)(u))},30158:function(e,t,n){"use strict";n.d(t,{s:function(){return a}});var r=n(70655),o=n(67294),i=n(34594),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dom=o.createRef(),t.toDispose=[],t.unmounted=!1,t}return(0,r.ZT)(t,e),t.prototype.componentDidMount=function(){var e,t,o,a,s;return(0,r.mG)(this,void 0,void 0,(function(){var c,l=this;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return[4,n.e(4631).then(n.t.bind(n,4631,23))];case 1:return c=r.sent().default,[4,Promise.all([n.e(4631),n.e(6876)]).then(n.t.bind(n,96876,23))];case 2:return r.sent(),[4,Promise.all([n.e(4631),n.e(6876),n.e(6531)]).then(n.t.bind(n,16531,23))];case 3:return r.sent(),[4,Promise.all([n.e(4631),n.e(790)]).then(n.t.bind(n,40790,23))];case 4:return r.sent(),[4,Promise.all([n.e(4631),n.e(7093)]).then(n.t.bind(n,87093,23))];case 5:return r.sent(),this.unmounted||(this.editor=null!==(o=null===(t=(e=this.props).editorFactory)||void 0===t?void 0:t.call(e,this.dom.current,c,this.props))&&void 0!==o?o:c(this.dom.current,{value:this.props.value||""}),null===(s=(a=this.props).editorDidMount)||void 0===s||s.call(a,c,this.editor),this.editor.on("change",this.handleChange),this.editor.on("blur",this.handleBlur),this.editor.on("focus",this.handleFocus),this.toDispose.push((0,i.Adl)(this.dom.current,(function(){var e;return null===(e=l.editor)||void 0===e?void 0:e.refresh()}))),setTimeout((function(){var e;return null===(e=l.editor)||void 0===e?void 0:e.refresh()}),350),this.toDispose.push((function(){var e,t;null===(t=(e=l.props).editorWillUnMount)||void 0===t||t.call(e,c,l.editor)}))),[2]}}))}))},t.prototype.componentDidUpdate=function(e){var t=this.props;t.value!==e.value&&this.editor&&this.setValue(t.value)},t.prototype.componentWillUnmount=function(){var e,t,n;this.unmounted=!0,null===(e=this.editor)||void 0===e||e.off("change",this.handleChange),null===(t=this.editor)||void 0===t||t.off("blur",this.handleBlur),null===(n=this.editor)||void 0===n||n.off("focus",this.handleFocus),this.toDispose.forEach((function(e){return e()})),this.toDispose=[]},t.prototype.handleChange=function(e){var t,n;null===(n=(t=this.props).onChange)||void 0===n||n.call(t,e.getValue())},t.prototype.handleBlur=function(e){var t,n;null===(n=(t=this.props).onBlur)||void 0===n||n.call(t,e)},t.prototype.handleFocus=function(e){var t,n;null===(n=(t=this.props).onFocus)||void 0===n||n.call(t,e)},t.prototype.setValue=function(e){var t=this.editor.getDoc();if(e&&e!==t.getValue()){var n=t.getCursor();t.setValue(e),t.setCursor(n)}},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style;return o.createElement("div",{className:t,style:n,ref:this.dom})},(0,r.gn)([i.NjZ,(0,r.w6)("design:type",Function),(0,r.w6)("design:paramtypes",[Object]),(0,r.w6)("design:returntype",void 0)],t.prototype,"handleChange",null),(0,r.gn)([i.NjZ,(0,r.w6)("design:type",Function),(0,r.w6)("design:paramtypes",[Object]),(0,r.w6)("design:returntype",void 0)],t.prototype,"handleBlur",null),(0,r.gn)([i.NjZ,(0,r.w6)("design:type",Function),(0,r.w6)("design:paramtypes",[Object]),(0,r.w6)("design:returntype",void 0)],t.prototype,"handleFocus",null),t}(o.Component)},86438:function(e,t,n){"use strict";n.d(t,{Am:function(){return b}});var r,o=n(70655),i=n(20660),a=n(67294),s=n(61709),c=n(34594),l=n(95483),d=n(7739),u=n.n(d),p=((r={})[i.d0]="in",r[i.cn]="in",r[i.Ix]="out",r),f=null,h=function(e,t,n){void 0===t&&(t={}),f&&f[n]&&f[n](e,(0,o.pi)({},t))},v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasRendered=!1,t.state={items:[]},t}return(0,o.ZT)(t,e),t.prototype.componentDidMount=function(){this.hasRendered=!0,f=this},t.prototype.componentWillUnmount=function(){this.hasRendered&&(f=null)},t.prototype.notifiy=function(e,t,n){var r=(n.useMobileUI||this.props.useMobileUI)&&(0,c.tqC)();this.setState((function(i){var a=i.items.concat();return r&&(a=[]),a.push((0,o.pi)((0,o.pi)({body:t,level:e},n),{id:(0,c.M8z)(),position:n.position||(r?"center":n.position),timeout:n.timeout||(r?3e3:void 0)})),{items:a,useMobileUI:r}}))},t.prototype.success=function(e,t){this.notifiy("success",e,t)},t.prototype.error=function(e,t){this.notifiy("error",e,t)},t.prototype.info=function(e,t){this.notifiy("info",e,t)},t.prototype.warning=function(e,t){this.notifiy("warning",e,t)},t.prototype.handleDismissed=function(e){var t,n=this.state.items.concat(),r=(0,o.CR)(n.splice(e,1),1)[0];null===(t=null==r?void 0:r.onDissmiss)||void 0===t||t.call(r),this.setState({items:n})},t.prototype.render=function(){var e=this;if(f&&!this.hasRendered)return null;var t=this.props,n=t.classnames,r=t.className,o=t.timeout,i=t.errorTimeout,s=t.position,l=t.showIcon,d=t.translate,p=t.closeButton,h=t.useMobileUI,v=this.state.items,b=(h||this.state.useMobileUI)&&(0,c.tqC)(),g=u()(v,(function(e){return e.position||s}));return Object.keys(g).map((function(t){var s=g[t];return a.createElement("div",{key:t,className:n("Toast-wrap Toast-wrap--".concat(t.replace(/\-(\w)/g,(function(e,t){return t.toUpperCase()}))),{"Toast-mobile":b},r)},s.map((function(t,r){var s,c,u,f=t.level||"info",h=null!==(s=t.timeout)&&void 0!==s?s:"error"===f?i:o;return a.createElement(m,{classnames:n,key:t.id||r,title:t.title,body:t.body,level:f,timeout:h,closeButton:!b&&(null!==(c=t.closeButton)&&void 0!==c?c:p),onDismiss:e.handleDismissed.bind(e,v.indexOf(t)),translate:d,showIcon:null!==(u=t.showIcon)&&void 0!==u?u:l,useMobileUI:b})})))}))},t.defaultProps={position:"top-center",closeButton:!1,timeout:4e3,errorTimeout:6e3,items:[]},t.themeKey="toast",(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[String,Object]),(0,o.w6)("design:returntype",void 0)],t.prototype,"success",null),(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[String,Object]),(0,o.w6)("design:returntype",void 0)],t.prototype,"error",null),(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[String,Object]),(0,o.w6)("design:returntype",void 0)],t.prototype,"info",null),(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[String,Object]),(0,o.w6)("design:returntype",void 0)],t.prototype,"warning",null),t}(a.Component),m=((0,c.YYN)((0,c.eAU)(v)),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={visible:!1},t.mounted=!1,t}return(0,o.ZT)(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.setState({visible:!0})},t.prototype.componentWillUnmount=function(){clearTimeout(this.timer),this.mounted=!1},t.prototype.handleMouseEnter=function(){clearTimeout(this.timer)},t.prototype.handleMouseLeave=function(){this.handleEntered()},t.prototype.handleEntered=function(){var e=this.props.timeout;this.mounted&&e&&(this.timer=setTimeout(this.close,e))},t.prototype.close=function(){clearTimeout(this.timer),this.setState({visible:!1})},t.prototype.render=function(){var e=this,t=this.props,n=t.onDismiss,r=t.classnames,o=t.closeButton,d=t.title,u=t.body,f=t.allowHtml,h=t.level,v=t.showIcon,m=t.useMobileUI;t.translate;var b=m?"":"alert-";return a.createElement(i.ZP,{mountOnEnter:!0,unmountOnExit:!0,in:this.state.visible,timeout:750,onEntered:this.handleEntered,onExited:n},(function(t){var n,i,g,y;return a.createElement("div",{className:r("Toast Toast--".concat(h),p[t],{"Toast-mobile--has-icon":m&&!1!==v}),onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,onClick:o?c.ZTd:e.close},!1===v?null:a.createElement("div",{className:r("Toast-icon")},"success"===h?a.createElement(l.JO,{icon:b+"success",className:"icon"}):"error"==h?a.createElement(l.JO,{icon:b+"fail",className:"icon"}):"info"==h?a.createElement(l.JO,{icon:b+"info",className:"icon"}):"warning"==h?a.createElement(l.JO,{icon:b+"warning",className:"icon"}):null),a.createElement("div",{className:r("Toast-content")},"string"==typeof d?a.createElement("span",{className:r("Toast-title")},d):a.isValidElement(d)?a.cloneElement(d,{className:r("Toast-title",null!==(i=null===(n=null==d?void 0:d.props)||void 0===n?void 0:n.className)&&void 0!==i?i:"")}):null,a.isValidElement(u)?a.cloneElement(u,{className:r("Toast-body",null!==(y=null===(g=null==u?void 0:u.props)||void 0===g?void 0:g.className)&&void 0!==y?y:"")}):"string"==typeof u||"object"==typeof u?a.createElement("div",{className:r("Toast-body")},f?a.createElement(s.Z,{html:null==u?void 0:u.toString()}):null==u?void 0:u.toString()):null),o?a.createElement("a",{onClick:e.close,className:r("Toast-close")},a.createElement(l.JO,{icon:"status-close",className:"icon"})):null)}))},t.defaultProps={timeout:5e3,classPrefix:"",position:"top-center",allowHtml:!0,level:"info"},(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[]),(0,o.w6)("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[]),(0,o.w6)("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[]),(0,o.w6)("design:returntype",void 0)],t.prototype,"handleEntered",null),(0,o.gn)([c.NjZ,(0,o.w6)("design:type",Function),(0,o.w6)("design:paramtypes",[]),(0,o.w6)("design:returntype",void 0)],t.prototype,"close",null),t}(a.Component)),b={container:f,success:function(e,t){return h(e,t,"success")},error:function(e,t){return h(e,t,"error")},info:function(e,t){return h(e,t,"info")},warning:function(e,t){return h(e,t,"warning")}}},23034:function(e,t,n){"use strict";n.d(t,{$j:function(){return k.Z},Al:function(){return _.Z},Am:function(){return A.Am},Ar:function(){return E.Z},C5:function(){return M.Z},CP:function(){return pe.ZP},Ct:function(){return K.C},Dw:function(){return v.ZP},E4:function(){return oe.Z},Ex:function(){return ve.Z},FE:function(){return j.Z},I8:function(){return H.Z},II:function(){return G.Z},Ij:function(){return J.Z},JO:function(){return w.JO},Jt:function(){return fe.J},M6:function(){return o.iG},ML:function(){return g.default},MR:function(){return ce.Z},Mt:function(){return h.Z},N4:function(){return ee.Z},Nx:function(){return de.N},OK:function(){return b.OK},OL:function(){return w.OL},Oe:function(){return $.ZP},Ph:function(){return I.ZP},QE:function(){return Y.Z},Qy:function(){return Ce.Z},Rg:function(){return me.ZP},Rj:function(){return L.Z},T6:function(){return o.T6},TX:function(){return r.Z},TY:function(){return ge.Z},Tr:function(){return S.Z},UO:function(){return p.Z},Vp:function(){return D.Z},Vt:function(){return y.Z},Wz:function(){return z.Z},XZ:function(){return d.Z},Xn:function(){return be.Z},Y1:function(){return u.ZP},Y2:function(){return B.Z},Yw:function(){return U.Z},Z9:function(){return o.Z9},Zb:function(){return le.C},_Z:function(){return Q.Z},_f:function(){return se.Z},aG:function(){return l.ZP},aQ:function(){return ie.Z},ah:function(){return N.Z},dy:function(){return m.Z},e6:function(){return O.Z},eB:function(){return o.eB},ex:function(){return de.Z},gx:function(){return P.Z},hJ:function(){return ye.ZP},hm:function(){return X.Z},i7:function(){return Ee.Z},iA:function(){return V.Z},iG:function(){return x.Z},it:function(){return W.i},k2:function(){return i.k2},kS:function(){return $.kS},kd:function(){return me.kd},l1:function(){return Z.Z},mQ:function(){return b.ZP},mp:function(){return F.Z},oF:function(){return ae.Z},oM:function(){return we.Z},p_:function(){return ne.Z},pf:function(){return T.Z},q5:function(){return w.q5},q7:function(){return w.q7},q9:function(){return q.Z},qE:function(){return s.Z},rU:function(){return ue.Z},rs:function(){return R.Z},tl:function(){return he.Z},tx:function(){return K.t},u9:function(){return re.Z},u_:function(){return C.Z},v2:function(){return Se.Z},vT:function(){return te.Z},wj:function(){return f.Z},zo:function(){return a.Z},zx:function(){return c.Z}});var r=n(27708),o=n(47750),i=n(44628),a=n(90632),s=n(81839),c=n(64179),l=n(47809),d=n(10156),u=n(87271),p=n(15730),f=n(84935),h=n(12724),v=n(46933),m=n(14850),b=n(98391),g=n(96838),y=n(61709),w=n(95483),E=n(81658),C=(n(34594),n(54997)),S=n(8715),O=n(28506),x=n(19693),I=n(50800),N=n(4686),k=n(55843),R=n(94485),P=n(39972),A=(n(2039),n(86438)),T=(n(10045),n(52014)),F=n(49294),D=n(9544),j=n(77468),M=n(41338),_=n(95318),z=n(91936),B=(n(85382),n(39501)),L=(n(75896),n(78961)),$=n(73560),H=(n(41649),n(96352),n(43318),n(83496),n(6314),n(73992)),V=n(7095),Z=(n(53612),n(74205),n(83225),n(73757)),U=(n(12806),n(28667)),K=n(50819),W=n(8543),J=n(16996),q=n(68689),Y=n(91220),G=n(86225),X=n(85148),Q=n(11938),ee=n(21686),te=n(35255),ne=n(95955),re=n(58772),oe=n(88505),ie=n(88293),ae=n(78024),se=n(56412),ce=n(14743),le=n(66e3),de=n(23499),ue=n(48780),pe=n(91680),fe=n(45526),he=(n(94018),n(74022)),ve=n(12265),me=n(79188),be=n(5232),ge=n(77768),ye=n(68008),we=n(55686),Ee=n(94076),Ce=(n(29463),n(37601),n(46008),n(9224),n(78512),n(42810)),Se=n(42812);n(50648),n(14791),n(65643),n(14776),n(26831),n(62190),n(40384),n(32311),n(53479),n(24987),n(21676),n(52783),n(67337),n(85579),n(44776),n(24376),n(5406),n(81306),n(3388),n(34269),n(31672),n(68340),n(2723),n(74372),n(55806),n(82295),n(68927),n(26408),n(83228),n(56528),n(6849),n(29350),n(85709),n(89661),n(56400),n(52954),n(54175)},9669:function(e,t,n){e.exports=n(51609)},76663:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,{zxk:function(){return a.zx},JO1:function(){return i.JO1},dys:function(){return a.dy},xJW:function(){return i.xJW},Vtq:function(){return a.Vt},JO$:function(){return a.JO},Wzg:function(){return a.Wz},u_l:function(){return a.u_},aVW:function(){return i.aVW},v$m:function(){return i.v$m},Thl:function(){return i.Thl},$jN:function(){return a.$j},OK9:function(){return a.OK},mQc:function(){return a.mQ},pfc:function(){return a.pf},Z9G:function(){return a.Z9},oQ4:function(){return i.oQ4},iGu:function(){return a.M6},Gtq:function(){return i.Gtq},ghV:function(){return i.ghV},OLP:function(){return a.OL},Xcl:function(){return i.Xcl},k27:function(){return a.k2},eBb:function(){return a.eB},q5g:function(){return a.q5},sYA:function(){return i.sYA},Adl:function(){return i.Adl},Bju:function(){return i.Bju},H_J:function(){return i.H_J},Amu:function(){return a.Am},P6Y:function(){return i.P6Y}});var o=n(73935),i=n(34594),a=n(23034),s=(n(82401),n(6717),n(10923),n(34128),n(32250),n(28530),n(9919),n(59361),n(19218),n(80983),n(89026),n(86102),n(76801),n(51109),n(84746),n(91194),n(54716),n(2637),n(94651),n(84433),n(61637),n(16788),n(40570),n(15236),n(19069),n(34341),n(91120),n(36561),n(72892),n(94025),n(42458),n(66024),n(7339),n(15660),n(32810),n(40602),n(52916),n(3121),n(91887),n(41812),n(42047),n(7329),n(44717),n(43055),n(68158),n(22831),n(93093),n(49060),n(99610),n(81521),n(57545),n(4867),n(15623),n(85895),n(55950),n(10351),n(98337),n(20955),n(54617),n(85299),n(14500),n(5736),n(12741),n(66249),n(38947),n(70655)),c=n(67294),l=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.toDispose=[],n.divRef=c.createRef(),n.prevHeight=0,n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleChange=n.handleChange.bind(n),n.handleEditorMounted=n.handleEditorMounted.bind(n),n}return(0,s.ZT)(t,e),t.prototype.componentWillUnmount=function(){this.toDispose.forEach((function(e){return e()}))},t.prototype.doAction=function(e,t){var n=null==e?void 0:e.actionType,r=this.props,o=r.onChange,i=r.resetValue;"clear"===n?o(""):"reset"===n?o(null!=i?i:""):"focus"===n&&this.focus()},t.prototype.focus=function(){var e,t;this.editor.focus(),this.setState({focused:!0});var n=null===(e=this.editor)||void 0===e?void 0:e.getPosition();null===(t=this.editor)||void 0===t||t.setPosition(n)},t.prototype.handleFocus=function(e){return(0,s.mG)(this,void 0,void 0,(function(){var t,n,r,o,a;return(0,s.Jh)(this,(function(s){switch(s.label){case 0:return t=this.props,n=t.dispatchEvent,r=t.value,o=t.onFocus,this.setState({focused:!0}),[4,n("focus",(0,i.vXk)(this.props,{value:r},"value"))];case 1:return(null==(a=s.sent())?void 0:a.prevented)||null==o||o(e),[2]}}))}))},t.prototype.handleBlur=function(e){return(0,s.mG)(this,void 0,void 0,(function(){var t,n,r,o,a;return(0,s.Jh)(this,(function(s){switch(s.label){case 0:return t=this.props,n=t.dispatchEvent,r=t.value,o=t.onBlur,this.setState({focused:!1}),[4,n("blur",(0,i.vXk)(this.props,{value:r},"value"))];case 1:return(null==(a=s.sent())?void 0:a.prevented)||null==o||o(e),[2]}}))}))},t.prototype.handleChange=function(e){return(0,s.mG)(this,void 0,void 0,(function(){var t,n,r,o;return(0,s.Jh)(this,(function(a){switch(a.label){case 0:return t=this.props,n=t.dispatchEvent,r=t.onChange,[4,n("change",(0,i.vXk)(this.props,{value:e},"value"))];case 1:return(null==(o=a.sent())?void 0:o.prevented)||null==r||r(e),[2]}}))}))},t.prototype.handleEditorMounted=function(e,t){var n=this;if(this.editor=e,this.toDispose.push(e.onDidChangeModelDecorations((function(){n.updateContainerSize(e,t),requestAnimationFrame(n.updateContainerSize.bind(n,e,t))})).dispose),this.props.editorDidMount){var r=this.props.editorDidMount;"string"==typeof r&&(r=new Function("editor","monaco"));var o=r(e,t);"function"==typeof o&&this.toDispose.push(o)}},t.prototype.updateContainerSize=function(e,t){var n;if(this.divRef.current){var r=e.getOption(t.editor.EditorOption.lineHeight),o=(null===(n=e.getModel())||void 0===n?void 0:n.getLineCount())||1,i=e.getTopForLineNumber(o+1)+r;this.prevHeight!==i&&(this.prevHeight=i,this.divRef.current.style.height="".concat(i,"px"),e.layout())}},t.prototype.render=function(){var e,t=this.props,n=t.className;t.style;var r=t.classPrefix,o=t.classnames,l=t.value;t.onChange;var d=t.disabled,u=t.options,p=t.editorTheme,f=t.size,h=t.data,v=t.allowFullscreen,m=t.placeholder,b=this.props.language,g=l;return g&&"string"!=typeof g&&(g=JSON.stringify(g,null,2)),(0,i.SSQ)(b)&&(b=(0,i.OgC)(b,h)),c.createElement("div",{ref:this.divRef,className:o("EditorControl",(e={"is-focused":this.state.focused},e["EditorControl--".concat(f)]=f,e),n)},c.createElement(i.crj,{classPrefix:r,component:a.ML,allowFullscreen:v,value:g,onChange:this.handleChange,disabled:d,onFocus:this.handleFocus,onBlur:this.handleBlur,language:b,editorTheme:p,editorDidMount:this.handleEditorMounted,childProps:{placeholder:m},options:(0,s.pi)((0,s.pi)({},u),{readOnly:d})}))},t.defaultProps={language:"javascript",editorTheme:"vs",allowFullscreen:!0,options:{automaticLayout:!0,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,minimap:{enabled:!1}}},(0,s.gn)([i.NjZ,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object,Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"updateContainerSize",null),t}(c.Component);["bat","c","coffeescript","cpp","csharp","css","dockerfile","fsharp","go","handlebars","html","ini","java","javascript","json","less","lua","markdown","msdax","objective-c","php","plaintext","postiats","powershell","pug","python","r","razor","ruby","sb","scss","sol","shell","sql","swift","typescript","vb","xml","yaml"].map((function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(n,t),n.lang=e,n.displayName="".concat(e[0].toUpperCase()).concat(e.substring(1),"EditorControlRenderer"),n.defaultProps=(0,s.pi)((0,s.pi)({},l.defaultProps),{language:e}),(0,s.gn)([(0,i.xJW)({type:"".concat(e,"-editor"),sizeMutable:!1})],n)}(l);return t})),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,s.ZT)(t,e),t.defaultProps=(0,s.pi)((0,s.pi)({},l.defaultProps),{language:"javascript"}),t=(0,s.gn)([(0,i.xJW)({type:"js-editor",sizeMutable:!1})],t)}(l),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,s.ZT)(t,e),t.defaultProps=(0,s.pi)((0,s.pi)({},l.defaultProps),{language:"typescript"}),t=(0,s.gn)([(0,i.xJW)({type:"ts-editor",sizeMutable:!1})],t)}(l),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,s.ZT)(t,e),t.defaultProps=(0,s.pi)((0,s.pi)({},l.defaultProps),{language:"javascript"}),t=(0,s.gn)([(0,i.xJW)({type:"editor",sizeMutable:!1})],t)}(l),n(43336),n(12429),n(66023),n(72063),n(97625),n(74610),n(34955),n(68484),n(21424),n(17841),n(96779),n(30806),n(67610),n(80004),n(14477),n(27648),n(29460),n(97970),n(4097),n(66524),n(47063),n(61240),n(26109),n(97843),n(49108),n(75180),n(72925),n(92985),n(66542),n(55296),n(28960),n(66496),n(6737),n(22014),n(4153),n(72904),n(81921),n(64447),n(3299),n(64155),n(77971),n(85746),n(96476),n(16374),n(60642),n(38741),n(4617),n(65586),n(78457),n(97914),n(42623),n(49905),n(78219),n(90478),n(66399),n(70813),n(29238),n(50830),n(52611),n(90618),n(65905),n(57372),n(38432),n(21425),n(42229),n(92409),n(80399),n(94173),n(51629),n(46498),n(63021),n(39320),n(50055),n(40240),n(64826),n(71437),n(93161),n(24293),n(69522);var d,u="suda-i18n-locale",p=d=~(d=~(d=navigator.language||navigator.userLanguage).indexOf("en")?"en-US":d).indexOf("zh")||~d.indexOf("cn")?"zh-CN":d,f=(0,i.Q2d)(localStorage.getItem(u)||p);(0,i.oz0)(localStorage.getItem(u)||p);var h=n(94184),v=n.n(h),m=n(18446),b=n.n(m),g=n(22188),y=n(27681),w=n.n(y),E=n(68630),C=n.n(E),S=n(81763),O=n.n(S),x=n(96486);function I(e,t,n){var r=.299*e+.587*t+.114*n;return{gray:r,light:r/255*100}}var N=function(e,t){var n=k.hexToRgb(e),r=k.rgbToHsv(n),o=r[0],i=r[1],a=r[2],s=[],c=I(n[0],n[1],n[2]),l=c.gray,d=c.light;s.push({rgb:n,hsv:[o,i,a],gray:l,light:d,checkedRgb:n,checkedColor:k.rgbToHex(n),checkedGray:l,checkedLight:d});for(var u=1;u<24;u++){for(var p=(o+15*u)%360,f=k.hsvToRgb([p,i,a]),h=I(f[0],f[1],f[2]),v=h.gray,m=h.light,b={rgb:n,hsv:[o,i,a],gray:v,light:m,checkedRgb:n,checkedColor:k.rgbToHex(n),checkedGray:v,checkedLight:m},g=i,y=a,w=f;d>m&&g>0;){g--;var E=I((w=k.hsvToRgb([p,g,y]))[0],w[1],w[2]),C=E.gray;m=E.light,v=C}for(;d0;){y--;var S=I((w=k.hsvToRgb([p,g,y]))[0],w[1],w[2]);C=S.gray,m=S.light,v=C}b.checkedLight=m,b.checkedGray=v,b.checkedRgb=w,b.checkedColor=k.rgbToHex(w),s.push(b)}return s},k=function(){function e(e){Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"reg",{enumerable:!0,configurable:!0,writable:!0,value:/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/}),this.setPrimaryColor(e)}return Object.defineProperty(e.prototype,"getDerivedColor",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var t=e.hexToRgb(this.color),n=e.rgbToHsv(t),r=n[0],o=n[1],i=n[2],a=[],c=[],l=function(t){var n=t[0],r=t[1],o=t[2];return r<10&&(r=10),e.hsvCorrection([n,r,o])},d=0;d<4;d++){var u=d+1,p=void 0,f=void 0,h=void 0;r>60&&r<300?(p=r+2*u,f=o+5*u,h=i-15*u):(p=r-2*u,f=o+5*u,h=i-15*u);var v=l([p,f,h]),m=e.hsvToRgb(v),b=e.rgbToHex(m);a.push({hex:b,hsv:v})}for(d=0;d<5;d++){u=d+1;var g=void 0,y=void 0,w=void 0;r>60&&r<300?(g=r-1*u,y=o-u*(o/5),w=i+5*u):(g=r+1*u,y=o-u*(o/5),w=i+u*(100-i)*5);var E=l([g,y,w]),C=e.hsvToRgb(E),S=e.rgbToHex(C);c.push({hex:S,hsv:E})}return(0,s.ev)((0,s.ev)((0,s.ev)([],a.reverse(),!0),[{hex:this.color,hsv:[r,o,i]}],!1),c,!0)}}),Object.defineProperty(e.prototype,"getNeutralColor",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var t=e.hexToRgb(this.color),n=e.rgbToHsv(t)[0],r=[65,45,25,10,6,4,2,1,1,1,0],o=[8,15,25,40,55,75,85,92,96,98,100],i=[],a=0;a<11;a++){var s=e.hsvCorrection([n,r[a],o[a]]),c=e.hsvToRgb(s),l=e.rgbToHex(c);i.push({hex:l,hsv:s})}return i}}),Object.defineProperty(e.prototype,"getFunctionalColor",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=e.hexToRgb(this.color),n=e.rgbToHsv(t),r=n[0],o=n[1];n[2];return[[0===r?0:e.functionY(r,{a:375.06,b:.6,c:134.93,d:353.95})-3,e.functionY(o,{a:95.12,b:2.34,c:72.07,d:69.59})-5,e.functionY(o,{a:100.21,b:-16.63,c:89.6,d:83})+7],[e.functionY(r+1,{a:217.7,b:-.02,c:514460.59,d:-118.56})-7,e.functionY(o+1,{a:95.1,b:.53,c:74.9,d:66.82})+5,e.functionY(o+1,{a:270.03,b:-.1,c:1.18,d:-103.6})-23],[Math.round(130.48+-.24*r+66e-5*r*r),e.functionY(o,{a:100.5,b:-6.41,c:80.99,d:65.5})+4,e.functionY(o,{a:81.5,b:-6.31,c:91.2,d:64.5})+4]].map((function(t){t=e.hsvCorrection(t);var n=e.hsvToRgb(t);return{hex:e.rgbToHex(n),hsv:t}}))}}),Object.defineProperty(e.prototype,"getDataColor",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=N(this.color);return[[e[0],e[4],e[8],e[12],e[16],e[20],e[23]],[e[0],e[5],e[10],e[15],e[19],e[23],e[3]],[e[0],e[1],e[2],e[3],e[4],e[5],e[6]]]}}),Object.defineProperty(e.prototype,"setPrimaryColor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this.reg.test(e))throw new Error("请传入十六进制色值");this.color=e}}),Object.defineProperty(e,"hexToRgb",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(4===e.length){for(var t="#",n=1;n<4;n+=1)t+=e.slice(n,n+1).concat(e.slice(n,n+1));e=t}var r=[];for(n=1;n<7;n+=2)r.push(parseInt("0x"+e.slice(n,n+2)));return r}}),Object.defineProperty(e,"rgbToHex",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e[0],n=e[1],r=e[2];return"#"+t.toString(16).padStart(2,"0")+n.toString(16).padStart(2,"0")+r.toString(16).padStart(2,"0")}}),Object.defineProperty(e,"rgbToHsv",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e[0],n=e[1],r=e[2];t/=255,n/=255,r/=255;var o,i,a=0,s=Math.min(t,n,r),c=i=Math.max(t,n,r),l=c-s;if(c==s)a=0;else{switch(c){case t:a=(n-r)/l+(n=360&&(t-=360),n<0&&(n=0),n>100&&(n=100),r<0&&(r=0),r>100&&(r=100),[t,n,r]}}),Object.defineProperty(e,"rgbCorrection",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e<0?0:e>255?255:e}}),Object.defineProperty(e,"functionY",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=t.a,r=t.b,o=t.c,i=t.d,a=(n-i)/(1+Math.pow(e/o,r))+i;return Math.round(a)}}),Object.defineProperty(e,"isLightColor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=e.hexToRgb(t),r=e.rgbToHsv(n);return r[1]<20&&r[2]>90}}),Object.defineProperty(e,"getFontColor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&e.isLightColor(t)?"#5C5F66":"#fff"}}),e}();!function(){function e(e,t){Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"class",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scope",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"theme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.scope=t,this.theme=e.config.key}Object.defineProperty(e.prototype,"generator",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.data,t=e.global,n=e.component,r=t.colors,o=t.fonts,i=t.borders,a=t.sizes,s=t.shadows;for(var c in this.parseColor(r),this.parseFont(o),this.parseGlobalCommon(i),this.parseGlobalCommon(a),this.parseSizesBase(a),this.parseShadows(s),n)"button1"===c?this.parseButton(n.button1):"inputRating"===c?this.parseInputRating(n.inputRating):this.parseComponentCommon(n[c])}}),Object.defineProperty(e.prototype,"getStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.getCssVariable()+this.getCustomClass()}}),Object.defineProperty(e.prototype,"getCssVariable",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"".concat(this.scope.join(", "),"{").concat(this.style.join(";"),";}\n")}}),Object.defineProperty(e.prototype,"getCustomClass",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"".concat(this.class.join("\n"))}}),Object.defineProperty(e.prototype,"getCustomStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t;return(null===(t=null===(e=this.data)||void 0===e?void 0:e.customStyle)||void 0===t?void 0:t.style)||""}}),Object.defineProperty(e.prototype,"cssFormat",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){t&&this.style.push("".concat(e,": ").concat(t))}}),Object.defineProperty(e.prototype,"classFormat",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.class.push("".concat(e,"{").concat(t,"}"))}}),Object.defineProperty(e.prototype,"parseColor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;for(var n in this.cssFormat("--colors-neutral-fill-none","translate"),e){var r=e[n];if("brand"!==n)r.body.forEach((function(e){var n=e.token;for(var r in e.body)"colors"===r?e.body.colors.forEach((function(e){t.cssFormat(e.token,e.color)})):Array.isArray(e.body[r])||t.cssFormat(n+r,e.body[r])}));else{var o=r.token;for(var i in r.body)"colors"===i?r.body.colors.forEach((function(e){t.cssFormat(e.token,e.color)})):Array.isArray(r.body[i])||this.cssFormat(o+i,r.body[i])}}}}),Object.defineProperty(e.prototype,"parseFont",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=function(n){var o=e[n];if("base"===n){var i="";o.body.forEach((function(e,t){i+=e.value||"",t!==o.body.length-1&&(i+=", ")})),r.cssFormat(o.token,i)}else o.body.forEach((function(e){t.cssFormat(e.token,e.value)}))},r=this;for(var o in e)n(o)}}),Object.defineProperty(e.prototype,"parseSizesBase",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=parseFloat(e.size.start.match(/\d+(\.\d+)?/)[0]),n=e.size.base,r=e.size.start.match(/[^\d\.]+/)[0],o=0;o<50;o++)this.cssFormat("--sizes-base-".concat(o+1),t+o*n+r)}}),Object.defineProperty(e.prototype,"parseGlobalCommon",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;for(var n in e)e[n].body.forEach((function(e){t.cssFormat(e.token,e.value)}))}}),Object.defineProperty(e.prototype,"parseShadows",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.shadow.body.forEach((function(e){var n=e.value.map((function(e){return"".concat(e.inset?"inset":""," ").concat(e.x," ").concat(e.y," ").concat(e.blur," ").concat(e.spread," ").concat(e.color)}));t.cssFormat(e.token,n.join(", "))}))}}),Object.defineProperty(e.prototype,"setComponentStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){if("string"==typeof n)this.cssFormat(t+e,n);else if(e.indexOf("padding-and-margin")>-1)for(var r in n)this.cssFormat(t+e.replace("padding-and-margin","")+r,n[r]);else if(e.indexOf("size")>-1)for(var r in n)this.cssFormat(t+e.replace("size","")+r,n[r]);else if(e.indexOf("font")>-1)for(var r in n)this.cssFormat(t+e.replace("font","")+r,n[r]);else if(e.indexOf("border")>-1)for(var r in n)this.cssFormat(t+e.replace("border","")+r,n[r]);else for(var r in n)this.cssFormat("".concat(t).concat(r),n[r])}}),Object.defineProperty(e.prototype,"parseButton",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=this,n=e.type,r=e.size,o=function(e,n){for(var r in n){var o=n[r];t.setComponentStyle(r,e,o)}},i=function(e){if(["default","hover","active","disabled"].forEach((function(t){o(e[t].token,e[t].body)})),e.custom){var t=e.type,n=function(e){return["color: var(--button-".concat(t,"-").concat(e,"-font-color)"),"background: var(--button-".concat(t,"-").concat(e,"-bg-color)"),"box-shadow: var(--button-".concat(t,"-").concat(e,"-shadow)"),"border-width: var(--button-".concat(t,"-").concat(e,"-top-border-width) var(--button-").concat(t,"-").concat(e,"-right-border-width) var(--button-").concat(t,"-").concat(e,"-bottom-border-width) var(--button-").concat(t,"-").concat(e,"-left-border-width)"),"border-color: var(--button-".concat(t,"-").concat(e,"-top-border-color) var(--button-").concat(t,"-").concat(e,"-right-border-color) var(--button-").concat(t,"-").concat(e,"-bottom-border-color) var(--button-").concat(t,"-").concat(e,"-left-border-color)"),"border-style: var(--button-".concat(t,"-").concat(e,"-top-border-style) var(--button-").concat(t,"-").concat(e,"-right-border-style) var(--button-").concat(t,"-").concat(e,"-bottom-border-style) var(--button-").concat(t,"-").concat(e,"-left-border-style)")].join(";")};a.classFormat(".cxd-Button--".concat(t),"".concat(n("default"))),a.classFormat(".cxd-Button--".concat(t,":not(:disabled):not(.is-disabled):hover"),"".concat(n("hover"))),a.classFormat(".cxd-Button--".concat(t,":not(:disabled):not(.is-disabled):hover:active"),"".concat(n("active")))}},a=this,s=0,c=n;sBe dragged into the placeholder area',"245897371cda2055f5c17c6cf298ed48":"Tip: No redirection is allowed in the preview mode.",e1b7255934e3189b1f5d440fc1aa0230:"An exception occurs during the plugin registration because a plugin with the same name already exists:","979a50681e278dcc0be18f68459e8217":"System variable","75c142934800d6ee31fcf3fdff9e5d53":"The [Amis-editor] has a {{@1}} plugin.","0e24e1bbc19612a350f81296d9fb7802":"First select an element as the insertion position.",bd690facb536d759814ee64f2760fecb:"Adding a component is not allowed at the current node.","02f180cd26ff0951ddfda490080ee5ea":"The configuration item has been copied.","1ff035555ac8a68dc5b0ea2d0af55f00":"The clipboard content is empty.","6cb01692eea2fa7066d20fe2b6ccaea3":"False data","7f2f0461a58c43667d7245ce92bb2e77":"Hold and drag it to adjust its position.","78c1c38b91c672da1113fa2564c14ea6":"Insert a component forward.","87f48bbadfbef5ef4554e06b7e141d37":"Insert a component backward.","95b351c86267f3aedf89520959bce689":"Edit","0ec9eaf9c3525eb110db58aae5912210":"More","417db09508befe7dbe9f84a517a6edec":"Repeat a copy.","99b81127ef28368151621cdfccce69f8":"Cancel the multi-selection.","205f45ee17394bd5668412780eaa55e2":"Insert a component.","4c725f0159023c485ead728680e277ba":"Select {{@1}}.","7ad78e0991f34ff3a345c59a2fc31572":"Select a level.",aafda9e8f6b7b613680677c513edb7a6:"Cancel the selection.",b58d101f52531c845f15db63d7212115:"Copy the configuration.","74e2bc6615b7dbbb11fd5e1e212263ae":"Cut the configuration.",e2f401af580d1354ae00ec4ca19e2e24:"Paste the configuration.","21462ae22216eec41dc688cc4a8ae64b":"Move forward",ed2bc13d8bbd99e16e017dd5f5393393:"Move backward","9e54f3e4ee3330299c5fdc910c2e8d3c":"Undo",ae8e86e426c2ba00da274b66dc372a8b:"Redo","2b6bc0f293f5ca01b006206c2535ccbc":"Operation",aa920263020f14211a44ea172efc7253:"Context data","48ac479789304b37afa2f1b06642f4da":"Current","9bc16c658ab8a8c4eddc5e24d85bef20":"Upper layer","004d4be2ba8e6b8eed9333d15bc80a88":"Upper {{@1}} layer",e366ccf1556c0672dcecba135ed5472e:"Setting","0cbec43d00e491a663ff0525ffe31868":"Quickly build 「{{@1}}」.","1dd554cdfc1ddf7dce13453805523c16":"Change",a82240ce09faf0b972a8aa5c9e93d209:"Insert the component panel.",eadc8c8d4a8776893672330598babca0:"A position error occurs. The target position is not found.",f3c057f37fb9a4e7dd44b04919c12578:"Click to add an element in the left component panel.","54ea89b497ec3bb319c68844dfa3687f":"API","51e213e66b37d716a35baebc9193035c":"This API is used to store the data. After submission of the form, you can import the data into this API.
\n API response body requirements (If data exists in the data, the data is merged into the form context):
\n {{@1}}\n}, null, '
')}","388e0ff896ea4f23e71d36c06443f157":"API response body requirements:
\n {{@1}},\n page: 0,\n total: 0\n}, null, '
')}",b4bc91701b86fe8543d649e97daea602:"Initialize the API",f8747759c73697367bc8a570977c4a62:"API response body requirements:
\n {{@1}}\n}, null, '
')}",d2b46e7989e18239d7036affd4d521db:"{{@1}}field","9caecd931b956381e0763d05aa42835c":"Field","47cd88592f6ef2b258f02c0690d267ed":"Hide, which is selected by default","32c65d8d7431e76029678ec7bb73a5ab":"Title","020586d0c69f8211840ddf9ee9bbf6ab":"Bind the field","226b0912184333c81babf2f1894ec0c1":"Type","97d07614380da93d257f9fbf81aa56fb":"Text","20def7942674282277c3714ed7ea6ce0":"Image","4ff1e74e43a3586339251494117185ad":"Date",c7bff79d059a0b7ff9b02441959d8be2:"Progress","3fea7ca76cdece641436d7ab0d02ab1b":"Status","9da188491dd34c4382a5b9f006194e41":"Mapping",b3e55578af5dd473bab62641bb2f5f8e:"Input type","9b6425cd2d496c9cb5a6c6b8ff125d1b":"Input box","15d169d28cd48c97fe751e4cc92ca926":"Multi-line text","9597dcaf432ceba92a160d61cb1ef65f":"Digital input","9913107b19cb6012250134ff91377430":"Radiobox","454e60f5759903d7d3dba58e3f9bd590":"Select-box",db98f889ce6bc235e66bd4b2a788d137:"Checkbox","006ded9fa277cf030592021f595a07d5":"Select",a6beb974cc0b50eebd18120b8110a88b:"Switch",b339aa87104709397ba68e7ebbc6e5ba:"Table","481e034e6026969aae4ce7ce7c8a7b6f":"File upload","6bfb9bb2218ff32b6139e98bc93707c0":"Image upload","24b6d4c0892a8f3ee2a982e3ab0afe38":"Rich text editor","4484fa04e7b71db4c8293e5bcb53eca4":"Add a field.","4cc6a76c146c0360a41ceaf5e212c891":"Generate a field automatically based on the API.",a9fea442707e26dee478b34a2f2ce263:"First fill in the API.","91aa2166ee4811414381c8d94e6567e6":"Because the API return format is incorrect, check the API response format requirements.","3712972d84adf48acbd6ad24b4d75ad0":"List","66ab5e9f24c8f46012a25c89919fb191":"Add",e73cefac9d030927da1618c7b15c98c9:"Edit in batch","7fb62b30119c3797a843a48368463314":"Delete in batch","8d9a071ee2ef45e045968e117a205c07":"Import","55405ea6ff6fd823ffab7e6b10ddfa95":"Export",c26996a6506adf397f0668d376d0b40b:"Simple query","6ff4bf3d567e977aa4c90c27dff1e6db":"Fuzzy query","9c4666fd08c2738eb9611a3721cb5f0f":"Advanced query",a094e5b7699ea4b61094cc4120170423:"Data source",eeb6908870e058bc23d52c1e405a054e:"Previous step","38ce27d84639f3a6e07c00b3b4995c0e":"Next step","392342f7750a565f9a79c678c6b12421":"","8e44aba21d01c1e08cc79f4ebaf0b3f2":"The layout container component does not support dragging and inserting child elements.","52e6abbe5c11e7cbf14788c1540f8bf2":"Copied","372ea9fd27fb7cfacfe1b4ca3046f8d0":"Configuration Item","2a6287664de5ab46c65220c7182878ff":"Cut",db805d4e361ac2d3fc6047eaea1a7c69:"Free container","969e9e56b3812abffa3994f35ea31835":"Adsorption vessel","5b804b05e14aaacc75033a4f77fc2844":"Source code","69a53230577258b6d97ee932befcc168":":",cc6aeb073ebc3cb29734a49164f8964c:"Page variables",b71e8739cb9bcba8057a8fa8b59512da:""}),(0,i.AfN)("zh-CN",{"54ea89b497ec3bb319c68844dfa3687f":"接口","51e213e66b37d716a35baebc9193035c":"用来保存数据, 表单提交后将数据传入此接口。
\n 接口响应体要求(如果data中有数据,该数据将被合并到表单上下文中):
\n {{@1}}\n}, null, '
')}","388e0ff896ea4f23e71d36c06443f157":"接口响应体要求:
\n {{@1}},\n page: 0,\n total: 0\n}, null, '
')}",b4bc91701b86fe8543d649e97daea602:"初始化接口",f8747759c73697367bc8a570977c4a62:"接口响应体要求:
\n {{@1}}\n}, null, '
')}",d2b46e7989e18239d7036affd4d521db:"{{@1}}字段","9caecd931b956381e0763d05aa42835c":"字段","47cd88592f6ef2b258f02c0690d267ed":"隐藏,默认选中","32c65d8d7431e76029678ec7bb73a5ab":"标题","020586d0c69f8211840ddf9ee9bbf6ab":"绑定字段","226b0912184333c81babf2f1894ec0c1":"类型","97d07614380da93d257f9fbf81aa56fb":"文本","20def7942674282277c3714ed7ea6ce0":"图片","4ff1e74e43a3586339251494117185ad":"日期",c7bff79d059a0b7ff9b02441959d8be2:"进度","3fea7ca76cdece641436d7ab0d02ab1b":"状态","9da188491dd34c4382a5b9f006194e41":"映射",b3e55578af5dd473bab62641bb2f5f8e:"输入类型","9b6425cd2d496c9cb5a6c6b8ff125d1b":"输入框","15d169d28cd48c97fe751e4cc92ca926":"多行文本","9597dcaf432ceba92a160d61cb1ef65f":"数字输入","9913107b19cb6012250134ff91377430":"单选框","454e60f5759903d7d3dba58e3f9bd590":"勾选框",db98f889ce6bc235e66bd4b2a788d137:"复选框","006ded9fa277cf030592021f595a07d5":"下拉框",a6beb974cc0b50eebd18120b8110a88b:"开关",b339aa87104709397ba68e7ebbc6e5ba:"表格","481e034e6026969aae4ce7ce7c8a7b6f":"文件上传","6bfb9bb2218ff32b6139e98bc93707c0":"图片上传","24b6d4c0892a8f3ee2a982e3ab0afe38":"富文本编辑器","4484fa04e7b71db4c8293e5bcb53eca4":"添加字段","4cc6a76c146c0360a41ceaf5e212c891":"基于接口自动生成字段",a9fea442707e26dee478b34a2f2ce263:"请先填写接口","91aa2166ee4811414381c8d94e6567e6":"API返回格式不正确,请查看接口响应格式要求","3712972d84adf48acbd6ad24b4d75ad0":"列表","66ab5e9f24c8f46012a25c89919fb191":"新增",f26225bde6a250894a04db4c53ea03d0:"详情","95b351c86267f3aedf89520959bce689":"编辑","2f4aaddde33c9b93c36fd2503f3d122b":"删除",e73cefac9d030927da1618c7b15c98c9:"批量编辑","7fb62b30119c3797a843a48368463314":"批量删除","8d9a071ee2ef45e045968e117a205c07":"导入","55405ea6ff6fd823ffab7e6b10ddfa95":"导出",c26996a6506adf397f0668d376d0b40b:"简单查询","6ff4bf3d567e977aa4c90c27dff1e6db":"模糊查询","9c4666fd08c2738eb9611a3721cb5f0f":"高级查询",a094e5b7699ea4b61094cc4120170423:"数据来源","4e7f76261f8c4c6d78998f85fc1f4c6e":"外边距","16a20243f9b741c08216dc9548de2968":"整体","23ecf42cada8bf2715792d718544d107":"极小","391b8fa9c747a1799353ab856e666ad5":"小",fd6e80f1e0199d6ecc3ee81ae04aa9ef:"正常",aed1dfbc31703955e64806b799b67645:"中",ab18e30c0dc4093ceeda8961fac3d1f4:"大","461d364c67ec6a45e011ed13f2f7154f":"上边距","31e3752986d64c8b36897c8641c8628d":"右边距",eabe91d9426b6446f707cea3e7ab2418:"下边距","2e46d251ee6188bb1b3ff20656276572":"左边距","3dc4038d0f0a2d2b3c2b2e29a5ec6dde":"置无",a8b0c20416853bda54120bf19477ad11:"全部",af767b7e4ae069d54f9ea839858d4c6d:"上","4d9c32c23df5d234e629c922c58d8e12":"右","3850a186c3235bc646d4c2f79cebac36":"下",d2aff1417831aa621c16cd5b95306b4b:"左","841d77223f0ec8cd0b530ed8e0775b20":"内边距","961534b4ea37e4e88aada736b299d063":"边框",d4d2a66820d30e07b44c850eb3f116c0:"位置","58f966670529f4753fb3c5a0647606be":"大小","6b36c6f7ec834692ec6c8e3816349fdd":"颜色",fbae87bcc352f6933541fb77a07418ed:"主色",d8c7e04c8e2be23dd3b81a31db6e04f1:"信息","900c70fa5f7dbc014e6f762d5e0e885c":"警告","540f84ddc0883866b229f71c2844199a":"危险","330363dfc524cff2488f2ebde0500896":"成功","2fc96b2704b05d6a9f299c442573ee77":"白色",adb7e5312abdb9a44297e48d63815fa3:"暗色","48d0a09bdd5fe7e89f0a445b0ffdf14f":"浅色","0d98c74797e49d00bcc4c17c9d557a2b":"其他","0103eb2d3dca70270d1a74e9ec987ac9":"圆角","8456bc40d48da5af833f1c63385e9879":"字体",b3b2682579133673d3fe08c156d565dc:"细","56dce5d1cbb97439d291c458e50107e0":"粗","49a79f4047b81186c069ed1c9c151c66":"淡色","8e1b944f4389bdaab6f11d5bc83190c8":"背景",c28479019e24e0e4745f4948e9e97ee7:"宽度",f72ce9ad683cc82e0eab557ffc9c67a0:"特小",b95c462d7697958c25861193fc89ae07:"加大","3386da5f56fac758ed0f18e024ecb943":"特大",ffaa96ef7232cb6d8ee4d7e673dbf4ac:"占满","47eac1ac32a8aa9081dffbdc4d374318":"请输入 css 类名","939d5345ad4345dbaabe14798f6ac0f1":"提交","55c56d01a7747ffe0346d42145b62d97":"[amis-editor]响应动态添加插件事件:",d6f73c6f3b92be5a64f7ea0163501284:"区域节点不允许剪切。","4fda4f585214d469c04466e2fc98b796":"根节点不允许剪切。","657bbe06d3922b23552817df7fa8268e":"当前元素不允许剪切。","416445a316595bdeb44b661c7de875a8":"当前元素不能向上移动","6ac88d87b2fd118ba7beab8c17880470":"当前元素不能向下移动",fdb3cba60407b2f1aea0230cca644573:"区域节点不可以直接删除。","8a4b4e2e3b0382007e0c69ed1fe6fe71":"根节点不允许删除。","22f031f3de2e55c430a818d8c588f7a1":"当前元素不允许删除。","3b6d5995e9f2ecd3df059b3f1bea201e":"调用错误,或者存在跨域。","09f33be5ec04eb48b3102e4e31af5b38":"调用错误","283c2a52955ad87574fd6c0cc932c443":"只能在 Iframe 里面调用",a71002967924a83e32b38a80705290fb:"系统错误","058ebdf2884474ebff2977ba2f0e275e":"系统消息","88f000a0fdc38ce3808cef072b00893c":"渲染中...","279321f97f11da7bc90facca156b3444":"代码有误,错误的地方是\\n {{@1}}","7e4b38ba0ab9cbfcabd9dd859e36b601":"当前有部分已更改数据因为格式不正确尚未保存,您确认要丢弃这部分更改吗?",af86ad9dd8a221f931dcdc5a63382b6f:"查看更改","43d586cd6cf1a512c0bcb85ed9efde51":"请确认",bb79667f37035e9562ec6bcffd6cf8ef:"组件","5cb297585d4c81bb8fdbd31210a30d6f":"系统组件","6fce1c9aa3654ae2f0eedcc068a7e189":"自定义组件","06e004ef21414c06d3e4ff2cefaf6a04":"代码","7f7c624a843b0d539a4ea59a696702f9":"批量操作",b80ed82d124c6fd9242dcacdda2a2f8b:"更改组件类型","41150516bf0d90646edc5239593366e9":"选中组件插入到",d87481b371771b4f150da76e311bbbef:"输入关键字可过滤组件",becdc848350872592201e31bab03892a:"无法预览","751dfe6f476903c21381c9acf88332e2":"没有可用组件,也许你该切换容器试试。",e22c9a05b424b761efce11f17726fdd7:"替换","9bdb07e72d3a9a6084201a7398523f5a":"插入","625fb26b4b3340f7872b411f401e754c":"取消","95509c09bdef4bb7842a9b957ab1f971":"关闭悬浮模式","426480bb614633c8c3ba8faa0338b72f":"开启悬浮模式",fbf7967f9baf6a22bd6ca7f4e6390bf9:"{{@1}}-[公共配置]","93383ef1ab4a433df97a56a73e571b9f":"大纲","962d43ff8d39c381d8e2c73838412111":"查询页面元素","0c95d1856ffdeeade7cebe0ef928f361":"将目标拖入导航中的节点可以切换容器",c482df2a3ac8e014febd8a5fc9cadaea:"加载中,请稍等...",c44c6c179c44e794b103053886847dc4:"没有预览图",e4cefe7df36e92da1d7e875b92655507:"点击展开","7ae451de83aa6f5f140e941904377391":"点击折叠","84c8f0087acfc9b9862371d0bd59b830":"点击添加「{{@1}}」",f3430f4fdd8b9643daa74f4a5716dd15:" 详情 ",b797a8992ef41320919e45a069f2b459:"没有找到可用组件,您可以换个关键字继续查找。","0bd36c8db19e3a93506f39ebc8ff0ab9":"当表单、列表等组件有名字时会出现在这里方便选择",bb28ec819520ced0ffb4c3da01f112e2:"点击清空当前区域",eeb6908870e058bc23d52c1e405a054e:"上一步","38ce27d84639f3a6e07c00b3b4995c0e":"下一步",e83a256e4f5bb4ff8b3d804b5473217a:"确认","22c799040acdb2601b437ed5449de076":"容器",bd9fcf46b4e5993f97fe04ee9ebcd7ed:"撤销",c3c873d33f1c6482c79b0ffd862786cd:"重做",e9509c688a0df6b088503d21569b6e8f:"类型错误,无法渲染","2168c5735883bd040eaf09909d0911b8":"输入关键字查询组件",e9c38f88375807704270aa3572454976:"搜索历史","288f0c404c4e546aa3683ff5054e85e2":"清空","4b9bc9abf2a2beb3772d903a3d01d1de":"点击删除这条搜索记录","9d3128a1675de32cdd290b31140a7290":"搜索结果为空,您可以换个关键字继续查找。",accb901a02b1415b40d95cdd31b8da1d:"组件分类","79d3abe929f67f0644a78bf32adb3a89":"复制",b7d817611230d382f6ef92b41848a342:"复制当前选中元素",eafbece1016a6af76cce466e55ad9f00:"粘贴",e0b9bb8e41eccd3ce6b282664643d7f8:"将复制的元素插入到当前选中节点","43fc77886b7fbcd658f0ccdba36bd5a0":"剪切",a6be4ad12e9612811963c44466af3218:"剪切当前选中元素","58887132871b71b015c3a391e7755815":"恢复上一次撤销的操作",be5fbbe34ce9979bfb6576d9eddc5612:"保存","1f81fd4598e9151538f29c41b8aa0020":"保存当前所有操作","645dbc5504e722a30896486085a06b32":"预览","5bc425ac8b75c571093a63eb6073c354":"开启预览模式","426cd14ebd62a4922186527d07ba37f3":"删除当前节点","499e58e764420aeed2d1476a56d8fa34":"向上移动",d040485f0e3887f0b297f8f772db03e4:"向上移动当前节点","08ad565f066d30572d1f8e2ee17cbe12":"向下移动","6348dc0e83d6ab391a8816f67d0e5ceb":"向下移动当前节点",fbec96e028142496df88ed2c63b44512:"点击查看当前可用快捷键","9c3f1278ffa822835bb3a677f02bca27":"当前可用快捷键","4e98a5dcd3defffb23629fce3add04f6":"暂无快捷键","186733ed7ec817040b8f9cbc610ba49a":"程序错误",e777eb796f8a02e97a891fde43d10ce4:"{{@1}}变量","5d665bc55779aafdefcc4050e3a8429e":"{{@1}}({{@2}})渲染发生错误:",a30dd4945df5b44b264fa3be6ee9682e:"当前渲染器信息:","63f94190d2d4ea22263e6e9f07c96558":"错误对象:",f66335b5bff0e26fdff2a3303e0f9bb0:"错误信息:","966e23b5c1efe8e18fc4f0c326d47314":")渲染发生错误,详细错误信息请查看控制台输出。","245897371cda2055f5c17c6cf298ed48":"温馨提示:预览模式下禁止跳转",e1b7255934e3189b1f5d440fc1aa0230:"注册插件异常,已存在同名插件:","979a50681e278dcc0be18f68459e8217":"系统变量","75c142934800d6ee31fcf3fdff9e5d53":"[amis-editor]当前已有{{@1}}插件","0e24e1bbc19612a350f81296d9fb7802":"请先选择一个元素作为插入的位置。",bd690facb536d759814ee64f2760fecb:"当前节点不允许追加新组件。","02f180cd26ff0951ddfda490080ee5ea":"配置项已复制","1ff035555ac8a68dc5b0ea2d0af55f00":"剪切板内容为空","6cb01692eea2fa7066d20fe2b6ccaea3":"假数据","7f2f0461a58c43667d7245ce92bb2e77":"按住拖动调整位置","78c1c38b91c672da1113fa2564c14ea6":"向前插入组件","87f48bbadfbef5ef4554e06b7e141d37":"向后插入组件","0ec9eaf9c3525eb110db58aae5912210":"更多","417db09508befe7dbe9f84a517a6edec":"重复一份","99b81127ef28368151621cdfccce69f8":"取消多选","205f45ee17394bd5668412780eaa55e2":"插入组件","4c725f0159023c485ead728680e277ba":"选中{{@1}}","7ad78e0991f34ff3a345c59a2fc31572":"选中层级",aafda9e8f6b7b613680677c513edb7a6:"取消选中",b58d101f52531c845f15db63d7212115:"复制配置","74e2bc6615b7dbbb11fd5e1e212263ae":"剪切配置",e2f401af580d1354ae00ec4ca19e2e24:"粘贴配置","21462ae22216eec41dc688cc4a8ae64b":"向前移动",ed2bc13d8bbd99e16e017dd5f5393393:"向后移动","9e54f3e4ee3330299c5fdc910c2e8d3c":"撤销(Undo)",ae8e86e426c2ba00da274b66dc372a8b:"重做(Redo)","2b6bc0f293f5ca01b006206c2535ccbc":"操作",aa920263020f14211a44ea172efc7253:"上下文数据","48ac479789304b37afa2f1b06642f4da":"当前","9bc16c658ab8a8c4eddc5e24d85bef20":"上层","004d4be2ba8e6b8eed9333d15bc80a88":"上{{@1}}层",e366ccf1556c0672dcecba135ed5472e:"设置","0cbec43d00e491a663ff0525ffe31868":"快速构建「{{@1}}」","1dd554cdfc1ddf7dce13453805523c16":"变更",a82240ce09faf0b972a8aa5c9e93d209:"插入组件面板",eadc8c8d4a8776893672330598babca0:"位置错误,目标位置没有找到",f3c057f37fb9a4e7dd44b04919c12578:"请从左侧组件面板中点击添加新的元素。",f942c7a6a35c4eb1381d2966462d0489:'
拖入占位
',"392342f7750a565f9a79c678c6b12421":"<隐藏状态>","8e44aba21d01c1e08cc79f4ebaf0b3f2":"布局容器组件不支持拖拽插入子元素。","52e6abbe5c11e7cbf14788c1540f8bf2":"已复制","372ea9fd27fb7cfacfe1b4ca3046f8d0":"配置项","2a6287664de5ab46c65220c7182878ff":"已剪切",db805d4e361ac2d3fc6047eaea1a7c69:"自由容器","969e9e56b3812abffa3994f35ea31835":"吸附容器","5b804b05e14aaacc75033a4f77fc2844":"源码","69a53230577258b6d97ee932befcc168":"<列>:",cc6aeb073ebc3cb29734a49164f8964c:"页面变量",b71e8739cb9bcba8057a8fa8b59512da:"<列>"});var ae=i.P6Y.guid,se=i.P6Y.omitControls,ce=i.P6Y.isObjectShallowModified,le=i.P6Y.cloneObject,de=i.P6Y.anyChanged,ue=i.P6Y.noop,pe=i.P6Y.makeHorizontalDeeper,fe=i.P6Y.findIndex,he=i.P6Y.isEmpty,ve=i.P6Y.eachTree,me=i.P6Y.createObject,be={};function ge(e){return Ue(e)?(Object.keys(e).forEach((function(t){void 0===e[t]&&delete e[t]})),e):e}function ye(e){if(!Ue(e)||e.$$typeof)return e;if(Array.isArray(e))return e.map(ye);var t={},n=!1;return e.$$id||(n=!0,t.$$id=ae()),Object.keys(e).forEach((function(r){var o=e[r];if(Array.isArray(o)){var i=!1,a=o.map((function(e){var t=ye(e);return t!==e&&(i=!0),t}));i&&(n=!0,t[r]=a)}else(a=ye(o))!==o&&(n=!0,t[r]=a)})),n&&(e=ge((0,s.pi)((0,s.pi)({},e),t))),e}function we(e,t){if(Array.isArray(e)){var n=!1,r=e.map((function(e){var r=we(e,t);return r!==e&&(n=!0),r}));return n?r:e}if(!Ue(e)||(0,g.bi)(e))return e;var o=!1,i={};return e.$$id&&(o=!0,i.$$id=void 0),Object.keys(e).forEach((function(n){var r=e[n];if("function"==typeof t?t(n,r):!1!==t&&"__"===n.substring(0,2))return i[n]=void 0,void(o=!0);var a=we(r,t);a!==r&&(o=!0,i[n]=a)})),o&&(e=ge((0,s.pi)((0,s.pi)({},e),i))),e}function Ee(e){var t=e.themeCss||e.css;if(!t||"page"===e.type)return e;var n={};return Object.keys(t).forEach((function(t){if("$$id"!==t){var r="".concat(t,"-").concat(e.id.replace("u:",""));e[t]?~e[t].indexOf(r)||(n[t]=e[t]+" "+r):n[t]=r}})),e=ge((0,s.pi)((0,s.pi)({},e),n))}function Ce(e,t,n){var r=e;return n&&n.push(e),t.forEach((function(e){r=r[e],n&&n.push(r)})),r}function Se(e,t,n){void 0===n&&(n="$$id");for(var r=[],o=!1,i=[{path:".",data:e}],a=function(){var e=i.shift(),a=e.data,s=e.path;if(a[n]===t)return o=!0,r=s.split(".").filter((function(e){return e})),"break";Object.keys(a).forEach((function(e){var t=a[e];Array.isArray(t)?t.forEach((function(t,n){Ue(t)&&i.push({data:t,path:"".concat(s,".").concat(e,".").concat(n)})})):Ue(t)&&i.push({data:t,path:"".concat(s,".").concat(e)})}))};i.length&&"break"!==a(););return o?r:null}function Oe(e,t,n){var r=Se(e,t,n);return null===r?null:Ce(e,r)}function xe(e,t,n){void 0===n&&(n=!1);var r=Se(e,t);if(null===r||!r.length)return null;var o=e,i=[o];for(r.pop(),r.forEach((function(e){o=o[e],i.unshift(o)}));n&&Array.isArray(i[0]);)i.shift();return i[0]}function Ie(e,t,n,r){void 0===r&&(r=!1);var o=Se(e,t);if(null===o)return e;var i=[],a=Ce(e,o,i);if(Array.isArray(n)&&i[i.length-2]&&Array.isArray(i[i.length-2])){var c=i[i.length-2].indexOf(i[i.length-1]);i[i.length-2]=i[i.length-2].concat(),i[i.length-2].splice.apply(i[i.length-2],[c,1].concat(n)),i.pop()}else i[i.length-1]=a=(0,s.pi)((0,s.pi)((0,s.pi)({},r?null:a),n),{$$id:t});for(;i.length>1;){var l=i.pop();Array.isArray(i[i.length-1])?i[i.length-1]=i[i.length-1].concat():i[i.length-1]=(0,s.pi)({},i[i.length-1]),i[i.length-1][o[i.length-1]]=l}return i[0]}function Ne(e,t,n,r){var o=Se(e,t);if(null===o)return e;Array.isArray(n)&&n.push.apply(n,o);var i=o.pop(),a=[],c=Ce(e,o,a);for(Array.isArray(c)?(a[a.length-1]=c=c.concat(),c.splice(i,1),r&&!c.length&&(a[a.length-1]=void 0)):(a[a.length-1]=c=(0,s.pi)({},c),delete c[i]);a.length>1;){var l=a.pop();Array.isArray(a[a.length-1])?a[a.length-1]=a[a.length-1].concat():a[a.length-1]=(0,s.pi)({},a[a.length-1]),void 0===l?delete a[a.length-1][o[a.length-1]]:a[a.length-1][o[a.length-1]]=l}return a[0]}function ke(e,t,n){var r=Se(e,t);if(null===r)return e;var o=parseInt(r.pop(),10),i=[],a=Ce(e,r,i);if(!Array.isArray(a))return e;for(i[i.length-1]=a=a.concat(),n(a,a[o],o);i.length>1;){var c=i.pop();Array.isArray(i[i.length-1])?i[i.length-1]=i[i.length-1].concat():i[i.length-1]=(0,s.pi)({},i[i.length-1]),i[i.length-1][r[i.length-1]]=c}return i[0]}function Re(e,t){return ke(e,t,(function(e,t,n){0!==n&&(e.splice(n,1),e.splice(n-1,0,t))}))}function Pe(e,t){return ke(e,t,(function(e,t,n){n!==e.length-1&&(e.splice(n,1),e.splice(n+1,0,t))}))}function Ae(e,t,n){return void 0===n&&(n={}),ke(e,t,(function(e,t,r){var o=ye(we(t));e.splice(r+1,0,Te(o,n))}))}function Te(e,t){return void 0===t&&(t={}),He(e,(function(e,n,r){var o,i="string"==typeof e&&0===e.indexOf("u:");if("id"===n&&i&&r){var a=Ke();t[r.id]=a,r.id=a}else"componentId"===n&&i&&(r.componentId=null!==(o=t[e])&&void 0!==o?o:e);return e})),e}function Fe(e){Object.isFrozen(e)||(Array.isArray(e)&&e.forEach((function(e){return Fe(e)})),Ue(e)&&!(0,g.bi)(e)&&(e.type&&!e.id&&(e.id=Ke()),Object.keys(e).forEach((function(t){var n=e[t];(Ue(n)||Array.isArray(n))&&Fe(n)}))))}function De(e,t,n){return void 0===n&&(n={}),(null==e?void 0:e.$$commonSchema)===t?n[t]=e:C()(e)?Object.keys(e).forEach((function(r){De(e[r],t,n)})):Array.isArray(e)&&e.map((function(e){return De(e,t,n)})),n}function je(e,t){if(Array.isArray(e))return e.map((function(e){return je(e,t)}));if(C()(e)){var n={},r=!1;return Object.keys(e).forEach((function(o){var i=e[o],a=je(i,t);if(e.$$commonSchema?n[o]&&(n[o]=a):n[o]=a,a!==i&&(r=!0),"$$commonSchema"!==o||t){if("$$commonSchema"===o&&t){var c=De(t,i);c[i]&&(e=n=(0,s.pi)({},c[i]))}}else e=n={$$commonSchema:i}})),r?n:e}return e}function Me(e){if(Array.isArray(e))return e.map((function(e){return Me(e)}));if(C()(e)){var t={},n=!1;Object.keys(e).forEach((function(r){var o=e[r];~["visible","visibleOn","hidden","hiddenOn","toggled"].indexOf(r)&&(r="$$".concat(r),n=!0);var i=Me(o);t[r]=i,i!==o&&(n=!0)}));var r=n?t:e;return(null==r?void 0:r.type)?tt(r):r}return e}var _e=i.P6Y.autobind;function ze(e){return e.replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}))}var Be=function(e,t){var n;return(0,g.U5)(e,(function(e){b()(e,n)||(t(e,n),n=e)}))};function Le(e,t,n){return w().diff(e,t,n)}function $e(e,t){return t?t.reduce((function(t,n){return function(e,t,n){if(e&&Array.isArray(null==n?void 0:n.path)){e=e===t?(0,s.pi)({},e):e;var r=n.path.concat();"A"!==n.kind&&r.pop(),r.reduce((function(e,t){var n=e.target,r=e.source[t],o=n[t];return r===o&&(o=Array.isArray(o)?o.concat():(0,s.pi)({},o),n[t]=o),{source:r,target:o}}),{target:e,source:t}),w().applyChange(e,t,n)}return e}(t,e,n)}),e):e}function He(e,t){Object.keys(e).forEach((function(n){var r=e[n];C()(r)||Array.isArray(r)?He(r,t):t(r,n,e)}))}var Ve=function(e){return O()(e)||!isNaN(parseFloat(String(e).toString()))};function Ze(e){return"String"===Object.prototype.toString.call(e).slice(8,-1)}function Ue(e){var t=!1;return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&(t=!0),t}function Ke(){return"u:"+ae()}function We(e){return e.pluginIcon&&(0,a.OL)(e.pluginIcon)}function Je(e){return!(!e||"flex"!==e.type)}function qe(e,t){if("auto"===e)return"auto";var n=parseInt(e),r=t;O()(t)||(r=parseInt(t));var o=e.substring(n.toString().length);return o||(o="px"),"".concat(n+r).concat(o)}function Ye(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"")}function Ge(e){return["divider","crud2","crud","list","picker","table","table-view","grid","cards","card","form","progress","diff-editor","editor","input-range","flex"].indexOf(e)>-1}function Xe(e,t){var n;return t=t||(null===(n=null===window||void 0===window?void 0:window.editorStore)||void 0===n?void 0:n.appCorpusData),C()(t)?(0,i.Xcl)(e,(function(e){return t[e]||e})):e}function Qe(e){var t,n;return Ze(e)&&(null===(n=null===(t=null===window||void 0===window?void 0:window.editorStore)||void 0===t?void 0:t.appCorpusData)||void 0===n?void 0:n[e])||e}function et(e){var t,n,r,o,i=!1;return!!e&&("page"===e.rendererName&&("aside"===e.name||"body"===e.name)||!!(null===(n=null===(t=e.node)||void 0===t?void 0:t.schema)||void 0===n?void 0:n.isFreeContainer)||(((null===(r=e.$$editor)||void 0===r?void 0:r.needFillPlaceholder)||(null===(o=e.regionConfig)||void 0===o?void 0:o.needFillPlaceholder))&&(i=!0),i))}function tt(e){var t=(0,x.cloneDeep)(e);return t.themeConfig=be,(0,x.assign)(t,function(e){if(!e||!e.global)return{};var t=e.global,n=t.colors,r=t.fonts,o=t.borders,i=t.sizes,a=t.shadows,s=[],c=[],l=[],d=[],u=[],p=[],f=[],h=[],v=[],m=[];function b(e){var t=[];return e.body.common.forEach((function(n,r){t.push({label:n.label,value:"var(".concat(e.token).concat(n.color+1,")"),realValue:e.body.colors[n.color].color})})),{label:e.label,value:e.token,children:t}}s.push({label:"品牌色",value:"brand",children:[b(n.brand)]});var g={label:"中性色",value:"neutral",children:[]};n.neutral.body.forEach((function(e,t){g.children.push(b(e))})),s.push(g);var y={label:"辅助色",value:"neutral",children:[]};n.func.body.forEach((function(e,t){y.children.push(b(e))})),s.push(y);var w=function(e){var t,n=e,o={size:l,lineHeight:u,weight:d},i=[];"base"!==n?(r[n].body.forEach((function(e,t){i.push({label:"".concat(e.label,"(").concat(e.value,")"),value:"var(".concat(e.token,")"),realValue:"".concat(e.value)})})),(t=o[n]).push.apply(t,i)):(r.base.body.forEach((function(e,t){i.push({label:e.value,value:e.value,realValue:e.value})})),c.push.apply(c,i))};for(var E in r)w(E);var C=function(e){var t,n=e,r={width:f,style:h,radius:p},i=[];o[n].body.forEach((function(e,t){i.push({label:"style"===n?e.label:"".concat(e.label,"(").concat(e.value,")"),realValue:e.value,value:"var(".concat(e.token,")")})})),(t=r[n]).push.apply(t,i)};for(var E in o)C(E);i.size.body.forEach((function(e){v.push({label:"".concat(e.label,"(").concat(e.value,")"),value:"var(".concat(e.token,")"),realValue:e.value})}));for(var S=i.size.start,O=parseFloat(S),x=S.replace(O.toString(),""),I=i.size.base,N=1;N<=50;N++){var k=(N-1)*I+O+x;v.push({label:"尺寸".concat(N,"(").concat(k,")"),value:"var(--sizes-base-".concat(N,")"),realValue:k})}return a.shadow.body.forEach((function(e){m.push({label:e.label,value:"var(".concat(e.token,")"),realValue:e.value})})),{colorOptions:s,fontFamilyOptions:c,fontSizeOptions:l,lineHeightOptions:u,fontWeightOptions:d,borderRadiusOptions:p,borderWidthOptions:f,borderStyleOptions:h,sizesOptions:v,shadowOptions:m}}(be)),t}Object.freeze({__proto__:null,guid:ae,isObjectShallowModified:ce,anyChanged:de,noop:ue,makeHorizontalDeeper:pe,omitControls:se,isEmpty:he,cloneObject:le,eachTree:ve,createObject:me,get themeConfig(){return be},__uri:function(e){return e},cleanUndefined:ge,JSONPipeIn:ye,JSONPipeOut:we,addStyleClassName:Ee,JSONGetByPath:Ce,JSONGetPathById:Se,JSONGetById:Oe,JSONGetParentById:xe,JSONUpdate:Ie,JSONDelete:Ne,JSONMerge:function e(t,n){if(!Ue(t)||!Ue(n))return n;if(!ce(t,n))return t;var r={};return t.$$id&&(r.$$id=t.$$id),Object.keys(n).forEach((function(o){Array.isArray(n[o])&&Array.isArray(t[o])&&n[o]!==t[o]?r[o]=n[o].map((function(n,r){return t[o][r]?e(t[o][r],n):n})):void 0===t[o]?r[o]=n[o]:r[o]=e(t[o],n[o])})),r},JSONChangeInArray:ke,JSONCanMoveUp:function(e,t){var n=xe(e,t);return!(!n||!Array.isArray(n))&&fe(n,(function(e){return e.$$id===t}))>0},JSONMoveUpById:Re,JSONCanMoveDown:function(e,t){var n=xe(e,t);if(!n||!Array.isArray(n))return!1;var r=fe(n,(function(e){return e.$$id===t}));return~r&&r(i=~i?i:999999)?1:o===i?0:-1}},persistGet:function(e,t){var n=localStorage.getItem("amis-editor-".concat(e));return n&&(n=JSON.parse(n)),n||t},persistSet:function(e,t){t=JSON.stringify(t),localStorage.setItem("amis-editor-".concat(e),t)},normalizeId:function(e){return e.replace(/\-[a-z0-9]+$/g,"")},autobind:_e,addDragingClass:function(e){for(;e&&(e.classList.add("ae-is-draging"),!(null==(e=e.parentElement)?void 0:e.hasAttribute("data-region"))););},removeDragingClass:function(e){for(;e&&(e.classList.remove("ae-is-draging"),!(null==(e=e.parentElement)?void 0:e.hasAttribute("data-region"))););},camelize:ze,reactionWithOldValue:Be,repeatArray:function(e,t){void 0===t&&(t=1);for(var n=[];t-- >0;)n.push(e);return n},diff:Le,patchDiff:$e,JSONTraverse:He,isNumeric:Ve,string2CSSUnit:function(e,t){return void 0===t&&(t="px"),e?Ve(e)?"".concat(parseFloat(String(e).toString())).concat(t):e:void 0},isString:Ze,isObject:Ue,jsonToJsonSchema:function(e){void 0===e&&(e={});var t={type:"object",properties:{}};return Object.keys(e).forEach((function(n){var r=e[n],o=typeof r;~["string","number"].indexOf(o)?t.properties[n]={type:o,title:n}:t.properties[n]="object"===o&&r?{type:"object",title:n}:{type:"",title:n}})),t},generateNodeId:Ke,isHasPluginIcon:We,isLayoutPlugin:Je,unitFormula:qe,stringRegExp:Ye,needDefaultWidth:Ge,getI18nEnabled:function(){var e,t;return null!==(t=null===(e=null===window||void 0===window?void 0:window.editorStore)||void 0===e?void 0:e.i18nEnabled)&&void 0!==t&&t},translateSchema:Xe,appTranslate:Qe,needFillPlaceholder:et,setThemeConfig:function(e){be=e},setThemeDefaultData:tt});var nt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mainRef=c.createRef(),t}return(0,s.ZT)(t,e),t.prototype.handleWResizerMouseDown=function(e){return this.startResize(e,"horizontal")},t.prototype.handleHResizerMouseDown=function(e){return this.startResize(e,"vertical")},t.prototype.handleResizerMouseDown=function(e){return this.startResize(e,"both")},t.prototype.startResize=function(e,t){var n,r,o,i=this;if(void 0===t&&(t="horizontal"),(1===e.button&&null!==window.event||0===e.button)&&!e.defaultPrevented){e.preventDefault();var a=this.props,s=a.manager,c=a.id,l=a.node,d=a.store;if(l){var u=document.querySelector('[data-editor-id="'.concat(c,'"]'));if(u){s.disableHover=!0;var p=s["both"===t?"onSizeChangeStart":"vertical"===t?"onHeightChangeStart":"onWidthChangeStart"](e,{dom:u,node:l,store:d,resizer:"both"===t?this.resizerDom:"vertical"===t?this.hResizerDom:this.wResizerDom}),f=null===(n=p.data)||void 0===n?void 0:n.onMove,h=null===(r=p.data)||void 0===r?void 0:r.onEnd;if(f||h){null===(o=this.mainRef.current)||void 0===o||o.setAttribute("data-resizing","");var v=function(e){e.preventDefault(),null==f||f(e)},m=function(e){var t;e.preventDefault(),s.disableHover=!1,null===(t=i.mainRef.current)||void 0===t||t.removeAttribute("data-resizing"),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",m),document.body.style.cursor="default";var n=function(e){window.removeEventListener("click",n,!0),e.preventDefault(),e.stopPropagation()};window.addEventListener("click",n,!0),setTimeout((function(){return window.removeEventListener("click",n,!0)}),350),null==h||h(e)};window.addEventListener("mousemove",v),window.addEventListener("mouseup",m),document.body.style.cursor="both"===t?"nwse-resize":"vertical"===t?"ns-resize":"ew-resize"}}}}},t.prototype.wResizerRef=function(e){var t;e?e.addEventListener("mousedown",this.handleWResizerMouseDown):null===(t=this.wResizerDom)||void 0===t||t.addEventListener("mousedown",this.handleWResizerMouseDown),this.wResizerDom=e},t.prototype.hResizerRef=function(e){var t;e?e.addEventListener("mousedown",this.handleHResizerMouseDown):null===(t=this.hResizerDom)||void 0===t||t.addEventListener("mousedown",this.handleHResizerMouseDown),this.hResizerDom=e},t.prototype.resizerRef=function(e){var t;e?e.addEventListener("mousedown",this.handleResizerMouseDown):null===(t=this.resizerDom)||void 0===t||t.addEventListener("mousedown",this.handleResizerMouseDown),this.resizerDom=e},t.prototype.handleMouseEnter=function(){this.props.manager.disableHover||this.props.store.setHoverId(this.props.id)},t.prototype.handleDragStart=function(e){var t=this.props,n=t.manager,r=t.id;n.disableHover||n.startDrag(r,e)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.store,r=e.id,o=e.title,i=e.children,s=e.node;e.toolbarContainer;var l=e.onSwitch,d=n.sortedToolbars,u=n.sortedSecondaryToolbars,p=n.sortedSpecialToolbars,f=n.isActive(r),h=n.parentIsFreeContainer(),m=n.isHoved(r)||n.dropId===r||n.insertOrigId===r||h===r,b=n.draggableContainer(r),g=document.getElementById("aePreviewHighlightBox").offsetWidth-s.x<176;return c.createElement("div",{className:v()("ae-Editor-hlbox",{shake:r===n.insertOrigId,selected:f||~n.selections.indexOf(r),hover:m,regionOn:s.childRegions.some((function(e){return n.isRegionHighlighted(e.id,e.region)})),isFreeContainerElem:!!h||b},t),"data-hlbox-id":r,style:{display:s.w&&s.h?"block":"none",top:s.y,left:s.x,width:s.w,height:s.h},ref:this.mainRef,onMouseEnter:this.handleMouseEnter,draggable:!!h||b,onDragStart:this.handleDragStart},f?c.createElement("div",{className:"ae-Editor-toolbarPopover ".concat(g?"is-right-elem":"")},c.createElement("div",{className:"ae-Editor-nav"},s.host?c.createElement("div",{className:"ae-Editor-tip parent",onClick:function(){return null==l?void 0:l(s.host.id)}},s.host.label):null,c.createElement("div",{key:"tip",className:"ae-Editor-tip current"},o),s.firstChild?c.createElement("div",{className:"ae-Editor-tip child",onClick:function(){return null==l?void 0:l(s.firstChild.id)}},s.firstChild.label):null),c.createElement("div",{className:"ae-Editor-toolbar",key:"toolbar"},d.map((function(e){return c.createElement("button",{key:e.id,type:"button",draggable:e.draggable,onDragStart:e.onDragStart,"data-id":e.id,"data-tooltip":e.tooltip||void 0,"data-position":e.placement||"top",onClick:e.onClick},e.iconSvg?c.createElement(a.JO,{className:"icon",icon:e.iconSvg}):~e.icon.indexOf("<")?c.createElement("span",{dangerouslySetInnerHTML:{__html:e.icon}}):c.createElement("i",{className:e.icon}))})))):null,f&&u.length?c.createElement("div",{className:"ae-Editor-toolbar sencondary",key:"sencondary-toolbar"},u.map((function(e){return c.createElement("button",{key:e.id,type:"button",className:e.className,"data-id":e.id,"data-tooltip":e.tooltip||void 0,"data-position":e.placement||"top",onClick:e.onClick},e.iconSvg?c.createElement(a.JO,{className:"icon",icon:e.iconSvg}):~e.icon.indexOf("<")?c.createElement("span",{dangerouslySetInnerHTML:{__html:e.icon}}):c.createElement("i",{className:e.icon}))}))):null,f&&p.length?c.createElement("div",{className:"ae-Editor-toolbar special",key:"special-toolbar"},p.map((function(e){return c.createElement("button",{key:e.id,type:"button",className:e.className,"data-id":e.id,"data-tooltip":e.tooltip||void 0,"data-position":e.placement||"top",onClick:e.onClick},e.iconSvg?c.createElement(a.JO,{className:"icon",icon:e.iconSvg}):~e.icon.indexOf("<")?c.createElement("span",{dangerouslySetInnerHTML:{__html:e.icon}}):c.createElement("i",{className:e.icon}))}))):null,i,s.widthMutable?c.createElement(c.Fragment,null,c.createElement("span",{className:"ae-border-WResizer",ref:this.wResizerRef}),c.createElement("span",{className:"ae-WResizer",ref:this.wResizerRef})):null,s.heightMutable?c.createElement(c.Fragment,null,c.createElement("span",{className:"ae-border-HResizer",ref:this.hResizerRef}),c.createElement("span",{className:"ae-HResizer",ref:this.hResizerRef})):null,s.widthMutable&&s.heightMutable?c.createElement("span",{className:"ae-Resizer",ref:this.resizerRef}):null)},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleWResizerMouseDown",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleHResizerMouseDown",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleResizerMouseDown",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"wResizerRef",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"hResizerRef",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"resizerRef",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragStart",null),(0,s.gn)([R.Pi],t)}(c.Component),rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.handleClick=function(){var e=this.props,t=e.manager,n=e.id,r=e.name;t.emptyRegion(n,r)},t.prototype.render=function(){var e=this.props,t=e.store,n=e.id,r=e.name,o=e.title,i=e.node,s=e.isOnlyChildRegion,l=t.isRegionHighlighted(n,r),d=t.isRegionHighlightHover(n,r),u=t.isRegionDragEnter(n,r),p=t.getNodeById(n),h=i.x-p.x,m=i.y-p.y;return c.createElement("div",{"data-renderer":i.host.info.renderer.name,"data-region":r,className:v()("ae-Editor-rhlbox",u?"is-dragenter":"",!s&&d?"region-hover":"",l?"is-highlight":"",h<87&&m<21&&i.x<190?"region-label-within":""),style:{width:i.w,height:i.h,borderWidth:"".concat(Math.max(0,m),"px ").concat(Math.max(0,p.w-h-i.w),"px ").concat(Math.max(0,p.h-m-i.h),"px ").concat(Math.max(0,h),"px")}},c.createElement("div",{"data-node-id":n,"data-node-region":r,className:"region-tip ".concat(s?"is-only-child-region":""," ignore-hover-elem")},o,c.createElement("span",{className:"margin-space"},"|"),c.createElement("button",{type:"button",className:"clear-icon-btn","data-tooltip":f("bb28ec819520ced0ffb4c3da01f112e2"),"data-position":"bottom",onClick:this.handleClick},c.createElement(a.JO,{icon:"clear-btn"}))))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleClick",null),(0,s.gn)([R.Pi],t)}(c.Component),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.render=function(){return c.createElement("div",{className:"ae-ErrorRenderer"},"类型错误,无法渲染")},t}(c.Component),it=function(){function e(e){this.manager=e}return e.prototype.getRendererInfo=function(e){var t=e.renderer,n=e.schema,r=this;if(n.$$id&&r.name&&r.rendererName&&r.rendererName===t.name){var o=r.name;return(null==n?void 0:n.isFreeContainer)?o=f("db805d4e361ac2d3fc6047eaea1a7c69"):(null==n?void 0:n.isSorptionContainer)&&(o=f("969e9e56b3812abffa3994f35ea31835")),{name:o,regions:r.regions,patchContainers:r.patchContainers,vRendererConfig:r.vRendererConfig,wrapperProps:r.wrapperProps,wrapperResolve:r.wrapperResolve,filterProps:r.filterProps,$schema:r.$schema,renderRenderer:r.renderRenderer,multifactor:r.multifactor,scaffoldForm:r.scaffoldForm,disabledRendererPlugin:r.disabledRendererPlugin,isBaseComponent:r.isBaseComponent,rendererName:r.rendererName}}},e.prototype.buildEditorPanel=function(e,t){var n,r,o,i,a=this,c=this.manager.store;if(c.activeId&&!e.selections.length){if(!e.info.hostId&&(a.panelControls||a.panelControlsCreator||a.panelBody||a.panelBodyCreator)&&e.info.plugin===this){var l=a.panelBodyCreator?a.panelBodyCreator(e):a.panelBody;this.manager.trigger("after-build-panel-body",{context:e,data:l,plugin:a}),t.push({key:"config",icon:a.panelIcon||a.icon||"fa fa-cog",pluginIcon:a.pluginIcon,title:a.panelTitle||f("e366ccf1556c0672dcecba135ed5472e"),render:this.manager.makeSchemaFormRender({definitions:a.panelDefinitions,submitOnChange:a.panelSubmitOnChange,api:a.panelApi,body:l,controls:a.panelControlsCreator?a.panelControlsCreator(e):a.panelControls,justify:a.panelJustify,panelById:c.activeId})})}else e.info.plugin===this&&e.info.hostId&&((null===(n=a.vRendererConfig)||void 0===n?void 0:n.panelControls)||(null===(r=a.vRendererConfig)||void 0===r?void 0:r.panelControlsCreator)||(null===(o=a.vRendererConfig)||void 0===o?void 0:o.panelBody)||(null===(i=a.vRendererConfig)||void 0===i?void 0:i.panelBodyCreator))&&t.push({key:e.info.multifactor?"vconfig":"config",icon:a.vRendererConfig.panelIcon||"fa fa-cog",title:a.vRendererConfig.panelTitle||f("e366ccf1556c0672dcecba135ed5472e"),render:this.manager.makeSchemaFormRender({submitOnChange:a.panelSubmitOnChange,api:a.panelApi,definitions:a.vRendererConfig.panelDefinitions,controls:a.vRendererConfig.panelControlsCreator?a.vRendererConfig.panelControlsCreator(e):a.vRendererConfig.panelControls,body:a.vRendererConfig.panelBodyCreator?a.vRendererConfig.panelBodyCreator(e):a.vRendererConfig.panelBody,justify:a.vRendererConfig.panelJustify,panelById:c.activeId})});if(e.info.plugin===this&&e.info.multifactor){var d=e.node.sameIdChild;d&&this.manager.collectPanels(d,!1,!0).forEach((function(e){var n,r;"config"!==e.key&&"vconfig"!==e.key||t.push((0,s.pi)((0,s.pi)({},e),{key:"sub-".concat(e.key),icon:(null===(r=null===(n=d.info)||void 0===n?void 0:n.plugin)||void 0===r?void 0:r.icon)||e.icon}))}))}}},e.prototype.buildSubRenderers=function(e,t,n){var r=this;return Array.isArray(r.scaffolds)?r.scaffolds.map((function(e){var t,n,o,i,a,s,c,l;return{name:null!==(t=e.name)&&void 0!==t?t:r.name,icon:null!==(n=e.icon)&&void 0!==n?n:r.icon,pluginIcon:r.pluginIcon,description:null!==(o=e.description)&&void 0!==o?o:r.description,previewSchema:null!==(i=e.previewSchema)&&void 0!==i?i:r.previewSchema,tags:null!==(a=e.tags)&&void 0!==a?a:r.tags,docLink:null!==(s=e.docLink)&&void 0!==s?s:r.docLink,type:null!==(c=e.type)&&void 0!==c?c:r.type,scaffold:null!==(l=e.scaffold)&&void 0!==l?l:r.scaffold,scaffoldForm:r.scaffoldForm,disabledRendererPlugin:r.disabledRendererPlugin,isBaseComponent:r.isBaseComponent,rendererName:r.rendererName}})):r.name&&r.description?{searchKeywords:r.searchKeywords,name:r.name,icon:r.icon,description:r.description,previewSchema:r.previewSchema,tags:r.tags,docLink:r.docLink,type:r.type,scaffold:r.scaffold,scaffoldForm:r.scaffoldForm,disabledRendererPlugin:r.disabledRendererPlugin,isBaseComponent:r.isBaseComponent,pluginIcon:r.pluginIcon,rendererName:r.rendererName}:void 0},e.prototype.renderPlaceholder=function(e,t,n){return c.createElement("div",{key:t,className:"wrapper-sm b-a b-light m-b-sm",style:n,children:c.createElement("span",{className:"text-muted",children:e})})},e.prototype.getPlugin=function(e){return T()(this.manager.plugins,(function(t){return"string"==typeof e?t.rendererName===e:t instanceof e}))},e.scene=["global"],e}(),at=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,s.ZT)(t,e),t.prototype.onActive=function(e){var t,n=e.context;if((null===(t=n.info)||void 0===t?void 0:t.plugin)===this&&n.node){var r=n.node,o=r.schema||{};o.isFixedWidth&&r.setWidthMutable(!0),o.isFixedHeight&&r.setHeightMutable(!0)}},t.prototype.onWidthChangeStart=function(e){return this.onSizeChangeStart(e,"horizontal")},t.prototype.onHeightChangeStart=function(e){return this.onSizeChangeStart(e,"vertical")},t.prototype.onSizeChangeStart=function(e,t){var n;void 0===t&&(t="both");var r=e.context,o=r.node,i=r.store;if((null===(n=o.info)||void 0===n?void 0:n.plugin)===this){var a=r.resizer,s=r.dom,c=i.getDoc()||document,l=s.parentElement.getBoundingClientRect(),d=s.getBoundingClientRect(),u=r.nativeEvent.pageX,p=r.nativeEvent.pageY;e.setData({onMove:function(e){var n=e.pageY-p,r=e.pageX-u,i=Math.max(50,d.height+n),s=Math.max(100,Math.min(d.width+r,l.width)),f={width:s,height:i},h=c.querySelector("[data-hlbox-id='".concat(o.id,"']")),v=c.querySelector("[data-editor-id='".concat(o.id,"']"));"both"===t?(a.setAttribute("data-value","".concat(s,"px x ").concat(i,"px")),h.style.height="".concat(i,"px"),h.style.width="".concat(s,"px"),v.style.height="".concat(i,"px"),v.style.width="".concat(s,"px")):"vertical"===t?(a.setAttribute("data-value","".concat(i,"px")),h.style.height="".concat(i,"px"),v.style.height="".concat(i,"px"),delete f.width):(a.setAttribute("data-value","".concat(s,"px")),h.style.width="".concat(s,"px"),v.style.width="".concat(s,"px"),delete f.height),o.updateState(f),requestAnimationFrame((function(){o.calculateHighlightBox()}))},onEnd:function(e){var n=e.pageY-p,r=e.pageX-u,i=Math.max(50,d.height+n),s={width:Math.max(100,Math.min(d.width+r,l.width)),height:i};"vertical"===t?delete s.width:"horizontal"===t&&delete s.height,a.removeAttribute("data-value"),o.updateSchemaStyle(s),requestAnimationFrame((function(){o.calculateHighlightBox()}))}})}}}(it),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.componentDidMount=function(){this.markDom(this.props.$$editor.id),this.props.$$node&&requestAnimationFrame((function(){}))},t.prototype.componentDidUpdate=function(e){this.markDom(this.props.$$editor.id)},t.prototype.getWrappedInstance=function(){return this.ref},t.prototype.refFn=function(e){this.ref=e},t.prototype.markDom=function(e){var t,n,r=this,i=(0,o.findDOMNode)(this);if(i&&e){var a=this.props.$$editor,s=!1!==this.props.$$visible&&!0!==this.props.$$hidden,c=a.wrapperResolve?a.wrapperResolve(i):i;(Array.isArray(c)?c:c?[c]:[]).forEach((function(t){t.setAttribute("data-editor-id",e),t.setAttribute("name",r.props.id),t.setAttribute("data-visible",s?"":"false"),t.setAttribute("data-hide-text",s?"":f("392342f7750a565f9a79c678c6b12421"))})),null===(n=null===(t=a.plugin)||void 0===t?void 0:t.markDom)||void 0===n||n.call(t,c,this.props)}},t.prototype.render=function(){var e=this.props,t=e.$$editor,n=e.$$node,r=e.store,o=(0,s._T)(e,["$$editor","$$node","store"]),i=t.renderer;return t.filterProps&&(o=t.filterProps.call(t.plugin,o,n)),t.renderRenderer?t.renderRenderer.call(t.plugin,(0,s.pi)((0,s.pi)((0,s.pi)((0,s.pi)((0,s.pi)((0,s.pi)({},o),{store:r}),null==n?void 0:n.state),{$$editor:t}),t.wrapperProps),{ref:this.refFn}),t):c.createElement(i.component,(0,s.pi)({},o,{store:r},null==n?void 0:n.state,{$$editor:t},t.wrapperProps,{ref:this.refFn}))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"refFn",null),(0,s.gn)([R.Pi],t)}(c.Component)),st=P.V5.model("EditorNode",{parentId:"",parentRegion:"",isCommonConfig:!1,id:"",type:"",label:"",regionInfo:P.V5.maybe(P.V5.frozen()),path:"",schemaPath:"",region:"",preferTag:"",state:P.V5.optional(P.V5.frozen(),{}),widthMutable:!1,heightMutable:!1,memberIndex:-1,folded:!1,patched:!1,x:0,y:0,w:0,h:0,children:P.V5.optional(P.V5.array(P.V5.late((function(){return st}))),[])}).volatile((function(){return{getData:P.V5.frozen()}})).views((function(e){var t,n;return{get info(){return t},setInfo:function(e){t=e},get rendererConfig(){return n},setRendererConfig:function(e){n=e},get isVitualRenderer(){return!!~e.memberIndex},get clickable(){var e,t;return!1!==(null===(e=this.info)||void 0===e?void 0:e.editable)||!(null===(t=this.info)||void 0===t?void 0:t.hostId)},get draggable(){var e;return!(!this.moveable||!1===(null===(e=this.info)||void 0===e?void 0:e.draggable))},get moveable(){var e,t;return!(this.isRegion||!1===(null===(e=this.info)||void 0===e?void 0:e.movable)||!Array.isArray(this.schemaParent)||(null===(t=this.host)||void 0===t?void 0:t.memberImmutable(this.parent.region)))},get canMoveUp(){return!(this.isRegion||!this.moveable||!Array.isArray(this.schemaParent)||!this.prevSibling)},get canMoveDown(){return!(this.isRegion||!this.moveable||!Array.isArray(this.schemaParent)||!this.nextSibling)},get removable(){var e;return!(this.isRegion||!1===(null===(e=this.info)||void 0===e?void 0:e.removable)||!Array.isArray(this.schemaParent)||!this.host||this.host.memberImmutable(this.parent.region))},get duplicatable(){var e;return!(this.isRegion||!1===(null===(e=this.info)||void 0===e?void 0:e.duplicatable)||!Array.isArray(this.schemaParent)||this.host.memberImmutable(this.parent.region))},get replaceable(){var e;return!this.isRegion&&!1!==(null===(e=this.info)||void 0===e?void 0:e.replaceable)},memberImmutable:function(e){var t,n;return!!(!0===(null===(t=this.info)||void 0===t?void 0:t.memberImmutable)||Array.isArray(null===(n=this.info)||void 0===n?void 0:n.memberImmutable)&&~this.info.memberImmutable.indexOf(e))},get isRegion(){return!!e.region},get childRegions(){var e,t,n=this.uniqueChildren.filter((function(e,t,n){return e.isRegion}));if(null===(e=this.info)||void 0===e?void 0:e.multifactor){var r=this.sameIdChild;null===(t=null==r?void 0:r.childRegions)||void 0===t||t.forEach((function(e){return n.push(e)}))}return n},get uniqueChildren(){var t=e.children.filter((function(e,t,n){return n.findIndex((function(t){return e.isRegion?t.id===e.id&&t.region===e.region:t.id===e.id}))===t}));if(Array.isArray(this.schema)){var n=this.schema;t=t.sort((function(e,t){return z()(n,(function(t){return(null==t?void 0:t.$$id)===e.id}))-z()(n,(function(e){return(null==e?void 0:e.$$id)===t.id}))}))}return t},get sameIdChild(){var t;return null===(t=this.uniqueChildren)||void 0===t?void 0:t.find((function(t){return!t.isRegion&&t.id===e.id}))},get singleRegion(){return!(1!==this.uniqueChildren.length||!this.uniqueChildren[0].isRegion)},isExists:function(t){return e.children.some((function(e){return e.id===t}))},getChildById:function(t){return e.children.find((function(e){return e.id===t}))},get parent(){try{var t=(0,P.G_)(e,2);return"root"!==(null==t?void 0:t.id)?t:null}catch(e){return null}},get ancestorField(){var t,n,r,o,i=(0,P.G_)(e,4);if("root"===(null==i?void 0:i.id))return null;var a=null!==(n=null===(t=null==i?void 0:i.getComponent())||void 0===t?void 0:t.props)&&void 0!==n?n:{},c=null!==(r=null==a?void 0:a.body)&&void 0!==r?r:[],l=Object.keys(null!==(o=null==a?void 0:a.data)&&void 0!==o?o:{});return M()((0,s.ev)((0,s.ev)([],(0,s.CR)(c.map((function(e){var t;return null!==(t=null==e?void 0:e.name)&&void 0!==t?t:""}))),!1),(0,s.CR)(l),!1))},get host(){var t=e.parent;return(null==t?void 0:t.isRegion)&&(t=t.parent),t},get firstChild(){var t=e;if(!t.children.length)return null;for(var n=t.children[0];n;){if(!n.isRegion&&n.id!==t.id)return n;n=n.children.length?n.children[0]:null}return null},get index(){return this.parent.uniqueChildren.indexOf(e)},get prevSibling(){for(var t=this.parent.uniqueChildren,n=t.indexOf(e)-1;n>=0&&t[n];){if(t[n].id!==e.id)return t[n];n--}return null},get nextSibling(){for(var t=this.parent.uniqueChildren,n=t.length,r=t.indexOf(e)+1;rv&&(!this.exchangeY||d<0||l<0)?(this.exchangeX=e.clientX,this.exchangeY=e.clientY,this.dropBeforeId=null===(n=c[f])||void 0===n?void 0:n.$$id,h!==v-1&&(i.oQ4.capture(a),a.insertBefore(t,p),i.oQ4.animateAll())):~h&&h0||l>0)&&(this.exchangeX=e.clientX,this.exchangeY=e.clientY,c[f+1]?this.dropBeforeId=null===(r=c[f+1])||void 0===r?void 0:r.$$id:delete this.dropBeforeId,h!==v+1&&(i.oQ4.capture(a),a.insertBefore(t,p.nextSibling),i.oQ4.animateAll()))}t.parentNode!==a&&(delete this.dropBeforeId,i.oQ4.capture(a),a.appendChild(t),i.oQ4.animateAll())},e.prototype.getDropBeforeId=function(){return this.dropBeforeId},e.prototype.getTarget=function(e){for(var t,n,r=e.target.closest("[data-editor-id]");r;){if((null===(t=r.parentElement)||void 0===t?void 0:t.closest("[data-region]"))===this.dndContainer)return"grid"===r.getAttribute("data-renderer")?r.parentElement:r;r=(null===(n=r.parentElement)||void 0===n?void 0:n.closest("[data-editor-id]"))||null}return null},e.prototype.getChild=function(e,t){for(var n=t;n&&n.parentElement!==e;)n=n.parentElement;return n},e.prototype.dispose=function(){delete this.dropBeforeId},e}(),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.enter=function(e,t){t.innerHTML="",t.classList.add("use-position"),t.classList.add("is-horizontal");var n=this.dnd.dragElement,r=this.dndContainer.getBoundingClientRect(),o=Array.isArray(this.region.schema)?this.region.schema:[];if(n&&n.closest("[data-region]")===this.dndContainer){var i=n.getAttribute("data-editor-id"),a=z()(o,(function(e){return e.$$id===i}));if(~a&&o[a+1]&&(this.dropBeforeId=o[a+1].$$id),n.nextElementSibling){var s=n.nextElementSibling.getBoundingClientRect();t.style.cssText+="top: 0; left: ".concat(s.x-r.x,"px;")}else t.style.cssText+="top: 0; left: 100%;"}else t.style.cssText+="top: 0; left: -999999%;";this.dndContainer.appendChild(t)},t.prototype.leave=function(e,t){t.classList.remove("use-position"),t.classList.remove("is-horizontal")},t.prototype.over=function(e,t){var n,r,o=this.getTarget(e);if(o){if("table"===(null===(n=this.dndContainer)||void 0===n?void 0:n.getAttribute("data-renderer"))){var i=null===(r=o.parentElement)||void 0===r?void 0:r.closest("th[data-editor-id], td[data-editor-id]");i&&this.dndContainer.contains(i)&&(o=i)}var a=this.dndContainer.getBoundingClientRect();!Array.isArray(this.region.schema)||this.region.schema;var s=o.getBoundingClientRect();o.nextElementSibling&&o.nextElementSibling.hasAttribute("data-editor-id")?(t.style.cssText+="left: ".concat(s.x-a.x,"px;"),this.dropBeforeId=o.getAttribute("data-editor-id")):e.clientX>s.x+s.width/2?(t.style.cssText+="top: 0; left: ".concat(s.right-a.x,"px;"),delete this.dropBeforeId):(t.style.cssText+="left: ".concat(s.x-a.x,"px;"),this.dropBeforeId=o.getAttribute("data-editor-id"))}},t}(bt),yt=Z()((function(e){a.Am.warning(e)}),500),wt=function(){function e(e,t){this.manager=e,this.store=t,this.toDispose=[],this.dragEnterCount=0,this.lastX=0,this.lastY=0,this.lastMoveAt=0,this.startX=0,this.startY=0,this.toDispose.push(Be((function(){return"schema"===t.dragType?t.dragId:""}),this.updateDragElements),Be((function(){return{id:t.dropId,region:t.dropRegion}}),this.updateDropRegion),Be((function(){return{id:t.planDropId,region:t.planDropRegion}}),this.updatePlanDropRegion)),this.dragGhost=document.createElement("div"),this.dragGhost.classList.add("ae-DragGhost"),this.dragGhost.classList.add("is-ghost")}return e.prototype.createDragImage=function(e,t){var n=document.createElement("div");return n.classList.add("ae-DragImage"),n.innerHTML="".concat((null==t?void 0:t.label)||e,""),document.body.appendChild(n),this.dragImage=n,n},e.prototype.disposeDragImage=function(){var e,t=this.dragImage;null===(e=null==t?void 0:t.parentElement)||void 0===e||e.removeChild(t),delete this.dragImage},e.prototype.switchToRegion=function(e,t,n){var r,o,i,a,s,c=this.store;if(!t||!n||c.dropId===t&&c.dropRegion===n)return!1;var l=c.getNodeById(t,n),d=l.regionInfo,u=c.dragSchema;if(!1===(null===(r=null==d?void 0:d.accept)||void 0===r?void 0:r.call(d,u))||(null===(o=l.host)||void 0===o?void 0:o.memberImmutable(n)))return!1;var p={mode:c.dragMode,sourceType:c.dragType,sourceId:c.dragId,data:c.dragSchema,targetId:t,targetRegion:n};return!this.manager.trigger("dnd-accept",p).prevented&&(null===(i=this.dndMode)||void 0===i||i.leave(e,this.dragGhost),null===(a=this.dndMode)||void 0===a||a.dispose(),c.setDropId(t,n),this.makeDNDModeInstance(l),null===(s=this.dndMode)||void 0===s||s.enter(e,this.dragGhost),!0)},e.prototype.makeDNDModeInstance=function(e){var t;if(!e||!(0,P.fh)(e))return this.dndMode||null;var n=null===(t=e.regionInfo)||void 0===t?void 0:t.dndMode,r=bt;return"position-h"===n&&(r=gt),this.dndMode=new r(this,e),this.dndMode},e.prototype.startDrag=function(e,t){var n,r=this,o=this.store.getNodeById(e),i=this.store.getDoc().querySelector('[data-editor-id="'.concat(e,'"]'));if(o&&i){if(null===(n=t.target)||void 0===n||n.addEventListener("dragend",this.dragEnd),this.lastX=t.clientX,this.lastY=t.clientY,this.manager.draggableContainer(o.id))return this.curDragId=e,this.startX=t.clientX,void(this.startY=t.clientY);this.dragElement=i,t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(this.createDragImage(e,o),0,0),t.dataTransfer.setData("dnd/ae-node-".concat(e).toLowerCase(),""),setTimeout((function(){r.store.setDragId(e);var n=o.parent;r.switchToRegion(t,n.id,n.region)}),4)}else t.preventDefault()},e.prototype.dragEnter=function(e){var t,n=this.store;this.dragEnterCount++;var r=n.activeId;if(r)if(o=n.getNodeById(r)){if(!n.dragId&&1===this.dragEnterCount){var o,i=e.dataTransfer.types;if(i.length>0)for(var a=function(t){if(/^dnd-dom\/(.*)$/.test(i[t])){var r=RegExp.$1,o=document.querySelector(r);if(o){o.addEventListener("dragend",s.dragEnd);var a=o.getAttribute("data-dnd-id"),c=o.getAttribute("data-dnd-type"),l=o.getAttribute("data-dnd-data"),d=l?JSON.parse(l):{type:"tpl",tpl:"Unknown"};n.setDragId(a,"copy",c,d);var u=n.activeContainerId;if(u){var p=n.getNodeById(u);if(null==p?void 0:p.childRegions.length){var f=0;p.childRegions.forEach((function(e,t){e.region&&(f=t)})),s.switchToRegion(e,p.id,p.childRegions[f].region)}}return"break"}}},s=this,c=i.length-1;c>=0&&"break"!==a(c);c--);if(this.curDragId&&this.manager.draggableContainer(this.curDragId)&&(o=n.getNodeById(r))){var l=o.parentId?n.getNodeById(o.parentId):void 0;(null===(t=null==l?void 0:l.schema)||void 0===t?void 0:t.isFreeContainer)&&n.setDropId(o.parentId,"body")}}}else yt(f("0e24e1bbc19612a350f81296d9fb7802"));else yt(f("0e24e1bbc19612a350f81296d9fb7802"))},e.prototype.dragOver=function(e){var t,n=this.store,r=e.target;e.preventDefault();var o=e.clientX-this.lastX,i=e.clientY-this.lastY,a=Math.max(Math.abs(o),Math.abs(i)),s=Date.now(),c=r.closest("[data-region][data-region-host]"),l=null==c?void 0:c.getAttribute("data-region-host"),d=null==c?void 0:c.getAttribute("data-region");if(a>0&&this.curDragId&&this.manager.draggableContainer(this.curDragId)){var u=n.getDoc(),p=null===parent||void 0===parent?void 0:parent.window.document,f=u.querySelector("[data-hlbox-id='".concat(this.curDragId,"']"));if(n.isMobile&&!f&&p&&(f=p.querySelector("[data-hlbox-id='".concat(this.curDragId,"']"))),f){var h=(f.style.inset||"auto").split(" "),v={top:f.style.top||h[0]||"auto",right:f.style.right||h[1]||"auto",bottom:f.style.bottom||h[2]||h[0]||"auto",left:f.style.left||h[3]||h[1]||"auto"};f.style.inset="".concat("auto"!==v.top?qe(v.top,i):"auto"," ").concat("auto"!==v.right?qe(v.right,-o):"auto"," ").concat("auto"!==v.bottom?qe(v.bottom,-i):"auto"," ").concat("auto"!==v.left?qe(v.left,o):"auto")}var m=u.querySelector("[data-editor-id='".concat(this.curDragId,"']"));if(m){var b=(m.style.inset||"auto").split(" "),g={top:b[0]||"auto",right:b[1]||"auto",bottom:b[2]||b[0]||"auto",left:b[3]||b[1]||"auto"};m.style.inset="".concat("auto"!==g.top?qe(g.top,i):"auto"," ").concat("auto"!==g.right?qe(g.right,-o):"auto"," ").concat("auto"!==g.bottom?qe(g.bottom,-i):"auto"," ").concat("auto"!==g.left?qe(g.left,o):"auto")}return this.lastX=e.clientX,void(this.lastY=e.clientY)}if(n.dropId&&r)if(a<5){if(!c||l===n.dropId)return;s-this.lastMoveAt>200&&d&&l&&this.switchToRegion(e,l,d)}else n.setPlanDropId("",""),this.lastMoveAt=s,this.lastX=e.clientX,this.lastY=e.clientY,n.dropId===l&&d&&d!==n.dropRegion&&this.switchToRegion(e,n.dropId,d),null===(t=this.dndMode)||void 0===t||t.over(e,this.dragGhost)},e.prototype.drop=function(e){var t;return(0,s.mG)(this,void 0,void 0,(function(){var n,r,o,i,a,c,l,d;return(0,s.Jh)(this,(function(s){switch(s.label){case 0:return n=this.store,this.curDragId&&this.manager.draggableContainer(this.curDragId)?(r=e.clientX-this.startX,o=e.clientY-this.startY,this.manager.updateContainerStyleByDrag(this.curDragId,r,o),this.curDragId="",this.store.setDropId(""),[2]):n.dropId?(i=null===(t=this.dndMode)||void 0===t?void 0:t.getDropBeforeId(),"move"!==n.dragMode?[3,1]:(this.manager.move(n.dropId,n.dropRegion,n.dragId,i),[3,4])):[2];case 1:return"copy"!==n.dragMode?[3,4]:(a=n.dragSchema,c=n.dropId,l=n.dropRegion,d=void 0,"subrenderer"!==n.dragType?[3,3]:(null==(d=T()(n.subRenderers,(function(e){return e.id===n.dragId})))?void 0:d.scaffoldForm)?[4,this.manager.scaffold(d.scaffoldForm,a)]:[3,3]);case 2:a=s.sent(),s.label=3;case 3:this.manager.addChild(c,l,a,i,d,{id:n.dragId,type:n.dragType,data:n.dragSchema}),s.label=4;case 4:return[2]}}))}))},e.prototype.dragLeave=function(e){this.dragEnterCount--},e.prototype.dragEnd=function(e){var t,n;null===(t=e.target)||void 0===t||t.removeEventListener("dragend",this.dragEnd),null===(n=this.dndMode)||void 0===n||n.leave(e,this.dragGhost),delete this.dndMode,this.dragGhost.innerHTML="",this.store.setDragId(""),this.store.setDropId(""),this.disposeDragImage(),this.dragEnterCount=0},e.prototype.updateDragElements=function(e){e&&this.manager.draggableContainer(e)||(e?[].slice.call(this.store.getDoc().querySelectorAll('[data-editor-id="'.concat(e,'"]'))).forEach((function(e){return e.classList.add("ae-is-draging")})):[].slice.call(this.store.getDoc().querySelectorAll(".ae-is-draging")).forEach((function(e){return e.classList.remove("ae-is-draging")})))},e.prototype.updateDropRegion=function(e,t){var n,r;this.store.dragId&&this.manager.draggableContainer(this.store.dragId)||((null==t?void 0:t.id)&&t.region&&(null===(n=this.store.getDoc().querySelector('[data-region="'.concat(t.region,'"][data-region-host="').concat(t.id,'"]')))||void 0===n||n.classList.remove("is-dragenter")),e.id&&e.region&&(null===(r=this.store.getDoc().querySelector('[data-region="'.concat(e.region,'"][data-region-host="').concat(e.id,'"]')))||void 0===r||r.classList.add("is-dragenter")))},e.prototype.updatePlanDropRegion=function(e,t){var n,r;this.store.dragId&&this.manager.draggableContainer(this.store.dragId)||((null==t?void 0:t.id)&&t.region&&(null===(n=this.store.getDoc().querySelector('[data-region="'.concat(t.region,'"][data-region-host="').concat(t.id,'"]')))||void 0===n||n.classList.remove("is-entering")),e.id&&e.region&&(null===(r=this.store.getDoc().querySelector('[data-region="'.concat(e.region,'"][data-region-host="').concat(e.id,'"]')))||void 0===r||r.classList.add("is-entering")))},e.prototype.dispose=function(){this.disposeDragImage(),this.toDispose.forEach((function(e){return e()})),this.toDispose=[]},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[DragEvent]),(0,s.w6)("design:returntype",void 0)],e.prototype,"dragEnter",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[DragEvent]),(0,s.w6)("design:returntype",void 0)],e.prototype,"dragOver",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[DragEvent]),(0,s.w6)("design:returntype",Promise)],e.prototype,"drop",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[DragEvent]),(0,s.w6)("design:returntype",void 0)],e.prototype,"dragLeave",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[DragEvent]),(0,s.w6)("design:returntype",void 0)],e.prototype,"dragEnd",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],e.prototype,"updateDragElements",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object,Object]),(0,s.w6)("design:returntype",void 0)],e.prototype,"updateDropRegion",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object,Object]),(0,s.w6)("design:returntype",void 0)],e.prototype,"updatePlanDropRegion",null),e}(),Et=function(){function e(e,t,n){this.variables=Array.isArray(t)?W()(q()(t),[function(e){var t;return null!==(t=e.order)&&void 0!==t?t:1}]):[],this.dataSchema=e instanceof i.JO1?e:new i.JO1([]),this.options=Q()(n,["beforeScopeInsert","afterScopeInsert","onContextSchemaChange","onContextOptionChange"]),this.init()}return e.prototype.init=function(){var e,t=this,n=this.variables,r=this.dataSchema,o=null!==(e=this.options)&&void 0!==e?e:{},i=o.beforeScopeInsert,a=o.afterScopeInsert;n.forEach((function(e){var n=e.parentId,o=e.name,s=e.title,c=e.schema;r.hasScope(n)&&(r.switchTo(n),r.hasScope(o)&&r.removeScope(o),i&&"function"==typeof i&&(c=i(t,c)),r.addScope(c,o),r.switchTo(o),r.current.tag=s,a&&"function"==typeof a&&a(t))})),r.switchToRoot()},e.prototype.getVariableContextSchema=function(){var e,t,n=this,r=[],o=(null!==(e=this.options)&&void 0!==e?e:{}).onContextSchemaChange;return this.variables&&(null===(t=this.variables)||void 0===t?void 0:t.length)>0&&(r=this.variables.map((function(e){if(n.dataSchema.hasScope(e.name)){var t=n.dataSchema.getScope(e.name);return t.schemas.length>0?t.schemas[0]:null}return null})).filter((function(e){return null!==e}))),o&&"function"==typeof o&&(r=o(this,r)),r},e.prototype.getVariableFormulaOptions=function(e){var t,n,r=this;void 0===e&&(e=!1);var o=(null!==(t=this.options)&&void 0!==t?t:{}).onContextOptionChange,a=[];return this.variables&&(null===(n=this.variables)||void 0===n?void 0:n.length)>0&&this.variables.forEach((function(e){if(r.dataSchema.hasScope(e.name)){var t=r.dataSchema.getScope(e.name),n=(0,i.GyU)(t.getDataPropsAsOptions(),(function(e){return(0,s.pi)((0,s.pi)({},e),{tag:e.type})}));t.tag?a.push({label:t.tag,children:n}):a.push.apply(a,(0,s.ev)([],(0,s.CR)(n),!1))}})),o&&"function"==typeof o&&(a=o(this,a,"formula")),(0,i.oxs)(a,(function(e){"array"===e.type&&delete e.children})),e?a:G()(a)},e.prototype.getVariableOptions=function(){var e,t,n,r,o=(null!==(e=this.options)&&void 0!==e?e:{}).onContextOptionChange,a=null!==(r=null===(n=null===(t=this.getVariableFormulaOptions(!1))||void 0===t?void 0:t[0])||void 0===n?void 0:n.children)&&void 0!==r?r:[];return a=(0,i.GyU)(a,(function(e,t,n,r){return(0,s.pi)((0,s.pi)({},e),{valueExpression:"string"!=typeof e.value||e.value.startsWith("${")?e.value:"${".concat(e.value,"}")})})),o&&"function"==typeof o&&(a=o(this,a,"normal")),a},e.prototype.getPageVariablesOptions=function(){var e,t,n=[],r=null===(t=null===(e=this.dataSchema)||void 0===e?void 0:e.root.children)||void 0===t?void 0:t.filter((function(e){return e.tag===f("cc6aeb073ebc3cb29734a49164f8964c")}))[0];return r&&(n=r.getDataPropsAsOptions()),(0,i.oxs)(n,(function(e){"array"===e.type&&delete e.children})),n},e.prototype.getNameByPath=function(e,t,n){var r,o;if(void 0===t&&(t="value"),void 0===n&&(n="label"),!e||"string"!=typeof e)return"";var a=(0,s.ev)((0,s.ev)([],(0,s.CR)(this.getVariableOptions()),!1),(0,s.CR)(this.getPageVariablesOptions()),!1),c=(0,i.hEs)(a,(function(n){return n[null!=t?t:"value"]===e}));return c&&null!==(o=null!==(r=c[null!=n?n:"label"])&&void 0!==r?r:c[null!=t?t:"value"])&&void 0!==o?o:""},e}(),Ct=[];function St(e){var t=Array.from(new Set(["global"].concat(e.scene||"global")));e.scene=t,(e.prototype&&e.prototype.isNpmCustomWidget?Ct.find((function(t){return Array.isArray(t)?t[0].prototype.name===e.prototype.name:t.prototype.name===e.prototype.name})):Ct.find((function(t){return t===e})))?console.warn("注册插件异常,已存在同名插件:",e):Ct.push(e)}var Ot,xt,It,Nt,kt,Rt,Pt,At,Tt,Ft,Dt,jt,Mt,_t,zt,Bt,Lt,$t,Ht,Vt,Zt,Ut,Kt,Wt,Jt,qt,Yt,Gt,Xt,Qt,en,tn,nn,rn,on,an,sn,cn,ln,dn,un,pn,fn,hn,vn,mn,bn,gn,yn,wn,En,Cn=function(){function e(e,t,n){var r=this;this.config=e,this.store=t,this.parent=n,this.toDispose=[],this.id=ae(),this.disableHover=!1,this.amisStore={},this.broadcasts=[],this.pluginEvents={},this.pluginActions={},this.isInFrame=!1,this.listeners=[],this.lazyPatchSchema=Z()(this.patchSchema.bind(this),250,{leading:!1,trailing:!0}),this.patching=!1;var o=!!n;this.isInFrame=o,this.env=(0,s.pi)((0,s.pi)((0,s.pi)({},mt),(0,x.omit)(e.amisEnv,"replaceText")),{theme:e.theme}),this.env.beforeDispatchEvent=this.beforeDispatchEvent.bind(this,this.env.beforeDispatchEvent),this.hackIn=(null==n?void 0:n.hackIn)||ft,window.AMISEditorCustomPlugins&&Object.keys(window.AMISEditorCustomPlugins).forEach((function(e){var t=window.AMISEditorCustomPlugins[e];t&&St(t)})),e.scene,this.plugins=(null==n?void 0:n.plugins)||(e.disableBultinPlugin?[]:Ct).concat(this.normalizeScene(null==e?void 0:e.plugins)).filter((function(t){return t=Array.isArray(t)?t[0]:t,!e.disablePluginList||("function"==typeof e.disablePluginList?!e.disablePluginList(t.id||"",t):!e.disablePluginList.includes(t.id||"unkown"))})).map((function(e){var t,n={};Array.isArray(e)&&(n="function"==typeof e[1]?e[1]():e[1],e=e[0]);var o=new e(r,n);return o.order=null!==(t=o.order)&&void 0!==t?t:0,o.rendererName&&(r.pluginEvents[o.rendererName]=o.events||[],r.pluginActions[o.rendererName]=o.actions||[]),o})).sort((function(e,t){return e.order-t.order})),this.hackRenderers(),this.dnd=(null==n?void 0:n.dnd)||new wt(this,t),this.dataSchema=(null==n?void 0:n.dataSchema)||new i.JO1(e.schemas||[]),this.dataSchema.current.tag=f("979a50681e278dcc0be18f68459e8217"),this.variableManager=new Et(this.dataSchema,null==e?void 0:e.variables,null==e?void 0:e.variableOptions),o||this.toDispose.push(Be((function(){return t.activeId}),(function(e,t){return(0,s.mG)(r,void 0,void 0,(function(){return(0,s.Jh)(this,(function(n){switch(n.label){case 0:return this.store.insertId&&this.store.closeInsertPanel(),this.buildJSONSchemaUri(),this.buildToolbars(),[4,this.buildRenderers()];case 1:return n.sent(),this.buildPanels(),this.trigger("active",e?(0,s.pi)((0,s.pi)({},this.buildEventContext(e)),{active:!0}):{id:t,active:!1}),[2]}}))}))})),(0,g.U5)((function(){return t.selections.join(",")}),(function(){r.buildPanels()})),(0,g.U5)((function(){return t.needPatch}),(function(e){e&&r.lazyPatchSchema()})),Be((function(){return{id:t.hoverId,region:t.hoverRegion}}),(function(e,n){var r,o,i=t.getDoc();e.id&&e.region?null===(r=i.querySelector('[data-region="'.concat(e.region,'"][data-region-host="').concat(e.id,'"]')))||void 0===r||r.classList.add("is-region-active"):(null==n?void 0:n.id)&&(null==n?void 0:n.region)&&(null===(o=i.querySelector('[data-region="'.concat(n.region,'"][data-region-host="').concat(n.id,'"]')))||void 0===o||o.classList.remove("is-region-active"))})))}return e.prototype.normalizeScene=function(e){return(null==e?void 0:e.map((function(e){var t=Array.from(new Set(["global"].concat(e.scene||"global")));return e.scene=t,e})))||[]},e.prototype.dynamicAddPlugin=function(e){var t;if(e)if(this.plugins.some((function(t){return t&&t.name===e})))console.warn("[amis-editor]当前已有".concat(e,"插件"));else{var n=Ct.find((function(t){return t.prototype&&t.prototype.name===e}));if(!n&&window.AMISEditorCustomPlugins&&(n=window.AMISEditorCustomPlugins[e]),n){var r=new n(this);r.order=null!==(t=r.order)&&void 0!==t?t:0,this.plugins.push(r),this.plugins.sort((function(e,t){return e.order-t.order})),r.rendererName&&(this.pluginEvents[r.rendererName]=r.events||[],this.pluginActions[r.rendererName]=r.actions||[]),this.buildRenderers()}}},e.prototype.updateAMISContext=function(e){e&&(this.amisStore=e)},e.prototype.buildRenderersAndPanels=function(){var e=this;setTimeout((function(){return(0,s.mG)(e,void 0,void 0,(function(){var e,t;return(0,s.Jh)(this,(function(n){switch(n.label){case 0:return(e=this.store).activeId||!(null===(t=null==e?void 0:e.schema)||void 0===t?void 0:t.$$id)?[3,2]:[4,this.buildRenderers()];case 1:n.sent(),this.buildPanels(e.schema.$$id),n.label=2;case 2:return[2]}}))}))}),200)},e.prototype.buildEventContext=function(e){var t="string"==typeof e?this.store.getNodeById(e):e,n=this.store.getSchema(t.id);return{node:t,id:t.id,info:t.info,path:t.path,schemaPath:t.schemaPath,schema:n,data:""}},e.prototype.buildJSONSchemaUri=function(){var e=this.store.activeId,t="";if(e){var n=this.buildEventContext(e),r=this.trigger("before-resolve-json-schema",n);if(t=r.context.data,!r.prevented){this.plugins.forEach((function(e){var r;if(!t){var o=null===(r=e.buildJSONSchema)||void 0===r?void 0:r.call(e,n);o&&(t=o)}})),n.data=t;var o=this.trigger("after-resolve-json-schema",n);t=o.data}}this.store.setJSONSchemaUri(t)},e.prototype.buildToolbars=function(){var e=this.store.activeId,t=[];if(e){var n=this.buildEventContext(e);this.plugins.forEach((function(e){var r,o=(0,s.pi)({},n);null===(r=e.buildEditorToolbar)||void 0===r||r.call(e,o,t)})),this.trigger("build-toolbars",(0,s.pi)((0,s.pi)({},n),{data:t}))}this.store.setActiveToolbars(t.map((function(e){return(0,s.pi)((0,s.pi)({},e),{order:e.order||0,id:ae()})})))},e.prototype.collectPanels=function(e,t,n){var r=this;void 0===t&&(t=!1),void 0===n&&(n=!1);var o=[];if(e){var i=(0,s.pi)((0,s.pi)({},this.buildEventContext(e)),{secondFactor:n,data:o,selections:this.store.selections.map((function(e){return r.buildEventContext(e)}))});this.plugins.forEach((function(e){var t;null===(t=e.buildEditorPanel)||void 0===t||t.call(e,i,o)})),t&&this.trigger("build-panels",i),o=i.data||o,i.changeLeftPanelKey&&this.store.changeLeftPanelKey(i.changeLeftPanelKey)}return o},e.prototype.buildPanels=function(e){var t,n,r=e||this.store.activeId,o=[];if(!r&&(null===(t=this.store)||void 0===t?void 0:t.schema)&&(r=null===(n=this.store)||void 0===n?void 0:n.schema.$$id),r||this.store.selections.length){r=r||this.store.selections[0];var i=this.store.getNodeById(r);o=i?this.collectPanels(i,!0):o}this.store.setPanels(o.map((function(e){return(0,s.pi)((0,s.pi)({},e),{order:e.order||0})})))},e.prototype.collectRenderers=function(e,t){var n,r,o,a;return void 0===t&&(t=this.store.activeContainerId),(0,s.mG)(this,void 0,void 0,(function(){var c,l,d,u,p,f,h,v,m,b,g,y,w;return(0,s.Jh)(this,(function(E){switch(E.label){case 0:if(c=[],!(l=t)&&(null===(n=this.store)||void 0===n?void 0:n.schema)&&(l=null===(r=this.store)||void 0===r?void 0:r.schema.$$id),!l)return[2,c];if(!(d=this.store.getNodeById(l)))return[2,c];u=this.store.getSchema(l),p={node:d,id:d.id,info:d.info,path:d.path,schemaPath:d.schemaPath,schema:u,region:e},f=[],h=function(e,t){var n,r;return(0,s.Jh)(this,(function(t){switch(t.label){case 0:return n=v.plugins[e],[4,null===(o=n.buildSubRenderers)||void 0===o?void 0:o.call(n,p,c,(0,i.T56)())];case 1:return(r=t.sent())&&(Array.isArray(r)?r:[r]).forEach((function(e){return c.push((0,s.pi)((0,s.pi)({},e),{id:ae(),plugin:n,parent:d.info,order:e.order||0}))})),n.asyncUpdateCustomSubRenderersInfo&&f.push(n),[2]}}))},v=this,m=0,b=this.plugins.length,E.label=1;case 1:return mt})},t.prototype.bindScrollEvent=function(){var e=this.props.target;this.scrollElem=e()||this.getDefaultTarget(),this.scrollElem&&(this.scrollElem.addEventListener("scroll",this.handleScroll),this.handleScroll({target:this.scrollElem}))},t.prototype.scrollToTop=function(e){var t=this.props.onClick;this.scrollElem&&(this.scrollElem.scrollTo({top:0,behavior:"smooth"}),"function"==typeof t&&t(e))},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=v()("editor-backTop",void 0===n?"":n,this.state.visible?"":"hidden"),o=te()(this.props,["className","children","visibilityHeight","target","visible"]),i=c.createElement("div",{className:"backTop-content"},c.createElement("div",{className:"backTop-icon"},"UP"));return c.createElement("div",(0,s.pi)({},o,{className:r,onClick:this.scrollToTop,ref:this.ref}),t||i)},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getDefaultTarget",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleScroll",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"bindScrollEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"scrollToTop",null),t}(c.Component),Nn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.env=(0,s.pi)((0,s.pi)({},t.props.manager.env),{notify:function(e,n,r){t.props.editable?console.warn("[Notify]",e,n):a.Am[e]?a.Am[e](n,r||f("error"===e?"a71002967924a83e32b38a80705290fb":"058ebdf2884474ebff2977ba2f0e275e")):console.warn("[Notify]",e,n)},theme:t.props.theme,session:"preview-".concat(t.props.manager.id),rendererResolver:t.rendererResolver.bind(t)}),t.doingSelection=!1,t.unReaction=Be((function(){return[t.getHighlightNodes(),t.props.store.activeId]}),(function(e,n){var r=(0,s.CR)(e,1)[0],o=t.props.store;setTimeout((function(){t.calculateHighlightBox(r)}),50);var i=null==n?void 0:n[0];Array.isArray(i)&&(i=i.filter((function(e){return!~r.indexOf(e)})),o.resetHighlightBox(i))})),t}return(0,s.ZT)(t,e),t.prototype.componentDidMount=function(){this.currentDom=(0,o.findDOMNode)(this),this.currentDom.addEventListener("mouseleave",this.handleMouseLeave),this.currentDom.addEventListener("mousemove",this.handleMouseMove),this.currentDom.addEventListener("click",this.handleClick),this.currentDom.addEventListener("mouseover",this.handeMouseOver),this.currentDom.addEventListener("mousedown",this.handeMouseDown),this.props.manager.on("after-update",this.handlePanelChange)},t.prototype.componentWillUnmount=function(){var e,t=this;this.currentDom&&(this.currentDom.removeEventListener("mouseleave",this.handleMouseLeave),this.currentDom.removeEventListener("mousemove",this.handleMouseMove),this.currentDom.removeEventListener("click",this.handleClick),this.currentDom.removeEventListener("mouseover",this.handeMouseOver),this.currentDom.removeEventListener("mousedown",this.handeMouseDown),this.props.manager.off("after-update",this.handlePanelChange)),null===(e=this.scrollLayer)||void 0===e||e.removeEventListener("scroll",this.handlePanelChange),setTimeout((function(){return(0,i.efX)([t.env.session])}),500)},t.prototype.contentsRef=function(e){var t;e?(this.scrollLayer=e,this.scrollLayer.addEventListener("scroll",this.handlePanelChange),this.layer=e.querySelector(".ae-Preview-widgets"),this.props.store.setLayer(this.layer),this.unSensor=(0,i.Adl)(e,this.handlePanelChange)):(delete this.scrollLayer,delete this.layer,null===(t=this.unSensor)||void 0===t||t.call(this),delete this.unSensor)},t.prototype.handlePanelChange=function(){var e=this;setTimeout((function(){return e.calculateHighlightBox(e.getHighlightNodes())}),50)},t.prototype.getHighlightNodes=function(){return this.props.store.highlightNodes.map((function(e){return e.id}))},t.prototype.calculateHighlightBox=function(e){var t=this.props.store;this.layer&&t.calculateHighlightBox(e)},t.prototype.handeMouseDown=function(e){var t,n=this,r=1===e.button&&null!==window.event||0===e.button;if(this.props.editable&&r&&!e.defaultPrevented&&!e.defaultPrevented&&!(null===(t=e.target)||void 0===t?void 0:t.closest("[draggable]"))){var o=this.layer;if(o){var i=null,a=o.getBoundingClientRect(),s=e.pageX,c=e.pageY,l=s-a.left,d=c-a.top,u=function(e){i||((i=document.createElement("div")).classList.add("ae-Editor-selectionCursor"),o.appendChild(i)),n.doingSelection=!0;var t=e.pageX-s,r=e.pageY-c;i.style.cssText="left: ".concat(l+Math.min(t,0),"px; top: ").concat(d+Math.min(r,0),"px; width: ").concat(Math.abs(t),"px; height: ").concat(Math.abs(r),"px;")},p=function(e){n.doingSelection=!1,window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",p),i&&o.removeChild(i);var t=e.pageX-s,r=e.pageY-c,a={x:l+Math.min(t,0),y:d+Math.min(r,0),w:Math.abs(t),h:Math.abs(r)};if(!(a.w<10&&a.h<10)){var f=function(e){window.removeEventListener("click",f,!0),e.preventDefault(),e.stopPropagation()};window.addEventListener("click",f,!0),setTimeout((function(){return window.removeEventListener("click",f,!0)}),350),n.doSelection(a)}};window.addEventListener("mousemove",u),window.addEventListener("mouseup",p)}}},t.prototype.doSelection=function(e){var t=this.layer,n=(0,o.findDOMNode)(this);if(t&&n){var r=[],i=t.getBoundingClientRect(),a=e.x+i.left,s=e.y+i.top,c=(e.w,e.h,e.x+i.left+e.w),l=e.y+i.top+e.h,d=n.querySelectorAll("[data-editor-id]");[].slice.apply(d).forEach((function(e){if(!r.some((function(t){return t.contains(e)}))){var t=e.getBoundingClientRect();a<=t.left&&s<=t.top&&c>=t.right&&l>=t.bottom&&(~r.indexOf(e)||r.push(e))}}));var u=r.map((function(e){return e.getAttribute("data-editor-id")})).filter((function(e,t,n){return n.indexOf(e)===t}));u.length&&this.props.manager.setSelection(u)}},t.prototype.handleClick=function(e){var t,n=this.props.store,r=e.target.closest("[data-editor-id]");if(!e.target.closest(".ae-editor-action-btn"))if(e.defaultPrevented)e.stopPropagation();else{if(r){var o=r.getAttribute("data-editor-id"),i="",a=e.target.closest("[data-region-host]");if(a){var s=a.getAttribute("data-region-host");s&&s===o&&a.getAttribute("data-region")&&(i=a.getAttribute("data-region"))}e.metaKey?this.props.manager.toggleSelection(o):n.setActiveId(o,i)}if(!(null===(t=this.layer)||void 0===t?void 0:t.contains(e.target))&&this.props.editable){var c=this.props.manager.trigger("prevent-click",{data:e});c.prevented||c.stoped||(e.preventDefault(),e.stopPropagation())}}},t.prototype.handleNavSwitch=function(e){this.props.store.setActiveId(e)},t.prototype.handleMouseMove=function(e){var t;if(!this.doingSelection&&!this.props.manager.disableHover){var n=this.props.store,r=e.target;if(!(null===(t=this.layer)||void 0===t?void 0:t.contains(r))&&!e.target.closest(".ignore-hover-elem")){var o=r.closest("[data-editor-id]");if(o){var i=o.getAttribute("data-editor-id"),a="",s=e.target.closest("[data-region-host]");if(s){var c=s.getAttribute("data-region-host");c&&c===i&&s.getAttribute("data-region")&&(a=s.getAttribute("data-region"))}n.setMouseMoveRegion(a),n.setHoverId(i)}}}},t.prototype.handleMouseLeave=function(){var e=this.props.store;e.setMouseMoveRegion(""),e.setHoverId("")},t.prototype.handeMouseOver=function(e){this.props.editable&&(e.preventDefault(),e.stopPropagation())},t.prototype.handleDragEnter=function(e){this.props.manager.dnd.dragEnter(e.nativeEvent)},t.prototype.handleDragLeave=function(e){this.props.manager.dnd.dragLeave(e.nativeEvent)},t.prototype.handleDragOver=function(e){this.props.manager.dnd.dragOver(e.nativeEvent)},t.prototype.handleDrop=function(e){this.props.manager.dnd.drop(e.nativeEvent)},t.prototype.getCurrentTarget=function(){return this.props.isMobile?this.currentDom.querySelector(".ae-Preview-inner"):this.currentDom.querySelector(".ae-Preview-body")},t.prototype.rendererResolver=function(e,t,n){var r=this.props,o=r.editable,a=r.manager,c=(0,i.Bju)(e,t);if(!1===o)return c;c=c||{name:"error",test:function(){return!0},component:ot};var l=a.getEditorInfo(c,e,t);return n&&n.store&&n.store.data&&a.updateAMISContext(n.store.data),l&&(c=(0,s.pi)((0,s.pi)({},c),{component:a.makeWrapper(l,c)})),c},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.editable,o=t.store,i=t.manager,l=t.amisEnv,d=t.theme,u=t.isMobile,p=t.iframeUrl,f=t.autoFocus,h=t.toolbarContainer,m=t.appLocale,b=(0,s._T)(t,["className","editable","store","manager","amisEnv","theme","isMobile","iframeUrl","autoFocus","toolbarContainer","appLocale"]),g=(0,s.pi)((0,s.pi)({},this.env),l);return c.createElement("div",{id:"editor-preview-body",onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDragOver:this.handleDragOver,onDrop:this.handleDrop,className:v()("ae-Preview",n,u?"is-mobile-body hoverShowScrollBar":"is-pc-body")},c.createElement("div",{className:v()("ae-Preview-body",n,r?"is-edting":"",u?"is-mobile":"is-pc hoverShowScrollBar"),ref:this.contentsRef},p&&u&&c.createElement(c.Fragment,null,c.createElement("div",{className:"mobile-sound"}),c.createElement("div",{className:"mobile-receiver"}),c.createElement("div",{className:"mobile-left-btn"}),c.createElement("div",{className:"mobile-right-btn"}),c.createElement("div",{className:"mobile-open-btn"})),c.createElement("div",{className:"ae-Preview-inner"},p&&u?c.createElement(On,(0,s.pi)({},b,{key:"mobile",className:"ae-PreviewFrame",editable:r,isMobile:u,store:o,env:g,manager:i,url:p,theme:d,autoFocus:f})):c.createElement(kn,(0,s.pi)({},b,{editable:r,autoFocus:f,store:o,env:g,manager:i,key:"pc",appLocale:m})),p&&u&&o.contextId?c.createElement("span",{className:"ae-IframeMask"}):null,c.createElement("div",{className:"ae-Preview-widgets",id:"aePreviewHighlightBox"},o.highlightNodes.map((function(t){return c.createElement(nt,{node:t,key:t.id,store:o,id:t.id,title:t.label,toolbarContainer:h,onSwitch:e.handleNavSwitch,manager:i},t.childRegions.map((function(e){return!t.memberImmutable(e.region)&&o.isRegionActive(e.id,e.region)?c.createElement(rt,{manager:i,key:e.region,store:o,node:e,id:e.id,name:e.region,title:e.label,preferTag:e.preferTag,isOnlyChildRegion:1===t.childRegions.length}):null})))})))),this.currentDom&&c.createElement(In,{key:u?"mobile-back-up":"pc-back-up",className:"ae-editor-action-btn",target:this.getCurrentTarget.bind(this),onClick:function(e){console.log(e)}},c.createElement(a.JO,{icon:"back-up",className:"back-top-icon"}))))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"contentsRef",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handlePanelChange",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Array]),(0,s.w6)("design:returntype",void 0)],t.prototype,"calculateHighlightBox",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handeMouseDown",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleNavSwitch",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleMouseMove",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[MouseEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handeMouseOver",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragEnter",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragLeave",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragOver",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDrop",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getCurrentTarget",null),(0,s.gn)([R.Pi],t)}(c.Component),kn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.componentDidMount=function(){var e=this.props.store;this.props.autoFocus?setTimeout((function(){if((0,P.fh)(e)){var t=(0,i.hEs)(e.outline,(function(e){return!e.isRegion&&e.clickable}));t&&(0,P.fh)(e)&&e.setActiveId(t.id)}}),350):this.props.manager.buildRenderersAndPanels()},t.prototype.componentDidUpdate=function(e){var t=this.props;t.editable!==e.editable&&t.editable&&this.props.manager.trigger("preview2editor",{data:this.props.manager})},t.prototype.render=function(){var e=this.props,t=e.editable,n=e.store,r=e.appLocale;e.autoFocus;var o=e.env,a=e.data;e.manager;var c=(0,s._T)(e,["editable","store","appLocale","autoFocus","env","data","manager"]);return(0,i.sYA)(t?n.filteredSchema:n.filteredSchemaForPreview,(0,s.pi)((0,s.pi)({},c),{key:t?"edit-mode":"preview-mode",theme:o.theme,data:null!=a?a:n.ctx,locale:r}),o)},(0,s.gn)([R.Pi],t)}(c.Component),Rn=function(e){function t(t){var n=e.call(this,t)||this;return n.env=(0,s.pi)({session:"preview"},n.props.env),n.state={scale:!0},n.rootRef=n.rootRef.bind(n),n.syncHeight=n.syncHeight.bind(n),n.handleClick=n.handleClick.bind(n),n}return(0,s.ZT)(t,e),t.prototype.componentWillUnmount=function(){this.unSensor&&this.unSensor()},t.prototype.rootRef=function(e){var t;this.ref=e,e&&(this.syncHeight(),this.unSensor=(0,i.Adl)(null===(t=e.firstChild)||void 0===t?void 0:t.firstChild,this.syncHeight))},t.prototype.syncHeight=function(){if(this.ref){var e=this.state.scale,t=this.ref.firstChild;this.ref.style.cssText="height: ".concat(t.scrollHeight/(e?2:1),"px;")}},t.prototype.handleClick=function(e){e.preventDefault(),this.setState({scale:!this.state.scale})},t.prototype.render=function(){var e=this,t=this.props,n=t.schema,r=t.theme;return c.createElement(i.crj,{unMountOnHidden:!1,schema:n,component:function(t){var n=t.schema;return c.createElement("div",{className:"ae-RenderersPicker-thumb ".concat(e.state.scale?"is-scaled":"")},c.createElement("div",{className:"ae-Editor-rendererThumbWrap"},c.createElement("div",{className:"ae-Editor-rendererThumbIcon",onClick:e.handleClick},c.createElement(a.JO,{icon:e.state.scale?"zoom-in":"zoom-out"})),c.createElement("div",{ref:e.rootRef,className:"ae-Editor-rendererThumb"},c.createElement("div",{className:"ae-Editor-rendererThumbInner"},(0,i.sYA)((0,s.pi)((0,s.pi)({},n),{mode:"horizontal"===n.mode?"normal":n.mode}),{theme:r},e.env)))))}})},t}(c.Component),Pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.handleLeftClick=function(e){var t=e.currentTarget.getAttribute("data-value");this.props.store.setInsertTag(t)},t.prototype.handleClick=function(e){var t=e.currentTarget.getAttribute("data-value");this.props.store.setInsertSelected(t)},t.prototype.hadnlDBClick=function(e){var t=e.currentTarget.getAttribute("data-value"),n=this.props.store;n.setInsertSelected(t);var r=this.props.manager;"replace"===n.insertMode?r.replace():r.insert()},t.prototype.handleInsert=function(){this.props.manager.insert()},t.prototype.handleReplace=function(){this.props.manager.replace()},t.prototype.handleCancel=function(){this.props.store.closeInsertPanel()},t.prototype.render=function(){var e,t,n=this,r=this.props.store,o=this.props.manager,i=null===(e=r.getNodeById(r.insertId))||void 0===e?void 0:e.info,s=null===(t=T()(i.regions,(function(e){return e.key===r.insertRegion})))||void 0===t?void 0:t.label,l=r.groupedInsertRenderers,d=Object.keys(l),u=r.insertTag||f("a8b0c20416853bda54120bf19477ad11"),p=l[u]||l[f("a8b0c20416853bda54120bf19477ad11")];return c.createElement("div",{className:"ae-InsertPanel"},"replace"===r.insertMode?c.createElement("div",{className:"ae-InsertPanel-title"},"更改组件类型"):c.createElement("div",{className:"ae-InsertPanel-title"},c.createElement("span",null,"选中组件插入到")," ",c.createElement("code",null,i.name," > ",s)),c.createElement("div",{className:"m-b-xs"},c.createElement(a.Wz,{className:"editor-InputSearch",value:r.insertRenderersKeywords,onChange:r.changeInsertRenderersKeywords,placeholder:f("d87481b371771b4f150da76e311bbbef"),clearable:!1},r.insertRenderersKeywords?c.createElement("a",{onClick:r.resetInsertRenderersKeywords},c.createElement(a.JO,{icon:"close",className:"icon"})):c.createElement(a.JO,{icon:"search",className:"icon"}))),c.createElement("div",{className:"ae-RenderersPicker-list"},c.createElement("ul",null,d.map((function(e){return c.createElement("li",{key:e,className:u===e?"is-active":""},c.createElement("a",{"data-value":e,onClick:n.handleLeftClick},e))}))),c.createElement("div",{className:"ae-RenderersPicker-content"},Array.isArray(p)&&p.length?c.createElement("ul",null,p.map((function(e){return c.createElement("li",{key:e.id,className:r.insertSelected===e.id?"is-active":"","data-value":e.id,onClick:n.handleClick,onDoubleClick:n.hadnlDBClick},c.createElement(Rn,{theme:o.env.theme,env:o.env,schema:e.previewSchema||{type:"tpl",tpl:f("becdc848350872592201e31bab03892a")}}),c.createElement("div",{className:"ae-RenderersPicker-info"},c.createElement("h4",null,e.name),c.createElement("div",null,c.createElement(a.Vt,{html:e.description}),e.docLink?c.createElement("a",{target:"_blank",href:r.amisDocHost+e.docLink},c.createElement("span",null,"详情")):null)))}))):c.createElement("div",null,"没有可用组件,也许你该切换容器试试。"))),c.createElement("div",{className:"ae-InsertPanel-footer"},"replace"===r.insertMode?c.createElement(a.zx,{className:"action-btn action-btn-primary",onClick:this.handleReplace,disabled:!r.insertSelected,level:"primary"},"替换"):c.createElement(a.zx,{className:"action-btn action-btn-primary",onClick:this.handleInsert,disabled:!r.insertSelected,level:"primary"},"插入"),c.createElement(a.zx,{className:"action-btn",onClick:this.handleCancel},"取消")))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleLeftClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"hadnlDBClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleInsert",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleReplace",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleCancel",null),(0,s.gn)([R.Pi],t)}(c.Component);function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;t0){var i=n.getResultTags(t.allResult);r=i.curResultTags,o=i.curResultByTag}return n.state={resultTags:r,resultByTag:o,curKeyword:t.externalKeyword||"",searchResult:[],searchResultByTag:{},visible:!1,curKeywordSearchHistory:n.getSearchHistory(),toggleTagFolderStatus:!0},n}return(0,s.ZT)(t,e),t.prototype.componentDidMount=function(){var e,t;(null===(t=null===(e=this.ref.current)||void 0===e?void 0:e.childNodes[0])||void 0===t?void 0:t.childNodes[0])&&(this.curInputBox=this.ref.current.childNodes[0].childNodes[0],this.curInputBox.addEventListener("keyup",this.bindEnterEvent))},t.prototype.componentWillUnmount=function(){this.curInputBox&&this.curInputBox.removeEventListener("keyup",this.bindEnterEvent)},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=this,n=e.externalKeyword,r=e.allResult;if(n!==this.state.curKeyword&&this.setState({curKeyword:n},(function(){t.groupedResultByKeyword(n)})),r!==this.props.allResult){var o=[],i={};if(r&&r.length>0){var a=this.getResultTags(r);o=a.curResultTags,i=a.curResultByTag}this.setState({resultTags:o,resultByTag:i})}},t.prototype.getSearchHistory=function(){var e=[];if(window.localStorage){var t=window.localStorage.getItem(this.localStorageKey);if(t){var n=JSON.parse(t);n&&Array.isArray(n)&&(e=n)}}return e},t.prototype.getResultTags=function(e){var t=[],n={},r=this.props.tagKey||"tags";return e.forEach((function(e){!re()(e)&&e[r]&&(Array.isArray(e[r])?e[r].concat():e[r]?[e[r]]:[f("0d98c74797e49d00bcc4c17c9d557a2b")]).forEach((function(r){t.indexOf(r)<0&&t.push(r),n[r]||(n[r]=[]),n[r].push(e)}))})),{curResultTags:t,curResultByTag:n}},t.prototype.groupedResultByKeyword=function(e){var t=this.props.allResult,n=[],r={},o=e||this.state.curKeyword,i=this.props.tagKey||"tags",a={},s=o?new RegExp(Ye(o),"i"):null;t.forEach((function(t){re()(t)&&s&&s.test(t)?n.push(t):e&&!["name","description","scaffold.type"].some((function(e){return t[e]&&s&&s.test(t[e])}))||(t[i]?(Array.isArray(t[i])?t[i].concat():t[i]?[t[i]]:[f("0d98c74797e49d00bcc4c17c9d557a2b")]).forEach((function(e){r[e]=a[e]||[],r[e].push(t)})):n.push(t))})),this.setState({searchResult:n,searchResultByTag:r})},t.prototype.bindFocusEvent=function(){this.setState({visible:!0})},t.prototype.bindBlurEvent=function(){var e=this,t=this.state.curKeyword;this.setState({visible:!1},(function(){t&&e.addSearchHistory(t),e.props.onChange(t)}))},t.prototype.updateCurKeyword=function(e){var t=this,n=e;n=n?n.trim():n,this.setState({curKeyword:n},(function(){t.groupedResultByKeyword(n),t.props.immediateChange&&t.props.onChange(n)}))},t.prototype.changeTagFoldStatus=function(e,t){t.preventDefault(),t.stopPropagation(),this.curInputBox.focus(),this.curTagFolded[e]=!this.curTagFolded[e],this.setState({toggleTagFolderStatus:!this.state.toggleTagFolderStatus})},t.prototype.bindEnterEvent=function(e){var t=this;e.preventDefault();var n=this.state.curKeyword;13===(null==e?void 0:e.keyCode)&&this.setState({visible:!1},(function(){t.addSearchHistory(n),t.props.onChange(n)}))},t.prototype.bindClearActionEvent=function(){var e=this;this.setState({curKeyword:"",searchResult:[],searchResultByTag:{}},(function(){e.props.onChange("")}))},t.prototype.bindTagClickEvent=function(e){var t,n=this,r=this.state.resultByTag[e];this.setState({visible:!1,curKeyword:e,searchResult:r,searchResultByTag:(t={},t[e]=r,t)},(function(){n.props.onTagChange&&n.props.onTagChange(e)}))},t.prototype.addSearchHistory=function(e){var t=this.state.curKeywordSearchHistory;t.indexOf(e)>-1||(10===t.length?(t.shift(),t.push(e)):t.push(e),this.updateSearchHistory())},t.prototype.clickKeywordEvent=function(e){var t=this;this.setState({visible:!1,curKeyword:e},(function(){t.groupedResultByKeyword(e),t.props.onChange(e)}))},t.prototype.deleteSearchHistory=function(e,t){e.preventDefault(),e.stopPropagation(),this.curInputBox.focus();var n=this.state.curKeywordSearchHistory,r=n.indexOf(t);n.splice(r,1),this.updateSearchHistory()},t.prototype.clearSearchHistory=function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.curInputBox.focus();var n=this.state.curKeywordSearchHistory;n&&n.length>0&&this.setState({curKeywordSearchHistory:[]},(function(){t.updateSearchHistory()}))},t.prototype.updateSearchHistory=function(){if(window.localStorage){var e=this.state.curKeywordSearchHistory;window.localStorage.setItem(this.localStorageKey,JSON.stringify(e))}},t.prototype.renderNameByKeyword=function(e,t){if(t&&~e.indexOf(t)){var n=e.indexOf(t),r=n+t.length;return c.createElement("span",null,e.substring(0,n),c.createElement("span",{className:"is-keyword"},t),e.substring(r))}return e},t.prototype.resultIsHasScroll=function(e,t){var n=this,r=0;return(e?Object.keys(e):[]).map((function(t){n.curTagFolded[t]?r+=1:r+=e[t].length+1})),r>t},t.prototype.render=function(){var e=this,t=this.props,n=t.allResult,r=t.closeAutoComplete,o=t.immediateChange,i=this.state,l=i.resultTags,d=i.curKeyword,u=i.searchResult,p=i.searchResultByTag,h=i.visible,m=p?Object.keys(p):[],b=(0,s.ev)([],(0,s.CR)(this.state.curKeywordSearchHistory),!1).reverse(),g=!1;return h&&n&&n.length>0&&(g=!0),r&&d&&(g=!1),r&&(!l||l&&0===l.length)&&(!b||b&&0===b.length)&&(g=!1),c.createElement("div",{className:"editor-InputSearch-panel",ref:this.ref},c.createElement(a.Wz,{className:"editor-InputSearch",value:d,onChange:this.updateCurKeyword,placeholder:f("2168c5735883bd040eaf09909d0911b8"),clearable:!1,onFocus:this.bindFocusEvent,onBlur:this.bindBlurEvent},c.createElement(c.Fragment,null,o&&(d?c.createElement(a.JO,{icon:"search-clear",className:"icon delete-btn-icon",onClick:this.bindClearActionEvent}):c.createElement(a.JO,{icon:"editor-search",className:"icon",onClick:this.bindBlurEvent})),!o&&c.createElement(c.Fragment,null,d&&c.createElement(a.JO,{icon:"search-clear",className:"icon delete-btn-icon margin-right",onClick:this.bindClearActionEvent}),c.createElement(a.JO,{icon:"editor-search",className:"icon",onClick:this.bindBlurEvent})))),c.createElement("div",{className:"editor-InputSearch-content ".concat(g?"":"hidden-status")},!d&&b&&b.length>0&&c.createElement("div",{className:"search-history ".concat(l&&l.length>0?"has-border-bottom":"")},c.createElement("div",{className:"header"},c.createElement("div",{className:"header-title"},"搜索历史"),c.createElement("div",{className:"header-clear-icon",onClick:function(t){return e.clearSearchHistory(t)}},"清空")),c.createElement("div",{className:"history-cont ".concat(b.length>6?"hasScrollBtn":"")},b.map((function(t,n){return c.createElement("div",{className:"history-item",key:"".concat(t,"-").concat(n),onClick:function(){return e.clickKeywordEvent(t)}},c.createElement("div",{className:"history-keyword"},t),c.createElement("div",{className:"delete-icon",title:"点击删除这条搜索记录"},c.createElement(a.JO,{icon:"close",onClick:function(n){return e.deleteSearchHistory(n,t)}})))})))),d&&0===u.length&&0===m.length&&c.createElement("div",{className:"search-result-list"},c.createElement("div",{className:"search-result-placeholder"},"搜索结果为空,您可以换个关键字继续查找。")),d&&u.length>0&&c.createElement("div",{className:"search-result-list ".concat(u.length>6?"hasScrollBtn":"")},u.length>1&&c.createElement("div",{className:"subRenderers-list only-one-tag"},u.map((function(t,n){return c.createElement("div",{className:"subRenderers-item",key:"subRenderers-only-one-tag-".concat(n),onClick:function(){return e.clickKeywordEvent(t.name)}},t.name||t.type)})))),d&&m.length>0&&c.createElement("div",{className:"search-result-list ".concat(this.resultIsHasScroll(p,6)?"hasScrollBtn":"")},m.length>1&&m.map((function(t,n){return c.createElement("div",{className:"multiple-subRenderers-list",key:"".concat(t,"-subRenderers-list")},c.createElement("div",{className:v()("subRenderers-header",{"is-folded":!!e.curTagFolded[t]}),title:e.curTagFolded[t]?f("e4cefe7df36e92da1d7e875b92655507"):f("7ae451de83aa6f5f140e941904377391"),onClick:function(n){e.changeTagFoldStatus(t,n)}},t,c.createElement(a.JO,{icon:"right-arrow-bold"})),c.createElement("div",{className:v()("subRenderers-list",{"is-folded":!!e.curTagFolded[t]})},p[t]&&p[t].map((function(t,n){return c.createElement("div",{className:"subRenderers-item",key:n,onClick:function(){return e.clickKeywordEvent(t.name)}},e.renderNameByKeyword(t.name,d))}))))})),1===m.length&&m.map((function(t,n){return c.createElement("div",{className:"subRenderers-list only-one-tag",key:"subRenderers-tag-".concat(t)},p[t]&&p[t].map((function(t,n){return c.createElement("div",{className:"subRenderers-item",key:"subRenderers-only-one-tag-".concat(n),onClick:function(){return e.clickKeywordEvent(t.name)}},t.name||t.type)})))}))),!d&&l&&l.length>0&&c.createElement("div",{className:"tag-list"},c.createElement("div",{className:"header"},"组件分类"),c.createElement("div",{className:"tag-list-cont"},l.length?l.map((function(t,n){return c.createElement("div",{className:"tag-item",key:"".concat(t,"-").concat(n),onClick:function(){return e.bindTagClickEvent(t)}},t)})):null))))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getSearchHistory",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"bindFocusEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"bindBlurEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"updateCurKeyword",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String,Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"changeTagFoldStatus",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"bindEnterEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"bindClearActionEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"bindTagClickEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"addSearchHistory",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"clickKeywordEvent",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object,String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"deleteSearchHistory",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"clearSearchHistory",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"updateSearchHistory",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String,String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"renderNameByKeyword",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object,Number]),(0,s.w6)("design:returntype",void 0)],t.prototype,"resultIsHasScroll",null),(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),Mr=function(e){function t(t){var n=e.call(this,t)||this;n.localStorageKey="amis-editor-renderer-search-history";var r=t.store.subRenderersByOrder;r=r.filter((function(e){return!e.disabledRendererPlugin}));var o=t.store,i=o.subRenderersKeywords,a=o.subRenderersTag;return n.state={subRenderersByOrder:r,defaultKeyword:i||a||""},n.lastSubRenderersTag=t.store.subRenderersTag,n.changeSubRenderersTag=n.changeSubRenderersTag.bind(n),n}return(0,s.ZT)(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=e.store.subRenderersTag,n=e.store.subRenderersKeywords;t===this.lastSubRenderersTag||n||(this.lastSubRenderersTag=t,this.setState({defaultKeyword:t}))},t.prototype.changeSubRenderersTag=function(e){this.lastSubRenderersTag=e,this.props.store.changeSubRenderersTag(e)},t.prototype.render=function(){var e=this.state,t=e.subRenderersByOrder,n=e.defaultKeyword,r=this.props.store.changeSubRenderersKeywords;return c.createElement(jr,{allResult:t,externalKeyword:n,searchPanelUUID:this.localStorageKey,onChange:r,onTagChange:this.changeSubRenderersTag,immediateChange:!0,closeAutoComplete:!0})},(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),_r=function(e){function t(t){var n=e.call(this,t)||this;n.localStorageKey="amis-editor-custom-renderer-search-history";var r=t.store.customRenderersByOrder;r=r.filter((function(e){return!e.disabledRendererPlugin}));var o=t.store,i=o.customRenderersKeywords,a=o.customRenderersTag;return n.state={customRenderersByOrder:r,defaultKeyword:i||a||""},n}return(0,s.ZT)(t,e),t.prototype.render=function(){var e=this.state,t=e.customRenderersByOrder,n=e.defaultKeyword,r=this.props.store,o=r.changeCustomRenderersKeywords,i=r.changeCustomRenderersTag;return t&&t.length>0?c.createElement(jr,{allResult:t,externalKeyword:n,searchPanelUUID:this.localStorageKey,onChange:o,onTagChange:i}):null},(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),zr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={toggleCollapseFolderStatus:!1},t.curCollapseFolded={},t}return(0,s.ZT)(t,e),t.prototype.handleRegionFilterClick=function(e){var t=e.currentTarget.getAttribute("data-value"),n=this.props,r=n.store,o=n.manager;t=t===r.subRendererRegion?"":t,o.switchToRegion(t)},t.prototype.handleDragStart=function(e,t){var n=e.currentTarget.getAttribute("data-id");e.dataTransfer.setData('dnd-dom/[data-id="'.concat(n,'"]'),"")},t.prototype.handleClick=function(e){var t=e.currentTarget.getAttribute("data-dnd-id");this.props.manager.addElem(t)},t.prototype.changeCollapseFoldStatus=function(e,t){this.curCollapseFolded[e]=!this.curCollapseFolded[e],this.setState({toggleCollapseFolderStatus:!this.state.toggleCollapseFolderStatus}),t.preventDefault(),t.stopPropagation()},t.prototype.renderThumb=function(e){var t=this.props.manager;return e?(0,i.sYA)(e,{onAction:ue},t.env):c.createElement("p",null,"没有预览图")},t.prototype.render=function(){var e=this,t=this.props,n=t.store,r=t.searchRendererType,o=t.className,i=this.props.groupedRenderers||{},s=Object.keys(i);return c.createElement("div",{className:v()("ae-RendererList",o)},"renderer"===r&&c.createElement(Mr,{store:n}),"custom-renderer"===r&&c.createElement(_r,{store:n}),c.createElement("hr",{className:"margin-top"}),c.createElement("div",{className:"ae-RendererList-groupWrap hoverShowScrollBar"},s.length?s.map((function(t,r){var o=i[t];return o&&o.length?c.createElement(c.Fragment,{key:t},c.createElement("div",{key:"".concat(t,"-head"),className:"ae-RendererList-head collapse-header",onClick:function(n){e.changeCollapseFoldStatus(t,n)}},t,c.createElement("div",{className:v()("expander-icon",{"is-folded":!!e.curCollapseFolded[t]}),title:e.curCollapseFolded[t]?f("e4cefe7df36e92da1d7e875b92655507"):f("7ae451de83aa6f5f140e941904377391")},c.createElement(a.JO,{icon:"right-arrow-bold"}))),c.createElement("div",{key:"".concat(t,"-content"),className:v()("ae-RendererList-group collapse-content",{"is-folded":!!e.curCollapseFolded[t]})},o.map((function(t){var o="".concat(r,"_").concat(t.id),i=We(t);return c.createElement("div",{key:o,className:"ae-RendererList-item",draggable:!0,"data-id":o,"data-dnd-type":"subrenderer","data-dnd-id":t.id,"data-dnd-data":JSON.stringify(t.scaffold||{type:t.type}),onDragStart:function(n){return e.handleDragStart(n,t.name)}},c.createElement("div",{className:"icon-box","data-dnd-id":t.id,title:"点击添加「".concat(t.name,"」"),onClick:e.handleClick},i&&c.createElement(a.JO,{icon:t.pluginIcon}),!i&&c.createElement("i",{className:v()("fa-fw",t.icon||"fa fa-circle-thin")})),c.createElement("div",{className:"ae-RendererInfo","data-dnd-id":t.id,onClick:e.handleClick},t.name),c.createElement(a.pf,{tooltipClassName:"ae-RendererThumb",trigger:"hover",rootClose:!0,placement:"right",tooltip:{offset:[10,0],children:function(){return c.createElement("div",null,c.createElement("div",{className:"ae-Renderer-title"},t.name),t.description||t.docLink?c.createElement("div",{className:"ae-Renderer-info"},c.createElement(a.Vt,{html:t.description?t.description:""}),t.docLink&&c.createElement("a",{target:"_blank",href:n.amisDocHost+t.docLink},"详情")):null,c.createElement("div",{className:"ae-Renderer-preview"},e.renderThumb(t.previewSchema)))}}},c.createElement("div",{className:"ae-RendererIcon"},c.createElement(a.JO,{icon:"editor-help",className:"icon"}))))})))):null})):c.createElement("span",null,"没有找到可用组件,您可以换个关键字继续查找。")))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleRegionFilterClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object,String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragStart",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String,Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"changeCollapseFoldStatus",null),(0,s.gn)([R.Pi],t)}(c.Component),Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.handleSelect=function(e){e&&this.props.store.changeRenderersTabsKey(e)},t.prototype.render=function(){var e=this.props,t=e.store,n=e.manager,r=t.renderersTabsKey||"base-renderers",o=t.theme,i=t.customRenderersByOrder||[],s=t.groupedSubRenderers||{},l=t.groupedCustomRenderers||{};return c.createElement("div",{className:"ae-RendererPanel"},c.createElement("div",{className:"panel-header"},"组件"),c.createElement("div",{className:"ae-RendererPanel-content"},t.showCustomRenderersPanel&&i.length>0&&c.createElement(a.mQ,{theme:o,tabsMode:"line",className:"ae-RendererList-tabs",linksClassName:"ae-RendererList-tabs-header",contentClassName:"ae-RendererList-tabs-content",activeKey:r,onSelect:this.handleSelect},c.createElement(a.OK,{key:"base-renderers",eventKey:"base-renderers",title:f("5cb297585d4c81bb8fdbd31210a30d6f"),className:"ae-RendererList-tabs-panel base-renderers",mountOnEnter:!0,unmountOnExit:!1},c.createElement(zr,{groupedRenderers:s,store:t,manager:n,searchRendererType:"renderer"})),c.createElement(a.OK,{key:"custom-renderers",eventKey:"custom-renderers",title:f("6fce1c9aa3654ae2f0eedcc068a7e189"),className:"ae-RendererList-tabs-panel custom-renderers",mountOnEnter:!0,unmountOnExit:!1},c.createElement(zr,{groupedRenderers:l,store:t,manager:n,searchRendererType:"custom-renderer"}))),(!t.showCustomRenderersPanel||Object.keys(l).length<1)&&c.createElement(zr,{className:"only-base-component",groupedRenderers:s,store:t,manager:n,searchRendererType:"renderer"})))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleSelect",null),(0,s.gn)([R.Pi],t)}(c.Component),Lr=P.V5.model("EditorRoot",{isMobile:!1,isSubEditor:!1,amisDocHost:P.V5.optional(P.V5.string,"https://baidu.gitee.io"),root:P.V5.optional(st,{id:"root",label:"Root"}),theme:"cxd",hoverId:"",hoverRegion:"",activeId:"",activeRegion:"",mouseMoveRegion:"",selections:P.V5.optional(P.V5.frozen(),[]),contextId:"",dragMode:"move",dragId:"",dragType:"",dragSchema:P.V5.frozen(),dropId:"",dropRegion:"",planDropId:"",planDropRegion:"",insertId:"",insertRegion:"",insertRenderers:P.V5.optional(P.V5.frozen(),[]),insertRenderersKeywords:"",insertTag:f("a8b0c20416853bda54120bf19477ad11"),insertSelected:"",insertMode:"insert",insertOrigId:"",insertBeforeId:"",showInsertRenderer:!1,schema:P.V5.frozen(),versionId:0,schemaHistory:P.V5.optional(P.V5.array(P.V5.frozen()),[]),toolbars:P.V5.optional(P.V5.frozen(),[]),panels:P.V5.optional(P.V5.frozen(),[]),showCustomRenderersPanel:!1,renderersTabsKey:"base-renderers",subRenderers:P.V5.optional(P.V5.frozen(),[]),subRenderersKeywords:"",subRenderersTag:"",subRendererRegion:"",customRenderersKeywords:"",customRenderersTag:"",panelKey:"",leftPanelKey:"",leftPanelOpenStatus:!0,jsonSchemaUri:"",scaffoldForm:P.V5.maybe(P.V5.frozen()),scaffoldFormBuzy:!1,scaffoldError:"",popOverForm:P.V5.maybe(P.V5.frozen()),subEditorContext:P.V5.maybe(P.V5.frozen()),superEditorData:P.V5.maybe(P.V5.frozen()),calculateStarted:!1,targetNames:P.V5.optional(P.V5.array(P.V5.frozen()),[]),ctx:P.V5.frozen(),i18nEnabled:P.V5.optional(P.V5.boolean,!1),appLocale:P.V5.optional(P.V5.string,"zh-CN"),appCorpusData:P.V5.optional(P.V5.frozen(),{}),appLocaleState:P.V5.optional(P.V5.number,0)}).views((function(e){return{get filteredSchema(){var t,n,r;return Me(null!==(r=null===(n=(t=(0,P.dU)(e)).schemaFilter)||void 0===n?void 0:n.call(t,e.schema))&&void 0!==r?r:e.schema)},get filteredSchemaForPreview(){var t,n,r,o=we(e.schema);return null!==(r=null===(n=(t=(0,P.dU)(e)).schemaFilter)||void 0===n?void 0:n.call(t,o))&&void 0!==r?r:o},isRootSchema:function(e){var t=this.getSchema();return!(!t||t.$$id!==e)},getRootId:function(){var e=this.getSchema();return null==e?void 0:e.$$id},isHoved:function(t){return t&&e.hoverId===t},isActive:function(t){return t&&!this.dragging&&!e.insertOrigId&&e.insertBeforeId!==t&&e.activeId===t},isContextOn:function(t){return t&&e.contextId===t},get activeContainerId(){var t;if(!e.activeId)return"";for(var n=this.getNodeById(e.activeId);n;){if(n.childRegions.length||(null===(t=n.info)||void 0===t?void 0:t.regions))return n.id;n=n.host}return""},isRegionHighlighted:function(t,n){return!e.insertOrigId&&t===e.hoverId&&n===e.hoverRegion||t===e.activeId&&e.activeRegion===n||t===e.dropId&&e.dropRegion===n||!e.insertOrigId&&t===e.insertId&&e.insertRegion===n},isRegionHighlightHover:function(t,n){return t===e.hoverId&&n===e.mouseMoveRegion},isRegionActive:function(t,n){return this.isActive(t)||t===e.dropId||this.isRegionHighlighted(t,n)||this.isRegionHighlightHover(t,n)},isRegionDragEnter:function(t,n){return this.isRegionActive(t,n)&&n===e.dropRegion},get highlightNodes(){var t=this,n=[];!e.hoverId||e.dragId||e.contextId||e.activeId===e.hoverId&&!e.hoverRegion||e.selections.includes(e.hoverId)||n.push(e.hoverId),e.contextId&&n.push(e.contextId),!e.activeId&&!e.selections.length||e.dragId&&!this.draggableContainer(e.dragId)||e.insertOrigId||e.insertId||e.hoverId&&e.hoverRegion||(e.activeId?n.push(e.activeId):n.push.apply(n,e.selections));var r=this.parentIsFreeContainer(e.activeId);return r&&n.push(r),"insert"===e.insertMode&&e.insertId&&n.push(e.insertId),e.insertOrigId&&n.push(e.insertOrigId),e.dropId&&n.push(e.dropId),e.insertBeforeId&&n.push(e.insertBeforeId),n.filter((function(e,t,n){return e&&t===n.indexOf(e)})).map((function(e){return t.getNodeById(e)})).filter((function(e){return e}))},getNodeById:function(t,n){for(var r=e.root.children.concat();r.length;){var o=r.shift();if(o.id===t&&(!n||o.region===n||o.type===n))return o;o.children.length&&r.push.apply(r,o.children)}},get activeNodeInfo(){var t;return null===(t=this.getNodeById(e.activeId))||void 0===t?void 0:t.info},getSchema:function(t,n){return t?Oe(e.schema,t,n):e.schema},getSchemaParentById:function(t,n){return void 0===n&&(n=!1),xe(e.schema,t,n)},getSchemaPath:function(t){var n=Se(e.schema,t);return Array.isArray(n)?n.join("/"):""},getSimpleSchema:function(t){var n,r,o,i=we(t);return null!==(o=null===(r=(n=(0,P.dU)(e)).schemaFilter)||void 0===r?void 0:r.call(n,i))&&void 0!==o?o:i},getPanelKey:function(){var t,n=e.panelKey;if("none"===n)return n;var r=this.getPanels();return T()(r,(function(e){return n&&e.key===n}))?n:(null===(t=r[0])||void 0===t?void 0:t.key)||"none"},getLeftPanelKey:function(){var t=e.leftPanelKey;if(this.dragging)return"outline";if("none"===t)return t;var n=this.getLeftPanels();return T()(n,(function(e){return t&&e.key===t}))?t:"renderers"},get leftPanels(){return e.panels.filter((function(e){return"left"===e.position}))},get rightPanels(){return e.panels.filter((function(e){return"left"!==e.position&&"contextmenu"!==e.key}))},get contextMenuPanel(){return e.panels.find((function(e){return"contextmenu"===e.key}))},getPanels:function(){return[].concat(this.rightPanels||[]).sort((function(e,t){return e.order-t.order}))},getLeftPanels:function(){var t=[].concat(this.leftPanels||[]);return e.insertId&&e.insertRegion&&t.push({key:"insert",icon:"fa fa-bolt",position:"left",title:"replace"===e.insertMode?f("1dd554cdfc1ddf7dce13453805523c16"):f("9bdb07e72d3a9a6084201a7398523f5a"),component:Pn,order:9999}),t.push({key:"insertRenderer",icon:"fa fa-bolt",position:"left",title:f("a82240ce09faf0b972a8aa5c9e93d209"),component:Br,order:9999}),t.sort((function(e,t){return e.order-t.order}))},get sortedToolbars(){return e.toolbars.filter((function(e){return"secondary"!==e.level&&"special"!==e.level})).sort((function(e,t){return e.order-t.order}))},get sortedSecondaryToolbars(){return e.toolbars.filter((function(e){return"secondary"===e.level})).sort((function(e,t){return e.order-t.order}))},get sortedSpecialToolbars(){return e.toolbars.filter((function(e){return"special"===e.level})).sort((function(e,t){return e.order-t.order}))},get value(){if(e.activeId)return this.getValueOf(e.activeId)},getValueOf:function(t){return tt(we(Oe(e.schema,t),!1))},get valueWithoutHiddenProps(){if(e.activeId)return we(Oe(e.schema,e.activeId),(0,P.dU)(e).isHiddenProps||function(e,t){return"$$"===e.substring(0,2)&&"$$comments"!==e&&"$$commonSchema"!==e||"function"==typeof t||"__"===e.substring(0,2)||"themeCss"===e||"editorPath"===e||"editorState"===e})},get outline(){return e.root.children},get bcn(){var t=[];return e.activeId&&(0,i.hEs)(e.root.children,(function(n,r,o,i){return n.id===e.activeId&&(t=i.concat(n),!0)})),t.filter((function(e){return!e.isSecondFactor}))},get activePath(){return this.getNodePathById(e.activeId)},getNodePathById:function(t){var n=[];if(!t)return n;var r=function(e,o){return void 0===o&&(o=[]),e.every((function(e){return e.id===t?(n=o.concat(e),!1):!e.children||!e.children.length||r(e.children,o.concat(e))}))};return r(e.root.children),n},get dragging(){return!(this.draggableContainer(e.dragId)||!e.dragId&&!e.dropId)},get needPatch(){var t=function(e){return e.some((function(e){return!e.patched&&!e.isRegion||!!e.children.length&&t(e.children)}))};return t(e.root.children)},get schemaRaw(){return we(e.schema)},get subRenderersByOrder(){return e.subRenderers.filter((function(t){return!(!t.disabledRendererPlugin&&e.showCustomRenderersPanel)||t.isBaseComponent})).sort((function(e,t){return e.order-t.order}))},get customRenderersByOrder(){return e.subRenderers.filter((function(e){return!e.disabledRendererPlugin&&!e.isBaseComponent})).sort((function(e,t){return e.order-t.order}))},groupedRenderersByKeyword:function(e,t){var n=e,r={},o=t?new RegExp(Ye(t),"i"):null;return n.forEach((function(e){t&&!["name","description","scaffold.type","searchKeywords"].some((function(t){return(0,i.H_J)(t,e)&&o&&o.test((0,i.H_J)(t,e))}))||(Array.isArray(e.tags)?e.tags.concat():e.tags?[e.tags]:[f("0d98c74797e49d00bcc4c17c9d557a2b")]).forEach((function(t){r[t]=r[t]||[],r[t].push(e)}))})),r},groupedSubRenderersByKeyword:function(e,t){var n=e||this.subRenderersByOrder;return this.groupedRenderersByKeyword(n,t)},get groupedSubRenderers(){if(e.subRenderersTag){var t={},n=this.groupedSubRenderersByKeyword()[e.subRenderersTag];return n&&(t[e.subRenderersTag]=n),t}return this.groupedSubRenderersByKeyword(this.subRenderersByOrder,e.subRenderersKeywords)},groupedCustomRenderersByKeyword:function(e,t){var n=e||this.customRenderersByOrder;return this.groupedRenderersByKeyword(n,t)},get groupedCustomRenderers(){if(e.customRenderersTag){var t={},n=this.groupedCustomRenderersByKeyword()[e.customRenderersTag];return n&&(t[e.customRenderersTag]=n),t}return this.groupedCustomRenderersByKeyword(this.customRenderersByOrder,e.customRenderersKeywords)},getSubRendererById:function(t){return T()(e.subRenderers||[],(function(e){return e.id===t}))},get groupedInsertRenderers(){var t={"全部":[]},n=e.insertRenderersKeywords,r=new RegExp(Ye(n),"i");return e.insertRenderers.concat().sort((function(e,t){return e.order-t.order})).forEach((function(e){n&&!["name","description","scaffold.type"].some((function(t){return(0,i.H_J)(t,e)&&r.test((0,i.H_J)(t,e))}))||((Array.isArray(e.tags)?e.tags.concat():e.tags?[e.tags]:[f("0d98c74797e49d00bcc4c17c9d557a2b")]).forEach((function(n){t[n]=t[n]||[],t[n].push(e)})),t[f("a8b0c20416853bda54120bf19477ad11")].push(e))})),t},get selectedInsertRendererInfo(){return T()(e.insertRenderers,(function(t){return t.id===e.insertSelected}))},get subEditorSlotPath(){var t,n=null===(t=e.subEditorContext)||void 0===t?void 0:t.slot;if(!n)return"";var r=[],o=function(e,t){return void 0===t&&(t=[]),!(!Array.isArray(e)||!e.some((function(e,n){return o(e,t.concat("".concat(n)))})))||(C()(e)?Object.keys(e).some((function(n){return o(e[n],t.concat(n))})):"$$"===e&&(r=t.concat(),!0))};return o(n),r.length?r.join("/"):""},get subEditorValue(){if(e.subEditorContext)return e.subEditorContext.slot?(0,s.pi)((0,s.pi)({},(0,i.Xcl)(e.subEditorContext.slot,(function(t){return"$$"===t?e.subEditorContext.value:t}))),{isSlot:!0}):e.subEditorContext.value},get canUndo(){return 0!==e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}))},get canRedo(){return e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}))"):"<列>";a="".concat(d).concat(null!==(n=null!=c?c:l)&&void 0!==n?n:s)}return a=null!=a?a:s,{id:t.id,label:a,value:null!==(r=null==i?void 0:i.id)&&void 0!==r?r:t.id,type:null!==(o=null==i?void 0:i.type)&&void 0!==o?o:t.type,schema:i,disabled:!!t.region,visible:!t.region||!!(null==t?void 0:t.children.length),children:null==t?void 0:t.children}}),1,!0)}}})).actions((function(e){(0,P.dU)(e);var t=0,n=null,r=void 0,o=document,c=void 0;return{setLayer:function(e){r=e},getLayer:function(){return r},setDoc:function(e){o=e},getDoc:function(){return o},setIframe:function(e){c=e},getIframe:function(){return c},setIsMobile:function(t){e.isMobile=!!t},setCtx:function(t){e.ctx=t},setTheme:function(t){e.theme=t},setIsSubEditor:function(t){e.isSubEditor=t},setShowCustomRenderersPanel:function(t){e.showCustomRenderersPanel=t},setSchema:function(t){var n,r=ye(t||{});if(e.schema){var o=Le(e.schema,r,(function(e,t){return"$$id"===t})),i=$e(e.schema,o);if("A"===(null===(n=null==o?void 0:o[0])||void 0===n?void 0:n.kind)&&("D"===o[0].item.kind||"N"===o[0].item.kind)&&Array.isArray(o[0].path)){var a=o[0].path,c=a.pop(),l=a.reduce((function(e,t){return e[t]}),i);l[c]=l[c].map((function(e){return(0,s.pi)((0,s.pi)({},e),{$$id:ae()})}))}e.schema=i}else e.schema=r;this.resetHistory(),this.updateTargetName()},insertSchema:function(t){var n,r=t.context.id,o=t.context.region,i=Oe(e.schema,r);if(i){var a=ye(t.context.data);(null==i?void 0:i.isFreeContainer)&&(a.style={position:"absolute",inset:"10px auto auto 10px"},Ge(a.type)&&(a.style.width="300px"));var s=Array.isArray(i[o])?i[o].concat():i[o]?[i[o]]:[];if(t.context.beforeId){var c=z()(s,(function(e){return e.$$id===t.context.beforeId}));~c?s.splice(c,0,a):s.push(a)}else s.push(a);return this.traceableSetSchema(Ie(e.schema,r,((n={})[o]=s,n))),t.context.data=a,a}},moveSchema:function(t){var n,r=t.context,o=e.schema;if(r.sourceId!==r.beforeId){var i=Oe(o,r.sourceId);o=Ne(o,r.sourceId,void 0,!0);var a=r.region,s=Oe(o,r.id)[a];if(s=Array.isArray(s)?s.concat():s?[s]:[],r.beforeId){var c=z()(s,(function(e){return e.$$id===r.beforeId}));if(!~c)throw new Error(f("eadc8c8d4a8776893672330598babca0"));s.splice(c,0,i)}else s.push(i);this.traceableSetSchema(Ie(o,r.id,((n={})[a]=s,n)))}},setActiveId:function(t,n,r){void 0===n&&(n=""),void 0===r&&(r=[]);var o=t?e.getNodeById(t):void 0;!1===(null==o?void 0:o.clickable)||t&&!o||(e.activeId=t,e.activeRegion=n,e.selections=r)},setSelections:function(t){e.activeId="",e.activeRegion="",e.selections=t?t.concat():[]},clearSelection:function(){e.selections=[]},setHoverId:function(t,n){var r=t?e.getNodeById(t):void 0;!1!==(null==r?void 0:r.clickable)&&(e.hoverId=t,e.hoverRegion=n||"")},setMouseMoveRegion:function(t){e.mouseMoveRegion=t},setInsertId:function(t){e.insertId=t},setContextId:function(t){e.contextId=t},setDragId:function(t,n,r,o){void 0===n&&(n="move"),void 0===r&&(r="schema"),e.dragId=t,e.dragMode=n,e.dragType=r,e.dragSchema=o||(t?e.getSchema(t):null)},setDropId:function(t,n){void 0===n&&(n=""),e.dropId=t,e.dropRegion=n,e.planDropId="",e.planDropRegion=""},setPlanDropId:function(t,n){e.planDropId=t,e.planDropRegion=n},setActiveToolbars:function(t){e.toolbars=t},setPanels:function(t){e.panels=t},setSubRenderers:function(t){e.subRenderers=t},changeSubRenderersKeywords:function(t){e.subRenderersKeywords=t,e.subRenderersTag=""},changeSubRenderersTag:function(t){e.subRenderersKeywords="",e.subRenderersTag=t},resetSubRenderersKeywords:function(){e.subRenderersKeywords="",e.subRenderersTag=""},changeCustomRenderersKeywords:function(t){e.customRenderersKeywords=t,e.customRenderersTag=""},changeCustomRenderersTag:function(t){e.customRenderersKeywords="",e.customRenderersTag=t},resetCustomRenderersKeywords:function(){e.customRenderersKeywords="",e.customRenderersTag=""},changeSubRendererRegion:function(t){e.subRendererRegion=t},changePanelKey:function(t){t!==e.getPanelKey()&&(e.panelKey=t)},changeLeftPanelKey:function(t){"insert"!==t&&"insert"!==e.panelKey&&t!==e.getLeftPanelKey()&&(e.leftPanelKey=t)},changeRenderersTabsKey:function(t){t!==e.renderersTabsKey&&(e.renderersTabsKey=t)},changeLeftPanelOpenStatus:function(t){t!==e.leftPanelOpenStatus&&(e.leftPanelOpenStatus=t)},showRendererPanel:function(t,n){"renderers"!==e.getLeftPanelKey()?e.leftPanelKey="renderers":t!==e.subRenderersTag&&t||a.Am.info(n||f("f3c057f37fb9a4e7dd44b04919c12578")),e.renderersTabsKey="base-renderers",t&&this.changeSubRenderersTag(t),this.changeLeftPanelOpenStatus(!0)},changeValue:function(t,n){e.activeId&&this.changeValueById(e.activeId,t,n)},changeValueById:function(t,n,r,o,i){var a=Oe(e.schema,t);if(a)if(r){var s=$e(a,r);this.traceableSetSchema(Ie(e.schema,t,Ee(ye(s)),!0),i)}else this.traceableSetSchema(Ie(e.schema,t,Ee(ye(n)),o),i)},updateContainerStyleByDrag:function(t,n,r){var o=t||e.dragId;if(o){var i=e.getSchema(o),a=(null==i?void 0:i.style)||{};if(o&&"fixed"===(null==a?void 0:a.position)||"absolute"===(null==a?void 0:a.position)){var c=(a.inset||"auto").split(" "),l={top:c[0]||"auto",right:c[1]||"auto",bottom:c[2]||c[0]||"auto",left:c[3]||c[1]||"auto"},d="".concat("auto"!==l.top?qe(l.top,r):"auto"," ").concat("auto"!==l.right?qe(l.right,-n):"auto"," ").concat("auto"!==l.bottom?qe(l.bottom,-r):"auto"," ").concat("auto"!==l.left?qe(l.left,n):"auto");this.changeValueById(o,(0,s.pi)((0,s.pi)({},i),{style:(0,s.pi)((0,s.pi)({},a),{inset:d})})),this.calculateHighlightBox([o])}}},moveUp:function(t){t&&this.traceableSetSchema(Re(e.schema,t))},moveDown:function(t){t&&this.traceableSetSchema(Pe(e.schema,t))},del:function(t){var n,r;if(t===e.activeId){var o=null===(n=e.getNodeById(t))||void 0===n?void 0:n.host;this.setActiveId(o?o.id:"")}else if(e.activeId){var i=Oe(e.schema,t);Oe(i,e.activeId)&&(o=null===(r=e.getNodeById(t))||void 0===r?void 0:r.host,this.setActiveId(o?o.id:""))}this.traceableSetSchema(Ne(e.schema,t))},delMulti:function(t){var n=this;(Array.isArray(t)?t:[t]).forEach((function(t){var r,o;if(t===e.activeId){var i=null===(r=e.getNodeById(t))||void 0===r?void 0:r.host;n.setActiveId(i?i.id:"")}else if(e.activeId){var a=Oe(e.schema,t);Oe(a,e.activeId)&&(i=null===(o=e.getNodeById(t))||void 0===o?void 0:o.host,n.setActiveId(i?i.id:""))}})),this.traceableSetSchema(t.reduce((function(e,t){return Ne(e,t)}),e.schema))},duplicate:function(t){this.traceableSetSchema((Array.isArray(t)?t:[t]).reduce((function(e,t){return Ae(e,t)}),e.schema))},emptyRegion:function(t,n){var r;this.traceableSetSchema(Ie(e.schema,t,((r={})[n]=[],r)))},replaceChild:function(t,n){this.traceableSetSchema(Ie(e.schema,t,ye(n),!0))},setInsertRegion:function(t,n,r,o,i,a){void 0===n&&(n=""),void 0===r&&(r=f("a8b0c20416853bda54120bf19477ad11")),void 0===o&&(o="insert"),void 0===i&&(i=""),e.insertId=n,e.insertRegion=t,e.insertTag=r,e.insertMode=o,e.insertOrigId=i,e.insertBeforeId=a||""},closeInsertPanel:function(){e.insertOrigId="",e.insertId="",e.insertRegion="",e.insertSelected="",e.insertRenderersKeywords="",e.insertBeforeId=""},showInsertRendererPanel:function(){e.showInsertRenderer=!0},closeInsertRendererPanel:function(){e.showInsertRenderer=!1},setInsertRenderers:function(t){e.insertRenderers=t},changeInsertRenderersKeywords:function(t){e.insertRenderersKeywords=t},resetInsertRenderersKeywords:function(){e.insertRenderersKeywords=""},setInsertTag:function(t){e.insertTag=t},setInsertSelected:function(t){e.insertSelected=t},setJSONSchemaUri:function(t){e.jsonSchemaUri=t},openSubEditor:function(t){e.activeId&&(e.subEditorContext=(0,s.pi)((0,s.pi)({},t),{data:(0,i.ktx)(t.data,{__curCmptTreeWrap:{label:t.title,disabled:!0},__superCmptTreeSource:e.getComponentTreeSource()})}))},confirmSubEditor:function(t){var n,r=(0,s.CR)(t,1)[0],o=e.subEditorContext,a=o.onChange,c=o.slot,l=r.schema,d=(null===(n=r.__pristine)||void 0===n?void 0:n.schema)||l;if(c){var u=e.subEditorSlotPath.replace(/(?:\/)/g,".");l=(0,i.E04)(l,u),d=(0,i.E04)(d,u),Array.isArray(l)&&1===l.length&&!Array.isArray(d)&&(l=l[0])}a(l,a.length>1?Le(d,l):void 0),e.subEditorContext=void 0},closeSubEditor:function(){e.subEditorContext=void 0},subEditorOnChange:function(){n&&(e.subEditorContext=(0,s.pi)((0,s.pi)({},e.subEditorContext),{canUndo:n.canUndo(),canRedo:n.canRedo()}))},undoSubEditor:function(){n&&n.undo()},redoSubEditor:function(){n&&n.redo()},subEditorRef:function(e){n=e},openScaffoldForm:function(t){e.scaffoldForm=t},closeScaffoldForm:function(){e.scaffoldForm=void 0},setScaffoldBuzy:function(t){e.scaffoldFormBuzy=!!t},setScaffoldError:function(t){void 0===t&&(t=""),e.scaffoldError=t},openPopOverForm:function(t){e.popOverForm=t},closePopOverForm:function(){e.popOverForm=void 0},calculateHighlightBox:function(t){e.calculateStarted=!0,t.forEach((function(t){var n=e.getNodeById(t);null==n||n.calculateHighlightBox(e)}))},resetHighlightBox:function(t){t.forEach((function(t){var n=e.getNodeById(t);null==n||n.resetHighlightBox(e)}))},updateTargetName:function(){var t=[];He(e.schema,(function(e,n,r){return"name"===n&&e&&r&&("crud"===r.type||"form"===r.type||"page"===r.type||"service"===r.type||"chart"===r.type||"wizard"===r.type)&&t.push({type:r.type,name:e,editorId:r.$$id}),e})),e.targetNames=(0,P.pj)(t)},traceableSetSchema:function(n,r){var o=e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}));~o&&e.schemaHistory.splice(o+1,e.schemaHistory.length-o-1),r&&e.schemaHistory.pop(),e.schemaHistory.push({versionId:e.versionId=t++,schema:n}),e.schema=n,this.updateTargetName()},undo:function(){var t=e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}));if(t>0){var n=e.schemaHistory[t-1];e.versionId=n.versionId,e.schema=n.schema,this.updateTargetName(),this.autoSelectRoot()}},redo:function(){var t=e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}));if(t-o})}},t.prototype.handleScrollToLeft=function(){var e=this.getCurBreadcrumb();if(e){var t=this.toNumber(this.getScrollLeft());t>=-50&&t<0?(e.style.left="0",this.refreshHandleScroll()):t<-50&&(e.style.left="".concat(t+50,"px"),this.refreshHandleScroll())}},t.prototype.handleScrollToRight=function(){var e=this.getCurBreadcrumb(),t=this.getBreadcrumbContainer();if(e&&t){var n=this.toNumber(this.getScrollLeft()),r=e.offsetWidth-t.offsetWidth;e.style.left=n-50>-r?"".concat(n-50,"px"):"-".concat(r,"px"),this.refreshHandleScroll()}},t.prototype.handleClick=function(e){var t,n=e.currentTarget,r=n.getAttribute("data-node-id"),o=n.getAttribute("data-node-region"),i=this.props.store;this.props.manager;var a=i.getNodeById(r);!1!==(null===(t=null==a?void 0:a.info)||void 0===t?void 0:t.editable)&&(o?i.setActiveId(r,o):i.setActiveId(r))},t.prototype.handleMouseEnter=function(e){var t=e.currentTarget,n=t.getAttribute("data-node-id"),r=t.getAttribute("data-node-region");this.props.store.setHoverId(n,r)},t.prototype.render=function(){var e=this,t=this.props.store,n=this.state,r=n.showLeftScrollBtn,o=n.showRightScrollBtn,i=t.bcn;return c.createElement("div",{className:"ae-Breadcrumb",ref:this.breadcrumbRef},r&&c.createElement("div",{className:"ae-Breadcrumb-scrollLeft-btn",onClick:this.handleScrollToLeft},c.createElement(a.JO,{icon:"editor-double-arrow",className:"icon"})),c.createElement("div",{className:"ae-Breadcrumb-content",ref:this.bcnContentRef},i.length?c.createElement("ul",null,i.map((function(t,n){var r,o=null===(r=t.parent)||void 0===r?void 0:r.uniqueChildren;return c.createElement("li",{key:n},c.createElement("span",{"data-node-id":t.id,"data-node-region":t.region,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter},t.label),(null==o?void 0:o.length)>1?c.createElement("ul",{className:"hoverShowScrollBar"},o.map((function(n){return c.createElement("li",{key:"".concat(n.id,"-").concat(n.region)},c.createElement("span",{"data-node-id":n.id,"data-node-region":n.region,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,className:n.id===t.id&&n.region===t.region?"is-active":""},n.label))}))):null)}))):null),o&&c.createElement("div",{className:"ae-Breadcrumb-scrollRight-btn",onClick:this.handleScrollToRight},c.createElement(a.JO,{icon:"editor-double-arrow",className:"icon"})))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Boolean]),(0,s.w6)("design:returntype",void 0)],t.prototype,"refreshHandleScroll",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getCurBreadcrumb",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getBreadcrumbContainer",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",String)],t.prototype,"getScrollLeft",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",Number)],t.prototype,"toNumber",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Boolean]),(0,s.w6)("design:returntype",void 0)],t.prototype,"HandleScroll",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleScrollToLeft",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleScrollToRight",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),Vr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={step:0},n}return(0,s.ZT)(t,e),t.prototype.handleConfirm=function(e){var t,n,r,o=(0,s.CR)(e,1)[0],i=this.props.store;if(o=(0,s.pi)((0,s.pi)({},null===(t=i.scaffoldForm)||void 0===t?void 0:t.value),o),null===(n=i.scaffoldForm)||void 0===n?void 0:n.pipeOut){var a=i.scaffoldForm.pipeOut(o);o=(0,s.pi)({},a)}null===(r=i.scaffoldForm)||void 0===r||r.callback(o),i.closeScaffoldForm(),this.setState({step:0})},t.prototype.buildSchema=function(){var e,t,n,r=this.props.store.scaffoldForm,o=null!==(t=r.controls)&&void 0!==t?t:r.body;return r.stepsBody&&(o=(0,s.ev)([{type:"steps",name:"__steps",className:"ae-Steps",steps:o.map((function(e,t){return{title:e.title,value:t,iconClassName:"ae-Steps-Icon"}}))}],(0,s.CR)(o.map((function(e,t){return{type:"container",visibleOn:"__step === ".concat(t),body:e.body}}))),!1)),n=Ue(r.mode)?r.mode:{mode:r.mode||"normal"},(0,s.pi)((0,s.pi)({type:"form",wrapWithPanel:!1,initApi:r.initApi,api:r.api},n),((e={wrapperComponent:"div",data:{__step:0}})[r.controls?"controls":"body"]=o,e))},t.prototype.scopeRef=function(e){this.amisScope=e},t.prototype.goToNextStep=function(){var e,t=null===(e=this.amisScope)||void 0===e?void 0:e.getComponents()[0].props.store,n=this.state.step+1;t.setValueByName("__step",n),this.setState({step:n})},t.prototype.goToPrevStep=function(){var e,t=null===(e=this.amisScope)||void 0===e?void 0:e.getComponents()[0].props.store,n=this.state.step-1;t.setValueByName("__step",n),this.setState({step:n})},t.prototype.handleConfirmClick=function(){var e;return(0,s.mG)(this,void 0,void 0,(function(){var t,n,r,o;return(0,s.Jh)(this,(function(i){switch(i.label){case 0:if(!(t=null===(e=this.amisScope)||void 0===e?void 0:e.getComponents()[0]))return[2];n=this.props.store,i.label=1;case 1:return i.trys.push([1,3,4,5]),n.setScaffoldBuzy(!0),[4,t.doAction({type:"submit"},t.props.data,!0)];case 2:return r=i.sent(),this.handleConfirm([r]),[3,5];case 3:return o=i.sent(),console.log(o.stack),n.setScaffoldError(o.message),[3,5];case 4:return n.setScaffoldBuzy(!1),[7];case 5:return[2]}}))}))},t.prototype.handleCancelClick=function(){this.props.store.closeScaffoldForm(),this.setState({step:0})},t.prototype.render=function(){var e=this.props,t=e.store,n=e.theme,r=e.manager,o=t.scaffoldForm,l=(0,i.ghV)(n||"cxd").classnames,d=!!(null==o?void 0:o.stepsBody),u=d&&this.state.step===o.body.length-1,p=d&&0===this.state.step;return c.createElement(a.u_,{size:(null==o?void 0:o.size)||"md",contentClassName:null==o?void 0:o.className,show:!!o,onHide:t.closeScaffoldForm,closeOnEsc:!t.scaffoldFormBuzy},c.createElement("div",{className:l("Modal-header")},t.scaffoldFormBuzy?null:c.createElement("a",{"data-position":"left",onClick:t.closeScaffoldForm,className:l("Modal-close")},c.createElement(a.JO,{icon:"close",className:"icon"})),c.createElement("div",{className:l("Modal-title")},null==o?void 0:o.title)),c.createElement("div",{className:l("Modal-body")},o?(0,i.sYA)(this.buildSchema(),{data:(0,i.nW9)(t.ctx,(0,s.pi)((0,s.pi)({},(null==o?void 0:o.value)||{}),{__step:0})),onValidate:o.validate,scopeRef:this.scopeRef},(0,s.pi)((0,s.pi)({},r.env),{session:"scaffold-dialog",theme:n})):c.createElement("p",null,"Loading...")),c.createElement("div",{className:l("Modal-footer")},t.scaffoldFormBuzy||t.scaffoldError?c.createElement("div",{className:l("Dialog-info"),key:"info"},c.createElement(a.$j,{size:"sm",key:"info",show:t.scaffoldFormBuzy}),t.scaffoldError?c.createElement("span",{className:l("Dialog-error")},t.scaffoldError):null):null,d&&!p&&c.createElement(a.zx,{level:"primary",onClick:this.goToPrevStep},"上一步"),d&&!u&&c.createElement(a.zx,{level:"primary",onClick:this.goToNextStep},"下一步"),(!d||u)&&c.createElement(a.zx,{level:"primary",onClick:this.handleConfirmClick,disabled:t.scaffoldFormBuzy},"确认"),c.createElement(a.zx,{onClick:this.handleCancelClick},"取消")))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleConfirm",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"scopeRef",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"goToNextStep",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"goToPrevStep",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",Promise)],t.prototype,"handleConfirmClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleCancelClick",null),(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),Zr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.overlay=c.createRef(),t}return(0,s.ZT)(t,e),t.prototype.buildSchema=function(){var e=this,t=this.props.store.popOverForm;return{type:"form",wrapWithPanel:!1,mode:"normal",wrapperComponent:"div",body:t.body,submitOnChange:!0,autoFocus:!0,onFinished:function(n){var r;null===(r=t.callback)||void 0===r||r.call(t,n,Le(t.value,n)),setTimeout((function(){var t;return null===(t=e.overlay.current)||void 0===t?void 0:t.updatePosition()}),200)}}},t.prototype.render=function(){var e=this.props,t=e.store,n=e.theme,r=e.manager,o=t.popOverForm;return c.createElement(i.aVW,{target:null==o?void 0:o.target,placement:"left-bottom-left-top left-top-left-bottom right-bottom-right-top right-top-right-bottom center",show:!!o,ref:this.overlay},c.createElement(i.v$m,{overlay:!0,className:"ae-Editor-popOverForm",onHide:t.closePopOverForm},o?(0,i.sYA)(this.buildSchema(),{data:(0,i.nW9)(t.ctx,null==o?void 0:o.value)},(0,s.pi)((0,s.pi)({},r.env),{session:"popover-form",theme:n})):c.createElement("p",null,"Loading...")))},(0,s.gn)([R.Pi],t)}(c.Component),Ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.render=function(){var e=this.props.store.contextMenuPanel,t=e&&e.menus?e.menus:[];return t&&t.length>0?c.createElement("div",{className:"context-menu-setting"},c.createElement("div",{className:"setting-header"},"批量操作"),c.createElement("div",{className:"setting-body"},t.map((function(e){return e.label&&c.createElement("div",{key:e.label,className:"setting-item ".concat(e.disabled?"disabled":""),onClick:e.disabled?null:e.onSelect},c.createElement("div",{className:"icon-box"},c.createElement(a.JO,{icon:e.icon,className:"menu-icon"})),c.createElement("div",{className:"setting-info"},e.label))})))):null},(0,s.gn)([R.Pi],t)}(c.Component),Kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.getPopOverContainer=function(){return(0,o.findDOMNode)(this)},t.prototype.render=function(){var e=this.props,t=e.store,n=e.manager,r=e.node,o=e.panelItem,i=e.theme,s=t.activeId;return c.createElement(a.dy,{position:"left",size:"md",theme:i,show:!!o,onHide:t.closeInsertPanel,className:"ae-InsertPanel-drawer"},o&&o.component?c.createElement(o.component,{key:o.key,id:s,info:null==r?void 0:r.info,path:null==r?void 0:r.path,value:t.value,onChange:n.panelChangeValue,store:t,manager:n,popOverContainer:this.getPopOverContainer}):null)},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getPopOverContainer",null),(0,s.gn)([R.Pi],t)}(c.Component),Wr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.getPopOverContainer=function(){return(0,o.findDOMNode)(this)},t.prototype.render=function(){var e=this.props,t=e.store,n=e.manager,r=e.node,o=e.panelItem,i=e.theme,s=t.activeId,l=t.showInsertRenderer;return c.createElement(a.dy,{position:"left",size:"md",theme:i,show:l,onHide:t.closeInsertRendererPanel,className:"ae-InsertRendererPanel-drawer",bodyClassName:"ae-drawer-renderers"},o.title&&c.createElement("div",{className:"ae-drawer-title"},o.title),o&&o.component?c.createElement(o.component,{key:o.key,id:s,info:null==r?void 0:r.info,path:null==r?void 0:r.path,value:t.value,onChange:n.panelChangeValue,store:t,manager:n,popOverContainer:this.getPopOverContainer}):null)},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getPopOverContainer",null),(0,s.gn)([R.Pi],t)}(c.Component),Jr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isFixedStatus:!1},n}return(0,s.ZT)(t,e),t.prototype.handleHidden=function(){var e=this.props.store,t=e.changeLeftPanelOpenStatus,n=e.leftPanelOpenStatus,r=e.changeLeftPanelKey,o=!n;t(o),r(o?"outline":"none")},t.prototype.handleFixed=function(){this.setState({isFixedStatus:!this.state.isFixedStatus})},t.prototype.handleSelect=function(e){var t=this.props.store,n=t.changeLeftPanelOpenStatus,r=t.changeLeftPanelKey;e&&(n(!0),r(e))},t.prototype.getPopOverContainer=function(){return(0,o.findDOMNode)(this)},t.prototype.render=function(){var e=this,t=this.props,n=t.store,r=t.manager,o=t.theme,i=this.state.isFixedStatus,s=n.leftPanelOpenStatus,l=n.getLeftPanels(),d=n.activeId,u=n.getNodeById(d),p=n.getLeftPanelKey(),h=n.insertId&&n.insertRegion&&T()(l,(function(e){return"insert"===e.key})),m=T()(l,(function(e){return"insertRenderer"===e.key}));return c.createElement(c.Fragment,null,l.length>0&&c.createElement("div",{className:v()("editor-left-panel width-draggable",s?"":"hidden-status",i?"fixed-status":"")},c.createElement("div",{className:"editor-panel-btn","editor-tooltip":f(i?"95509c09bdef4bb7842a9b957ab1f971":"426480bb614633c8c3ba8faa0338b72f"),"tooltip-position":"right"},c.createElement(a.JO,{icon:i?"editor-fixed":"editor-no-fixed",className:"panel-btn",onClick:this.handleFixed})),c.createElement(a.mQ,{className:"editorPanel-tabs",linksClassName:"editorPanel-tabs-header",contentClassName:"editorPanel-tabs-content",theme:o,activeKey:p,onSelect:this.handleSelect,tabsMode:"sidebar",sidePosition:"left"},l.map((function(t){return"insert"!==t.key&&"insertRenderer"!==t.key?c.createElement(a.OK,{key:t.key,eventKey:t.key,title:t.title,className:"editorPanel-tabs-pane ae-Editor-".concat(t.key,"Pane"),mountOnEnter:!0,unmountOnExit:!1},function(t){return t.render?t.render({id:d,info:null==u?void 0:u.info,path:null==u?void 0:u.path,node:u,value:n.value,onChange:r.panelChangeValue,store:n,manager:r,popOverContainer:e.getPopOverContainer}):t.component?c.createElement(t.component,{node:u,key:t.key,id:d,info:null==u?void 0:u.info,path:null==u?void 0:u.path,value:n.value,onChange:r.panelChangeValue,store:n,manager:r,popOverContainer:e.getPopOverContainer}):null}(t)):null}))),c.createElement("div",{className:v()("left-panel-arrow",s?"":"hidden-status"),onClick:this.handleHidden})),i&&c.createElement("div",{className:"editor-left-panel-fixed-placeholder"}),c.createElement(Kr,{store:n,manager:r,node:u,panelItem:h,theme:o}),c.createElement(Wr,{store:n,manager:r,node:u,panelItem:m,theme:o}))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleHidden",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleFixed",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleSelect",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getPopOverContainer",null),(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),qr=function(e){function t(t){var n=e.call(this,t)||this;return n.handleResizeMouseDown=n.handleResizeMouseDown.bind(n),n.handleResizeMouseMove=n.handleResizeMouseMove.bind(n),n.handleResizeMouseUp=n.handleResizeMouseUp.bind(n),n}return(0,s.ZT)(t,e),t.prototype.handleResizeMouseDown=function(e){3==e.nativeEvent.which||(this.dragWrap=e.currentTarget.parentElement,document.addEventListener("mousemove",this.handleResizeMouseMove),document.addEventListener("mouseup",this.handleResizeMouseUp),this.startX=e.clientX,this.startWidth=this.dragWrap.offsetWidth)},t.prototype.handleResizeMouseMove=function(e){var t=this.props.isLeftDragIcon,n=e.clientX-this.startX;this.dragWrap.style.cssText+="width: ".concat(Math.max(t?this.startWidth-n:this.startWidth+n,260),"px")},t.prototype.handleResizeMouseUp=function(){document.removeEventListener("mousemove",this.handleResizeMouseMove),document.removeEventListener("mouseup",this.handleResizeMouseUp)},t.prototype.render=function(){var e=this.props,t=e.isLeftDragIcon,n=e.className;return c.createElement("div",{onMouseDown:this.handleResizeMouseDown,className:v()("width-draggable-icon",n,t?"leftBtn":"")})},t}(c.Component),Yr=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isOpenStatus:!0,isFixedStatus:!1},n}return(0,s.ZT)(t,e),t.prototype.handleFixed=function(){this.setState({isFixedStatus:!this.state.isFixedStatus})},t.prototype.handleSelect=function(e){this.props.store.changePanelKey(e)},t.prototype.handleHidden=function(){this.setState({isOpenStatus:!this.state.isOpenStatus})},t.prototype.getPopOverContainer=function(){return(0,o.findDOMNode)(this)},t.prototype.render=function(){var e=this,t=this.props,n=t.store,r=t.manager,o=t.theme,i=this.state,s=i.isOpenStatus,l=i.isFixedStatus,d=n.getPanels(),u=n.activeId,p=n.getNodeById(u),h=n.getPanelKey(),m=function(t){return t.render?t.render({id:u,info:null==p?void 0:p.info,path:null==p?void 0:p.path,node:p,value:n.value,onChange:r.panelChangeValue,store:n,manager:r,popOverContainer:e.getPopOverContainer}):t.component?c.createElement(t.component,{node:p,key:t.key,id:u,info:null==p?void 0:p.info,path:null==p?void 0:p.path,value:n.value,onChange:r.panelChangeValue,store:n,manager:r,popOverContainer:e.getPopOverContainer}):null};return d.length>0?c.createElement("div",{className:v()("editor-right-panel width-draggable",d.length>1?"mul-tabs-panel":"",s?"":"hidden-status",l?"fixed-status":"")},c.createElement("div",{className:"editor-panel-btn","editor-tooltip":f(l?"95509c09bdef4bb7842a9b957ab1f971":"426480bb614633c8c3ba8faa0338b72f"),"tooltip-position":"left"},c.createElement(a.JO,{icon:l?"editor-fixed":"editor-no-fixed",className:"panel-btn",onClick:this.handleFixed})),c.createElement("div",{className:"editorPanel-inner"},1===d.length?m(d[0]):c.createElement(a.mQ,{theme:o,tabsMode:"sidebar",sidePosition:"right",className:"editorPanel-tabs",linksClassName:"editorPanel-tabs-header",contentClassName:"editorPanel-tabs-content",activeKey:h,onSelect:this.handleSelect},d.map((function(e){var t=We(e);return c.createElement(a.OK,{key:e.key,eventKey:e.key,title:c.createElement("span",{className:"editor-tab-icon","editor-tooltip":e.title,"tooltip-position":"left"},t&&c.createElement(a.JO,{icon:e.pluginIcon,className:"pluginIcon"}),!t&&c.createElement("i",{className:"fa ".concat(e.icon)})),className:"editorPanel-tabs-pane ae-Editor-".concat(e.key,"Pane"),mountOnEnter:!0,unmountOnExit:!1},m(e))})))),c.createElement(qr,{isLeftDragIcon:!0}),c.createElement("div",{className:v()("right-panel-arrow",s?"":"hidden-status"),onClick:this.handleHidden})):null},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleFixed",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleSelect",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleHidden",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getPopOverContainer",null),(0,s.gn)([R.Pi,(0,s.w6)("design:paramtypes",[Object])],t)}(c.Component),Gr=function(e){function t(t){var n,r,o=this;(o=e.call(this,t)||this).mainRef=c.createRef(),o.isInternalChange=!1;var i=t.value,a=t.isSubEditor,l=void 0!==a&&a;t.onChange;var d=t.showCustomRenderersPanel,u=t.superEditorData,p=(0,s._T)(t,["value","isSubEditor","onChange","showCustomRenderersPanel","superEditorData"]),f=(0,s.pi)({},p);return o.store=Lr.create({isMobile:t.isMobile,theme:t.theme,isSubEditor:l,amisDocHost:t.amisDocHost,ctx:t.ctx,superEditorData:u,appLocale:t.appLocale,appCorpusData:null===(n=null==t?void 0:t.amisEnv)||void 0===n?void 0:n.replaceText,i18nEnabled:null!==(r=null==t?void 0:t.i18nEnabled)&&void 0!==r&&r},f),o.store.setSchema(i),void 0!==d&&o.store.setShowCustomRenderersPanel(d),o.manager=new Cn(f,o.store),t.isSubEditor&&window.editorStore||(window.editorStore=o.store),document.addEventListener("keydown",o.handleKeyDown),window.addEventListener("message",o.handleMessage,!1),o.unReaction=(0,g.U5)((function(){return o.store.schemaRaw}),(function(e){o.lastResult=e,o.isInternalChange||t.onChange(e)})),o}return(0,s.ZT)(t,e),t.prototype.componentDidMount=function(){this.props.isSubEditor||this.manager.trigger("init",{data:this.manager})},t.prototype.componentDidUpdate=function(e){var t,n,r,o=this.props;o.value!==e.value&&o.value!==this.lastResult&&(this.isInternalChange=!0,this.store.setSchema(o.value),this.isInternalChange=!1),o.isMobile!==e.isMobile&&this.store.setIsMobile(o.isMobile),o.ctx!==e.ctx&&this.store.setCtx(o.ctx),o.appLocale!==e.appLocale&&this.store.setAppLocale(o.appLocale),(null===(t=null==o?void 0:o.amisEnv)||void 0===t?void 0:t.replaceText)!==(null===(n=null==e?void 0:e.amisEnv)||void 0===n?void 0:n.replaceText)&&this.store.setAppCorpusData(null===(r=null==o?void 0:o.amisEnv)||void 0===r?void 0:r.replaceText)},t.prototype.componentWillUnmount=function(){document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("message",this.handleMessage),this.unReaction(),this.manager.dispose(),(0,P.ob)(this.store)},t.prototype.handleKeyDown=function(e){if(!this.props.isSubEditor){var t=this.manager.store;if("BODY"===e.target.tagName&&("z"===e.key||"Z"===e.key)&&(e.metaKey||e.ctrlKey)&&e.shiftKey)return e.preventDefault(),void this.redo();if("BODY"===e.target.tagName&&("z"===e.key||"Z"===e.key)&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void this.undo();if("BODY"===e.target.tagName&&("s"===e.key||"S"===e.key)&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void this.save();if("BODY"===e.target.tagName&&("c"===e.key||"C"===e.key)&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void this.copy();if("BODY"===e.target.tagName&&("v"===e.key||"V"===e.key)&&(e.metaKey||e.ctrlKey))return e.preventDefault(),void(this.curCopySchemaData&&this.paste());if("BODY"===e.target.tagName&&"x"===e.key&&(e.metaKey||e.ctrlKey))e.preventDefault(),this.store.activeId&&((n=t.getNodeById(this.store.activeId))&&t.activeRegion?a.Am.warning(f("d6f73c6f3b92be5a64f7ea0163501284")):t.isRootSchema(this.store.activeId)?a.Am.warning(f("4fda4f585214d469c04466e2fc98b796")):n&&n.moveable?(this.copy(),this.manager.del(this.store.activeId)):a.Am.warning(f("657bbe06d3922b23552817df7fa8268e")));else if("BODY"===e.target.tagName&&"p"===e.key&&(e.metaKey||e.ctrlKey))e.preventDefault(),this.preview();else if("BODY"===e.target.tagName&&"ArrowUp"===e.key&&(e.metaKey||e.ctrlKey))e.preventDefault(),this.store.activeId&&((n=t.getNodeById(this.store.activeId))&&n.canMoveUp?this.manager.moveUp():a.Am.warning(f("416445a316595bdeb44b661c7de875a8")));else if("BODY"===e.target.tagName&&"ArrowDown"===e.key&&(e.metaKey||e.ctrlKey))e.preventDefault(),this.store.activeId&&((n=t.getNodeById(this.store.activeId))&&n.canMoveDown?this.manager.moveDown():a.Am.warning(f("6ac88d87b2fd118ba7beab8c17880470")));else if("BODY"===e.target.tagName&&("Backspace"===e.key||"Delete"===e.key)){var n;return e.preventDefault(),void(this.store.activeId&&((n=t.getNodeById(this.store.activeId))&&t.activeRegion?a.Am.warning(f("fdb3cba60407b2f1aea0230cca644573")):t.isRootSchema(this.store.activeId)?a.Am.warning(f("8a4b4e2e3b0382007e0c69ed1fe6fe71")):n&&n.moveable?this.manager.del(this.store.activeId):a.Am.warning(f("22f031f3de2e55c430a818d8c588f7a1"))))}}},t.prototype.handleMessage=function(e){e.data&&"amis-widget-register-event"===e.data.type&&e.data.editorPluginName&&(console.info(f("55c56d01a7747ffe0346d42145b62d97"),e.data.editorPluginName),this.manager.dynamicAddPlugin(e.data.editorPluginName))},t.prototype.handleContextMenu=function(e){var t,n,r,o="",i="";if(this.store.activeId?o=null===(t=e.target.closest('[data-editor-id="'.concat(this.store.activeId,'"]')))||void 0===t?void 0:t.getAttribute("data-editor-id"):this.store.selections.length&&(o=null===(n=e.target.closest(this.store.selections.map((function(e){return'[data-editor-id="'.concat(e,'"]')})).join(",")))||void 0===n?void 0:n.getAttribute("data-editor-id")),o||(o=null===(r=e.target.closest("[data-editor-id]"))||void 0===r?void 0:r.getAttribute("data-editor-id")),!o){var a=e.target.closest("[data-node-id]");if(!(o=null==a?void 0:a.getAttribute("data-node-id")))return;i=a.getAttribute("data-node-region")}e.preventDefault(),e.stopPropagation(),this.manager.openContextMenu(o,i,{x:window.scrollX+e.clientX,y:window.scrollY+e.clientY})},t.prototype.canUndo=function(){return this.store.canUndo},t.prototype.canRedo=function(){return this.store.canRedo},t.prototype.undo=function(){this.props.onUndo?this.props.onUndo():this.store.undo()},t.prototype.redo=function(){this.props.onRedo?this.props.onRedo():this.store.redo()},t.prototype.save=function(){this.props.onSave&&this.props.onSave()},t.prototype.preview=function(){this.props.onPreview&&this.props.onPreview(!0)},t.prototype.copy=function(){this.store.activeId&&(this.curCopySchemaData=this.store.getSchema(this.store.activeId))},t.prototype.paste=function(){if(this.store.activeId&&this.curCopySchemaData){if(!this.curCopySchemaData)return;var e=this.store.getSimpleSchema(this.curCopySchemaData);this.store.activeId===this.curCopySchemaData.$$id?this.manager.appendSiblingSchema(Te(e)):this.manager.addElem(Te(e))}},t.prototype.getToolbarContainer=function(){return this.mainRef.current},t.prototype.render=function(){var e=this.props,t=e.preview,n=e.isMobile,r=e.className,o=e.theme,i=e.appLocale,a=e.data,l=e.iframeUrl,d=e.previewProps,u=e.autoFocus;e.isSubEditor;var p=e.amisEnv;return c.createElement("div",{ref:this.mainRef,className:v()("ae-Editor",{preview:t},r)},c.createElement("div",{className:"ae-Editor-inner",onContextMenu:this.handleContextMenu},!t&&c.createElement(Jr,{store:this.store,manager:this.manager,theme:o}),c.createElement("div",{className:"ae-Main"},!t&&c.createElement(Hr,{store:this.store,manager:this.manager}),c.createElement(Nn,(0,s.pi)({},d,{iframeUrl:l,editable:!t,isMobile:n,store:this.store,manager:this.manager,theme:o,appLocale:i,data:a,amisEnv:p,autoFocus:u,toolbarContainer:this.getToolbarContainer}))),!t&&c.createElement(Yr,{store:this.store,manager:this.manager,theme:o,appLocale:i,amisEnv:p}),!t&&c.createElement(Ur,{store:this.store})),c.createElement($r,{store:this.store,manager:this.manager,theme:o,amisEnv:p}),c.createElement(Vr,{store:this.store,manager:this.manager,theme:o}),c.createElement(Zr,{store:this.store,manager:this.manager,theme:o}))},t.defaultProps={autoFocus:!0},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[KeyboardEvent]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleKeyDown",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleMessage",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleContextMenu",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"getToolbarContainer",null),t}(c.Component),Xr=[{label:f("4e7f76261f8c4c6d78998f85fc1f4c6e"),children:[{label:f("16a20243f9b741c08216dc9548de2968"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"m-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"m-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"m"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"m-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"m-lg"}]},{label:f("461d364c67ec6a45e011ed13f2f7154f"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"m-t-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"m-t-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"m-t"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"m-t-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"m-t-lg"}]},{label:f("31e3752986d64c8b36897c8641c8628d"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"m-r-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"m-r-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"m-r"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"m-r-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"m-r-lg"}]},{label:f("eabe91d9426b6446f707cea3e7ab2418"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"m-b-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"m-b-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"m-b"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"m-b-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"m-b-lg"}]},{label:f("2e46d251ee6188bb1b3ff20656276572"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"m-l-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"m-l-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"m-l"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"m-l-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"m-l-lg"}]},{label:f("3dc4038d0f0a2d2b3c2b2e29a5ec6dde"),children:[{label:f("a8b0c20416853bda54120bf19477ad11"),value:"m-none"},"|",{label:f("af767b7e4ae069d54f9ea839858d4c6d"),value:"m-t-none"},{label:f("4d9c32c23df5d234e629c922c58d8e12"),value:"m-r-none"},{label:f("3850a186c3235bc646d4c2f79cebac36"),value:"m-b-none"},{label:f("d2aff1417831aa621c16cd5b95306b4b"),value:"m-l-none"}]}]},{label:f("841d77223f0ec8cd0b530ed8e0775b20"),children:[{label:f("16a20243f9b741c08216dc9548de2968"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"p-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"p-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"p"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"p-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"p-lg"}]},{label:f("461d364c67ec6a45e011ed13f2f7154f"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"p-t-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"p-t-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"p-t"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"p-t-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"p-t-lg"}]},{label:f("31e3752986d64c8b36897c8641c8628d"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"p-r-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"p-r-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"p-r"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"p-r-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"p-r-lg"}]},{label:f("eabe91d9426b6446f707cea3e7ab2418"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"p-b-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"p-b-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"p-b"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"p-b-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"p-b-lg"}]},{label:f("2e46d251ee6188bb1b3ff20656276572"),children:[{label:f("23ecf42cada8bf2715792d718544d107"),value:"p-l-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"p-l-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"p-l"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"p-l-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"p-l-lg"}]},{label:f("3dc4038d0f0a2d2b3c2b2e29a5ec6dde"),children:[{label:f("a8b0c20416853bda54120bf19477ad11"),value:"p-none"},"|",{label:f("af767b7e4ae069d54f9ea839858d4c6d"),value:"p-t-none"},{label:f("4d9c32c23df5d234e629c922c58d8e12"),value:"p-r-none"},{label:f("3850a186c3235bc646d4c2f79cebac36"),value:"p-b-none"},{label:f("d2aff1417831aa621c16cd5b95306b4b"),value:"p-l-none"}]}]},{label:f("961534b4ea37e4e88aada736b299d063"),className:"w2x",children:[{label:f("d4d2a66820d30e07b44c850eb3f116c0"),children:[{label:f("a8b0c20416853bda54120bf19477ad11"),value:"b-a"},"|",{label:f("af767b7e4ae069d54f9ea839858d4c6d"),value:"b-t"},{label:f("4d9c32c23df5d234e629c922c58d8e12"),value:"b-r"},{label:f("3850a186c3235bc646d4c2f79cebac36"),value:"b-b"},{label:f("d2aff1417831aa621c16cd5b95306b4b"),value:"b-l"},"|",{label:f("3dc4038d0f0a2d2b3c2b2e29a5ec6dde"),value:"no-border"}]},{label:f("58f966670529f4753fb3c5a0647606be"),children:[{label:"2x",value:"b-2x"},{label:"3x",value:"b-3x"},{label:"4x",value:"b-4x"},{label:"5x",value:"b-5x"}]},{label:f("6b36c6f7ec834692ec6c8e3816349fdd"),children:[{label:f("fbae87bcc352f6933541fb77a07418ed"),value:"b-primary",className:"bg-primary"},{label:f("d8c7e04c8e2be23dd3b81a31db6e04f1"),value:"b-info",className:"bg-info"},{label:f("900c70fa5f7dbc014e6f762d5e0e885c"),value:"b-warning",className:"bg-warning"},{label:f("540f84ddc0883866b229f71c2844199a"),value:"b-danger",className:"bg-danger"},{label:f("330363dfc524cff2488f2ebde0500896"),value:"b-success",className:"bg-success"},{label:f("2fc96b2704b05d6a9f299c442573ee77"),value:"b-white",className:"bg-white"},{label:f("adb7e5312abdb9a44297e48d63815fa3"),value:"b-dark",className:"bg-dark"},{label:f("48d0a09bdd5fe7e89f0a445b0ffdf14f"),value:"b-light",className:"bg-light"}]}]},{label:f("0d98c74797e49d00bcc4c17c9d557a2b"),className:"w2x",children:[{label:f("0103eb2d3dca70270d1a74e9ec987ac9"),children:[{label:f("a8b0c20416853bda54120bf19477ad11"),value:"r"},"|",{label:f("af767b7e4ae069d54f9ea839858d4c6d"),value:"r-t"},{label:f("4d9c32c23df5d234e629c922c58d8e12"),value:"r-r"},{label:f("3850a186c3235bc646d4c2f79cebac36"),value:"r-b"},{label:f("d2aff1417831aa621c16cd5b95306b4b"),value:"r-l"},"|",{label:"2x",value:"r-2x"},{label:"3x",value:"r-3x"}]},{label:f("8456bc40d48da5af833f1c63385e9879"),children:[{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"font-normal"},{label:f("b3b2682579133673d3fe08c156d565dc"),value:"font-thin"},{label:f("56dce5d1cbb97439d291c458e50107e0"),value:"font-bold"},"|",{label:f("23ecf42cada8bf2715792d718544d107"),value:"text-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"text-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"text-base"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"text-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"text-lg"}]},{label:f("6b36c6f7ec834692ec6c8e3816349fdd"),children:[{label:f("fbae87bcc352f6933541fb77a07418ed"),value:"text-primary",className:"text-primary"},{label:f("d8c7e04c8e2be23dd3b81a31db6e04f1"),value:"text-info",className:"text-info"},{label:f("900c70fa5f7dbc014e6f762d5e0e885c"),value:"text-warning",className:"text-warning"},{label:f("540f84ddc0883866b229f71c2844199a"),value:"text-danger",className:"text-danger"},{label:f("330363dfc524cff2488f2ebde0500896"),value:"text-success",className:"text-success"},{label:f("2fc96b2704b05d6a9f299c442573ee77"),value:"text-white",className:"text-white bg-dark"},{label:f("adb7e5312abdb9a44297e48d63815fa3"),value:"text-dark",className:"text-dark"},{label:f("49a79f4047b81186c069ed1c9c151c66"),value:"text-muted",className:"text-muted"}]},{label:f("8e1b944f4389bdaab6f11d5bc83190c8"),children:[{label:f("fbae87bcc352f6933541fb77a07418ed"),value:"bg-primary",className:"bg-primary"},{label:f("d8c7e04c8e2be23dd3b81a31db6e04f1"),value:"bg-info",className:"bg-info"},{label:f("900c70fa5f7dbc014e6f762d5e0e885c"),value:"bg-warning",className:"bg-warning"},{label:f("540f84ddc0883866b229f71c2844199a"),value:"bg-danger",className:"bg-danger"},{label:f("330363dfc524cff2488f2ebde0500896"),value:"bg-success",className:"bg-success"},{label:f("2fc96b2704b05d6a9f299c442573ee77"),value:"bg-white",className:"bg-white"},{label:f("adb7e5312abdb9a44297e48d63815fa3"),value:"bg-dark",className:"bg-dark"},{label:f("48d0a09bdd5fe7e89f0a445b0ffdf14f"),value:"bg-light",className:"bg-light"},"|",{label:f("3dc4038d0f0a2d2b3c2b2e29a5ec6dde"),value:"no-bg"}]},{label:f("c28479019e24e0e4745f4948e9e97ee7"),children:[{label:f("f72ce9ad683cc82e0eab557ffc9c67a0"),value:"w-xxs"},{label:f("23ecf42cada8bf2715792d718544d107"),value:"w-xs"},{label:f("391b8fa9c747a1799353ab856e666ad5"),value:"w-sm"},{label:f("fd6e80f1e0199d6ecc3ee81ae04aa9ef"),value:"w"},{label:f("aed1dfbc31703955e64806b799b67645"),value:"w-md"},{label:f("ab18e30c0dc4093ceeda8961fac3d1f4"),value:"w-lg"},{label:f("b95c462d7697958c25861193fc89ae07"),value:"w-xl"},{label:f("3386da5f56fac758ed0f18e024ecb943"),value:"w-xxl"},{label:f("ffaa96ef7232cb6d8ee4d7e673dbf4ac"),value:"w-full"}]}]}];!function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isFocused:!1,isOpened:!1},t.values=[],t}(0,s.ZT)(t,e),t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.toggle=function(){this.setState({isOpened:!this.state.isOpened})},t.prototype.handleFocus=function(e){this.setState({isFocused:!0}),this.props.onFocus&&this.props.onFocus(e)},t.prototype.handleBlur=function(e){this.setState({isFocused:!1}),this.props.onBlur&&this.props.onBlur(e)},t.prototype.handleChange=function(e){(0,this.props.onChange)(e.currentTarget.value)},t.prototype.getParent=function(){return(0,o.findDOMNode)(this)},t.prototype.getTarget=function(){return(0,o.findDOMNode)(this)},t.prototype.handlePopOverChange=function(e){var t=this.props.value||"",n=t.replace(/\s+/g," ").split(/\s+/),r=n.indexOf(e.value),o=this.props.onChange;if(~r)n.splice(r,1),t=n.join(" ");else{if(/(?:^|\s)(m|p)\-(t|r|b|l)(?:\-(?:xs|sm|md|lg))?(?:$|\s)/.test(e.value)){var i=new RegExp("(?:^|\\s)".concat(RegExp.$1,"\\-").concat(RegExp.$2,"(?:\\-(?:xs|sm|md|lg))?(?=(\\s|$))"),"ig");t=t.replace(i,"")}else/(?:^|\s)(m|p)(?:\-(xs|sm|md|lg))?(?:$|\s)/.test(e.value)?(i=new RegExp("(?:^|\\s)".concat(RegExp.$1,"(?:\\-(?:xs|sm|md|lg))?(?=(\\s|$))"),"ig"),t=t.replace(i,"")):/(?:^|\s)(m|p)(?:\-(t|r|b|l))?\-none(?:$|\s)/.test(e.value)?(i=new RegExp(RegExp.$2?"(?:^|\\s)".concat(RegExp.$1,"(?:(?:\\-").concat(RegExp.$2,"(?:\\-(?:xs|sm|md|lg)))|\\-none)?(?=(\\s|$))"):"(?:^|\\s)".concat(RegExp.$1,"(?:[^\\s$]+)?(?=(\\s|$))"),"ig"),t=t.replace(i,"$1")):/(?:^|\s)w(?:\-\w+)?(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)w(?:\-\w+)?(?=(\s|$))/g,""):"b-a"===e.value?t=(t=t.replace(/(?:^|\s)b\-(?:t|r|b|l)(?=(\s|$))/g,"")).replace(/(?:^|\s)no\-border(?=(\s|$))/g,""):/(?:^|\s)b\-(?:t|r|b|l)?(?:$|\s)/.test(e.value)?t=(t=t.replace(/(?:^|\s)b\-a(?=(\s|$))/g,"")).replace(/(?:^|\s)no\-border(?=(\s|$))/g,""):/(?:^|\s)b\-\dx(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)b\-\dx(?=(\s|$))/g,""):"no-border"===e.value?t=t.replace(/(?:^|\s)b\-(?:\dx|\w+)(?=(\s|$))/g,""):/(?:^|\s)b\-(?:primary|info|warning|danger|success|white|dark|light)(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)b\-(?:primary|info|warning|danger|success|white|dark|light)(?=(\s|$))/g,""):"r"===e.value?t=t.replace(/(?:^|\s)r\-(?:t|r|b|l)(?=(\s|$))/g,""):/(?:^|\s)r\-(?:t|r|b|l)?(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)r(?=(\s|$))/g,""):/(?:^|\s)r\-\dx(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)r\-\dx(?=(\s|$))/g,""):/(?:^|\s)text\-(?:xs|sm|base|md|lg)(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)text\-(?:xs|sm|base|md|lg)(?=(\s|$))/g,""):/(?:^|\s)font\-(?:normal|thin|bold)(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)font\-(?:normal|thin|bold)(?=(\s|$))/g,""):/(?:^|\s)text\-(?:primary|info|warning|danger|success|white|dark|light)(?:$|\s)/.test(e.value)?t=t.replace(/(?:^|\s)text\-(?:primary|info|warning|danger|success|white|dark|light)(?=(\s|$))/g,""):/(?:^|\s)bg\-(?:primary|info|warning|danger|success|white|dark|light)(?:$|\s)/.test(e.value)?t=(t=t.replace(/(?:^|\s)bg\-(?:primary|info|warning|danger|success|white|dark|light)(?=(\s|$))/g,"")).replace(/(?:^|\s)no\-bg(?=(\s|$))/g,""):"no-bg"===e.value&&(t=t.replace(/(?:^|\s)bg\-(?:primary|info|warning|danger|success|white|dark|light)(?=(\s|$))/g,""));t=t.replace(/\s+/g," ").trim(),t+=(t?" ":"")+e.value}o(t)},t.prototype.renderGroup=function(e,t){var n=this,r=this.props.classnames;return c.createElement("div",{key:t,className:r("ae-ClassNameControl-group",e.className)},c.createElement("label",{className:r("ae-ClassNameControl-groupLabel",e.labelClassName)},e.label),e.children&&e.children.length?e.children[0].value?this.renderOptions(e.children,t):e.children.map((function(e,t){return n.renderGroup(e,t)})):null)},t.prototype.renderOptions=function(e,t){var n=this,r=this.props.classnames;return function(e){for(var t=[],n=t[0]=[],r=0,o=e.length;r0&&v.moveable),onSelect:function(){return u.moveUp()}}),t.push({label:f("ed2bc13d8bbd99e16e017dd5f5393393"),disabled:!(Array.isArray(h)&&y1?t.push({label:f("205f45ee17394bd5668412780eaa55e2"),children:b.childRegions.map((function(e){return{label:"".concat(e.label),data:e.region,onHighlight:function(e,t){return e?p.setHoverId(a,t):p.setHoverId("")},onSelect:function(){return p.showInsertRendererPanel()}}}))}):t.push({label:f("205f45ee17394bd5668412780eaa55e2"),data:b.childRegions[0].region,onHighlight:function(e,t){return e?p.setHoverId(a,t):p.setHoverId("")},onSelect:function(){return p.showInsertRendererPanel()}}))}d.length||!(null===(r=l.plugin.scaffoldForm)||void 0===r?void 0:r.canRebuild)&&!(null===(o=l.scaffoldForm)||void 0===o?void 0:o.canRebuild)||t.push({label:"快速构建「".concat(l.plugin.name,"」"),disabled:s.$$commonSchema,onSelect:function(){return i.manager.reScaffold(a,l.scaffoldForm||l.plugin.scaffoldForm,s)}})},t.prototype.buildEditorPanel=function(e,t){if(e.selections.length){var n=this.manager.store,r=[],o=(0,s.pi)((0,s.pi)({},e),{data:r,region:""});(r=this.manager.buildContextMenus(o)).length&&t.push({key:"contextmenu",icon:"fa fa-cog",title:f("2b6bc0f293f5ca01b006206c2535ccbc"),menus:r,render:this.manager.makeSchemaFormRender({body:[{type:"button-group",buttons:r.filter((function(e){return"|"!==e})).map((function(e){return(0,s.pi)((0,s.pi)({},e),{type:"button",onClick:e.onSelect})}))}],panelById:n.activeId})})}},t.prototype.afterInsert=function(e){var t,n,r=this,o=e.context;if(o.node&&(null===(n=null===(t=o.subRenderer)||void 0===t?void 0:t.plugin)||void 0===n?void 0:n.popOverBody)){var i=o.data.$$id;i&&setTimeout((function(){r.manager.setActiveId(i),requestAnimationFrame((function(){r.manager.openNodePopOverForm(i)}))}),200)}},t.scene=["layout"],t}(it));var to=/^\/schemas\/(.*).json$/;function no(e,t,n,r){return(0,s.mG)(this,void 0,void 0,(function(){var o,i,a,c,l;return(0,s.Jh)(this,(function(s){switch(s.label){case 0:return o=Array.isArray(r)?r.concat():[],[3,3];case 1:(void 0).apply(void 0,[(l.schema=s.sent(),l)]),s.label=2;case 2:s.label=3;case 3:return to.test(t)&&(i=RegExp.$1,a="".concat(e.replace(/^(\w+\:\/\/[^\/]+)\/.*$/,"$1"),"/schemas/").concat(i,".json"),c=z()(o,(function(e){var t;return(null===(t=e.fileMatch)||void 0===t?void 0:t[0])===n})),~c&&o.splice(c,1),o.push({uri:a,fileMatch:[n],schema:{$schema:"http://json-schema.org/draft-07/schema#",$ref:"".concat(e,"#/definitions/").concat(i)}})),[2,o]}}))}))}var ro=Z()((function(e){a.Am.warning("代码有误,错误的地方是\n ".concat(e.toString().split("\n")[1]))}),3e3),oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={wrongSchema:"",value:t.props.value,contents:t.obj2str(t.props.value,t.props)},t.toDispose=[],t.uri="isuda://schema/".concat(ae(),".json"),t.emitChange=Z()((function(){var e=t.props,n=e.onChange,r=e.value,o=t.str2obj(t.state.contents);if(o&&C()(o)){t.setState({wrongSchema:""}),delete o.$schema,o=je(o,t.props.value);var i=Le(t.lastResult||r,o);t.lastResult=o,n(o,i)}else t.setState({wrongSchema:t.state.contents})}),250,{trailing:!0,leading:!1}),t.editorFactory=function(e,n,r){var o=n.Uri.parse(t.uri);return t.model=n.editor.createModel(t.state.contents,"json",o),n.editor.create(e,(0,s.pi)((0,s.pi)({autoIndent:!0,formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,scrollbar:{alwaysConsumeMouseWheel:!1},minimap:{enabled:!1}},r),{model:t.model}))},t.editorDidMount=function(e,n){t.editor=e,t.monaco=n,t.changeJsonOptions(t.props),t.props.onPaste&&t.toDispose.push(t.editor.onDidPaste(t.props.onPaste).dispose)},t.editorWillUnmount=function(e,n){t.toDispose.forEach((function(e){return e()})),t.toDispose=[]},t.handleChange=function(e){t.setState({contents:e},t.emitChange)},t.handleBlur=function(){return(0,s.mG)(t,void 0,void 0,(function(){var e,t,n;return(0,s.Jh)(this,(function(r){switch(r.label){case 0:return e=this.state,t=e.wrongSchema,n=e.value,t?[4,(0,a.eB)([{className:"w-full",type:"tpl",label:!1,tpl:f("7e4b38ba0ab9cbfcabd9dd859e36b601")},{type:"switch",label:!1,option:f("af86ad9dd8a221f931dcdc5a63382b6f"),name:"diff",value:!1},{visibleOn:"this.diff",label:!1,type:"diff-editor",allowFullscreen:!0,disabled:!0,name:"newValue",size:"xxl",language:"json",diffValue:"${oldValue}"}],{oldValue:n,newValue:t},f("43d586cd6cf1a512c0bcb85ed9efde51"))]:[2];case 1:return r.sent()?this.setState({wrongSchema:"",contents:(0,U.Pz)(n)}):this.editor.focus(),[2]}}))}))},t}return(0,s.ZT)(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;e.$schema!==t.$schema&&this.monaco&&this.changeJsonOptions(t),ce(t.value,e.value)&&ce(t.value,this.lastResult)&&(this.lastResult=null,this.setState({value:t.value,contents:this.obj2str(t.value,t)}))},t.prototype.obj2str=function(e,t){var n;return e=je(e),!(e=(0,s.pi)({type:null==e?void 0:e.type},e)).type&&(null===(n=t.$schema)||void 0===n?void 0:n.match(/PageSchema/i))?e.type="page":e.type||delete e.type,delete e.$schema,(0,U.Pz)(e)},t.prototype.str2obj=function(e){try{if(""===e)return{};var t=(0,U.Qc)(e);return ro&&ro.cancel(),t}catch(e){return ro(e),null}},t.prototype.changeJsonOptions=function(e){var t;return void 0===e&&(e=this.props),(0,s.mG)(this,void 0,void 0,(function(){var n,r,o;return(0,s.Jh)(this,(function(i){switch(i.label){case 0:return n=this.monaco,0===(r=e.$schemaUrl||"".concat(window.location.protocol,"//").concat(window.location.host,"/schema.json")).indexOf("/")&&(r="".concat(window.location.protocol,"//").concat(window.location.host).concat(r)),[4,no(r,e.$schema,n.Uri.parse(this.uri).toString(),null===(t=n.languages.json)||void 0===t?void 0:t.jsonDefaults.diagnosticsOptions.schemas)];case 1:return o=i.sent(),n.languages.json.jsonDefaults.setDiagnosticsOptions({schemas:o,validate:!0,enableSchemaRequest:!0,allowComments:!0}),[2]}}))}))},t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.className,r=e.theme;return c.createElement(a.ML,{className:v()("amis-code-editor",n),value:this.state.contents,onChange:this.handleChange,onBlur:this.handleBlur,language:"json",theme:r,editorFactory:this.editorFactory,editorDidMount:this.editorDidMount,editorWillUnmount:this.editorWillUnmount,options:{automaticLayout:!0,lineNumbers:"off",glyphMargin:!1,tabSize:2,wordWrap:"on",lineDecorationsWidth:0,lineNumbersMinChars:0,selectOnLineNumbers:!0,scrollBeyondLastLine:!1,folding:!0,minimap:{enabled:!1},readOnly:t}})},t}(c.Component),io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,s.ZT)(t,e),t.prototype.handleCodePaste=function(){var e=this;setTimeout((function(){e.props.manager.patchSchema(!0)}),500)},t.prototype.render=function(){var e=this.props,t=e.onChange,n=e.manager,r=e.store;return c.createElement("div",{className:"ae-CodePanel"},c.createElement("div",{className:"panel-header"},"源码"),c.createElement("div",{className:"ae-CodePanel-content"},c.createElement(oo,{value:r.valueWithoutHiddenProps,onChange:t,$schema:r.jsonSchemaUri,$schemaUrl:n.config.$schemaUrl,onPaste:this.handleCodePaste})))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleCodePaste",null),t}(c.Component);St(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.order=-9999,t}return(0,s.ZT)(t,e),t.prototype.buildJSONSchema=function(e){return e.info.$schema},t.prototype.buildEditorPanel=function(e,t){e.info;var n=e.selections;this.manager.store.jsonSchemaUri&&!n.length&&t.push({key:"code",icon:"png-icon code-png",title:c.createElement("span",{className:"editor-tab-icon","editor-tooltip":"代码"},c.createElement(a.JO,{icon:"editor-code"})),position:"left",component:eo(io),order:5e3})},t.scene=["layout"],t}(it)),St(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dataViewer={type:"json",name:"ctx",asFormItem:!0,className:"m-b-none",component:function(e){for(var t=e.value,n=e.onChange,r=e.readOnly,o=(0,s.CR)(c.useState(0),2),i=o[0],a=o[1],l=t||{},d=[l];Object.getPrototypeOf(l)!==Object.prototype;){var u=Object.getPrototypeOf(l);if("[object Object]"!==Object.prototype.toString.call(u))break;d.push(u),l=u}function p(e){var t=Object.create(d[1]||Object.prototype);Object.keys(e.updated_src).forEach((function(n){return t[n]=e.updated_src[n]})),n(t)}return c.createElement("div",{className:"aeDataChain"},c.createElement("div",{className:"aeDataChain-aside"},c.createElement("ul",null,d.map((function(e,t){return c.createElement("li",{className:t===i?"is-active":"",key:t,onClick:function(){return a(t)}},0===t?f("48ac479789304b37afa2f1b06642f4da"):1===t?f("9bc16c658ab8a8c4eddc5e24d85bef20"):"上".concat(t,"层"))})))),c.createElement("div",{className:"aeDataChain-main"},c.createElement(ie(),{name:!1,src:d[i],enableClipboard:!1,iconStyle:"square",onAdd:0===i&&!r&&p,onEdit:0===i&&!r&&p,onDelete:0===i&&!r&&p,collapsed:2})))}},t}return(0,s.ZT)(t,e),t.prototype.buildEditorToolbar=function(e,t){var n=this;e.id,e.schema;var r=e.node.getComponent();if(r&&r.props&&r.props.data&&r.props.store){var o=r.props.store;t.push({icon:"fa fa-bug",order:-1e3,placement:"bottom",tooltip:f("aa920263020f14211a44ea172efc7253"),onClick:function(){return n.openDebugForm(r.props.data,o.updateData&&o.data===r.props.data?function(e){return o.updateData(e)}:void 0)}})}},t.prototype.openDebugForm=function(e,t){return(0,s.mG)(this,void 0,void 0,(function(){var n;return(0,s.Jh)(this,(function(r){switch(r.label){case 0:return[4,this.manager.scaffold({title:f("aa920263020f14211a44ea172efc7253"),body:[(0,s.pi)((0,s.pi)({},this.dataViewer),{readOnly:!t})]},{ctx:e})];case 1:return n=r.sent(),null==t||t(n.ctx),[2]}}))}))},t.scene=["layout"],t.id="data-debug",t}(it)),St(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.order=-9999,t.rendererName="error",t.name="Error",t.isBaseComponent=!0,t}return(0,s.ZT)(t,e),t.scene=["layout"],t}(it));var ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={curSearchElemKey:""},t}return(0,s.ZT)(t,e),t.prototype.handleClick=function(e){var t=this.props.store,n=e.currentTarget,r=n.getAttribute("data-node-id"),o=n.getAttribute("data-node-region");this.props.manager,o?t.activeId===r&&t.activeRegion===o?t.setActiveId(r):t.setActiveId(r,o):t.setActiveId(r)},t.prototype.handleEnter=function(e){var t=e.currentTarget,n=t.getAttribute("data-node-id"),r=t.getAttribute("data-node-region");this.props.store.setHoverId(n,r)},t.prototype.handleDragStart=function(e){var t=e.currentTarget.getAttribute("data-node-id");t&&this.props.manager.startDrag(t,e)},t.prototype.handleDragOver=function(e){var t=e.target.closest("[data-node-id][data-node-region]");if(t){var n=this.props.manager,r=t.getAttribute("data-node-id"),o=t.getAttribute("data-node-region");e.preventDefault(),r&&o&&n.dnd.switchToRegion(e.nativeEvent,r,o)}},t.prototype.handleDrop=function(e){this.props.manager.dnd.drop(e.nativeEvent)},t.prototype.handleSearchElemKeyChange=function(e){this.setState({curSearchElemKey:e})},t.prototype.clearSearchElemKey=function(){this.setState({curSearchElemKey:""})},t.prototype.renderTitleByKeyword=function(e,t){if(t&&~e.indexOf(t)){var n=e.indexOf(t),r=n+t.length;return c.createElement("span",null,e.substring(0,n),c.createElement("span",{className:"has-keywords"},t),e.substring(r))}return e},t.prototype.renderItem=function(e,t){var n,r=this,o=this.props.store,i=this.state.curSearchElemKey,s=!o.dragging&&e.singleRegion?e.uniqueChildren[0].uniqueChildren:e.uniqueChildren,l=s.length;return!o.dragging||e.isRegion||e.children.length?c.createElement("li",{className:v()("ae-Outline-node",{"is-folded":e.folded,"is-active":o.activeId===e.id&&!e.region||e.isRegion&&o.dropId===e.id&&o.dropRegion===e.region||e.isRegion&&o.activeId===e.id&&o.activeRegion===e.region,"is-region":e.isRegion,"is-hover":!e.isRegion&&(o.isHoved(e.id)||o.isContextOn(e.id)),"has-children":l,"is-dragging":o.dragId===e.id&&"schema"===o.dragType}),key:t},c.createElement("a",{onClick:this.handleClick,onMouseEnter:this.handleEnter,"data-node-id":e.id,"data-node-region":e.region,"data-node-common-config":null===(n=e.schema)||void 0===n?void 0:n.$$commonSchema,draggable:e.draggable,onDragStart:this.handleDragStart},l?c.createElement("span",{onClick:e.toggleFold,className:v()("ae-Outline-expander ae-Outline-node-icon",{"is-folded":e.folded}),"data-node-id":e.id,"data-node-region":e.region},c.createElement(a.JO,{icon:"down-arrow"})):null,c.createElement("span",{className:"ae-Outline-node-text"},e.isCommonConfig?"".concat(e.label,"-[公共配置]"):this.renderTitleByKeyword(e.label,i))),l?c.createElement("ul",{className:"ae-Outline-sublist"},s.map((function(e,t){return r.renderItem(e,t)}))):null):null},t.prototype.render=function(){var e=this,t=this.state.curSearchElemKey,n=this.props.store,r=n.outline;return c.createElement("div",{className:"ae-Outline-panel"},c.createElement("div",{className:"panel-header"},"大纲"),c.createElement(a.Wz,{className:"editor-InputSearch",value:t,onChange:this.handleSearchElemKeyChange,placeholder:f("962d43ff8d39c381d8e2c73838412111"),clearable:!1},t?c.createElement("a",{onClick:this.clearSearchElemKey},c.createElement(a.JO,{icon:"close",className:"icon"})):c.createElement(a.JO,{icon:"editor-search",className:"icon"})),c.createElement("hr",{className:"margin-top"}),c.createElement("div",{className:v()("ae-Outline","hoverShowScrollBar",{"ae-Outline--draging":n.dragging}),onDragOver:this.handleDragOver,onDrop:this.handleDrop},n.dragging?c.createElement("div",{className:"ae-Outline-tip"},"将目标拖入导航中的节点可以切换容器"):null,r.length?c.createElement("ul",{className:"ae-Outline-list"},r.map((function(t,n){return e.renderItem(t,n)}))):c.createElement("div",null,"加载中,请稍等...")))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleClick",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleEnter",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragStart",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDragOver",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleDrop",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"handleSearchElemKeyChange",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"clearSearchElemKey",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[String,String]),(0,s.w6)("design:returntype",void 0)],t.prototype,"renderTitleByKeyword",null),(0,s.gn)([R.Pi],t)}(c.Component);St(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.order=-9999,t}return(0,s.ZT)(t,e),t.prototype.buildEditorPanel=function(e,t){var n=this.manager.store;if(n&&e.selections.length){var r=n.changeLeftPanelOpenStatus,o=n.changeLeftPanelKey;r(!0),o("outline")}t.push({key:"outline",icon:"png-icon outline-png",title:c.createElement("span",{className:"editor-tab-icon","editor-tooltip":"大纲"},c.createElement(a.JO,{icon:"editor-outline"})),component:eo(ao),position:"left",order:4e3})},t.scene=["layout"],t}(it)),St(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.order=9999,t}return(0,s.ZT)(t,e),t.prototype.getRendererInfo=function(e){var t=e.renderer,n=e.schema,r=e.path;if(n.$$id&&t){if(/(^|\/)static\-field/.test(r))return;if("card-item"===t.name||"list-item-field"===t.name)return;return{name:"Unkown",$schema:"/schemas/UnkownSchema.json"}}},t.scene=["layout"],t}(it));var so,co,lo,uo={};function po(e,t,n){var r=uo[e]||{};return"function"==typeof r?r(t,n):t?(0,s.pi)((0,s.pi)({},r),t):r}function fo(e,t,n){return{type:"tooltip-wrapper",tooltip:t,tooltipTheme:"dark",placement:"top",tooltipStyle:(0,s.pi)({fontSize:"12px"},n||{}),className:"ae-formItemControl-label-tip",body:e}}(lo=so||(so={})).create="create",lo.view="view",lo.update="update",lo.table="table",lo.filter="filter",function(e){e.entity="entity",e.list="list",e.piece="piece"}(co||(co={}));var ho={List:{value:"list",label:f("3712972d84adf48acbd6ad24b4d75ad0")},Insert:{value:"insert",label:f("66ab5e9f24c8f46012a25c89919fb191")},View:{value:"view",label:f("f26225bde6a250894a04db4c53ea03d0")},Edit:{value:"edit",label:f("95b351c86267f3aedf89520959bce689")},Delete:{value:"delete",label:f("2f4aaddde33c9b93c36fd2503f3d122b")},BulkEdit:{value:"bulkEdit",label:f("e73cefac9d030927da1618c7b15c98c9")},BulkDelete:{value:"bulkDelete",label:f("7fb62b30119c3797a843a48368463314")},Import:{value:"import",label:f("8d9a071ee2ef45e045968e117a205c07")},Export:{value:"export",label:f("55405ea6ff6fd823ffab7e6b10ddfa95")},SimpleQuery:{value:"simpleQuery",label:f("c26996a6506adf397f0668d376d0b40b")},FuzzyQuery:{value:"fuzzyQuery",label:f("6ff4bf3d567e977aa4c90c27dff1e6db")},AdvancedQuery:{value:"advancedQuery",label:f("9c4666fd08c2738eb9611a3721cb5f0f")}},vo={};!function(){function e(e,t){var n=this;this.builders={},Object.values(vo).filter((function(n){var r,o;return null===(o=null===(r=n.accessable)||void 0===r?void 0:r.call(n,e,t))||void 0===o||o})).forEach((function(e){n.builders[e.type]=new e}))}Object.defineProperty(e.prototype,"builderNum",{get:function(){return Object.keys(this.builders).length},enumerable:!1,configurable:!0}),e.prototype.resolveBuilderBySetting=function(e){return this.builders[e.dsType]||Object.values(this.builders)[0]},e.prototype.resolveBuilderBySchema=function(e,t){var n=Object.values(this.builders);return n.find((function(n){return n.match(e[t])}))||n[0]},e.prototype.getDefaultBuilderName=function(){return Object.entries(this.builders).map((function(e){var t=(0,s.CR)(e,2);return{value:t[0],order:t[1].order}})).sort((function(e,t){var n,r;return(null!==(n=e.order)&&void 0!==n?n:0)-(null!==(r=t.order)&&void 0!==r?r:0)}))[0].value},e.prototype.getDSSwitch=function(e){void 0===e&&(e={});var t=this.builderNum>1,n=Object.entries(this.builders).map((function(e){var t=(0,s.CR)(e,2),n=t[0],r=t[1];return{label:r.name,value:n,order:r.order}}));return n.sort((function(e,t){var n,r;return(null!==(n=e.order)&&void 0!==n?n:0)-(null!==(r=t.order)&&void 0!==r?r:0)})),(0,s.pi)({type:"radios",label:f("a094e5b7699ea4b61094cc4120170423"),name:"dsType",visible:t,selectFirst:!0,options:n},e)},e.prototype.collectFromBuilders=function(e){return Object.entries(this.builders).map((function(t){var n=(0,s.CR)(t,2),r=n[0],o=n[1];return e(o,r)}))}}(),function(e){vo[e.type]=e}(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name=f("54ea89b497ec3bb319c68844dfa3687f"),t.order=0,t.match=function(e,t){return!!("string"==typeof e&&/^(get|post|put|delete|option):/.test(e)||"object"==typeof e&&e.url)},t.features=["List","Insert","View","Edit","Delete","BulkEdit","BulkDelete","Import","Export","SimpleQuery","FuzzyQuery"],t}return(0,s.ZT)(t,e),t.prototype.makeSourceSettingForm=function(e){var t=e.name,n=e.label,r=e.feat,o=e.inCrud,i=e.inScaffold;if(["Import","Export","SimpleQuery","FuzzyQuery"].includes(r))return[];switch(n=null!=n?n:o&&"List"!==r?ho[r].label+f("54ea89b497ec3bb319c68844dfa3687f"):f("54ea89b497ec3bb319c68844dfa3687f"),t=null!=t?t:i?ho[r].value+"Api":"api",r){case"Insert":n=fo(n,"用来保存数据, 表单提交后将数据传入此接口。
\n 接口响应体要求(如果data中有数据,该数据将被合并到表单上下文中):
\n ".concat(JSON.stringify({status:0,msg:"",data:{}},null,"
")));break;case"List":n=fo(n,"接口响应体要求:
\n ".concat(JSON.stringify({status:0,msg:"",items:{},page:0,total:0},null,"
")))}return[po("apiControl",{label:n,name:t,sampleBuilder:null,apiDesc:null})].concat("Edit"!==r||o?null:po("apiControl",{label:fo(f("b4bc91701b86fe8543d649e97daea602"),"接口响应体要求:
\n ".concat(JSON.stringify({status:0,msg:"",data:{}},null,"
"))),name:"initApi"})).concat("List"===r&&o&&i?this.makeFieldsSettingForm({feat:r,setting:!0}):null).filter(Boolean)},t.prototype.getContextFileds=function(e){return(0,s.mG)(this,void 0,void 0,(function(){return(0,s.Jh)(this,(function(t){return[2,e.schema.__fields]}))}))},t.prototype.getAvailableContextFileds=function(e,t){return(0,s.mG)(this,void 0,void 0,(function(){return(0,s.Jh)(this,(function(e){return[2]}))}))},t.prototype.onFieldsInit=function(e,t){this.features.forEach((function(n){var r="".concat(ho[n].value,"Fields"),o=t.getValueByName(r),i=q()(e||[]).map((function(e){var t=null==o?void 0:o.find((function(t){return t.name===e.name}));return(0,s.pi)((0,s.pi)({},e),{checked:!t||t.checked})}));t.setValueByName(r,i)}))},t.prototype.makeFieldsSettingForm=function(e){var t=this,n=e.sourceKey,r=e.feat,o=e.inCrud,i=e.setting,c=e.inScaffold;if(!1===c||["Import","Export","FuzzyQuery"].includes(r))return[];n=null!=n?n:"".concat(ho[r].value,"Api");var l=i?"__fields":"".concat(ho[r].value,"Fields"),d=["Edit","Insert"].includes(r)||o&&"List"===r,u=["View","List"].includes(r);return[].concat(o&&"List"!==r?this.makeSourceSettingForm({feat:r,inScaffold:c,inCrud:o}):null).concat([{type:"combo",className:"mb-0 ae-Fields-Setting",joinValues:!1,name:l,label:o?"".concat(ho[r].label,"字段"):f("9caecd931b956381e0763d05aa42835c"),multiple:!0,draggable:!0,addable:!1,removable:!1,itemClassName:"ae-Fields-Setting-Item",hidden:i||!o||["Delete","BulkDelete"].includes(r),items:{type:"container",body:[{name:"checked",label:!1,mode:"inline",className:"m-0 ml-1",type:"checkbox"},{type:"tpl",className:"ae-Fields-Setting-Item-label",tpl:"${label}"}]}},{type:"input-table",label:f("9caecd931b956381e0763d05aa42835c"),className:"mb-0",name:l,visible:null!=i?i:!o,removable:!0,columnsTogglable:!1,needConfirm:!1,onChange:function(e,n,r,o){return t.onFieldsInit(e,o)},columns:[{type:"switch",name:"checked",value:!0,label:f("47cd88592f6ef2b258f02c0690d267ed"),visible:!1},{type:"input-text",name:"label",label:f("32c65d8d7431e76029678ec7bb73a5ab")},{type:"input-text",name:"name",label:f("020586d0c69f8211840ddf9ee9bbf6ab")},{type:"select",name:"type",label:f("226b0912184333c81babf2f1894ec0c1"),visible:u,value:"tpl",options:[{value:"tpl",label:f("97d07614380da93d257f9fbf81aa56fb"),typeKey:"tpl"},{value:"image",label:f("20def7942674282277c3714ed7ea6ce0"),typeKey:"src"},{value:"date",label:f("4ff1e74e43a3586339251494117185ad"),typeKey:"value"},{value:"progress",label:f("c7bff79d059a0b7ff9b02441959d8be2"),typeKey:"value"},{value:"status",label:f("3fea7ca76cdece641436d7ab0d02ab1b"),typeKey:"value"},{value:"mapping",label:f("9da188491dd34c4382a5b9f006194e41"),typeKey:"value"}],autoFill:{typeKey:"${typeKey}"}},{type:"select",name:"inputType",label:f("b3e55578af5dd473bab62641bb2f5f8e"),visible:d,value:"input-text",options:[{label:f("9b6425cd2d496c9cb5a6c6b8ff125d1b"),value:"input-text"},{label:f("15d169d28cd48c97fe751e4cc92ca926"),value:"textarea"},{label:f("9597dcaf432ceba92a160d61cb1ef65f"),value:"input-number"},{label:f("9913107b19cb6012250134ff91377430"),value:"radios"},{label:f("454e60f5759903d7d3dba58e3f9bd590"),value:"checkbox"},{label:f("db98f889ce6bc235e66bd4b2a788d137"),value:"checkboxes"},{label:f("006ded9fa277cf030592021f595a07d5"),value:"select"},{label:f("a6beb974cc0b50eebd18120b8110a88b"),value:"switch"},{label:f("4ff1e74e43a3586339251494117185ad"),value:"input-date"},{label:f("b339aa87104709397ba68e7ebbc6e5ba"),value:"input-table"},{label:f("481e034e6026969aae4ce7ce7c8a7b6f"),value:"input-file"},{label:f("6bfb9bb2218ff32b6139e98bc93707c0"),value:"input-image"},{label:f("24b6d4c0892a8f3ee2a982e3ab0afe38"),value:"input-rich-text"}]}]},{type:"group",visible:null!=i?i:!o,label:"",body:[{type:"grid",columns:[{body:[{type:"button",label:f("4484fa04e7b71db4c8293e5bcb53eca4"),target:l,className:"ae-Button--link",level:"link",icon:"plus",actionType:"add"}]},{columnClassName:"text-right",body:[{type:"button",label:f("4cc6a76c146c0360a41ceaf5e212c891"),visible:"Edit"===r||"List"===r,className:"ae-Button--link",level:"link",onClick:function(e,i){return(0,s.mG)(t,void 0,void 0,(function(){var e,t,c,d,u,p,h,v,m,b;return(0,s.Jh)(this,(function(g){switch(g.label){case 0:return e=i.data,t=(0,P.dU)(window.editorStore).schemaFilter,c=e["Edit"!==r||o?n:"initApi"],t&&(c=t({api:c}).api),c||a.Am.warning(f("a9fea442707e26dee478b34a2f2ce263")),[4,i.env.fetcher(c,e)];case 1:return d=g.sent(),u=[],"List"===r?(h=(null===(m=d.data)||void 0===m?void 0:m.rows)||(null===(b=d.data)||void 0===b?void 0:b.items),p=null==h?void 0:h[0]):p=d.data,p?(Object.entries(p).forEach((function(e){var t=(0,s.CR)(e,2),n=t[0],r=t[1];u.push({label:n,type:"tpl",inputType:"number"==typeof r?"input-number":"input-text",name:n})})),i.formStore.setValues(((v={})[l]=u,v)),this.onFieldsInit(u,i.formStore)):a.Am.warning(f("91aa2166ee4811414381c8d94e6567e6")),[2]}}))}))}}]}]}]}])},t.prototype.makeFieldFilterSetting=function(e){return(0,s.mG)(this,void 0,void 0,(function(){return(0,s.Jh)(this,(function(e){return[2,[]]}))}))},t.prototype.resolveSourceSchema=function(e){var t=e.name,n=e.setting,r=e.schema,o=e.feat;r[t=null!=t?t:"api"]=n[o?"".concat(ho[o].value,"Api"):"api"],"Edit"===o&&(r.initApi=n.initApi)},t.prototype.resolveViewSchema=function(e){var t=e.setting,n=e.feat;return(t["".concat(ho[void 0===n?"Edit":n].value,"Fields")]||[]).filter((function(e){return e.checked})).map((function(e){var t;return(t={type:e.type})[e.typeKey||"value"]="${"+e.name+"}",t}))},t.prototype.resolveTableSchema=function(e){var t=e.schema,n=e.setting.listFields.filter((function(e){return e.checked}))||[];t.columns=this.makeTableColumnsByFields(n)},t.prototype.makeTableColumnsByFields=function(e){return e.map((function(e){var t;return(t={type:e.type,title:e.label,name:e.name})[e.typeKey||"value"]="${"+e.name+"}",t}))},t.prototype.resolveCreateSchema=function(e){var t=e.schema,n=e.setting,r=e.feat,o=e.name,i=n["".concat(ho[r].value,"Fields")]||[];t[null!=o?o:"api"]=n[ho[r].value+"Api"],t.initApi=n.initApi,t.body=i.filter((function(e){return e.checked})).map((function(e){return{type:e.inputType,name:e.name,label:e.label}}))},t.prototype.resolveDeleteSchema=function(e){var t,n=e.schema,r=e.setting,o=e.feat;n.onEvent=Object.assign(null!==(t=n.onEvent)&&void 0!==t?t:{},{click:{actions:[]}});var i=(0,s.pi)({},r["".concat(ho[o].value,"Api")]||{});i.data="Delete"===o?{id:"${item.id}"}:{ids:"${ARRAYMAP(selectedItems, item=> item.id)}"},n.onEvent.click.actions.push({actionType:"ajax",args:{api:i}})},t.prototype.resolveSimpleFilterSchema=function(e){return(e.setting.simpleQueryFields||[]).filter((function(e){return e.checked})).map((function(e){return{type:e.inputType,name:e.name,label:e.label}}))},t.prototype.resolveAdvancedFilterSchema=function(e){},t.type="api",t.accessable=function(e,t){return!0},t}((function(){}))),function(e){(0,s.ZT)((function(){return null!==e&&e.apply(this,arguments)||this}),e)}(it),function(e){function t(t){var n=e.call(this,t)||this;return n.manager.on("build-panels",n.buildPanels),n}(0,s.ZT)(t,e),t.prototype.componentWillUnmount=function(){this.manager.off("build-panels",this.buildPanels)},t.prototype.buildPanels=function(e){var t=e.context.data;Array.isArray(t)&&t.splice(0,t.length)},t.prototype.render=function(){var e=this.props,t=e.preview,n=e.className,r=e.theme,o=e.data,i=e.isMobile,a=e.autoFocus,l=e.previewProps;return c.createElement("div",{className:v()("ae-Editor",{preview:t},n)},c.createElement("div",{className:"ae-Editor-inner",onContextMenu:this.handleContextMenu},c.createElement("div",{className:"ae-Main"},c.createElement(Nn,(0,s.pi)({},l,{isMobile:i,editable:!t,store:this.store,manager:this.manager,theme:r,data:o,autoFocus:a})))),c.createElement($r,{store:this.store,manager:this.manager,theme:r}),c.createElement(Vr,{store:this.store,manager:this.manager,theme:r}))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[Object]),(0,s.w6)("design:returntype",void 0)],t.prototype,"buildPanels",null)}(Gr),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,s.ZT)(t,e),t.prototype.UNSAFE_componentWillMount=function(){var e=this,t=this.props;t.data,t.path;var n=t.widthMutable,r=(0,s._T)(t,["data","path","widthMutable"]),o=this.context;this.editorNode=o.addChild({id:r.id,type:r.type,label:r.name,path:this.props.path,schemaPath:r.schemaPath,info:r,getData:function(){return e.props.data},widthMutable:n,memberIndex:r.memberIndex})},t.prototype.componentDidMount=function(){this.markDom(this.editorNode.id)},t.prototype.componentDidUpdate=function(){this.markDom(this.editorNode.id)},t.prototype.componentWillUnmount=function(){this.editorNode&&(0,P.fh)(this.editorNode)&&this.context.removeChild(this.editorNode)},t.prototype.markDom=function(e){var t=(0,o.findDOMNode)(this);if(t){var n=this.editorNode.info,r=n.wrapperResolve?n.wrapperResolve(t):t;(Array.isArray(r)?r:r?[r]:[]).forEach((function(t){return t.setAttribute("data-editor-id",e)}))}},t.prototype.render=function(){return c.createElement(ct.Provider,{value:this.editorNode},this.props.children)},t.contextType=ct}(c.Component);var mo,bo=[{title:f("79d3abe929f67f0644a78bf32adb3a89"),letters:["⌘","c"],tooltip:f("b7d817611230d382f6ef92b41848a342")},{title:f("eafbece1016a6af76cce466e55ad9f00"),letters:["⌘","v"],tooltip:f("e0b9bb8e41eccd3ce6b282664643d7f8")},{title:f("43fc77886b7fbcd658f0ccdba36bd5a0"),letters:["⌘","x"],tooltip:f("a6be4ad12e9612811963c44466af3218")},{title:f("bd9fcf46b4e5993f97fe04ee9ebcd7ed"),letters:["⌘","z"],tooltip:f("58887132871b71b015c3a391e7755815")},{title:f("c3c873d33f1c6482c79b0ffd862786cd"),letters:["⌘","Shift","z"],tooltip:f("58887132871b71b015c3a391e7755815")},{title:f("be5fbbe34ce9979bfb6576d9eddc5612"),letters:["⌘","s"],tooltip:f("1f81fd4598e9151538f29c41b8aa0020")},{title:f("645dbc5504e722a30896486085a06b32"),letters:["⌘","p"],tooltip:f("5bc425ac8b75c571093a63eb6073c354")},{title:f("2f4aaddde33c9b93c36fd2503f3d122b"),letters:["Delete"],tooltip:f("426cd14ebd62a4922186527d07ba37f3")},{title:f("2f4aaddde33c9b93c36fd2503f3d122b"),letters:["Backspace"],tooltip:f("426cd14ebd62a4922186527d07ba37f3")},{title:f("499e58e764420aeed2d1476a56d8fa34"),letters:["⌘","↑"],tooltip:f("d040485f0e3887f0b297f8f772db03e4")},{title:f("08ad565f066d30572d1f8e2ee17cbe12"),letters:["⌘","↓"],tooltip:f("6348dc0e83d6ab391a8816f67d0e5ceb")}],go=(function(e){function t(t){var n=e.call(this,t)||this;return n.state={visible:!1},n}(0,s.ZT)(t,e),t.prototype.closeShortcutKeyModal=function(){this.setState({visible:!1})},t.prototype.showShortcutKeyModal=function(){this.setState({visible:!0})},t.prototype.render=function(){var e=this.props,t=e.title,n=e.size,r=e.closeOnEsc,o=e.closeOnOutside,i=this.props.ShortcutKeyList||bo;return c.createElement(c.Fragment,null,c.createElement("div",{className:"shortcut-icon-btn","editor-tooltip":"点击查看当前可用快捷键","tooltip-position":"bottom"},c.createElement(a.JO,{icon:"editor-shortcut",onClick:this.showShortcutKeyModal})),c.createElement(a.u_,{size:n||"xs",show:this.state.visible,closeOnEsc:null==r||r,closeOnOutside:null==o||o,onHide:this.closeShortcutKeyModal,contentClassName:"shortcut-list-modal"},c.createElement("div",{className:"shortcut-modal-header"},c.createElement("div",{className:"shortcut-modal-title"},t||f("9c3f1278ffa822835bb3a677f02bca27")),c.createElement(a.JO,{icon:"close",className:"shortcut-modal-icon",onClick:this.closeShortcutKeyModal})),c.createElement("div",{className:"shortcut-modal-body"},i&&i.length>0&&c.createElement("div",{className:"shortcut-list"},i.map((function(e,t){return c.createElement("div",{className:"shortcut-item",key:t},e.tooltip&&c.createElement("div",{className:"shortcut-title","editor-tooltip":e.tooltip},e.title),!e.tooltip&&c.createElement("div",{className:"shortcut-title"},e.title),c.createElement("div",{className:"shortcut-letters"},e.letters.map((function(e){return c.createElement("div",{className:"shortcut-letter",key:e},e)}))))}))),!i||0===i.length&&c.createElement("span",null,"暂无快捷键"))))},(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"closeShortcutKeyModal",null),(0,s.gn)([_e,(0,s.w6)("design:type",Function),(0,s.w6)("design:paramtypes",[]),(0,s.w6)("design:returntype",void 0)],t.prototype,"showShortcutKeyModal",null)}(c.Component),n(23449),n(65637),n(52064),n(16923),n(94578)),yo=(mo=function(e){function t(){return e.apply(this,arguments)||this}return(0,go.Z)(t,e),t.prototype.render=function(){var e=this.props.target;return c.createElement("p",null,"Hello ",e,"! @amis-editor")},t}(c.Component),mo.defaultProps={target:"world"},mo);yo=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}([(0,i.Thl)({test:/\bmy-renderer$/,name:"my-renderer"})],yo),function(e,t,n){if(!location.hash||parent===window)throw new Error(f("283c2a52955ad87574fd6c0cc932c443"));var r=location.hash.substring(1);1===t.render.length?t.render(c.createElement(xn,{bridgeName:r,envCreator:n})):t.render(c.createElement(xn,{bridgeName:r,envCreator:n}),e),window.onunload=function(){(0,o.unmountComponentAtNode)(e)}}(document.getElementById("root"),o)},27681:function(e,t,n){var r,o;o=function(e){var t=["N","E","A","D"];function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function o(e,t,n){o.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,n){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function c(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e}function l(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function d(e){var t=0;if(0===e.length)return t;for(var n=0;n0&&f[f.length-1].lhs&&Object.getOwnPropertyDescriptor(f[f.length-1].lhs,d),O="undefined"!==C||f&&f.length>0&&f[f.length-1].rhs&&Object.getOwnPropertyDescriptor(f[f.length-1].rhs,d);if(!S&&O)n.push(new i(v,t));else if(!O&&S)n.push(new a(v,e));else if(l(e)!==l(t))n.push(new o(v,e,t));else if("date"===l(e)&&e-t!=0)n.push(new o(v,e,t));else if("object"===E&&null!==e&&null!==t){for(b=f.length-1;b>-1;--b)if(f[b].lhs===e){w=!0;break}if(w)e!==t&&n.push(new o(v,e,t));else{if(f.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return u(e)-u(t)})),t.sort((function(e,t){return u(e)-u(t)}))),b=t.length-1,g=e.length-1;b>g;)n.push(new s(v,b,new i(void 0,t[b--])));for(;g>b;)n.push(new s(v,g,new a(void 0,e[g--])));for(;b>=0;--b)p(e[b],t[b],n,r,v,b,f,h)}else{var x=Object.keys(e),I=Object.keys(t);for(b=0;b=0?(p(e[y],t[y],n,r,v,y,f,h),I[w]=null):p(e[y],void 0,n,r,v,y,f,h);for(b=0;b=0&&"comment"===(s=e.members[c]).type;)c--;"comment"!==i.type?(t&&(t[n.length]=[r.length?r:0]),n.push(o(i)),r=[]):t&&"comment"!==(null==s?void 0:s.type)&&(null==s?void 0:s.range.end.line)===i.range.start.line?(t[n.length-1][1]=t[n.length-1][1]||[],t[n.length-1][1].push(o(i))):r.push(o(i))})),r.length&&t&&(t.$$=r),n}(e,t);if("object"===e.type)return function(e){var t={};t.$$comments=t.$$comments||{};var n=[];return e.members.forEach((function(r,i){var a,s,c;if("comment"!==r.type){var l=i>0?e.members[i-1]:null,d=null===(a=l)||void 0===a?void 0:a.key.filter((function(e){return"comment"!==e.type}))[0],u=d?o(d):"",p=null===(s=l)||void 0===s?void 0:s.value.filter((function(e){return"comment"!==e.type}))[0],f=[],h=[],v=[],m=[],b=null,g=null;r.key.forEach((function(e){"comment"!==e.type?b=e:b?h.push(o(e)):p&&(null==e?void 0:e.range.start.line)===(null==p?void 0:p.range.end.line)?(t.$$comments[u][4]=t.$$comments[u][4]||[],t.$$comments[u][4].push(o(e))):f.push(o(e))})),r.value.forEach((function(e){"comment"!==e.type?g=e:g?m.push(o(e)):v.push(o(e))}));var y=o(b);"array"===(null===(c=g)||void 0===c?void 0:c.type)?(t.$$comments["$"+y]={},t[y]=o(g,t.$$comments["$"+y])):t[y]=o(g),t.$$comments[y]=[f.length?f:0,h.length?h:0,v.length?v:0,m.length?m:0]}else n.push(o(r))})),n.length&&(t.$$comments=t.$$comments||{},t.$$comments.$$=n),function(e){e.$$comments&&(Object.keys(e.$$comments).forEach((function(t){var n=e.$$comments[t];if("$"===t[0]&&c(n)){var r=Object.keys(n);r.length&&r.forEach((function(e){if("$$"!==e){for(var t=n[e],r=t.length;r-- >0&&!t[r];)t.splice(r,1);t.length||delete n[e]}})),Object.keys(n).length||delete e.$$comments[t]}else if(Array.isArray(n)){for(var o=n.length;o-- >0&&!n[o];)n.splice(o,1);n.length||delete e.$$comments[t]}})),Object.keys(e.$$comments).length||delete e.$$comments)}(t),t}(e);throw new Error("Unknown ast type: "+e.type)}t.Qc=function(e){return o(r.parse(e))},t.Pz=function(e){return s(e)};var i=2;function a(e){for(var t="";e-- >0;)t+=" ";return t}function s(e,t,n){if(void 0===t&&(t=0),c(e)){var r=e.$$comments,o=Object.keys(e),l=o.indexOf("$$comments");~l&&o.splice(l,1);var d=o.length,u=["{"];if(o.forEach((function(n,o){var c=null==r?void 0:r[n],l=e[n],p="",f="";c?(p=(c[0]?c[0].join(""):"")+'"'+n+'"',f=(c[1]?c[1].join(""):"")+":"+(c[2]?c[2].join(""):" ")+s(l,t+i,null==r?void 0:r["$"+n])+(c[3]?c[3].join("").replace(/\n *$/,""):"")+(d-1===o?"":",")+(c[4]?c[4].join("").replace(/\n *$/,""):""),p=p.replace(/^\n/,"").replace(/(\n|^) *?([^\s])/g,(function(e,n,r){return""+n+a(t+i)+("*"===r?" *":r)}))):(p=a(t+i)+'"'+n+'"',f=": "+s(l,t+i,null==r?void 0:r["$"+n])+(d-1===o?"":",")),u.push(p+f)})),Array.isArray(null==r?void 0:r.$$)){var p=(""+r.$$.join("")).trim().replace(/(\n|^) *?([^\s])/g,(function(e,n,r){return""+n+a(t+i)+("*"===r?" *":r)}));u.push(p)}return u.push(a(t)+"}"),u.join("\n")}if(Array.isArray(e)){var f=["["],h=e.length;return e.forEach((function(e,r){var o=null==n?void 0:n[r];if(Array.isArray(o)){var c=""+(o[0]?o[0].join("").replace(/^\n/,""):""),l=s(e,t+i)+(h-1===r?"":",")+(o[1]?o[1].join(""):"");c=(c+l.substring(0,1)).replace(/^\n/,"").replace(/(\n|^) *?([^\s])/g,(function(e,n,r){return""+n+a(t+i)+("*"===r?" *":r)})),f.push(c+l.substring(1))}else f.push(a(t+i)+s(e,t+i)+(h-1===r?"":","))})),Array.isArray(null==n?void 0:n.$$)&&f.push(n.$$.join("").replace(/^\n|\n$/g,"").replace(/(\n|^) *?([^\s])/g,(function(e,n,r){return""+n+a(t+i)+("*"===r?" *":r)}))),f.push(a(t)+"]"),f.join("\n")}return JSON.stringify(e,null,i)}function c(e){return"[object Object]"===Object.prototype.toString.call(e)}},65632:function(e,t){var n=function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,13],n=[1,14],r=[1,15],o=[1,16],i=[1,17],a=[1,18],s=[1,19],c=[1,20],l=[5,17,21,26],d=[5,17,21,26,30],u=[5,7,9,10,12,14,16,17,21,22,25,26,30],p=[17,21],f=[21,26],h={trace:function(){},yy:{},symbols_:{error:2,json_document:3,json_document_body:4,EOF:5,json_null_literal:6,NULLTOKEN:7,json_boolean_literal:8,TRUETOKEN:9,FALSETOKEN:10,json_string:11,STRING_LITERAL:12,json_number:13,NUMBER_LITERAL:14,json_object:15,"{":16,"}":17,json_comments:18,json_member_list:19,json_member:20,",":21,":":22,json_with_comments_value:23,json_array:24,"[":25,"]":26,json_element_list:27,json_value:28,json_comment:29,COMMENTS:30,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",7:"NULLTOKEN",9:"TRUETOKEN",10:"FALSETOKEN",12:"STRING_LITERAL",14:"NUMBER_LITERAL",16:"{",17:"}",21:",",22:":",25:"[",26:"]",30:"COMMENTS"},productions_:[0,[3,2],[6,1],[8,1],[8,1],[11,1],[13,1],[15,2],[15,3],[15,3],[19,1],[19,3],[20,3],[20,4],[20,4],[20,5],[24,2],[24,3],[24,3],[27,1],[27,3],[28,1],[28,1],[28,1],[28,1],[28,1],[28,1],[29,1],[18,1],[18,2],[23,1],[23,2],[23,2],[23,3],[4,1]],performAction:function(e,t,n,r,o,i,a){var s,c,l,d=i.length-1;switch(o){case 1:return{type:"document",body:i[d-1],range:v(n,e)};case 2:this.$={type:"null",value:null,range:v(n,e)};break;case 3:this.$={type:"boolean",value:!0,range:v(n,e)};break;case 4:this.$={type:"boolean",value:!1,range:v(n,e)};break;case 5:this.$={type:"string",value:(s=i[d].substring(1,i[d].length-1),c=i[d].substring(0,1),l="`"===c?/\\([\\bfnrtv`\$])/g:'"'===c?/\\([\"\\bfnrtv])/g:/\\([\'\\bfnrtv])/g,s.replace(l,(function(e,t){return"b"===t?"\b":"f"===t?"\f":"n"===t?"\n":"r"===t?"\r":"t"===t?"\t":"v"===t?"\v":t}))),range:v(n,e)};break;case 6:this.$={type:"number",value:/\./.test(i[d])?parseFloat(i[d]):parseInt(i[d],10),raw:i[d],range:v(n,e)};break;case 7:this.$={type:"object",members:[],range:v(n,e)};break;case 8:case 9:this.$={type:"object",members:i[d-1],range:v(n,e)};break;case 10:case 28:case 30:this.$=[i[d]];break;case 11:case 20:this.$=i[d-2].concat(i[d]);break;case 12:this.$={type:"property",key:[i[d-2]],value:i[d],range:v(n,e)};break;case 13:this.$={type:"property",key:i[d-3].concat(i[d-2]),value:i[d],range:v(n,e)};break;case 14:this.$={type:"property",key:[i[d-3]].concat(i[d-2]),value:i[d],range:v(n,e)};break;case 15:this.$={type:"property",key:i[d-4].concat(i[d-3]).concat(i[d-2]),value:i[d],range:v(n,e)};break;case 16:this.$={type:"array",members:[],range:v(n,e)};break;case 17:case 18:this.$={type:"array",members:i[d-1],range:v(n,e)};break;case 19:case 34:this.$=i[d];break;case 27:this.$={type:"comment",value:i[d],range:v(n,e)};break;case 29:case 31:this.$=i[d-1].concat(i[d]);break;case 32:this.$=[i[d-1]].concat(i[d]);break;case 33:this.$=i[d-2].concat(i[d-1]).concat(i[d])}},table:[{3:1,4:2,6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:5,23:3,24:11,25:s,28:4,29:12,30:c},{1:[3]},{5:[1,21]},{5:[2,34]},e(l,[2,30],{29:12,18:22,30:c}),{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,24:11,25:s,28:23,29:24,30:c},e(d,[2,21]),e(d,[2,22]),e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(u,[2,28]),e(d,[2,2]),e(d,[2,3]),e(d,[2,4]),e([5,17,21,22,26,30],[2,5]),e(d,[2,6]),{11:29,12:o,17:[1,25],18:26,19:27,20:28,29:12,30:c},{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:32,23:33,24:11,25:s,26:[1,30],27:31,28:4,29:12,30:c},e(u,[2,27]),{1:[2,1]},e(l,[2,32],{29:24,30:c}),e(l,[2,31],{29:12,18:34,30:c}),e(u,[2,29]),e(d,[2,7]),{11:36,12:o,17:[1,35],29:24,30:c},{17:[1,37],21:[1,38]},e(p,[2,10]),{18:40,22:[1,39],29:12,30:c},e(d,[2,16]),{21:[1,42],26:[1,41]},{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,24:11,25:s,26:[1,43],28:23,29:24,30:c},e(f,[2,19]),e(l,[2,33],{29:24,30:c}),e(d,[2,8]),{18:45,22:[1,44],29:12,30:c},e(d,[2,9]),{11:29,12:o,18:47,20:46,29:12,30:c},{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:5,23:48,24:11,25:s,28:4,29:12,30:c},{22:[1,49],29:24,30:c},e(d,[2,17]),{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:5,23:50,24:11,25:s,28:4,29:12,30:c},e(d,[2,18]),{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:5,23:51,24:11,25:s,28:4,29:12,30:c},{22:[1,52],29:24,30:c},e(p,[2,11]),{11:36,12:o,29:24,30:c},e(p,[2,12]),{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:5,23:53,24:11,25:s,28:4,29:12,30:c},e(f,[2,20]),e(p,[2,13]),{6:6,7:t,8:7,9:n,10:r,11:8,12:o,13:9,14:i,15:10,16:a,18:5,23:54,24:11,25:s,28:4,29:12,30:c},e(p,[2,14]),e(p,[2,15])],defaultActions:{3:[2,34],21:[2,1]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],r=[null],o=[],i=this.table,a="",s=0,c=0,l=0,d=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);u.setInput(e,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var h=u.yylloc;o.push(h);var v,m=u.options&&u.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,g,y,w,E,C,S,O,x,I={};;){if(y=n[n.length-1],this.defaultActions[y]?w=this.defaultActions[y]:(null==b&&(v=void 0,"number"!=typeof(v=u.lex()||1)&&(v=t.symbols_[v]||v),b=v),w=i[y]&&i[y][b]),void 0===w||!w.length||!w[0]){var N;for(C in x=[],i[y])this.terminals_[C]&&C>2&&x.push("'"+this.terminals_[C]+"'");N=u.showPosition?"Parse error on line "+(s+1)+":\n"+u.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(N,{text:u.match,token:this.terminals_[b]||b,line:u.yylineno,loc:h,expected:x})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+b);switch(w[0]){case 1:n.push(b),r.push(u.yytext),o.push(u.yylloc),n.push(w[1]),b=null,g?(b=g,g=null):(c=u.yyleng,a=u.yytext,s=u.yylineno,h=u.yylloc,l>0&&l--);break;case 2:if(S=this.productions_[w[1]][1],I.$=r[r.length-S],I._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},m&&(I._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(I,[a,c,s,p.yy,w[1],r,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),r.push(I.$),o.push(I._$),O=i[n[n.length-2]][n[n.length-1]],n.push(O);break;case 3:return!0}}return!0}};function v(e,t){return{start:{line:e-t.replace(/^\s+/,"").split(/(?:\r\n|\n|\r)/).length+1},end:{line:e}}}var m={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;it[0].length)){if(t=n,r=i,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,o[i])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:return 12;case 2:return 7;case 3:return 9;case 4:return 10;case 5:return 14;case 6:return"/";case 7:return"*";case 8:return 22;case 9:return 25;case 10:return 26;case 11:return 16;case 12:return 17;case 13:return";";case 14:return 21;case 15:case 16:return 30;case 17:return 5;case 18:return"INVALID";case 19:console.log(t.yytext)}},rules:[/^(?:\s+)/,/^(?:("((\\([\'\"\\bfnrtv]))|([^\"\\]))*"))/,/^(?:null)/,/^(?:true)/,/^(?:false)/,/^(?:((([-+]?([0]|(([1-9])([0-9])*))\.([0-9])*(([eE])([-+]?([0-9])))?)|([-+]?\.([0-9])(([eE])([-+]?([0-9])))?)|([-+]?([0]|(([1-9])([0-9])*))(([eE])([-+]?([0-9])))?))))/,/^(?:\/)/,/^(?:\*)/,/^(?::)/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:,)/,/^(?:\s*\/\/.*\s*)/,/^(?:\s*[/][*][^*]*[*]+([^/*][^*]*[*]+)*[/]\s*)/,/^(?:$)/,/^(?:.)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],inclusive:!0}}};function b(){this.yy={}}return h.lexer=m,b.prototype=h,h.Parser=b,new b}();t.parser=n,t.Parser=n.Parser,t.parse=function(){return n.parse.apply(n,arguments)}},18446:function(e,t,n){var r=n(90939);e.exports=function(e,t){return r(e,t)}},10928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},82492:function(e,t,n){var r=n(42980),o=n(21463)((function(e,t,n){r(e,t,n)}));e.exports=o},57557:function(e,t,n){var r=n(29932),o=n(85990),i=n(57406),a=n(71811),s=n(98363),c=n(60696),l=n(99021),d=n(46904),u=l((function(e,t){var n={};if(null==e)return n;var l=!1;t=r(t,(function(t){return t=a(t,e),l||(l=t.length>1),t})),s(e,d(e),n),l&&(n=o(n,7,c));for(var u=t.length;u--;)i(n,t[u]);return n}));e.exports=u},31351:function(e){var t=Array.prototype.reverse;e.exports=function(e){return null==e?e:t.call(e)}},44908:function(e,t,n){var r=n(45652);e.exports=function(e){return e&&e.length?r(e):[]}},29323:function(e,t,n){"use strict";n.d(t,{Pi:function(){return A}});var r=n(22188),o=n(67294),i=n(13271),a=0,s={};function c(e){return s[e]||(s[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+a+")";return a++,t}(e)),s[e]}function l(e,t){if(d(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o2?r-2:0),i=2;i"}function x(e){var t=this;if(!0===(0,i.FY)())return e.call(this);u(this,E,!1),u(this,C,!1);var n=O(this),a=e.bind(this),s=!1,c=new r.le(n+".render()",(function(){if(!s&&(s=!0,!0!==t[w])){var e=!0;try{u(t,C,!0),t[E]||o.Component.prototype.forceUpdate.call(t),e=!1}finally{u(t,C,!1),e&&c.dispose()}}}));function l(){s=!1;var e=void 0,t=void 0;if(c.track((function(){try{t=(0,r.$$)(!1,a)}catch(t){e=t}})),e)throw e;return t}return c.reactComponent=this,l[g]=c,this.render=l,l.call(this)}function I(e,t){return(0,i.FY)()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||!l(this.props,e)}function N(e,t){var n=c("reactProp_"+t+"_valueHolder"),o=c("reactProp_"+t+"_atomHolder");function i(){return this[o]||u(this,o,(0,r.cp)("reactive "+t)),this[o]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return r.wM&&r.mJ&&(e=(0,r.wM)(!0)),i.call(this).reportObserved(),r.wM&&r.mJ&&(0,r.mJ)(e),this[n]},set:function(e){this[C]||l(this[n],e)?u(this,n,e):(u(this,n,e),u(this,E,!0),i.call(this).reportChanged(),u(this,E,!1))}})}var k="function"==typeof Symbol&&Symbol.for,R=k?Symbol.for("react.forward_ref"):"function"==typeof o.forwardRef&&(0,o.forwardRef)((function(e){return null})).$$typeof,P=k?Symbol.for("react.memo"):"function"==typeof o.memo&&(0,o.memo)((function(e){return null})).$$typeof;function A(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),P&&e.$$typeof===P)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(R&&e.$$typeof===R){var t=e.render;if("function"!=typeof t)throw new Error("render property of ForwardRef was not a function");return(0,o.forwardRef)((function(){var e=arguments;return(0,o.createElement)(i.Qj,null,(function(){return t.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(o.Component,e)?S(e):(0,i.Pi)(e)}if(!o.Component)throw new Error("mobx-react requires React to be available");if(!r.LO)throw new Error("mobx-react requires mobx to be available")},67090:function(e,t,n){"use strict";n.d(t,{G_:function(){return g},UF:function(){return a},V5:function(){return Tt},dU:function(){return C},fh:function(){return E},ls:function(){return ke},ob:function(){return w},pj:function(){return S},vM:function(){return b},yj:function(){return y}});var r,o=n(22188),i="warn";function a(e){i=e}function s(){return i}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(r||(r={}));var c=function(e,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},c(e,t)};function l(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function h(){for(var e=[],t=0;t";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")},t.prototype.die=function(){this.isAlive&&this.state!==G.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.finalizeCreation=function(){this.baseFinalizeCreation()},t.prototype.aboutToDie=function(){this.baseAboutToDie()},t.prototype.finalizeDeath=function(){this.baseFinalizeDeath()},t.prototype.fireHook=function(e){this.fireInternalHook(e)},u([o.aD],t.prototype,"die",null),t}(x),N=1,k={onError:function(e){throw e}},R=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r,o)||this;if(a.nodeId=++N,a.isProtectionEnabled=!0,a._autoUnbox=!0,a._isRunningAction=!1,a._hasSnapshotReaction=!1,a._observableInstanceState=0,a._cachedInitialSnapshotCreated=!1,a.unbox=a.unbox.bind(a),a._initialSnapshot=i,a.identifierAttribute=t.identifierAttribute,n||(a.identifierCache=new Q),a._childNodes=t.initializeChildNodes(a,a._initialSnapshot),a.identifier=null,a.unnormalizedIdentifier=null,a.identifierAttribute&&a._initialSnapshot){var s=a._initialSnapshot[a.identifierAttribute];if(void 0===s){var c=a._childNodes[a.identifierAttribute];c&&(s=c.value)}if("string"!=typeof s&&"number"!=typeof s)throw pe("Instance identifier '"+a.identifierAttribute+"' for type '"+a.type.name+"' must be a string or a number");a.identifier=Rt(s),a.unnormalizedIdentifier=s}return n?n.root.identifierCache.addNodeToCache(a):a.identifierCache.addNodeToCache(a),a}return l(t,e),t.prototype.applyPatches=function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)},t.prototype.applySnapshot=function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)},t.prototype.createObservableInstanceIfNeeded=function(){0===this._observableInstanceState&&this.createObservableInstance()},t.prototype.createObservableInstance=function(){var e,t;this._observableInstanceState=1;for(var n=[],i=this.parent;i&&0===i._observableInstanceState;)n.unshift(i),i=i.parent;try{for(var a=p(n),s=a.next();!s.done;s=a.next())s.value.createObservableInstanceIfNeeded()}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}var c=this.type;try{this.storedValue=c.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,c.finalizeNewInstance(this,this.storedValue)}catch(e){throw this.state=G.DEAD,e}finally{this._isRunningAction=!1}this._observableInstanceState=2,(0,o.qp)(this,"snapshot").trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=de,this.state=G.CREATED,this.fireHook(r.afterCreate),this.finalizeCreation()},Object.defineProperty(t.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),t.prototype.clearParent=function(){if(this.parent){this.fireHook(r.beforeDetach);var e=this.state;this.state=G.DETACHING;var t=this.root,n=t.environment,o=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=o}finally{this.state=e}}},t.prototype.setParent=function(e,t){var n=e!==this.parent,o=t!==this.subpath;(n||o)&&(n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(r.afterAttach)):o&&this.baseSetParent(this.parent,t))},t.prototype.fireHook=function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[e];"function"==typeof n&&(o.vB?(0,o.vB)((function(){n.apply(t.storedValue)})):n.apply(this.storedValue))},Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),t.prototype.getSnapshot=function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath},t.prototype._getActualSnapshot=function(){return this.type.getSnapshot(this)},t.prototype._getCachedInitialSnapshot=function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot},t.prototype.isRunningAction=function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()},t.prototype.assertAlive=function(e){var t,n=s();if(!this.isAlive&&"ignore"!==n){var r=this._getAssertAliveError(e);switch(n){case"error":throw pe(r);case"warn":t=r,console.warn(new Error("[mobx-state-tree] "+t))}}},t.prototype._getAssertAliveError=function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&Ae(e.subpath)||"",r=e.actionContext||z();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var o,i="";return r&&null!=r.name&&(i=(r&&r.context&&(re(o=r.context,1),oe(o).path)||t)+"."+r.name+"()"),"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+i+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."},t.prototype.getChildNode=function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}},t.prototype.getChildren=function(){this.assertAlive(de),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):ce(this._childNodes)}finally{this._autoUnbox=!0}},t.prototype.getChildType=function(e){return this.type.getChildType(e)},Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),t.prototype.assertWritable=function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw pe("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")},t.prototype.removeChild=function(e){this.type.removeChild(this,e)},t.prototype.unbox=function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e},t.prototype.toString=function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")},t.prototype.finalizeCreation=function(){var e=this;this.baseFinalizeCreation((function(){var t,n;try{for(var o=p(e.getChildren()),i=o.next();!i.done;i=o.next())i.value.finalizeCreation()}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}e.fireInternalHook(r.afterCreationFinalization)}))},t.prototype.detach=function(){if(!this.isAlive)throw pe("Error while detaching, node is not alive.");this.clearParent()},t.prototype.preboot=function(){var e=this;this._applyPatches=H(this.storedValue,"@APPLY_PATCHES",(function(t){t.forEach((function(t){var n=function(e){var t=e.split("/").map(Te);if(!(""===e||"."===e||".."===e||Oe(e,"/")||Oe(e,"./")||Oe(e,"../")))throw pe("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}(t.path);se(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)}))})),this._applySnapshot=H(this.storedValue,"@APPLY_SNAPSHOT",(function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)})),we(this.storedValue,"$treenode",this),we(this.storedValue,"toJSON",ae)},t.prototype.die=function(){this.isAlive&&this.state!==G.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},t.prototype.aboutToDie=function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(e){e.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))},t.prototype.finalizeDeath=function(){this.getChildren().forEach((function(e){e.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()},t.prototype.onSnapshot=function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)},t.prototype.emitSnapshot=function(e){this._internalEventsEmit("snapshot",e)},t.prototype.onPatch=function(e){return this._internalEventsRegister("patch",e)},t.prototype.emitPatch=function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=function(e){for(var t=[],n=1;n=0&&this.middlewares.splice(t,1)}},t.prototype.addMiddleWare=function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}},t.prototype.applyPatchLocally=function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)},t.prototype._addSnapshotReaction=function(){var e=this;if(!this._hasSnapshotReaction){var t=(0,o.U5)((function(){return e.snapshot}),(function(t){return e.emitSnapshot(t)}),k);this.addDisposer(t),this._hasSnapshotReaction=!0}},t.prototype._internalEventsHasSubscribers=function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)},t.prototype._internalEventsRegister=function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new Ce),this._internalEvents.register(e,t,n)},t.prototype._internalEventsHas=function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)},t.prototype._internalEventsUnregister=function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)},t.prototype._internalEventsEmit=function(e){for(var t,n=[],r=1;r0},enumerable:!1,configurable:!0})}();var M,_=1;function z(){return M}function B(){return _++}function L(e,t){var n=oe(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var i=n._isRunningAction;n._isRunningAction=!0;var a=M;M=e;try{return function(e,t,n){var i=new V(e,n);if(i.isEmpty)return(0,o.aD)(n).apply(null,t.args);var a=null;return function e(t){var s=i.getNextMiddleware(),c=s&&s.handler;return c?!s.includeHooks&&r[t.name]?e(t):(c(t,(function(t,n){a=e(t),n&&(a=n(a))}),(function(e){a=e})),a):(0,o.aD)(n).apply(null,t.args)}(t)}(n,e,t)}finally{M=a,n._isRunningAction=i}}function $(e){if(e)return"action"===e.type?e:e.parentActionEvent}function H(e,t,n){var r=function(){var r=B(),o=M,i=$(o);return L({type:"action",name:t,id:r,args:Se(arguments),context:e,tree:y(e),rootId:o?o.rootId:r,parentId:o?o.id:0,allParentIds:o?h(o.allParentIds,[o.id]):[],parentEvent:o,parentActionEvent:i},n)};return r._isMSTAction=!0,r}var V=function(){function e(e,t){this.arrayIndex=0,this.inArrayIndex=0,this.middlewares=[],t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),e.prototype.getNextMiddleware=function(){var e=this.middlewares[this.arrayIndex];if(e)return e[this.inArrayIndex++]||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())},e}();function Z(e){return"function"==typeof e?"":ne(e)?"<"+e+">":"`"+function(e){try{return JSON.stringify(e)}catch(e){return""}}(e)+"`"}function U(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map((function(e){return e.path})).filter((function(e){return e.length>0})).join("/"),o=r.length>0?'at path "/'+r+'" ':"",i=ne(t)?"value of type "+oe(t).type.name+":":ye(t)?"value":"snapshot",a=n&&ne(t)&&n.is(oe(t).snapshot);return""+o+i+" "+Z(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?function(e){return D(e)&&(e.flags&(O.String|O.Number|O.Integer|O.Boolean|O.Date))>0}(n)||ye(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function K(e,t,n){return e.concat([{path:t,type:n}])}function W(){return le}function J(e,t,n){return[{context:e,value:t,message:n}]}function q(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function Y(e,t){"undefined"!=typeof process&&process.env&&"true"===process.env.ENABLE_TYPE_CHECK&&function(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw pe(function(e,t,n){var r;if(0!==n.length)return"Error while converting "+(((r=Z(t)).length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `")+e.name+"`:\n\n "+n.map(U).join("\n ")}(e,t,n))}(e,t)}var G,X=0,Q=function(){function e(){this.cacheId=X++,this.cache=o.LO.map(),this.lastCacheModificationPerId=o.LO.map()}return e.prototype.updateLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)},e.prototype.getLastCacheModificationPerId=function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t},e.prototype.addNodeToCache=function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,o.LO.array([],ue));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw pe("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}},e.prototype.mergeCache=function(e){var t=this;(0,o.VO)(e.identifierCache.cache).forEach((function(e){return e.forEach((function(e){t.addNodeToCache(e)}))}))},e.prototype.notifyDied=function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}},e.prototype.splitCache=function(t){var n=this,r=new e,i=t.path;return(0,o.qh)(this.cache).forEach((function(e){for(var t=f(e,2),o=t[0],a=t[1],s=!1,c=a.length-1;c>=0;c--)0===a[c].path.indexOf(i)&&(r.addNodeToCache(a[c],!1),a.splice(c,1),s=!0);s&&n.updateLastCacheModificationPerId(o)})),r},e.prototype.has=function(e,t){var n=this.cache.get(t);return!!n&&n.some((function(t){return e.isAssignableFrom(t.type)}))},e.prototype.resolve=function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter((function(t){return e.isAssignableFrom(t.type)}));switch(r.length){case 0:return null;case 1:return r[0];default:throw pe("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map((function(e){return e.path})).join(", "))}},e}();function ee(e,t,n,r,o){var i=ie(o);if(i){if(i.parent)throw pe("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+i.path+"'");return t&&i.setParent(t,n),i}return new R(e,t,n,r,o)}function te(e,t,n,r,o){return new I(e,t,n,r,o)}function ne(e){return!(!e||!e.$treenode)}function re(e,t){xe()}function oe(e){if(!ne(e))throw pe("Value "+e+" is no MST Node");return e.$treenode}function ie(e){return e&&e.$treenode||null}function ae(){return oe(this).snapshot}function se(e,t,n){void 0===n&&(n=!0);for(var r=e,o=0;o0},enumerable:!1,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}},e.prototype.has=function(e){return this.handlers.indexOf(e)>=0},e.prototype.unregister=function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)},e.prototype.clear=function(){this.handlers.length=0},e.prototype.emit=function(){for(var e=[],t=0;t0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)},t.prototype.instantiate=function(e,t,n,r){return this._determineIdentifierMode(),ee(this,e,t,n,r)},t.prototype._determineIdentifierMode=function(){if(this.identifierMode===De.UNKNOWN){var e=[];if(_e(this._subType,e)){var t=void 0;e.forEach((function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw pe("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}})),t?(this.identifierMode=De.YES,this.mapIdentifierAttribute=t):this.identifierMode=De.NO}}},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t={});var n=e.type._subType,r={};return Object.keys(t).forEach((function(o){r[o]=n.instantiate(e,o,void 0,t[o])})),r},t.prototype.createNewInstance=function(e){return new ze(e)},t.prototype.finalizeNewInstance=function(e,t){(0,o.Nv)(t,e.unbox),e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],o=H(t,e,r);we(t,e,o)}))})),(0,o.Su)(t,this.willChange),(0,o.N7)(t,this.didChange)},t.prototype.describe=function(){return"Map"},t.prototype.getChildren=function(e){return(0,o.VO)(e.storedValue)},t.prototype.getChildNode=function(e,t){var n=e.storedValue.get(""+t);if(!n)throw pe("Not a child "+t);return n},t.prototype.willChange=function(e){var t=oe(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,o=r._subType;switch(e.type){case"update":var i=e.newValue;if(i===e.object.get(n))return null;Y(o,i),e.newValue=o.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":Y(o,e.newValue),e.newValue=o.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e},t.prototype.processIdentifier=function(e,t){if(this.identifierMode===De.YES&&t instanceof R){var n=t.identifier;if(n!==e)throw pe("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}},t.prototype.getSnapshot=function(e){var t={};return e.getChildren().forEach((function(e){t[e.subpath]=e.snapshot})),t},t.prototype.processInitialSnapshot=function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),t},t.prototype.didChange=function(e){var t=oe(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:Ae(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:Ae(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:Ae(e.name),oldValue:n},t)}},t.prototype.applyPatchLocally=function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}},t.prototype.applySnapshot=function(e,t){Y(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach((function(e){r[e]=!1})),t)for(var o in t)n.set(o,t[o]),r[""+o]=!0;Object.keys(r).forEach((function(e){!1===r[e]&&n.delete(e)}))},t.prototype.getChildType=function(){return this._subType},t.prototype.isValidSnapshot=function(e,t){var n=this;return be(e)?q(Object.keys(e).map((function(r){return n._subType.validate(e[r],K(t,r,n._subType))}))):J(t,e,"Value is not a plain object")},t.prototype.getDefaultSnapshot=function(){return de},t.prototype.removeChild=function(e,t){e.storedValue.delete(t)},u([o.aD],t.prototype,"applySnapshot",null),t}(T),Le=function(e){function t(t,n,r){void 0===r&&(r=[]);var o=e.call(this,t)||this;return o._subType=n,o.flags=O.Array,o.hookInitializers=[],o.hookInitializers=r,o}return l(t,e),t.prototype.hooks=function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)},t.prototype.instantiate=function(e,t,n,r){return ee(this,e,t,n,r)},t.prototype.initializeChildNodes=function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach((function(t,o){var i=""+o;r[i]=n.instantiate(e,i,void 0,t)})),r},t.prototype.createNewInstance=function(e){return o.LO.array(ce(e),ue)},t.prototype.finalizeNewInstance=function(e,t){(0,o.kS)(t).dehancer=e.unbox,e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],o=H(t,e,r);we(t,e,o)}))})),(0,o.Su)(t,this.willChange),(0,o.N7)(t,this.didChange)},t.prototype.describe=function(){return this._subType.describe()+"[]"},t.prototype.getChildren=function(e){return e.storedValue.slice()},t.prototype.getChildNode=function(e,t){var n=Number(t);if(n=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n0)return n;var r=ne(e)?oe(e).snapshot:e;return this._predicate(r)?W():J(t,e,this._message(e))},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)},t.prototype.getSubTypes=function(){return this._subtype},t}(A),st=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o._types=n,o._eager=!0,r=d({eager:!0,dispatcher:void 0},r),o._dispatcher=r.dispatcher,r.eager||(o._eager=!1),o}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=O.Union;return this._types.forEach((function(t){e|=t.flags})),e},enumerable:!1,configurable:!0}),t.prototype.isAssignableFrom=function(e){return this._types.some((function(t){return t.isAssignableFrom(e)}))},t.prototype.describe=function(){return"("+this._types.map((function(e){return e.describe()})).join(" | ")+")"},t.prototype.instantiate=function(e,t,n,r){var o=this.determineType(r,void 0);if(!o)throw pe("No matching type for union "+this.describe());return o.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){var o=this.determineType(t,e.type);if(!o)throw pe("No matching type for union "+this.describe());return o.reconcile(e,t,n,r)},t.prototype.determineType=function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter((function(e){return e!==t})).find((function(t){return t.is(e)})):this._types.find((function(t){return t.is(e)}))},t.prototype.isValidSnapshot=function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,o=0;o=0){var o=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,o)}return this._subtype.instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)},t.prototype.getDefaultInstanceOrSnapshot=function(){var e="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&Y(this,e),e},t.prototype.isValidSnapshot=function(e,t){return this.optionalValues.indexOf(e)>=0?W():this._subtype.validate(e,t)},t.prototype.isAssignableFrom=function(e){return this._subtype.isAssignableFrom(e)},t.prototype.getSubTypes=function(){return this._subtype},t}(A);function dt(e,t,n){return function(e,t){if("function"!=typeof t&&ne(t))throw pe("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");j()}(0,t),new lt(e,t,n||ut)}var ut=[void 0],pt=dt(tt,void 0),ft=dt(et,null);function ht(e){return j(),ct(e,pt)}var vt=function(e){function t(t,n){var r=e.call(this,t)||this;return r._definition=n,r}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|O.Late},enumerable:!1,configurable:!0}),t.prototype.getSubType=function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(e){if(!(e instanceof ReferenceError))throw e;t=void 0}if(e&&void 0===t)throw pe("Late type seems to be used too early, the definition (still) returns undefined");t&&(this._subType=t)}return this._subType},t.prototype.instantiate=function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)},t.prototype.describe=function(){var e=this.getSubType(!1);return e?e.name:""},t.prototype.isValidSnapshot=function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):W()},t.prototype.isAssignableFrom=function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)},t.prototype.getSubTypes=function(){return this.getSubType(!1)||P},t}(A),mt=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return n.subType=t,n.flags=O.Frozen,n}return l(t,e),t.prototype.describe=function(){return""},t.prototype.instantiate=function(e,t,n,r){return te(this,e,t,n,r)},t.prototype.isValidSnapshot=function(e,t){return function(e){return"function"!=typeof e}(e)?this.subType?this.subType.validate(e,t):W():J(t,e,"Value is not serializable and cannot be frozen")},t}(F),bt=new mt,gt=function(){function e(e,t){if(this.targetType=t,Pt(e))this.identifier=e;else{if(!ne(e))throw pe("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=oe(e);if(!n.identifierAttribute)throw pe("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null==r)throw pe("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return e.prototype.updateResolvedReference=function(e){var t=Rt(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var o=this.targetType,i=n.identifierCache.resolve(o,t);if(!i)throw new yt("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:i,lastCacheModification:r}}},Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),yt=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return l(t,e),t}(Error),wt=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return r.targetType=t,r.onInvalidated=n,r.flags=O.Reference,r}return l(t,e),t.prototype.describe=function(){return this.name},t.prototype.isAssignableFrom=function(e){return this.targetType.isAssignableFrom(e)},t.prototype.isValidSnapshot=function(e,t){return Pt(e)?W():J(t,e,"Value is not a valid identifier, which is a string or a number")},t.prototype.fireInvalidated=function(e,t,n,r){var o=t.parent;if(o&&o.isAlive){var i=o.storedValue;i&&this.onInvalidated({cause:e,parent:i,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){m(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){var e;D(e=o.type)&&(e.flags&O.Object)>0?this.replaceRef(void 0):m(t.root.storedValue,{op:"remove",path:t.path})}})}},t.prototype.addTargetNodeWatcher=function(e,t){var n=this,o=this.getValue(e);if(o){var i=oe(o),a=function(o,a){var s=function(e){switch(e){case r.beforeDestroy:return"destroy";case r.beforeDetach:return"detach";default:return}}(a);s&&n.fireInvalidated(s,e,t,i)},s=i.registerHook(r.beforeDetach,a),c=i.registerHook(r.beforeDestroy,a);return function(){s(),c()}}},t.prototype.watchTargetNodeForInvalidations=function(e,t,n){var o=this;if(this.onInvalidated){var i;e.registerHook(r.beforeDestroy,(function(){i&&i()}));var a=function(r){i&&i();var a=e.parent,s=a&&a.storedValue;a&&a.isAlive&&s&&((n?n.get(t,s):e.root.identifierCache.has(o.targetType,Rt(t)))?i=o.addTargetNodeWatcher(e,t):r||o.fireInvalidated("invalidSnapshotReference",e,t,null))};e.state===G.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(r.afterCreationFinalization,(function(){e.parent&&e.parent.createObservableInstanceIfNeeded()})),e.registerHook(r.afterAttach,(function(){a(!1)})))}},t}(F),Et=function(e){function t(t,n){return e.call(this,t,n)||this}return l(t,e),t.prototype.getValue=function(e){if(e.isAlive)return e.storedValue.resolvedValue},t.prototype.getSnapshot=function(e){return e.storedValue.identifier},t.prototype.instantiate=function(e,t,n,r){var o,i=ne(r)?(re(o=r),oe(o).identifier):r,a=new gt(r,this.targetType),s=te(this,e,t,n,a);return a.node=s,this.watchTargetNodeForInvalidations(s,i,void 0),s},t.prototype.reconcile=function(e,t,n,r){if(!e.isDetaching&&e.type===this){var o=ne(t),i=e.storedValue;if(!o&&i.identifier===t||o&&i.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a},t}(wt),Ct=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.options=n,o}return l(t,e),t.prototype.getValue=function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)},t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.instantiate=function(e,t,n,r){var o=ne(r)?this.options.set(r,e?e.storedValue:null):r,i=te(this,e,t,n,o);return this.watchTargetNodeForInvalidations(i,o,this.options),i},t.prototype.reconcile=function(e,t,n,r){var o=ne(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===o)return e.setParent(n,r),e;var i=this.instantiate(n,r,void 0,o);return e.die(),i},t}(wt);function St(e,t){j();var n=t||void 0,r=t?t.onInvalidated:void 0;return n&&(n.get||n.set)?new Ct(e,{get:n.get,set:n.set},r):new Et(e,r)}var Ot=function(e){function t(t,n){var r=e.call(this,t)||this;return r.validType=n,r.flags=O.Identifier,r}return l(t,e),t.prototype.instantiate=function(e,t,n,r){if(!(e&&e.type instanceof Je))throw pe("Identifier types can only be instantiated as direct child of a model type");return te(this,e,t,n,r)},t.prototype.reconcile=function(e,t,n,r){if(e.storedValue!==t)throw pe("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e},t.prototype.isValidSnapshot=function(e,t){return typeof e!==this.validType?J(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):W()},t}(F),xt=function(e){function t(){var t=e.call(this,"identifier","string")||this;return t.flags=O.Identifier,t}return l(t,e),t.prototype.describe=function(){return"identifier"},t}(Ot),It=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return l(t,e),t.prototype.getSnapshot=function(e){return e.storedValue},t.prototype.describe=function(){return"identifierNumber"},t}(Ot),Nt=new xt,kt=new It;function Rt(e){return""+e}function Pt(e){return"string"==typeof e||"number"==typeof e}var At=function(e){function t(t){var n=e.call(this,t.name)||this;return n.options=t,n.flags=O.Custom,n}return l(t,e),t.prototype.describe=function(){return this.name},t.prototype.isValidSnapshot=function(e,t){if(this.options.isTargetType(e))return W();var n=this.options.getValidationMessage(e);return n?J(t,e,"Invalid value for type '"+this.name+"': "+n):W()},t.prototype.getSnapshot=function(e){return this.options.toSnapshot(e.storedValue)},t.prototype.instantiate=function(e,t,n,r){return te(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,e&&e.root.environment))},t.prototype.reconcile=function(e,t,n,r){var o=!this.options.isTargetType(t);if(!e.isDetaching&&e.type===this&&(o?t===e.snapshot:t===e.storedValue))return e.setParent(n,r),e;var i=o?this.options.fromSnapshot(t,n.root.environment):t,a=this.instantiate(n,r,void 0,i);return e.die(),a},t}(F),Tt={enumeration:function(e,t){var n="string"==typeof e?t:e,r=ct.apply(void 0,h(n.map((function(e){return it(""+e)}))));return"string"==typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t",e)},array:function(e){return j(),new Le(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?bt:D(e)?new mt(e):dt(bt,e)},identifier:Nt,identifierNumber:kt,late:function(e,t){var n="string"==typeof e?e:"late("+e.toString()+")";return new vt(n,"string"==typeof e?t:e)},undefined:tt,null:et,snapshotProcessor:function(e,t,n){return j(),new je(e,t,n)}}},72408:function(e,t,n){"use strict";var r=n(27418),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,d=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,f=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nP.length&&P.push(e)}function F(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+j(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var c=0;c=o)&&Object.keys(s.O).every((function(e){return s.O[e](n[c])}))?n.splice(c--,1):(a=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},s.d(o,i),o},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce((function(t,n){return s.f[n](e,t),t}),[]))},s.u=function(e){return"scripts/chunk/"+e+"."+{180:"01a920c2",249:"34185169",365:"b6c52216",438:"1ab298f9",525:"05258a99",790:"81ba6533",848:"e620f3cb",854:"a8b43c42",911:"48b69262",996:"5254e5ea",1065:"93f648f1",1134:"28fdc65d",1147:"f151b55f",1156:"acb97715",1205:"3e7e0272",1259:"0791543f",1448:"4fd2ffe7",1471:"e4c334ef",1614:"7cb442fd",1813:"aedaa90d",1886:"2fb19122",1960:"61980a22",1961:"c82e0f18",1966:"cd6a9c49",2060:"f434c855",2075:"d8277fdb",2140:"663abb39",2240:"7a130b72",2527:"491067a9",2571:"ff287f20",2794:"9452c5ee",2798:"92143e76",2814:"32ea7bb0",2835:"2dc13e93",2892:"3de74502",2911:"22921070",2954:"d0d0ff52",3036:"133d75ec",3116:"7eabfc18",3565:"2976f15b",3585:"d28ee55b",3632:"fac775ee",3682:"f32ef7e5",3760:"19a2a971",3919:"c37f685c",4028:"e8d61767",4129:"fb7f0d64",4188:"eef2a585",4295:"1bbce05c",4368:"3f40cb7b",4386:"f715a330",4407:"ebfdacf7",4631:"809b9ec4",4902:"5e28f4da",4912:"1fb11bbc",4946:"67d335a6",5062:"61df914b",5593:"28cbac31",5703:"e766475d",5849:"6d19629d",5937:"727b4843",5962:"55daefd9",6082:"2952d999",6241:"b191a73d",6424:"3c92e7fb",6449:"da418a0e",6489:"b4b13374",6531:"62aea1e0",6587:"cae344f1",6590:"062da283",6717:"c556cdf5",6876:"1739bce6",7043:"58d65c4f",7093:"35680e5c",7131:"bac2471f",7287:"eb043dc6",7460:"1ab75aaf",7562:"5537b9fa",7631:"3968bd85",7637:"8ffaca06",7778:"269bda4a",7835:"04c8fffb",7850:"b348adf0",7868:"51277f40",8070:"bf15046d",8084:"03719a5b",8180:"0f928412",8183:"baa719cc",8424:"d3a53a09",8448:"ed3fbbfa",8670:"61d89ac7",8715:"ef2eea3b",8719:"cff7fc05",8906:"47b3afe0",8946:"6c5f42b8",9284:"7242fac4",9343:"c35d755f",9398:"d5a48e66",9400:"0ce52b01",9537:"e680b967",9684:"0babbede",9775:"5e6ed683",9907:"ca2a4edb"}[e]+".js"},s.miniCssF=function(e){return"css/"+e+".68748e19.css"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="tansci-boot-ui-editor:",s.l=function(e,t,n,i){if(r[e])r[e].push(t);else{var a,c;if(void 0!==n)for(var l=document.getElementsByTagName("script"),d=0;d