operp-print-designer 1.1.2 → 1.1.3

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.
@@ -6502,7 +6502,7 @@ const Sr = ({ value: n, format: i }) => {
6502
6502
  {
6503
6503
  title: "列标题",
6504
6504
  dataIndex: "title",
6505
- width: 100,
6505
+ width: 60,
6506
6506
  render: (Y, X) => {
6507
6507
  const J = X.key in w ? w[X.key] : X.title;
6508
6508
  return /* @__PURE__ */ t.jsx(
@@ -6531,7 +6531,7 @@ const Sr = ({ value: n, format: i }) => {
6531
6531
  {
6532
6532
  title: "绑定字段",
6533
6533
  dataIndex: "fieldPath",
6534
- width: 120,
6534
+ width: 100,
6535
6535
  render: (Y, X) => /* @__PURE__ */ t.jsx(
6536
6536
  He,
6537
6537
  {
@@ -6552,7 +6552,7 @@ const Sr = ({ value: n, format: i }) => {
6552
6552
  },
6553
6553
  {
6554
6554
  title: "操作",
6555
- width: 60,
6555
+ width: 50,
6556
6556
  render: (Y, X) => /* @__PURE__ */ t.jsx(
6557
6557
  bn,
6558
6558
  {
@@ -6599,7 +6599,7 @@ const Sr = ({ value: n, format: i }) => {
6599
6599
  columns: F,
6600
6600
  pagination: !1,
6601
6601
  size: "small",
6602
- style: { width: "280px" },
6602
+ scroll: { x: 200, y: 360 },
6603
6603
  bordered: !0,
6604
6604
  rowKey: "key"
6605
6605
  }
@@ -48,7 +48,7 @@ object-assign
48
48
  */var qt,wr;function zn(){if(wr)return qt;wr=1;var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function c(){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={},_=0;_<10;_++)x["_"+String.fromCharCode(_)]=_;var b=Object.getOwnPropertyNames(x).map(function(R){return x[R]});if(b.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(R){v[R]=R}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qt=c()?Object.assign:function(u,x){for(var _,b=a(u),v,R=1;R<arguments.length;R++){_=Object(arguments[R]);for(var P in _)i.call(_,P)&&(b[P]=_[P]);if(n){v=n(_);for(var C=0;C<v.length;C++)o.call(_,v[C])&&(b[v[C]]=_[v[C]])}}return b},qt}var Ft,Sr;function Yt(){if(Sr)return Ft;Sr=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ft=n,Ft}var Gt,jr;function Cr(){return jr||(jr=1,Gt=Function.call.bind(Object.prototype.hasOwnProperty)),Gt}var Vt,Or;function kn(){if(Or)return Vt;Or=1;var n={},i=function(){};if(n.NODE_ENV!=="production"){var o=Yt(),a={},c=Cr();i=function(x){var _="Warning: "+x;typeof console<"u"&&console.error(_);try{throw new Error(_)}catch{}}}function u(x,_,b,v,R){if(n.NODE_ENV!=="production"){for(var P in x)if(c(x,P)){var C;try{if(typeof x[P]!="function"){var L=Error((v||"React class")+": "+b+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}C=x[P](_,P,v,b,null,o)}catch(y){C=y}if(C&&!(C instanceof Error)&&i((v||"React class")+": type specification of "+b+" `"+P+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in a)){a[C.message]=!0;var k=R?R():"";i("Failed "+b+" type: "+C.message+(k??""))}}}}return u.resetWarningCache=function(){n.NODE_ENV!=="production"&&(a={})},Vt=u,Vt}var Ut,Rr;function Mn(){if(Rr)return Ut;Rr=1;var n={},i=xr(),o=zn(),a=Yt(),c=Cr(),u=kn(),x=function(){};n.NODE_ENV!=="production"&&(x=function(b){var v="Warning: "+b;typeof console<"u"&&console.error(v);try{throw new Error(v)}catch{}});function _(){return null}return Ut=function(b,v){var R=typeof Symbol=="function"&&Symbol.iterator,P="@@iterator";function C(I){var W=I&&(R&&I[R]||I[P]);if(typeof W=="function")return W}var L="<<anonymous>>",k={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:s(),arrayOf:f,element:l(),elementType:w(),instanceOf:O,node:T(),objectOf:M,oneOf:D,oneOfType:H,shape:G,exact:X};function y(I,W){return I===W?I!==0||1/I===1/W:I!==I&&W!==W}function d(I,W){this.message=I,this.data=W&&typeof W=="object"?W:{},this.stack=""}d.prototype=Error.prototype;function r(I){if(n.NODE_ENV!=="production")var W={},ie=0;function oe(fe,ue,A,U,ee,Z,ce){if(U=U||L,Z=Z||A,ce!==a){if(v){var B=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 B.name="Invariant Violation",B}else if(n.NODE_ENV!=="production"&&typeof console<"u"){var he=U+":"+A;!W[he]&&ie<3&&(x("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+U+"`. 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."),W[he]=!0,ie++)}}return ue[A]==null?fe?ue[A]===null?new d("The "+ee+" `"+Z+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new d("The "+ee+" `"+Z+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:I(ue,A,U,ee,Z)}var ae=oe.bind(null,!1);return ae.isRequired=oe.bind(null,!0),ae}function t(I){function W(ie,oe,ae,fe,ue,A){var U=ie[oe],ee=K(U);if(ee!==I){var Z=re(U);return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+Z+"` supplied to `"+ae+"`, expected ")+("`"+I+"`."),{expectedType:I})}return null}return r(W)}function s(){return r(_)}function f(I){function W(ie,oe,ae,fe,ue){if(typeof I!="function")return new d("Property `"+ue+"` of component `"+ae+"` has invalid PropType notation inside arrayOf.");var A=ie[oe];if(!Array.isArray(A)){var U=K(A);return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+U+"` supplied to `"+ae+"`, expected an array."))}for(var ee=0;ee<A.length;ee++){var Z=I(A,ee,ae,fe,ue+"["+ee+"]",a);if(Z instanceof Error)return Z}return null}return r(W)}function l(){function I(W,ie,oe,ae,fe){var ue=W[ie];if(!b(ue)){var A=K(ue);return new d("Invalid "+ae+" `"+fe+"` of type "+("`"+A+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return r(I)}function w(){function I(W,ie,oe,ae,fe){var ue=W[ie];if(!i.isValidElementType(ue)){var A=K(ue);return new d("Invalid "+ae+" `"+fe+"` of type "+("`"+A+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return r(I)}function O(I){function W(ie,oe,ae,fe,ue){if(!(ie[oe]instanceof I)){var A=I.name||L,U=ge(ie[oe]);return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+U+"` supplied to `"+ae+"`, expected ")+("instance of `"+A+"`."))}return null}return r(W)}function D(I){if(!Array.isArray(I))return n.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.")),_;function W(ie,oe,ae,fe,ue){for(var A=ie[oe],U=0;U<I.length;U++)if(y(A,I[U]))return null;var ee=JSON.stringify(I,function(ce,B){var he=re(B);return he==="symbol"?String(B):B});return new d("Invalid "+fe+" `"+ue+"` of value `"+String(A)+"` "+("supplied to `"+ae+"`, expected one of "+ee+"."))}return r(W)}function M(I){function W(ie,oe,ae,fe,ue){if(typeof I!="function")return new d("Property `"+ue+"` of component `"+ae+"` has invalid PropType notation inside objectOf.");var A=ie[oe],U=K(A);if(U!=="object")return new d("Invalid "+fe+" `"+ue+"` of type "+("`"+U+"` supplied to `"+ae+"`, expected an object."));for(var ee in A)if(c(A,ee)){var Z=I(A,ee,ae,fe,ue+"."+ee,a);if(Z instanceof Error)return Z}return null}return r(W)}function H(I){if(!Array.isArray(I))return n.NODE_ENV!=="production"&&x("Invalid argument supplied to oneOfType, expected an instance of array."),_;for(var W=0;W<I.length;W++){var ie=I[W];if(typeof ie!="function")return x("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+be(ie)+" at index "+W+"."),_}function oe(ae,fe,ue,A,U){for(var ee=[],Z=0;Z<I.length;Z++){var ce=I[Z],B=ce(ae,fe,ue,A,U,a);if(B==null)return null;B.data&&c(B.data,"expectedType")&&ee.push(B.data.expectedType)}var he=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new d("Invalid "+A+" `"+U+"` supplied to "+("`"+ue+"`"+he+"."))}return r(oe)}function T(){function I(W,ie,oe,ae,fe){return V(W[ie])?null:new d("Invalid "+ae+" `"+fe+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return r(I)}function N(I,W,ie,oe,ae){return new d((I||"React class")+": "+W+" type `"+ie+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ae+"`.")}function G(I){function W(ie,oe,ae,fe,ue){var A=ie[oe],U=K(A);if(U!=="object")return new d("Invalid "+fe+" `"+ue+"` of type `"+U+"` "+("supplied to `"+ae+"`, expected `object`."));for(var ee in I){var Z=I[ee];if(typeof Z!="function")return N(ae,fe,ue,ee,re(Z));var ce=Z(A,ee,ae,fe,ue+"."+ee,a);if(ce)return ce}return null}return r(W)}function X(I){function W(ie,oe,ae,fe,ue){var A=ie[oe],U=K(A);if(U!=="object")return new d("Invalid "+fe+" `"+ue+"` of type `"+U+"` "+("supplied to `"+ae+"`, expected `object`."));var ee=o({},ie[oe],I);for(var Z in ee){var ce=I[Z];if(c(I,Z)&&typeof ce!="function")return N(ae,fe,ue,Z,re(ce));if(!ce)return new d("Invalid "+fe+" `"+ue+"` key `"+Z+"` supplied to `"+ae+"`.\nBad object: "+JSON.stringify(ie[oe],null," ")+`
49
49
  Valid keys: `+JSON.stringify(Object.keys(I),null," "));var B=ce(A,Z,ae,fe,ue+"."+Z,a);if(B)return B}return null}return r(W)}function V(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(V);if(I===null||b(I))return!0;var W=C(I);if(W){var ie=W.call(I),oe;if(W!==I.entries){for(;!(oe=ie.next()).done;)if(!V(oe.value))return!1}else for(;!(oe=ie.next()).done;){var ae=oe.value;if(ae&&!V(ae[1]))return!1}}else return!1;return!0;default:return!1}}function J(I,W){return I==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function K(I){var W=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":J(W,I)?"symbol":W}function re(I){if(typeof I>"u"||I===null)return""+I;var W=K(I);if(W==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return W}function be(I){var W=re(I);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function ge(I){return!I.constructor||!I.constructor.name?L:I.constructor.name}return k.checkPropTypes=u,k.resetWarningCache=u.resetWarningCache,k.PropTypes=k,k},Ut}var $t,_r;function In(){if(_r)return $t;_r=1;var n=Yt();function i(){}function o(){}return o.resetWarningCache=i,$t=function(){function a(x,_,b,v,R,P){if(P!==n){var C=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 C.name="Invariant Violation",C}}a.isRequired=a;function c(){return a}var u={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:c,element:a,elementType:a,instanceOf:c,node:a,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:o,resetWarningCache:i};return u.PropTypes=u,u},$t}var Er;function Ue(){if(Er)return Et.exports;Er=1;var n={};if(n.NODE_ENV!=="production"){var i=xr(),o=!0;Et.exports=Mn()(i.isElement,o)}else Et.exports=In()();return Et.exports}var dt={exports:{}},Xt,Pr;function An(){if(Pr)return Xt;Pr=1;var n={},i=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,_=(p,S)=>{for(var z in S)o(p,z,{get:S[z],enumerable:!0})},b=(p,S,z,Y)=>{if(S&&typeof S=="object"||typeof S=="function")for(let $ of c(S))!x.call(p,$)&&$!==z&&o(p,$,{get:()=>S[$],enumerable:!(Y=a(S,$))||Y.enumerable});return p},v=(p,S,z)=>(z=p!=null?i(u(p)):{},b(!p||!p.__esModule?o(z,"default",{value:p,enumerable:!0}):z,p)),R=p=>b(o({},"__esModule",{value:!0}),p),P={};_(P,{DraggableCore:()=>ye,default:()=>Ce}),Xt=R(P);var C=v(se),L=v(Ue()),k=v(It),y=_t();function d(p,S){for(let z=0,Y=p.length;z<Y;z++)if(S.apply(S,[p[z],z,p]))return p[z]}function r(p){return typeof p=="function"||Object.prototype.toString.call(p)==="[object Function]"}function t(p){return typeof p=="number"&&!isNaN(p)}function s(p){return parseInt(p,10)}function f(p,S,z){if(p[S])return new Error(`Invalid prop ${S} passed to ${z} - do not set this, set it on the child.`)}var l=["Moz","Webkit","O","ms"];function w(p="transform"){var S,z;if(typeof window>"u")return"";const Y=(z=(S=window.document)==null?void 0:S.documentElement)==null?void 0:z.style;if(!Y||p in Y)return"";for(let $=0;$<l.length;$++)if(O(p,l[$])in Y)return l[$];return""}function O(p,S){return S?`${S}${D(p)}`:p}function D(p){let S="",z=!0;for(let Y=0;Y<p.length;Y++)z?(S+=p[Y].toUpperCase(),z=!1):p[Y]==="-"?z=!0:S+=p[Y];return S}var M=w(),H="";function T(p,S){var z;H||(H=(z=d(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function($){return r(p[$])}))!=null?z:"");const Y=p[H];return r(Y)?!!Y.call(p,S):!1}function N(p,S,z){let Y=p;do{if(T(Y,S))return!0;if(Y===z)return!1;Y=Y.parentNode}while(Y);return!1}function G(p,S,z,Y){if(!p)return;const $={capture:!0,...Y},Ee=z;p.addEventListener?p.addEventListener(S,Ee,$):p.attachEvent?p.attachEvent("on"+S,Ee):p["on"+S]=Ee}function X(p,S,z,Y){if(!p)return;const $={capture:!0,...Y},Ee=z;p.removeEventListener?p.removeEventListener(S,Ee,$):p.detachEvent?p.detachEvent("on"+S,Ee):p["on"+S]=null}function V(p){let S=p.clientHeight;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S+=s(z.borderTopWidth),S+=s(z.borderBottomWidth),S}function J(p){let S=p.clientWidth;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S+=s(z.borderLeftWidth),S+=s(z.borderRightWidth),S}function K(p){let S=p.clientHeight;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S-=s(z.paddingTop),S-=s(z.paddingBottom),S}function re(p){let S=p.clientWidth;const z=p.ownerDocument.defaultView.getComputedStyle(p);return S-=s(z.paddingLeft),S-=s(z.paddingRight),S}function be(p,S,z){const $=S===S.ownerDocument.body?{left:0,top:0}:S.getBoundingClientRect(),Ee=(p.clientX+S.scrollLeft-$.left)/z,me=(p.clientY+S.scrollTop-$.top)/z;return{x:Ee,y:me}}function ge(p,S){const z=W(p,S,"px");return{[O("transform",M)]:z}}function I(p,S){return W(p,S,"")}function W({x:p,y:S},z,Y){let $=`translate(${p}${Y},${S}${Y})`;if(z){const Ee=`${typeof z.x=="string"?z.x:z.x+Y}`,me=`${typeof z.y=="string"?z.y:z.y+Y}`;$=`translate(${Ee}, ${me})`+$}return $}function ie(p,S){return p.targetTouches&&d(p.targetTouches,z=>S===z.identifier)||p.changedTouches&&d(p.changedTouches,z=>S===z.identifier)}function oe(p){if(p.targetTouches&&p.targetTouches[0])return p.targetTouches[0].identifier;if(p.changedTouches&&p.changedTouches[0])return p.changedTouches[0].identifier}function ae(p){if(!p)return;let S=p.getElementById("react-draggable-style-el");S||(S=p.createElement("style"),S.type="text/css",S.id="react-draggable-style-el",S.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
50
  `,S.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
- `,p.getElementsByTagName("head")[0].appendChild(S)),p.body&&A(p.body,"react-draggable-transparent-selection")}function fe(p){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ue(p)}):ue(p)}function ue(p){if(p)try{p.body&&U(p.body,"react-draggable-transparent-selection");const S=p.selection;if(S)S.empty();else{const z=(p.defaultView||window).getSelection();z&&z.type!=="Caret"&&z.removeAllRanges()}}catch{}}function A(p,S){p.classList?p.classList.add(S):p.className.match(new RegExp(`(?:^|\\s)${S}(?!\\S)`))||(p.className+=` ${S}`)}function U(p,S){p.classList?p.classList.remove(S):p.className=p.className.replace(new RegExp(`(?:^|\\s)${S}(?!\\S)`,"g"),"")}function ee(p,S,z){if(!p.props.bounds)return[S,z];let{bounds:Y}=p.props;Y=typeof Y=="string"?Y:Le(Y);const $=g(p);if(typeof Y=="string"){const{ownerDocument:Ee}=$,me=Ee.defaultView;if(!me)throw new Error("Cannot resolve the owner window of the draggable node.");let Te;if(Y==="parent"?Te=$.parentNode:Te=$.getRootNode().querySelector(Y),!(Te instanceof me.HTMLElement))throw new Error('Bounds selector "'+Y+'" could not find an element.');const Me=Te,Ge=me.getComputedStyle($),$e=me.getComputedStyle(Me);Y={left:-$.offsetLeft+s($e.paddingLeft)+s(Ge.marginLeft),top:-$.offsetTop+s($e.paddingTop)+s(Ge.marginTop),right:re(Me)-J($)-$.offsetLeft+s($e.paddingRight)-s(Ge.marginRight),bottom:K(Me)-V($)-$.offsetTop+s($e.paddingBottom)-s(Ge.marginBottom)}}return t(Y.right)&&(S=Math.min(S,Y.right)),t(Y.bottom)&&(z=Math.min(z,Y.bottom)),t(Y.left)&&(S=Math.max(S,Y.left)),t(Y.top)&&(z=Math.max(z,Y.top)),[S,z]}function Z(p,S,z){const Y=Math.round(S/p[0])*p[0],$=Math.round(z/p[1])*p[1];return[Y,$]}function ce(p){return p.props.axis==="both"||p.props.axis==="x"}function B(p){return p.props.axis==="both"||p.props.axis==="y"}function he(p,S,z){const Y=typeof S=="number"?ie(p,S):null;if(typeof S=="number"&&!Y)return null;const $=g(z),Ee=z.props.offsetParent||$.offsetParent||$.ownerDocument.body;return be(Y||p,Ee,z.props.scale)}function ke(p,S,z){const Y=!t(p.lastX),$=g(p);return Y?{node:$,deltaX:0,deltaY:0,lastX:S,lastY:z,x:S,y:z}:{node:$,deltaX:S-p.lastX,deltaY:z-p.lastY,lastX:p.lastX,lastY:p.lastY,x:S,y:z}}function we(p,S){const z=p.props.scale;return{node:S.node,x:p.state.x+S.deltaX/z,y:p.state.y+S.deltaY/z,deltaX:S.deltaX/z,deltaY:S.deltaY/z,lastX:p.state.x,lastY:p.state.y}}function Le(p){return{left:p.left,top:p.top,right:p.right,bottom:p.bottom}}function g(p){const S=p.findDOMNode();if(!S)throw new Error("<DraggableCore>: Unmounted during event!");return S}var m=v(se),j=v(Ue()),q=v(It);function ne(...p){n.DRAGGABLE_DEBUG&&console.log(...p)}var Q={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},le=Q.mouse,ye=class extends m.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=p=>{if(this.props.onMouseDown(p),!this.props.allowAnyClick&&(typeof p.button=="number"&&p.button!==0||p.ctrlKey))return!1;const S=this.findDOMNode();if(!S||!S.ownerDocument||!S.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:z}=S;if(this.props.disabled||!(p.target instanceof z.defaultView.Node)||this.props.handle&&!N(p.target,this.props.handle,S)||this.props.cancel&&N(p.target,this.props.cancel,S))return;p.type==="touchstart"&&!this.props.allowMobileScroll&&p.preventDefault();const Y=oe(p);this.touchIdentifier=Y;const $=he(p,Y,this);if($==null)return;const{x:Ee,y:me}=$,Te=ke(this,Ee,me);ne("DraggableCore: handleDragStart: %j",Te),ne("calling",this.props.onStart),!(this.props.onStart(p,Te)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&ae(z),this.dragging=!0,this.lastX=Ee,this.lastY=me,G(z,le.move,this.handleDrag),G(z,le.stop,this.handleDragStop))},this.handleDrag=p=>{const S=he(p,this.touchIdentifier,this);if(S==null)return;let{x:z,y:Y}=S;if(Array.isArray(this.props.grid)){let me=z-this.lastX,Te=Y-this.lastY;if([me,Te]=Z(this.props.grid,me,Te),!me&&!Te)return;z=this.lastX+me,Y=this.lastY+Te}const $=ke(this,z,Y);if(ne("DraggableCore: handleDrag: %j",$),this.props.onDrag(p,$)===!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=z,this.lastY=Y},this.handleDragStop=p=>{if(!this.dragging)return;const S=he(p,this.touchIdentifier,this);if(S==null)return;let{x:z,y:Y}=S;if(Array.isArray(this.props.grid)){let Te=z-this.lastX||0,Me=Y-this.lastY||0;[Te,Me]=Z(this.props.grid,Te,Me),z=this.lastX+Te,Y=this.lastY+Me}const $=ke(this,z,Y);if(this.props.onStop(p,$)===!1||this.mounted===!1)return!1;const me=this.findDOMNode();me&&this.props.enableUserSelectHack&&fe(me.ownerDocument),ne("DraggableCore: handleDragStop: %j",$),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,me&&(ne("DraggableCore: Removing handlers"),X(me.ownerDocument,le.move,this.handleDrag),X(me.ownerDocument,le.stop,this.handleDragStop))},this.onMouseDown=p=>(le=Q.mouse,this.handleDragStart(p)),this.onMouseUp=p=>(le=Q.mouse,this.handleDragStop(p)),this.onTouchStart=p=>(le=Q.touch,this.handleDragStart(p)),this.onTouchEnd=p=>(le=Q.touch,this.handleDragStop(p))}componentDidMount(){this.mounted=!0;const p=this.findDOMNode();p&&G(p,Q.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const p=this.findDOMNode();if(p){const{ownerDocument:S}=p;X(S,Q.mouse.move,this.handleDrag),X(S,Q.touch.move,this.handleDrag),X(S,Q.mouse.stop,this.handleDragStop),X(S,Q.touch.stop,this.handleDragStop),X(p,Q.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&fe(S)}}findDOMNode(){var p;if((p=this.props)!=null&&p.nodeRef)return this.props.nodeRef.current;const S=q.default;return typeof S.findDOMNode=="function"?S.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 m.cloneElement(m.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};ye.displayName="DraggableCore",ye.propTypes={allowAnyClick:j.default.bool,allowMobileScroll:j.default.bool,children:j.default.node.isRequired,disabled:j.default.bool,enableUserSelectHack:j.default.bool,offsetParent:function(p,S){if(p[S]&&p[S].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:j.default.arrayOf(j.default.number),handle:j.default.string,cancel:j.default.string,nodeRef:j.default.object,onStart:j.default.func,onDrag:j.default.func,onStop:j.default.func,onMouseDown:j.default.func,scale:j.default.number,className:f,style:f,transform:f},ye.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Ce=class extends C.Component{constructor(p){super(p),this.onDragStart=(S,z)=>{if(ne("Draggable: onDragStart: %j",z),this.props.onStart(S,we(this,z))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(S,z)=>{if(!this.state.dragging)return!1;ne("Draggable: onDrag: %j",z);const Y=we(this,z),$={x:Y.x,y:Y.y,slackX:0,slackY:0};if(this.props.bounds){const{x:me,y:Te}=$;$.x+=this.state.slackX,$.y+=this.state.slackY;const[Me,Ge]=ee(this,$.x,$.y);$.x=Me,$.y=Ge,$.slackX=this.state.slackX+(me-$.x),$.slackY=this.state.slackY+(Te-$.y),Y.x=$.x,Y.y=$.y,Y.deltaX=$.x-this.state.x,Y.deltaY=$.y-this.state.y}if(this.props.onDrag(S,Y)===!1)return!1;this.setState($)},this.onDragStop=(S,z)=>{if(!this.state.dragging||this.props.onStop(S,we(this,z))===!1)return!1;ne("Draggable: onDragStop: %j",z);const $={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:me,y:Te}=this.props.position;$.x=me,$.y=Te}this.setState($)},this.state={dragging:!1,dragged:!1,x:p.position?p.position.x:p.defaultPosition.x,y:p.position?p.position.y:p.defaultPosition.y,prevPropsPosition:{...p.position},slackX:0,slackY:0,isElementSVG:!1},p.position&&!(p.onDrag||p.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:p},{prevPropsPosition:S}){return p&&(!S||p.x!==S.x||p.y!==S.y)?(ne("Draggable: getDerivedStateFromProps %j",{position:p,prevPropsPosition:S}),{x:p.x,y:p.y,prevPropsPosition:{...p}}):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 p;if((p=this.props)!=null&&p.nodeRef)return this.props.nodeRef.current;const S=k.default;return typeof S.findDOMNode=="function"?S.findDOMNode(this):null}render(){const{axis:p,bounds:S,children:z,defaultPosition:Y,defaultClassName:$,defaultClassNameDragging:Ee,defaultClassNameDragged:me,position:Te,positionOffset:Me,scale:Ge,...$e}=this.props;let mt={},et=null;const Ve=!!!Te||this.state.dragging,tt=Te||Y,rt={x:ce(this)&&Ve?this.state.x:tt.x,y:B(this)&&Ve?this.state.y:tt.y};this.state.isElementSVG?et=I(rt,Me):mt=ge(rt,Me);const nt=C.Children.only(z),tr=(0,y.clsx)(nt.props.className||"",$,{[Ee]:this.state.dragging,[me]:this.state.dragged});return C.createElement(ye,{...$e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},C.cloneElement(nt,{className:tr,style:{...nt.props.style,...mt},transform:et}))}};return Ce.displayName="Draggable",Ce.propTypes={...ye.propTypes,axis:L.default.oneOf(["both","x","y","none"]),bounds:L.default.oneOfType([L.default.shape({left:L.default.number,right:L.default.number,top:L.default.number,bottom:L.default.number}),L.default.string,L.default.oneOf([!1])]),defaultClassName:L.default.string,defaultClassNameDragging:L.default.string,defaultClassNameDragged:L.default.string,defaultPosition:L.default.shape({x:L.default.number,y:L.default.number}),positionOffset:L.default.shape({x:L.default.oneOfType([L.default.number,L.default.string]),y:L.default.oneOfType([L.default.number,L.default.string])}),position:L.default.shape({x:L.default.number,y:L.default.number}),className:f,style:f,transform:f},Ce.defaultProps={...ye.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},Xt}var Dr;function Jt(){if(Dr)return dt.exports;Dr=1;const n=An(),i=n.DraggableCore,o=n.default||n;return dt.exports=o,dt.exports.default=o,dt.exports.DraggableCore=i,dt.exports}var ft={exports:{}},pt={},Dt={},Tr;function Ln(){if(Tr)return Dt;Tr=1,Dt.__esModule=!0,Dt.cloneElement=_;var n=i(se);function i(b){return b&&b.__esModule?b:{default:b}}function o(b,v){var R=Object.keys(b);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(b);v&&(P=P.filter(function(C){return Object.getOwnPropertyDescriptor(b,C).enumerable})),R.push.apply(R,P)}return R}function a(b){for(var v=1;v<arguments.length;v++){var R=arguments[v]!=null?arguments[v]:{};v%2?o(Object(R),!0).forEach(function(P){c(b,P,R[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(R)):o(Object(R)).forEach(function(P){Object.defineProperty(b,P,Object.getOwnPropertyDescriptor(R,P))})}return b}function c(b,v,R){return(v=u(v))in b?Object.defineProperty(b,v,{value:R,enumerable:!0,configurable:!0,writable:!0}):b[v]=R,b}function u(b){var v=x(b,"string");return typeof v=="symbol"?v:v+""}function x(b,v){if(typeof b!="object"||!b)return b;var R=b[Symbol.toPrimitive];if(R!==void 0){var P=R.call(b,v);if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(b)}function _(b,v){return v.style&&b.props.style&&(v.style=a(a({},b.props.style),v.style)),v.className&&b.props.className&&(v.className=b.props.className+" "+v.className),n.default.cloneElement(b,v)}return Dt}var ht={},zr;function kr(){if(zr)return ht;zr=1,ht.__esModule=!0,ht.resizableProps=void 0;var n=i(Ue());Jt();function i(o){return o&&o.__esModule?o:{default:o}}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 o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];const u=a[0];return u.axis==="both"||u.axis==="y"?n.default.number.isRequired(...a):n.default.number(...a)},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 o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];const u=a[0];return u.axis==="both"||u.axis==="x"?n.default.number.isRequired(...a):n.default.number(...a)}},ht}var Mr;function Ir(){if(Mr)return pt;Mr=1,pt.__esModule=!0,pt.default=void 0;var n=u(se),i=Jt(),o=Ln(),a=kr();const c=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(k,y){if(typeof WeakMap=="function")var d=new WeakMap,r=new WeakMap;return(u=function(t,s){if(!s&&t&&t.__esModule)return t;var f,l,w={__proto__:null,default:t};if(t===null||typeof t!="object"&&typeof t!="function")return w;if(f=s?r:d){if(f.has(t))return f.get(t);f.set(t,w)}for(const O in t)O!=="default"&&{}.hasOwnProperty.call(t,O)&&((l=(f=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,O))&&(l.get||l.set)?f(w,O,l):w[O]=t[O]);return w})(k,y)}function x(){return x=Object.assign?Object.assign.bind():function(k){for(var y=1;y<arguments.length;y++){var d=arguments[y];for(var r in d)({}).hasOwnProperty.call(d,r)&&(k[r]=d[r])}return k},x.apply(null,arguments)}function _(k,y){if(k==null)return{};var d={};for(var r in k)if({}.hasOwnProperty.call(k,r)){if(y.indexOf(r)!==-1)continue;d[r]=k[r]}return d}function b(k,y){var d=Object.keys(k);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(k);y&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(k,t).enumerable})),d.push.apply(d,r)}return d}function v(k){for(var y=1;y<arguments.length;y++){var d=arguments[y]!=null?arguments[y]:{};y%2?b(Object(d),!0).forEach(function(r){R(k,r,d[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(d)):b(Object(d)).forEach(function(r){Object.defineProperty(k,r,Object.getOwnPropertyDescriptor(d,r))})}return k}function R(k,y,d){return(y=P(y))in k?Object.defineProperty(k,y,{value:d,enumerable:!0,configurable:!0,writable:!0}):k[y]=d,k}function P(k){var y=C(k,"string");return typeof y=="symbol"?y:y+""}function C(k,y){if(typeof k!="object"||!k)return k;var d=k[Symbol.toPrimitive];if(d!==void 0){var r=d.call(k,y);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(k)}let L=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(y,d){const r=this.props,t=r.minConstraints,s=r.maxConstraints,f=r.lockAspectRatio;if(!t&&!s&&!f)return[y,d];if(f){const H=this.props.width/this.props.height,T=y-this.props.width,N=d-this.props.height;Math.abs(T)>Math.abs(N*H)?d=y/H:y=d*H}const l=y,w=d;let O=this.slack||[0,0],D=O[0],M=O[1];return y+=D,d+=M,t&&(y=Math.max(t[0],y),d=Math.max(t[1],d)),s&&(y=Math.min(s[0],y),d=Math.min(s[1],d)),this.slack=[D+(l-y),M+(w-d)],[y,d]}resizeHandler(y,d){return(r,t)=>{var s,f,l,w;let O=t.node,D=t.deltaX,M=t.deltaY;y==="onResizeStart"&&this.resetData();const H=(this.props.axis==="both"||this.props.axis==="x")&&d!=="n"&&d!=="s",T=(this.props.axis==="both"||this.props.axis==="y")&&d!=="e"&&d!=="w";if(!H&&!T)return;const N=d[0],G=d[d.length-1],X=O.getBoundingClientRect();if(this.lastHandleRect!=null){if(G==="w"){const oe=X.left-this.lastHandleRect.left;D+=oe}if(N==="n"){const oe=X.top-this.lastHandleRect.top;M+=oe}}this.lastHandleRect=X,G==="w"&&(D=-D),N==="n"&&(M=-M);const V=(s=(f=this.lastSize)==null?void 0:f.width)!=null?s:this.props.width,J=(l=(w=this.lastSize)==null?void 0:w.height)!=null?l:this.props.height;let K=V+(H?D/this.props.transformScale:0),re=J+(T?M/this.props.transformScale:0);var be=this.runConstraints(K,re);if(K=be[0],re=be[1],y==="onResizeStop"&&this.lastSize){var ge=this.lastSize;K=ge.width,re=ge.height}const I=K!==V||re!==J;y!=="onResizeStop"&&(this.lastSize={width:K,height:re});const W=typeof this.props[y]=="function"?this.props[y]:null;W&&!(y==="onResize"&&!I)&&(r.persist==null||r.persist(),W(r,{node:O,size:{width:K,height:re},handle:d})),y==="onResizeStop"&&this.resetData()}}renderResizeHandle(y,d){const r=this.props.handle;if(!r)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+y,ref:d});if(typeof r=="function")return r(y,d);const t=typeof r.type=="string",s=v({ref:d},t?{}:{handleAxis:y});return n.cloneElement(r,s)}render(){const y=this.props,d=y.children,r=y.className,t=y.draggableOpts;y.width,y.height,y.handle,y.handleSize,y.lockAspectRatio,y.axis,y.minConstraints,y.maxConstraints,y.onResize,y.onResizeStop,y.onResizeStart;const s=y.resizeHandles;y.transformScale;const f=_(y,c);return(0,o.cloneElement)(d,v(v({},f),{},{className:(r?r+" ":"")+"react-resizable",children:[...n.Children.toArray(d.props.children),...s.map(l=>{var w;const O=(w=this.handleRefs[l])!=null?w:this.handleRefs[l]=n.createRef();return n.createElement(i.DraggableCore,x({},t,{nodeRef:O,key:"resizableHandle-"+l,onStop:this.resizeHandler("onResizeStop",l),onStart:this.resizeHandler("onResizeStart",l),onDrag:this.resizeHandler("onResize",l)}),this.renderResizeHandle(l,O))})]}))}};return pt.default=L,L.propTypes=a.resizableProps,L.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},pt}var gt={},Ar;function Nn(){if(Ar)return gt;Ar=1,gt.__esModule=!0,gt.default=void 0;var n=x(se),i=u(Ue()),o=u(Ir()),a=kr();const c=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(y){return y&&y.__esModule?y:{default:y}}function x(y,d){if(typeof WeakMap=="function")var r=new WeakMap,t=new WeakMap;return(x=function(s,f){if(!f&&s&&s.__esModule)return s;var l,w,O={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return O;if(l=f?t:r){if(l.has(s))return l.get(s);l.set(s,O)}for(const D in s)D!=="default"&&{}.hasOwnProperty.call(s,D)&&((w=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,D))&&(w.get||w.set)?l(O,D,w):O[D]=s[D]);return O})(y,d)}function _(){return _=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var r=arguments[d];for(var t in r)({}).hasOwnProperty.call(r,t)&&(y[t]=r[t])}return y},_.apply(null,arguments)}function b(y,d){var r=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(s){return Object.getOwnPropertyDescriptor(y,s).enumerable})),r.push.apply(r,t)}return r}function v(y){for(var d=1;d<arguments.length;d++){var r=arguments[d]!=null?arguments[d]:{};d%2?b(Object(r),!0).forEach(function(t){R(y,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(r,t))})}return y}function R(y,d,r){return(d=P(d))in y?Object.defineProperty(y,d,{value:r,enumerable:!0,configurable:!0,writable:!0}):y[d]=r,y}function P(y){var d=C(y,"string");return typeof d=="symbol"?d:d+""}function C(y,d){if(typeof y!="object"||!y)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var t=r.call(y,d);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function L(y,d){if(y==null)return{};var r={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)!==-1)continue;r[t]=y[t]}return r}let k=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=(d,r)=>{const t=r.size;this.props.onResize?(d.persist==null||d.persist(),this.setState(t,()=>this.props.onResize&&this.props.onResize(d,r))):this.setState(t)}}static getDerivedStateFromProps(d,r){return r.propsWidth!==d.width||r.propsHeight!==d.height?{width:d.width,height:d.height,propsWidth:d.width,propsHeight:d.height}:null}render(){const d=this.props,r=d.handle,t=d.handleSize;d.onResize;const s=d.onResizeStart,f=d.onResizeStop,l=d.draggableOpts,w=d.minConstraints,O=d.maxConstraints,D=d.lockAspectRatio,M=d.axis;d.width,d.height;const H=d.resizeHandles,T=d.style,N=d.transformScale,G=L(d,c);return n.createElement(o.default,{axis:M,draggableOpts:l,handle:r,handleSize:t,height:this.state.height,lockAspectRatio:D,maxConstraints:O,minConstraints:w,onResizeStart:s,onResize:this.onResize,onResizeStop:f,resizeHandles:H,transformScale:N,width:this.state.width},n.createElement("div",_({},G,{style:v(v({},T),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return gt.default=k,k.propTypes=v(v({},a.resizableProps),{},{children:i.default.element}),gt}var Lr;function Wn(){return Lr||(Lr=1,ft.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ft.exports.Resizable=Ir().default,ft.exports.ResizableBox=Nn().default),ft.exports}var Ye={},Nr;function Wr(){if(Nr)return Ye;Nr=1;var n={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resizeHandleType=Ye.resizeHandleAxesType=Ye.default=void 0;var i=a(Ue()),o=a(se);function a(x){return x&&x.__esModule?x:{default:x}}const c=Ye.resizeHandleAxesType=i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),u=Ye.resizeHandleType=i.default.oneOfType([i.default.node,i.default.func]);return Ye.default={className:i.default.string,style:i.default.object,width:i.default.number,autoSize:i.default.bool,cols:i.default.number,draggableCancel:i.default.string,draggableHandle:i.default.string,verticalCompact:function(x){x.verticalCompact===!1&&n.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:i.default.oneOf(["vertical","horizontal"]),layout:function(x){var _=x.layout;_!==void 0&&Qe().validateLayout(_,"layout")},margin:i.default.arrayOf(i.default.number),containerPadding:i.default.arrayOf(i.default.number),rowHeight:i.default.number,maxRows:i.default.number,isBounded:i.default.bool,isDraggable:i.default.bool,isResizable:i.default.bool,allowOverlap:i.default.bool,preventCollision:i.default.bool,useCSSTransforms:i.default.bool,transformScale:i.default.number,isDroppable:i.default.bool,resizeHandles:c,resizeHandle:u,onLayoutChange:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onDragStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,onResizeStop:i.default.func,onDrop:i.default.func,droppingItem:i.default.shape({i:i.default.string.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired}),children:function(x,_){const b=x[_],v={};o.default.Children.forEach(b,function(R){if((R==null?void 0:R.key)!=null){if(v[R.key])throw new Error('Duplicate child key "'+R.key+'" found! This will cause problems in ReactGridLayout.');v[R.key]=!0}})},innerRef:i.default.any},Ye}var Hr;function Hn(){if(Hr)return ut;Hr=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.default=void 0;var n=v(se),i=It,o=v(Ue()),a=Jt(),c=Wn(),u=Qe(),x=Bt(),_=Wr(),b=v(_t());function v(d){return d&&d.__esModule?d:{default:d}}function R(d,r){var t=Object.keys(d);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(d);r&&(s=s.filter(function(f){return Object.getOwnPropertyDescriptor(d,f).enumerable})),t.push.apply(t,s)}return t}function P(d){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?R(Object(t),!0).forEach(function(s){C(d,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(s){Object.defineProperty(d,s,Object.getOwnPropertyDescriptor(t,s))})}return d}function C(d,r,t){return(r=L(r))in d?Object.defineProperty(d,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):d[r]=t,d}function L(d){var r=k(d,"string");return typeof r=="symbol"?r:r+""}function k(d,r){if(typeof d!="object"||!d)return d;var t=d[Symbol.toPrimitive];if(t!==void 0){var s=t.call(d,r);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(d)}let y=class extends n.default.Component{constructor(){super(...arguments),C(this,"state",{resizing:null,dragging:null,className:""}),C(this,"elementRef",n.default.createRef()),C(this,"onDragStart",(r,t)=>{let{node:s}=t;const{onDragStart:f,transformScale:l}=this.props;if(!f)return;const w={top:0,left:0},{offsetParent:O}=s;if(!O)return;const D=O.getBoundingClientRect(),M=s.getBoundingClientRect(),H=M.left/l,T=D.left/l,N=M.top/l,G=D.top/l;w.left=H-T+O.scrollLeft,w.top=N-G+O.scrollTop,this.setState({dragging:w});const{x:X,y:V}=(0,x.calcXY)(this.getPositionParams(),w.top,w.left,this.props.w,this.props.h);return f.call(this,this.props.i,X,V,{e:r,node:s,newPosition:w})}),C(this,"onDrag",(r,t,s)=>{let{node:f,deltaX:l,deltaY:w}=t;const{onDrag:O}=this.props;if(!O)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let D=this.state.dragging.top+w,M=this.state.dragging.left+l;const{isBounded:H,i:T,w:N,h:G,containerWidth:X}=this.props,V=this.getPositionParams();if(H){const{offsetParent:be}=f;if(be){const{margin:ge,rowHeight:I}=this.props,W=be.clientHeight-(0,x.calcGridItemWHPx)(G,I,ge[1]);D=(0,x.clamp)(D,0,W);const ie=(0,x.calcGridColWidth)(V),oe=X-(0,x.calcGridItemWHPx)(N,ie,ge[0]);M=(0,x.clamp)(M,0,oe)}}const J={top:D,left:M};s?this.setState({dragging:J}):(0,i.flushSync)(()=>{this.setState({dragging:J})});const{x:K,y:re}=(0,x.calcXY)(V,D,M,N,G);return O.call(this,T,K,re,{e:r,node:f,newPosition:J})}),C(this,"onDragStop",(r,t)=>{let{node:s}=t;const{onDragStop:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:l,h:w,i:O}=this.props,{left:D,top:M}=this.state.dragging,H={top:M,left:D};this.setState({dragging:null});const{x:T,y:N}=(0,x.calcXY)(this.getPositionParams(),M,D,l,w);return f.call(this,O,T,N,{e:r,node:s,newPosition:H})}),C(this,"onResizeStop",(r,t,s)=>this.onResizeHandler(r,t,s,"onResizeStop")),C(this,"onResizeStart",(r,t,s)=>this.onResizeHandler(r,t,s,"onResizeStart")),C(this,"onResize",(r,t,s)=>this.onResizeHandler(r,t,s,"onResize"))}shouldComponentUpdate(r,t){if(this.props.children!==r.children||this.props.droppingPosition!==r.droppingPosition)return!0;const s=(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(r),r.x,r.y,r.w,r.h,t);return!(0,u.fastPositionEqual)(s,f)||this.props.useCSSTransforms!==r.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(r){this.moveDroppingItem(r)}moveDroppingItem(r){const{droppingPosition:t}=this.props;if(!t)return;const s=this.elementRef.current;if(!s)return;const f=r.droppingPosition||{left:0,top:0},{dragging:l}=this.state,w=l&&t.left!==f.left||t.top!==f.top;if(!l)this.onDragStart(t.e,{node:s,deltaX:t.left,deltaY:t.top});else if(w){const O=t.left-l.left,D=t.top-l.top;this.onDrag(t.e,{node:s,deltaX:O,deltaY:D},!0)}}getPositionParams(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:r.cols,containerPadding:r.containerPadding,containerWidth:r.containerWidth,margin:r.margin,maxRows:r.maxRows,rowHeight:r.rowHeight}}createStyle(r){const{usePercentages:t,containerWidth:s,useCSSTransforms:f}=this.props;let l;return f?l=(0,u.setTransform)(r):(l=(0,u.setTopLeft)(r),t&&(l.left=(0,u.perc)(r.left/s),l.width=(0,u.perc)(r.width/s))),l}mixinDraggable(r,t){return n.default.createElement(a.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},r)}curryResizeHandler(r,t){return(s,f)=>t(s,f,r)}mixinResizable(r,t,s){const{cols:f,minW:l,minH:w,maxW:O,maxH:D,transformScale:M,resizeHandles:H,resizeHandle:T}=this.props,N=this.getPositionParams(),G=(0,x.calcGridItemPosition)(N,0,0,f,0).width,X=(0,x.calcGridItemPosition)(N,0,0,l,w),V=(0,x.calcGridItemPosition)(N,0,0,O,D),J=[X.width,X.height],K=[Math.min(V.width,G),Math.min(V.height,1/0)];return n.default.createElement(c.Resizable,{draggableOpts:{disabled:!s},className:s?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:J,maxConstraints:K,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:M,resizeHandles:H,handle:T},r)}onResizeHandler(r,t,s,f){let{node:l,size:w,handle:O}=t;const D=this.props[f];if(!D)return;const{x:M,y:H,i:T,maxH:N,minH:G,containerWidth:X}=this.props,{minW:V,maxW:J}=this.props;let K=w;l&&(K=(0,u.resizeItemInDirection)(O,s,w,X),(0,i.flushSync)(()=>{this.setState({resizing:f==="onResizeStop"?null:K})}));let{w:re,h:be}=(0,x.calcWH)(this.getPositionParams(),K.width,K.height,M,H,O);re=(0,x.clamp)(re,Math.max(V,1),J),be=(0,x.clamp)(be,G,N),D.call(this,T,re,be,{e:r,node:l,size:K,handle:O})}render(){const{x:r,y:t,w:s,h:f,isDraggable:l,isResizable:w,droppingPosition:O,useCSSTransforms:D}=this.props,M=(0,x.calcGridItemPosition)(this.getPositionParams(),r,t,s,f,this.state),H=n.default.Children.only(this.props.children);let T=n.default.cloneElement(H,{ref:this.elementRef,className:(0,b.default)("react-grid-item",H.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":l,"react-draggable-dragging":!!this.state.dragging,dropping:!!O,cssTransforms:D}),style:P(P(P({},this.props.style),H.props.style),this.createStyle(M))});return T=this.mixinResizable(T,M,w),T=this.mixinDraggable(T,l),T}};return ut.default=y,C(y,"propTypes",{children:o.default.element,cols:o.default.number.isRequired,containerWidth:o.default.number.isRequired,rowHeight:o.default.number.isRequired,margin:o.default.array.isRequired,maxRows:o.default.number.isRequired,containerPadding:o.default.array.isRequired,x:o.default.number.isRequired,y:o.default.number.isRequired,w:o.default.number.isRequired,h:o.default.number.isRequired,minW:function(d,r){const t=d[r];if(typeof t!="number")return new Error("minWidth not Number");if(t>d.w||t>d.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(d,r){const t=d[r];if(typeof t!="number")return new Error("maxWidth not Number");if(t<d.w||t<d.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(d,r){const t=d[r];if(typeof t!="number")return new Error("minHeight not Number");if(t>d.h||t>d.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(d,r){const t=d[r];if(typeof t!="number")return new Error("maxHeight not Number");if(t<d.h||t<d.minH)return new Error("maxHeight smaller than item height/minHeight")},i:o.default.string.isRequired,resizeHandles:_.resizeHandleAxesType,resizeHandle:_.resizeHandleType,onDragStop:o.default.func,onDragStart:o.default.func,onDrag:o.default.func,onResizeStop:o.default.func,onResizeStart:o.default.func,onResize:o.default.func,isDraggable:o.default.bool.isRequired,isResizable:o.default.bool.isRequired,isBounded:o.default.bool.isRequired,static:o.default.bool,useCSSTransforms:o.default.bool.isRequired,transformScale:o.default.number,className:o.default.string,handle:o.default.string,cancel:o.default.string,droppingPosition:o.default.shape({e:o.default.object.isRequired,left:o.default.number.isRequired,top:o.default.number.isRequired})}),C(y,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),ut}var Br;function qr(){if(Br)return lt;Br=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var n=b(se),i=Wt(),o=_(_t()),a=Qe(),c=Bt(),u=_(Hn()),x=_(Wr());function _(r){return r&&r.__esModule?r:{default:r}}function b(r,t){if(typeof WeakMap=="function")var s=new WeakMap,f=new WeakMap;return(b=function(l,w){if(!w&&l&&l.__esModule)return l;var O,D,M={__proto__:null,default:l};if(l===null||typeof l!="object"&&typeof l!="function")return M;if(O=w?f:s){if(O.has(l))return O.get(l);O.set(l,M)}for(const H in l)H!=="default"&&{}.hasOwnProperty.call(l,H)&&((D=(O=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,H))&&(D.get||D.set)?O(M,H,D):M[H]=l[H]);return M})(r,t)}function v(r,t){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);t&&(f=f.filter(function(l){return Object.getOwnPropertyDescriptor(r,l).enumerable})),s.push.apply(s,f)}return s}function R(r){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?v(Object(s),!0).forEach(function(f){P(r,f,s[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):v(Object(s)).forEach(function(f){Object.defineProperty(r,f,Object.getOwnPropertyDescriptor(s,f))})}return r}function P(r,t,s){return(t=C(t))in r?Object.defineProperty(r,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[t]=s,r}function C(r){var t=L(r,"string");return typeof t=="symbol"?t:t+""}function L(r,t){if(typeof r!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var f=s.call(r,t);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}const k="react-grid-layout";let y=!1;try{y=/firefox/i.test(navigator.userAgent)}catch{}let d=class extends n.Component{constructor(){super(...arguments),P(this,"state",{activeDrag:null,layout:(0,a.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,a.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,s,f,l)=>{let{e:w,node:O}=l;const{layout:D}=this.state,M=(0,a.getLayoutItem)(D,t);if(!M)return;const H={w:M.w,h:M.h,x:M.x,y:M.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,a.cloneLayoutItem)(M),oldLayout:D,activeDrag:H}),this.props.onDragStart(D,M,M,null,w,O)}),P(this,"onDrag",(t,s,f,l)=>{let{e:w,node:O}=l;const{oldDragItem:D}=this.state;let{layout:M}=this.state;const{cols:H,allowOverlap:T,preventCollision:N}=this.props,G=(0,a.getLayoutItem)(M,t);if(!G)return;const X={w:G.w,h:G.h,x:G.x,y:G.y,placeholder:!0,i:t};M=(0,a.moveElement)(M,G,s,f,!0,N,(0,a.compactType)(this.props),H,T),this.props.onDrag(M,D,G,X,w,O),this.setState({layout:T?M:(0,a.compact)(M,(0,a.compactType)(this.props),H),activeDrag:X})}),P(this,"onDragStop",(t,s,f,l)=>{let{e:w,node:O}=l;if(!this.state.activeDrag)return;const{oldDragItem:D}=this.state;let{layout:M}=this.state;const{cols:H,preventCollision:T,allowOverlap:N}=this.props,G=(0,a.getLayoutItem)(M,t);if(!G)return;M=(0,a.moveElement)(M,G,s,f,!0,T,(0,a.compactType)(this.props),H,N);const V=N?M:(0,a.compact)(M,(0,a.compactType)(this.props),H);this.props.onDragStop(V,D,G,null,w,O);const{oldLayout:J}=this.state;this.setState({activeDrag:null,layout:V,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(V,J)}),P(this,"onResizeStart",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D}=this.state,M=(0,a.getLayoutItem)(D,t);M&&(this.setState({oldResizeItem:(0,a.cloneLayoutItem)(M),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(D,M,M,null,w,O))}),P(this,"onResize",(t,s,f,l)=>{let{e:w,node:O,size:D,handle:M}=l;const{oldResizeItem:H}=this.state,{layout:T}=this.state,{cols:N,preventCollision:G,allowOverlap:X}=this.props;let V=!1,J,K,re;const[be,ge]=(0,a.withLayoutItem)(T,t,W=>{let ie;return K=W.x,re=W.y,["sw","w","nw","n","ne"].indexOf(M)!==-1&&(["sw","nw","w"].indexOf(M)!==-1&&(K=W.x+(W.w-s),s=W.x!==K&&K<0?W.w:s,K=K<0?0:K),["ne","n","nw"].indexOf(M)!==-1&&(re=W.y+(W.h-f),f=W.y!==re&&re<0?W.h:f,re=re<0?0:re),V=!0),G&&!X&&(ie=(0,a.getAllCollisions)(T,R(R({},W),{},{w:s,h:f,x:K,y:re})).filter(ae=>ae.i!==W.i).length>0,ie&&(re=W.y,f=W.h,K=W.x,s=W.w,V=!1)),W.w=s,W.h=f,W});if(!ge)return;J=be,V&&(J=(0,a.moveElement)(be,ge,K,re,!0,this.props.preventCollision,(0,a.compactType)(this.props),N,X));const I={w:ge.w,h:ge.h,x:ge.x,y:ge.y,static:!0,i:t};this.props.onResize(J,H,ge,I,w,O),this.setState({layout:X?J:(0,a.compact)(J,(0,a.compactType)(this.props),N),activeDrag:I})}),P(this,"onResizeStop",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D,oldResizeItem:M}=this.state,{cols:H,allowOverlap:T}=this.props,N=(0,a.getLayoutItem)(D,t),G=T?D:(0,a.compact)(D,(0,a.compactType)(this.props),H);this.props.onResizeStop(G,M,N,null,w,O);const{oldLayout:X}=this.state;this.setState({activeDrag:null,layout:G,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(G,X)}),P(this,"onDragOver",t=>{var s;if(t.preventDefault(),t.stopPropagation(),y&&!((s=t.nativeEvent.target)!==null&&s!==void 0&&s.classList.contains(k)))return!1;const{droppingItem:f,onDropDragOver:l,margin:w,cols:O,rowHeight:D,maxRows:M,width:H,containerPadding:T,transformScale:N}=this.props,G=l==null?void 0:l(t);if(G===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const X=R(R({},f),G),{layout:V}=this.state,J=t.currentTarget.getBoundingClientRect(),K=t.clientX-J.left,re=t.clientY-J.top,be={left:K/N,top:re/N,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ge,top:I}=this.state.droppingPosition;(ge!=K||I!=re)&&this.setState({droppingPosition:be})}}else{const ge={cols:O,margin:w,maxRows:M,rowHeight:D,containerWidth:H,containerPadding:T||w},I=(0,c.calcXY)(ge,re,K,X.w,X.h);this.setState({droppingDOMNode:n.createElement("div",{key:X.i}),droppingPosition:be,layout:[...V,R(R({},X),{},{x:I.x,y:I.y,static:!1,isDraggable:!0})]})}}),P(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:s}=this.props,{layout:f}=this.state,l=(0,a.compact)(f.filter(w=>w.i!==t.i),(0,a.compactType)(this.props),s,this.props.allowOverlap);this.setState({layout:l,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:s}=this.props,{layout:f}=this.state,l=f.find(w=>w.i===s.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,l,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,s){let f;return s.activeDrag?null:(!(0,i.deepEqual)(t.layout,s.propsLayout)||t.compactType!==s.compactType?f=t.layout:(0,a.childrenEqual)(t.children,s.children)||(f=s.layout),f?{layout:(0,a.synchronizeLayoutWithChildren)(f,t.children,t.cols,(0,a.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,s){return this.props.children!==t.children||!(0,a.fastRGLPropsEqual)(this.props,t,i.deepEqual)||this.state.activeDrag!==s.activeDrag||this.state.mounted!==s.mounted||this.state.droppingPosition!==s.droppingPosition}componentDidUpdate(t,s){if(!this.state.activeDrag){const f=this.state.layout,l=s.layout;this.onLayoutMaybeChanged(f,l)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,a.bottom)(this.state.layout),s=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+s*2+"px"}onLayoutMaybeChanged(t,s){s||(s=this.state.layout),(0,i.deepEqual)(s,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:s,cols:f,margin:l,containerPadding:w,rowHeight:O,maxRows:D,useCSSTransforms:M,transformScale:H}=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:s,cols:f,margin:l,containerPadding:w||l,maxRows:D,rowHeight:O,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:M,transformScale:H},n.createElement("div",null))}processGridItem(t,s){if(!t||!t.key)return;const f=(0,a.getLayoutItem)(this.state.layout,String(t.key));if(!f)return null;const{width:l,cols:w,margin:O,containerPadding:D,rowHeight:M,maxRows:H,isDraggable:T,isResizable:N,isBounded:G,useCSSTransforms:X,transformScale:V,draggableCancel:J,draggableHandle:K,resizeHandles:re,resizeHandle:be}=this.props,{mounted:ge,droppingPosition:I}=this.state,W=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&T,ie=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&N,oe=f.resizeHandles||re,ae=W&&G&&f.isBounded!==!1;return n.createElement(u.default,{containerWidth:l,cols:w,margin:O,containerPadding:D||O,maxRows:H,rowHeight:M,cancel:J,handle:K,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:W,isResizable:ie,isBounded:ae,useCSSTransforms:X&&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:s?I:void 0,resizeHandles:oe,resizeHandle:be},t)}render(){const{className:t,style:s,isDroppable:f,innerRef:l}=this.props,w=(0,o.default)(k,t),O=R({height:this.containerHeight()},s);return n.createElement("div",{ref:l,className:w,style:O,onDrop:f?this.onDrop:a.noop,onDragLeave:f?this.onDragLeave:a.noop,onDragEnter:f?this.onDragEnter:a.noop,onDragOver:f?this.onDragOver:a.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=d,P(d,"displayName","ReactGridLayout"),P(d,"propTypes",x.default),P(d,"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:a.noop,onDragStart:a.noop,onDrag:a.noop,onDragStop:a.noop,onResizeStart:a.noop,onResize:a.noop,onResizeStop:a.noop,onDrop:a.noop,onDropDragOver:a.noop}),lt}var yt={},Xe={},Fr;function Yr(){if(Fr)return Xe;Fr=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.findOrGenerateResponsiveLayout=a,Xe.getBreakpointFromWidth=i,Xe.getColsFromBreakpoint=o,Xe.sortBreakpoints=c;var n=Qe();function i(u,x){const _=c(u);let b=_[0];for(let v=1,R=_.length;v<R;v++){const P=_[v];x>u[P]&&(b=P)}return b}function o(u,x){if(!x[u])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+u+" is missing!");return x[u]}function a(u,x,_,b,v,R){if(u[_])return(0,n.cloneLayout)(u[_]);let P=u[b];const C=c(x),L=C.slice(C.indexOf(_));for(let k=0,y=L.length;k<y;k++){const d=L[k];if(u[d]){P=u[d];break}}return P=(0,n.cloneLayout)(P||[]),(0,n.compact)((0,n.correctBounds)(P,{cols:v}),R,v)}function c(u){return Object.keys(u).sort(function(_,b){return u[_]-u[b]})}return Xe}var Gr;function Bn(){if(Gr)return yt;Gr=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.default=void 0;var n=b(se),i=_(Ue()),o=Wt(),a=Qe(),c=Yr(),u=_(qr());const x=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function _(f){return f&&f.__esModule?f:{default:f}}function b(f,l){if(typeof WeakMap=="function")var w=new WeakMap,O=new WeakMap;return(b=function(D,M){if(!M&&D&&D.__esModule)return D;var H,T,N={__proto__:null,default:D};if(D===null||typeof D!="object"&&typeof D!="function")return N;if(H=M?O:w){if(H.has(D))return H.get(D);H.set(D,N)}for(const G in D)G!=="default"&&{}.hasOwnProperty.call(D,G)&&((T=(H=Object.defineProperty)&&Object.getOwnPropertyDescriptor(D,G))&&(T.get||T.set)?H(N,G,T):N[G]=D[G]);return N})(f,l)}function v(){return v=Object.assign?Object.assign.bind():function(f){for(var l=1;l<arguments.length;l++){var w=arguments[l];for(var O in w)({}).hasOwnProperty.call(w,O)&&(f[O]=w[O])}return f},v.apply(null,arguments)}function R(f,l){if(f==null)return{};var w,O,D=P(f,l);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(f);for(O=0;O<M.length;O++)w=M[O],l.indexOf(w)===-1&&{}.propertyIsEnumerable.call(f,w)&&(D[w]=f[w])}return D}function P(f,l){if(f==null)return{};var w={};for(var O in f)if({}.hasOwnProperty.call(f,O)){if(l.indexOf(O)!==-1)continue;w[O]=f[O]}return w}function C(f,l){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(f);l&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(f,D).enumerable})),w.push.apply(w,O)}return w}function L(f){for(var l=1;l<arguments.length;l++){var w=arguments[l]!=null?arguments[l]:{};l%2?C(Object(w),!0).forEach(function(O){k(f,O,w[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):C(Object(w)).forEach(function(O){Object.defineProperty(f,O,Object.getOwnPropertyDescriptor(w,O))})}return f}function k(f,l,w){return(l=y(l))in f?Object.defineProperty(f,l,{value:w,enumerable:!0,configurable:!0,writable:!0}):f[l]=w,f}function y(f){var l=d(f,"string");return typeof l=="symbol"?l:l+""}function d(f,l){if(typeof f!="object"||!f)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var O=w.call(f,l);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(f)}const r=f=>Object.prototype.toString.call(f);function t(f,l){return f==null?null:Array.isArray(f)?f:f[l]}let s=class extends n.Component{constructor(){super(...arguments),k(this,"state",this.generateInitialState()),k(this,"onLayoutChange",l=>{this.props.onLayoutChange(l,L(L({},this.props.layouts),{},{[this.state.breakpoint]:l}))})}generateInitialState(){const{width:l,breakpoints:w,layouts:O,cols:D}=this.props,M=(0,c.getBreakpointFromWidth)(w,l),H=(0,c.getColsFromBreakpoint)(M,D),T=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,c.findOrGenerateResponsiveLayout)(O,w,M,M,H,T),breakpoint:M,cols:H}}static getDerivedStateFromProps(l,w){if(!(0,o.deepEqual)(l.layouts,w.layouts)){const{breakpoint:O,cols:D}=w;return{layout:(0,c.findOrGenerateResponsiveLayout)(l.layouts,l.breakpoints,O,O,D,l.compactType),layouts:l.layouts}}return null}componentDidUpdate(l){(this.props.width!=l.width||this.props.breakpoint!==l.breakpoint||!(0,o.deepEqual)(this.props.breakpoints,l.breakpoints)||!(0,o.deepEqual)(this.props.cols,l.cols))&&this.onWidthChange(l)}onWidthChange(l){const{breakpoints:w,cols:O,layouts:D,compactType:M}=this.props,H=this.props.breakpoint||(0,c.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),T=this.state.breakpoint,N=(0,c.getColsFromBreakpoint)(H,O),G=L({},D);if(T!==H||l.breakpoints!==w||l.cols!==O){T in G||(G[T]=(0,a.cloneLayout)(this.state.layout));let J=(0,c.findOrGenerateResponsiveLayout)(G,w,H,T,N,M);J=(0,a.synchronizeLayoutWithChildren)(J,this.props.children,N,M,this.props.allowOverlap),G[H]=J,this.props.onBreakpointChange(H,N),this.props.onLayoutChange(J,G),this.setState({breakpoint:H,layout:J,cols:N})}const X=t(this.props.margin,H),V=t(this.props.containerPadding,H);this.props.onWidthChange(this.props.width,X,N,V)}render(){const l=this.props,{breakpoint:w,breakpoints:O,cols:D,layouts:M,margin:H,containerPadding:T,onBreakpointChange:N,onLayoutChange:G,onWidthChange:X}=l,V=R(l,x);return n.createElement(u.default,v({},V,{margin:t(H,this.state.breakpoint),containerPadding:t(T,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return yt.default=s,k(s,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts(f,l){if(r(f[l])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+r(f[l]));Object.keys(f[l]).forEach(w=>{if(!(w in f.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,a.validateLayout)(f.layouts[w],"layouts."+w)})},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),k(s,"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:a.noop,onLayoutChange:a.noop,onWidthChange:a.noop}),yt}var Tt={},Vr=(function(){if(typeof Map<"u")return Map;function n(i,o){var a=-1;return i.some(function(c,u){return c[0]===o?(a=u,!0):!1}),a}return(function(){function i(){this.__entries__=[]}return Object.defineProperty(i.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),i.prototype.get=function(o){var a=n(this.__entries__,o),c=this.__entries__[a];return c&&c[1]},i.prototype.set=function(o,a){var c=n(this.__entries__,o);~c?this.__entries__[c][1]=a:this.__entries__.push([o,a])},i.prototype.delete=function(o){var a=this.__entries__,c=n(a,o);~c&&a.splice(c,1)},i.prototype.has=function(o){return!!~n(this.__entries__,o)},i.prototype.clear=function(){this.__entries__.splice(0)},i.prototype.forEach=function(o,a){a===void 0&&(a=null);for(var c=0,u=this.__entries__;c<u.length;c++){var x=u[c];o.call(a,x[1],x[0])}},i})()})(),Kt=typeof window<"u"&&typeof document<"u"&&window.document===document,zt=(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")()})(),qn=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(zt):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}})(),Fn=2;function Yn(n,i){var o=!1,a=!1,c=0;function u(){o&&(o=!1,n()),a&&_()}function x(){qn(u)}function _(){var b=Date.now();if(o){if(b-c<Fn)return;a=!0}else o=!0,a=!1,setTimeout(x,i);c=b}return _}var Gn=20,Vn=["top","right","bottom","left","width","height","size","weight"],Un=typeof MutationObserver<"u",$n=(function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Yn(this.refresh.bind(this),Gn)}return n.prototype.addObserver=function(i){~this.observers_.indexOf(i)||this.observers_.push(i),this.connected_||this.connect_()},n.prototype.removeObserver=function(i){var o=this.observers_,a=o.indexOf(i);~a&&o.splice(a,1),!o.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var i=this.updateObservers_();i&&this.refresh()},n.prototype.updateObservers_=function(){var i=this.observers_.filter(function(o){return o.gatherActive(),o.hasActive()});return i.forEach(function(o){return o.broadcastActive()}),i.length>0},n.prototype.connect_=function(){!Kt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Un?(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(){!Kt||!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(i){var o=i.propertyName,a=o===void 0?"":o,c=Vn.some(function(u){return!!~a.indexOf(u)});c&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n})(),Ur=(function(n,i){for(var o=0,a=Object.keys(i);o<a.length;o++){var c=a[o];Object.defineProperty(n,c,{value:i[c],enumerable:!1,writable:!1,configurable:!0})}return n}),Ze=(function(n){var i=n&&n.ownerDocument&&n.ownerDocument.defaultView;return i||zt}),$r=Mt(0,0,0,0);function kt(n){return parseFloat(n)||0}function Xr(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return i.reduce(function(a,c){var u=n["border-"+c+"-width"];return a+kt(u)},0)}function Xn(n){for(var i=["top","right","bottom","left"],o={},a=0,c=i;a<c.length;a++){var u=c[a],x=n["padding-"+u];o[u]=kt(x)}return o}function Jn(n){var i=n.getBBox();return Mt(0,0,i.width,i.height)}function Kn(n){var i=n.clientWidth,o=n.clientHeight;if(!i&&!o)return $r;var a=Ze(n).getComputedStyle(n),c=Xn(a),u=c.left+c.right,x=c.top+c.bottom,_=kt(a.width),b=kt(a.height);if(a.boxSizing==="border-box"&&(Math.round(_+u)!==i&&(_-=Xr(a,"left","right")+u),Math.round(b+x)!==o&&(b-=Xr(a,"top","bottom")+x)),!Zn(n)){var v=Math.round(_+u)-i,R=Math.round(b+x)-o;Math.abs(v)!==1&&(_-=v),Math.abs(R)!==1&&(b-=R)}return Mt(c.left,c.top,_,b)}var Qn=(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 Zn(n){return n===Ze(n).document.documentElement}function eo(n){return Kt?Qn(n)?Jn(n):Kn(n):$r}function to(n){var i=n.x,o=n.y,a=n.width,c=n.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,x=Object.create(u.prototype);return Ur(x,{x:i,y:o,width:a,height:c,top:o,right:i+a,bottom:c+o,left:i}),x}function Mt(n,i,o,a){return{x:n,y:i,width:o,height:a}}var ro=(function(){function n(i){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Mt(0,0,0,0),this.target=i}return n.prototype.isActive=function(){var i=eo(this.target);return this.contentRect_=i,i.width!==this.broadcastWidth||i.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var i=this.contentRect_;return this.broadcastWidth=i.width,this.broadcastHeight=i.height,i},n})(),no=(function(){function n(i,o){var a=to(o);Ur(this,{target:i,contentRect:a})}return n})(),oo=(function(){function n(i,o,a){if(this.activeObservations_=[],this.observations_=new Vr,typeof i!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=i,this.controller_=o,this.callbackCtx_=a}return n.prototype.observe=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(i instanceof Ze(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var o=this.observations_;o.has(i)||(o.set(i,new ro(i)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(i instanceof Ze(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var o=this.observations_;o.has(i)&&(o.delete(i),o.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var i=this;this.clearActive(),this.observations_.forEach(function(o){o.isActive()&&i.activeObservations_.push(o)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var i=this.callbackCtx_,o=this.activeObservations_.map(function(a){return new no(a.target,a.broadcastRect())});this.callback_.call(i,o,i),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n})(),Jr=typeof WeakMap<"u"?new WeakMap:new Vr,Kr=(function(){function n(i){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 o=$n.getInstance(),a=new oo(i,o,this);Jr.set(this,a)}return n})();["observe","unobserve","disconnect"].forEach(function(n){Kr.prototype[n]=function(){var i;return(i=Jr.get(this))[n].apply(i,arguments)}});var io=(function(){return typeof zt.ResizeObserver<"u"?zt.ResizeObserver:Kr})();const so=fn(Object.freeze(Object.defineProperty({__proto__:null,default:io},Symbol.toStringTag,{value:"Module"})));var Qr;function ao(){if(Qr)return Tt;Qr=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.default=k;var n=x(se),i=u(Ue()),o=u(so),a=u(_t());const c=["measureBeforeMount"];function u(y){return y&&y.__esModule?y:{default:y}}function x(y,d){if(typeof WeakMap=="function")var r=new WeakMap,t=new WeakMap;return(x=function(s,f){if(!f&&s&&s.__esModule)return s;var l,w,O={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return O;if(l=f?t:r){if(l.has(s))return l.get(s);l.set(s,O)}for(const D in s)D!=="default"&&{}.hasOwnProperty.call(s,D)&&((w=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,D))&&(w.get||w.set)?l(O,D,w):O[D]=s[D]);return O})(y,d)}function _(){return _=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var r=arguments[d];for(var t in r)({}).hasOwnProperty.call(r,t)&&(y[t]=r[t])}return y},_.apply(null,arguments)}function b(y,d){if(y==null)return{};var r,t,s=v(y,d);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(y);for(t=0;t<f.length;t++)r=f[t],d.indexOf(r)===-1&&{}.propertyIsEnumerable.call(y,r)&&(s[r]=y[r])}return s}function v(y,d){if(y==null)return{};var r={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)!==-1)continue;r[t]=y[t]}return r}function R(y,d,r){return(d=P(d))in y?Object.defineProperty(y,d,{value:r,enumerable:!0,configurable:!0,writable:!0}):y[d]=r,y}function P(y){var d=C(y,"string");return typeof d=="symbol"?d:d+""}function C(y,d){if(typeof y!="object"||!y)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var t=r.call(y,d);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const L="react-grid-layout";function k(y){var d;return d=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 o.default(s=>{if(this.elementRef.current instanceof HTMLElement){const l=s[0].contentRect.width;this.setState({width:l})}});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:s}=t,f=b(t,c);return s&&!this.mounted?n.createElement("div",{className:(0,a.default)(this.props.className,L),style:this.props.style,ref:this.elementRef}):n.createElement(y,_({innerRef:this.elementRef},f,this.state))}},R(d,"defaultProps",{measureBeforeMount:!1}),R(d,"propTypes",{measureBeforeMount:i.default.bool}),d}return Tt}var Zr;function lo(){return Zr||(Zr=1,(function(n){n.exports=qr().default,n.exports.utils=Qe(),n.exports.calculateUtils=Bt(),n.exports.Responsive=Bn().default,n.exports.Responsive.utils=Yr(),n.exports.WidthProvider=ao().default})(Nt)),Nt.exports}var co=lo();const uo=dn(co);function en(n){const i=[];i.push(1,1,0,1,1,0,1,1);for(let o=0;o<n.length;o++){const c=(n.charCodeAt(o)%103).toString(2).padStart(7,"0");for(const u of c)i.push(u==="1"?1:0)}return i.push(1,1,0,0,0,1,1,0,0,0,1,1),i}const Qt=({value:n,format:i})=>{const o=se.useMemo(()=>en(n),[n,i]);if(!n)return e.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置条形码值"});const a=2,c=44,u=o.length*a;return e.jsxs("div",{style:{textAlign:"center",overflow:"hidden",maxWidth:"100%"},children:[e.jsx("canvas",{ref:x=>{if(!x)return;const _=x.getContext("2d");_&&(x.width=u,x.height=c,_.clearRect(0,0,u,c),o.forEach((b,v)=>{_.fillStyle=b===1?"#000":"#fff",_.fillRect(v*a,0,a,c)}))},style:{width:"100%",maxWidth:u,height:c}}),e.jsx("div",{style:{fontSize:10,marginTop:1,letterSpacing:1},children:n})]})},Zt=({value:n,errorLevel:i="M",color:o="#000000",backgroundColor:a="#ffffff"})=>n?e.jsx(E.QRCode,{value:n,type:"svg",bordered:!1,errorLevel:i,color:o,bgColor:a,style:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%"}}):e.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置二维码内容"}),fo=uo,tn=se.memo(({comp:n,selected:i,isPreview:o=!1,dataSources:a=[]})=>{const c={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",outline:o?"none":i?"2px solid #1677ff":"1px dashed #d9d9d9",outlineOffset:-1},u=x=>Ke(n,x,a);switch(n.type){case"text":return e.jsx("div",{style:{...c,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:wt(u("content")||"",n.props.format)});case"image":const x=u("src")||n.props.src;return e.jsx("div",{style:c,children:x?e.jsx("img",{src:x,style:{width:"100%",height:"100%",objectFit:n.props.fit||"contain"},alt:""}):e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#bbb",fontSize:12},children:"请在属性中设置图片地址"})});case"table":return e.jsx(po,{comp:n,style:c,dataSources:a});case"barcode":const _=u("value")||n.props.value||"123456";return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Qt,{value:_,format:n.props.format||"CODE128"})});case"qrcode":const b=u("value")||n.props.value||"https://example.com";return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Zt,{value:b,errorLevel:n.props.errorLevel||"M",color:n.props.color||"#000000",backgroundColor:n.props.backgroundColor||"#ffffff"})});case"line":return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",border:"none",outline:i?"2px solid #1677ff":"1px dashed transparent"},children:e.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 e.jsx("div",{style:c,children:n.type})}}),po=({comp:n,style:i,dataSources:o=[]})=>{const a=n.props.borderWidth||1,c=n.props.borderColor||"#000",u=n.props.headerBackgroundColor||"#f5f5f5",x=n.props.headerColor||"#000000",_=n.props.headerFontSize||12,b=n.tableColumns||[],v=n.props.tableDataSourceId,R=v?o.find(k=>k.id===v):null,P=R?Ct(R):null;if(P&&P.length>0)return e.jsxs("table",{style:{...i,borderCollapse:"collapse",width:"100%",height:"100%"},children:[b.length>0&&e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:u},children:b.map((k,y)=>e.jsx("th",{style:{border:`${a}px solid ${c}`,padding:4,fontSize:_,fontWeight:"bold",textAlign:"center",color:x},children:k.title},y))})}),e.jsx("tbody",{children:P.map((k,y)=>e.jsx("tr",{children:b.map((d,r)=>e.jsx("td",{style:{border:`${a}px solid ${c}`,padding:4,fontSize:12,textAlign:"center"},children:d.fieldPath?k[d.fieldPath]:""},r))},y))})]});const C=n.props.rows||3,L=Math.max(n.props.cols||3,b.length||3);return e.jsx("table",{style:{...i,borderCollapse:"collapse",width:"100%",height:"100%"},children:e.jsx("tbody",{children:Array.from({length:C}).map((k,y)=>e.jsx("tr",{children:Array.from({length:L}).map((d,r)=>e.jsx("td",{style:{border:`${a}px solid ${c}`,padding:2,fontSize:12,textAlign:"center"},children:" "},r))},y))})})},rn=({isPreview:n=!1,dataSources:i})=>{const o=pe(s=>s.components),a=pe(s=>s.selectedId),c=pe(s=>s.pageSettings),u=pe(s=>s.selectComponent);pe(s=>s.updateComponent);const x=pe(s=>s.setComponents),_=pe(s=>s.addComponent),b=pe(s=>s.gridSettings),v=pe(s=>s.dataSources),R=i||v,P=se.useMemo(()=>{const s=bt[c.paperSize];if(!s)return{width:c.customWidth*De,height:c.customHeight*De};const f=s.width*De,l=s.height*De;return c.orientation==="landscape"?{width:l,height:f}:{width:f,height:l}},[c]),C=se.useMemo(()=>({top:c.marginTop*De,right:c.marginRight*De,bottom:c.marginBottom*De,left:c.marginLeft*De}),[c]),L=P.width-C.left-C.right,k=P.height-C.top-C.bottom,y=se.useMemo(()=>o.map(s=>({i:s.id,x:s.x,y:s.y,w:s.w,h:s.h})),[o]),d=se.useCallback(s=>{const f=o.map((l,w)=>{const O=s[w];return O?{...l,x:O.x,y:O.y,w:O.w,h:O.h}:l});x(f)},[o,x]),r=se.useCallback((s,f,l)=>{var M,H;const w=l,O=(M=w.dataTransfer)==null?void 0:M.getData("componentType");if(!O)return;const D=(H=l.target.closest(".react-grid-layout"))==null?void 0:H.getBoundingClientRect();if(D){const T=Math.floor((w.clientX-D.left)/(L/b.cols)),N=Math.floor((w.clientY-D.top)/(L/b.cols));_(O,Math.max(0,T),Math.max(0,N))}else _(O)},[_,L,b.cols]),t=se.useCallback(s=>{u(s===a?null:s)},[u,a]);return e.jsx("div",{style:{flex:1,overflow:"auto",background:"#e8e8e8",display:"flex",justifyContent:"center",padding:"24px 0"},children:e.jsxs("div",{id:"print-paper",style:{width:P.width,height:P.height,background:"#fff",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",position:"relative",flexShrink:0},children:[c.showHeader&&e.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:c.headerContent}),c.showFooter&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:C.left,right:C.right,height:C.bottom,display:"flex",alignItems:"center",justifyContent:c.showPageNumber?"space-between":"center",fontSize:12,color:"#999",borderTop:"1px dashed #ddd",overflow:"hidden",padding:"0 8px"},children:[e.jsx("span",{children:c.footerContent}),c.showPageNumber&&e.jsx("span",{children:c.pageNumberFormat.replace("{page}","1")})]}),e.jsx("div",{style:{position:"absolute",top:C.top,left:C.left,width:L,height:k},children:n?e.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:o.map(s=>{const f=L/b.cols,l=L/b.cols,w={position:"absolute",left:s.x*f,top:s.y*l,width:s.w*f,height:s.h*l};return e.jsx("div",{style:w,children:e.jsx(tn,{comp:s,selected:!1,isPreview:!0,dataSources:R})},s.id)})}):e.jsx(fo,{className:"canvas-grid",layout:y,cols:b.cols,rowHeight:L/b.cols,width:L,margin:[0,0],containerPadding:[0,0],onLayoutChange:d,onDrop:r,isDroppable:!0,isResizable:!0,isDraggable:!0,compactType:null,preventCollision:!0,draggableHandle:".grid-item-drag-handle",style:{minHeight:k},children:o.map(s=>e.jsx("div",{className:"grid-item-drag-handle",onClick:()=>t(s.id),style:{cursor:"move"},children:e.jsx(tn,{comp:s,selected:s.id===a,dataSources:R})},s.id))})})]})})},{Text:je,Title:Do}=E.Typography,{TextArea:ho}=E.Input,go=()=>{const n=pe(r=>r.components),i=pe(r=>r.selectedId),o=pe(r=>r.dataSources),a=pe(r=>r.updateComponent),c=pe(r=>r.updateComponentTableColumns),u=se.useMemo(()=>n.find(r=>r.id===i)||null,[n,i]),[x,_]=se.useState([]),b=se.useMemo(()=>[{label:"无(使用静态值)",value:""},...o.map(r=>({label:r.name,value:r.id,type:r.type}))],[o]),v=se.useCallback((r,t)=>{i&&a(i,{props:{...u==null?void 0:u.props,[r]:t}})},[i,u,a]),R=se.useCallback((r,t,s,f)=>{if(!i)return;let l=f;t&&s&&(l=f);const w=`${r}Binding`;a(i,{props:{...u==null?void 0:u.props,[r]:l,[w]:{dataSourceId:t,fieldPath:s,staticValue:f}}})},[i,u,a]),P=se.useCallback(r=>{const t=u==null?void 0:u.props[`${r}Binding`],s=String((u==null?void 0:u.props[r])||"");return t?{field:r,dataSourceId:t.dataSourceId||null,fieldPath:t.fieldPath||"",staticValue:t.staticValue??s}:{field:r,dataSourceId:null,fieldPath:"",staticValue:s}},[u]);if(!u)return e.jsx(E.Card,{title:"属性面板",size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16}},children:e.jsx(E.Empty,{description:"请选择画布中的组件",image:E.Empty.PRESENTED_IMAGE_SIMPLE})});const C=lr[u.type]||u.type,L=e.jsxs(e.Fragment,{children:[e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"位置和大小"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"X"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.x,onChange:r=>a(i,{x:r??0})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"Y"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.y,onChange:r=>a(i,{y:r??0})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"宽度"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.w,min:1,onChange:r=>a(i,{w:r??1})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"高度"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.h,min:1,onChange:r=>a(i,{h:r??1})})]})]})]}),k=({field:r,label:t,placeholder:s,isTextarea:f=!1})=>{const l=P(r),w=o.find(T=>T.id===l.dataSourceId),O=w?jt(w):null,D=O?Object.keys(O):[],[M,H]=se.useState(l.staticValue);return se.useEffect(()=>{H(l.staticValue)},[l.staticValue,l.dataSourceId]),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12,display:"block",marginBottom:4},children:t}),e.jsx("div",{style:{marginBottom:4},children:e.jsx(E.Select,{size:"small",style:{width:"100%"},placeholder:"选择数据源",value:l.dataSourceId||"",onChange:T=>{R(r,T||null,T&&l.fieldPath||"",l.staticValue)},options:b})}),l.dataSourceId&&e.jsx("div",{style:{marginBottom:4},children:e.jsx(E.Select,{size:"small",style:{width:"100%"},placeholder:"选择字段",value:l.fieldPath,onChange:T=>{R(r,l.dataSourceId,T||"",l.staticValue)},options:[{label:"请选择字段",value:""},...D.map(T=>({label:T,value:T}))]})}),l.dataSourceId?e.jsxs("div",{style:{padding:6,background:"#f0f5ff",border:"1px solid #adc6ff",borderRadius:4,fontSize:12},children:[e.jsx(Oe.DatabaseOutlined,{style:{marginRight:4,color:"#1890ff"}}),e.jsx("span",{style:{fontWeight:500},children:"数据绑定已启用"}),w&&l.fieldPath&&e.jsxs("span",{style:{marginLeft:8},children:[e.jsx(E.Tag,{color:"blue",children:w.name}),e.jsx(E.Tag,{color:"green",children:l.fieldPath})]})]}):f?e.jsx(ho,{rows:3,placeholder:s,value:M,onChange:T=>H(T.target.value),onBlur:()=>{R(r,null,"",M)}}):e.jsx(E.Input,{placeholder:s,value:M,onChange:T=>H(T.target.value),onBlur:()=>{R(r,null,"",M)}})]})},y=()=>{const r=u.tableColumns||[],t=o.filter(V=>V.type==="array"),s=u.props.tableDataSourceId||"",f=t.find(V=>V.id===s),l=x.length>0?x:r,[w,O]=se.useState({}),D=()=>{c(i,l)},M=()=>{const V=[...l,{title:`列${l.length+1}`}];_(V)},H=V=>{const J=l.filter((K,re)=>re!==V);_(J)},T=(V,J,K)=>{const re=[...l];re[V]={...re[V],[J]:K},_(re)};let N=[];if(f){const V=at(f.data);Array.isArray(V)&&V.length>0&&typeof V[0]=="object"&&(N=Object.keys(V[0]))}const G=[{title:"列标题",dataIndex:"title",width:100,render:(V,J)=>{const K=J.key in w?w[J.key]:J.title;return e.jsx(E.Input,{size:"small",value:K,placeholder:"列标题",onChange:re=>{O({...w,[J.key]:re.target.value})},onBlur:()=>{if(J.key in w){T(Number(J.key),"title",w[J.key]);const re={...w};delete re[J.key],O(re),D()}}})}},{title:"绑定字段",dataIndex:"fieldPath",width:120,render:(V,J)=>e.jsx(E.Select,{size:"small",style:{width:"100%"},value:J.fieldPath||"",placeholder:f?"绑定字段":"选择数据源先",disabled:!f,onChange:K=>{T(Number(J.key),"fieldPath",K||""),D()},options:[{label:"无绑定",value:""},...N.map(K=>({label:K,value:K}))]})},{title:"操作",width:60,render:(V,J)=>e.jsx(E.Popconfirm,{title:"确定要删除吗?",onConfirm:()=>{H(Number(J.key)),D()},okText:"确定",cancelText:"取消",children:e.jsx(E.Button,{type:"text",danger:!0,size:"small",icon:e.jsx(Oe.DeleteOutlined,{})})})}],X=l.map((V,J)=>({...V,key:String(J)}));return e.jsxs("div",{children:[e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:e.jsx(je,{style:{fontSize:12},children:"表格数据源"})}),e.jsx(E.Select,{size:"small",style:{width:"100%",marginBottom:8},placeholder:"选择数组类型数据源",value:s,onChange:V=>v("tableDataSourceId",V||""),options:[{label:"无(仅静态展示)",value:""},...t.map(V=>({label:V.name,value:V.id}))]}),e.jsx(E.Divider,{}),e.jsxs(E.Space,{style:{marginBottom:8},children:[e.jsx(je,{style:{fontSize:12},children:"列配置"}),e.jsx(E.Button,{size:"small",type:"dashed",icon:e.jsx(Oe.PlusOutlined,{}),onClick:M}),e.jsx(E.Button,{size:"small",type:"primary",onClick:D,icon:e.jsx(Oe.SaveOutlined,{})})]}),e.jsx(E.Table,{dataSource:X,columns:G,pagination:!1,size:"small",style:{width:"280px"},bordered:!0,rowKey:"key"})]})},d=()=>{switch(u.type){case"text":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"content",label:"内容",placeholder:"请输入文本内容",isTextarea:!0}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),e.jsx(E.Input,{size:"small",placeholder:"例如 yyyyMMdd 或 yyyy-MM-dd HH:mm:ss",value:u.props.format||"",onChange:r=>v("format",r.target.value)}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"文字样式"}),e.jsxs(E.Space,{style:{width:"100%"},direction:"vertical",size:4,children:[e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"字号"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.props.fontSize||14,min:6,max:200,onChange:r=>v("fontSize",r??14)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"对齐"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.textAlign||"left",onChange:r=>v("textAlign",r),options:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}]})]})]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"字重"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fontWeight||"normal",onChange:r=>v("fontWeight",r),options:[{value:"normal",label:"常规"},{value:"bold",label:"加粗"}]})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"样式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fontStyle||"normal",onChange:r=>v("fontStyle",r),options:[{value:"normal",label:"常规"},{value:"italic",label:"斜体"}]})]})]}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"字体颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)}),e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.backgroundColor||"transparent",onChange:(r,t)=>v("backgroundColor",t)})]})]})]});case"image":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"src",label:"图片地址",placeholder:"输入图片 URL"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"适应方式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fit||"contain",onChange:r=>v("fit",r),options:[{value:"contain",label:"适应"},{value:"cover",label:"填充"},{value:"fill",label:"拉伸"}]})]});case"table":return e.jsxs(e.Fragment,{children:[e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"边框样式"}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"粗细"}),e.jsx(E.InputNumber,{size:"small",value:u.props.borderWidth||1,min:0,max:20,onChange:r=>v("borderWidth",r??1)}),e.jsx(je,{style:{fontSize:12},children:"颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.borderColor||"#000000",onChange:(r,t)=>v("borderColor",t)})]}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"列标题样式"}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"字号"}),e.jsx(E.InputNumber,{size:"small",value:u.props.headerFontSize||12,min:6,max:200,onChange:r=>v("headerFontSize",r??12)})]}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.headerBackgroundColor||"#f5f5f5",onChange:(r,t)=>v("headerBackgroundColor",t)}),e.jsx(je,{style:{fontSize:12},children:"字体颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.headerColor||"#000000",onChange:(r,t)=>v("headerColor",t)})]}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(y,{})]});case"barcode":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"value",label:"条码值",placeholder:"输入条码内容"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.format||"CODE128",onChange:r=>v("format",r),options:[{value:"CODE128",label:"CODE128"}]})]});case"qrcode":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"value",label:"二维码内容",placeholder:"输入二维码内容"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"纠错级别"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.errorLevel||"M",onChange:r=>v("errorLevel",r),options:[{value:"L",label:"L - 低"},{value:"M",label:"M - 中"},{value:"Q",label:"Q - 较高"},{value:"H",label:"H - 高"}]}),e.jsxs("div",{style:{display:"flex",gap:16,marginTop:8},children:[e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"前景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.backgroundColor||"#ffffff",onChange:(r,t)=>v("backgroundColor",t)})]})]})]});case"line":return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"粗细"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.props.thickness||1,min:1,max:20,onChange:r=>v("thickness",r??1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"样式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.style||"solid",onChange:r=>v("style",r),options:[{value:"solid",label:"实线"},{value:"dashed",label:"虚线"},{value:"dotted",label:"点线"}]})]})]}),e.jsxs("div",{style:{marginTop:8},children:[e.jsx(je,{style:{fontSize:12},children:"颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)})]})]});default:return null}};return e.jsx(E.Card,{title:`属性 - ${C}`,size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16,overflowY:"auto"}},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[L,e.jsx(E.Divider,{style:{margin:"4px 0"}}),d()]})})},{Text:To}=E.Typography,yo=({dataSources:n})=>{const i=pe(r=>r.previewVisible),o=pe(r=>r.setPreviewVisible),a=pe(r=>r.components),c=pe(r=>r.pageSettings),u=pe(r=>r.gridSettings)||xt,x=pe(r=>r.dataSources),_=n||x,b=se.useRef(null),v=se.useMemo(()=>{const r=bt[c.paperSize];if(!r)return{width:c.customWidth*De,height:c.customHeight*De};const t=r.width*De,s=r.height*De;return c.orientation==="landscape"?{width:s,height:t}:{width:t,height:s}},[c]),R=se.useMemo(()=>({top:c.marginTop*De,right:c.marginRight*De,bottom:c.marginBottom*De,left:c.marginLeft*De}),[c]),P=v.width-R.left-R.right,C=P/u.cols,L=nr.useReactToPrint({contentRef:b,documentTitle:"打印模板",pageStyle:`
51
+ `,p.getElementsByTagName("head")[0].appendChild(S)),p.body&&A(p.body,"react-draggable-transparent-selection")}function fe(p){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ue(p)}):ue(p)}function ue(p){if(p)try{p.body&&U(p.body,"react-draggable-transparent-selection");const S=p.selection;if(S)S.empty();else{const z=(p.defaultView||window).getSelection();z&&z.type!=="Caret"&&z.removeAllRanges()}}catch{}}function A(p,S){p.classList?p.classList.add(S):p.className.match(new RegExp(`(?:^|\\s)${S}(?!\\S)`))||(p.className+=` ${S}`)}function U(p,S){p.classList?p.classList.remove(S):p.className=p.className.replace(new RegExp(`(?:^|\\s)${S}(?!\\S)`,"g"),"")}function ee(p,S,z){if(!p.props.bounds)return[S,z];let{bounds:Y}=p.props;Y=typeof Y=="string"?Y:Le(Y);const $=g(p);if(typeof Y=="string"){const{ownerDocument:Ee}=$,me=Ee.defaultView;if(!me)throw new Error("Cannot resolve the owner window of the draggable node.");let Te;if(Y==="parent"?Te=$.parentNode:Te=$.getRootNode().querySelector(Y),!(Te instanceof me.HTMLElement))throw new Error('Bounds selector "'+Y+'" could not find an element.');const Me=Te,Ge=me.getComputedStyle($),$e=me.getComputedStyle(Me);Y={left:-$.offsetLeft+s($e.paddingLeft)+s(Ge.marginLeft),top:-$.offsetTop+s($e.paddingTop)+s(Ge.marginTop),right:re(Me)-J($)-$.offsetLeft+s($e.paddingRight)-s(Ge.marginRight),bottom:K(Me)-V($)-$.offsetTop+s($e.paddingBottom)-s(Ge.marginBottom)}}return t(Y.right)&&(S=Math.min(S,Y.right)),t(Y.bottom)&&(z=Math.min(z,Y.bottom)),t(Y.left)&&(S=Math.max(S,Y.left)),t(Y.top)&&(z=Math.max(z,Y.top)),[S,z]}function Z(p,S,z){const Y=Math.round(S/p[0])*p[0],$=Math.round(z/p[1])*p[1];return[Y,$]}function ce(p){return p.props.axis==="both"||p.props.axis==="x"}function B(p){return p.props.axis==="both"||p.props.axis==="y"}function he(p,S,z){const Y=typeof S=="number"?ie(p,S):null;if(typeof S=="number"&&!Y)return null;const $=g(z),Ee=z.props.offsetParent||$.offsetParent||$.ownerDocument.body;return be(Y||p,Ee,z.props.scale)}function ke(p,S,z){const Y=!t(p.lastX),$=g(p);return Y?{node:$,deltaX:0,deltaY:0,lastX:S,lastY:z,x:S,y:z}:{node:$,deltaX:S-p.lastX,deltaY:z-p.lastY,lastX:p.lastX,lastY:p.lastY,x:S,y:z}}function we(p,S){const z=p.props.scale;return{node:S.node,x:p.state.x+S.deltaX/z,y:p.state.y+S.deltaY/z,deltaX:S.deltaX/z,deltaY:S.deltaY/z,lastX:p.state.x,lastY:p.state.y}}function Le(p){return{left:p.left,top:p.top,right:p.right,bottom:p.bottom}}function g(p){const S=p.findDOMNode();if(!S)throw new Error("<DraggableCore>: Unmounted during event!");return S}var m=v(se),j=v(Ue()),q=v(It);function ne(...p){n.DRAGGABLE_DEBUG&&console.log(...p)}var Q={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},le=Q.mouse,ye=class extends m.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=p=>{if(this.props.onMouseDown(p),!this.props.allowAnyClick&&(typeof p.button=="number"&&p.button!==0||p.ctrlKey))return!1;const S=this.findDOMNode();if(!S||!S.ownerDocument||!S.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:z}=S;if(this.props.disabled||!(p.target instanceof z.defaultView.Node)||this.props.handle&&!N(p.target,this.props.handle,S)||this.props.cancel&&N(p.target,this.props.cancel,S))return;p.type==="touchstart"&&!this.props.allowMobileScroll&&p.preventDefault();const Y=oe(p);this.touchIdentifier=Y;const $=he(p,Y,this);if($==null)return;const{x:Ee,y:me}=$,Te=ke(this,Ee,me);ne("DraggableCore: handleDragStart: %j",Te),ne("calling",this.props.onStart),!(this.props.onStart(p,Te)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&ae(z),this.dragging=!0,this.lastX=Ee,this.lastY=me,G(z,le.move,this.handleDrag),G(z,le.stop,this.handleDragStop))},this.handleDrag=p=>{const S=he(p,this.touchIdentifier,this);if(S==null)return;let{x:z,y:Y}=S;if(Array.isArray(this.props.grid)){let me=z-this.lastX,Te=Y-this.lastY;if([me,Te]=Z(this.props.grid,me,Te),!me&&!Te)return;z=this.lastX+me,Y=this.lastY+Te}const $=ke(this,z,Y);if(ne("DraggableCore: handleDrag: %j",$),this.props.onDrag(p,$)===!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=z,this.lastY=Y},this.handleDragStop=p=>{if(!this.dragging)return;const S=he(p,this.touchIdentifier,this);if(S==null)return;let{x:z,y:Y}=S;if(Array.isArray(this.props.grid)){let Te=z-this.lastX||0,Me=Y-this.lastY||0;[Te,Me]=Z(this.props.grid,Te,Me),z=this.lastX+Te,Y=this.lastY+Me}const $=ke(this,z,Y);if(this.props.onStop(p,$)===!1||this.mounted===!1)return!1;const me=this.findDOMNode();me&&this.props.enableUserSelectHack&&fe(me.ownerDocument),ne("DraggableCore: handleDragStop: %j",$),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,me&&(ne("DraggableCore: Removing handlers"),X(me.ownerDocument,le.move,this.handleDrag),X(me.ownerDocument,le.stop,this.handleDragStop))},this.onMouseDown=p=>(le=Q.mouse,this.handleDragStart(p)),this.onMouseUp=p=>(le=Q.mouse,this.handleDragStop(p)),this.onTouchStart=p=>(le=Q.touch,this.handleDragStart(p)),this.onTouchEnd=p=>(le=Q.touch,this.handleDragStop(p))}componentDidMount(){this.mounted=!0;const p=this.findDOMNode();p&&G(p,Q.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const p=this.findDOMNode();if(p){const{ownerDocument:S}=p;X(S,Q.mouse.move,this.handleDrag),X(S,Q.touch.move,this.handleDrag),X(S,Q.mouse.stop,this.handleDragStop),X(S,Q.touch.stop,this.handleDragStop),X(p,Q.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&fe(S)}}findDOMNode(){var p;if((p=this.props)!=null&&p.nodeRef)return this.props.nodeRef.current;const S=q.default;return typeof S.findDOMNode=="function"?S.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 m.cloneElement(m.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};ye.displayName="DraggableCore",ye.propTypes={allowAnyClick:j.default.bool,allowMobileScroll:j.default.bool,children:j.default.node.isRequired,disabled:j.default.bool,enableUserSelectHack:j.default.bool,offsetParent:function(p,S){if(p[S]&&p[S].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:j.default.arrayOf(j.default.number),handle:j.default.string,cancel:j.default.string,nodeRef:j.default.object,onStart:j.default.func,onDrag:j.default.func,onStop:j.default.func,onMouseDown:j.default.func,scale:j.default.number,className:f,style:f,transform:f},ye.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Ce=class extends C.Component{constructor(p){super(p),this.onDragStart=(S,z)=>{if(ne("Draggable: onDragStart: %j",z),this.props.onStart(S,we(this,z))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(S,z)=>{if(!this.state.dragging)return!1;ne("Draggable: onDrag: %j",z);const Y=we(this,z),$={x:Y.x,y:Y.y,slackX:0,slackY:0};if(this.props.bounds){const{x:me,y:Te}=$;$.x+=this.state.slackX,$.y+=this.state.slackY;const[Me,Ge]=ee(this,$.x,$.y);$.x=Me,$.y=Ge,$.slackX=this.state.slackX+(me-$.x),$.slackY=this.state.slackY+(Te-$.y),Y.x=$.x,Y.y=$.y,Y.deltaX=$.x-this.state.x,Y.deltaY=$.y-this.state.y}if(this.props.onDrag(S,Y)===!1)return!1;this.setState($)},this.onDragStop=(S,z)=>{if(!this.state.dragging||this.props.onStop(S,we(this,z))===!1)return!1;ne("Draggable: onDragStop: %j",z);const $={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:me,y:Te}=this.props.position;$.x=me,$.y=Te}this.setState($)},this.state={dragging:!1,dragged:!1,x:p.position?p.position.x:p.defaultPosition.x,y:p.position?p.position.y:p.defaultPosition.y,prevPropsPosition:{...p.position},slackX:0,slackY:0,isElementSVG:!1},p.position&&!(p.onDrag||p.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:p},{prevPropsPosition:S}){return p&&(!S||p.x!==S.x||p.y!==S.y)?(ne("Draggable: getDerivedStateFromProps %j",{position:p,prevPropsPosition:S}),{x:p.x,y:p.y,prevPropsPosition:{...p}}):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 p;if((p=this.props)!=null&&p.nodeRef)return this.props.nodeRef.current;const S=k.default;return typeof S.findDOMNode=="function"?S.findDOMNode(this):null}render(){const{axis:p,bounds:S,children:z,defaultPosition:Y,defaultClassName:$,defaultClassNameDragging:Ee,defaultClassNameDragged:me,position:Te,positionOffset:Me,scale:Ge,...$e}=this.props;let mt={},et=null;const Ve=!!!Te||this.state.dragging,tt=Te||Y,rt={x:ce(this)&&Ve?this.state.x:tt.x,y:B(this)&&Ve?this.state.y:tt.y};this.state.isElementSVG?et=I(rt,Me):mt=ge(rt,Me);const nt=C.Children.only(z),tr=(0,y.clsx)(nt.props.className||"",$,{[Ee]:this.state.dragging,[me]:this.state.dragged});return C.createElement(ye,{...$e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},C.cloneElement(nt,{className:tr,style:{...nt.props.style,...mt},transform:et}))}};return Ce.displayName="Draggable",Ce.propTypes={...ye.propTypes,axis:L.default.oneOf(["both","x","y","none"]),bounds:L.default.oneOfType([L.default.shape({left:L.default.number,right:L.default.number,top:L.default.number,bottom:L.default.number}),L.default.string,L.default.oneOf([!1])]),defaultClassName:L.default.string,defaultClassNameDragging:L.default.string,defaultClassNameDragged:L.default.string,defaultPosition:L.default.shape({x:L.default.number,y:L.default.number}),positionOffset:L.default.shape({x:L.default.oneOfType([L.default.number,L.default.string]),y:L.default.oneOfType([L.default.number,L.default.string])}),position:L.default.shape({x:L.default.number,y:L.default.number}),className:f,style:f,transform:f},Ce.defaultProps={...ye.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1},Xt}var Dr;function Jt(){if(Dr)return dt.exports;Dr=1;const n=An(),i=n.DraggableCore,o=n.default||n;return dt.exports=o,dt.exports.default=o,dt.exports.DraggableCore=i,dt.exports}var ft={exports:{}},pt={},Dt={},Tr;function Ln(){if(Tr)return Dt;Tr=1,Dt.__esModule=!0,Dt.cloneElement=_;var n=i(se);function i(b){return b&&b.__esModule?b:{default:b}}function o(b,v){var R=Object.keys(b);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(b);v&&(P=P.filter(function(C){return Object.getOwnPropertyDescriptor(b,C).enumerable})),R.push.apply(R,P)}return R}function a(b){for(var v=1;v<arguments.length;v++){var R=arguments[v]!=null?arguments[v]:{};v%2?o(Object(R),!0).forEach(function(P){c(b,P,R[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(R)):o(Object(R)).forEach(function(P){Object.defineProperty(b,P,Object.getOwnPropertyDescriptor(R,P))})}return b}function c(b,v,R){return(v=u(v))in b?Object.defineProperty(b,v,{value:R,enumerable:!0,configurable:!0,writable:!0}):b[v]=R,b}function u(b){var v=x(b,"string");return typeof v=="symbol"?v:v+""}function x(b,v){if(typeof b!="object"||!b)return b;var R=b[Symbol.toPrimitive];if(R!==void 0){var P=R.call(b,v);if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(b)}function _(b,v){return v.style&&b.props.style&&(v.style=a(a({},b.props.style),v.style)),v.className&&b.props.className&&(v.className=b.props.className+" "+v.className),n.default.cloneElement(b,v)}return Dt}var ht={},zr;function kr(){if(zr)return ht;zr=1,ht.__esModule=!0,ht.resizableProps=void 0;var n=i(Ue());Jt();function i(o){return o&&o.__esModule?o:{default:o}}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 o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];const u=a[0];return u.axis==="both"||u.axis==="y"?n.default.number.isRequired(...a):n.default.number(...a)},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 o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];const u=a[0];return u.axis==="both"||u.axis==="x"?n.default.number.isRequired(...a):n.default.number(...a)}},ht}var Mr;function Ir(){if(Mr)return pt;Mr=1,pt.__esModule=!0,pt.default=void 0;var n=u(se),i=Jt(),o=Ln(),a=kr();const c=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function u(k,y){if(typeof WeakMap=="function")var d=new WeakMap,r=new WeakMap;return(u=function(t,s){if(!s&&t&&t.__esModule)return t;var f,l,w={__proto__:null,default:t};if(t===null||typeof t!="object"&&typeof t!="function")return w;if(f=s?r:d){if(f.has(t))return f.get(t);f.set(t,w)}for(const O in t)O!=="default"&&{}.hasOwnProperty.call(t,O)&&((l=(f=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,O))&&(l.get||l.set)?f(w,O,l):w[O]=t[O]);return w})(k,y)}function x(){return x=Object.assign?Object.assign.bind():function(k){for(var y=1;y<arguments.length;y++){var d=arguments[y];for(var r in d)({}).hasOwnProperty.call(d,r)&&(k[r]=d[r])}return k},x.apply(null,arguments)}function _(k,y){if(k==null)return{};var d={};for(var r in k)if({}.hasOwnProperty.call(k,r)){if(y.indexOf(r)!==-1)continue;d[r]=k[r]}return d}function b(k,y){var d=Object.keys(k);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(k);y&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(k,t).enumerable})),d.push.apply(d,r)}return d}function v(k){for(var y=1;y<arguments.length;y++){var d=arguments[y]!=null?arguments[y]:{};y%2?b(Object(d),!0).forEach(function(r){R(k,r,d[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(d)):b(Object(d)).forEach(function(r){Object.defineProperty(k,r,Object.getOwnPropertyDescriptor(d,r))})}return k}function R(k,y,d){return(y=P(y))in k?Object.defineProperty(k,y,{value:d,enumerable:!0,configurable:!0,writable:!0}):k[y]=d,k}function P(k){var y=C(k,"string");return typeof y=="symbol"?y:y+""}function C(k,y){if(typeof k!="object"||!k)return k;var d=k[Symbol.toPrimitive];if(d!==void 0){var r=d.call(k,y);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(k)}let L=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(y,d){const r=this.props,t=r.minConstraints,s=r.maxConstraints,f=r.lockAspectRatio;if(!t&&!s&&!f)return[y,d];if(f){const H=this.props.width/this.props.height,T=y-this.props.width,N=d-this.props.height;Math.abs(T)>Math.abs(N*H)?d=y/H:y=d*H}const l=y,w=d;let O=this.slack||[0,0],D=O[0],M=O[1];return y+=D,d+=M,t&&(y=Math.max(t[0],y),d=Math.max(t[1],d)),s&&(y=Math.min(s[0],y),d=Math.min(s[1],d)),this.slack=[D+(l-y),M+(w-d)],[y,d]}resizeHandler(y,d){return(r,t)=>{var s,f,l,w;let O=t.node,D=t.deltaX,M=t.deltaY;y==="onResizeStart"&&this.resetData();const H=(this.props.axis==="both"||this.props.axis==="x")&&d!=="n"&&d!=="s",T=(this.props.axis==="both"||this.props.axis==="y")&&d!=="e"&&d!=="w";if(!H&&!T)return;const N=d[0],G=d[d.length-1],X=O.getBoundingClientRect();if(this.lastHandleRect!=null){if(G==="w"){const oe=X.left-this.lastHandleRect.left;D+=oe}if(N==="n"){const oe=X.top-this.lastHandleRect.top;M+=oe}}this.lastHandleRect=X,G==="w"&&(D=-D),N==="n"&&(M=-M);const V=(s=(f=this.lastSize)==null?void 0:f.width)!=null?s:this.props.width,J=(l=(w=this.lastSize)==null?void 0:w.height)!=null?l:this.props.height;let K=V+(H?D/this.props.transformScale:0),re=J+(T?M/this.props.transformScale:0);var be=this.runConstraints(K,re);if(K=be[0],re=be[1],y==="onResizeStop"&&this.lastSize){var ge=this.lastSize;K=ge.width,re=ge.height}const I=K!==V||re!==J;y!=="onResizeStop"&&(this.lastSize={width:K,height:re});const W=typeof this.props[y]=="function"?this.props[y]:null;W&&!(y==="onResize"&&!I)&&(r.persist==null||r.persist(),W(r,{node:O,size:{width:K,height:re},handle:d})),y==="onResizeStop"&&this.resetData()}}renderResizeHandle(y,d){const r=this.props.handle;if(!r)return n.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+y,ref:d});if(typeof r=="function")return r(y,d);const t=typeof r.type=="string",s=v({ref:d},t?{}:{handleAxis:y});return n.cloneElement(r,s)}render(){const y=this.props,d=y.children,r=y.className,t=y.draggableOpts;y.width,y.height,y.handle,y.handleSize,y.lockAspectRatio,y.axis,y.minConstraints,y.maxConstraints,y.onResize,y.onResizeStop,y.onResizeStart;const s=y.resizeHandles;y.transformScale;const f=_(y,c);return(0,o.cloneElement)(d,v(v({},f),{},{className:(r?r+" ":"")+"react-resizable",children:[...n.Children.toArray(d.props.children),...s.map(l=>{var w;const O=(w=this.handleRefs[l])!=null?w:this.handleRefs[l]=n.createRef();return n.createElement(i.DraggableCore,x({},t,{nodeRef:O,key:"resizableHandle-"+l,onStop:this.resizeHandler("onResizeStop",l),onStart:this.resizeHandler("onResizeStart",l),onDrag:this.resizeHandler("onResize",l)}),this.renderResizeHandle(l,O))})]}))}};return pt.default=L,L.propTypes=a.resizableProps,L.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},pt}var gt={},Ar;function Nn(){if(Ar)return gt;Ar=1,gt.__esModule=!0,gt.default=void 0;var n=x(se),i=u(Ue()),o=u(Ir()),a=kr();const c=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function u(y){return y&&y.__esModule?y:{default:y}}function x(y,d){if(typeof WeakMap=="function")var r=new WeakMap,t=new WeakMap;return(x=function(s,f){if(!f&&s&&s.__esModule)return s;var l,w,O={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return O;if(l=f?t:r){if(l.has(s))return l.get(s);l.set(s,O)}for(const D in s)D!=="default"&&{}.hasOwnProperty.call(s,D)&&((w=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,D))&&(w.get||w.set)?l(O,D,w):O[D]=s[D]);return O})(y,d)}function _(){return _=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var r=arguments[d];for(var t in r)({}).hasOwnProperty.call(r,t)&&(y[t]=r[t])}return y},_.apply(null,arguments)}function b(y,d){var r=Object.keys(y);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(y);d&&(t=t.filter(function(s){return Object.getOwnPropertyDescriptor(y,s).enumerable})),r.push.apply(r,t)}return r}function v(y){for(var d=1;d<arguments.length;d++){var r=arguments[d]!=null?arguments[d]:{};d%2?b(Object(r),!0).forEach(function(t){R(y,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(t){Object.defineProperty(y,t,Object.getOwnPropertyDescriptor(r,t))})}return y}function R(y,d,r){return(d=P(d))in y?Object.defineProperty(y,d,{value:r,enumerable:!0,configurable:!0,writable:!0}):y[d]=r,y}function P(y){var d=C(y,"string");return typeof d=="symbol"?d:d+""}function C(y,d){if(typeof y!="object"||!y)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var t=r.call(y,d);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}function L(y,d){if(y==null)return{};var r={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)!==-1)continue;r[t]=y[t]}return r}let k=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=(d,r)=>{const t=r.size;this.props.onResize?(d.persist==null||d.persist(),this.setState(t,()=>this.props.onResize&&this.props.onResize(d,r))):this.setState(t)}}static getDerivedStateFromProps(d,r){return r.propsWidth!==d.width||r.propsHeight!==d.height?{width:d.width,height:d.height,propsWidth:d.width,propsHeight:d.height}:null}render(){const d=this.props,r=d.handle,t=d.handleSize;d.onResize;const s=d.onResizeStart,f=d.onResizeStop,l=d.draggableOpts,w=d.minConstraints,O=d.maxConstraints,D=d.lockAspectRatio,M=d.axis;d.width,d.height;const H=d.resizeHandles,T=d.style,N=d.transformScale,G=L(d,c);return n.createElement(o.default,{axis:M,draggableOpts:l,handle:r,handleSize:t,height:this.state.height,lockAspectRatio:D,maxConstraints:O,minConstraints:w,onResizeStart:s,onResize:this.onResize,onResizeStop:f,resizeHandles:H,transformScale:N,width:this.state.width},n.createElement("div",_({},G,{style:v(v({},T),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return gt.default=k,k.propTypes=v(v({},a.resizableProps),{},{children:i.default.element}),gt}var Lr;function Wn(){return Lr||(Lr=1,ft.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ft.exports.Resizable=Ir().default,ft.exports.ResizableBox=Nn().default),ft.exports}var Ye={},Nr;function Wr(){if(Nr)return Ye;Nr=1;var n={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resizeHandleType=Ye.resizeHandleAxesType=Ye.default=void 0;var i=a(Ue()),o=a(se);function a(x){return x&&x.__esModule?x:{default:x}}const c=Ye.resizeHandleAxesType=i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),u=Ye.resizeHandleType=i.default.oneOfType([i.default.node,i.default.func]);return Ye.default={className:i.default.string,style:i.default.object,width:i.default.number,autoSize:i.default.bool,cols:i.default.number,draggableCancel:i.default.string,draggableHandle:i.default.string,verticalCompact:function(x){x.verticalCompact===!1&&n.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:i.default.oneOf(["vertical","horizontal"]),layout:function(x){var _=x.layout;_!==void 0&&Qe().validateLayout(_,"layout")},margin:i.default.arrayOf(i.default.number),containerPadding:i.default.arrayOf(i.default.number),rowHeight:i.default.number,maxRows:i.default.number,isBounded:i.default.bool,isDraggable:i.default.bool,isResizable:i.default.bool,allowOverlap:i.default.bool,preventCollision:i.default.bool,useCSSTransforms:i.default.bool,transformScale:i.default.number,isDroppable:i.default.bool,resizeHandles:c,resizeHandle:u,onLayoutChange:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onDragStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,onResizeStop:i.default.func,onDrop:i.default.func,droppingItem:i.default.shape({i:i.default.string.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired}),children:function(x,_){const b=x[_],v={};o.default.Children.forEach(b,function(R){if((R==null?void 0:R.key)!=null){if(v[R.key])throw new Error('Duplicate child key "'+R.key+'" found! This will cause problems in ReactGridLayout.');v[R.key]=!0}})},innerRef:i.default.any},Ye}var Hr;function Hn(){if(Hr)return ut;Hr=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.default=void 0;var n=v(se),i=It,o=v(Ue()),a=Jt(),c=Wn(),u=Qe(),x=Bt(),_=Wr(),b=v(_t());function v(d){return d&&d.__esModule?d:{default:d}}function R(d,r){var t=Object.keys(d);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(d);r&&(s=s.filter(function(f){return Object.getOwnPropertyDescriptor(d,f).enumerable})),t.push.apply(t,s)}return t}function P(d){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?R(Object(t),!0).forEach(function(s){C(d,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(s){Object.defineProperty(d,s,Object.getOwnPropertyDescriptor(t,s))})}return d}function C(d,r,t){return(r=L(r))in d?Object.defineProperty(d,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):d[r]=t,d}function L(d){var r=k(d,"string");return typeof r=="symbol"?r:r+""}function k(d,r){if(typeof d!="object"||!d)return d;var t=d[Symbol.toPrimitive];if(t!==void 0){var s=t.call(d,r);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(d)}let y=class extends n.default.Component{constructor(){super(...arguments),C(this,"state",{resizing:null,dragging:null,className:""}),C(this,"elementRef",n.default.createRef()),C(this,"onDragStart",(r,t)=>{let{node:s}=t;const{onDragStart:f,transformScale:l}=this.props;if(!f)return;const w={top:0,left:0},{offsetParent:O}=s;if(!O)return;const D=O.getBoundingClientRect(),M=s.getBoundingClientRect(),H=M.left/l,T=D.left/l,N=M.top/l,G=D.top/l;w.left=H-T+O.scrollLeft,w.top=N-G+O.scrollTop,this.setState({dragging:w});const{x:X,y:V}=(0,x.calcXY)(this.getPositionParams(),w.top,w.left,this.props.w,this.props.h);return f.call(this,this.props.i,X,V,{e:r,node:s,newPosition:w})}),C(this,"onDrag",(r,t,s)=>{let{node:f,deltaX:l,deltaY:w}=t;const{onDrag:O}=this.props;if(!O)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let D=this.state.dragging.top+w,M=this.state.dragging.left+l;const{isBounded:H,i:T,w:N,h:G,containerWidth:X}=this.props,V=this.getPositionParams();if(H){const{offsetParent:be}=f;if(be){const{margin:ge,rowHeight:I}=this.props,W=be.clientHeight-(0,x.calcGridItemWHPx)(G,I,ge[1]);D=(0,x.clamp)(D,0,W);const ie=(0,x.calcGridColWidth)(V),oe=X-(0,x.calcGridItemWHPx)(N,ie,ge[0]);M=(0,x.clamp)(M,0,oe)}}const J={top:D,left:M};s?this.setState({dragging:J}):(0,i.flushSync)(()=>{this.setState({dragging:J})});const{x:K,y:re}=(0,x.calcXY)(V,D,M,N,G);return O.call(this,T,K,re,{e:r,node:f,newPosition:J})}),C(this,"onDragStop",(r,t)=>{let{node:s}=t;const{onDragStop:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:l,h:w,i:O}=this.props,{left:D,top:M}=this.state.dragging,H={top:M,left:D};this.setState({dragging:null});const{x:T,y:N}=(0,x.calcXY)(this.getPositionParams(),M,D,l,w);return f.call(this,O,T,N,{e:r,node:s,newPosition:H})}),C(this,"onResizeStop",(r,t,s)=>this.onResizeHandler(r,t,s,"onResizeStop")),C(this,"onResizeStart",(r,t,s)=>this.onResizeHandler(r,t,s,"onResizeStart")),C(this,"onResize",(r,t,s)=>this.onResizeHandler(r,t,s,"onResize"))}shouldComponentUpdate(r,t){if(this.props.children!==r.children||this.props.droppingPosition!==r.droppingPosition)return!0;const s=(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(r),r.x,r.y,r.w,r.h,t);return!(0,u.fastPositionEqual)(s,f)||this.props.useCSSTransforms!==r.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(r){this.moveDroppingItem(r)}moveDroppingItem(r){const{droppingPosition:t}=this.props;if(!t)return;const s=this.elementRef.current;if(!s)return;const f=r.droppingPosition||{left:0,top:0},{dragging:l}=this.state,w=l&&t.left!==f.left||t.top!==f.top;if(!l)this.onDragStart(t.e,{node:s,deltaX:t.left,deltaY:t.top});else if(w){const O=t.left-l.left,D=t.top-l.top;this.onDrag(t.e,{node:s,deltaX:O,deltaY:D},!0)}}getPositionParams(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:r.cols,containerPadding:r.containerPadding,containerWidth:r.containerWidth,margin:r.margin,maxRows:r.maxRows,rowHeight:r.rowHeight}}createStyle(r){const{usePercentages:t,containerWidth:s,useCSSTransforms:f}=this.props;let l;return f?l=(0,u.setTransform)(r):(l=(0,u.setTopLeft)(r),t&&(l.left=(0,u.perc)(r.left/s),l.width=(0,u.perc)(r.width/s))),l}mixinDraggable(r,t){return n.default.createElement(a.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},r)}curryResizeHandler(r,t){return(s,f)=>t(s,f,r)}mixinResizable(r,t,s){const{cols:f,minW:l,minH:w,maxW:O,maxH:D,transformScale:M,resizeHandles:H,resizeHandle:T}=this.props,N=this.getPositionParams(),G=(0,x.calcGridItemPosition)(N,0,0,f,0).width,X=(0,x.calcGridItemPosition)(N,0,0,l,w),V=(0,x.calcGridItemPosition)(N,0,0,O,D),J=[X.width,X.height],K=[Math.min(V.width,G),Math.min(V.height,1/0)];return n.default.createElement(c.Resizable,{draggableOpts:{disabled:!s},className:s?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:J,maxConstraints:K,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:M,resizeHandles:H,handle:T},r)}onResizeHandler(r,t,s,f){let{node:l,size:w,handle:O}=t;const D=this.props[f];if(!D)return;const{x:M,y:H,i:T,maxH:N,minH:G,containerWidth:X}=this.props,{minW:V,maxW:J}=this.props;let K=w;l&&(K=(0,u.resizeItemInDirection)(O,s,w,X),(0,i.flushSync)(()=>{this.setState({resizing:f==="onResizeStop"?null:K})}));let{w:re,h:be}=(0,x.calcWH)(this.getPositionParams(),K.width,K.height,M,H,O);re=(0,x.clamp)(re,Math.max(V,1),J),be=(0,x.clamp)(be,G,N),D.call(this,T,re,be,{e:r,node:l,size:K,handle:O})}render(){const{x:r,y:t,w:s,h:f,isDraggable:l,isResizable:w,droppingPosition:O,useCSSTransforms:D}=this.props,M=(0,x.calcGridItemPosition)(this.getPositionParams(),r,t,s,f,this.state),H=n.default.Children.only(this.props.children);let T=n.default.cloneElement(H,{ref:this.elementRef,className:(0,b.default)("react-grid-item",H.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":l,"react-draggable-dragging":!!this.state.dragging,dropping:!!O,cssTransforms:D}),style:P(P(P({},this.props.style),H.props.style),this.createStyle(M))});return T=this.mixinResizable(T,M,w),T=this.mixinDraggable(T,l),T}};return ut.default=y,C(y,"propTypes",{children:o.default.element,cols:o.default.number.isRequired,containerWidth:o.default.number.isRequired,rowHeight:o.default.number.isRequired,margin:o.default.array.isRequired,maxRows:o.default.number.isRequired,containerPadding:o.default.array.isRequired,x:o.default.number.isRequired,y:o.default.number.isRequired,w:o.default.number.isRequired,h:o.default.number.isRequired,minW:function(d,r){const t=d[r];if(typeof t!="number")return new Error("minWidth not Number");if(t>d.w||t>d.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(d,r){const t=d[r];if(typeof t!="number")return new Error("maxWidth not Number");if(t<d.w||t<d.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(d,r){const t=d[r];if(typeof t!="number")return new Error("minHeight not Number");if(t>d.h||t>d.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(d,r){const t=d[r];if(typeof t!="number")return new Error("maxHeight not Number");if(t<d.h||t<d.minH)return new Error("maxHeight smaller than item height/minHeight")},i:o.default.string.isRequired,resizeHandles:_.resizeHandleAxesType,resizeHandle:_.resizeHandleType,onDragStop:o.default.func,onDragStart:o.default.func,onDrag:o.default.func,onResizeStop:o.default.func,onResizeStart:o.default.func,onResize:o.default.func,isDraggable:o.default.bool.isRequired,isResizable:o.default.bool.isRequired,isBounded:o.default.bool.isRequired,static:o.default.bool,useCSSTransforms:o.default.bool.isRequired,transformScale:o.default.number,className:o.default.string,handle:o.default.string,cancel:o.default.string,droppingPosition:o.default.shape({e:o.default.object.isRequired,left:o.default.number.isRequired,top:o.default.number.isRequired})}),C(y,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),ut}var Br;function qr(){if(Br)return lt;Br=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var n=b(se),i=Wt(),o=_(_t()),a=Qe(),c=Bt(),u=_(Hn()),x=_(Wr());function _(r){return r&&r.__esModule?r:{default:r}}function b(r,t){if(typeof WeakMap=="function")var s=new WeakMap,f=new WeakMap;return(b=function(l,w){if(!w&&l&&l.__esModule)return l;var O,D,M={__proto__:null,default:l};if(l===null||typeof l!="object"&&typeof l!="function")return M;if(O=w?f:s){if(O.has(l))return O.get(l);O.set(l,M)}for(const H in l)H!=="default"&&{}.hasOwnProperty.call(l,H)&&((D=(O=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,H))&&(D.get||D.set)?O(M,H,D):M[H]=l[H]);return M})(r,t)}function v(r,t){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);t&&(f=f.filter(function(l){return Object.getOwnPropertyDescriptor(r,l).enumerable})),s.push.apply(s,f)}return s}function R(r){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?v(Object(s),!0).forEach(function(f){P(r,f,s[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):v(Object(s)).forEach(function(f){Object.defineProperty(r,f,Object.getOwnPropertyDescriptor(s,f))})}return r}function P(r,t,s){return(t=C(t))in r?Object.defineProperty(r,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[t]=s,r}function C(r){var t=L(r,"string");return typeof t=="symbol"?t:t+""}function L(r,t){if(typeof r!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var f=s.call(r,t);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}const k="react-grid-layout";let y=!1;try{y=/firefox/i.test(navigator.userAgent)}catch{}let d=class extends n.Component{constructor(){super(...arguments),P(this,"state",{activeDrag:null,layout:(0,a.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,a.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,s,f,l)=>{let{e:w,node:O}=l;const{layout:D}=this.state,M=(0,a.getLayoutItem)(D,t);if(!M)return;const H={w:M.w,h:M.h,x:M.x,y:M.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,a.cloneLayoutItem)(M),oldLayout:D,activeDrag:H}),this.props.onDragStart(D,M,M,null,w,O)}),P(this,"onDrag",(t,s,f,l)=>{let{e:w,node:O}=l;const{oldDragItem:D}=this.state;let{layout:M}=this.state;const{cols:H,allowOverlap:T,preventCollision:N}=this.props,G=(0,a.getLayoutItem)(M,t);if(!G)return;const X={w:G.w,h:G.h,x:G.x,y:G.y,placeholder:!0,i:t};M=(0,a.moveElement)(M,G,s,f,!0,N,(0,a.compactType)(this.props),H,T),this.props.onDrag(M,D,G,X,w,O),this.setState({layout:T?M:(0,a.compact)(M,(0,a.compactType)(this.props),H),activeDrag:X})}),P(this,"onDragStop",(t,s,f,l)=>{let{e:w,node:O}=l;if(!this.state.activeDrag)return;const{oldDragItem:D}=this.state;let{layout:M}=this.state;const{cols:H,preventCollision:T,allowOverlap:N}=this.props,G=(0,a.getLayoutItem)(M,t);if(!G)return;M=(0,a.moveElement)(M,G,s,f,!0,T,(0,a.compactType)(this.props),H,N);const V=N?M:(0,a.compact)(M,(0,a.compactType)(this.props),H);this.props.onDragStop(V,D,G,null,w,O);const{oldLayout:J}=this.state;this.setState({activeDrag:null,layout:V,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(V,J)}),P(this,"onResizeStart",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D}=this.state,M=(0,a.getLayoutItem)(D,t);M&&(this.setState({oldResizeItem:(0,a.cloneLayoutItem)(M),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(D,M,M,null,w,O))}),P(this,"onResize",(t,s,f,l)=>{let{e:w,node:O,size:D,handle:M}=l;const{oldResizeItem:H}=this.state,{layout:T}=this.state,{cols:N,preventCollision:G,allowOverlap:X}=this.props;let V=!1,J,K,re;const[be,ge]=(0,a.withLayoutItem)(T,t,W=>{let ie;return K=W.x,re=W.y,["sw","w","nw","n","ne"].indexOf(M)!==-1&&(["sw","nw","w"].indexOf(M)!==-1&&(K=W.x+(W.w-s),s=W.x!==K&&K<0?W.w:s,K=K<0?0:K),["ne","n","nw"].indexOf(M)!==-1&&(re=W.y+(W.h-f),f=W.y!==re&&re<0?W.h:f,re=re<0?0:re),V=!0),G&&!X&&(ie=(0,a.getAllCollisions)(T,R(R({},W),{},{w:s,h:f,x:K,y:re})).filter(ae=>ae.i!==W.i).length>0,ie&&(re=W.y,f=W.h,K=W.x,s=W.w,V=!1)),W.w=s,W.h=f,W});if(!ge)return;J=be,V&&(J=(0,a.moveElement)(be,ge,K,re,!0,this.props.preventCollision,(0,a.compactType)(this.props),N,X));const I={w:ge.w,h:ge.h,x:ge.x,y:ge.y,static:!0,i:t};this.props.onResize(J,H,ge,I,w,O),this.setState({layout:X?J:(0,a.compact)(J,(0,a.compactType)(this.props),N),activeDrag:I})}),P(this,"onResizeStop",(t,s,f,l)=>{let{e:w,node:O}=l;const{layout:D,oldResizeItem:M}=this.state,{cols:H,allowOverlap:T}=this.props,N=(0,a.getLayoutItem)(D,t),G=T?D:(0,a.compact)(D,(0,a.compactType)(this.props),H);this.props.onResizeStop(G,M,N,null,w,O);const{oldLayout:X}=this.state;this.setState({activeDrag:null,layout:G,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(G,X)}),P(this,"onDragOver",t=>{var s;if(t.preventDefault(),t.stopPropagation(),y&&!((s=t.nativeEvent.target)!==null&&s!==void 0&&s.classList.contains(k)))return!1;const{droppingItem:f,onDropDragOver:l,margin:w,cols:O,rowHeight:D,maxRows:M,width:H,containerPadding:T,transformScale:N}=this.props,G=l==null?void 0:l(t);if(G===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const X=R(R({},f),G),{layout:V}=this.state,J=t.currentTarget.getBoundingClientRect(),K=t.clientX-J.left,re=t.clientY-J.top,be={left:K/N,top:re/N,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ge,top:I}=this.state.droppingPosition;(ge!=K||I!=re)&&this.setState({droppingPosition:be})}}else{const ge={cols:O,margin:w,maxRows:M,rowHeight:D,containerWidth:H,containerPadding:T||w},I=(0,c.calcXY)(ge,re,K,X.w,X.h);this.setState({droppingDOMNode:n.createElement("div",{key:X.i}),droppingPosition:be,layout:[...V,R(R({},X),{},{x:I.x,y:I.y,static:!1,isDraggable:!0})]})}}),P(this,"removeDroppingPlaceholder",()=>{const{droppingItem:t,cols:s}=this.props,{layout:f}=this.state,l=(0,a.compact)(f.filter(w=>w.i!==t.i),(0,a.compactType)(this.props),s,this.props.allowOverlap);this.setState({layout:l,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:s}=this.props,{layout:f}=this.state,l=f.find(w=>w.i===s.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,l,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,s){let f;return s.activeDrag?null:(!(0,i.deepEqual)(t.layout,s.propsLayout)||t.compactType!==s.compactType?f=t.layout:(0,a.childrenEqual)(t.children,s.children)||(f=s.layout),f?{layout:(0,a.synchronizeLayoutWithChildren)(f,t.children,t.cols,(0,a.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,s){return this.props.children!==t.children||!(0,a.fastRGLPropsEqual)(this.props,t,i.deepEqual)||this.state.activeDrag!==s.activeDrag||this.state.mounted!==s.mounted||this.state.droppingPosition!==s.droppingPosition}componentDidUpdate(t,s){if(!this.state.activeDrag){const f=this.state.layout,l=s.layout;this.onLayoutMaybeChanged(f,l)}}containerHeight(){if(!this.props.autoSize)return;const t=(0,a.bottom)(this.state.layout),s=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+s*2+"px"}onLayoutMaybeChanged(t,s){s||(s=this.state.layout),(0,i.deepEqual)(s,t)||this.props.onLayoutChange(t)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:s,cols:f,margin:l,containerPadding:w,rowHeight:O,maxRows:D,useCSSTransforms:M,transformScale:H}=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:s,cols:f,margin:l,containerPadding:w||l,maxRows:D,rowHeight:O,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:M,transformScale:H},n.createElement("div",null))}processGridItem(t,s){if(!t||!t.key)return;const f=(0,a.getLayoutItem)(this.state.layout,String(t.key));if(!f)return null;const{width:l,cols:w,margin:O,containerPadding:D,rowHeight:M,maxRows:H,isDraggable:T,isResizable:N,isBounded:G,useCSSTransforms:X,transformScale:V,draggableCancel:J,draggableHandle:K,resizeHandles:re,resizeHandle:be}=this.props,{mounted:ge,droppingPosition:I}=this.state,W=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&T,ie=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&N,oe=f.resizeHandles||re,ae=W&&G&&f.isBounded!==!1;return n.createElement(u.default,{containerWidth:l,cols:w,margin:O,containerPadding:D||O,maxRows:H,rowHeight:M,cancel:J,handle:K,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:W,isResizable:ie,isBounded:ae,useCSSTransforms:X&&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:s?I:void 0,resizeHandles:oe,resizeHandle:be},t)}render(){const{className:t,style:s,isDroppable:f,innerRef:l}=this.props,w=(0,o.default)(k,t),O=R({height:this.containerHeight()},s);return n.createElement("div",{ref:l,className:w,style:O,onDrop:f?this.onDrop:a.noop,onDragLeave:f?this.onDragLeave:a.noop,onDragEnter:f?this.onDragEnter:a.noop,onDragOver:f?this.onDragOver:a.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=d,P(d,"displayName","ReactGridLayout"),P(d,"propTypes",x.default),P(d,"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:a.noop,onDragStart:a.noop,onDrag:a.noop,onDragStop:a.noop,onResizeStart:a.noop,onResize:a.noop,onResizeStop:a.noop,onDrop:a.noop,onDropDragOver:a.noop}),lt}var yt={},Xe={},Fr;function Yr(){if(Fr)return Xe;Fr=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.findOrGenerateResponsiveLayout=a,Xe.getBreakpointFromWidth=i,Xe.getColsFromBreakpoint=o,Xe.sortBreakpoints=c;var n=Qe();function i(u,x){const _=c(u);let b=_[0];for(let v=1,R=_.length;v<R;v++){const P=_[v];x>u[P]&&(b=P)}return b}function o(u,x){if(!x[u])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+u+" is missing!");return x[u]}function a(u,x,_,b,v,R){if(u[_])return(0,n.cloneLayout)(u[_]);let P=u[b];const C=c(x),L=C.slice(C.indexOf(_));for(let k=0,y=L.length;k<y;k++){const d=L[k];if(u[d]){P=u[d];break}}return P=(0,n.cloneLayout)(P||[]),(0,n.compact)((0,n.correctBounds)(P,{cols:v}),R,v)}function c(u){return Object.keys(u).sort(function(_,b){return u[_]-u[b]})}return Xe}var Gr;function Bn(){if(Gr)return yt;Gr=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.default=void 0;var n=b(se),i=_(Ue()),o=Wt(),a=Qe(),c=Yr(),u=_(qr());const x=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function _(f){return f&&f.__esModule?f:{default:f}}function b(f,l){if(typeof WeakMap=="function")var w=new WeakMap,O=new WeakMap;return(b=function(D,M){if(!M&&D&&D.__esModule)return D;var H,T,N={__proto__:null,default:D};if(D===null||typeof D!="object"&&typeof D!="function")return N;if(H=M?O:w){if(H.has(D))return H.get(D);H.set(D,N)}for(const G in D)G!=="default"&&{}.hasOwnProperty.call(D,G)&&((T=(H=Object.defineProperty)&&Object.getOwnPropertyDescriptor(D,G))&&(T.get||T.set)?H(N,G,T):N[G]=D[G]);return N})(f,l)}function v(){return v=Object.assign?Object.assign.bind():function(f){for(var l=1;l<arguments.length;l++){var w=arguments[l];for(var O in w)({}).hasOwnProperty.call(w,O)&&(f[O]=w[O])}return f},v.apply(null,arguments)}function R(f,l){if(f==null)return{};var w,O,D=P(f,l);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(f);for(O=0;O<M.length;O++)w=M[O],l.indexOf(w)===-1&&{}.propertyIsEnumerable.call(f,w)&&(D[w]=f[w])}return D}function P(f,l){if(f==null)return{};var w={};for(var O in f)if({}.hasOwnProperty.call(f,O)){if(l.indexOf(O)!==-1)continue;w[O]=f[O]}return w}function C(f,l){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(f);l&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(f,D).enumerable})),w.push.apply(w,O)}return w}function L(f){for(var l=1;l<arguments.length;l++){var w=arguments[l]!=null?arguments[l]:{};l%2?C(Object(w),!0).forEach(function(O){k(f,O,w[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):C(Object(w)).forEach(function(O){Object.defineProperty(f,O,Object.getOwnPropertyDescriptor(w,O))})}return f}function k(f,l,w){return(l=y(l))in f?Object.defineProperty(f,l,{value:w,enumerable:!0,configurable:!0,writable:!0}):f[l]=w,f}function y(f){var l=d(f,"string");return typeof l=="symbol"?l:l+""}function d(f,l){if(typeof f!="object"||!f)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var O=w.call(f,l);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(f)}const r=f=>Object.prototype.toString.call(f);function t(f,l){return f==null?null:Array.isArray(f)?f:f[l]}let s=class extends n.Component{constructor(){super(...arguments),k(this,"state",this.generateInitialState()),k(this,"onLayoutChange",l=>{this.props.onLayoutChange(l,L(L({},this.props.layouts),{},{[this.state.breakpoint]:l}))})}generateInitialState(){const{width:l,breakpoints:w,layouts:O,cols:D}=this.props,M=(0,c.getBreakpointFromWidth)(w,l),H=(0,c.getColsFromBreakpoint)(M,D),T=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,c.findOrGenerateResponsiveLayout)(O,w,M,M,H,T),breakpoint:M,cols:H}}static getDerivedStateFromProps(l,w){if(!(0,o.deepEqual)(l.layouts,w.layouts)){const{breakpoint:O,cols:D}=w;return{layout:(0,c.findOrGenerateResponsiveLayout)(l.layouts,l.breakpoints,O,O,D,l.compactType),layouts:l.layouts}}return null}componentDidUpdate(l){(this.props.width!=l.width||this.props.breakpoint!==l.breakpoint||!(0,o.deepEqual)(this.props.breakpoints,l.breakpoints)||!(0,o.deepEqual)(this.props.cols,l.cols))&&this.onWidthChange(l)}onWidthChange(l){const{breakpoints:w,cols:O,layouts:D,compactType:M}=this.props,H=this.props.breakpoint||(0,c.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),T=this.state.breakpoint,N=(0,c.getColsFromBreakpoint)(H,O),G=L({},D);if(T!==H||l.breakpoints!==w||l.cols!==O){T in G||(G[T]=(0,a.cloneLayout)(this.state.layout));let J=(0,c.findOrGenerateResponsiveLayout)(G,w,H,T,N,M);J=(0,a.synchronizeLayoutWithChildren)(J,this.props.children,N,M,this.props.allowOverlap),G[H]=J,this.props.onBreakpointChange(H,N),this.props.onLayoutChange(J,G),this.setState({breakpoint:H,layout:J,cols:N})}const X=t(this.props.margin,H),V=t(this.props.containerPadding,H);this.props.onWidthChange(this.props.width,X,N,V)}render(){const l=this.props,{breakpoint:w,breakpoints:O,cols:D,layouts:M,margin:H,containerPadding:T,onBreakpointChange:N,onLayoutChange:G,onWidthChange:X}=l,V=R(l,x);return n.createElement(u.default,v({},V,{margin:t(H,this.state.breakpoint),containerPadding:t(T,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return yt.default=s,k(s,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts(f,l){if(r(f[l])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+r(f[l]));Object.keys(f[l]).forEach(w=>{if(!(w in f.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,a.validateLayout)(f.layouts[w],"layouts."+w)})},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),k(s,"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:a.noop,onLayoutChange:a.noop,onWidthChange:a.noop}),yt}var Tt={},Vr=(function(){if(typeof Map<"u")return Map;function n(i,o){var a=-1;return i.some(function(c,u){return c[0]===o?(a=u,!0):!1}),a}return(function(){function i(){this.__entries__=[]}return Object.defineProperty(i.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),i.prototype.get=function(o){var a=n(this.__entries__,o),c=this.__entries__[a];return c&&c[1]},i.prototype.set=function(o,a){var c=n(this.__entries__,o);~c?this.__entries__[c][1]=a:this.__entries__.push([o,a])},i.prototype.delete=function(o){var a=this.__entries__,c=n(a,o);~c&&a.splice(c,1)},i.prototype.has=function(o){return!!~n(this.__entries__,o)},i.prototype.clear=function(){this.__entries__.splice(0)},i.prototype.forEach=function(o,a){a===void 0&&(a=null);for(var c=0,u=this.__entries__;c<u.length;c++){var x=u[c];o.call(a,x[1],x[0])}},i})()})(),Kt=typeof window<"u"&&typeof document<"u"&&window.document===document,zt=(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")()})(),qn=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(zt):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}})(),Fn=2;function Yn(n,i){var o=!1,a=!1,c=0;function u(){o&&(o=!1,n()),a&&_()}function x(){qn(u)}function _(){var b=Date.now();if(o){if(b-c<Fn)return;a=!0}else o=!0,a=!1,setTimeout(x,i);c=b}return _}var Gn=20,Vn=["top","right","bottom","left","width","height","size","weight"],Un=typeof MutationObserver<"u",$n=(function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Yn(this.refresh.bind(this),Gn)}return n.prototype.addObserver=function(i){~this.observers_.indexOf(i)||this.observers_.push(i),this.connected_||this.connect_()},n.prototype.removeObserver=function(i){var o=this.observers_,a=o.indexOf(i);~a&&o.splice(a,1),!o.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var i=this.updateObservers_();i&&this.refresh()},n.prototype.updateObservers_=function(){var i=this.observers_.filter(function(o){return o.gatherActive(),o.hasActive()});return i.forEach(function(o){return o.broadcastActive()}),i.length>0},n.prototype.connect_=function(){!Kt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Un?(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(){!Kt||!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(i){var o=i.propertyName,a=o===void 0?"":o,c=Vn.some(function(u){return!!~a.indexOf(u)});c&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n})(),Ur=(function(n,i){for(var o=0,a=Object.keys(i);o<a.length;o++){var c=a[o];Object.defineProperty(n,c,{value:i[c],enumerable:!1,writable:!1,configurable:!0})}return n}),Ze=(function(n){var i=n&&n.ownerDocument&&n.ownerDocument.defaultView;return i||zt}),$r=Mt(0,0,0,0);function kt(n){return parseFloat(n)||0}function Xr(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return i.reduce(function(a,c){var u=n["border-"+c+"-width"];return a+kt(u)},0)}function Xn(n){for(var i=["top","right","bottom","left"],o={},a=0,c=i;a<c.length;a++){var u=c[a],x=n["padding-"+u];o[u]=kt(x)}return o}function Jn(n){var i=n.getBBox();return Mt(0,0,i.width,i.height)}function Kn(n){var i=n.clientWidth,o=n.clientHeight;if(!i&&!o)return $r;var a=Ze(n).getComputedStyle(n),c=Xn(a),u=c.left+c.right,x=c.top+c.bottom,_=kt(a.width),b=kt(a.height);if(a.boxSizing==="border-box"&&(Math.round(_+u)!==i&&(_-=Xr(a,"left","right")+u),Math.round(b+x)!==o&&(b-=Xr(a,"top","bottom")+x)),!Zn(n)){var v=Math.round(_+u)-i,R=Math.round(b+x)-o;Math.abs(v)!==1&&(_-=v),Math.abs(R)!==1&&(b-=R)}return Mt(c.left,c.top,_,b)}var Qn=(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 Zn(n){return n===Ze(n).document.documentElement}function eo(n){return Kt?Qn(n)?Jn(n):Kn(n):$r}function to(n){var i=n.x,o=n.y,a=n.width,c=n.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,x=Object.create(u.prototype);return Ur(x,{x:i,y:o,width:a,height:c,top:o,right:i+a,bottom:c+o,left:i}),x}function Mt(n,i,o,a){return{x:n,y:i,width:o,height:a}}var ro=(function(){function n(i){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Mt(0,0,0,0),this.target=i}return n.prototype.isActive=function(){var i=eo(this.target);return this.contentRect_=i,i.width!==this.broadcastWidth||i.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var i=this.contentRect_;return this.broadcastWidth=i.width,this.broadcastHeight=i.height,i},n})(),no=(function(){function n(i,o){var a=to(o);Ur(this,{target:i,contentRect:a})}return n})(),oo=(function(){function n(i,o,a){if(this.activeObservations_=[],this.observations_=new Vr,typeof i!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=i,this.controller_=o,this.callbackCtx_=a}return n.prototype.observe=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(i instanceof Ze(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var o=this.observations_;o.has(i)||(o.set(i,new ro(i)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(i){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(i instanceof Ze(i).Element))throw new TypeError('parameter 1 is not of type "Element".');var o=this.observations_;o.has(i)&&(o.delete(i),o.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var i=this;this.clearActive(),this.observations_.forEach(function(o){o.isActive()&&i.activeObservations_.push(o)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var i=this.callbackCtx_,o=this.activeObservations_.map(function(a){return new no(a.target,a.broadcastRect())});this.callback_.call(i,o,i),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n})(),Jr=typeof WeakMap<"u"?new WeakMap:new Vr,Kr=(function(){function n(i){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 o=$n.getInstance(),a=new oo(i,o,this);Jr.set(this,a)}return n})();["observe","unobserve","disconnect"].forEach(function(n){Kr.prototype[n]=function(){var i;return(i=Jr.get(this))[n].apply(i,arguments)}});var io=(function(){return typeof zt.ResizeObserver<"u"?zt.ResizeObserver:Kr})();const so=fn(Object.freeze(Object.defineProperty({__proto__:null,default:io},Symbol.toStringTag,{value:"Module"})));var Qr;function ao(){if(Qr)return Tt;Qr=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.default=k;var n=x(se),i=u(Ue()),o=u(so),a=u(_t());const c=["measureBeforeMount"];function u(y){return y&&y.__esModule?y:{default:y}}function x(y,d){if(typeof WeakMap=="function")var r=new WeakMap,t=new WeakMap;return(x=function(s,f){if(!f&&s&&s.__esModule)return s;var l,w,O={__proto__:null,default:s};if(s===null||typeof s!="object"&&typeof s!="function")return O;if(l=f?t:r){if(l.has(s))return l.get(s);l.set(s,O)}for(const D in s)D!=="default"&&{}.hasOwnProperty.call(s,D)&&((w=(l=Object.defineProperty)&&Object.getOwnPropertyDescriptor(s,D))&&(w.get||w.set)?l(O,D,w):O[D]=s[D]);return O})(y,d)}function _(){return _=Object.assign?Object.assign.bind():function(y){for(var d=1;d<arguments.length;d++){var r=arguments[d];for(var t in r)({}).hasOwnProperty.call(r,t)&&(y[t]=r[t])}return y},_.apply(null,arguments)}function b(y,d){if(y==null)return{};var r,t,s=v(y,d);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(y);for(t=0;t<f.length;t++)r=f[t],d.indexOf(r)===-1&&{}.propertyIsEnumerable.call(y,r)&&(s[r]=y[r])}return s}function v(y,d){if(y==null)return{};var r={};for(var t in y)if({}.hasOwnProperty.call(y,t)){if(d.indexOf(t)!==-1)continue;r[t]=y[t]}return r}function R(y,d,r){return(d=P(d))in y?Object.defineProperty(y,d,{value:r,enumerable:!0,configurable:!0,writable:!0}):y[d]=r,y}function P(y){var d=C(y,"string");return typeof d=="symbol"?d:d+""}function C(y,d){if(typeof y!="object"||!y)return y;var r=y[Symbol.toPrimitive];if(r!==void 0){var t=r.call(y,d);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(y)}const L="react-grid-layout";function k(y){var d;return d=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 o.default(s=>{if(this.elementRef.current instanceof HTMLElement){const l=s[0].contentRect.width;this.setState({width:l})}});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:s}=t,f=b(t,c);return s&&!this.mounted?n.createElement("div",{className:(0,a.default)(this.props.className,L),style:this.props.style,ref:this.elementRef}):n.createElement(y,_({innerRef:this.elementRef},f,this.state))}},R(d,"defaultProps",{measureBeforeMount:!1}),R(d,"propTypes",{measureBeforeMount:i.default.bool}),d}return Tt}var Zr;function lo(){return Zr||(Zr=1,(function(n){n.exports=qr().default,n.exports.utils=Qe(),n.exports.calculateUtils=Bt(),n.exports.Responsive=Bn().default,n.exports.Responsive.utils=Yr(),n.exports.WidthProvider=ao().default})(Nt)),Nt.exports}var co=lo();const uo=dn(co);function en(n){const i=[];i.push(1,1,0,1,1,0,1,1);for(let o=0;o<n.length;o++){const c=(n.charCodeAt(o)%103).toString(2).padStart(7,"0");for(const u of c)i.push(u==="1"?1:0)}return i.push(1,1,0,0,0,1,1,0,0,0,1,1),i}const Qt=({value:n,format:i})=>{const o=se.useMemo(()=>en(n),[n,i]);if(!n)return e.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置条形码值"});const a=2,c=44,u=o.length*a;return e.jsxs("div",{style:{textAlign:"center",overflow:"hidden",maxWidth:"100%"},children:[e.jsx("canvas",{ref:x=>{if(!x)return;const _=x.getContext("2d");_&&(x.width=u,x.height=c,_.clearRect(0,0,u,c),o.forEach((b,v)=>{_.fillStyle=b===1?"#000":"#fff",_.fillRect(v*a,0,a,c)}))},style:{width:"100%",maxWidth:u,height:c}}),e.jsx("div",{style:{fontSize:10,marginTop:1,letterSpacing:1},children:n})]})},Zt=({value:n,errorLevel:i="M",color:o="#000000",backgroundColor:a="#ffffff"})=>n?e.jsx(E.QRCode,{value:n,type:"svg",bordered:!1,errorLevel:i,color:o,bgColor:a,style:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%"}}):e.jsx("div",{style:{fontSize:11,color:"#999"},children:"请设置二维码内容"}),fo=uo,tn=se.memo(({comp:n,selected:i,isPreview:o=!1,dataSources:a=[]})=>{const c={width:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",outline:o?"none":i?"2px solid #1677ff":"1px dashed #d9d9d9",outlineOffset:-1},u=x=>Ke(n,x,a);switch(n.type){case"text":return e.jsx("div",{style:{...c,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:wt(u("content")||"",n.props.format)});case"image":const x=u("src")||n.props.src;return e.jsx("div",{style:c,children:x?e.jsx("img",{src:x,style:{width:"100%",height:"100%",objectFit:n.props.fit||"contain"},alt:""}):e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#bbb",fontSize:12},children:"请在属性中设置图片地址"})});case"table":return e.jsx(po,{comp:n,style:c,dataSources:a});case"barcode":const _=u("value")||n.props.value||"123456";return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Qt,{value:_,format:n.props.format||"CODE128"})});case"qrcode":const b=u("value")||n.props.value||"https://example.com";return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",justifyContent:"center",padding:4},children:e.jsx(Zt,{value:b,errorLevel:n.props.errorLevel||"M",color:n.props.color||"#000000",backgroundColor:n.props.backgroundColor||"#ffffff"})});case"line":return e.jsx("div",{style:{...c,display:"flex",alignItems:"center",border:"none",outline:i?"2px solid #1677ff":"1px dashed transparent"},children:e.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 e.jsx("div",{style:c,children:n.type})}}),po=({comp:n,style:i,dataSources:o=[]})=>{const a=n.props.borderWidth||1,c=n.props.borderColor||"#000",u=n.props.headerBackgroundColor||"#f5f5f5",x=n.props.headerColor||"#000000",_=n.props.headerFontSize||12,b=n.tableColumns||[],v=n.props.tableDataSourceId,R=v?o.find(k=>k.id===v):null,P=R?Ct(R):null;if(P&&P.length>0)return e.jsxs("table",{style:{...i,borderCollapse:"collapse",width:"100%",height:"100%"},children:[b.length>0&&e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:u},children:b.map((k,y)=>e.jsx("th",{style:{border:`${a}px solid ${c}`,padding:4,fontSize:_,fontWeight:"bold",textAlign:"center",color:x},children:k.title},y))})}),e.jsx("tbody",{children:P.map((k,y)=>e.jsx("tr",{children:b.map((d,r)=>e.jsx("td",{style:{border:`${a}px solid ${c}`,padding:4,fontSize:12,textAlign:"center"},children:d.fieldPath?k[d.fieldPath]:""},r))},y))})]});const C=n.props.rows||3,L=Math.max(n.props.cols||3,b.length||3);return e.jsx("table",{style:{...i,borderCollapse:"collapse",width:"100%",height:"100%"},children:e.jsx("tbody",{children:Array.from({length:C}).map((k,y)=>e.jsx("tr",{children:Array.from({length:L}).map((d,r)=>e.jsx("td",{style:{border:`${a}px solid ${c}`,padding:2,fontSize:12,textAlign:"center"},children:" "},r))},y))})})},rn=({isPreview:n=!1,dataSources:i})=>{const o=pe(s=>s.components),a=pe(s=>s.selectedId),c=pe(s=>s.pageSettings),u=pe(s=>s.selectComponent);pe(s=>s.updateComponent);const x=pe(s=>s.setComponents),_=pe(s=>s.addComponent),b=pe(s=>s.gridSettings),v=pe(s=>s.dataSources),R=i||v,P=se.useMemo(()=>{const s=bt[c.paperSize];if(!s)return{width:c.customWidth*De,height:c.customHeight*De};const f=s.width*De,l=s.height*De;return c.orientation==="landscape"?{width:l,height:f}:{width:f,height:l}},[c]),C=se.useMemo(()=>({top:c.marginTop*De,right:c.marginRight*De,bottom:c.marginBottom*De,left:c.marginLeft*De}),[c]),L=P.width-C.left-C.right,k=P.height-C.top-C.bottom,y=se.useMemo(()=>o.map(s=>({i:s.id,x:s.x,y:s.y,w:s.w,h:s.h})),[o]),d=se.useCallback(s=>{const f=o.map((l,w)=>{const O=s[w];return O?{...l,x:O.x,y:O.y,w:O.w,h:O.h}:l});x(f)},[o,x]),r=se.useCallback((s,f,l)=>{var M,H;const w=l,O=(M=w.dataTransfer)==null?void 0:M.getData("componentType");if(!O)return;const D=(H=l.target.closest(".react-grid-layout"))==null?void 0:H.getBoundingClientRect();if(D){const T=Math.floor((w.clientX-D.left)/(L/b.cols)),N=Math.floor((w.clientY-D.top)/(L/b.cols));_(O,Math.max(0,T),Math.max(0,N))}else _(O)},[_,L,b.cols]),t=se.useCallback(s=>{u(s===a?null:s)},[u,a]);return e.jsx("div",{style:{flex:1,overflow:"auto",background:"#e8e8e8",display:"flex",justifyContent:"center",padding:"24px 0"},children:e.jsxs("div",{id:"print-paper",style:{width:P.width,height:P.height,background:"#fff",boxShadow:"0 2px 12px rgba(0,0,0,0.15)",position:"relative",flexShrink:0},children:[c.showHeader&&e.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:c.headerContent}),c.showFooter&&e.jsxs("div",{style:{position:"absolute",bottom:0,left:C.left,right:C.right,height:C.bottom,display:"flex",alignItems:"center",justifyContent:c.showPageNumber?"space-between":"center",fontSize:12,color:"#999",borderTop:"1px dashed #ddd",overflow:"hidden",padding:"0 8px"},children:[e.jsx("span",{children:c.footerContent}),c.showPageNumber&&e.jsx("span",{children:c.pageNumberFormat.replace("{page}","1")})]}),e.jsx("div",{style:{position:"absolute",top:C.top,left:C.left,width:L,height:k},children:n?e.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:o.map(s=>{const f=L/b.cols,l=L/b.cols,w={position:"absolute",left:s.x*f,top:s.y*l,width:s.w*f,height:s.h*l};return e.jsx("div",{style:w,children:e.jsx(tn,{comp:s,selected:!1,isPreview:!0,dataSources:R})},s.id)})}):e.jsx(fo,{className:"canvas-grid",layout:y,cols:b.cols,rowHeight:L/b.cols,width:L,margin:[0,0],containerPadding:[0,0],onLayoutChange:d,onDrop:r,isDroppable:!0,isResizable:!0,isDraggable:!0,compactType:null,preventCollision:!0,draggableHandle:".grid-item-drag-handle",style:{minHeight:k},children:o.map(s=>e.jsx("div",{className:"grid-item-drag-handle",onClick:()=>t(s.id),style:{cursor:"move"},children:e.jsx(tn,{comp:s,selected:s.id===a,dataSources:R})},s.id))})})]})})},{Text:je,Title:Do}=E.Typography,{TextArea:ho}=E.Input,go=()=>{const n=pe(r=>r.components),i=pe(r=>r.selectedId),o=pe(r=>r.dataSources),a=pe(r=>r.updateComponent),c=pe(r=>r.updateComponentTableColumns),u=se.useMemo(()=>n.find(r=>r.id===i)||null,[n,i]),[x,_]=se.useState([]),b=se.useMemo(()=>[{label:"无(使用静态值)",value:""},...o.map(r=>({label:r.name,value:r.id,type:r.type}))],[o]),v=se.useCallback((r,t)=>{i&&a(i,{props:{...u==null?void 0:u.props,[r]:t}})},[i,u,a]),R=se.useCallback((r,t,s,f)=>{if(!i)return;let l=f;t&&s&&(l=f);const w=`${r}Binding`;a(i,{props:{...u==null?void 0:u.props,[r]:l,[w]:{dataSourceId:t,fieldPath:s,staticValue:f}}})},[i,u,a]),P=se.useCallback(r=>{const t=u==null?void 0:u.props[`${r}Binding`],s=String((u==null?void 0:u.props[r])||"");return t?{field:r,dataSourceId:t.dataSourceId||null,fieldPath:t.fieldPath||"",staticValue:t.staticValue??s}:{field:r,dataSourceId:null,fieldPath:"",staticValue:s}},[u]);if(!u)return e.jsx(E.Card,{title:"属性面板",size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16}},children:e.jsx(E.Empty,{description:"请选择画布中的组件",image:E.Empty.PRESENTED_IMAGE_SIMPLE})});const C=lr[u.type]||u.type,L=e.jsxs(e.Fragment,{children:[e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"位置和大小"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"X"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.x,onChange:r=>a(i,{x:r??0})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"Y"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.y,onChange:r=>a(i,{y:r??0})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"宽度"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.w,min:1,onChange:r=>a(i,{w:r??1})})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"高度"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.h,min:1,onChange:r=>a(i,{h:r??1})})]})]})]}),k=({field:r,label:t,placeholder:s,isTextarea:f=!1})=>{const l=P(r),w=o.find(T=>T.id===l.dataSourceId),O=w?jt(w):null,D=O?Object.keys(O):[],[M,H]=se.useState(l.staticValue);return se.useEffect(()=>{H(l.staticValue)},[l.staticValue,l.dataSourceId]),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12,display:"block",marginBottom:4},children:t}),e.jsx("div",{style:{marginBottom:4},children:e.jsx(E.Select,{size:"small",style:{width:"100%"},placeholder:"选择数据源",value:l.dataSourceId||"",onChange:T=>{R(r,T||null,T&&l.fieldPath||"",l.staticValue)},options:b})}),l.dataSourceId&&e.jsx("div",{style:{marginBottom:4},children:e.jsx(E.Select,{size:"small",style:{width:"100%"},placeholder:"选择字段",value:l.fieldPath,onChange:T=>{R(r,l.dataSourceId,T||"",l.staticValue)},options:[{label:"请选择字段",value:""},...D.map(T=>({label:T,value:T}))]})}),l.dataSourceId?e.jsxs("div",{style:{padding:6,background:"#f0f5ff",border:"1px solid #adc6ff",borderRadius:4,fontSize:12},children:[e.jsx(Oe.DatabaseOutlined,{style:{marginRight:4,color:"#1890ff"}}),e.jsx("span",{style:{fontWeight:500},children:"数据绑定已启用"}),w&&l.fieldPath&&e.jsxs("span",{style:{marginLeft:8},children:[e.jsx(E.Tag,{color:"blue",children:w.name}),e.jsx(E.Tag,{color:"green",children:l.fieldPath})]})]}):f?e.jsx(ho,{rows:3,placeholder:s,value:M,onChange:T=>H(T.target.value),onBlur:()=>{R(r,null,"",M)}}):e.jsx(E.Input,{placeholder:s,value:M,onChange:T=>H(T.target.value),onBlur:()=>{R(r,null,"",M)}})]})},y=()=>{const r=u.tableColumns||[],t=o.filter(V=>V.type==="array"),s=u.props.tableDataSourceId||"",f=t.find(V=>V.id===s),l=x.length>0?x:r,[w,O]=se.useState({}),D=()=>{c(i,l)},M=()=>{const V=[...l,{title:`列${l.length+1}`}];_(V)},H=V=>{const J=l.filter((K,re)=>re!==V);_(J)},T=(V,J,K)=>{const re=[...l];re[V]={...re[V],[J]:K},_(re)};let N=[];if(f){const V=at(f.data);Array.isArray(V)&&V.length>0&&typeof V[0]=="object"&&(N=Object.keys(V[0]))}const G=[{title:"列标题",dataIndex:"title",width:60,render:(V,J)=>{const K=J.key in w?w[J.key]:J.title;return e.jsx(E.Input,{size:"small",value:K,placeholder:"列标题",onChange:re=>{O({...w,[J.key]:re.target.value})},onBlur:()=>{if(J.key in w){T(Number(J.key),"title",w[J.key]);const re={...w};delete re[J.key],O(re),D()}}})}},{title:"绑定字段",dataIndex:"fieldPath",width:100,render:(V,J)=>e.jsx(E.Select,{size:"small",style:{width:"100%"},value:J.fieldPath||"",placeholder:f?"绑定字段":"选择数据源先",disabled:!f,onChange:K=>{T(Number(J.key),"fieldPath",K||""),D()},options:[{label:"无绑定",value:""},...N.map(K=>({label:K,value:K}))]})},{title:"操作",width:50,render:(V,J)=>e.jsx(E.Popconfirm,{title:"确定要删除吗?",onConfirm:()=>{H(Number(J.key)),D()},okText:"确定",cancelText:"取消",children:e.jsx(E.Button,{type:"text",danger:!0,size:"small",icon:e.jsx(Oe.DeleteOutlined,{})})})}],X=l.map((V,J)=>({...V,key:String(J)}));return e.jsxs("div",{children:[e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:e.jsx(je,{style:{fontSize:12},children:"表格数据源"})}),e.jsx(E.Select,{size:"small",style:{width:"100%",marginBottom:8},placeholder:"选择数组类型数据源",value:s,onChange:V=>v("tableDataSourceId",V||""),options:[{label:"无(仅静态展示)",value:""},...t.map(V=>({label:V.name,value:V.id}))]}),e.jsx(E.Divider,{}),e.jsxs(E.Space,{style:{marginBottom:8},children:[e.jsx(je,{style:{fontSize:12},children:"列配置"}),e.jsx(E.Button,{size:"small",type:"dashed",icon:e.jsx(Oe.PlusOutlined,{}),onClick:M}),e.jsx(E.Button,{size:"small",type:"primary",onClick:D,icon:e.jsx(Oe.SaveOutlined,{})})]}),e.jsx(E.Table,{dataSource:X,columns:G,pagination:!1,size:"small",scroll:{x:200,y:360},bordered:!0,rowKey:"key"})]})},d=()=>{switch(u.type){case"text":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"content",label:"内容",placeholder:"请输入文本内容",isTextarea:!0}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),e.jsx(E.Input,{size:"small",placeholder:"例如 yyyyMMdd 或 yyyy-MM-dd HH:mm:ss",value:u.props.format||"",onChange:r=>v("format",r.target.value)}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"文字样式"}),e.jsxs(E.Space,{style:{width:"100%"},direction:"vertical",size:4,children:[e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"字号"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.props.fontSize||14,min:6,max:200,onChange:r=>v("fontSize",r??14)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"对齐"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.textAlign||"left",onChange:r=>v("textAlign",r),options:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}]})]})]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"字重"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fontWeight||"normal",onChange:r=>v("fontWeight",r),options:[{value:"normal",label:"常规"},{value:"bold",label:"加粗"}]})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"样式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fontStyle||"normal",onChange:r=>v("fontStyle",r),options:[{value:"normal",label:"常规"},{value:"italic",label:"斜体"}]})]})]}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"字体颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)}),e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.backgroundColor||"transparent",onChange:(r,t)=>v("backgroundColor",t)})]})]})]});case"image":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"src",label:"图片地址",placeholder:"输入图片 URL"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"适应方式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.fit||"contain",onChange:r=>v("fit",r),options:[{value:"contain",label:"适应"},{value:"cover",label:"填充"},{value:"fill",label:"拉伸"}]})]});case"table":return e.jsxs(e.Fragment,{children:[e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"边框样式"}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"粗细"}),e.jsx(E.InputNumber,{size:"small",value:u.props.borderWidth||1,min:0,max:20,onChange:r=>v("borderWidth",r??1)}),e.jsx(je,{style:{fontSize:12},children:"颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.borderColor||"#000000",onChange:(r,t)=>v("borderColor",t)})]}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"列标题样式"}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"字号"}),e.jsx(E.InputNumber,{size:"small",value:u.props.headerFontSize||12,min:6,max:200,onChange:r=>v("headerFontSize",r??12)})]}),e.jsxs(E.Space,{children:[e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.headerBackgroundColor||"#f5f5f5",onChange:(r,t)=>v("headerBackgroundColor",t)}),e.jsx(je,{style:{fontSize:12},children:"字体颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.headerColor||"#000000",onChange:(r,t)=>v("headerColor",t)})]}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(y,{})]});case"barcode":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"value",label:"条码值",placeholder:"输入条码内容"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"格式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.format||"CODE128",onChange:r=>v("format",r),options:[{value:"CODE128",label:"CODE128"}]})]});case"qrcode":return e.jsxs(e.Fragment,{children:[e.jsx(k,{field:"value",label:"二维码内容",placeholder:"输入二维码内容"}),e.jsx(E.Divider,{style:{margin:"4px 0"}}),e.jsx(je,{style:{fontSize:12,marginTop:8,display:"block"},children:"纠错级别"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.errorLevel||"M",onChange:r=>v("errorLevel",r),options:[{value:"L",label:"L - 低"},{value:"M",label:"M - 中"},{value:"Q",label:"Q - 较高"},{value:"H",label:"H - 高"}]}),e.jsxs("div",{style:{display:"flex",gap:16,marginTop:8},children:[e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"前景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)})]}),e.jsxs("div",{children:[e.jsx(je,{style:{fontSize:12},children:"背景色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.backgroundColor||"#ffffff",onChange:(r,t)=>v("backgroundColor",t)})]})]})]});case"line":return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"粗细"}),e.jsx(E.InputNumber,{size:"small",style:{width:"100%"},value:u.props.thickness||1,min:1,max:20,onChange:r=>v("thickness",r??1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx(je,{style:{fontSize:12},children:"样式"}),e.jsx(E.Select,{size:"small",style:{width:"100%"},value:u.props.style||"solid",onChange:r=>v("style",r),options:[{value:"solid",label:"实线"},{value:"dashed",label:"虚线"},{value:"dotted",label:"点线"}]})]})]}),e.jsxs("div",{style:{marginTop:8},children:[e.jsx(je,{style:{fontSize:12},children:"颜色"}),e.jsx(E.ColorPicker,{size:"small",value:u.props.color||"#000000",onChange:(r,t)=>v("color",t)})]})]});default:return null}};return e.jsx(E.Card,{title:`属性 - ${C}`,size:"small",style:{height:"100%",borderRadius:0,borderLeft:0},styles:{body:{padding:16,overflowY:"auto"}},children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[L,e.jsx(E.Divider,{style:{margin:"4px 0"}}),d()]})})},{Text:To}=E.Typography,yo=({dataSources:n})=>{const i=pe(r=>r.previewVisible),o=pe(r=>r.setPreviewVisible),a=pe(r=>r.components),c=pe(r=>r.pageSettings),u=pe(r=>r.gridSettings)||xt,x=pe(r=>r.dataSources),_=n||x,b=se.useRef(null),v=se.useMemo(()=>{const r=bt[c.paperSize];if(!r)return{width:c.customWidth*De,height:c.customHeight*De};const t=r.width*De,s=r.height*De;return c.orientation==="landscape"?{width:s,height:t}:{width:t,height:s}},[c]),R=se.useMemo(()=>({top:c.marginTop*De,right:c.marginRight*De,bottom:c.marginBottom*De,left:c.marginLeft*De}),[c]),P=v.width-R.left-R.right,C=P/u.cols,L=nr.useReactToPrint({contentRef:b,documentTitle:"打印模板",pageStyle:`
52
52
  @page {
53
53
  size: ${v.width/De}mm ${v.height/De}mm;
54
54
  margin: ${c.marginTop}mm ${c.marginRight}mm ${c.marginBottom}mm ${c.marginLeft}mm;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "operp-print-designer",
3
3
  "private": false,
4
- "version": "1.1.2",
4
+ "version": "1.1.3",
5
5
  "type": "module",
6
6
  "description": "一个功能强大的打印模板设计器组件,支持拖拽、数据绑定和打印预览",
7
7
  "main": "./dist/operp-print-designer.umd.js",