import{d as e,i as t}from"./usePrimitiveElement-DC7UloPZ.js";import{$n as n,B as r,D as i,Ht as a,L as o,On as s,Tn as c,Zn as l,b as u,ct as d,et as f,ft as p,g as m,gn as h,k as g,mt as _,o as v,qt as y,tt as b,un as x,v as S,vn as ee,xt as C,y as w,z as T}from"./runtime-core.esm-bundler-B8D2lM98.js";import{C as te,w as E}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{b as ne,d as re,k as D,l as ie,p as ae,s as oe}from"./dist-DtGNiYlK.js";import{n as se,r as ce,t as le}from"./VisuallyHiddenInput-BMUp3blB.js";var ue=D({name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]}),de=D({name:`grip-vertical`,size:24,node:[[`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`}]]}),fe=D({name:`heading`,size:24,node:[[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}],[`path`,{d:`M18 20V4`,key:`o2hl4u`}]]}),pe=D({name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]}),[me,he]=e(`SwitchRoot`),ge=g({inheritAttrs:!1,__name:`SwitchRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:`on`},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:a}=c(n),o=ne(n,`modelValue`,r,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),l=m(()=>o.value===n.trueValue);function d(){a.value||(o.value=l.value?n.falseValue:n.trueValue)}let{forwardRef:p,currentElement:h}=ae(),g=ce(h),b=se(),x=m(()=>n.id&&h.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0);return he({checked:l,toggleCheck:d,disabled:a}),(e,t)=>(_(),u(v,null,[i(s(re),f({id:e.id,ref:s(p),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||x.value,"aria-checked":l.value,"aria-required":e.required,"data-state":l.value?`checked`:`unchecked`,"data-disabled":s(a)?``:void 0,"as-child":e.asChild,as:e.as,disabled:s(a)},{...s(b),...e.$attrs},{onClick:d,onKeydown:te(E(d,[`prevent`]),[`enter`])}),{default:y(()=>[C(e.$slots,`default`,{modelValue:s(o),checked:l.value})]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]),s(g)&&e.name?(_(),S(s(le),f({key:0,type:`checkbox`,name:e.name,disabled:s(a),required:e.required,value:e.value,checked:l.value},s(b)),null,16,[`name`,`disabled`,`required`,`value`,`checked`])):w(`v-if`,!0)],64))}}),_e=g({__name:`SwitchThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=me();return ae(),(e,n)=>(_(),S(s(re),{"data-state":s(t).checked.value?`checked`:`unchecked`,"data-disabled":s(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:y(()=>[C(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}}),ve=Object.defineProperty,ye=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Se=(e,t,n)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ce=(e,t)=>{for(var n in t||={})be.call(t,n)&&Se(e,n,t[n]);if(ye)for(var n of ye(t))xe.call(t,n)&&Se(e,n,t[n]);return e},we=(e,t)=>{var n={};for(var r in e)be.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ye)for(var r of ye(e))t.indexOf(r)<0&&xe.call(e,r)&&(n[r]=e[r]);return n},Te=`[vue-draggable-plus]: `;function Ee(e){console.warn(Te+e)}function De(e){console.error(Te+e)}function Oe(e,t,n){return n>=0&&nt?t.toUpperCase():``)}function Ae(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[ke(n)]=e[n]),t),{})}function je(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Me(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function Ne(e){return e===void 0}function Pe(e){return typeof e==`string`}function Fe(e,t,n){let r=e.children[n];e.insertBefore(t,r)}function Ie(e){e.parentNode&&e.parentNode.removeChild(e)}function Le(e,t=document){let n=null;return n=typeof t?.querySelector==`function`?(t?.querySelector)?.call(t,e):document.querySelector(e),n||Ee(`Element not found: ${e}`),n}function Re(e,t,n=null){return function(...r){return e.apply(n,r),t.apply(n,r)}}function ze(e,t){let n=Ce({},e);return Object.keys(t).forEach(r=>{n[r]?n[r]=Re(e[r],t[r]):n[r]=t[r]}),n}function Be(e){return e instanceof HTMLElement}function Ve(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function He(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}var Ue=Object.assign;function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Je(e,t){if(e==null)return{};var n=qe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Ye=`1.15.2`;function A(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}var j=A(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Xe=A(/Edge/i),Ze=A(/firefox/i),Qe=A(/safari/i)&&!A(/chrome/i)&&!A(/android/i),$e=A(/iP(ad|od|hone)/i),et=A(/chrome/i)&&A(/android/i),tt={capture:!1,passive:!1};function M(e,t,n){e.addEventListener(t,n,!j&&tt)}function N(e,t,n){e.removeEventListener(t,n,!j&&tt)}function nt(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function rt(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function P(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&nt(e,t):nt(e,t))||r&&e===n)return e;if(e===n)break}while(e=rt(e))}return null}var it=/\s+/g;function F(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(it,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(it,` `))}function I(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function at(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=I(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ot(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i=a,!o)return r;if(r===L())break;r=ft(r,!1)}return!1}function ct(e,t,n,r){for(var i=0,a=0,o=e.children;a2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=Je(n,Ot);Et.pluginEvent.bind(Q)(e,t,O({dragEl:U,parentEl:W,ghostEl:G,rootEl:K,nextEl:kt,lastDownEl:At,cloneEl:q,cloneHidden:jt,dragStarted:Wt,putSortable:Y,activeSortable:Q.active,originalEvent:r,oldIndex:Mt,oldDraggableIndex:Nt,newIndex:J,newDraggableIndex:Pt,hideGhostForTarget:ln,unhideGhostForTarget:un,cloneNowHidden:function(){jt=!0},cloneNowShown:function(){jt=!1},dispatchSortableEvent:function(e){H({sortable:t,name:e,originalEvent:r})}},i))};function H(e){Dt(O({putSortable:Y,cloneEl:q,targetEl:U,rootEl:K,oldIndex:Mt,oldDraggableIndex:Nt,newIndex:J,newDraggableIndex:Pt},e))}var U,W,G,K,kt,At,q,jt,Mt,J,Nt,Pt,Ft,Y,It=!1,Lt=!1,Rt=[],zt,X,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt=!1,Jt=!1,Yt,Z,Xt=[],Zt=!1,Qt=[],$t=typeof document<`u`,en=$e,tn=Xe||j?`cssFloat`:`float`,nn=$t&&!et&&!$e&&`draggable`in document.createElement(`div`),rn=function(){if($t){if(j)return!1;var e=document.createElement(`x`);return e.style.cssText=`pointer-events:auto`,e.style.pointerEvents===`auto`}}(),an=function(e,t){var n=I(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=ct(e,0,t),a=ct(e,1,t),o=i&&I(i),s=a&&I(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+R(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+R(a).width;if(n.display===`flex`)return n.flexDirection===`column`||n.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(n.display===`grid`)return n.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(i&&o.float&&o.float!==`none`){var u=o.float===`left`?`left`:`right`;return a&&(s.clear===`both`||s.clear===u)?`vertical`:`horizontal`}return i&&(o.display===`block`||o.display===`flex`||o.display===`table`||o.display===`grid`||c>=r&&n[tn]===`none`||a&&n[tn]===`none`&&c+l>r)?`vertical`:`horizontal`},on=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2},sn=function(e,t){var n;return Rt.some(function(r){var i=r[B].options.emptyInsertThreshold;if(i&&!lt(r)){var a=R(r),o=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(o&&s)return n=r}}),n},cn=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(e==null&&(n||s))return!0;if(e==null||e===!1)return!1;if(n&&e===`clone`)return e;if(typeof e==`function`)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return e===!0||typeof e==`string`&&e===c||e.join&&e.indexOf(c)>-1}}var n={},r=e.group;(!r||Ge(r)!=`object`)&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},ln=function(){!rn&&G&&I(G,`display`,`none`)},un=function(){!rn&&G&&I(G,`display`,``)};$t&&!et&&document.addEventListener(`click`,function(e){if(Lt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Lt=!1,!1},!0);var dn=function(e){if(U){e=e.touches?e.touches[0]:e;var t=sn(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[B]._onDragOver(n)}}},fn=function(e){U&&U.parentNode[B]._isOutsideThisEl(e.target)};function Q(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=k({},t),e[B]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?`>li`:`>*`,swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return an(e,this.options)},ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,ignore:`a, img`,filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData(`Text`,t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:`data-id`,delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:`sortable-fallback`,fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Q.supportPointer!==!1&&`PointerEvent`in window&&!Qe,emptyInsertThreshold:5};for(var r in Et.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in cn(t),this)i.charAt(0)===`_`&&typeof this[i]==`function`&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&nn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?M(e,`pointerdown`,this._onTapStart):(M(e,`mousedown`,this._onTapStart),M(e,`touchstart`,this._onTapStart)),this.nativeDraggable&&(M(e,`dragover`,this),M(e,`dragenter`,this)),Rt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),k(this,xt())}Q.prototype={constructor:Q,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Gt=null)},_getDirection:function(e,t){return typeof this.options.direction==`function`?this.options.direction.call(this,e,t,U):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType===`touch`&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(Sn(n),!U&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Qe&&s&&s.tagName.toUpperCase()===`SELECT`)&&(s=P(s,r.draggable,n,!1),!(s&&s.animated)&&At!==s)){if(Mt=z(s),Nt=z(s,r.draggable),typeof l==`function`){if(l.call(this,e,s,this)){H({sortable:t,rootEl:c,name:`filter`,targetEl:s,toEl:n,fromEl:n}),V(`filter`,t,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(l&&(l=l.split(`,`).some(function(r){if(r=P(c,r.trim(),n,!1),r)return H({sortable:t,rootEl:r,name:`filter`,targetEl:s,fromEl:n,toEl:n}),V(`filter`,t,{evt:e}),!0}),l)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!P(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,o=i.ownerDocument,s;if(n&&!U&&n.parentNode===i){var c=R(n);if(K=i,U=n,W=U.parentNode,kt=U.nextSibling,At=n,Ft=a.group,Q.dragged=U,zt={target:U,clientX:(t||e).clientX,clientY:(t||e).clientY},Ht=zt.clientX-c.left,Ut=zt.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,U.style[`will-change`]=`all`,s=function(){if(V(`delayEnded`,r,{evt:e}),Q.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Ze&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,t),H({sortable:r,name:`choose`,originalEvent:e}),F(U,a.chosenClass,!0)},a.ignore.split(`,`).forEach(function(e){ot(U,e.trim(),hn)}),M(o,`dragover`,dn),M(o,`mousemove`,dn),M(o,`touchmove`,dn),M(o,`mouseup`,r._onDrop),M(o,`touchend`,r._onDrop),M(o,`touchcancel`,r._onDrop),Ze&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),V(`delayStart`,this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Xe||j))){if(Q.eventCanceled){this._onDrop();return}M(o,`mouseup`,r._disableDelayedDrag),M(o,`touchend`,r._disableDelayedDrag),M(o,`touchcancel`,r._disableDelayedDrag),M(o,`mousemove`,r._delayedDragTouchMoveHandler),M(o,`touchmove`,r._delayedDragTouchMoveHandler),a.supportPointer&&M(o,`pointermove`,r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&hn(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;N(e,`mouseup`,this._disableDelayedDrag),N(e,`touchend`,this._disableDelayedDrag),N(e,`touchcancel`,this._disableDelayedDrag),N(e,`mousemove`,this._delayedDragTouchMoveHandler),N(e,`touchmove`,this._delayedDragTouchMoveHandler),N(e,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t||=e.pointerType==`touch`&&e,!this.nativeDraggable||t?this.options.supportPointer?M(document,`pointermove`,this._onTouchMove):t?M(document,`touchmove`,this._onTouchMove):M(document,`mousemove`,this._onTouchMove):(M(U,`dragend`,this),M(K,`dragstart`,this._onDragStart));try{document.selection?Cn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(It=!1,K&&U){V(`dragStarted`,this,{evt:t}),this.nativeDraggable&&M(document,`dragover`,fn);var n=this.options;!e&&F(U,n.dragClass,!1),F(U,n.ghostClass,!0),Q.active=this,e&&this._appendGhost(),H({sortable:this,name:`start`,originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(X){this._lastX=X.clientX,this._lastY=X.clientY,ln();for(var e=document.elementFromPoint(X.clientX,X.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(X.clientX,X.clientY),e!==t);)t=e;if(U.parentNode[B]._isOutsideThisEl(e),t)do{if(t[B]){var n=void 0;if(n=t[B]._onDragOver({clientX:X.clientX,clientY:X.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);un()}},_onTouchMove:function(e){if(zt){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=G&&at(G,!0),o=G&&a&&a.a,s=G&&a&&a.d,c=en&&Z&&ut(Z),l=(i.clientX-zt.clientX+r.x)/(o||1)+(c?c[0]-Xt[0]:0)/(o||1),u=(i.clientY-zt.clientY+r.y)/(s||1)+(c?c[1]-Xt[1]:0)/(s||1);if(!Q.active&&!It){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(H({sortable:this,name:`update`,toEl:W,originalEvent:e}),H({sortable:this,name:`sort`,toEl:W,originalEvent:e})):(J>=0&&(H({rootEl:W,name:`add`,toEl:W,fromEl:K,originalEvent:e}),H({sortable:this,name:`remove`,toEl:W,originalEvent:e}),H({rootEl:W,name:`sort`,toEl:W,fromEl:K,originalEvent:e}),H({sortable:this,name:`sort`,toEl:W,originalEvent:e})),Y&&Y.save()),Q.active&&((J==null||J===-1)&&(J=Mt,Pt=Nt),H({sortable:this,name:`end`,toEl:W,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){V(`nulling`,this),K=U=W=G=kt=q=At=jt=zt=X=Wt=J=Pt=Mt=Nt=Gt=Kt=Y=Ft=Q.dragged=Q.ghost=Q.clone=Q.active=null,Qt.forEach(function(e){e.checked=!0}),Qt.length=Bt=Vt=0},handleEvent:function(e){switch(e.type){case`drop`:case`dragend`:this._onDrop(e);break;case`dragenter`:case`dragover`:U&&(this._onDragOver(e),pn(e));break;case`selectstart`:e.preventDefault()}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;ri.right+a||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+a||e.clientX>r.right&&e.clientY>r.top}function yn(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!o){if(s&&Ytu+l*a/2:cd-Yt)return-Kt}else if(c>u+l*(1-i)/2&&cd-l*a/2)?c>u+l/2?1:-1:0}function bn(e){return z(U){if(e&&n?.length!==a.childNodes.length)return i.insertBefore(e,t.nextSibling),!0;let o=a.childNodes[r];e=a?.replaceChild(t,o)})}}catch(e){o=e}finally{n=null}b(()=>{if(Wn(),o)throw o})}let S={onUpdate:v,onStart:h,onAdd:g,onRemove:_,onEnd:y};function ee(e){let n=s(r);return e||=Pe(n)?Le(n,t?.$el):n,e&&!Be(e)&&(e=e.$el),e||De(`Root element not found`),e}function C(){let e=s(c)??{},{immediate:t,clone:n}=e,r=we(e,[`immediate`,`clone`]);return Ve(r,(e,t)=>{He(e)&&(r[e]=(e,...n)=>(Ue(e,Gn()),t(e,...n)))}),ze(i===null?{}:S,r)}let w=e=>{e=ee(e),l&&T.destroy(),l=new Q(e,C())};a(()=>c,()=>{l&&Ve(C(),(e,t)=>{l?.option(e,t)})},{deep:!0});let T={option:(e,t)=>l?.option(e,t),destroy:()=>{l?.destroy(),l=null},save:()=>l?.save(),toArray:()=>l?.toArray(),closest:(...e)=>l?.closest(...e)};return Vn(()=>{u&&w()}),Bn(T.destroy),Ce({start:w,pause:()=>T?.option(`disabled`,!0),resume:()=>T?.option(`disabled`,!1)},T)}var Jn=[`update`,`start`,`add`,`remove`,`choose`,`unchoose`,`end`,`sort`,`filter`,`clone`,`move`,`change`],Yn=[`clone`,`animation`,`ghostClass`,`group`,`sort`,`disabled`,`store`,`handle`,`draggable`,`swapThreshold`,`invertSwap`,`invertedSwapThreshold`,`removeCloneOnHide`,`direction`,`chosenClass`,`dragClass`,`ignore`,`filter`,`preventOnFilter`,`easing`,`setData`,`dropBubble`,`dragoverBubble`,`dataIdAttr`,`delay`,`delayOnTouchOnly`,`touchStartThreshold`,`forceFallback`,`fallbackClass`,`fallbackOnBody`,`fallbackTolerance`,`fallbackOffset`,`supportPointer`,`emptyInsertThreshold`,`scroll`,`forceAutoScrollFallback`,`scrollSensitivity`,`scrollSpeed`,`bubbleScroll`,`modelValue`,`tag`,`target`,`customUpdate`,...Jn.map(e=>`on${e.replace(/^\S/,e=>e.toUpperCase())}`)],Xn=g({name:`VueDraggable`,model:{prop:`modelValue`,event:`update:modelValue`},props:Yn,emits:[`update:modelValue`,...Jn],setup(e,{slots:t,emit:n,expose:i,attrs:a}){let o=Jn.reduce((e,t)=>{let r=`on${t.replace(/^\S/,e=>e.toUpperCase())}`;return e[r]=(...e)=>n(t,...e),e},{}),l=m(()=>{let t=c(e),{modelValue:n}=t,r=we(t,[`modelValue`]),i=Object.entries(r).reduce((e,[t,n])=>{let r=s(n);return r!==void 0&&(e[t]=r),e},{});return Ce(Ce({},o),Ae(Ce(Ce({},a),i)))}),u=m({get:()=>e.modelValue,set:e=>n(`update:modelValue`,e)}),d=ee(),f=h(qn(e.target||d,u,l));return i(f),()=>r(e.tag||`div`,{ref:d},(t?.default)?.call(t,f))}}),Zn={mounted:`mounted`,unmounted:`unmounted`};Zn.mounted,Zn.unmounted;var Qn=g({__name:`Switch`,props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:r}){let a=e,o=r,c=oe(a,`class`),u=t(c,o);return(e,t)=>(_(),S(s(ge),f({"data-slot":`switch`},s(u),{class:s(ie)(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50`,a.class)}),{default:y(t=>[i(s(_e),{"data-slot":`switch-thumb`,class:l(s(ie)(`bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0`))},{default:y(()=>[C(e.$slots,`thumb`,n(T(t)))]),_:2},1032,[`class`])]),_:3},16,[`class`]))}});export{de as a,fe as i,Xn as n,ue as o,pe as r,Qn as t};