diff --git a/public/build/assets/curated-collections-addon-86a3f4b6.js b/public/build/assets/curated-collections-addon-d6c47609.js similarity index 90% rename from public/build/assets/curated-collections-addon-86a3f4b6.js rename to public/build/assets/curated-collections-addon-d6c47609.js index c78f8ec..377f2b3 100644 --- a/public/build/assets/curated-collections-addon-86a3f4b6.js +++ b/public/build/assets/curated-collections-addon-d6c47609.js @@ -8,4 +8,4 @@ function bt(n,t,e,r,a,o,i,s){var l=typeof n=="function"?n.options:n;t&&(l.render * @license MIT */function Ne(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ne=function(t){return typeof t}:Ne=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(n)}function rs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function xt(){return xt=Object.assign||function(n){for(var t=1;t=0)&&(e[a]=n[a]);return e}function os(n,t){if(n==null)return{};var e=ns(n,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(e[r]=n[r])}return e}function as(n){return is(n)||ss(n)||ls()}function is(n){if(Array.isArray(n)){for(var t=0,e=new Array(n.length);t"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function fs(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Ct(n,t,e,r){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Ve(n,t):Ve(n,t))||r&&n===e)return n;if(n===e)break}while(n=fs(n))}return null}var vn=/\s+/g;function Z(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var r=(" "+n.className+" ").replace(vn," ").replace(" "+t+" "," ");n.className=(r+(e?" "+t:"")).replace(vn," ")}}function C(n,t,e){var r=n&&n.style;if(r){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=e+(typeof e=="string"?"":"px")}}function Vt(n,t){var e="";if(typeof n=="string")e=n;else do{var r=C(n,"transform");r&&r!=="none"&&(e=r+" "+e)}while(!t&&(n=n.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(e)}function kn(n,t,e){if(n){var r=n.getElementsByTagName(t),a=0,o=r.length;if(e)for(;a=o:i=a<=o,!i)return r;if(r===Tt())break;r=Nt(r,!1)}return!1}function Ke(n,t,e){for(var r=0,a=0,o=n.children;a2&&arguments[2]!==void 0?arguments[2]:{},a=r.evt,o=os(r,["evt"]);Ce.pluginEvent.bind($)(t,e,Lt({dragEl:x,parentEl:ot,ghostEl:M,rootEl:k,nextEl:Gt,lastDownEl:Le,cloneEl:q,cloneHidden:Ft,dragStarted:fe,putSortable:ut,activeSortable:$.active,originalEvent:a,oldIndex:Zt,oldDraggableIndex:me,newIndex:mt,newDraggableIndex:Mt,hideGhostForTarget:no,unhideGhostForTarget:oo,cloneNowHidden:function(){Ft=!0},cloneNowShown:function(){Ft=!1},dispatchSortableEvent:function(s){ht({sortable:e,name:s,originalEvent:a})}},o))};function ht(n){ce(Lt({putSortable:ut,cloneEl:q,targetEl:x,rootEl:k,oldIndex:Zt,oldDraggableIndex:me,newIndex:mt,newDraggableIndex:Mt},n))}var x,ot,M,k,Gt,Le,q,Ft,Zt,mt,me,Mt,Te,ut,kt=!1,Xe=!1,Ye=[],Bt,Et,dr,pr,bn,Sn,fe,Yt,be,Se=!1,$e=!1,je,ct,hr=[],Tr=!1,Qe=[],ke=typeof document<"u",Ie=Qn,xn=we||It?"cssFloat":"float",ms=ke&&!cs&&!Qn&&"draggable"in document.createElement("div"),to=function(){if(ke){if(It)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),eo=function(t,e){var r=C(t),a=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Ke(t,0,e),i=Ke(t,1,e),s=o&&C(o),l=i&&C(i),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+et(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+et(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=a&&r[xn]==="none"||i&&r[xn]==="none"&&u+c>a)?"vertical":"horizontal"},bs=function(t,e,r){var a=r?t.left:t.top,o=r?t.right:t.bottom,i=r?t.width:t.height,s=r?e.left:e.top,l=r?e.right:e.bottom,u=r?e.width:e.height;return a===s||o===l||a+i/2===s+u/2},Ss=function(t,e){var r;return Ye.some(function(a){if(!Ur(a)){var o=et(a),i=a[ft].options.emptyInsertThreshold,s=t>=o.left-i&&t<=o.right+i,l=e>=o.top-i&&e<=o.bottom+i;if(i&&s&&l)return r=a}}),r},ro=function(t){function e(o,i){return function(s,l,u,c){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(o==null&&(i||f))return!0;if(o==null||o===!1)return!1;if(i&&o==="clone")return o;if(typeof o=="function")return e(o(s,l,u,c),i)(s,l,u,c);var d=(i?s:l).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var r={},a=t.group;(!a||Ne(a)!="object")&&(a={name:a}),r.name=a.name,r.checkPull=e(a.pull,!0),r.checkPut=e(a.put),r.revertClone=a.revertClone,t.group=r},no=function(){!to&&M&&C(M,"display","none")},oo=function(){!to&&M&&C(M,"display","")};ke&&document.addEventListener("click",function(n){if(Xe)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Xe=!1,!1},!0);var Ut=function(t){if(x){t=t.touches?t.touches[0]:t;var e=Ss(t.clientX,t.clientY);if(e){var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);r.target=r.rootEl=e,r.preventDefault=void 0,r.stopPropagation=void 0,e[ft]._onDragOver(r)}}},xs=function(t){x&&x.parentNode[ft]._isOutsideThisEl(t.target)};function $(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=xt({},t),n[ft]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return eo(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,s){i.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:$.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};Ce.initializePlugins(this,n,e);for(var r in e)!(r in t)&&(t[r]=e[r]);ro(t);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=t.forceFallback?!1:ms,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?H(n,"pointerdown",this._onTapStart):(H(n,"mousedown",this._onTapStart),H(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(H(n,"dragover",this),H(n,"dragenter",this)),Ye.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),xt(this,vs())}$.prototype={constructor:$,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Yt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,x):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,r=this.el,a=this.options,o=a.preventOnFilter,i=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=a.filter;if(Ps(r),!x&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||a.disabled)&&!u.isContentEditable&&(l=Ct(l,a.draggable,r,!1),!(l&&l.animated)&&Le!==l)){if(Zt=tt(l),me=tt(l,a.draggable),typeof c=="function"){if(c.call(this,t,l,this)){ht({sortable:e,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),vt("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Ct(u,f.trim(),r,!1),f)return ht({sortable:e,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),vt("filter",e,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}a.handle&&!Ct(u,a.handle,r,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,e,r){var a=this,o=a.el,i=a.options,s=o.ownerDocument,l;if(r&&!x&&r.parentNode===o){var u=et(r);if(k=o,x=r,ot=x.parentNode,Gt=x.nextSibling,Le=r,Te=i.group,$.dragged=x,Bt={target:x,clientX:(e||t).clientX,clientY:(e||t).clientY},bn=Bt.clientX-u.left,Sn=Bt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,x.style["will-change"]="all",l=function(){if(vt("delayEnded",a,{evt:t}),$.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!hn&&a.nativeDraggable&&(x.draggable=!0),a._triggerDragStart(t,e),ht({sortable:a,name:"choose",originalEvent:t}),Z(x,i.chosenClass,!0)},i.ignore.split(",").forEach(function(c){kn(x,c.trim(),gr)}),H(s,"dragover",Ut),H(s,"mousemove",Ut),H(s,"touchmove",Ut),H(s,"mouseup",a._onDrop),H(s,"touchend",a._onDrop),H(s,"touchcancel",a._onDrop),hn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,x.draggable=!0),vt("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(we||It))){if($.eventCanceled){this._onDrop();return}H(s,"mouseup",a._disableDelayedDrag),H(s,"touchend",a._disableDelayedDrag),H(s,"touchcancel",a._disableDelayedDrag),H(s,"mousemove",a._delayedDragTouchMoveHandler),H(s,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&H(s,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){x&&gr(x),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;B(t,"mouseup",this._disableDelayedDrag),B(t,"touchend",this._disableDelayedDrag),B(t,"touchcancel",this._disableDelayedDrag),B(t,"mousemove",this._delayedDragTouchMoveHandler),B(t,"touchmove",this._delayedDragTouchMoveHandler),B(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?H(document,"pointermove",this._onTouchMove):e?H(document,"touchmove",this._onTouchMove):H(document,"mousemove",this._onTouchMove):(H(x,"dragend",this),H(k,"dragstart",this._onDragStart));try{document.selection?Be(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(kt=!1,k&&x){vt("dragStarted",this,{evt:e}),this.nativeDraggable&&H(document,"dragover",xs);var r=this.options;!t&&Z(x,r.dragClass,!1),Z(x,r.ghostClass,!0),$.active=this,t&&this._appendGhost(),ht({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Et){this._lastX=Et.clientX,this._lastY=Et.clientY,no();for(var t=document.elementFromPoint(Et.clientX,Et.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Et.clientX,Et.clientY),t!==e);)e=t;if(x.parentNode[ft]._isOutsideThisEl(t),e)do{if(e[ft]){var r=void 0;if(r=e[ft]._onDragOver({clientX:Et.clientX,clientY:Et.clientY,target:t,rootEl:e}),r&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);oo()}},_onTouchMove:function(t){if(Bt){var e=this.options,r=e.fallbackTolerance,a=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=M&&Vt(M,!0),s=M&&i&&i.a,l=M&&i&&i.d,u=Ie&&ct&&yn(ct),c=(o.clientX-Bt.clientX+a.x)/(s||1)+(u?u[0]-hr[0]:0)/(s||1),f=(o.clientY-Bt.clientY+a.y)/(l||1)+(u?u[1]-hr[1]:0)/(l||1);if(!$.active&&!kt){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(ht({rootEl:ot,name:"add",toEl:ot,fromEl:k,originalEvent:t}),ht({sortable:this,name:"remove",toEl:ot,originalEvent:t}),ht({rootEl:ot,name:"sort",toEl:ot,fromEl:k,originalEvent:t}),ht({sortable:this,name:"sort",toEl:ot,originalEvent:t})),ut&&ut.save()):mt!==Zt&&mt>=0&&(ht({sortable:this,name:"update",toEl:ot,originalEvent:t}),ht({sortable:this,name:"sort",toEl:ot,originalEvent:t})),$.active&&((mt==null||mt===-1)&&(mt=Zt,Mt=me),ht({sortable:this,name:"end",toEl:ot,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){vt("nulling",this),k=x=ot=M=Gt=q=Le=Ft=Bt=Et=fe=mt=Mt=Zt=me=Yt=be=ut=Te=$.dragged=$.ghost=$.clone=$.active=null,Qe.forEach(function(t){t.checked=!0}),Qe.length=dr=pr=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":x&&(this._onDragOver(t),Es(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,r=this.el.children,a=0,o=r.length,i=this.options;ar.right+a||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+a}function Os(n,t,e,r,a,o,i,s){var l=r?n.clientY:n.clientX,u=r?e.height:e.width,c=r?e.top:e.left,f=r?e.bottom:e.right,d=!1;if(!i){if(s&&jec+u*o/2:lf-je)return-be}else if(l>c+u*(1-a)/2&&lf-u*o/2)?l>c+u/2?1:-1:0}function Ds(n){return tt(x)1&&(_.forEach(function(s){o.addAnimationState({target:s,rect:gt?et(s):i}),cr(s),s.fromRect=i,r.removeAnimationState(s)}),gt=!1,Ms(!this.options.removeCloneOnHide,a))},dragOverCompleted:function(e){var r=e.sortable,a=e.isOwner,o=e.insertion,i=e.activeSortable,s=e.parentEl,l=e.putSortable,u=this.options;if(o){if(a&&i._hideClone(),le=!1,u.animation&&_.length>1&&(gt||!a&&!i.options.sort&&!l)){var c=et(Q,!1,!0,!0);_.forEach(function(d){d!==Q&&(mn(d,c),s.appendChild(d))}),gt=!0}if(!a)if(gt||Me(),_.length>1){var f=_e;i._showClone(r),i.options.animation&&!_e&&f&&yt.forEach(function(d){i.addAnimationState({target:d,rect:ue}),d.fromRect=ue,d.thisAnimationDuration=null})}else i._showClone(r)}},dragOverAnimationCapture:function(e){var r=e.dragRect,a=e.isOwner,o=e.activeSortable;if(_.forEach(function(s){s.thisAnimationDuration=null}),o.options.animation&&!a&&o.multiDrag.isMultiDrag){ue=xt({},r);var i=Vt(Q,!0);ue.top-=i.f,ue.left-=i.e}},dragOverAnimationComplete:function(){gt&&(gt=!1,Me())},drop:function(e){var r=e.originalEvent,a=e.rootEl,o=e.parentEl,i=e.sortable,s=e.dispatchSortableEvent,l=e.oldIndex,u=e.putSortable,c=u||this.sortable;if(r){var f=this.options,d=o.children;if(!Qt)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Z(Q,f.selectedClass,!~_.indexOf(Q)),~_.indexOf(Q))_.splice(_.indexOf(Q),1),se=null,ce({sortable:i,rootEl:a,name:"deselect",targetEl:Q,originalEvt:r});else{if(_.push(Q),ce({sortable:i,rootEl:a,name:"select",targetEl:Q,originalEvt:r}),r.shiftKey&&se&&i.el.contains(se)){var v=tt(se),p=tt(Q);if(~v&&~p&&v!==p){var h,b;for(p>v?(b=v,h=p):(b=p,h=v+1);b1){var w=et(Q),O=tt(Q,":not(."+this.options.selectedClass+")");if(!le&&f.animation&&(Q.thisAnimationDuration=null),c.captureAnimationState(),!le&&(f.animation&&(Q.fromRect=w,_.forEach(function(E){if(E.thisAnimationDuration=null,E!==Q){var I=gt?et(E):w;E.fromRect=I,c.addAnimationState({target:E,rect:I})}})),Me(),_.forEach(function(E){d[O]?o.insertBefore(E,d[O]):o.appendChild(E),O++}),l===tt(Q))){var S=!1;_.forEach(function(E){if(E.sortableIndex!==tt(E)){S=!0;return}}),S&&s("update")}_.forEach(function(E){cr(E)}),c.animateAll()}wt=c}(a===o||u&&u.lastPutMode!=="clone")&&yt.forEach(function(E){E.parentNode&&E.parentNode.removeChild(E)})}},nullingGlobal:function(){this.isMultiDrag=Qt=!1,yt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),B(document,"pointerup",this._deselectMultiDrag),B(document,"mouseup",this._deselectMultiDrag),B(document,"touchend",this._deselectMultiDrag),B(document,"keydown",this._checkKeyDown),B(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(typeof Qt<"u"&&Qt)&&wt===this.sortable&&!(e&&Ct(e.target,this.options.draggable,this.sortable.el,!1))&&!(e&&e.button!==0))for(;_.length;){var r=_[0];Z(r,this.options.selectedClass,!1),_.shift(),ce({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},xt(n,{pluginName:"multiDrag",utils:{select:function(e){var r=e.parentNode[ft];!r||!r.options.multiDrag||~_.indexOf(e)||(wt&&wt!==r&&(wt.multiDrag._deselectMultiDrag(),wt=r),Z(e,r.options.selectedClass,!0),_.push(e))},deselect:function(e){var r=e.parentNode[ft],a=_.indexOf(e);!r||!r.options.multiDrag||!~a||(Z(e,r.options.selectedClass,!1),_.splice(a,1))}},eventProperties:function(){var e=this,r=[],a=[];return _.forEach(function(o){r.push({multiDragElement:o,index:o.sortableIndex});var i;gt&&o!==Q?i=-1:gt?i=tt(o,":not(."+e.options.selectedClass+")"):i=tt(o),a.push({multiDragElement:o,index:i})}),{items:as(_),clones:[].concat(yt),oldIndicies:r,newIndicies:a}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),e==="ctrl"?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Ms(n,t){_.forEach(function(e,r){var a=t.children[e.sortableIndex+(n?Number(r):0)];a?t.insertBefore(e,a):t.appendChild(e)})}function wn(n,t){yt.forEach(function(e,r){var a=t.children[e.sortableIndex+(n?Number(r):0)];a?t.insertBefore(e,a):t.appendChild(e)})}function Me(){_.forEach(function(n){n!==Q&&n.parentNode&&n.parentNode.removeChild(n)})}$.mount(new Ts);$.mount(Hr,Wr);const Fs=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:_s,Sortable:$,Swap:$s,default:$},Symbol.toStringTag,{value:"Module"})),Rs=An(Fs);(function(n,t){(function(r,a){n.exports=a(Rs)})(typeof self<"u"?self:On,function(e){return function(r){var a={};function o(i){if(a[i])return a[i].exports;var s=a[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=r,o.c=a,o.d=function(i,s,l){o.o(i,s)||Object.defineProperty(i,s,{enumerable:!0,get:l})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,s){if(s&1&&(i=o(i)),s&8||s&4&&typeof i=="object"&&i&&i.__esModule)return i;var l=Object.create(null);if(o.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:i}),s&2&&typeof i!="string")for(var u in i)o.d(l,u,(function(c){return i[c]}).bind(null,u));return l},o.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(s,"a",s),s},o.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},o.p="",o(o.s="fb15")}({"01f9":function(r,a,o){var i=o("2d00"),s=o("5ca1"),l=o("2aba"),u=o("32e9"),c=o("84f2"),f=o("41a0"),d=o("7f20"),v=o("38fd"),p=o("2b4c")("iterator"),h=!([].keys&&"next"in[].keys()),b="@@iterator",w="keys",O="values",S=function(){return this};r.exports=function(E,I,F,U,P,T,A){f(F,I,U);var R=function(y){if(!h&&y in L)return L[y];switch(y){case w:return function(){return new F(this,y)};case O:return function(){return new F(this,y)}}return function(){return new F(this,y)}},X=I+" Iterator",z=P==O,V=!1,L=E.prototype,G=L[p]||L[b]||P&&L[P],Y=G||R(P),pt=P?z?R("entries"):Y:void 0,it=I=="Array"&&L.entries||G,J,m,g;if(it&&(g=v(it.call(new E)),g!==Object.prototype&&g.next&&(d(g,X,!0),!i&&typeof g[p]!="function"&&u(g,p,S))),z&&G&&G.name!==O&&(V=!0,Y=function(){return G.call(this)}),(!i||A)&&(h||V||!L[p])&&u(L,p,Y),c[I]=Y,c[X]=S,P)if(J={values:z?Y:R(O),keys:T?Y:R(w),entries:pt},A)for(m in J)m in L||l(L,m,J[m]);else s(s.P+s.F*(h||V),I,J);return J}},"02f4":function(r,a,o){var i=o("4588"),s=o("be13");r.exports=function(l){return function(u,c){var f=String(s(u)),d=i(c),v=f.length,p,h;return d<0||d>=v?l?"":void 0:(p=f.charCodeAt(d),p<55296||p>56319||d+1===v||(h=f.charCodeAt(d+1))<56320||h>57343?l?f.charAt(d):p:l?f.slice(d,d+2):(p-55296<<10)+(h-56320)+65536)}}},"0390":function(r,a,o){var i=o("02f4")(!0);r.exports=function(s,l,u){return l+(u?i(s,l).length:1)}},"0bfb":function(r,a,o){var i=o("cb7c");r.exports=function(){var s=i(this),l="";return s.global&&(l+="g"),s.ignoreCase&&(l+="i"),s.multiline&&(l+="m"),s.unicode&&(l+="u"),s.sticky&&(l+="y"),l}},"0d58":function(r,a,o){var i=o("ce10"),s=o("e11e");r.exports=Object.keys||function(u){return i(u,s)}},1495:function(r,a,o){var i=o("86cc"),s=o("cb7c"),l=o("0d58");r.exports=o("9e1e")?Object.defineProperties:function(c,f){s(c);for(var d=l(f),v=d.length,p=0,h;v>p;)i.f(c,h=d[p++],f[h]);return c}},"214f":function(r,a,o){o("b0c5");var i=o("2aba"),s=o("32e9"),l=o("79e5"),u=o("be13"),c=o("2b4c"),f=o("520a"),d=c("species"),v=!l(function(){var h=/./;return h.exec=function(){var b=[];return b.groups={a:"7"},b},"".replace(h,"$")!=="7"}),p=function(){var h=/(?:)/,b=h.exec;h.exec=function(){return b.apply(this,arguments)};var w="ab".split(h);return w.length===2&&w[0]==="a"&&w[1]==="b"}();r.exports=function(h,b,w){var O=c(h),S=!l(function(){var T={};return T[O]=function(){return 7},""[h](T)!=7}),E=S?!l(function(){var T=!1,A=/a/;return A.exec=function(){return T=!0,null},h==="split"&&(A.constructor={},A.constructor[d]=function(){return A}),A[O](""),!T}):void 0;if(!S||!E||h==="replace"&&!v||h==="split"&&!p){var I=/./[O],F=w(u,O,""[h],function(A,R,X,z,V){return R.exec===f?S&&!V?{done:!0,value:I.call(R,X,z)}:{done:!0,value:A.call(X,R,z)}:{done:!1}}),U=F[0],P=F[1];i(String.prototype,h,U),s(RegExp.prototype,O,b==2?function(T,A){return P.call(T,this,A)}:function(T){return P.call(T,this)})}}},"230e":function(r,a,o){var i=o("d3f4"),s=o("7726").document,l=i(s)&&i(s.createElement);r.exports=function(u){return l?s.createElement(u):{}}},"23c6":function(r,a,o){var i=o("2d95"),s=o("2b4c")("toStringTag"),l=i(function(){return arguments}())=="Arguments",u=function(c,f){try{return c[f]}catch{}};r.exports=function(c){var f,d,v;return c===void 0?"Undefined":c===null?"Null":typeof(d=u(f=Object(c),s))=="string"?d:l?i(f):(v=i(f))=="Object"&&typeof f.callee=="function"?"Arguments":v}},2621:function(r,a){a.f=Object.getOwnPropertySymbols},"2aba":function(r,a,o){var i=o("7726"),s=o("32e9"),l=o("69a8"),u=o("ca5a")("src"),c=o("fa5b"),f="toString",d=(""+c).split(f);o("8378").inspectSource=function(v){return c.call(v)},(r.exports=function(v,p,h,b){var w=typeof h=="function";w&&(l(h,"name")||s(h,"name",p)),v[p]!==h&&(w&&(l(h,u)||s(h,u,v[p]?""+v[p]:d.join(String(p)))),v===i?v[p]=h:b?v[p]?v[p]=h:s(v,p,h):(delete v[p],s(v,p,h)))})(Function.prototype,f,function(){return typeof this=="function"&&this[u]||c.call(this)})},"2aeb":function(r,a,o){var i=o("cb7c"),s=o("1495"),l=o("e11e"),u=o("613b")("IE_PROTO"),c=function(){},f="prototype",d=function(){var v=o("230e")("iframe"),p=l.length,h="<",b=">",w;for(v.style.display="none",o("fab2").appendChild(v),v.src="javascript:",w=v.contentWindow.document,w.open(),w.write(h+"script"+b+"document.F=Object"+h+"/script"+b),w.close(),d=w.F;p--;)delete d[f][l[p]];return d()};r.exports=Object.create||function(p,h){var b;return p!==null?(c[f]=i(p),b=new c,c[f]=null,b[u]=p):b=d(),h===void 0?b:s(b,h)}},"2b4c":function(r,a,o){var i=o("5537")("wks"),s=o("ca5a"),l=o("7726").Symbol,u=typeof l=="function",c=r.exports=function(f){return i[f]||(i[f]=u&&l[f]||(u?l:s)("Symbol."+f))};c.store=i},"2d00":function(r,a){r.exports=!1},"2d95":function(r,a){var o={}.toString;r.exports=function(i){return o.call(i).slice(8,-1)}},"2fdb":function(r,a,o){var i=o("5ca1"),s=o("d2c8"),l="includes";i(i.P+i.F*o("5147")(l),"String",{includes:function(c){return!!~s(this,c,l).indexOf(c,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(r,a,o){var i=o("86cc"),s=o("4630");r.exports=o("9e1e")?function(l,u,c){return i.f(l,u,s(1,c))}:function(l,u,c){return l[u]=c,l}},"38fd":function(r,a,o){var i=o("69a8"),s=o("4bf8"),l=o("613b")("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(c){return c=s(c),i(c,l)?c[l]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?u:null}},"41a0":function(r,a,o){var i=o("2aeb"),s=o("4630"),l=o("7f20"),u={};o("32e9")(u,o("2b4c")("iterator"),function(){return this}),r.exports=function(c,f,d){c.prototype=i(u,{next:s(1,d)}),l(c,f+" Iterator")}},"456d":function(r,a,o){var i=o("4bf8"),s=o("0d58");o("5eda")("keys",function(){return function(u){return s(i(u))}})},4588:function(r,a){var o=Math.ceil,i=Math.floor;r.exports=function(s){return isNaN(s=+s)?0:(s>0?i:o)(s)}},4630:function(r,a){r.exports=function(o,i){return{enumerable:!(o&1),configurable:!(o&2),writable:!(o&4),value:i}}},"4bf8":function(r,a,o){var i=o("be13");r.exports=function(s){return Object(i(s))}},5147:function(r,a,o){var i=o("2b4c")("match");r.exports=function(s){var l=/./;try{"/./"[s](l)}catch{try{return l[i]=!1,!"/./"[s](l)}catch{}}return!0}},"520a":function(r,a,o){var i=o("0bfb"),s=RegExp.prototype.exec,l=String.prototype.replace,u=s,c="lastIndex",f=function(){var p=/a/,h=/b*/g;return s.call(p,"a"),s.call(h,"a"),p[c]!==0||h[c]!==0}(),d=/()??/.exec("")[1]!==void 0,v=f||d;v&&(u=function(h){var b=this,w,O,S,E;return d&&(O=new RegExp("^"+b.source+"$(?!\\s)",i.call(b))),f&&(w=b[c]),S=s.call(b,h),f&&S&&(b[c]=b.global?S.index+S[0].length:w),d&&S&&S.length>1&&l.call(S[0],O,function(){for(E=1;E1?arguments[1]:void 0)}}),o("9c6c")("includes")},6821:function(r,a,o){var i=o("626a"),s=o("be13");r.exports=function(l){return i(s(l))}},"69a8":function(r,a){var o={}.hasOwnProperty;r.exports=function(i,s){return o.call(i,s)}},"6a99":function(r,a,o){var i=o("d3f4");r.exports=function(s,l){if(!i(s))return s;var u,c;if(l&&typeof(u=s.toString)=="function"&&!i(c=u.call(s))||typeof(u=s.valueOf)=="function"&&!i(c=u.call(s))||!l&&typeof(u=s.toString)=="function"&&!i(c=u.call(s)))return c;throw TypeError("Can't convert object to primitive value")}},7333:function(r,a,o){var i=o("0d58"),s=o("2621"),l=o("52a7"),u=o("4bf8"),c=o("626a"),f=Object.assign;r.exports=!f||o("79e5")(function(){var d={},v={},p=Symbol(),h="abcdefghijklmnopqrst";return d[p]=7,h.split("").forEach(function(b){v[b]=b}),f({},d)[p]!=7||Object.keys(f({},v)).join("")!=h})?function(v,p){for(var h=u(v),b=arguments.length,w=1,O=s.f,S=l.f;b>w;)for(var E=c(arguments[w++]),I=O?i(E).concat(O(E)):i(E),F=I.length,U=0,P;F>U;)S.call(E,P=I[U++])&&(h[P]=E[P]);return h}:f},7726:function(r,a){var o=r.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=o)},"77f1":function(r,a,o){var i=o("4588"),s=Math.max,l=Math.min;r.exports=function(u,c){return u=i(u),u<0?s(u+c,0):l(u,c)}},"79e5":function(r,a){r.exports=function(o){try{return!!o()}catch{return!0}}},"7f20":function(r,a,o){var i=o("86cc").f,s=o("69a8"),l=o("2b4c")("toStringTag");r.exports=function(u,c,f){u&&!s(u=f?u:u.prototype,l)&&i(u,l,{configurable:!0,value:c})}},8378:function(r,a){var o=r.exports={version:"2.6.5"};typeof __e=="number"&&(__e=o)},"84f2":function(r,a){r.exports={}},"86cc":function(r,a,o){var i=o("cb7c"),s=o("c69a"),l=o("6a99"),u=Object.defineProperty;a.f=o("9e1e")?Object.defineProperty:function(f,d,v){if(i(f),d=l(d,!0),i(v),s)try{return u(f,d,v)}catch{}if("get"in v||"set"in v)throw TypeError("Accessors not supported!");return"value"in v&&(f[d]=v.value),f}},"9b43":function(r,a,o){var i=o("d8e8");r.exports=function(s,l,u){if(i(s),l===void 0)return s;switch(u){case 1:return function(c){return s.call(l,c)};case 2:return function(c,f){return s.call(l,c,f)};case 3:return function(c,f,d){return s.call(l,c,f,d)}}return function(){return s.apply(l,arguments)}}},"9c6c":function(r,a,o){var i=o("2b4c")("unscopables"),s=Array.prototype;s[i]==null&&o("32e9")(s,i,{}),r.exports=function(l){s[i][l]=!0}},"9def":function(r,a,o){var i=o("4588"),s=Math.min;r.exports=function(l){return l>0?s(i(l),9007199254740991):0}},"9e1e":function(r,a,o){r.exports=!o("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},a352:function(r,a){r.exports=e},a481:function(r,a,o){var i=o("cb7c"),s=o("4bf8"),l=o("9def"),u=o("4588"),c=o("0390"),f=o("5f1b"),d=Math.max,v=Math.min,p=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,b=/\$([$&`']|\d\d?)/g,w=function(O){return O===void 0?O:String(O)};o("214f")("replace",2,function(O,S,E,I){return[function(P,T){var A=O(this),R=P==null?void 0:P[S];return R!==void 0?R.call(P,A,T):E.call(String(A),P,T)},function(U,P){var T=I(E,U,this,P);if(T.done)return T.value;var A=i(U),R=String(this),X=typeof P=="function";X||(P=String(P));var z=A.global;if(z){var V=A.unicode;A.lastIndex=0}for(var L=[];;){var G=f(A,R);if(G===null||(L.push(G),!z))break;var Y=String(G[0]);Y===""&&(A.lastIndex=c(R,l(A.lastIndex),V))}for(var pt="",it=0,J=0;J=it&&(pt+=R.slice(it,g)+K,it=g+m.length)}return pt+R.slice(it)}];function F(U,P,T,A,R,X){var z=T+U.length,V=A.length,L=b;return R!==void 0&&(R=s(R),L=h),E.call(X,L,function(G,Y){var pt;switch(Y.charAt(0)){case"$":return"$";case"&":return U;case"`":return P.slice(0,T);case"'":return P.slice(z);case"<":pt=R[Y.slice(1,-1)];break;default:var it=+Y;if(it===0)return G;if(it>V){var J=p(it/10);return J===0?G:J<=V?A[J-1]===void 0?Y.charAt(1):A[J-1]+Y.charAt(1):G}pt=A[it-1]}return pt===void 0?"":pt})}})},aae3:function(r,a,o){var i=o("d3f4"),s=o("2d95"),l=o("2b4c")("match");r.exports=function(u){var c;return i(u)&&((c=u[l])!==void 0?!!c:s(u)=="RegExp")}},ac6a:function(r,a,o){for(var i=o("cadf"),s=o("0d58"),l=o("2aba"),u=o("7726"),c=o("32e9"),f=o("84f2"),d=o("2b4c"),v=d("iterator"),p=d("toStringTag"),h=f.Array,b={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},w=s(b),O=0;Oh;)if(b=v[h++],b!=b)return!0}else for(;p>h;h++)if((u||h in v)&&v[h]===f)return u||h||0;return!u&&-1}}},c649:function(r,a,o){(function(i){o.d(a,"c",function(){return v}),o.d(a,"a",function(){return f}),o.d(a,"b",function(){return l}),o.d(a,"d",function(){return d}),o("a481");function s(){return typeof window<"u"?window.console:i.console}var l=s();function u(p){var h=Object.create(null);return function(w){var O=h[w];return O||(h[w]=p(w))}}var c=/-(\w)/g,f=u(function(p){return p.replace(c,function(h,b){return b?b.toUpperCase():""})});function d(p){p.parentElement!==null&&p.parentElement.removeChild(p)}function v(p,h,b){var w=b===0?p.children[0]:p.children[b-1].nextSibling;p.insertBefore(h,w)}}).call(this,o("c8ba"))},c69a:function(r,a,o){r.exports=!o("9e1e")&&!o("79e5")(function(){return Object.defineProperty(o("230e")("div"),"a",{get:function(){return 7}}).a!=7})},c8ba:function(r,a){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}r.exports=o},ca5a:function(r,a){var o=0,i=Math.random();r.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++o+i).toString(36))}},cadf:function(r,a,o){var i=o("9c6c"),s=o("d53b"),l=o("84f2"),u=o("6821");r.exports=o("01f9")(Array,"Array",function(c,f){this._t=u(c),this._i=0,this._k=f},function(){var c=this._t,f=this._k,d=this._i++;return!c||d>=c.length?(this._t=void 0,s(1)):f=="keys"?s(0,d):f=="values"?s(0,c[d]):s(0,[d,c[d]])},"values"),l.Arguments=l.Array,i("keys"),i("values"),i("entries")},cb7c:function(r,a,o){var i=o("d3f4");r.exports=function(s){if(!i(s))throw TypeError(s+" is not an object!");return s}},ce10:function(r,a,o){var i=o("69a8"),s=o("6821"),l=o("c366")(!1),u=o("613b")("IE_PROTO");r.exports=function(c,f){var d=s(c),v=0,p=[],h;for(h in d)h!=u&&i(d,h)&&p.push(h);for(;f.length>v;)i(d,h=f[v++])&&(~l(p,h)||p.push(h));return p}},d2c8:function(r,a,o){var i=o("aae3"),s=o("be13");r.exports=function(l,u,c){if(i(u))throw TypeError("String#"+c+" doesn't accept regex!");return String(s(l))}},d3f4:function(r,a){r.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},d53b:function(r,a){r.exports=function(o,i){return{value:i,done:!!o}}},d8e8:function(r,a){r.exports=function(o){if(typeof o!="function")throw TypeError(o+" is not a function!");return o}},e11e:function(r,a){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(r,a,o){var i=o("5ca1"),s=o("9def"),l=o("d2c8"),u="startsWith",c=""[u];i(i.P+i.F*o("5147")(u),"String",{startsWith:function(d){var v=l(this,d,u),p=s(Math.min(arguments.length>1?arguments[1]:void 0,v.length)),h=String(d);return c?c.call(v,h,p):v.slice(p,p+h.length)===h}})},f6fd:function(r,a){(function(o){var i="currentScript",s=o.getElementsByTagName("script");i in o||Object.defineProperty(o,i,{get:function(){try{throw new Error}catch(c){var l,u=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(c.stack)||[!1])[1];for(l in s)if(s[l].src==u||s[l].readyState=="interactive")return s[l];return null}}})})(document)},f751:function(r,a,o){var i=o("5ca1");i(i.S+i.F,"Object",{assign:o("7333")})},fa5b:function(r,a,o){r.exports=o("5537")("native-function-to-string",Function.toString)},fab2:function(r,a,o){var i=o("7726").document;r.exports=i&&i.documentElement},fb15:function(r,a,o){if(o.r(a),typeof window<"u"){o("f6fd");var i;(i=window.document.currentScript)&&(i=i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(o.p=i[1])}o("f751"),o("f559"),o("ac6a"),o("cadf"),o("456d");function s(m){if(Array.isArray(m))return m}function l(m,g){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(m)))){var y=[],D=!0,N=!1,j=void 0;try{for(var K=m[Symbol.iterator](),rt;!(D=(rt=K.next()).done)&&(y.push(rt.value),!(g&&y.length===g));D=!0);}catch(Ot){N=!0,j=Ot}finally{try{!D&&K.return!=null&&K.return()}finally{if(N)throw j}}return y}}function u(m,g){(g==null||g>m.length)&&(g=m.length);for(var y=0,D=new Array(g);y=j?N.length:N.indexOf(rt)});return y?K.filter(function(rt){return rt!==-1}):K}function U(m,g){var y=this;this.$nextTick(function(){return y.$emit(m.toLowerCase(),g)})}function P(m){var g=this;return function(y){g.realList!==null&&g["onDrag"+m](y),U.call(g,m,y)}}function T(m){return["transition-group","TransitionGroup"].includes(m)}function A(m){if(!m||m.length!==1)return!1;var g=d(m,1),y=g[0].componentOptions;return y?T(y.tag):!1}function R(m,g,y){return m[y]||(g[y]?g[y]():void 0)}function X(m,g,y){var D=0,N=0,j=R(g,y,"header");j&&(D=j.length,m=m?[].concat(b(j),b(m)):b(j));var K=R(g,y,"footer");return K&&(N=K.length,m=m?[].concat(b(m),b(K)):b(K)),{children:m,headerOffset:D,footerOffset:N}}function z(m,g){var y=null,D=function(Oe,so){y=E(y,Oe,so)},N=Object.keys(m).filter(function(Ot){return Ot==="id"||Ot.startsWith("data-")}).reduce(function(Ot,Oe){return Ot[Oe]=m[Oe],Ot},{});if(D("attrs",N),!g)return y;var j=g.on,K=g.props,rt=g.attrs;return D("on",j),D("props",K),Object.assign(y.attrs,rt),y}var V=["Start","Add","Remove","Update","End"],L=["Choose","Unchoose","Sort","Filter","Clone"],G=["Move"].concat(V,L).map(function(m){return"on"+m}),Y=null,pt={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(g){return g}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},it={name:"draggable",inheritAttrs:!1,props:pt,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(g){var y=this.$slots.default;this.transitionMode=A(y);var D=X(y,this.$slots,this.$scopedSlots),N=D.children,j=D.headerOffset,K=D.footerOffset;this.headerOffset=j,this.footerOffset=K;var rt=z(this.$attrs,this.componentData);return g(this.getTag(),rt,N)},created:function(){this.list!==null&&this.value!==null&&S.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&S.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&S.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var g=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var y={};V.forEach(function(j){y["on"+j]=P.call(g,j)}),L.forEach(function(j){y["on"+j]=U.bind(g,j)});var D=Object.keys(this.$attrs).reduce(function(j,K){return j[Object(S.a)(K)]=g.$attrs[K],j},{}),N=Object.assign({},this.options,D,y,{onMove:function(K,rt){return g.onDragMove(K,rt)}});!("draggable"in N)&&(N.draggable=">*"),this._sortable=new O.a(this.rootContainer,N),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(g){this.updateOptions(g)},deep:!0},$attrs:{handler:function(g){this.updateOptions(g)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var g=this._vnode.fnOptions;return g&&g.functional},getTag:function(){return this.tag||this.element},updateOptions:function(g){for(var y in g){var D=Object(S.a)(y);G.indexOf(D)===-1&&this._sortable.option(D,g[y])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var g=this.$slots.default;return this.transitionMode?g[0].child.$slots.default:g},computeIndexes:function(){var g=this;this.$nextTick(function(){g.visibleIndexes=F(g.getChildrenNodes(),g.rootContainer.children,g.transitionMode,g.footerOffset)})},getUnderlyingVm:function(g){var y=I(this.getChildrenNodes()||[],g);if(y===-1)return null;var D=this.realList[y];return{index:y,element:D}},getUnderlyingPotencialDraggableComponent:function(g){var y=g.__vue__;return!y||!y.$options||!T(y.$options._componentTag)?!("realList"in y)&&y.$children.length===1&&"realList"in y.$children[0]?y.$children[0]:y:y.$parent},emitChanges:function(g){var y=this;this.$nextTick(function(){y.$emit("change",g)})},alterList:function(g){if(this.list){g(this.list);return}var y=b(this.value);g(y),this.$emit("input",y)},spliceList:function(){var g=arguments,y=function(N){return N.splice.apply(N,b(g))};this.alterList(y)},updatePosition:function(g,y){var D=function(j){return j.splice(y,0,j.splice(g,1)[0])};this.alterList(D)},getRelatedContextFromMoveEvent:function(g){var y=g.to,D=g.related,N=this.getUnderlyingPotencialDraggableComponent(y);if(!N)return{component:N};var j=N.realList,K={list:j,component:N};if(y!==D&&j&&N.getUnderlyingVm){var rt=N.getUnderlyingVm(D);if(rt)return Object.assign(rt,K)}return K},getVmIndex:function(g){var y=this.visibleIndexes,D=y.length;return g>D-1?D:y[g]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(g){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var y=this.getChildrenNodes();y[g].data=null;var D=this.getComponent();D.children=[],D.kept=void 0}},onDragStart:function(g){this.context=this.getUnderlyingVm(g.item),g.item._underlying_vm_=this.clone(this.context.element),Y=g.item},onDragAdd:function(g){var y=g.item._underlying_vm_;if(y!==void 0){Object(S.d)(g.item);var D=this.getVmIndex(g.newIndex);this.spliceList(D,0,y),this.computeIndexes();var N={element:y,newIndex:D};this.emitChanges({added:N})}},onDragRemove:function(g){if(Object(S.c)(this.rootContainer,g.item,g.oldIndex),g.pullMode==="clone"){Object(S.d)(g.clone);return}var y=this.context.index;this.spliceList(y,1);var D={element:this.context.element,oldIndex:y};this.resetTransitionData(y),this.emitChanges({removed:D})},onDragUpdate:function(g){Object(S.d)(g.item),Object(S.c)(g.from,g.item,g.oldIndex);var y=this.context.index,D=this.getVmIndex(g.newIndex);this.updatePosition(y,D);var N={element:this.context.element,oldIndex:y,newIndex:D};this.emitChanges({moved:N})},updateProperty:function(g,y){g.hasOwnProperty(y)&&(g[y]+=this.headerOffset)},computeFutureIndex:function(g,y){if(!g.element)return 0;var D=b(y.to.children).filter(function(rt){return rt.style.display!=="none"}),N=D.indexOf(y.related),j=g.component.getVmIndex(N),K=D.indexOf(Y)!==-1;return K||!y.willInsertAfter?j:j+1},onDragMove:function(g,y){var D=this.move;if(!D||!this.realList)return!0;var N=this.getRelatedContextFromMoveEvent(g),j=this.context,K=this.computeFutureIndex(N,g);Object.assign(j,{futureIndex:K});var rt=Object.assign({},g,{relatedContext:N,draggedContext:j});return D(rt,y)},onDragEnd:function(){this.computeIndexes(),Y=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",it);var J=it;a.default=J}}).default})})(Yn);var Ns=Yn.exports;const Ls=Dn(Ns);const js={components:{draggable:Ls},data(){return{dragOngoing:!1}},props:{tableType:{type:String},activeStatus:{type:String},draggableProps:{type:Object},draggableEvents:{type:Object}},methods:{dragStart(n){this.tableType==="listing"&&this.$events.$emit("curated-list-drag-start",n,this.draggableProps.group.name)},dragEnd(n){this.tableType==="listing"&&this.$events.$emit("curated-list-drag-end",n,this.draggableProps.group.name)},onMove(n){this.tableType==="listing"&&this.$events.$emit("curated-list-drag-move",n,this.draggableProps.group.name)}},inject:["sharedState"],computed:{rows:{get(){return this.sharedState.rows},set(n){this.sharedState.rows=n}}}};var Bs=function(){var t=this,e=t._self._c;return e("table",{staticClass:"data-table curated-collections-view-table",attrs:{"data-type":`${t.activeStatus}-${t.tableType}`}},[t.tableType==="listing"?e("thead",[t._m(0)]):t._e(),e("draggable",t._g(t._b({attrs:{tag:"tbody",move:t.onMove,handle:".table-drag-handle"},on:{start:t.dragStart,end:t.dragEnd},model:{value:t.rows,callback:function(r){t.rows=r},expression:"rows"}},"draggable",t.draggableProps,!1),t.draggableEvents),[t._l(t.rows,function(r,a){return e("tr",{key:r.id,staticClass:"outline-none",attrs:{"data-id":r.id}},[e("td",{staticClass:"table-drag-handle",attrs:{"data-show":"published draft-lookup"}}),e("td",{staticClass:"text-center pr-0",attrs:{"data-show":"published-listing"}},[t._v(" "+t._s(r.order||" ")+" ")]),e("td",{staticClass:"pr-0"},[e("div",{staticClass:"relationship-index-field"},[e("div",{staticClass:"flex flex-wrap"},[e("div",{staticClass:"relationship-index-field-item"},[e("div",{staticClass:"flex items-center shrink"},[e("div",{staticClass:"little-dot h-1 w-1 mr-1",class:[r.entry[0].published?"bg-green-600":"bg-gray-400"]}),e("a",{attrs:{href:r.entry[0].edit_url,title:r.entry[0].title},domProps:{textContent:t._s(r.entry[0].title)}})])])])])]),e("td",{staticClass:"whitespace-nowrap pr-0",attrs:{"data-show":"published-listing"}},[t._v(" "+t._s(r.status==="published"?t.$moment(r.unpublish_at).format("lll"):" ")+" ")]),e("td",{staticClass:"text-right",attrs:{"data-show":"lookup"}},[e("span",{staticClass:"rounded px-1 py-px text-2xs uppercase bg-gray-200 text-gray"},[t._v(" "+t._s(r.collection.title)+" ")])]),e("td",{staticClass:"pt-0 pb-0",attrs:{"data-show":"listing"}},[e("div",{staticClass:"flex justify-end"},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.__("Edit"),expression:"__('Edit')"}],staticClass:"w-4 h-4 ml-2 opacity-50 hover:opacity-100",on:{click:function(o){return t.$emit("edited",r)}}},[e("svg-icon",{staticClass:"h-4 w-4",attrs:{name:"micro/pencil"}})],1),e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.__("Delete"),expression:"__('Delete')"}],staticClass:"w-4 h-4 ml-2 opacity-50 hover:opacity-100",on:{click:function(o){return t.$emit("deleted",r)}}},[e("svg-icon",{staticClass:"h-4 w-4",attrs:{name:"micro/circle-with-cross"}})],1)])])])}),t.rows.length===0?e("tr",[e("td",{attrs:{colspan:"6"}},[e("div",{staticClass:"p-6 text-center text-gray-500",domProps:{textContent:t._s(t.__("No items"))}})])]):t._e()],2)],1)},Us=[function(){var n=this,t=n._self._c;return t("tr",[t("th",{staticClass:"px-0",attrs:{"data-show":"published draft-lookup"}}),t("th",{staticClass:"text-center pr-0",attrs:{"data-show":"published-listing"}},[n._v("#")]),t("th",[n._v("Entry")]),t("th",{attrs:{"data-show":"published-listing"}},[n._v("Fjern fra listen den")]),t("th",{attrs:{"data-show":"lookup"}}),t("th",{attrs:{"data-show":"listing"}})])}],Gs=bt(js,Bs,Us,!1,null,null,null,null);const io=Gs.exports;const Ws={props:["group"],data(){return{dragOngoing:!1,over:!1}},mounted(){this.$events.$on("curated-list-drag-start",this.onDragStart),this.$events.$on("curated-list-drag-end",this.onDragEnd),this.$events.$on("curated-list-drag-move",this.onDragMove)},methods:{onDragStart(n,t){this.group===t&&(this.dragOngoing=!0)},onDragEnd(n,t){this.group===t&&(this.dragOngoing=!1),this.over=!1},onDragMove(n){n.to.classList.contains("DropZone-overlay")&&(this.over=!0)}}};var Hs=function(){var t=this,e=t._self._c;return e("div",{staticClass:"DropZone-container"},[t._t("default"),t.dragOngoing?e("draggable",{staticClass:"DropZone-overlay",attrs:{tag:"div",group:{name:"view",put:!0,pull:!1}}},[e("div",{staticClass:"DropZone-overlay-inner"},[t.over?e("svg",{staticClass:"mb-4 h-8 fill-white",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30.1 38.2"}},[e("path",{attrs:{d:"M4.1,16.2L6,34.6c0.2,2,1.9,3.6,4,3.6c2.9,0,7.6,0,10.6,0c2.1,0,3.8-1.6,4-3.6l1.9-18.4L4.1,16.2z M24.3,18.2 l-1.7,16.2c-0.1,1-1,1.8-2,1.8c-2.9,0-7.6,0-10.6,0c-1,0-1.9-0.8-2-1.8L6.3,18.2H24.3z M9.5,23.3l0.8,8c0.1,0.5,0.5,1,1.1,0.9 c0.5-0.1,1-0.5,0.9-1.1l-0.8-8c-0.1-0.6-0.5-1-1.1-0.9C9.9,22.3,9.5,22.7,9.5,23.3z M19.1,23.1l-0.8,8c-0.1,0.5,0.4,1,0.9,1.1 c0.5,0.1,1-0.4,1.1-0.9l0.8-8c0.1-0.5-0.4-1-0.9-1.1C19.6,22.1,19.1,22.6,19.1,23.1z M14.3,23.2v8c0,0.6,0.4,1,1,1s1-0.4,1-1v-8 c0-0.6-0.4-1-1-1C14.8,22.2,14.3,22.6,14.3,23.2z"}}),e("path",{attrs:{d:"M26.1,14.6c1,0.4,2.2-0.2,2.6-1.2l1-2.9c0.4-1-0.2-2.2-1.2-2.6l-5.6-2L23.2,5c0.2-0.5,0.1-1-0.1-1.6 c-0.2-0.5-0.7-0.9-1.1-1l-5.8-2c-0.4-0.3-1-0.2-1.5,0c-0.5,0.2-0.9,0.7-1,1.1l-0.4,1l-5.6-2c-1-0.4-2.2,0.2-2.6,1.2 c-0.3,0.8-0.7,1.9-1,2.9c-0.4,1,0.2,2.2,1.2,2.6L26.1,14.6z M15.6,2.3l5.6,2L21,5.3l-5.7-2.1L15.6,2.3z M6.1,5.3l1-2.9l20.7,7.3 l-1,2.9L6.1,5.3z"}})]):e("svg",{staticClass:"mb-4 h-8 fill-white",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30.1 38.2"}},[e("path",{staticClass:"st0",attrs:{d:"M4.1,16.2L6,34.6c0.2,2,1.9,3.6,4,3.6c2.9,0,7.6,0,10.6,0c2.1,0,3.8-1.6,4-3.6l1.9-18.4L4.1,16.2z M24.3,18.2 l-1.7,16.2c-0.1,1-1,1.8-2,1.8c-2.9,0-7.6,0-10.6,0c-1,0-1.9-0.8-2-1.8L6.3,18.2H24.3z M9.5,23.3l0.8,8c0.1,0.5,0.5,1,1.1,0.9 c0.5-0.1,1-0.5,0.9-1.1l-0.8-8c-0.1-0.6-0.5-1-1.1-0.9C9.9,22.3,9.5,22.7,9.5,23.3z M19.1,23.1l-0.8,8c-0.1,0.5,0.4,1,0.9,1.1 c0.5,0.1,1-0.4,1.1-0.9l0.8-8c0.1-0.5-0.4-1-0.9-1.1C19.6,22.1,19.1,22.6,19.1,23.1z M14.3,23.2v8c0,0.6,0.4,1,1,1s1-0.4,1-1v-8 c0-0.6-0.4-1-1-1C14.8,22.2,14.3,22.6,14.3,23.2z"}}),e("path",{staticClass:"st0",attrs:{d:"M26.3,18.2c1.1,0,2-0.9,2-2v-3c0-1.1-0.9-2-2-2h-6v-1c0-0.5-0.2-1-0.6-1.4c-0.4-0.4-0.9-0.6-1.4-0.6h-6 c-0.5,0-1,0.2-1.4,0.6c-0.4,0.4-0.6,0.9-0.6,1.4v1h-6c-1.1,0-2,0.9-2,2c0,0.9,0,2.1,0,3c0,1.1,0.9,2,2,2H26.3z M12.3,10.2h6v1h-6 V10.2z M4.3,16.2v-3h22v3H4.3z"}})]),e("p",[t._v("Træk element her til for at fjerne det fra listen")])])]):t._e()],2)},zs=[],Vs=bt(Ws,Hs,zs,!1,null,null,null,null);const Ks=Vs.exports;const Xs={mixins:[Listing],components:{ViewTable:io,DropZone:Ks},props:{handle:{type:String,required:!0},collections:{type:Array,required:!0},exclusions:{type:Array,required:!1},activeStatus:{type:String,required:!0}},data(){return{visibleColumns:[{field:"title"}],sortColumn:"date",sortDirection:"desc",availableFilters:[]}},watch:{exclusions:function(){this.request()},availableFilters:function(n){const t=n.filter(e=>e.handle!=="status");t.length!==n.length&&(this.availableFilters=t)},activeFilterBadges:function(n){const t=Object.entries(n),e=t.filter(([r,a])=>r!=="active_status");e.length!==t.length&&(this.activeFilterBadges=Object.fromEntries(e))}},mounted(){this.getFilters(),this.applyActiveStatusFilter()},computed:{configParameter(){return utf8btoa(JSON.stringify({type:"entries",collections:this.collections}))},requestUrl(){return cp_url("fieldtypes/relationship")+"?"+Ar.stringify({config:this.configParameter,collections:this.collections,exclusions:this.exclusions})},filtersUrl(){return cp_url("fieldtypes/relationship/filters")+"?"+Ar.stringify({config:this.configParameter,collections:this.collections})},itemsRestructured(){return this.items.map(n=>({order:null,entry:[n],unpublish_at:null,collection:n.collection,published:n.status==="published"}))}},methods:{applyActiveStatusFilter(){this.activeFilters={active_status:{status:this.activeStatus}}},getFilters(){return this.$axios.get(this.filtersUrl).then(n=>{this.availableFilters=n.data})},setPage(n){this.page=n},getStatusLabel(n){if(n.status==="published")return __("Published");if(n.status==="scheduled")return __("Scheduled");if(n.status==="expired")return __("Expired");if(n.status==="draft")return __("Draft")},getStatusTooltip(n){if(n.status==="published")return n.collection.unpublish_at?__("messages.status_published_with_date",{date:n.date}):null;if(n.status==="scheduled")return __("messages.status_scheduled_with_date",{date:n.date});if(n.status==="expired")return __("messages.status_expired_with_date",{date:n.date});if(n.status==="draft")return null}},watch:{searchQuery:function(n){n||(this.sortColumn="date",this.sortDirection="desc")}}};var Ys=function(){var t=this,e=t._self._c;return e("div",[t.initializing?e("div",{staticClass:"flex items-center justify-center text-center"},[e("loading-graphic")],1):t._e(),t.initializing?t._e():e("data-list",{staticClass:"curated-collections-view-lookup",attrs:{sort:!1,rows:t.itemsRestructured},scopedSlots:t._u([{key:"default",fn:function({hasSelections:r}){return e("div",{},[e("DropZone",{attrs:{group:"view"}},[e("div",{staticClass:"card overflow-hidden p-0 relative"},[e("div",{staticClass:"flex flex-wrap items-center justify-between px-2 pb-2 text-sm border-b"},[e("data-list-search",{ref:"search",staticClass:"h-8 mt-2 w-full",attrs:{placeholder:t.searchPlaceholder},model:{value:t.searchQuery,callback:function(a){t.searchQuery=a},expression:"searchQuery"}})],1),e("div",[e("data-list-filters",{ref:"filters",attrs:{filters:t.availableFilters,"active-filters":t.activeFilters,"active-filter-badges":t.activeFilterBadges,"active-count":t.activeFilterCount,"search-query":t.searchQuery},on:{changed:t.filterChanged}})],1),e("div",{staticClass:"overflow-x-auto overflow-y-hidden"},[e("view-table",{attrs:{tableType:"lookup",activeStatus:t.activeStatus,draggableProps:{group:{name:"view",put:!1,pull:"clone"},sort:!1}}})],1)])]),e("data-list-pagination",{staticClass:"mt-4",attrs:{"resource-meta":t.meta},on:{"page-selected":t.setPage}})],1)}}],null,!1,2703568266)})],1)},Qs=[],Js=bt(Xs,Ys,Qs,!1,null,null,null,null);const ks=Js.exports;const Zs={mixins:[Listing],components:{EntryForm:Cn,ViewLookup:ks,ViewTable:io},props:{handle:{type:String,required:!0},breadcrumbUrl:{type:String,required:!0},collections:{type:Array,required:!0},displayFormComputed:{type:Boolean,required:!0},activeStatus:{type:String,required:!0}},data(){return{showEntry:!1,formMode:null,formId:null,formValues:{},formErrors:[]}},computed:{requestUrl(){return cp_url(`curated-collections/api/collections/${this.handle}/entries`)+"?"+Ar.stringify({status:this.activeStatus})},exclusions(){return this.items.map(n=>n.entry?n.entry[0].id:null)}},methods:{closeEntry(){this.request(),this.formMode=null,this.formId=null,this.formValues={},this.showEntry=!1},openEntry(){this.showEntry=!0},createEntry(n){this.formMode="create",this.formValues=n,this.displayFormComputed?this.openEntry():this.saveEntry("create",n)},editEntry(n){this.formMode="edit",this.formId=n.id,this.openEntry()},entryDropped(n){if(n.moved){const{oldIndex:t,newIndex:e}=n.moved;this.entryMoved(t,e)}else if(n.added){const{element:t,newIndex:e}=n.added;this.entryAdded(t,e)}else if(n.removed){console.log("event.removed",n.removed);const{element:t}=n.removed;console.log("event.removed.element",t),this.deleteEntry(t)}},entryMoved(n,t){const e=[...this.items],r=[...e.slice(0,n),...e.slice(n+1)],a=[...r.slice(0,t),e[n],...r.slice(t)];this.reorderEntries(a)},entryAdded(n,t){const e={...this.activeStatus==="published"?{order:t+1}:{publish_order:t+1},entry:n.entry.map(r=>r.id),published:n.published};this.createEntry(e)},saveEntry(n,t){const e=n==="edit"?"patch":"post",r=n==="edit"?cp_url(`curated-collections/api/collections/${this.handle}/entries/${t.id}`):cp_url(`curated-collections/api/collections/${this.handle}/entries`),a={...t,curated_collection:this.handle};this.$axios[e](r,a).then(o=>{this.closeEntry(),this.$toast.success(n==="edit"?__("Entry successfully updated"):__("Entry successfully created"))}).catch(o=>{if(o.response&&o.response.status===422)if(!this.showEntry)this.openEntry();else{const{message:i,errors:s}=o.response.data;this.formErrors=s,this.$toast.error(i)}else o.response?this.$toast.error(o.response.data.message):(console.log(o),this.$toast.error(__("Something went wrong")))})},deleteEntry(n){console.log("deleteEntry",n);const t=cp_url(`curated-collections/api/collections/${this.handle}/entries/${n.id}`);this.$axios.delete(t).then(e=>{this.request(),this.$toast.success(__("Entry successfully deleted"))}).catch(e=>{console.log(e),this.$toast.error(__("Something went wrong"))})},reorderEntries(n){const t=cp_url(`curated-collections/api/collections/${this.handle}/entries/reorder`),e={ids:n.map(r=>r.id),curated_collection:this.handle};this.$axios.post(t,e).then(r=>{this.request(),this.$toast.success(__("Entries successfully reordered"))}).catch(r=>{console.log(r),this.$toast.error(__("Something went wrong"))})}}};var qs=function(){var t=this,e=t._self._c;return e("div",{staticClass:"curated-collections-view-tab"},[e("div",{staticClass:"curated-collections-grid"},[e("div",[t.initializing?e("div",{staticClass:"flex items-center justify-center text-center"},[e("loading-graphic")],1):t._e(),t.initializing?t._e():e("data-list",{staticClass:"curated-collections-listing",attrs:{sort:!1,rows:t.items}},[e("div",[e("div",{staticClass:"card overflow-hidden p-0 relative"},[e("div",{staticClass:"overflow-x-auto overflow-y-hidden"},[e("view-table",{attrs:{tableType:"listing",activeStatus:t.activeStatus,draggableProps:{group:{name:"view",put:!0,pull:!0}},draggableEvents:{change:t.entryDropped}},on:{edited:t.editEntry,deleted:t.deleteEntry}})],1)])])])],1),e("div",[e("view-lookup",{ref:"lookup",attrs:{activeStatus:t.activeStatus,exclusions:t.exclusions,handle:t.handle,collections:t.collections}})],1)]),t.showEntry?e("entry-form",{attrs:{handle:t.handle,mode:t.formMode,id:t.formId,"initial-values":t.formValues,errors:t.formErrors},on:{closed:t.closeEntry,submit:t.saveEntry}}):t._e()],1)},tl=[],el=bt(Zs,qs,tl,!1,null,null,null,null);const rl=el.exports,nl={components:{ViewTab:rl},props:{title:{type:String,required:!0},handle:{type:String,required:!0},breadcrumbUrl:{type:String,required:!0},collections:{type:Array,required:!0},entryBlueprint:{type:Array,required:!0},entryDefaults:{type:Object,required:!0},entryMeta:{type:Object,required:!0},displayFormComputed:{type:Boolean,required:!0}},data(){return{activeStatus:"published"}},mounted(){Statamic.$echo.booted(()=>{this.$echo.private(`curated-collections-private.${this.handle.toLowerCase()}`).listen(".CuratedCollections.CuratedCollectionUpdated",n=>this.curatedCollectionPushed(n))})},methods:{curatedCollectionPushed(){this.$refs.tab.request()}}};var ol=function(){var t=this,e=t._self._c;return e("div",{staticClass:"curated-collections-view"},[e("header",{staticClass:"mb-6"},[e("breadcrumb",{attrs:{url:t.breadcrumbUrl,title:t.__("Curated Collections")}}),e("div",{staticClass:"flex items-center"},[e("h1",{staticClass:"flex-1",domProps:{textContent:t._s(t.title)}}),this.$scopedSlots.twirldown?e("dropdown-list",{staticClass:"mr-2"},[t._t("twirldown")],2):t._e()],1)],1),e("div",{staticClass:"tabs-container"},[e("div",{staticClass:"publish-tabs tabs"},[e("button",{staticClass:"tab-button",class:{active:t.activeStatus==="published"},domProps:{textContent:t._s(t.__("Published"))},on:{click:function(r){t.activeStatus="published"}}}),e("button",{staticClass:"tab-button",class:{active:t.activeStatus==="draft"},domProps:{textContent:t._s(t.__("Draft"))},on:{click:function(r){t.activeStatus="draft"}}})])]),e("view-tab",{key:t.activeStatus,ref:"tab",attrs:{handle:t.handle,breadcrumbUrl:t.breadcrumbUrl,collections:t.collections,entryBlueprint:t.entryBlueprint,entryDefaults:t.entryDefaults,entryMeta:t.entryMeta,displayFormComputed:t.displayFormComputed,activeStatus:t.activeStatus}})],1)},al=[],il=bt(nl,ol,al,!1,null,null,null,null);const sl=il.exports,ll={props:{blueprint:Object,initialValues:Object,meta:Object,url:String},data(){return{values:this.initialValues,error:null,errors:{}}},methods:{clearErrors(){this.error=null,this.errors={}},submit(){this.saving=!0,this.clearErrors(),this.$axios.patch(this.url,this.values).then(n=>{this.saving=!1,this.$toast.success(__("Saved")),this.$refs.container.saved()}).catch(n=>this.handleAxiosError(n))},handleAxiosError(n){if(this.saving=!1,n.response&&n.response.status===422){const{message:t,errors:e}=n.response.data;this.error=t,this.errors=e,this.$toast.error(t)}else this.$toast.error(__("Something went wrong"))}},created(){this.$keys.bindGlobal(["mod+s"],n=>{n.preventDefault(),this.submit()})}};var ul=function(){var t=this,e=t._self._c;return t.blueprint?e("publish-container",{ref:"container",attrs:{name:"curated-collection",blueprint:t.blueprint,values:t.values,reference:"curated-collection",meta:t.meta,errors:t.errors},on:{updated:function(r){t.values=r}},scopedSlots:t._u([{key:"default",fn:function({setFieldValue:r,setFieldMeta:a}){return e("div",{},[e("configure-tabs",{attrs:{"enable-sidebar":!1},on:{updated:r,"meta-updated":a}}),e("div",{staticClass:"py-4 border-t flex justify-between"},[e("a",{staticClass:"btn",attrs:{href:t.url},domProps:{textContent:t._s(t.__("Cancel"))}}),e("button",{staticClass:"btn-primary",attrs:{type:"submit"},on:{click:t.submit}},[t._v(t._s(t.__("Save settings")))])])],1)}}],null,!1,1837689853)}):t._e()},cl=[],fl=bt(ll,ul,cl,!1,null,null,null,null);const dl=fl.exports,pl={props:{route:{type:String}},data(){return{title:null,handle:null}},watch:{title:function(n){this.handle=this.$slugify(n,"_")}},computed:{canSubmit(){return!!(this.title&&this.handle)}},methods:{submit(){this.$axios.post(this.route,{title:this.title,handle:this.handle}).then(n=>{window.location=n.data.redirect}).catch(n=>{this.$toast.error(n.response.data.message)})}},mounted(){this.$keys.bindGlobal(["return"],n=>{this.canSubmit&&this.submit()})}};var hl=function(){var t=this,e=t._self._c;return e("div",{staticClass:"max-w-lg mt-4 mx-auto"},[e("div",{staticClass:"rounded p-6 lg:px-20 lg:py-10 shadow bg-white"},[e("header",{staticClass:"text-center mb-16"},[e("h1",{staticClass:"mb-6"},[t._v(t._s(t.__("Create Curated Collection")))]),e("p",{staticClass:"text-gray",attrs:{"v-text":t.__("statamic-curated-collections::messages.configure_intro")}})]),e("div",{staticClass:"mb-10"},[e("label",{staticClass:"font-bold text-base mb-1",attrs:{for:"name"}},[t._v(t._s(t.__("Title")))]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],staticClass:"input-text",attrs:{type:"text",autofocus:"",tabindex:"1"},domProps:{value:t.title},on:{input:function(r){r.target.composing||(t.title=r.target.value)}}}),e("div",{staticClass:"text-2xs text-gray-600 mt-2 flex items-center"},[t._v(" "+t._s(t.__("statamic-curated-collections::configure.title_instructions"))+" ")])]),e("div",{staticClass:"mb-4"},[e("label",{staticClass:"font-bold text-base mb-1",attrs:{for:"name"}},[t._v(t._s(t.__("Handle")))]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.handle,expression:"handle"}],staticClass:"input-text",attrs:{type:"text",tabindex:"2"},domProps:{value:t.handle},on:{input:function(r){r.target.composing||(t.handle=r.target.value)}}}),e("div",{staticClass:"text-2xs text-gray-600 mt-2 flex items-center"},[t._v(" "+t._s(t.__("statamic-curated-collections::configure.handle_instructions"))+" ")])])]),e("div",{staticClass:"flex justify-center mt-8"},[e("button",{staticClass:"btn-primary mx-auto btn-lg",attrs:{tabindex:"4",disabled:!t.canSubmit},on:{click:t.submit}},[t._v(" "+t._s(t.__("statamic-curated-collections::messages.create_button"))+" ")])])])},vl=[],gl=bt(pl,hl,vl,!1,null,null,null,null);const yl=gl.exports;Statamic.booting(()=>{Statamic.component("curated_collection_popup-fieldtype",_o),Statamic.component("curated-collection-listing",Lo),Statamic.component("curated-collection-view",sl),Statamic.component("curated-collection-edit-form",dl),Statamic.component("curated-collection-create-form",yl)}); +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(m){return v(m)||p(m)||c(m)||h()}var w=o("a352"),O=o.n(w),S=o("c649");function E(m,g,y){return y===void 0||(m=m||{},m[g]=y),m}function I(m,g){return m.map(function(y){return y.elm}).indexOf(g)}function F(m,g,y,D){if(!m)return[];var N=m.map(function(rt){return rt.elm}),j=g.length-D,K=b(g).map(function(rt,Ot){return Ot>=j?N.length:N.indexOf(rt)});return y?K.filter(function(rt){return rt!==-1}):K}function U(m,g){var y=this;this.$nextTick(function(){return y.$emit(m.toLowerCase(),g)})}function P(m){var g=this;return function(y){g.realList!==null&&g["onDrag"+m](y),U.call(g,m,y)}}function T(m){return["transition-group","TransitionGroup"].includes(m)}function A(m){if(!m||m.length!==1)return!1;var g=d(m,1),y=g[0].componentOptions;return y?T(y.tag):!1}function R(m,g,y){return m[y]||(g[y]?g[y]():void 0)}function X(m,g,y){var D=0,N=0,j=R(g,y,"header");j&&(D=j.length,m=m?[].concat(b(j),b(m)):b(j));var K=R(g,y,"footer");return K&&(N=K.length,m=m?[].concat(b(m),b(K)):b(K)),{children:m,headerOffset:D,footerOffset:N}}function z(m,g){var y=null,D=function(Oe,so){y=E(y,Oe,so)},N=Object.keys(m).filter(function(Ot){return Ot==="id"||Ot.startsWith("data-")}).reduce(function(Ot,Oe){return Ot[Oe]=m[Oe],Ot},{});if(D("attrs",N),!g)return y;var j=g.on,K=g.props,rt=g.attrs;return D("on",j),D("props",K),Object.assign(y.attrs,rt),y}var V=["Start","Add","Remove","Update","End"],L=["Choose","Unchoose","Sort","Filter","Clone"],G=["Move"].concat(V,L).map(function(m){return"on"+m}),Y=null,pt={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(g){return g}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},it={name:"draggable",inheritAttrs:!1,props:pt,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(g){var y=this.$slots.default;this.transitionMode=A(y);var D=X(y,this.$slots,this.$scopedSlots),N=D.children,j=D.headerOffset,K=D.footerOffset;this.headerOffset=j,this.footerOffset=K;var rt=z(this.$attrs,this.componentData);return g(this.getTag(),rt,N)},created:function(){this.list!==null&&this.value!==null&&S.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&S.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&S.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var g=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var y={};V.forEach(function(j){y["on"+j]=P.call(g,j)}),L.forEach(function(j){y["on"+j]=U.bind(g,j)});var D=Object.keys(this.$attrs).reduce(function(j,K){return j[Object(S.a)(K)]=g.$attrs[K],j},{}),N=Object.assign({},this.options,D,y,{onMove:function(K,rt){return g.onDragMove(K,rt)}});!("draggable"in N)&&(N.draggable=">*"),this._sortable=new O.a(this.rootContainer,N),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(g){this.updateOptions(g)},deep:!0},$attrs:{handler:function(g){this.updateOptions(g)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var g=this._vnode.fnOptions;return g&&g.functional},getTag:function(){return this.tag||this.element},updateOptions:function(g){for(var y in g){var D=Object(S.a)(y);G.indexOf(D)===-1&&this._sortable.option(D,g[y])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var g=this.$slots.default;return this.transitionMode?g[0].child.$slots.default:g},computeIndexes:function(){var g=this;this.$nextTick(function(){g.visibleIndexes=F(g.getChildrenNodes(),g.rootContainer.children,g.transitionMode,g.footerOffset)})},getUnderlyingVm:function(g){var y=I(this.getChildrenNodes()||[],g);if(y===-1)return null;var D=this.realList[y];return{index:y,element:D}},getUnderlyingPotencialDraggableComponent:function(g){var y=g.__vue__;return!y||!y.$options||!T(y.$options._componentTag)?!("realList"in y)&&y.$children.length===1&&"realList"in y.$children[0]?y.$children[0]:y:y.$parent},emitChanges:function(g){var y=this;this.$nextTick(function(){y.$emit("change",g)})},alterList:function(g){if(this.list){g(this.list);return}var y=b(this.value);g(y),this.$emit("input",y)},spliceList:function(){var g=arguments,y=function(N){return N.splice.apply(N,b(g))};this.alterList(y)},updatePosition:function(g,y){var D=function(j){return j.splice(y,0,j.splice(g,1)[0])};this.alterList(D)},getRelatedContextFromMoveEvent:function(g){var y=g.to,D=g.related,N=this.getUnderlyingPotencialDraggableComponent(y);if(!N)return{component:N};var j=N.realList,K={list:j,component:N};if(y!==D&&j&&N.getUnderlyingVm){var rt=N.getUnderlyingVm(D);if(rt)return Object.assign(rt,K)}return K},getVmIndex:function(g){var y=this.visibleIndexes,D=y.length;return g>D-1?D:y[g]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(g){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var y=this.getChildrenNodes();y[g].data=null;var D=this.getComponent();D.children=[],D.kept=void 0}},onDragStart:function(g){this.context=this.getUnderlyingVm(g.item),g.item._underlying_vm_=this.clone(this.context.element),Y=g.item},onDragAdd:function(g){var y=g.item._underlying_vm_;if(y!==void 0){Object(S.d)(g.item);var D=this.getVmIndex(g.newIndex);this.spliceList(D,0,y),this.computeIndexes();var N={element:y,newIndex:D};this.emitChanges({added:N})}},onDragRemove:function(g){if(Object(S.c)(this.rootContainer,g.item,g.oldIndex),g.pullMode==="clone"){Object(S.d)(g.clone);return}var y=this.context.index;this.spliceList(y,1);var D={element:this.context.element,oldIndex:y};this.resetTransitionData(y),this.emitChanges({removed:D})},onDragUpdate:function(g){Object(S.d)(g.item),Object(S.c)(g.from,g.item,g.oldIndex);var y=this.context.index,D=this.getVmIndex(g.newIndex);this.updatePosition(y,D);var N={element:this.context.element,oldIndex:y,newIndex:D};this.emitChanges({moved:N})},updateProperty:function(g,y){g.hasOwnProperty(y)&&(g[y]+=this.headerOffset)},computeFutureIndex:function(g,y){if(!g.element)return 0;var D=b(y.to.children).filter(function(rt){return rt.style.display!=="none"}),N=D.indexOf(y.related),j=g.component.getVmIndex(N),K=D.indexOf(Y)!==-1;return K||!y.willInsertAfter?j:j+1},onDragMove:function(g,y){var D=this.move;if(!D||!this.realList)return!0;var N=this.getRelatedContextFromMoveEvent(g),j=this.context,K=this.computeFutureIndex(N,g);Object.assign(j,{futureIndex:K});var rt=Object.assign({},g,{relatedContext:N,draggedContext:j});return D(rt,y)},onDragEnd:function(){this.computeIndexes(),Y=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",it);var J=it;a.default=J}}).default})})(Yn);var Ns=Yn.exports;const Ls=Dn(Ns);const js={components:{draggable:Ls},data(){return{dragOngoing:!1}},props:{tableType:{type:String},activeStatus:{type:String},draggableProps:{type:Object},draggableEvents:{type:Object}},methods:{dragStart(n){this.tableType==="listing"&&this.$events.$emit("curated-list-drag-start",n,this.draggableProps.group.name)},dragEnd(n){this.tableType==="listing"&&this.$events.$emit("curated-list-drag-end",n,this.draggableProps.group.name)},onMove(n){this.tableType==="listing"&&this.$events.$emit("curated-list-drag-move",n,this.draggableProps.group.name)}},inject:["sharedState"],computed:{rows:{get(){return this.sharedState.rows},set(n){this.sharedState.rows=n}}}};var Bs=function(){var t=this,e=t._self._c;return e("table",{staticClass:"data-table curated-collections-view-table",attrs:{"data-type":`${t.activeStatus}-${t.tableType}`}},[t.tableType==="listing"?e("thead",[t._m(0)]):t._e(),e("draggable",t._g(t._b({attrs:{tag:"tbody",move:t.onMove,handle:".table-drag-handle"},on:{start:t.dragStart,end:t.dragEnd},model:{value:t.rows,callback:function(r){t.rows=r},expression:"rows"}},"draggable",t.draggableProps,!1),t.draggableEvents),[t._l(t.rows,function(r,a){return e("tr",{key:r.id,staticClass:"outline-none",attrs:{"data-id":r.id}},[e("td",{staticClass:"table-drag-handle",attrs:{"data-show":"published draft-lookup"}}),e("td",{staticClass:"text-center pr-0",attrs:{"data-show":"published-listing"}},[t._v(" "+t._s(r.order||" ")+" ")]),e("td",{staticClass:"pr-0"},[e("div",{staticClass:"relationship-index-field"},[e("div",{staticClass:"flex flex-wrap"},[e("div",{staticClass:"relationship-index-field-item"},[e("div",{staticClass:"flex items-center shrink"},[e("div",{staticClass:"little-dot h-1 w-1 mr-1",class:[r.entry[0].published?"bg-green-600":"bg-gray-400"]}),e("a",{attrs:{href:r.entry[0].edit_url,title:r.entry[0].title},domProps:{textContent:t._s(r.entry[0].title)}})])])])])]),e("td",{staticClass:"whitespace-nowrap pr-0",attrs:{"data-show":"published-listing"}},[t._v(" "+t._s(r.status==="published"?t.$moment(r.unpublish_at).format("lll"):" ")+" ")]),e("td",{staticClass:"text-right",attrs:{"data-show":"lookup"}},[e("span",{staticClass:"rounded px-1 py-px text-2xs uppercase bg-gray-200 text-gray"},[t._v(" "+t._s(r.collection.title)+" ")])]),e("td",{staticClass:"pt-0 pb-0",attrs:{"data-show":"listing"}},[e("div",{staticClass:"flex justify-end"},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.__("Edit"),expression:"__('Edit')"}],staticClass:"w-4 h-4 ml-2 opacity-50 hover:opacity-100",on:{click:function(o){return t.$emit("edited",r)}}},[e("svg-icon",{staticClass:"h-4 w-4",attrs:{name:"micro/pencil"}})],1),e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.__("Delete"),expression:"__('Delete')"}],staticClass:"w-4 h-4 ml-2 opacity-50 hover:opacity-100",on:{click:function(o){return t.$emit("deleted",r)}}},[e("svg-icon",{staticClass:"h-4 w-4",attrs:{name:"micro/circle-with-cross"}})],1)])])])}),t.rows.length===0?e("tr",[e("td",{attrs:{colspan:"6"}},[e("div",{staticClass:"p-6 text-center text-gray-500",domProps:{textContent:t._s(t.__("No items"))}})])]):t._e()],2)],1)},Us=[function(){var n=this,t=n._self._c;return t("tr",[t("th",{staticClass:"px-0",attrs:{"data-show":"published draft-lookup"}}),t("th",{staticClass:"text-center pr-0",attrs:{"data-show":"published-listing"}},[n._v("#")]),t("th",[n._v("Entry")]),t("th",{attrs:{"data-show":"published-listing"}},[n._v("Fjern fra listen den")]),t("th",{attrs:{"data-show":"lookup"}}),t("th",{attrs:{"data-show":"listing"}})])}],Gs=bt(js,Bs,Us,!1,null,null,null,null);const io=Gs.exports;const Ws={props:["group"],data(){return{dragOngoing:!1,over:!1}},mounted(){this.$events.$on("curated-list-drag-start",this.onDragStart),this.$events.$on("curated-list-drag-end",this.onDragEnd),this.$events.$on("curated-list-drag-move",this.onDragMove)},methods:{onDragStart(n,t){this.group===t&&(this.dragOngoing=!0)},onDragEnd(n,t){this.group===t&&(this.dragOngoing=!1),this.over=!1},onDragMove(n){n.to.classList.contains("DropZone-overlay")&&(this.over=!0)}}};var Hs=function(){var t=this,e=t._self._c;return e("div",{staticClass:"DropZone-container"},[t._t("default"),t.dragOngoing?e("draggable",{staticClass:"DropZone-overlay",attrs:{tag:"div",group:{name:"view",put:!0,pull:!1}}},[e("div",{staticClass:"DropZone-overlay-inner"},[t.over?e("svg",{staticClass:"mb-4 h-8 fill-white",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30.1 38.2"}},[e("path",{attrs:{d:"M4.1,16.2L6,34.6c0.2,2,1.9,3.6,4,3.6c2.9,0,7.6,0,10.6,0c2.1,0,3.8-1.6,4-3.6l1.9-18.4L4.1,16.2z M24.3,18.2 l-1.7,16.2c-0.1,1-1,1.8-2,1.8c-2.9,0-7.6,0-10.6,0c-1,0-1.9-0.8-2-1.8L6.3,18.2H24.3z M9.5,23.3l0.8,8c0.1,0.5,0.5,1,1.1,0.9 c0.5-0.1,1-0.5,0.9-1.1l-0.8-8c-0.1-0.6-0.5-1-1.1-0.9C9.9,22.3,9.5,22.7,9.5,23.3z M19.1,23.1l-0.8,8c-0.1,0.5,0.4,1,0.9,1.1 c0.5,0.1,1-0.4,1.1-0.9l0.8-8c0.1-0.5-0.4-1-0.9-1.1C19.6,22.1,19.1,22.6,19.1,23.1z M14.3,23.2v8c0,0.6,0.4,1,1,1s1-0.4,1-1v-8 c0-0.6-0.4-1-1-1C14.8,22.2,14.3,22.6,14.3,23.2z"}}),e("path",{attrs:{d:"M26.1,14.6c1,0.4,2.2-0.2,2.6-1.2l1-2.9c0.4-1-0.2-2.2-1.2-2.6l-5.6-2L23.2,5c0.2-0.5,0.1-1-0.1-1.6 c-0.2-0.5-0.7-0.9-1.1-1l-5.8-2c-0.4-0.3-1-0.2-1.5,0c-0.5,0.2-0.9,0.7-1,1.1l-0.4,1l-5.6-2c-1-0.4-2.2,0.2-2.6,1.2 c-0.3,0.8-0.7,1.9-1,2.9c-0.4,1,0.2,2.2,1.2,2.6L26.1,14.6z M15.6,2.3l5.6,2L21,5.3l-5.7-2.1L15.6,2.3z M6.1,5.3l1-2.9l20.7,7.3 l-1,2.9L6.1,5.3z"}})]):e("svg",{staticClass:"mb-4 h-8 fill-white",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30.1 38.2"}},[e("path",{staticClass:"st0",attrs:{d:"M4.1,16.2L6,34.6c0.2,2,1.9,3.6,4,3.6c2.9,0,7.6,0,10.6,0c2.1,0,3.8-1.6,4-3.6l1.9-18.4L4.1,16.2z M24.3,18.2 l-1.7,16.2c-0.1,1-1,1.8-2,1.8c-2.9,0-7.6,0-10.6,0c-1,0-1.9-0.8-2-1.8L6.3,18.2H24.3z M9.5,23.3l0.8,8c0.1,0.5,0.5,1,1.1,0.9 c0.5-0.1,1-0.5,0.9-1.1l-0.8-8c-0.1-0.6-0.5-1-1.1-0.9C9.9,22.3,9.5,22.7,9.5,23.3z M19.1,23.1l-0.8,8c-0.1,0.5,0.4,1,0.9,1.1 c0.5,0.1,1-0.4,1.1-0.9l0.8-8c0.1-0.5-0.4-1-0.9-1.1C19.6,22.1,19.1,22.6,19.1,23.1z M14.3,23.2v8c0,0.6,0.4,1,1,1s1-0.4,1-1v-8 c0-0.6-0.4-1-1-1C14.8,22.2,14.3,22.6,14.3,23.2z"}}),e("path",{staticClass:"st0",attrs:{d:"M26.3,18.2c1.1,0,2-0.9,2-2v-3c0-1.1-0.9-2-2-2h-6v-1c0-0.5-0.2-1-0.6-1.4c-0.4-0.4-0.9-0.6-1.4-0.6h-6 c-0.5,0-1,0.2-1.4,0.6c-0.4,0.4-0.6,0.9-0.6,1.4v1h-6c-1.1,0-2,0.9-2,2c0,0.9,0,2.1,0,3c0,1.1,0.9,2,2,2H26.3z M12.3,10.2h6v1h-6 V10.2z M4.3,16.2v-3h22v3H4.3z"}})]),e("p",[t._v("Træk element her til for at fjerne det fra listen")])])]):t._e()],2)},zs=[],Vs=bt(Ws,Hs,zs,!1,null,null,null,null);const Ks=Vs.exports;const Xs={mixins:[Listing],components:{ViewTable:io,DropZone:Ks},props:{handle:{type:String,required:!0},collections:{type:Array,required:!0},exclusions:{type:Array,required:!1},activeStatus:{type:String,required:!0}},data(){return{visibleColumns:[{field:"title"}],sortColumn:"date",sortDirection:"desc",availableFilters:[]}},watch:{exclusions:function(){this.request()},availableFilters:function(n){const t=n.filter(e=>e.handle!=="status");t.length!==n.length&&(this.availableFilters=t)},activeFilterBadges:function(n){const t=Object.entries(n),e=t.filter(([r,a])=>r!=="active_status");e.length!==t.length&&(this.activeFilterBadges=Object.fromEntries(e))},searchQuery:function(n){n||(this.sortColumn="date",this.sortDirection="desc")}},mounted(){this.getFilters(),this.applyActiveStatusFilter()},computed:{configParameter(){return utf8btoa(JSON.stringify({type:"entries",collections:this.collections}))},requestUrl(){return cp_url("fieldtypes/relationship")+"?"+Ar.stringify({config:this.configParameter,collections:this.collections,exclusions:this.exclusions})},filtersUrl(){return cp_url("fieldtypes/relationship/filters")+"?"+Ar.stringify({config:this.configParameter,collections:this.collections})},itemsRestructured(){return this.items.map(n=>({order:null,entry:[n],unpublish_at:null,collection:n.collection,published:n.status==="published"}))}},methods:{applyActiveStatusFilter(){this.activeFilters={active_status:{status:this.activeStatus}}},getFilters(){return this.$axios.get(this.filtersUrl).then(n=>{this.availableFilters=n.data})},setPage(n){this.page=n},getStatusLabel(n){if(n.status==="published")return __("Published");if(n.status==="scheduled")return __("Scheduled");if(n.status==="expired")return __("Expired");if(n.status==="draft")return __("Draft")},getStatusTooltip(n){if(n.status==="published")return n.collection.unpublish_at?__("messages.status_published_with_date",{date:n.date}):null;if(n.status==="scheduled")return __("messages.status_scheduled_with_date",{date:n.date});if(n.status==="expired")return __("messages.status_expired_with_date",{date:n.date});if(n.status==="draft")return null}}};var Ys=function(){var t=this,e=t._self._c;return e("div",[t.initializing?e("div",{staticClass:"flex items-center justify-center text-center"},[e("loading-graphic")],1):t._e(),t.initializing?t._e():e("data-list",{staticClass:"curated-collections-view-lookup",attrs:{sort:!1,rows:t.itemsRestructured},scopedSlots:t._u([{key:"default",fn:function({hasSelections:r}){return e("div",{},[e("DropZone",{attrs:{group:"view"}},[e("div",{staticClass:"card overflow-hidden p-0 relative"},[e("div",{staticClass:"flex flex-wrap items-center justify-between px-2 pb-2 text-sm border-b"},[e("data-list-search",{ref:"search",staticClass:"h-8 mt-2 w-full",attrs:{placeholder:t.searchPlaceholder},model:{value:t.searchQuery,callback:function(a){t.searchQuery=a},expression:"searchQuery"}})],1),e("div",[e("data-list-filters",{ref:"filters",attrs:{filters:t.availableFilters,"active-filters":t.activeFilters,"active-filter-badges":t.activeFilterBadges,"active-count":t.activeFilterCount,"search-query":t.searchQuery},on:{changed:t.filterChanged}})],1),e("div",{staticClass:"overflow-x-auto overflow-y-hidden"},[e("view-table",{attrs:{tableType:"lookup",activeStatus:t.activeStatus,draggableProps:{group:{name:"view",put:!1,pull:"clone"},sort:!1}}})],1)])]),e("data-list-pagination",{staticClass:"mt-4",attrs:{"resource-meta":t.meta},on:{"page-selected":t.setPage}})],1)}}],null,!1,2703568266)})],1)},Qs=[],Js=bt(Xs,Ys,Qs,!1,null,null,null,null);const ks=Js.exports;const Zs={mixins:[Listing],components:{EntryForm:Cn,ViewLookup:ks,ViewTable:io},props:{handle:{type:String,required:!0},breadcrumbUrl:{type:String,required:!0},collections:{type:Array,required:!0},displayFormComputed:{type:Boolean,required:!0},activeStatus:{type:String,required:!0}},data(){return{showEntry:!1,formMode:null,formId:null,formValues:{},formErrors:[]}},computed:{requestUrl(){return cp_url(`curated-collections/api/collections/${this.handle}/entries`)+"?"+Ar.stringify({status:this.activeStatus})},exclusions(){return this.items.map(n=>n.entry?n.entry[0].id:null)}},methods:{closeEntry(){this.request(),this.formMode=null,this.formId=null,this.formValues={},this.showEntry=!1},openEntry(){this.showEntry=!0},createEntry(n){this.formMode="create",this.formValues=n,this.displayFormComputed?this.openEntry():this.saveEntry("create",n)},editEntry(n){this.formMode="edit",this.formId=n.id,this.openEntry()},entryDropped(n){if(n.moved){const{oldIndex:t,newIndex:e}=n.moved;this.entryMoved(t,e)}else if(n.added){const{element:t,newIndex:e}=n.added;this.entryAdded(t,e)}else if(n.removed){console.log("event.removed",n.removed);const{element:t}=n.removed;console.log("event.removed.element",t),this.deleteEntry(t)}},entryMoved(n,t){const e=[...this.items],r=[...e.slice(0,n),...e.slice(n+1)],a=[...r.slice(0,t),e[n],...r.slice(t)];this.reorderEntries(a)},entryAdded(n,t){const e={...this.activeStatus==="published"?{order:t+1}:{publish_order:t+1},entry:n.entry.map(r=>r.id),published:n.published};this.createEntry(e)},saveEntry(n,t){const e=n==="edit"?"patch":"post",r=n==="edit"?cp_url(`curated-collections/api/collections/${this.handle}/entries/${t.id}`):cp_url(`curated-collections/api/collections/${this.handle}/entries`),a={...t,curated_collection:this.handle};this.$axios[e](r,a).then(o=>{this.closeEntry(),this.$toast.success(n==="edit"?__("Entry successfully updated"):__("Entry successfully created"))}).catch(o=>{if(o.response&&o.response.status===422)if(!this.showEntry)this.openEntry();else{const{message:i,errors:s}=o.response.data;this.formErrors=s,this.$toast.error(i)}else o.response?this.$toast.error(o.response.data.message):(console.log(o),this.$toast.error(__("Something went wrong")))})},deleteEntry(n){console.log("deleteEntry",n);const t=cp_url(`curated-collections/api/collections/${this.handle}/entries/${n.id}`);this.$axios.delete(t).then(e=>{this.request(),this.$toast.success(__("Entry successfully deleted"))}).catch(e=>{console.log(e),this.$toast.error(__("Something went wrong"))})},reorderEntries(n){const t=cp_url(`curated-collections/api/collections/${this.handle}/entries/reorder`),e={ids:n.map(r=>r.id),curated_collection:this.handle};this.$axios.post(t,e).then(r=>{this.request(),this.$toast.success(__("Entries successfully reordered"))}).catch(r=>{console.log(r),this.$toast.error(__("Something went wrong"))})}}};var qs=function(){var t=this,e=t._self._c;return e("div",{staticClass:"curated-collections-view-tab"},[e("div",{staticClass:"curated-collections-grid"},[e("div",[t.initializing?e("div",{staticClass:"flex items-center justify-center text-center"},[e("loading-graphic")],1):t._e(),t.initializing?t._e():e("data-list",{staticClass:"curated-collections-listing",attrs:{sort:!1,rows:t.items}},[e("div",[e("div",{staticClass:"card overflow-hidden p-0 relative"},[e("div",{staticClass:"overflow-x-auto overflow-y-hidden"},[e("view-table",{attrs:{tableType:"listing",activeStatus:t.activeStatus,draggableProps:{group:{name:"view",put:!0,pull:!0}},draggableEvents:{change:t.entryDropped}},on:{edited:t.editEntry,deleted:t.deleteEntry}})],1)])])])],1),e("div",[t.initializing?t._e():e("view-lookup",{ref:"lookup",attrs:{activeStatus:t.activeStatus,exclusions:t.exclusions,handle:t.handle,collections:t.collections}})],1)]),t.showEntry?e("entry-form",{attrs:{handle:t.handle,mode:t.formMode,id:t.formId,"initial-values":t.formValues,errors:t.formErrors},on:{closed:t.closeEntry,submit:t.saveEntry}}):t._e()],1)},tl=[],el=bt(Zs,qs,tl,!1,null,null,null,null);const rl=el.exports,nl={components:{ViewTab:rl},props:{title:{type:String,required:!0},handle:{type:String,required:!0},breadcrumbUrl:{type:String,required:!0},collections:{type:Array,required:!0},entryBlueprint:{type:Array,required:!0},entryDefaults:{type:Object,required:!0},entryMeta:{type:Object,required:!0},displayFormComputed:{type:Boolean,required:!0}},data(){return{activeStatus:"published"}},mounted(){Statamic.$echo.booted(()=>{this.$echo.private(`curated-collections-private.${this.handle.toLowerCase()}`).listen(".CuratedCollections.CuratedCollectionUpdated",n=>this.curatedCollectionPushed(n))})},methods:{curatedCollectionPushed(){this.$refs.tab.request()}}};var ol=function(){var t=this,e=t._self._c;return e("div",{staticClass:"curated-collections-view"},[e("header",{staticClass:"mb-6"},[e("breadcrumb",{attrs:{url:t.breadcrumbUrl,title:t.__("Curated Collections")}}),e("div",{staticClass:"flex items-center"},[e("h1",{staticClass:"flex-1",domProps:{textContent:t._s(t.title)}}),this.$scopedSlots.twirldown?e("dropdown-list",{staticClass:"mr-2"},[t._t("twirldown")],2):t._e()],1)],1),e("div",{staticClass:"tabs-container"},[e("div",{staticClass:"publish-tabs tabs"},[e("button",{staticClass:"tab-button",class:{active:t.activeStatus==="published"},domProps:{textContent:t._s(t.__("Published"))},on:{click:function(r){t.activeStatus="published"}}}),e("button",{staticClass:"tab-button",class:{active:t.activeStatus==="draft"},domProps:{textContent:t._s(t.__("Draft"))},on:{click:function(r){t.activeStatus="draft"}}})])]),e("view-tab",{key:t.activeStatus,ref:"tab",attrs:{handle:t.handle,breadcrumbUrl:t.breadcrumbUrl,collections:t.collections,entryBlueprint:t.entryBlueprint,entryDefaults:t.entryDefaults,entryMeta:t.entryMeta,displayFormComputed:t.displayFormComputed,activeStatus:t.activeStatus}})],1)},al=[],il=bt(nl,ol,al,!1,null,null,null,null);const sl=il.exports,ll={props:{blueprint:Object,initialValues:Object,meta:Object,url:String},data(){return{values:this.initialValues,error:null,errors:{}}},methods:{clearErrors(){this.error=null,this.errors={}},submit(){this.saving=!0,this.clearErrors(),this.$axios.patch(this.url,this.values).then(n=>{this.saving=!1,this.$toast.success(__("Saved")),this.$refs.container.saved()}).catch(n=>this.handleAxiosError(n))},handleAxiosError(n){if(this.saving=!1,n.response&&n.response.status===422){const{message:t,errors:e}=n.response.data;this.error=t,this.errors=e,this.$toast.error(t)}else this.$toast.error(__("Something went wrong"))}},created(){this.$keys.bindGlobal(["mod+s"],n=>{n.preventDefault(),this.submit()})}};var ul=function(){var t=this,e=t._self._c;return t.blueprint?e("publish-container",{ref:"container",attrs:{name:"curated-collection",blueprint:t.blueprint,values:t.values,reference:"curated-collection",meta:t.meta,errors:t.errors},on:{updated:function(r){t.values=r}},scopedSlots:t._u([{key:"default",fn:function({setFieldValue:r,setFieldMeta:a}){return e("div",{},[e("configure-tabs",{attrs:{"enable-sidebar":!1},on:{updated:r,"meta-updated":a}}),e("div",{staticClass:"py-4 border-t flex justify-between"},[e("a",{staticClass:"btn",attrs:{href:t.url},domProps:{textContent:t._s(t.__("Cancel"))}}),e("button",{staticClass:"btn-primary",attrs:{type:"submit"},on:{click:t.submit}},[t._v(t._s(t.__("Save settings")))])])],1)}}],null,!1,1837689853)}):t._e()},cl=[],fl=bt(ll,ul,cl,!1,null,null,null,null);const dl=fl.exports,pl={props:{route:{type:String}},data(){return{title:null,handle:null}},watch:{title:function(n){this.handle=this.$slugify(n,"_")}},computed:{canSubmit(){return!!(this.title&&this.handle)}},methods:{submit(){this.$axios.post(this.route,{title:this.title,handle:this.handle}).then(n=>{window.location=n.data.redirect}).catch(n=>{this.$toast.error(n.response.data.message)})}},mounted(){this.$keys.bindGlobal(["return"],n=>{this.canSubmit&&this.submit()})}};var hl=function(){var t=this,e=t._self._c;return e("div",{staticClass:"max-w-lg mt-4 mx-auto"},[e("div",{staticClass:"rounded p-6 lg:px-20 lg:py-10 shadow bg-white"},[e("header",{staticClass:"text-center mb-16"},[e("h1",{staticClass:"mb-6"},[t._v(t._s(t.__("Create Curated Collection")))]),e("p",{staticClass:"text-gray",attrs:{"v-text":t.__("statamic-curated-collections::messages.configure_intro")}})]),e("div",{staticClass:"mb-10"},[e("label",{staticClass:"font-bold text-base mb-1",attrs:{for:"name"}},[t._v(t._s(t.__("Title")))]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],staticClass:"input-text",attrs:{type:"text",autofocus:"",tabindex:"1"},domProps:{value:t.title},on:{input:function(r){r.target.composing||(t.title=r.target.value)}}}),e("div",{staticClass:"text-2xs text-gray-600 mt-2 flex items-center"},[t._v(" "+t._s(t.__("statamic-curated-collections::configure.title_instructions"))+" ")])]),e("div",{staticClass:"mb-4"},[e("label",{staticClass:"font-bold text-base mb-1",attrs:{for:"name"}},[t._v(t._s(t.__("Handle")))]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.handle,expression:"handle"}],staticClass:"input-text",attrs:{type:"text",tabindex:"2"},domProps:{value:t.handle},on:{input:function(r){r.target.composing||(t.handle=r.target.value)}}}),e("div",{staticClass:"text-2xs text-gray-600 mt-2 flex items-center"},[t._v(" "+t._s(t.__("statamic-curated-collections::configure.handle_instructions"))+" ")])])]),e("div",{staticClass:"flex justify-center mt-8"},[e("button",{staticClass:"btn-primary mx-auto btn-lg",attrs:{tabindex:"4",disabled:!t.canSubmit},on:{click:t.submit}},[t._v(" "+t._s(t.__("statamic-curated-collections::messages.create_button"))+" ")])])])},vl=[],gl=bt(pl,hl,vl,!1,null,null,null,null);const yl=gl.exports;Statamic.booting(()=>{Statamic.component("curated_collection_popup-fieldtype",_o),Statamic.component("curated-collection-listing",Lo),Statamic.component("curated-collection-view",sl),Statamic.component("curated-collection-edit-form",dl),Statamic.component("curated-collection-create-form",yl)}); diff --git a/public/build/manifest.json b/public/build/manifest.json index acce9a9..295cccc 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -7,7 +7,7 @@ "css": [ "assets/curated-collections-addon-584acd78.css" ], - "file": "assets/curated-collections-addon-86a3f4b6.js", + "file": "assets/curated-collections-addon-d6c47609.js", "isEntry": true, "src": "resources/js/curated-collections-addon.js" }