operp-print-designer 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(Ne,oe){typeof exports=="object"&&typeof module<"u"?oe(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-to-print"),require("zustand"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-to-print","zustand","react-dom"],oe):(Ne=typeof globalThis<"u"?globalThis:Ne||self,oe(Ne.PrintDesigner={},Ne.React,Ne.antd,Ne.icons,Ne.ReactToPrint,Ne.zustand,Ne.ReactDOM))})(this,(function(Ne,oe,k,Te,tr,ln,Mt){"use strict";function cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function un(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var n=r.default;if(typeof n=="function"){var a=function o(){return this instanceof o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(r).forEach(function(o){var h=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(a,o,h.get?h:{enumerable:!0,get:function(){return r[o]}})}),a}var vt={exports:{}},ot={};/**
1
+ (function(Ne,oe){typeof exports=="object"&&typeof module<"u"?oe(exports,require("react"),require("antd"),require("@ant-design/icons"),require("react-to-print"),require("zustand"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","antd","@ant-design/icons","react-to-print","zustand","react-dom"],oe):(Ne=typeof globalThis<"u"?globalThis:Ne||self,oe(Ne.PrintDesigner={},Ne.React,Ne.antd,Ne.icons,Ne.ReactToPrint,Ne.zustand,Ne.ReactDOM))})(this,(function(Ne,oe,T,Oe,rr,cn,Mt){"use strict";function un(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function dn(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var o=n.default;if(typeof o=="function"){var s=function i(){return this instanceof i?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};s.prototype=o.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var h=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(s,i,h.get?h:{enumerable:!0,get:function(){return n[i]}})}),s}var vt={exports:{}},it={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var rr;function dn(){if(rr)return ot;rr=1;var r=oe,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function x(O,y,R){var C,E={},_=null,A=null;R!==void 0&&(_=""+R),y.key!==void 0&&(_=""+y.key),y.ref!==void 0&&(A=y.ref);for(C in y)o.call(y,C)&&!u.hasOwnProperty(C)&&(E[C]=y[C]);if(O&&O.defaultProps)for(C in y=O.defaultProps,y)E[C]===void 0&&(E[C]=y[C]);return{$$typeof:n,type:O,key:_,ref:A,props:E,_owner:h.current}}return ot.Fragment=a,ot.jsx=x,ot.jsxs=x,ot}var it={},nr;function fn(){if(nr)return it;nr=1;var r={};/**
9
+ */var nr;function fn(){if(nr)return it;nr=1;var n=oe,o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,h=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function b(O,m,j){var R,P={},E=null,N=null;j!==void 0&&(E=""+j),m.key!==void 0&&(E=""+m.key),m.ref!==void 0&&(N=m.ref);for(R in m)i.call(m,R)&&!u.hasOwnProperty(R)&&(P[R]=m[R]);if(O&&O.defaultProps)for(R in m=O.defaultProps,m)P[R]===void 0&&(P[R]=m[R]);return{$$typeof:o,type:O,key:E,ref:N,props:P,_owner:h.current}}return it.Fragment=s,it.jsx=b,it.jsxs=b,it}var st={},or;function pn(){if(or)return st;or=1;var n={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,54 +14,54 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */return r.NODE_ENV!=="production"&&(function(){var n=oe,a=Symbol.for("react.element"),o=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),y=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),p=Symbol.iterator,l="@@iterator";function e(g){if(g===null||typeof g!="object")return null;var B=p&&g[p]||g[l];return typeof B=="function"?B:null}var t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(g){{for(var B=arguments.length,te=new Array(B>1?B-1:0),de=1;de<B;de++)te[de-1]=arguments[de];f("error",g,te)}}function f(g,B,te){{var de=t.ReactDebugCurrentFrame,_e=de.getStackAddendum();_e!==""&&(B+="%s",te=te.concat([_e]));var De=te.map(function(we){return String(we)});De.unshift("Warning: "+B),Function.prototype.apply.call(console[g],console,De)}}var i=!1,b=!1,j=!1,P=!1,z=!1,N;N=Symbol.for("react.module.reference");function F(g){return!!(typeof g=="string"||typeof g=="function"||g===h||g===x||z||g===u||g===C||g===E||P||g===T||i||b||j||typeof g=="object"&&g!==null&&(g.$$typeof===A||g.$$typeof===_||g.$$typeof===O||g.$$typeof===y||g.$$typeof===R||g.$$typeof===N||g.getModuleId!==void 0))}function Z(g,B,te){var de=g.displayName;if(de)return de;var _e=B.displayName||B.name||"";return _e!==""?te+"("+_e+")":te}function K(g){return g.displayName||"Context"}function Q(g){if(g==null)return null;if(typeof g.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case h:return"Fragment";case o:return"Portal";case x:return"Profiler";case u:return"StrictMode";case C:return"Suspense";case E:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case y:var B=g;return K(B)+".Consumer";case O:var te=g;return K(te._context)+".Provider";case R:return Z(g,g.render,"ForwardRef");case _:var de=g.displayName||null;return de!==null?de:Q(g.type)||"Memo";case A:{var _e=g,De=_e._payload,we=_e._init;try{return Q(we(De))}catch{return null}}}return null}var V=Object.assign,X=0,J,ne,Se,ve,M,L,le;function ie(){}ie.__reactDisabledLog=!0;function ce(){{if(X===0){J=console.log,ne=console.info,Se=console.warn,ve=console.error,M=console.group,L=console.groupCollapsed,le=console.groupEnd;var g={configurable:!0,enumerable:!0,value:ie,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}X++}}function pe(){{if(X--,X===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},g,{value:J}),info:V({},g,{value:ne}),warn:V({},g,{value:Se}),error:V({},g,{value:ve}),group:V({},g,{value:M}),groupCollapsed:V({},g,{value:L}),groupEnd:V({},g,{value:le})})}X<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=t.ReactCurrentDispatcher,I;function G(g,B,te){{if(I===void 0)try{throw Error()}catch(_e){var de=_e.stack.trim().match(/\n( *(at )?)/);I=de&&de[1]||""}return`
18
- `+I+g}}var ee=!1,$;{var ae=typeof WeakMap=="function"?WeakMap:Map;$=new ae}function W(g,B){if(!g||ee)return"";{var te=$.get(g);if(te!==void 0)return te}var de;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var De;De=ue.current,ue.current=null,ce();try{if(B){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(He){de=He}Reflect.construct(g,[],we)}else{try{we.call()}catch(He){de=He}g.call(we.prototype)}}else{try{throw Error()}catch(He){de=He}g()}}catch(He){if(He&&de&&typeof He.stack=="string"){for(var ye=He.stack.split(`
17
+ */return n.NODE_ENV!=="production"&&(function(){var o=oe,s=Symbol.for("react.element"),i=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),m=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),p=Symbol.iterator,l="@@iterator";function e(g){if(g===null||typeof g!="object")return null;var B=p&&g[p]||g[l];return typeof B=="function"?B:null}var t=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(g){{for(var B=arguments.length,ee=new Array(B>1?B-1:0),de=1;de<B;de++)ee[de-1]=arguments[de];f("error",g,ee)}}function f(g,B,ee){{var de=t.ReactDebugCurrentFrame,Ee=de.getStackAddendum();Ee!==""&&(B+="%s",ee=ee.concat([Ee]));var Te=ee.map(function(Se){return String(Se)});Te.unshift("Warning: "+B),Function.prototype.apply.call(console[g],console,Te)}}var a=!1,S=!1,C=!1,D=!1,_=!1,k;k=Symbol.for("react.module.reference");function W(g){return!!(typeof g=="string"||typeof g=="function"||g===h||g===b||_||g===u||g===R||g===P||D||g===I||a||S||C||typeof g=="object"&&g!==null&&(g.$$typeof===N||g.$$typeof===E||g.$$typeof===O||g.$$typeof===m||g.$$typeof===j||g.$$typeof===k||g.getModuleId!==void 0))}function U(g,B,ee){var de=g.displayName;if(de)return de;var Ee=B.displayName||B.name||"";return Ee!==""?ee+"("+Ee+")":ee}function J(g){return g.displayName||"Context"}function re(g){if(g==null)return null;if(typeof g.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case h:return"Fragment";case i:return"Portal";case b:return"Profiler";case u:return"StrictMode";case R:return"Suspense";case P:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case m:var B=g;return J(B)+".Consumer";case O:var ee=g;return J(ee._context)+".Provider";case j:return U(g,g.render,"ForwardRef");case E:var de=g.displayName||null;return de!==null?de:re(g.type)||"Memo";case N:{var Ee=g,Te=Ee._payload,Se=Ee._init;try{return re(Se(Te))}catch{return null}}}return null}var V=Object.assign,K=0,Q,te,he,ge,M,L,le;function ie(){}ie.__reactDisabledLog=!0;function ce(){{if(K===0){Q=console.log,te=console.info,he=console.warn,ge=console.error,M=console.group,L=console.groupCollapsed,le=console.groupEnd;var g={configurable:!0,enumerable:!0,value:ie,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}K++}}function pe(){{if(K--,K===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},g,{value:Q}),info:V({},g,{value:te}),warn:V({},g,{value:he}),error:V({},g,{value:ge}),group:V({},g,{value:M}),groupCollapsed:V({},g,{value:L}),groupEnd:V({},g,{value:le})})}K<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=t.ReactCurrentDispatcher,A;function G(g,B,ee){{if(A===void 0)try{throw Error()}catch(Ee){var de=Ee.stack.trim().match(/\n( *(at )?)/);A=de&&de[1]||""}return`
18
+ `+A+g}}var Z=!1,X;{var ae=typeof WeakMap=="function"?WeakMap:Map;X=new ae}function H(g,B){if(!g||Z)return"";{var ee=X.get(g);if(ee!==void 0)return ee}var de;Z=!0;var Ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Te;Te=ue.current,ue.current=null,ce();try{if(B){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(He){de=He}Reflect.construct(g,[],Se)}else{try{Se.call()}catch(He){de=He}g.call(Se.prototype)}}else{try{throw Error()}catch(He){de=He}g()}}catch(He){if(He&&de&&typeof He.stack=="string"){for(var be=He.stack.split(`
19
19
  `),We=de.stack.split(`
20
- `),Me=ye.length-1,Le=We.length-1;Me>=1&&Le>=0&&ye[Me]!==We[Le];)Le--;for(;Me>=1&&Le>=0;Me--,Le--)if(ye[Me]!==We[Le]){if(Me!==1||Le!==1)do if(Me--,Le--,Le<0||ye[Me]!==We[Le]){var Be=`
21
- `+ye[Me].replace(" at new "," at ");return g.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",g.displayName)),typeof g=="function"&&$.set(g,Be),Be}while(Me>=1&&Le>=0);break}}}finally{ee=!1,ue.current=De,pe(),Error.prepareStackTrace=_e}var nt=g?g.displayName||g.name:"",Je=nt?G(nt):"";return typeof g=="function"&&$.set(g,Je),Je}function he(g,B,te){return W(g,!1)}function ze(g){var B=g.prototype;return!!(B&&B.isReactComponent)}function xe(g,B,te){if(g==null)return"";if(typeof g=="function")return W(g,ze(g));if(typeof g=="string")return G(g);switch(g){case C:return G("Suspense");case E:return G("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case R:return he(g.render);case _:return xe(g.type,B,te);case A:{var de=g,_e=de._payload,De=de._init;try{return xe(De(_e),B,te)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,m={},v=t.ReactDebugCurrentFrame;function S(g){if(g){var B=g._owner,te=xe(g.type,g._source,B?B.type:null);v.setExtraStackFrame(te)}else v.setExtraStackFrame(null)}function H(g,B,te,de,_e){{var De=Function.call.bind(Ae);for(var we in g)if(De(g,we)){var ye=void 0;try{if(typeof g[we]!="function"){var We=Error((de||"React class")+": "+te+" type `"+we+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[we]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw We.name="Invariant Violation",We}ye=g[we](B,we,de,te,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Me){ye=Me}ye&&!(ye instanceof Error)&&(S(_e),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",de||"React class",te,we,typeof ye),S(null)),ye instanceof Error&&!(ye.message in m)&&(m[ye.message]=!0,S(_e),c("Failed %s type: %s",te,ye.message),S(null))}}}var re=Array.isArray;function U(g){return re(g)}function se(g){{var B=typeof Symbol=="function"&&Symbol.toStringTag,te=B&&g[Symbol.toStringTag]||g.constructor.name||"Object";return te}}function ge(g){try{return je(g),!1}catch{return!0}}function je(g){return""+g}function d(g){if(ge(g))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",se(g)),je(g)}var w=t.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0},q,Y;function Ce(g){if(Ae.call(g,"ref")){var B=Object.getOwnPropertyDescriptor(g,"ref").get;if(B&&B.isReactWarning)return!1}return g.ref!==void 0}function me(g){if(Ae.call(g,"key")){var B=Object.getOwnPropertyDescriptor(g,"key").get;if(B&&B.isReactWarning)return!1}return g.key!==void 0}function Pe(g,B){typeof g.ref=="string"&&w.current}function ke(g,B){{var te=function(){q||(q=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",B))};te.isReactWarning=!0,Object.defineProperty(g,"key",{get:te,configurable:!0})}}function Ye(g,B){{var te=function(){Y||(Y=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",B))};te.isReactWarning=!0,Object.defineProperty(g,"ref",{get:te,configurable:!0})}}var $e=function(g,B,te,de,_e,De,we){var ye={$$typeof:a,type:g,key:B,ref:te,props:we,_owner:De};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_e}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function yt(g,B,te,de,_e){{var De,we={},ye=null,We=null;te!==void 0&&(d(te),ye=""+te),me(B)&&(d(B.key),ye=""+B.key),Ce(B)&&(We=B.ref,Pe(B,_e));for(De in B)Ae.call(B,De)&&!D.hasOwnProperty(De)&&(we[De]=B[De]);if(g&&g.defaultProps){var Me=g.defaultProps;for(De in Me)we[De]===void 0&&(we[De]=Me[De])}if(ye||We){var Le=typeof g=="function"?g.displayName||g.name||"Unknown":g;ye&&ke(we,Le),We&&Ye(we,Le)}return $e(g,ye,We,_e,de,w.current,we)}}var Qe=t.ReactCurrentOwner,Zt=t.ReactDebugCurrentFrame;function Ve(g){if(g){var B=g._owner,te=xe(g.type,g._source,B?B.type:null);Zt.setExtraStackFrame(te)}else Zt.setExtraStackFrame(null)}var et;et=!1;function tt(g){return typeof g=="object"&&g!==null&&g.$$typeof===a}function rt(){{if(Qe.current){var g=Q(Qe.current.type);if(g)return`
20
+ `),Ie=be.length-1,Le=We.length-1;Ie>=1&&Le>=0&&be[Ie]!==We[Le];)Le--;for(;Ie>=1&&Le>=0;Ie--,Le--)if(be[Ie]!==We[Le]){if(Ie!==1||Le!==1)do if(Ie--,Le--,Le<0||be[Ie]!==We[Le]){var qe=`
21
+ `+be[Ie].replace(" at new "," at ");return g.displayName&&qe.includes("<anonymous>")&&(qe=qe.replace("<anonymous>",g.displayName)),typeof g=="function"&&X.set(g,qe),qe}while(Ie>=1&&Le>=0);break}}}finally{Z=!1,ue.current=Te,pe(),Error.prepareStackTrace=Ee}var ot=g?g.displayName||g.name:"",Je=ot?G(ot):"";return typeof g=="function"&&X.set(g,Je),Je}function ye(g,B,ee){return H(g,!1)}function ze(g){var B=g.prototype;return!!(B&&B.isReactComponent)}function we(g,B,ee){if(g==null)return"";if(typeof g=="function")return H(g,ze(g));if(typeof g=="string")return G(g);switch(g){case R:return G("Suspense");case P:return G("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case j:return ye(g.render);case E:return we(g.type,B,ee);case N:{var de=g,Ee=de._payload,Te=de._init;try{return we(Te(Ee),B,ee)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,y={},v=t.ReactDebugCurrentFrame;function w(g){if(g){var B=g._owner,ee=we(g.type,g._source,B?B.type:null);v.setExtraStackFrame(ee)}else v.setExtraStackFrame(null)}function q(g,B,ee,de,Ee){{var Te=Function.call.bind(Ae);for(var Se in g)if(Te(g,Se)){var be=void 0;try{if(typeof g[Se]!="function"){var We=Error((de||"React class")+": "+ee+" type `"+Se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[Se]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw We.name="Invariant Violation",We}be=g[Se](B,Se,de,ee,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ie){be=Ie}be&&!(be instanceof Error)&&(w(Ee),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",de||"React class",ee,Se,typeof be),w(null)),be instanceof Error&&!(be.message in y)&&(y[be.message]=!0,w(Ee),c("Failed %s type: %s",ee,be.message),w(null))}}}var ne=Array.isArray;function $(g){return ne(g)}function se(g){{var B=typeof Symbol=="function"&&Symbol.toStringTag,ee=B&&g[Symbol.toStringTag]||g.constructor.name||"Object";return ee}}function me(g){try{return je(g),!1}catch{return!0}}function je(g){return""+g}function d(g){if(me(g))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",se(g)),je(g)}var x=t.ReactCurrentOwner,z={key:!0,ref:!0,__self:!0,__source:!0},F,Y;function _e(g){if(Ae.call(g,"ref")){var B=Object.getOwnPropertyDescriptor(g,"ref").get;if(B&&B.isReactWarning)return!1}return g.ref!==void 0}function ve(g){if(Ae.call(g,"key")){var B=Object.getOwnPropertyDescriptor(g,"key").get;if(B&&B.isReactWarning)return!1}return g.key!==void 0}function De(g,B){typeof g.ref=="string"&&x.current}function Me(g,B){{var ee=function(){F||(F=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",B))};ee.isReactWarning=!0,Object.defineProperty(g,"key",{get:ee,configurable:!0})}}function Ye(g,B){{var ee=function(){Y||(Y=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",B))};ee.isReactWarning=!0,Object.defineProperty(g,"ref",{get:ee,configurable:!0})}}var $e=function(g,B,ee,de,Ee,Te,Se){var be={$$typeof:s,type:g,key:B,ref:ee,props:Se,_owner:Te};return be._store={},Object.defineProperty(be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(be,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(be,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ee}),Object.freeze&&(Object.freeze(be.props),Object.freeze(be)),be};function mt(g,B,ee,de,Ee){{var Te,Se={},be=null,We=null;ee!==void 0&&(d(ee),be=""+ee),ve(B)&&(d(B.key),be=""+B.key),_e(B)&&(We=B.ref,De(B,Ee));for(Te in B)Ae.call(B,Te)&&!z.hasOwnProperty(Te)&&(Se[Te]=B[Te]);if(g&&g.defaultProps){var Ie=g.defaultProps;for(Te in Ie)Se[Te]===void 0&&(Se[Te]=Ie[Te])}if(be||We){var Le=typeof g=="function"?g.displayName||g.name||"Unknown":g;be&&Me(Se,Le),We&&Ye(Se,Le)}return $e(g,be,We,Ee,de,x.current,Se)}}var et=t.ReactCurrentOwner,Zt=t.ReactDebugCurrentFrame;function Ve(g){if(g){var B=g._owner,ee=we(g.type,g._source,B?B.type:null);Zt.setExtraStackFrame(ee)}else Zt.setExtraStackFrame(null)}var tt;tt=!1;function rt(g){return typeof g=="object"&&g!==null&&g.$$typeof===s}function nt(){{if(et.current){var g=re(et.current.type);if(g)return`
22
22
 
23
- Check the render method of \``+g+"`."}return""}}function Qt(g){return""}var rn={};function ho(g){{var B=rt();if(!B){var te=typeof g=="string"?g:g.displayName||g.name;te&&(B=`
23
+ Check the render method of \``+g+"`."}return""}}function er(g){return""}var nn={};function go(g){{var B=nt();if(!B){var ee=typeof g=="string"?g:g.displayName||g.name;ee&&(B=`
24
24
 
25
- Check the top-level render call using <`+te+">.")}return B}}function nn(g,B){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var te=ho(B);if(rn[te])return;rn[te]=!0;var de="";g&&g._owner&&g._owner!==Qe.current&&(de=" It was passed a child from "+Q(g._owner.type)+"."),Ve(g),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',te,de),Ve(null)}}function on(g,B){{if(typeof g!="object")return;if(U(g))for(var te=0;te<g.length;te++){var de=g[te];tt(de)&&nn(de,B)}else if(tt(g))g._store&&(g._store.validated=!0);else if(g){var _e=e(g);if(typeof _e=="function"&&_e!==g.entries)for(var De=_e.call(g),we;!(we=De.next()).done;)tt(we.value)&&nn(we.value,B)}}}function go(g){{var B=g.type;if(B==null||typeof B=="string")return;var te;if(typeof B=="function")te=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===R||B.$$typeof===_))te=B.propTypes;else return;if(te){var de=Q(B);H(te,g.props,"prop",de,g)}else if(B.PropTypes!==void 0&&!et){et=!0;var _e=Q(B);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mo(g){{for(var B=Object.keys(g.props),te=0;te<B.length;te++){var de=B[te];if(de!=="children"&&de!=="key"){Ve(g),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Ve(null);break}}g.ref!==null&&(Ve(g),c("Invalid attribute `ref` supplied to `React.Fragment`."),Ve(null))}}var sn={};function an(g,B,te,de,_e,De){{var we=F(g);if(!we){var ye="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=Qt();We?ye+=We:ye+=rt();var Me;g===null?Me="null":U(g)?Me="array":g!==void 0&&g.$$typeof===a?(Me="<"+(Q(g.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Me=typeof g,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Me,ye)}var Le=yt(g,B,te,_e,De);if(Le==null)return Le;if(we){var Be=B.children;if(Be!==void 0)if(de)if(U(Be)){for(var nt=0;nt<Be.length;nt++)on(Be[nt],g);Object.freeze&&Object.freeze(Be)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else on(Be,g)}if(Ae.call(B,"key")){var Je=Q(g),He=Object.keys(B).filter(function(So){return So!=="key"}),er=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!sn[Je+er]){var wo=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+ee+">.")}return B}}function on(g,B){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var ee=go(B);if(nn[ee])return;nn[ee]=!0;var de="";g&&g._owner&&g._owner!==et.current&&(de=" It was passed a child from "+re(g._owner.type)+"."),Ve(g),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ee,de),Ve(null)}}function sn(g,B){{if(typeof g!="object")return;if($(g))for(var ee=0;ee<g.length;ee++){var de=g[ee];rt(de)&&on(de,B)}else if(rt(g))g._store&&(g._store.validated=!0);else if(g){var Ee=e(g);if(typeof Ee=="function"&&Ee!==g.entries)for(var Te=Ee.call(g),Se;!(Se=Te.next()).done;)rt(Se.value)&&on(Se.value,B)}}}function yo(g){{var B=g.type;if(B==null||typeof B=="string")return;var ee;if(typeof B=="function")ee=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===j||B.$$typeof===E))ee=B.propTypes;else return;if(ee){var de=re(B);q(ee,g.props,"prop",de,g)}else if(B.PropTypes!==void 0&&!tt){tt=!0;var Ee=re(B);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ee||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mo(g){{for(var B=Object.keys(g.props),ee=0;ee<B.length;ee++){var de=B[ee];if(de!=="children"&&de!=="key"){Ve(g),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Ve(null);break}}g.ref!==null&&(Ve(g),c("Invalid attribute `ref` supplied to `React.Fragment`."),Ve(null))}}var an={};function ln(g,B,ee,de,Ee,Te){{var Se=W(g);if(!Se){var be="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=er();We?be+=We:be+=nt();var Ie;g===null?Ie="null":$(g)?Ie="array":g!==void 0&&g.$$typeof===s?(Ie="<"+(re(g.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):Ie=typeof g,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ie,be)}var Le=mt(g,B,ee,Ee,Te);if(Le==null)return Le;if(Se){var qe=B.children;if(qe!==void 0)if(de)if($(qe)){for(var ot=0;ot<qe.length;ot++)sn(qe[ot],g);Object.freeze&&Object.freeze(qe)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else sn(qe,g)}if(Ae.call(B,"key")){var Je=re(g),He=Object.keys(B).filter(function(jo){return jo!=="key"}),tr=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!an[Je+tr]){var So=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,er,Je,wo,Je),sn[Je+er]=!0}}return g===h?mo(Le):go(Le),Le}}function yo(g,B,te){return an(g,B,te,!0)}function vo(g,B,te){return an(g,B,te,!1)}var bo=vo,xo=yo;it.Fragment=h,it.jsx=bo,it.jsxs=xo})(),it}var or;function pn(){if(or)return vt.exports;or=1;var r={};return r.NODE_ENV==="production"?vt.exports=dn():vt.exports=fn(),vt.exports}var s=pn();const bt={A4:{width:210,height:297},A3:{width:297,height:420},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6}},ir={paperSize:"A4",customWidth:210,customHeight:297,orientation:"portrait",marginTop:10,marginRight:10,marginBottom:10,marginLeft:10,showHeader:!1,headerContent:"页眉文字",showFooter:!1,footerContent:"页脚文字",showPageNumber:!0,pageNumberFormat:"第 {page} 页"},Ee=3,xt={cellSize:1,cols:100},sr={text:"文本",image:"图片",table:"表格",barcode:"条形码",line:"分割线"},hn={text:{content:"双击编辑文字",fontSize:14,fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#000000",backgroundColor:"transparent"},image:{src:"",fit:"contain",content:""},table:{rows:3,cols:3,borderWidth:1,borderColor:"#000000",content:""},barcode:{value:"1234567890",format:"CODE128",content:""},line:{color:"#000000",thickness:1,style:"solid",content:""}};let It=0,At=0;function ar(){return`comp_${++It}`}function lr(){return`ds_${++At}`}const fe=ln.create((r,n)=>({components:[],selectedId:null,pageSettings:{...ir},gridSettings:{...xt},previewVisible:!1,templateName:"未命名模板",headerFooterVisible:!1,dataSources:[],activeDataSourceId:null,addComponent:(a,o,h)=>{const u=ar(),x=sr[a]||a,O={...hn[a]||{}};a==="text"&&(O.content=x);const y={id:u,type:a,x:o??0,y:h??0,w:a==="line"?20:15,h:a==="line"?1:8,props:O,...a==="table"?{tableColumns:[{title:"列1"},{title:"列2"},{title:"列3"}]}:{}};r(R=>({components:[...R.components,y],selectedId:u}))},updateComponent:(a,o)=>{r(h=>({components:h.components.map(u=>u.id===a?{...u,...o}:u)}))},selectComponent:a=>{r({selectedId:a})},removeComponent:a=>{r(o=>({components:o.components.filter(h=>h.id!==a),selectedId:o.selectedId===a?null:o.selectedId}))},setComponents:a=>{r({components:a})},setPageSettings:a=>{r(o=>({pageSettings:{...o.pageSettings,...a}}))},setPreviewVisible:a=>{r({previewVisible:a})},setTemplateName:a=>{r({templateName:a})},setHeaderFooterVisible:a=>{r({headerFooterVisible:a})},addDataSource:(a,o,h)=>{const x={id:lr(),name:a,type:o,data:h,createdAt:Date.now()};r(O=>({dataSources:[...O.dataSources,x]}))},updateDataSource:(a,o)=>{r(h=>({dataSources:h.dataSources.map(u=>u.id===a?{...u,...o}:u)}))},removeDataSource:a=>{r(o=>({dataSources:o.dataSources.filter(h=>h.id!==a),activeDataSourceId:o.activeDataSourceId===a?null:o.activeDataSourceId}))},setActiveDataSourceId:a=>{r({activeDataSourceId:a})},updateComponentTableColumns:(a,o)=>{r(h=>({components:h.components.map(u=>u.id===a?{...u,tableColumns:o}:u)}))},exportJSON:()=>{const a=n(),o={version:"1.0",templateName:a.templateName,pageSettings:a.pageSettings,components:a.components.map(({id:h,...u})=>u),dataSources:a.dataSources.map(({id:h,...u})=>u)};return JSON.stringify(o,null,2)},importJSON:a=>{try{const o=JSON.parse(a);if(!o.version||!o.pageSettings||!Array.isArray(o.components))return"JSON 格式不正确,缺少必要字段";It=0,At=0;const h=o.components.map(x=>({...x,id:ar()})),u=(o.dataSources||[]).map(x=>({...x,id:lr()}));return r({components:h,dataSources:u,pageSettings:o.pageSettings,templateName:o.templateName||"导入的模板",selectedId:null,activeDataSourceId:null}),null}catch{return"JSON 解析失败,请检查文件内容"}},reset:()=>{It=0,At=0,r({components:[],selectedId:null,pageSettings:{...ir},gridSettings:{...xt},templateName:"未命名模板",headerFooterVisible:!1,previewVisible:!1,dataSources:[],activeDataSourceId:null})}})),{Text:jo}=k.Typography,gn=({onCustomSave:r,onCustomPrint:n})=>{const a=fe(t=>t.templateName),o=fe(t=>t.setTemplateName),h=fe(t=>t.setPreviewVisible),u=fe(t=>t.setHeaderFooterVisible),x=fe(t=>t.selectedId),O=fe(t=>t.removeComponent),y=fe(t=>t.exportJSON),R=fe(t=>t.importJSON),C=fe(t=>t.reset),E=oe.useRef(null),{message:_}=k.App.useApp(),A=oe.useCallback(()=>{x&&O(x)},[x,O]),T=oe.useCallback(()=>{const t=y(),c=new Blob([t],{type:"application/json"}),f=URL.createObjectURL(c),i=document.createElement("a");i.href=f,i.download=`${a||"模板"}.json`,i.click(),URL.revokeObjectURL(f),_.success("模板已导出")},[y,a,_]),p=oe.useCallback(()=>{var t;(t=E.current)==null||t.click()},[]),l=oe.useCallback(t=>{var i;const c=(i=t.target.files)==null?void 0:i[0];if(!c)return;const f=new FileReader;f.onload=()=>{const b=R(f.result);b?_.error(b):_.success("模板已导入")},f.readAsText(c),t.target.value=""},[R,_]),e=oe.useCallback(()=>{C(),_.info("已新建空白模板")},[C,_]);return s.jsxs("div",{style:{height:48,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:[s.jsx(k.Space,{children:s.jsx(k.Input,{value:a,onChange:t=>o(t.target.value),variant:"borderless",style:{width:200,fontSize:16,fontWeight:600},placeholder:"模板名称"})}),s.jsxs(k.Space,{children:[s.jsx(k.Button,{icon:s.jsx(Te.PlusOutlined,{}),onClick:e,children:"新建"}),s.jsx("input",{ref:E,type:"file",accept:".json",style:{display:"none"},onChange:l}),r?s.jsx(k.Button,{icon:s.jsx(Te.SaveOutlined,{}),onClick:r,type:"primary",children:"保存"}):s.jsx(k.Button,{icon:s.jsx(Te.DownloadOutlined,{}),onClick:T,children:"导出"}),s.jsx(k.Button,{icon:s.jsx(Te.UploadOutlined,{}),onClick:p,children:"导入"}),s.jsx(k.Button,{icon:s.jsx(Te.SettingOutlined,{}),onClick:()=>u(!0),children:"页眉页脚"}),s.jsx(k.Button,{danger:!0,icon:s.jsx(Te.DeleteOutlined,{}),disabled:!x,onClick:A,children:"删除"}),n?s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.PrinterOutlined,{}),onClick:n,children:"打印"}):s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.EyeOutlined,{}),onClick:()=>h(!0),children:"预览"})]})]})},{Text:qe}=k.Typography,mn=()=>{const r=fe(u=>u.pageSettings),n=fe(u=>u.setPageSettings),a=r.paperSize==="custom",o=oe.useCallback(u=>{n({paperSize:u})},[n]),h=oe.useCallback(u=>{n({orientation:u})},[n]);return s.jsx(k.Card,{title:"页面设置",size:"small",children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:12},children:"纸张大小"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:r.paperSize,onChange:o,options:[...Object.keys(bt).map(u=>({value:u,label:u})),{value:"custom",label:"自定义"}]})]}),a&&s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(qe,{style:{fontSize:12},children:"宽度 (mm)"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.customWidth,min:10,max:2e3,onChange:u=>n({customWidth:u??210})})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(qe,{style:{fontSize:12},children:"高度 (mm)"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.customHeight,min:10,max:2e3,onChange:u=>n({customHeight:u??297})})]})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:12},children:"方向"}),s.jsxs(k.Radio.Group,{value:r.orientation,onChange:u=>h(u.target.value),size:"small",style:{width:"100%",display:"flex"},children:[s.jsx(k.Radio.Button,{value:"portrait",style:{flex:1,textAlign:"center"},children:"纵向"}),s.jsx(k.Radio.Button,{value:"landscape",style:{flex:1,textAlign:"center"},children:"横向"})]})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:12},children:"页边距 (mm)"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"上"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginTop,min:0,max:100,onChange:u=>n({marginTop:u??10})})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"右"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginRight,min:0,max:100,onChange:u=>n({marginRight:u??10})})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"下"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginBottom,min:0,max:100,onChange:u=>n({marginBottom:u??10})})]}),s.jsxs("div",{children:[s.jsx(qe,{style:{fontSize:11},children:"左"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:r.marginLeft,min:0,max:100,onChange:u=>n({marginLeft:u??10})})]})]})]})]})})},{Text:yn}=k.Typography,vn=[{type:"text",icon:s.jsx(Te.FontSizeOutlined,{}),label:"文本"},{type:"image",icon:s.jsx(Te.PictureOutlined,{}),label:"图片"},{type:"table",icon:s.jsx(Te.TableOutlined,{}),label:"表格"},{type:"barcode",icon:s.jsx(Te.BarcodeOutlined,{}),label:"条形码"},{type:"line",icon:s.jsx(Te.MinusOutlined,{}),label:"分割线"}],bn=()=>{const r=fe(o=>o.addComponent),n=oe.useCallback((o,h)=>{o.dataTransfer.setData("componentType",h),o.dataTransfer.effectAllowed="copy"},[]),a=oe.useCallback(o=>{r(o)},[r]);return s.jsx(k.Card,{title:"组件面板",size:"small",children:s.jsx(k.Space,{direction:"vertical",style:{width:"100%"},size:4,children:vn.map(o=>s.jsxs("div",{draggable:!0,onDragStart:h=>n(h,o.type),onClick:()=>a(o.type),style:{cursor:"grab",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:6,display:"flex",alignItems:"center",gap:8,background:"#fafafa",userSelect:"none",transition:"all 0.2s"},onMouseEnter:h=>{h.currentTarget.style.background="#e6f4ff",h.currentTarget.style.borderColor="#1677ff"},onMouseLeave:h=>{h.currentTarget.style.background="#fafafa",h.currentTarget.style.borderColor="#d9d9d9"},children:[o.icon,s.jsx(yn,{children:o.label})]},o.type))})})};function st(r){try{return JSON.parse(r)}catch{return null}}function at(r,n,a){const o=`${n}Binding`,h=r.props[o];if(h&&h.dataSourceId&&h.fieldPath){const x=a.find(O=>O.id===h.dataSourceId);if(x){const O=St(x);if(O){const y=wt(O,h.fieldPath);if(y)return y}}}return r.props[n]||(h==null?void 0:h.staticValue)||""}function wt(r,n){if(!r||!n)return"";try{const a=n.split(".");let o=r;for(const h of a){if(typeof o!="object"||o===null)return"";o=o[h]}return o!=null?String(o):""}catch{return""}}function St(r){const n=st(r.data);return r.type==="object"&&n&&typeof n=="object"&&!Array.isArray(n)?n:null}function jt(r){const n=st(r.data);return r.type==="array"&&Array.isArray(n)?n:null}const{TextArea:xn}=k.Input,{Text:Rt,Title:Ro}=k.Typography,cr=JSON.stringify({name:"张三",age:28,department:"技术部",email:"zhangsan@example.com"},null,2),wn=JSON.stringify([{id:1,product:"商品A",quantity:2,price:100},{id:2,product:"商品B",quantity:5,price:80},{id:3,product:"商品C",quantity:1,price:200}],null,2),Sn=()=>{const r=fe(_=>_.dataSources),n=fe(_=>_.addDataSource),a=fe(_=>_.updateDataSource),o=fe(_=>_.removeDataSource),[h,u]=oe.useState(!1),[x,O]=oe.useState(null),[y,R]=oe.useState({name:"",type:"object",data:""}),C=_=>{_?(O(_.id),R({name:_.name,type:_.type,data:_.data})):(O(null),R({name:"新数据源",type:"object",data:cr})),u(!0)},E=()=>{const _=st(y.data);if(_===null){k.message.error("JSON 格式不正确");return}if(y.type==="object"&&(Array.isArray(_)||typeof _!="object")){k.message.error("对象类型数据源必须为对象格式");return}if(y.type==="array"&&!Array.isArray(_)){k.message.error("数组类型数据源必须为数组格式");return}x?(a(x,y),k.message.success("数据源已更新")):(n(y.name,y.type,y.data),k.message.success("数据源已添加")),u(!1)};return s.jsxs(k.Card,{title:"数据源",size:"small",extra:s.jsx(k.Button,{type:"link",size:"small",icon:s.jsx(Te.PlusOutlined,{}),onClick:()=>C(),children:"添加"}),children:[s.jsx(k.List,{size:"small",dataSource:r,locale:{emptyText:"暂无数据源"},renderItem:_=>s.jsx(k.List.Item,{actions:[s.jsx(k.Dropdown,{menu:{items:[{key:"edit",label:"编辑",icon:s.jsx(Te.EditOutlined,{}),onClick:()=>C(_)},{type:"divider"},{key:"delete",label:s.jsx(k.Popconfirm,{title:"确定要删除这个数据源吗?",onConfirm:A=>{A==null||A.stopPropagation(),o(_.id),k.message.success("已删除")},okText:"确定",cancelText:"取消",onCancel:A=>A==null?void 0:A.stopPropagation(),children:s.jsx("span",{style:{color:"#ff4d4f",cursor:"pointer"},children:"删除"})}),icon:s.jsx(Te.DeleteOutlined,{style:{color:"#ff4d4f"}})}]},placement:"bottomRight",children:s.jsx(k.Button,{type:"text",size:"small",icon:s.jsx(Te.MoreOutlined,{})})})],children:s.jsx(k.List.Item.Meta,{avatar:s.jsx(Te.DatabaseOutlined,{}),title:s.jsx(Rt,{strong:!0,children:_.name}),description:s.jsx(k.Space,{size:4,children:s.jsx(k.Tag,{color:_.type==="object"?"blue":"green",children:_.type==="object"?"对象":"数组"})})})})}),s.jsx(k.Modal,{title:x?"编辑数据源":"添加数据源",open:h,onOk:E,onCancel:()=>u(!1),okText:"保存",cancelText:"取消",children:s.jsxs(k.Space,{direction:"vertical",style:{width:"100%"},size:"middle",children:[s.jsxs("div",{children:[s.jsx(Rt,{strong:!0,style:{display:"block",marginBottom:4},children:"名称"}),s.jsx(k.Input,{placeholder:"请输入数据源名称",value:y.name,onChange:_=>R({...y,name:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(Rt,{strong:!0,style:{display:"block",marginBottom:4},children:"类型"}),s.jsx(k.Select,{options:[{label:"对象",value:"object"},{label:"数组",value:"array"}],style:{width:"100%"},value:y.type,onChange:_=>{R({...y,type:_,data:_==="object"?cr:wn})}})]}),s.jsx(k.Divider,{style:{margin:"8px 0"}}),s.jsxs("div",{children:[s.jsx(Rt,{strong:!0,style:{display:"block",marginBottom:4},children:"JSON 数据"}),s.jsx(xn,{rows:12,placeholder:"请输入 JSON 数据",value:y.data,onChange:_=>R({...y,data:_.target.value})})]})]})})]})},jn=()=>s.jsx(k.Collapse,{bordered:!1,defaultActiveKey:["1","2"],expandIcon:({isActive:r})=>s.jsx(Te.CaretRightOutlined,{rotate:r?90:0}),style:{height:"100%",overflowY:"auto"},items:[{key:"1",label:"页面设置",children:s.jsx(mn,{})},{key:"2",label:"组件",children:s.jsx(bn,{})},{key:"3",label:"数据源",children:s.jsx(Sn,{})}]});var Lt={exports:{}},lt={},ct={exports:{}},Rn=ct.exports,ur;function Nt(){return ur||(ur=1,(function(r,n){(function(a,o){o(n)})(Rn,(function(a){function o(I){return function(ee,$,ae,W,he,ze,xe){return I(ee,$,xe)}}function h(I){return function(ee,$,ae,W){if(!ee||!$||typeof ee!="object"||typeof $!="object")return I(ee,$,ae,W);var he=W.get(ee),ze=W.get($);if(he&&ze)return he===$&&ze===ee;W.set(ee,$),W.set($,ee);var xe=I(ee,$,ae,W);return W.delete(ee),W.delete($),xe}}function u(I,G){var ee={};for(var $ in I)ee[$]=I[$];for(var $ in G)ee[$]=G[$];return ee}function x(I){return I.constructor===Object||I.constructor==null}function O(I){return typeof I.then=="function"}function y(I,G){return I===G||I!==I&&G!==G}var R="[object Arguments]",C="[object Boolean]",E="[object Date]",_="[object RegExp]",A="[object Map]",T="[object Number]",p="[object Object]",l="[object Set]",e="[object String]",t=Object.prototype.toString;function c(I){var G=I.areArraysEqual,ee=I.areDatesEqual,$=I.areMapsEqual,ae=I.areObjectsEqual,W=I.areRegExpsEqual,he=I.areSetsEqual,ze=I.createIsNestedEqual,xe=ze(Ae);function Ae(m,v,S){if(m===v)return!0;if(!m||!v||typeof m!="object"||typeof v!="object")return m!==m&&v!==v;if(x(m)&&x(v))return ae(m,v,xe,S);var H=Array.isArray(m),re=Array.isArray(v);if(H||re)return H===re&&G(m,v,xe,S);var U=t.call(m);return U!==t.call(v)?!1:U===E?ee(m,v,xe,S):U===_?W(m,v,xe,S):U===A?$(m,v,xe,S):U===l?he(m,v,xe,S):U===p||U===R?O(m)||O(v)?!1:ae(m,v,xe,S):U===C||U===T||U===e?y(m.valueOf(),v.valueOf()):!1}return Ae}function f(I,G,ee,$){var ae=I.length;if(G.length!==ae)return!1;for(;ae-- >0;)if(!ee(I[ae],G[ae],ae,ae,I,G,$))return!1;return!0}var i=h(f);function b(I,G){return y(I.valueOf(),G.valueOf())}function j(I,G,ee,$){var ae=I.size===G.size;if(!ae)return!1;if(!I.size)return!0;var W={},he=0;return I.forEach(function(ze,xe){if(ae){var Ae=!1,m=0;G.forEach(function(v,S){!Ae&&!W[m]&&(Ae=ee(xe,S,he,m,I,G,$)&&ee(ze,v,xe,S,I,G,$))&&(W[m]=!0),m++}),he++,ae=Ae}}),ae}var P=h(j),z="_owner",N=Object.prototype.hasOwnProperty;function F(I,G,ee,$){var ae=Object.keys(I),W=ae.length;if(Object.keys(G).length!==W)return!1;for(var he;W-- >0;){if(he=ae[W],he===z){var ze=!!I.$$typeof,xe=!!G.$$typeof;if((ze||xe)&&ze!==xe)return!1}if(!N.call(G,he)||!ee(I[he],G[he],he,he,I,G,$))return!1}return!0}var Z=h(F);function K(I,G){return I.source===G.source&&I.flags===G.flags}function Q(I,G,ee,$){var ae=I.size===G.size;if(!ae)return!1;if(!I.size)return!0;var W={};return I.forEach(function(he,ze){if(ae){var xe=!1,Ae=0;G.forEach(function(m,v){!xe&&!W[Ae]&&(xe=ee(he,m,ze,v,I,G,$))&&(W[Ae]=!0),Ae++}),ae=xe}}),ae}var V=h(Q),X=Object.freeze({areArraysEqual:f,areDatesEqual:b,areMapsEqual:j,areObjectsEqual:F,areRegExpsEqual:K,areSetsEqual:Q,createIsNestedEqual:o}),J=Object.freeze({areArraysEqual:i,areDatesEqual:b,areMapsEqual:P,areObjectsEqual:Z,areRegExpsEqual:K,areSetsEqual:V,createIsNestedEqual:o}),ne=c(X);function Se(I,G){return ne(I,G,void 0)}var ve=c(u(X,{createIsNestedEqual:function(){return y}}));function M(I,G){return ve(I,G,void 0)}var L=c(J);function le(I,G){return L(I,G,new WeakMap)}var ie=c(u(J,{createIsNestedEqual:function(){return y}}));function ce(I,G){return ie(I,G,new WeakMap)}function pe(I){return c(u(X,I(X)))}function ue(I){var G=c(u(J,I(J)));return(function(ee,$,ae){return ae===void 0&&(ae=new WeakMap),G(ee,$,ae)})}a.circularDeepEqual=le,a.circularShallowEqual=ce,a.createCustomCircularEqual=ue,a.createCustomEqual=pe,a.deepEqual=Se,a.sameValueZeroEqual=y,a.shallowEqual=M,Object.defineProperty(a,"__esModule",{value:!0})}))})(ct,ct.exports)),ct.exports}var Ot={exports:{}},dr;function Ct(){if(dr)return Ot.exports;dr=1;function r(a){var o,h,u="";if(typeof a=="string"||typeof a=="number")u+=a;else if(typeof a=="object")if(Array.isArray(a)){var x=a.length;for(o=0;o<x;o++)a[o]&&(h=r(a[o]))&&(u&&(u+=" "),u+=h)}else for(h in a)a[h]&&(u&&(u+=" "),u+=h);return u}function n(){for(var a,o,h=0,u="",x=arguments.length;h<x;h++)(a=arguments[h])&&(o=r(a))&&(u&&(u+=" "),u+=o);return u}return Ot.exports=n,Ot.exports.clsx=n,Ot.exports}var be={},Wt,fr;function On(){return fr||(fr=1,Wt=function(n,a,o){return n===a?!0:n.className===a.className&&o(n.style,a.style)&&n.width===a.width&&n.autoSize===a.autoSize&&n.cols===a.cols&&n.draggableCancel===a.draggableCancel&&n.draggableHandle===a.draggableHandle&&o(n.verticalCompact,a.verticalCompact)&&o(n.compactType,a.compactType)&&o(n.layout,a.layout)&&o(n.margin,a.margin)&&o(n.containerPadding,a.containerPadding)&&n.rowHeight===a.rowHeight&&n.maxRows===a.maxRows&&n.isBounded===a.isBounded&&n.isDraggable===a.isDraggable&&n.isResizable===a.isResizable&&n.allowOverlap===a.allowOverlap&&n.preventCollision===a.preventCollision&&n.useCSSTransforms===a.useCSSTransforms&&n.transformScale===a.transformScale&&n.isDroppable===a.isDroppable&&o(n.resizeHandles,a.resizeHandles)&&o(n.resizeHandle,a.resizeHandle)&&n.onLayoutChange===a.onLayoutChange&&n.onDragStart===a.onDragStart&&n.onDrag===a.onDrag&&n.onDragStop===a.onDragStop&&n.onResizeStart===a.onResizeStart&&n.onResize===a.onResize&&n.onResizeStop===a.onResizeStop&&n.onDrop===a.onDrop&&o(n.droppingItem,a.droppingItem)&&o(n.innerRef,a.innerRef)}),Wt}var pr;function Ke(){if(pr)return be;pr=1;var r={};Object.defineProperty(be,"__esModule",{value:!0}),be.bottom=C,be.childrenEqual=p,be.cloneLayout=E,be.cloneLayoutItem=T,be.collides=e,be.compact=t,be.compactItem=i,be.compactType=ze,be.correctBounds=b,be.fastPositionEqual=l,be.fastRGLPropsEqual=void 0,be.getAllCollisions=z,be.getFirstCollision=P,be.getLayoutItem=j,be.getStatics=N,be.modifyLayout=_,be.moveElement=F,be.moveElementAwayFromCollision=Z,be.noop=void 0,be.perc=K,be.resizeItemInDirection=ue,be.setTopLeft=G,be.setTransform=I,be.sortLayoutItems=ee,be.sortLayoutItemsByColRow=ae,be.sortLayoutItemsByRowCol=$,be.synchronizeLayoutWithChildren=W,be.validateLayout=he,be.withLayoutItem=A;var n=Nt(),a=o(oe);function o(m){return m&&m.__esModule?m:{default:m}}function h(m,v){var S=Object.keys(m);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(m);v&&(H=H.filter(function(re){return Object.getOwnPropertyDescriptor(m,re).enumerable})),S.push.apply(S,H)}return S}function u(m){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?h(Object(S),!0).forEach(function(H){x(m,H,S[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(S)):h(Object(S)).forEach(function(H){Object.defineProperty(m,H,Object.getOwnPropertyDescriptor(S,H))})}return m}function x(m,v,S){return(v=O(v))in m?Object.defineProperty(m,v,{value:S,enumerable:!0,configurable:!0,writable:!0}):m[v]=S,m}function O(m){var v=y(m,"string");return typeof v=="symbol"?v:v+""}function y(m,v){if(typeof m!="object"||!m)return m;var S=m[Symbol.toPrimitive];if(S!==void 0){var H=S.call(m,v);if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(m)}const R=r.NODE_ENV==="production";function C(m){let v=0,S;for(let H=0,re=m.length;H<re;H++)S=m[H].y+m[H].h,S>v&&(v=S);return v}function E(m){const v=Array(m.length);for(let S=0,H=m.length;S<H;S++)v[S]=T(m[S]);return v}function _(m,v){const S=Array(m.length);for(let H=0,re=m.length;H<re;H++)v.i===m[H].i?S[H]=v:S[H]=m[H];return S}function A(m,v,S){let H=j(m,v);return H?(H=S(T(H)),m=_(m,H),[m,H]):[m,null]}function T(m){return{w:m.w,h:m.h,x:m.x,y:m.y,i:m.i,minW:m.minW,maxW:m.maxW,minH:m.minH,maxH:m.maxH,moved:!!m.moved,static:!!m.static,isDraggable:m.isDraggable,isResizable:m.isResizable,resizeHandles:m.resizeHandles,isBounded:m.isBounded}}function p(m,v){return(0,n.deepEqual)(a.default.Children.map(m,S=>S==null?void 0:S.key),a.default.Children.map(v,S=>S==null?void 0:S.key))&&(0,n.deepEqual)(a.default.Children.map(m,S=>S==null?void 0:S.props["data-grid"]),a.default.Children.map(v,S=>S==null?void 0:S.props["data-grid"]))}be.fastRGLPropsEqual=On();function l(m,v){return m.left===v.left&&m.top===v.top&&m.width===v.width&&m.height===v.height}function e(m,v){return!(m.i===v.i||m.x+m.w<=v.x||m.x>=v.x+v.w||m.y+m.h<=v.y||m.y>=v.y+v.h)}function t(m,v,S,H){const re=N(m);let U=C(re);const se=ee(m,v),ge=Array(m.length);for(let je=0,d=se.length;je<d;je++){let w=T(se[je]);w.static||(w=i(re,w,v,S,se,H,U),U=Math.max(U,w.y+w.h),re.push(w)),ge[m.indexOf(se[je])]=w,w.moved=!1}return ge}const c={x:"w",y:"h"};function f(m,v,S,H){const re=c[H];v[H]+=1;const U=m.map(se=>se.i).indexOf(v.i);for(let se=U+1;se<m.length;se++){const ge=m[se];if(!ge.static){if(ge.y>v.y+v.h)break;e(v,ge)&&f(m,ge,S+v[re],H)}}v[H]=S}function i(m,v,S,H,re,U,se){const ge=S==="vertical",je=S==="horizontal";if(ge)for(typeof se=="number"?v.y=Math.min(se,v.y):v.y=Math.min(C(m),v.y);v.y>0&&!P(m,v);)v.y--;else if(je)for(;v.x>0&&!P(m,v);)v.x--;let d;for(;(d=P(m,v))&&!(S===null&&U);)if(je?f(re,v,d.x+d.w,"x"):f(re,v,d.y+d.h,"y"),je&&v.x+v.w>H)for(v.x=H-v.w,v.y++;v.x>0&&!P(m,v);)v.x--;return v.y=Math.max(v.y,0),v.x=Math.max(v.x,0),v}function b(m,v){const S=N(m);for(let H=0,re=m.length;H<re;H++){const U=m[H];if(U.x+U.w>v.cols&&(U.x=v.cols-U.w),U.x<0&&(U.x=0,U.w=v.cols),!U.static)S.push(U);else for(;P(S,U);)U.y++}return m}function j(m,v){for(let S=0,H=m.length;S<H;S++)if(m[S].i===v)return m[S]}function P(m,v){for(let S=0,H=m.length;S<H;S++)if(e(m[S],v))return m[S]}function z(m,v){return m.filter(S=>e(S,v))}function N(m){return m.filter(v=>v.static)}function F(m,v,S,H,re,U,se,ge,je){if(v.static&&v.isDraggable!==!0||v.y===H&&v.x===S)return m;"Moving element ".concat(v.i," to [").concat(String(S),",").concat(String(H),"] from [").concat(v.x,",").concat(v.y,"]");const d=v.x,w=v.y;typeof S=="number"&&(v.x=S),typeof H=="number"&&(v.y=H),v.moved=!0;let D=ee(m,se);(se==="vertical"&&typeof H=="number"?w>=H:se==="horizontal"&&typeof S=="number"?d>=S:!1)&&(D=D.reverse());const Y=z(D,v),Ce=Y.length>0;if(Ce&&je)return E(m);if(Ce&&U)return"Collision prevented on ".concat(v.i,", reverting."),v.x=d,v.y=w,v.moved=!1,m;for(let me=0,Pe=Y.length;me<Pe;me++){const ke=Y[me];"Resolving collision between ".concat(v.i," at [").concat(v.x,",").concat(v.y,"] and ").concat(ke.i," at [").concat(ke.x,",").concat(ke.y,"]"),!ke.moved&&(ke.static?m=Z(m,ke,v,re,se):m=Z(m,v,ke,re,se))}return m}function Z(m,v,S,H,re,U){const se=re==="horizontal",ge=re==="vertical",je=v.static;if(H){H=!1;const D={x:se?Math.max(v.x-S.w,0):S.x,y:ge?Math.max(v.y-S.h,0):S.y,w:S.w,h:S.h,i:"-1"},q=P(m,D),Y=q&&q.y+q.h>v.y,Ce=q&&v.x+v.w>q.x;if(q){if(Y&&ge)return F(m,S,void 0,S.y+1,H,je,re);if(Y&&re==null)return v.y=S.y,S.y=S.y+S.h,m;if(Ce&&se)return F(m,v,S.x,void 0,H,je,re)}else return"Doing reverse collision on ".concat(S.i," up to [").concat(D.x,",").concat(D.y,"]."),F(m,S,se?D.x:void 0,ge?D.y:void 0,H,je,re)}const d=se?S.x+1:void 0,w=ge?S.y+1:void 0;return d==null&&w==null?m:F(m,S,se?S.x+1:void 0,ge?S.y+1:void 0,H,je,re)}function K(m){return m*100+"%"}const Q=(m,v,S,H)=>m+S>H?v:S,V=(m,v,S)=>m<0?v:S,X=m=>Math.max(0,m),J=m=>Math.max(0,m),ne=(m,v,S)=>{let{left:H,height:re,width:U}=v;const se=m.top-(re-m.height);return{left:H,width:U,height:V(se,m.height,re),top:J(se)}},Se=(m,v,S)=>{let{top:H,left:re,height:U,width:se}=v;return{top:H,height:U,width:Q(m.left,m.width,se,S),left:X(re)}},ve=(m,v,S)=>{let{top:H,height:re,width:U}=v;const se=m.left-(U-m.width);return{height:re,width:se<0?m.width:Q(m.left,m.width,U,S),top:J(H),left:X(se)}},M=(m,v,S)=>{let{top:H,left:re,height:U,width:se}=v;return{width:se,left:re,height:V(H,m.height,U),top:J(H)}},pe={n:ne,ne:function(){return ne(arguments.length<=0?void 0:arguments[0],Se(...arguments))},e:Se,se:function(){return M(arguments.length<=0?void 0:arguments[0],Se(...arguments))},s:M,sw:function(){return M(arguments.length<=0?void 0:arguments[0],ve(...arguments))},w:ve,nw:function(){return ne(arguments.length<=0?void 0:arguments[0],ve(...arguments))}};function ue(m,v,S,H){const re=pe[m];return re?re(v,u(u({},v),S),H):S}function I(m){let{top:v,left:S,width:H,height:re}=m;const U="translate(".concat(S,"px,").concat(v,"px)");return{transform:U,WebkitTransform:U,MozTransform:U,msTransform:U,OTransform:U,width:"".concat(H,"px"),height:"".concat(re,"px"),position:"absolute"}}function G(m){let{top:v,left:S,width:H,height:re}=m;return{top:"".concat(v,"px"),left:"".concat(S,"px"),width:"".concat(H,"px"),height:"".concat(re,"px"),position:"absolute"}}function ee(m,v){return v==="horizontal"?ae(m):v==="vertical"?$(m):m}function $(m){return m.slice(0).sort(function(v,S){return v.y>S.y||v.y===S.y&&v.x>S.x?1:v.y===S.y&&v.x===S.x?0:-1})}function ae(m){return m.slice(0).sort(function(v,S){return v.x>S.x||v.x===S.x&&v.y>S.y?1:-1})}function W(m,v,S,H,re){m=m||[];const U=[];a.default.Children.forEach(v,ge=>{if((ge==null?void 0:ge.key)==null)return;const je=j(m,String(ge.key)),d=ge.props["data-grid"];je&&d==null?U.push(T(je)):d?(R||he([d],"ReactGridLayout.children"),U.push(T(u(u({},d),{},{i:ge.key})))):U.push(T({w:1,h:1,x:0,y:C(U),i:String(ge.key)}))});const se=b(U,{cols:S});return re?se:t(se,H,S)}function he(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const S=["x","y","w","h"];if(!Array.isArray(m))throw new Error(v+" must be an array!");for(let H=0,re=m.length;H<re;H++){const U=m[H];for(let se=0;se<S.length;se++){const ge=S[se],je=U[ge];if(typeof je!="number"||Number.isNaN(je))throw new Error("ReactGridLayout: ".concat(v,"[").concat(H,"].").concat(ge," must be a number! Received: ").concat(je," (").concat(typeof je,")"))}if(typeof U.i<"u"&&typeof U.i!="string")throw new Error("ReactGridLayout: ".concat(v,"[").concat(H,"].i must be a string! Received: ").concat(U.i," (").concat(typeof U.i,")"))}}function ze(m){const{verticalCompact:v,compactType:S}=m||{};return v===!1?null:S}function xe(){}const Ae=()=>{};return be.noop=Ae,be}var Fe={},hr;function Ht(){if(hr)return Fe;hr=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.calcGridColWidth=r,Fe.calcGridItemPosition=a,Fe.calcGridItemWHPx=n,Fe.calcWH=h,Fe.calcXY=o,Fe.clamp=u;function r(x){const{margin:O,containerPadding:y,containerWidth:R,cols:C}=x;return(R-O[0]*(C-1)-y[0]*2)/C}function n(x,O,y){return Number.isFinite(x)?Math.round(O*x+Math.max(0,x-1)*y):x}function a(x,O,y,R,C,E){const{margin:_,containerPadding:A,rowHeight:T}=x,p=r(x),l={};return E&&E.resizing?(l.width=Math.round(E.resizing.width),l.height=Math.round(E.resizing.height)):(l.width=n(R,p,_[0]),l.height=n(C,T,_[1])),E&&E.dragging?(l.top=Math.round(E.dragging.top),l.left=Math.round(E.dragging.left)):E&&E.resizing&&typeof E.resizing.top=="number"&&typeof E.resizing.left=="number"?(l.top=Math.round(E.resizing.top),l.left=Math.round(E.resizing.left)):(l.top=Math.round((T+_[1])*y+A[1]),l.left=Math.round((p+_[0])*O+A[0])),l}function o(x,O,y,R,C){const{margin:E,containerPadding:_,cols:A,rowHeight:T,maxRows:p}=x,l=r(x);let e=Math.round((y-_[0])/(l+E[0])),t=Math.round((O-_[1])/(T+E[1]));return e=u(e,0,A-R),t=u(t,0,p-C),{x:e,y:t}}function h(x,O,y,R,C,E){const{margin:_,maxRows:A,cols:T,rowHeight:p}=x,l=r(x);let e=Math.round((O+_[0])/(l+_[0])),t=Math.round((y+_[1])/(p+_[1])),c=u(e,0,T-R),f=u(t,0,A-C);return["sw","w","nw"].indexOf(E)!==-1&&(c=u(e,0,T)),["nw","n","ne"].indexOf(E)!==-1&&(f=u(t,0,A)),{w:c,h:f}}function u(x,O,y){return Math.max(Math.min(x,y),O)}return Fe}var ut={},_t={exports:{}},Et={exports:{}},Re={};/** @license React v16.13.1
30
+ <%s key={someKey} {...props} />`,tr,Je,So,Je),an[Je+tr]=!0}}return g===h?mo(Le):yo(Le),Le}}function vo(g,B,ee){return ln(g,B,ee,!0)}function bo(g,B,ee){return ln(g,B,ee,!1)}var xo=bo,wo=vo;st.Fragment=h,st.jsx=xo,st.jsxs=wo})(),st}var ir;function hn(){if(ir)return vt.exports;ir=1;var n={};return n.NODE_ENV==="production"?vt.exports=fn():vt.exports=pn(),vt.exports}var r=hn();const bt={A4:{width:210,height:297},A3:{width:297,height:420},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6}},sr={paperSize:"A4",customWidth:210,customHeight:297,orientation:"portrait",marginTop:10,marginRight:10,marginBottom:10,marginLeft:10,showHeader:!1,headerContent:"页眉文字",showFooter:!1,footerContent:"页脚文字",showPageNumber:!0,pageNumberFormat:"第 {page} 页"},Pe=3,xt={cellSize:1,cols:100},ar={text:"文本",image:"图片",table:"表格",barcode:"条形码",qrcode:"二维码",line:"分割线"},gn={text:{content:"双击编辑文字",fontSize:14,fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#000000",backgroundColor:"transparent"},image:{src:"",fit:"contain",content:""},table:{rows:3,cols:3,borderWidth:1,borderColor:"#000000",content:""},barcode:{value:"1234567890",format:"CODE128",content:""},qrcode:{value:"https://example.com",errorLevel:"M",color:"#000000",backgroundColor:"#ffffff",content:""},line:{color:"#000000",thickness:1,style:"solid",content:""}};let It=0,At=0;function lr(){return`comp_${++It}`}function cr(){return`ds_${++At}`}const fe=cn.create((n,o)=>({components:[],selectedId:null,pageSettings:{...sr},gridSettings:{...xt},previewVisible:!1,templateName:"未命名模板",headerFooterVisible:!1,dataSources:[],activeDataSourceId:null,addComponent:(s,i,h)=>{const u=lr(),b=ar[s]||s,O={...gn[s]||{}};s==="text"&&(O.content=b);const m={id:u,type:s,x:i??0,y:h??0,w:s==="line"?20:s==="qrcode"?12:15,h:s==="line"?1:s==="qrcode"?12:8,props:O,...s==="table"?{tableColumns:[{title:"列1"},{title:"列2"},{title:"列3"}]}:{}};n(j=>({components:[...j.components,m],selectedId:u}))},updateComponent:(s,i)=>{n(h=>({components:h.components.map(u=>u.id===s?{...u,...i}:u)}))},selectComponent:s=>{n({selectedId:s})},removeComponent:s=>{n(i=>({components:i.components.filter(h=>h.id!==s),selectedId:i.selectedId===s?null:i.selectedId}))},setComponents:s=>{n({components:s})},setPageSettings:s=>{n(i=>({pageSettings:{...i.pageSettings,...s}}))},setPreviewVisible:s=>{n({previewVisible:s})},setTemplateName:s=>{n({templateName:s})},setHeaderFooterVisible:s=>{n({headerFooterVisible:s})},addDataSource:(s,i,h)=>{const b={id:cr(),name:s,type:i,data:h,createdAt:Date.now()};n(O=>({dataSources:[...O.dataSources,b]}))},updateDataSource:(s,i)=>{n(h=>({dataSources:h.dataSources.map(u=>u.id===s?{...u,...i}:u)}))},removeDataSource:s=>{n(i=>({dataSources:i.dataSources.filter(h=>h.id!==s),activeDataSourceId:i.activeDataSourceId===s?null:i.activeDataSourceId}))},setActiveDataSourceId:s=>{n({activeDataSourceId:s})},updateComponentTableColumns:(s,i)=>{n(h=>({components:h.components.map(u=>u.id===s?{...u,tableColumns:i}:u)}))},exportJSON:()=>{const s=o(),i={version:"1.0",templateName:s.templateName,pageSettings:s.pageSettings,components:s.components.map(({id:h,...u})=>u),dataSources:s.dataSources.map(({id:h,...u})=>u)};return JSON.stringify(i,null,2)},importJSON:s=>{try{const i=JSON.parse(s);if(!i.version||!i.pageSettings||!Array.isArray(i.components))return"JSON 格式不正确,缺少必要字段";It=0,At=0;const h=i.components.map(b=>({...b,id:lr()})),u=(i.dataSources||[]).map(b=>({...b,id:cr()}));return n({components:h,dataSources:u,pageSettings:i.pageSettings,templateName:i.templateName||"导入的模板",selectedId:null,activeDataSourceId:null}),null}catch{return"JSON 解析失败,请检查文件内容"}},reset:()=>{It=0,At=0,n({components:[],selectedId:null,pageSettings:{...sr},gridSettings:{...xt},templateName:"未命名模板",headerFooterVisible:!1,previewVisible:!1,dataSources:[],activeDataSourceId:null})}})),{Text:Oo}=T.Typography,yn=({onCustomSave:n,onCustomPrint:o})=>{const s=fe(t=>t.templateName),i=fe(t=>t.setTemplateName),h=fe(t=>t.setPreviewVisible),u=fe(t=>t.setHeaderFooterVisible),b=fe(t=>t.selectedId),O=fe(t=>t.removeComponent),m=fe(t=>t.exportJSON),j=fe(t=>t.importJSON),R=fe(t=>t.reset),P=oe.useRef(null),{message:E}=T.App.useApp(),N=oe.useCallback(()=>{b&&O(b)},[b,O]),I=oe.useCallback(()=>{const t=m(),c=new Blob([t],{type:"application/json"}),f=URL.createObjectURL(c),a=document.createElement("a");a.href=f,a.download=`${s||"模板"}.json`,a.click(),URL.revokeObjectURL(f),E.success("模板已导出")},[m,s,E]),p=oe.useCallback(()=>{var t;(t=P.current)==null||t.click()},[]),l=oe.useCallback(t=>{var a;const c=(a=t.target.files)==null?void 0:a[0];if(!c)return;const f=new FileReader;f.onload=()=>{const S=j(f.result);S?E.error(S):E.success("模板已导入")},f.readAsText(c),t.target.value=""},[j,E]),e=oe.useCallback(()=>{R(),E.info("已新建空白模板")},[R,E]);return r.jsxs("div",{style:{height:48,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:[r.jsx(T.Space,{children:r.jsx(T.Input,{value:s,onChange:t=>i(t.target.value),variant:"borderless",style:{width:200,fontSize:16,fontWeight:600},placeholder:"模板名称"})}),r.jsxs(T.Space,{children:[r.jsx(T.Button,{icon:r.jsx(Oe.PlusOutlined,{}),onClick:e,children:"新建"}),r.jsx("input",{ref:P,type:"file",accept:".json",style:{display:"none"},onChange:l}),n?r.jsx(T.Button,{icon:r.jsx(Oe.SaveOutlined,{}),onClick:n,type:"primary",children:"保存"}):r.jsx(T.Button,{icon:r.jsx(Oe.DownloadOutlined,{}),onClick:I,children:"导出"}),r.jsx(T.Button,{icon:r.jsx(Oe.UploadOutlined,{}),onClick:p,children:"导入"}),r.jsx(T.Button,{icon:r.jsx(Oe.SettingOutlined,{}),onClick:()=>u(!0),children:"页眉页脚"}),r.jsx(T.Button,{danger:!0,icon:r.jsx(Oe.DeleteOutlined,{}),disabled:!b,onClick:N,children:"删除"}),o?r.jsx(T.Button,{type:"primary",icon:r.jsx(Oe.PrinterOutlined,{}),onClick:o,children:"打印"}):r.jsx(T.Button,{type:"primary",icon:r.jsx(Oe.EyeOutlined,{}),onClick:()=>h(!0),children:"预览"})]})]})},{Text:Be}=T.Typography,mn=()=>{const n=fe(u=>u.pageSettings),o=fe(u=>u.setPageSettings),s=n.paperSize==="custom",i=oe.useCallback(u=>{o({paperSize:u})},[o]),h=oe.useCallback(u=>{o({orientation:u})},[o]);return r.jsx(T.Card,{title:"页面设置",size:"small",children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:12},children:"纸张大小"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:n.paperSize,onChange:i,options:[...Object.keys(bt).map(u=>({value:u,label:u})),{value:"custom",label:"自定义"}]})]}),s&&r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("div",{style:{flex:1},children:[r.jsx(Be,{style:{fontSize:12},children:"宽度 (mm)"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:n.customWidth,min:10,max:2e3,onChange:u=>o({customWidth:u??210})})]}),r.jsxs("div",{style:{flex:1},children:[r.jsx(Be,{style:{fontSize:12},children:"高度 (mm)"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:n.customHeight,min:10,max:2e3,onChange:u=>o({customHeight:u??297})})]})]}),r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:12},children:"方向"}),r.jsxs(T.Radio.Group,{value:n.orientation,onChange:u=>h(u.target.value),size:"small",style:{width:"100%",display:"flex"},children:[r.jsx(T.Radio.Button,{value:"portrait",style:{flex:1,textAlign:"center"},children:"纵向"}),r.jsx(T.Radio.Button,{value:"landscape",style:{flex:1,textAlign:"center"},children:"横向"})]})]}),r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:12},children:"页边距 (mm)"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:11},children:"上"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:n.marginTop,min:0,max:100,onChange:u=>o({marginTop:u??10})})]}),r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:11},children:"右"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:n.marginRight,min:0,max:100,onChange:u=>o({marginRight:u??10})})]}),r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:11},children:"下"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:n.marginBottom,min:0,max:100,onChange:u=>o({marginBottom:u??10})})]}),r.jsxs("div",{children:[r.jsx(Be,{style:{fontSize:11},children:"左"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:n.marginLeft,min:0,max:100,onChange:u=>o({marginLeft:u??10})})]})]})]})]})})},{Text:vn}=T.Typography,bn=[{type:"text",icon:r.jsx(Oe.FontSizeOutlined,{}),label:"文本"},{type:"image",icon:r.jsx(Oe.PictureOutlined,{}),label:"图片"},{type:"table",icon:r.jsx(Oe.TableOutlined,{}),label:"表格"},{type:"barcode",icon:r.jsx(Oe.BarcodeOutlined,{}),label:"条形码"},{type:"qrcode",icon:r.jsx(Oe.QrcodeOutlined,{}),label:"二维码"},{type:"line",icon:r.jsx(Oe.MinusOutlined,{}),label:"分割线"}],xn=()=>{const n=fe(i=>i.addComponent),o=oe.useCallback((i,h)=>{i.dataTransfer.setData("componentType",h),i.dataTransfer.effectAllowed="copy"},[]),s=oe.useCallback(i=>{n(i)},[n]);return r.jsx(T.Card,{title:"组件面板",size:"small",children:r.jsx(T.Space,{direction:"vertical",style:{width:"100%"},size:4,children:bn.map(i=>r.jsxs("div",{draggable:!0,onDragStart:h=>o(h,i.type),onClick:()=>s(i.type),style:{cursor:"grab",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:6,display:"flex",alignItems:"center",gap:8,background:"#fafafa",userSelect:"none",transition:"all 0.2s"},onMouseEnter:h=>{h.currentTarget.style.background="#e6f4ff",h.currentTarget.style.borderColor="#1677ff"},onMouseLeave:h=>{h.currentTarget.style.background="#fafafa",h.currentTarget.style.borderColor="#d9d9d9"},children:[i.icon,r.jsx(vn,{children:i.label})]},i.type))})})};function at(n){try{return JSON.parse(n)}catch{return null}}function Ke(n,o,s){const i=`${o}Binding`,h=n.props[i];if(h&&h.dataSourceId&&h.fieldPath){const b=s.find(O=>O.id===h.dataSourceId);if(b){const O=St(b);if(O){const m=wt(O,h.fieldPath);if(m)return m}}}return n.props[o]||(h==null?void 0:h.staticValue)||""}function wt(n,o){if(!n||!o)return"";try{const s=o.split(".");let i=n;for(const h of s){if(typeof i!="object"||i===null)return"";i=i[h]}return i!=null?String(i):""}catch{return""}}function St(n){const o=at(n.data);return n.type==="object"&&o&&typeof o=="object"&&!Array.isArray(o)?o:null}function jt(n){const o=at(n.data);return n.type==="array"&&Array.isArray(o)?o:null}const{TextArea:wn}=T.Input,{Text:Ot,Title:Ro}=T.Typography,ur=JSON.stringify({name:"张三",age:28,department:"技术部",email:"zhangsan@example.com"},null,2),Sn=JSON.stringify([{id:1,product:"商品A",quantity:2,price:100},{id:2,product:"商品B",quantity:5,price:80},{id:3,product:"商品C",quantity:1,price:200}],null,2),jn=()=>{const n=fe(E=>E.dataSources),o=fe(E=>E.addDataSource),s=fe(E=>E.updateDataSource),i=fe(E=>E.removeDataSource),[h,u]=oe.useState(!1),[b,O]=oe.useState(null),[m,j]=oe.useState({name:"",type:"object",data:""}),R=E=>{E?(O(E.id),j({name:E.name,type:E.type,data:E.data})):(O(null),j({name:"新数据源",type:"object",data:ur})),u(!0)},P=()=>{const E=at(m.data);if(E===null){T.message.error("JSON 格式不正确");return}if(m.type==="object"&&(Array.isArray(E)||typeof E!="object")){T.message.error("对象类型数据源必须为对象格式");return}if(m.type==="array"&&!Array.isArray(E)){T.message.error("数组类型数据源必须为数组格式");return}b?(s(b,m),T.message.success("数据源已更新")):(o(m.name,m.type,m.data),T.message.success("数据源已添加")),u(!1)};return r.jsxs(T.Card,{title:"数据源",size:"small",extra:r.jsx(T.Button,{type:"link",size:"small",icon:r.jsx(Oe.PlusOutlined,{}),onClick:()=>R(),children:"添加"}),children:[r.jsx(T.List,{size:"small",dataSource:n,locale:{emptyText:"暂无数据源"},renderItem:E=>r.jsx(T.List.Item,{actions:[r.jsx(T.Dropdown,{menu:{items:[{key:"edit",label:"编辑",icon:r.jsx(Oe.EditOutlined,{}),onClick:()=>R(E)},{type:"divider"},{key:"delete",label:r.jsx(T.Popconfirm,{title:"确定要删除这个数据源吗?",onConfirm:N=>{N==null||N.stopPropagation(),i(E.id),T.message.success("已删除")},okText:"确定",cancelText:"取消",onCancel:N=>N==null?void 0:N.stopPropagation(),children:r.jsx("span",{style:{color:"#ff4d4f",cursor:"pointer"},children:"删除"})}),icon:r.jsx(Oe.DeleteOutlined,{style:{color:"#ff4d4f"}})}]},placement:"bottomRight",children:r.jsx(T.Button,{type:"text",size:"small",icon:r.jsx(Oe.MoreOutlined,{})})})],children:r.jsx(T.List.Item.Meta,{avatar:r.jsx(Oe.DatabaseOutlined,{}),title:r.jsx(Ot,{ellipsis:!0,strong:!0,children:E.name}),description:r.jsx(T.Space,{size:4,children:r.jsx(T.Tag,{color:E.type==="object"?"blue":"green",children:E.type==="object"?"对象":"数组"})})})})}),r.jsx(T.Modal,{title:b?"编辑数据源":"添加数据源",open:h,onOk:P,onCancel:()=>u(!1),okText:"保存",cancelText:"取消",children:r.jsxs(T.Space,{direction:"vertical",style:{width:"100%"},size:"middle",children:[r.jsxs("div",{children:[r.jsx(Ot,{strong:!0,style:{display:"block",marginBottom:4},children:"名称"}),r.jsx(T.Input,{placeholder:"请输入数据源名称",value:m.name,onChange:E=>j({...m,name:E.target.value})})]}),r.jsxs("div",{children:[r.jsx(Ot,{strong:!0,style:{display:"block",marginBottom:4},children:"类型"}),r.jsx(T.Select,{options:[{label:"对象",value:"object"},{label:"数组",value:"array"}],style:{width:"100%"},value:m.type,onChange:E=>{j({...m,type:E,data:E==="object"?ur:Sn})}})]}),r.jsx(T.Divider,{style:{margin:"8px 0"}}),r.jsxs("div",{children:[r.jsx(Ot,{strong:!0,style:{display:"block",marginBottom:4},children:"JSON 数据"}),r.jsx(wn,{rows:12,placeholder:"请输入 JSON 数据",value:m.data,onChange:E=>j({...m,data:E.target.value})})]})]})})]})},On=()=>r.jsx(T.Collapse,{bordered:!1,accordion:!0,defaultActiveKey:["1"],expandIcon:({isActive:n})=>r.jsx(Oe.CaretRightOutlined,{rotate:n?90:0}),style:{height:"100%",overflowY:"auto"},items:[{key:"1",label:"页面设置",children:r.jsx(mn,{})},{key:"2",label:"组件",children:r.jsx(xn,{})},{key:"3",label:"数据源",children:r.jsx(jn,{})}]});var Lt={exports:{}},lt={},ct={exports:{}},Rn=ct.exports,dr;function Nt(){return dr||(dr=1,(function(n,o){(function(s,i){i(o)})(Rn,(function(s){function i(A){return function(Z,X,ae,H,ye,ze,we){return A(Z,X,we)}}function h(A){return function(Z,X,ae,H){if(!Z||!X||typeof Z!="object"||typeof X!="object")return A(Z,X,ae,H);var ye=H.get(Z),ze=H.get(X);if(ye&&ze)return ye===X&&ze===Z;H.set(Z,X),H.set(X,Z);var we=A(Z,X,ae,H);return H.delete(Z),H.delete(X),we}}function u(A,G){var Z={};for(var X in A)Z[X]=A[X];for(var X in G)Z[X]=G[X];return Z}function b(A){return A.constructor===Object||A.constructor==null}function O(A){return typeof A.then=="function"}function m(A,G){return A===G||A!==A&&G!==G}var j="[object Arguments]",R="[object Boolean]",P="[object Date]",E="[object RegExp]",N="[object Map]",I="[object Number]",p="[object Object]",l="[object Set]",e="[object String]",t=Object.prototype.toString;function c(A){var G=A.areArraysEqual,Z=A.areDatesEqual,X=A.areMapsEqual,ae=A.areObjectsEqual,H=A.areRegExpsEqual,ye=A.areSetsEqual,ze=A.createIsNestedEqual,we=ze(Ae);function Ae(y,v,w){if(y===v)return!0;if(!y||!v||typeof y!="object"||typeof v!="object")return y!==y&&v!==v;if(b(y)&&b(v))return ae(y,v,we,w);var q=Array.isArray(y),ne=Array.isArray(v);if(q||ne)return q===ne&&G(y,v,we,w);var $=t.call(y);return $!==t.call(v)?!1:$===P?Z(y,v,we,w):$===E?H(y,v,we,w):$===N?X(y,v,we,w):$===l?ye(y,v,we,w):$===p||$===j?O(y)||O(v)?!1:ae(y,v,we,w):$===R||$===I||$===e?m(y.valueOf(),v.valueOf()):!1}return Ae}function f(A,G,Z,X){var ae=A.length;if(G.length!==ae)return!1;for(;ae-- >0;)if(!Z(A[ae],G[ae],ae,ae,A,G,X))return!1;return!0}var a=h(f);function S(A,G){return m(A.valueOf(),G.valueOf())}function C(A,G,Z,X){var ae=A.size===G.size;if(!ae)return!1;if(!A.size)return!0;var H={},ye=0;return A.forEach(function(ze,we){if(ae){var Ae=!1,y=0;G.forEach(function(v,w){!Ae&&!H[y]&&(Ae=Z(we,w,ye,y,A,G,X)&&Z(ze,v,we,w,A,G,X))&&(H[y]=!0),y++}),ye++,ae=Ae}}),ae}var D=h(C),_="_owner",k=Object.prototype.hasOwnProperty;function W(A,G,Z,X){var ae=Object.keys(A),H=ae.length;if(Object.keys(G).length!==H)return!1;for(var ye;H-- >0;){if(ye=ae[H],ye===_){var ze=!!A.$$typeof,we=!!G.$$typeof;if((ze||we)&&ze!==we)return!1}if(!k.call(G,ye)||!Z(A[ye],G[ye],ye,ye,A,G,X))return!1}return!0}var U=h(W);function J(A,G){return A.source===G.source&&A.flags===G.flags}function re(A,G,Z,X){var ae=A.size===G.size;if(!ae)return!1;if(!A.size)return!0;var H={};return A.forEach(function(ye,ze){if(ae){var we=!1,Ae=0;G.forEach(function(y,v){!we&&!H[Ae]&&(we=Z(ye,y,ze,v,A,G,X))&&(H[Ae]=!0),Ae++}),ae=we}}),ae}var V=h(re),K=Object.freeze({areArraysEqual:f,areDatesEqual:S,areMapsEqual:C,areObjectsEqual:W,areRegExpsEqual:J,areSetsEqual:re,createIsNestedEqual:i}),Q=Object.freeze({areArraysEqual:a,areDatesEqual:S,areMapsEqual:D,areObjectsEqual:U,areRegExpsEqual:J,areSetsEqual:V,createIsNestedEqual:i}),te=c(K);function he(A,G){return te(A,G,void 0)}var ge=c(u(K,{createIsNestedEqual:function(){return m}}));function M(A,G){return ge(A,G,void 0)}var L=c(Q);function le(A,G){return L(A,G,new WeakMap)}var ie=c(u(Q,{createIsNestedEqual:function(){return m}}));function ce(A,G){return ie(A,G,new WeakMap)}function pe(A){return c(u(K,A(K)))}function ue(A){var G=c(u(Q,A(Q)));return(function(Z,X,ae){return ae===void 0&&(ae=new WeakMap),G(Z,X,ae)})}s.circularDeepEqual=le,s.circularShallowEqual=ce,s.createCustomCircularEqual=ue,s.createCustomEqual=pe,s.deepEqual=he,s.sameValueZeroEqual=m,s.shallowEqual=M,Object.defineProperty(s,"__esModule",{value:!0})}))})(ct,ct.exports)),ct.exports}var Rt={exports:{}},fr;function Ct(){if(fr)return Rt.exports;fr=1;function n(s){var i,h,u="";if(typeof s=="string"||typeof s=="number")u+=s;else if(typeof s=="object")if(Array.isArray(s)){var b=s.length;for(i=0;i<b;i++)s[i]&&(h=n(s[i]))&&(u&&(u+=" "),u+=h)}else for(h in s)s[h]&&(u&&(u+=" "),u+=h);return u}function o(){for(var s,i,h=0,u="",b=arguments.length;h<b;h++)(s=arguments[h])&&(i=n(s))&&(u&&(u+=" "),u+=i);return u}return Rt.exports=o,Rt.exports.clsx=o,Rt.exports}var xe={},Wt,pr;function Cn(){return pr||(pr=1,Wt=function(o,s,i){return o===s?!0:o.className===s.className&&i(o.style,s.style)&&o.width===s.width&&o.autoSize===s.autoSize&&o.cols===s.cols&&o.draggableCancel===s.draggableCancel&&o.draggableHandle===s.draggableHandle&&i(o.verticalCompact,s.verticalCompact)&&i(o.compactType,s.compactType)&&i(o.layout,s.layout)&&i(o.margin,s.margin)&&i(o.containerPadding,s.containerPadding)&&o.rowHeight===s.rowHeight&&o.maxRows===s.maxRows&&o.isBounded===s.isBounded&&o.isDraggable===s.isDraggable&&o.isResizable===s.isResizable&&o.allowOverlap===s.allowOverlap&&o.preventCollision===s.preventCollision&&o.useCSSTransforms===s.useCSSTransforms&&o.transformScale===s.transformScale&&o.isDroppable===s.isDroppable&&i(o.resizeHandles,s.resizeHandles)&&i(o.resizeHandle,s.resizeHandle)&&o.onLayoutChange===s.onLayoutChange&&o.onDragStart===s.onDragStart&&o.onDrag===s.onDrag&&o.onDragStop===s.onDragStop&&o.onResizeStart===s.onResizeStart&&o.onResize===s.onResize&&o.onResizeStop===s.onResizeStop&&o.onDrop===s.onDrop&&i(o.droppingItem,s.droppingItem)&&i(o.innerRef,s.innerRef)}),Wt}var hr;function Qe(){if(hr)return xe;hr=1;var n={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.bottom=R,xe.childrenEqual=p,xe.cloneLayout=P,xe.cloneLayoutItem=I,xe.collides=e,xe.compact=t,xe.compactItem=a,xe.compactType=ze,xe.correctBounds=S,xe.fastPositionEqual=l,xe.fastRGLPropsEqual=void 0,xe.getAllCollisions=_,xe.getFirstCollision=D,xe.getLayoutItem=C,xe.getStatics=k,xe.modifyLayout=E,xe.moveElement=W,xe.moveElementAwayFromCollision=U,xe.noop=void 0,xe.perc=J,xe.resizeItemInDirection=ue,xe.setTopLeft=G,xe.setTransform=A,xe.sortLayoutItems=Z,xe.sortLayoutItemsByColRow=ae,xe.sortLayoutItemsByRowCol=X,xe.synchronizeLayoutWithChildren=H,xe.validateLayout=ye,xe.withLayoutItem=N;var o=Nt(),s=i(oe);function i(y){return y&&y.__esModule?y:{default:y}}function h(y,v){var w=Object.keys(y);if(Object.getOwnPropertySymbols){var q=Object.getOwnPropertySymbols(y);v&&(q=q.filter(function(ne){return Object.getOwnPropertyDescriptor(y,ne).enumerable})),w.push.apply(w,q)}return w}function u(y){for(var v=1;v<arguments.length;v++){var w=arguments[v]!=null?arguments[v]:{};v%2?h(Object(w),!0).forEach(function(q){b(y,q,w[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(w)):h(Object(w)).forEach(function(q){Object.defineProperty(y,q,Object.getOwnPropertyDescriptor(w,q))})}return y}function b(y,v,w){return(v=O(v))in y?Object.defineProperty(y,v,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[v]=w,y}function O(y){var v=m(y,"string");return typeof v=="symbol"?v:v+""}function m(y,v){if(typeof y!="object"||!y)return y;var w=y[Symbol.toPrimitive];if(w!==void 0){var q=w.call(y,v);if(typeof q!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(y)}const j=n.NODE_ENV==="production";function R(y){let v=0,w;for(let q=0,ne=y.length;q<ne;q++)w=y[q].y+y[q].h,w>v&&(v=w);return v}function P(y){const v=Array(y.length);for(let w=0,q=y.length;w<q;w++)v[w]=I(y[w]);return v}function E(y,v){const w=Array(y.length);for(let q=0,ne=y.length;q<ne;q++)v.i===y[q].i?w[q]=v:w[q]=y[q];return w}function N(y,v,w){let q=C(y,v);return q?(q=w(I(q)),y=E(y,q),[y,q]):[y,null]}function I(y){return{w:y.w,h:y.h,x:y.x,y:y.y,i:y.i,minW:y.minW,maxW:y.maxW,minH:y.minH,maxH:y.maxH,moved:!!y.moved,static:!!y.static,isDraggable:y.isDraggable,isResizable:y.isResizable,resizeHandles:y.resizeHandles,isBounded:y.isBounded}}function p(y,v){return(0,o.deepEqual)(s.default.Children.map(y,w=>w==null?void 0:w.key),s.default.Children.map(v,w=>w==null?void 0:w.key))&&(0,o.deepEqual)(s.default.Children.map(y,w=>w==null?void 0:w.props["data-grid"]),s.default.Children.map(v,w=>w==null?void 0:w.props["data-grid"]))}xe.fastRGLPropsEqual=Cn();function l(y,v){return y.left===v.left&&y.top===v.top&&y.width===v.width&&y.height===v.height}function e(y,v){return!(y.i===v.i||y.x+y.w<=v.x||y.x>=v.x+v.w||y.y+y.h<=v.y||y.y>=v.y+v.h)}function t(y,v,w,q){const ne=k(y);let $=R(ne);const se=Z(y,v),me=Array(y.length);for(let je=0,d=se.length;je<d;je++){let x=I(se[je]);x.static||(x=a(ne,x,v,w,se,q,$),$=Math.max($,x.y+x.h),ne.push(x)),me[y.indexOf(se[je])]=x,x.moved=!1}return me}const c={x:"w",y:"h"};function f(y,v,w,q){const ne=c[q];v[q]+=1;const $=y.map(se=>se.i).indexOf(v.i);for(let se=$+1;se<y.length;se++){const me=y[se];if(!me.static){if(me.y>v.y+v.h)break;e(v,me)&&f(y,me,w+v[ne],q)}}v[q]=w}function a(y,v,w,q,ne,$,se){const me=w==="vertical",je=w==="horizontal";if(me)for(typeof se=="number"?v.y=Math.min(se,v.y):v.y=Math.min(R(y),v.y);v.y>0&&!D(y,v);)v.y--;else if(je)for(;v.x>0&&!D(y,v);)v.x--;let d;for(;(d=D(y,v))&&!(w===null&&$);)if(je?f(ne,v,d.x+d.w,"x"):f(ne,v,d.y+d.h,"y"),je&&v.x+v.w>q)for(v.x=q-v.w,v.y++;v.x>0&&!D(y,v);)v.x--;return v.y=Math.max(v.y,0),v.x=Math.max(v.x,0),v}function S(y,v){const w=k(y);for(let q=0,ne=y.length;q<ne;q++){const $=y[q];if($.x+$.w>v.cols&&($.x=v.cols-$.w),$.x<0&&($.x=0,$.w=v.cols),!$.static)w.push($);else for(;D(w,$);)$.y++}return y}function C(y,v){for(let w=0,q=y.length;w<q;w++)if(y[w].i===v)return y[w]}function D(y,v){for(let w=0,q=y.length;w<q;w++)if(e(y[w],v))return y[w]}function _(y,v){return y.filter(w=>e(w,v))}function k(y){return y.filter(v=>v.static)}function W(y,v,w,q,ne,$,se,me,je){if(v.static&&v.isDraggable!==!0||v.y===q&&v.x===w)return y;"Moving element ".concat(v.i," to [").concat(String(w),",").concat(String(q),"] from [").concat(v.x,",").concat(v.y,"]");const d=v.x,x=v.y;typeof w=="number"&&(v.x=w),typeof q=="number"&&(v.y=q),v.moved=!0;let z=Z(y,se);(se==="vertical"&&typeof q=="number"?x>=q:se==="horizontal"&&typeof w=="number"?d>=w:!1)&&(z=z.reverse());const Y=_(z,v),_e=Y.length>0;if(_e&&je)return P(y);if(_e&&$)return"Collision prevented on ".concat(v.i,", reverting."),v.x=d,v.y=x,v.moved=!1,y;for(let ve=0,De=Y.length;ve<De;ve++){const Me=Y[ve];"Resolving collision between ".concat(v.i," at [").concat(v.x,",").concat(v.y,"] and ").concat(Me.i," at [").concat(Me.x,",").concat(Me.y,"]"),!Me.moved&&(Me.static?y=U(y,Me,v,ne,se):y=U(y,v,Me,ne,se))}return y}function U(y,v,w,q,ne,$){const se=ne==="horizontal",me=ne==="vertical",je=v.static;if(q){q=!1;const z={x:se?Math.max(v.x-w.w,0):w.x,y:me?Math.max(v.y-w.h,0):w.y,w:w.w,h:w.h,i:"-1"},F=D(y,z),Y=F&&F.y+F.h>v.y,_e=F&&v.x+v.w>F.x;if(F){if(Y&&me)return W(y,w,void 0,w.y+1,q,je,ne);if(Y&&ne==null)return v.y=w.y,w.y=w.y+w.h,y;if(_e&&se)return W(y,v,w.x,void 0,q,je,ne)}else return"Doing reverse collision on ".concat(w.i," up to [").concat(z.x,",").concat(z.y,"]."),W(y,w,se?z.x:void 0,me?z.y:void 0,q,je,ne)}const d=se?w.x+1:void 0,x=me?w.y+1:void 0;return d==null&&x==null?y:W(y,w,se?w.x+1:void 0,me?w.y+1:void 0,q,je,ne)}function J(y){return y*100+"%"}const re=(y,v,w,q)=>y+w>q?v:w,V=(y,v,w)=>y<0?v:w,K=y=>Math.max(0,y),Q=y=>Math.max(0,y),te=(y,v,w)=>{let{left:q,height:ne,width:$}=v;const se=y.top-(ne-y.height);return{left:q,width:$,height:V(se,y.height,ne),top:Q(se)}},he=(y,v,w)=>{let{top:q,left:ne,height:$,width:se}=v;return{top:q,height:$,width:re(y.left,y.width,se,w),left:K(ne)}},ge=(y,v,w)=>{let{top:q,height:ne,width:$}=v;const se=y.left-($-y.width);return{height:ne,width:se<0?y.width:re(y.left,y.width,$,w),top:Q(q),left:K(se)}},M=(y,v,w)=>{let{top:q,left:ne,height:$,width:se}=v;return{width:se,left:ne,height:V(q,y.height,$),top:Q(q)}},pe={n:te,ne:function(){return te(arguments.length<=0?void 0:arguments[0],he(...arguments))},e:he,se:function(){return M(arguments.length<=0?void 0:arguments[0],he(...arguments))},s:M,sw:function(){return M(arguments.length<=0?void 0:arguments[0],ge(...arguments))},w:ge,nw:function(){return te(arguments.length<=0?void 0:arguments[0],ge(...arguments))}};function ue(y,v,w,q){const ne=pe[y];return ne?ne(v,u(u({},v),w),q):w}function A(y){let{top:v,left:w,width:q,height:ne}=y;const $="translate(".concat(w,"px,").concat(v,"px)");return{transform:$,WebkitTransform:$,MozTransform:$,msTransform:$,OTransform:$,width:"".concat(q,"px"),height:"".concat(ne,"px"),position:"absolute"}}function G(y){let{top:v,left:w,width:q,height:ne}=y;return{top:"".concat(v,"px"),left:"".concat(w,"px"),width:"".concat(q,"px"),height:"".concat(ne,"px"),position:"absolute"}}function Z(y,v){return v==="horizontal"?ae(y):v==="vertical"?X(y):y}function X(y){return y.slice(0).sort(function(v,w){return v.y>w.y||v.y===w.y&&v.x>w.x?1:v.y===w.y&&v.x===w.x?0:-1})}function ae(y){return y.slice(0).sort(function(v,w){return v.x>w.x||v.x===w.x&&v.y>w.y?1:-1})}function H(y,v,w,q,ne){y=y||[];const $=[];s.default.Children.forEach(v,me=>{if((me==null?void 0:me.key)==null)return;const je=C(y,String(me.key)),d=me.props["data-grid"];je&&d==null?$.push(I(je)):d?(j||ye([d],"ReactGridLayout.children"),$.push(I(u(u({},d),{},{i:me.key})))):$.push(I({w:1,h:1,x:0,y:R($),i:String(me.key)}))});const se=S($,{cols:w});return ne?se:t(se,q,w)}function ye(y){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const w=["x","y","w","h"];if(!Array.isArray(y))throw new Error(v+" must be an array!");for(let q=0,ne=y.length;q<ne;q++){const $=y[q];for(let se=0;se<w.length;se++){const me=w[se],je=$[me];if(typeof je!="number"||Number.isNaN(je))throw new Error("ReactGridLayout: ".concat(v,"[").concat(q,"].").concat(me," must be a number! Received: ").concat(je," (").concat(typeof je,")"))}if(typeof $.i<"u"&&typeof $.i!="string")throw new Error("ReactGridLayout: ".concat(v,"[").concat(q,"].i must be a string! Received: ").concat($.i," (").concat(typeof $.i,")"))}}function ze(y){const{verticalCompact:v,compactType:w}=y||{};return v===!1?null:w}function we(){}const Ae=()=>{};return xe.noop=Ae,xe}var Fe={},gr;function Ht(){if(gr)return Fe;gr=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.calcGridColWidth=n,Fe.calcGridItemPosition=s,Fe.calcGridItemWHPx=o,Fe.calcWH=h,Fe.calcXY=i,Fe.clamp=u;function n(b){const{margin:O,containerPadding:m,containerWidth:j,cols:R}=b;return(j-O[0]*(R-1)-m[0]*2)/R}function o(b,O,m){return Number.isFinite(b)?Math.round(O*b+Math.max(0,b-1)*m):b}function s(b,O,m,j,R,P){const{margin:E,containerPadding:N,rowHeight:I}=b,p=n(b),l={};return P&&P.resizing?(l.width=Math.round(P.resizing.width),l.height=Math.round(P.resizing.height)):(l.width=o(j,p,E[0]),l.height=o(R,I,E[1])),P&&P.dragging?(l.top=Math.round(P.dragging.top),l.left=Math.round(P.dragging.left)):P&&P.resizing&&typeof P.resizing.top=="number"&&typeof P.resizing.left=="number"?(l.top=Math.round(P.resizing.top),l.left=Math.round(P.resizing.left)):(l.top=Math.round((I+E[1])*m+N[1]),l.left=Math.round((p+E[0])*O+N[0])),l}function i(b,O,m,j,R){const{margin:P,containerPadding:E,cols:N,rowHeight:I,maxRows:p}=b,l=n(b);let e=Math.round((m-E[0])/(l+P[0])),t=Math.round((O-E[1])/(I+P[1]));return e=u(e,0,N-j),t=u(t,0,p-R),{x:e,y:t}}function h(b,O,m,j,R,P){const{margin:E,maxRows:N,cols:I,rowHeight:p}=b,l=n(b);let e=Math.round((O+E[0])/(l+E[0])),t=Math.round((m+E[1])/(p+E[1])),c=u(e,0,I-j),f=u(t,0,N-R);return["sw","w","nw"].indexOf(P)!==-1&&(c=u(e,0,I)),["nw","n","ne"].indexOf(P)!==-1&&(f=u(t,0,N)),{w:c,h:f}}function u(b,O,m){return Math.max(Math.min(b,m),O)}return Fe}var ut={},_t={exports:{}},Et={exports:{}},Re={};/** @license React v16.13.1
31
31
  * react-is.production.min.js
32
32
  *
33
33
  * Copyright (c) Facebook, Inc. and its affiliates.
34
34
  *
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
- */var gr;function Cn(){if(gr)return Re;gr=1;var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,h=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,x=r?Symbol.for("react.provider"):60109,O=r?Symbol.for("react.context"):60110,y=r?Symbol.for("react.async_mode"):60111,R=r?Symbol.for("react.concurrent_mode"):60111,C=r?Symbol.for("react.forward_ref"):60112,E=r?Symbol.for("react.suspense"):60113,_=r?Symbol.for("react.suspense_list"):60120,A=r?Symbol.for("react.memo"):60115,T=r?Symbol.for("react.lazy"):60116,p=r?Symbol.for("react.block"):60121,l=r?Symbol.for("react.fundamental"):60117,e=r?Symbol.for("react.responder"):60118,t=r?Symbol.for("react.scope"):60119;function c(i){if(typeof i=="object"&&i!==null){var b=i.$$typeof;switch(b){case n:switch(i=i.type,i){case y:case R:case o:case u:case h:case E:return i;default:switch(i=i&&i.$$typeof,i){case O:case C:case T:case A:case x:return i;default:return b}}case a:return b}}}function f(i){return c(i)===R}return Re.AsyncMode=y,Re.ConcurrentMode=R,Re.ContextConsumer=O,Re.ContextProvider=x,Re.Element=n,Re.ForwardRef=C,Re.Fragment=o,Re.Lazy=T,Re.Memo=A,Re.Portal=a,Re.Profiler=u,Re.StrictMode=h,Re.Suspense=E,Re.isAsyncMode=function(i){return f(i)||c(i)===y},Re.isConcurrentMode=f,Re.isContextConsumer=function(i){return c(i)===O},Re.isContextProvider=function(i){return c(i)===x},Re.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===n},Re.isForwardRef=function(i){return c(i)===C},Re.isFragment=function(i){return c(i)===o},Re.isLazy=function(i){return c(i)===T},Re.isMemo=function(i){return c(i)===A},Re.isPortal=function(i){return c(i)===a},Re.isProfiler=function(i){return c(i)===u},Re.isStrictMode=function(i){return c(i)===h},Re.isSuspense=function(i){return c(i)===E},Re.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===o||i===R||i===u||i===h||i===E||i===_||typeof i=="object"&&i!==null&&(i.$$typeof===T||i.$$typeof===A||i.$$typeof===x||i.$$typeof===O||i.$$typeof===C||i.$$typeof===l||i.$$typeof===e||i.$$typeof===t||i.$$typeof===p)},Re.typeOf=c,Re}var Oe={},mr;function _n(){if(mr)return Oe;mr=1;var r={};/** @license React v16.13.1
37
+ */var yr;function _n(){if(yr)return Re;yr=1;var n=typeof Symbol=="function"&&Symbol.for,o=n?Symbol.for("react.element"):60103,s=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,h=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,b=n?Symbol.for("react.provider"):60109,O=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,j=n?Symbol.for("react.concurrent_mode"):60111,R=n?Symbol.for("react.forward_ref"):60112,P=n?Symbol.for("react.suspense"):60113,E=n?Symbol.for("react.suspense_list"):60120,N=n?Symbol.for("react.memo"):60115,I=n?Symbol.for("react.lazy"):60116,p=n?Symbol.for("react.block"):60121,l=n?Symbol.for("react.fundamental"):60117,e=n?Symbol.for("react.responder"):60118,t=n?Symbol.for("react.scope"):60119;function c(a){if(typeof a=="object"&&a!==null){var S=a.$$typeof;switch(S){case o:switch(a=a.type,a){case m:case j:case i:case u:case h:case P:return a;default:switch(a=a&&a.$$typeof,a){case O:case R:case I:case N:case b:return a;default:return S}}case s:return S}}}function f(a){return c(a)===j}return Re.AsyncMode=m,Re.ConcurrentMode=j,Re.ContextConsumer=O,Re.ContextProvider=b,Re.Element=o,Re.ForwardRef=R,Re.Fragment=i,Re.Lazy=I,Re.Memo=N,Re.Portal=s,Re.Profiler=u,Re.StrictMode=h,Re.Suspense=P,Re.isAsyncMode=function(a){return f(a)||c(a)===m},Re.isConcurrentMode=f,Re.isContextConsumer=function(a){return c(a)===O},Re.isContextProvider=function(a){return c(a)===b},Re.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===o},Re.isForwardRef=function(a){return c(a)===R},Re.isFragment=function(a){return c(a)===i},Re.isLazy=function(a){return c(a)===I},Re.isMemo=function(a){return c(a)===N},Re.isPortal=function(a){return c(a)===s},Re.isProfiler=function(a){return c(a)===u},Re.isStrictMode=function(a){return c(a)===h},Re.isSuspense=function(a){return c(a)===P},Re.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===i||a===j||a===u||a===h||a===P||a===E||typeof a=="object"&&a!==null&&(a.$$typeof===I||a.$$typeof===N||a.$$typeof===b||a.$$typeof===O||a.$$typeof===R||a.$$typeof===l||a.$$typeof===e||a.$$typeof===t||a.$$typeof===p)},Re.typeOf=c,Re}var Ce={},mr;function En(){if(mr)return Ce;mr=1;var n={};/** @license React v16.13.1
38
38
  * react-is.development.js
39
39
  *
40
40
  * Copyright (c) Facebook, Inc. and its affiliates.
41
41
  *
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
- */return r.NODE_ENV!=="production"&&(function(){var n=typeof Symbol=="function"&&Symbol.for,a=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,h=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,x=n?Symbol.for("react.profiler"):60114,O=n?Symbol.for("react.provider"):60109,y=n?Symbol.for("react.context"):60110,R=n?Symbol.for("react.async_mode"):60111,C=n?Symbol.for("react.concurrent_mode"):60111,E=n?Symbol.for("react.forward_ref"):60112,_=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.suspense_list"):60120,T=n?Symbol.for("react.memo"):60115,p=n?Symbol.for("react.lazy"):60116,l=n?Symbol.for("react.block"):60121,e=n?Symbol.for("react.fundamental"):60117,t=n?Symbol.for("react.responder"):60118,c=n?Symbol.for("react.scope"):60119;function f(W){return typeof W=="string"||typeof W=="function"||W===h||W===C||W===x||W===u||W===_||W===A||typeof W=="object"&&W!==null&&(W.$$typeof===p||W.$$typeof===T||W.$$typeof===O||W.$$typeof===y||W.$$typeof===E||W.$$typeof===e||W.$$typeof===t||W.$$typeof===c||W.$$typeof===l)}function i(W){if(typeof W=="object"&&W!==null){var he=W.$$typeof;switch(he){case a:var ze=W.type;switch(ze){case R:case C:case h:case x:case u:case _:return ze;default:var xe=ze&&ze.$$typeof;switch(xe){case y:case E:case p:case T:case O:return xe;default:return he}}case o:return he}}}var b=R,j=C,P=y,z=O,N=a,F=E,Z=h,K=p,Q=T,V=o,X=x,J=u,ne=_,Se=!1;function ve(W){return Se||(Se=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(W)||i(W)===R}function M(W){return i(W)===C}function L(W){return i(W)===y}function le(W){return i(W)===O}function ie(W){return typeof W=="object"&&W!==null&&W.$$typeof===a}function ce(W){return i(W)===E}function pe(W){return i(W)===h}function ue(W){return i(W)===p}function I(W){return i(W)===T}function G(W){return i(W)===o}function ee(W){return i(W)===x}function $(W){return i(W)===u}function ae(W){return i(W)===_}Oe.AsyncMode=b,Oe.ConcurrentMode=j,Oe.ContextConsumer=P,Oe.ContextProvider=z,Oe.Element=N,Oe.ForwardRef=F,Oe.Fragment=Z,Oe.Lazy=K,Oe.Memo=Q,Oe.Portal=V,Oe.Profiler=X,Oe.StrictMode=J,Oe.Suspense=ne,Oe.isAsyncMode=ve,Oe.isConcurrentMode=M,Oe.isContextConsumer=L,Oe.isContextProvider=le,Oe.isElement=ie,Oe.isForwardRef=ce,Oe.isFragment=pe,Oe.isLazy=ue,Oe.isMemo=I,Oe.isPortal=G,Oe.isProfiler=ee,Oe.isStrictMode=$,Oe.isSuspense=ae,Oe.isValidElementType=f,Oe.typeOf=i})(),Oe}var yr;function vr(){if(yr)return Et.exports;yr=1;var r={};return r.NODE_ENV==="production"?Et.exports=Cn():Et.exports=_n(),Et.exports}/*
44
+ */return n.NODE_ENV!=="production"&&(function(){var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,h=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,b=o?Symbol.for("react.profiler"):60114,O=o?Symbol.for("react.provider"):60109,m=o?Symbol.for("react.context"):60110,j=o?Symbol.for("react.async_mode"):60111,R=o?Symbol.for("react.concurrent_mode"):60111,P=o?Symbol.for("react.forward_ref"):60112,E=o?Symbol.for("react.suspense"):60113,N=o?Symbol.for("react.suspense_list"):60120,I=o?Symbol.for("react.memo"):60115,p=o?Symbol.for("react.lazy"):60116,l=o?Symbol.for("react.block"):60121,e=o?Symbol.for("react.fundamental"):60117,t=o?Symbol.for("react.responder"):60118,c=o?Symbol.for("react.scope"):60119;function f(H){return typeof H=="string"||typeof H=="function"||H===h||H===R||H===b||H===u||H===E||H===N||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===I||H.$$typeof===O||H.$$typeof===m||H.$$typeof===P||H.$$typeof===e||H.$$typeof===t||H.$$typeof===c||H.$$typeof===l)}function a(H){if(typeof H=="object"&&H!==null){var ye=H.$$typeof;switch(ye){case s:var ze=H.type;switch(ze){case j:case R:case h:case b:case u:case E:return ze;default:var we=ze&&ze.$$typeof;switch(we){case m:case P:case p:case I:case O:return we;default:return ye}}case i:return ye}}}var S=j,C=R,D=m,_=O,k=s,W=P,U=h,J=p,re=I,V=i,K=b,Q=u,te=E,he=!1;function ge(H){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(H)||a(H)===j}function M(H){return a(H)===R}function L(H){return a(H)===m}function le(H){return a(H)===O}function ie(H){return typeof H=="object"&&H!==null&&H.$$typeof===s}function ce(H){return a(H)===P}function pe(H){return a(H)===h}function ue(H){return a(H)===p}function A(H){return a(H)===I}function G(H){return a(H)===i}function Z(H){return a(H)===b}function X(H){return a(H)===u}function ae(H){return a(H)===E}Ce.AsyncMode=S,Ce.ConcurrentMode=C,Ce.ContextConsumer=D,Ce.ContextProvider=_,Ce.Element=k,Ce.ForwardRef=W,Ce.Fragment=U,Ce.Lazy=J,Ce.Memo=re,Ce.Portal=V,Ce.Profiler=K,Ce.StrictMode=Q,Ce.Suspense=te,Ce.isAsyncMode=ge,Ce.isConcurrentMode=M,Ce.isContextConsumer=L,Ce.isContextProvider=le,Ce.isElement=ie,Ce.isForwardRef=ce,Ce.isFragment=pe,Ce.isLazy=ue,Ce.isMemo=A,Ce.isPortal=G,Ce.isProfiler=Z,Ce.isStrictMode=X,Ce.isSuspense=ae,Ce.isValidElementType=f,Ce.typeOf=a})(),Ce}var vr;function br(){if(vr)return Et.exports;vr=1;var n={};return n.NODE_ENV==="production"?Et.exports=_n():Et.exports=En(),Et.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var Bt,br;function En(){if(br)return Bt;br=1;var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function h(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var x={},O=0;O<10;O++)x["_"+String.fromCharCode(O)]=O;var y=Object.getOwnPropertyNames(x).map(function(C){return x[C]});if(y.join("")!=="0123456789")return!1;var R={};return"abcdefghijklmnopqrst".split("").forEach(function(C){R[C]=C}),Object.keys(Object.assign({},R)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Bt=h()?Object.assign:function(u,x){for(var O,y=o(u),R,C=1;C<arguments.length;C++){O=Object(arguments[C]);for(var E in O)n.call(O,E)&&(y[E]=O[E]);if(r){R=r(O);for(var _=0;_<R.length;_++)a.call(O,R[_])&&(y[R[_]]=O[R[_]])}}return y},Bt}var qt,xr;function Ft(){if(xr)return qt;xr=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qt=r,qt}var Gt,wr;function Sr(){return wr||(wr=1,Gt=Function.call.bind(Object.prototype.hasOwnProperty)),Gt}var Yt,jr;function Pn(){if(jr)return Yt;jr=1;var r={},n=function(){};if(r.NODE_ENV!=="production"){var a=Ft(),o={},h=Sr();n=function(x){var O="Warning: "+x;typeof console<"u"&&console.error(O);try{throw new Error(O)}catch{}}}function u(x,O,y,R,C){if(r.NODE_ENV!=="production"){for(var E in x)if(h(x,E)){var _;try{if(typeof x[E]!="function"){var A=Error((R||"React class")+": "+y+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw A.name="Invariant Violation",A}_=x[E](O,E,R,y,null,a)}catch(p){_=p}if(_&&!(_ instanceof Error)&&n((R||"React class")+": type specification of "+y+" `"+E+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in o)){o[_.message]=!0;var T=C?C():"";n("Failed "+y+" type: "+_.message+(T??""))}}}}return u.resetWarningCache=function(){r.NODE_ENV!=="production"&&(o={})},Yt=u,Yt}var Vt,Rr;function Dn(){if(Rr)return Vt;Rr=1;var r={},n=vr(),a=En(),o=Ft(),h=Sr(),u=Pn(),x=function(){};r.NODE_ENV!=="production"&&(x=function(y){var R="Warning: "+y;typeof console<"u"&&console.error(R);try{throw new Error(R)}catch{}});function O(){return null}return Vt=function(y,R){var C=typeof Symbol=="function"&&Symbol.iterator,E="@@iterator";function _(M){var L=M&&(C&&M[C]||M[E]);if(typeof L=="function")return L}var A="<<anonymous>>",T={array:t("array"),bigint:t("bigint"),bool:t("boolean"),func:t("function"),number:t("number"),object:t("object"),string:t("string"),symbol:t("symbol"),any:c(),arrayOf:f,element:i(),elementType:b(),instanceOf:j,node:F(),objectOf:z,oneOf:P,oneOfType:N,shape:K,exact:Q};function p(M,L){return M===L?M!==0||1/M===1/L:M!==M&&L!==L}function l(M,L){this.message=M,this.data=L&&typeof L=="object"?L:{},this.stack=""}l.prototype=Error.prototype;function e(M){if(r.NODE_ENV!=="production")var L={},le=0;function ie(pe,ue,I,G,ee,$,ae){if(G=G||A,$=$||I,ae!==o){if(R){var W=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw W.name="Invariant Violation",W}else if(r.NODE_ENV!=="production"&&typeof console<"u"){var he=G+":"+I;!L[he]&&le<3&&(x("You are manually calling a React.PropTypes validation function for the `"+$+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[he]=!0,le++)}}return ue[I]==null?pe?ue[I]===null?new l("The "+ee+" `"+$+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new l("The "+ee+" `"+$+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:M(ue,I,G,ee,$)}var ce=ie.bind(null,!1);return ce.isRequired=ie.bind(null,!0),ce}function t(M){function L(le,ie,ce,pe,ue,I){var G=le[ie],ee=J(G);if(ee!==M){var $=ne(G);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+$+"` supplied to `"+ce+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return e(L)}function c(){return e(O)}function f(M){function L(le,ie,ce,pe,ue){if(typeof M!="function")return new l("Property `"+ue+"` of component `"+ce+"` has invalid PropType notation inside arrayOf.");var I=le[ie];if(!Array.isArray(I)){var G=J(I);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected an array."))}for(var ee=0;ee<I.length;ee++){var $=M(I,ee,ce,pe,ue+"["+ee+"]",o);if($ instanceof Error)return $}return null}return e(L)}function i(){function M(L,le,ie,ce,pe){var ue=L[le];if(!y(ue)){var I=J(ue);return new l("Invalid "+ce+" `"+pe+"` of type "+("`"+I+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return e(M)}function b(){function M(L,le,ie,ce,pe){var ue=L[le];if(!n.isValidElementType(ue)){var I=J(ue);return new l("Invalid "+ce+" `"+pe+"` of type "+("`"+I+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return e(M)}function j(M){function L(le,ie,ce,pe,ue){if(!(le[ie]instanceof M)){var I=M.name||A,G=ve(le[ie]);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected ")+("instance of `"+I+"`."))}return null}return e(L)}function P(M){if(!Array.isArray(M))return r.NODE_ENV!=="production"&&(arguments.length>1?x("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):x("Invalid argument supplied to oneOf, expected an array.")),O;function L(le,ie,ce,pe,ue){for(var I=le[ie],G=0;G<M.length;G++)if(p(I,M[G]))return null;var ee=JSON.stringify(M,function(ae,W){var he=ne(W);return he==="symbol"?String(W):W});return new l("Invalid "+pe+" `"+ue+"` of value `"+String(I)+"` "+("supplied to `"+ce+"`, expected one of "+ee+"."))}return e(L)}function z(M){function L(le,ie,ce,pe,ue){if(typeof M!="function")return new l("Property `"+ue+"` of component `"+ce+"` has invalid PropType notation inside objectOf.");var I=le[ie],G=J(I);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected an object."));for(var ee in I)if(h(I,ee)){var $=M(I,ee,ce,pe,ue+"."+ee,o);if($ instanceof Error)return $}return null}return e(L)}function N(M){if(!Array.isArray(M))return r.NODE_ENV!=="production"&&x("Invalid argument supplied to oneOfType, expected an instance of array."),O;for(var L=0;L<M.length;L++){var le=M[L];if(typeof le!="function")return x("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Se(le)+" at index "+L+"."),O}function ie(ce,pe,ue,I,G){for(var ee=[],$=0;$<M.length;$++){var ae=M[$],W=ae(ce,pe,ue,I,G,o);if(W==null)return null;W.data&&h(W.data,"expectedType")&&ee.push(W.data.expectedType)}var he=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new l("Invalid "+I+" `"+G+"` supplied to "+("`"+ue+"`"+he+"."))}return e(ie)}function F(){function M(L,le,ie,ce,pe){return V(L[le])?null:new l("Invalid "+ce+" `"+pe+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return e(M)}function Z(M,L,le,ie,ce){return new l((M||"React class")+": "+L+" type `"+le+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ce+"`.")}function K(M){function L(le,ie,ce,pe,ue){var I=le[ie],G=J(I);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type `"+G+"` "+("supplied to `"+ce+"`, expected `object`."));for(var ee in M){var $=M[ee];if(typeof $!="function")return Z(ce,pe,ue,ee,ne($));var ae=$(I,ee,ce,pe,ue+"."+ee,o);if(ae)return ae}return null}return e(L)}function Q(M){function L(le,ie,ce,pe,ue){var I=le[ie],G=J(I);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type `"+G+"` "+("supplied to `"+ce+"`, expected `object`."));var ee=a({},le[ie],M);for(var $ in ee){var ae=M[$];if(h(M,$)&&typeof ae!="function")return Z(ce,pe,ue,$,ne(ae));if(!ae)return new l("Invalid "+pe+" `"+ue+"` key `"+$+"` supplied to `"+ce+"`.\nBad object: "+JSON.stringify(le[ie],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var W=ae(I,$,ce,pe,ue+"."+$,o);if(W)return W}return null}return e(L)}function V(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(V);if(M===null||y(M))return!0;var L=_(M);if(L){var le=L.call(M),ie;if(L!==M.entries){for(;!(ie=le.next()).done;)if(!V(ie.value))return!1}else for(;!(ie=le.next()).done;){var ce=ie.value;if(ce&&!V(ce[1]))return!1}}else return!1;return!0;default:return!1}}function X(M,L){return M==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function J(M){var L=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":X(L,M)?"symbol":L}function ne(M){if(typeof M>"u"||M===null)return""+M;var L=J(M);if(L==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return L}function Se(M){var L=ne(M);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ve(M){return!M.constructor||!M.constructor.name?A:M.constructor.name}return T.checkPropTypes=u,T.resetWarningCache=u.resetWarningCache,T.PropTypes=T,T},Vt}var Ut,Or;function Tn(){if(Or)return Ut;Or=1;var r=Ft();function n(){}function a(){}return a.resetWarningCache=n,Ut=function(){function o(x,O,y,R,C,E){if(E!==r){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}o.isRequired=o;function h(){return o}var u={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:h,element:o,elementType:o,instanceOf:h,node:o,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:a,resetWarningCache:n};return u.PropTypes=u,u},Ut}var Cr;function Ue(){if(Cr)return _t.exports;Cr=1;var r={};if(r.NODE_ENV!=="production"){var n=vr(),a=!0;_t.exports=Dn()(n.isElement,a)}else _t.exports=Tn()();return _t.exports}var dt={exports:{}},$t,_r;function zn(){if(_r)return $t;_r=1;var r={},n=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,u=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,O=(d,w)=>{for(var D in w)a(d,D,{get:w[D],enumerable:!0})},y=(d,w,D,q)=>{if(w&&typeof w=="object"||typeof w=="function")for(let Y of h(w))!x.call(d,Y)&&Y!==D&&a(d,Y,{get:()=>w[Y],enumerable:!(q=o(w,Y))||q.enumerable});return d},R=(d,w,D)=>(D=d!=null?n(u(d)):{},y(!d||!d.__esModule?a(D,"default",{value:d,enumerable:!0}):D,d)),C=d=>y(a({},"__esModule",{value:!0}),d),E={};O(E,{DraggableCore:()=>ge,default:()=>je}),$t=C(E);var _=R(oe),A=R(Ue()),T=R(Mt),p=Ct();function l(d,w){for(let D=0,q=d.length;D<q;D++)if(w.apply(w,[d[D],D,d]))return d[D]}function e(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Function]"}function t(d){return typeof d=="number"&&!isNaN(d)}function c(d){return parseInt(d,10)}function f(d,w,D){if(d[w])return new Error(`Invalid prop ${w} passed to ${D} - do not set this, set it on the child.`)}var i=["Moz","Webkit","O","ms"];function b(d="transform"){var w,D;if(typeof window>"u")return"";const q=(D=(w=window.document)==null?void 0:w.documentElement)==null?void 0:D.style;if(!q||d in q)return"";for(let Y=0;Y<i.length;Y++)if(j(d,i[Y])in q)return i[Y];return""}function j(d,w){return w?`${w}${P(d)}`:d}function P(d){let w="",D=!0;for(let q=0;q<d.length;q++)D?(w+=d[q].toUpperCase(),D=!1):d[q]==="-"?D=!0:w+=d[q];return w}var z=b(),N="";function F(d,w){var D;N||(N=(D=l(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Y){return e(d[Y])}))!=null?D:"");const q=d[N];return e(q)?!!q.call(d,w):!1}function Z(d,w,D){let q=d;do{if(F(q,w))return!0;if(q===D)return!1;q=q.parentNode}while(q);return!1}function K(d,w,D,q){if(!d)return;const Y={capture:!0,...q},Ce=D;d.addEventListener?d.addEventListener(w,Ce,Y):d.attachEvent?d.attachEvent("on"+w,Ce):d["on"+w]=Ce}function Q(d,w,D,q){if(!d)return;const Y={capture:!0,...q},Ce=D;d.removeEventListener?d.removeEventListener(w,Ce,Y):d.detachEvent?d.detachEvent("on"+w,Ce):d["on"+w]=null}function V(d){let w=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w+=c(D.borderTopWidth),w+=c(D.borderBottomWidth),w}function X(d){let w=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w+=c(D.borderLeftWidth),w+=c(D.borderRightWidth),w}function J(d){let w=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w-=c(D.paddingTop),w-=c(D.paddingBottom),w}function ne(d){let w=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return w-=c(D.paddingLeft),w-=c(D.paddingRight),w}function Se(d,w,D){const Y=w===w.ownerDocument.body?{left:0,top:0}:w.getBoundingClientRect(),Ce=(d.clientX+w.scrollLeft-Y.left)/D,me=(d.clientY+w.scrollTop-Y.top)/D;return{x:Ce,y:me}}function ve(d,w){const D=L(d,w,"px");return{[j("transform",z)]:D}}function M(d,w){return L(d,w,"")}function L({x:d,y:w},D,q){let Y=`translate(${d}${q},${w}${q})`;if(D){const Ce=`${typeof D.x=="string"?D.x:D.x+q}`,me=`${typeof D.y=="string"?D.y:D.y+q}`;Y=`translate(${Ce}, ${me})`+Y}return Y}function le(d,w){return d.targetTouches&&l(d.targetTouches,D=>w===D.identifier)||d.changedTouches&&l(d.changedTouches,D=>w===D.identifier)}function ie(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function ce(d){if(!d)return;let w=d.getElementById("react-draggable-style-el");w||(w=d.createElement("style"),w.type="text/css",w.id="react-draggable-style-el",w.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
- `,w.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
- `,d.getElementsByTagName("head")[0].appendChild(w)),d.body&&I(d.body,"react-draggable-transparent-selection")}function pe(d){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ue(d)}):ue(d)}function ue(d){if(d)try{d.body&&G(d.body,"react-draggable-transparent-selection");const w=d.selection;if(w)w.empty();else{const D=(d.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function I(d,w){d.classList?d.classList.add(w):d.className.match(new RegExp(`(?:^|\\s)${w}(?!\\S)`))||(d.className+=` ${w}`)}function G(d,w){d.classList?d.classList.remove(w):d.className=d.className.replace(new RegExp(`(?:^|\\s)${w}(?!\\S)`,"g"),"")}function ee(d,w,D){if(!d.props.bounds)return[w,D];let{bounds:q}=d.props;q=typeof q=="string"?q:Ae(q);const Y=m(d);if(typeof q=="string"){const{ownerDocument:Ce}=Y,me=Ce.defaultView;if(!me)throw new Error("Cannot resolve the owner window of the draggable node.");let Pe;if(q==="parent"?Pe=Y.parentNode:Pe=Y.getRootNode().querySelector(q),!(Pe instanceof me.HTMLElement))throw new Error('Bounds selector "'+q+'" could not find an element.');const ke=Pe,Ye=me.getComputedStyle(Y),$e=me.getComputedStyle(ke);q={left:-Y.offsetLeft+c($e.paddingLeft)+c(Ye.marginLeft),top:-Y.offsetTop+c($e.paddingTop)+c(Ye.marginTop),right:ne(ke)-X(Y)-Y.offsetLeft+c($e.paddingRight)-c(Ye.marginRight),bottom:J(ke)-V(Y)-Y.offsetTop+c($e.paddingBottom)-c(Ye.marginBottom)}}return t(q.right)&&(w=Math.min(w,q.right)),t(q.bottom)&&(D=Math.min(D,q.bottom)),t(q.left)&&(w=Math.max(w,q.left)),t(q.top)&&(D=Math.max(D,q.top)),[w,D]}function $(d,w,D){const q=Math.round(w/d[0])*d[0],Y=Math.round(D/d[1])*d[1];return[q,Y]}function ae(d){return d.props.axis==="both"||d.props.axis==="x"}function W(d){return d.props.axis==="both"||d.props.axis==="y"}function he(d,w,D){const q=typeof w=="number"?le(d,w):null;if(typeof w=="number"&&!q)return null;const Y=m(D),Ce=D.props.offsetParent||Y.offsetParent||Y.ownerDocument.body;return Se(q||d,Ce,D.props.scale)}function ze(d,w,D){const q=!t(d.lastX),Y=m(d);return q?{node:Y,deltaX:0,deltaY:0,lastX:w,lastY:D,x:w,y:D}:{node:Y,deltaX:w-d.lastX,deltaY:D-d.lastY,lastX:d.lastX,lastY:d.lastY,x:w,y:D}}function xe(d,w){const D=d.props.scale;return{node:w.node,x:d.state.x+w.deltaX/D,y:d.state.y+w.deltaY/D,deltaX:w.deltaX/D,deltaY:w.deltaY/D,lastX:d.state.x,lastY:d.state.y}}function Ae(d){return{left:d.left,top:d.top,right:d.right,bottom:d.bottom}}function m(d){const w=d.findDOMNode();if(!w)throw new Error("<DraggableCore>: Unmounted during event!");return w}var v=R(oe),S=R(Ue()),H=R(Mt);function re(...d){r.DRAGGABLE_DEBUG&&console.log(...d)}var U={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},se=U.mouse,ge=class extends v.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=d=>{if(this.props.onMouseDown(d),!this.props.allowAnyClick&&(typeof d.button=="number"&&d.button!==0||d.ctrlKey))return!1;const w=this.findDOMNode();if(!w||!w.ownerDocument||!w.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:D}=w;if(this.props.disabled||!(d.target instanceof D.defaultView.Node)||this.props.handle&&!Z(d.target,this.props.handle,w)||this.props.cancel&&Z(d.target,this.props.cancel,w))return;d.type==="touchstart"&&!this.props.allowMobileScroll&&d.preventDefault();const q=ie(d);this.touchIdentifier=q;const Y=he(d,q,this);if(Y==null)return;const{x:Ce,y:me}=Y,Pe=ze(this,Ce,me);re("DraggableCore: handleDragStart: %j",Pe),re("calling",this.props.onStart),!(this.props.onStart(d,Pe)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&ce(D),this.dragging=!0,this.lastX=Ce,this.lastY=me,K(D,se.move,this.handleDrag),K(D,se.stop,this.handleDragStop))},this.handleDrag=d=>{const w=he(d,this.touchIdentifier,this);if(w==null)return;let{x:D,y:q}=w;if(Array.isArray(this.props.grid)){let me=D-this.lastX,Pe=q-this.lastY;if([me,Pe]=$(this.props.grid,me,Pe),!me&&!Pe)return;D=this.lastX+me,q=this.lastY+Pe}const Y=ze(this,D,q);if(re("DraggableCore: handleDrag: %j",Y),this.props.onDrag(d,Y)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const me=document.createEvent("MouseEvents");me.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(me)}return}this.lastX=D,this.lastY=q},this.handleDragStop=d=>{if(!this.dragging)return;const w=he(d,this.touchIdentifier,this);if(w==null)return;let{x:D,y:q}=w;if(Array.isArray(this.props.grid)){let Pe=D-this.lastX||0,ke=q-this.lastY||0;[Pe,ke]=$(this.props.grid,Pe,ke),D=this.lastX+Pe,q=this.lastY+ke}const Y=ze(this,D,q);if(this.props.onStop(d,Y)===!1||this.mounted===!1)return!1;const me=this.findDOMNode();me&&this.props.enableUserSelectHack&&pe(me.ownerDocument),re("DraggableCore: handleDragStop: %j",Y),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,me&&(re("DraggableCore: Removing handlers"),Q(me.ownerDocument,se.move,this.handleDrag),Q(me.ownerDocument,se.stop,this.handleDragStop))},this.onMouseDown=d=>(se=U.mouse,this.handleDragStart(d)),this.onMouseUp=d=>(se=U.mouse,this.handleDragStop(d)),this.onTouchStart=d=>(se=U.touch,this.handleDragStart(d)),this.onTouchEnd=d=>(se=U.touch,this.handleDragStop(d))}componentDidMount(){this.mounted=!0;const d=this.findDOMNode();d&&K(d,U.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const d=this.findDOMNode();if(d){const{ownerDocument:w}=d;Q(w,U.mouse.move,this.handleDrag),Q(w,U.touch.move,this.handleDrag),Q(w,U.mouse.stop,this.handleDragStop),Q(w,U.touch.stop,this.handleDragStop),Q(d,U.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&pe(w)}}findDOMNode(){var d;if((d=this.props)!=null&&d.nodeRef)return this.props.nodeRef.current;const w=H.default;return typeof w.findDOMNode=="function"?w.findDOMNode(this):(re("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return v.cloneElement(v.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};ge.displayName="DraggableCore",ge.propTypes={allowAnyClick:S.default.bool,allowMobileScroll:S.default.bool,children:S.default.node.isRequired,disabled:S.default.bool,enableUserSelectHack:S.default.bool,offsetParent:function(d,w){if(d[w]&&d[w].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:S.default.arrayOf(S.default.number),handle:S.default.string,cancel:S.default.string,nodeRef:S.default.object,onStart:S.default.func,onDrag:S.default.func,onStop:S.default.func,onMouseDown:S.default.func,scale:S.default.number,className:f,style:f,transform:f},ge.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var je=class extends _.Component{constructor(d){super(d),this.onDragStart=(w,D)=>{if(re("Draggable: onDragStart: %j",D),this.props.onStart(w,xe(this,D))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(w,D)=>{if(!this.state.dragging)return!1;re("Draggable: onDrag: %j",D);const q=xe(this,D),Y={x:q.x,y:q.y,slackX:0,slackY:0};if(this.props.bounds){const{x:me,y:Pe}=Y;Y.x+=this.state.slackX,Y.y+=this.state.slackY;const[ke,Ye]=ee(this,Y.x,Y.y);Y.x=ke,Y.y=Ye,Y.slackX=this.state.slackX+(me-Y.x),Y.slackY=this.state.slackY+(Pe-Y.y),q.x=Y.x,q.y=Y.y,q.deltaX=Y.x-this.state.x,q.deltaY=Y.y-this.state.y}if(this.props.onDrag(w,q)===!1)return!1;this.setState(Y)},this.onDragStop=(w,D)=>{if(!this.state.dragging||this.props.onStop(w,xe(this,D))===!1)return!1;re("Draggable: onDragStop: %j",D);const Y={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:me,y:Pe}=this.props.position;Y.x=me,Y.y=Pe}this.setState(Y)},this.state={dragging:!1,dragged:!1,x:d.position?d.position.x:d.defaultPosition.x,y:d.position?d.position.y:d.defaultPosition.y,prevPropsPosition:{...d.position},slackX:0,slackY:0,isElementSVG:!1},d.position&&!(d.onDrag||d.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:d},{prevPropsPosition:w}){return d&&(!w||d.x!==w.x||d.y!==w.y)?(re("Draggable: getDerivedStateFromProps %j",{position:d,prevPropsPosition:w}),{x:d.x,y:d.y,prevPropsPosition:{...d}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var d;if((d=this.props)!=null&&d.nodeRef)return this.props.nodeRef.current;const w=T.default;return typeof w.findDOMNode=="function"?w.findDOMNode(this):null}render(){const{axis:d,bounds:w,children:D,defaultPosition:q,defaultClassName:Y,defaultClassNameDragging:Ce,defaultClassNameDragged:me,position:Pe,positionOffset:ke,scale:Ye,...$e}=this.props;let yt={},Qe=null;const Ve=!!!Pe||this.state.dragging,et=Pe||q,tt={x:ae(this)&&Ve?this.state.x:et.x,y:W(this)&&Ve?this.state.y:et.y};this.state.isElementSVG?Qe=M(tt,ke):yt=ve(tt,ke);const rt=_.Children.only(D),Qt=(0,p.clsx)(rt.props.className||"",Y,{[Ce]:this.state.dragging,[me]:this.state.dragged});return _.createElement(ge,{...$e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},_.cloneElement(rt,{className:Qt,style:{...rt.props.style,...yt},transform:Qe}))}};return je.displayName="Draggable",je.propTypes={...ge.propTypes,axis:A.default.oneOf(["both","x","y","none"]),bounds:A.default.oneOfType([A.default.shape({left:A.default.number,right:A.default.number,top:A.default.number,bottom:A.default.number}),A.default.string,A.default.oneOf([!1])]),defaultClassName:A.default.string,defaultClassNameDragging:A.default.string,defaultClassNameDragged:A.default.string,defaultPosition:A.default.shape({x:A.default.number,y:A.default.number}),positionOffset:A.default.shape({x:A.default.oneOfType([A.default.number,A.default.string]),y:A.default.oneOfType([A.default.number,A.default.string])}),position:A.default.shape({x:A.default.number,y:A.default.number}),className:f,style:f,transform:f},je.defaultProps={...ge.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},$t}var Er;function Xt(){if(Er)return dt.exports;Er=1;const r=zn(),n=r.DraggableCore,a=r.default||r;return dt.exports=a,dt.exports.default=a,dt.exports.DraggableCore=n,dt.exports}var ft={exports:{}},pt={},Pt={},Pr;function kn(){if(Pr)return Pt;Pr=1,Pt.__esModule=!0,Pt.cloneElement=O;var r=n(oe);function n(y){return y&&y.__esModule?y:{default:y}}function a(y,R){var C=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);R&&(E=E.filter(function(_){return Object.getOwnPropertyDescriptor(y,_).enumerable})),C.push.apply(C,E)}return C}function o(y){for(var R=1;R<arguments.length;R++){var C=arguments[R]!=null?arguments[R]:{};R%2?a(Object(C),!0).forEach(function(E){h(y,E,C[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(C)):a(Object(C)).forEach(function(E){Object.defineProperty(y,E,Object.getOwnPropertyDescriptor(C,E))})}return y}function h(y,R,C){return(R=u(R))in y?Object.defineProperty(y,R,{value:C,enumerable:!0,configurable:!0,writable:!0}):y[R]=C,y}function u(y){var R=x(y,"string");return typeof R=="symbol"?R:R+""}function x(y,R){if(typeof y!="object"||!y)return y;var C=y[Symbol.toPrimitive];if(C!==void 0){var E=C.call(y,R);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(y)}function O(y,R){return R.style&&y.props.style&&(R.style=o(o({},y.props.style),R.style)),R.className&&y.props.className&&(R.className=y.props.className+" "+R.className),r.default.cloneElement(y,R)}return Pt}var ht={},Dr;function Tr(){if(Dr)return ht;Dr=1,ht.__esModule=!0,ht.resizableProps=void 0;var r=n(Ue());Xt();function n(a){return a&&a.__esModule?a:{default:a}}return ht.resizableProps={axis:r.default.oneOf(["both","x","y","none"]),className:r.default.string,children:r.default.element.isRequired,draggableOpts:r.default.shape({allowAnyClick:r.default.bool,cancel:r.default.string,children:r.default.node,disabled:r.default.bool,enableUserSelectHack:r.default.bool,offsetParent:typeof Element<"u"?r.default.instanceOf(Element):r.default.any,grid:r.default.arrayOf(r.default.number),handle:r.default.string,nodeRef:r.default.object,onStart:r.default.func,onDrag:r.default.func,onStop:r.default.func,onMouseDown:r.default.func,scale:r.default.number}),height:function(){for(var a=arguments.length,o=new Array(a),h=0;h<a;h++)o[h]=arguments[h];const u=o[0];return u.axis==="both"||u.axis==="y"?r.default.number.isRequired(...o):r.default.number(...o)},handle:r.default.oneOfType([r.default.node,r.default.func]),handleSize:r.default.arrayOf(r.default.number),lockAspectRatio:r.default.bool,maxConstraints:r.default.arrayOf(r.default.number),minConstraints:r.default.arrayOf(r.default.number),onResizeStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,resizeHandles:r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:r.default.number,width:function(){for(var a=arguments.length,o=new Array(a),h=0;h<a;h++)o[h]=arguments[h];const u=o[0];return u.axis==="both"||u.axis==="x"?r.default.number.isRequired(...o):r.default.number(...o)}},ht}var zr;function kr(){if(zr)return pt;zr=1,pt.__esModule=!0,pt.default=void 0;var r=u(oe),n=Xt(),a=kn(),o=Tr();const h=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(T,p){if(typeof WeakMap=="function")var l=new WeakMap,e=new WeakMap;return(u=function(t,c){if(!c&&t&&t.__esModule)return t;var f,i,b={__proto__:null,default:t};if(t===null||typeof t!="object"&&typeof t!="function")return b;if(f=c?e:l){if(f.has(t))return f.get(t);f.set(t,b)}for(const j in t)j!=="default"&&{}.hasOwnProperty.call(t,j)&&((i=(f=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,j))&&(i.get||i.set)?f(b,j,i):b[j]=t[j]);return b})(T,p)}function x(){return x=Object.assign?Object.assign.bind():function(T){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var e in l)({}).hasOwnProperty.call(l,e)&&(T[e]=l[e])}return T},x.apply(null,arguments)}function O(T,p){if(T==null)return{};var l={};for(var e in T)if({}.hasOwnProperty.call(T,e)){if(p.indexOf(e)!==-1)continue;l[e]=T[e]}return l}function y(T,p){var l=Object.keys(T);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(T);p&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(T,t).enumerable})),l.push.apply(l,e)}return l}function R(T){for(var p=1;p<arguments.length;p++){var l=arguments[p]!=null?arguments[p]:{};p%2?y(Object(l),!0).forEach(function(e){C(T,e,l[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(l)):y(Object(l)).forEach(function(e){Object.defineProperty(T,e,Object.getOwnPropertyDescriptor(l,e))})}return T}function C(T,p,l){return(p=E(p))in T?Object.defineProperty(T,p,{value:l,enumerable:!0,configurable:!0,writable:!0}):T[p]=l,T}function E(T){var p=_(T,"string");return typeof p=="symbol"?p:p+""}function _(T,p){if(typeof T!="object"||!T)return T;var l=T[Symbol.toPrimitive];if(l!==void 0){var e=l.call(T,p);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(T)}let A=class extends r.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(p,l){const e=this.props,t=e.minConstraints,c=e.maxConstraints,f=e.lockAspectRatio;if(!t&&!c&&!f)return[p,l];if(f){const N=this.props.width/this.props.height,F=p-this.props.width,Z=l-this.props.height;Math.abs(F)>Math.abs(Z*N)?l=p/N:p=l*N}const i=p,b=l;let j=this.slack||[0,0],P=j[0],z=j[1];return p+=P,l+=z,t&&(p=Math.max(t[0],p),l=Math.max(t[1],l)),c&&(p=Math.min(c[0],p),l=Math.min(c[1],l)),this.slack=[P+(i-p),z+(b-l)],[p,l]}resizeHandler(p,l){return(e,t)=>{var c,f,i,b;let j=t.node,P=t.deltaX,z=t.deltaY;p==="onResizeStart"&&this.resetData();const N=(this.props.axis==="both"||this.props.axis==="x")&&l!=="n"&&l!=="s",F=(this.props.axis==="both"||this.props.axis==="y")&&l!=="e"&&l!=="w";if(!N&&!F)return;const Z=l[0],K=l[l.length-1],Q=j.getBoundingClientRect();if(this.lastHandleRect!=null){if(K==="w"){const ie=Q.left-this.lastHandleRect.left;P+=ie}if(Z==="n"){const ie=Q.top-this.lastHandleRect.top;z+=ie}}this.lastHandleRect=Q,K==="w"&&(P=-P),Z==="n"&&(z=-z);const V=(c=(f=this.lastSize)==null?void 0:f.width)!=null?c:this.props.width,X=(i=(b=this.lastSize)==null?void 0:b.height)!=null?i:this.props.height;let J=V+(N?P/this.props.transformScale:0),ne=X+(F?z/this.props.transformScale:0);var Se=this.runConstraints(J,ne);if(J=Se[0],ne=Se[1],p==="onResizeStop"&&this.lastSize){var ve=this.lastSize;J=ve.width,ne=ve.height}const M=J!==V||ne!==X;p!=="onResizeStop"&&(this.lastSize={width:J,height:ne});const L=typeof this.props[p]=="function"?this.props[p]:null;L&&!(p==="onResize"&&!M)&&(e.persist==null||e.persist(),L(e,{node:j,size:{width:J,height:ne},handle:l})),p==="onResizeStop"&&this.resetData()}}renderResizeHandle(p,l){const e=this.props.handle;if(!e)return r.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+p,ref:l});if(typeof e=="function")return e(p,l);const t=typeof e.type=="string",c=R({ref:l},t?{}:{handleAxis:p});return r.cloneElement(e,c)}render(){const p=this.props,l=p.children,e=p.className,t=p.draggableOpts;p.width,p.height,p.handle,p.handleSize,p.lockAspectRatio,p.axis,p.minConstraints,p.maxConstraints,p.onResize,p.onResizeStop,p.onResizeStart;const c=p.resizeHandles;p.transformScale;const f=O(p,h);return(0,a.cloneElement)(l,R(R({},f),{},{className:(e?e+" ":"")+"react-resizable",children:[...r.Children.toArray(l.props.children),...c.map(i=>{var b;const j=(b=this.handleRefs[i])!=null?b:this.handleRefs[i]=r.createRef();return r.createElement(n.DraggableCore,x({},t,{nodeRef:j,key:"resizableHandle-"+i,onStop:this.resizeHandler("onResizeStop",i),onStart:this.resizeHandler("onResizeStart",i),onDrag:this.resizeHandler("onResize",i)}),this.renderResizeHandle(i,j))})]}))}};return pt.default=A,A.propTypes=o.resizableProps,A.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},pt}var gt={},Mr;function Mn(){if(Mr)return gt;Mr=1,gt.__esModule=!0,gt.default=void 0;var r=x(oe),n=u(Ue()),a=u(kr()),o=Tr();const h=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(p){return p&&p.__esModule?p:{default:p}}function x(p,l){if(typeof WeakMap=="function")var e=new WeakMap,t=new WeakMap;return(x=function(c,f){if(!f&&c&&c.__esModule)return c;var i,b,j={__proto__:null,default:c};if(c===null||typeof c!="object"&&typeof c!="function")return j;if(i=f?t:e){if(i.has(c))return i.get(c);i.set(c,j)}for(const P in c)P!=="default"&&{}.hasOwnProperty.call(c,P)&&((b=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,P))&&(b.get||b.set)?i(j,P,b):j[P]=c[P]);return j})(p,l)}function O(){return O=Object.assign?Object.assign.bind():function(p){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var t in e)({}).hasOwnProperty.call(e,t)&&(p[t]=e[t])}return p},O.apply(null,arguments)}function y(p,l){var e=Object.keys(p);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(p);l&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(p,c).enumerable})),e.push.apply(e,t)}return e}function R(p){for(var l=1;l<arguments.length;l++){var e=arguments[l]!=null?arguments[l]:{};l%2?y(Object(e),!0).forEach(function(t){C(p,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(e)):y(Object(e)).forEach(function(t){Object.defineProperty(p,t,Object.getOwnPropertyDescriptor(e,t))})}return p}function C(p,l,e){return(l=E(l))in p?Object.defineProperty(p,l,{value:e,enumerable:!0,configurable:!0,writable:!0}):p[l]=e,p}function E(p){var l=_(p,"string");return typeof l=="symbol"?l:l+""}function _(p,l){if(typeof p!="object"||!p)return p;var e=p[Symbol.toPrimitive];if(e!==void 0){var t=e.call(p,l);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(p)}function A(p,l){if(p==null)return{};var e={};for(var t in p)if({}.hasOwnProperty.call(p,t)){if(l.indexOf(t)!==-1)continue;e[t]=p[t]}return e}let T=class extends r.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(l,e)=>{const t=e.size;this.props.onResize?(l.persist==null||l.persist(),this.setState(t,()=>this.props.onResize&&this.props.onResize(l,e))):this.setState(t)}}static getDerivedStateFromProps(l,e){return e.propsWidth!==l.width||e.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null}render(){const l=this.props,e=l.handle,t=l.handleSize;l.onResize;const c=l.onResizeStart,f=l.onResizeStop,i=l.draggableOpts,b=l.minConstraints,j=l.maxConstraints,P=l.lockAspectRatio,z=l.axis;l.width,l.height;const N=l.resizeHandles,F=l.style,Z=l.transformScale,K=A(l,h);return r.createElement(a.default,{axis:z,draggableOpts:i,handle:e,handleSize:t,height:this.state.height,lockAspectRatio:P,maxConstraints:j,minConstraints:b,onResizeStart:c,onResize:this.onResize,onResizeStop:f,resizeHandles:N,transformScale:Z,width:this.state.width},r.createElement("div",O({},K,{style:R(R({},F),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return gt.default=T,T.propTypes=R(R({},o.resizableProps),{},{children:n.default.element}),gt}var Ir;function In(){return Ir||(Ir=1,ft.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ft.exports.Resizable=kr().default,ft.exports.ResizableBox=Mn().default),ft.exports}var Ge={},Ar;function Lr(){if(Ar)return Ge;Ar=1;var r={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.resizeHandleType=Ge.resizeHandleAxesType=Ge.default=void 0;var n=o(Ue()),a=o(oe);function o(x){return x&&x.__esModule?x:{default:x}}const h=Ge.resizeHandleAxesType=n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),u=Ge.resizeHandleType=n.default.oneOfType([n.default.node,n.default.func]);return Ge.default={className:n.default.string,style:n.default.object,width:n.default.number,autoSize:n.default.bool,cols:n.default.number,draggableCancel:n.default.string,draggableHandle:n.default.string,verticalCompact:function(x){x.verticalCompact===!1&&r.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:n.default.oneOf(["vertical","horizontal"]),layout:function(x){var O=x.layout;O!==void 0&&Ke().validateLayout(O,"layout")},margin:n.default.arrayOf(n.default.number),containerPadding:n.default.arrayOf(n.default.number),rowHeight:n.default.number,maxRows:n.default.number,isBounded:n.default.bool,isDraggable:n.default.bool,isResizable:n.default.bool,allowOverlap:n.default.bool,preventCollision:n.default.bool,useCSSTransforms:n.default.bool,transformScale:n.default.number,isDroppable:n.default.bool,resizeHandles:h,resizeHandle:u,onLayoutChange:n.default.func,onDragStart:n.default.func,onDrag:n.default.func,onDragStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,onResizeStop:n.default.func,onDrop:n.default.func,droppingItem:n.default.shape({i:n.default.string.isRequired,w:n.default.number.isRequired,h:n.default.number.isRequired}),children:function(x,O){const y=x[O],R={};a.default.Children.forEach(y,function(C){if((C==null?void 0:C.key)!=null){if(R[C.key])throw new Error('Duplicate child key "'+C.key+'" found! This will cause problems in ReactGridLayout.');R[C.key]=!0}})},innerRef:n.default.any},Ge}var Nr;function An(){if(Nr)return ut;Nr=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.default=void 0;var r=R(oe),n=Mt,a=R(Ue()),o=Xt(),h=In(),u=Ke(),x=Ht(),O=Lr(),y=R(Ct());function R(l){return l&&l.__esModule?l:{default:l}}function C(l,e){var t=Object.keys(l);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(l);e&&(c=c.filter(function(f){return Object.getOwnPropertyDescriptor(l,f).enumerable})),t.push.apply(t,c)}return t}function E(l){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?C(Object(t),!0).forEach(function(c){_(l,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach(function(c){Object.defineProperty(l,c,Object.getOwnPropertyDescriptor(t,c))})}return l}function _(l,e,t){return(e=A(e))in l?Object.defineProperty(l,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):l[e]=t,l}function A(l){var e=T(l,"string");return typeof e=="symbol"?e:e+""}function T(l,e){if(typeof l!="object"||!l)return l;var t=l[Symbol.toPrimitive];if(t!==void 0){var c=t.call(l,e);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(l)}let p=class extends r.default.Component{constructor(){super(...arguments),_(this,"state",{resizing:null,dragging:null,className:""}),_(this,"elementRef",r.default.createRef()),_(this,"onDragStart",(e,t)=>{let{node:c}=t;const{onDragStart:f,transformScale:i}=this.props;if(!f)return;const b={top:0,left:0},{offsetParent:j}=c;if(!j)return;const P=j.getBoundingClientRect(),z=c.getBoundingClientRect(),N=z.left/i,F=P.left/i,Z=z.top/i,K=P.top/i;b.left=N-F+j.scrollLeft,b.top=Z-K+j.scrollTop,this.setState({dragging:b});const{x:Q,y:V}=(0,x.calcXY)(this.getPositionParams(),b.top,b.left,this.props.w,this.props.h);return f.call(this,this.props.i,Q,V,{e,node:c,newPosition:b})}),_(this,"onDrag",(e,t,c)=>{let{node:f,deltaX:i,deltaY:b}=t;const{onDrag:j}=this.props;if(!j)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let P=this.state.dragging.top+b,z=this.state.dragging.left+i;const{isBounded:N,i:F,w:Z,h:K,containerWidth:Q}=this.props,V=this.getPositionParams();if(N){const{offsetParent:Se}=f;if(Se){const{margin:ve,rowHeight:M}=this.props,L=Se.clientHeight-(0,x.calcGridItemWHPx)(K,M,ve[1]);P=(0,x.clamp)(P,0,L);const le=(0,x.calcGridColWidth)(V),ie=Q-(0,x.calcGridItemWHPx)(Z,le,ve[0]);z=(0,x.clamp)(z,0,ie)}}const X={top:P,left:z};c?this.setState({dragging:X}):(0,n.flushSync)(()=>{this.setState({dragging:X})});const{x:J,y:ne}=(0,x.calcXY)(V,P,z,Z,K);return j.call(this,F,J,ne,{e,node:f,newPosition:X})}),_(this,"onDragStop",(e,t)=>{let{node:c}=t;const{onDragStop:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:i,h:b,i:j}=this.props,{left:P,top:z}=this.state.dragging,N={top:z,left:P};this.setState({dragging:null});const{x:F,y:Z}=(0,x.calcXY)(this.getPositionParams(),z,P,i,b);return f.call(this,j,F,Z,{e,node:c,newPosition:N})}),_(this,"onResizeStop",(e,t,c)=>this.onResizeHandler(e,t,c,"onResizeStop")),_(this,"onResizeStart",(e,t,c)=>this.onResizeHandler(e,t,c,"onResizeStart")),_(this,"onResize",(e,t,c)=>this.onResizeHandler(e,t,c,"onResize"))}shouldComponentUpdate(e,t){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;const c=(0,x.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),f=(0,x.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,u.fastPositionEqual)(c,f)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const c=this.elementRef.current;if(!c)return;const f=e.droppingPosition||{left:0,top:0},{dragging:i}=this.state,b=i&&t.left!==f.left||t.top!==f.top;if(!i)this.onDragStart(t.e,{node:c,deltaX:t.left,deltaY:t.top});else if(b){const j=t.left-i.left,P=t.top-i.top;this.onDrag(t.e,{node:c,deltaX:j,deltaY:P},!0)}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:c,useCSSTransforms:f}=this.props;let i;return f?i=(0,u.setTransform)(e):(i=(0,u.setTopLeft)(e),t&&(i.left=(0,u.perc)(e.left/c),i.width=(0,u.perc)(e.width/c))),i}mixinDraggable(e,t){return r.default.createElement(o.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(c,f)=>t(c,f,e)}mixinResizable(e,t,c){const{cols:f,minW:i,minH:b,maxW:j,maxH:P,transformScale:z,resizeHandles:N,resizeHandle:F}=this.props,Z=this.getPositionParams(),K=(0,x.calcGridItemPosition)(Z,0,0,f,0).width,Q=(0,x.calcGridItemPosition)(Z,0,0,i,b),V=(0,x.calcGridItemPosition)(Z,0,0,j,P),X=[Q.width,Q.height],J=[Math.min(V.width,K),Math.min(V.height,1/0)];return r.default.createElement(h.Resizable,{draggableOpts:{disabled:!c},className:c?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:X,maxConstraints:J,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:z,resizeHandles:N,handle:F},e)}onResizeHandler(e,t,c,f){let{node:i,size:b,handle:j}=t;const P=this.props[f];if(!P)return;const{x:z,y:N,i:F,maxH:Z,minH:K,containerWidth:Q}=this.props,{minW:V,maxW:X}=this.props;let J=b;i&&(J=(0,u.resizeItemInDirection)(j,c,b,Q),(0,n.flushSync)(()=>{this.setState({resizing:f==="onResizeStop"?null:J})}));let{w:ne,h:Se}=(0,x.calcWH)(this.getPositionParams(),J.width,J.height,z,N,j);ne=(0,x.clamp)(ne,Math.max(V,1),X),Se=(0,x.clamp)(Se,K,Z),P.call(this,F,ne,Se,{e,node:i,size:J,handle:j})}render(){const{x:e,y:t,w:c,h:f,isDraggable:i,isResizable:b,droppingPosition:j,useCSSTransforms:P}=this.props,z=(0,x.calcGridItemPosition)(this.getPositionParams(),e,t,c,f,this.state),N=r.default.Children.only(this.props.children);let F=r.default.cloneElement(N,{ref:this.elementRef,className:(0,y.default)("react-grid-item",N.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":i,"react-draggable-dragging":!!this.state.dragging,dropping:!!j,cssTransforms:P}),style:E(E(E({},this.props.style),N.props.style),this.createStyle(z))});return F=this.mixinResizable(F,z,b),F=this.mixinDraggable(F,i),F}};return ut.default=p,_(p,"propTypes",{children:a.default.element,cols:a.default.number.isRequired,containerWidth:a.default.number.isRequired,rowHeight:a.default.number.isRequired,margin:a.default.array.isRequired,maxRows:a.default.number.isRequired,containerPadding:a.default.array.isRequired,x:a.default.number.isRequired,y:a.default.number.isRequired,w:a.default.number.isRequired,h:a.default.number.isRequired,minW:function(l,e){const t=l[e];if(typeof t!="number")return new Error("minWidth not Number");if(t>l.w||t>l.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(l,e){const t=l[e];if(typeof t!="number")return new Error("maxWidth not Number");if(t<l.w||t<l.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(l,e){const t=l[e];if(typeof t!="number")return new Error("minHeight not Number");if(t>l.h||t>l.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(l,e){const t=l[e];if(typeof t!="number")return new Error("maxHeight not Number");if(t<l.h||t<l.minH)return new Error("maxHeight smaller than item height/minHeight")},i:a.default.string.isRequired,resizeHandles:O.resizeHandleAxesType,resizeHandle:O.resizeHandleType,onDragStop:a.default.func,onDragStart:a.default.func,onDrag:a.default.func,onResizeStop:a.default.func,onResizeStart:a.default.func,onResize:a.default.func,isDraggable:a.default.bool.isRequired,isResizable:a.default.bool.isRequired,isBounded:a.default.bool.isRequired,static:a.default.bool,useCSSTransforms:a.default.bool.isRequired,transformScale:a.default.number,className:a.default.string,handle:a.default.string,cancel:a.default.string,droppingPosition:a.default.shape({e:a.default.object.isRequired,left:a.default.number.isRequired,top:a.default.number.isRequired})}),_(p,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),ut}var Wr;function Hr(){if(Wr)return lt;Wr=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var r=y(oe),n=Nt(),a=O(Ct()),o=Ke(),h=Ht(),u=O(An()),x=O(Lr());function O(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(typeof WeakMap=="function")var c=new WeakMap,f=new WeakMap;return(y=function(i,b){if(!b&&i&&i.__esModule)return i;var j,P,z={__proto__:null,default:i};if(i===null||typeof i!="object"&&typeof i!="function")return z;if(j=b?f:c){if(j.has(i))return j.get(i);j.set(i,z)}for(const N in i)N!=="default"&&{}.hasOwnProperty.call(i,N)&&((P=(j=Object.defineProperty)&&Object.getOwnPropertyDescriptor(i,N))&&(P.get||P.set)?j(z,N,P):z[N]=i[N]);return z})(e,t)}function R(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);t&&(f=f.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),c.push.apply(c,f)}return c}function C(e){for(var t=1;t<arguments.length;t++){var c=arguments[t]!=null?arguments[t]:{};t%2?R(Object(c),!0).forEach(function(f){E(e,f,c[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):R(Object(c)).forEach(function(f){Object.defineProperty(e,f,Object.getOwnPropertyDescriptor(c,f))})}return e}function E(e,t,c){return(t=_(t))in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}function _(e){var t=A(e,"string");return typeof t=="symbol"?t:t+""}function A(e,t){if(typeof e!="object"||!e)return e;var c=e[Symbol.toPrimitive];if(c!==void 0){var f=c.call(e,t);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const T="react-grid-layout";let p=!1;try{p=/firefox/i.test(navigator.userAgent)}catch{}let l=class extends r.Component{constructor(){super(...arguments),E(this,"state",{activeDrag:null,layout:(0,o.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,o.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),E(this,"dragEnterCounter",0),E(this,"onDragStart",(t,c,f,i)=>{let{e:b,node:j}=i;const{layout:P}=this.state,z=(0,o.getLayoutItem)(P,t);if(!z)return;const N={w:z.w,h:z.h,x:z.x,y:z.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,o.cloneLayoutItem)(z),oldLayout:P,activeDrag:N}),this.props.onDragStart(P,z,z,null,b,j)}),E(this,"onDrag",(t,c,f,i)=>{let{e:b,node:j}=i;const{oldDragItem:P}=this.state;let{layout:z}=this.state;const{cols:N,allowOverlap:F,preventCollision:Z}=this.props,K=(0,o.getLayoutItem)(z,t);if(!K)return;const Q={w:K.w,h:K.h,x:K.x,y:K.y,placeholder:!0,i:t};z=(0,o.moveElement)(z,K,c,f,!0,Z,(0,o.compactType)(this.props),N,F),this.props.onDrag(z,P,K,Q,b,j),this.setState({layout:F?z:(0,o.compact)(z,(0,o.compactType)(this.props),N),activeDrag:Q})}),E(this,"onDragStop",(t,c,f,i)=>{let{e:b,node:j}=i;if(!this.state.activeDrag)return;const{oldDragItem:P}=this.state;let{layout:z}=this.state;const{cols:N,preventCollision:F,allowOverlap:Z}=this.props,K=(0,o.getLayoutItem)(z,t);if(!K)return;z=(0,o.moveElement)(z,K,c,f,!0,F,(0,o.compactType)(this.props),N,Z);const V=Z?z:(0,o.compact)(z,(0,o.compactType)(this.props),N);this.props.onDragStop(V,P,K,null,b,j);const{oldLayout:X}=this.state;this.setState({activeDrag:null,layout:V,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(V,X)}),E(this,"onResizeStart",(t,c,f,i)=>{let{e:b,node:j}=i;const{layout:P}=this.state,z=(0,o.getLayoutItem)(P,t);z&&(this.setState({oldResizeItem:(0,o.cloneLayoutItem)(z),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(P,z,z,null,b,j))}),E(this,"onResize",(t,c,f,i)=>{let{e:b,node:j,size:P,handle:z}=i;const{oldResizeItem:N}=this.state,{layout:F}=this.state,{cols:Z,preventCollision:K,allowOverlap:Q}=this.props;let V=!1,X,J,ne;const[Se,ve]=(0,o.withLayoutItem)(F,t,L=>{let le;return J=L.x,ne=L.y,["sw","w","nw","n","ne"].indexOf(z)!==-1&&(["sw","nw","w"].indexOf(z)!==-1&&(J=L.x+(L.w-c),c=L.x!==J&&J<0?L.w:c,J=J<0?0:J),["ne","n","nw"].indexOf(z)!==-1&&(ne=L.y+(L.h-f),f=L.y!==ne&&ne<0?L.h:f,ne=ne<0?0:ne),V=!0),K&&!Q&&(le=(0,o.getAllCollisions)(F,C(C({},L),{},{w:c,h:f,x:J,y:ne})).filter(ce=>ce.i!==L.i).length>0,le&&(ne=L.y,f=L.h,J=L.x,c=L.w,V=!1)),L.w=c,L.h=f,L});if(!ve)return;X=Se,V&&(X=(0,o.moveElement)(Se,ve,J,ne,!0,this.props.preventCollision,(0,o.compactType)(this.props),Z,Q));const M={w:ve.w,h:ve.h,x:ve.x,y:ve.y,static:!0,i:t};this.props.onResize(X,N,ve,M,b,j),this.setState({layout:Q?X:(0,o.compact)(X,(0,o.compactType)(this.props),Z),activeDrag:M})}),E(this,"onResizeStop",(t,c,f,i)=>{let{e:b,node:j}=i;const{layout:P,oldResizeItem:z}=this.state,{cols:N,allowOverlap:F}=this.props,Z=(0,o.getLayoutItem)(P,t),K=F?P:(0,o.compact)(P,(0,o.compactType)(this.props),N);this.props.onResizeStop(K,z,Z,null,b,j);const{oldLayout:Q}=this.state;this.setState({activeDrag:null,layout:K,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(K,Q)}),E(this,"onDragOver",t=>{var c;if(t.preventDefault(),t.stopPropagation(),p&&!((c=t.nativeEvent.target)!==null&&c!==void 0&&c.classList.contains(T)))return!1;const{droppingItem:f,onDropDragOver:i,margin:b,cols:j,rowHeight:P,maxRows:z,width:N,containerPadding:F,transformScale:Z}=this.props,K=i==null?void 0:i(t);if(K===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const Q=C(C({},f),K),{layout:V}=this.state,X=t.currentTarget.getBoundingClientRect(),J=t.clientX-X.left,ne=t.clientY-X.top,Se={left:J/Z,top:ne/Z,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ve,top:M}=this.state.droppingPosition;(ve!=J||M!=ne)&&this.setState({droppingPosition:Se})}}else{const ve={cols:j,margin:b,maxRows:z,rowHeight:P,containerWidth:N,containerPadding:F||b},M=(0,h.calcXY)(ve,ne,J,Q.w,Q.h);this.setState({droppingDOMNode:r.createElement("div",{key:Q.i}),droppingPosition:Se,layout:[...V,C(C({},Q),{},{x:M.x,y:M.y,static:!1,isDraggable:!0})]})}}),E(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:c}=this.props,{layout:f}=this.state,i=(0,o.compact)(f.filter(b=>b.i!==t.i),(0,o.compactType)(this.props),c,this.props.allowOverlap);this.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),E(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),E(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),E(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:c}=this.props,{layout:f}=this.state,i=f.find(b=>b.i===c.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,i,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,c){let f;return c.activeDrag?null:(!(0,n.deepEqual)(t.layout,c.propsLayout)||t.compactType!==c.compactType?f=t.layout:(0,o.childrenEqual)(t.children,c.children)||(f=c.layout),f?{layout:(0,o.synchronizeLayoutWithChildren)(f,t.children,t.cols,(0,o.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,c){return this.props.children!==t.children||!(0,o.fastRGLPropsEqual)(this.props,t,n.deepEqual)||this.state.activeDrag!==c.activeDrag||this.state.mounted!==c.mounted||this.state.droppingPosition!==c.droppingPosition}componentDidUpdate(t,c){if(!this.state.activeDrag){const f=this.state.layout,i=c.layout;this.onLayoutMaybeChanged(f,i)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,o.bottom)(this.state.layout),c=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+c*2+"px"}onLayoutMaybeChanged(t,c){c||(c=this.state.layout),(0,n.deepEqual)(c,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:c,cols:f,margin:i,containerPadding:b,rowHeight:j,maxRows:P,useCSSTransforms:z,transformScale:N}=this.props;return r.createElement(u.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:c,cols:f,margin:i,containerPadding:b||i,maxRows:P,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:z,transformScale:N},r.createElement("div",null))}processGridItem(t,c){if(!t||!t.key)return;const f=(0,o.getLayoutItem)(this.state.layout,String(t.key));if(!f)return null;const{width:i,cols:b,margin:j,containerPadding:P,rowHeight:z,maxRows:N,isDraggable:F,isResizable:Z,isBounded:K,useCSSTransforms:Q,transformScale:V,draggableCancel:X,draggableHandle:J,resizeHandles:ne,resizeHandle:Se}=this.props,{mounted:ve,droppingPosition:M}=this.state,L=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&F,le=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&Z,ie=f.resizeHandles||ne,ce=L&&K&&f.isBounded!==!1;return r.createElement(u.default,{containerWidth:i,cols:b,margin:j,containerPadding:P||j,maxRows:N,rowHeight:z,cancel:X,handle:J,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:L,isResizable:le,isBounded:ce,useCSSTransforms:Q&&ve,usePercentages:!ve,transformScale:V,w:f.w,h:f.h,x:f.x,y:f.y,i:f.i,minH:f.minH,minW:f.minW,maxH:f.maxH,maxW:f.maxW,static:f.static,droppingPosition:c?M:void 0,resizeHandles:ie,resizeHandle:Se},t)}render(){const{className:t,style:c,isDroppable:f,innerRef:i}=this.props,b=(0,a.default)(T,t),j=C({height:this.containerHeight()},c);return r.createElement("div",{ref:i,className:b,style:j,onDrop:f?this.onDrop:o.noop,onDragLeave:f?this.onDragLeave:o.noop,onDragEnter:f?this.onDragEnter:o.noop,onDragOver:f?this.onDragOver:o.noop},r.Children.map(this.props.children,P=>this.processGridItem(P)),f&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return lt.default=l,E(l,"displayName","ReactGridLayout"),E(l,"propTypes",x.default),E(l,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:o.noop,onDragStart:o.noop,onDrag:o.noop,onDragStop:o.noop,onResizeStart:o.noop,onResize:o.noop,onResizeStop:o.noop,onDrop:o.noop,onDropDragOver:o.noop}),lt}var mt={},Xe={},Br;function qr(){if(Br)return Xe;Br=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.findOrGenerateResponsiveLayout=o,Xe.getBreakpointFromWidth=n,Xe.getColsFromBreakpoint=a,Xe.sortBreakpoints=h;var r=Ke();function n(u,x){const O=h(u);let y=O[0];for(let R=1,C=O.length;R<C;R++){const E=O[R];x>u[E]&&(y=E)}return y}function a(u,x){if(!x[u])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+u+" is missing!");return x[u]}function o(u,x,O,y,R,C){if(u[O])return(0,r.cloneLayout)(u[O]);let E=u[y];const _=h(x),A=_.slice(_.indexOf(O));for(let T=0,p=A.length;T<p;T++){const l=A[T];if(u[l]){E=u[l];break}}return E=(0,r.cloneLayout)(E||[]),(0,r.compact)((0,r.correctBounds)(E,{cols:R}),C,R)}function h(u){return Object.keys(u).sort(function(O,y){return u[O]-u[y]})}return Xe}var Fr;function Ln(){if(Fr)return mt;Fr=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=void 0;var r=y(oe),n=O(Ue()),a=Nt(),o=Ke(),h=qr(),u=O(Hr());const x=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function O(f){return f&&f.__esModule?f:{default:f}}function y(f,i){if(typeof WeakMap=="function")var b=new WeakMap,j=new WeakMap;return(y=function(P,z){if(!z&&P&&P.__esModule)return P;var N,F,Z={__proto__:null,default:P};if(P===null||typeof P!="object"&&typeof P!="function")return Z;if(N=z?j:b){if(N.has(P))return N.get(P);N.set(P,Z)}for(const K in P)K!=="default"&&{}.hasOwnProperty.call(P,K)&&((F=(N=Object.defineProperty)&&Object.getOwnPropertyDescriptor(P,K))&&(F.get||F.set)?N(Z,K,F):Z[K]=P[K]);return Z})(f,i)}function R(){return R=Object.assign?Object.assign.bind():function(f){for(var i=1;i<arguments.length;i++){var b=arguments[i];for(var j in b)({}).hasOwnProperty.call(b,j)&&(f[j]=b[j])}return f},R.apply(null,arguments)}function C(f,i){if(f==null)return{};var b,j,P=E(f,i);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(f);for(j=0;j<z.length;j++)b=z[j],i.indexOf(b)===-1&&{}.propertyIsEnumerable.call(f,b)&&(P[b]=f[b])}return P}function E(f,i){if(f==null)return{};var b={};for(var j in f)if({}.hasOwnProperty.call(f,j)){if(i.indexOf(j)!==-1)continue;b[j]=f[j]}return b}function _(f,i){var b=Object.keys(f);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(f);i&&(j=j.filter(function(P){return Object.getOwnPropertyDescriptor(f,P).enumerable})),b.push.apply(b,j)}return b}function A(f){for(var i=1;i<arguments.length;i++){var b=arguments[i]!=null?arguments[i]:{};i%2?_(Object(b),!0).forEach(function(j){T(f,j,b[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(b)):_(Object(b)).forEach(function(j){Object.defineProperty(f,j,Object.getOwnPropertyDescriptor(b,j))})}return f}function T(f,i,b){return(i=p(i))in f?Object.defineProperty(f,i,{value:b,enumerable:!0,configurable:!0,writable:!0}):f[i]=b,f}function p(f){var i=l(f,"string");return typeof i=="symbol"?i:i+""}function l(f,i){if(typeof f!="object"||!f)return f;var b=f[Symbol.toPrimitive];if(b!==void 0){var j=b.call(f,i);if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(f)}const e=f=>Object.prototype.toString.call(f);function t(f,i){return f==null?null:Array.isArray(f)?f:f[i]}let c=class extends r.Component{constructor(){super(...arguments),T(this,"state",this.generateInitialState()),T(this,"onLayoutChange",i=>{this.props.onLayoutChange(i,A(A({},this.props.layouts),{},{[this.state.breakpoint]:i}))})}generateInitialState(){const{width:i,breakpoints:b,layouts:j,cols:P}=this.props,z=(0,h.getBreakpointFromWidth)(b,i),N=(0,h.getColsFromBreakpoint)(z,P),F=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,h.findOrGenerateResponsiveLayout)(j,b,z,z,N,F),breakpoint:z,cols:N}}static getDerivedStateFromProps(i,b){if(!(0,a.deepEqual)(i.layouts,b.layouts)){const{breakpoint:j,cols:P}=b;return{layout:(0,h.findOrGenerateResponsiveLayout)(i.layouts,i.breakpoints,j,j,P,i.compactType),layouts:i.layouts}}return null}componentDidUpdate(i){(this.props.width!=i.width||this.props.breakpoint!==i.breakpoint||!(0,a.deepEqual)(this.props.breakpoints,i.breakpoints)||!(0,a.deepEqual)(this.props.cols,i.cols))&&this.onWidthChange(i)}onWidthChange(i){const{breakpoints:b,cols:j,layouts:P,compactType:z}=this.props,N=this.props.breakpoint||(0,h.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),F=this.state.breakpoint,Z=(0,h.getColsFromBreakpoint)(N,j),K=A({},P);if(F!==N||i.breakpoints!==b||i.cols!==j){F in K||(K[F]=(0,o.cloneLayout)(this.state.layout));let X=(0,h.findOrGenerateResponsiveLayout)(K,b,N,F,Z,z);X=(0,o.synchronizeLayoutWithChildren)(X,this.props.children,Z,z,this.props.allowOverlap),K[N]=X,this.props.onBreakpointChange(N,Z),this.props.onLayoutChange(X,K),this.setState({breakpoint:N,layout:X,cols:Z})}const Q=t(this.props.margin,N),V=t(this.props.containerPadding,N);this.props.onWidthChange(this.props.width,Q,Z,V)}render(){const i=this.props,{breakpoint:b,breakpoints:j,cols:P,layouts:z,margin:N,containerPadding:F,onBreakpointChange:Z,onLayoutChange:K,onWidthChange:Q}=i,V=C(i,x);return r.createElement(u.default,R({},V,{margin:t(N,this.state.breakpoint),containerPadding:t(F,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return mt.default=c,T(c,"propTypes",{breakpoint:n.default.string,breakpoints:n.default.object,allowOverlap:n.default.bool,cols:n.default.object,margin:n.default.oneOfType([n.default.array,n.default.object]),containerPadding:n.default.oneOfType([n.default.array,n.default.object]),layouts(f,i){if(e(f[i])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+e(f[i]));Object.keys(f[i]).forEach(b=>{if(!(b in f.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,o.validateLayout)(f.layouts[b],"layouts."+b)})},width:n.default.number.isRequired,onBreakpointChange:n.default.func,onLayoutChange:n.default.func,onWidthChange:n.default.func}),T(c,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:o.noop,onLayoutChange:o.noop,onWidthChange:o.noop}),mt}var Dt={},Gr=(function(){if(typeof Map<"u")return Map;function r(n,a){var o=-1;return n.some(function(h,u){return h[0]===a?(o=u,!0):!1}),o}return(function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(a){var o=r(this.__entries__,a),h=this.__entries__[o];return h&&h[1]},n.prototype.set=function(a,o){var h=r(this.__entries__,a);~h?this.__entries__[h][1]=o:this.__entries__.push([a,o])},n.prototype.delete=function(a){var o=this.__entries__,h=r(o,a);~h&&o.splice(h,1)},n.prototype.has=function(a){return!!~r(this.__entries__,a)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(a,o){o===void 0&&(o=null);for(var h=0,u=this.__entries__;h<u.length;h++){var x=u[h];a.call(o,x[1],x[0])}},n})()})(),Jt=typeof window<"u"&&typeof document<"u"&&window.document===document,Tt=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),Nn=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Tt):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}})(),Wn=2;function Hn(r,n){var a=!1,o=!1,h=0;function u(){a&&(a=!1,r()),o&&O()}function x(){Nn(u)}function O(){var y=Date.now();if(a){if(y-h<Wn)return;o=!0}else a=!0,o=!1,setTimeout(x,n);h=y}return O}var Bn=20,qn=["top","right","bottom","left","width","height","size","weight"],Fn=typeof MutationObserver<"u",Gn=(function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Hn(this.refresh.bind(this),Bn)}return r.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n),this.connected_||this.connect_()},r.prototype.removeObserver=function(n){var a=this.observers_,o=a.indexOf(n);~o&&a.splice(o,1),!a.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},r.prototype.updateObservers_=function(){var n=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return n.forEach(function(a){return a.broadcastActive()}),n.length>0},r.prototype.connect_=function(){!Jt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Fn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){!Jt||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(n){var a=n.propertyName,o=a===void 0?"":a,h=qn.some(function(u){return!!~o.indexOf(u)});h&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r})(),Yr=(function(r,n){for(var a=0,o=Object.keys(n);a<o.length;a++){var h=o[a];Object.defineProperty(r,h,{value:n[h],enumerable:!1,writable:!1,configurable:!0})}return r}),Ze=(function(r){var n=r&&r.ownerDocument&&r.ownerDocument.defaultView;return n||Tt}),Vr=kt(0,0,0,0);function zt(r){return parseFloat(r)||0}function Ur(r){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return n.reduce(function(o,h){var u=r["border-"+h+"-width"];return o+zt(u)},0)}function Yn(r){for(var n=["top","right","bottom","left"],a={},o=0,h=n;o<h.length;o++){var u=h[o],x=r["padding-"+u];a[u]=zt(x)}return a}function Vn(r){var n=r.getBBox();return kt(0,0,n.width,n.height)}function Un(r){var n=r.clientWidth,a=r.clientHeight;if(!n&&!a)return Vr;var o=Ze(r).getComputedStyle(r),h=Yn(o),u=h.left+h.right,x=h.top+h.bottom,O=zt(o.width),y=zt(o.height);if(o.boxSizing==="border-box"&&(Math.round(O+u)!==n&&(O-=Ur(o,"left","right")+u),Math.round(y+x)!==a&&(y-=Ur(o,"top","bottom")+x)),!Xn(r)){var R=Math.round(O+u)-n,C=Math.round(y+x)-a;Math.abs(R)!==1&&(O-=R),Math.abs(C)!==1&&(y-=C)}return kt(h.left,h.top,O,y)}var $n=(function(){return typeof SVGGraphicsElement<"u"?function(r){return r instanceof Ze(r).SVGGraphicsElement}:function(r){return r instanceof Ze(r).SVGElement&&typeof r.getBBox=="function"}})();function Xn(r){return r===Ze(r).document.documentElement}function Jn(r){return Jt?$n(r)?Vn(r):Un(r):Vr}function Kn(r){var n=r.x,a=r.y,o=r.width,h=r.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,x=Object.create(u.prototype);return Yr(x,{x:n,y:a,width:o,height:h,top:a,right:n+o,bottom:h+a,left:n}),x}function kt(r,n,a,o){return{x:r,y:n,width:a,height:o}}var Zn=(function(){function r(n){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=kt(0,0,0,0),this.target=n}return r.prototype.isActive=function(){var n=Jn(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},r.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},r})(),Qn=(function(){function r(n,a){var o=Kn(a);Yr(this,{target:n,contentRect:o})}return r})(),eo=(function(){function r(n,a,o){if(this.activeObservations_=[],this.observations_=new Gr,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n,this.controller_=a,this.callbackCtx_=o}return r.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof Ze(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)||(a.set(n,new Zn(n)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(n instanceof Ze(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var a=this.observations_;a.has(n)&&(a.delete(n),a.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var n=this;this.clearActive(),this.observations_.forEach(function(a){a.isActive()&&n.activeObservations_.push(a)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,a=this.activeObservations_.map(function(o){return new Qn(o.target,o.broadcastRect())});this.callback_.call(n,a,n),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r})(),$r=typeof WeakMap<"u"?new WeakMap:new Gr,Xr=(function(){function r(n){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var a=Gn.getInstance(),o=new eo(n,a,this);$r.set(this,o)}return r})();["observe","unobserve","disconnect"].forEach(function(r){Xr.prototype[r]=function(){var n;return(n=$r.get(this))[r].apply(n,arguments)}});var to=(function(){return typeof Tt.ResizeObserver<"u"?Tt.ResizeObserver:Xr})();const ro=un(Object.freeze(Object.defineProperty({__proto__:null,default:to},Symbol.toStringTag,{value:"Module"})));var Jr;function no(){if(Jr)return Dt;Jr=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=T;var r=x(oe),n=u(Ue()),a=u(ro),o=u(Ct());const h=["measureBeforeMount"];function u(p){return p&&p.__esModule?p:{default:p}}function x(p,l){if(typeof WeakMap=="function")var e=new WeakMap,t=new WeakMap;return(x=function(c,f){if(!f&&c&&c.__esModule)return c;var i,b,j={__proto__:null,default:c};if(c===null||typeof c!="object"&&typeof c!="function")return j;if(i=f?t:e){if(i.has(c))return i.get(c);i.set(c,j)}for(const P in c)P!=="default"&&{}.hasOwnProperty.call(c,P)&&((b=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,P))&&(b.get||b.set)?i(j,P,b):j[P]=c[P]);return j})(p,l)}function O(){return O=Object.assign?Object.assign.bind():function(p){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var t in e)({}).hasOwnProperty.call(e,t)&&(p[t]=e[t])}return p},O.apply(null,arguments)}function y(p,l){if(p==null)return{};var e,t,c=R(p,l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(p);for(t=0;t<f.length;t++)e=f[t],l.indexOf(e)===-1&&{}.propertyIsEnumerable.call(p,e)&&(c[e]=p[e])}return c}function R(p,l){if(p==null)return{};var e={};for(var t in p)if({}.hasOwnProperty.call(p,t)){if(l.indexOf(t)!==-1)continue;e[t]=p[t]}return e}function C(p,l,e){return(l=E(l))in p?Object.defineProperty(p,l,{value:e,enumerable:!0,configurable:!0,writable:!0}):p[l]=e,p}function E(p){var l=_(p,"string");return typeof l=="symbol"?l:l+""}function _(p,l){if(typeof p!="object"||!p)return p;var e=p[Symbol.toPrimitive];if(e!==void 0){var t=e.call(p,l);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(p)}const A="react-grid-layout";function T(p){var l;return l=class extends r.Component{constructor(){super(...arguments),C(this,"state",{width:1280}),C(this,"elementRef",r.createRef()),C(this,"mounted",!1),C(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new a.default(c=>{if(this.elementRef.current instanceof HTMLElement){const i=c[0].contentRect.width;this.setState({width:i})}});const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.observe(t)}componentWillUnmount(){this.mounted=!1;const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.unobserve(t),this.resizeObserver.disconnect()}render(){const t=this.props,{measureBeforeMount:c}=t,f=y(t,h);return c&&!this.mounted?r.createElement("div",{className:(0,o.default)(this.props.className,A),style:this.props.style,ref:this.elementRef}):r.createElement(p,O({innerRef:this.elementRef},f,this.state))}},C(l,"defaultProps",{measureBeforeMount:!1}),C(l,"propTypes",{measureBeforeMount:n.default.bool}),l}return Dt}var Kr;function oo(){return Kr||(Kr=1,(function(r){r.exports=Hr().default,r.exports.utils=Ke(),r.exports.calculateUtils=Ht(),r.exports.Responsive=Ln().default,r.exports.Responsive.utils=qr(),r.exports.WidthProvider=no().default})(Lt)),Lt.exports}var io=oo();const so=cn(io);function Zr(r){const n=[];n.push(1,1,0,1,1,0,1,1);for(let a=0;a<r.length;a++){const h=(r.charCodeAt(a)%103).toString(2).padStart(7,"0");for(const u of h)n.push(u==="1"?1:0)}return n.push(1,1,0,0,0,1,1,0,0,0,1,1),n}const Kt=({value:r,format:n})=>{const a=oe.useMemo(()=>Zr(r),[r,n]);if(!r)return s.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置条形码值"});const o=2,h=44,u=a.length*o;return s.jsxs("div",{style:{textAlign:"center",overflow:"hidden",maxWidth:"100%"},children:[s.jsx("canvas",{ref:x=>{if(!x)return;const O=x.getContext("2d");O&&(x.width=u,x.height=h,O.clearRect(0,0,u,h),a.forEach((y,R)=>{O.fillStyle=y===1?"#000":"#fff",O.fillRect(R*o,0,o,h)}))},style:{width:"100%",maxWidth:u,height:h}}),s.jsx("div",{style:{fontSize:10,marginTop:1,letterSpacing:1},children:r})]})},ao=so,Qr=oe.memo(({comp:r,selected:n,isPreview:a=!1,dataSources:o=[]})=>{const h={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",outline:a?"none":n?"2px solid #1677ff":"1px dashed #d9d9d9",outlineOffset:-1},u=x=>at(r,x,o);switch(r.type){case"text":return s.jsx("div",{style:{...h,fontSize:r.props.fontSize||14,fontWeight:r.props.fontWeight||"normal",fontStyle:r.props.fontStyle||"normal",textAlign:r.props.textAlign||"left",color:r.props.color||"#000",backgroundColor:r.props.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:u("content")||""});case"image":const x=u("src")||r.props.src;return s.jsx("div",{style:h,children:x?s.jsx("img",{src:x,style:{width:"100%",height:"100%",objectFit:r.props.fit||"contain"},alt:""}):s.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#bbb",fontSize:12},children:"请在属性中设置图片地址"})});case"table":return s.jsx(lo,{comp:r,style:h,dataSources:o});case"barcode":const O=u("value")||r.props.value||"123456";return s.jsx("div",{style:{...h,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:s.jsx(Kt,{value:O,format:r.props.format||"CODE128"})});case"line":return s.jsx("div",{style:{...h,display:"flex",alignItems:"center",border:"none",outline:n?"2px solid #1677ff":"1px dashed transparent"},children:s.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${r.props.thickness||1}px ${r.props.style||"solid"} ${r.props.color||"#000"}`,margin:0}})});default:return s.jsx("div",{style:h,children:r.type})}}),lo=({comp:r,style:n,dataSources:a=[]})=>{const o=r.props.borderWidth||1,h=r.props.borderColor||"#000",u=r.tableColumns||[],x=r.props.tableDataSourceId,O=x?a.find(E=>E.id===x):null,y=O?jt(O):null;if(y&&y.length>0)return s.jsxs("table",{style:{...n,borderCollapse:"collapse",width:"100%",height:"100%"},children:[u.length>0&&s.jsx("thead",{children:s.jsx("tr",{style:{backgroundColor:"#f5f5f5"},children:u.map((E,_)=>s.jsx("th",{style:{border:`${o}px solid ${h}`,padding:4,fontSize:12,fontWeight:"bold",textAlign:"center"},children:E.title},_))})}),s.jsx("tbody",{children:y.map((E,_)=>s.jsx("tr",{children:u.map((A,T)=>s.jsx("td",{style:{border:`${o}px solid ${h}`,padding:4,fontSize:12,textAlign:"center"},children:A.fieldPath?E[A.fieldPath]:""},T))},_))})]});const R=r.props.rows||3,C=Math.max(r.props.cols||3,u.length||3);return s.jsx("table",{style:{...n,borderCollapse:"collapse",width:"100%",height:"100%"},children:s.jsx("tbody",{children:Array.from({length:R}).map((E,_)=>s.jsx("tr",{children:Array.from({length:C}).map((A,T)=>s.jsx("td",{style:{border:`${o}px solid ${h}`,padding:2,fontSize:12,textAlign:"center"},children:" "},T))},_))})})},en=({isPreview:r=!1})=>{const n=fe(e=>e.components),a=fe(e=>e.selectedId),o=fe(e=>e.pageSettings),h=fe(e=>e.selectComponent);fe(e=>e.updateComponent);const u=fe(e=>e.setComponents),x=fe(e=>e.addComponent),O=fe(e=>e.gridSettings),y=fe(e=>e.dataSources),R=oe.useMemo(()=>{const e=bt[o.paperSize];if(!e)return{width:o.customWidth*Ee,height:o.customHeight*Ee};const t=e.width*Ee,c=e.height*Ee;return o.orientation==="landscape"?{width:c,height:t}:{width:t,height:c}},[o]),C=oe.useMemo(()=>({top:o.marginTop*Ee,right:o.marginRight*Ee,bottom:o.marginBottom*Ee,left:o.marginLeft*Ee}),[o]),E=R.width-C.left-C.right,_=R.height-C.top-C.bottom,A=oe.useMemo(()=>n.map(e=>({i:e.id,x:e.x,y:e.y,w:e.w,h:e.h})),[n]),T=oe.useCallback(e=>{const t=n.map((c,f)=>{const i=e[f];return i?{...c,x:i.x,y:i.y,w:i.w,h:i.h}:c});u(t)},[n,u]),p=oe.useCallback((e,t,c)=>{var j,P;const f=c,i=(j=f.dataTransfer)==null?void 0:j.getData("componentType");if(!i)return;const b=(P=c.target.closest(".react-grid-layout"))==null?void 0:P.getBoundingClientRect();if(b){const z=Math.floor((f.clientX-b.left)/(E/O.cols)),N=Math.floor((f.clientY-b.top)/(E/O.cols));x(i,Math.max(0,z),Math.max(0,N))}else x(i)},[x,E,O.cols]),l=oe.useCallback(e=>{h(e===a?null:e)},[h,a]);return s.jsx("div",{style:{flex:1,overflow:"auto",background:"#e8e8e8",display:"flex",justifyContent:"center",padding:"24px 0"},children:s.jsxs("div",{id:"print-paper",style:{width:R.width,height:R.height,background:"#fff",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",position:"relative",flexShrink:0},children:[o.showHeader&&s.jsx("div",{style:{position:"absolute",top:0,left:C.left,right:C.right,height:C.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#999",borderBottom:"1px dashed #ddd",overflow:"hidden"},children:o.headerContent}),o.showFooter&&s.jsxs("div",{style:{position:"absolute",bottom:0,left:C.left,right:C.right,height:C.bottom,display:"flex",alignItems:"center",justifyContent:o.showPageNumber?"space-between":"center",fontSize:12,color:"#999",borderTop:"1px dashed #ddd",overflow:"hidden",padding:"0 8px"},children:[s.jsx("span",{children:o.footerContent}),o.showPageNumber&&s.jsx("span",{children:o.pageNumberFormat.replace("{page}","1")})]}),s.jsx("div",{style:{position:"absolute",top:C.top,left:C.left,width:E,height:_},children:r?s.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:n.map(e=>{const t=E/O.cols,c=E/O.cols,f={position:"absolute",left:e.x*t,top:e.y*c,width:e.w*t,height:e.h*c};return s.jsx("div",{style:f,children:s.jsx(Qr,{comp:e,selected:!1,isPreview:!0,dataSources:y})},e.id)})}):s.jsx(ao,{className:"canvas-grid",layout:A,cols:O.cols,rowHeight:E/O.cols,width:E,margin:[0,0],containerPadding:[0,0],onLayoutChange:T,onDrop:p,isDroppable:!0,isResizable:!0,isDraggable:!0,compactType:null,preventCollision:!0,draggableHandle:".grid-item-drag-handle",style:{minHeight:_},children:n.map(e=>s.jsx("div",{className:"grid-item-drag-handle",onClick:()=>l(e.id),style:{cursor:"move"},children:s.jsx(Qr,{comp:e,selected:e.id===a,dataSources:y})},e.id))})})]})})},{Text:Ie,Title:Co}=k.Typography,{TextArea:co}=k.Input,uo=()=>{const r=fe(e=>e.components),n=fe(e=>e.selectedId),a=fe(e=>e.dataSources),o=fe(e=>e.updateComponent),h=fe(e=>e.updateComponentTableColumns),u=oe.useMemo(()=>r.find(e=>e.id===n)||null,[r,n]),[x,O]=oe.useState([]),y=oe.useMemo(()=>[{label:"无(使用静态值)",value:""},...a.map(e=>({label:e.name,value:e.id,type:e.type}))],[a]),R=oe.useCallback((e,t)=>{n&&o(n,{props:{...u==null?void 0:u.props,[e]:t}})},[n,u,o]),C=oe.useCallback((e,t,c,f)=>{if(!n)return;let i=f;t&&c&&(i=f);const b=`${e}Binding`;o(n,{props:{...u==null?void 0:u.props,[e]:i,[b]:{dataSourceId:t,fieldPath:c,staticValue:f}}})},[n,u,o]),E=oe.useCallback(e=>{const t=u==null?void 0:u.props[`${e}Binding`],c=String((u==null?void 0:u.props[e])||"");return t?{field:e,dataSourceId:t.dataSourceId||null,fieldPath:t.fieldPath||"",staticValue:t.staticValue??c}:{field:e,dataSourceId:null,fieldPath:"",staticValue:c}},[u]);if(!u)return s.jsx(k.Card,{title:"属性面板",size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16}},children:s.jsx(k.Empty,{description:"请选择画布中的组件",image:k.Empty.PRESENTED_IMAGE_SIMPLE})});const _=sr[u.type]||u.type,A=s.jsxs(s.Fragment,{children:[s.jsx(Ie,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"位置和大小"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"X"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.x,onChange:e=>o(n,{x:e??0})})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"Y"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.y,onChange:e=>o(n,{y:e??0})})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"宽度"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.w,min:1,onChange:e=>o(n,{w:e??1})})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"高度"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.h,min:1,onChange:e=>o(n,{h:e??1})})]})]})]}),T=({field:e,label:t,placeholder:c,isTextarea:f=!1})=>{const i=E(e),b=a.find(F=>F.id===i.dataSourceId),j=b?St(b):null,P=j?Object.keys(j):[],[z,N]=oe.useState(i.staticValue);return oe.useEffect(()=>{N(i.staticValue)},[i.staticValue,i.dataSourceId]),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12,display:"block",marginBottom:4},children:t}),s.jsx("div",{style:{marginBottom:4},children:s.jsx(k.Select,{size:"small",style:{width:"100%"},placeholder:"选择数据源",value:i.dataSourceId||"",onChange:F=>{C(e,F||null,F&&i.fieldPath||"",i.staticValue)},options:y})}),i.dataSourceId&&s.jsx("div",{style:{marginBottom:4},children:s.jsx(k.Select,{size:"small",style:{width:"100%"},placeholder:"选择字段",value:i.fieldPath,onChange:F=>{C(e,i.dataSourceId,F||"",i.staticValue)},options:[{label:"请选择字段",value:""},...P.map(F=>({label:F,value:F}))]})}),i.dataSourceId?s.jsxs("div",{style:{padding:6,background:"#f0f5ff",border:"1px solid #adc6ff",borderRadius:4,fontSize:12},children:[s.jsx(Te.DatabaseOutlined,{style:{marginRight:4,color:"#1890ff"}}),s.jsx("span",{style:{fontWeight:500},children:"数据绑定已启用"}),b&&i.fieldPath&&s.jsxs("span",{style:{marginLeft:8},children:[s.jsx(k.Tag,{color:"blue",children:b.name}),s.jsx(k.Tag,{color:"green",children:i.fieldPath})]})]}):f?s.jsx(co,{rows:3,placeholder:c,value:z,onChange:F=>N(F.target.value),onBlur:()=>{C(e,null,"",z)}}):s.jsx(k.Input,{placeholder:c,value:z,onChange:F=>N(F.target.value),onBlur:()=>{C(e,null,"",z)}})]})},p=()=>{const e=u.tableColumns||[],t=a.filter(V=>V.type==="array"),c=u.props.tableDataSourceId||"",f=t.find(V=>V.id===c),i=x.length>0?x:e,[b,j]=oe.useState({}),P=()=>{h(n,i)},z=()=>{const V=[...i,{title:`列${i.length+1}`}];O(V)},N=V=>{const X=i.filter((J,ne)=>ne!==V);O(X)},F=(V,X,J)=>{const ne=[...i];ne[V]={...ne[V],[X]:J},O(ne)};let Z=[];if(f){const V=st(f.data);Array.isArray(V)&&V.length>0&&typeof V[0]=="object"&&(Z=Object.keys(V[0]))}const K=[{title:"列标题",dataIndex:"title",width:100,render:(V,X)=>{const J=X.key in b?b[X.key]:X.title;return s.jsx(k.Input,{size:"small",value:J,placeholder:"列标题",onChange:ne=>{j({...b,[X.key]:ne.target.value})},onBlur:()=>{if(X.key in b){F(Number(X.key),"title",b[X.key]);const ne={...b};delete ne[X.key],j(ne),P()}}})}},{title:"绑定字段",dataIndex:"fieldPath",width:120,render:(V,X)=>s.jsx(k.Select,{size:"small",style:{width:"100%"},value:X.fieldPath||"",placeholder:f?"绑定字段":"选择数据源先",disabled:!f,onChange:J=>{F(Number(X.key),"fieldPath",J||""),P()},options:[{label:"无绑定",value:""},...Z.map(J=>({label:J,value:J}))]})},{title:"操作",width:60,render:(V,X)=>s.jsx(k.Popconfirm,{title:"确定要删除吗?",onConfirm:()=>{N(Number(X.key)),P()},okText:"确定",cancelText:"取消",children:s.jsx(k.Button,{type:"text",danger:!0,size:"small",icon:s.jsx(Te.DeleteOutlined,{})})})}],Q=i.map((V,X)=>({...V,key:String(X)}));return s.jsxs("div",{children:[s.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:s.jsx(Ie,{style:{fontSize:12},children:"表格数据源"})}),s.jsx(k.Select,{size:"small",style:{width:"100%",marginBottom:8},placeholder:"选择数组类型数据源",value:c,onChange:V=>R("tableDataSourceId",V||""),options:[{label:"无(仅静态展示)",value:""},...t.map(V=>({label:V.name,value:V.id}))]}),s.jsx(k.Divider,{}),s.jsxs(k.Space,{style:{marginBottom:8},children:[s.jsx(Ie,{style:{fontSize:12},children:"列配置"}),s.jsx(k.Button,{size:"small",type:"dashed",icon:s.jsx(Te.PlusOutlined,{}),onClick:z}),s.jsx(k.Button,{size:"small",type:"primary",onClick:P,icon:s.jsx(Te.SaveOutlined,{})})]}),s.jsx(k.Table,{dataSource:Q,columns:K,pagination:!1,size:"small",bordered:!0,rowKey:"key"})]})},l=()=>{switch(u.type){case"text":return s.jsxs(s.Fragment,{children:[s.jsx(T,{field:"content",label:"内容",placeholder:"请输入文本内容",isTextarea:!0}),s.jsx(k.Divider,{style:{margin:"4px 0"}}),s.jsx(Ie,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"文字样式"}),s.jsxs(k.Space,{style:{width:"100%"},direction:"vertical",size:4,children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"字号"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.props.fontSize||14,min:6,max:200,onChange:e=>R("fontSize",e??14)})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"对齐"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.textAlign||"left",onChange:e=>R("textAlign",e),options:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}]})]})]}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"字重"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.fontWeight||"normal",onChange:e=>R("fontWeight",e),options:[{value:"normal",label:"常规"},{value:"bold",label:"加粗"}]})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"样式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.fontStyle||"normal",onChange:e=>R("fontStyle",e),options:[{value:"normal",label:"常规"},{value:"italic",label:"斜体"}]})]})]}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"字体颜色"}),s.jsx(k.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>R("color",t)})]}),s.jsxs("div",{children:[s.jsx(Ie,{style:{fontSize:12},children:"背景色"}),s.jsx(k.ColorPicker,{size:"small",value:u.props.backgroundColor||"transparent",onChange:(e,t)=>R("backgroundColor",t)})]})]})]})]});case"image":return s.jsxs(s.Fragment,{children:[s.jsx(T,{field:"src",label:"图片地址",placeholder:"输入图片 URL"}),s.jsx(k.Divider,{style:{margin:"4px 0"}}),s.jsx(Ie,{style:{fontSize:12,marginTop:8,display:"block"},children:"适应方式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.fit||"contain",onChange:e=>R("fit",e),options:[{value:"contain",label:"适应"},{value:"cover",label:"填充"},{value:"fill",label:"拉伸"}]})]});case"table":return s.jsx(p,{});case"barcode":return s.jsxs(s.Fragment,{children:[s.jsx(T,{field:"value",label:"条码值",placeholder:"输入条码内容"}),s.jsx(k.Divider,{style:{margin:"4px 0"}}),s.jsx(Ie,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.format||"CODE128",onChange:e=>R("format",e),options:[{value:"CODE128",label:"CODE128"}]})]});case"line":return s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"粗细"}),s.jsx(k.InputNumber,{size:"small",style:{width:"100%"},value:u.props.thickness||1,min:1,max:20,onChange:e=>R("thickness",e??1)})]}),s.jsxs("div",{style:{flex:1},children:[s.jsx(Ie,{style:{fontSize:12},children:"样式"}),s.jsx(k.Select,{size:"small",style:{width:"100%"},value:u.props.style||"solid",onChange:e=>R("style",e),options:[{value:"solid",label:"实线"},{value:"dashed",label:"虚线"},{value:"dotted",label:"点线"}]})]})]}),s.jsxs("div",{style:{marginTop:8},children:[s.jsx(Ie,{style:{fontSize:12},children:"颜色"}),s.jsx(k.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>R("color",t)})]})]});default:return null}};return s.jsx(k.Card,{title:`属性 - ${_}`,size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16,overflowY:"auto"}},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[A,s.jsx(k.Divider,{style:{margin:"4px 0"}}),l()]})})},{Text:_o}=k.Typography,fo=()=>{const r=fe(p=>p.previewVisible),n=fe(p=>p.setPreviewVisible),a=fe(p=>p.components),o=fe(p=>p.pageSettings),h=fe(p=>p.gridSettings)||xt,u=fe(p=>p.dataSources),x=oe.useRef(null),O=oe.useMemo(()=>{const p=bt[o.paperSize];if(!p)return{width:o.customWidth*Ee,height:o.customHeight*Ee};const l=p.width*Ee,e=p.height*Ee;return o.orientation==="landscape"?{width:e,height:l}:{width:l,height:e}},[o]),y=oe.useMemo(()=>({top:o.marginTop*Ee,right:o.marginRight*Ee,bottom:o.marginBottom*Ee,left:o.marginLeft*Ee}),[o]),R=O.width-y.left-y.right,C=R/h.cols,E=tr.useReactToPrint({contentRef:x,documentTitle:"打印模板",pageStyle:`
48
+ */var qt,xr;function Pn(){if(xr)return qt;xr=1;var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function i(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function h(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var b={},O=0;O<10;O++)b["_"+String.fromCharCode(O)]=O;var m=Object.getOwnPropertyNames(b).map(function(R){return b[R]});if(m.join("")!=="0123456789")return!1;var j={};return"abcdefghijklmnopqrst".split("").forEach(function(R){j[R]=R}),Object.keys(Object.assign({},j)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qt=h()?Object.assign:function(u,b){for(var O,m=i(u),j,R=1;R<arguments.length;R++){O=Object(arguments[R]);for(var P in O)o.call(O,P)&&(m[P]=O[P]);if(n){j=n(O);for(var E=0;E<j.length;E++)s.call(O,j[E])&&(m[j[E]]=O[j[E]])}}return m},qt}var Bt,wr;function Ft(){if(wr)return Bt;wr=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bt=n,Bt}var Gt,Sr;function jr(){return Sr||(Sr=1,Gt=Function.call.bind(Object.prototype.hasOwnProperty)),Gt}var Yt,Or;function Dn(){if(Or)return Yt;Or=1;var n={},o=function(){};if(n.NODE_ENV!=="production"){var s=Ft(),i={},h=jr();o=function(b){var O="Warning: "+b;typeof console<"u"&&console.error(O);try{throw new Error(O)}catch{}}}function u(b,O,m,j,R){if(n.NODE_ENV!=="production"){for(var P in b)if(h(b,P)){var E;try{if(typeof b[P]!="function"){var N=Error((j||"React class")+": "+m+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}E=b[P](O,P,j,m,null,s)}catch(p){E=p}if(E&&!(E instanceof Error)&&o((j||"React class")+": type specification of "+m+" `"+P+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof E+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),E instanceof Error&&!(E.message in i)){i[E.message]=!0;var I=R?R():"";o("Failed "+m+" type: "+E.message+(I??""))}}}}return u.resetWarningCache=function(){n.NODE_ENV!=="production"&&(i={})},Yt=u,Yt}var Vt,Rr;function Tn(){if(Rr)return Vt;Rr=1;var n={},o=br(),s=Pn(),i=Ft(),h=jr(),u=Dn(),b=function(){};n.NODE_ENV!=="production"&&(b=function(m){var j="Warning: "+m;typeof console<"u"&&console.error(j);try{throw new Error(j)}catch{}});function O(){return null}return Vt=function(m,j){var R=typeof Symbol=="function"&&Symbol.iterator,P="@@iterator";function E(M){var L=M&&(R&&M[R]||M[P]);if(typeof L=="function")return L}var N="<<anonymous>>",I={array:t("array"),bigint:t("bigint"),bool:t("boolean"),func:t("function"),number:t("number"),object:t("object"),string:t("string"),symbol:t("symbol"),any:c(),arrayOf:f,element:a(),elementType:S(),instanceOf:C,node:W(),objectOf:_,oneOf:D,oneOfType:k,shape:J,exact:re};function p(M,L){return M===L?M!==0||1/M===1/L:M!==M&&L!==L}function l(M,L){this.message=M,this.data=L&&typeof L=="object"?L:{},this.stack=""}l.prototype=Error.prototype;function e(M){if(n.NODE_ENV!=="production")var L={},le=0;function ie(pe,ue,A,G,Z,X,ae){if(G=G||N,X=X||A,ae!==i){if(j){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(n.NODE_ENV!=="production"&&typeof console<"u"){var ye=G+":"+A;!L[ye]&&le<3&&(b("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ye]=!0,le++)}}return ue[A]==null?pe?ue[A]===null?new l("The "+Z+" `"+X+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new l("The "+Z+" `"+X+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:M(ue,A,G,Z,X)}var ce=ie.bind(null,!1);return ce.isRequired=ie.bind(null,!0),ce}function t(M){function L(le,ie,ce,pe,ue,A){var G=le[ie],Z=Q(G);if(Z!==M){var X=te(G);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+X+"` supplied to `"+ce+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return e(L)}function c(){return e(O)}function f(M){function L(le,ie,ce,pe,ue){if(typeof M!="function")return new l("Property `"+ue+"` of component `"+ce+"` has invalid PropType notation inside arrayOf.");var A=le[ie];if(!Array.isArray(A)){var G=Q(A);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected an array."))}for(var Z=0;Z<A.length;Z++){var X=M(A,Z,ce,pe,ue+"["+Z+"]",i);if(X instanceof Error)return X}return null}return e(L)}function a(){function M(L,le,ie,ce,pe){var ue=L[le];if(!m(ue)){var A=Q(ue);return new l("Invalid "+ce+" `"+pe+"` of type "+("`"+A+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return e(M)}function S(){function M(L,le,ie,ce,pe){var ue=L[le];if(!o.isValidElementType(ue)){var A=Q(ue);return new l("Invalid "+ce+" `"+pe+"` of type "+("`"+A+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return e(M)}function C(M){function L(le,ie,ce,pe,ue){if(!(le[ie]instanceof M)){var A=M.name||N,G=ge(le[ie]);return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected ")+("instance of `"+A+"`."))}return null}return e(L)}function D(M){if(!Array.isArray(M))return n.NODE_ENV!=="production"&&(arguments.length>1?b("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):b("Invalid argument supplied to oneOf, expected an array.")),O;function L(le,ie,ce,pe,ue){for(var A=le[ie],G=0;G<M.length;G++)if(p(A,M[G]))return null;var Z=JSON.stringify(M,function(ae,H){var ye=te(H);return ye==="symbol"?String(H):H});return new l("Invalid "+pe+" `"+ue+"` of value `"+String(A)+"` "+("supplied to `"+ce+"`, expected one of "+Z+"."))}return e(L)}function _(M){function L(le,ie,ce,pe,ue){if(typeof M!="function")return new l("Property `"+ue+"` of component `"+ce+"` has invalid PropType notation inside objectOf.");var A=le[ie],G=Q(A);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type "+("`"+G+"` supplied to `"+ce+"`, expected an object."));for(var Z in A)if(h(A,Z)){var X=M(A,Z,ce,pe,ue+"."+Z,i);if(X instanceof Error)return X}return null}return e(L)}function k(M){if(!Array.isArray(M))return n.NODE_ENV!=="production"&&b("Invalid argument supplied to oneOfType, expected an instance of array."),O;for(var L=0;L<M.length;L++){var le=M[L];if(typeof le!="function")return b("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+he(le)+" at index "+L+"."),O}function ie(ce,pe,ue,A,G){for(var Z=[],X=0;X<M.length;X++){var ae=M[X],H=ae(ce,pe,ue,A,G,i);if(H==null)return null;H.data&&h(H.data,"expectedType")&&Z.push(H.data.expectedType)}var ye=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new l("Invalid "+A+" `"+G+"` supplied to "+("`"+ue+"`"+ye+"."))}return e(ie)}function W(){function M(L,le,ie,ce,pe){return V(L[le])?null:new l("Invalid "+ce+" `"+pe+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return e(M)}function U(M,L,le,ie,ce){return new l((M||"React class")+": "+L+" type `"+le+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ce+"`.")}function J(M){function L(le,ie,ce,pe,ue){var A=le[ie],G=Q(A);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type `"+G+"` "+("supplied to `"+ce+"`, expected `object`."));for(var Z in M){var X=M[Z];if(typeof X!="function")return U(ce,pe,ue,Z,te(X));var ae=X(A,Z,ce,pe,ue+"."+Z,i);if(ae)return ae}return null}return e(L)}function re(M){function L(le,ie,ce,pe,ue){var A=le[ie],G=Q(A);if(G!=="object")return new l("Invalid "+pe+" `"+ue+"` of type `"+G+"` "+("supplied to `"+ce+"`, expected `object`."));var Z=s({},le[ie],M);for(var X in Z){var ae=M[X];if(h(M,X)&&typeof ae!="function")return U(ce,pe,ue,X,te(ae));if(!ae)return new l("Invalid "+pe+" `"+ue+"` key `"+X+"` supplied to `"+ce+"`.\nBad object: "+JSON.stringify(le[ie],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var H=ae(A,X,ce,pe,ue+"."+X,i);if(H)return H}return null}return e(L)}function V(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(V);if(M===null||m(M))return!0;var L=E(M);if(L){var le=L.call(M),ie;if(L!==M.entries){for(;!(ie=le.next()).done;)if(!V(ie.value))return!1}else for(;!(ie=le.next()).done;){var ce=ie.value;if(ce&&!V(ce[1]))return!1}}else return!1;return!0;default:return!1}}function K(M,L){return M==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function Q(M){var L=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":K(L,M)?"symbol":L}function te(M){if(typeof M>"u"||M===null)return""+M;var L=Q(M);if(L==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return L}function he(M){var L=te(M);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ge(M){return!M.constructor||!M.constructor.name?N:M.constructor.name}return I.checkPropTypes=u,I.resetWarningCache=u.resetWarningCache,I.PropTypes=I,I},Vt}var Ut,Cr;function zn(){if(Cr)return Ut;Cr=1;var n=Ft();function o(){}function s(){}return s.resetWarningCache=o,Ut=function(){function i(b,O,m,j,R,P){if(P!==n){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}}i.isRequired=i;function h(){return i}var u={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:h,element:i,elementType:i,instanceOf:h,node:i,objectOf:h,oneOf:h,oneOfType:h,shape:h,exact:h,checkPropTypes:s,resetWarningCache:o};return u.PropTypes=u,u},Ut}var _r;function Ue(){if(_r)return _t.exports;_r=1;var n={};if(n.NODE_ENV!=="production"){var o=br(),s=!0;_t.exports=Tn()(o.isElement,s)}else _t.exports=zn()();return _t.exports}var dt={exports:{}},$t,Er;function kn(){if(Er)return $t;Er=1;var n={},o=Object.create,s=Object.defineProperty,i=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,u=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,O=(d,x)=>{for(var z in x)s(d,z,{get:x[z],enumerable:!0})},m=(d,x,z,F)=>{if(x&&typeof x=="object"||typeof x=="function")for(let Y of h(x))!b.call(d,Y)&&Y!==z&&s(d,Y,{get:()=>x[Y],enumerable:!(F=i(x,Y))||F.enumerable});return d},j=(d,x,z)=>(z=d!=null?o(u(d)):{},m(!d||!d.__esModule?s(z,"default",{value:d,enumerable:!0}):z,d)),R=d=>m(s({},"__esModule",{value:!0}),d),P={};O(P,{DraggableCore:()=>me,default:()=>je}),$t=R(P);var E=j(oe),N=j(Ue()),I=j(Mt),p=Ct();function l(d,x){for(let z=0,F=d.length;z<F;z++)if(x.apply(x,[d[z],z,d]))return d[z]}function e(d){return typeof d=="function"||Object.prototype.toString.call(d)==="[object Function]"}function t(d){return typeof d=="number"&&!isNaN(d)}function c(d){return parseInt(d,10)}function f(d,x,z){if(d[x])return new Error(`Invalid prop ${x} passed to ${z} - do not set this, set it on the child.`)}var a=["Moz","Webkit","O","ms"];function S(d="transform"){var x,z;if(typeof window>"u")return"";const F=(z=(x=window.document)==null?void 0:x.documentElement)==null?void 0:z.style;if(!F||d in F)return"";for(let Y=0;Y<a.length;Y++)if(C(d,a[Y])in F)return a[Y];return""}function C(d,x){return x?`${x}${D(d)}`:d}function D(d){let x="",z=!0;for(let F=0;F<d.length;F++)z?(x+=d[F].toUpperCase(),z=!1):d[F]==="-"?z=!0:x+=d[F];return x}var _=S(),k="";function W(d,x){var z;k||(k=(z=l(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Y){return e(d[Y])}))!=null?z:"");const F=d[k];return e(F)?!!F.call(d,x):!1}function U(d,x,z){let F=d;do{if(W(F,x))return!0;if(F===z)return!1;F=F.parentNode}while(F);return!1}function J(d,x,z,F){if(!d)return;const Y={capture:!0,...F},_e=z;d.addEventListener?d.addEventListener(x,_e,Y):d.attachEvent?d.attachEvent("on"+x,_e):d["on"+x]=_e}function re(d,x,z,F){if(!d)return;const Y={capture:!0,...F},_e=z;d.removeEventListener?d.removeEventListener(x,_e,Y):d.detachEvent?d.detachEvent("on"+x,_e):d["on"+x]=null}function V(d){let x=d.clientHeight;const z=d.ownerDocument.defaultView.getComputedStyle(d);return x+=c(z.borderTopWidth),x+=c(z.borderBottomWidth),x}function K(d){let x=d.clientWidth;const z=d.ownerDocument.defaultView.getComputedStyle(d);return x+=c(z.borderLeftWidth),x+=c(z.borderRightWidth),x}function Q(d){let x=d.clientHeight;const z=d.ownerDocument.defaultView.getComputedStyle(d);return x-=c(z.paddingTop),x-=c(z.paddingBottom),x}function te(d){let x=d.clientWidth;const z=d.ownerDocument.defaultView.getComputedStyle(d);return x-=c(z.paddingLeft),x-=c(z.paddingRight),x}function he(d,x,z){const Y=x===x.ownerDocument.body?{left:0,top:0}:x.getBoundingClientRect(),_e=(d.clientX+x.scrollLeft-Y.left)/z,ve=(d.clientY+x.scrollTop-Y.top)/z;return{x:_e,y:ve}}function ge(d,x){const z=L(d,x,"px");return{[C("transform",_)]:z}}function M(d,x){return L(d,x,"")}function L({x:d,y:x},z,F){let Y=`translate(${d}${F},${x}${F})`;if(z){const _e=`${typeof z.x=="string"?z.x:z.x+F}`,ve=`${typeof z.y=="string"?z.y:z.y+F}`;Y=`translate(${_e}, ${ve})`+Y}return Y}function le(d,x){return d.targetTouches&&l(d.targetTouches,z=>x===z.identifier)||d.changedTouches&&l(d.changedTouches,z=>x===z.identifier)}function ie(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function ce(d){if(!d)return;let x=d.getElementById("react-draggable-style-el");x||(x=d.createElement("style"),x.type="text/css",x.id="react-draggable-style-el",x.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
+ `,x.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
+ `,d.getElementsByTagName("head")[0].appendChild(x)),d.body&&A(d.body,"react-draggable-transparent-selection")}function pe(d){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ue(d)}):ue(d)}function ue(d){if(d)try{d.body&&G(d.body,"react-draggable-transparent-selection");const x=d.selection;if(x)x.empty();else{const z=(d.defaultView||window).getSelection();z&&z.type!=="Caret"&&z.removeAllRanges()}}catch{}}function A(d,x){d.classList?d.classList.add(x):d.className.match(new RegExp(`(?:^|\\s)${x}(?!\\S)`))||(d.className+=` ${x}`)}function G(d,x){d.classList?d.classList.remove(x):d.className=d.className.replace(new RegExp(`(?:^|\\s)${x}(?!\\S)`,"g"),"")}function Z(d,x,z){if(!d.props.bounds)return[x,z];let{bounds:F}=d.props;F=typeof F=="string"?F:Ae(F);const Y=y(d);if(typeof F=="string"){const{ownerDocument:_e}=Y,ve=_e.defaultView;if(!ve)throw new Error("Cannot resolve the owner window of the draggable node.");let De;if(F==="parent"?De=Y.parentNode:De=Y.getRootNode().querySelector(F),!(De instanceof ve.HTMLElement))throw new Error('Bounds selector "'+F+'" could not find an element.');const Me=De,Ye=ve.getComputedStyle(Y),$e=ve.getComputedStyle(Me);F={left:-Y.offsetLeft+c($e.paddingLeft)+c(Ye.marginLeft),top:-Y.offsetTop+c($e.paddingTop)+c(Ye.marginTop),right:te(Me)-K(Y)-Y.offsetLeft+c($e.paddingRight)-c(Ye.marginRight),bottom:Q(Me)-V(Y)-Y.offsetTop+c($e.paddingBottom)-c(Ye.marginBottom)}}return t(F.right)&&(x=Math.min(x,F.right)),t(F.bottom)&&(z=Math.min(z,F.bottom)),t(F.left)&&(x=Math.max(x,F.left)),t(F.top)&&(z=Math.max(z,F.top)),[x,z]}function X(d,x,z){const F=Math.round(x/d[0])*d[0],Y=Math.round(z/d[1])*d[1];return[F,Y]}function ae(d){return d.props.axis==="both"||d.props.axis==="x"}function H(d){return d.props.axis==="both"||d.props.axis==="y"}function ye(d,x,z){const F=typeof x=="number"?le(d,x):null;if(typeof x=="number"&&!F)return null;const Y=y(z),_e=z.props.offsetParent||Y.offsetParent||Y.ownerDocument.body;return he(F||d,_e,z.props.scale)}function ze(d,x,z){const F=!t(d.lastX),Y=y(d);return F?{node:Y,deltaX:0,deltaY:0,lastX:x,lastY:z,x,y:z}:{node:Y,deltaX:x-d.lastX,deltaY:z-d.lastY,lastX:d.lastX,lastY:d.lastY,x,y:z}}function we(d,x){const z=d.props.scale;return{node:x.node,x:d.state.x+x.deltaX/z,y:d.state.y+x.deltaY/z,deltaX:x.deltaX/z,deltaY:x.deltaY/z,lastX:d.state.x,lastY:d.state.y}}function Ae(d){return{left:d.left,top:d.top,right:d.right,bottom:d.bottom}}function y(d){const x=d.findDOMNode();if(!x)throw new Error("<DraggableCore>: Unmounted during event!");return x}var v=j(oe),w=j(Ue()),q=j(Mt);function ne(...d){n.DRAGGABLE_DEBUG&&console.log(...d)}var $={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},se=$.mouse,me=class extends v.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=d=>{if(this.props.onMouseDown(d),!this.props.allowAnyClick&&(typeof d.button=="number"&&d.button!==0||d.ctrlKey))return!1;const x=this.findDOMNode();if(!x||!x.ownerDocument||!x.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:z}=x;if(this.props.disabled||!(d.target instanceof z.defaultView.Node)||this.props.handle&&!U(d.target,this.props.handle,x)||this.props.cancel&&U(d.target,this.props.cancel,x))return;d.type==="touchstart"&&!this.props.allowMobileScroll&&d.preventDefault();const F=ie(d);this.touchIdentifier=F;const Y=ye(d,F,this);if(Y==null)return;const{x:_e,y:ve}=Y,De=ze(this,_e,ve);ne("DraggableCore: handleDragStart: %j",De),ne("calling",this.props.onStart),!(this.props.onStart(d,De)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&ce(z),this.dragging=!0,this.lastX=_e,this.lastY=ve,J(z,se.move,this.handleDrag),J(z,se.stop,this.handleDragStop))},this.handleDrag=d=>{const x=ye(d,this.touchIdentifier,this);if(x==null)return;let{x:z,y:F}=x;if(Array.isArray(this.props.grid)){let ve=z-this.lastX,De=F-this.lastY;if([ve,De]=X(this.props.grid,ve,De),!ve&&!De)return;z=this.lastX+ve,F=this.lastY+De}const Y=ze(this,z,F);if(ne("DraggableCore: handleDrag: %j",Y),this.props.onDrag(d,Y)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const ve=document.createEvent("MouseEvents");ve.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(ve)}return}this.lastX=z,this.lastY=F},this.handleDragStop=d=>{if(!this.dragging)return;const x=ye(d,this.touchIdentifier,this);if(x==null)return;let{x:z,y:F}=x;if(Array.isArray(this.props.grid)){let De=z-this.lastX||0,Me=F-this.lastY||0;[De,Me]=X(this.props.grid,De,Me),z=this.lastX+De,F=this.lastY+Me}const Y=ze(this,z,F);if(this.props.onStop(d,Y)===!1||this.mounted===!1)return!1;const ve=this.findDOMNode();ve&&this.props.enableUserSelectHack&&pe(ve.ownerDocument),ne("DraggableCore: handleDragStop: %j",Y),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,ve&&(ne("DraggableCore: Removing handlers"),re(ve.ownerDocument,se.move,this.handleDrag),re(ve.ownerDocument,se.stop,this.handleDragStop))},this.onMouseDown=d=>(se=$.mouse,this.handleDragStart(d)),this.onMouseUp=d=>(se=$.mouse,this.handleDragStop(d)),this.onTouchStart=d=>(se=$.touch,this.handleDragStart(d)),this.onTouchEnd=d=>(se=$.touch,this.handleDragStop(d))}componentDidMount(){this.mounted=!0;const d=this.findDOMNode();d&&J(d,$.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const d=this.findDOMNode();if(d){const{ownerDocument:x}=d;re(x,$.mouse.move,this.handleDrag),re(x,$.touch.move,this.handleDrag),re(x,$.mouse.stop,this.handleDragStop),re(x,$.touch.stop,this.handleDragStop),re(d,$.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&pe(x)}}findDOMNode(){var d;if((d=this.props)!=null&&d.nodeRef)return this.props.nodeRef.current;const x=q.default;return typeof x.findDOMNode=="function"?x.findDOMNode(this):(ne("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"),null)}render(){return v.cloneElement(v.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};me.displayName="DraggableCore",me.propTypes={allowAnyClick:w.default.bool,allowMobileScroll:w.default.bool,children:w.default.node.isRequired,disabled:w.default.bool,enableUserSelectHack:w.default.bool,offsetParent:function(d,x){if(d[x]&&d[x].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:w.default.arrayOf(w.default.number),handle:w.default.string,cancel:w.default.string,nodeRef:w.default.object,onStart:w.default.func,onDrag:w.default.func,onStop:w.default.func,onMouseDown:w.default.func,scale:w.default.number,className:f,style:f,transform:f},me.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var je=class extends E.Component{constructor(d){super(d),this.onDragStart=(x,z)=>{if(ne("Draggable: onDragStart: %j",z),this.props.onStart(x,we(this,z))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(x,z)=>{if(!this.state.dragging)return!1;ne("Draggable: onDrag: %j",z);const F=we(this,z),Y={x:F.x,y:F.y,slackX:0,slackY:0};if(this.props.bounds){const{x:ve,y:De}=Y;Y.x+=this.state.slackX,Y.y+=this.state.slackY;const[Me,Ye]=Z(this,Y.x,Y.y);Y.x=Me,Y.y=Ye,Y.slackX=this.state.slackX+(ve-Y.x),Y.slackY=this.state.slackY+(De-Y.y),F.x=Y.x,F.y=Y.y,F.deltaX=Y.x-this.state.x,F.deltaY=Y.y-this.state.y}if(this.props.onDrag(x,F)===!1)return!1;this.setState(Y)},this.onDragStop=(x,z)=>{if(!this.state.dragging||this.props.onStop(x,we(this,z))===!1)return!1;ne("Draggable: onDragStop: %j",z);const Y={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:ve,y:De}=this.props.position;Y.x=ve,Y.y=De}this.setState(Y)},this.state={dragging:!1,dragged:!1,x:d.position?d.position.x:d.defaultPosition.x,y:d.position?d.position.y:d.defaultPosition.y,prevPropsPosition:{...d.position},slackX:0,slackY:0,isElementSVG:!1},d.position&&!(d.onDrag||d.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:d},{prevPropsPosition:x}){return d&&(!x||d.x!==x.x||d.y!==x.y)?(ne("Draggable: getDerivedStateFromProps %j",{position:d,prevPropsPosition:x}),{x:d.x,y:d.y,prevPropsPosition:{...d}}):null}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var d;if((d=this.props)!=null&&d.nodeRef)return this.props.nodeRef.current;const x=I.default;return typeof x.findDOMNode=="function"?x.findDOMNode(this):null}render(){const{axis:d,bounds:x,children:z,defaultPosition:F,defaultClassName:Y,defaultClassNameDragging:_e,defaultClassNameDragged:ve,position:De,positionOffset:Me,scale:Ye,...$e}=this.props;let mt={},et=null;const Ve=!!!De||this.state.dragging,tt=De||F,rt={x:ae(this)&&Ve?this.state.x:tt.x,y:H(this)&&Ve?this.state.y:tt.y};this.state.isElementSVG?et=M(rt,Me):mt=ge(rt,Me);const nt=E.Children.only(z),er=(0,p.clsx)(nt.props.className||"",Y,{[_e]:this.state.dragging,[ve]:this.state.dragged});return E.createElement(me,{...$e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},E.cloneElement(nt,{className:er,style:{...nt.props.style,...mt},transform:et}))}};return je.displayName="Draggable",je.propTypes={...me.propTypes,axis:N.default.oneOf(["both","x","y","none"]),bounds:N.default.oneOfType([N.default.shape({left:N.default.number,right:N.default.number,top:N.default.number,bottom:N.default.number}),N.default.string,N.default.oneOf([!1])]),defaultClassName:N.default.string,defaultClassNameDragging:N.default.string,defaultClassNameDragged:N.default.string,defaultPosition:N.default.shape({x:N.default.number,y:N.default.number}),positionOffset:N.default.shape({x:N.default.oneOfType([N.default.number,N.default.string]),y:N.default.oneOfType([N.default.number,N.default.string])}),position:N.default.shape({x:N.default.number,y:N.default.number}),className:f,style:f,transform:f},je.defaultProps={...me.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},$t}var Pr;function Xt(){if(Pr)return dt.exports;Pr=1;const n=kn(),o=n.DraggableCore,s=n.default||n;return dt.exports=s,dt.exports.default=s,dt.exports.DraggableCore=o,dt.exports}var ft={exports:{}},pt={},Pt={},Dr;function Mn(){if(Dr)return Pt;Dr=1,Pt.__esModule=!0,Pt.cloneElement=O;var n=o(oe);function o(m){return m&&m.__esModule?m:{default:m}}function s(m,j){var R=Object.keys(m);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(m);j&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(m,E).enumerable})),R.push.apply(R,P)}return R}function i(m){for(var j=1;j<arguments.length;j++){var R=arguments[j]!=null?arguments[j]:{};j%2?s(Object(R),!0).forEach(function(P){h(m,P,R[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(R)):s(Object(R)).forEach(function(P){Object.defineProperty(m,P,Object.getOwnPropertyDescriptor(R,P))})}return m}function h(m,j,R){return(j=u(j))in m?Object.defineProperty(m,j,{value:R,enumerable:!0,configurable:!0,writable:!0}):m[j]=R,m}function u(m){var j=b(m,"string");return typeof j=="symbol"?j:j+""}function b(m,j){if(typeof m!="object"||!m)return m;var R=m[Symbol.toPrimitive];if(R!==void 0){var P=R.call(m,j);if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(m)}function O(m,j){return j.style&&m.props.style&&(j.style=i(i({},m.props.style),j.style)),j.className&&m.props.className&&(j.className=m.props.className+" "+j.className),n.default.cloneElement(m,j)}return Pt}var ht={},Tr;function zr(){if(Tr)return ht;Tr=1,ht.__esModule=!0,ht.resizableProps=void 0;var n=o(Ue());Xt();function o(s){return s&&s.__esModule?s:{default:s}}return ht.resizableProps={axis:n.default.oneOf(["both","x","y","none"]),className:n.default.string,children:n.default.element.isRequired,draggableOpts:n.default.shape({allowAnyClick:n.default.bool,cancel:n.default.string,children:n.default.node,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:typeof Element<"u"?n.default.instanceOf(Element):n.default.any,grid:n.default.arrayOf(n.default.number),handle:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number}),height:function(){for(var s=arguments.length,i=new Array(s),h=0;h<s;h++)i[h]=arguments[h];const u=i[0];return u.axis==="both"||u.axis==="y"?n.default.number.isRequired(...i):n.default.number(...i)},handle:n.default.oneOfType([n.default.node,n.default.func]),handleSize:n.default.arrayOf(n.default.number),lockAspectRatio:n.default.bool,maxConstraints:n.default.arrayOf(n.default.number),minConstraints:n.default.arrayOf(n.default.number),onResizeStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,resizeHandles:n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:n.default.number,width:function(){for(var s=arguments.length,i=new Array(s),h=0;h<s;h++)i[h]=arguments[h];const u=i[0];return u.axis==="both"||u.axis==="x"?n.default.number.isRequired(...i):n.default.number(...i)}},ht}var kr;function Mr(){if(kr)return pt;kr=1,pt.__esModule=!0,pt.default=void 0;var n=u(oe),o=Xt(),s=Mn(),i=zr();const h=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(I,p){if(typeof WeakMap=="function")var l=new WeakMap,e=new WeakMap;return(u=function(t,c){if(!c&&t&&t.__esModule)return t;var f,a,S={__proto__:null,default:t};if(t===null||typeof t!="object"&&typeof t!="function")return S;if(f=c?e:l){if(f.has(t))return f.get(t);f.set(t,S)}for(const C in t)C!=="default"&&{}.hasOwnProperty.call(t,C)&&((a=(f=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,C))&&(a.get||a.set)?f(S,C,a):S[C]=t[C]);return S})(I,p)}function b(){return b=Object.assign?Object.assign.bind():function(I){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var e in l)({}).hasOwnProperty.call(l,e)&&(I[e]=l[e])}return I},b.apply(null,arguments)}function O(I,p){if(I==null)return{};var l={};for(var e in I)if({}.hasOwnProperty.call(I,e)){if(p.indexOf(e)!==-1)continue;l[e]=I[e]}return l}function m(I,p){var l=Object.keys(I);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(I);p&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(I,t).enumerable})),l.push.apply(l,e)}return l}function j(I){for(var p=1;p<arguments.length;p++){var l=arguments[p]!=null?arguments[p]:{};p%2?m(Object(l),!0).forEach(function(e){R(I,e,l[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(l)):m(Object(l)).forEach(function(e){Object.defineProperty(I,e,Object.getOwnPropertyDescriptor(l,e))})}return I}function R(I,p,l){return(p=P(p))in I?Object.defineProperty(I,p,{value:l,enumerable:!0,configurable:!0,writable:!0}):I[p]=l,I}function P(I){var p=E(I,"string");return typeof p=="symbol"?p:p+""}function E(I,p){if(typeof I!="object"||!I)return I;var l=I[Symbol.toPrimitive];if(l!==void 0){var e=l.call(I,p);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(I)}let N=class extends n.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(p,l){const e=this.props,t=e.minConstraints,c=e.maxConstraints,f=e.lockAspectRatio;if(!t&&!c&&!f)return[p,l];if(f){const k=this.props.width/this.props.height,W=p-this.props.width,U=l-this.props.height;Math.abs(W)>Math.abs(U*k)?l=p/k:p=l*k}const a=p,S=l;let C=this.slack||[0,0],D=C[0],_=C[1];return p+=D,l+=_,t&&(p=Math.max(t[0],p),l=Math.max(t[1],l)),c&&(p=Math.min(c[0],p),l=Math.min(c[1],l)),this.slack=[D+(a-p),_+(S-l)],[p,l]}resizeHandler(p,l){return(e,t)=>{var c,f,a,S;let C=t.node,D=t.deltaX,_=t.deltaY;p==="onResizeStart"&&this.resetData();const k=(this.props.axis==="both"||this.props.axis==="x")&&l!=="n"&&l!=="s",W=(this.props.axis==="both"||this.props.axis==="y")&&l!=="e"&&l!=="w";if(!k&&!W)return;const U=l[0],J=l[l.length-1],re=C.getBoundingClientRect();if(this.lastHandleRect!=null){if(J==="w"){const ie=re.left-this.lastHandleRect.left;D+=ie}if(U==="n"){const ie=re.top-this.lastHandleRect.top;_+=ie}}this.lastHandleRect=re,J==="w"&&(D=-D),U==="n"&&(_=-_);const V=(c=(f=this.lastSize)==null?void 0:f.width)!=null?c:this.props.width,K=(a=(S=this.lastSize)==null?void 0:S.height)!=null?a:this.props.height;let Q=V+(k?D/this.props.transformScale:0),te=K+(W?_/this.props.transformScale:0);var he=this.runConstraints(Q,te);if(Q=he[0],te=he[1],p==="onResizeStop"&&this.lastSize){var ge=this.lastSize;Q=ge.width,te=ge.height}const M=Q!==V||te!==K;p!=="onResizeStop"&&(this.lastSize={width:Q,height:te});const L=typeof this.props[p]=="function"?this.props[p]:null;L&&!(p==="onResize"&&!M)&&(e.persist==null||e.persist(),L(e,{node:C,size:{width:Q,height:te},handle:l})),p==="onResizeStop"&&this.resetData()}}renderResizeHandle(p,l){const e=this.props.handle;if(!e)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+p,ref:l});if(typeof e=="function")return e(p,l);const t=typeof e.type=="string",c=j({ref:l},t?{}:{handleAxis:p});return n.cloneElement(e,c)}render(){const p=this.props,l=p.children,e=p.className,t=p.draggableOpts;p.width,p.height,p.handle,p.handleSize,p.lockAspectRatio,p.axis,p.minConstraints,p.maxConstraints,p.onResize,p.onResizeStop,p.onResizeStart;const c=p.resizeHandles;p.transformScale;const f=O(p,h);return(0,s.cloneElement)(l,j(j({},f),{},{className:(e?e+" ":"")+"react-resizable",children:[...n.Children.toArray(l.props.children),...c.map(a=>{var S;const C=(S=this.handleRefs[a])!=null?S:this.handleRefs[a]=n.createRef();return n.createElement(o.DraggableCore,b({},t,{nodeRef:C,key:"resizableHandle-"+a,onStop:this.resizeHandler("onResizeStop",a),onStart:this.resizeHandler("onResizeStart",a),onDrag:this.resizeHandler("onResize",a)}),this.renderResizeHandle(a,C))})]}))}};return pt.default=N,N.propTypes=i.resizableProps,N.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},pt}var gt={},Ir;function In(){if(Ir)return gt;Ir=1,gt.__esModule=!0,gt.default=void 0;var n=b(oe),o=u(Ue()),s=u(Mr()),i=zr();const h=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(p){return p&&p.__esModule?p:{default:p}}function b(p,l){if(typeof WeakMap=="function")var e=new WeakMap,t=new WeakMap;return(b=function(c,f){if(!f&&c&&c.__esModule)return c;var a,S,C={__proto__:null,default:c};if(c===null||typeof c!="object"&&typeof c!="function")return C;if(a=f?t:e){if(a.has(c))return a.get(c);a.set(c,C)}for(const D in c)D!=="default"&&{}.hasOwnProperty.call(c,D)&&((S=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,D))&&(S.get||S.set)?a(C,D,S):C[D]=c[D]);return C})(p,l)}function O(){return O=Object.assign?Object.assign.bind():function(p){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var t in e)({}).hasOwnProperty.call(e,t)&&(p[t]=e[t])}return p},O.apply(null,arguments)}function m(p,l){var e=Object.keys(p);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(p);l&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(p,c).enumerable})),e.push.apply(e,t)}return e}function j(p){for(var l=1;l<arguments.length;l++){var e=arguments[l]!=null?arguments[l]:{};l%2?m(Object(e),!0).forEach(function(t){R(p,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(e)):m(Object(e)).forEach(function(t){Object.defineProperty(p,t,Object.getOwnPropertyDescriptor(e,t))})}return p}function R(p,l,e){return(l=P(l))in p?Object.defineProperty(p,l,{value:e,enumerable:!0,configurable:!0,writable:!0}):p[l]=e,p}function P(p){var l=E(p,"string");return typeof l=="symbol"?l:l+""}function E(p,l){if(typeof p!="object"||!p)return p;var e=p[Symbol.toPrimitive];if(e!==void 0){var t=e.call(p,l);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(p)}function N(p,l){if(p==null)return{};var e={};for(var t in p)if({}.hasOwnProperty.call(p,t)){if(l.indexOf(t)!==-1)continue;e[t]=p[t]}return e}let I=class extends n.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(l,e)=>{const t=e.size;this.props.onResize?(l.persist==null||l.persist(),this.setState(t,()=>this.props.onResize&&this.props.onResize(l,e))):this.setState(t)}}static getDerivedStateFromProps(l,e){return e.propsWidth!==l.width||e.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null}render(){const l=this.props,e=l.handle,t=l.handleSize;l.onResize;const c=l.onResizeStart,f=l.onResizeStop,a=l.draggableOpts,S=l.minConstraints,C=l.maxConstraints,D=l.lockAspectRatio,_=l.axis;l.width,l.height;const k=l.resizeHandles,W=l.style,U=l.transformScale,J=N(l,h);return n.createElement(s.default,{axis:_,draggableOpts:a,handle:e,handleSize:t,height:this.state.height,lockAspectRatio:D,maxConstraints:C,minConstraints:S,onResizeStart:c,onResize:this.onResize,onResizeStop:f,resizeHandles:k,transformScale:U,width:this.state.width},n.createElement("div",O({},J,{style:j(j({},W),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return gt.default=I,I.propTypes=j(j({},i.resizableProps),{},{children:o.default.element}),gt}var Ar;function An(){return Ar||(Ar=1,ft.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ft.exports.Resizable=Mr().default,ft.exports.ResizableBox=In().default),ft.exports}var Ge={},Lr;function Nr(){if(Lr)return Ge;Lr=1;var n={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.resizeHandleType=Ge.resizeHandleAxesType=Ge.default=void 0;var o=i(Ue()),s=i(oe);function i(b){return b&&b.__esModule?b:{default:b}}const h=Ge.resizeHandleAxesType=o.default.arrayOf(o.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),u=Ge.resizeHandleType=o.default.oneOfType([o.default.node,o.default.func]);return Ge.default={className:o.default.string,style:o.default.object,width:o.default.number,autoSize:o.default.bool,cols:o.default.number,draggableCancel:o.default.string,draggableHandle:o.default.string,verticalCompact:function(b){b.verticalCompact===!1&&n.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:o.default.oneOf(["vertical","horizontal"]),layout:function(b){var O=b.layout;O!==void 0&&Qe().validateLayout(O,"layout")},margin:o.default.arrayOf(o.default.number),containerPadding:o.default.arrayOf(o.default.number),rowHeight:o.default.number,maxRows:o.default.number,isBounded:o.default.bool,isDraggable:o.default.bool,isResizable:o.default.bool,allowOverlap:o.default.bool,preventCollision:o.default.bool,useCSSTransforms:o.default.bool,transformScale:o.default.number,isDroppable:o.default.bool,resizeHandles:h,resizeHandle:u,onLayoutChange:o.default.func,onDragStart:o.default.func,onDrag:o.default.func,onDragStop:o.default.func,onResizeStart:o.default.func,onResize:o.default.func,onResizeStop:o.default.func,onDrop:o.default.func,droppingItem:o.default.shape({i:o.default.string.isRequired,w:o.default.number.isRequired,h:o.default.number.isRequired}),children:function(b,O){const m=b[O],j={};s.default.Children.forEach(m,function(R){if((R==null?void 0:R.key)!=null){if(j[R.key])throw new Error('Duplicate child key "'+R.key+'" found! This will cause problems in ReactGridLayout.');j[R.key]=!0}})},innerRef:o.default.any},Ge}var Wr;function Ln(){if(Wr)return ut;Wr=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.default=void 0;var n=j(oe),o=Mt,s=j(Ue()),i=Xt(),h=An(),u=Qe(),b=Ht(),O=Nr(),m=j(Ct());function j(l){return l&&l.__esModule?l:{default:l}}function R(l,e){var t=Object.keys(l);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(l);e&&(c=c.filter(function(f){return Object.getOwnPropertyDescriptor(l,f).enumerable})),t.push.apply(t,c)}return t}function P(l){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?R(Object(t),!0).forEach(function(c){E(l,c,t[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(c){Object.defineProperty(l,c,Object.getOwnPropertyDescriptor(t,c))})}return l}function E(l,e,t){return(e=N(e))in l?Object.defineProperty(l,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):l[e]=t,l}function N(l){var e=I(l,"string");return typeof e=="symbol"?e:e+""}function I(l,e){if(typeof l!="object"||!l)return l;var t=l[Symbol.toPrimitive];if(t!==void 0){var c=t.call(l,e);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(l)}let p=class extends n.default.Component{constructor(){super(...arguments),E(this,"state",{resizing:null,dragging:null,className:""}),E(this,"elementRef",n.default.createRef()),E(this,"onDragStart",(e,t)=>{let{node:c}=t;const{onDragStart:f,transformScale:a}=this.props;if(!f)return;const S={top:0,left:0},{offsetParent:C}=c;if(!C)return;const D=C.getBoundingClientRect(),_=c.getBoundingClientRect(),k=_.left/a,W=D.left/a,U=_.top/a,J=D.top/a;S.left=k-W+C.scrollLeft,S.top=U-J+C.scrollTop,this.setState({dragging:S});const{x:re,y:V}=(0,b.calcXY)(this.getPositionParams(),S.top,S.left,this.props.w,this.props.h);return f.call(this,this.props.i,re,V,{e,node:c,newPosition:S})}),E(this,"onDrag",(e,t,c)=>{let{node:f,deltaX:a,deltaY:S}=t;const{onDrag:C}=this.props;if(!C)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let D=this.state.dragging.top+S,_=this.state.dragging.left+a;const{isBounded:k,i:W,w:U,h:J,containerWidth:re}=this.props,V=this.getPositionParams();if(k){const{offsetParent:he}=f;if(he){const{margin:ge,rowHeight:M}=this.props,L=he.clientHeight-(0,b.calcGridItemWHPx)(J,M,ge[1]);D=(0,b.clamp)(D,0,L);const le=(0,b.calcGridColWidth)(V),ie=re-(0,b.calcGridItemWHPx)(U,le,ge[0]);_=(0,b.clamp)(_,0,ie)}}const K={top:D,left:_};c?this.setState({dragging:K}):(0,o.flushSync)(()=>{this.setState({dragging:K})});const{x:Q,y:te}=(0,b.calcXY)(V,D,_,U,J);return C.call(this,W,Q,te,{e,node:f,newPosition:K})}),E(this,"onDragStop",(e,t)=>{let{node:c}=t;const{onDragStop:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:a,h:S,i:C}=this.props,{left:D,top:_}=this.state.dragging,k={top:_,left:D};this.setState({dragging:null});const{x:W,y:U}=(0,b.calcXY)(this.getPositionParams(),_,D,a,S);return f.call(this,C,W,U,{e,node:c,newPosition:k})}),E(this,"onResizeStop",(e,t,c)=>this.onResizeHandler(e,t,c,"onResizeStop")),E(this,"onResizeStart",(e,t,c)=>this.onResizeHandler(e,t,c,"onResizeStart")),E(this,"onResize",(e,t,c)=>this.onResizeHandler(e,t,c,"onResize"))}shouldComponentUpdate(e,t){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;const c=(0,b.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),f=(0,b.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,u.fastPositionEqual)(c,f)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const c=this.elementRef.current;if(!c)return;const f=e.droppingPosition||{left:0,top:0},{dragging:a}=this.state,S=a&&t.left!==f.left||t.top!==f.top;if(!a)this.onDragStart(t.e,{node:c,deltaX:t.left,deltaY:t.top});else if(S){const C=t.left-a.left,D=t.top-a.top;this.onDrag(t.e,{node:c,deltaX:C,deltaY:D},!0)}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:c,useCSSTransforms:f}=this.props;let a;return f?a=(0,u.setTransform)(e):(a=(0,u.setTopLeft)(e),t&&(a.left=(0,u.perc)(e.left/c),a.width=(0,u.perc)(e.width/c))),a}mixinDraggable(e,t){return n.default.createElement(i.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(c,f)=>t(c,f,e)}mixinResizable(e,t,c){const{cols:f,minW:a,minH:S,maxW:C,maxH:D,transformScale:_,resizeHandles:k,resizeHandle:W}=this.props,U=this.getPositionParams(),J=(0,b.calcGridItemPosition)(U,0,0,f,0).width,re=(0,b.calcGridItemPosition)(U,0,0,a,S),V=(0,b.calcGridItemPosition)(U,0,0,C,D),K=[re.width,re.height],Q=[Math.min(V.width,J),Math.min(V.height,1/0)];return n.default.createElement(h.Resizable,{draggableOpts:{disabled:!c},className:c?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:K,maxConstraints:Q,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:_,resizeHandles:k,handle:W},e)}onResizeHandler(e,t,c,f){let{node:a,size:S,handle:C}=t;const D=this.props[f];if(!D)return;const{x:_,y:k,i:W,maxH:U,minH:J,containerWidth:re}=this.props,{minW:V,maxW:K}=this.props;let Q=S;a&&(Q=(0,u.resizeItemInDirection)(C,c,S,re),(0,o.flushSync)(()=>{this.setState({resizing:f==="onResizeStop"?null:Q})}));let{w:te,h:he}=(0,b.calcWH)(this.getPositionParams(),Q.width,Q.height,_,k,C);te=(0,b.clamp)(te,Math.max(V,1),K),he=(0,b.clamp)(he,J,U),D.call(this,W,te,he,{e,node:a,size:Q,handle:C})}render(){const{x:e,y:t,w:c,h:f,isDraggable:a,isResizable:S,droppingPosition:C,useCSSTransforms:D}=this.props,_=(0,b.calcGridItemPosition)(this.getPositionParams(),e,t,c,f,this.state),k=n.default.Children.only(this.props.children);let W=n.default.cloneElement(k,{ref:this.elementRef,className:(0,m.default)("react-grid-item",k.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":a,"react-draggable-dragging":!!this.state.dragging,dropping:!!C,cssTransforms:D}),style:P(P(P({},this.props.style),k.props.style),this.createStyle(_))});return W=this.mixinResizable(W,_,S),W=this.mixinDraggable(W,a),W}};return ut.default=p,E(p,"propTypes",{children:s.default.element,cols:s.default.number.isRequired,containerWidth:s.default.number.isRequired,rowHeight:s.default.number.isRequired,margin:s.default.array.isRequired,maxRows:s.default.number.isRequired,containerPadding:s.default.array.isRequired,x:s.default.number.isRequired,y:s.default.number.isRequired,w:s.default.number.isRequired,h:s.default.number.isRequired,minW:function(l,e){const t=l[e];if(typeof t!="number")return new Error("minWidth not Number");if(t>l.w||t>l.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(l,e){const t=l[e];if(typeof t!="number")return new Error("maxWidth not Number");if(t<l.w||t<l.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(l,e){const t=l[e];if(typeof t!="number")return new Error("minHeight not Number");if(t>l.h||t>l.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(l,e){const t=l[e];if(typeof t!="number")return new Error("maxHeight not Number");if(t<l.h||t<l.minH)return new Error("maxHeight smaller than item height/minHeight")},i:s.default.string.isRequired,resizeHandles:O.resizeHandleAxesType,resizeHandle:O.resizeHandleType,onDragStop:s.default.func,onDragStart:s.default.func,onDrag:s.default.func,onResizeStop:s.default.func,onResizeStart:s.default.func,onResize:s.default.func,isDraggable:s.default.bool.isRequired,isResizable:s.default.bool.isRequired,isBounded:s.default.bool.isRequired,static:s.default.bool,useCSSTransforms:s.default.bool.isRequired,transformScale:s.default.number,className:s.default.string,handle:s.default.string,cancel:s.default.string,droppingPosition:s.default.shape({e:s.default.object.isRequired,left:s.default.number.isRequired,top:s.default.number.isRequired})}),E(p,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),ut}var Hr;function qr(){if(Hr)return lt;Hr=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var n=m(oe),o=Nt(),s=O(Ct()),i=Qe(),h=Ht(),u=O(Ln()),b=O(Nr());function O(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(typeof WeakMap=="function")var c=new WeakMap,f=new WeakMap;return(m=function(a,S){if(!S&&a&&a.__esModule)return a;var C,D,_={__proto__:null,default:a};if(a===null||typeof a!="object"&&typeof a!="function")return _;if(C=S?f:c){if(C.has(a))return C.get(a);C.set(a,_)}for(const k in a)k!=="default"&&{}.hasOwnProperty.call(a,k)&&((D=(C=Object.defineProperty)&&Object.getOwnPropertyDescriptor(a,k))&&(D.get||D.set)?C(_,k,D):_[k]=a[k]);return _})(e,t)}function j(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);t&&(f=f.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),c.push.apply(c,f)}return c}function R(e){for(var t=1;t<arguments.length;t++){var c=arguments[t]!=null?arguments[t]:{};t%2?j(Object(c),!0).forEach(function(f){P(e,f,c[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):j(Object(c)).forEach(function(f){Object.defineProperty(e,f,Object.getOwnPropertyDescriptor(c,f))})}return e}function P(e,t,c){return(t=E(t))in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}function E(e){var t=N(e,"string");return typeof t=="symbol"?t:t+""}function N(e,t){if(typeof e!="object"||!e)return e;var c=e[Symbol.toPrimitive];if(c!==void 0){var f=c.call(e,t);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const I="react-grid-layout";let p=!1;try{p=/firefox/i.test(navigator.userAgent)}catch{}let l=class extends n.Component{constructor(){super(...arguments),P(this,"state",{activeDrag:null,layout:(0,i.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,i.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),P(this,"dragEnterCounter",0),P(this,"onDragStart",(t,c,f,a)=>{let{e:S,node:C}=a;const{layout:D}=this.state,_=(0,i.getLayoutItem)(D,t);if(!_)return;const k={w:_.w,h:_.h,x:_.x,y:_.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,i.cloneLayoutItem)(_),oldLayout:D,activeDrag:k}),this.props.onDragStart(D,_,_,null,S,C)}),P(this,"onDrag",(t,c,f,a)=>{let{e:S,node:C}=a;const{oldDragItem:D}=this.state;let{layout:_}=this.state;const{cols:k,allowOverlap:W,preventCollision:U}=this.props,J=(0,i.getLayoutItem)(_,t);if(!J)return;const re={w:J.w,h:J.h,x:J.x,y:J.y,placeholder:!0,i:t};_=(0,i.moveElement)(_,J,c,f,!0,U,(0,i.compactType)(this.props),k,W),this.props.onDrag(_,D,J,re,S,C),this.setState({layout:W?_:(0,i.compact)(_,(0,i.compactType)(this.props),k),activeDrag:re})}),P(this,"onDragStop",(t,c,f,a)=>{let{e:S,node:C}=a;if(!this.state.activeDrag)return;const{oldDragItem:D}=this.state;let{layout:_}=this.state;const{cols:k,preventCollision:W,allowOverlap:U}=this.props,J=(0,i.getLayoutItem)(_,t);if(!J)return;_=(0,i.moveElement)(_,J,c,f,!0,W,(0,i.compactType)(this.props),k,U);const V=U?_:(0,i.compact)(_,(0,i.compactType)(this.props),k);this.props.onDragStop(V,D,J,null,S,C);const{oldLayout:K}=this.state;this.setState({activeDrag:null,layout:V,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(V,K)}),P(this,"onResizeStart",(t,c,f,a)=>{let{e:S,node:C}=a;const{layout:D}=this.state,_=(0,i.getLayoutItem)(D,t);_&&(this.setState({oldResizeItem:(0,i.cloneLayoutItem)(_),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(D,_,_,null,S,C))}),P(this,"onResize",(t,c,f,a)=>{let{e:S,node:C,size:D,handle:_}=a;const{oldResizeItem:k}=this.state,{layout:W}=this.state,{cols:U,preventCollision:J,allowOverlap:re}=this.props;let V=!1,K,Q,te;const[he,ge]=(0,i.withLayoutItem)(W,t,L=>{let le;return Q=L.x,te=L.y,["sw","w","nw","n","ne"].indexOf(_)!==-1&&(["sw","nw","w"].indexOf(_)!==-1&&(Q=L.x+(L.w-c),c=L.x!==Q&&Q<0?L.w:c,Q=Q<0?0:Q),["ne","n","nw"].indexOf(_)!==-1&&(te=L.y+(L.h-f),f=L.y!==te&&te<0?L.h:f,te=te<0?0:te),V=!0),J&&!re&&(le=(0,i.getAllCollisions)(W,R(R({},L),{},{w:c,h:f,x:Q,y:te})).filter(ce=>ce.i!==L.i).length>0,le&&(te=L.y,f=L.h,Q=L.x,c=L.w,V=!1)),L.w=c,L.h=f,L});if(!ge)return;K=he,V&&(K=(0,i.moveElement)(he,ge,Q,te,!0,this.props.preventCollision,(0,i.compactType)(this.props),U,re));const M={w:ge.w,h:ge.h,x:ge.x,y:ge.y,static:!0,i:t};this.props.onResize(K,k,ge,M,S,C),this.setState({layout:re?K:(0,i.compact)(K,(0,i.compactType)(this.props),U),activeDrag:M})}),P(this,"onResizeStop",(t,c,f,a)=>{let{e:S,node:C}=a;const{layout:D,oldResizeItem:_}=this.state,{cols:k,allowOverlap:W}=this.props,U=(0,i.getLayoutItem)(D,t),J=W?D:(0,i.compact)(D,(0,i.compactType)(this.props),k);this.props.onResizeStop(J,_,U,null,S,C);const{oldLayout:re}=this.state;this.setState({activeDrag:null,layout:J,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(J,re)}),P(this,"onDragOver",t=>{var c;if(t.preventDefault(),t.stopPropagation(),p&&!((c=t.nativeEvent.target)!==null&&c!==void 0&&c.classList.contains(I)))return!1;const{droppingItem:f,onDropDragOver:a,margin:S,cols:C,rowHeight:D,maxRows:_,width:k,containerPadding:W,transformScale:U}=this.props,J=a==null?void 0:a(t);if(J===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const re=R(R({},f),J),{layout:V}=this.state,K=t.currentTarget.getBoundingClientRect(),Q=t.clientX-K.left,te=t.clientY-K.top,he={left:Q/U,top:te/U,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ge,top:M}=this.state.droppingPosition;(ge!=Q||M!=te)&&this.setState({droppingPosition:he})}}else{const ge={cols:C,margin:S,maxRows:_,rowHeight:D,containerWidth:k,containerPadding:W||S},M=(0,h.calcXY)(ge,te,Q,re.w,re.h);this.setState({droppingDOMNode:n.createElement("div",{key:re.i}),droppingPosition:he,layout:[...V,R(R({},re),{},{x:M.x,y:M.y,static:!1,isDraggable:!0})]})}}),P(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:c}=this.props,{layout:f}=this.state,a=(0,i.compact)(f.filter(S=>S.i!==t.i),(0,i.compactType)(this.props),c,this.props.allowOverlap);this.setState({layout:a,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),P(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),P(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),P(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();const{droppingItem:c}=this.props,{layout:f}=this.state,a=f.find(S=>S.i===c.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,a,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,c){let f;return c.activeDrag?null:(!(0,o.deepEqual)(t.layout,c.propsLayout)||t.compactType!==c.compactType?f=t.layout:(0,i.childrenEqual)(t.children,c.children)||(f=c.layout),f?{layout:(0,i.synchronizeLayoutWithChildren)(f,t.children,t.cols,(0,i.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,c){return this.props.children!==t.children||!(0,i.fastRGLPropsEqual)(this.props,t,o.deepEqual)||this.state.activeDrag!==c.activeDrag||this.state.mounted!==c.mounted||this.state.droppingPosition!==c.droppingPosition}componentDidUpdate(t,c){if(!this.state.activeDrag){const f=this.state.layout,a=c.layout;this.onLayoutMaybeChanged(f,a)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,i.bottom)(this.state.layout),c=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+c*2+"px"}onLayoutMaybeChanged(t,c){c||(c=this.state.layout),(0,o.deepEqual)(c,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:c,cols:f,margin:a,containerPadding:S,rowHeight:C,maxRows:D,useCSSTransforms:_,transformScale:k}=this.props;return n.createElement(u.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder ".concat(this.state.resizing?"placeholder-resizing":""),containerWidth:c,cols:f,margin:a,containerPadding:S||a,maxRows:D,rowHeight:C,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:_,transformScale:k},n.createElement("div",null))}processGridItem(t,c){if(!t||!t.key)return;const f=(0,i.getLayoutItem)(this.state.layout,String(t.key));if(!f)return null;const{width:a,cols:S,margin:C,containerPadding:D,rowHeight:_,maxRows:k,isDraggable:W,isResizable:U,isBounded:J,useCSSTransforms:re,transformScale:V,draggableCancel:K,draggableHandle:Q,resizeHandles:te,resizeHandle:he}=this.props,{mounted:ge,droppingPosition:M}=this.state,L=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&W,le=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&U,ie=f.resizeHandles||te,ce=L&&J&&f.isBounded!==!1;return n.createElement(u.default,{containerWidth:a,cols:S,margin:C,containerPadding:D||C,maxRows:k,rowHeight:_,cancel:K,handle:Q,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:L,isResizable:le,isBounded:ce,useCSSTransforms:re&&ge,usePercentages:!ge,transformScale:V,w:f.w,h:f.h,x:f.x,y:f.y,i:f.i,minH:f.minH,minW:f.minW,maxH:f.maxH,maxW:f.maxW,static:f.static,droppingPosition:c?M:void 0,resizeHandles:ie,resizeHandle:he},t)}render(){const{className:t,style:c,isDroppable:f,innerRef:a}=this.props,S=(0,s.default)(I,t),C=R({height:this.containerHeight()},c);return n.createElement("div",{ref:a,className:S,style:C,onDrop:f?this.onDrop:i.noop,onDragLeave:f?this.onDragLeave:i.noop,onDragEnter:f?this.onDragEnter:i.noop,onDragOver:f?this.onDragOver:i.noop},n.Children.map(this.props.children,D=>this.processGridItem(D)),f&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return lt.default=l,P(l,"displayName","ReactGridLayout"),P(l,"propTypes",b.default),P(l,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:i.noop,onDragStart:i.noop,onDrag:i.noop,onDragStop:i.noop,onResizeStart:i.noop,onResize:i.noop,onResizeStop:i.noop,onDrop:i.noop,onDropDragOver:i.noop}),lt}var yt={},Xe={},Br;function Fr(){if(Br)return Xe;Br=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.findOrGenerateResponsiveLayout=i,Xe.getBreakpointFromWidth=o,Xe.getColsFromBreakpoint=s,Xe.sortBreakpoints=h;var n=Qe();function o(u,b){const O=h(u);let m=O[0];for(let j=1,R=O.length;j<R;j++){const P=O[j];b>u[P]&&(m=P)}return m}function s(u,b){if(!b[u])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+u+" is missing!");return b[u]}function i(u,b,O,m,j,R){if(u[O])return(0,n.cloneLayout)(u[O]);let P=u[m];const E=h(b),N=E.slice(E.indexOf(O));for(let I=0,p=N.length;I<p;I++){const l=N[I];if(u[l]){P=u[l];break}}return P=(0,n.cloneLayout)(P||[]),(0,n.compact)((0,n.correctBounds)(P,{cols:j}),R,j)}function h(u){return Object.keys(u).sort(function(O,m){return u[O]-u[m]})}return Xe}var Gr;function Nn(){if(Gr)return yt;Gr=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.default=void 0;var n=m(oe),o=O(Ue()),s=Nt(),i=Qe(),h=Fr(),u=O(qr());const b=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function O(f){return f&&f.__esModule?f:{default:f}}function m(f,a){if(typeof WeakMap=="function")var S=new WeakMap,C=new WeakMap;return(m=function(D,_){if(!_&&D&&D.__esModule)return D;var k,W,U={__proto__:null,default:D};if(D===null||typeof D!="object"&&typeof D!="function")return U;if(k=_?C:S){if(k.has(D))return k.get(D);k.set(D,U)}for(const J in D)J!=="default"&&{}.hasOwnProperty.call(D,J)&&((W=(k=Object.defineProperty)&&Object.getOwnPropertyDescriptor(D,J))&&(W.get||W.set)?k(U,J,W):U[J]=D[J]);return U})(f,a)}function j(){return j=Object.assign?Object.assign.bind():function(f){for(var a=1;a<arguments.length;a++){var S=arguments[a];for(var C in S)({}).hasOwnProperty.call(S,C)&&(f[C]=S[C])}return f},j.apply(null,arguments)}function R(f,a){if(f==null)return{};var S,C,D=P(f,a);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(f);for(C=0;C<_.length;C++)S=_[C],a.indexOf(S)===-1&&{}.propertyIsEnumerable.call(f,S)&&(D[S]=f[S])}return D}function P(f,a){if(f==null)return{};var S={};for(var C in f)if({}.hasOwnProperty.call(f,C)){if(a.indexOf(C)!==-1)continue;S[C]=f[C]}return S}function E(f,a){var S=Object.keys(f);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(f);a&&(C=C.filter(function(D){return Object.getOwnPropertyDescriptor(f,D).enumerable})),S.push.apply(S,C)}return S}function N(f){for(var a=1;a<arguments.length;a++){var S=arguments[a]!=null?arguments[a]:{};a%2?E(Object(S),!0).forEach(function(C){I(f,C,S[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(S)):E(Object(S)).forEach(function(C){Object.defineProperty(f,C,Object.getOwnPropertyDescriptor(S,C))})}return f}function I(f,a,S){return(a=p(a))in f?Object.defineProperty(f,a,{value:S,enumerable:!0,configurable:!0,writable:!0}):f[a]=S,f}function p(f){var a=l(f,"string");return typeof a=="symbol"?a:a+""}function l(f,a){if(typeof f!="object"||!f)return f;var S=f[Symbol.toPrimitive];if(S!==void 0){var C=S.call(f,a);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(f)}const e=f=>Object.prototype.toString.call(f);function t(f,a){return f==null?null:Array.isArray(f)?f:f[a]}let c=class extends n.Component{constructor(){super(...arguments),I(this,"state",this.generateInitialState()),I(this,"onLayoutChange",a=>{this.props.onLayoutChange(a,N(N({},this.props.layouts),{},{[this.state.breakpoint]:a}))})}generateInitialState(){const{width:a,breakpoints:S,layouts:C,cols:D}=this.props,_=(0,h.getBreakpointFromWidth)(S,a),k=(0,h.getColsFromBreakpoint)(_,D),W=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,h.findOrGenerateResponsiveLayout)(C,S,_,_,k,W),breakpoint:_,cols:k}}static getDerivedStateFromProps(a,S){if(!(0,s.deepEqual)(a.layouts,S.layouts)){const{breakpoint:C,cols:D}=S;return{layout:(0,h.findOrGenerateResponsiveLayout)(a.layouts,a.breakpoints,C,C,D,a.compactType),layouts:a.layouts}}return null}componentDidUpdate(a){(this.props.width!=a.width||this.props.breakpoint!==a.breakpoint||!(0,s.deepEqual)(this.props.breakpoints,a.breakpoints)||!(0,s.deepEqual)(this.props.cols,a.cols))&&this.onWidthChange(a)}onWidthChange(a){const{breakpoints:S,cols:C,layouts:D,compactType:_}=this.props,k=this.props.breakpoint||(0,h.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),W=this.state.breakpoint,U=(0,h.getColsFromBreakpoint)(k,C),J=N({},D);if(W!==k||a.breakpoints!==S||a.cols!==C){W in J||(J[W]=(0,i.cloneLayout)(this.state.layout));let K=(0,h.findOrGenerateResponsiveLayout)(J,S,k,W,U,_);K=(0,i.synchronizeLayoutWithChildren)(K,this.props.children,U,_,this.props.allowOverlap),J[k]=K,this.props.onBreakpointChange(k,U),this.props.onLayoutChange(K,J),this.setState({breakpoint:k,layout:K,cols:U})}const re=t(this.props.margin,k),V=t(this.props.containerPadding,k);this.props.onWidthChange(this.props.width,re,U,V)}render(){const a=this.props,{breakpoint:S,breakpoints:C,cols:D,layouts:_,margin:k,containerPadding:W,onBreakpointChange:U,onLayoutChange:J,onWidthChange:re}=a,V=R(a,b);return n.createElement(u.default,j({},V,{margin:t(k,this.state.breakpoint),containerPadding:t(W,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return yt.default=c,I(c,"propTypes",{breakpoint:o.default.string,breakpoints:o.default.object,allowOverlap:o.default.bool,cols:o.default.object,margin:o.default.oneOfType([o.default.array,o.default.object]),containerPadding:o.default.oneOfType([o.default.array,o.default.object]),layouts(f,a){if(e(f[a])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+e(f[a]));Object.keys(f[a]).forEach(S=>{if(!(S in f.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,i.validateLayout)(f.layouts[S],"layouts."+S)})},width:o.default.number.isRequired,onBreakpointChange:o.default.func,onLayoutChange:o.default.func,onWidthChange:o.default.func}),I(c,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:i.noop,onLayoutChange:i.noop,onWidthChange:i.noop}),yt}var Dt={},Yr=(function(){if(typeof Map<"u")return Map;function n(o,s){var i=-1;return o.some(function(h,u){return h[0]===s?(i=u,!0):!1}),i}return(function(){function o(){this.__entries__=[]}return Object.defineProperty(o.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),o.prototype.get=function(s){var i=n(this.__entries__,s),h=this.__entries__[i];return h&&h[1]},o.prototype.set=function(s,i){var h=n(this.__entries__,s);~h?this.__entries__[h][1]=i:this.__entries__.push([s,i])},o.prototype.delete=function(s){var i=this.__entries__,h=n(i,s);~h&&i.splice(h,1)},o.prototype.has=function(s){return!!~n(this.__entries__,s)},o.prototype.clear=function(){this.__entries__.splice(0)},o.prototype.forEach=function(s,i){i===void 0&&(i=null);for(var h=0,u=this.__entries__;h<u.length;h++){var b=u[h];s.call(i,b[1],b[0])}},o})()})(),Jt=typeof window<"u"&&typeof document<"u"&&window.document===document,Tt=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),Wn=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Tt):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}})(),Hn=2;function qn(n,o){var s=!1,i=!1,h=0;function u(){s&&(s=!1,n()),i&&O()}function b(){Wn(u)}function O(){var m=Date.now();if(s){if(m-h<Hn)return;i=!0}else s=!0,i=!1,setTimeout(b,o);h=m}return O}var Bn=20,Fn=["top","right","bottom","left","width","height","size","weight"],Gn=typeof MutationObserver<"u",Yn=(function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=qn(this.refresh.bind(this),Bn)}return n.prototype.addObserver=function(o){~this.observers_.indexOf(o)||this.observers_.push(o),this.connected_||this.connect_()},n.prototype.removeObserver=function(o){var s=this.observers_,i=s.indexOf(o);~i&&s.splice(i,1),!s.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var o=this.updateObservers_();o&&this.refresh()},n.prototype.updateObservers_=function(){var o=this.observers_.filter(function(s){return s.gatherActive(),s.hasActive()});return o.forEach(function(s){return s.broadcastActive()}),o.length>0},n.prototype.connect_=function(){!Jt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Gn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!Jt||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(o){var s=o.propertyName,i=s===void 0?"":s,h=Fn.some(function(u){return!!~i.indexOf(u)});h&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n})(),Vr=(function(n,o){for(var s=0,i=Object.keys(o);s<i.length;s++){var h=i[s];Object.defineProperty(n,h,{value:o[h],enumerable:!1,writable:!1,configurable:!0})}return n}),Ze=(function(n){var o=n&&n.ownerDocument&&n.ownerDocument.defaultView;return o||Tt}),Ur=kt(0,0,0,0);function zt(n){return parseFloat(n)||0}function $r(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return o.reduce(function(i,h){var u=n["border-"+h+"-width"];return i+zt(u)},0)}function Vn(n){for(var o=["top","right","bottom","left"],s={},i=0,h=o;i<h.length;i++){var u=h[i],b=n["padding-"+u];s[u]=zt(b)}return s}function Un(n){var o=n.getBBox();return kt(0,0,o.width,o.height)}function $n(n){var o=n.clientWidth,s=n.clientHeight;if(!o&&!s)return Ur;var i=Ze(n).getComputedStyle(n),h=Vn(i),u=h.left+h.right,b=h.top+h.bottom,O=zt(i.width),m=zt(i.height);if(i.boxSizing==="border-box"&&(Math.round(O+u)!==o&&(O-=$r(i,"left","right")+u),Math.round(m+b)!==s&&(m-=$r(i,"top","bottom")+b)),!Jn(n)){var j=Math.round(O+u)-o,R=Math.round(m+b)-s;Math.abs(j)!==1&&(O-=j),Math.abs(R)!==1&&(m-=R)}return kt(h.left,h.top,O,m)}var Xn=(function(){return typeof SVGGraphicsElement<"u"?function(n){return n instanceof Ze(n).SVGGraphicsElement}:function(n){return n instanceof Ze(n).SVGElement&&typeof n.getBBox=="function"}})();function Jn(n){return n===Ze(n).document.documentElement}function Kn(n){return Jt?Xn(n)?Un(n):$n(n):Ur}function Qn(n){var o=n.x,s=n.y,i=n.width,h=n.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,b=Object.create(u.prototype);return Vr(b,{x:o,y:s,width:i,height:h,top:s,right:o+i,bottom:h+s,left:o}),b}function kt(n,o,s,i){return{x:n,y:o,width:s,height:i}}var Zn=(function(){function n(o){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=kt(0,0,0,0),this.target=o}return n.prototype.isActive=function(){var o=Kn(this.target);return this.contentRect_=o,o.width!==this.broadcastWidth||o.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var o=this.contentRect_;return this.broadcastWidth=o.width,this.broadcastHeight=o.height,o},n})(),eo=(function(){function n(o,s){var i=Qn(s);Vr(this,{target:o,contentRect:i})}return n})(),to=(function(){function n(o,s,i){if(this.activeObservations_=[],this.observations_=new Yr,typeof o!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=o,this.controller_=s,this.callbackCtx_=i}return n.prototype.observe=function(o){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(o instanceof Ze(o).Element))throw new TypeError('parameter 1 is not of type "Element".');var s=this.observations_;s.has(o)||(s.set(o,new Zn(o)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(o){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(o instanceof Ze(o).Element))throw new TypeError('parameter 1 is not of type "Element".');var s=this.observations_;s.has(o)&&(s.delete(o),s.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var o=this;this.clearActive(),this.observations_.forEach(function(s){s.isActive()&&o.activeObservations_.push(s)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var o=this.callbackCtx_,s=this.activeObservations_.map(function(i){return new eo(i.target,i.broadcastRect())});this.callback_.call(o,s,o),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n})(),Xr=typeof WeakMap<"u"?new WeakMap:new Yr,Jr=(function(){function n(o){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var s=Yn.getInstance(),i=new to(o,s,this);Xr.set(this,i)}return n})();["observe","unobserve","disconnect"].forEach(function(n){Jr.prototype[n]=function(){var o;return(o=Xr.get(this))[n].apply(o,arguments)}});var ro=(function(){return typeof Tt.ResizeObserver<"u"?Tt.ResizeObserver:Jr})();const no=dn(Object.freeze(Object.defineProperty({__proto__:null,default:ro},Symbol.toStringTag,{value:"Module"})));var Kr;function oo(){if(Kr)return Dt;Kr=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=I;var n=b(oe),o=u(Ue()),s=u(no),i=u(Ct());const h=["measureBeforeMount"];function u(p){return p&&p.__esModule?p:{default:p}}function b(p,l){if(typeof WeakMap=="function")var e=new WeakMap,t=new WeakMap;return(b=function(c,f){if(!f&&c&&c.__esModule)return c;var a,S,C={__proto__:null,default:c};if(c===null||typeof c!="object"&&typeof c!="function")return C;if(a=f?t:e){if(a.has(c))return a.get(c);a.set(c,C)}for(const D in c)D!=="default"&&{}.hasOwnProperty.call(c,D)&&((S=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(c,D))&&(S.get||S.set)?a(C,D,S):C[D]=c[D]);return C})(p,l)}function O(){return O=Object.assign?Object.assign.bind():function(p){for(var l=1;l<arguments.length;l++){var e=arguments[l];for(var t in e)({}).hasOwnProperty.call(e,t)&&(p[t]=e[t])}return p},O.apply(null,arguments)}function m(p,l){if(p==null)return{};var e,t,c=j(p,l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(p);for(t=0;t<f.length;t++)e=f[t],l.indexOf(e)===-1&&{}.propertyIsEnumerable.call(p,e)&&(c[e]=p[e])}return c}function j(p,l){if(p==null)return{};var e={};for(var t in p)if({}.hasOwnProperty.call(p,t)){if(l.indexOf(t)!==-1)continue;e[t]=p[t]}return e}function R(p,l,e){return(l=P(l))in p?Object.defineProperty(p,l,{value:e,enumerable:!0,configurable:!0,writable:!0}):p[l]=e,p}function P(p){var l=E(p,"string");return typeof l=="symbol"?l:l+""}function E(p,l){if(typeof p!="object"||!p)return p;var e=p[Symbol.toPrimitive];if(e!==void 0){var t=e.call(p,l);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(p)}const N="react-grid-layout";function I(p){var l;return l=class extends n.Component{constructor(){super(...arguments),R(this,"state",{width:1280}),R(this,"elementRef",n.createRef()),R(this,"mounted",!1),R(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new s.default(c=>{if(this.elementRef.current instanceof HTMLElement){const a=c[0].contentRect.width;this.setState({width:a})}});const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.observe(t)}componentWillUnmount(){this.mounted=!1;const t=this.elementRef.current;t instanceof HTMLElement&&this.resizeObserver.unobserve(t),this.resizeObserver.disconnect()}render(){const t=this.props,{measureBeforeMount:c}=t,f=m(t,h);return c&&!this.mounted?n.createElement("div",{className:(0,i.default)(this.props.className,N),style:this.props.style,ref:this.elementRef}):n.createElement(p,O({innerRef:this.elementRef},f,this.state))}},R(l,"defaultProps",{measureBeforeMount:!1}),R(l,"propTypes",{measureBeforeMount:o.default.bool}),l}return Dt}var Qr;function io(){return Qr||(Qr=1,(function(n){n.exports=qr().default,n.exports.utils=Qe(),n.exports.calculateUtils=Ht(),n.exports.Responsive=Nn().default,n.exports.Responsive.utils=Fr(),n.exports.WidthProvider=oo().default})(Lt)),Lt.exports}var so=io();const ao=un(so);function Zr(n){const o=[];o.push(1,1,0,1,1,0,1,1);for(let s=0;s<n.length;s++){const h=(n.charCodeAt(s)%103).toString(2).padStart(7,"0");for(const u of h)o.push(u==="1"?1:0)}return o.push(1,1,0,0,0,1,1,0,0,0,1,1),o}const Kt=({value:n,format:o})=>{const s=oe.useMemo(()=>Zr(n),[n,o]);if(!n)return r.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置条形码值"});const i=2,h=44,u=s.length*i;return r.jsxs("div",{style:{textAlign:"center",overflow:"hidden",maxWidth:"100%"},children:[r.jsx("canvas",{ref:b=>{if(!b)return;const O=b.getContext("2d");O&&(b.width=u,b.height=h,O.clearRect(0,0,u,h),s.forEach((m,j)=>{O.fillStyle=m===1?"#000":"#fff",O.fillRect(j*i,0,i,h)}))},style:{width:"100%",maxWidth:u,height:h}}),r.jsx("div",{style:{fontSize:10,marginTop:1,letterSpacing:1},children:n})]})},Qt=({value:n,errorLevel:o="M",color:s="#000000",backgroundColor:i="#ffffff"})=>n?r.jsx(T.QRCode,{value:n,type:"svg",bordered:!1,errorLevel:o,color:s,bgColor:i,style:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%"}}):r.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置二维码内容"}),lo=ao,en=oe.memo(({comp:n,selected:o,isPreview:s=!1,dataSources:i=[]})=>{const h={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",outline:s?"none":o?"2px solid #1677ff":"1px dashed #d9d9d9",outlineOffset:-1},u=b=>Ke(n,b,i);switch(n.type){case"text":return r.jsx("div",{style:{...h,fontSize:n.props.fontSize||14,fontWeight:n.props.fontWeight||"normal",fontStyle:n.props.fontStyle||"normal",textAlign:n.props.textAlign||"left",color:n.props.color||"#000",backgroundColor:n.props.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:u("content")||""});case"image":const b=u("src")||n.props.src;return r.jsx("div",{style:h,children:b?r.jsx("img",{src:b,style:{width:"100%",height:"100%",objectFit:n.props.fit||"contain"},alt:""}):r.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#bbb",fontSize:12},children:"请在属性中设置图片地址"})});case"table":return r.jsx(co,{comp:n,style:h,dataSources:i});case"barcode":const O=u("value")||n.props.value||"123456";return r.jsx("div",{style:{...h,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:r.jsx(Kt,{value:O,format:n.props.format||"CODE128"})});case"qrcode":const m=u("value")||n.props.value||"https://example.com";return r.jsx("div",{style:{...h,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:r.jsx(Qt,{value:m,errorLevel:n.props.errorLevel||"M",color:n.props.color||"#000000",backgroundColor:n.props.backgroundColor||"#ffffff"})});case"line":return r.jsx("div",{style:{...h,display:"flex",alignItems:"center",border:"none",outline:o?"2px solid #1677ff":"1px dashed transparent"},children:r.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${n.props.thickness||1}px ${n.props.style||"solid"} ${n.props.color||"#000"}`,margin:0}})});default:return r.jsx("div",{style:h,children:n.type})}}),co=({comp:n,style:o,dataSources:s=[]})=>{const i=n.props.borderWidth||1,h=n.props.borderColor||"#000",u=n.tableColumns||[],b=n.props.tableDataSourceId,O=b?s.find(P=>P.id===b):null,m=O?jt(O):null;if(m&&m.length>0)return r.jsxs("table",{style:{...o,borderCollapse:"collapse",width:"100%",height:"100%"},children:[u.length>0&&r.jsx("thead",{children:r.jsx("tr",{style:{backgroundColor:"#f5f5f5"},children:u.map((P,E)=>r.jsx("th",{style:{border:`${i}px solid ${h}`,padding:4,fontSize:12,fontWeight:"bold",textAlign:"center"},children:P.title},E))})}),r.jsx("tbody",{children:m.map((P,E)=>r.jsx("tr",{children:u.map((N,I)=>r.jsx("td",{style:{border:`${i}px solid ${h}`,padding:4,fontSize:12,textAlign:"center"},children:N.fieldPath?P[N.fieldPath]:""},I))},E))})]});const j=n.props.rows||3,R=Math.max(n.props.cols||3,u.length||3);return r.jsx("table",{style:{...o,borderCollapse:"collapse",width:"100%",height:"100%"},children:r.jsx("tbody",{children:Array.from({length:j}).map((P,E)=>r.jsx("tr",{children:Array.from({length:R}).map((N,I)=>r.jsx("td",{style:{border:`${i}px solid ${h}`,padding:2,fontSize:12,textAlign:"center"},children:" "},I))},E))})})},tn=({isPreview:n=!1})=>{const o=fe(e=>e.components),s=fe(e=>e.selectedId),i=fe(e=>e.pageSettings),h=fe(e=>e.selectComponent);fe(e=>e.updateComponent);const u=fe(e=>e.setComponents),b=fe(e=>e.addComponent),O=fe(e=>e.gridSettings),m=fe(e=>e.dataSources),j=oe.useMemo(()=>{const e=bt[i.paperSize];if(!e)return{width:i.customWidth*Pe,height:i.customHeight*Pe};const t=e.width*Pe,c=e.height*Pe;return i.orientation==="landscape"?{width:c,height:t}:{width:t,height:c}},[i]),R=oe.useMemo(()=>({top:i.marginTop*Pe,right:i.marginRight*Pe,bottom:i.marginBottom*Pe,left:i.marginLeft*Pe}),[i]),P=j.width-R.left-R.right,E=j.height-R.top-R.bottom,N=oe.useMemo(()=>o.map(e=>({i:e.id,x:e.x,y:e.y,w:e.w,h:e.h})),[o]),I=oe.useCallback(e=>{const t=o.map((c,f)=>{const a=e[f];return a?{...c,x:a.x,y:a.y,w:a.w,h:a.h}:c});u(t)},[o,u]),p=oe.useCallback((e,t,c)=>{var C,D;const f=c,a=(C=f.dataTransfer)==null?void 0:C.getData("componentType");if(!a)return;const S=(D=c.target.closest(".react-grid-layout"))==null?void 0:D.getBoundingClientRect();if(S){const _=Math.floor((f.clientX-S.left)/(P/O.cols)),k=Math.floor((f.clientY-S.top)/(P/O.cols));b(a,Math.max(0,_),Math.max(0,k))}else b(a)},[b,P,O.cols]),l=oe.useCallback(e=>{h(e===s?null:e)},[h,s]);return r.jsx("div",{style:{flex:1,overflow:"auto",background:"#e8e8e8",display:"flex",justifyContent:"center",padding:"24px 0"},children:r.jsxs("div",{id:"print-paper",style:{width:j.width,height:j.height,background:"#fff",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",position:"relative",flexShrink:0},children:[i.showHeader&&r.jsx("div",{style:{position:"absolute",top:0,left:R.left,right:R.right,height:R.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,color:"#999",borderBottom:"1px dashed #ddd",overflow:"hidden"},children:i.headerContent}),i.showFooter&&r.jsxs("div",{style:{position:"absolute",bottom:0,left:R.left,right:R.right,height:R.bottom,display:"flex",alignItems:"center",justifyContent:i.showPageNumber?"space-between":"center",fontSize:12,color:"#999",borderTop:"1px dashed #ddd",overflow:"hidden",padding:"0 8px"},children:[r.jsx("span",{children:i.footerContent}),i.showPageNumber&&r.jsx("span",{children:i.pageNumberFormat.replace("{page}","1")})]}),r.jsx("div",{style:{position:"absolute",top:R.top,left:R.left,width:P,height:E},children:n?r.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:o.map(e=>{const t=P/O.cols,c=P/O.cols,f={position:"absolute",left:e.x*t,top:e.y*c,width:e.w*t,height:e.h*c};return r.jsx("div",{style:f,children:r.jsx(en,{comp:e,selected:!1,isPreview:!0,dataSources:m})},e.id)})}):r.jsx(lo,{className:"canvas-grid",layout:N,cols:O.cols,rowHeight:P/O.cols,width:P,margin:[0,0],containerPadding:[0,0],onLayoutChange:I,onDrop:p,isDroppable:!0,isResizable:!0,isDraggable:!0,compactType:null,preventCollision:!0,draggableHandle:".grid-item-drag-handle",style:{minHeight:E},children:o.map(e=>r.jsx("div",{className:"grid-item-drag-handle",onClick:()=>l(e.id),style:{cursor:"move"},children:r.jsx(en,{comp:e,selected:e.id===s,dataSources:m})},e.id))})})]})})},{Text:ke,Title:_o}=T.Typography,{TextArea:uo}=T.Input,fo=()=>{const n=fe(e=>e.components),o=fe(e=>e.selectedId),s=fe(e=>e.dataSources),i=fe(e=>e.updateComponent),h=fe(e=>e.updateComponentTableColumns),u=oe.useMemo(()=>n.find(e=>e.id===o)||null,[n,o]),[b,O]=oe.useState([]),m=oe.useMemo(()=>[{label:"无(使用静态值)",value:""},...s.map(e=>({label:e.name,value:e.id,type:e.type}))],[s]),j=oe.useCallback((e,t)=>{o&&i(o,{props:{...u==null?void 0:u.props,[e]:t}})},[o,u,i]),R=oe.useCallback((e,t,c,f)=>{if(!o)return;let a=f;t&&c&&(a=f);const S=`${e}Binding`;i(o,{props:{...u==null?void 0:u.props,[e]:a,[S]:{dataSourceId:t,fieldPath:c,staticValue:f}}})},[o,u,i]),P=oe.useCallback(e=>{const t=u==null?void 0:u.props[`${e}Binding`],c=String((u==null?void 0:u.props[e])||"");return t?{field:e,dataSourceId:t.dataSourceId||null,fieldPath:t.fieldPath||"",staticValue:t.staticValue??c}:{field:e,dataSourceId:null,fieldPath:"",staticValue:c}},[u]);if(!u)return r.jsx(T.Card,{title:"属性面板",size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16}},children:r.jsx(T.Empty,{description:"请选择画布中的组件",image:T.Empty.PRESENTED_IMAGE_SIMPLE})});const E=ar[u.type]||u.type,N=r.jsxs(r.Fragment,{children:[r.jsx(ke,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"位置和大小"}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"X"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:u.x,onChange:e=>i(o,{x:e??0})})]}),r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"Y"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:u.y,onChange:e=>i(o,{y:e??0})})]}),r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"宽度"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:u.w,min:1,onChange:e=>i(o,{w:e??1})})]}),r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"高度"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:u.h,min:1,onChange:e=>i(o,{h:e??1})})]})]})]}),I=({field:e,label:t,placeholder:c,isTextarea:f=!1})=>{const a=P(e),S=s.find(W=>W.id===a.dataSourceId),C=S?St(S):null,D=C?Object.keys(C):[],[_,k]=oe.useState(a.staticValue);return oe.useEffect(()=>{k(a.staticValue)},[a.staticValue,a.dataSourceId]),r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12,display:"block",marginBottom:4},children:t}),r.jsx("div",{style:{marginBottom:4},children:r.jsx(T.Select,{size:"small",style:{width:"100%"},placeholder:"选择数据源",value:a.dataSourceId||"",onChange:W=>{R(e,W||null,W&&a.fieldPath||"",a.staticValue)},options:m})}),a.dataSourceId&&r.jsx("div",{style:{marginBottom:4},children:r.jsx(T.Select,{size:"small",style:{width:"100%"},placeholder:"选择字段",value:a.fieldPath,onChange:W=>{R(e,a.dataSourceId,W||"",a.staticValue)},options:[{label:"请选择字段",value:""},...D.map(W=>({label:W,value:W}))]})}),a.dataSourceId?r.jsxs("div",{style:{padding:6,background:"#f0f5ff",border:"1px solid #adc6ff",borderRadius:4,fontSize:12},children:[r.jsx(Oe.DatabaseOutlined,{style:{marginRight:4,color:"#1890ff"}}),r.jsx("span",{style:{fontWeight:500},children:"数据绑定已启用"}),S&&a.fieldPath&&r.jsxs("span",{style:{marginLeft:8},children:[r.jsx(T.Tag,{color:"blue",children:S.name}),r.jsx(T.Tag,{color:"green",children:a.fieldPath})]})]}):f?r.jsx(uo,{rows:3,placeholder:c,value:_,onChange:W=>k(W.target.value),onBlur:()=>{R(e,null,"",_)}}):r.jsx(T.Input,{placeholder:c,value:_,onChange:W=>k(W.target.value),onBlur:()=>{R(e,null,"",_)}})]})},p=()=>{const e=u.tableColumns||[],t=s.filter(V=>V.type==="array"),c=u.props.tableDataSourceId||"",f=t.find(V=>V.id===c),a=b.length>0?b:e,[S,C]=oe.useState({}),D=()=>{h(o,a)},_=()=>{const V=[...a,{title:`列${a.length+1}`}];O(V)},k=V=>{const K=a.filter((Q,te)=>te!==V);O(K)},W=(V,K,Q)=>{const te=[...a];te[V]={...te[V],[K]:Q},O(te)};let U=[];if(f){const V=at(f.data);Array.isArray(V)&&V.length>0&&typeof V[0]=="object"&&(U=Object.keys(V[0]))}const J=[{title:"列标题",dataIndex:"title",width:100,render:(V,K)=>{const Q=K.key in S?S[K.key]:K.title;return r.jsx(T.Input,{size:"small",value:Q,placeholder:"列标题",onChange:te=>{C({...S,[K.key]:te.target.value})},onBlur:()=>{if(K.key in S){W(Number(K.key),"title",S[K.key]);const te={...S};delete te[K.key],C(te),D()}}})}},{title:"绑定字段",dataIndex:"fieldPath",width:120,render:(V,K)=>r.jsx(T.Select,{size:"small",style:{width:"100%"},value:K.fieldPath||"",placeholder:f?"绑定字段":"选择数据源先",disabled:!f,onChange:Q=>{W(Number(K.key),"fieldPath",Q||""),D()},options:[{label:"无绑定",value:""},...U.map(Q=>({label:Q,value:Q}))]})},{title:"操作",width:60,render:(V,K)=>r.jsx(T.Popconfirm,{title:"确定要删除吗?",onConfirm:()=>{k(Number(K.key)),D()},okText:"确定",cancelText:"取消",children:r.jsx(T.Button,{type:"text",danger:!0,size:"small",icon:r.jsx(Oe.DeleteOutlined,{})})})}],re=a.map((V,K)=>({...V,key:String(K)}));return r.jsxs("div",{children:[r.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:r.jsx(ke,{style:{fontSize:12},children:"表格数据源"})}),r.jsx(T.Select,{size:"small",style:{width:"100%",marginBottom:8},placeholder:"选择数组类型数据源",value:c,onChange:V=>j("tableDataSourceId",V||""),options:[{label:"无(仅静态展示)",value:""},...t.map(V=>({label:V.name,value:V.id}))]}),r.jsx(T.Divider,{}),r.jsxs(T.Space,{style:{marginBottom:8},children:[r.jsx(ke,{style:{fontSize:12},children:"列配置"}),r.jsx(T.Button,{size:"small",type:"dashed",icon:r.jsx(Oe.PlusOutlined,{}),onClick:_}),r.jsx(T.Button,{size:"small",type:"primary",onClick:D,icon:r.jsx(Oe.SaveOutlined,{})})]}),r.jsx(T.Table,{dataSource:re,columns:J,pagination:!1,size:"small",bordered:!0,rowKey:"key"})]})},l=()=>{switch(u.type){case"text":return r.jsxs(r.Fragment,{children:[r.jsx(I,{field:"content",label:"内容",placeholder:"请输入文本内容",isTextarea:!0}),r.jsx(T.Divider,{style:{margin:"4px 0"}}),r.jsx(ke,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"文字样式"}),r.jsxs(T.Space,{style:{width:"100%"},direction:"vertical",size:4,children:[r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("div",{style:{flex:1},children:[r.jsx(ke,{style:{fontSize:12},children:"字号"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:u.props.fontSize||14,min:6,max:200,onChange:e=>j("fontSize",e??14)})]}),r.jsxs("div",{style:{flex:1},children:[r.jsx(ke,{style:{fontSize:12},children:"对齐"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.textAlign||"left",onChange:e=>j("textAlign",e),options:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}]})]})]}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("div",{style:{flex:1},children:[r.jsx(ke,{style:{fontSize:12},children:"字重"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.fontWeight||"normal",onChange:e=>j("fontWeight",e),options:[{value:"normal",label:"常规"},{value:"bold",label:"加粗"}]})]}),r.jsxs("div",{style:{flex:1},children:[r.jsx(ke,{style:{fontSize:12},children:"样式"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.fontStyle||"normal",onChange:e=>j("fontStyle",e),options:[{value:"normal",label:"常规"},{value:"italic",label:"斜体"}]})]})]}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"字体颜色"}),r.jsx(T.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>j("color",t)})]}),r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"背景色"}),r.jsx(T.ColorPicker,{size:"small",value:u.props.backgroundColor||"transparent",onChange:(e,t)=>j("backgroundColor",t)})]})]})]})]});case"image":return r.jsxs(r.Fragment,{children:[r.jsx(I,{field:"src",label:"图片地址",placeholder:"输入图片 URL"}),r.jsx(T.Divider,{style:{margin:"4px 0"}}),r.jsx(ke,{style:{fontSize:12,marginTop:8,display:"block"},children:"适应方式"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.fit||"contain",onChange:e=>j("fit",e),options:[{value:"contain",label:"适应"},{value:"cover",label:"填充"},{value:"fill",label:"拉伸"}]})]});case"table":return r.jsx(p,{});case"barcode":return r.jsxs(r.Fragment,{children:[r.jsx(I,{field:"value",label:"条码值",placeholder:"输入条码内容"}),r.jsx(T.Divider,{style:{margin:"4px 0"}}),r.jsx(ke,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.format||"CODE128",onChange:e=>j("format",e),options:[{value:"CODE128",label:"CODE128"}]})]});case"qrcode":return r.jsxs(r.Fragment,{children:[r.jsx(I,{field:"value",label:"二维码内容",placeholder:"输入二维码内容"}),r.jsx(T.Divider,{style:{margin:"4px 0"}}),r.jsx(ke,{style:{fontSize:12,marginTop:8,display:"block"},children:"纠错级别"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.errorLevel||"M",onChange:e=>j("errorLevel",e),options:[{value:"L",label:"L - 低"},{value:"M",label:"M - 中"},{value:"Q",label:"Q - 较高"},{value:"H",label:"H - 高"}]}),r.jsxs("div",{style:{display:"flex",gap:16,marginTop:8},children:[r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"前景色"}),r.jsx(T.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>j("color",t)})]}),r.jsxs("div",{children:[r.jsx(ke,{style:{fontSize:12},children:"背景色"}),r.jsx(T.ColorPicker,{size:"small",value:u.props.backgroundColor||"#ffffff",onChange:(e,t)=>j("backgroundColor",t)})]})]})]});case"line":return r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsxs("div",{style:{flex:1},children:[r.jsx(ke,{style:{fontSize:12},children:"粗细"}),r.jsx(T.InputNumber,{size:"small",style:{width:"100%"},value:u.props.thickness||1,min:1,max:20,onChange:e=>j("thickness",e??1)})]}),r.jsxs("div",{style:{flex:1},children:[r.jsx(ke,{style:{fontSize:12},children:"样式"}),r.jsx(T.Select,{size:"small",style:{width:"100%"},value:u.props.style||"solid",onChange:e=>j("style",e),options:[{value:"solid",label:"实线"},{value:"dashed",label:"虚线"},{value:"dotted",label:"点线"}]})]})]}),r.jsxs("div",{style:{marginTop:8},children:[r.jsx(ke,{style:{fontSize:12},children:"颜色"}),r.jsx(T.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(e,t)=>j("color",t)})]})]});default:return null}};return r.jsx(T.Card,{title:`属性 - ${E}`,size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16,overflowY:"auto"}},children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[N,r.jsx(T.Divider,{style:{margin:"4px 0"}}),l()]})})},{Text:Eo}=T.Typography,po=()=>{const n=fe(p=>p.previewVisible),o=fe(p=>p.setPreviewVisible),s=fe(p=>p.components),i=fe(p=>p.pageSettings),h=fe(p=>p.gridSettings)||xt,u=fe(p=>p.dataSources),b=oe.useRef(null),O=oe.useMemo(()=>{const p=bt[i.paperSize];if(!p)return{width:i.customWidth*Pe,height:i.customHeight*Pe};const l=p.width*Pe,e=p.height*Pe;return i.orientation==="landscape"?{width:e,height:l}:{width:l,height:e}},[i]),m=oe.useMemo(()=>({top:i.marginTop*Pe,right:i.marginRight*Pe,bottom:i.marginBottom*Pe,left:i.marginLeft*Pe}),[i]),j=O.width-m.left-m.right,R=j/h.cols,P=rr.useReactToPrint({contentRef:b,documentTitle:"打印模板",pageStyle:`
52
52
  @page {
53
- size: ${O.width/Ee}mm ${O.height/Ee}mm;
54
- margin: ${o.marginTop}mm ${o.marginRight}mm ${o.marginBottom}mm ${o.marginLeft}mm;
53
+ size: ${O.width/Pe}mm ${O.height/Pe}mm;
54
+ margin: ${i.marginTop}mm ${i.marginRight}mm ${i.marginBottom}mm ${i.marginLeft}mm;
55
55
  }
56
56
  @media print {
57
57
  html, body { margin: 0; padding: 0; }
58
58
  }
59
- `}),_=(p,l)=>{const e=p.props[`${l}Binding`];if(e&&e.dataSourceId&&e.fieldPath){const t=u.find(c=>c.id===e.dataSourceId);if(t&&t.type==="object"){const c=St(t);if(c){const f=wt(c,e.fieldPath);if(f!=="")return f}}}return(e==null?void 0:e.staticValue)??String(p.props[l]||"")},A=p=>{const l=p.props.tableDataSourceId,e=l?u.find(j=>j.id===l):null,t=e?jt(e):null,c=p.tableColumns||[],f=p.props.borderWidth||1,i=p.props.borderColor||"#000000",b=t||Array.from({length:p.props.rows||3}).map(()=>({}));return s.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[s.jsx("thead",{children:s.jsx("tr",{children:c.map((j,P)=>s.jsx("th",{style:{border:`${f}px solid ${i}`,padding:4,textAlign:"center",fontSize:12,fontWeight:"bold",backgroundColor:"#f5f5f5"},children:j.title||`列${P+1}`},P))})}),s.jsx("tbody",{children:b.map((j,P)=>s.jsx("tr",{children:c.map((z,N)=>s.jsx("td",{style:{border:`${f}px solid ${i}`,padding:4,textAlign:"center",fontSize:12},children:z.fieldPath?wt(j,z.fieldPath):""},N))},P))})]})},T=p=>{const l=p.props,e={position:"absolute",left:p.x*C,top:p.y*C,width:p.w*C,height:p.h*C,overflow:"hidden"},t={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(p.type){case"text":return s.jsx("div",{style:e,children:s.jsx("div",{style:{...t,fontSize:l.fontSize||14,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",textAlign:l.textAlign||"left",color:l.color||"#000",backgroundColor:l.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:_(p,"content")})},p.id);case"image":return s.jsx("div",{style:e,children:s.jsx("div",{style:t,children:l.src?s.jsx("img",{src:_(p,"src"),style:{width:"100%",height:"100%",objectFit:l.fit||"contain"},alt:""}):null})},p.id);case"table":return s.jsx("div",{style:e,children:A(p)},p.id);case"barcode":return s.jsx("div",{style:e,children:s.jsx("div",{style:{...t,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:s.jsx(Kt,{value:_(p,"value"),format:l.format||"CODE128"})})},p.id);case"line":return s.jsx("div",{style:e,children:s.jsx("div",{style:{...t,display:"flex",alignItems:"center",border:"none"},children:s.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${l.thickness||1}px ${l.style||"solid"} ${l.color||"#000"}`,margin:0}})})},p.id);default:return null}};return s.jsxs(k.Modal,{title:"打印预览",open:r,onCancel:()=>n(!1),width:O.width+80,footer:s.jsxs(k.Space,{children:[s.jsx(k.Button,{onClick:()=>n(!1),children:"关闭"}),s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.PrinterOutlined,{}),onClick:()=>E(),children:"打印"})]}),styles:{body:{padding:16,display:"flex",flexDirection:"column",alignItems:"center"}},children:[s.jsx(k.Divider,{style:{margin:"4px 0 12px 0"}}),s.jsxs("div",{ref:x,style:{width:O.width,height:O.height,background:"#fff",border:"1px solid #d9d9d9",position:"relative",overflow:"hidden",flexShrink:0},children:[o.showHeader&&s.jsx("div",{style:{position:"absolute",top:0,left:y.left,right:y.right,height:y.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:o.headerContent}),o.showFooter&&s.jsxs("div",{style:{position:"absolute",bottom:0,left:y.left,right:y.right,height:y.bottom,display:"flex",alignItems:"center",justifyContent:o.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[s.jsx("span",{children:o.footerContent}),o.showPageNumber&&s.jsx("span",{children:o.pageNumberFormat.replace("{page}","1")})]}),s.jsx("div",{style:{position:"absolute",top:y.top,left:y.left,width:R,height:O.height-y.top-y.bottom},children:a.map(T)})]})]})},po=()=>{const r=fe(h=>h.headerFooterVisible),n=fe(h=>h.pageSettings),a=fe(h=>h.setPageSettings),o=fe(h=>h.setHeaderFooterVisible);return s.jsx(k.Modal,{title:"页眉页脚设置",open:r,onCancel:()=>o(!1),onOk:()=>o(!1),width:480,children:s.jsxs(k.Form,{layout:"vertical",style:{marginTop:8},children:[s.jsx(k.Form.Item,{label:"显示页眉",children:s.jsx(k.Switch,{checked:n.showHeader,onChange:h=>a({showHeader:h})})}),n.showHeader&&s.jsx(k.Form.Item,{label:"页眉内容",children:s.jsx(k.Input,{value:n.headerContent,onChange:h=>a({headerContent:h.target.value})})}),s.jsx(k.Form.Item,{label:"显示页脚",children:s.jsx(k.Switch,{checked:n.showFooter,onChange:h=>a({showFooter:h})})}),n.showFooter&&s.jsxs(s.Fragment,{children:[s.jsx(k.Form.Item,{label:"页脚内容",children:s.jsx(k.Input,{value:n.footerContent,onChange:h=>a({footerContent:h.target.value})})}),s.jsx(k.Form.Item,{label:"显示页码",children:s.jsx(k.Switch,{checked:n.showPageNumber,onChange:h=>a({showPageNumber:h})})}),n.showPageNumber&&s.jsx(k.Form.Item,{label:"页码格式",children:s.jsx(k.Input,{value:n.pageNumberFormat,onChange:h=>a({pageNumberFormat:h.target.value}),placeholder:"第 {page} 页"})})]})]})})},tn=({isPreview:r=!1,initialTemplateData:n,onSave:a,onPrint:o})=>{const{importJSON:h,exportJSON:u,reset:x,components:O,pageSettings:y,gridSettings:R,dataSources:C}=fe(),E=oe.useRef(null);oe.useEffect(()=>{if(n){const i=JSON.stringify(n),b=h(i);b&&(console.error("导入失败:",b),x())}},[n,h,x]);const _=()=>{if(a)try{const i=u();a(JSON.parse(i))}catch(i){console.error("导出失败:",i)}},A=oe.useMemo(()=>{const i=bt[y.paperSize];if(!i)return{width:y.customWidth*Ee,height:y.customHeight*Ee};const b=i.width*Ee,j=i.height*Ee;return y.orientation==="landscape"?{width:j,height:b}:{width:b,height:j}},[y]),T=oe.useMemo(()=>({top:y.marginTop*Ee,right:y.marginRight*Ee,bottom:y.marginBottom*Ee,left:y.marginLeft*Ee}),[y]),p=A.width-T.left-T.right,l=p/((R==null?void 0:R.cols)||xt.cols),e=tr.useReactToPrint({contentRef:E,documentTitle:"打印模板",pageStyle:`
59
+ `}),E=(p,l)=>{const e=p.props[`${l}Binding`];if(e&&e.dataSourceId&&e.fieldPath){const t=u.find(c=>c.id===e.dataSourceId);if(t&&t.type==="object"){const c=St(t);if(c){const f=wt(c,e.fieldPath);if(f!=="")return f}}}return(e==null?void 0:e.staticValue)??String(p.props[l]||"")},N=p=>{const l=p.props.tableDataSourceId,e=l?u.find(C=>C.id===l):null,t=e?jt(e):null,c=p.tableColumns||[],f=p.props.borderWidth||1,a=p.props.borderColor||"#000000",S=t||Array.from({length:p.props.rows||3}).map(()=>({}));return r.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[r.jsx("thead",{children:r.jsx("tr",{children:c.map((C,D)=>r.jsx("th",{style:{border:`${f}px solid ${a}`,padding:4,textAlign:"center",fontSize:12,fontWeight:"bold",backgroundColor:"#f5f5f5"},children:C.title||`列${D+1}`},D))})}),r.jsx("tbody",{children:S.map((C,D)=>r.jsx("tr",{children:c.map((_,k)=>r.jsx("td",{style:{border:`${f}px solid ${a}`,padding:4,textAlign:"center",fontSize:12},children:_.fieldPath?wt(C,_.fieldPath):""},k))},D))})]})},I=p=>{const l=p.props,e={position:"absolute",left:p.x*R,top:p.y*R,width:p.w*R,height:p.h*R,overflow:"hidden"},t={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(p.type){case"text":return r.jsx("div",{style:e,children:r.jsx("div",{style:{...t,fontSize:l.fontSize||14,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",textAlign:l.textAlign||"left",color:l.color||"#000",backgroundColor:l.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:E(p,"content")})},p.id);case"image":return r.jsx("div",{style:e,children:r.jsx("div",{style:t,children:l.src?r.jsx("img",{src:E(p,"src"),style:{width:"100%",height:"100%",objectFit:l.fit||"contain"},alt:""}):null})},p.id);case"table":return r.jsx("div",{style:e,children:N(p)},p.id);case"barcode":return r.jsx("div",{style:e,children:r.jsx("div",{style:{...t,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:r.jsx(Kt,{value:E(p,"value"),format:l.format||"CODE128"})})},p.id);case"qrcode":return r.jsx("div",{style:e,children:r.jsx("div",{style:{...t,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:r.jsx(Qt,{value:E(p,"value"),errorLevel:l.errorLevel||"M",color:l.color||"#000000",backgroundColor:l.backgroundColor||"#ffffff"})})},p.id);case"line":return r.jsx("div",{style:e,children:r.jsx("div",{style:{...t,display:"flex",alignItems:"center",border:"none"},children:r.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${l.thickness||1}px ${l.style||"solid"} ${l.color||"#000"}`,margin:0}})})},p.id);default:return null}};return r.jsxs(T.Modal,{title:"打印预览",open:n,onCancel:()=>o(!1),width:O.width+80,footer:r.jsxs(T.Space,{children:[r.jsx(T.Button,{onClick:()=>o(!1),children:"关闭"}),r.jsx(T.Button,{type:"primary",icon:r.jsx(Oe.PrinterOutlined,{}),onClick:()=>P(),children:"打印"})]}),styles:{body:{padding:16,display:"flex",flexDirection:"column",alignItems:"center"}},children:[r.jsx(T.Divider,{style:{margin:"4px 0 12px 0"}}),r.jsxs("div",{ref:b,style:{width:O.width,height:O.height,background:"#fff",border:"1px solid #d9d9d9",position:"relative",overflow:"hidden",flexShrink:0},children:[i.showHeader&&r.jsx("div",{style:{position:"absolute",top:0,left:m.left,right:m.right,height:m.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:i.headerContent}),i.showFooter&&r.jsxs("div",{style:{position:"absolute",bottom:0,left:m.left,right:m.right,height:m.bottom,display:"flex",alignItems:"center",justifyContent:i.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[r.jsx("span",{children:i.footerContent}),i.showPageNumber&&r.jsx("span",{children:i.pageNumberFormat.replace("{page}","1")})]}),r.jsx("div",{style:{position:"absolute",top:m.top,left:m.left,width:j,height:O.height-m.top-m.bottom},children:s.map(I)})]})]})},ho=()=>{const n=fe(h=>h.headerFooterVisible),o=fe(h=>h.pageSettings),s=fe(h=>h.setPageSettings),i=fe(h=>h.setHeaderFooterVisible);return r.jsx(T.Modal,{title:"页眉页脚设置",open:n,onCancel:()=>i(!1),onOk:()=>i(!1),width:480,children:r.jsxs(T.Form,{layout:"vertical",style:{marginTop:8},children:[r.jsx(T.Form.Item,{label:"显示页眉",children:r.jsx(T.Switch,{checked:o.showHeader,onChange:h=>s({showHeader:h})})}),o.showHeader&&r.jsx(T.Form.Item,{label:"页眉内容",children:r.jsx(T.Input,{value:o.headerContent,onChange:h=>s({headerContent:h.target.value})})}),r.jsx(T.Form.Item,{label:"显示页脚",children:r.jsx(T.Switch,{checked:o.showFooter,onChange:h=>s({showFooter:h})})}),o.showFooter&&r.jsxs(r.Fragment,{children:[r.jsx(T.Form.Item,{label:"页脚内容",children:r.jsx(T.Input,{value:o.footerContent,onChange:h=>s({footerContent:h.target.value})})}),r.jsx(T.Form.Item,{label:"显示页码",children:r.jsx(T.Switch,{checked:o.showPageNumber,onChange:h=>s({showPageNumber:h})})}),o.showPageNumber&&r.jsx(T.Form.Item,{label:"页码格式",children:r.jsx(T.Input,{value:o.pageNumberFormat,onChange:h=>s({pageNumberFormat:h.target.value}),placeholder:"第 {page} 页"})})]})]})})},rn=({isPreview:n=!1,initialTemplateData:o,onSave:s,onPrint:i})=>{const{importJSON:h,exportJSON:u,reset:b,components:O,pageSettings:m,gridSettings:j,dataSources:R}=fe(),P=oe.useRef(null),[E,N]=oe.useState(!1),[I,p]=oe.useState(!1);oe.useEffect(()=>{if(o){const _=JSON.stringify(o),k=h(_);k&&(console.error("导入失败:",k),b())}},[o,h,b]);const l=()=>{if(s)try{const _=u();s(JSON.parse(_))}catch(_){console.error("导出失败:",_)}},e=oe.useMemo(()=>{const _=bt[m.paperSize];if(!_)return{width:m.customWidth*Pe,height:m.customHeight*Pe};const k=_.width*Pe,W=_.height*Pe;return m.orientation==="landscape"?{width:W,height:k}:{width:k,height:W}},[m]),t=oe.useMemo(()=>({top:m.marginTop*Pe,right:m.marginRight*Pe,bottom:m.marginBottom*Pe,left:m.marginLeft*Pe}),[m]),c=e.width-t.left-t.right,f=c/((j==null?void 0:j.cols)||xt.cols),a=rr.useReactToPrint({contentRef:P,documentTitle:"打印模板",pageStyle:`
60
60
  @page {
61
- size: ${A.width/Ee}mm ${A.height/Ee}mm;
62
- margin: ${y.marginTop}mm ${y.marginRight}mm ${y.marginBottom}mm ${y.marginLeft}mm;
61
+ size: ${e.width/Pe}mm ${e.height/Pe}mm;
62
+ margin: ${m.marginTop}mm ${m.marginRight}mm ${m.marginBottom}mm ${m.marginLeft}mm;
63
63
  }
64
64
  @media print {
65
65
  html, body { margin: 0; padding: 0; }
66
66
  }
67
- `}),t=()=>{o?o():e()},c=i=>{const b=i.props,j={position:"absolute",left:i.x*l,top:i.y*l,width:i.w*l,height:i.h*l,overflow:"hidden"},P={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(i.type){case"text":return s.jsx("div",{style:j,children:s.jsx("div",{style:{...P,fontSize:b.fontSize||14,fontWeight:b.fontWeight||"normal",fontStyle:b.fontStyle||"normal",textAlign:b.textAlign||"left",color:b.color||"#000",backgroundColor:b.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:at(i,"content",C)})},i.id);case"image":return s.jsx("div",{style:j,children:s.jsx("div",{style:P,children:b.src?s.jsx("img",{src:at(i,"src",C),style:{width:"100%",height:"100%",objectFit:b.fit||"contain"},alt:""}):null})},i.id);case"table":return s.jsx("div",{style:j,children:f(i)},i.id);case"barcode":return s.jsx("div",{style:j,children:s.jsx("div",{style:{...P,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:s.jsx(Kt,{value:at(i,"value",C),format:b.format||"CODE128"})})},i.id);case"line":return s.jsx("div",{style:j,children:s.jsx("div",{style:{...P,display:"flex",alignItems:"center",border:"none"},children:s.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${b.thickness||1}px ${b.style||"solid"} ${b.color||"#000"}`,margin:0}})})},i.id);default:return null}},f=i=>{const b=i.props.tableDataSourceId,j=b?C.find(Q=>Q.id===b):null,P=j?jt(j):null,z=i.tableColumns||[],N=i.props.borderWidth||1,F=i.props.borderColor||"#000000";if(P&&P.length>0)return s.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[z.length>0&&s.jsx("thead",{children:s.jsx("tr",{style:{backgroundColor:"#f5f5f5"},children:z.map((Q,V)=>s.jsx("th",{style:{border:`${N}px solid ${F}`,padding:4,fontSize:12,fontWeight:"bold",textAlign:"center"},children:Q.title},V))})}),s.jsx("tbody",{children:P.map((Q,V)=>s.jsx("tr",{children:z.map((X,J)=>s.jsx("td",{style:{border:`${N}px solid ${F}`,padding:4,fontSize:12,textAlign:"center"},children:X.fieldPath?Q[X.fieldPath]:""},J))},V))})]});const Z=i.props.rows||3,K=Math.max(i.props.cols||3,z.length||3);return s.jsx("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:s.jsx("tbody",{children:Array.from({length:Z}).map((Q,V)=>s.jsx("tr",{children:Array.from({length:K}).map((X,J)=>s.jsx("td",{style:{border:`${N}px solid ${F}`,padding:2,fontSize:12,textAlign:"center"},children:" "},J))},V))})})};return r?s.jsx(k.App,{children:s.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[s.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:s.jsx(k.Space,{children:s.jsx(k.Button,{type:"primary",icon:s.jsx(Te.PrinterOutlined,{}),onClick:t,children:"打印"})})}),s.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"flex-start",padding:"16px",boxSizing:"border-box",overflowY:"auto",background:"#e8e8e8"},children:s.jsx("div",{style:{flexShrink:0},children:s.jsx(en,{isPreview:!0})})}),s.jsx("div",{style:{position:"absolute",left:"-9999px",top:"-9999px"},children:s.jsxs("div",{ref:E,style:{width:A.width,height:A.height,background:"#fff",position:"relative",overflow:"hidden"},children:[y.showHeader&&s.jsx("div",{style:{position:"absolute",top:0,left:T.left,right:T.right,height:T.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:y.headerContent}),y.showFooter&&s.jsxs("div",{style:{position:"absolute",bottom:0,left:T.left,right:T.right,height:T.bottom,display:"flex",alignItems:"center",justifyContent:y.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[s.jsx("span",{children:y.footerContent}),y.showPageNumber&&s.jsx("span",{children:y.pageNumberFormat.replace("{page}","1")})]}),s.jsx("div",{style:{position:"absolute",top:T.top,left:T.left,width:p,height:A.height-T.top-T.bottom},children:O.map(c)})]})})]})}):s.jsx(k.App,{children:s.jsxs("div",{className:"app-container",children:[s.jsx(gn,{onCustomSave:a?_:void 0,onCustomPrint:o}),s.jsxs("div",{className:"app-body",children:[s.jsx("div",{className:"app-left-panel",children:s.jsx(jn,{})}),s.jsx(en,{}),s.jsx("div",{className:"app-right-panel",children:s.jsx(uo,{})})]}),s.jsx(fo,{}),s.jsx(po,{})]})})};Ne.PrintDesigner=tn,Ne.default=tn,Ne.getArrayFromDataSource=jt,Ne.getObjectFromDataSource=St,Ne.getRenderValue=at,Ne.getValueByPath=wt,Ne.safeParseJSON=st,Ne.useDesignerStore=fe,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
67
+ `}),S=()=>{i?i():a()},C=_=>{const k=_.props,W={position:"absolute",left:_.x*f,top:_.y*f,width:_.w*f,height:_.h*f,overflow:"hidden"},U={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box"};switch(_.type){case"text":return r.jsx("div",{style:W,children:r.jsx("div",{style:{...U,fontSize:k.fontSize||14,fontWeight:k.fontWeight||"normal",fontStyle:k.fontStyle||"normal",textAlign:k.textAlign||"left",color:k.color||"#000",backgroundColor:k.backgroundColor||"transparent",padding:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:Ke(_,"content",R)})},_.id);case"image":return r.jsx("div",{style:W,children:r.jsx("div",{style:U,children:k.src?r.jsx("img",{src:Ke(_,"src",R),style:{width:"100%",height:"100%",objectFit:k.fit||"contain"},alt:""}):null})},_.id);case"table":return r.jsx("div",{style:W,children:D(_)},_.id);case"barcode":return r.jsx("div",{style:W,children:r.jsx("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:r.jsx(Kt,{value:Ke(_,"value",R),format:k.format||"CODE128"})})},_.id);case"qrcode":return r.jsx("div",{style:W,children:r.jsx("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:r.jsx(Qt,{value:Ke(_,"value",R),errorLevel:k.errorLevel||"M",color:k.color||"#000000",backgroundColor:k.backgroundColor||"#ffffff"})})},_.id);case"line":return r.jsx("div",{style:W,children:r.jsx("div",{style:{...U,display:"flex",alignItems:"center",border:"none"},children:r.jsx("hr",{style:{width:"100%",border:"none",borderTop:`${k.thickness||1}px ${k.style||"solid"} ${k.color||"#000"}`,margin:0}})})},_.id);default:return null}},D=_=>{const k=_.props.tableDataSourceId,W=k?R.find(te=>te.id===k):null,U=W?jt(W):null,J=_.tableColumns||[],re=_.props.borderWidth||1,V=_.props.borderColor||"#000000";if(U&&U.length>0)return r.jsxs("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:[J.length>0&&r.jsx("thead",{children:r.jsx("tr",{style:{backgroundColor:"#f5f5f5"},children:J.map((te,he)=>r.jsx("th",{style:{border:`${re}px solid ${V}`,padding:4,fontSize:12,fontWeight:"bold",textAlign:"center"},children:te.title},he))})}),r.jsx("tbody",{children:U.map((te,he)=>r.jsx("tr",{children:J.map((ge,M)=>r.jsx("td",{style:{border:`${re}px solid ${V}`,padding:4,fontSize:12,textAlign:"center"},children:ge.fieldPath?te[ge.fieldPath]:""},M))},he))})]});const K=_.props.rows||3,Q=Math.max(_.props.cols||3,J.length||3);return r.jsx("table",{style:{width:"100%",height:"100%",borderCollapse:"collapse"},children:r.jsx("tbody",{children:Array.from({length:K}).map((te,he)=>r.jsx("tr",{children:Array.from({length:Q}).map((ge,M)=>r.jsx("td",{style:{border:`${re}px solid ${V}`,padding:2,fontSize:12,textAlign:"center"},children:" "},M))},he))})})};return n?r.jsx(T.App,{children:r.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[r.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #e8e8e8",background:"#fff"},children:r.jsx(T.Space,{children:r.jsx(T.Button,{type:"primary",icon:r.jsx(Oe.PrinterOutlined,{}),onClick:S,children:"打印"})})}),r.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"flex-start",padding:"16px",boxSizing:"border-box",overflowY:"auto",background:"#e8e8e8"},children:r.jsx("div",{style:{flexShrink:0},children:r.jsx(tn,{isPreview:!0})})}),r.jsx("div",{style:{position:"absolute",left:"-9999px",top:"-9999px"},children:r.jsxs("div",{ref:P,style:{width:e.width,height:e.height,background:"#fff",position:"relative",overflow:"hidden"},children:[m.showHeader&&r.jsx("div",{style:{position:"absolute",top:0,left:t.left,right:t.right,height:t.top,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,overflow:"hidden"},children:m.headerContent}),m.showFooter&&r.jsxs("div",{style:{position:"absolute",bottom:0,left:t.left,right:t.right,height:t.bottom,display:"flex",alignItems:"center",justifyContent:m.showPageNumber?"space-between":"center",fontSize:12,overflow:"hidden",padding:"0 8px"},children:[r.jsx("span",{children:m.footerContent}),m.showPageNumber&&r.jsx("span",{children:m.pageNumberFormat.replace("{page}","1")})]}),r.jsx("div",{style:{position:"absolute",top:t.top,left:t.left,width:c,height:e.height-t.top-t.bottom},children:O.map(C)})]})})]})}):r.jsx(T.App,{children:r.jsxs("div",{className:"app-container",children:[r.jsx(yn,{onCustomSave:s?l:void 0,onCustomPrint:i}),r.jsxs("div",{className:"app-body",children:[r.jsx("div",{className:`app-left-panel ${E?"collapsed":""}`,children:E?r.jsx(T.Button,{type:"text",className:"panel-collapsed-trigger",icon:r.jsx(Oe.MenuUnfoldOutlined,{}),onClick:()=>N(!1),title:"展开左侧面板"}):r.jsxs(r.Fragment,{children:[r.jsx(T.Button,{type:"text",className:"panel-collapse-trigger panel-collapse-trigger-left",icon:r.jsx(Oe.MenuFoldOutlined,{}),onClick:()=>N(!0),title:"折叠左侧面板"}),r.jsx(On,{})]})}),r.jsx(tn,{}),r.jsx("div",{className:`app-right-panel ${I?"collapsed":""}`,children:I?r.jsx(T.Button,{type:"text",className:"panel-collapsed-trigger",icon:r.jsx(Oe.MenuFoldOutlined,{}),onClick:()=>p(!1),title:"展开属性面板"}):r.jsxs(r.Fragment,{children:[r.jsx(T.Button,{type:"text",className:"panel-collapse-trigger panel-collapse-trigger-right",icon:r.jsx(Oe.MenuUnfoldOutlined,{}),onClick:()=>p(!0),title:"折叠属性面板"}),r.jsx(fo,{})]})})]}),r.jsx(po,{}),r.jsx(ho,{})]})})};Ne.PrintDesigner=rn,Ne.default=rn,Ne.getArrayFromDataSource=jt,Ne.getObjectFromDataSource=St,Ne.getRenderValue=Ke,Ne.getValueByPath=wt,Ne.safeParseJSON=at,Ne.useDesignerStore=fe,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));