import{d as De,h as Oe,r as Ge,o as U,c as q,a as c,_ as un,u as cn,b as fn,e as pt,f as E,g as Ae,F as ee,i as ne,w as F,j as P,I as Pe,t as it,k as hn,l as pn,m as Ne,n as Me,p as jt,v as Xt}from"./index.c685e846.js";import{_ as mn}from"./carousel1.01799c1e.js";import{S as gn}from"./sweetalert2.all.79a6bcd7.js";import{I as vn}from"./icon-calendar.287aa693.js";import{I as Le}from"./icon-trash-lines.e25f038f.js";import{f as oe,N as ie,o as bt,V as re,_ as ae,I as se}from"./icon-x.6c3c1ce6.js";import"./micro-task.27a59902.js";/*! * vue-draggable-next v2.1.0 * (c) 2021 Anish George * @license MIT *//**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT */function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function ot(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function yn(e,t){if(e==null)return{};var n=_n(e,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(n[o]=e[o]))}return n}var wn="1.14.0";function rt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var st=rt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Lt=rt(/Edge/i),$e=rt(/firefox/i),Ot=rt(/safari/i)&&!rt(/chrome/i)&&!rt(/android/i),Ue=rt(/iP(ad|od|hone)/i),xn=rt(/chrome/i)&&rt(/android/i),qe={capture:!1,passive:!1};function T(e,t,n){e.addEventListener(t,n,!st&&qe)}function C(e,t,n){e.removeEventListener(t,n,!st&&qe)}function qt(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 En(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function et(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&qt(e,t):qt(e,t))||o&&e===n)return e;if(e===n)break}while(e=En(e))}return null}var je=/\s+/g;function H(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(je," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(je," ")}}function m(e,t,n){var o=e&&e.style;if(o){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 o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function Et(e,t){var n="";if(typeof e=="string")n=e;else do{var o=m(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Je(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i=r:a=i<=r,!a)return o;if(o===nt())break;o=ct(o,!1)}return!1}function Ct(e,t,n,o){for(var i=0,r=0,a=e.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=yn(o,An);Ft.pluginEvent.bind(g)(t,n,ot({dragEl:u,parentEl:k,ghostEl:b,rootEl:I,nextEl:vt,lastDownEl:Wt,cloneEl:O,cloneHidden:ut,dragStarted:Tt,putSortable:j,activeSortable:g.active,originalEvent:i,oldIndex:xt,oldDraggableIndex:Pt,newIndex:W,newDraggableIndex:dt,hideGhostForTarget:on,unhideGhostForTarget:rn,cloneNowHidden:function(){ut=!0},cloneNowShown:function(){ut=!1},dispatchSortableEvent:function(s){Y({sortable:n,name:s,originalEvent:i})}},r))};function Y(e){On(ot({putSortable:j,cloneEl:O,targetEl:u,rootEl:I,oldIndex:xt,oldDraggableIndex:Pt,newIndex:W,newDraggableIndex:dt},e))}var u,k,b,I,vt,Wt,O,ut,xt,W,Pt,dt,Bt,j,wt=!1,Jt=!1,Zt=[],mt,K,ue,ce,Ye,Re,Tt,yt,Nt,Mt=!1,Yt=!1,zt,B,fe=[],_e=!1,Kt=[],te=typeof document<"u",Rt=Ue,Ve=Lt||st?"cssFloat":"float",Pn=te&&!xn&&!Ue&&"draggable"in document.createElement("div"),tn=function(){if(!!te){if(st)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),en=function(t,n){var o=m(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=Ct(t,0,n),a=Ct(t,1,n),s=r&&m(r),l=a&&m(a),d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+L(r).width,p=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+L(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return r&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||d>=i&&o[Ve]==="none"||a&&o[Ve]==="none"&&d+p>i)?"vertical":"horizontal"},Nn=function(t,n,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,s=o?n.left:n.top,l=o?n.right:n.bottom,d=o?n.width:n.height;return i===s||r===l||i+a/2===s+d/2},Mn=function(t,n){var o;return Zt.some(function(i){var r=i[z].options.emptyInsertThreshold;if(!(!r||Se(i))){var a=L(i),s=t>=a.left-r&&t<=a.right+r,l=n>=a.top-r&&n<=a.bottom+r;if(s&&l)return o=i}}),o},nn=function(t){function n(r,a){return function(s,l,d,p){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(r==null&&(a||f))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return n(r(s,l,d,p),a)(s,l,d,p);var y=(a?s:l).options.group.name;return r===!0||typeof r=="string"&&r===y||r.join&&r.indexOf(y)>-1}}var o={},i=t.group;(!i||Ht(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,t.group=o},on=function(){!tn&&b&&m(b,"display","none")},rn=function(){!tn&&b&&m(b,"display","")};te&&document.addEventListener("click",function(e){if(Jt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Jt=!1,!1},!0);var gt=function(t){if(u){t=t.touches?t.touches[0]:t;var n=Mn(t.clientX,t.clientY);if(n){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[z]._onDragOver(o)}}},Ln=function(t){u&&u.parentNode[z]._isOutsideThisEl(t.target)};function g(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=at({},t),e[z]=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 en(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(a,s){a.setData("Text",s.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:g.supportPointer!==!1&&"PointerEvent"in window&&!Ot,emptyInsertThreshold:5};Ft.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);nn(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:Pn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?T(e,"pointerdown",this._onTapStart):(T(e,"mousedown",this._onTapStart),T(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(T(e,"dragover",this),T(e,"dragenter",this)),Zt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),at(this,Tn())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(yt=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,u):this.options.direction},_onTapStart:function(t){if(!!t.cancelable){var n=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,p=i.filter;if(Vn(o),!u&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ot&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=et(l,i.draggable,o,!1),!(l&&l.animated)&&Wt!==l)){if(xt=J(l),Pt=J(l,i.draggable),typeof p=="function"){if(p.call(this,t,l,this)){Y({sortable:n,rootEl:d,name:"filter",targetEl:l,toEl:o,fromEl:o}),R("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(p&&(p=p.split(",").some(function(f){if(f=et(d,f.trim(),o,!1),f)return Y({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:o,toEl:o}),R("filter",n,{evt:t}),!0}),p)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!et(d,i.handle,o,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,o){var i=this,r=i.el,a=i.options,s=r.ownerDocument,l;if(o&&!u&&o.parentNode===r){var d=L(o);if(I=r,u=o,k=u.parentNode,vt=u.nextSibling,Wt=o,Bt=a.group,g.dragged=u,mt={target:u,clientX:(n||t).clientX,clientY:(n||t).clientY},Ye=mt.clientX-d.left,Re=mt.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,u.style["will-change"]="all",l=function(){if(R("delayEnded",i,{evt:t}),g.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!$e&&i.nativeDraggable&&(u.draggable=!0),i._triggerDragStart(t,n),Y({sortable:i,name:"choose",originalEvent:t}),H(u,a.chosenClass,!0)},a.ignore.split(",").forEach(function(p){Je(u,p.trim(),he)}),T(s,"dragover",gt),T(s,"mousemove",gt),T(s,"touchmove",gt),T(s,"mouseup",i._onDrop),T(s,"touchend",i._onDrop),T(s,"touchcancel",i._onDrop),$e&&this.nativeDraggable&&(this.options.touchStartThreshold=4,u.draggable=!0),R("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Lt||st))){if(g.eventCanceled){this._onDrop();return}T(s,"mouseup",i._disableDelayedDrag),T(s,"touchend",i._disableDelayedDrag),T(s,"touchcancel",i._disableDelayedDrag),T(s,"mousemove",i._delayedDragTouchMoveHandler),T(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&T(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){u&&he(u),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._disableDelayedDrag),C(t,"touchend",this._disableDelayedDrag),C(t,"touchcancel",this._disableDelayedDrag),C(t,"mousemove",this._delayedDragTouchMoveHandler),C(t,"touchmove",this._delayedDragTouchMoveHandler),C(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?T(document,"pointermove",this._onTouchMove):n?T(document,"touchmove",this._onTouchMove):T(document,"mousemove",this._onTouchMove):(T(u,"dragend",this),T(I,"dragstart",this._onDragStart));try{document.selection?Gt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(wt=!1,I&&u){R("dragStarted",this,{evt:n}),this.nativeDraggable&&T(document,"dragover",Ln);var o=this.options;!t&&H(u,o.dragClass,!1),H(u,o.ghostClass,!0),g.active=this,t&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(K){this._lastX=K.clientX,this._lastY=K.clientY,on();for(var t=document.elementFromPoint(K.clientX,K.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(K.clientX,K.clientY),t!==n);)n=t;if(u.parentNode[z]._isOutsideThisEl(t),n)do{if(n[z]){var o=void 0;if(o=n[z]._onDragOver({clientX:K.clientX,clientY:K.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);rn()}},_onTouchMove:function(t){if(mt){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=t.touches?t.touches[0]:t,a=b&&Et(b,!0),s=b&&a&&a.a,l=b&&a&&a.d,d=Rt&&B&&Be(B),p=(r.clientX-mt.clientX+i.x)/(s||1)+(d?d[0]-fe[0]:0)/(s||1),f=(r.clientY-mt.clientY+i.y)/(l||1)+(d?d[1]-fe[1]:0)/(l||1);if(!g.active&&!wt){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(Y({rootEl:k,name:"add",toEl:k,fromEl:I,originalEvent:t}),Y({sortable:this,name:"remove",toEl:k,originalEvent:t}),Y({rootEl:k,name:"sort",toEl:k,fromEl:I,originalEvent:t}),Y({sortable:this,name:"sort",toEl:k,originalEvent:t})),j&&j.save()):W!==xt&&W>=0&&(Y({sortable:this,name:"update",toEl:k,originalEvent:t}),Y({sortable:this,name:"sort",toEl:k,originalEvent:t})),g.active&&((W==null||W===-1)&&(W=xt,dt=Pt),Y({sortable:this,name:"end",toEl:k,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){R("nulling",this),I=u=k=b=vt=O=Wt=ut=mt=K=Tt=W=dt=xt=Pt=yt=Nt=j=Bt=g.dragged=g.ghost=g.clone=g.active=null,Kt.forEach(function(t){t.checked=!0}),Kt.length=ue=ce=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":u&&(this._onDragOver(t),Fn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,o=this.el.children,i=0,r=o.length,a=this.options;io.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}function Bn(e,t,n,o,i,r,a,s){var l=o?e.clientY:e.clientX,d=o?n.height:n.width,p=o?n.top:n.left,f=o?n.bottom:n.right,y=!1;if(!a){if(s&&ztp+d*r/2:lf-zt)return-Nt}else if(l>p+d*(1-i)/2&&lf-d*r/2)?l>p+d/2?1:-1:0}function Yn(e){return J(u)e.replace(Un,(t,n)=>n?n.toUpperCase():""));function ve(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function ze(e,t,n){const o=n===0?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}function qn(e,t){return Object.values(e).indexOf(t)}function Jn(e,t,n,o){if(!e)return[];const i=Object.values(e),r=t.length-o;return[...t].map((s,l)=>l>=r?i.length:i.indexOf(s))}function sn(e,t){this.$nextTick(()=>this.$emit(e.toLowerCase(),t))}function Zn(e){return t=>{this.realList!==null&&this["onDrag"+e](t),sn.call(this,e,t)}}function Kn(e){return["transition-group","TransitionGroup"].includes(e)}function Qn(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?Kn(t.name):!1}function to(e,t){return t?{...t.props,...t.attrs}:e}const Ee=["Start","Add","Remove","Update","End"],Ce=["Choose","Unchoose","Sort","Filter","Clone"],eo=["Move",...Ee,...Ce].map(e=>"on"+e);let be=null;const no={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}},oo=De({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Ee.map(e=>e.toLowerCase()),...Ce.map(e=>e.toLowerCase())],props:no,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const e=this.$slots.default?this.$slots.default():null,t=to(this.$attrs,this.componentData);return e?(this.transitionMode=Qn(e),Oe(this.getTag(),t,e)):Oe(this.getTag(),t,[])},created(){this.list!==null&&this.modelValue!==null&&zn.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};Ee.forEach(i=>{e["on"+i]=Zn.call(this,i)}),Ce.forEach(i=>{e["on"+i]=sn.bind(this,i)});const t=Object.keys(this.$attrs).reduce((i,r)=>(i[We(r)]=this.$attrs[r],i),{}),n=Object.assign({},t,e,{onMove:(i,r)=>this.onDragMove(i,r)});!("draggable"in n)&&(n.draggable=">*");const o=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new g(o,n),o.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},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?Ge(this.component):this.tag},updateOptions(e){for(var t in e){const n=We(t);eo.indexOf(n)===-1&&this._sortable.option(n,e[t])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Jn(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const t=qn(this.getChildrenNodes()||[],e);if(t===-1)return null;const n=this.realList[t];return{index:t,element:n}},emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list){e(this.list);return}const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){const e=t=>t.splice(...arguments);this.alterList(e)},updatePosition(e,t){const n=o=>o.splice(t,0,o.splice(e,1)[0]);this.alterList(n)},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;var t=this.getChildrenNodes();t[e].data=null;const n=this.getComponent();n.children=[],n.kept=void 0},onDragStart(e){this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),be=e.item)},onDragAdd(e){const t=e.item._underlying_vm_;if(t===void 0)return;ve(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(ze(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){ve(e.clone);return}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){ve(e.item),ze(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});const a=Object.assign({},e,{relatedContext:o,draggedContext:i});return n(a,t)},onDragEnd(){this.computeIndexes(),be=null},getTrargetedComponent(e){return 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 r=n.getUnderlyingVm(t);if(r)return Object.assign(r,i)}return i},computeFutureIndex(e,t){const n=[...t.to.children].filter(a=>a.style.display!=="none");if(n.length===0)return 0;const o=n.indexOf(t.related),i=e.component.getVmIndex(o);return n.indexOf(be)!==-1||!t.willInsertAfter?i:i+1}}}),io={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ro=c("path",{d:"M12.75 9C12.75 8.58579 12.4142 8.25 12 8.25C11.5858 8.25 11.25 8.58579 11.25 9L11.25 11.25H9C8.58579 11.25 8.25 11.5858 8.25 12C8.25 12.4142 8.58579 12.75 9 12.75H11.25V15C11.25 15.4142 11.5858 15.75 12 15.75C12.4142 15.75 12.75 15.4142 12.75 15L12.75 12.75H15C15.4142 12.75 15.75 12.4142 15.75 12C15.75 11.5858 15.4142 11.25 15 11.25H12.75V9Z",fill:"currentColor"},null,-1),ao=c("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12Z",fill:"currentColor"},null,-1),so=[ro,ao],lo={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},uo=c("circle",{opacity:"0.5",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"1.5"},null,-1),co=c("path",{d:"M15 12L12 12M12 12L9 12M12 12L12 9M12 12L12 15",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),fo=[uo,co],ho=De({__name:"icon-plus-circle",props:{duotone:{type:Boolean,default:!0}},setup(e){return(t,n)=>e.duotone?(U(),q("svg",lo,fo)):(U(),q("svg",io,so))}}),po={},mo={width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},go=c("path",{opacity:"0.5",d:"M22 10.5V12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),vo=c("path",{d:"M17.3009 2.80624L16.652 3.45506L10.6872 9.41993C10.2832 9.82394 10.0812 10.0259 9.90743 10.2487C9.70249 10.5114 9.52679 10.7957 9.38344 11.0965C9.26191 11.3515 9.17157 11.6225 8.99089 12.1646L8.41242 13.9L8.03811 15.0229C7.9492 15.2897 8.01862 15.5837 8.21744 15.7826C8.41626 15.9814 8.71035 16.0508 8.97709 15.9619L10.1 15.5876L11.8354 15.0091C12.3775 14.8284 12.6485 14.7381 12.9035 14.6166C13.2043 14.4732 13.4886 14.2975 13.7513 14.0926C13.9741 13.9188 14.1761 13.7168 14.5801 13.3128L20.5449 7.34795L21.1938 6.69914C22.2687 5.62415 22.2687 3.88124 21.1938 2.80624C20.1188 1.73125 18.3759 1.73125 17.3009 2.80624Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),bo=c("path",{opacity:"0.5",d:"M16.6522 3.45508C16.6522 3.45508 16.7333 4.83381 17.9499 6.05034C19.1664 7.26687 20.5451 7.34797 20.5451 7.34797M10.1002 15.5876L8.4126 13.9",stroke:"currentColor","stroke-width":"1.5"},null,-1),_o=[go,vo,bo];function yo(e,t){return U(),q("svg",mo,_o)}const wo=un(po,[["render",yo]]),xo={class:"relative pt-5"},Eo={class:"h-full -mx-2"},Co={class:"overflow-x-auto flex items-start flex-nowrap gap-5 px-2 pb-2"},Do={class:"flex justify-between mb-5"},So={class:"text-base font-semibold"},To={class:"flex items-center"},Io=["onClick"],ko={class:"dropdown"},Oo={type:"button",class:"hover:text-primary"},Ao=["onClick"],Po=["onClick"],No=["onClick"],Mo=["onClick"],Lo={class:"shadow bg-[#f4f4f4] dark:bg-white-dark/20 p-3 pb-5 rounded-md mb-5 space-y-3 cursor-move"},Fo={key:0,src:mn,alt:"images",class:"h-32 w-full object-cover rounded-md"},$o={class:"text-base font-medium"},jo={class:"break-all"},Xo={class:"flex gap-2 items-center flex-wrap"},Bo={class:"ltr:ml-2 rtl:mr-2"},Yo={key:1,class:"btn px-2 py-1 flex text-white-dark dark:border-white-dark/50 shadow-none"},Ro=c("span",{class:"ltr:ml-2 rtl:mr-2"},"No Tags",-1),Vo={class:"flex items-center justify-between"},Ho={class:"font-medium flex items-center hover:text-primary"},Wo={class:"flex items-center"},zo=["onClick"],Go=["onClick"],Uo={class:"pt-3"},qo=["onClick"],Jo={class:"fixed inset-0 overflow-y-auto"},Zo={class:"flex min-h-full items-center justify-center px-4 py-8"},Ko={class:"text-lg font-medium bg-[#fbfbfb] dark:bg-[#121c2c] ltr:pl-5 rtl:pr-5 py-3 ltr:pr-[50px] rtl:pl-[50px]"},Qo={class:"p-5"},ti=["onSubmit"],ei={class:"grid gap-5"},ni=c("label",{for:"title"},"Name",-1),oi={class:"flex justify-end items-center mt-8"},ii={type:"submit",class:"btn btn-primary ltr:ml-4 rtl:mr-4"},ri={class:"fixed inset-0 overflow-y-auto"},ai={class:"flex min-h-full items-center justify-center px-4 py-8"},si={class:"text-lg font-medium bg-[#fbfbfb] dark:bg-[#121c2c] ltr:pl-5 rtl:pr-5 py-3 ltr:pr-[50px] rtl:pl-[50px]"},li={class:"p-5"},di=["onSubmit"],ui={class:"grid gap-5"},ci=c("label",{for:"taskTitle"},"Name",-1),fi=c("label",{for:"taskTag"},"Tag",-1),hi=c("label",{for:"taskdesc"},"Description",-1),pi={class:"flex justify-end items-center mt-8"},mi={type:"submit",class:"btn btn-primary ltr:ml-4 rtl:mr-4"},gi={class:"fixed inset-0 overflow-y-auto"},vi={class:"flex min-h-full items-center justify-center px-4 py-8"},bi=c("div",{class:"text-lg font-medium bg-[#fbfbfb] dark:bg-[#121c2c] ltr:pl-5 rtl:pr-5 py-3 ltr:pr-[50px] rtl:pl-[50px]"}," Delete Task ",-1),_i={class:"p-5 text-center"},yi={class:"text-white bg-danger ring-4 ring-danger/30 p-4 rounded-full w-fit mx-auto"},wi=c("div",{class:"text-base sm:w-3/4 mx-auto mt-5"},"Are you sure you want to delete Task?",-1),xi={class:"flex justify-center items-center mt-8"},Ai=De({__name:"scrumboard",setup(e){cn({title:"Scrumboard"});const t=fn(),n=pt({id:null,title:""}),o=pt({projectId:null,id:null,title:"",description:"",tags:""}),i=pt(null),r=pt(!1),a=pt(!1),s=pt(!1),l=pt([{id:1,title:"In Progress",tasks:[{projectId:1,id:1,title:"Creating a new Portfolio on Dribble",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit.",image:!0,date:" 08 Aug, 2020",tags:["designing"]},{projectId:1,id:2,title:"Singapore Team Meet",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit.",date:" 09 Aug, 2020",tags:["meeting"]}]},{id:2,title:"Pending",tasks:[{projectId:2,id:1,title:"Plan a trip to another country",description:"",date:" 10 Sep, 2020"}]},{id:3,title:"Complete",tasks:[{projectId:3,id:1,title:"Dinner with Kelly Young",description:"",date:" 08 Aug, 2020"},{projectId:3,id:2,title:"Launch New SEO Wordpress Theme ",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",date:" 09 Aug, 2020"}]},{id:4,title:"Working",tasks:[]}]),d=(_=null)=>{setTimeout(()=>{n.value={id:null,title:""},_&&(n.value=JSON.parse(JSON.stringify(_))),r.value=!0})},p=()=>{if(!n.value.title)return X("Title is required.","error"),!1;if(n.value.id){const _=l.value.find(h=>h.id===n.value.id);_.title=n.value.title}else{const h={id:(l.value.length?l.value.reduce((M,v)=>v.id>M?v.id:M,l.value[0].id):0)+1,title:n.value.title,tasks:[]};l.value.push(h)}X("Project has been saved successfully."),r.value=!1},f=_=>{l.value=l.value.filter(h=>h.id!=_.id),X("Project has been deleted successfully.")},y=_=>{_.tasks=[]},D=(_,h=null)=>{o.value={projectId:null,id:null,title:"",description:"",tags:""},h&&(o.value=JSON.parse(JSON.stringify(h)),o.value.tags=o.value.tags?o.value.tags.toString():""),o.value.projectId=_,a.value=!0},w=()=>{var h,M,v;if(!o.value.title)return X("Title is required.","error"),!1;const _=l.value.find(x=>x.id===o.value.projectId);if(o.value.id){const x=_.tasks.find(A=>A.id===o.value.id);x.title=o.value.title,x.description=o.value.description,x.tags=((h=o.value.tags)==null?void 0:h.length)>0?o.value.tags.split(","):[]}else{let x=0;(M=_.tasks)!=null&&M.length&&(x=_.tasks.reduce((G,tt)=>tt.id>G?tt.id:G,_.tasks[0].id));const A=new Date,Z=String(A.getDate()).padStart(2,"0"),$=String(A.getMonth()),ft=A.getFullYear(),Q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht={projectId:o.value.projectId,id:x+1,title:o.value.title,description:o.value.description,date:Z+" "+Q[$]+", "+ft,tags:((v=o.value.tags)==null?void 0:v.length)>0?o.value.tags.split(","):[]};_.tasks.push(ht)}X("Task has been saved successfully."),a.value=!1},S=(_,h=null)=>{i.value=h,setTimeout(()=>{s.value=!0},10)},V=()=>{let _=l.value.find(h=>h.id===i.value.projectId);_.tasks=_.tasks.filter(h=>h.id!=i.value.id),X("Task has been deleted successfully."),s.value=!1},X=(_="",h="success")=>{gn.mixin({toast:!0,position:"top",showConfirmButton:!1,timer:3e3,customClass:{container:"toast"}}).fire({icon:h,title:_,padding:"10px 20px"})};return(_,h)=>{const M=Ge("Popper");return U(),q("div",null,[c("div",null,[c("button",{type:"button",class:"btn btn-primary flex",onClick:h[0]||(h[0]=v=>d())},[E(Pe,{class:"w-5 h-5 ltr:mr-3 rtl:ml-3"}),Ae(" Add Project ")])]),c("div",xo,[c("div",Eo,[c("div",Co,[(U(!0),q(ee,null,ne(l.value,v=>(U(),q("div",{key:v.id,class:"panel w-80 flex-none"},[c("div",Do,[c("h4",So,it(v.title),1),c("div",To,[c("button",{type:"button",class:"hover:text-primary ltr:mr-2 rtl:ml-2",onClick:x=>D(v.id)},[E(ho)],8,Io),c("div",ko,[E(M,{placement:P(t).rtlClass==="rtl"?"bottom-start":"bottom-end",offsetDistance:"0"},{content:F(({close:x})=>[c("ul",{onClick:A=>x(),class:"text-black dark:text-white-dark whitespace-nowrap"},[c("li",null,[c("a",{href:"javascript:;",onClick:A=>d(v)},"Edit ",8,Po)]),c("li",null,[c("a",{href:"javascript:;",onClick:A=>f(v)},"Delete ",8,No)]),c("li",null,[c("a",{href:"javascript:;",onClick:A=>y(v)},"Clear All ",8,Mo)])],8,Ao)]),default:F(()=>[c("button",Oo,[E(hn,{class:"opacity-70 hover:opacity-100"})])]),_:2},1032,["placement"])])])]),E(P(oo),{class:"connect-sorting-content min-h-[150px]",group:"default","ghost-class":"sortable-ghost","drag-class":"sortable-drag",animation:200},{default:F(()=>[(U(!0),q(ee,null,ne(v.tasks,x=>{var A;return U(),q("div",{class:"sortable-list",key:v.id+""+x.id},[c("div",Lo,[x.image?(U(),q("img",Fo)):pn("",!0),c("div",$o,it(x.title),1),c("p",jo,it(x.description),1),c("div",Xo,[(A=x.tags)!=null&&A.length?(U(!0),q(ee,{key:0},ne(x.tags,(Z,$)=>(U(),q("div",{key:$,class:"btn px-2 py-1 flex btn-outline-primary"},[E(Ne,{class:"shrink-0"}),c("span",Bo,it(Z),1)]))),128)):(U(),q("div",Yo,[E(Ne,{class:"shrink-0"}),Ro]))]),c("div",Vo,[c("div",Ho,[E(vn,{class:"ltr:mr-3 rtl:ml-3 shrink-0"}),c("span",null,it(x.date),1)]),c("div",Wo,[c("button",{type:"button",class:"hover:text-info",onClick:Z=>D(v.id,x)},[E(wo,{class:"ltr:mr-3 rtl:ml-3"})],8,zo),c("button",{type:"button",class:"hover:text-danger",onClick:Z=>S(v.id,x)},[E(Le)],8,Go)])])])])}),128))]),_:2},1024),c("div",Uo,[c("button",{type:"button",class:"btn btn-primary mx-auto",onClick:x=>D(v.id)},[E(Pe),Ae(" Add Task ")],8,qo)])]))),128))])])]),E(P(oe),{appear:"",show:r.value,as:"template"},{default:F(()=>[E(P(ie),{as:"div",onClose:h[4]||(h[4]=v=>r.value=!1),class:"relative z-[51]"},{default:F(()=>[E(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:F(()=>[E(P(re),{class:"fixed inset-0 bg-[black]/60"})]),_:1}),c("div",Jo,[c("div",Zo,[E(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:F(()=>[E(P(ae),{class:"panel border-0 p-0 rounded-lg overflow-hidden w-full max-w-lg text-black dark:text-white-dark"},{default:F(()=>[c("button",{type:"button",class:"absolute top-4 ltr:right-4 rtl:left-4 text-gray-400 hover:text-gray-800 dark:hover:text-gray-600 outline-none",onClick:h[1]||(h[1]=v=>r.value=!1)},[E(se)]),c("div",Ko,it(n.value.id?"Edit Project":"Add Project"),1),c("div",Qo,[c("form",{onSubmit:Me(p,["prevent"])},[c("div",ei,[c("div",null,[ni,jt(c("input",{id:"title","onUpdate:modelValue":h[2]||(h[2]=v=>n.value.title=v),type:"text",class:"form-input mt-1",placeholder:"Enter Name"},null,512),[[Xt,n.value.title]])])]),c("div",oi,[c("button",{type:"button",class:"btn btn-outline-danger",onClick:h[3]||(h[3]=v=>r.value=!1)},"Cancel"),c("button",ii,it(n.value.id?"Update":"Add"),1)])],40,ti)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"]),E(P(oe),{appear:"",show:a.value,as:"template"},{default:F(()=>[E(P(ie),{as:"div",onClose:h[10]||(h[10]=v=>a.value=!1),class:"relative z-[51]"},{default:F(()=>[E(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:F(()=>[E(P(re),{class:"fixed inset-0 bg-[black]/60"})]),_:1}),c("div",ri,[c("div",ai,[E(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:F(()=>[E(P(ae),{class:"panel border-0 p-0 rounded-lg overflow-hidden w-full max-w-lg text-black dark:text-white-dark"},{default:F(()=>[c("button",{type:"button",class:"absolute top-4 ltr:right-4 rtl:left-4 text-gray-400 hover:text-gray-800 dark:hover:text-gray-600 outline-none",onClick:h[5]||(h[5]=v=>a.value=!1)},[E(se)]),c("div",si,it(o.value.id?"Edit Task":"Add Task"),1),c("div",li,[c("form",{onSubmit:Me(w,["prevent"])},[c("div",ui,[c("div",null,[ci,jt(c("input",{id:"taskTitle","onUpdate:modelValue":h[6]||(h[6]=v=>o.value.title=v),type:"text",class:"form-input",placeholder:"Enter Name"},null,512),[[Xt,o.value.title]])]),c("div",null,[fi,jt(c("input",{id:"taskTag","onUpdate:modelValue":h[7]||(h[7]=v=>o.value.tags=v),type:"text",class:"form-input",placeholder:"Enter Tag"},null,512),[[Xt,o.value.tags]])]),c("div",null,[hi,jt(c("textarea",{id:"taskdesc","onUpdate:modelValue":h[8]||(h[8]=v=>o.value.description=v),class:"form-textarea min-h-[130px]",placeholder:"Enter Description"},null,512),[[Xt,o.value.description]])])]),c("div",pi,[c("button",{type:"button",class:"btn btn-outline-danger",onClick:h[9]||(h[9]=v=>a.value=!1)},"Cancel"),c("button",mi,it(o.value.id?"Update":"Add"),1)])],40,di)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"]),E(P(oe),{appear:"",show:s.value,as:"template"},{default:F(()=>[E(P(ie),{as:"div",onClose:h[14]||(h[14]=v=>s.value=!1),class:"relative z-[51]"},{default:F(()=>[E(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:F(()=>[E(P(re),{class:"fixed inset-0 bg-[black]/60"})]),_:1}),c("div",gi,[c("div",vi,[E(P(bt),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:F(()=>[E(P(ae),{class:"panel border-0 p-0 rounded-lg overflow-hidden w-full max-w-lg text-black dark:text-white-dark"},{default:F(()=>[c("button",{type:"button",class:"absolute top-4 ltr:right-4 rtl:left-4 text-gray-400 hover:text-gray-800 dark:hover:text-gray-600 outline-none",onClick:h[11]||(h[11]=v=>s.value=!1)},[E(se)]),bi,c("div",_i,[c("div",yi,[E(Le)]),wi,c("div",xi,[c("button",{type:"button",class:"btn btn-outline-danger",onClick:h[12]||(h[12]=v=>s.value=!1)},"Cancel"),c("button",{type:"button",class:"btn btn-primary ltr:ml-4 rtl:mr-4",onClick:h[13]||(h[13]=v=>V())},"Delete")])])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"])])}}});export{Ai as default};