diff --git a/extensions/tags/js/dist/admin.js b/extensions/tags/js/dist/admin.js index eba3a38ad..46c4a8452 100644 --- a/extensions/tags/js/dist/admin.js +++ b/extensions/tags/js/dist/admin.js @@ -1,9 +1,9 @@ -module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=53)}([function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat.extend},function(t,e,n){"use strict";function o(t){return t.slice(0).sort((function(t,e){var n=t.position(),o=e.position();if(null===n&&null===o)return e.discussionCount()-t.discussionCount();if(null===o)return-1;if(null===n)return 1;var a=t.parent(),r=e.parent();return a===r?n-o:a&&r?a.position()-r.position():a?a===e?1:a.position()-o:r?r===t?-1:n-r.position():0}))}n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(7),a=n.n(o);function r(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=t&&t.icon(),r=n.useColor,i=void 0===r||r;return e.className=a()([e.className,"icon",o?t.icon():"TagIcon"]),t&&i?(e.style=e.style||{},e.style["--color"]=t.color(),o&&(e.style.color=t.color())):t||(e.className+=" untagged"),o?m("i",e):m("span",e)}},function(t,e,n){"use strict";function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var o=n(14),a=n.n(o),r=n(10),i=n.n(r),s=n(3);function l(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=a()(e,"link"),o=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var r=t.color();r&&(e.style["--tag-bg"]=r,e.className+=" colored"),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?i.a:"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&Object(s.a)(t,{},{useColor:!1})," ",o))}},,function(t,e){t.exports=flarum.core.compat["utils/classList"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var o=n(14),a=n.n(o),r=n(5),i=n(2);function s(t,e){void 0===e&&(e={});var n=[],o=a()(e,"link");return e.className="TagsLabel "+(e.className||""),t?Object(i.a)(t).forEach((function(e){(e||1===t.length)&&n.push(Object(r.a)(e,{link:o}))})):n.push(Object(r.a)()),m("span",e,n)}},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["utils/Stream"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var o=n(4),a=n(0),r=n.n(a),i=n(18),s=n.n(i),l=n(19),c=n.n(l),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(s()(r.a,{name:r.a.attribute("name"),slug:r.a.attribute("slug"),description:r.a.attribute("description"),color:r.a.attribute("color"),backgroundUrl:r.a.attribute("backgroundUrl"),backgroundMode:r.a.attribute("backgroundMode"),icon:r.a.attribute("icon"),position:r.a.attribute("position"),parent:r.a.hasOne("parent"),children:r.a.hasMany("children"),defaultSort:r.a.attribute("defaultSort"),isChild:r.a.attribute("isChild"),isHidden:r.a.attribute("isHidden"),discussionCount:r.a.attribute("discussionCount"),lastPostedAt:r.a.attribute("lastPostedAt",r.a.transformDate),lastPostedDiscussion:r.a.hasOne("lastPostedDiscussion"),isRestricted:r.a.attribute("isRestricted"),canStartDiscussion:r.a.attribute("canStartDiscussion"),canAddToDiscussion:r.a.attribute("canAddToDiscussion"),isPrimary:c()("position","parent",(function(t,e){return null!==t&&!1===e}))}))},function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["utils/extract"]},function(t,e){t.exports=flarum.core.compat["components/PermissionGrid"]},,function(t,e){},function(t,e){t.exports=flarum.core.compat["utils/mixin"]},function(t,e){t.exports=flarum.core.compat["utils/computed"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},function(t,e,n){"use strict";var o=n(2),a=n(12),r=n(8),i=n(3),s=n(5);e.a={"tags/utils/sortTags":o.a,"tags/models/Tag":a.a,"tags/helpers/tagsLabel":r.a,"tags/helpers/tagIcon":i.a,"tags/helpers/tagLabel":s.a}},function(t,e){t.exports=flarum.core},,,,,,function(t,e){t.exports=flarum.core.compat["utils/withAttr"]},,function(t,e,n){"use strict";var o=n(12),a=n(1),r=n(15),i=n.n(r),s=n(44),l=n.n(s),c=n(45),u=n.n(c),d=n(9),p=n.n(d),f=n(13),h=n.n(f),g=n(5),v=n(3),b=n(2),y=function(){Object(a.extend)(i.a.prototype,"oninit",(function(){this.loading=!0})),Object(a.extend)(i.a.prototype,"oncreate",(function(){var t=this;app.store.find("tags").then((function(){t.loading=!1,m.redraw()}))})),Object(a.override)(i.a.prototype,"view",(function(t,e){return this.loading?m(h.a,null):t(e)})),Object(a.override)(app,"getRequiredPermissions",(function(t,e){var n=e.match(/^tag\d+\./);return n?t(e.substr(n[0].length)).map((function(t){return n[0]+t})):t(e)})),Object(a.extend)(i.a.prototype,"scopeItems",(function(t){Object(b.a)(app.store.all("tags")).filter((function(t){return t.isRestricted()})).forEach((function(e){return t.add("tag"+e.id(),{label:Object(g.a)(e),onremove:function(){return e.save({isRestricted:!1})},render:function(t){return"viewForum"===t.permission||"startDiscussion"===t.permission||t.permission&&0===t.permission.indexOf("discussion.")&&!1!==t.tagScoped||t.tagScoped?l.a.component({permission:"tag"+e.id()+"."+t.permission,allowGuest:t.allowGuest}):""}})}))})),Object(a.extend)(i.a.prototype,"scopeControlItems",(function(t){var e=Object(b.a)(app.store.all("tags").filter((function(t){return!t.isRestricted()})));e.length&&t.add("tag",m(u.a,{className:"Dropdown--restrictByTag",buttonClassName:"Button Button--text",label:app.translator.trans("flarum-tags.admin.permissions.restrict_by_tag_heading"),icon:"fas fa-plus",caretIcon:null},e.map((function(t){return m(p.a,{icon:!0,onclick:function(){return t.save({isRestricted:!0})}},[Object(v.a)(t,{className:"Button-icon"})," ",t.name()])}))))}))},_=function(){app.extensionData.for("flarum-tags").registerPermission({icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.tag_discussions_label"),permission:"discussion.tag"},"moderate",95).registerPermission({icon:"fas fa-tags",label:app.translator.trans("flarum-tags.admin.permissions.bypass_tag_counts_label"),permission:"bypassTagCounts"},"start",89)},w=n(46),T=n.n(w),E=function(){Object(a.extend)(T.a.prototype,"homePageItems",(function(t){t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})}))},D=n(47),S=n.n(D),x=function(){Object(a.extend)(i.a.prototype,"startItems",(function(t){t.add("allowTagChange",{icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:function(){var t=parseInt(app.data.settings.allow_tag_change,10);return S.a.component({defaultLabel:t?app.translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:app.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:app.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)}))},C=n(4); +module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=56)}([function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat.extend},function(t,e,n){"use strict";function o(t){return t.slice(0).sort((function(t,e){var n=t.position(),o=e.position();if(null===n&&null===o)return e.discussionCount()-t.discussionCount();if(null===o)return-1;if(null===n)return 1;var a=t.parent(),r=e.parent();return a===r?n-o:a&&r?a.position()-r.position():a?a===e?1:a.position()-o:r?r===t?-1:n-r.position():0}))}n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n(7),a=n.n(o);function r(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=t&&t.icon(),r=n.useColor,i=void 0===r||r;return e.className=a()([e.className,"icon",o?t.icon():"TagIcon"]),t&&i?(e.style=e.style||{},e.style["--color"]=t.color(),o&&(e.style.color=t.color())):t||(e.className+=" untagged"),o?m("i",e):m("span",e)}},function(t,e,n){"use strict";function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var o=n(14),a=n.n(o),r=n(10),i=n.n(r),s=n(3);function l(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=a()(e,"link"),o=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var r=t.color();r&&(e.style["--tag-bg"]=r,e.className+=" colored"),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?i.a:"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&Object(s.a)(t,{},{useColor:!1})," ",o))}},,function(t,e){t.exports=flarum.core.compat["utils/classList"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var o=n(14),a=n.n(o),r=n(5),i=n(2);function s(t,e){void 0===e&&(e={});var n=[],o=a()(e,"link");return e.className="TagsLabel "+(e.className||""),t?Object(i.a)(t).forEach((function(e){(e||1===t.length)&&n.push(Object(r.a)(e,{link:o}))})):n.push(Object(r.a)()),m("span",e,n)}},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["utils/Stream"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var o=n(4),a=n(0),r=n.n(a),i=n(18),s=n.n(i),l=n(19),c=n.n(l),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(s()(r.a,{name:r.a.attribute("name"),slug:r.a.attribute("slug"),description:r.a.attribute("description"),color:r.a.attribute("color"),backgroundUrl:r.a.attribute("backgroundUrl"),backgroundMode:r.a.attribute("backgroundMode"),icon:r.a.attribute("icon"),position:r.a.attribute("position"),parent:r.a.hasOne("parent"),children:r.a.hasMany("children"),defaultSort:r.a.attribute("defaultSort"),isChild:r.a.attribute("isChild"),isHidden:r.a.attribute("isHidden"),discussionCount:r.a.attribute("discussionCount"),lastPostedAt:r.a.attribute("lastPostedAt",r.a.transformDate),lastPostedDiscussion:r.a.hasOne("lastPostedDiscussion"),isRestricted:r.a.attribute("isRestricted"),canStartDiscussion:r.a.attribute("canStartDiscussion"),canAddToDiscussion:r.a.attribute("canAddToDiscussion"),isPrimary:c()("position","parent",(function(t,e){return null!==t&&!1===e}))}))},function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["utils/extract"]},function(t,e){t.exports=flarum.core.compat["components/PermissionGrid"]},,function(t,e){},function(t,e){t.exports=flarum.core.compat["utils/mixin"]},function(t,e){t.exports=flarum.core.compat["utils/computed"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},function(t,e,n){"use strict";var o=n(2),a=n(12),r=n(8),i=n(3),s=n(5);e.a={"tags/utils/sortTags":o.a,"tags/models/Tag":a.a,"tags/helpers/tagsLabel":r.a,"tags/helpers/tagIcon":i.a,"tags/helpers/tagLabel":s.a}},function(t,e){t.exports=flarum.core},,,,,,function(t,e){t.exports=flarum.core.compat["utils/withAttr"]},,function(t,e,n){"use strict";var o=n(12),a=n(1),r=n(15),i=n.n(r),s=n(47),l=n.n(s),c=n(48),u=n.n(c),d=n(9),p=n.n(d),f=n(13),h=n.n(f),g=n(5),v=n(3),b=n(2),y=function(){Object(a.extend)(i.a.prototype,"oninit",(function(){this.loading=!0})),Object(a.extend)(i.a.prototype,"oncreate",(function(){var t=this;app.store.find("tags").then((function(){t.loading=!1,m.redraw()}))})),Object(a.override)(i.a.prototype,"view",(function(t,e){return this.loading?m(h.a,null):t(e)})),Object(a.override)(app,"getRequiredPermissions",(function(t,e){var n=e.match(/^tag\d+\./);return n?t(e.substr(n[0].length)).map((function(t){return n[0]+t})):t(e)})),Object(a.extend)(i.a.prototype,"scopeItems",(function(t){Object(b.a)(app.store.all("tags")).filter((function(t){return t.isRestricted()})).forEach((function(e){return t.add("tag"+e.id(),{label:Object(g.a)(e),onremove:function(){return e.save({isRestricted:!1})},render:function(t){return"viewForum"===t.permission||"startDiscussion"===t.permission||t.permission&&0===t.permission.indexOf("discussion.")&&!1!==t.tagScoped||t.tagScoped?l.a.component({permission:"tag"+e.id()+"."+t.permission,allowGuest:t.allowGuest}):""}})}))})),Object(a.extend)(i.a.prototype,"scopeControlItems",(function(t){var e=Object(b.a)(app.store.all("tags").filter((function(t){return!t.isRestricted()})));e.length&&t.add("tag",m(u.a,{className:"Dropdown--restrictByTag",buttonClassName:"Button Button--text",label:app.translator.trans("flarum-tags.admin.permissions.restrict_by_tag_heading"),icon:"fas fa-plus",caretIcon:null},e.map((function(t){return m(p.a,{icon:!0,onclick:function(){return t.save({isRestricted:!0})}},[Object(v.a)(t,{className:"Button-icon"})," ",t.name()])}))))}))},_=function(){app.extensionData.for("flarum-tags").registerPermission({icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.tag_discussions_label"),permission:"discussion.tag"},"moderate",95).registerPermission({icon:"fas fa-tags",label:app.translator.trans("flarum-tags.admin.permissions.bypass_tag_counts_label"),permission:"bypassTagCounts"},"start",89)},w=n(49),T=n.n(w),E=function(){Object(a.extend)(T.a.prototype,"homePageItems",(function(t){t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})}))},D=n(50),S=n.n(D),x=function(){Object(a.extend)(i.a.prototype,"startItems",(function(t){t.add("allowTagChange",{icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:function(){var t=parseInt(app.data.settings.allow_tag_change,10);return S.a.component({defaultLabel:t?app.translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:app.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:app.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)}))},C=n(4); /**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT */ -function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function O(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function k(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var j=k(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),F=k(/Edge/i),L=k(/firefox/i),R=k(/safari/i)&&!k(/chrome/i)&&!k(/android/i),B=k(/iP(ad|od|hone)/i),X=k(/chrome/i)&&k(/android/i),Y={capture:!1,passive:!1};function H(t,e,n){t.addEventListener(e,n,!j&&Y)}function W(t,e,n){t.removeEventListener(e,n,!j&&Y)}function z(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function G(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function U(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&z(t,e):z(t,e))||o&&t===n)return t;if(t===n)break}while(t=G(t))}return null}var q,K=/\s+/g;function V(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(K," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(K," ")}}function Z(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Q(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Z(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function J(t,e,n){if(t){var o=t.getElementsByTagName(e),a=0,r=o.length;if(n)for(;a=r:a<=r))return o;if(o===tt())break;o=st(o,!1)}return!1}function ot(t,e,n,o){for(var a=0,r=0,i=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,a=A(n,bt);gt.pluginEvent.bind(de)(t,e,O({dragEl:wt,parentEl:Tt,ghostEl:Et,rootEl:Dt,nextEl:St,lastDownEl:xt,cloneEl:Ct,cloneHidden:Nt,dragStarted:Yt,putSortable:kt,activeSortable:de.active,originalEvent:o,oldIndex:Ot,oldDraggableIndex:Mt,newIndex:Pt,newDraggableIndex:It,hideGhostForTarget:se,unhideGhostForTarget:le,cloneNowHidden:function(){Nt=!0},cloneNowShown:function(){Nt=!1},dispatchSortableEvent:function(t){_t({sortable:e,name:t,originalEvent:o})}},a))};function _t(t){vt(O({putSortable:kt,cloneEl:Ct,targetEl:wt,rootEl:Dt,oldIndex:Ot,oldDraggableIndex:Mt,newIndex:Pt,newDraggableIndex:It},t))}var wt,Tt,Et,Dt,St,xt,Ct,Nt,Ot,Pt,Mt,It,At,kt,jt,Ft,Lt,Rt,Bt,Xt,Yt,Ht,Wt,zt,Gt,Ut=!1,qt=!1,$t=[],Kt=!1,Vt=!1,Zt=[],Qt=!1,Jt=[],te="undefined"!=typeof document,ee=B,ne=F||j?"cssFloat":"float",oe=te&&!X&&!B&&"draggable"in document.createElement("div"),ae=function(){if(te){if(j)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),re=function(t,e){var n=Z(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=ot(t,0,e),r=ot(t,1,e),i=a&&Z(a),s=r&&Z(r),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+et(a).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+et(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[ne]||r&&"none"===n[ne]&&l+c>o)?"vertical":"horizontal"},ie=function(t){function e(t,n){return function(o,a,r,i){var s=o.options.group.name&&a.options.group.name&&o.options.group.name===a.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,a,r,i),n)(o,a,r,i);var l=(n?o:a).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==P(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},se=function(){!ae&&Et&&Z(Et,"display","none")},le=function(){!ae&&Et&&Z(Et,"display","")};te&&document.addEventListener("click",(function(t){if(qt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),qt=!1,!1}),!0);var ce=function(t){if(wt){t=t.touches?t.touches[0]:t;var e=(a=t.clientX,r=t.clientY,$t.some((function(t){var e=t[pt].options.emptyInsertThreshold;if(e&&!at(t)){var n=et(t),o=a>=n.left-e&&a<=n.right+e,s=r>=n.top-e&&r<=n.bottom+e;return o&&s?i=t:void 0}})),i);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[pt]._onDragOver(n)}}var a,r,i},ue=function(t){wt&&wt.parentNode[pt]._isOutsideThisEl(t.target)};function de(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=I({},e),t[pt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return re(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==de.supportPointer&&"PointerEvent"in window&&!R,emptyInsertThreshold:5};for(var o in gt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var a in ie(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&oe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?H(t,"pointerdown",this._onTapStart):(H(t,"mousedown",this._onTapStart),H(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(H(t,"dragover",this),H(t,"dragenter",this)),$t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),I(this,ft())}function pe(t,e,n,o,a,r,i,s){var l,c,u=t[pt],d=u.options.onMove;return!window.CustomEvent||j||F?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=a||e,l.relatedRect=r||et(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function fe(t){t.draggable=!1}function me(){Qt=!1}function he(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function ge(t){return setTimeout(t,0)}function ve(t){return clearTimeout(t)}de.prototype={constructor:de,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,wt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,a=o.preventOnFilter,r=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){Jt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Jt.push(o)}}(n),!wt&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!R||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=U(s,o.draggable,n,!1))&&s.animated||xt===s)){if(Ot=rt(s),Mt=rt(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return _t({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),yt("filter",e,{evt:t}),void(a&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=U(l,o.trim(),n,!1))return _t({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),yt("filter",e,{evt:t}),!0}))))return void(a&&t.cancelable&&t.preventDefault());o.handle&&!U(l,o.handle,n,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,n){var o,a=this,r=a.el,i=a.options,s=r.ownerDocument;if(n&&!wt&&n.parentNode===r){var l=et(n);if(Dt=r,Tt=(wt=n).parentNode,St=wt.nextSibling,xt=n,At=i.group,de.dragged=wt,jt={target:wt,clientX:(e||t).clientX,clientY:(e||t).clientY},Bt=jt.clientX-l.left,Xt=jt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,wt.style["will-change"]="all",o=function(){yt("delayEnded",a,{evt:t}),de.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!L&&a.nativeDraggable&&(wt.draggable=!0),a._triggerDragStart(t,e),_t({sortable:a,name:"choose",originalEvent:t}),V(wt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){J(wt,t.trim(),fe)})),H(s,"dragover",ce),H(s,"mousemove",ce),H(s,"touchmove",ce),H(s,"mouseup",a._onDrop),H(s,"touchend",a._onDrop),H(s,"touchcancel",a._onDrop),L&&this.nativeDraggable&&(this.options.touchStartThreshold=4,wt.draggable=!0),yt("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(F||j))o();else{if(de.eventCanceled)return void this._onDrop();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(o,i.delay)}}},_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(){wt&&fe(wt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;W(t,"mouseup",this._disableDelayedDrag),W(t,"touchend",this._disableDelayedDrag),W(t,"touchcancel",this._disableDelayedDrag),W(t,"mousemove",this._delayedDragTouchMoveHandler),W(t,"touchmove",this._delayedDragTouchMoveHandler),W(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?H(document,"pointermove",this._onTouchMove):H(document,e?"touchmove":"mousemove",this._onTouchMove):(H(wt,"dragend",this),H(Dt,"dragstart",this._onDragStart));try{document.selection?ge((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Ut=!1,Dt&&wt){yt("dragStarted",this,{evt:e}),this.nativeDraggable&&H(document,"dragover",ue);var n=this.options;!t&&V(wt,n.dragClass,!1),V(wt,n.ghostClass,!0),de.active=this,t&&this._appendGhost(),_t({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ft){this._lastX=Ft.clientX,this._lastY=Ft.clientY,se();for(var t=document.elementFromPoint(Ft.clientX,Ft.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ft.clientX,Ft.clientY))!==e;)e=t;if(wt.parentNode[pt]._isOutsideThisEl(t),e)do{if(e[pt]){if(e[pt]._onDragOver({clientX:Ft.clientX,clientY:Ft.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);le()}},_onTouchMove:function(t){if(jt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,a=t.touches?t.touches[0]:t,r=Et&&Q(Et,!0),i=Et&&r&&r.a,s=Et&&r&&r.d,l=ee&&Gt&&it(Gt),c=(a.clientX-jt.clientX+o.x)/(i||1)+(l?l[0]-Zt[0]:0)/(i||1),u=(a.clientY-jt.clientY+o.y)/(s||1)+(l?l[1]-Zt[1]:0)/(s||1);if(!de.active&&!Ut){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,a,this)&&!h.animated){if(h===wt)return I(!1);if(h&&r===t.target&&(i=h),i&&(n=et(i)),!1!==pe(Dt,r,wt,e,i,n,t,!!i))return M(),r.appendChild(wt),Tt=r,A(),I(!0)}else if(h&&function(t,e,n){var o=et(ot(n.el,0,n.options,!0));return e?t.clientXu+c*r/2:ld-zt)return-Wt}else if(l>u+c*(1-a)/2&&ld-c*r/2))return l>u+c/2?1:-1;return 0}(t,i,n,a,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Vt,Ht===i))){var S=rt(wt);do{S-=v,y=Tt.children[S]}while(y&&("none"===Z(y,"display")||y===Et))}if(0===v||y===i)return I(!1);Ht=i,Wt=v;var x=i.nextElementSibling,C=!1,N=pe(Dt,r,wt,e,i,n,t,C=1===v);if(!1!==N)return 1!==N&&-1!==N||(C=1===N),Qt=!0,setTimeout(me,30),M(),C&&!x?r.appendChild(wt):i.parentNode.insertBefore(wt,C?x:i),E&&ut(E,0,D-E.scrollTop),Tt=wt.parentNode,void 0===b||Vt||(zt=Math.abs(b-et(i)[T])),A(),I(!0)}if(r.contains(wt))return I(!1)}return!1}function P(s,l){yt(s,f,O({evt:t,isOwner:u,axis:a?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:p,target:i,completed:I,onMove:function(n,o){return pe(Dt,r,wt,e,n,et(n),t,o)},changed:A},l))}function M(){P("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function I(e){return P("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(f),f!==p&&(V(wt,kt?kt.options.ghostClass:c.options.ghostClass,!1),V(wt,s.ghostClass,!0)),kt!==f&&f!==de.active?kt=f:f===de.active&&kt&&(kt=null),p===f&&(f._ignoreWhileAnimating=i),f.animateAll((function(){P("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===wt&&!wt.animated||i===r&&!i.animated)&&(Ht=null),s.dragoverBubble||t.rootEl||i===document||(wt.parentNode[pt]._isOutsideThisEl(t.target),!e&&ce(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function A(){Pt=rt(wt),It=rt(wt,s.draggable),_t({sortable:f,name:"change",toEl:r,newIndex:Pt,newDraggableIndex:It,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){W(document,"mousemove",this._onTouchMove),W(document,"touchmove",this._onTouchMove),W(document,"pointermove",this._onTouchMove),W(document,"dragover",ce),W(document,"mousemove",ce),W(document,"touchmove",ce)},_offUpEvents:function(){var t=this.el.ownerDocument;W(t,"mouseup",this._onDrop),W(t,"touchend",this._onDrop),W(t,"pointerup",this._onDrop),W(t,"touchcancel",this._onDrop),W(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Pt=rt(wt),It=rt(wt,n.draggable),yt("drop",this,{evt:t}),Tt=wt&&wt.parentNode,Pt=rt(wt),It=rt(wt,n.draggable),de.eventCanceled||(Ut=!1,Vt=!1,Kt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ve(this.cloneId),ve(this._dragStartId),this.nativeDraggable&&(W(document,"drop",this),W(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),R&&Z(document.body,"user-select",""),Z(wt,"transform",""),t&&(Yt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Et&&Et.parentNode&&Et.parentNode.removeChild(Et),(Dt===Tt||kt&&"clone"!==kt.lastPutMode)&&Ct&&Ct.parentNode&&Ct.parentNode.removeChild(Ct),wt&&(this.nativeDraggable&&W(wt,"dragend",this),fe(wt),wt.style["will-change"]="",Yt&&!Ut&&V(wt,kt?kt.options.ghostClass:this.options.ghostClass,!1),V(wt,this.options.chosenClass,!1),_t({sortable:this,name:"unchoose",toEl:Tt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Dt!==Tt?(Pt>=0&&(_t({rootEl:Tt,name:"add",toEl:Tt,fromEl:Dt,originalEvent:t}),_t({sortable:this,name:"remove",toEl:Tt,originalEvent:t}),_t({rootEl:Tt,name:"sort",toEl:Tt,fromEl:Dt,originalEvent:t}),_t({sortable:this,name:"sort",toEl:Tt,originalEvent:t})),kt&&kt.save()):Pt!==Ot&&Pt>=0&&(_t({sortable:this,name:"update",toEl:Tt,originalEvent:t}),_t({sortable:this,name:"sort",toEl:Tt,originalEvent:t})),de.active&&(null!=Pt&&-1!==Pt||(Pt=Ot,It=Mt),_t({sortable:this,name:"end",toEl:Tt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){yt("nulling",this),Dt=wt=Tt=Et=St=Ct=xt=Nt=jt=Ft=Yt=Pt=It=Ot=Mt=Ht=Wt=kt=At=de.dragged=de.ghost=de.clone=de.active=null,Jt.forEach((function(t){t.checked=!0})),Jt.length=Lt=Rt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":wt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,a=n.length,r=this.options;o li").map((function(){return{id:$(this).data("id"),children:$(this).find("li").map((function(){return $(this).data("id")})).get()}})).get();e.forEach((function(t,e){var n=app.store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach((function(t,e){app.store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})}))})),app.request({url:app.forum.attribute("apiUrl")+"/tags/order",method:"POST",body:{order:e}}),this.forcedRefreshKey++,m.redraw()},e}(ke.a),qe=n(21),$e=Object.assign(qe.a,{"tags/addTagsHomePageOption":E,"tags/addTagChangePermission":x,"tags/components/TagsPage":Ue,"tags/components/EditTagModal":ze,"tags/addTagPermission":_,"tags/addTagsPermissionScope":y}),Ke=n(22);app.initializers.add("flarum-tags",(function(t){t.store.models.tags=o.a,t.extensionData.for("flarum-tags").registerPage(Ue),y(),_(),E(),x()})),Object.assign(Ke.compat,$e)},,,,,,,,,,,,,,function(t,e){t.exports=flarum.core.compat["components/PermissionDropdown"]},function(t,e){t.exports=flarum.core.compat["components/Dropdown"]},function(t,e){t.exports=flarum.core.compat["components/BasicsPage"]},function(t,e){t.exports=flarum.core.compat["components/SettingDropdown"]},function(t,e){t.exports=flarum.core.compat["components/ExtensionPage"]},function(t,e){t.exports=flarum.core.compat["utils/ItemList"]},function(t,e){t.exports=flarum.core.compat["utils/string"]},,,function(t,e,n){"use strict";n.r(e);var o=n(17);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n(30)}]); +function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function O(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function k(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var j=k(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),F=k(/Edge/i),L=k(/firefox/i),R=k(/safari/i)&&!k(/chrome/i)&&!k(/android/i),B=k(/iP(ad|od|hone)/i),X=k(/chrome/i)&&k(/android/i),Y={capture:!1,passive:!1};function H(t,e,n){t.addEventListener(e,n,!j&&Y)}function W(t,e,n){t.removeEventListener(e,n,!j&&Y)}function z(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function G(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function U(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&z(t,e):z(t,e))||o&&t===n)return t;if(t===n)break}while(t=G(t))}return null}var q,K=/\s+/g;function V(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(K," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(K," ")}}function Z(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Q(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Z(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function J(t,e,n){if(t){var o=t.getElementsByTagName(e),a=0,r=o.length;if(n)for(;a=r:a<=r))return o;if(o===tt())break;o=st(o,!1)}return!1}function ot(t,e,n,o){for(var a=0,r=0,i=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,a=A(n,bt);gt.pluginEvent.bind(de)(t,e,O({dragEl:wt,parentEl:Tt,ghostEl:Et,rootEl:Dt,nextEl:St,lastDownEl:xt,cloneEl:Ct,cloneHidden:Nt,dragStarted:Yt,putSortable:kt,activeSortable:de.active,originalEvent:o,oldIndex:Ot,oldDraggableIndex:Mt,newIndex:Pt,newDraggableIndex:It,hideGhostForTarget:se,unhideGhostForTarget:le,cloneNowHidden:function(){Nt=!0},cloneNowShown:function(){Nt=!1},dispatchSortableEvent:function(t){_t({sortable:e,name:t,originalEvent:o})}},a))};function _t(t){vt(O({putSortable:kt,cloneEl:Ct,targetEl:wt,rootEl:Dt,oldIndex:Ot,oldDraggableIndex:Mt,newIndex:Pt,newDraggableIndex:It},t))}var wt,Tt,Et,Dt,St,xt,Ct,Nt,Ot,Pt,Mt,It,At,kt,jt,Ft,Lt,Rt,Bt,Xt,Yt,Ht,Wt,zt,Gt,Ut=!1,qt=!1,$t=[],Kt=!1,Vt=!1,Zt=[],Qt=!1,Jt=[],te="undefined"!=typeof document,ee=B,ne=F||j?"cssFloat":"float",oe=te&&!X&&!B&&"draggable"in document.createElement("div"),ae=function(){if(te){if(j)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),re=function(t,e){var n=Z(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=ot(t,0,e),r=ot(t,1,e),i=a&&Z(a),s=r&&Z(r),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+et(a).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+et(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[ne]||r&&"none"===n[ne]&&l+c>o)?"vertical":"horizontal"},ie=function(t){function e(t,n){return function(o,a,r,i){var s=o.options.group.name&&a.options.group.name&&o.options.group.name===a.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,a,r,i),n)(o,a,r,i);var l=(n?o:a).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==P(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},se=function(){!ae&&Et&&Z(Et,"display","none")},le=function(){!ae&&Et&&Z(Et,"display","")};te&&document.addEventListener("click",(function(t){if(qt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),qt=!1,!1}),!0);var ce=function(t){if(wt){t=t.touches?t.touches[0]:t;var e=(a=t.clientX,r=t.clientY,$t.some((function(t){var e=t[pt].options.emptyInsertThreshold;if(e&&!at(t)){var n=et(t),o=a>=n.left-e&&a<=n.right+e,s=r>=n.top-e&&r<=n.bottom+e;return o&&s?i=t:void 0}})),i);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[pt]._onDragOver(n)}}var a,r,i},ue=function(t){wt&&wt.parentNode[pt]._isOutsideThisEl(t.target)};function de(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=I({},e),t[pt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return re(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==de.supportPointer&&"PointerEvent"in window&&!R,emptyInsertThreshold:5};for(var o in gt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var a in ie(e),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!e.forceFallback&&oe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?H(t,"pointerdown",this._onTapStart):(H(t,"mousedown",this._onTapStart),H(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(H(t,"dragover",this),H(t,"dragenter",this)),$t.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),I(this,ft())}function pe(t,e,n,o,a,r,i,s){var l,c,u=t[pt],d=u.options.onMove;return!window.CustomEvent||j||F?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=a||e,l.relatedRect=r||et(e),l.willInsertAfter=s,l.originalEvent=i,t.dispatchEvent(l),d&&(c=d.call(u,l,i)),c}function fe(t){t.draggable=!1}function me(){Qt=!1}function he(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function ge(t){return setTimeout(t,0)}function ve(t){return clearTimeout(t)}de.prototype={constructor:de,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,wt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,a=o.preventOnFilter,r=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(i||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){Jt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Jt.push(o)}}(n),!wt&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!R||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=U(s,o.draggable,n,!1))&&s.animated||xt===s)){if(Ot=rt(s),Mt=rt(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return _t({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),yt("filter",e,{evt:t}),void(a&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=U(l,o.trim(),n,!1))return _t({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),yt("filter",e,{evt:t}),!0}))))return void(a&&t.cancelable&&t.preventDefault());o.handle&&!U(l,o.handle,n,!1)||this._prepareDragStart(t,i,s)}}},_prepareDragStart:function(t,e,n){var o,a=this,r=a.el,i=a.options,s=r.ownerDocument;if(n&&!wt&&n.parentNode===r){var l=et(n);if(Dt=r,Tt=(wt=n).parentNode,St=wt.nextSibling,xt=n,At=i.group,de.dragged=wt,jt={target:wt,clientX:(e||t).clientX,clientY:(e||t).clientY},Bt=jt.clientX-l.left,Xt=jt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,wt.style["will-change"]="all",o=function(){yt("delayEnded",a,{evt:t}),de.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!L&&a.nativeDraggable&&(wt.draggable=!0),a._triggerDragStart(t,e),_t({sortable:a,name:"choose",originalEvent:t}),V(wt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){J(wt,t.trim(),fe)})),H(s,"dragover",ce),H(s,"mousemove",ce),H(s,"touchmove",ce),H(s,"mouseup",a._onDrop),H(s,"touchend",a._onDrop),H(s,"touchcancel",a._onDrop),L&&this.nativeDraggable&&(this.options.touchStartThreshold=4,wt.draggable=!0),yt("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(F||j))o();else{if(de.eventCanceled)return void this._onDrop();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(o,i.delay)}}},_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(){wt&&fe(wt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;W(t,"mouseup",this._disableDelayedDrag),W(t,"touchend",this._disableDelayedDrag),W(t,"touchcancel",this._disableDelayedDrag),W(t,"mousemove",this._delayedDragTouchMoveHandler),W(t,"touchmove",this._delayedDragTouchMoveHandler),W(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?H(document,"pointermove",this._onTouchMove):H(document,e?"touchmove":"mousemove",this._onTouchMove):(H(wt,"dragend",this),H(Dt,"dragstart",this._onDragStart));try{document.selection?ge((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Ut=!1,Dt&&wt){yt("dragStarted",this,{evt:e}),this.nativeDraggable&&H(document,"dragover",ue);var n=this.options;!t&&V(wt,n.dragClass,!1),V(wt,n.ghostClass,!0),de.active=this,t&&this._appendGhost(),_t({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ft){this._lastX=Ft.clientX,this._lastY=Ft.clientY,se();for(var t=document.elementFromPoint(Ft.clientX,Ft.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ft.clientX,Ft.clientY))!==e;)e=t;if(wt.parentNode[pt]._isOutsideThisEl(t),e)do{if(e[pt]){if(e[pt]._onDragOver({clientX:Ft.clientX,clientY:Ft.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);le()}},_onTouchMove:function(t){if(jt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,a=t.touches?t.touches[0]:t,r=Et&&Q(Et,!0),i=Et&&r&&r.a,s=Et&&r&&r.d,l=ee&&Gt&&it(Gt),c=(a.clientX-jt.clientX+o.x)/(i||1)+(l?l[0]-Zt[0]:0)/(i||1),u=(a.clientY-jt.clientY+o.y)/(s||1)+(l?l[1]-Zt[1]:0)/(s||1);if(!de.active&&!Ut){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,a,this)&&!h.animated){if(h===wt)return I(!1);if(h&&r===t.target&&(i=h),i&&(n=et(i)),!1!==pe(Dt,r,wt,e,i,n,t,!!i))return M(),r.appendChild(wt),Tt=r,A(),I(!0)}else if(h&&function(t,e,n){var o=et(ot(n.el,0,n.options,!0));return e?t.clientXu+c*r/2:ld-zt)return-Wt}else if(l>u+c*(1-a)/2&&ld-c*r/2))return l>u+c/2?1:-1;return 0}(t,i,n,a,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Vt,Ht===i))){var S=rt(wt);do{S-=v,y=Tt.children[S]}while(y&&("none"===Z(y,"display")||y===Et))}if(0===v||y===i)return I(!1);Ht=i,Wt=v;var x=i.nextElementSibling,C=!1,N=pe(Dt,r,wt,e,i,n,t,C=1===v);if(!1!==N)return 1!==N&&-1!==N||(C=1===N),Qt=!0,setTimeout(me,30),M(),C&&!x?r.appendChild(wt):i.parentNode.insertBefore(wt,C?x:i),E&&ut(E,0,D-E.scrollTop),Tt=wt.parentNode,void 0===b||Vt||(zt=Math.abs(b-et(i)[T])),A(),I(!0)}if(r.contains(wt))return I(!1)}return!1}function P(s,l){yt(s,f,O({evt:t,isOwner:u,axis:a?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:p,target:i,completed:I,onMove:function(n,o){return pe(Dt,r,wt,e,n,et(n),t,o)},changed:A},l))}function M(){P("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function I(e){return P("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(f),f!==p&&(V(wt,kt?kt.options.ghostClass:c.options.ghostClass,!1),V(wt,s.ghostClass,!0)),kt!==f&&f!==de.active?kt=f:f===de.active&&kt&&(kt=null),p===f&&(f._ignoreWhileAnimating=i),f.animateAll((function(){P("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===wt&&!wt.animated||i===r&&!i.animated)&&(Ht=null),s.dragoverBubble||t.rootEl||i===document||(wt.parentNode[pt]._isOutsideThisEl(t.target),!e&&ce(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function A(){Pt=rt(wt),It=rt(wt,s.draggable),_t({sortable:f,name:"change",toEl:r,newIndex:Pt,newDraggableIndex:It,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){W(document,"mousemove",this._onTouchMove),W(document,"touchmove",this._onTouchMove),W(document,"pointermove",this._onTouchMove),W(document,"dragover",ce),W(document,"mousemove",ce),W(document,"touchmove",ce)},_offUpEvents:function(){var t=this.el.ownerDocument;W(t,"mouseup",this._onDrop),W(t,"touchend",this._onDrop),W(t,"pointerup",this._onDrop),W(t,"touchcancel",this._onDrop),W(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Pt=rt(wt),It=rt(wt,n.draggable),yt("drop",this,{evt:t}),Tt=wt&&wt.parentNode,Pt=rt(wt),It=rt(wt,n.draggable),de.eventCanceled||(Ut=!1,Vt=!1,Kt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ve(this.cloneId),ve(this._dragStartId),this.nativeDraggable&&(W(document,"drop",this),W(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),R&&Z(document.body,"user-select",""),Z(wt,"transform",""),t&&(Yt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Et&&Et.parentNode&&Et.parentNode.removeChild(Et),(Dt===Tt||kt&&"clone"!==kt.lastPutMode)&&Ct&&Ct.parentNode&&Ct.parentNode.removeChild(Ct),wt&&(this.nativeDraggable&&W(wt,"dragend",this),fe(wt),wt.style["will-change"]="",Yt&&!Ut&&V(wt,kt?kt.options.ghostClass:this.options.ghostClass,!1),V(wt,this.options.chosenClass,!1),_t({sortable:this,name:"unchoose",toEl:Tt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Dt!==Tt?(Pt>=0&&(_t({rootEl:Tt,name:"add",toEl:Tt,fromEl:Dt,originalEvent:t}),_t({sortable:this,name:"remove",toEl:Tt,originalEvent:t}),_t({rootEl:Tt,name:"sort",toEl:Tt,fromEl:Dt,originalEvent:t}),_t({sortable:this,name:"sort",toEl:Tt,originalEvent:t})),kt&&kt.save()):Pt!==Ot&&Pt>=0&&(_t({sortable:this,name:"update",toEl:Tt,originalEvent:t}),_t({sortable:this,name:"sort",toEl:Tt,originalEvent:t})),de.active&&(null!=Pt&&-1!==Pt||(Pt=Ot,It=Mt),_t({sortable:this,name:"end",toEl:Tt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){yt("nulling",this),Dt=wt=Tt=Et=St=Ct=xt=Nt=jt=Ft=Yt=Pt=It=Ot=Mt=Ht=Wt=kt=At=de.dragged=de.ghost=de.clone=de.active=null,Jt.forEach((function(t){t.checked=!0})),Jt.length=Lt=Rt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":wt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,a=n.length,r=this.options;o li").map((function(){return{id:$(this).data("id"),children:$(this).find("li").map((function(){return $(this).data("id")})).get()}})).get();e.forEach((function(t,e){var n=app.store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach((function(t,e){app.store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})}))})),app.request({url:app.forum.attribute("apiUrl")+"/tags/order",method:"POST",body:{order:e}}),this.forcedRefreshKey++,m.redraw()},e}(ke.a),qe=n(21),$e=Object.assign(qe.a,{"tags/addTagsHomePageOption":E,"tags/addTagChangePermission":x,"tags/components/TagsPage":Ue,"tags/components/EditTagModal":ze,"tags/addTagPermission":_,"tags/addTagsPermissionScope":y}),Ke=n(22);app.initializers.add("flarum-tags",(function(t){t.store.models.tags=o.a,t.extensionData.for("flarum-tags").registerPage(Ue),y(),_(),E(),x()})),Object.assign(Ke.compat,$e)},,,,,,,,,,,,,,,,,function(t,e){t.exports=flarum.core.compat["components/PermissionDropdown"]},function(t,e){t.exports=flarum.core.compat["components/Dropdown"]},function(t,e){t.exports=flarum.core.compat["components/BasicsPage"]},function(t,e){t.exports=flarum.core.compat["components/SettingDropdown"]},function(t,e){t.exports=flarum.core.compat["components/ExtensionPage"]},function(t,e){t.exports=flarum.core.compat["utils/ItemList"]},function(t,e){t.exports=flarum.core.compat["utils/string"]},,,function(t,e,n){"use strict";n.r(e);var o=n(17);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n(30)}]); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/tags/js/dist/admin.js.map b/extensions/tags/js/dist/admin.js.map index 41f33adc4..7d054e306 100644 --- a/extensions/tags/js/dist/admin.js.map +++ b/extensions/tags/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['utils/classList']\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Link']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['components/LoadingIndicator']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionGrid']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/withAttr']\"","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.js","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/./node_modules/sortablejs/modular/sortable.esm.js","webpack://@flarum/tags/./src/admin/components/EditTagModal.js","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/./src/admin/compat.js","webpack://@flarum/tags/./src/admin/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionDropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Dropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/BasicsPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingDropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/ExtensionPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/ItemList']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/string']\"","webpack://@flarum/tags/./admin.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","classList","style","color","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","tagLabel","link","extract","tagText","app","translator","trans","title","description","href","route","slug","isChild","Link","tagsLabel","children","forEach","length","push","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","hasMany","defaultSort","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","extend","PermissionGrid","this","loading","store","find","then","redraw","override","original","vnode","permission","tagPrefix","match","substr","map","required","items","all","filter","add","id","label","onremove","save","render","item","indexOf","tagScoped","PermissionDropdown","component","allowGuest","buttonClassName","caretIcon","onclick","extensionData","registerPermission","BasicsPage","path","setting","minutes","parseInt","data","allow_tag_change","SettingDropdown","defaultLabel","count","options","ownKeys","enumerableOnly","keys","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","apply","_objectSpread2","target","arguments","source","_defineProperty","getOwnPropertyDescriptors","defineProperties","_typeof","obj","iterator","configurable","writable","_extends","assign","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","userAgent","pattern","window","navigator","IE11OrLess","Edge","FireFox","Safari","IOS","ChromeForAndroid","captureMode","capture","passive","on","el","event","fn","addEventListener","off","removeEventListener","matches","selector","substring","msMatchesSelector","webkitMatchesSelector","_","getParentOrHost","host","document","nodeType","parentNode","closest","ctx","includeCTX","_throttleTimeout","R_SPACE","toggleClass","state","replace","css","prop","val","defaultView","getComputedStyle","currentStyle","matrix","selfOnly","appliedTransforms","transform","matrixFn","DOMMatrix","WebKitCSSMatrix","CSSMatrix","MSCSSMatrix","tagName","list","getElementsByTagName","getWindowScrollingElement","scrollingElement","documentElement","getRect","relativeToContainingBlock","relativeToNonStaticParent","undoScale","container","getBoundingClientRect","elRect","top","left","bottom","right","height","width","innerHeight","innerWidth","containerRect","elMatrix","scaleX","scaleY","isScrolledPast","elSide","parentSide","getParentAutoScrollElement","elSideVal","parentSideVal","getChild","childNum","includeDragEl","currentChild","display","Sortable","ghost","dragged","draggable","lastChild","last","lastElementChild","previousElementSibling","index","nodeName","toUpperCase","clone","getRelativeScrollOffset","offsetLeft","offsetTop","winScroller","scrollLeft","scrollTop","includeSelf","elem","gotSelf","clientWidth","scrollWidth","clientHeight","scrollHeight","elemCSS","overflowX","overflowY","body","isRectEqual","rect1","rect2","Math","round","throttle","callback","ms","args","_this","setTimeout","scrollBy","x","y","Polymer","$","jQuery","Zepto","dom","cloneNode","expando","Date","getTime","AnimationStateManager","animationCallbackId","animationStates","captureAnimationState","animation","child","rect","fromRect","thisAnimationDuration","childMatrix","f","e","addAnimationState","removeAnimationState","splice","arr","Number","indexOfObject","animateAll","clearTimeout","animating","animationTime","time","toRect","prevFromRect","prevToRect","animatingRect","targetMatrix","sqrt","pow","calculateRealTime","animate","max","animationResetTimer","currentRect","duration","translateX","translateY","animatingX","animatingY","forRepaintDummy","offsetWidth","repaint","easing","animated","plugins","defaults","initializeByDefault","PluginManager","mount","plugin","option","pluginName","concat","pluginEvent","eventName","sortable","evt","eventCanceled","cancel","eventNameGlobal","initializePlugins","initialized","modified","modifyOption","getEventProperties","eventProperties","modifiedValue","optionListeners","dispatchEvent","_ref","rootEl","targetEl","cloneEl","toEl","fromEl","oldIndex","newIndex","oldDraggableIndex","newDraggableIndex","originalEvent","putSortable","extraEventProperties","onName","charAt","CustomEvent","createEvent","initEvent","bubbles","cancelable","to","from","pullMode","lastPutMode","undefined","allEventProperties","_excluded","dragEl","parentEl","ghostEl","nextEl","lastDownEl","cloneHidden","dragStarted","moved","activeSortable","active","hideGhostForTarget","_hideGhostForTarget","unhideGhostForTarget","_unhideGhostForTarget","cloneNowHidden","cloneNowShown","dispatchSortableEvent","_dispatchEvent","info","activeGroup","tapEvt","touchEvt","lastDx","lastDy","tapDistanceLeft","tapDistanceTop","lastTarget","lastDirection","targetMoveDistance","ghostRelativeParent","awaitingDragStarted","ignoreNextClick","sortables","pastFirstInvertThresh","isCircumstantialInvert","ghostRelativeParentInitialScroll","_silent","savedInputChecked","documentExists","PositionGhostAbsolutely","CSSFloatProperty","supportDraggable","createElement","supportCssPointerEvents","cssText","pointerEvents","_detectDirection","elCSS","elWidth","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","child1","child2","firstChildCSS","secondChildCSS","firstChildWidth","marginLeft","marginRight","secondChildWidth","flexDirection","gridTemplateColumns","split","touchingSideChild2","clear","_prepareGroup","toFn","pull","sameGroup","group","otherGroup","join","originalGroup","checkPull","checkPut","put","revertClone","preventDefault","stopPropagation","stopImmediatePropagation","nearestEmptyInsertDetectEvent","touches","nearest","clientX","clientY","some","threshold","emptyInsertThreshold","insideHorizontally","insideVertically","ret","_onDragOver","_checkOutsideTargetEl","_isOutsideThisEl","toString","disabled","handle","test","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","ghostClass","chosenClass","dragClass","ignore","preventOnFilter","setData","dataTransfer","textContent","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","devicePixelRatio","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","nativeDraggable","_onTapStart","_onMove","dragRect","targetRect","willInsertAfter","retVal","onMoveFn","onMove","draggedRect","related","relatedRect","_disableDraggable","_unsilent","_generateId","str","src","sum","charCodeAt","_nextTick","_cancelNextTick","contains","_getDirection","type","touch","pointerType","originalTarget","shadowRoot","composedPath","root","inputs","idx","checked","_saveInputCheckedState","button","isContentEditable","criteria","trim","_prepareDragStart","dragStartFn","ownerDocument","nextSibling","_lastX","_lastY","_onDrop","_disableDelayedDragEvents","_triggerDragStart","_disableDelayedDrag","_delayedDragTouchMoveHandler","_dragStartTimer","abs","floor","_onTouchMove","_onDragStart","selection","empty","getSelection","removeAllRanges","err","_dragStarted","fallback","_appendGhost","_nulling","_emulateDragOver","elementFromPoint","ghostMatrix","relativeScrollOffset","dx","dy","cssMatrix","appendChild","_hideClone","cloneId","insertBefore","_loopId","setInterval","effectAllowed","_dragStartId","revert","vertical","isOwner","canSort","fromSortable","completedFired","dragOverEvent","_ignoreWhileAnimating","completed","elLastChild","_ghostIsLast","changed","_ghostIsFirst","firstChild","targetBeforeFirstSwap","sibling","differentLevel","differentRowCol","dragElS1Opp","dragElS2Opp","dragElOppLength","targetS1Opp","targetS2Opp","targetOppLength","_dragElInRowColumn","side1","scrolledPastTop","scrollBefore","isLastTarget","mouseOnAxis","targetLength","targetS1","targetS2","invert","_getInsertDirection","_getSwapDirection","dragIndex","nextElementSibling","after","moveVector","extra","axis","insertion","_showClone","_offMoveEvents","_offUpEvents","clearInterval","removeChild","handleEvent","dropEffect","_globalDragOver","toArray","order","getAttribute","useAnimation","set","destroy","Array","querySelectorAll","removeAttribute","utils","is","dst","nextTick","cancelNextTick","detectDirection","element","_len","_key","version","scrollEl","scrollRootEl","lastAutoScrollX","lastAutoScrollY","touchEvt$1","pointerElemChangedInterval","autoScrolls","scrolling","clearAutoScrolls","autoScroll","pid","clearPointerElemChangedInterval","isFallback","scroll","scrollCustomFn","sens","scrollSensitivity","speed","scrollSpeed","scrollThisInstance","scrollFn","layersOut","currentParent","canScrollX","canScrollY","scrollPosX","scrollPosY","vx","vy","layer","scrollOffsetY","scrollOffsetX","bubbleScroll","drop","toSortable","changedTouches","onSpill","Revert","Remove","startIndex","dragStart","_ref2","_ref3","_ref4","parentSortable","AutoScroll","forceAutoScrollFallback","_handleAutoScroll","_handleFallbackAutoScroll","dragOverCompleted","dragOverBubble","nulling","ogElemScroller","newElem","EditTagModal","oninit","model","createRecord","Stream","primary","attributes","submitData","content","fields","ItemList","placeholder","oninput","bidi","tabindex","Button","exists","onsubmit","hide","confirm","pushData","relationships","Modal","tagItem","data-id","modal","show","TagsPage","forcedRefreshKey","include","minPrimaryTags","maxPrimaryTags","minSecondaryTags","maxSecondaryTags","oncreate","onListOnCreate","localeCompare","min","withAttr","setMinTags","submitButton","onSort","onSortUpdate","minTags","maxTags","HTMLOListElement","HTMLUListElement","getById","j","request","url","forum","method","ExtensionPage","addTagsHomePageOption","addTagChangePermission","addTagPermission","addTagsPermissionScope","initializers","models","registerPage","tagsCompat"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OA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grB,cAAe,CAAEhtB,OAAQ,QAG3BG,EAAIgC,SAASC,SAAQ,SAACoP,EAAOmd,GAC3BntB,IAAIqC,MAAM6qB,QAAQ,OAAQld,GAAOub,SAAS,CACxCd,WAAY,CACVrsB,SAAU+uB,EACV3sB,SAAS,GAEXgrB,cAAe,CAAEhtB,kBAKvBwB,IAAIotB,QAAQ,CACVC,IAAKrtB,IAAIstB,MAAMpsB,UAAU,UAAY,cACrCqsB,OAAQ,OACRpf,KAAM,CAAEwX,WAGVxjB,KAAK4pB,mBACLjwB,EAAE0G,U,GAjMgCgrB,M,SCzBvBpxB,UAAOkK,OAAO1I,KAAQ,CACnC,6BAA8B6vB,EAC9B,8BAA+BC,EAC/B,2BAA4B5B,GAC5B,+BAAgC3B,GAChC,wBAAyBwD,EACzB,8BAA+BC,I,SCRjC5tB,IAAI6tB,aAAaxqB,IAAI,eAAe,SAAArD,GAClCA,EAAIqC,MAAMyrB,OAAOhwB,KAAOiD,IAExBf,EAAIoE,cAAJ,IAAsB,eAAe2pB,aAAajC,IAElD8B,IACAD,IACAF,IACAC,OAQFtxB,OAAOkK,OAAO1I,UAAQowB,K,2BCvBtBvyB,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,kC,cCApCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,wB,cCApCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,0B,cCApCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,+B,cCApCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,6B,cCApCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,mB,cCApCnC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,iB,+BCApC","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 53);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position() - bParent.position();\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position() - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position();\n\n return 0;\n });\n}\n","import classList from 'flarum/utils/classList';\n\nexport default function tagIcon(tag, attrs = {}, settings = {}) {\n const hasIcon = tag && tag.icon();\n const { useColor = true } = settings;\n\n attrs.className = classList([\n attrs.className,\n 'icon',\n hasIcon ? tag.icon() : 'TagIcon'\n ]);\n\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n\n if (hasIcon) {\n attrs.style.color = tag.color();\n }\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n\n return hasIcon ? : ;\n}\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import extract from 'flarum/utils/extract';\nimport Link from 'flarum/components/Link';\nimport tagIcon from './tagIcon';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n }\n\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? Link : 'span'), attrs,\n \n {tag && tag.icon() && tagIcon(tag, {}, {useColor: false})} {tagText}\n \n )\n );\n}\n","module.exports = flarum.core.compat['utils/classList'];","import extract from 'flarum/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children};\n}\n","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/Link'];","module.exports = flarum.core.compat['utils/Stream'];","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n icon: Model.attribute('icon'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n children: Model.hasMany('children'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/PermissionGrid'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Modal'];","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","module.exports = flarum.core;","module.exports = flarum.core.compat['utils/withAttr'];","import { extend, override } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/components/PermissionDropdown';\nimport Dropdown from 'flarum/components/Dropdown';\nimport Button from 'flarum/components/Button';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\n\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'oninit', function () {\n this.loading = true;\n })\n\n extend(PermissionGrid.prototype, 'oncreate', function () {\n app.store.find('tags').then(() => {\n this.loading = false;\n\n m.redraw();\n });\n });\n\n override(PermissionGrid.prototype, 'view', function (original, vnode) {\n if (this.loading) {\n return ;\n }\n\n return original(vnode);\n })\n\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n\n const required = original(globalPermission);\n\n return required.map(required => tagPrefix[0] + required);\n }\n\n return original(permission);\n });\n\n extend(PermissionGrid.prototype, 'scopeItems', items => {\n sortTags(app.store.all('tags'))\n .filter(tag => tag.isRestricted())\n .forEach(tag => items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({isRestricted: false}),\n render: item => {\n if (item.permission === 'viewForum'\n || item.permission === 'startDiscussion'\n || (item.permission && item.permission.indexOf('discussion.') === 0 && item.tagScoped !== false)\n || item.tagScoped) {\n return PermissionDropdown.component({\n permission: 'tag' + tag.id() + '.' + item.permission,\n allowGuest: item.allowGuest\n });\n }\n\n return '';\n }\n }));\n });\n\n extend(PermissionGrid.prototype, 'scopeControlItems', items => {\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.isRestricted()));\n\n if (tags.length) {\n items.add('tag', \n {tags.map(tag => )}\n );\n }\n });\n}\n","export default function () {\n app.extensionData\n .for('flarum-tags')\n .registerPermission({\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag',\n }, 'moderate', 95)\n .registerPermission({\n icon: 'fas fa-tags',\n label: app.translator.trans('flarum-tags.admin.permissions.bypass_tag_counts_label'),\n permission: 'bypassTagCounts',\n }, 'start', 89);\n}\n","import { extend } from 'flarum/extend';\nimport BasicsPage from 'flarum/components/BasicsPage';\n\nexport default function() {\n extend(BasicsPage.prototype, 'homePageItems', items => {\n items.add('tags', {\n path: '/tags',\n label: app.translator.trans('flarum-tags.admin.basics.tags_label')\n });\n });\n}\n","import { extend } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport SettingDropdown from 'flarum/components/SettingDropdown';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'startItems', items => {\n items.add('allowTagChange', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.allow_edit_tags_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_tag_change, 10);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.trans('core.admin.permissions_controls.allow_some_minutes_button', {count: minutes})\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'allow_tag_change',\n options: [\n {value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')},\n {value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')},\n {value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')}\n ]\n });\n }\n }, 90);\n });\n}\n","/**!\n * Sortable 1.14.0\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.14.0\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\n\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n\n return false;\n}\n\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n\n return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\n\nfunction css(el, prop, val) {\n var style = el && el.style;\n\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\n\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n\n } while (!selfOnly && (el = el.parentNode));\n }\n\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n\n return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n\n return list;\n }\n\n return [];\n}\n\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\n * @param {[HTMLElement]} container The parent the element will be placed in\n * @return {Object} The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n\n } while (container = container.parentNode);\n }\n }\n\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n /* jshint boss:true */\n\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n\n return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param {HTMLElement} el The parent element\n * @param {Number} childNum The index of the child\n * @param {Object} options Parent Sortable's options\n * @return {HTMLElement} The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n\n currentChild++;\n }\n\n i++;\n }\n\n return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param {HTMLElement} el Parent element\n * @param {selector} selector Any other elements that should be ignored\n * @return {HTMLElement} The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n\n return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param {HTMLElement} el\n * @param {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n var index = 0;\n\n if (!el || !el.parentNode) {\n return -1;\n }\n /* jshint boss:true */\n\n\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n\n return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param {HTMLElement} el\n * @return {Array} Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n\n return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param {Array} arr Array that may or may not hold the object\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number} The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n\n return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n\n } while (elem = elem.parentNode);\n\n return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\n\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\n\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\n\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n\n target.toRect = toRect;\n\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n } // if fromRect != toRect: animate\n\n\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n\n if (!time) {\n time = _this.options.animation;\n }\n\n _this.animate(target, animatingRect, toRect, time);\n }\n\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\n\nfunction repaint(target) {\n return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n\n this.eventCanceled = false;\n\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n } // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n\n\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized; // Add default options from plugin\n\n _extends(defaults, initialized.defaults);\n });\n\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\n\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\n\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\nghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n_silent = false,\n savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return; // false when <= IE11\n\n if (IE11OrLess) {\n return false;\n }\n\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n}(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\n * @param {Number} x X position\n * @param {Number} y Y position\n * @return {HTMLElement} Element of the first found nearest Sortable\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n},\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n\n var group = {};\n var originalGroup = options.group;\n\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n},\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n},\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n if (nearest) {\n // Create imitation event\n var event = {};\n\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n\n nearest[expando]._onDragOver(event);\n }\n }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n/**\n * @class Sortable\n * @param {HTMLElement} el\n * @param {Object} [options]\n */\n\n\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n\n this.el = el; // root element\n\n this.options = options = _extends({}, options); // Export instance\n\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n\n _prepareGroup(options); // Bind all private methods\n\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n } // Setup drag mode\n\n\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n } // Bind events\n\n\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n\n sortables.push(this.el); // Restore sorting\n\n options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart(\n /** Event|TouchEvent */\n evt) {\n if (!evt.cancelable) return;\n\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n\n _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n if (dragEl) {\n return;\n }\n\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n } // cancel dnd if original target is content editable\n\n\n if (originalTarget.isContentEditable) {\n return;\n } // Safari ignores further event handling after mousedown\n\n\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n\n target = closest(target, options.draggable, el, false);\n\n if (target && target.animated) {\n return;\n }\n\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n } // Get the index of the dragged element within its parent\n\n\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable); // Check filter\n\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n\n if (filter) {\n preventOnFilter && evt.cancelable && evt.preventDefault();\n return; // cancel dnd\n }\n }\n\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n } // Prepare `dragstart`\n\n\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart(\n /** Event */\n evt,\n /** Touch */\n touch,\n /** HTMLElement */\n target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n _this._onDrop();\n\n return;\n } // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n\n\n _this._disableDelayedDragEvents();\n\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n } // Bind the events: dragstart/dragend\n\n\n _this._triggerDragStart(evt, touch); // Drag start event\n\n\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n }); // Chosen item\n\n\n toggleClass(dragEl, options.chosenClass, true);\n }; // Disable \"draggable\"\n\n\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n\n pluginEvent('delayStart', this, {\n evt: evt\n }); // Delay is impossible for native DnD in Edge or IE\n\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n } // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n\n\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n /** TouchEvent|PointerEvent **/\n e) {\n var touch = e.touches ? e.touches[0] : e;\n\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart(\n /** Event */\n evt,\n /** Touch */\n touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n\n try {\n if (document.selection) {\n // Timeout neccessary for IE9\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n\n awaitingDragStarted = false;\n\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n\n var options = this.options; // Apply effect\n\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost(); // Drag start event\n\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n\n _hideGhostForTarget();\n\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n\n target = parent; // store last element\n }\n /* jshint boss:true */\n while (parent = parent.parentNode);\n }\n\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove(\n /**TouchEvent*/\n evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n\n this._onDragStart(evt, true);\n }\n\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options; // Position absolutely\n\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl); // Set transform-origin\n\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart(\n /**Event*/\n evt,\n /**boolean*/\n fallback) {\n var _this = this;\n\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n\n if (Sortable.eventCanceled) {\n this._onDrop();\n\n return;\n }\n\n pluginEvent('setupClone', this);\n\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n\n this._hideClone();\n\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n } // #1143: IFrame support workaround\n\n\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n\n _this._hideClone();\n\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n\n on(document, 'drop', _this); // #1276 fix:\n\n css(dragEl, 'transform', 'translateZ(0)');\n }\n\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver(\n /**Event*/\n evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n\n if (_silent) return;\n\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n } // Capture animation state\n\n\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n\n _this.captureAnimationState();\n\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n } // Return invocation when dragEl is inserted (or completed)\n\n\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n } // Animation\n\n\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n } // Null lastTarget if it is not inside a previously swapped element\n\n\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n } // no bubbling and not fallback\n\n\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n } // Call when dragEl has been inserted\n\n\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n\n ignoreNextClick = false;\n\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n\n if (revert) {\n parentEl = rootEl; // actualization\n\n capture();\n\n this._hideClone();\n\n dragOverEvent('revert');\n\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n\n return completed(true);\n }\n\n var elLastChild = lastChild(el, options.draggable);\n\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n } // if there is a last element, it is the target\n\n\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n\n if (target) {\n targetRect = getRect(target);\n }\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n el.appendChild(dragEl);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n\n if (firstChild === dragEl) {\n return completed(false);\n }\n\n target = firstChild;\n targetRect = getRect(target);\n\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n } // If dragEl is already beside target: Do not insert\n\n\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n\n parentEl = dragEl.parentNode; // actualization\n // must be done before animation\n\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n\n changed();\n return completed(true);\n }\n }\n\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop(\n /**Event*/\n evt) {\n var el = this.el,\n options = this.options; // Get the index of the dragged element within its parent\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n\n if (Sortable.eventCanceled) {\n this._nulling();\n\n return;\n }\n\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n\n _cancelNextTick(this.cloneId);\n\n _cancelNextTick(this._dragStartId); // Unbind events\n\n\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n\n this._offMoveEvents();\n\n this._offUpEvents();\n\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n\n css(dragEl, 'transform', '');\n\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n\n _disableDraggable(dragEl);\n\n dragEl.style['will-change'] = ''; // Remove classes\n // ghostClass is added in dragStarted\n\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n\n toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n }); // Remove event\n\n\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n }); // drag from one list and drop into another\n\n\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n }); // Save sorting\n\n\n this.save();\n }\n }\n }\n\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent(\n /**Event*/\n evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n\n break;\n\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n\n _globalDragOver(evt);\n }\n\n break;\n\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n\n /**\n * Serializes the item into an array of string.\n * @returns {String[]}\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n\n for (; i < n; i++) {\n el = children[i];\n\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n\n return order;\n },\n\n /**\n * Sorts the elements according to the array.\n * @param {String[]} order order of the items\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n\n /**\n * Save the current sorting\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n\n /**\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n * @param {HTMLElement} el\n * @param {String} [selector] default: `options.draggable`\n * @returns {HTMLElement|null}\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n\n /**\n * Set/get option\n * @param {string} name\n * @param {*} [value]\n * @returns {*}\n */\n option: function option(name, value) {\n var options = this.options;\n\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n\n /**\n * Destroy\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n } // Remove draggable attributes\n\n\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n\n this._onDrop();\n\n this._disableDelayedDragEvents();\n\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n\n return;\n }\n\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n\n evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal; // Support for new CustomEvent feature\n\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n\n return retVal;\n}\n\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\n\nfunction _unsilent() {\n _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var spacer = 10;\n return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var spacer = 10;\n return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n\n invert = invert || invertSwap;\n\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n\n return 0;\n}\n/**\n * Gets the direction dragEl must be swapped relative to target in order to make it\n * seem that dragEl has been \"inserted\" into that element's position\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\n * @return {Number} Direction dragEl must be swapped\n */\n\n\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n/**\n * Generate id\n * @param {HTMLElement} el\n * @returns {String}\n * @private\n */\n\n\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n\n while (i--) {\n sum += str.charCodeAt(i);\n }\n\n return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\n\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n} // Export utils\n\n\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild\n};\n/**\n * Get the Sortable instance of an element\n * @param {HTMLElement} element The element\n * @return {Sortable|undefined} The instance of Sortable\n */\n\nSortable.get = function (element) {\n return element[expando];\n};\n/**\n * Mount a plugin to Sortable\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\n */\n\n\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n/**\n * Create sortable instance\n * @param {HTMLElement} el\n * @param {Object} [options]\n */\n\n\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n }; // Bind all private methods\n\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\n\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn; // New scroll root, set scrollEl\n\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n\n var layersOut = 0;\n var currentParent = scrollEl;\n\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n }\n\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n\n this.sortable.animateAll();\n\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\n\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\nfolding = false,\n // Folding any other time\ndragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\n\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n\n dataTransfer.setData('Text', data);\n }\n };\n }\n\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n\n sortable._hideClone();\n\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n }); // Sort multi-drag elements\n\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n sortable.captureAnimationState();\n\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n\n initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n\n activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children; // Multi-drag selection\n\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvt: evt\n }); // Modifier activated, select from last to dragEl\n\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvt: evt\n });\n }\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvt: evt\n });\n }\n } // Multi-drag drop\n\n\n if (dragStarted && this.isMultiDrag) {\n folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect; // Prepare unfold animation\n\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n\n\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n\n multiDragIndex++;\n }); // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n\n if (update) {\n dispatchSortableEvent('update');\n }\n }\n } // Must be done after capturing individual rects (scroll bar)\n\n\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n\n multiDragSortable = toSortable;\n } // Remove clones if necessary\n\n\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n if (evt && evt.button !== 0) return;\n\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvt: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\n * Selects the provided multi-drag item\n * @param {HTMLElement} el The element to be selected\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n\n multiDragSortable = sortable;\n }\n\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n\n /**\n * Deselects the provided multi-drag item\n * @param {HTMLElement} el The element to be deselected\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n }); // multiDragElements will already be sorted if folding\n\n var newIndex;\n\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n\n return key;\n }\n }\n });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n/**\n * Insert multi-drag clones\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\n * @param {HTMLElement} rootEl\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\n\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport ItemList from 'flarum/utils/ItemList';\nimport { slug } from 'flarum/utils/string';\nimport Stream from 'flarum/utils/Stream';\n\nimport tagLabel from '../../common/helpers/tagLabel';\n\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.tag = this.attrs.model || app.store.createRecord('tags');\n\n this.name = Stream(this.tag.name() || '');\n this.slug = Stream(this.tag.slug() || '');\n this.description = Stream(this.tag.description() || '');\n this.color = Stream(this.tag.color() || '');\n this.icon = Stream(this.tag.icon() || '');\n this.isHidden = Stream(this.tag.isHidden() || false);\n this.primary = Stream(this.attrs.primary || false);\n }\n\n className() {\n return 'EditTagModal Modal--small';\n }\n\n title() {\n return this.name()\n ? tagLabel(app.store.createRecord('tags', { attributes: this.submitData() }))\n : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n\n content() {\n return (\n
\n
\n {this.fields().toArray()}\n
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add('name',
\n \n {\n this.name(e.target.value);\n this.slug(slug(e.target.value));\n }} />\n
, 50);\n\n items.add('slug',
\n \n \n
, 40);\n\n items.add('description',
\n \n