import{d as e,A as t,r as n,_ as o,o as i,j as r,w as a,c as l,F as s,q as u,x as c,ab as d,k as h,m as p,p as f,e as v,a as m,f as g,ak as b,b as y,al as w,v as x,t as _,S,s as E,am as D,a1 as C,X as I,Y as T}from"./index-9807a5c1.js";/* 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 A(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 k(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 X(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var R=X(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Y=X(/Edge/i),j=X(/firefox/i),F=X(/safari/i)&&!X(/chrome/i)&&!X(/android/i),L=X(/iP(ad|od|hone)/i),B=X(/chrome/i)&&X(/android/i),V={capture:!1,passive:!1};function U(e,t,n){e.addEventListener(t,n,!R&&V)}function $(e,t,n){e.removeEventListener(t,n,!R&&V)}function H(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 W(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function z(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&H(e,t):H(e,t))||o&&e===n)return e;if(e===n)break}while(e=W(e))}return null}var G,q=/\s+/g;function Z(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(q," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(q," ")}}function K(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 Q(e,t){var n="";if("string"==typeof e)n=e;else do{var o=K(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 J(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===ee())break;o=le(o,!1)}return!1}function oe(e,t,n,o){for(var i=0,r=0,a=e.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=P(n,ge);me.pluginEvent.bind(ct)(e,t,k({dragEl:we,parentEl:xe,ghostEl:_e,rootEl:Se,nextEl:Ee,lastDownEl:De,cloneEl:Ce,cloneHidden:Ie,dragStarted:Le,putSortable:Ne,activeSortable:ct.active,originalEvent:o,oldIndex:Te,oldDraggableIndex:ke,newIndex:Ae,newDraggableIndex:Me,hideGhostForTarget:at,unhideGhostForTarget:lt,cloneNowHidden:function(){Ie=!0},cloneNowShown:function(){Ie=!1},dispatchSortableEvent:function(e){ye({sortable:t,name:e,originalEvent:o})}},i))};function ye(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[he]){var v,m=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||R||Y?(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=k(k({},f),me.getEventProperties(o,t));for(var y in b)v[y]=b[y];n&&n.dispatchEvent(v),m[g]&&m[g].call(t,v)}}(k({putSortable:Ne,cloneEl:Ce,targetEl:we,rootEl:Se,oldIndex:Te,oldDraggableIndex:ke,newIndex:Ae,newDraggableIndex:Me},e))}var we,xe,_e,Se,Ee,De,Ce,Ie,Te,Ae,ke,Me,Oe,Ne,Pe,Xe,Re,Ye,je,Fe,Le,Be,Ve,Ue,$e,He=!1,We=!1,ze=[],Ge=!1,qe=!1,Ze=[],Ke=!1,Qe=[],Je="undefined"!=typeof document,et=L,tt=Y||R?"cssFloat":"float",nt=Je&&!B&&!L&&"draggable"in document.createElement("div"),ot=function(){if(Je){if(R)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),it=function(e,t){var n=K(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=oe(e,0,t),r=oe(e,1,t),a=i&&K(i),l=r&&K(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+te(i).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+te(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[tt]||r&&"none"===n[tt]&&s+u>o)?"vertical":"horizontal"},rt=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"==M(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},at=function(){!ot&&_e&&K(_e,"display","none")},lt=function(){!ot&&_e&&K(_e,"display","")};Je&&document.addEventListener("click",(function(e){if(We)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),We=!1,!1}),!0);var st=function(e){if(we){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,ze.some((function(e){var t=e[he].options.emptyInsertThreshold;if(t&&!ie(e)){var n=te(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[he]._onDragOver(n)}}var i,r,a},ut=function(e){we&&we.parentNode[he]._isOutsideThisEl(e.target)};function ct(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=N({},t),e[he]=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 it(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!==ct.supportPointer&&"PointerEvent"in window&&!F,emptyInsertThreshold:5};for(var o in me.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var i in rt(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&nt,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?U(e,"pointerdown",this._onTapStart):(U(e,"mousedown",this._onTapStart),U(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(U(e,"dragover",this),U(e,"dragenter",this)),ze.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),N(this,pe())}function dt(e,t,n,o,i,r,a,l){var s,u,c=e[he],d=c.options.onMove;return!window.CustomEvent||R||Y?(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||te(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),d&&(u=d.call(c,s,a)),u}function ht(e){e.draggable=!1}function pt(){Ke=!1}function ft(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 vt(e){return setTimeout(e,0)}function mt(e){return clearTimeout(e)}ct.prototype={constructor:ct,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,we):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){Qe.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var o=t[n];o.checked&&Qe.push(o)}}(n),!we&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!F||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=z(l,o.draggable,n,!1))&&l.animated||De===l)){if(Te=re(l),ke=re(l,o.draggable),"function"==typeof u){if(u.call(this,e,l,this))return ye({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),be("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(o){if(o=z(s,o.trim(),n,!1))return ye({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),be("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());o.handle&&!z(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&&!we&&n.parentNode===r){var s=te(n);if(Se=r,xe=(we=n).parentNode,Ee=we.nextSibling,De=n,Oe=a.group,ct.dragged=we,Pe={target:we,clientX:(t||e).clientX,clientY:(t||e).clientY},je=Pe.clientX-s.left,Fe=Pe.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,we.style["will-change"]="all",o=function(){be("delayEnded",i,{evt:e}),ct.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!j&&i.nativeDraggable&&(we.draggable=!0),i._triggerDragStart(e,t),ye({sortable:i,name:"choose",originalEvent:e}),Z(we,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){J(we,e.trim(),ht)})),U(l,"dragover",st),U(l,"mousemove",st),U(l,"touchmove",st),U(l,"mouseup",i._onDrop),U(l,"touchend",i._onDrop),U(l,"touchcancel",i._onDrop),j&&this.nativeDraggable&&(this.options.touchStartThreshold=4,we.draggable=!0),be("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Y||R))o();else{if(ct.eventCanceled)return void this._onDrop();U(l,"mouseup",i._disableDelayedDrag),U(l,"touchend",i._disableDelayedDrag),U(l,"touchcancel",i._disableDelayedDrag),U(l,"mousemove",i._delayedDragTouchMoveHandler),U(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&U(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(){we&&ht(we),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;$(e,"mouseup",this._disableDelayedDrag),$(e,"touchend",this._disableDelayedDrag),$(e,"touchcancel",this._disableDelayedDrag),$(e,"mousemove",this._delayedDragTouchMoveHandler),$(e,"touchmove",this._delayedDragTouchMoveHandler),$(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?U(document,"pointermove",this._onTouchMove):U(document,t?"touchmove":"mousemove",this._onTouchMove):(U(we,"dragend",this),U(Se,"dragstart",this._onDragStart));try{document.selection?vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(He=!1,Se&&we){be("dragStarted",this,{evt:t}),this.nativeDraggable&&U(document,"dragover",ut);var n=this.options;!e&&Z(we,n.dragClass,!1),Z(we,n.ghostClass,!0),ct.active=this,e&&this._appendGhost(),ye({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Xe){this._lastX=Xe.clientX,this._lastY=Xe.clientY,at();for(var e=document.elementFromPoint(Xe.clientX,Xe.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Xe.clientX,Xe.clientY))!==t;)t=e;if(we.parentNode[he]._isOutsideThisEl(e),t)do{if(t[he]){if(t[he]._onDragOver({clientX:Xe.clientX,clientY:Xe.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);lt()}},_onTouchMove:function(e){if(Pe){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=_e&&Q(_e,!0),a=_e&&r&&r.a,l=_e&&r&&r.d,s=et&&$e&&ae($e),u=(i.clientX-Pe.clientX+o.x)/(a||1)+(s?s[0]-Ze[0]:0)/(a||1),c=(i.clientY-Pe.clientY+o.y)/(l||1)+(s?s[1]-Ze[1]:0)/(l||1);if(!ct.active&&!He){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===we)return O(!1);if(v&&r===e.target&&(a=v),a&&(n=te(a)),!1!==dt(Se,r,we,t,a,n,e,!!a))return M(),r.appendChild(we),xe=r,N(),O(!0)}else if(v&&function(e,t,n){var o=te(oe(n.el,0,n.options,!0)),i=10;return t?e.clientXc+u*r/2:sd-Ue)return-Ve}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,qe,Be===a),0!==g){var D=re(we);do{D-=g,y=xe.children[D]}while(y&&("none"===K(y,"display")||y===_e))}if(0===g||y===a)return O(!1);Be=a,Ve=g;var C=a.nextElementSibling,I=!1,T=dt(Se,r,we,t,a,n,e,I=1===g);if(!1!==T)return 1!==T&&-1!==T||(I=1===T),Ke=!0,setTimeout(pt,30),M(),I&&!C?r.appendChild(we):a.parentNode.insertBefore(we,I?C:a),S&&ce(S,0,E-S.scrollTop),xe=we.parentNode,void 0===b||qe||(Ue=Math.abs(b-te(a)[_])),N(),O(!0)}if(r.contains(we))return O(!1)}return!1}function A(l,s){be(l,p,k({evt:e,isOwner:c,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:d,fromSortable:h,target:a,completed:O,onMove:function(n,o){return dt(Se,r,we,t,n,te(n),e,o)},changed:N},s))}function M(){A("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function O(t){return A("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(p),p!==h&&(Z(we,Ne?Ne.options.ghostClass:u.options.ghostClass,!1),Z(we,l.ghostClass,!0)),Ne!==p&&p!==ct.active?Ne=p:p===ct.active&&Ne&&(Ne=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){A("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===we&&!we.animated||a===r&&!a.animated)&&(Be=null),l.dragoverBubble||e.rootEl||a===document||(we.parentNode[he]._isOutsideThisEl(e.target),!t&&st(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function N(){Ae=re(we),Me=re(we,l.draggable),ye({sortable:p,name:"change",toEl:r,newIndex:Ae,newDraggableIndex:Me,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){$(document,"mousemove",this._onTouchMove),$(document,"touchmove",this._onTouchMove),$(document,"pointermove",this._onTouchMove),$(document,"dragover",st),$(document,"mousemove",st),$(document,"touchmove",st)},_offUpEvents:function(){var e=this.el.ownerDocument;$(e,"mouseup",this._onDrop),$(e,"touchend",this._onDrop),$(e,"pointerup",this._onDrop),$(e,"touchcancel",this._onDrop),$(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Ae=re(we),Me=re(we,n.draggable),be("drop",this,{evt:e}),xe=we&&we.parentNode,Ae=re(we),Me=re(we,n.draggable),ct.eventCanceled||(He=!1,qe=!1,Ge=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),mt(this.cloneId),mt(this._dragStartId),this.nativeDraggable&&($(document,"drop",this),$(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),F&&K(document.body,"user-select",""),K(we,"transform",""),e&&(Le&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),_e&&_e.parentNode&&_e.parentNode.removeChild(_e),(Se===xe||Ne&&"clone"!==Ne.lastPutMode)&&Ce&&Ce.parentNode&&Ce.parentNode.removeChild(Ce),we&&(this.nativeDraggable&&$(we,"dragend",this),ht(we),we.style["will-change"]="",Le&&!He&&Z(we,Ne?Ne.options.ghostClass:this.options.ghostClass,!1),Z(we,this.options.chosenClass,!1),ye({sortable:this,name:"unchoose",toEl:xe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Se!==xe?(Ae>=0&&(ye({rootEl:xe,name:"add",toEl:xe,fromEl:Se,originalEvent:e}),ye({sortable:this,name:"remove",toEl:xe,originalEvent:e}),ye({rootEl:xe,name:"sort",toEl:xe,fromEl:Se,originalEvent:e}),ye({sortable:this,name:"sort",toEl:xe,originalEvent:e})),Ne&&Ne.save()):Ae!==Te&&Ae>=0&&(ye({sortable:this,name:"update",toEl:xe,originalEvent:e}),ye({sortable:this,name:"sort",toEl:xe,originalEvent:e})),ct.active&&(null!=Ae&&-1!==Ae||(Ae=Te,Me=ke),ye({sortable:this,name:"end",toEl:xe,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){be("nulling",this),Se=we=xe=_e=Ee=Ce=De=Ie=Pe=Xe=Le=Ae=Me=Te=ke=Be=Ve=Ne=Oe=ct.dragged=ct.ghost=ct.clone=ct.active=null,Qe.forEach((function(e){e.checked=!0})),Qe.length=Re=Ye=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":we&&(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(Ot,((e,t)=>t?t.toUpperCase():""))));function Pt(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function Xt(e,t,n){const o=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}function Rt(e,t){this.$nextTick((()=>this.$emit(e.toLowerCase(),t)))}function Yt(e){return t=>{null!==this.realList&&this["onDrag"+e](t),Rt.call(this,e,t)}}const jt=["Start","Add","Remove","Update","End"],Ft=["Choose","Unchoose","Sort","Filter","Clone"],Lt=["Move",...jt,...Ft].map((e=>"on"+e));let Bt=null;const Vt={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}},Ut=e({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...jt.map((e=>e.toLowerCase())),...Ft.map((e=>e.toLowerCase()))],props:Vt,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&&Mt.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};jt.forEach((t=>{e["on"+t]=Yt.call(this,t)})),Ft.forEach((t=>{e["on"+t]=Rt.bind(this,t)}));const t=Object.keys(this.$attrs).reduce(((e,t)=>(e[Nt(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 ct(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=Nt(t);-1===Lt.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),Bt=e.item)},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;Pt(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(Xt(this.$el,e.item,e.oldIndex),"clone"===e.pullMode)return void Pt(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){Pt(e.item),Xt(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(),Bt=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(Bt)||!t.willInsertAfter?i:i+1}}});const $t=o(e({components:{draggable:Ut},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"]]),Ht=e=>(I("data-v-14d84d1b"),e=e(),T(),e),Wt={class:"custom-menu"},zt={class:"menu-container"},Gt={class:"device-wrap"},qt={class:"device device-iphone-x"},Zt={class:"device-frame"},Kt={class:"device-content"},Qt={class:"wechat-header"},Jt={class:"header-inner"},en={class:"wechat-menu"},tn=["onClick"],nn={key:0,class:"children-menu-items"},on=["onClick"],rn=D('
',5),an={class:"edit-wrap"},ln={key:0},sn={class:"edit-content-wrap"},un={class:"edit-title"},cn={key:0,class:"notice-text"},dn={class:"edit-form"},hn={key:0},pn={key:1},fn=Ht((()=>v("span",{style:{color:"#fd555d","padding-left":"10px"}},"受微信限制,如您发现微信显示有问题,请减少内容",-1))),vn={key:0},mn={key:1},gn=[Ht((()=>v("p",{class:"no-init"},"点击左侧菜单进行编辑操作",-1)))],bn={class:"menu-save"},yn=o(e({__name:"index",setup(e){const t=h(3),o=h({curActiveIndex:null,curSubActiveIndex:null,clickSubMenu:!1,init:!1,buttons:[]}),s=e=>e.showChildMenu,u=p((()=>{var e,t,n,i,r,a,l,s,u,c;return(null==(r=null==(i=null==(t=o.value)?void 0:t.buttons[null==(e=o.value)?void 0:e.curActiveIndex])?void 0:i.sub_button[null==(n=o.value)?void 0:n.curSubActiveIndex])?void 0:r.name)||(null==(c=null==(u=null==(l=o.value)?void 0:l.buttons[null==(a=o.value)?void 0:a.curActiveIndex])?void 0:u.sub_button[null==(s=o.value)?void 0:s.curSubActiveIndex])?void 0:c.type)})),c=h(!0),d=e=>{o.value.init=!0,o.value.clickSubMenu=!1,o.value.curSubActiveIndex=null,o.value.curActiveIndex=e.newDraggableIndex,o.value.buttons.forEach((e=>e.showChildMenu=!1)),o.value.buttons[e.newDraggableIndex].showChildMenu=!0},D=e=>{o.value.curSubActiveIndex=e.newDraggableIndex},I=()=>{o.value.init=!0,o.value.clickSubMenu=!0;let e=o.value.curActiveIndex;o.value.buttons[e].sub_button.push({name:"子菜单名称",url:"",url2:"",key:"",type:"link",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:""}),o.value.curSubActiveIndex=o.value.buttons[e].sub_button.length-1,o.value.buttons[e].hasChild=!0},T=()=>{o.value.curActiveIndex=null,o.value.curSubActiveIndex=null,o.value.init=!1};return f((()=>{o.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,A,k,M,O,N;const P=n("el-icon"),X=$t,R=n("el-input"),Y=n("el-form-item"),j=n("el-radio"),F=n("el-radio-group"),L=n("el-form"),B=n("el-button");return i(),l("div",Wt,[v("div",zt,[v("div",Gt,[v("div",qt,[v("div",Zt,[v("div",Kt,[v("div",Qt,[v("div",Jt,[m(P,{class:"ml-3"},{default:a((()=>[m(g(b))])),_:1}),y(" 公众号 "),m(P,{class:"mr-3"},{default:a((()=>[m(g(w))])),_:1})])]),v("div",en,[m(X,{list:g(o).buttons,classString:"flex-warpper",onEnd:d},{default:a((({item:e,index:n})=>{var r;return[(i(),l("div",{class:"wechat-menu-item",key:n},[v("p",{class:x(["menu-name",{"cur-menu":n===g(o).curActiveIndex}]),onClick:e=>(e=>{o.value.init=!0,o.value.clickSubMenu=!1,o.value.curSubActiveIndex=null;let n=o.value.buttons;if(e===o.value.curActiveIndex)return;if(null!==o.value.curActiveIndex&&o.value.buttons[o.value.curActiveIndex]&&(o.value.buttons[o.value.curActiveIndex].showChildMenu=!1),o.value.curActiveIndex=e,n[e])return void(o.value.buttons[o.value.curActiveIndex]&&(o.value.buttons[o.value.curActiveIndex].showChildMenu=!0));if(n.length>=t.value)return;o.value.buttons.push({name:"菜单名称",hasChild:!1,showChildMenu:!0,type:"link",url:"",url2:"",key:"",keyword:"",linkcontent:"",imgUrl:"",sendMsgType:"template",sendCustomUrl:"",sub_button:[]})})(n)},_(e.name),11,tn),s(e)?(i(),l("div",nn,[m(X,{list:e.sub_button,onEnd:D},{default:a((({item:e,index:t})=>[(i(),l("div",{class:"children-menu-item",key:t,onClick:e=>{var n;(n=t)!==o.value.curSubActiveIndex&&(o.value.init=!0,o.value.clickSubMenu=!0,o.value.curSubActiveIndex=n)}},[v("p",{class:x(["menu-name",{"cur-name":g(o).curSubActiveIndex===t}])},_(e.name),3)],8,on))])),_:2},1032,["list"]),(null==(r=null==e?void 0:e.sub_button)?void 0:r.length)<5?(i(),l("div",{key:0,class:"children-menu-item",onClick:I},[m(P,null,{default:a((()=>[m(g(S))])),_:1})])):E("",!0)])):E("",!0)]))]})),_:1},8,["list"])])])]),rn])]),v("div",an,[g(o).init?(i(),l("div",ln,[v("div",sn,[v("p",un,[y(_(g(o).clickSubMenu?null==(A=null==(f=null==(p=g(o))?void 0:p.buttons[g(o).curActiveIndex])?void 0:f.sub_button[g(o).curSubActiveIndex])?void 0:A.name:null==(M=null==(k=g(o))?void 0:k.buttons[g(o).curActiveIndex])?void 0:M.name)+" ",1),v("span",{class:"del-menu",onClick:h[0]||(h[0]=e=>(e=>{let t=o.value.curActiveIndex,n=o.value.curSubActiveIndex;C.confirm(e?"删除后“子菜单名称”菜单下设置的内容将被删除":"删除后“菜单名称”菜单下设置的内容将被删除","温馨提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{e?(o.value.buttons[t].sub_button.splice(n,1),o.value.buttons[t].hasChild=o.value.buttons[t].sub_button.length>0,o.value.curSubActiveIndex=null,o.value.init=!1):(o.value.buttons.splice(t,1),o.value.buttons.length||(c.value=!0),T())})).catch((()=>{}))})(g(o).clickSubMenu))}," 删除"+_(g(o).clickSubMenu?"子菜单":"菜单"),1)]),g(o).buttons[g(o).curActiveIndex].hasChild&&!g(o).clickSubMenu?(i(),l("p",cn," 已添加子菜单,仅可设置菜单名称。 ")):E("",!0),v("div",dn,[g(o).clickSubMenu?(i(),l("div",hn,[m(L,{model:g(o).buttons[g(o).curActiveIndex].sub_button[g(o).curSubActiveIndex],"label-width":"100px","label-position":"left"},{default:a((()=>[g(u)?(i(),r(Y,{key:0,label:"子菜单名称",prop:"title"},{default:a((()=>[m(R,{modelValue:g(o).buttons[g(o).curActiveIndex].sub_button[g(o).curSubActiveIndex].name,"onUpdate:modelValue":h[1]||(h[1]=e=>g(o).buttons[g(o).curActiveIndex].sub_button[g(o).curSubActiveIndex].name=e),style:{width:"260px"}},null,8,["modelValue"])])),_:1})):E("",!0),g(u)?(i(),r(Y,{key:1,label:"子菜单内容"},{default:a((()=>[m(F,{modelValue:g(o).buttons[g(o).curActiveIndex].sub_button[g(o).curSubActiveIndex].type,"onUpdate:modelValue":h[2]||(h[2]=e=>g(o).buttons[g(o).curActiveIndex].sub_button[g(o).curSubActiveIndex].type=e)},{default:a((()=>[m(j,{class:"radio",label:"link"},{default:a((()=>[y("跳转网页")])),_:1}),m(j,{class:"radio",label:"event"},{default:a((()=>[y("发送消息")])),_:1}),m(j,{class:"radio",label:"hdlink"},{default:a((()=>[y("互动链")])),_:1})])),_:1},8,["modelValue"])])),_:1})):E("",!0)])),_:1},8,["model"])])):(i(),l("div",pn,[m(L,{model:null==(N=g(o))?void 0:N.buttons[null==(O=g(o))?void 0:O.curActiveIndex],"label-width":"100px","label-position":"left"},{default:a((()=>[m(Y,{label:"菜单名称",prop:"title"},{default:a((()=>[m(R,{modelValue:g(o).buttons[g(o).curActiveIndex].name,"onUpdate:modelValue":h[3]||(h[3]=e=>g(o).buttons[g(o).curActiveIndex].name=e),style:{width:"260px"},maxlength:10,placeholder:"请输入菜单名称(最多10个字符)"},null,8,["modelValue"]),fn])),_:1}),g(o).buttons[g(o).curActiveIndex].sub_button.length?E("",!0):(i(),l("div",vn,[m(Y,{label:"菜单内容"},{default:a((()=>[m(F,{modelValue:g(o).buttons[g(o).curActiveIndex].type,"onUpdate:modelValue":h[4]||(h[4]=e=>g(o).buttons[g(o).curActiveIndex].type=e)},{default:a((()=>[m(j,{class:"radio",label:"link"},{default:a((()=>[y("跳转网页")])),_:1}),m(j,{class:"radio",label:"event"},{default:a((()=>[y("发送消息")])),_:1}),m(j,{class:"radio",label:"hdlink"},{default:a((()=>[y("互动链")])),_:1})])),_:1},8,["modelValue"])])),_:1})]))])),_:1},8,["model"])]))])])])):(i(),l("div",mn,gn))])]),v("div",bn,[m(B,{type:"primary",disabled:g(c)},{default:a((()=>[y("保存")])),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-14d84d1b"]]);export{yn as default};