var t,e,o={8306(t,e,o){o.d(e,{s:()=>s});var s,a=o(7704),r=o(2050),i=o(4084),n=o(2927),l=o(8899),p=o(6933),h=o(9431),d=function(t,e,o,s){var a,r=arguments.length,i=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,s);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(i=(r<3?a(i):r>3?a(e,o,i):a(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i};!function(t){let e=class extends((0,a.TS)(n.LitElement)){constructor(){super(...arguments),this.delay=0,this.animation=0,this.handle="",this.filter="",this.easing="",this.direction="vertical",this.group=null,this.draggableItems="md-draggable-item",this.ghostClass="",this.chosenClass="",this.dragClass="",this.fallbackClass="",this.swapThreshold=1,this.touchStartThreshold=0,this.forceFallback=!1,this.sort=!1,this.disabled=!1,this.editable=!1,this.sortableInstance=null,this.handleOnChange=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-change",t)},this.handleOnClone=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-clone",t)},this.handleOnUnchoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-unchoose",t)},this.handleOnRemove=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-remove",t)},this.handleOnAdd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-add",t)},this.handleOnChoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-choose",t)},this.handleOnEnd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-end",t)},this.handleOnMove=(0,r.sg)(t=>{t.stopPropagation(),this.dispatchDragEvent("drag-move",t)},100),this.handleOnStart=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-start",t)}}static get styles(){return[i.A,h.A]}get slotElement(){return this.draggableSlot}generateOptions(){return Object.assign(Object.assign({},this.group&&{group:this.group}),{disabled:this.disabled,animation:this.animation,sort:this.sort,delay:this.delay,handle:this.handle,easing:this.easing,filter:this.filter,swapThreshold:this.swapThreshold,touchStartThreshold:this.touchStartThreshold,draggable:this.draggableItems,direction:this.direction,ghostClass:this.ghostClass,chosenClass:this.chosenClass,dragClass:this.dragClass,fallbackClass:this.fallbackClass,forceFallback:this.forceFallback,onStart:this.handleOnStart,onMove:this.handleOnMove,onEnd:this.handleOnEnd,onChoose:this.handleOnChoose,onAdd:this.handleOnAdd,onRemove:this.handleOnRemove,onUnchoose:this.handleOnUnchoose,onClone:this.handleOnClone,onChange:this.handleOnChange})}initializeSortable(){this.sortableInstance||(this.sortableInstance=p.default.create(this,this.generateOptions()))}dispatchDragEvent(t,e){this.dispatchEvent(new CustomEvent(t,{composed:!0,bubbles:!0,detail:{srcEvent:e}}))}cleanupSortable(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)}connectedCallback(){super.connectedCallback(),this.initializeSortable()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupSortable()}setSortableOption(t,e){this.sortableInstance&&void 0!==this.sortableInstance.option(t)&&this.sortableInstance.option(t,e)}updateSortableInstance(t){for(const e of t.keys()){const t=this[e];this.setSortableOption(e,t)}}updated(t){super.updated(t),this.updateSortableInstance(t)}slottedChanged(){this.initializeSortable()}render(){return n.html`
        <div class="md-draggable" part="draggable" aria-disabled=${this.disabled}>
          <slot name="draggable-item"></slot>
        </div>
      `}};d([(0,l.property)({type:Number})],e.prototype,"delay",void 0),d([(0,l.property)({type:Number})],e.prototype,"animation",void 0),d([(0,l.property)({type:String})],e.prototype,"handle",void 0),d([(0,l.property)({type:String})],e.prototype,"filter",void 0),d([(0,l.property)({type:String})],e.prototype,"easing",void 0),d([(0,l.property)({type:String})],e.prototype,"direction",void 0),d([(0,l.property)({type:Object})],e.prototype,"group",void 0),d([(0,l.property)({type:String,attribute:"draggable-items"})],e.prototype,"draggableItems",void 0),d([(0,l.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),d([(0,l.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),d([(0,l.property)({type:String,attribute:"drag-class"})],e.prototype,"dragClass",void 0),d([(0,l.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),d([(0,l.property)({type:Number,attribute:"swap-threshold"})],e.prototype,"swapThreshold",void 0),d([(0,l.property)({type:Number,attribute:"touch-start-threshold"})],e.prototype,"touchStartThreshold",void 0),d([(0,l.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),d([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"sort",void 0),d([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),d([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),d([(0,l.query)("slot[name='draggable-item']")],e.prototype,"draggableSlot",void 0),e=d([(0,a.wW)("md-draggable")],e),t.ELEMENT=e}(s||(s={}))}},s={};function a(t){var e=s[t];if(void 0!==e)return e.exports;var r=s[t]={exports:{}};return o[t](r,r.exports,a),r.exports}a.m=o,t=[],a.O=(e,o,s,r)=>{if(!o){var i=1/0;for(h=0;h<t.length;h++){for(var[o,s,r]=t[h],n=!0,l=0;l<o.length;l++)(!1&r||i>=r)&&Object.keys(a.O).every(t=>a.O[t](o[l]))?o.splice(l--,1):(n=!1,r<i&&(i=r));if(n){t.splice(h--,1);var p=s();void 0!==p&&(e=p)}}return e}r=r||0;for(var h=t.length;h>0&&t[h-1][2]>r;h--)t[h]=t[h-1];t[h]=[o,s,r]},a.d=(t,e)=>{for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{a as __webpack_require__};e={4259:0},a.C=t=>{var o,s,{__webpack_esm_ids__:r,__webpack_esm_modules__:i,__webpack_esm_runtime__:n}=t,l=0;for(o in i)a.o(i,o)&&(a.m[o]=i[o]);for(n&&n(a);l<r.length;l++)s=r[l],a.o(e,s)&&e[s]&&e[s][0](),e[r[l]]=0;a.O()},a.O.j=t=>0===e[t];import*as r from"../9609.js";a.C(r);import*as i from"../4084.js";a.C(i);import*as n from"../2364.js";a.C(n);import*as l from"../9938.js";a.C(l);import*as p from"../4781.js";a.C(p);import*as h from"../5201.js";a.C(h);import*as d from"../2927.js";a.C(d);import*as c from"../2050.js";a.C(c);import*as g from"../608.js";a.C(g);import*as b from"../8899.js";a.C(b);import*as y from"../3203.js";a.C(y);import*as m from"../5757.js";a.C(m);import*as v from"../9431.js";a.C(v);import*as f from"../6933.js";a.C(f);import*as u from"../8180.js";a.C(u);var C=a.O(void 0,[9609,4084,2364,9938,4781,5201,2927,2050,608,8899,3203,5757,9431,6933,8180],()=>a(8306));const O=(C=a.O(C)).s;export{O as Draggable};