zhouwx
2025-06-16 7c8c06b5397d22151b02407b1f4f19d771bb15dd
1
2
3
4
5
6
var zn=Object.defineProperty;var hn=Object.getOwnPropertySymbols;var qn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var mn=(e,t,n)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))qn.call(t,n)&&mn(e,n,t[n]);if(hn)for(var n of hn(t))Xn.call(t,n)&&mn(e,n,t[n]);return e};import{J as ae,ay as Q,l as oe,o as y,a as I,b as x,X as H,a5 as T,a8 as Qe,F as me,Q as Y,R as O,Y as D,W as Te,aE as ut,aH as Rt,a1 as Ce,k as ze,aJ as Ft,a4 as Se,at as Yn,V as ee,a0 as Be,f as He,n as nt,L as ot,M as Dt,j as ct,aC as En,aD as Tn,I as Dn,a9 as Wn,G as on,g as Lt,S as an,T as sn,Z as jn,aj as Gn}from"./vue.1704421723665.js";import{u as Ie,_ as ie,p as Mt,C as It,L as Ee,b as $t,c as Ln,d as Un,E as Zt,k as Qn,g as Kn,S as ve,j as Zn,B as Jn,D as zt,N as eo}from"./index.1704421723665.js";import{s as gt}from"./index.17044217236657.js";import{_ as to}from"./index.170442172366528.js";import{l as no}from"./logo-mini.1704421723665.js";import oo from"./parent.1704421723665.js";const ao=ae({name:"layoutLogo",setup(){const e=Ie(),{themeConfig:t}=Q(e),n=oe(()=>{let{isCollapse:a,layout:s}=t.value;return!a||s==="classic"||document.body.clientWidth<1e3});return{logoMini:no,setShowLogo:n,themeConfig:t,onThemeConfigChange:()=>{if(t.value.layout==="transverse")return!1;t.value.isCollapse=!t.value.isCollapse}}}}),io=["src"],so=["src"];function ro(e,t,n,o,a,s){return e.setShowLogo?(y(),I("div",{key:0,class:"layout-logo",onClick:t[0]||(t[0]=(...i)=>e.onThemeConfigChange&&e.onThemeConfigChange(...i))},[x("img",{src:e.logoMini,class:"layout-logo-medium-img"},null,8,io),x("span",null,H(e.themeConfig.globalTitle),1)])):(y(),I("div",{key:1,class:"layout-logo-size",onClick:t[1]||(t[1]=(...i)=>e.onThemeConfigChange&&e.onThemeConfigChange(...i))},[x("img",{src:e.logoMini,class:"layout-logo-size-img"},null,8,so)]))}var lo=ie(ao,[["render",ro],["__scopeId","data-v-3d08a39b"]]);const uo=ae({name:"navMenuSubItem",props:{chil:{type:Array,default:()=>[]}},setup(e){return{chils:oe(()=>e.chil)}}}),co=["href"];function fo(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("sub-item",!0),c=T("el-sub-menu"),l=T("el-menu-item");return y(!0),I(me,null,Qe(e.chils,h=>(y(),I(me,null,[h.children&&h.children.length>0?(y(),Y(c,{index:h.path,key:h.path},{title:O(()=>[D(i,{name:h.meta.icon},null,8,["name"]),x("span",null,H(e.$t(h.meta.title)),1)]),default:O(()=>[D(r,{chil:h.children},null,8,["chil"])]),_:2},1032,["index"])):(y(),Y(l,{index:h.path,key:h.path},{default:O(()=>[!h.meta.isLink||h.meta.isLink&&h.meta.isIframe?(y(),I(me,{key:0},[D(i,{name:h.meta.icon},null,8,["name"]),x("span",null,H(e.$t(h.meta.title)),1)],64)):(y(),I("a",{key:1,href:h.meta.isLink,target:"_blank",rel:"opener",class:"w100"},[D(i,{name:h.meta.icon},null,8,["name"]),Te(" "+H(e.$t(h.meta.title)),1)],8,co))]),_:2},1032,["index"]))],64))),256)}var ho=ie(uo,[["render",fo]]);const mo=ae({name:"layoutBreadcrumb",setup(){const e=Mt(),t=Ie(),{themeConfig:n}=Q(t),{routesList:o}=Q(e),a=ut(),s=Rt(),i=Ce({breadcrumbList:[],routeSplit:[],routeSplitFirst:"",routeSplitIndex:1}),r=oe(()=>{v(a.path);const{layout:u,isBreadcrumb:p}=n.value;return u==="classic"||u==="transverse"?!1:!!p}),c=u=>{const{redirect:p,path:g}=u;p?s.push(p):s.push(g)},l=()=>{n.value.isCollapse=!n.value.isCollapse,h()},h=()=>{Ee.remove("themeConfig"),Ee.set("themeConfig",n.value)},d=u=>{u.forEach(p=>{i.routeSplit.forEach((g,L,k)=>{i.routeSplitFirst===p.path&&(i.routeSplitFirst+=`/${k[i.routeSplitIndex]}`,i.breadcrumbList.push(p),i.routeSplitIndex++,p.children&&d(p.children))})})},v=u=>{if(!n.value.isBreadcrumb)return!1;i.breadcrumbList=[o.value[0]],i.routeSplit=u.split("/"),i.routeSplit.shift(),i.routeSplitFirst=`/${i.routeSplit[0]}`,i.routeSplitIndex=1,d(o.value),(a.name==="home"||a.name==="notFound"&&i.breadcrumbList.length>1)&&i.breadcrumbList.shift(),i.breadcrumbList.length>0&&(i.breadcrumbList[i.breadcrumbList.length-1].meta.tagsViewName=It.setTagsViewNameI18n(a))};return ze(()=>{v(a.path)}),Ft(u=>{v(u.path)}),P({onThemeConfigChange:l,isShowBreadcrumb:r,themeConfig:n,onBreadcrumbClick:c},Se(i))}}),po={key:0,class:"layout-navbars-breadcrumb"},go={key:0,class:"layout-navbars-breadcrumb-span"},wo={key:1},vo={key:2},bo=["onClick"];function _o(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("el-breadcrumb-item"),c=T("el-breadcrumb");return e.isShowBreadcrumb?(y(),I("div",po,[D(i,{class:"layout-navbars-breadcrumb-icon",name:e.themeConfig.isCollapse?"ele-Expand":"ele-Fold",size:16,onClick:e.onThemeConfigChange},null,8,["name","onClick"]),D(c,{class:"layout-navbars-breadcrumb-hide"},{default:O(()=>[D(Yn,{name:"breadcrumb"},{default:O(()=>[(y(!0),I(me,null,Qe(e.breadcrumbList,(l,h)=>(y(),Y(r,{key:l.meta.tagsViewName?l.meta.tagsViewName:l.meta.title},{default:O(()=>[h===e.breadcrumbList.length-1?(y(),I("span",go,[e.themeConfig.isBreadcrumbIcon?(y(),Y(i,{key:0,name:l.meta.icon,class:"layout-navbars-breadcrumb-iconfont"},null,8,["name"])):ee("",!0),l.meta.tagsViewName?(y(),I("div",vo,H(l.meta.tagsViewName),1)):(y(),I("div",wo,H(e.$t(l.meta.title)),1))])):(y(),I("a",{key:1,onClick:Be(d=>e.onBreadcrumbClick(l),["prevent"])},[e.themeConfig.isBreadcrumbIcon?(y(),Y(i,{key:0,name:l.meta.icon,class:"layout-navbars-breadcrumb-iconfont"},null,8,["name"])):ee("",!0),Te(H(e.$t(l.meta.title)),1)],8,bo))]),_:2},1024))),128))]),_:1})]),_:1})])):ee("",!0)}var yo=ie(mo,[["render",_o],["__scopeId","data-v-7915d3e2"]]);const Co=ae({name:"layoutBreadcrumbUserNews",setup(){const e=Ce({newsList:[{label:"\u5173\u4E8E\u7248\u672C\u53D1\u5E03\u7684\u901A\u77E5",value:"vue-next-admin\uFF0C\u57FA\u4E8E vue3 + CompositionAPI + typescript + vite + element plus\uFF0C\u6B63\u5F0F\u53D1\u5E03\u65F6\u95F4\uFF1A2021\u5E7402\u670828\u65E5\uFF01",time:"2020-12-08"},{label:"\u5173\u4E8E\u5B66\u4E60\u4EA4\u6D41\u7684\u901A\u77E5",value:"QQ\u7FA4\u53F7\u7801 665452019\uFF0C\u6B22\u8FCE\u5C0F\u4F19\u4F34\u5165\u7FA4\u5B66\u4E60\u4EA4\u6D41\u63A2\u8BA8\uFF01",time:"2020-12-08"}]});return P({onAllReadClick:()=>{e.newsList=[]},onGoToGiteeClick:()=>{window.open("https://gitee.com/lyt-top/vue-next-admin")}},Se(e))}}),So={class:"layout-navbars-breadcrumb-user-news"},Eo={class:"head-box"},To={class:"head-box-title"},Do={class:"content-box"},Lo={class:"content-box-msg"},Io={class:"content-box-time"};function $o(e,t,n,o,a,s){const i=T("el-empty");return y(),I("div",So,[x("div",Eo,[x("div",To,H(e.$t("message.user.newTitle")),1),e.newsList.length>0?(y(),I("div",{key:0,class:"head-box-btn",onClick:t[0]||(t[0]=(...r)=>e.onAllReadClick&&e.onAllReadClick(...r))},H(e.$t("message.user.newBtn")),1)):ee("",!0)]),x("div",Do,[e.newsList.length>0?(y(!0),I(me,{key:0},Qe(e.newsList,(r,c)=>(y(),I("div",{class:"content-box-item",key:c},[x("div",null,H(r.label),1),x("div",Lo,H(r.value),1),x("div",Io,H(r.time),1)]))),128)):(y(),Y(i,{key:1,description:e.$t("message.user.newDesc")},null,8,["description"]))]),e.newsList.length>0?(y(),I("div",{key:0,class:"foot-box",onClick:t[1]||(t[1]=(...r)=>e.onGoToGiteeClick&&e.onGoToGiteeClick(...r))},H(e.$t("message.user.newGo")),1)):ee("",!0)])}var Vo=ie(Co,[["render",$o],["__scopeId","data-v-31e50f96"]]);const ko=ae({name:"layoutBreadcrumbSearch",setup(){const e=$t(),{tagsViewRoutes:t}=Q(e),n=He(),{t:o}=Ln(),a=Rt(),s=Ce({isShowSearch:!1,menuQuery:"",tagsViewList:[]}),i=()=>{s.menuQuery="",s.isShowSearch=!0,h(),nt(()=>{setTimeout(()=>{n.value.focus()})})},r=()=>{s.isShowSearch=!1},c=(u,p)=>{let g=u?s.tagsViewList.filter(l(u)):s.tagsViewList;p(g)},l=u=>p=>p.path.toLowerCase().indexOf(u.toLowerCase())>-1||p.meta.title.toLowerCase().indexOf(u.toLowerCase())>-1||o(p.meta.title).indexOf(u.toLowerCase())>-1,h=()=>{if(s.tagsViewList.length>0)return!1;t.value.map(u=>{u.meta.isHide||s.tagsViewList.push(P({},u))})};return P({layoutMenuAutocompleteRef:n,openSearch:i,closeSearch:r,menuSearch:c,onHandleSelect:u=>{let{path:p,redirect:g}=u;u.meta.isLink&&!u.meta.isIframe?window.open(u.meta.isLink):g?a.push(g):a.push(p),r()},onSearchBlur:()=>{r()}},Se(s))}}),xo={class:"layout-search-dialog"};function Ao(e,t,n,o,a,s){const i=T("ele-Search"),r=T("el-icon"),c=T("SvgIcon"),l=T("el-autocomplete"),h=T("el-dialog");return y(),I("div",xo,[D(h,{modelValue:e.isShowSearch,"onUpdate:modelValue":t[1]||(t[1]=d=>e.isShowSearch=d),width:"300px","destroy-on-close":"",modal:!1,fullscreen:"","show-close":!1},{default:O(()=>[D(l,{modelValue:e.menuQuery,"onUpdate:modelValue":t[0]||(t[0]=d=>e.menuQuery=d),"fetch-suggestions":e.menuSearch,placeholder:e.$t("message.user.searchPlaceholder"),ref:"layoutMenuAutocompleteRef",onSelect:e.onHandleSelect,onBlur:e.onSearchBlur},{prefix:O(()=>[D(r,{class:"el-input__icon"},{default:O(()=>[D(i)]),_:1})]),default:O(({item:d})=>[x("div",null,[D(c,{name:d.meta.icon,class:"mr5"},null,8,["name"]),Te(" "+H(e.$t(d.meta.title)),1)])]),_:1},8,["modelValue","fetch-suggestions","placeholder","onSelect","onBlur"])]),_:1},8,["modelValue"])])}var Oo=ie(ko,[["render",Ao],["__scopeId","data-v-6caca869"]]),Ro="/assets/company.1704421723665.png",Fo="/assets/icon.1704421723665.jpg";const Mo=ae({name:"layoutBreadcrumbUser",components:{UserNews:Vo,Search:Oo,updatePwd:to},setup(){const{t:e}=Ln(),{proxy:t}=ct(),n=Rt(),o=Un();Q(Mt());const a=Ie(),{userInfos:s}=Q(o),{themeConfig:i}=Q(a),r=He(),c=He(),l=Ce({isScreenfull:!1,disabledI18n:"zh-cn",disabledSize:"large"}),h=oe(()=>{let R="";const{layout:z,isClassicSplitMenu:G}=i.value;return["defaults","columns"].includes(z)||z==="classic"&&!G?R="1":R="",R}),d=()=>{if(!gt.isEnabled)return Zt.warning("\u6682\u4E0D\u4E0D\u652F\u6301\u5168\u5C4F"),!1;gt.toggle(),gt.on("change",()=>{gt.isFullscreen?l.isScreenfull=!0:l.isScreenfull=!1})},v=()=>{t.mittBus.emit("openSetingsDrawer")},u=R=>{R==="logOut"?Qn({closeOnClickModal:!1,closeOnPressEscape:!1,title:e("message.user.logOutTitle"),message:e("message.user.logOutMessage"),showCancelButton:!0,confirmButtonText:e("message.user.logOutConfirm"),cancelButtonText:e("message.user.logOutCancel"),buttonSize:"default",beforeClose:(z,G,ue)=>{z==="confirm"?(G.confirmButtonLoading=!0,G.confirmButtonText=e("message.user.logOutExit"),setTimeout(()=>{ue(),setTimeout(()=>{G.confirmButtonLoading=!1},300)},700)):ue()}}).then(async()=>{let z=await Kn().signOut();z.data.code===100?(ve.clear(),window.location.reload()):Zt({type:"warning",message:z.data.msg})}).catch(()=>{}):R==="wareHouse"?window.open("https://gitee.com/lyt-top/vue-next-admin"):R==="password"?r.value.openDialog("all"):n.push(R)},p=()=>{c.value.openSearch()},g=R=>{Ee.remove("themeConfig"),i.value.globalComponentSize=R,Ee.set("themeConfig",i.value),W(),window.location.reload()},L=R=>{Ee.remove("themeConfig"),i.value.globalI18n=R,Ee.set("themeConfig",i.value),t.$i18n.locale=R,A(),It.useTitle()},k=R=>{t.mittBus.emit("getI18nConfig",t.$i18n.messages[R])},A=()=>{switch(Ee.get("themeConfig").globalI18n){case"zh-cn":l.disabledI18n="zh-cn",k("zh-cn");break;case"en":l.disabledI18n="en",k("en");break;case"zh-tw":l.disabledI18n="zh-tw",k("zh-tw");break}},W=()=>{switch(Ee.get("themeConfig").globalComponentSize){case"large":l.disabledSize="large";break;case"default":l.disabledSize="default";break;case"small":l.disabledSize="small";break}},j=()=>{n.push({path:"newMenu"})};return ze(()=>{Ee.get("themeConfig")&&(A(),W())}),P({userInfos:s,toHome:j,onLayoutSetingClick:v,onHandleCommandClick:u,onScreenfullClick:d,onSearchClick:p,onComponentSizeChange:g,onLanguageChange:L,searchRef:c,pwdRef:r,layoutUserFlexNum:h},Se(l))}}),In=e=>(En("data-v-cae5cea0"),e=e(),Tn(),e),Po=In(()=>x("div",{class:"logo"},[x("img",{src:Ro})],-1)),No={style:{display:"flex","align-items":"center","padding-right":"5px"}},Bo=["title"],Ho={class:"layout-navbars-breadcrumb-user-link"},zo=In(()=>x("img",{src:Fo,class:"layout-navbars-breadcrumb-user-link-photo mr5",style:{width:"24px",height:"24px"}},null,-1)),qo=Te("\u4FEE\u6539\u5BC6\u7801");function Xo(e,t,n,o,a,s){const i=T("ele-ArrowDown"),r=T("el-icon"),c=T("el-dropdown-item"),l=T("el-dropdown-menu"),h=T("el-dropdown"),d=T("Search"),v=T("updatePwd");return y(),I("div",{class:"layout-navbars-breadcrumb-user pr15",style:Dt({flex:e.layoutUserFlexNum})},[Po,x("div",No,[x("div",{class:"layout-navbars-breadcrumb-user-icon mr10",onClick:t[0]||(t[0]=(...u)=>e.onScreenfullClick&&e.onScreenfullClick(...u))},[x("i",{class:ot(["iconfont",e.isScreenfull?"icon-tuichuquanping":"icon-fullscreen"]),title:e.isScreenfull?e.$t("message.user.title6"):e.$t("message.user.title5")},null,10,Bo)]),D(h,{"show-timeout":70,"hide-timeout":50,onCommand:e.onHandleCommandClick},{dropdown:O(()=>[D(l,null,{default:O(()=>[D(c,{command:"/bigScreen"},{default:O(()=>[Te(H(e.$t("message.user.dropdown1")),1)]),_:1}),D(c,{command:"password"},{default:O(()=>[qo]),_:1}),D(c,{divided:"",command:"logOut"},{default:O(()=>[Te(H(e.$t("message.user.dropdown5")),1)]),_:1})]),_:1})]),default:O(()=>[x("span",Ho,[zo,Te(" "+H(e.userInfos.userName)+" ",1),D(r,{class:"el-icon--right"},{default:O(()=>[D(i)]),_:1})])]),_:1},8,["onCommand"]),D(d,{ref:"searchRef"},null,512),D(v,{ref:"pwdRef"},null,512)])],4)}var Yo=ie(Mo,[["render",Xo],["__scopeId","data-v-cae5cea0"]]);const Wo=ae({name:"navMenuHorizontal",components:{SubItem:ho},props:{menuList:{type:Array,default:()=>[]}},setup(e){const{proxy:t}=ct(),n=Mt(),o=Ie(),{routesList:a}=Q(n),{themeConfig:s}=Q(o),i=ut(),r=Ce({defaultActive:null}),c=oe(()=>e.menuList),l=p=>{const g=p.wheelDelta||-p.deltaY*40;t.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft=t.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft+g/4},h=()=>{nt(()=>{let p=document.querySelector(".el-menu.el-menu--horizontal li.is-active");if(!p)return!1;t.$refs.elMenuHorizontalScrollRef.$refs.wrap$.scrollLeft=p.offsetLeft})},d=p=>p.filter(g=>!g.meta.isHide).map(g=>(g=Object.assign({},g),g.children&&(g.children=d(g.children)),g)),v=p=>{const g=p.split("/");let L={};return d(a.value).map((k,A)=>{k.path===`/${g[1]}`&&(k.k=A,L.item=[P({},k)],L.children=[P({},k)],k.children&&(L.children=k.children))}),L},u=p=>{const{path:g,meta:L}=p;if(s.value.layout==="classic")r.defaultActive=`/${g.split("/")[1]}`;else{const k=L.isDynamic?L.isDynamicPath.split("/"):g.split("/");k.length>=4&&L.isHide?r.defaultActive=k.splice(0,3).join("/"):r.defaultActive=g}};return Dn(()=>{u(i)}),ze(()=>{h()}),Ft(p=>{u(p);let{layout:g,isClassicSplitMenu:L}=s.value;g==="classic"&&L&&t.mittBus.emit("setSendClassicChildren",v(p.path))}),P({menuLists:c,onElMenuHorizontalScroll:l},Se(r))}}),jo={class:"el-menu-horizontal-warp"};function Go(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("SubItem"),c=T("el-sub-menu"),l=T("el-menu-item"),h=T("el-menu"),d=T("el-scrollbar");return y(),I("div",jo,[D(d,{onWheel:Be(e.onElMenuHorizontalScroll,["prevent"]),ref:"elMenuHorizontalScrollRef"},{default:O(()=>[D(h,{router:"","default-active":e.defaultActive,ellipsis:!1,"background-color":"transparent",mode:"horizontal"},{default:O(()=>[(y(!0),I(me,null,Qe(e.menuLists,v=>(y(),I(me,null,[v.children&&v.children.length>0?(y(),Y(c,{index:v.path,key:v.path},{title:O(()=>[D(i,{name:v.meta.icon},null,8,["name"]),x("span",null,H(e.$t(v.meta.title)),1)]),default:O(()=>[D(r,{chil:v.children},null,8,["chil"])]),_:2},1032,["index"])):(y(),Y(l,{index:v.path,key:v.path},Wn({_:2},[!v.meta.isLink||v.meta.isLink&&v.meta.isIframe?{name:"title",fn:O(()=>[D(i,{name:v.meta.icon},null,8,["name"]),Te(" "+H(e.$t(v.meta.title)),1)])}:{name:"title",fn:O(()=>[x("a",{href:v.meta.isLink,target:"_blank",rel:"opener",class:"w100"},[D(i,{name:v.meta.icon},null,8,["name"]),Te(" "+H(e.$t(v.meta.title)),1)],8,["href"])])}]),1032,["index"]))],64))),256))]),_:1},8,["default-active"])]),_:1},8,["onWheel"])])}var Uo=ie(Wo,[["render",Go],["__scopeId","data-v-7d16fc9d"]]);const Qo=ae({name:"layoutBreadcrumbIndex",components:{Breadcrumb:yo,User:Yo,Logo:lo,Horizontal:Uo},setup(){const{proxy:e}=ct(),t=Mt(),n=Ie(),{themeConfig:o}=Q(n),{routesList:a}=Q(t),s=ut(),i=Ce({menuList:[]}),r=oe(()=>{let{isShowLogo:u,layout:p}=o.value;return u&&p==="classic"||u&&p==="transverse"}),c=oe(()=>{let{layout:u,isClassicSplitMenu:p}=o.value;return u==="transverse"||p&&u==="classic"}),l=()=>{let{layout:u,isClassicSplitMenu:p}=o.value;if(u==="classic"&&p){i.menuList=h(d(a.value));const g=v(s.path);e.mittBus.emit("setSendClassicChildren",g)}else i.menuList=d(a.value)},h=u=>(u.map(p=>{p.children&&delete p.children}),u),d=u=>u.filter(p=>!p.meta.isHide).map(p=>(p=Object.assign({},p),p.children&&(p.children=d(p.children)),p)),v=u=>{const p=u.split("/");let g={};return d(a.value).map((L,k)=>{L.path===`/${p[1]}`&&(L.k=k,g.item=[P({},L)],g.children=[P({},L)],L.children&&(g.children=L.children))}),g};return ze(()=>{l(),e.mittBus.on("getBreadcrumbIndexSetFilterRoutes",()=>{l()})}),on(()=>{e.mittBus.off("getBreadcrumbIndexSetFilterRoutes",()=>{})}),P({setIsShowLogo:r,isLayoutTransverse:c},Se(i))}}),Ko={class:"layout-navbars-breadcrumb-index"};function Zo(e,t,n,o,a,s){const i=T("Logo"),r=T("Breadcrumb"),c=T("Horizontal"),l=T("User");return y(),I("div",Ko,[e.setIsShowLogo?(y(),Y(i,{key:0})):ee("",!0),D(r),e.isLayoutTransverse?(y(),Y(c,{key:1,menuList:e.menuList},null,8,["menuList"])):ee("",!0),D(l)])}var Jo=ie(Qo,[["render",Zo],["__scopeId","data-v-aa5619e8"]]);/**!
* Sortable 1.15.0
* @author    RubaXa   <trash@rubaxa.org>
* @author    owenm    <owen23355@gmail.com>
* @license MIT
*/function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pn(Object(n),!0).forEach(function(o){ea(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function yt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yt=function(t){return typeof t}:yt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(e)}function ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Le.apply(this,arguments)}function ta(e,t){if(e==null)return{};var n={},o=Object.keys(e),a,s;for(s=0;s<o.length;s++)a=o[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function na(e,t){if(e==null)return{};var n=ta(e,t),o,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)o=s[a],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(n[o]=e[o]))}return n}var oa="1.15.0";function De(e){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var $e=De(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),dt=De(/Edge/i),gn=De(/firefox/i),at=De(/safari/i)&&!De(/chrome/i)&&!De(/android/i),$n=De(/iP(ad|od|hone)/i),Vn=De(/chrome/i)&&De(/android/i),kn={capture:!1,passive:!1};function V(e,t,n){e.addEventListener(t,n,!$e&&kn)}function $(e,t,n){e.removeEventListener(t,n,!$e&&kn)}function Vt(e,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function aa(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function be(e,t,n,o){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Vt(e,t):Vt(e,t))||o&&e===n)return e;if(e===n)break}while(e=aa(e))}return null}var wn=/\s+/g;function se(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(wn," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(wn," ")}}function C(e,t,n){var o=e&&e.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=n+(typeof n=="string"?"":"px")}}function Ge(e,t){var n="";if(typeof e=="string")n=e;else do{var o=C(e,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function xn(e,t,n){if(e){var o=e.getElementsByTagName(t),a=0,s=o.length;if(n)for(;a<s;a++)n(o[a],a);return o}return[]}function _e(){var e=document.scrollingElement;return e||document.documentElement}function X(e,t,n,o,a){if(!(!e.getBoundingClientRect&&e!==window)){var s,i,r,c,l,h,d;if(e!==window&&e.parentNode&&e!==_e()?(s=e.getBoundingClientRect(),i=s.top,r=s.left,c=s.bottom,l=s.right,h=s.height,d=s.width):(i=0,r=0,c=window.innerHeight,l=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!$e))do if(a&&a.getBoundingClientRect&&(C(a,"transform")!=="none"||n&&C(a,"position")!=="static")){var v=a.getBoundingClientRect();i-=v.top+parseInt(C(a,"border-top-width")),r-=v.left+parseInt(C(a,"border-left-width")),c=i+s.height,l=r+s.width;break}while(a=a.parentNode);if(o&&e!==window){var u=Ge(a||e),p=u&&u.a,g=u&&u.d;u&&(i/=g,r/=p,d/=p,h/=g,c=i+h,l=r+d)}return{top:i,left:r,bottom:c,right:l,width:d,height:h}}}function vn(e,t,n){for(var o=xe(e,!0),a=X(e)[t];o;){var s=X(o)[n],i=void 0;if(n==="top"||n==="left"?i=a>=s:i=a<=s,!i)return o;if(o===_e())break;o=xe(o,!1)}return!1}function Ue(e,t,n,o){for(var a=0,s=0,i=e.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==S.ghost&&(o||i[s]!==S.dragged)&&be(i[s],n.draggable,e,!1)){if(a===t)return i[s];a++}s++}return null}function rn(e,t){for(var n=e.lastElementChild;n&&(n===S.ghost||C(n,"display")==="none"||t&&!Vt(n,t));)n=n.previousElementSibling;return n||null}function fe(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==S.clone&&(!t||Vt(e,t))&&n++;return n}function bn(e){var t=0,n=0,o=_e();if(e)do{var a=Ge(e),s=a.a,i=a.d;t+=e.scrollLeft*s,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function ia(e,t){for(var n in e)if(!!e.hasOwnProperty(n)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n)}return-1}function xe(e,t){if(!e||!e.getBoundingClientRect)return _e();var n=e,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=C(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return _e();if(o||t)return n;o=!0}}while(n=n.parentNode);return _e()}function sa(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function qt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var it;function An(e,t){return function(){if(!it){var n=arguments,o=this;n.length===1?e.call(o,n[0]):e.apply(o,n),it=setTimeout(function(){it=void 0},t)}}}function ra(){clearTimeout(it),it=void 0}function On(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Rn(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var le="Sortable"+new Date().getTime();function la(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(a){if(!(C(a,"display")==="none"||a===S.ghost)){e.push({target:a,rect:X(a)});var s=ye({},e[e.length-1].rect);if(a.thisAnimationDuration){var i=Ge(a,!0);i&&(s.top-=i.f,s.left-=i.e)}a.fromRect=s}})}},addAnimationState:function(o){e.push(o)},removeAnimationState:function(o){e.splice(ia(e,{target:o}),1)},animateAll:function(o){var a=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var s=!1,i=0;e.forEach(function(r){var c=0,l=r.target,h=l.fromRect,d=X(l),v=l.prevFromRect,u=l.prevToRect,p=r.rect,g=Ge(l,!0);g&&(d.top-=g.f,d.left-=g.e),l.toRect=d,l.thisAnimationDuration&&qt(v,d)&&!qt(h,d)&&(p.top-d.top)/(p.left-d.left)===(h.top-d.top)/(h.left-d.left)&&(c=ca(p,v,u,a.options)),qt(d,h)||(l.prevFromRect=h,l.prevToRect=d,c||(c=a.options.animation),a.animate(l,p,d,c)),c&&(s=!0,i=Math.max(i,c),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},c),l.thisAnimationDuration=c)}),clearTimeout(t),s?t=setTimeout(function(){typeof o=="function"&&o()},i):typeof o=="function"&&o(),e=[]},animate:function(o,a,s,i){if(i){C(o,"transition",""),C(o,"transform","");var r=Ge(this.el),c=r&&r.a,l=r&&r.d,h=(a.left-s.left)/(c||1),d=(a.top-s.top)/(l||1);o.animatingX=!!h,o.animatingY=!!d,C(o,"transform","translate3d("+h+"px,"+d+"px,0)"),this.forRepaintDummy=ua(o),C(o,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),C(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){C(o,"transition",""),C(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},i)}}}}function ua(e){return e.offsetWidth}function ca(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}var Xe=[],Xt={initializeByDefault:!0},ft={mount:function(t){for(var n in Xt)Xt.hasOwnProperty(n)&&!(n in t)&&(t[n]=Xt[n]);Xe.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Xe.push(t)},pluginEvent:function(t,n,o){var a=this;this.eventCanceled=!1,o.cancel=function(){a.eventCanceled=!0};var s=t+"Global";Xe.forEach(function(i){!n[i.pluginName]||(n[i.pluginName][s]&&n[i.pluginName][s](ye({sortable:n},o)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](ye({sortable:n},o)))})},initializePlugins:function(t,n,o,a){Xe.forEach(function(r){var c=r.pluginName;if(!(!t.options[c]&&!r.initializeByDefault)){var l=new r(t,n,t.options);l.sortable=t,l.options=t.options,t[c]=l,Le(o,l.defaults)}});for(var s in t.options)if(!!t.options.hasOwnProperty(s)){var i=this.modifyOption(t,s,t.options[s]);typeof i!="undefined"&&(t.options[s]=i)}},getEventProperties:function(t,n){var o={};return Xe.forEach(function(a){typeof a.eventProperties=="function"&&Le(o,a.eventProperties.call(n[a.pluginName],t))}),o},modifyOption:function(t,n,o){var a;return Xe.forEach(function(s){!t[s.pluginName]||s.optionListeners&&typeof s.optionListeners[n]=="function"&&(a=s.optionListeners[n].call(t[s.pluginName],o))}),a}};function da(e){var t=e.sortable,n=e.rootEl,o=e.name,a=e.targetEl,s=e.cloneEl,i=e.toEl,r=e.fromEl,c=e.oldIndex,l=e.newIndex,h=e.oldDraggableIndex,d=e.newDraggableIndex,v=e.originalEvent,u=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[le],!!t){var g,L=t.options,k="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!$e&&!dt?g=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(o,!0,!0)),g.to=i||n,g.from=r||n,g.item=a||n,g.clone=s,g.oldIndex=c,g.newIndex=l,g.oldDraggableIndex=h,g.newDraggableIndex=d,g.originalEvent=v,g.pullMode=u?u.lastPutMode:void 0;var A=ye(ye({},p),ft.getEventProperties(o,t));for(var W in A)g[W]=A[W];n&&n.dispatchEvent(g),L[k]&&L[k].call(t,g)}}var fa=["evt"],ne=function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.evt,s=na(o,fa);ft.pluginEvent.bind(S)(t,n,ye({dragEl:w,parentEl:B,ghostEl:E,rootEl:F,nextEl:Ne,lastDownEl:Ct,cloneEl:N,cloneHidden:ke,dragStarted:Je,putSortable:U,activeSortable:S.active,originalEvent:a,oldIndex:je,oldDraggableIndex:st,newIndex:re,newDraggableIndex:Ve,hideGhostForTarget:Nn,unhideGhostForTarget:Bn,cloneNowHidden:function(){ke=!0},cloneNowShown:function(){ke=!1},dispatchSortableEvent:function(r){J({sortable:n,name:r,originalEvent:a})}},s))};function J(e){da(ye({putSortable:U,cloneEl:N,targetEl:w,rootEl:F,oldIndex:je,oldDraggableIndex:st,newIndex:re,newDraggableIndex:Ve},e))}var w,B,E,F,Ne,Ct,N,ke,je,re,st,Ve,wt,U,We=!1,kt=!1,xt=[],Me,he,Yt,Wt,_n,yn,Je,Ye,rt,lt=!1,vt=!1,St,Z,jt=[],Jt=!1,At=[],Pt=typeof document!="undefined",bt=$n,Cn=dt||$e?"cssFloat":"float",ha=Pt&&!Vn&&!$n&&"draggable"in document.createElement("div"),Fn=function(){if(!!Pt){if($e)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Mn=function(t,n){var o=C(t),a=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),s=Ue(t,0,n),i=Ue(t,1,n),r=s&&C(s),c=i&&C(i),l=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+X(s).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+X(i).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&r.float&&r.float!=="none"){var d=r.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===d)?"vertical":"horizontal"}return s&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||l>=a&&o[Cn]==="none"||i&&o[Cn]==="none"&&l+h>a)?"vertical":"horizontal"},ma=function(t,n,o){var a=o?t.left:t.top,s=o?t.right:t.bottom,i=o?t.width:t.height,r=o?n.left:n.top,c=o?n.right:n.bottom,l=o?n.width:n.height;return a===r||s===c||a+i/2===r+l/2},pa=function(t,n){var o;return xt.some(function(a){var s=a[le].options.emptyInsertThreshold;if(!(!s||rn(a))){var i=X(a),r=t>=i.left-s&&t<=i.right+s,c=n>=i.top-s&&n<=i.bottom+s;if(r&&c)return o=a}}),o},Pn=function(t){function n(s,i){return function(r,c,l,h){var d=r.options.group.name&&c.options.group.name&&r.options.group.name===c.options.group.name;if(s==null&&(i||d))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return n(s(r,c,l,h),i)(r,c,l,h);var v=(i?r:c).options.group.name;return s===!0||typeof s=="string"&&s===v||s.join&&s.indexOf(v)>-1}}var o={},a=t.group;(!a||yt(a)!="object")&&(a={name:a}),o.name=a.name,o.checkPull=n(a.pull,!0),o.checkPut=n(a.put),o.revertClone=a.revertClone,t.group=o},Nn=function(){!Fn&&E&&C(E,"display","none")},Bn=function(){!Fn&&E&&C(E,"display","")};Pt&&!Vn&&document.addEventListener("click",function(e){if(kt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),kt=!1,!1},!0);var Pe=function(t){if(w){t=t.touches?t.touches[0]:t;var n=pa(t.clientX,t.clientY);if(n){var o={};for(var a in t)t.hasOwnProperty(a)&&(o[a]=t[a]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[le]._onDragOver(o)}}},ga=function(t){w&&w.parentNode[le]._isOutsideThisEl(t.target)};function S(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Le({},t),e[le]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Mn(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,r){i.setData("Text",r.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:S.supportPointer!==!1&&"PointerEvent"in window&&!at,emptyInsertThreshold:5};ft.initializePlugins(this,e,n);for(var o in n)!(o in t)&&(t[o]=n[o]);Pn(t);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=t.forceFallback?!1:ha,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?V(e,"pointerdown",this._onTapStart):(V(e,"mousedown",this._onTapStart),V(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(V(e,"dragover",this),V(e,"dragenter",this)),xt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Le(this,la())}S.prototype={constructor:S,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ye=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,w):this.options.direction},_onTapStart:function(t){if(!!t.cancelable){var n=this,o=this.el,a=this.options,s=a.preventOnFilter,i=t.type,r=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(r||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,h=a.filter;if(Ea(o),!w&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||a.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&at&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=be(c,a.draggable,o,!1),!(c&&c.animated)&&Ct!==c)){if(je=fe(c),st=fe(c,a.draggable),typeof h=="function"){if(h.call(this,t,c,this)){J({sortable:n,rootEl:l,name:"filter",targetEl:c,toEl:o,fromEl:o}),ne("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(d){if(d=be(l,d.trim(),o,!1),d)return J({sortable:n,rootEl:d,name:"filter",targetEl:c,fromEl:o,toEl:o}),ne("filter",n,{evt:t}),!0}),h)){s&&t.cancelable&&t.preventDefault();return}a.handle&&!be(l,a.handle,o,!1)||this._prepareDragStart(t,r,c)}}},_prepareDragStart:function(t,n,o){var a=this,s=a.el,i=a.options,r=s.ownerDocument,c;if(o&&!w&&o.parentNode===s){var l=X(o);if(F=s,w=o,B=w.parentNode,Ne=w.nextSibling,Ct=o,wt=i.group,S.dragged=w,Me={target:w,clientX:(n||t).clientX,clientY:(n||t).clientY},_n=Me.clientX-l.left,yn=Me.clientY-l.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,w.style["will-change"]="all",c=function(){if(ne("delayEnded",a,{evt:t}),S.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!gn&&a.nativeDraggable&&(w.draggable=!0),a._triggerDragStart(t,n),J({sortable:a,name:"choose",originalEvent:t}),se(w,i.chosenClass,!0)},i.ignore.split(",").forEach(function(h){xn(w,h.trim(),Gt)}),V(r,"dragover",Pe),V(r,"mousemove",Pe),V(r,"touchmove",Pe),V(r,"mouseup",a._onDrop),V(r,"touchend",a._onDrop),V(r,"touchcancel",a._onDrop),gn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,w.draggable=!0),ne("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(dt||$e))){if(S.eventCanceled){this._onDrop();return}V(r,"mouseup",a._disableDelayedDrag),V(r,"touchend",a._disableDelayedDrag),V(r,"touchcancel",a._disableDelayedDrag),V(r,"mousemove",a._delayedDragTouchMoveHandler),V(r,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&V(r,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){w&&Gt(w),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;$(t,"mouseup",this._disableDelayedDrag),$(t,"touchend",this._disableDelayedDrag),$(t,"touchcancel",this._disableDelayedDrag),$(t,"mousemove",this._delayedDragTouchMoveHandler),$(t,"touchmove",this._delayedDragTouchMoveHandler),$(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?V(document,"pointermove",this._onTouchMove):n?V(document,"touchmove",this._onTouchMove):V(document,"mousemove",this._onTouchMove):(V(w,"dragend",this),V(F,"dragstart",this._onDragStart));try{document.selection?Et(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(We=!1,F&&w){ne("dragStarted",this,{evt:n}),this.nativeDraggable&&V(document,"dragover",ga);var o=this.options;!t&&se(w,o.dragClass,!1),se(w,o.ghostClass,!0),S.active=this,t&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(he){this._lastX=he.clientX,this._lastY=he.clientY,Nn();for(var t=document.elementFromPoint(he.clientX,he.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(he.clientX,he.clientY),t!==n);)n=t;if(w.parentNode[le]._isOutsideThisEl(t),n)do{if(n[le]){var o=void 0;if(o=n[le]._onDragOver({clientX:he.clientX,clientY:he.clientY,target:t,rootEl:n}),o&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Bn()}},_onTouchMove:function(t){if(Me){var n=this.options,o=n.fallbackTolerance,a=n.fallbackOffset,s=t.touches?t.touches[0]:t,i=E&&Ge(E,!0),r=E&&i&&i.a,c=E&&i&&i.d,l=bt&&Z&&bn(Z),h=(s.clientX-Me.clientX+a.x)/(r||1)+(l?l[0]-jt[0]:0)/(r||1),d=(s.clientY-Me.clientY+a.y)/(c||1)+(l?l[1]-jt[1]:0)/(c||1);if(!S.active&&!We){if(o&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(E){i?(i.e+=h-(Yt||0),i.f+=d-(Wt||0)):i={a:1,b:0,c:0,d:1,e:h,f:d};var v="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");C(E,"webkitTransform",v),C(E,"mozTransform",v),C(E,"msTransform",v),C(E,"transform",v),Yt=h,Wt=d,he=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!E){var t=this.options.fallbackOnBody?document.body:F,n=X(w,!0,bt,!0,t),o=this.options;if(bt){for(Z=t;C(Z,"position")==="static"&&C(Z,"transform")==="none"&&Z!==document;)Z=Z.parentNode;Z!==document.body&&Z!==document.documentElement?(Z===document&&(Z=_e()),n.top+=Z.scrollTop,n.left+=Z.scrollLeft):Z=_e(),jt=bn(Z)}E=w.cloneNode(!0),se(E,o.ghostClass,!1),se(E,o.fallbackClass,!0),se(E,o.dragClass,!0),C(E,"transition",""),C(E,"transform",""),C(E,"box-sizing","border-box"),C(E,"margin",0),C(E,"top",n.top),C(E,"left",n.left),C(E,"width",n.width),C(E,"height",n.height),C(E,"opacity","0.8"),C(E,"position",bt?"absolute":"fixed"),C(E,"zIndex","100000"),C(E,"pointerEvents","none"),S.ghost=E,t.appendChild(E),C(E,"transform-origin",_n/parseInt(E.style.width)*100+"% "+yn/parseInt(E.style.height)*100+"%")}},_onDragStart:function(t,n){var o=this,a=t.dataTransfer,s=o.options;if(ne("dragStart",this,{evt:t}),S.eventCanceled){this._onDrop();return}ne("setupClone",this),S.eventCanceled||(N=Rn(w),N.removeAttribute("id"),N.draggable=!1,N.style["will-change"]="",this._hideClone(),se(N,this.options.chosenClass,!1),S.clone=N),o.cloneId=Et(function(){ne("clone",o),!S.eventCanceled&&(o.options.removeCloneOnHide||F.insertBefore(N,w),o._hideClone(),J({sortable:o,name:"clone"}))}),!n&&se(w,s.dragClass,!0),n?(kt=!0,o._loopId=setInterval(o._emulateDragOver,50)):($(document,"mouseup",o._onDrop),$(document,"touchend",o._onDrop),$(document,"touchcancel",o._onDrop),a&&(a.effectAllowed="move",s.setData&&s.setData.call(o,a,w)),V(document,"drop",o),C(w,"transform","translateZ(0)")),We=!0,o._dragStartId=Et(o._dragStarted.bind(o,n,t)),V(document,"selectstart",o),Je=!0,at&&C(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,o=t.target,a,s,i,r=this.options,c=r.group,l=S.active,h=wt===c,d=r.sort,v=U||l,u,p=this,g=!1;if(Jt)return;function L(Fe,Nt){ne(Fe,p,ye({evt:t,isOwner:h,axis:u?"vertical":"horizontal",revert:i,dragRect:a,targetRect:s,canSort:d,fromSortable:v,target:o,completed:A,onMove:function(Ke,Ze){return _t(F,n,w,a,Ke,X(Ke),t,Ze)},changed:W},Nt))}function k(){L("dragOverAnimationCapture"),p.captureAnimationState(),p!==v&&v.captureAnimationState()}function A(Fe){return L("dragOverCompleted",{insertion:Fe}),Fe&&(h?l._hideClone():l._showClone(p),p!==v&&(se(w,U?U.options.ghostClass:l.options.ghostClass,!1),se(w,r.ghostClass,!0)),U!==p&&p!==S.active?U=p:p===S.active&&U&&(U=null),v===p&&(p._ignoreWhileAnimating=o),p.animateAll(function(){L("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(o===w&&!w.animated||o===n&&!o.animated)&&(Ye=null),!r.dragoverBubble&&!t.rootEl&&o!==document&&(w.parentNode[le]._isOutsideThisEl(t.target),!Fe&&Pe(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function W(){re=fe(w),Ve=fe(w,r.draggable),J({sortable:p,name:"change",toEl:n,newIndex:re,newDraggableIndex:Ve,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=be(o,r.draggable,n,!0),L("dragOver"),S.eventCanceled)return g;if(w.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||p._ignoreWhileAnimating===o)return A(!1);if(kt=!1,l&&!r.disabled&&(h?d||(i=B!==F):U===this||(this.lastPutMode=wt.checkPull(this,l,w,t))&&c.checkPut(this,l,w,t))){if(u=this._getDirection(t,o)==="vertical",a=X(w),L("dragOverValid"),S.eventCanceled)return g;if(i)return B=F,k(),this._hideClone(),L("revert"),S.eventCanceled||(Ne?F.insertBefore(w,Ne):F.appendChild(w)),A(!0);var j=rn(n,r.draggable);if(!j||_a(t,u,this)&&!j.animated){if(j===w)return A(!1);if(j&&n===t.target&&(o=j),o&&(s=X(o)),_t(F,n,w,a,o,s,t,!!o)!==!1)return k(),j&&j.nextSibling?n.insertBefore(w,j.nextSibling):n.appendChild(w),B=n,W(),A(!0)}else if(j&&ba(t,u,this)){var R=Ue(n,0,r,!0);if(R===w)return A(!1);if(o=R,s=X(o),_t(F,n,w,a,o,s,t,!1)!==!1)return k(),n.insertBefore(w,R),B=n,W(),A(!0)}else if(o.parentNode===n){s=X(o);var z=0,G,ue=w.parentNode!==n,K=!ma(w.animated&&w.toRect||a,o.animated&&o.toRect||s,u),Ae=u?"top":"left",pe=vn(o,"top","top")||vn(w,"top","top"),Oe=pe?pe.scrollTop:void 0;Ye!==o&&(G=s[Ae],lt=!1,vt=!K&&r.invertSwap||ue),z=ya(t,o,s,u,K?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,vt,Ye===o);var ce;if(z!==0){var ge=fe(w);do ge-=z,ce=B.children[ge];while(ce&&(C(ce,"display")==="none"||ce===E))}if(z===0||ce===o)return A(!1);Ye=o,rt=z;var Re=o.nextElementSibling,we=!1;we=z===1;var te=_t(F,n,w,a,o,s,t,we);if(te!==!1)return(te===1||te===-1)&&(we=te===1),Jt=!0,setTimeout(va,30),k(),we&&!Re?n.appendChild(w):o.parentNode.insertBefore(w,we?Re:o),pe&&On(pe,0,Oe-pe.scrollTop),B=w.parentNode,G!==void 0&&!vt&&(St=Math.abs(G-X(o)[Ae])),W(),A(!0)}if(n.contains(w))return A(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){$(document,"mousemove",this._onTouchMove),$(document,"touchmove",this._onTouchMove),$(document,"pointermove",this._onTouchMove),$(document,"dragover",Pe),$(document,"mousemove",Pe),$(document,"touchmove",Pe)},_offUpEvents:function(){var t=this.el.ownerDocument;$(t,"mouseup",this._onDrop),$(t,"touchend",this._onDrop),$(t,"pointerup",this._onDrop),$(t,"touchcancel",this._onDrop),$(document,"selectstart",this)},_onDrop:function(t){var n=this.el,o=this.options;if(re=fe(w),Ve=fe(w,o.draggable),ne("drop",this,{evt:t}),B=w&&w.parentNode,re=fe(w),Ve=fe(w,o.draggable),S.eventCanceled){this._nulling();return}We=!1,vt=!1,lt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),en(this.cloneId),en(this._dragStartId),this.nativeDraggable&&($(document,"drop",this),$(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),at&&C(document.body,"user-select",""),C(w,"transform",""),t&&(Je&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),E&&E.parentNode&&E.parentNode.removeChild(E),(F===B||U&&U.lastPutMode!=="clone")&&N&&N.parentNode&&N.parentNode.removeChild(N),w&&(this.nativeDraggable&&$(w,"dragend",this),Gt(w),w.style["will-change"]="",Je&&!We&&se(w,U?U.options.ghostClass:this.options.ghostClass,!1),se(w,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:B,newIndex:null,newDraggableIndex:null,originalEvent:t}),F!==B?(re>=0&&(J({rootEl:B,name:"add",toEl:B,fromEl:F,originalEvent:t}),J({sortable:this,name:"remove",toEl:B,originalEvent:t}),J({rootEl:B,name:"sort",toEl:B,fromEl:F,originalEvent:t}),J({sortable:this,name:"sort",toEl:B,originalEvent:t})),U&&U.save()):re!==je&&re>=0&&(J({sortable:this,name:"update",toEl:B,originalEvent:t}),J({sortable:this,name:"sort",toEl:B,originalEvent:t})),S.active&&((re==null||re===-1)&&(re=je,Ve=st),J({sortable:this,name:"end",toEl:B,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ne("nulling",this),F=w=B=E=Ne=N=Ct=ke=Me=he=Je=re=Ve=je=st=Ye=rt=U=wt=S.dragged=S.ghost=S.clone=S.active=null,At.forEach(function(t){t.checked=!0}),At.length=Yt=Wt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":w&&(this._onDragOver(t),wa(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,o=this.el.children,a=0,s=o.length,i=this.options;a<s;a++)n=o[a],be(n,i.draggable,this.el,!1)&&t.push(n.getAttribute(i.dataIdAttr)||Sa(n));return t},sort:function(t,n){var o={},a=this.el;this.toArray().forEach(function(s,i){var r=a.children[i];be(r,this.options.draggable,a,!1)&&(o[s]=r)},this),n&&this.captureAnimationState(),t.forEach(function(s){o[s]&&(a.removeChild(o[s]),a.appendChild(o[s]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return be(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var o=this.options;if(n===void 0)return o[t];var a=ft.modifyOption(this,t,n);typeof a!="undefined"?o[t]=a:o[t]=n,t==="group"&&Pn(o)},destroy:function(){ne("destroy",this);var t=this.el;t[le]=null,$(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart),$(t,"pointerdown",this._onTapStart),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xt.splice(xt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ke){if(ne("hideClone",this),S.eventCanceled)return;C(N,"display","none"),this.options.removeCloneOnHide&&N.parentNode&&N.parentNode.removeChild(N),ke=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ke){if(ne("showClone",this),S.eventCanceled)return;w.parentNode==F&&!this.options.group.revertClone?F.insertBefore(N,w):Ne?F.insertBefore(N,Ne):F.appendChild(N),this.options.group.revertClone&&this.animate(w,N),C(N,"display",""),ke=!1}}};function wa(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _t(e,t,n,o,a,s,i,r){var c,l=e[le],h=l.options.onMove,d;return window.CustomEvent&&!$e&&!dt?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=t,c.from=e,c.dragged=n,c.draggedRect=o,c.related=a||t,c.relatedRect=s||X(t),c.willInsertAfter=r,c.originalEvent=i,e.dispatchEvent(c),h&&(d=h.call(l,c,i)),d}function Gt(e){e.draggable=!1}function va(){Jt=!1}function ba(e,t,n){var o=X(Ue(n.el,0,n.options,!0)),a=10;return t?e.clientX<o.left-a||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-a||e.clientY<o.bottom&&e.clientX<o.left}function _a(e,t,n){var o=X(rn(n.el,n.options.draggable)),a=10;return t?e.clientX>o.right+a||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+a}function ya(e,t,n,o,a,s,i,r){var c=o?e.clientY:e.clientX,l=o?n.height:n.width,h=o?n.top:n.left,d=o?n.bottom:n.right,v=!1;if(!i){if(r&&St<l*a){if(!lt&&(rt===1?c>h+l*s/2:c<d-l*s/2)&&(lt=!0),lt)v=!0;else if(rt===1?c<h+St:c>d-St)return-rt}else if(c>h+l*(1-a)/2&&c<d-l*(1-a)/2)return Ca(t)}return v=v||i,v&&(c<h+l*s/2||c>d-l*s/2)?c>h+l/2?1:-1:0}function Ca(e){return fe(w)<fe(e)?1:-1}function Sa(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Ea(e){At.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&At.push(o)}}function Et(e){return setTimeout(e,0)}function en(e){return clearTimeout(e)}Pt&&V(document,"touchmove",function(e){(S.active||We)&&e.cancelable&&e.preventDefault()});S.utils={on:V,off:$,css:C,find:xn,is:function(t,n){return!!be(t,n,t,!1)},extend:sa,throttle:An,closest:be,toggleClass:se,clone:Rn,index:fe,nextTick:Et,cancelNextTick:en,detectDirection:Mn,getChild:Ue};S.get=function(e){return e[le]};S.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(S.utils=ye(ye({},S.utils),o.utils)),ft.mount(o)})};S.create=function(e,t){return new S(e,t)};S.version=oa;var q=[],et,tn,nn=!1,Ut,Qt,Ot,tt;function Ta(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?V(document,"dragover",this._handleAutoScroll):this.options.supportPointer?V(document,"pointermove",this._handleFallbackAutoScroll):o.touches?V(document,"touchmove",this._handleFallbackAutoScroll):V(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?$(document,"dragover",this._handleAutoScroll):($(document,"pointermove",this._handleFallbackAutoScroll),$(document,"touchmove",this._handleFallbackAutoScroll),$(document,"mousemove",this._handleFallbackAutoScroll)),Sn(),Tt(),ra()},nulling:function(){Ot=tn=et=nn=tt=Ut=Qt=null,q.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var a=this,s=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,r=document.elementFromPoint(s,i);if(Ot=n,o||this.options.forceAutoScrollFallback||dt||$e||at){Kt(n,this.options,r,o);var c=xe(r,!0);nn&&(!tt||s!==Ut||i!==Qt)&&(tt&&Sn(),tt=setInterval(function(){var l=xe(document.elementFromPoint(s,i),!0);l!==c&&(c=l,Tt()),Kt(n,a.options,l,o)},10),Ut=s,Qt=i)}else{if(!this.options.bubbleScroll||xe(r,!0)===_e()){Tt();return}Kt(n,this.options,xe(r,!1),!1)}}},Le(e,{pluginName:"scroll",initializeByDefault:!0})}function Tt(){q.forEach(function(e){clearInterval(e.pid)}),q=[]}function Sn(){clearInterval(tt)}var Kt=An(function(e,t,n,o){if(!!t.scroll){var a=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,i=t.scrollSensitivity,r=t.scrollSpeed,c=_e(),l=!1,h;tn!==n&&(tn=n,Tt(),et=t.scroll,h=t.scrollFn,et===!0&&(et=xe(n,!0)));var d=0,v=et;do{var u=v,p=X(u),g=p.top,L=p.bottom,k=p.left,A=p.right,W=p.width,j=p.height,R=void 0,z=void 0,G=u.scrollWidth,ue=u.scrollHeight,K=C(u),Ae=u.scrollLeft,pe=u.scrollTop;u===c?(R=W<G&&(K.overflowX==="auto"||K.overflowX==="scroll"||K.overflowX==="visible"),z=j<ue&&(K.overflowY==="auto"||K.overflowY==="scroll"||K.overflowY==="visible")):(R=W<G&&(K.overflowX==="auto"||K.overflowX==="scroll"),z=j<ue&&(K.overflowY==="auto"||K.overflowY==="scroll"));var Oe=R&&(Math.abs(A-a)<=i&&Ae+W<G)-(Math.abs(k-a)<=i&&!!Ae),ce=z&&(Math.abs(L-s)<=i&&pe+j<ue)-(Math.abs(g-s)<=i&&!!pe);if(!q[d])for(var ge=0;ge<=d;ge++)q[ge]||(q[ge]={});(q[d].vx!=Oe||q[d].vy!=ce||q[d].el!==u)&&(q[d].el=u,q[d].vx=Oe,q[d].vy=ce,clearInterval(q[d].pid),(Oe!=0||ce!=0)&&(l=!0,q[d].pid=setInterval(function(){o&&this.layer===0&&S.active._onTouchMove(Ot);var Re=q[this.layer].vy?q[this.layer].vy*r:0,we=q[this.layer].vx?q[this.layer].vx*r:0;typeof h=="function"&&h.call(S.dragged.parentNode[le],we,Re,e,Ot,q[this.layer].el)!=="continue"||On(q[this.layer].el,we,Re)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&v!==c&&(v=xe(v,!1)));nn=l}},30),Hn=function(t){var n=t.originalEvent,o=t.putSortable,a=t.dragEl,s=t.activeSortable,i=t.dispatchSortableEvent,r=t.hideGhostForTarget,c=t.unhideGhostForTarget;if(!!n){var l=o||s;r();var h=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(h.clientX,h.clientY);c(),l&&!l.el.contains(d)&&(i("spill"),this.onSpill({dragEl:a,putSortable:o}))}};function ln(){}ln.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var a=Ue(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:Hn};Le(ln,{pluginName:"revertOnSpill"});function un(){}un.prototype={onSpill:function(t){var n=t.dragEl,o=t.putSortable,a=o||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:Hn};Le(un,{pluginName:"removeOnSpill"});S.mount(new Ta);S.mount(un,ln);const Da=ae({name:"layoutTagsViewContextmenu",props:{dropdown:{type:Object,default:()=>({x:0,y:0})}},setup(e,{emit:t}){const n=Ce({isShow:!1,dropdownList:[{contextMenuClickId:0,txt:"message.tagsView.refresh",affix:!1,icon:"ele-RefreshRight"},{contextMenuClickId:1,txt:"message.tagsView.close",affix:!1,icon:"ele-Close"},{contextMenuClickId:2,txt:"message.tagsView.closeOther",affix:!1,icon:"ele-CircleClose"},{contextMenuClickId:3,txt:"message.tagsView.closeAll",affix:!1,icon:"ele-FolderDelete"},{contextMenuClickId:4,txt:"message.tagsView.fullscreen",affix:!1,icon:"iconfont icon-fullscreen"}],item:{},arrowLeft:10}),o=oe(()=>e.dropdown.x+117>document.documentElement.clientWidth?{x:document.documentElement.clientWidth-117-5,y:e.dropdown.y}:e.dropdown),a=r=>{t("currentContextmenuClick",Object.assign({},{contextMenuClickId:r},n.item))},s=r=>{n.item=r,r.meta.isAffix?n.dropdownList[1].affix=!0:n.dropdownList[1].affix=!1,i(),setTimeout(()=>{n.isShow=!0},10)},i=()=>{n.isShow=!1};return ze(()=>{document.body.addEventListener("click",i)}),on(()=>{document.body.removeEventListener("click",i)}),Lt(()=>e.dropdown,({x:r})=>{r+117>document.documentElement.clientWidth?n.arrowLeft=117-(document.documentElement.clientWidth-r):n.arrowLeft=10},{deep:!0}),P({dropdowns:o,openContextmenu:s,closeContextmenu:i,onCurrentContextmenuClick:a},Se(n))}}),La={class:"el-dropdown-menu"},Ia=["onClick"];function $a(e,t,n,o,a,s){const i=T("SvgIcon");return y(),Y(jn,{name:"el-zoom-in-center"},{default:O(()=>[an((y(),I("div",{"aria-hidden":"true",class:"el-dropdown__popper el-popper is-light is-pure custom-contextmenu",role:"tooltip","data-popper-placement":"bottom",style:Dt(`top: ${e.dropdowns.y+5}px;left: ${e.dropdowns.x}px;`),key:Math.random()},[x("ul",La,[(y(!0),I(me,null,Qe(e.dropdownList,(r,c)=>(y(),I(me,null,[r.affix?ee("",!0):(y(),I("li",{class:"el-dropdown-menu__item","aria-disabled":"false",tabindex:"-1",key:c,onClick:l=>e.onCurrentContextmenuClick(r.contextMenuClickId)},[D(i,{name:r.icon},null,8,["name"]),x("span",null,H(e.$t(r.txt)),1)],8,Ia))],64))),256))]),x("div",{class:"el-popper__arrow",style:Dt({left:`${e.arrowLeft}px`})},null,4)],4)),[[sn,e.isShow]])]),_:1})}var Va=ie(Da,[["render",$a],["__scopeId","data-v-225a0b9c"]]);const ka=ae({name:"layoutTagsView",components:{Contextmenu:Va},setup(){const{proxy:e}=ct(),t=He([]),n=He(),o=He(),a=He(),s=$t(),i=Ie(),r=$t(),{themeConfig:c}=Q(i),{tagsViewRoutes:l}=Q(r),h=Zn(),d=ut(),v=Rt(),u=Ce({routeActive:"",routePath:d.path,dropdown:{x:"",y:""},sortable:"",tagsRefsIndex:0,tagsViewList:[],tagsViewRoutesList:[]}),p=oe(()=>c.value.tagsStyle),g=oe(()=>c.value),L=oe(()=>m=>It.setTagsViewNameI18n(m)),k=m=>g.value.isShareTagsView?m.path===u.routePath:m.query&&Object.keys(m.query).length||m.params&&Object.keys(m.params).length?m.url?m.url===u.routeActive:m.path===u.routeActive:m.path===u.routePath,A=m=>{ve.set("tagsViewList",m)},W=async()=>{u.routeActive=await te(d),u.routePath=await d.meta.isDynamic?d.meta.isDynamicPath:d.path,u.tagsViewList=[],u.tagsViewRoutesList=l.value,j()},j=async()=>{ve.get("tagsViewList")&&g.value.isCacheTagsView?u.tagsViewList=await ve.get("tagsViewList"):(await u.tagsViewRoutesList.map(m=>{m.meta.isAffix&&!m.meta.isHide&&(m.url=te(m),u.tagsViewList.push(P({},m)),h.addCachedView(m))}),await G(d.path,d)),Ke(g.value.isShareTagsView?u.routePath:u.routeActive)},R=async(m,f)=>{let _=f.meta.isDynamic?f.meta.isDynamicPath:m;if(u.tagsViewList.filter(M=>M.path===_&&zt(f.meta.isDynamic?M.params?M.params:null:M.query?M.query:null,f.meta.isDynamic?f!=null&&f.params?f==null?void 0:f.params:null:f!=null&&f.query?f==null?void 0:f.query:null)).length<=0){let M=u.tagsViewRoutesList.find(de=>de.path===_);if(!M||M.meta.isAffix||M.meta.isLink&&!M.meta.isIframe)return!1;f.meta.isDynamic?M.params=f.params:M.query=f.query,M.url=te(M),u.tagsViewList.push(P({},M)),await h.addCachedView(M),A(u.tagsViewList)}},z=(m,f)=>{let _=f.meta.isDynamic?f.meta.isDynamicPath:m;u.tagsViewList.forEach(b=>{b.path===_&&!zt(f.meta.isDynamic?b.params?b.params:null:b.query?b.query:null,f.meta.isDynamic?f!=null&&f.params?f==null?void 0:f.params:null:f!=null&&f.query?f==null?void 0:f.query:null)&&(f.meta.isDynamic?b.params=f.params:b.query=f.query,b.url=te(b),A(u.tagsViewList))})},G=(m,f)=>{nt(async()=>{let _="";if(f&&f.meta.isDynamic){if(g.value.isShareTagsView?await z(m,f):await R(m,f),u.tagsViewList.some(b=>b.path===f.meta.isDynamicPath))return!1;_=u.tagsViewRoutesList.find(b=>b.path===f.meta.isDynamicPath)}else{if(g.value.isShareTagsView?await z(m,f):await R(m,f),u.tagsViewList.some(b=>b.path===m))return!1;_=u.tagsViewRoutesList.find(b=>b.path===m)}if(!_||_.meta.isLink&&!_.meta.isIframe)return!1;f&&f.meta.isDynamic?_.params=f!=null&&f.params?f==null?void 0:f.params:d.params:_.query=f!=null&&f.query?f==null?void 0:f.query:d.query,_.url=te(_),await h.addCachedView(_),await u.tagsViewList.push(P({},_)),await A(u.tagsViewList)})},ue=async m=>{const f=u.tagsViewList.find(_=>g.value.isShareTagsView?_.path===m:_.url===m);f!=null&&(await h.delCachedView(f),e.mittBus.emit("onTagsViewRefreshRouterView",m),f.meta.isKeepAlive&&h.addCachedView(f))},K=m=>{u.tagsViewList.map((f,_,b)=>{f.meta.isAffix||(g.value.isShareTagsView?f.path===m:f.url===m)&&(h.delCachedView(f),u.tagsViewList.splice(_,1),setTimeout(()=>{(u.tagsViewList.length===_&&g.value.isShareTagsView?u.routePath===m:u.routeActive===m)?b[b.length-1].meta.isDynamic?_!==b.length?v.push({name:b[_].name,params:b[_].params}):v.push({name:b[b.length-1].name,params:b[b.length-1].params}):_!==b.length?v.push({path:b[_].path,query:b[_].query}):v.push({path:b[b.length-1].path,query:b[b.length-1].query}):(u.tagsViewList.length!==_&&g.value.isShareTagsView?u.routePath===m:u.routeActive===m)&&(b[_].meta.isDynamic?v.push({name:b[_].name,params:b[_].params}):v.push({path:b[_].path,query:b[_].query}))},0))}),A(u.tagsViewList)},Ae=m=>{ve.get("tagsViewList")&&(u.tagsViewList=[],ve.get("tagsViewList").map(f=>{f.meta.isAffix&&!f.meta.isHide&&(f.url=te(f),h.delOthersCachedViews(f),u.tagsViewList.push(P({},f)))}),G(m,d),A(u.tagsViewList))},pe=()=>{ve.get("tagsViewList")&&(h.delAllCachedViews(),u.tagsViewList=[],ve.get("tagsViewList").map(m=>{m.meta.isAffix&&!m.meta.isHide&&(m.url=te(m),u.tagsViewList.push(P({},m)),v.push({path:u.tagsViewList[u.tagsViewList.length-1].path}))}),A(u.tagsViewList))},Oe=async m=>{const f=u.tagsViewList.find(_=>g.value.isShareTagsView?_.path===m:_.url===m);f.meta.isDynamic?await v.push({name:f.name,params:f.params}):await v.push({name:f.name,query:f.query}),s.setCurrenFullscreen(!0)},ce=(m,f)=>(ve.get("tagsViewList")?ve.get("tagsViewList"):u.tagsViewList).find(b=>{if(b.path===m&&zt(b.meta.isDynamic?b.params?b.params:null:b.query?b.query:null,f&&Object.keys(f||{}).length>0?f:null))return b;if(b.path===m&&Object.keys(f||{}).length<=0)return b}),ge=async m=>{const f=m.meta.isDynamic?m.params:m.query;if(!ce(m.path,f))return Zt({type:"warning",message:"\u8BF7\u6B63\u786E\u8F93\u5165\u8DEF\u5F84\u53CA\u5B8C\u6574\u53C2\u6570\uFF08query\u3001params\uFF09"});const{path:_,name:b,params:M,query:de,meta:ht,url:qe}=ce(m.path,f);switch(m.contextMenuClickId){case 0:ht.isDynamic?await v.push({name:b,params:M}):await v.push({path:_,query:de}),ue(d.fullPath);break;case 1:K(g.value.isShareTagsView?_:qe);break;case 2:ht.isDynamic?await v.push({name:b,params:M}):await v.push({path:_,query:de}),Ae(_);break;case 3:pe();break;case 4:Oe(g.value.isShareTagsView?_:qe);break}},Re=(m,f)=>{const{clientX:_,clientY:b}=f;u.dropdown.x=_,u.dropdown.y=b,o.value.openContextmenu(m)},we=(m,f)=>{u.tagsRefsIndex=f,v.push(m)},te=m=>{let f=m.query&&Object.keys(m.query).length>0?m.query:m.params;if(!f||Object.keys(f).length<=0)return m.path;let _="";for(let b in f)_+=f[b];return`${m.meta.isDynamic?m.meta.isDynamicPath:m.path}-${_}`},Fe=()=>{e.$refs.scrollbarRef.update()},Nt=m=>{e.$refs.scrollbarRef.$refs.wrap$.scrollLeft+=m.wheelDelta/4},cn=()=>{nt(()=>{if(t.value.length<=0)return!1;let m=t.value[u.tagsRefsIndex],f=u.tagsRefsIndex,_=t.value.length,b=t.value[0],M=t.value[t.value.length-1],de=e.$refs.scrollbarRef.$refs.wrap$,ht=de.scrollWidth,qe=de.offsetWidth,dn=de.scrollLeft,Ht=t.value[u.tagsRefsIndex-1],fn=t.value[u.tagsRefsIndex+1],mt="",pt="";m===b?de.scrollLeft=0:m===M?de.scrollLeft=ht-qe:(f===0?mt=b.offsetLeft-5:mt=(Ht==null?void 0:Ht.offsetLeft)-5,f===_?pt=M.offsetLeft+M.offsetWidth+5:pt=fn.offsetLeft+fn.offsetWidth+5,pt>dn+qe?de.scrollLeft=pt-qe:mt<dn&&(de.scrollLeft=mt)),Fe()})},Ke=m=>{nt(async()=>{let f=await u.tagsViewList;u.tagsRefsIndex=f.findIndex(_=>g.value.isShareTagsView?_.path===m:_.url===m),cn()})},Ze=async()=>{const m=document.querySelector(".layout-navbars-tagsview-ul");if(!m)return!1;u.sortable.el&&u.sortable.destroy(),u.sortable=S.create(m,{animation:300,dataIdAttr:"data-url",disabled:!g.value.isSortableTagsView,onEnd:()=>{const f=[];u.sortable.toArray().map(_=>{u.tagsViewList.map(b=>{b.url===_&&f.push(P({},b))})}),A(f)}})},Bt=async()=>{await Ze(),It.isMobile()&&u.sortable.el&&u.sortable.destroy()};return Dn(()=>{Bt(),window.addEventListener("resize",Bt),e.mittBus.on("onCurrentContextmenuClick",m=>{ge(m)}),e.mittBus.on("openOrCloseSortable",()=>{Ze()}),e.mittBus.on("openShareTagsView",()=>{g.value.isShareTagsView&&(v.push("/project"),u.tagsViewList=[],u.tagsViewRoutesList.map(m=>{m.meta.isAffix&&!m.meta.isHide&&(m.url=te(m),u.tagsViewList.push(P({},m)))}))})}),on(()=>{e.mittBus.off("onCurrentContextmenuClick",()=>{}),e.mittBus.off("openOrCloseSortable",()=>{}),e.mittBus.off("openShareTagsView",()=>{}),window.removeEventListener("resize",Bt)}),Gn(()=>{t.value=[]}),ze(()=>{W(),Ze()}),Ft(async m=>{u.routeActive=te(m),u.routePath=m.meta.isDynamic?m.meta.isDynamicPath:m.path,await G(m.path,m),Ke(g.value.isShareTagsView?u.routePath:u.routeActive)}),Lt(Jn.state,m=>{if(m.tagsViewRoutes.tagsViewRoutes.length===u.tagsViewRoutesList.length)return!1;W()},{deep:!0}),P({isActive:k,onContextmenu:Re,onTagsClick:we,tagsRefs:t,contextmenuRef:o,scrollbarRef:n,tagsUlRef:a,onHandleScroll:Nt,getThemeConfig:g,setTagsStyle:p,setTagsViewNameI18n:L,refreshCurrentTagsView:ue,closeCurrentTagsView:K,onCurrentContextmenuClick:ge},Se(u))}}),xa=["data-url","onContextmenu","onClick"],Aa={key:0,class:"iconfont icon-webicon318 layout-navbars-tagsview-ul-li-iconfont"};function Oa(e,t,n,o,a,s){const i=T("SvgIcon"),r=T("el-scrollbar"),c=T("Contextmenu");return y(),I("div",{class:ot(["layout-navbars-tagsview",{"layout-navbars-tagsview-shadow":e.getThemeConfig.layout==="classic"}])},[D(r,{ref:"scrollbarRef",onWheel:Be(e.onHandleScroll,["prevent"])},{default:O(()=>[x("ul",{class:ot(["layout-navbars-tagsview-ul",e.setTagsStyle]),ref:"tagsUlRef"},[(y(!0),I(me,null,Qe(e.tagsViewList,(l,h)=>(y(),I("li",{key:h,class:ot(["layout-navbars-tagsview-ul-li",{"is-active":e.isActive(l)}]),"data-url":l.url,onContextmenu:Be(d=>e.onContextmenu(l,d),["prevent"]),onClick:d=>e.onTagsClick(l,h),ref_for:!0,ref:d=>{d&&(e.tagsRefs[h]=d)}},[e.isActive(l)?(y(),I("i",Aa)):ee("",!0),!e.isActive(l)&&e.getThemeConfig.isTagsviewIcon?(y(),Y(i,{key:1,name:l.meta.icon,class:"pr5"},null,8,["name"])):ee("",!0),x("span",null,H(e.setTagsViewNameI18n(l)),1),e.isActive(l)?(y(),I(me,{key:2},[D(i,{name:"ele-RefreshRight",class:"ml5 layout-navbars-tagsview-ul-li-refresh",onClick:t[0]||(t[0]=Be(d=>e.refreshCurrentTagsView(e.$route.fullPath),["stop"]))}),l.meta.isAffix?ee("",!0):(y(),Y(i,{key:0,name:"ele-Close",class:"layout-navbars-tagsview-ul-li-icon layout-icon-active",onClick:Be(d=>e.closeCurrentTagsView(e.getThemeConfig.isShareTagsView?l.path:l.url),["stop"])},null,8,["onClick"]))],64)):ee("",!0),l.meta.isAffix?ee("",!0):(y(),Y(i,{key:3,name:"ele-Close",class:"layout-navbars-tagsview-ul-li-icon layout-icon-three",onClick:Be(d=>e.closeCurrentTagsView(e.getThemeConfig.isShareTagsView?l.path:l.url),["stop"])},null,8,["onClick"]))],42,xa))),128))],2)]),_:1},8,["onWheel"]),D(c,{dropdown:e.dropdown,ref:"contextmenuRef",onCurrentContextmenuClick:e.onCurrentContextmenuClick},null,8,["dropdown","onCurrentContextmenuClick"])],2)}var Ra=ie(ka,[["render",Oa],["__scopeId","data-v-13efbe9c"]]);const Fa=ae({name:"layoutNavBars",components:{BreadcrumbIndex:Jo,TagsView:Ra},setup(){const e=Ie(),{themeConfig:t}=Q(e);return{setShowTagsView:oe(()=>{let{layout:o,isTagsview:a}=t.value;return o!=="classic"&&a})}}}),Ma={class:"layout-navbars-container"};function Pa(e,t,n,o,a,s){const i=T("BreadcrumbIndex"),r=T("TagsView");return y(),I("div",Ma,[D(i),e.setShowTagsView?(y(),Y(r,{key:0})):ee("",!0)])}var Na=ie(Fa,[["render",Pa],["__scopeId","data-v-2b1a3776"]]);const Ba=ae({name:"layoutHeader",components:{NavBarsIndex:Na},setup(){const e=$t(),t=Ie(),{themeConfig:n}=Q(t),{isTagsViewCurrenFull:o}=Q(e);return{setHeaderHeight:oe(()=>{let{isTagsview:s,layout:i}=n.value;return s&&i!=="classic"?"84px":"80px"}),isTagsViewCurrenFull:o}}});function Ha(e,t,n,o,a,s){const i=T("NavBarsIndex"),r=T("el-header");return an((y(),Y(r,{class:"layout-header",height:e.setHeaderHeight},{default:O(()=>[D(i)]),_:1},8,["height"])),[[sn,!e.isTagsViewCurrenFull]])}var ai=ie(Ba,[["render",Ha]]);const za=ae({name:"layoutFooter",setup(){const e=Ce({isDelayFooter:!0});return Ft(()=>{setTimeout(()=>{e.isDelayFooter=!1,setTimeout(()=>{e.isDelayFooter=!0},800)},0)}),P({},Se(e))}}),qa=e=>(En("data-v-7f3657f7"),e=e(),Tn(),e),Xa={class:"layout-footer mt15"},Ya=qa(()=>x("div",{class:"layout-footer-warp"},[x("div",null,"vue-next-admin\uFF0CMade by lyt with \u2764\uFE0F"),x("div",{class:"mt5"},"\u6DF1\u5733\u5E02 xxx \u516C\u53F8\u7248\u6743\u6240\u6709")],-1)),Wa=[Ya];function ja(e,t,n,o,a,s){return an((y(),I("div",Xa,Wa,512)),[[sn,e.isDelayFooter]])}var Ga=ie(za,[["render",ja],["__scopeId","data-v-7f3657f7"]]);const Ua=ae({name:"layoutMain",components:{LayoutParentView:oo,Footer:Ga},setup(){const{proxy:e}=ct(),t=Ie(),{themeConfig:n}=Q(t),o=ut(),a=Ce({headerHeight:"",currentRouteMeta:{}}),s=oe(()=>{const{layout:c}=n.value;return c==="classic"||c==="transverse"}),i=()=>{const c=a.currentRouteMeta.isLink&&a.currentRouteMeta.isIframe;let{isTagsview:l}=n.value;return l?a.headerHeight=c?"86px":"115px":a.headerHeight="80px"},r=()=>{a.currentRouteMeta=o.meta};return ze(async()=>{await r(),i(),eo.done()}),Lt(()=>o.path,()=>{a.currentRouteMeta=o.meta;const c=a.currentRouteMeta.isLink&&a.currentRouteMeta.isIframe;a.headerHeight=c?"86px":"115px",e.$refs.layoutScrollbarRef.update()}),Lt(n,c=>{var h,d;a.currentRouteMeta=o.meta;const l=a.currentRouteMeta.isLink&&a.currentRouteMeta.isIframe;a.headerHeight=c.isTagsview?l?"86px":"115px":"51px",(d=(h=e.$refs)==null?void 0:h.layoutScrollbarRef)==null||d.update()},{deep:!0}),P({themeConfig:n,isClassicOrTransverse:s},Se(a))}});function Qa(e,t,n,o,a,s){const i=T("LayoutParentView"),r=T("Footer"),c=T("el-scrollbar"),l=T("el-main");return y(),Y(l,{class:"layout-main"},{default:O(()=>[D(c,{ref:"layoutScrollbarRef",class:ot({"layout-scrollbar":!e.isClassicOrTransverse&&!e.currentRouteMeta.isLink&&!e.currentRouteMeta.isIframe||!e.isClassicOrTransverse&&e.currentRouteMeta.isLink&&!e.currentRouteMeta.isIframe})},{default:O(()=>[D(i,{style:Dt({padding:!e.isClassicOrTransverse||e.currentRouteMeta.isLink&&e.currentRouteMeta.isIframe?"0":"15px",transition:"padding 0.3s ease-in-out"})},null,8,["style"]),e.themeConfig.isFooter?(y(),Y(r,{key:0})):ee("",!0)]),_:1},8,["class"])]),_:1})}var ii=ie(Ua,[["render",Qa]]);export{ai as H,lo as L,ii as M,ho as S,Ra as T};