@yuntijs/ui
Version:
☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps
1 lines • 15.5 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.YuntiUI=t():e.YuntiUI=t()}(self,(function(){return function(){var e={67762:function(e,t,n){"use strict";n.d(t,{b:function(){return A}});var a,r=n(41158),i=n.n(r),o=n(58835),s=n.n(o),c=n(89597),l=(n(63313),n(76236)),u=n.n(l),d=(0,n(26880).kc)((function(e,t){var n=e.css,r=t.bordered,i=void 0===r?"dashed":r;return{custom:n(a||(a=u()(["\n border-style: "," !important;\n "])),i)}}),{hashPriority:"low"}),p=n(18784),m=["bordered","className"],A=function(e){var t=e.bordered,n=void 0===t?"dashed":t,a=e.className,r=s()(e,m),o=d({bordered:n}),l=o.styles,u=o.cx;return(0,p.jsx)(c.Alert,i()(i()({},r),{},{className:u(l.custom,a)}))};A.ErrorBoundary=c.Alert.ErrorBoundary},44526:function(e,t,n){"use strict";n.d(t,{g:function(){return d}});var a=n(41158),r=n.n(a),i=n(58835),o=n.n(i),s=n(89597),c=(n(63313),n(75879)),l=n(18784),u=["children"],d=function(e){var t=e.children,n=o()(e,u);return(0,l.jsxs)(s.App,r()(r()({},n),{},{children:[(0,l.jsx)(c.E,{}),t]}))};d.useApp=s.App.useApp},66236:function(e,t,n){"use strict";n.d(t,{a:function(){return a.Breadcrumb}});var a=n(89597)},19501:function(e,t,n){"use strict";n.d(t,{h:function(){return A}});var a=n(9908),r=n.n(a),i=n(41158),o=n.n(i),s=n(58835),c=n.n(s),l=n(89597),u=(n(63313),n(18784)),d=["items","onClick","size"],p=["key","label"],m=["key","label"],A=function(e){var t=e.items,n=void 0===t?[]:t,a=e.onClick,i=void 0===a?function(){}:a,s=e.size,A=c()(e,d);if(n.length<=2)return(0,u.jsx)(l.Space,o()(o()({align:"end",size:12},A),{},{children:n.map((function(e){var t=e.key,n=e.label,a=c()(e,p);return(0,u.jsx)(l.Button,o()(o()({onClick:function(e){return i(t,e)},size:s},a),{},{children:n}),t)}))}));var g=r()(n),h=g[0],f=g.slice(1),b=h,y=b.key,v=b.label,w=c()(b,m);return(0,u.jsx)(l.Dropdown.Button,o()(o()(o()({onClick:function(e){return i(y,e)}},w),{},{menu:{onClick:function(e){var t=e.key,n=e.domEvent;return i(t,n)},items:f},overlayStyle:{minWidth:100},size:s},A),{},{children:v}),y)}},22782:function(e,t,n){"use strict";n.d(t,{Z:function(){return a.Card}});var a=n(89597)},53345:function(e,t,n){"use strict";n.d(t,{XT:function(){return dn},ah:function(){return Xt},hG:function(){return Yt},Ji:function(){return Cn},$p:function(){return Ia},s3:function(){return Ba}});var a=n(41158),r=n.n(a),i=n(58835),o=n.n(i),s=n(76236),c=n.n(s);n(63654);Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,r,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=i.next()).done;)o.push(a.value)}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}Object.create;"function"==typeof SuppressedError&&SuppressedError;var u=n(63313);var d=function(e,t){void 0===e&&(e=!1);var n=l((0,u.useState)(e),2),a=n[0],r=n[1];return[a,(0,u.useMemo)((function(){var n=void 0===t?!e:t;return{toggle:function(){return r((function(t){return t===e?n:e}))},set:function(e){return r(e)},setLeft:function(){return r(e)},setRight:function(){return r(n)}}}),[])]};var p=function(e){var t=(0,u.useRef)(e);return t.current=e,t},m=function(e){return"function"==typeof e},A=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(e,t){if(A)return e?m(e)?e():"current"in e?e.current:e:t}var h=function(e){var t=p(e);(0,u.useEffect)((function(){return function(){t.current()}}),[])};var f=function(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0},b=function(e){return function(t,n,a){var r=(0,u.useRef)(!1),i=(0,u.useRef)([]),o=(0,u.useRef)([]),s=(0,u.useRef)(void 0);e((function(){var e,c=(Array.isArray(a)?a:[a]).map((function(e){return g(e)}));if(!r.current)return r.current=!0,i.current=c,o.current=n,void(s.current=t());c.length===i.current.length&&f(i.current,c)&&f(o.current,n)||(null===(e=s.current)||void 0===e||e.call(s),i.current=c,o.current=n,s.current=t())})),h((function(){var e;null===(e=s.current)||void 0===e||e.call(s),r.current=!1}))}},y=b(u.useEffect);var v,w,k,C,_,E,x,D,B,F,I,Q,S,T,M,L,N,R,j,P,O,$,q,G,z=function(e,t,n){void 0===n&&(n={});var a=n.enable,r=void 0===a||a,i=p(t);y((function(){if(r){var t=g(n.target,window);if(null==t?void 0:t.addEventListener){var a=function(e){return i.current(e)},o=Array.isArray(e)?e:[e];return o.forEach((function(e){t.addEventListener(e,a,{capture:n.capture,once:n.once,passive:n.passive})})),function(){o.forEach((function(e){t.removeEventListener(e,a,{capture:n.capture})}))}}}}),[e,n.capture,n.once,n.passive,r],n.target)},H=function(e,t){var n=t||{},a=n.onEnter,r=n.onLeave,i=n.onChange,o=l(function(e){void 0===e&&(e=!1);var t=l(d(!!e),2),n=t[0],a=t[1],r=a.toggle,i=a.set;return[n,(0,u.useMemo)((function(){return{toggle:r,set:function(e){return i(!!e)},setTrue:function(){return i(!0)},setFalse:function(){return i(!1)}}}),[])]}(!1),2),s=o[0],c=o[1],p=c.setTrue,m=c.setFalse;return z("mouseenter",(function(){null==a||a(),p(),null==i||i(!0)}),{target:e}),z("mouseleave",(function(){null==r||r(),m(),null==i||i(!1)}),{target:e}),s},Z=n(89597),U=n(75115),W=n(4214),Y=n(42705),V=n(64250),K=(0,V.Z)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),J=n(53959),X=n(18784),ee=n(74012),te=function(){return te=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},te.apply(this,arguments)},ne={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},ae={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},re={width:"20px",height:"20px",position:"absolute",zIndex:1},ie={top:te(te({},ne),{top:"-5px"}),right:te(te({},ae),{left:void 0,right:"-5px"}),bottom:te(te({},ne),{top:void 0,bottom:"-5px"}),left:te(te({},ae),{left:"-5px"}),topRight:te(te({},re),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:te(te({},re),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:te(te({},re),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:te(te({},re),{left:"-10px",top:"-10px",cursor:"nw-resize"})},oe=(0,u.memo)((function(e){var t=e.onResizeStart,n=e.direction,a=e.children,r=e.replaceStyles,i=e.className,o=(0,u.useCallback)((function(e){t(e,n)}),[t,n]),s=(0,u.useCallback)((function(e){t(e,n)}),[t,n]),c=(0,u.useMemo)((function(){return te(te({position:"absolute",userSelect:"none"},ie[n]),null!=r?r:{})}),[r,n]);return(0,X.jsx)("div",{className:i||void 0,style:c,onMouseDown:o,onTouchStart:s,children:a})})),se=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function a(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(a.prototype=n.prototype,new a)}}(),ce=function(){return ce=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ce.apply(this,arguments)},le={width:"auto",height:"auto"},ue=function(e,t,n){return Math.max(Math.min(e,n),t)},de=function(e,t,n){var a=Math.round(e/t);return a*t+n*(a-1)},pe=function(e,t){return new RegExp(e,"i").test(t)},me=function(e){return Boolean(e.touches&&e.touches.length)},Ae=function(e,t,n){void 0===n&&(n=0);var a=t.reduce((function(n,a,r){return Math.abs(a-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[a]-e);return 0===n||r<n?t[a]:e},ge=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},he=function(e,t,n,a){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return a*(Number(e.replace("vh",""))/100)}return e},fe=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],be="__resizable_base__",ye=function(e){function t(t){var n,a,r,i,o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.delta={width:0,height:0},o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(be):t.className+=be,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.state={isResizing:!1,width:null!==(a=null===(n=o.propsSize)||void 0===n?void 0:n.width)&&void 0!==a?a:"auto",height:null!==(i=null===(r=o.propsSize)||void 0===r?void 0:r.height)&&void 0!==i?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return se(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||le},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,a=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:a,this.resizable.style.position=r}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){var n;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(n=e.propsSize[t])||void 0===n?void 0:n.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var a=e.getParentSize(),r=Number(e.state[t].toString().replace("px",""))/a[t]*100;return"".concat(r,"%")}return ge(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?ge(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?ge(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var a={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,a,r=this.props.boundsByDirection,i=this.state.direction,o=r&&pe("left",i),s=r&&pe("top",i);if("parent"===this.props.bounds){var c=this.parentNode;c&&(n=o?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),a=s?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,a=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),a=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),a&&Number.isFinite(a)&&(t=t&&t<a?t:a),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n,a=this.props.scale||1,r=(n=this.props.resizeRatio||1,Array.isArray(n)?n:[n,n]),i=r[0],o=r[1],s=this.state,c=s.direction,l=s.original,u=this.props,d=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,A=l.width,g=l.height,h=p||0,f=m||0;return pe("right",c)&&(A=l.width+(e-l.x)*i/a,d&&(g=(A-f)/this.ratio+h)),pe("left",c)&&(A=l.width-(e-l.x)*i/a,d&&(g=(A-f)/this.ratio+h)),pe("bottom",c)&&(g=l.height+(t-l.y)*o/a,d&&(A=(g-h)*this.ratio+f)),pe("top",c)&&(g=l.height-(t-l.y)*o/a,d&&(A=(g-h)*this.ratio+f)),{newWidth:A,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,a){var r=this.props,i=r.lockAspectRatio,o=r.lockAspectRatioExtraHeight,s=r.lockAspectRatioExtraWidth,c=void 0===a.width?10:a.width,l=void 0===n.width||n.width<0?e:n.width,u=void 0===a.height?10:a.height,d=void 0===n.height||n.height<0?t:n.height,p=o||0,m=s||0;if(i){var A=(u-p)*this.ratio+m,g=(d-p)*this.ratio+m,h=(c-m)/this.ratio+p,f=(l-m)/this.ratio+p,b=Math.max(c,A),y=Math.min(l,g),v=Math.max(u,h),w=Math.min(d,f);e=ue(e,b,y),t=ue(t,v,w)}else e=ue(e,c,l),t=ue(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var a=this.props.bounds.getBoundingClientRect();this.targetLeft=a.left*e,this.targetTop=a.top*e}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,s=r.right,c=r.bottom;this.resizableLeft=i*e,this.resizableRight=s*e,this.resizableTop=o*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,a=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(a=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&me(e.nativeEvent)&&(a=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var o=this.parentNode;if(o){var s=this.window.getComputedStyle(o).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var c={original:{x:a,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ce(ce({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(c)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&me(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,a=n.maxWidth,r=n.maxHeight,i=n.minWidth,o=n.minHeight,s=me(e)?e.touches[0].clientX:e.clientX,c=me(e)?e.touches[0].clientY:e.clientY,l=this.state,u=l.direction,d=l.original,p=l.width,m=l.height,A=this.getParentSize(),g=function(e,t,n,a,r,i,o){return a=he(a,e.width,t,n),r=he(r,e.height,t,n),i=he(i,e.width,t,n),o=he(o,e.height,t,n),{maxWidth:void 0===a?void 0:Number(a),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===o?void 0:Number(o)}}(A,this.window.innerWidth,this.window.innerHeight,a,r,i,o);a=g.maxWidth,r=g.maxHeight,i=g.minWidth,o=g.minHeight;var h=this.calculateNewSizeFromDirection(s,c),f=h.newHeight,b=h.newWidth,y=this.calculateNewMaxFromBoundary(a,r);this.props.snap&&this.props.snap.x&&(b=Ae(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(f=Ae(f,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(b,f,{width:y.maxWidth,height:y.maxHeight},{width:i,height:o});if(b=v.newWidth,f=v.newHeight,this.props.grid){var w=de(b,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),k=de(f,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),C=this.props.snapGap||0;b=0===C||Math.abs(w-b)<=C?w:b,f=0===C||Math.abs(k-f)<=C?k:f}var _={width:b-d.width,height:f-d.height};if(this.delta=_,p&&"string"==typeof p)if(p.endsWith("%")){var E=b/A.width*100;b="".concat(E,"%")}else if(p.endsWith("vw")){var x=b/this.window.innerWidth*100;b="".concat(x,"vw")}else if(p.endsWith("vh")){var D=b/this.window.innerHeight*100;b="".concat(D,"vh")}if(m&&"string"==typeof m)if(m.endsWith("%")){E=f/A.height*100;f="".concat(E,"%")}else if(m.endsWith("vw")){x=f/this.window.innerWidth*100;f="".concat(x,"vw")}else if(m.endsWith("vh")){D=f/this.window.innerHeight*100;f="".concat(D,"vh")}var B={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(f,"height")};"row"===this.flexDir?B.flexBasis=B.width:"column"===this.flexDir&&(B.flexBasis=B.height);var F=this.state.width!==B.width,I=this.state.height!==B.height,Q=this.state.flexBasis!==B.flexBasis,S=F||I||Q;S&&(0,ee.flushSync)((function(){t.setState(B)})),this.props.onResize&&S&&this.props.onResize(e,u,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t,n,a=this.state,r=a.isResizing,i=a.direction;a.original;r&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(n=this.props.size.height)&&void 0!==n?n:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ce(ce({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(e){var t,n;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(n=e.height)&&void 0!==n?n:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,a=t.handleStyles,r=t.handleClasses,i=t.handleWrapperStyle,o=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?(0,X.jsx)(oe,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:a&&a[t],className:r&&r[t],children:s&&s[t]?s[t]:null},t):null}));return(0,X.jsx)("div",{className:o,style:i,children:c})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==fe.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=ce(ce(ce({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return(0,X.jsxs)(a,ce({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,X.jsx)("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(u.PureComponent),ve=n(95167),we=n(59273),ke=n(89175),Ce=n(26880);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){De(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function De(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=_e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_e(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Fe=16,Ie=40,Qe=16,Se=(0,Ce.kc)((function(e,t){var n=e.prefixCls,a=e.token,r=e.stylish,i=t.headerHeight,o=t.showHandleWideArea,s="".concat(n,"-draggable-panel"),c={borderBottom:(0,Ce.iv)(v||(v=Be(["\n border-block-end-width: 1px;\n "]))),borderLeft:(0,Ce.iv)(w||(w=Be(["\n border-inline-start-width: 1px;\n "]))),borderRight:(0,Ce.iv)(k||(k=Be(["\n border-inline-end-width: 1px;\n "]))),borderTop:(0,Ce.iv)(C||(C=Be(["\n border-block-start-width: 1px;\n "])))},l=(0,Ce.iv)(_||(_=Be(["\n position: absolute;\n z-index: 200;\n "]))),u={bottomFloat:(0,Ce.cx)(l,(0,Ce.iv)(E||(E=Be(["\n inset-block-end: 0;\n inset-inline: 0 0;\n width: 100%;\n "])))),leftFloat:(0,Ce.cx)(l,(0,Ce.iv)(x||(x=Be(["\n inset-block: ","px 0;\n inset-inline-start: 0;\n height: calc(100% - ","px);\n "])),i,i)),rightFloat:(0,Ce.cx)(l,(0,Ce.iv)(D||(D=Be(["\n inset-block: ","px 0;\n inset-inline-end: 0;\n height: calc(100% - ","px);\n "])),i,i)),topFloat:(0,Ce.cx)(l,(0,Ce.iv)(B||(B=Be(["\n inset-block-start: ","px;\n inset-inline: 0 0;\n width: 100%;\n "])),i))},d=(0,Ce.iv)(F||(F=Be(["\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n z-index: 50;\n transition: all 0.2s ",";\n }\n\n &:hover,\n &:active {\n &::before {\n background: "," !important;\n }\n }\n "])),a.motionEaseOut,a.colorPrimary),p={handleBottom:(0,Ce.cx)("".concat(s,"-bottom-handle"),(0,Ce.iv)(I||(I=Be(["\n &::before {\n inset-block-end: 50%;\n width: 100%;\n height: 2px;\n }\n "])))),handleLeft:(0,Ce.cx)("".concat(s,"-left-handle"),(0,Ce.iv)(Q||(Q=Be(["\n &::before {\n inset-inline-start: 50%;\n width: 2px;\n height: 100%;\n }\n "])))),handleRight:(0,Ce.cx)("".concat(s,"-right-handle"),(0,Ce.iv)(S||(S=Be(["\n &::before {\n inset-inline-end: 50%;\n width: 2px;\n height: 100%;\n }\n "])))),handleRoot:d,handleTop:(0,Ce.cx)("".concat(s,"-top-handle"),(0,Ce.iv)(T||(T=Be(["\n &::before {\n inset-block-start: 50%;\n width: 100%;\n height: 2px;\n }\n "]))))},m=(0,Ce.cx)("".concat(s,"-toggle"),(0,Ce.iv)(M||(M=Be(["\n pointer-events: ",";\n\n position: absolute;\n z-index: 10;\n\n opacity: 0;\n\n transition: all 0.2s ",";\n\n &:hover,\n &:active {\n opacity: 1 !important;\n }\n\n > div {\n ",";\n pointer-events: all;\n cursor: pointer;\n\n position: absolute;\n\n color: ",";\n\n transition: all 0.2s ",";\n\n &:hover {\n color: ",";\n }\n\n &:active {\n color: ",";\n }\n }\n "])),o?"all":"none",a.motionEaseOut,r.variantFilled,a.colorTextTertiary,a.motionEaseOut,a.colorTextSecondary,a.colorText)),A={toggleBottom:(0,Ce.cx)("".concat(s,"-toggle-bottom"),(0,Ce.iv)(L||(L=Be(["\n inset-block-end: -","px;\n width: 100%;\n height: ","px;\n\n > div {\n inset-inline-start: 50%;\n\n width: ","px;\n height: ","px;\n margin-inline-start: -20px;\n border-radius: 0 0 4px 4px;\n }\n "])),Fe,Qe,Ie,Qe)),toggleLeft:(0,Ce.cx)("".concat(s,"-toggle-left"),(0,Ce.iv)(N||(N=Be(["\n inset-inline-start: -","px;\n width: ","px;\n height: 100%;\n\n > div {\n inset-block-start: 50%;\n\n width: ","px;\n height: ","px;\n margin-block-start: -20px;\n border-radius: 4px 0 0 4px;\n }\n "])),Fe,Qe,Qe,Ie)),toggleRight:(0,Ce.cx)("".concat(s,"-toggle-right"),(0,Ce.iv)(R||(R=Be(["\n inset-inline-end: -","px;\n width: ","px;\n height: 100%;\n\n > div {\n inset-block-start: 50%;\n\n width: ","px;\n height: ","px;\n margin-block-start: -20px;\n border-radius: 0 4px 4px 0;\n }\n "])),Fe,Qe,Qe,Ie)),toggleRoot:m,toggleTop:(0,Ce.cx)("".concat(s,"-toggle-top"),(0,Ce.iv)(j||(j=Be(["\n inset-block-start: -","px;\n width: 100%;\n height: ","px;\n\n > div {\n inset-inline-start: 50%;\n\n width: ","px;\n height: ","px;\n margin-inline-start: -20px;\n border-radius: 4px 4px 0 0;\n }\n "])),Fe,Qe,Ie,Qe))},g={fixed:(0,Ce.iv)(P||(P=Be(["\n position: relative;\n "]))),fullscreen:(0,Ce.iv)(O||(O=Be(["\n position: absolute;\n inset-block: ","px 0;\n inset-inline: 0;\n\n width: 100%;\n height: calc(100% - ","px);\n\n background: ",";\n "])),i,i,a.colorBgContainerSecondary),handlerIcon:(0,Ce.iv)($||($=Be(["\n transition: all 0.2s ",";\n "])),a.motionEaseOut),panel:(0,Ce.cx)("".concat(s,"-fixed"),(0,Ce.iv)(q||(q=Be(["\n overflow: hidden;\n transition: all 0.2s ",";\n "])),a.motionEaseOut)),root:(0,Ce.cx)(s,(0,Ce.iv)(G||(G=Be(["\n flex-shrink: 0;\n border: 0 solid ",";\n\n &:hover {\n > .","-toggle {\n opacity: 1;\n }\n }\n "])),a.colorBorderSecondary,s))};return xe(xe(xe(xe(xe({},c),u),p),A),g)})),Te=function(e){switch(e){case"bottom":return"top";case"top":return"bottom";case"right":return"left";case"left":return"right"}};function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){Re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Re(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=Me(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Me(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(s.push(a.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Oe=(0,u.memo)((function(e){var t=e.headerHeight,n=void 0===t?0:t,a=e.fullscreen,r=e.maxHeight,i=e.pin,o=void 0===i||i,s=e.mode,c=void 0===s?"fixed":s,l=e.children,d=e.placement,p=void 0===d?"right":d,m=e.resize,A=e.style,g=e.showHandleWideArea,h=void 0===g||g,f=e.size,b=e.defaultSize,y=e.minWidth,v=e.minHeight,w=e.maxWidth,k=e.onSizeChange,C=e.onSizeDragging,_=e.expandable,E=void 0===_||_,x=e.expand,D=e.defaultExpand,B=void 0===D||D,F=e.onExpandChange,I=e.className,Q=e.showHandleWhenCollapsed,S=e.destroyOnClose,T=e.styles,M=e.classNames,L=e.dir,N=(0,u.useRef)(null),R=H(N),j="top"===p||"bottom"===p,P=(0,u.use)(Z.ConfigProvider.ConfigContext).direction,O=null!=L?L:P,$=(0,u.useMemo)((function(){return"rtl"===O&&["left","right"].includes(p)?"left"===p?"right":"left":p}),[O,p]),q=Se({headerHeight:n,showHandleWideArea:h}),G=q.styles,z=q.cx,V=je((0,we.Z)(B,{onChange:F,value:x}),2),ee=V[0],te=V[1];(0,u.useEffect)((function(){o||(R&&!ee?te(!0):!R&&ee&&te(!1))}),[o,R,ee,te]);var ne=je((0,u.useState)(!0),2),ae=ne[0],re=ne[1],ie=je((0,u.useState)(!1),2),oe=ie[0],se=ie[1],ce=!1!==m&&ee,le=(0,u.useMemo)((function(){return(0,U.j)(G.root,{compoundVariants:[{class:G.bottomFloat,mode:"float",placement:"bottom"},{class:G.topFloat,mode:"float",placement:"top"},{class:G.leftFloat,mode:"float",placement:"left"},{class:G.rightFloat,mode:"float",placement:"right"}],variants:{placement:{top:ee&&G.borderBottom,right:ee&&G.borderLeft,bottom:ee&&G.borderTop,left:ee&&G.borderRight},mode:{fixed:G.fixed,float:null}}})}),[G,ee]),ue=(0,u.useMemo)((function(){return(0,U.j)(G.handleRoot,{variants:{placement:{bottom:G.handleBottom,left:G.handleLeft,right:G.handleRight,top:G.handleTop}}})}),[G]),de=(0,u.useMemo)((function(){return(0,U.j)(G.toggleRoot,{variants:{placement:{bottom:G.toggleTop,left:G.toggleRight,right:G.toggleLeft,top:G.toggleBottom}}})}),[G]),pe=(0,u.useMemo)((function(){return Ne(Re({bottom:!1,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1},Te($),!0),m)}),[$,m]),me=(0,u.useMemo)((function(){return Ne(j?{height:180,width:"100%"}:{height:"100%",width:280},b)}),[j,b]),Ae=(0,u.useMemo)((function(){return ee?{defaultSize:me,maxHeight:"number"==typeof r?Math.max(r,0):r,maxWidth:"number"==typeof w?Math.max(w,0):w,minHeight:"number"==typeof v?Math.max(v,0):v,minWidth:"number"==typeof y?Math.max(y,0):y,size:f}:j?{minHeight:0,size:{height:0}}:{minWidth:0,size:{width:0}}}),[ee,j,me,r,w,v,y,f]),ge=(0,u.useMemo)((function(){switch($){case"top":return W.Z;case"bottom":return Y.Z;case"right":default:return K;case"left":return J.Z}}),[$]),he=(0,X.jsx)(ve.Z,{className:de({placement:$}),style:{opacity:ee?o?void 0:0:Q?1:0},children:(0,X.jsx)(ve.Z,{className:null==M?void 0:M.handle,onClick:function(){return te(!ee)},style:null==T?void 0:T.handle,children:(0,X.jsx)(ke.Z,{className:G.handlerIcon,icon:ge,size:16,style:{transform:"rotate(".concat(ee?180:0,"deg)")}})})}),fe=(0,X.jsx)(ye,Ne(Ne({},Ae),{},{className:z(G.panel,null==M?void 0:M.content),enable:ce?pe:void 0,handleClasses:ce?Re({},Te($),ue({placement:Te($)})):{},onResize:function(e,t,n,a){null==C||C(a,{height:n.style.height,width:n.style.width})},onResizeStart:function(){se(!0),re(!1)},onResizeStop:function(e,t,n,a){se(!1),re(!0),null==k||k(a,{height:n.style.height,width:n.style.width})},style:Ne({transition:oe?"unset":void 0},A),children:l}));return a?(0,X.jsx)("div",{className:z(G.fullscreen,I),children:l}):(0,X.jsxs)("aside",{className:z(le({mode:c,placement:$}),I),dir:L,ref:N,children:[E&&ae&&he,S?ee&&fe:fe]})}));Oe.displayName="DraggablePanel";var $e,qe,Ge,ze,He,Ze=Oe,Ue=n(60366);function We(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ye=(0,Ce.kc)((function(e){var t=e.css,n=e.token;return{body:t($e||($e=We(["\n overflow: hidden auto;\n padding: 16px;\n "]))),container:t(qe||(qe=We(["\n position: relative;\n overflow: hidden;\n "]))),footer:t(Ge||(Ge=We(["\n padding-block: 8px;\n padding-inline: 16px;\n border-block-start: 1px solid ",";\n "])),n.colorBorderSecondary),handlerIcon:t(ze||(ze=We(["\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ",";\n "])),n.motionEaseOut),header:t(He||(He=We(["\n padding-block: 8px;\n padding-inline: 16px;\n font-weight: 500;\n border-block-end: 1px solid ",";\n "])),n.colorBorderSecondary)}}));function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}var Ke=["className"];function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Xe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Ve(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=Ve(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ve(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var tt=(0,u.memo)((function(e){var t=e.className,n=et(e,Ke),a=Ye(),r=a.cx,i=a.styles;return(0,X.jsx)(Ue.D,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){Xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:r(i.body,t),flex:1},n))}));tt.displayName="DraggablePanelBody";var nt=tt;function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}var rt=["className"];function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ot(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=at(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=at(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==at(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function st(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ct=(0,u.memo)((function(e){var t=e.className,n=st(e,rt),a=Ye(),r=a.cx,i=a.styles;return(0,X.jsx)(Ue.D,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:r(i.container,t)},n))}));ct.displayName="DraggablePanelContainer";var lt=ct;function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}var dt=["className"];function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function mt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ut(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=ut(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ut(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function At(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var gt=(0,u.memo)((function(e){var t=e.className,n=At(e,dt),a=Ye(),r=a.cx,i=a.styles;return(0,X.jsx)(Ue.D,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){mt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({align:"center",className:r(i.footer,t),flex:"none",gap:8,horizontal:!0,justify:"flex-start"},n))}));gt.displayName="DraggablePanelFooter";var ht=gt,ft=(0,V.Z)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),bt=(0,V.Z)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),yt=(0,V.Z)("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]),vt=n(53143);function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}var kt=["pin","setPin","className","setExpand","title","position"];function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=wt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(s.push(a.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Bt(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ft=(0,u.memo)((function(e){var t=e.pin,n=e.setPin,a=e.className,r=e.setExpand,i=e.title,o=e.position,s=void 0===o?"left":o,c=Bt(e,kt),l=Ye(),u=l.cx,d=l.styles,p=xt((0,we.Z)(!1,{onChange:n,value:t}),2),m=p[0],A=p[1],g=(0,X.jsx)(vt.Z,{icon:ft,onClick:function(){return null==r?void 0:r(!1)},size:"small"}),h=(0,X.jsx)(vt.Z,{active:t,icon:t?bt:yt,onClick:function(){return A(!m)},size:"small"});return(0,X.jsxs)(Ue.D,_t(_t({align:"center",className:u(d.header,a),flex:"none",gap:8,horizontal:!0,justify:"space-between"},c),{},{children:["left"===s?g:h,i,"left"===s?h:g]}))}));Ft.displayName="DraggablePanelHeader";var It=Ft,Qt=Ze;Qt.Body=nt,Qt.Container=lt,Qt.Footer=ht,Qt.Header=It;var St=Qt,Tt=n(75071);function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}var Lt=["ref","resize","onCompositionEnd","onPressEnter","onCompositionStart","className","onInput","loading","onSend","onBlur","onChange"];function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Rt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Mt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=Mt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Pt,Ot,$t,qt,Gt,zt,Ht,Zt,Ut,Wt=(0,u.memo)((function(e){var t=e.ref,n=e.resize,a=void 0!==n&&n,r=e.onCompositionEnd,i=e.onPressEnter,o=e.onCompositionStart,s=e.className,c=e.onInput,l=e.loading,d=e.onSend,p=e.onBlur,m=e.onChange,A=jt(e,Lt),g=(0,u.useRef)(!1);return(0,X.jsx)(Tt.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){Rt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:s,onBlur:function(e){null==c||c(e.target.value),null==p||p(e)},onChange:function(e){null==c||c(e.target.value),null==m||m(e)},onCompositionEnd:function(e){g.current=!1,null==r||r(e)},onCompositionStart:function(e){g.current=!0,null==o||o(e)},onPressEnter:function(e){null==i||i(e);var t=/mobi|android|iphone/i.test(navigator.userAgent);l||g.current||!(!t&&!e.shiftKey||t&&e.shiftKey)||(e.preventDefault(),null==d||d())},ref:t,resize:a,variant:"borderless"},A))})),Yt=Wt,Vt=["className","style","classNames","expand","setExpand","bottomAddons","topAddons","onSizeChange","heights","onSend"],Kt=(0,Ce.kc)((function(e){var t=e.css;return{container:t(Pt||(Pt=c()(["\n position: relative;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n height: 100%;\n padding-block: 12px 16px;\n padding-inline: 0;\n "]))),textarea:t(Ot||(Ot=c()(["\n padding-block: 0;\n padding-inline: 24px;\n line-height: 1.5;\n "]))),textareaContainer:t($t||($t=c()(["\n position: relative;\n flex: 1;\n "])))}})),Jt=(0,u.forwardRef)((function(e,t){var n=e.className,a=e.style,i=e.classNames,s=e.expand,c=void 0===s||s,l=e.setExpand,u=e.bottomAddons,d=e.topAddons,p=e.onSizeChange,m=e.heights,A=e.onSend,g=o()(e,Vt),h=Kt().styles;return(0,X.jsx)(St,{className:n,classNames:i,fullscreen:c,headerHeight:null==m?void 0:m.headerHeight,maxHeight:null==m?void 0:m.maxHeight,minHeight:null==m?void 0:m.minHeight,onSizeChange:p,placement:"bottom",size:{height:null==m?void 0:m.inputHeight,width:"100%"},style:r()({zIndex:10},a),children:(0,X.jsxs)("section",{className:h.container,style:{minHeight:null==m?void 0:m.minHeight},children:[d,(0,X.jsx)("div",{className:h.textareaContainer,children:(0,X.jsx)(Yt,r()({className:h.textarea,onSend:function(){null==A||A(),null==l||l(!1)},ref:t,variant:"borderless"},g))}),u]})})})),Xt=(0,u.memo)(Jt),en=n(11147);function tn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(0,Ce.kc)((function(e){var t=e.css;return{container:t(qt||(qt=tn(["\n position: relative;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n height: 100%;\n padding-block: 8px 12px;\n padding-inline: 0;\n "]))),textarea:t(Gt||(Gt=tn(["\n height: 100% !important;\n padding-block: 0;\n p