/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as e,P as t,r as n,_ as o,o as i,l as r,w as a,c as l,F as s,y as u,H as c,aO as d,m as h,p,x as f,e as v,a as m,f as g,b3 as b,b as y,b4 as w,G as x,t as _,ao as S,z as E,b5 as D,aD as C,J as I,a2 as T,a3 as A,ab as k,ac as M,Y as O,S as N,av as P,aw as j}from"./index-b85d10da.js";/* empty css *//* empty css *//* empty css *//*! * vue-draggable-next v2.2.0 * (c) 2023 Anish George * @license MIT */ /**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT */function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function R(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var U=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$=V(/Edge/i),H=V(/firefox/i),z=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),W=V(/iP(ad|od|hone)/i),G=V(/chrome/i)&&V(/android/i),q={capture:!1,passive:!1};function Z(e,t,n){e.addEventListener(t,n,!U&&q)}function J(e,t,n){e.removeEventListener(t,n,!U&&q)}function K(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(n){return!1}return!1}}function Q(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ee(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&K(e,t):K(e,t))||o&&e===n)return e;if(e===n)break}while(e=Q(e))}return null}var te,ne=/\s+/g;function oe(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(ne," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(ne," ")}}function ie(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function re(e,t){var n="";if("string"==typeof e)n=e;else do{var o=ie(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ae(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i=r:i<=r))return o;if(o===le())break;o=fe(o,!1)}return!1}function ce(e,t,n,o){for(var i=0,r=0,a=e.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=B(n,Ee);Se.pluginEvent.bind(gt)(e,t,R({dragEl:Ie,parentEl:Te,ghostEl:Ae,rootEl:ke,nextEl:Me,lastDownEl:Oe,cloneEl:Ne,cloneHidden:Pe,dragStarted:We,putSortable:Le,activeSortable:gt.active,originalEvent:o,oldIndex:je,oldDraggableIndex:Re,newIndex:Xe,newDraggableIndex:Ye,hideGhostForTarget:pt,unhideGhostForTarget:ft,cloneNowHidden:function(){Pe=!0},cloneNowShown:function(){Pe=!1},dispatchSortableEvent:function(e){Ce({sortable:t,name:e,originalEvent:o})}},i))};function Ce(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[ye]){var v,m=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||U||$?(v=document.createEvent("Event")).initEvent(o,!0,!0):v=new CustomEvent(o,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=l||n,v.item=i||n,v.clone=r,v.oldIndex=s,v.newIndex=u,v.oldDraggableIndex=c,v.newDraggableIndex=d,v.originalEvent=h,v.pullMode=p?p.lastPutMode:void 0;var b=R(R({},f),Se.getEventProperties(o,t));for(var y in b)v[y]=b[y];n&&n.dispatchEvent(v),m[g]&&m[g].call(t,v)}}(R({putSortable:Le,cloneEl:Ne,targetEl:Ie,rootEl:ke,oldIndex:je,oldDraggableIndex:Re,newIndex:Xe,newDraggableIndex:Ye},e))}var Ie,Te,Ae,ke,Me,Oe,Ne,Pe,je,Xe,Re,Ye,Fe,Le,Be,Ve,Ue,$e,He,ze,We,Ge,qe,Ze,Je,Ke=!1,Qe=!1,et=[],tt=!1,nt=!1,ot=[],it=!1,rt=[],at="undefined"!=typeof document,lt=W,st=$||U?"cssFloat":"float",ut=at&&!G&&!W&&"draggable"in document.createElement("div"),ct=function(){if(at){if(U)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),dt=function(e,t){var n=ie(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=ce(e,0,t),r=ce(e,1,t),a=i&&ie(i),l=r&&ie(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+se(i).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+se(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[st]||r&&"none"===n[st]&&s+u>o)?"vertical":"horizontal"},ht=function(e){function t(e,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},pt=function(){!ct&&Ae&&ie(Ae,"display","none")},ft=function(){!ct&&Ae&&ie(Ae,"display","")};at&&document.addEventListener("click",(function(e){if(Qe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Qe=!1,!1}),!0);var vt=function(e){if(Ie){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,et.some((function(e){var t=e[ye].options.emptyInsertThreshold;if(t&&!de(e)){var n=se(e),o=i>=n.left-t&&i<=n.right+t,l=r>=n.top-t&&r<=n.bottom+t;return o&&l?a=e:void 0}})),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[ye]._onDragOver(n)}}var i,r,a},mt=function(e){Ie&&Ie.parentNode[ye]._isOutsideThisEl(e.target)};function gt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=L({},t),e[ye]=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 dt(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:!1!==gt.supportPointer&&"PointerEvent"in window&&!z,emptyInsertThreshold:5};for(var o in Se.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var i in ht(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Z(e,"pointerdown",this._onTapStart):(Z(e,"mousedown",this._onTapStart),Z(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Z(e,"dragover",this),Z(e,"dragenter",this)),et.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),L(this,we())}function bt(e,t,n,o,i,r,a,l){var s,u,c=e[ye],d=c.options.onMove;return!window.CustomEvent||U||$?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=i||t,s.relatedRect=r||se(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function yt(e){e.draggable=!1}function wt(){it=!1}function xt(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function _t(e){return setTimeout(e,0)}function St(e){return clearTimeout(e)}gt.prototype={constructor:gt,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ge=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ie):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,i=o.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=o.filter;if(function(e){rt.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var o=t[n];o.checked&&rt.push(o)}}(n),!Ie&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!z||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=ee(l,o.draggable,n,!1))&&l.animated||Oe===l)){if(je=he(l),Re=he(l,o.draggable),"function"==typeof u){if(u.call(this,e,l,this))return Ce({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),De("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=ee(s,o.trim(),n,!1))return Ce({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),De("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());o.handle&&!ee(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!Ie&&n.parentNode===r){var s=se(n);if(ke=r,Te=(Ie=n).parentNode,Me=Ie.nextSibling,Oe=n,Fe=a.group,gt.dragged=Ie,Be={target:Ie,clientX:(t||e).clientX,clientY:(t||e).clientY},He=Be.clientX-s.left,ze=Be.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ie.style["will-change"]="all",o=function(){De("delayEnded",i,{evt:e}),gt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!H&&i.nativeDraggable&&(Ie.draggable=!0),i._triggerDragStart(e,t),Ce({sortable:i,name:"choose",originalEvent:e}),oe(Ie,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){ae(Ie,e.trim(),yt)})),Z(l,"dragover",vt),Z(l,"mousemove",vt),Z(l,"touchmove",vt),Z(l,"mouseup",i._onDrop),Z(l,"touchend",i._onDrop),Z(l,"touchcancel",i._onDrop),H&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ie.draggable=!0),De("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&($||U))o();else{if(gt.eventCanceled)return void this._onDrop();Z(l,"mouseup",i._disableDelayedDrag),Z(l,"touchend",i._disableDelayedDrag),Z(l,"touchcancel",i._disableDelayedDrag),Z(l,"mousemove",i._delayedDragTouchMoveHandler),Z(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Z(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_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(){Ie&&yt(Ie),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;J(e,"mouseup",this._disableDelayedDrag),J(e,"touchend",this._disableDelayedDrag),J(e,"touchcancel",this._disableDelayedDrag),J(e,"mousemove",this._delayedDragTouchMoveHandler),J(e,"touchmove",this._delayedDragTouchMoveHandler),J(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Z(document,"pointermove",this._onTouchMove):Z(document,t?"touchmove":"mousemove",this._onTouchMove):(Z(Ie,"dragend",this),Z(ke,"dragstart",this._onDragStart));try{document.selection?_t((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(Ke=!1,ke&&Ie){De("dragStarted",this,{evt:t}),this.nativeDraggable&&Z(document,"dragover",mt);var n=this.options;!e&&oe(Ie,n.dragClass,!1),oe(Ie,n.ghostClass,!0),gt.active=this,e&&this._appendGhost(),Ce({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ve){this._lastX=Ve.clientX,this._lastY=Ve.clientY,pt();for(var e=document.elementFromPoint(Ve.clientX,Ve.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ve.clientX,Ve.clientY))!==t;)t=e;if(Ie.parentNode[ye]._isOutsideThisEl(e),t)do{if(t[ye]){if(t[ye]._onDragOver({clientX:Ve.clientX,clientY:Ve.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);ft()}},_onTouchMove:function(e){if(Be){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=Ae&&re(Ae,!0),a=Ae&&r&&r.a,l=Ae&&r&&r.d,s=lt&&Je&&pe(Je),u=(i.clientX-Be.clientX+o.x)/(a||1)+(s?s[0]-ot[0]:0)/(a||1),c=(i.clientY-Be.clientY+o.y)/(l||1)+(s?s[1]-ot[1]:0)/(l||1);if(!gt.active&&!Ke){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))o.right+i||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+i}(e,i,this)&&!v.animated){if(v===Ie)return M(!1);if(v&&r===e.target&&(a=v),a&&(n=se(a)),!1!==bt(ke,r,Ie,t,a,n,e,!!a))return k(),r.appendChild(Ie),Te=r,O(),M(!0)}else if(v&&function(e,t,n){var o=se(ce(n.el,0,n.options,!0)),i=10;return t?e.clientXc+u*r/2:sd-Ze)return-qe}else if(s>c+u*(1-i)/2&&sd-u*r/2))return s>c+u/2?1:-1;return 0}(e,a,n,i,x?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,nt,Ge===a),0!==g){var D=he(Ie);do{D-=g,y=Te.children[D]}while(y&&("none"===ie(y,"display")||y===Ae))}if(0===g||y===a)return M(!1);Ge=a,qe=g;var C=a.nextElementSibling,I=!1,T=bt(ke,r,Ie,t,a,n,e,I=1===g);if(!1!==T)return 1!==T&&-1!==T||(I=1===T),it=!0,setTimeout(wt,30),k(),I&&!C?r.appendChild(Ie):a.parentNode.insertBefore(Ie,I?C:a),S&&ge(S,0,E-S.scrollTop),Te=Ie.parentNode,void 0===b||nt||(Ze=Math.abs(b-se(a)[_])),O(),M(!0)}if(r.contains(Ie))return M(!1)}return!1}function A(l,s){De(l,p,R({evt:e,isOwner:c,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:d,fromSortable:h,target:a,completed:M,onMove:function(n,o){return bt(ke,r,Ie,t,n,se(n),e,o)},changed:O},s))}function k(){A("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function M(t){return A("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(p),p!==h&&(oe(Ie,Le?Le.options.ghostClass:u.options.ghostClass,!1),oe(Ie,l.ghostClass,!0)),Le!==p&&p!==gt.active?Le=p:p===gt.active&&Le&&(Le=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){A("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===Ie&&!Ie.animated||a===r&&!a.animated)&&(Ge=null),l.dragoverBubble||e.rootEl||a===document||(Ie.parentNode[ye]._isOutsideThisEl(e.target),!t&&vt(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function O(){Xe=he(Ie),Ye=he(Ie,l.draggable),Ce({sortable:p,name:"change",toEl:r,newIndex:Xe,newDraggableIndex:Ye,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){J(document,"mousemove",this._onTouchMove),J(document,"touchmove",this._onTouchMove),J(document,"pointermove",this._onTouchMove),J(document,"dragover",vt),J(document,"mousemove",vt),J(document,"touchmove",vt)},_offUpEvents:function(){var e=this.el.ownerDocument;J(e,"mouseup",this._onDrop),J(e,"touchend",this._onDrop),J(e,"pointerup",this._onDrop),J(e,"touchcancel",this._onDrop),J(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Xe=he(Ie),Ye=he(Ie,n.draggable),De("drop",this,{evt:e}),Te=Ie&&Ie.parentNode,Xe=he(Ie),Ye=he(Ie,n.draggable),gt.eventCanceled||(Ke=!1,nt=!1,tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),St(this.cloneId),St(this._dragStartId),this.nativeDraggable&&(J(document,"drop",this),J(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),z&&ie(document.body,"user-select",""),ie(Ie,"transform",""),e&&(We&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Ae&&Ae.parentNode&&Ae.parentNode.removeChild(Ae),(ke===Te||Le&&"clone"!==Le.lastPutMode)&&Ne&&Ne.parentNode&&Ne.parentNode.removeChild(Ne),Ie&&(this.nativeDraggable&&J(Ie,"dragend",this),yt(Ie),Ie.style["will-change"]="",We&&!Ke&&oe(Ie,Le?Le.options.ghostClass:this.options.ghostClass,!1),oe(Ie,this.options.chosenClass,!1),Ce({sortable:this,name:"unchoose",toEl:Te,newIndex:null,newDraggableIndex:null,originalEvent:e}),ke!==Te?(Xe>=0&&(Ce({rootEl:Te,name:"add",toEl:Te,fromEl:ke,originalEvent:e}),Ce({sortable:this,name:"remove",toEl:Te,originalEvent:e}),Ce({rootEl:Te,name:"sort",toEl:Te,fromEl:ke,originalEvent:e}),Ce({sortable:this,name:"sort",toEl:Te,originalEvent:e})),Le&&Le.save()):Xe!==je&&Xe>=0&&(Ce({sortable:this,name:"update",toEl:Te,originalEvent:e}),Ce({sortable:this,name:"sort",toEl:Te,originalEvent:e})),gt.active&&(null!=Xe&&-1!==Xe||(Xe=je,Ye=Re),Ce({sortable:this,name:"end",toEl:Te,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){De("nulling",this),ke=Ie=Te=Ae=Me=Ne=Oe=Pe=Be=Ve=We=Xe=Ye=je=Re=Ge=qe=Le=Fe=gt.dragged=gt.ghost=gt.clone=gt.active=null,rt.forEach((function(e){e.checked=!0})),rt.length=Ue=$e=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ie&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,i=n.length,r=this.options;oe.replace(Ft,((e,t)=>t?t.toUpperCase():""))));function Bt(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function Vt(e,t,n){const o=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}function Ut(e,t){this.$nextTick((()=>this.$emit(e.toLowerCase(),t)))}function $t(e){return t=>{null!==this.realList&&this["onDrag"+e](t),Ut.call(this,e,t)}}const Ht=["Start","Add","Remove","Update","End"],zt=["Choose","Unchoose","Sort","Filter","Clone"],Wt=["Move",...Ht,...zt].map((e=>"on"+e));let Gt=null;const qt={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},Zt=e({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Ht.map((e=>e.toLowerCase())),...zt.map((e=>e.toLowerCase()))],props:qt,data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}),render(){const e=this.$slots.default?this.$slots.default():null,n=(o=this.$attrs,(i=this.componentData)?{...i.props,...i.attrs}:o);var o,i;return e?(this.transitionMode=function(e){if(!e||1!==e.length)return!1;const[{type:t}]=e;return!!t&&(n=t.name,["transition-group","TransitionGroup"].includes(n));var n}(e),t(this.getTag(),n,e)):t(this.getTag(),n,[])},created(){null!==this.list&&null!==this.modelValue&&Yt.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};Ht.forEach((t=>{e["on"+t]=$t.call(this,t)})),zt.forEach((t=>{e["on"+t]=Ut.bind(this,t)}));const t=Object.keys(this.$attrs).reduce(((e,t)=>(e[Lt(t)]=this.$attrs[t],e)),{}),n=Object.assign({},t,e,{onMove:(e,t)=>this.onDragMove(e,t)});!("draggable"in n)&&(n.draggable=">*");const o=1===this.$el.nodeType?this.$el:this.$el.parentElement;this._sortable=new gt(o,n),o.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{void 0!==this._sortable&&this._sortable.destroy()}catch(e){}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?n(this.component):this.tag},updateOptions(e){for(var t in e){const n=Lt(t);-1===Wt.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(e,t,n,o){if(!e)return[];const i=Object.values(e),r=t.length-o;return[...t].map(((e,t)=>t>=r?i.length:i.indexOf(e)))}(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(e){const t=function(e,t){return Object.values(e).indexOf(t)}(this.getChildrenNodes()||[],e);if(-1===t)return null;return{index:t,element:this.realList[t]}},emitChanges(e){this.$nextTick((()=>{this.$emit("change",e)}))},alterList(e){if(this.list)return void e(this.list);const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){this.alterList((e=>e.splice(...arguments)))},updatePosition(e,t){this.alterList((n=>n.splice(t,0,n.splice(e,1)[0])))},getVmIndex(e){const t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[e].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(e){this.computeIndexes(),this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),Gt=e.item)},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;Bt(e.item);const n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();const o={element:t,newIndex:n};this.emitChanges({added:o})},onDragRemove(e){if(Vt(this.$el,e.item,e.oldIndex),"clone"===e.pullMode)return void Bt(e.clone);if(!this.context)return;const t=this.context.index;this.spliceList(t,1);const n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})},onDragUpdate(e){Bt(e.item),Vt(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);const o={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:o})},updateProperty(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},onDragMove(e,t){const n=this.move;if(!n||!this.realList)return!0;const o=this.getRelatedContextFromMoveEvent(e),i=this.context,r=this.computeFutureIndex(o,e);Object.assign(i,{futureIndex:r});return n(Object.assign({},e,{relatedContext:o,draggedContext:i}),t)},onDragEnd(){this.computeIndexes(),Gt=null},getTrargetedComponent:e=>e.__draggable_component__,getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getTrargetedComponent(e);if(!n)return{component:n};const o=n.realList,i={list:o,component:n};if(e!==t&&o&&n.getUnderlyingVm){const e=n.getUnderlyingVm(t);if(e)return Object.assign(e,i)}return i},computeFutureIndex(e,t){const n=[...t.to.children].filter((e=>"none"!==e.style.display));if(0===n.length)return 0;const o=n.indexOf(t.related),i=e.component.getVmIndex(o);return-1!==n.indexOf(Gt)||!t.willInsertAfter?i:i+1}}});const Jt=o(e({components:{draggable:Zt},props:{headerText:{type:String,default:"header"},list:{type:Array,default:()=>[]},classString:{type:String,default:"board-column-content"},disabled:{type:Boolean,default:!1},options:{type:Object,default:()=>null}},setup:(e,{emit:t})=>({onEnd:e=>{t("end",e)}})}),[["render",function(e,t,o,h,p,f){const v=n("draggable");return i(),r(v,d({list:e.list},e.$attrs,{class:e.classString,disabled:e.disabled,onEnd:e.onEnd}),{default:a((()=>[(i(!0),l(s,null,u(e.list,((t,n)=>c(e.$slots,"default",{key:t.id,item:t,index:n},void 0,!0))),128))])),_:3},16,["list","class","disabled","onEnd"])}],["__scopeId","data-v-1b54743e"]]),Kt=e=>(P("data-v-14d84d1b"),e=e(),j(),e),Qt={class:"custom-menu"},en={class:"menu-container"},tn={class:"device-wrap"},nn={class:"device device-iphone-x"},on={class:"device-frame"},rn={class:"device-content"},an={class:"wechat-header"},ln={class:"header-inner"},sn={class:"wechat-menu"},un=["onClick"],cn={key:0,class:"children-menu-items"},dn=["onClick"],hn=D('
',5),pn={class:"edit-wrap"},fn={key:0},vn={class:"edit-content-wrap"},mn={class:"edit-title"},gn={key:0,class:"notice-text"},bn={class:"edit-form"},yn={key:0},wn={key:1},xn=Kt((()=>v("span",{style:{color:"#fd555d","padding-left":"10px"}},"受微信限制,如您发现微信显示有问题,请减少内容",-1))),_n={key:0},Sn={key:1},En=[Kt((()=>v("p",{class:"no-init"},"点击左侧菜单进行编辑操作",-1)))],Dn={class:"menu-save"},Cn=o(e({__name:"index",setup(e){const t=h(3),n=h({curActiveIndex:null,curSubActiveIndex:null,clickSubMenu:!1,init:!1,buttons:[]}),o=e=>e.showChildMenu,s=p((()=>{var e,t,o,i,r,a,l,s,u,c;return(null==(r=null==(i=null==(t=n.value)?void 0:t.buttons[null==(e=n.value)?void 0:e.curActiveIndex])?void 0:i.sub_button[null==(o=n.value)?void 0:o.curSubActiveIndex])?void 0:r.name)||(null==(c=null==(u=null==(l=n.value)?void 0:l.buttons[null==(a=n.value)?void 0:a.curActiveIndex])?void 0:u.sub_button[null==(s=n.value)?void 0:s.curSubActiveIndex])?void 0:c.type)})),u=h(!0),c=e=>{n.value.init=!0,n.value.clickSubMenu=!1,n.value.curSubActiveIndex=null,n.value.curActiveIndex=e.newDraggableIndex,n.value.buttons.forEach((e=>e.showChildMenu=!1)),n.value.buttons[e.newDraggableIndex].showChildMenu=!0},d=e=>{n.value.curSubActiveIndex=e.newDraggableIndex},D=()=>{n.value.init=!0,n.value.clickSubMenu=!0;let e=n.value.curActiveIndex;n.value.buttons[e].sub_button.push({name:"子菜单名称",url:"",url2:"",key:"",type:"link",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:""}),n.value.curSubActiveIndex=n.value.buttons[e].sub_button.length-1,n.value.buttons[e].hasChild=!0},P=()=>{n.value.curActiveIndex=null,n.value.curSubActiveIndex=null,n.value.init=!1};return f((()=>{n.value={curActiveIndex:0,curSubActiveIndex:null,clickSubMenu:!1,init:!0,buttons:[{name:"签到",hasChild:!1,showChildMenu:!0,type:"link",url:"",url2:"",key:"daily_sign",sub_button:[],keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template"},{name:"最近阅读",hasChild:!1,showChildMenu:!1,type:"event",url:"",url2:"",key:"recent_read",sub_button:[],keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template"},{name:"菜单名称3",hasChild:!0,showChildMenu:!1,type:"link",url:"",url2:"",key:"",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:"",sub_button:[{key:"",type:"link",name:"子菜单名称",url:"http://sitexyvz5mexll52mzn4.pre.aizhuishu.com/recent",url2:"",keyword:"",linkcontent:"",sendMsgType:"template",imgUrl:""}]}]}})),(e,h)=>{var p,f,j,X,R,Y,F;const L=I,B=Jt,V=T,U=A,$=k,H=M,z=O,W=N;return i(),l("div",Qt,[v("div",en,[v("div",tn,[v("div",nn,[v("div",on,[v("div",rn,[v("div",an,[v("div",ln,[m(L,{class:"ml-3"},{default:a((()=>[m(g(b))])),_:1}),y(" 公众号 "),m(L,{class:"mr-3"},{default:a((()=>[m(g(w))])),_:1})])]),v("div",sn,[m(B,{list:g(n).buttons,classString:"flex-warpper",onEnd:c},{default:a((({item:e,index:r})=>{var s;return[(i(),l("div",{class:"wechat-menu-item",key:r},[v("p",{class:x(["menu-name",{"cur-menu":r===g(n).curActiveIndex}]),onClick:e=>(e=>{n.value.init=!0,n.value.clickSubMenu=!1,n.value.curSubActiveIndex=null;let o=n.value.buttons;if(e===n.value.curActiveIndex)return;if(null!==n.value.curActiveIndex&&n.value.buttons[n.value.curActiveIndex]&&(n.value.buttons[n.value.curActiveIndex].showChildMenu=!1),n.value.curActiveIndex=e,o[e])return void(n.value.buttons[n.value.curActiveIndex]&&(n.value.buttons[n.value.curActiveIndex].showChildMenu=!0));if(o.length>=t.value)return;n.value.buttons.push({name:"菜单名称",hasChild:!1,showChildMenu:!0,type:"link",url:"",url2:"",key:"",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:"",sub_button:[]})})(r)},_(e.name),11,un),o(e)?(i(),l("div",cn,[m(B,{list:e.sub_button,onEnd:d},{default:a((({item:e,index:t})=>[(i(),l("div",{class:"children-menu-item",key:t,onClick:e=>{var o;(o=t)!==n.value.curSubActiveIndex&&(n.value.init=!0,n.value.clickSubMenu=!0,n.value.curSubActiveIndex=o)}},[v("p",{class:x(["menu-name",{"cur-name":g(n).curSubActiveIndex===t}])},_(e.name),3)],8,dn))])),_:2},1032,["list"]),(null==(s=null==e?void 0:e.sub_button)?void 0:s.length)<5?(i(),l("div",{key:0,class:"children-menu-item",onClick:D},[m(L,null,{default:a((()=>[m(g(S))])),_:1})])):E("",!0)])):E("",!0)]))]})),_:1},8,["list"])])])]),hn])]),v("div",pn,[g(n).init?(i(),l("div",fn,[v("div",vn,[v("p",mn,[y(_(g(n).clickSubMenu?null==(j=null==(f=null==(p=g(n))?void 0:p.buttons[g(n).curActiveIndex])?void 0:f.sub_button[g(n).curSubActiveIndex])?void 0:j.name:null==(R=null==(X=g(n))?void 0:X.buttons[g(n).curActiveIndex])?void 0:R.name)+" ",1),v("span",{class:"del-menu",onClick:h[0]||(h[0]=e=>(e=>{let t=n.value.curActiveIndex,o=n.value.curSubActiveIndex;C.confirm(e?"删除后“子菜单名称”菜单下设置的内容将被删除":"删除后“菜单名称”菜单下设置的内容将被删除","温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{e?(n.value.buttons[t].sub_button.splice(o,1),n.value.buttons[t].hasChild=n.value.buttons[t].sub_button.length>0,n.value.curSubActiveIndex=null,n.value.init=!1):(n.value.buttons.splice(t,1),n.value.buttons.length||(u.value=!0),P())})).catch((()=>{}))})(g(n).clickSubMenu))}," 删除"+_(g(n).clickSubMenu?"子菜单":"菜单"),1)]),g(n).buttons[g(n).curActiveIndex].hasChild&&!g(n).clickSubMenu?(i(),l("p",gn," 已添加子菜单,仅可设置菜单名称。 ")):E("",!0),v("div",bn,[g(n).clickSubMenu?(i(),l("div",yn,[m(z,{model:g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex],"label-width":"100px","label-position":"left"},{default:a((()=>[g(s)?(i(),r(U,{key:0,label:"子菜单名称",prop:"title"},{default:a((()=>[m(V,{modelValue:g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].name,"onUpdate:modelValue":h[1]||(h[1]=e=>g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].name=e),style:{width:"260px"}},null,8,["modelValue"])])),_:1})):E("",!0),g(s)?(i(),r(U,{key:1,label:"子菜单内容"},{default:a((()=>[m(H,{modelValue:g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].type,"onUpdate:modelValue":h[2]||(h[2]=e=>g(n).buttons[g(n).curActiveIndex].sub_button[g(n).curSubActiveIndex].type=e)},{default:a((()=>[m($,{class:"radio",label:"link"},{default:a((()=>[y("跳转网页")])),_:1}),m($,{class:"radio",label:"event"},{default:a((()=>[y("发送消息")])),_:1}),m($,{class:"radio",label:"hdlink"},{default:a((()=>[y("互动链")])),_:1})])),_:1},8,["modelValue"])])),_:1})):E("",!0)])),_:1},8,["model"])])):(i(),l("div",wn,[m(z,{model:null==(F=g(n))?void 0:F.buttons[null==(Y=g(n))?void 0:Y.curActiveIndex],"label-width":"100px","label-position":"left"},{default:a((()=>[m(U,{label:"菜单名称",prop:"title"},{default:a((()=>[m(V,{modelValue:g(n).buttons[g(n).curActiveIndex].name,"onUpdate:modelValue":h[3]||(h[3]=e=>g(n).buttons[g(n).curActiveIndex].name=e),style:{width:"260px"},maxlength:10,placeholder:"请输入菜单名称(最多10个字符)"},null,8,["modelValue"]),xn])),_:1}),g(n).buttons[g(n).curActiveIndex].sub_button.length?E("",!0):(i(),l("div",_n,[m(U,{label:"菜单内容"},{default:a((()=>[m(H,{modelValue:g(n).buttons[g(n).curActiveIndex].type,"onUpdate:modelValue":h[4]||(h[4]=e=>g(n).buttons[g(n).curActiveIndex].type=e)},{default:a((()=>[m($,{class:"radio",label:"link"},{default:a((()=>[y("跳转网页")])),_:1}),m($,{class:"radio",label:"event"},{default:a((()=>[y("发送消息")])),_:1}),m($,{class:"radio",label:"hdlink"},{default:a((()=>[y("互动链")])),_:1})])),_:1},8,["modelValue"])])),_:1})]))])),_:1},8,["model"])]))])])])):(i(),l("div",Sn,En))])]),v("div",Dn,[m(W,{type:"primary",disabled:g(u)},{default:a((()=>[y("保存")])),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-14d84d1b"]]);export{Cn as default};