@object-ui/plugin-kanban 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,10 @@
1
- (function(he,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("@object-ui/core"),require("@object-ui/components"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@object-ui/core","@object-ui/components","react-dom"],c):(he=typeof globalThis<"u"?globalThis:he||self,c(he.ObjectUIPluginKanban={},he.React,he.ObjectUICore,he.ObjectUIComponents,he.ReactDOM))})(this,(function(he,c,Qn,Te,rt){"use strict";function Zn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ze=Zn(c);var xt={exports:{}},ot={};var cn;function er(){if(cn)return ot;cn=1;var e=c,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,d){var f,v={},b=null,h=null;d!==void 0&&(b=""+d),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(h=u.ref);for(f in u)r.call(u,f)&&!s.hasOwnProperty(f)&&(v[f]=u[f]);if(l&&l.defaultProps)for(f in u=l.defaultProps,u)v[f]===void 0&&(v[f]=u[f]);return{$$typeof:t,type:l,key:b,ref:h,props:v,_owner:i.current}}return ot.Fragment=n,ot.jsx=a,ot.jsxs=a,ot}var it={};var un;function tr(){return un||(un=1,process.env.NODE_ENV!=="production"&&(function(){var e=c,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),w=Symbol.iterator,m="@@iterator";function y(o){if(o===null||typeof o!="object")return null;var g=w&&o[w]||o[m];return typeof g=="function"?g:null}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(o){{for(var g=arguments.length,p=new Array(g>1?g-1:0),S=1;S<g;S++)p[S-1]=arguments[S];E("error",o,p)}}function E(o,g,p){{var S=C.ReactDebugCurrentFrame,_=S.getStackAddendum();_!==""&&(g+="%s",p=p.concat([_]));var B=p.map(function(k){return String(k)});B.unshift("Warning: "+g),Function.prototype.apply.call(console[o],console,B)}}var T=!1,D=!1,I=!1,O=!1,A=!1,N;N=Symbol.for("react.module.reference");function L(o){return!!(typeof o=="string"||typeof o=="function"||o===r||o===s||A||o===i||o===d||o===f||O||o===h||T||D||I||typeof o=="object"&&o!==null&&(o.$$typeof===b||o.$$typeof===v||o.$$typeof===a||o.$$typeof===l||o.$$typeof===u||o.$$typeof===N||o.getModuleId!==void 0))}function M(o,g,p){var S=o.displayName;if(S)return S;var _=g.displayName||g.name||"";return _!==""?p+"("+_+")":p}function z(o){return o.displayName||"Context"}function Y(o){if(o==null)return null;if(typeof o.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case l:var g=o;return z(g)+".Consumer";case a:var p=o;return z(p._context)+".Provider";case u:return M(o,o.render,"ForwardRef");case v:var S=o.displayName||null;return S!==null?S:Y(o.type)||"Memo";case b:{var _=o,B=_._payload,k=_._init;try{return Y(k(B))}catch{return null}}}return null}var q=Object.assign,me=0,Ye,J,We,de,Me,Ue,H;function fe(){}fe.__reactDisabledLog=!0;function Ae(){{if(me===0){Ye=console.log,J=console.info,We=console.warn,de=console.error,Me=console.group,Ue=console.groupCollapsed,H=console.groupEnd;var o={configurable:!0,enumerable:!0,value:fe,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}me++}}function Ke(){{if(me--,me===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},o,{value:Ye}),info:q({},o,{value:J}),warn:q({},o,{value:We}),error:q({},o,{value:de}),group:q({},o,{value:Me}),groupCollapsed:q({},o,{value:Ue}),groupEnd:q({},o,{value:H})})}me<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=C.ReactCurrentDispatcher,ke;function ie(o,g,p){{if(ke===void 0)try{throw Error()}catch(_){var S=_.stack.trim().match(/\n( *(at )?)/);ke=S&&S[1]||""}return`
2
- `+ke+o}}var se=!1,j;{var Xe=typeof WeakMap=="function"?WeakMap:Map;j=new Xe}function ae(o,g){if(!o||se)return"";{var p=j.get(o);if(p!==void 0)return p}var S;se=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var B;B=G.current,G.current=null,Ae();try{if(g){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(oe){S=oe}Reflect.construct(o,[],k)}else{try{k.call()}catch(oe){S=oe}o.call(k.prototype)}}else{try{throw Error()}catch(oe){S=oe}o()}}catch(oe){if(oe&&S&&typeof oe.stack=="string"){for(var R=oe.stack.split(`
3
- `),ne=S.stack.split(`
4
- `),$=R.length-1,U=ne.length-1;$>=1&&U>=0&&R[$]!==ne[U];)U--;for(;$>=1&&U>=0;$--,U--)if(R[$]!==ne[U]){if($!==1||U!==1)do if($--,U--,U<0||R[$]!==ne[U]){var ge=`
5
- `+R[$].replace(" at new "," at ");return o.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",o.displayName)),typeof o=="function"&&j.set(o,ge),ge}while($>=1&&U>=0);break}}}finally{se=!1,G.current=B,Ke(),Error.prepareStackTrace=_}var nt=o?o.displayName||o.name:"",He=nt?ie(nt):"";return typeof o=="function"&&j.set(o,He),He}function je(o,g,p){return ae(o,!1)}function ye(o){var g=o.prototype;return!!(g&&g.isReactComponent)}function xe(o,g,p){if(o==null)return"";if(typeof o=="function")return ae(o,ye(o));if(typeof o=="string")return ie(o);switch(o){case d:return ie("Suspense");case f:return ie("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case u:return je(o.render);case v:return xe(o.type,g,p);case b:{var S=o,_=S._payload,B=S._init;try{return xe(B(_),g,p)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,ht={},pt=C.ReactDebugCurrentFrame;function Pe(o){if(o){var g=o._owner,p=xe(o.type,o._source,g?g.type:null);pt.setExtraStackFrame(p)}else pt.setExtraStackFrame(null)}function Se(o,g,p,S,_){{var B=Function.call.bind(ve);for(var k in o)if(B(o,k)){var R=void 0;try{if(typeof o[k]!="function"){var ne=Error((S||"React class")+": "+p+" type `"+k+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[k]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ne.name="Invariant Violation",ne}R=o[k](g,k,S,p,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){R=$}R&&!(R instanceof Error)&&(Pe(_),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",p,k,typeof R),Pe(null)),R instanceof Error&&!(R.message in ht)&&(ht[R.message]=!0,Pe(_),x("Failed %s type: %s",p,R.message),Pe(null))}}}var et=Array.isArray;function _e(o){return et(o)}function Pt(o){{var g=typeof Symbol=="function"&&Symbol.toStringTag,p=g&&o[Symbol.toStringTag]||o.constructor.name||"Object";return p}}function _t(o){try{return Lt(o),!1}catch{return!0}}function Lt(o){return""+o}function Ft(o){if(_t(o))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Pt(o)),Lt(o)}var Ie=C.ReactCurrentOwner,Le={key:!0,ref:!0,__self:!0,__source:!0},Fe,bt;function De(o){if(ve.call(o,"ref")){var g=Object.getOwnPropertyDescriptor(o,"ref").get;if(g&&g.isReactWarning)return!1}return o.ref!==void 0}function Bt(o){if(ve.call(o,"key")){var g=Object.getOwnPropertyDescriptor(o,"key").get;if(g&&g.isReactWarning)return!1}return o.key!==void 0}function on(o,g){typeof o.ref=="string"&&Ie.current}function sn(o,g){{var p=function(){Fe||(Fe=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};p.isReactWarning=!0,Object.defineProperty(o,"key",{get:p,configurable:!0})}}function mt(o,g){{var p=function(){bt||(bt=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};p.isReactWarning=!0,Object.defineProperty(o,"ref",{get:p,configurable:!0})}}var $t=function(o,g,p,S,_,B,k){var R={$$typeof:t,type:o,key:g,ref:p,props:k,_owner:B};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function an(o,g,p,S,_){{var B,k={},R=null,ne=null;p!==void 0&&(Ft(p),R=""+p),Bt(g)&&(Ft(g.key),R=""+g.key),De(g)&&(ne=g.ref,on(g,_));for(B in g)ve.call(g,B)&&!Le.hasOwnProperty(B)&&(k[B]=g[B]);if(o&&o.defaultProps){var $=o.defaultProps;for(B in $)k[B]===void 0&&(k[B]=$[B])}if(R||ne){var U=typeof o=="function"?o.displayName||o.name||"Unknown":o;R&&sn(k,U),ne&&mt(k,U)}return $t(o,R,ne,_,S,Ie.current,k)}}var tt=C.ReactCurrentOwner,zt=C.ReactDebugCurrentFrame;function Be(o){if(o){var g=o._owner,p=xe(o.type,o._source,g?g.type:null);zt.setExtraStackFrame(p)}else zt.setExtraStackFrame(null)}var yt;yt=!1;function W(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function Q(){{if(tt.current){var o=Y(tt.current.type);if(o)return`
6
-
7
- Check the render method of \``+o+"`."}return""}}function te(o){return""}var we={};function re(o){{var g=Q();if(!g){var p=typeof o=="string"?o:o.displayName||o.name;p&&(g=`
8
-
9
- Check the top-level render call using <`+p+">.")}return g}}function Z(o,g){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var p=re(g);if(we[p])return;we[p]=!0;var S="";o&&o._owner&&o._owner!==tt.current&&(S=" It was passed a child from "+Y(o._owner.type)+"."),Be(o),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',p,S),Be(null)}}function le(o,g){{if(typeof o!="object")return;if(_e(o))for(var p=0;p<o.length;p++){var S=o[p];W(S)&&Z(S,g)}else if(W(o))o._store&&(o._store.validated=!0);else if(o){var _=y(o);if(typeof _=="function"&&_!==o.entries)for(var B=_.call(o),k;!(k=B.next()).done;)W(k.value)&&Z(k.value,g)}}}function $e(o){{var g=o.type;if(g==null||typeof g=="string")return;var p;if(typeof g=="function")p=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===u||g.$$typeof===v))p=g.propTypes;else return;if(p){var S=Y(g);Se(p,o.props,"prop",S,o)}else if(g.PropTypes!==void 0&&!yt){yt=!0;var _=Y(g);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function X(o){{for(var g=Object.keys(o.props),p=0;p<g.length;p++){var S=g[p];if(S!=="children"&&S!=="key"){Be(o),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),Be(null);break}}o.ref!==null&&(Be(o),x("Invalid attribute `ref` supplied to `React.Fragment`."),Be(null))}}var Ce={};function ce(o,g,p,S,_,B){{var k=L(o);if(!k){var R="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ne=te();ne?R+=ne:R+=Q();var $;o===null?$="null":_e(o)?$="array":o!==void 0&&o.$$typeof===t?($="<"+(Y(o.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):$=typeof o,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,R)}var U=an(o,g,p,_,B);if(U==null)return U;if(k){var ge=g.children;if(ge!==void 0)if(S)if(_e(ge)){for(var nt=0;nt<ge.length;nt++)le(ge[nt],o);Object.freeze&&Object.freeze(ge)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else le(ge,o)}if(ve.call(g,"key")){var He=Y(o),oe=Object.keys(g).filter(function(ni){return ni!=="key"}),ln=oe.length>0?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}";if(!Ce[He+ln]){var ti=oe.length>0?"{"+oe.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(te,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("@object-ui/core"),require("@object-ui/components"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@object-ui/core","@object-ui/components","react-dom"],l):(te=typeof globalThis<"u"?globalThis:te||self,l(te.ObjectUIPluginKanban={},te.React,te.ObjectUICore,te.ObjectUIComponents,te.ReactDOM))})(this,(function(te,l,In,le,je){"use strict";function kn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const xe=kn(l);var Je={exports:{}},Re={};var Mt;function Mn(){if(Mt)return Re;Mt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:i}}return Re.Fragment=t,Re.jsx=n,Re.jsxs=n,Re}var Pe={};var jt;function jn(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&(function(){function e(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===N?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case b:return"Fragment";case C:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case E:return"SuspenseList";case j:return"Activity"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case v:return"Portal";case D:return d.displayName||"Context";case w:return(d._context.displayName||"Context")+".Consumer";case S:var y=d.render;return d=d.displayName,d||(d=y.displayName||y.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case T:return y=d.displayName||null,y!==null?y:e(d.type)||"Memo";case A:y=d._payload,d=d._init;try{return e(d(y))}catch{}}return null}function t(d){return""+d}function n(d){try{t(d);var y=!1}catch{y=!0}if(y){y=console;var I=y.error,P=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return I.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",P),t(d)}}function r(d){if(d===b)return"<>";if(typeof d=="object"&&d!==null&&d.$$typeof===A)return"<...>";try{var y=e(d);return y?"<"+y+">":"<...>"}catch{return"<...>"}}function o(){var d=L.A;return d===null?null:d.getOwner()}function i(){return Error("react-stack-top-frame")}function s(d){if(K.call(d,"key")){var y=Object.getOwnPropertyDescriptor(d,"key").get;if(y&&y.isReactWarning)return!1}return d.key!==void 0}function a(d,y){function I(){we||(we=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}I.isReactWarning=!0,Object.defineProperty(d,"key",{get:I,configurable:!0})}function c(){var d=e(this.type);return $[d]||($[d]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),d=this.props.ref,d!==void 0?d:null}function u(d,y,I,P,oe,Y){var _=I.ref;return d={$$typeof:m,type:d,key:y,props:I,_owner:P},(_!==void 0?_:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:c}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(d,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.defineProperty(d,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function f(d,y,I,P,oe,Y){var _=y.children;if(_!==void 0)if(P)if(Q(_)){for(P=0;P<_.length;P++)g(_[P]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(_);if(K.call(y,"key")){_=e(d);var W=Object.keys(y).filter(function(M){return M!=="key"});P=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",he[_+P]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
10
2
  let props = %s;
11
3
  <%s {...props} />
12
4
  React keys must be passed directly to JSX without using spread:
13
5
  let props = %s;
14
- <%s key={someKey} {...props} />`,ln,He,ti,He),Ce[He+ln]=!0}}return o===r?X(U):$e(U),U}}function Ee(o,g,p){return ce(o,g,p,!0)}function Ve(o,g,p){return ce(o,g,p,!1)}var qe=Ve,Oe=Ee;it.Fragment=r,it.jsx=qe,it.jsxs=Oe})()),it}var dn;function nr(){return dn||(dn=1,process.env.NODE_ENV==="production"?xt.exports=er():xt.exports=tr()),xt.exports}var F=nr();const rr=c.lazy(()=>Promise.resolve().then(()=>ei)),Yt=({schema:e})=>{const t=c.useMemo(()=>{const{columns:n=[],data:r,groupBy:i}=e;if(r&&i&&Array.isArray(r)){const s=r.reduce((a,l)=>{const u=l[i];return a[u]||(a[u]=[]),a[u].push(l),a},{});return n.map(a=>({...a,cards:[...a.cards||[],...s[a.id]||[]]}))}return n},[e]);return F.jsx(c.Suspense,{fallback:F.jsx(Te.Skeleton,{className:"w-full h-[600px]"}),children:F.jsx(rr,{columns:t,onCardMove:e.onCardMove,className:e.className})})};Qn.ComponentRegistry.register("kanban",Yt,{label:"Kanban Board",icon:"LayoutDashboard",category:"plugin",inputs:[{name:"columns",type:"array",label:"Columns",description:"Array of { id, title, cards, limit, className }",required:!0},{name:"onCardMove",type:"code",label:"On Card Move",description:"Callback when a card is moved",advanced:!0},{name:"className",type:"string",label:"CSS Class"}],defaultProps:{columns:[{id:"todo",title:"To Do",cards:[{id:"card-1",title:"Task 1",description:"This is the first task",badges:[{label:"High Priority",variant:"destructive"},{label:"Feature",variant:"default"}]},{id:"card-2",title:"Task 2",description:"This is the second task",badges:[{label:"Bug",variant:"destructive"}]}]},{id:"in-progress",title:"In Progress",limit:3,cards:[{id:"card-3",title:"Task 3",description:"Currently working on this",badges:[{label:"In Progress",variant:"default"}]}]},{id:"done",title:"Done",cards:[{id:"card-4",title:"Task 4",description:"This task is completed",badges:[{label:"Completed",variant:"outline"}]},{id:"card-5",title:"Task 5",description:"Another completed task",badges:[{label:"Completed",variant:"outline"}]}]}],className:"w-full"}});const or={kanban:Yt};function ir(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Je(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Wt(e){return"nodeType"in e}function ee(e){var t,n;return e?Je(e)?e:Wt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ut(e){const{Document:t}=ee(e);return e instanceof t}function st(e){return Je(e)?!1:e instanceof ee(e).HTMLElement}function fn(e){return e instanceof ee(e).SVGElement}function Ge(e){return e?Je(e)?e.document:Wt(e)?Ut(e)?e:st(e)||fn(e)?e.ownerDocument:document:document:document}const pe=wt?c.useLayoutEffect:c.useEffect;function Ct(e){const t=c.useRef(e);return pe(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function sr(){const e=c.useRef(null),t=c.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function at(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return pe(()=>{n.current!==e&&(n.current=e)},t),n}function lt(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Et(e){const t=Ct(e),n=c.useRef(null),r=c.useCallback(i=>{i!==n.current&&t?.(i,n.current),n.current=i},[]);return[n,r]}function St(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Kt={};function ct(e,t){return c.useMemo(()=>{if(t)return t;const n=Kt[e]==null?0:Kt[e]+1;return Kt[e]=n,e+"-"+n},[e,t])}function vn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((s,a)=>{const l=Object.entries(a);for(const[u,d]of l){const f=s[u];f!=null&&(s[u]=f+e*d)}return s},{...t})}}const Qe=vn(1),Dt=vn(-1);function ar(e){return"clientX"in e&&"clientY"in e}function Ot(e){if(!e)return!1;const{KeyboardEvent:t}=ee(e.target);return t&&e instanceof t}function lr(e){if(!e)return!1;const{TouchEvent:t}=ee(e.target);return t&&e instanceof t}function Tt(e){if(lr(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ar(e)?{x:e.clientX,y:e.clientY}:null}const Re=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Re.Translate.toString(e),Re.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),gn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function cr(e){return e.matches(gn)?e:e.querySelector(gn)}const ur={display:"none"};function dr(e){let{id:t,value:n}=e;return c.createElement("div",{id:t,style:ur},n)}function fr(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return c.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function vr(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const hn=c.createContext(null);function gr(e){const t=c.useContext(hn);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function hr(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:i,event:s}=r;e.forEach(a=>{var l;return(l=a[i])==null?void 0:l.call(a,s)})},[e]),t]}const pr={draggable:`
6
+ <%s key={someKey} {...props} />`,P,_,W,_),he[_+P]=!0)}if(_=null,I!==void 0&&(n(I),_=""+I),s(y)&&(n(y.key),_=""+y.key),"key"in y){I={};for(var q in y)q!=="key"&&(I[q]=y[q])}else I=y;return _&&a(I,typeof d=="function"?d.displayName||d.name||"Unknown":d),u(d,_,I,o(),oe,Y)}function g(d){p(d)?d._store&&(d._store.validated=1):typeof d=="object"&&d!==null&&d.$$typeof===A&&(d._payload.status==="fulfilled"?p(d._payload.value)&&d._payload.value._store&&(d._payload.value._store.validated=1):d._store&&(d._store.validated=1))}function p(d){return typeof d=="object"&&d!==null&&d.$$typeof===m}var h=l,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),D=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),L=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=Object.prototype.hasOwnProperty,Q=Array.isArray,ce=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(d){return d()}};var we,$={},Ce=h.react_stack_bottom_frame.bind(h,i)(),Z=ce(r(i)),he={};Pe.Fragment=b,Pe.jsx=function(d,y,I){var P=1e4>L.recentlyCreatedOwnerStacks++;return f(d,y,I,!1,P?Error("react-stack-top-frame"):Ce,P?ce(r(d)):Z)},Pe.jsxs=function(d,y,I){var P=1e4>L.recentlyCreatedOwnerStacks++;return f(d,y,I,!0,P?Error("react-stack-top-frame"):Ce,P?ce(r(d)):Z)}})()),Pe}var Rt;function Rn(){return Rt||(Rt=1,process.env.NODE_ENV==="production"?Je.exports=Mn():Je.exports=jn()),Je.exports}var R=Rn();const Pn=l.lazy(()=>Promise.resolve().then(()=>Mo)),gt=({schema:e})=>{const t=l.useMemo(()=>{const{columns:n=[],data:r,groupBy:o}=e;if(r&&o&&Array.isArray(r)){const i=r.reduce((s,a)=>{const c=a[o];return s[c]||(s[c]=[]),s[c].push(a),s},{});return n.map(s=>({...s,cards:[...s.cards||[],...i[s.id]||[]]}))}return n},[e]);return R.jsx(l.Suspense,{fallback:R.jsx(le.Skeleton,{className:"w-full h-[600px]"}),children:R.jsx(Pn,{columns:t,onCardMove:e.onCardMove,className:e.className})})};In.ComponentRegistry.register("kanban",gt,{label:"Kanban Board",icon:"LayoutDashboard",category:"plugin",inputs:[{name:"columns",type:"array",label:"Columns",description:"Array of { id, title, cards, limit, className }",required:!0},{name:"onCardMove",type:"code",label:"On Card Move",description:"Callback when a card is moved",advanced:!0},{name:"className",type:"string",label:"CSS Class"}],defaultProps:{columns:[{id:"todo",title:"To Do",cards:[{id:"card-1",title:"Task 1",description:"This is the first task",badges:[{label:"High Priority",variant:"destructive"},{label:"Feature",variant:"default"}]},{id:"card-2",title:"Task 2",description:"This is the second task",badges:[{label:"Bug",variant:"destructive"}]}]},{id:"in-progress",title:"In Progress",limit:3,cards:[{id:"card-3",title:"Task 3",description:"Currently working on this",badges:[{label:"In Progress",variant:"default"}]}]},{id:"done",title:"Done",cards:[{id:"card-4",title:"Task 4",description:"This task is completed",badges:[{label:"Completed",variant:"outline"}]},{id:"card-5",title:"Task 5",description:"Another completed task",badges:[{label:"Completed",variant:"outline"}]}]}],className:"w-full"}});const _n={kanban:gt};function Ln(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Ge=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Se(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ht(e){return"nodeType"in e}function U(e){var t,n;return e?Se(e)?e:ht(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function vt(e){const{Document:t}=U(e);return e instanceof t}function _e(e){return Se(e)?!1:e instanceof U(e).HTMLElement}function Pt(e){return e instanceof U(e).SVGElement}function Ee(e){return e?Se(e)?e.document:ht(e)?vt(e)?e:_e(e)||Pt(e)?e.ownerDocument:document:document:document}const ne=Ge?l.useLayoutEffect:l.useEffect;function Qe(e){const t=l.useRef(e);return ne(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function zn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Le(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return ne(()=>{n.current!==e&&(n.current=e)},t),n}function ze(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ze(e){const t=Qe(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function et(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let pt={};function Be(e,t){return l.useMemo(()=>{if(t)return t;const n=pt[e]==null?0:pt[e]+1;return pt[e]=n,e+"-"+n},[e,t])}function _t(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[c,u]of a){const f=i[c];f!=null&&(i[c]=f+e*u)}return i},{...t})}}const De=_t(1),tt=_t(-1);function Bn(e){return"clientX"in e&&"clientY"in e}function nt(e){if(!e)return!1;const{KeyboardEvent:t}=U(e.target);return t&&e instanceof t}function Fn(e){if(!e)return!1;const{TouchEvent:t}=U(e.target);return t&&e instanceof t}function rt(e){if(Fn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Bn(e)?{x:e.clientX,y:e.clientY}:null}const fe=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[fe.Translate.toString(e),fe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Lt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $n(e){return e.matches(Lt)?e:e.querySelector(Lt)}const Yn={display:"none"};function Xn(e){let{id:t,value:n}=e;return l.createElement("div",{id:t,style:Yn},n)}function Un(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return l.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Wn(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const zt=l.createContext(null);function Kn(e){const t=l.useContext(zt);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function qn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Vn={draggable:`
15
7
  To pick up a draggable item, press the space bar.
16
8
  While dragging, use the arrow keys to move the item.
17
9
  Press space again to drop the item in its new position, or press escape to cancel.
18
- `},br={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function mr(e){let{announcements:t=br,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=pr}=e;const{announce:s,announcement:a}=vr(),l=ct("DndLiveRegion"),[u,d]=c.useState(!1);if(c.useEffect(()=>{d(!0)},[]),gr(c.useMemo(()=>({onDragStart(v){let{active:b}=v;s(t.onDragStart({active:b}))},onDragMove(v){let{active:b,over:h}=v;t.onDragMove&&s(t.onDragMove({active:b,over:h}))},onDragOver(v){let{active:b,over:h}=v;s(t.onDragOver({active:b,over:h}))},onDragEnd(v){let{active:b,over:h}=v;s(t.onDragEnd({active:b,over:h}))},onDragCancel(v){let{active:b,over:h}=v;s(t.onDragCancel({active:b,over:h}))}}),[s,t])),!u)return null;const f=c.createElement(c.Fragment,null,c.createElement(dr,{id:r,value:i.draggable}),c.createElement(fr,{id:l,announcement:a}));return n?rt.createPortal(f,n):f}var K;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(K||(K={}));function At(){}function yr(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function xr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const be=Object.freeze({x:0,y:0});function wr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Cr(e,t){const n=Tt(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Er(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Sr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function pn(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Dr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const Or=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=pn(t),s=[];for(const a of r){const{id:l}=a,u=n.get(l);if(u){const d=pn(u),f=i.reduce((b,h,w)=>b+wr(d[w],h),0),v=Number((f/4).toFixed(4));s.push({id:l,data:{droppableContainer:a,value:v}})}}return s.sort(Er)};function Tr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=i-r,l=s-n;if(r<i&&n<s){const u=t.width*t.height,d=e.width*e.height,f=a*l,v=f/(u+d-f);return Number(v.toFixed(4))}return 0}const Ar=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const u=Tr(l,t);u>0&&i.push({id:a,data:{droppableContainer:s,value:u}})}}return i.sort(Sr)};function Ir(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function bn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:be}function Rr(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return i.reduce((a,l)=>({...a,top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),{...n})}}const Nr=Rr(1);function mn(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Mr(e,t,n){const r=mn(t);if(!r)return e;const{scaleX:i,scaleY:s,x:a,y:l}=r,u=e.left-a-(1-i)*parseFloat(n),d=e.top-l-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,v=s?e.height/s:e.height;return{width:f,height:v,top:d,right:u+f,bottom:d+v,left:u}}const kr={ignoreTransform:!1};function Ze(e,t){t===void 0&&(t=kr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:f}=ee(e).getComputedStyle(e);d&&(n=Mr(n,d,f))}const{top:r,left:i,width:s,height:a,bottom:l,right:u}=n;return{top:r,left:i,width:s,height:a,bottom:l,right:u}}function yn(e){return Ze(e,{ignoreTransform:!0})}function jr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Pr(e,t){return t===void 0&&(t=ee(e).getComputedStyle(e)),t.position==="fixed"}function _r(e,t){t===void 0&&(t=ee(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const s=t[i];return typeof s=="string"?n.test(s):!1})}function Xt(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Ut(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!st(i)||fn(i)||n.includes(i))return n;const s=ee(e).getComputedStyle(i);return i!==e&&_r(i,s)&&n.push(i),Pr(i,s)?n:r(i.parentNode)}return e?r(e):n}function xn(e){const[t]=Xt(e,1);return t??null}function Vt(e){return!wt||!e?null:Je(e)?e:Wt(e)?Ut(e)||e===Ge(e).scrollingElement?window:st(e)?e:null:null}function wn(e){return Je(e)?e.scrollX:e.scrollLeft}function Cn(e){return Je(e)?e.scrollY:e.scrollTop}function qt(e){return{x:wn(e),y:Cn(e)}}var V;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(V||(V={}));function En(e){return!wt||!e?!1:e===document.scrollingElement}function Sn(e){const t={x:0,y:0},n=En(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:s,isBottom:a,isRight:l,maxScroll:r,minScroll:t}}const Lr={x:.2,y:.2};function Fr(e,t,n,r,i){let{top:s,left:a,right:l,bottom:u}=n;r===void 0&&(r=10),i===void 0&&(i=Lr);const{isTop:d,isBottom:f,isLeft:v,isRight:b}=Sn(e),h={x:0,y:0},w={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!d&&s<=t.top+m.height?(h.y=V.Backward,w.y=r*Math.abs((t.top+m.height-s)/m.height)):!f&&u>=t.bottom-m.height&&(h.y=V.Forward,w.y=r*Math.abs((t.bottom-m.height-u)/m.height)),!b&&l>=t.right-m.width?(h.x=V.Forward,w.x=r*Math.abs((t.right-m.width-l)/m.width)):!v&&a<=t.left+m.width&&(h.x=V.Backward,w.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:h,speed:w}}function Br(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:a}=window;return{top:0,left:0,right:s,bottom:a,width:s,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Dn(e){return e.reduce((t,n)=>Qe(t,qt(n)),be)}function $r(e){return e.reduce((t,n)=>t+wn(n),0)}function zr(e){return e.reduce((t,n)=>t+Cn(n),0)}function On(e,t){if(t===void 0&&(t=Ze),!e)return;const{top:n,left:r,bottom:i,right:s}=t(e);xn(e)&&(i<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Yr=[["x",["left","right"],$r],["y",["top","bottom"],zr]];class Ht{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Xt(n),i=Dn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,a,l]of Yr)for(const u of a)Object.defineProperty(this,u,{get:()=>{const d=l(r),f=i[s]-d;return this.rect[u]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ut{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Wr(e){const{EventTarget:t}=ee(e);return e instanceof t?e:Ge(e)}function Jt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ue;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ue||(ue={}));function Tn(e){e.preventDefault()}function Ur(e){e.stopPropagation()}var P;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(P||(P={}));const An={start:[P.Space,P.Enter],cancel:[P.Esc],end:[P.Space,P.Enter,P.Tab]},Kr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case P.Right:return{...n,x:n.x+25};case P.Left:return{...n,x:n.x-25};case P.Down:return{...n,y:n.y+25};case P.Up:return{...n,y:n.y-25}}};class In{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new ut(Ge(n)),this.windowListeners=new ut(ee(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ue.Resize,this.handleCancel),this.windowListeners.add(ue.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ue.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&On(r),n(be)}handleKeyDown(t){if(Ot(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:s=An,coordinateGetter:a=Kr,scrollBehavior:l="smooth"}=i,{code:u}=t;if(s.end.includes(u)){this.handleEnd(t);return}if(s.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:d}=r.current,f=d?{x:d.left,y:d.top}:be;this.referenceCoordinates||(this.referenceCoordinates=f);const v=a(t,{active:n,context:r.current,currentCoordinates:f});if(v){const b=Dt(v,f),h={x:0,y:0},{scrollableAncestors:w}=r.current;for(const m of w){const y=t.code,{isTop:C,isRight:x,isLeft:E,isBottom:T,maxScroll:D,minScroll:I}=Sn(m),O=Br(m),A={x:Math.min(y===P.Right?O.right-O.width/2:O.right,Math.max(y===P.Right?O.left:O.left+O.width/2,v.x)),y:Math.min(y===P.Down?O.bottom-O.height/2:O.bottom,Math.max(y===P.Down?O.top:O.top+O.height/2,v.y))},N=y===P.Right&&!x||y===P.Left&&!E,L=y===P.Down&&!T||y===P.Up&&!C;if(N&&A.x!==v.x){const M=m.scrollLeft+b.x,z=y===P.Right&&M<=D.x||y===P.Left&&M>=I.x;if(z&&!b.y){m.scrollTo({left:M,behavior:l});return}z?h.x=m.scrollLeft-M:h.x=y===P.Right?m.scrollLeft-D.x:m.scrollLeft-I.x,h.x&&m.scrollBy({left:-h.x,behavior:l});break}else if(L&&A.y!==v.y){const M=m.scrollTop+b.y,z=y===P.Down&&M<=D.y||y===P.Up&&M>=I.y;if(z&&!b.x){m.scrollTo({top:M,behavior:l});return}z?h.y=m.scrollTop-M:h.y=y===P.Down?m.scrollTop-D.y:m.scrollTop-I.y,h.y&&m.scrollBy({top:-h.y,behavior:l});break}}this.handleMove(t,Qe(Dt(v,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}In.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=An,onActivation:i}=t,{active:s}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const l=s.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Rn(e){return!!(e&&"distance"in e)}function Nn(e){return!!(e&&"delay"in e)}class Gt{constructor(t,n,r){var i;r===void 0&&(r=Wr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:a}=s;this.props=t,this.events=n,this.document=Ge(a),this.documentListeners=new ut(this.document),this.listeners=new ut(r),this.windowListeners=new ut(ee(a)),this.initialCoordinates=(i=Tt(s))!=null?i:be,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ue.Resize,this.handleCancel),this.windowListeners.add(ue.DragStart,Tn),this.windowListeners.add(ue.VisibilityChange,this.handleCancel),this.windowListeners.add(ue.ContextMenu,Tn),this.documentListeners.add(ue.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Nn(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Rn(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ue.Click,Ur,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ue.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:s}=this,{onMove:a,options:{activationConstraint:l}}=s;if(!i)return;const u=(n=Tt(t))!=null?n:be,d=Dt(i,u);if(!r&&l){if(Rn(l)){if(l.tolerance!=null&&Jt(d,l.tolerance))return this.handleCancel();if(Jt(d,l.distance))return this.handleStart()}if(Nn(l)&&Jt(d,l.tolerance))return this.handleCancel();this.handlePending(l,d);return}t.cancelable&&t.preventDefault(),a(u)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===P.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Xr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Qt extends Gt{constructor(t){const{event:n}=t,r=Ge(n.target);super(t,Xr,r)}}Qt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Vr={move:{name:"mousemove"},end:{name:"mouseup"}};var Zt;(function(e){e[e.RightClick=2]="RightClick"})(Zt||(Zt={}));class qr extends Gt{constructor(t){super(t,Vr,Ge(t.event.target))}}qr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Zt.RightClick?!1:(r?.({event:n}),!0)}}];const en={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Hr extends Gt{constructor(t){super(t,en)}static setup(){return window.addEventListener(en.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(en.move.name,t)};function t(){}}}Hr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var dt;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(dt||(dt={}));var It;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(It||(It={}));function Jr(e){let{acceleration:t,activator:n=dt.Pointer,canScroll:r,draggingRect:i,enabled:s,interval:a=5,order:l=It.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:v,threshold:b}=e;const h=Qr({delta:v,disabled:!s}),[w,m]=sr(),y=c.useRef({x:0,y:0}),C=c.useRef({x:0,y:0}),x=c.useMemo(()=>{switch(n){case dt.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case dt.DraggableRect:return i}},[n,i,u]),E=c.useRef(null),T=c.useCallback(()=>{const I=E.current;if(!I)return;const O=y.current.x*C.current.x,A=y.current.y*C.current.y;I.scrollBy(O,A)},[]),D=c.useMemo(()=>l===It.TreeOrder?[...d].reverse():d,[l,d]);c.useEffect(()=>{if(!s||!d.length||!x){m();return}for(const I of D){if(r?.(I)===!1)continue;const O=d.indexOf(I),A=f[O];if(!A)continue;const{direction:N,speed:L}=Fr(I,A,x,t,b);for(const M of["x","y"])h[M][N[M]]||(L[M]=0,N[M]=0);if(L.x>0||L.y>0){m(),E.current=I,w(T,a),y.current=L,C.current=N;return}}y.current={x:0,y:0},C.current={x:0,y:0},m()},[t,T,r,m,s,a,JSON.stringify(x),JSON.stringify(h),w,d,D,f,JSON.stringify(b)])}const Gr={x:{[V.Backward]:!1,[V.Forward]:!1},y:{[V.Backward]:!1,[V.Forward]:!1}};function Qr(e){let{delta:t,disabled:n}=e;const r=St(t);return lt(i=>{if(n||!r||!i)return Gr;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[V.Backward]:i.x[V.Backward]||s.x===-1,[V.Forward]:i.x[V.Forward]||s.x===1},y:{[V.Backward]:i.y[V.Backward]||s.y===-1,[V.Forward]:i.y[V.Forward]||s.y===1}}},[n,t,r])}function Zr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return lt(i=>{var s;return t==null?null:(s=r??i)!=null?s:null},[r,t])}function eo(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,s=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...s]},[]),[e,t])}var ft;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ft||(ft={}));var tn;(function(e){e.Optimized="optimized"})(tn||(tn={}));const Mn=new Map;function to(e,t){let{dragging:n,dependencies:r,config:i}=t;const[s,a]=c.useState(null),{frequency:l,measure:u,strategy:d}=i,f=c.useRef(e),v=y(),b=at(v),h=c.useCallback(function(C){C===void 0&&(C=[]),!b.current&&a(x=>x===null?C:x.concat(C.filter(E=>!x.includes(E))))},[b]),w=c.useRef(null),m=lt(C=>{if(v&&!n)return Mn;if(!C||C===Mn||f.current!==e||s!=null){const x=new Map;for(let E of e){if(!E)continue;if(s&&s.length>0&&!s.includes(E.id)&&E.rect.current){x.set(E.id,E.rect.current);continue}const T=E.node.current,D=T?new Ht(u(T),T):null;E.rect.current=D,D&&x.set(E.id,D)}return x}return C},[e,s,n,v,u]);return c.useEffect(()=>{f.current=e},[e]),c.useEffect(()=>{v||h()},[n,v]),c.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),c.useEffect(()=>{v||typeof l!="number"||w.current!==null||(w.current=setTimeout(()=>{h(),w.current=null},l))},[l,v,h,...r]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:s!=null};function y(){switch(d){case ft.Always:return!1;case ft.BeforeDragging:return n;default:return!n}}}function nn(e,t){return lt(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function no(e,t){return nn(e,t)}function ro(e){let{callback:t,disabled:n}=e;const r=Ct(t),i=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return c.useEffect(()=>()=>i?.disconnect(),[i]),i}function Rt(e){let{callback:t,disabled:n}=e;const r=Ct(t),i=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return c.useEffect(()=>()=>i?.disconnect(),[i]),i}function oo(e){return new Ht(Ze(e),e)}function kn(e,t,n){t===void 0&&(t=oo);const[r,i]=c.useState(null);function s(){i(u=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=u??n)!=null?d:null}const f=t(e);return JSON.stringify(u)===JSON.stringify(f)?u:f})}const a=ro({callback(u){if(e)for(const d of u){const{type:f,target:v}=d;if(f==="childList"&&v instanceof HTMLElement&&v.contains(e)){s();break}}}}),l=Rt({callback:s});return pe(()=>{s(),e?(l?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),a?.disconnect())},[e]),r}function io(e){const t=nn(e);return bn(e,t)}const jn=[];function so(e){const t=c.useRef(e),n=lt(r=>e?r&&r!==jn&&e&&t.current&&e.parentNode===t.current.parentNode?r:Xt(e):jn,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function ao(e){const[t,n]=c.useState(null),r=c.useRef(e),i=c.useCallback(s=>{const a=Vt(s.target);a&&n(l=>l?(l.set(a,qt(a)),new Map(l)):null)},[]);return c.useEffect(()=>{const s=r.current;if(e!==s){a(s);const l=e.map(u=>{const d=Vt(u);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,qt(d)]):null}).filter(u=>u!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(s)};function a(l){l.forEach(u=>{const d=Vt(u);d?.removeEventListener("scroll",i)})}},[i,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,a)=>Qe(s,a),be):Dn(e):be,[e,t])}function Pn(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==be;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Dt(e,n.current):be}function lo(e){c.useEffect(()=>{if(!wt)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function co(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:s}=r;return n[i]=a=>{s(a,t)},n},{}),[e,t])}function _n(e){return c.useMemo(()=>e?jr(e):null,[e])}const Ln=[];function uo(e,t){t===void 0&&(t=Ze);const[n]=e,r=_n(n?ee(n):null),[i,s]=c.useState(Ln);function a(){s(()=>e.length?e.map(u=>En(u)?r:new Ht(t(u),u)):Ln)}const l=Rt({callback:a});return pe(()=>{l?.disconnect(),a(),e.forEach(u=>l?.observe(u))},[e]),i}function Fn(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return st(t)?t:e}function fo(e){let{measure:t}=e;const[n,r]=c.useState(null),i=c.useCallback(d=>{for(const{target:f}of d)if(st(f)){r(v=>{const b=t(f);return v?{...v,width:b.width,height:b.height}:b});break}},[t]),s=Rt({callback:i}),a=c.useCallback(d=>{const f=Fn(d);s?.disconnect(),f&&s?.observe(f),r(f?t(f):null)},[t,s]),[l,u]=Et(a);return c.useMemo(()=>({nodeRef:l,rect:n,setRef:u}),[n,l,u])}const vo=[{sensor:Qt,options:{}},{sensor:In,options:{}}],go={current:{}},Nt={draggable:{measure:yn},droppable:{measure:yn,strategy:ft.WhileDragging,frequency:tn.Optimized},dragOverlay:{measure:Ze}};class vt extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const ho={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:At},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Nt,measureDroppableContainers:At,windowRect:null,measuringScheduled:!1},Bn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:At,draggableNodes:new Map,over:null,measureDroppableContainers:At},gt=c.createContext(Bn),$n=c.createContext(ho);function po(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vt}}}function bo(e,t){switch(t.type){case K.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case K.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case K.DragEnd:case K.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case K.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new vt(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case K.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const a=new vt(e.droppable.containers);return a.set(n,{...s,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case K.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new vt(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function mo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=c.useContext(gt),s=St(r),a=St(n?.id);return c.useEffect(()=>{if(!t&&!r&&s&&a!=null){if(!Ot(s)||document.activeElement===s.target)return;const l=i.get(a);if(!l)return;const{activatorNode:u,node:d}=l;if(!u.current&&!d.current)return;requestAnimationFrame(()=>{for(const f of[u.current,d.current]){if(!f)continue;const v=cr(f);if(v){v.focus();break}}})}},[r,t,i,a,s]),null}function zn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,s)=>s({transform:i,...r}),n):n}function yo(e){return c.useMemo(()=>({draggable:{...Nt.draggable,...e?.draggable},droppable:{...Nt.droppable,...e?.droppable},dragOverlay:{...Nt.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function xo(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const s=c.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;pe(()=>{if(!a&&!l||!t){s.current=!1;return}if(s.current||!r)return;const d=t?.node.current;if(!d||d.isConnected===!1)return;const f=n(d),v=bn(f,r);if(a||(v.x=0),l||(v.y=0),s.current=!0,Math.abs(v.x)>0||Math.abs(v.y)>0){const b=xn(d);b&&b.scrollBy({top:v.y,left:v.x})}},[t,a,l,r,n])}const Mt=c.createContext({...be,scaleX:1,scaleY:1});var Ne;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ne||(Ne={}));const wo=c.memo(function(t){var n,r,i,s;let{id:a,accessibility:l,autoScroll:u=!0,children:d,sensors:f=vo,collisionDetection:v=Ar,measuring:b,modifiers:h,...w}=t;const m=c.useReducer(bo,void 0,po),[y,C]=m,[x,E]=hr(),[T,D]=c.useState(Ne.Uninitialized),I=T===Ne.Initialized,{draggable:{active:O,nodes:A,translate:N},droppable:{containers:L}}=y,M=O!=null?A.get(O):null,z=c.useRef({initial:null,translated:null}),Y=c.useMemo(()=>{var W;return O!=null?{id:O,data:(W=M?.data)!=null?W:go,rect:z}:null},[O,M]),q=c.useRef(null),[me,Ye]=c.useState(null),[J,We]=c.useState(null),de=at(w,Object.values(w)),Me=ct("DndDescribedBy",a),Ue=c.useMemo(()=>L.getEnabled(),[L]),H=yo(b),{droppableRects:fe,measureDroppableContainers:Ae,measuringScheduled:Ke}=to(Ue,{dragging:I,dependencies:[N.x,N.y],config:H.droppable}),G=Zr(A,O),ke=c.useMemo(()=>J?Tt(J):null,[J]),ie=yt(),se=no(G,H.draggable.measure);xo({activeNode:O!=null?A.get(O):null,config:ie.layoutShiftCompensation,initialRect:se,measure:H.draggable.measure});const j=kn(G,H.draggable.measure,se),Xe=kn(G?G.parentElement:null),ae=c.useRef({activatorEvent:null,active:null,activeNode:G,collisionRect:null,collisions:null,droppableRects:fe,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),je=L.getNodeFor((n=ae.current.over)==null?void 0:n.id),ye=fo({measure:H.dragOverlay.measure}),xe=(r=ye.nodeRef.current)!=null?r:G,ve=I?(i=ye.rect)!=null?i:j:null,ht=!!(ye.nodeRef.current&&ye.rect),pt=io(ht?null:j),Pe=_n(xe?ee(xe):null),Se=so(I?je??G:null),et=uo(Se),_e=zn(h,{transform:{x:N.x-pt.x,y:N.y-pt.y,scaleX:1,scaleY:1},activatorEvent:J,active:Y,activeNodeRect:j,containerNodeRect:Xe,draggingNodeRect:ve,over:ae.current.over,overlayNodeRect:ye.rect,scrollableAncestors:Se,scrollableAncestorRects:et,windowRect:Pe}),Pt=ke?Qe(ke,N):null,_t=ao(Se),Lt=Pn(_t),Ft=Pn(_t,[j]),Ie=Qe(_e,Lt),Le=ve?Nr(ve,_e):null,Fe=Y&&Le?v({active:Y,collisionRect:Le,droppableRects:fe,droppableContainers:Ue,pointerCoordinates:Pt}):null,bt=Dr(Fe,"id"),[De,Bt]=c.useState(null),on=ht?_e:Qe(_e,Ft),sn=Ir(on,(s=De?.rect)!=null?s:null,j),mt=c.useRef(null),$t=c.useCallback((W,Q)=>{let{sensor:te,options:we}=Q;if(q.current==null)return;const re=A.get(q.current);if(!re)return;const Z=W.nativeEvent,le=new te({active:q.current,activeNode:re,event:Z,options:we,context:ae,onAbort(X){if(!A.get(X))return;const{onDragAbort:ce}=de.current,Ee={id:X};ce?.(Ee),x({type:"onDragAbort",event:Ee})},onPending(X,Ce,ce,Ee){if(!A.get(X))return;const{onDragPending:qe}=de.current,Oe={id:X,constraint:Ce,initialCoordinates:ce,offset:Ee};qe?.(Oe),x({type:"onDragPending",event:Oe})},onStart(X){const Ce=q.current;if(Ce==null)return;const ce=A.get(Ce);if(!ce)return;const{onDragStart:Ee}=de.current,Ve={activatorEvent:Z,active:{id:Ce,data:ce.data,rect:z}};rt.unstable_batchedUpdates(()=>{Ee?.(Ve),D(Ne.Initializing),C({type:K.DragStart,initialCoordinates:X,active:Ce}),x({type:"onDragStart",event:Ve}),Ye(mt.current),We(Z)})},onMove(X){C({type:K.DragMove,coordinates:X})},onEnd:$e(K.DragEnd),onCancel:$e(K.DragCancel)});mt.current=le;function $e(X){return async function(){const{active:ce,collisions:Ee,over:Ve,scrollAdjustedTranslate:qe}=ae.current;let Oe=null;if(ce&&qe){const{cancelDrop:o}=de.current;Oe={activatorEvent:Z,active:ce,collisions:Ee,delta:qe,over:Ve},X===K.DragEnd&&typeof o=="function"&&await Promise.resolve(o(Oe))&&(X=K.DragCancel)}q.current=null,rt.unstable_batchedUpdates(()=>{C({type:X}),D(Ne.Uninitialized),Bt(null),Ye(null),We(null),mt.current=null;const o=X===K.DragEnd?"onDragEnd":"onDragCancel";if(Oe){const g=de.current[o];g?.(Oe),x({type:o,event:Oe})}})}}},[A]),an=c.useCallback((W,Q)=>(te,we)=>{const re=te.nativeEvent,Z=A.get(we);if(q.current!==null||!Z||re.dndKit||re.defaultPrevented)return;const le={active:Z};W(te,Q.options,le)===!0&&(re.dndKit={capturedBy:Q.sensor},q.current=we,$t(te,Q))},[A,$t]),tt=eo(f,an);lo(f),pe(()=>{j&&T===Ne.Initializing&&D(Ne.Initialized)},[j,T]),c.useEffect(()=>{const{onDragMove:W}=de.current,{active:Q,activatorEvent:te,collisions:we,over:re}=ae.current;if(!Q||!te)return;const Z={active:Q,activatorEvent:te,collisions:we,delta:{x:Ie.x,y:Ie.y},over:re};rt.unstable_batchedUpdates(()=>{W?.(Z),x({type:"onDragMove",event:Z})})},[Ie.x,Ie.y]),c.useEffect(()=>{const{active:W,activatorEvent:Q,collisions:te,droppableContainers:we,scrollAdjustedTranslate:re}=ae.current;if(!W||q.current==null||!Q||!re)return;const{onDragOver:Z}=de.current,le=we.get(bt),$e=le&&le.rect.current?{id:le.id,rect:le.rect.current,data:le.data,disabled:le.disabled}:null,X={active:W,activatorEvent:Q,collisions:te,delta:{x:re.x,y:re.y},over:$e};rt.unstable_batchedUpdates(()=>{Bt($e),Z?.(X),x({type:"onDragOver",event:X})})},[bt]),pe(()=>{ae.current={activatorEvent:J,active:Y,activeNode:G,collisionRect:Le,collisions:Fe,droppableRects:fe,draggableNodes:A,draggingNode:xe,draggingNodeRect:ve,droppableContainers:L,over:De,scrollableAncestors:Se,scrollAdjustedTranslate:Ie},z.current={initial:ve,translated:Le}},[Y,G,Fe,Le,A,xe,ve,fe,L,De,Se,Ie]),Jr({...ie,delta:N,draggingRect:Le,pointerCoordinates:Pt,scrollableAncestors:Se,scrollableAncestorRects:et});const zt=c.useMemo(()=>({active:Y,activeNode:G,activeNodeRect:j,activatorEvent:J,collisions:Fe,containerNodeRect:Xe,dragOverlay:ye,draggableNodes:A,droppableContainers:L,droppableRects:fe,over:De,measureDroppableContainers:Ae,scrollableAncestors:Se,scrollableAncestorRects:et,measuringConfiguration:H,measuringScheduled:Ke,windowRect:Pe}),[Y,G,j,J,Fe,Xe,ye,A,L,fe,De,Ae,Se,et,H,Ke,Pe]),Be=c.useMemo(()=>({activatorEvent:J,activators:tt,active:Y,activeNodeRect:j,ariaDescribedById:{draggable:Me},dispatch:C,draggableNodes:A,over:De,measureDroppableContainers:Ae}),[J,tt,Y,j,C,Me,A,De,Ae]);return c.createElement(hn.Provider,{value:E},c.createElement(gt.Provider,{value:Be},c.createElement($n.Provider,{value:zt},c.createElement(Mt.Provider,{value:sn},d)),c.createElement(mo,{disabled:l?.restoreFocus===!1})),c.createElement(mr,{...l,hiddenTextDescribedById:Me}));function yt(){const W=me?.autoScrollEnabled===!1,Q=typeof u=="object"?u.enabled===!1:u===!1,te=I&&!W&&!Q;return typeof u=="object"?{...u,enabled:te}:{enabled:te}}}),Co=c.createContext(null),Yn="button",Eo="Draggable";function So(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const s=ct(Eo),{activators:a,activatorEvent:l,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:v,over:b}=c.useContext(gt),{role:h=Yn,roleDescription:w="draggable",tabIndex:m=0}=i??{},y=u?.id===t,C=c.useContext(y?Mt:Co),[x,E]=Et(),[T,D]=Et(),I=co(a,t),O=at(n);pe(()=>(v.set(t,{id:t,key:s,node:x,activatorNode:T,data:O}),()=>{const N=v.get(t);N&&N.key===s&&v.delete(t)}),[v,t]);const A=c.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":y&&h===Yn?!0:void 0,"aria-roledescription":w,"aria-describedby":f.draggable}),[r,h,m,y,w,f.draggable]);return{active:u,activatorEvent:l,activeNodeRect:d,attributes:A,isDragging:y,listeners:r?void 0:I,node:x,over:b,setNodeRef:E,setActivatorNodeRef:D,transform:C}}function Wn(){return c.useContext($n)}const Do="Droppable",Oo={timeout:25};function To(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const s=ct(Do),{active:a,dispatch:l,over:u,measureDroppableContainers:d}=c.useContext(gt),f=c.useRef({disabled:n}),v=c.useRef(!1),b=c.useRef(null),h=c.useRef(null),{disabled:w,updateMeasurementsFor:m,timeout:y}={...Oo,...i},C=at(m??r),x=c.useCallback(()=>{if(!v.current){v.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{d(Array.isArray(C.current)?C.current:[C.current]),h.current=null},y)},[y]),E=Rt({callback:x,disabled:w||!a}),T=c.useCallback((A,N)=>{E&&(N&&(E.unobserve(N),v.current=!1),A&&E.observe(A))},[E]),[D,I]=Et(T),O=at(t);return c.useEffect(()=>{!E||!D.current||(E.disconnect(),v.current=!1,E.observe(D.current))},[D,E]),c.useEffect(()=>(l({type:K.RegisterDroppable,element:{id:r,key:s,disabled:n,node:D,rect:b,data:O}}),()=>l({type:K.UnregisterDroppable,key:s,id:r})),[r]),c.useEffect(()=>{n!==f.current.disabled&&(l({type:K.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,l]),{active:a,rect:b,isOver:u?.id===r,node:D,over:u,setNodeRef:I}}function Ao(e){let{animation:t,children:n}=e;const[r,i]=c.useState(null),[s,a]=c.useState(null),l=St(n);return!n&&!r&&l&&i(l),pe(()=>{if(!s)return;const u=r?.key,d=r?.props.id;if(u==null||d==null){i(null);return}Promise.resolve(t(d,s)).then(()=>{i(null)})},[t,r,s]),c.createElement(c.Fragment,null,n,r?c.cloneElement(r,{ref:a}):null)}const Io={x:0,y:0,scaleX:1,scaleY:1};function Ro(e){let{children:t}=e;return c.createElement(gt.Provider,{value:Bn},c.createElement(Mt.Provider,{value:Io},t))}const No={position:"fixed",touchAction:"none"},Mo=e=>Ot(e)?"transform 250ms ease":void 0,ko=c.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:s,className:a,rect:l,style:u,transform:d,transition:f=Mo}=e;if(!l)return null;const v=i?d:{...d,scaleX:1,scaleY:1},b={...No,width:l.width,height:l.height,top:l.top,left:l.left,transform:Re.Transform.toString(v),transformOrigin:i&&r?Cr(r,l):void 0,transition:typeof f=="function"?f(r):f,...u};return c.createElement(n,{className:a,style:b,ref:t},s)}),jo={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Re.Transform.toString(t)},{transform:Re.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:s,className:a}=e;if(s!=null&&s.active)for(const[l,u]of Object.entries(s.active))u!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,u));if(s!=null&&s.dragOverlay)for(const[l,u]of Object.entries(s.dragOverlay))u!==void 0&&r.node.style.setProperty(l,u);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[u,d]of Object.entries(i))n.node.style.setProperty(u,d);a!=null&&a.active&&n.node.classList.remove(a.active)}})({styles:{active:{opacity:"0"}}})};function Po(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Ct((s,a)=>{if(t===null)return;const l=n.get(s);if(!l)return;const u=l.node.current;if(!u)return;const d=Fn(a);if(!d)return;const{transform:f}=ee(a).getComputedStyle(a),v=mn(f);if(!v)return;const b=typeof t=="function"?t:_o(t);return On(u,i.draggable.measure),b({active:{id:s,data:l.data,node:u,rect:i.draggable.measure(u)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(d)},droppableContainers:r,measuringConfiguration:i,transform:v})})}function _o(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...jo,...e};return s=>{let{active:a,dragOverlay:l,transform:u,...d}=s;if(!t)return;const f={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},v={scaleX:u.scaleX!==1?a.rect.width*u.scaleX/l.rect.width:1,scaleY:u.scaleY!==1?a.rect.height*u.scaleY/l.rect.height:1},b={x:u.x-f.x,y:u.y-f.y,...v},h=i({...d,active:a,dragOverlay:l,transform:{initial:u,final:b}}),[w]=h,m=h[h.length-1];if(JSON.stringify(w)===JSON.stringify(m))return;const y=r?.({active:a,dragOverlay:l,...d}),C=l.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{C.onfinish=()=>{y?.(),x()}})}}let Un=0;function Lo(e){return c.useMemo(()=>{if(e!=null)return Un++,Un},[e])}const Fo=c.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:s,modifiers:a,wrapperElement:l="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:v,activeNodeRect:b,containerNodeRect:h,draggableNodes:w,droppableContainers:m,dragOverlay:y,over:C,measuringConfiguration:x,scrollableAncestors:E,scrollableAncestorRects:T,windowRect:D}=Wn(),I=c.useContext(Mt),O=Lo(v?.id),A=zn(a,{activatorEvent:f,active:v,activeNodeRect:b,containerNodeRect:h,draggingNodeRect:y.rect,over:C,overlayNodeRect:y.rect,scrollableAncestors:E,scrollableAncestorRects:T,transform:I,windowRect:D}),N=nn(b),L=Po({config:r,draggableNodes:w,droppableContainers:m,measuringConfiguration:x}),M=N?y.setRef:void 0;return c.createElement(Ro,null,c.createElement(Ao,{animation:L},v&&O?c.createElement(ko,{key:O,id:v.id,ref:M,as:l,activatorEvent:f,adjustScale:t,className:u,transition:s,rect:N,style:{zIndex:d,...i},transform:A},n):null))});function rn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Bo(e,t){return e.reduce((n,r,i)=>{const s=t.get(r);return s&&(n[i]=s),n},Array(e.length))}function kt(e){return e!==null&&e>=0}function $o(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function zo(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Kn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const s=rn(t,r,n),a=t[i],l=s[i];return!l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},jt={scaleX:1,scaleY:1},Yo=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:s,overIndex:a}=e;const l=(t=s[n])!=null?t:r;if(!l)return null;if(i===n){const d=s[a];return d?{x:0,y:n<a?d.top+d.height-(l.top+l.height):d.top-l.top,...jt}:null}const u=Wo(s,i,n);return i>n&&i<=a?{x:0,y:-l.height-u,...jt}:i<n&&i>=a?{x:0,y:l.height+u,...jt}:{x:0,y:0,...jt}};function Wo(e,t,n){const r=e[t],i=e[t-1],s=e[t+1];return r?n<t?i?r.top-(i.top+i.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Xn="Sortable",Vn=c.createContext({activeIndex:-1,containerId:Xn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Kn,disabled:{draggable:!1,droppable:!1}});function Uo(e){let{children:t,id:n,items:r,strategy:i=Kn,disabled:s=!1}=e;const{active:a,dragOverlay:l,droppableRects:u,over:d,measureDroppableContainers:f}=Wn(),v=ct(Xn,n),b=l.rect!==null,h=c.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),w=a!=null,m=a?h.indexOf(a.id):-1,y=d?h.indexOf(d.id):-1,C=c.useRef(h),x=!$o(h,C.current),E=y!==-1&&m===-1||x,T=zo(s);pe(()=>{x&&w&&f(h)},[x,h,w,f]),c.useEffect(()=>{C.current=h},[h]);const D=c.useMemo(()=>({activeIndex:m,containerId:v,disabled:T,disableTransforms:E,items:h,overIndex:y,useDragOverlay:b,sortedRects:Bo(h,u),strategy:i}),[m,v,T.draggable,T.droppable,E,h,y,u,b,i]);return c.createElement(Vn.Provider,{value:D},t)}const Ko=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return rn(n,r,i).indexOf(t)},Xo=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:s,newIndex:a,previousItems:l,previousContainerId:u,transition:d}=e;return!d||!r||l!==s&&i===a?!1:n?!0:a!==i&&t===u},Vo={duration:200,easing:"ease"},qn="transform",qo=Re.Transition.toString({property:qn,duration:0,easing:"linear"}),Ho={roleDescription:"sortable"};function Jo(e){let{disabled:t,index:n,node:r,rect:i}=e;const[s,a]=c.useState(null),l=c.useRef(n);return pe(()=>{if(!t&&n!==l.current&&r.current){const u=i.current;if(u){const d=Ze(r.current,{ignoreTransform:!0}),f={x:u.left-d.left,y:u.top-d.top,scaleX:u.width/d.width,scaleY:u.height/d.height};(f.x||f.y)&&a(f)}}n!==l.current&&(l.current=n)},[t,n,r,i]),c.useEffect(()=>{s&&a(null)},[s]),s}function Hn(e){let{animateLayoutChanges:t=Xo,attributes:n,disabled:r,data:i,getNewIndex:s=Ko,id:a,strategy:l,resizeObserverConfig:u,transition:d=Vo}=e;const{items:f,containerId:v,activeIndex:b,disabled:h,disableTransforms:w,sortedRects:m,overIndex:y,useDragOverlay:C,strategy:x}=c.useContext(Vn),E=Go(r,h),T=f.indexOf(a),D=c.useMemo(()=>({sortable:{containerId:v,index:T,items:f},...i}),[v,i,T,f]),I=c.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:O,node:A,isOver:N,setNodeRef:L}=To({id:a,data:D,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...u}}),{active:M,activatorEvent:z,activeNodeRect:Y,attributes:q,setNodeRef:me,listeners:Ye,isDragging:J,over:We,setActivatorNodeRef:de,transform:Me}=So({id:a,data:D,attributes:{...Ho,...n},disabled:E.draggable}),Ue=ir(L,me),H=!!M,fe=H&&!w&&kt(b)&&kt(y),Ae=!C&&J,Ke=Ae&&fe?Me:null,ke=fe?Ke??(l??x)({rects:m,activeNodeRect:Y,activeIndex:b,overIndex:y,index:T}):null,ie=kt(b)&&kt(y)?s({id:a,items:f,activeIndex:b,overIndex:y}):T,se=M?.id,j=c.useRef({activeId:se,items:f,newIndex:ie,containerId:v}),Xe=f!==j.current.items,ae=t({active:M,containerId:v,isDragging:J,isSorting:H,id:a,index:T,items:f,newIndex:j.current.newIndex,previousItems:j.current.items,previousContainerId:j.current.containerId,transition:d,wasDragging:j.current.activeId!=null}),je=Jo({disabled:!ae,index:T,node:A,rect:O});return c.useEffect(()=>{H&&j.current.newIndex!==ie&&(j.current.newIndex=ie),v!==j.current.containerId&&(j.current.containerId=v),f!==j.current.items&&(j.current.items=f)},[H,ie,v,f]),c.useEffect(()=>{if(se===j.current.activeId)return;if(se!=null&&j.current.activeId==null){j.current.activeId=se;return}const xe=setTimeout(()=>{j.current.activeId=se},50);return()=>clearTimeout(xe)},[se]),{active:M,activeIndex:b,attributes:q,data:D,rect:O,index:T,newIndex:ie,items:f,isOver:N,isSorting:H,isDragging:J,listeners:Ye,node:A,overIndex:y,over:We,setNodeRef:Ue,setActivatorNodeRef:de,setDroppableNodeRef:L,setDraggableNodeRef:me,transform:je??ke,transition:ye()};function ye(){if(je||Xe&&j.current.newIndex===T)return qo;if(!(Ae&&!Ot(z)||!d)&&(H||ae))return Re.Transition.toString({...d,property:qn})}}function Go(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}P.Down,P.Right,P.Up,P.Left;const Jn=(...e)=>e.filter(Boolean).join(" ");function Gn({card:e}){const{attributes:t,listeners:n,setNodeRef:r,transform:i,transition:s,isDragging:a}=Hn({id:e.id}),l={transform:Re.Transform.toString(i),transition:s,opacity:a?.5:void 0};return F.jsx("div",{ref:r,style:l,...t,...n,children:F.jsxs(Te.Card,{className:"mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group",children:[F.jsxs(Te.CardHeader,{className:"p-4",children:[F.jsx(Te.CardTitle,{className:"text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors",children:e.title}),e.description&&F.jsx(Te.CardDescription,{className:"text-xs text-muted-foreground font-mono",children:e.description})]}),e.badges&&e.badges.length>0&&F.jsx(Te.CardContent,{className:"p-4 pt-0",children:F.jsx("div",{className:"flex flex-wrap gap-1",children:e.badges.map((u,d)=>F.jsx(Te.Badge,{variant:u.variant||"default",className:"text-xs",children:u.label},d))})})]})})}function Qo({column:e,cards:t}){const n=t||[],{setNodeRef:r}=Hn({id:e.id,data:{type:"column"}}),i=e.limit&&n.length>=e.limit;return F.jsxs("div",{ref:r,className:Jn("flex flex-col w-80 flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl",e.className),children:[F.jsx("div",{className:"p-4 border-b border-border/50 bg-muted/20",children:F.jsxs("div",{className:"flex items-center justify-between",children:[F.jsx("h3",{className:"font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase",children:e.title}),F.jsxs("div",{className:"flex items-center gap-2",children:[F.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[n.length,e.limit&&` / ${e.limit}`]}),i&&F.jsx(Te.Badge,{variant:"destructive",className:"text-xs",children:"Full"})]})]})}),F.jsx(Te.ScrollArea,{className:"flex-1 p-4",children:F.jsx(Uo,{items:n.map(s=>s.id),strategy:Yo,children:F.jsx("div",{className:"space-y-2",children:n.map(s=>F.jsx(Gn,{card:s},s.id))})})})]})}function Zo({columns:e,onCardMove:t,className:n}){const[r,i]=ze.useState(null),s=ze.useMemo(()=>(e||[]).map(w=>({...w,cards:w.cards||[]})),[e]),[a,l]=ze.useState(s);ze.useEffect(()=>{l(s)},[s]);const u=xr(yr(Qt,{activationConstraint:{distance:8}})),d=w=>{const{active:m}=w,y=v(m.id);i(y)},f=w=>{const{active:m,over:y}=w;if(i(null),!y)return;const C=m.id,x=y.id;if(C===x)return;const E=b(C),T=b(x)||h(x);if(!(!E||!T))if(E.id===T.id){const D=[...E.cards],I=D.findIndex(N=>N.id===C),O=D.findIndex(N=>N.id===x),A=rn(D,I,O);l(N=>N.map(L=>L.id===E.id?{...L,cards:A}:L))}else{const D=[...E.cards],I=[...T.cards],O=D.findIndex(M=>M.id===C),N=x===T.id?I.length:I.findIndex(M=>M.id===x),[L]=D.splice(O,1);I.splice(N,0,L),l(M=>M.map(z=>z.id===E.id?{...z,cards:D}:z.id===T.id?{...z,cards:I}:z)),t&&t(C,E.id,T.id,N)}},v=ze.useCallback(w=>{for(const m of a){const y=m.cards.find(C=>C.id===w);if(y)return y}return null},[a]),b=ze.useCallback(w=>a.find(m=>m.cards.some(y=>y.id===w))||null,[a]),h=ze.useCallback(w=>a.find(m=>m.id===w)||null,[a]);return F.jsxs(wo,{sensors:u,collisionDetection:Or,onDragStart:d,onDragEnd:f,children:[F.jsx("div",{className:Jn("flex gap-4 overflow-x-auto p-4",n),children:a.map(w=>F.jsx(Qo,{column:w,cards:w.cards},w.id))}),F.jsx(Fo,{children:r?F.jsx(Gn,{card:r}):null})]})}const ei=Object.freeze(Object.defineProperty({__proto__:null,default:Zo},Symbol.toStringTag,{value:"Module"}));he.KanbanRenderer=Yt,he.kanbanComponents=or,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})}));
10
+ `},Hn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Jn(e){let{announcements:t=Hn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Vn}=e;const{announce:i,announcement:s}=Wn(),a=Be("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),Kn(l.useMemo(()=>({onDragStart(g){let{active:p}=g;i(t.onDragStart({active:p}))},onDragMove(g){let{active:p,over:h}=g;t.onDragMove&&i(t.onDragMove({active:p,over:h}))},onDragOver(g){let{active:p,over:h}=g;i(t.onDragOver({active:p,over:h}))},onDragEnd(g){let{active:p,over:h}=g;i(t.onDragEnd({active:p,over:h}))},onDragCancel(g){let{active:p,over:h}=g;i(t.onDragCancel({active:p,over:h}))}}),[i,t])),!c)return null;const f=l.createElement(l.Fragment,null,l.createElement(Xn,{id:r,value:o.draggable}),l.createElement(Un,{id:a,announcement:s}));return n?je.createPortal(f,n):f}var z;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(z||(z={}));function ot(){}function Gn(e,t){return l.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Qn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const re=Object.freeze({x:0,y:0});function Zn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function er(e,t){const n=rt(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function tr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function nr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Bt(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function rr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const or=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Bt(t),i=[];for(const s of r){const{id:a}=s,c=n.get(a);if(c){const u=Bt(c),f=o.reduce((p,h,m)=>p+Zn(u[m],h),0),g=Number((f/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:g}})}}return i.sort(tr)};function ir(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-r,a=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,f=s*a,g=f/(c+u-f);return Number(g.toFixed(4))}return 0}const sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:s}=i,a=n.get(s);if(a){const c=ir(a,t);c>0&&o.push({id:s,data:{droppableContainer:i,value:c}})}}return o.sort(nr)};function ar(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ft(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:re}function lr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const cr=lr(1);function $t(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ur(e,t,n){const r=$t(t);if(!r)return e;const{scaleX:o,scaleY:i,x:s,y:a}=r,c=e.left-s-(1-o)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,g=i?e.height/i:e.height;return{width:f,height:g,top:u,right:c+f,bottom:u+g,left:c}}const dr={ignoreTransform:!1};function Te(e,t){t===void 0&&(t=dr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=U(e).getComputedStyle(e);u&&(n=ur(n,u,f))}const{top:r,left:o,width:i,height:s,bottom:a,right:c}=n;return{top:r,left:o,width:i,height:s,bottom:a,right:c}}function Yt(e){return Te(e,{ignoreTransform:!0})}function fr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function gr(e,t){return t===void 0&&(t=U(e).getComputedStyle(e)),t.position==="fixed"}function hr(e,t){t===void 0&&(t=U(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function bt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(vt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!_e(o)||Pt(o)||n.includes(o))return n;const i=U(e).getComputedStyle(o);return o!==e&&hr(o,i)&&n.push(o),gr(o,i)?n:r(o.parentNode)}return e?r(e):n}function Xt(e){const[t]=bt(e,1);return t??null}function mt(e){return!Ge||!e?null:Se(e)?e:ht(e)?vt(e)||e===Ee(e).scrollingElement?window:_e(e)?e:null:null}function Ut(e){return Se(e)?e.scrollX:e.scrollLeft}function Wt(e){return Se(e)?e.scrollY:e.scrollTop}function yt(e){return{x:Ut(e),y:Wt(e)}}var B;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(B||(B={}));function Kt(e){return!Ge||!e?!1:e===document.scrollingElement}function qt(e){const t={x:0,y:0},n=Kt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const vr={x:.2,y:.2};function pr(e,t,n,r,o){let{top:i,left:s,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=vr);const{isTop:u,isBottom:f,isLeft:g,isRight:p}=qt(e),h={x:0,y:0},m={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+v.height?(h.y=B.Backward,m.y=r*Math.abs((t.top+v.height-i)/v.height)):!f&&c>=t.bottom-v.height&&(h.y=B.Forward,m.y=r*Math.abs((t.bottom-v.height-c)/v.height)),!p&&a>=t.right-v.width?(h.x=B.Forward,m.x=r*Math.abs((t.right-v.width-a)/v.width)):!g&&s<=t.left+v.width&&(h.x=B.Backward,m.x=r*Math.abs((t.left+v.width-s)/v.width)),{direction:h,speed:m}}function br(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Vt(e){return e.reduce((t,n)=>De(t,yt(n)),re)}function mr(e){return e.reduce((t,n)=>t+Ut(n),0)}function yr(e){return e.reduce((t,n)=>t+Wt(n),0)}function Ht(e,t){if(t===void 0&&(t=Te),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Xt(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const xr=[["x",["left","right"],mr],["y",["top","bottom"],yr]];class xt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=bt(n),o=Vt(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of xr)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=a(r),f=o[i]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Fe{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function wr(e){const{EventTarget:t}=U(e);return e instanceof t?e:Ee(e)}function wt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var G;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(G||(G={}));function Jt(e){e.preventDefault()}function Cr(e){e.stopPropagation()}var k;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(k||(k={}));const Gt={start:[k.Space,k.Enter],cancel:[k.Esc],end:[k.Space,k.Enter,k.Tab]},Sr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case k.Right:return{...n,x:n.x+25};case k.Left:return{...n,x:n.x-25};case k.Down:return{...n,y:n.y+25};case k.Up:return{...n,y:n.y-25}}};class Qt{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Fe(Ee(n)),this.windowListeners=new Fe(U(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(G.Resize,this.handleCancel),this.windowListeners.add(G.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(G.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Ht(r),n(re)}handleKeyDown(t){if(nt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=Gt,coordinateGetter:s=Sr,scrollBehavior:a="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:re;this.referenceCoordinates||(this.referenceCoordinates=f);const g=s(t,{active:n,context:r.current,currentCoordinates:f});if(g){const p=tt(g,f),h={x:0,y:0},{scrollableAncestors:m}=r.current;for(const v of m){const b=t.code,{isTop:x,isRight:C,isLeft:w,isBottom:D,maxScroll:S,minScroll:O}=qt(v),E=br(v),T={x:Math.min(b===k.Right?E.right-E.width/2:E.right,Math.max(b===k.Right?E.left:E.left+E.width/2,g.x)),y:Math.min(b===k.Down?E.bottom-E.height/2:E.bottom,Math.max(b===k.Down?E.top:E.top+E.height/2,g.y))},A=b===k.Right&&!C||b===k.Left&&!w,j=b===k.Down&&!D||b===k.Up&&!x;if(A&&T.x!==g.x){const N=v.scrollLeft+p.x,L=b===k.Right&&N<=S.x||b===k.Left&&N>=O.x;if(L&&!p.y){v.scrollTo({left:N,behavior:a});return}L?h.x=v.scrollLeft-N:h.x=b===k.Right?v.scrollLeft-S.x:v.scrollLeft-O.x,h.x&&v.scrollBy({left:-h.x,behavior:a});break}else if(j&&T.y!==g.y){const N=v.scrollTop+p.y,L=b===k.Down&&N<=S.y||b===k.Up&&N>=O.y;if(L&&!p.x){v.scrollTo({top:N,behavior:a});return}L?h.y=v.scrollTop-N:h.y=b===k.Down?v.scrollTop-S.y:v.scrollTop-O.y,h.y&&v.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,De(tt(g,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Qt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Gt,onActivation:o}=t,{active:i}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Zt(e){return!!(e&&"distance"in e)}function en(e){return!!(e&&"delay"in e)}class Ct{constructor(t,n,r){var o;r===void 0&&(r=wr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:s}=i;this.props=t,this.events=n,this.document=Ee(s),this.documentListeners=new Fe(this.document),this.listeners=new Fe(r),this.windowListeners=new Fe(U(s)),this.initialCoordinates=(o=rt(i))!=null?o:re,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(G.Resize,this.handleCancel),this.windowListeners.add(G.DragStart,Jt),this.windowListeners.add(G.VisibilityChange,this.handleCancel),this.windowListeners.add(G.ContextMenu,Jt),this.documentListeners.add(G.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(en(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Zt(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(G.Click,Cr,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(G.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const c=(n=rt(t))!=null?n:re,u=tt(o,c);if(!r&&a){if(Zt(a)){if(a.tolerance!=null&&wt(u,a.tolerance))return this.handleCancel();if(wt(u,a.distance))return this.handleStart()}if(en(a)&&wt(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===k.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Er={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class St extends Ct{constructor(t){const{event:n}=t,r=Ee(n.target);super(t,Er,r)}}St.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Dr={move:{name:"mousemove"},end:{name:"mouseup"}};var Et;(function(e){e[e.RightClick=2]="RightClick"})(Et||(Et={}));class Tr extends Ct{constructor(t){super(t,Dr,Ee(t.event.target))}}Tr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Et.RightClick?!1:(r?.({event:n}),!0)}}];const Dt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Or extends Ct{constructor(t){super(t,Dt)}static setup(){return window.addEventListener(Dt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Dt.move.name,t)};function t(){}}}Or.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var $e;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($e||($e={}));var it;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(it||(it={}));function Ar(e){let{acceleration:t,activator:n=$e.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:s=5,order:a=it.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:g,threshold:p}=e;const h=Ir({delta:g,disabled:!i}),[m,v]=zn(),b=l.useRef({x:0,y:0}),x=l.useRef({x:0,y:0}),C=l.useMemo(()=>{switch(n){case $e.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case $e.DraggableRect:return o}},[n,o,c]),w=l.useRef(null),D=l.useCallback(()=>{const O=w.current;if(!O)return;const E=b.current.x*x.current.x,T=b.current.y*x.current.y;O.scrollBy(E,T)},[]),S=l.useMemo(()=>a===it.TreeOrder?[...u].reverse():u,[a,u]);l.useEffect(()=>{if(!i||!u.length||!C){v();return}for(const O of S){if(r?.(O)===!1)continue;const E=u.indexOf(O),T=f[E];if(!T)continue;const{direction:A,speed:j}=pr(O,T,C,t,p);for(const N of["x","y"])h[N][A[N]]||(j[N]=0,A[N]=0);if(j.x>0||j.y>0){v(),w.current=O,m(D,s),b.current=j,x.current=A;return}}b.current={x:0,y:0},x.current={x:0,y:0},v()},[t,D,r,v,i,s,JSON.stringify(C),JSON.stringify(h),m,u,S,f,JSON.stringify(p)])}const Nr={x:{[B.Backward]:!1,[B.Forward]:!1},y:{[B.Backward]:!1,[B.Forward]:!1}};function Ir(e){let{delta:t,disabled:n}=e;const r=et(t);return ze(o=>{if(n||!r||!o)return Nr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[B.Backward]:o.x[B.Backward]||i.x===-1,[B.Forward]:o.x[B.Forward]||i.x===1},y:{[B.Backward]:o.y[B.Backward]||i.y===-1,[B.Forward]:o.y[B.Forward]||i.y===1}}},[n,t,r])}function kr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return ze(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function Mr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...i]},[]),[e,t])}var Ye;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ye||(Ye={}));var Tt;(function(e){e.Optimized="optimized"})(Tt||(Tt={}));const tn=new Map;function jr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,s]=l.useState(null),{frequency:a,measure:c,strategy:u}=o,f=l.useRef(e),g=b(),p=Le(g),h=l.useCallback(function(x){x===void 0&&(x=[]),!p.current&&s(C=>C===null?x:C.concat(x.filter(w=>!C.includes(w))))},[p]),m=l.useRef(null),v=ze(x=>{if(g&&!n)return tn;if(!x||x===tn||f.current!==e||i!=null){const C=new Map;for(let w of e){if(!w)continue;if(i&&i.length>0&&!i.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const D=w.node.current,S=D?new xt(c(D),D):null;w.rect.current=S,S&&C.set(w.id,S)}return C}return x},[e,i,n,g,c]);return l.useEffect(()=>{f.current=e},[e]),l.useEffect(()=>{g||h()},[n,g]),l.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),l.useEffect(()=>{g||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{h(),m.current=null},a))},[a,g,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:i!=null};function b(){switch(u){case Ye.Always:return!1;case Ye.BeforeDragging:return n;default:return!n}}}function Ot(e,t){return ze(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Rr(e,t){return Ot(e,t)}function Pr(e){let{callback:t,disabled:n}=e;const r=Qe(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function st(e){let{callback:t,disabled:n}=e;const r=Qe(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function _r(e){return new xt(Te(e),e)}function nn(e,t,n){t===void 0&&(t=_r);const[r,o]=l.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const s=Pr({callback(c){if(e)for(const u of c){const{type:f,target:g}=u;if(f==="childList"&&g instanceof HTMLElement&&g.contains(e)){i();break}}}}),a=st({callback:i});return ne(()=>{i(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function Lr(e){const t=Ot(e);return Ft(e,t)}const rn=[];function zr(e){const t=l.useRef(e),n=ze(r=>e?r&&r!==rn&&e&&t.current&&e.parentNode===t.current.parentNode?r:bt(e):rn,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function Br(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const s=mt(i.target);s&&n(a=>a?(a.set(s,yt(s)),new Map(a)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){s(i);const a=e.map(c=>{const u=mt(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,yt(u)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(c=>{const u=mt(c);u?.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>De(i,s),re):Vt(e):re,[e,t])}function on(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==re;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?tt(e,n.current):re}function Fr(e){l.useEffect(()=>{if(!Ge)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function $r(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=s=>{i(s,t)},n},{}),[e,t])}function sn(e){return l.useMemo(()=>e?fr(e):null,[e])}const an=[];function Yr(e,t){t===void 0&&(t=Te);const[n]=e,r=sn(n?U(n):null),[o,i]=l.useState(an);function s(){i(()=>e.length?e.map(c=>Kt(c)?r:new xt(t(c),c)):an)}const a=st({callback:s});return ne(()=>{a?.disconnect(),s(),e.forEach(c=>a?.observe(c))},[e]),o}function ln(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return _e(t)?t:e}function Xr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:f}of u)if(_e(f)){r(g=>{const p=t(f);return g?{...g,width:p.width,height:p.height}:p});break}},[t]),i=st({callback:o}),s=l.useCallback(u=>{const f=ln(u);i?.disconnect(),f&&i?.observe(f),r(f?t(f):null)},[t,i]),[a,c]=Ze(s);return l.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Ur=[{sensor:St,options:{}},{sensor:Qt,options:{}}],Wr={current:{}},at={draggable:{measure:Yt},droppable:{measure:Yt,strategy:Ye.WhileDragging,frequency:Tt.Optimized},dragOverlay:{measure:Te}};class Xe extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Kr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Xe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ot},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:at,measureDroppableContainers:ot,windowRect:null,measuringScheduled:!1},cn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ot,draggableNodes:new Map,over:null,measureDroppableContainers:ot},Ue=l.createContext(cn),un=l.createContext(Kr);function qr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xe}}}function Vr(e,t){switch(t.type){case z.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case z.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case z.DragEnd:case z.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case z.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Xe(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case z.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const s=new Xe(e.droppable.containers);return s.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case z.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Xe(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Hr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(Ue),i=et(r),s=et(n?.id);return l.useEffect(()=>{if(!t&&!r&&i&&s!=null){if(!nt(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:c,node:u}=a;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const g=$n(f);if(g){g.focus();break}}})}},[r,t,o,s,i]),null}function dn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Jr(e){return l.useMemo(()=>({draggable:{...at.draggable,...e?.draggable},droppable:{...at.droppable,...e?.droppable},dragOverlay:{...at.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Gr(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;ne(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),g=Ft(f,r);if(s||(g.x=0),a||(g.y=0),i.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const p=Xt(u);p&&p.scrollBy({top:g.y,left:g.x})}},[t,s,a,r,n])}const lt=l.createContext({...re,scaleX:1,scaleY:1});var ge;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ge||(ge={}));const Qr=l.memo(function(t){var n,r,o,i;let{id:s,accessibility:a,autoScroll:c=!0,children:u,sensors:f=Ur,collisionDetection:g=sr,measuring:p,modifiers:h,...m}=t;const v=l.useReducer(Vr,void 0,qr),[b,x]=v,[C,w]=qn(),[D,S]=l.useState(ge.Uninitialized),O=D===ge.Initialized,{draggable:{active:E,nodes:T,translate:A},droppable:{containers:j}}=b,N=E!=null?T.get(E):null,L=l.useRef({initial:null,translated:null}),K=l.useMemo(()=>{var X;return E!=null?{id:E,data:(X=N?.data)!=null?X:Wr,rect:L}:null},[E,N]),Q=l.useRef(null),[ce,we]=l.useState(null),[$,Ce]=l.useState(null),Z=Le(m,Object.values(m)),he=Be("DndDescribedBy",s),d=l.useMemo(()=>j.getEnabled(),[j]),y=Jr(p),{droppableRects:I,measureDroppableContainers:P,measuringScheduled:oe}=jr(d,{dragging:O,dependencies:[A.x,A.y],config:y.droppable}),Y=kr(T,E),_=l.useMemo(()=>$?rt($):null,[$]),W=Fo(),q=Rr(Y,y.draggable.measure);Gr({activeNode:E!=null?T.get(E):null,config:W.layoutShiftCompensation,initialRect:q,measure:y.draggable.measure});const M=nn(Y,y.draggable.measure,q),We=nn(Y?Y.parentElement:null),ie=l.useRef({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:j,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Oe=j.getNodeFor((n=ie.current.over)==null?void 0:n.id),ue=Xr({measure:y.dragOverlay.measure}),Ae=(r=ue.nodeRef.current)!=null?r:Y,Ne=O?(o=ue.rect)!=null?o:M:null,Cn=!!(ue.nodeRef.current&&ue.rect),Sn=Lr(Cn?null:M),Nt=sn(Ae?U(Ae):null),ve=zr(O?Oe??Y:null),dt=Yr(ve),ft=dn(h,{transform:{x:A.x-Sn.x,y:A.y-Sn.y,scaleX:1,scaleY:1},activatorEvent:$,active:K,activeNodeRect:M,containerNodeRect:We,draggingNodeRect:Ne,over:ie.current.over,overlayNodeRect:ue.rect,scrollableAncestors:ve,scrollableAncestorRects:dt,windowRect:Nt}),En=_?De(_,A):null,Dn=Br(ve),jo=on(Dn),Ro=on(Dn,[M]),Ie=De(ft,jo),ke=Ne?cr(Ne,ft):null,Ke=K&&ke?g({active:K,collisionRect:ke,droppableRects:I,droppableContainers:d,pointerCoordinates:En}):null,Tn=rr(Ke,"id"),[pe,On]=l.useState(null),Po=Cn?ft:De(ft,Ro),_o=ar(Po,(i=pe?.rect)!=null?i:null,M),It=l.useRef(null),An=l.useCallback((X,V)=>{let{sensor:H,options:be}=V;if(Q.current==null)return;const ee=T.get(Q.current);if(!ee)return;const J=X.nativeEvent,se=new H({active:Q.current,activeNode:ee,event:J,options:be,context:ie,onAbort(F){if(!T.get(F))return;const{onDragAbort:ae}=Z.current,de={id:F};ae?.(de),C({type:"onDragAbort",event:de})},onPending(F,me,ae,de){if(!T.get(F))return;const{onDragPending:Ve}=Z.current,ye={id:F,constraint:me,initialCoordinates:ae,offset:de};Ve?.(ye),C({type:"onDragPending",event:ye})},onStart(F){const me=Q.current;if(me==null)return;const ae=T.get(me);if(!ae)return;const{onDragStart:de}=Z.current,qe={activatorEvent:J,active:{id:me,data:ae.data,rect:L}};je.unstable_batchedUpdates(()=>{de?.(qe),S(ge.Initializing),x({type:z.DragStart,initialCoordinates:F,active:me}),C({type:"onDragStart",event:qe}),we(It.current),Ce(J)})},onMove(F){x({type:z.DragMove,coordinates:F})},onEnd:Me(z.DragEnd),onCancel:Me(z.DragCancel)});It.current=se;function Me(F){return async function(){const{active:ae,collisions:de,over:qe,scrollAdjustedTranslate:Ve}=ie.current;let ye=null;if(ae&&Ve){const{cancelDrop:He}=Z.current;ye={activatorEvent:J,active:ae,collisions:de,delta:Ve,over:qe},F===z.DragEnd&&typeof He=="function"&&await Promise.resolve(He(ye))&&(F=z.DragCancel)}Q.current=null,je.unstable_batchedUpdates(()=>{x({type:F}),S(ge.Uninitialized),On(null),we(null),Ce(null),It.current=null;const He=F===z.DragEnd?"onDragEnd":"onDragCancel";if(ye){const kt=Z.current[He];kt?.(ye),C({type:He,event:ye})}})}}},[T]),Lo=l.useCallback((X,V)=>(H,be)=>{const ee=H.nativeEvent,J=T.get(be);if(Q.current!==null||!J||ee.dndKit||ee.defaultPrevented)return;const se={active:J};X(H,V.options,se)===!0&&(ee.dndKit={capturedBy:V.sensor},Q.current=be,An(H,V))},[T,An]),Nn=Mr(f,Lo);Fr(f),ne(()=>{M&&D===ge.Initializing&&S(ge.Initialized)},[M,D]),l.useEffect(()=>{const{onDragMove:X}=Z.current,{active:V,activatorEvent:H,collisions:be,over:ee}=ie.current;if(!V||!H)return;const J={active:V,activatorEvent:H,collisions:be,delta:{x:Ie.x,y:Ie.y},over:ee};je.unstable_batchedUpdates(()=>{X?.(J),C({type:"onDragMove",event:J})})},[Ie.x,Ie.y]),l.useEffect(()=>{const{active:X,activatorEvent:V,collisions:H,droppableContainers:be,scrollAdjustedTranslate:ee}=ie.current;if(!X||Q.current==null||!V||!ee)return;const{onDragOver:J}=Z.current,se=be.get(Tn),Me=se&&se.rect.current?{id:se.id,rect:se.rect.current,data:se.data,disabled:se.disabled}:null,F={active:X,activatorEvent:V,collisions:H,delta:{x:ee.x,y:ee.y},over:Me};je.unstable_batchedUpdates(()=>{On(Me),J?.(F),C({type:"onDragOver",event:F})})},[Tn]),ne(()=>{ie.current={activatorEvent:$,active:K,activeNode:Y,collisionRect:ke,collisions:Ke,droppableRects:I,draggableNodes:T,draggingNode:Ae,draggingNodeRect:Ne,droppableContainers:j,over:pe,scrollableAncestors:ve,scrollAdjustedTranslate:Ie},L.current={initial:Ne,translated:ke}},[K,Y,Ke,ke,T,Ae,Ne,I,j,pe,ve,Ie]),Ar({...W,delta:A,draggingRect:ke,pointerCoordinates:En,scrollableAncestors:ve,scrollableAncestorRects:dt});const zo=l.useMemo(()=>({active:K,activeNode:Y,activeNodeRect:M,activatorEvent:$,collisions:Ke,containerNodeRect:We,dragOverlay:ue,draggableNodes:T,droppableContainers:j,droppableRects:I,over:pe,measureDroppableContainers:P,scrollableAncestors:ve,scrollableAncestorRects:dt,measuringConfiguration:y,measuringScheduled:oe,windowRect:Nt}),[K,Y,M,$,Ke,We,ue,T,j,I,pe,P,ve,dt,y,oe,Nt]),Bo=l.useMemo(()=>({activatorEvent:$,activators:Nn,active:K,activeNodeRect:M,ariaDescribedById:{draggable:he},dispatch:x,draggableNodes:T,over:pe,measureDroppableContainers:P}),[$,Nn,K,M,x,he,T,pe,P]);return l.createElement(zt.Provider,{value:w},l.createElement(Ue.Provider,{value:Bo},l.createElement(un.Provider,{value:zo},l.createElement(lt.Provider,{value:_o},u)),l.createElement(Hr,{disabled:a?.restoreFocus===!1})),l.createElement(Jn,{...a,hiddenTextDescribedById:he}));function Fo(){const X=ce?.autoScrollEnabled===!1,V=typeof c=="object"?c.enabled===!1:c===!1,H=O&&!X&&!V;return typeof c=="object"?{...c,enabled:H}:{enabled:H}}}),Zr=l.createContext(null),fn="button",eo="Draggable";function to(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=Be(eo),{activators:s,activatorEvent:a,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:g,over:p}=l.useContext(Ue),{role:h=fn,roleDescription:m="draggable",tabIndex:v=0}=o??{},b=c?.id===t,x=l.useContext(b?lt:Zr),[C,w]=Ze(),[D,S]=Ze(),O=$r(s,t),E=Le(n);ne(()=>(g.set(t,{id:t,key:i,node:C,activatorNode:D,data:E}),()=>{const A=g.get(t);A&&A.key===i&&g.delete(t)}),[g,t]);const T=l.useMemo(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":b&&h===fn?!0:void 0,"aria-roledescription":m,"aria-describedby":f.draggable}),[r,h,v,b,m,f.draggable]);return{active:c,activatorEvent:a,activeNodeRect:u,attributes:T,isDragging:b,listeners:r?void 0:O,node:C,over:p,setNodeRef:w,setActivatorNodeRef:S,transform:x}}function gn(){return l.useContext(un)}const no="Droppable",ro={timeout:25};function oo(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=Be(no),{active:s,dispatch:a,over:c,measureDroppableContainers:u}=l.useContext(Ue),f=l.useRef({disabled:n}),g=l.useRef(!1),p=l.useRef(null),h=l.useRef(null),{disabled:m,updateMeasurementsFor:v,timeout:b}={...ro,...o},x=Le(v??r),C=l.useCallback(()=>{if(!g.current){g.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),h.current=null},b)},[b]),w=st({callback:C,disabled:m||!s}),D=l.useCallback((T,A)=>{w&&(A&&(w.unobserve(A),g.current=!1),T&&w.observe(T))},[w]),[S,O]=Ze(D),E=Le(t);return l.useEffect(()=>{!w||!S.current||(w.disconnect(),g.current=!1,w.observe(S.current))},[S,w]),l.useEffect(()=>(a({type:z.RegisterDroppable,element:{id:r,key:i,disabled:n,node:S,rect:p,data:E}}),()=>a({type:z.UnregisterDroppable,key:i,id:r})),[r]),l.useEffect(()=>{n!==f.current.disabled&&(a({type:z.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,a]),{active:s,rect:p,isOver:c?.id===r,node:S,over:c,setNodeRef:O}}function io(e){let{animation:t,children:n}=e;const[r,o]=l.useState(null),[i,s]=l.useState(null),a=et(n);return!n&&!r&&a&&o(a),ne(()=>{if(!i)return;const c=r?.key,u=r?.props.id;if(c==null||u==null){o(null);return}Promise.resolve(t(u,i)).then(()=>{o(null)})},[t,r,i]),l.createElement(l.Fragment,null,n,r?l.cloneElement(r,{ref:s}):null)}const so={x:0,y:0,scaleX:1,scaleY:1};function ao(e){let{children:t}=e;return l.createElement(Ue.Provider,{value:cn},l.createElement(lt.Provider,{value:so},t))}const lo={position:"fixed",touchAction:"none"},co=e=>nt(e)?"transform 250ms ease":void 0,uo=l.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:s,rect:a,style:c,transform:u,transition:f=co}=e;if(!a)return null;const g=o?u:{...u,scaleX:1,scaleY:1},p={...lo,width:a.width,height:a.height,top:a.top,left:a.left,transform:fe.Transform.toString(g),transformOrigin:o&&r?er(r,a):void 0,transition:typeof f=="function"?f(r):f,...c};return l.createElement(n,{className:s,style:p,ref:t},i)}),fo={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:fe.Transform.toString(t)},{transform:fe.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,c]of Object.entries(i.active))c!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(i!=null&&i.dragOverlay)for(const[a,c]of Object.entries(i.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[c,u]of Object.entries(o))n.node.style.setProperty(c,u);s!=null&&s.active&&n.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function go(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Qe((i,s)=>{if(t===null)return;const a=n.get(i);if(!a)return;const c=a.node.current;if(!c)return;const u=ln(s);if(!u)return;const{transform:f}=U(s).getComputedStyle(s),g=$t(f);if(!g)return;const p=typeof t=="function"?t:ho(t);return Ht(c,o.draggable.measure),p({active:{id:i,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:g})})}function ho(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...fo,...e};return i=>{let{active:s,dragOverlay:a,transform:c,...u}=i;if(!t)return;const f={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},g={scaleX:c.scaleX!==1?s.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?s.rect.height*c.scaleY/a.rect.height:1},p={x:c.x-f.x,y:c.y-f.y,...g},h=o({...u,active:s,dragOverlay:a,transform:{initial:c,final:p}}),[m]=h,v=h[h.length-1];if(JSON.stringify(m)===JSON.stringify(v))return;const b=r?.({active:s,dragOverlay:a,...u}),x=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(C=>{x.onfinish=()=>{b?.(),C()}})}}let hn=0;function vo(e){return l.useMemo(()=>{if(e!=null)return hn++,hn},[e])}const po=l.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:g,activeNodeRect:p,containerNodeRect:h,draggableNodes:m,droppableContainers:v,dragOverlay:b,over:x,measuringConfiguration:C,scrollableAncestors:w,scrollableAncestorRects:D,windowRect:S}=gn(),O=l.useContext(lt),E=vo(g?.id),T=dn(s,{activatorEvent:f,active:g,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:b.rect,over:x,overlayNodeRect:b.rect,scrollableAncestors:w,scrollableAncestorRects:D,transform:O,windowRect:S}),A=Ot(p),j=go({config:r,draggableNodes:m,droppableContainers:v,measuringConfiguration:C}),N=A?b.setRef:void 0;return l.createElement(ao,null,l.createElement(io,{animation:j},g&&E?l.createElement(uo,{key:E,id:g.id,ref:N,as:a,activatorEvent:f,adjustScale:t,className:c,transition:i,rect:A,style:{zIndex:u,...o},transform:T},n):null))});function At(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function bo(e,t){return e.reduce((n,r,o)=>{const i=t.get(r);return i&&(n[o]=i),n},Array(e.length))}function ct(e){return e!==null&&e>=0}function mo(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yo(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const vn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=At(t,r,n),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},ut={scaleX:1,scaleY:1},xo=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:s}=e;const a=(t=i[n])!=null?t:r;if(!a)return null;if(o===n){const u=i[s];return u?{x:0,y:n<s?u.top+u.height-(a.top+a.height):u.top-a.top,...ut}:null}const c=wo(i,o,n);return o>n&&o<=s?{x:0,y:-a.height-c,...ut}:o<n&&o>=s?{x:0,y:a.height+c,...ut}:{x:0,y:0,...ut}};function wo(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const pn="Sortable",bn=l.createContext({activeIndex:-1,containerId:pn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:vn,disabled:{draggable:!1,droppable:!1}});function Co(e){let{children:t,id:n,items:r,strategy:o=vn,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:c,over:u,measureDroppableContainers:f}=gn(),g=Be(pn,n),p=a.rect!==null,h=l.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),m=s!=null,v=s?h.indexOf(s.id):-1,b=u?h.indexOf(u.id):-1,x=l.useRef(h),C=!mo(h,x.current),w=b!==-1&&v===-1||C,D=yo(i);ne(()=>{C&&m&&f(h)},[C,h,m,f]),l.useEffect(()=>{x.current=h},[h]);const S=l.useMemo(()=>({activeIndex:v,containerId:g,disabled:D,disableTransforms:w,items:h,overIndex:b,useDragOverlay:p,sortedRects:bo(h,c),strategy:o}),[v,g,D.draggable,D.droppable,w,h,b,c,p,o]);return l.createElement(bn.Provider,{value:S},t)}const So=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return At(n,r,o).indexOf(t)},Eo=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:c,transition:u}=e;return!u||!r||a!==i&&o===s?!1:n?!0:s!==o&&t===c},Do={duration:200,easing:"ease"},mn="transform",To=fe.Transition.toString({property:mn,duration:0,easing:"linear"}),Oo={roleDescription:"sortable"};function Ao(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,s]=l.useState(null),a=l.useRef(n);return ne(()=>{if(!t&&n!==a.current&&r.current){const c=o.current;if(c){const u=Te(r.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&s(f)}}n!==a.current&&(a.current=n)},[t,n,r,o]),l.useEffect(()=>{i&&s(null)},[i]),i}function yn(e){let{animateLayoutChanges:t=Eo,attributes:n,disabled:r,data:o,getNewIndex:i=So,id:s,strategy:a,resizeObserverConfig:c,transition:u=Do}=e;const{items:f,containerId:g,activeIndex:p,disabled:h,disableTransforms:m,sortedRects:v,overIndex:b,useDragOverlay:x,strategy:C}=l.useContext(bn),w=No(r,h),D=f.indexOf(s),S=l.useMemo(()=>({sortable:{containerId:g,index:D,items:f},...o}),[g,o,D,f]),O=l.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:E,node:T,isOver:A,setNodeRef:j}=oo({id:s,data:S,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...c}}),{active:N,activatorEvent:L,activeNodeRect:K,attributes:Q,setNodeRef:ce,listeners:we,isDragging:$,over:Ce,setActivatorNodeRef:Z,transform:he}=to({id:s,data:S,attributes:{...Oo,...n},disabled:w.draggable}),d=Ln(j,ce),y=!!N,I=y&&!m&&ct(p)&&ct(b),P=!x&&$,oe=P&&I?he:null,_=I?oe??(a??C)({rects:v,activeNodeRect:K,activeIndex:p,overIndex:b,index:D}):null,W=ct(p)&&ct(b)?i({id:s,items:f,activeIndex:p,overIndex:b}):D,q=N?.id,M=l.useRef({activeId:q,items:f,newIndex:W,containerId:g}),We=f!==M.current.items,ie=t({active:N,containerId:g,isDragging:$,isSorting:y,id:s,index:D,items:f,newIndex:M.current.newIndex,previousItems:M.current.items,previousContainerId:M.current.containerId,transition:u,wasDragging:M.current.activeId!=null}),Oe=Ao({disabled:!ie,index:D,node:T,rect:E});return l.useEffect(()=>{y&&M.current.newIndex!==W&&(M.current.newIndex=W),g!==M.current.containerId&&(M.current.containerId=g),f!==M.current.items&&(M.current.items=f)},[y,W,g,f]),l.useEffect(()=>{if(q===M.current.activeId)return;if(q!=null&&M.current.activeId==null){M.current.activeId=q;return}const Ae=setTimeout(()=>{M.current.activeId=q},50);return()=>clearTimeout(Ae)},[q]),{active:N,activeIndex:p,attributes:Q,data:S,rect:E,index:D,newIndex:W,items:f,isOver:A,isSorting:y,isDragging:$,listeners:we,node:T,overIndex:b,over:Ce,setNodeRef:d,setActivatorNodeRef:Z,setDroppableNodeRef:j,setDraggableNodeRef:ce,transform:Oe??_,transition:ue()};function ue(){if(Oe||We&&M.current.newIndex===D)return To;if(!(P&&!nt(L)||!u)&&(y||ie))return fe.Transition.toString({...u,property:mn})}}function No(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}k.Down,k.Right,k.Up,k.Left;const xn=(...e)=>e.filter(Boolean).join(" ");function wn({card:e}){const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:i,isDragging:s}=yn({id:e.id}),a={transform:fe.Transform.toString(o),transition:i,opacity:s?.5:void 0};return R.jsx("div",{ref:r,style:a,...t,...n,children:R.jsxs(le.Card,{className:"mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group",children:[R.jsxs(le.CardHeader,{className:"p-4",children:[R.jsx(le.CardTitle,{className:"text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors",children:e.title}),e.description&&R.jsx(le.CardDescription,{className:"text-xs text-muted-foreground font-mono",children:e.description})]}),e.badges&&e.badges.length>0&&R.jsx(le.CardContent,{className:"p-4 pt-0",children:R.jsx("div",{className:"flex flex-wrap gap-1",children:e.badges.map((c,u)=>R.jsx(le.Badge,{variant:c.variant||"default",className:"text-xs",children:c.label},u))})})]})})}function Io({column:e,cards:t}){const n=t||[],{setNodeRef:r}=yn({id:e.id,data:{type:"column"}}),o=e.limit&&n.length>=e.limit;return R.jsxs("div",{ref:r,className:xn("flex flex-col w-80 flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl",e.className),children:[R.jsx("div",{className:"p-4 border-b border-border/50 bg-muted/20",children:R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("h3",{className:"font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase",children:e.title}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[n.length,e.limit&&` / ${e.limit}`]}),o&&R.jsx(le.Badge,{variant:"destructive",className:"text-xs",children:"Full"})]})]})}),R.jsx(le.ScrollArea,{className:"flex-1 p-4",children:R.jsx(Co,{items:n.map(i=>i.id),strategy:xo,children:R.jsx("div",{className:"space-y-2",children:n.map(i=>R.jsx(wn,{card:i},i.id))})})})]})}function ko({columns:e,onCardMove:t,className:n}){const[r,o]=xe.useState(null),i=xe.useMemo(()=>(e||[]).map(m=>({...m,cards:m.cards||[]})),[e]),[s,a]=xe.useState(i);xe.useEffect(()=>{a(i)},[i]);const c=Qn(Gn(St,{activationConstraint:{distance:8}})),u=m=>{const{active:v}=m,b=g(v.id);o(b)},f=m=>{const{active:v,over:b}=m;if(o(null),!b)return;const x=v.id,C=b.id;if(x===C)return;const w=p(x),D=p(C)||h(C);if(!(!w||!D))if(w.id===D.id){const S=[...w.cards],O=S.findIndex(A=>A.id===x),E=S.findIndex(A=>A.id===C),T=At(S,O,E);a(A=>A.map(j=>j.id===w.id?{...j,cards:T}:j))}else{const S=[...w.cards],O=[...D.cards],E=S.findIndex(N=>N.id===x),A=C===D.id?O.length:O.findIndex(N=>N.id===C),[j]=S.splice(E,1);O.splice(A,0,j),a(N=>N.map(L=>L.id===w.id?{...L,cards:S}:L.id===D.id?{...L,cards:O}:L)),t&&t(x,w.id,D.id,A)}},g=xe.useCallback(m=>{for(const v of s){const b=v.cards.find(x=>x.id===m);if(b)return b}return null},[s]),p=xe.useCallback(m=>s.find(v=>v.cards.some(b=>b.id===m))||null,[s]),h=xe.useCallback(m=>s.find(v=>v.id===m)||null,[s]);return R.jsxs(Qr,{sensors:c,collisionDetection:or,onDragStart:u,onDragEnd:f,children:[R.jsx("div",{className:xn("flex gap-4 overflow-x-auto p-4",n),children:s.map(m=>R.jsx(Io,{column:m,cards:m.cards},m.id))}),R.jsx(po,{children:r?R.jsx(wn,{card:r}):null})]})}const Mo=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"}));te.KanbanRenderer=gt,te.kanbanComponents=_n,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})}));
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  export interface KanbanCard {
2
9
  id: string;
3
10
  title: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KanbanImpl.d.ts","sourceRoot":"","sources":["../../src/KanbanImpl.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAA;KAAE,CAAC,CAAA;IAChG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACjG,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAsGD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CA0IvF"}
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ export type { KanbanSchema, KanbanCard, KanbanColumn } from './types';
3
+ export interface KanbanRendererProps {
4
+ schema: {
5
+ type: string;
6
+ id?: string;
7
+ className?: string;
8
+ columns?: Array<any>;
9
+ data?: Array<any>;
10
+ groupBy?: string;
11
+ onCardMove?: (cardId: string, fromColumnId: string, toColumnId: string, newIndex: number) => void;
12
+ };
13
+ }
14
+ /**
15
+ * KanbanRenderer - The public API for the kanban board component
16
+ * This wrapper handles lazy loading internally using React.Suspense
17
+ */
18
+ export declare const KanbanRenderer: React.FC<KanbanRendererProps>;
19
+ export declare const kanbanComponents: {
20
+ kanban: React.FC<KanbanRendererProps>;
21
+ };
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMtE,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;KACnG,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsCxD,CAAC;AAoGF,eAAO,MAAM,gBAAgB;;CAE5B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { BaseSchema } from '../../types/src';
1
+ import { BaseSchema } from '@object-ui/types';
2
2
  /**
3
3
  * Kanban card interface.
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IACjG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,IAAI,EAAE,QAAQ,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAElG;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,8 +1,18 @@
1
1
  {
2
2
  "name": "@object-ui/plugin-kanban",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
+ "description": "Kanban board plugin for Object UI, powered by dnd-kit",
7
+ "homepage": "https://www.objectui.org",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/objectstack-ai/objectui.git",
11
+ "directory": "packages/plugin-kanban"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/objectstack-ai/objectui/issues"
15
+ },
6
16
  "main": "dist/index.umd.cjs",
7
17
  "module": "dist/index.js",
8
18
  "types": "dist/index.d.ts",
@@ -17,18 +27,18 @@
17
27
  "@dnd-kit/core": "^6.3.1",
18
28
  "@dnd-kit/sortable": "^10.0.0",
19
29
  "@dnd-kit/utilities": "^3.2.2",
20
- "@object-ui/components": "0.3.0",
21
- "@object-ui/core": "0.3.0",
22
- "@object-ui/react": "0.3.0",
23
- "@object-ui/types": "0.3.0"
30
+ "@object-ui/react": "0.3.1",
31
+ "@object-ui/types": "0.3.1",
32
+ "@object-ui/core": "0.3.1",
33
+ "@object-ui/components": "0.3.1"
24
34
  },
25
35
  "peerDependencies": {
26
36
  "react": "^18.0.0 || ^19.0.0",
27
37
  "react-dom": "^18.0.0 || ^19.0.0"
28
38
  },
29
39
  "devDependencies": {
30
- "@types/react": "^18.3.12",
31
- "@types/react-dom": "^18.3.1",
40
+ "@types/react": "^19.2.9",
41
+ "@types/react-dom": "^19.2.3",
32
42
  "@vitejs/plugin-react": "^4.2.1",
33
43
  "typescript": "^5.9.3",
34
44
  "vite": "^7.3.1",
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import * as React from "react"
2
10
  import {
3
11
  DndContext,
package/src/index.test.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import { describe, it, expect, beforeAll } from 'vitest';
2
10
  import { ComponentRegistry } from '@object-ui/core';
3
11
 
package/src/index.tsx CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import React, { Suspense } from 'react';
2
10
  import { ComponentRegistry } from '@object-ui/core';
3
11
  import { Skeleton } from '@object-ui/components';
package/src/types.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import type { BaseSchema } from '@object-ui/types';
2
10
 
3
11
  /**
package/tsconfig.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src",
4
+ "outDir": "dist",
5
+ "jsx": "react-jsx",
6
+ "baseUrl": ".",
7
+ "paths": {
8
+ "@/*": ["src/*"]
9
+ },
10
+ // Removed rootDir to prevent file not under rootDir errors when importing from workspace dependencies
11
+ "noEmit": false,
12
+ "declaration": true,
6
13
  "composite": true,
7
- "declarationMap": true
14
+ "declarationMap": true,
15
+ "skipLibCheck": true
8
16
  },
9
- "include": ["src/**/*"],
17
+ "include": ["src"],
10
18
  "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
11
19
  }
package/vite.config.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import { defineConfig } from 'vite';
2
10
  import react from '@vitejs/plugin-react';
3
11
  import dts from 'vite-plugin-dts';
@@ -9,6 +17,8 @@ export default defineConfig({
9
17
  dts({
10
18
  insertTypesEntry: true,
11
19
  include: ['src'],
20
+ exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
21
+ skipDiagnostics: true,
12
22
  }),
13
23
  ],
14
24
  resolve: {
@@ -1 +0,0 @@
1
- {"version":3,"file":"KanbanImpl.d.ts","sourceRoot":"","sources":["../src/KanbanImpl.tsx"],"names":[],"mappings":"AAuBA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAA;KAAE,CAAC,CAAA;IAChG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACjG,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAsGD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CA0IvF"}