(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);var o=document,V=(window,e.$),a=(e.Template7,e.utils),s=(e.device,e.support,e.Class,e.Modal,e.ConstructorMethods,e.ModalMethods,{init:function(){var d,p,b,u,f,v,h,c,g,m,w,x,a,C,T,M,I,L,y,E,s=this;var e=!!s.support.passiveListener&&{passive:!1,capture:!1};V(o).on(s.touchEvents.start,".list.sortable .sortable-handler",function(e){d=!(p=!1),b="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,f=V(this).parent("li"),a=f.index(),h=f.parents(".sortable");var t=f.parents(".list-group");t.length&&t.parents(h).length&&(h=t),v=h.children("ul").children("li"),s.panel&&(s.panel.allowOpen=!1),s.swipeout&&(s.swipeout.allow=!1)},e),s.on("touchmove:active",function(e){if(d&&f){var t="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(!p){C=f.parents(".page"),T=f.parents(".page-content");var a=parseInt(T.css("padding-top"),10),s=parseInt(T.css("padding-bottom"),10);E=T[0].scrollTop,I=C.offset().top+a,M=C.height()-a-s,f.addClass("sorting"),h.addClass("sortable-sorting"),L=f[0].offsetTop,g=f[0].offsetTop,m=f.parent().height()-L-f.height(),c=f[0].offsetHeight,y=f.offset().top}p=!0,e.preventDefault(),e.f7PreventSwipePanel=!0,u=t-b;var o=T[0].scrollTop-E,r=Math.min(Math.max(u+o,-g),m);f.transform("translate3d(0,"+r+"px,0)");var n,i=44,l=!0;u+o+i<-g&&(l=!1),m<u+o-i&&(l=!1),w=x=void 0,l&&(I+M<y+u+c+i&&(n=y+u+c+i-(I+M)),y+u<I+i&&(n=y+u-I-i),n&&(T[0].scrollTop+=n)),v.each(function(e,t){var a=V(t);if(a[0]!==f[0]){var s=a[0].offsetTop,o=a.height(),n=L+r;s-o/2<=n&&f.index()<a.index()?(a.transform("translate3d(0, "+-c+"px,0)"),w=a,x=void 0):n<=s+o/2&&f.index()>a.index()?(a.transform("translate3d(0, "+c+"px,0)"),w=void 0,x||(x=a)):a.transform("translate3d(0, 0%,0)")}})}}),s.on("touchend:passive",function(){if(!d||!p)return p=d=!1,void(d&&!p&&(s.panel&&(s.panel.allowOpen=!0),s.swipeout&&(s.swipeout.allow=!0)));var e;if(s.panel&&(s.panel.allowOpen=!0),s.swipeout&&(s.swipeout.allow=!0),v.transform(""),f.removeClass("sorting"),h.removeClass("sortable-sorting"),w?e=w.index():x&&(e=x.index()),s.params.sortable.moveElements&&(w&&f.insertAfter(w),x&&f.insertBefore(x)),(w||x)&&h.hasClass("virtual-list")){a=f[0].f7VirtualListIndex,e=x?x[0].f7VirtualListIndex:w[0].f7VirtualListIndex;var t=h[0].f7VirtualList;t&&t.moveItem(a,e)}void 0!==e&&e!==a&&(f.trigger("sortable:sort",{from:a,to:e}),s.emit("sortableSort",f[0],{from:a,to:e})),w=x=void 0,p=d=!1})},enable:function(e){void 0===e&&(e=".list.sortable");var t=V(e);0!==t.length&&(t.addClass("sortable-enabled"),t.trigger("sortable:enable"),this.emit("sortableEnable",t[0]))},disable:function(e){void 0===e&&(e=".list.sortable");var t=V(e);0!==t.length&&(t.removeClass("sortable-enabled"),t.trigger("sortable:disable"),this.emit("sortableDisable",t[0]))},toggle:function(e){void 0===e&&(e=".list.sortable");var t=V(e);0!==t.length&&(t.hasClass("sortable-enabled")?this.sortable.disable(t):this.sortable.enable(t))}}),n={name:"sortable",params:{sortable:{moveElements:!0}},create:function(){var e=this;a.extend(e,{sortable:{init:s.init.bind(e),enable:s.enable.bind(e),disable:s.disable.bind(e),toggle:s.toggle.bind(e)}})},on:{init:function(){this.params.sortable&&this.sortable.init()}},clicks:{".sortable-enable":function(e,t){void 0===t&&(t={});this.sortable.enable(t.sortable)},".sortable-disable":function(e,t){void 0===t&&(t={});this.sortable.disable(t.sortable)},".sortable-toggle":function(e,t){void 0===t&&(t={});this.sortable.toggle(t.sortable)}}};if(t){if(e.prototype.modules&&e.prototype.modules[n.name])return;e.use(n),e.instance&&(e.instance.useModuleParams(n,e.instance.params),e.instance.useModule(n))}return n}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))