1import{c as Pn,r as c,f as W,m as Pe,d as Bn,b as rn,u as $n,s as Le,j as h,B as ve}from"./index-68e6s_r-.js";import{I as ze}from"./input-DKcG5P5d.js";import{T as Fn}from"./textarea-L57hnew3.js";import{T as Un,a as Wn,b as xt,c as Qe,d as Xn,f as Yn,e as be}from"./table-CY7Ws09h.js";import{D as Hn,f as qn,a as Vn,d as Kn,b as _n,c as Gn}from"./dialog-DDqYPrW7.js";import{i as ht}from"./sectionsCacheService-C37kckt2.js";import{C as Jn,b as Qn,a as Zn}from"./collapsible-5BKNBYlz.js";import{P as Wt}from"./plus-C1231FNP.js";import{T as on}from"./trash-2-DUVxYH-B.js";import{C as er}from"./circle-BZMBJzpo.js";import{I as tr}from"./info-D9Whao46.js";import{S as nr}from"./square-pen-Bo3KOFwb.js";import"./index-haatzwCW.js";import"./index-DEh-IL0-.js";import"./index-CZ9VQlG3.js";import"./index-BiFM4dKk.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const rr=Pn("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function or(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const it=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Re(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Rt(e){return"nodeType"in e}function X(e){var t,n;return e?Re(e)?e:Rt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Et(e){const{Document:t}=X(e);return e instanceof t}function He(e){return Re(e)?!1:e instanceof X(e).HTMLElement}function sn(e){return e instanceof X(e).SVGElement}function Ee(e){return e?Re(e)?e.document:Rt(e)?Et(e)?e:He(e)||sn(e)?e.ownerDocument:document:document:document}const ne=it?c.useLayoutEffect:c.useEffect;function Nt(e){const t=c.useRef(e);return ne(()=>{t.current=e}),c.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 sr(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Ue(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ne(()=>{n.current!==e&&(n.current=e)},t),n}function qe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function nt(e){const t=Nt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function wt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let gt={};function Ve(e,t){return c.useMemo(()=>{if(t)return t;const n=gt[e]==null?0:gt[e]+1;return gt[e]=n,e+"-"+n},[e,t])}function an(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((s,i)=>{const a=Object.entries(i);for(const[l,u]of a){const d=s[l];d!=null&&(s[l]=d+e*u)}return s},{...t})}}const De=an(1),We=an(-1);function ir(e){return"clientX"in e&&"clientY"in e}function It(e){if(!e)return!1;const{KeyboardEvent:t}=X(e.target);return t&&e instanceof t}function ar(e){if(!e)return!1;const{TouchEvent:t}=X(e.target);return t&&e instanceof t}function yt(e){if(ar(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 ir(e)?{x:e.clientX,y:e.clientY}:null}const Xe=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[Xe.Translate.toString(e),Xe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Xt="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(Xt)?e:e.querySelector(Xt)}const lr={display:"none"};function ur(e){let{id:t,value:n}=e;return W.createElement("div",{id:t,style:lr},n)}function dr(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 W.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function fr(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const cn=c.createContext(null);function hr(e){const t=c.useContext(cn);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function gr(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>
vendor: 1,360 bytes, lines 6-10
6{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const pr={draggable:` 7 To pick up a draggable item, press the space bar. 8 While dragging, use the arrow keys to move the item. 9 Press space again to drop the item in its new position, or press escape to cancel. 10 `},vr={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 br(e){let{announcements:t=vr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=pr}=e;const{announce:s,announcement:i}=fr(),a=Ve("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),hr(c.useMemo(()=>({onDragStart(f){let{active:p}=f;s(t.onDragStart({active:p}))},onDragMove(f){let{active:p,over:g}=f;t.onDragMove&&s(t.onDragMove({active:p,over:g}))},onDragOver(f){let{active:p,over:g}=f;s(t.onDragOver({active:p,over:g}))},onDragEnd(f){let{active:p,over:g}=f;s(t.onDragEnd({active:p,over:g}))},onDragCancel(f){let{active:p,over:g}=f;
10s(t.onDragCancel({active:p,over:g}))}}),[s,t])),!l)return null;const d=W.createElement(W.Fragment,null,W.createElement(ur,{id:r,value:o.draggable}),W.createElement(dr,{id:a,announcement:i}));return n?Pe.createPortal(d,n):d}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 rt(){}function Yt(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function mr(){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 Q=Object.freeze({x:0,y:0});function ln(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function un(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function xr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ht(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 dn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function qt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const wr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=qt(t,t.left,t.top),s=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const u=ln(qt(l),o);s.push({id:a,data:{droppableContainer:i,value:u}})}}return s.sort(un)},yr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ht(t),s=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const u=Ht(l),d=o.reduce((p,g,R)=>p+ln(u[R],g),0),f=Number((d/4).toFixed(4));s.push({id:a,data:{droppableContainer:i,value:f}})}}return s.sort(un)};function Cr(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),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const l=t.width*t.height,u=e.width*e.height,d=i*a,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const Sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const l=Cr(a,t);l>0&&o.push({id:i,data:{droppableContainer:s,value:l}})}}return o.sort(xr)};function Dr(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function fn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Q}function Rr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const Er=Rr(1);function Nr(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 Ir(e,t,n){const r=Nr(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,l=e.left-i-(1-o)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=s?e.height/s:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const Ar={ignoreTransform:!1};function Ne(e,t){t===void 0&&(t=Ar);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=X(e).getComputedStyle(e);u&&(n=Ir(n,u,d))}const{top:r,left:o,width:s,height:i,bottom:a,right:l}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:l}}function Vt(e){return Ne(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 Tr(e,t){return t===void 0&&(t=X(e).getComputedStyle(e)),t.position==="fixed"}function Mr(e,t){t===void 0&&(t=X(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function at(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Et(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!He(o)||sn(o)||n.includes(o))return n;const s=X(e).getComputedStyle(o);return o!==e&&Mr(o,s)&&n.push(o),Tr(o,s)?n:r(o.parentNode)}return e?r(e):n}function hn(e){const[t]=at(e,1);return t??null}function pt(e){return!it||!e?null:Re(e)?e:Rt(e)?Et(e)||e===Ee(e).scrollingElement?window:He(e)?e:null:null}function gn(e){return Re(e)?e.scrollX:e.scrollLeft}function pn(e){return Re(e)?e.scrollY:e.scrollTop}function Ct(e){return{x:gn(e),y:pn(e)}}var P;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(P||(P={}));function vn(e){return!it||!e?!1:e===document.scrollingElement}function bn(e){const t={x:0,y:0},n=vn(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,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const Or={x:.2,y:.2};function kr(e,t,n,r,o){let{top:s,left:i,right:a,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=Or);
10const{isTop:u,isBottom:d,isLeft:f,isRight:p}=bn(e),g={x:0,y:0},R={x:0,y:0},b={height:t.height*o.y,width:t.width*o.x};return!u&&s<=t.top+b.height?(g.y=P.Backward,R.y=r*Math.abs((t.top+b.height-s)/b.height)):!d&&l>=t.bottom-b.height&&(g.y=P.Forward,R.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!p&&a>=t.right-b.width?(g.x=P.Forward,R.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&i<=t.left+b.width&&(g.x=P.Backward,R.x=r*Math.abs((t.left+b.width-i)/b.width)),{direction:g,speed:R}}function Lr(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}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 mn(e){return e.reduce((t,n)=>De(t,Ct(n)),Q)}function zr(e){return e.reduce((t,n)=>t+gn(n),0)}function Pr(e){return e.reduce((t,n)=>t+pn(n),0)}function Br(e,t){if(t===void 0&&(t=Ne),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);hn(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const $r=[["x",["left","right"],zr],["y",["top","bottom"],Pr]];class At{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=at(n),o=mn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of $r)for(const l of i)Object.defineProperty(this,l,{get:()=>{const u=a(r),d=o[s]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Be{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 Fr(e){const{EventTarget:t}=X(e);return e instanceof t?e:Ee(e)}function vt(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 J;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(J||(J={}));function Kt(e){e.preventDefault()}function Ur(e){e.stopPropagation()}var N;(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"})(N||(N={}));const xn={start:[N.Space,N.Enter],cancel:[N.Esc],end:[N.Space,N.Enter,N.Tab]},Wr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case N.Right:return{...n,x:n.x+25};case N.Left:return{...n,x:n.x-25};case N.Down:return{...n,y:n.y+25};case N.Up:return{...n,y:n.y-25}}};class jt{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 Be(Ee(n)),this.windowListeners=new Be(X(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(J.Resize,this.handleCancel),this.windowListeners.add(J.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(J.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Br(r),n(Q)}handleKeyDown(t){if(It(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=xn,coordinateGetter:i=Wr,scrollBehavior:a="smooth"}=o,{code:l}=t;if(s.end.includes(l)){this.handleEnd(t);return}if(s.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:Q;this.referenceCoordinates||(this.referenceCoordinates=d);const f=i(t,{active:n,context:r.current,currentCoordinates:d});if(f){const p=We(f,d),g={x:0,y:0},{scrollableAncestors:R}=r.current;for(const b of R){const x=t.code,{isTop:C,isRight:S,isLeft:w,isBottom:I,maxScroll:j,minScroll:A}
10=bn(b),D=Lr(b),E={x:Math.min(x===N.Right?D.right-D.width/2:D.right,Math.max(x===N.Right?D.left:D.left+D.width/2,f.x)),y:Math.min(x===N.Down?D.bottom-D.height/2:D.bottom,Math.max(x===N.Down?D.top:D.top+D.height/2,f.y))},k=x===N.Right&&!S||x===N.Left&&!w,L=x===N.Down&&!I||x===N.Up&&!C;if(k&&E.x!==f.x){const T=b.scrollLeft+p.x,v=x===N.Right&&T<=j.x||x===N.Left&&T>=A.x;if(v&&!p.y){b.scrollTo({left:T,behavior:a});return}v?g.x=b.scrollLeft-T:g.x=x===N.Right?b.scrollLeft-j.x:b.scrollLeft-A.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(L&&E.y!==f.y){const T=b.scrollTop+p.y,v=x===N.Down&&T<=j.y||x===N.Up&&T>=A.y;if(v&&!p.x){b.scrollTo({top:T,behavior:a});return}v?g.y=b.scrollTop-T:g.y=x===N.Down?b.scrollTop-j.y:b.scrollTop-A.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,De(We(f,this.referenceCoordinates),g))}}}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()}}jt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=xn,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function _t(e){return!!(e&&"distance"in e)}function Gt(e){return!!(e&&"delay"in e)}class Tt{constructor(t,n,r){var o;r===void 0&&(r=Fr(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:i}=s;this.props=t,this.events=n,this.document=Ee(i),this.documentListeners=new Be(this.document),this.listeners=new Be(r),this.windowListeners=new Be(X(i)),this.initialCoordinates=(o=yt(s))!=null?o:Q,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(J.Resize,this.handleCancel),this.windowListeners.add(J.DragStart,Kt),this.windowListeners.add(J.VisibilityChange,this.handleCancel),this.windowListeners.add(J.ContextMenu,Kt),this.documentListeners.add(J.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Gt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(_t(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(J.Click,Ur,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(J.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const l=(n=yt(t))!=null?n:Q,u=We(o,l);if(!r&&a){if(_t(a)){if(a.tolerance!=null&&vt(u,a.tolerance))return this.handleCancel();if(vt(u,a.distance))return this.handleStart()}if(Gt(a)&&vt(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),i(l)}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===N.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 Mt extends Tt{constructor(t){const{event:n}=t,r=Ee(n.target);super(t,Xr,r)}}Mt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const Yr={move:{name:"mousemove"},end:{name:"mouseup"}};var St;(function(e){e[e.RightClick=2]="RightClick"})(St||(St={}));class Hr extends Tt{constructor(t){super(t,Yr,Ee(t.event.target))}}Hr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===St.RightClick?!1:(r==null||r({event:n}),!0)}}];const bt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class qr extends Tt{constructor(t){super(t,bt)}static setup(){return window.addEventListener(bt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(bt.move.name,t)};function t(){}}}qr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var $e;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($e||($e={}));var ot;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
10sedTreeOrder"})(ot||(ot={}));function Vr(e){let{acceleration:t,activator:n=$e.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=ot.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e;const g=_r({delta:f,disabled:!s}),[R,b]=sr(),x=c.useRef({x:0,y:0}),C=c.useRef({x:0,y:0}),S=c.useMemo(()=>{switch(n){case $e.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case $e.DraggableRect:return o}},[n,o,l]),w=c.useRef(null),I=c.useCallback(()=>{const A=w.current;if(!A)return;const D=x.current.x*C.current.x,E=x.current.y*C.current.y;A.scrollBy(D,E)},[]),j=c.useMemo(()=>a===ot.TreeOrder?[...u].reverse():u,[a,u]);c.useEffect(()=>{if(!s||!u.length||!S){b();return}for(const A of j){if((r==null?void 0:r(A))===!1)continue;const D=u.indexOf(A),E=d[D];if(!E)continue;const{direction:k,speed:L}=kr(A,E,S,t,p);for(const T of["x","y"])g[T][k[T]]||(L[T]=0,k[T]=0);if(L.x>0||L.y>0){b(),w.current=A,R(I,i),x.current=L,C.current=k;return}}x.current={x:0,y:0},C.current={x:0,y:0},b()},[t,I,r,b,s,i,JSON.stringify(S),JSON.stringify(g),R,u,j,d,JSON.stringify(p)])}const Kr={x:{[P.Backward]:!1,[P.Forward]:!1},y:{[P.Backward]:!1,[P.Forward]:!1}};function _r(e){let{delta:t,disabled:n}=e;const r=wt(t);return qe(o=>{if(n||!r||!o)return Kr;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[P.Backward]:o.x[P.Backward]||s.x===-1,[P.Forward]:o.x[P.Forward]||s.x===1},y:{[P.Backward]:o.y[P.Backward]||s.y===-1,[P.Forward]:o.y[P.Forward]||s.y===1}}},[n,t,r])}function Gr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return qe(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function Jr(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var Ye;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ye||(Ye={}));var Dt;(function(e){e.Optimized="optimized"})(Dt||(Dt={}));const Jt=new Map;function Qr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=c.useState(null),{frequency:a,measure:l,strategy:u}=o,d=c.useRef(e),f=x(),p=Ue(f),g=c.useCallback(function(C){C===void 0&&(C=[]),!p.current&&i(S=>S===null?C:S.concat(C.filter(w=>!S.includes(w))))},[p]),R=c.useRef(null),b=qe(C=>{if(f&&!n)return Jt;if(!C||C===Jt||d.current!==e||s!=null){const S=new Map;for(let w of e){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){S.set(w.id,w.rect.current);continue}const I=w.node.current,j=I?new At(l(I),I):null;w.rect.current=j,j&&S.set(w.id,j)}return S}return C},[e,s,n,f,l]);return c.useEffect(()=>{d.current=e},[e]),c.useEffect(()=>{f||g()},[n,f]),c.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),c.useEffect(()=>{f||typeof a!="number"||R.current!==null||(R.current=setTimeout(()=>{g(),R.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:s!=null};function x(){switch(u){case Ye.Always:return!1;case Ye.BeforeDragging:return n;default:return!n}}}function wn(e,t){return qe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Zr(e,t){return wn(e,t)}function eo(e){let{callback:t,disabled:n}=e;const r=Nt(t),o=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(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function ct(e){let{callback:t,disabled:n}=e;const r=Nt(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return c.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function to(e){return new At(Ne(e),e)}function Qt(e,t,n){t===void 0&&(t=to);const[r,o]=c.useState(null);function s(){o(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const i=eo({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){s();break}}}}),a=ct({callback:s});return ne(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function no(e){const t=wn(e);return fn(e,t)}const Zt=[];function ro(e){const t=c.useRef(e),n=qe(r=>e?r&&r!==Zt&&e&&t.current&&e.parentNode===t.current.parentNode?r:at(e):Zt,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function oo(e){const[t,n]=c.useState(null),r=c.useRef(e),o=c.useCallback(s=>{const i=pt(s.target);i&&n(a=>a?(a.set(i,Ct(i)),new Map(a)):null)},[]);return c.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(l=>
10{const u=pt(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Ct(u)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(l=>{const u=pt(l);u==null||u.removeEventListener("scroll",o)})}},[o,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>De(s,i),Q):mn(e):Q,[e,t])}function en(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==Q;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?We(e,n.current):Q}function so(e){c.useEffect(()=>{if(!it)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==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function io(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function yn(e){return c.useMemo(()=>e?jr(e):null,[e])}const tn=[];function ao(e,t){t===void 0&&(t=Ne);const[n]=e,r=yn(n?X(n):null),[o,s]=c.useState(tn);function i(){s(()=>e.length?e.map(l=>vn(l)?r:new At(t(l),l)):tn)}const a=ct({callback:i});return ne(()=>{a==null||a.disconnect(),i(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function co(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return He(t)?t:e}function lo(e){let{measure:t}=e;const[n,r]=c.useState(null),o=c.useCallback(u=>{for(const{target:d}of u)if(He(d)){r(f=>{const p=t(d);return f?{...f,width:p.width,height:p.height}:p});break}},[t]),s=ct({callback:o}),i=c.useCallback(u=>{const d=co(u);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[a,l]=nt(i);return c.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const uo=[{sensor:Mt,options:{}},{sensor:jt,options:{}}],fo={current:{}},tt={draggable:{measure:Vt},droppable:{measure:Vt,strategy:Ye.WhileDragging,frequency:Dt.Optimized},dragOverlay:{measure:Ne}};class Fe 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 Fe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:rt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:tt,measureDroppableContainers:rt,windowRect:null,measuringScheduled:!1},go={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:rt,draggableNodes:new Map,over:null,measureDroppableContainers:rt},lt=c.createContext(go),Cn=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 Fe}}}function vo(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 Fe(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,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new Fe(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case z.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Fe(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function bo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c.useContext(lt),s=wt(r),i=wt(n==null?void 0:n.id);return c.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!It(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=cr(d);if(f){f.focus();break}}})}},[r,t,o,i,s]),null}function mo(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function xo(e){return c.useMemo(()=>({draggable:{...tt.draggable,...e==null?void 0:e.draggable},droppable:{...tt.droppable,...e==null?void 0:e.droppable},dragOverlay:{...tt.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function wo(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=c.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;ne(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=fn(d,r);if(i||(f.x=0),a||(f.y=0),s.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const p=hn(u);p&&p.scrollBy({top:f.y,left:f.x})}},[t,i,a,r,n])}const Sn=c.createContext({...Q,scaleX:1,scaleY:1}
10);var he;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(he||(he={}));const yo=c.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:l=!0,children:u,sensors:d=uo,collisionDetection:f=Sr,measuring:p,modifiers:g,...R}=t;const b=c.useReducer(vo,void 0,po),[x,C]=b,[S,w]=gr(),[I,j]=c.useState(he.Uninitialized),A=I===he.Initialized,{draggable:{active:D,nodes:E,translate:k},droppable:{containers:L}}=x,T=D!=null?E.get(D):null,v=c.useRef({initial:null,translated:null}),m=c.useMemo(()=>{var $;return D!=null?{id:D,data:($=T==null?void 0:T.data)!=null?$:fo,rect:v}:null},[D,T]),y=c.useRef(null),[O,K]=c.useState(null),[F,ge]=c.useState(null),Y=Ue(R,Object.values(R)),Ie=Ve("DndDescribedBy",i),Ke=c.useMemo(()=>L.getEnabled(),[L]),U=xo(p),{droppableRects:re,measureDroppableContainers:pe,measuringScheduled:Ae}=Qr(Ke,{dragging:A,dependencies:[k.x,k.y],config:U.droppable}),_=Gr(E,D),_e=c.useMemo(()=>F?yt(F):null,[F]),ae=zn(),oe=Zr(_,U.draggable.measure);wo({activeNode:D!=null?E.get(D):null,config:ae.layoutShiftCompensation,initialRect:oe,measure:U.draggable.measure});const M=Qt(_,U.draggable.measure,oe),je=Qt(_?_.parentElement:null),Z=c.useRef({activatorEvent:null,active:null,activeNode:_,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),me=L.getNodeFor((n=Z.current.over)==null?void 0:n.id),se=lo({measure:U.dragOverlay.measure}),xe=(r=se.nodeRef.current)!=null?r:_,we=A?(o=se.rect)!=null?o:M:null,kt=!!(se.nodeRef.current&&se.rect),Lt=no(kt?null:M),ut=yn(xe?X(xe):null),ce=ro(A?me??_:null),Ge=ao(ce),Je=mo(g,{transform:{x:k.x-Lt.x,y:k.y-Lt.y,scaleX:1,scaleY:1},activatorEvent:F,active:m,activeNodeRect:M,containerNodeRect:je,draggingNodeRect:we,over:Z.current.over,overlayNodeRect:se.rect,scrollableAncestors:ce,scrollableAncestorRects:Ge,windowRect:ut}),zt=_e?De(_e,k):null,Pt=oo(ce),An=en(Pt),jn=en(Pt,[M]),ye=De(Je,An),Ce=we?Er(we,Je):null,Te=m&&Ce?f({active:m,collisionRect:Ce,droppableRects:re,droppableContainers:Ke,pointerCoordinates:zt}):null,Bt=dn(Te,"id"),[le,$t]=c.useState(null),Tn=kt?Je:De(Je,jn),Mn=Dr(Tn,(s=le==null?void 0:le.rect)!=null?s:null,M),dt=c.useRef(null),Ft=c.useCallback(($,H)=>{let{sensor:q,options:ue}=H;if(y.current==null)return;const G=E.get(y.current);if(!G)return;const V=$.nativeEvent,ee=new q({active:y.current,activeNode:G,event:V,options:ue,context:Z,onAbort(B){if(!E.get(B))return;const{onDragAbort:te}=Y.current,ie={id:B};te==null||te(ie),S({type:"onDragAbort",event:ie})},onPending(B,de,te,ie){if(!E.get(B))return;const{onDragPending:Oe}=Y.current,fe={id:B,constraint:de,initialCoordinates:te,offset:ie};Oe==null||Oe(fe),S({type:"onDragPending",event:fe})},onStart(B){const de=y.current;if(de==null)return;const te=E.get(de);if(!te)return;const{onDragStart:ie}=Y.current,Me={activatorEvent:V,active:{id:de,data:te.data,rect:v}};Pe.unstable_batchedUpdates(()=>{ie==null||ie(Me),j(he.Initializing),C({type:z.DragStart,initialCoordinates:B,active:de}),S({type:"onDragStart",event:Me}),K(dt.current),ge(V)})},onMove(B){C({type:z.DragMove,coordinates:B})},onEnd:Se(z.DragEnd),onCancel:Se(z.DragCancel)});dt.current=ee;function Se(B){return async function(){const{active:te,collisions:ie,over:Me,scrollAdjustedTranslate:Oe}=Z.current;let fe=null;if(te&&Oe){const{cancelDrop:ke}=Y.current;fe={activatorEvent:V,active:te,collisions:ie,delta:Oe,over:Me},B===z.DragEnd&&typeof ke=="function"&&await Promise.resolve(ke(fe))&&(B=z.DragCancel)}y.current=null,Pe.unstable_batchedUpdates(()=>{C({type:B}),j(he.Uninitialized),$t(null),K(null),ge(null),dt.current=null;const ke=B===z.DragEnd?"onDragEnd":"onDragCancel";if(fe){const ft=Y.current[ke];ft==null||ft(fe),S({type:ke,event:fe})}})}}},[E]),On=c.useCallback(($,H)=>(q,ue)=>{const G=q.nativeEvent,V=E.get(ue);if(y.current!==null||!V||G.dndKit||G.defaultPrevented)return;const ee={active:V};$(q,H.options,ee)===!0&&(G.dndKit={capturedBy:H.sensor},y.current=ue,Ft(q,H))},[E,Ft]),Ut=Jr(d,On);so(d),ne(()=>{M&&I===he.Initializing&&j(he.Initialized)},[M,I]),c.useEffect(()=>{const{onDragMove:$}=Y.current,{active:H,activatorEvent:q,collisions:ue,over:G}=Z.current;if(!H||!q)return;const V={active:H,activatorEvent:q,collisions:ue,delta:{x:ye.x,y:ye.y},over:G};Pe.unstable_batchedUpdates(()=>{$==null||$(V),S({type:"onDragMove",event:V})})},[ye.x,ye.y]),c.useEffect(()=>{const{active:$,activatorEvent:H,collisions:q,droppableContainers:ue,scrollAdjustedTranslate:G}=Z.current;if(!$||y.current==null||!H||!G)return;const{onDragOver:V}=Y.current,ee=ue.get(Bt),Se=ee&&ee.rect.current?{id:ee.id,rect:ee.re
10ct.current,data:ee.data,disabled:ee.disabled}:null,B={active:$,activatorEvent:H,collisions:q,delta:{x:G.x,y:G.y},over:Se};Pe.unstable_batchedUpdates(()=>{$t(Se),V==null||V(B),S({type:"onDragOver",event:B})})},[Bt]),ne(()=>{Z.current={activatorEvent:F,active:m,activeNode:_,collisionRect:Ce,collisions:Te,droppableRects:re,draggableNodes:E,draggingNode:xe,draggingNodeRect:we,droppableContainers:L,over:le,scrollableAncestors:ce,scrollAdjustedTranslate:ye},v.current={initial:we,translated:Ce}},[m,_,Te,Ce,E,xe,we,re,L,le,ce,ye]),Vr({...ae,delta:k,draggingRect:Ce,pointerCoordinates:zt,scrollableAncestors:ce,scrollableAncestorRects:Ge});const kn=c.useMemo(()=>({active:m,activeNode:_,activeNodeRect:M,activatorEvent:F,collisions:Te,containerNodeRect:je,dragOverlay:se,draggableNodes:E,droppableContainers:L,droppableRects:re,over:le,measureDroppableContainers:pe,scrollableAncestors:ce,scrollableAncestorRects:Ge,measuringConfiguration:U,measuringScheduled:Ae,windowRect:ut}),[m,_,M,F,Te,je,se,E,L,re,le,pe,ce,Ge,U,Ae,ut]),Ln=c.useMemo(()=>({activatorEvent:F,activators:Ut,active:m,activeNodeRect:M,ariaDescribedById:{draggable:Ie},dispatch:C,draggableNodes:E,over:le,measureDroppableContainers:pe}),[F,Ut,m,M,C,Ie,E,le,pe]);return W.createElement(cn.Provider,{value:w},W.createElement(lt.Provider,{value:Ln},W.createElement(Cn.Provider,{value:kn},W.createElement(Sn.Provider,{value:Mn},u)),W.createElement(bo,{disabled:(a==null?void 0:a.restoreFocus)===!1})),W.createElement(br,{...a,hiddenTextDescribedById:Ie}));function zn(){const $=(O==null?void 0:O.autoScrollEnabled)===!1,H=typeof l=="object"?l.enabled===!1:l===!1,q=A&&!$&&!H;return typeof l=="object"?{...l,enabled:q}:{enabled:q}}}),Co=c.createContext(null),nn="button",So="Draggable";function Do(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Ve(So),{activators:i,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=c.useContext(lt),{role:g=nn,roleDescription:R="draggable",tabIndex:b=0}=o??{},x=(l==null?void 0:l.id)===t,C=c.useContext(x?Sn:Co),[S,w]=nt(),[I,j]=nt(),A=io(i,t),D=Ue(n);ne(()=>(f.set(t,{id:t,key:s,node:S,activatorNode:I,data:D}),()=>{const k=f.get(t);k&&k.key===s&&f.delete(t)}),[f,t]);const E=c.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":x&&g===nn?!0:void 0,"aria-roledescription":R,"aria-describedby":d.draggable}),[r,g,b,x,R,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:E,isDragging:x,listeners:r?void 0:A,node:S,over:p,setNodeRef:w,setActivatorNodeRef:j,transform:C}}function Ro(){return c.useContext(Cn)}const Eo="Droppable",No={timeout:25};function Io(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Ve(Eo),{active:i,dispatch:a,over:l,measureDroppableContainers:u}=c.useContext(lt),d=c.useRef({disabled:n}),f=c.useRef(!1),p=c.useRef(null),g=c.useRef(null),{disabled:R,updateMeasurementsFor:b,timeout:x}={...No,...o},C=Ue(b??r),S=c.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(C.current)?C.current:[C.current]),g.current=null},x)},[x]),w=ct({callback:S,disabled:R||!i}),I=c.useCallback((E,k)=>{w&&(k&&(w.unobserve(k),f.current=!1),E&&w.observe(E))},[w]),[j,A]=nt(I),D=Ue(t);return c.useEffect(()=>{!w||!j.current||(w.disconnect(),f.current=!1,w.observe(j.current))},[j,w]),c.useEffect(()=>(a({type:z.RegisterDroppable,element:{id:r,key:s,disabled:n,node:j,rect:p,data:D}}),()=>a({type:z.UnregisterDroppable,key:s,id:r})),[r]),c.useEffect(()=>{n!==d.current.disabled&&(a({type:z.SetDroppableDisabled,id:r,key:s,disabled:n}),d.current.disabled=n)},[r,s,n,a]),{active:i,rect:p,isOver:(l==null?void 0:l.id)===r,node:j,over:l,setNodeRef:A}}function Ot(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ao(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function Ze(e){return e!==null&&e>=0}function jo(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 To(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Dn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=Ot(t,r,n),i=t[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},et={scaleX:1,scaleY:1},Mo=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:i}=e;const a=(t=s[n])!=null?t:r;if(!a)return null;if(o===n){const u=s[i];return u?{x:0,y:n<i?u.top+u.height-(a.top+a.height):u.top-a.top,...et}:null}const l=Oo(s,o,n);return o>n&&o<=i?{x:0,y:-a.height-l,...et}:o<n&&o>=i?{x:0,y:a.height+l,...et}:{x:0,y:0,...et}};function Oo(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return r?n<t?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}
10const Rn="Sortable",En=W.createContext({activeIndex:-1,containerId:Rn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Dn,disabled:{draggable:!1,droppable:!1}});function ko(e){let{children:t,id:n,items:r,strategy:o=Dn,disabled:s=!1}=e;const{active:i,dragOverlay:a,droppableRects:l,over:u,measureDroppableContainers:d}=Ro(),f=Ve(Rn,n),p=a.rect!==null,g=c.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),R=i!=null,b=i?g.indexOf(i.id):-1,x=u?g.indexOf(u.id):-1,C=c.useRef(g),S=!jo(g,C.current),w=x!==-1&&b===-1||S,I=To(s);ne(()=>{S&&R&&d(g)},[S,g,R,d]),c.useEffect(()=>{C.current=g},[g]);const j=c.useMemo(()=>({activeIndex:b,containerId:f,disabled:I,disableTransforms:w,items:g,overIndex:x,useDragOverlay:p,sortedRects:Ao(g,l),strategy:o}),[b,f,I.draggable,I.droppable,w,g,x,l,p,o]);return W.createElement(En.Provider,{value:j},t)}const Lo=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Ot(n,r,o).indexOf(t)},zo=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:l,transition:u}=e;return!u||!r||a!==s&&o===i?!1:n?!0:i!==o&&t===l},Po={duration:200,easing:"ease"},Nn="transform",Bo=Xe.Transition.toString({property:Nn,duration:0,easing:"linear"}),$o={roleDescription:"sortable"};function Fo(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,i]=c.useState(null),a=c.useRef(n);return ne(()=>{if(!t&&n!==a.current&&r.current){const l=o.current;if(l){const u=Ne(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&i(d)}}n!==a.current&&(a.current=n)},[t,n,r,o]),c.useEffect(()=>{s&&i(null)},[s]),s}function Uo(e){let{animateLayoutChanges:t=zo,attributes:n,disabled:r,data:o,getNewIndex:s=Lo,id:i,strategy:a,resizeObserverConfig:l,transition:u=Po}=e;const{items:d,containerId:f,activeIndex:p,disabled:g,disableTransforms:R,sortedRects:b,overIndex:x,useDragOverlay:C,strategy:S}=c.useContext(En),w=Wo(r,g),I=d.indexOf(i),j=c.useMemo(()=>({sortable:{containerId:f,index:I,items:d},...o}),[f,o,I,d]),A=c.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:D,node:E,isOver:k,setNodeRef:L}=Io({id:i,data:j,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...l}}),{active:T,activatorEvent:v,activeNodeRect:m,attributes:y,setNodeRef:O,listeners:K,isDragging:F,over:ge,setActivatorNodeRef:Y,transform:Ie}=Do({id:i,data:j,attributes:{...$o,...n},disabled:w.draggable}),Ke=or(L,O),U=!!T,re=U&&!R&&Ze(p)&&Ze(x),pe=!C&&F,Ae=pe&&re?Ie:null,_e=re?Ae??(a??S)({rects:b,activeNodeRect:m,activeIndex:p,overIndex:x,index:I}):null,ae=Ze(p)&&Ze(x)?s({id:i,items:d,activeIndex:p,overIndex:x}):I,oe=T==null?void 0:T.id,M=c.useRef({activeId:oe,items:d,newIndex:ae,containerId:f}),je=d!==M.current.items,Z=t({active:T,containerId:f,isDragging:F,isSorting:U,id:i,index:I,items:d,newIndex:M.current.newIndex,previousItems:M.current.items,previousContainerId:M.current.containerId,transition:u,wasDragging:M.current.activeId!=null}),me=Fo({disabled:!Z,index:I,node:E,rect:D});return c.useEffect(()=>{U&&M.current.newIndex!==ae&&(M.current.newIndex=ae),f!==M.current.containerId&&(M.current.containerId=f),d!==M.current.items&&(M.current.items=d)},[U,ae,f,d]),c.useEffect(()=>{if(oe===M.current.activeId)return;if(oe&&!M.current.activeId){M.current.activeId=oe;return}const xe=setTimeout(()=>{M.current.activeId=oe},50);return()=>clearTimeout(xe)},[oe]),{active:T,activeIndex:p,attributes:y,data:j,rect:D,index:I,newIndex:ae,items:d,isOver:k,isSorting:U,isDragging:F,listeners:K,node:E,overIndex:x,over:ge,setNodeRef:Ke,setActivatorNodeRef:Y,setDroppableNodeRef:L,setDraggableNodeRef:O,transform:me??_e,transition:se()};function se(){if(me||je&&M.current.newIndex===I)return Bo;if(!(pe&&!It(v)||!u)&&(U||Z))return Xe.Transition.toString({...u,property:Nn})}}function Wo(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function st(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Xo=[N.Down,N.Right,N.Up,N.Left],Yo=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:i,scrollableAncestors:a}}=t;if(Xo.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];
10s.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const p=o.get(f.id);if(p)switch(e.code){case N.Down:r.top<p.top&&l.push(f);break;case N.Up:r.top>p.top&&l.push(f);break;case N.Left:r.left>p.left&&l.push(f);break;case N.Right:r.left<p.left&&l.push(f);break}});const u=yr({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let d=dn(u,"id");if(d===(i==null?void 0:i.id)&&u.length>1&&(d=u[1].id),d!=null){const f=s.get(n.id),p=s.get(d),g=p?o.get(p.id):null,R=p==null?void 0:p.node.current;if(R&&g&&f&&p){const x=at(R).some((A,D)=>a[D]!==A),C=In(f,p),S=Ho(f,p),w=x||!C?{x:0,y:0}:{x:S?r.width-g.width:0,y:S?r.height-g.height:0},I={x:g.left,y:g.top};return w.x&&w.y?I:We(I,w)}}}};function In(e,t){return!st(e)||!st(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Ho(e,t){return!st(e)||!st(t)||!In(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const mt=e=>e.toLowerCase().trim().replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s+/g,"-"),qo=({section:e,onEdit:t,onDelete:n})=>{const r=rn(),{attributes:o,listeners:s,setNodeRef:i,transform:a,transition:l}=Uo({id:e.id}),u={transform:Xe.Transform.toString(a),transition:l};return h.jsxs(xt,{ref:i,style:u,children:[h.jsx(be,{children:h.jsxs("div",{className:"flex items-center",children:[h.jsx("button",{className:"cursor-grab p-1 mr-2 text-muted-foreground hover:text-foreground",...o,...s,children:h.jsx(rr,{className:"h-4 w-4"})}),e.name]})}),h.jsxs(be,{children:[e.weight,"%"]}),h.jsx(be,{children:e.criteria&&e.criteria.length>0?h.jsx("ul",{className:"list-none space-y-1 pl-0",children:e.criteria.map((d,f)=>h.jsxs("li",{className:"flex items-start",children:[h.jsx(er,{className:"h-2 w-2 mr-2 mt-1.5 text-primary"}),h.jsxs("div",{className:"text-sm flex-grow",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"font-medium",children:d.name}),d.documentation&&d.documentation.trim()!==""&&h.jsx(tr,{className:"h-3 w-3 text-muted-foreground"})]}),d.rule!==d.name&&h.jsxs("span",{className:"text-muted-foreground italic text-xs",children:["Rule: ",d.rule]}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Slug: ",d.slug]})]})]},f))}):h.jsx("span",{className:"text-muted-foreground text-sm",children:"No criteria"})}),h.jsxs(be,{className:"text-right space-x-2",children:[h.jsx(ve,{size:"sm",variant:"outline",onClick:()=>r(`/admin/cro-sections/${e.id}/ai-assistant`),className:"my-[10px]",children:"AI Assistant"}),h.jsxs(ve,{size:"sm",variant:"outline",onClick:()=>t(e),className:"my-[10px]",children:[h.jsx(nr,{className:"h-4 w-4 mr-2"})," Edit"]}),h.jsxs(ve,{size:"sm",variant:"destructive",onClick:()=>n(e.id),children:[h.jsx(on,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})},ls=()=>{const[e,t]=c.useState([]),[n,r]=c.useState(!0),[o,s]=c.useState(null),[i,a]=c.useState({name:"",weight:0,criteria:[{name:"",rule:"",documentation:"",slug:""}]}),[l,u]=c.useState(!1),[d,f]=c.useState(!1),{isSuperAdmin:p,isAuthenticated:g}=Bn(),R=rn(),{toast:b}=$n(),x=mr(Yt(Mt),Yt(jt,{coordinateGetter:Yo}));c.useEffect(()=>{g&&!p&&R("/dashboard"),C()},[g,p,R]);const C=async()=>{try{r(!0);const{data:v,error:m}=await Le.from("cro_sections").select("*").order("sort_order");if(m)throw m;const y=v.map(O=>({...O,criteria:Array.isArray(O.criteria)?O.criteria.map(K=>({name:K.name||"",rule:K.rule||"",documentation:K.documentation||"",slug:K.slug||mt(K.name||"")})):[]}));t(y)}catch(v){console.error("Error fetching sections:",v),b({title:"Error",description:"Could not fetch CRO sections",variant:"destructive"})}finally{r(!1)}},S=()=>{const v={...i,criteria:[...i.criteria||[],{name:"",rule:"",documentation:"",slug:""}]};a(v)},w=v=>{const m={...i,criteria:(i.criteria||[]).filter((y,O)=>O!==v)};a(m)},I=async v=>{f(!0);try{for(let m=0;m<v.length;m++){const y=v[m],{error:O}=await Le.from("cro_sections").update({sort_order:m+1}).eq("id",y.id);if(O)throw O}ht(),b({title:"Order Updated",description:"Section order has been saved"})}catch(m){console.error("Error saving section order:",m),b({title:"Error",description:"Could not save section order",variant:"destructive"})}finally{f(!1)}},j=v=>{const{active:m,over:y}=v;y&&m.id!==y.id&&t(O=>{const K=O.findIndex(Y=>Y.id===m.id),F=O.findIndex(Y=>Y.id===y.id),ge=Ot(O,K,F);return I(ge),ge})},A=()=>e.reduce((v,m)=>v+m.weight,0),D=v=>v===100?"text-green-600 font-bold":"text-red-600 font-bold",E=async()=>{try{if(!i.name||!i.weight){b({title:"Validation Error",description:"Name and weight are required",variant:"destructive"});return}if(i.criteria)for(const y of i.criteria){if(!y.name.trim()){b({t
10itle:"Validation Error",description:"All criteria must have a name",variant:"destructive"});return}y.rule.trim()||(y.rule=y.name),y.slug.trim()||(y.slug=mt(y.name))}const v={name:i.name,weight:i.weight,criteria:i.criteria||[]};o||(v.sort_order=e.length+1);let m;if(o?m=await Le.from("cro_sections").update(v).eq("id",o.id):m=await Le.from("cro_sections").insert(v),m.error)throw m.error;a({name:"",weight:0,criteria:[{name:"",rule:"",documentation:"",slug:""}]}),s(null),u(!1),C(),ht(),b({title:"Success",description:o?"Section updated successfully":"Section created successfully"})}catch(v){console.error("Error saving section:",v),b({title:"Error",description:"Could not save CRO section",variant:"destructive"})}},k=async v=>{try{const{error:m}=await Le.from("cro_sections").delete().eq("id",v);if(m)throw m;C(),ht(),b({title:"Success",description:"Section deleted successfully"})}catch(m){console.error("Error deleting section:",m),b({title:"Error",description:"Could not delete CRO section",variant:"destructive"})}},L=v=>{s(v),a({name:v.name,weight:v.weight,criteria:[...v.criteria]}),u(!0)},T=(v,m,y)=>{if(!i.criteria)return;const O=[...i.criteria];O[v]={...O[v],[m]:y},m==="name"&&(O[v].slug=mt(y)),a({...i,criteria:O})};return!g||!p?h.jsx("div",{className:"container py-10",children:"Access Denied"}):h.jsx("div",{children:h.jsxs("div",{className:"container py-6",children:[h.jsx("h1",{className:"text-2xl font-bold mb-6",children:"CRO Section Management"}),h.jsxs(Hn,{open:l,onOpenChange:u,children:[h.jsx(qn,{asChild:!0,children:h.jsxs(ve,{variant:"outline",className:"mb-6",children:[h.jsx(Wt,{className:"mr-2 h-4 w-4"})," Add New Section"]})}),h.jsxs(Vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[h.jsxs(Kn,{children:[h.jsx(_n,{children:o?"Edit CRO Section":"Create New CRO Section"}),h.jsx(Gn,{children:"Define sections and criteria used for CRO analysis"})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsx(ze,{placeholder:"Section Name",value:i.name||"",onChange:v=>a(m=>({...m,name:v.target.value}))}),h.jsx(ze,{type:"number",placeholder:"Weight (0-100)",value:i.weight||0,onChange:v=>a(m=>({...m,weight:Number(v.target.value)}))}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-medium",children:"Criteria"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Each criterion has a name (displayed to users), an evaluation rule (used by AI), documentation (help text for users), and a slug (unique identifier)."}),(i.criteria||[]).map((v,m)=>h.jsx(Jn,{defaultOpen:m===0,children:h.jsxs("div",{className:"border rounded-md",children:[h.jsx(Qn,{asChild:!0,children:h.jsxs("div",{className:"flex items-center justify-between p-3 cursor-pointer hover:bg-muted/50",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"font-medium",children:v.name||`Criterion ${m+1}`}),v.documentation&&v.documentation.trim()!==""]}),h.jsx("div",{className:"flex items-center gap-2",children:h.jsx(ve,{variant:"destructive",size:"sm",onClick:y=>{y.stopPropagation(),w(m)},children:h.jsx(on,{className:"h-4 w-4"})})})]})}),h.jsx(Zn,{children:h.jsxs("div",{className:"p-3 pt-0 space-y-3",children:[h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-medium block mb-1",children:"Name (User-Facing)"}),h.jsx(ze,{placeholder:`Criterion ${m+1} Name`,value:v.name,onChange:y=>T(m,"name",y.target.value)})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-medium block mb-1",children:"Rule (AI Evaluation Logic)"}),h.jsx(ze,{placeholder:`Criterion ${m+1} Rule`,value:v.rule,onChange:y=>T(m,"rule",y.target.value)})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-medium block mb-1",children:"Slug (Unique Identifier)"}),h.jsx(ze,{placeholder:`criterion-${m+1}-slug`,value:v.slug,onChange:y=>T(m,"slug",y.target.value)})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-medium block mb-1",children:"Documentation (Help Text for Users)"}),h.jsx(Fn,{placeholder:"Explain why this criterion matters for CRO. You can include links using [text](url) format.",value:v.documentation,onChange:y=>T(m,"documentation",y.target.value),rows:3,className:"text-sm"}),h.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Use [text](url) format for links. This documentation will help users understand why changes are recommended."})]})]})})]})},m)),h.jsxs(ve,{variant:"outline",onClick:S,className:"w-full",children:[h.jsx(Wt,{className:"mr-2 h-4 w-4"})," Add Criterion"]})]}),h.jsx(ve,{onClick:E,className:"w-full",disabled:d,children:"Save Section"})]})]})]}),h.jsx("div",{className:"bg-white rounded-lg shadow-sm overflow-hidden",children:h.jsx(yo,{sensors:x,collisionDetection:wr,onDragEnd:j,children:h.jsxs(Un,{children:[h.jsx(Wn,{children:h.jsxs(xt,{children:[h.jsx(Qe,{children:"Name"}),h.jsx(Qe,{children:"Weight"}),h.jsx(Qe,{children:"Criteria"}),h.jsx(Qe,{className:"text-right",children:"Actions"})]})}),h.jsx(Xn,{children:h.jsx(ko,{items:e.map(v=>v.id),strategy:Mo,children:e.map(v=>h.jsx(qo,{section:v,onEdit:L,onDelete:k},v.id))})}),h.jsx(Yn,{children:h.jsxs(xt,{children:[h.jsx(be,{colSpan:1,className:"font-bold",children:"Total Weight"}),h.jsxs(be,{className:D(A()),children:[A(),"%"]}),h.jsx(be,{colSpan:2,className:"text-right",children:A()===100?h.jsx("span",{className:"text-green-600",children:"â Weights balance to 100%"}):h.jsx("span",{className:"text-red-600",children:"â ï¸ Weights should equal 100%"})})]})})]})})})]})})};export{ls as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.