directus-extension-module-permissions 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +2 -2
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useApi as e,useStores as t,defineModule as n}from"@directus/extensions-sdk";import*as o from"vue";import{ref as i,computed as r,defineComponent as a,resolveComponent as l,openBlock as s,createBlock as c,withCtx as d,createVNode as u,onMounted as f,resolveDirective as p,createElementVNode as m,normalizeClass as v,unref as h,createElementBlock as g,Fragment as b,renderList as y,createTextVNode as w,toDisplayString as _,createCommentVNode as x,withModifiers as S,withDirectives as k,isRef as E}from"vue";import{useI18n as C}from"vue-i18n";const A="module_permissions",O=[{id:"layout",name:"Layout Options",icon:"layers",context:"collection"},{id:"archive",name:"Archive",icon:"archive",context:"collection"},{id:"refresh",name:"Auto Refresh",icon:"sync",context:"collection"},{id:"export",name:"Import / Export",icon:"import_export",context:"collection"},{id:"revisions",name:"Revisions",icon:"change_history",context:"item"},{id:"comments",name:"Comments",icon:"chat_bubble_outline",context:"item"},{id:"shares",name:"Shares",icon:"share",context:"item"},{id:"flows",name:"Flows",icon:"bolt",context:"both"},{id:"activity",name:"Activity Log",icon:"pending_actions",context:"both"}],D={own_role_only:[],roles:[],hide_navigation:[]},I={version:1,rules:[],homes:[],collections:[],sidebar_panels:[],sidebar_modes:[],users:{...D,own_role_only:[],roles:[],hide_navigation:[]}};function R(e){if("string"!=typeof e)return null;let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//")?null:(t=t.split("#")[0]??t,t?(t.startsWith("/")||(t=`/${t}`),"/admin"===t?t="/":t.startsWith("/admin/")&&(t=t.slice(6)||"/"),t.includes("..")||t.length>512?null:(t=t.replace(/\/{2,}/g,"/"),t)):null):null}function T(e){return null!==R(e)}function P(e){return{id:String(e.id),visibility:"show"===e.visibility?"show":"hide",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[],block_routes:!1!==e.block_routes}}function M(e){if(!e||"object"!=typeof e)return{...I,rules:[],homes:[],collections:[],sidebar_panels:[],sidebar_modes:[],users:{...D,own_role_only:[],roles:[],hide_navigation:[]}};const t=e,n=Array.isArray(t.rules)?t.rules.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>P(e)):[],o=Array.isArray(t.homes)?t.homes.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),path:"string"==typeof e.path?e.path:"",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[],force:!0===e.force})).filter(e=>T(e.path)):[],i=Array.isArray(t.collections)?t.collections.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>P(e)):[],r=Array.isArray(t.sidebar_panels)?t.sidebar_panels.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),visibility:"show"===e.visibility?"show":"hide",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})):[],a=Array.isArray(t.sidebar_modes)?t.sidebar_modes.filter(e=>Boolean(e&&"object"==typeof e&&e.id&&e.mode)).map(e=>({id:String(e.id),mode:"hidden"===e.mode?"hidden":"collapsed",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})):[],l=function(e){if(!e||"object"!=typeof e)return{own_role_only:[],roles:[],hide_navigation:[]};const t=e;return{own_role_only:Array.isArray(t.own_role_only)?t.own_role_only.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})):[],roles:Array.isArray(t.roles)?t.roles.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>P(e)):[],hide_navigation:Array.isArray(t.hide_navigation)?t.hide_navigation.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),modules:Array.isArray(e.modules)?e.modules.map(String).filter(Boolean):[],roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})).filter(e=>e.modules.length>0):[]}}(t.users),s=Array.isArray(t.blocked_ids)?t.blocked_ids.map(String):void 0,c=Array.isArray(t.blocked_collection_ids)?t.blocked_collection_ids.map(String):void 0,d=null===t.home_path?null:"string"==typeof t.home_path?R(t.home_path):void 0,u="boolean"==typeof t.home_force?t.home_force:void 0,f=Array.isArray(t.sidebar_hidden_panels)?t.sidebar_hidden_panels.map(String):void 0,p="collapsed"===t.sidebar_mode||"hidden"===t.sidebar_mode||"default"===t.sidebar_mode?t.sidebar_mode:void 0,m="boolean"==typeof t.users_own_role_only?t.users_own_role_only:void 0,v=Array.isArray(t.users_allowed_role_ids)?t.users_allowed_role_ids.map(String):void 0,h=Array.isArray(t.users_hidden_role_ids)?t.users_hidden_role_ids.map(String):void 0,g=Array.isArray(t.users_blocked_role_ids)?t.users_blocked_role_ids.map(String):void 0,b=Array.isArray(t.navigation_hidden_modules)?t.navigation_hidden_modules.map(String):void 0;return{version:1,rules:n,homes:o,collections:i,sidebar_panels:r,sidebar_modes:a,users:l,...s?{blocked_ids:s}:{},...c?{blocked_collection_ids:c}:{},...void 0!==d?{home_path:d}:{},...void 0!==u?{home_force:u}:{},...f?{sidebar_hidden_panels:f}:{},...p?{sidebar_mode:p}:{},...void 0!==m?{users_own_role_only:m}:{},...v?{users_allowed_role_ids:v}:{},...h?{users_hidden_role_ids:h}:{},...g?{users_blocked_role_ids:g}:{},...b?{navigation_hidden_modules:b}:{}}}function V(e){return(e.roles?.length??0)>0||(e.policies?.length??0)>0}function U(e,t){if(!e||!V(e))return!1;const n=function(e,t){if(!V(e))return!1;const n=new Set(t.roleIds),o=new Set(t.policyIds);return!!(e.roles||[]).some(e=>n.has(e))||!!(e.policies||[]).some(e=>o.has(e))}(e,t);return!("hide"!==e.visibility||!n)||"show"===e.visibility&&!n}function j(e,t){const n=R(e);if(!n||"/"===n)return!1;const o=t instanceof Set?t:new Set(t),i=N(n);return!!i&&o.has(i)}function N(e){const t=R(e);if(!t||"/"===t)return null;return t.split("/").filter(Boolean)[0]||null}function L(e){const t=R(e);if(!t)return null;const n=t.split("/").filter(Boolean);return"content"!==n[0]?null:n[1]&&"+"!==n[1]?n[1]:null}function $(e){return e.map(e=>{if("link"===e.type){const{type:t,id:n,name:o,url:i,icon:r,enabled:a,locked:l}=e;return{type:t,id:n,name:o,url:i,icon:r,enabled:a,locked:l}}const{type:t,id:n,enabled:o,locked:i}=e;return{type:t,id:n,enabled:o,locked:i}})}function F(e){const t=M(e);return{version:1,rules:t.rules,homes:t.homes.map(e=>({id:e.id,path:R(e.path)||e.path,roles:e.roles,policies:e.policies,force:!0===e.force})),collections:t.collections,sidebar_panels:t.sidebar_panels,sidebar_modes:t.sidebar_modes,users:{own_role_only:t.users.own_role_only,roles:t.users.roles,hide_navigation:t.users.hide_navigation}}}function H(e){if(!e||"object"!=typeof e)return!1;const t=e;if(!0===t.admin_access)return!0;const n=t.role;return!(!n||"object"!=typeof n||!0!==n.admin_access)}const B={content:{name:"Content",icon:"box"},visual:{name:"Visual Editor",icon:"design_services"},users:{name:"User Directory",icon:"people_alt"},files:{name:"File Library",icon:"folder"},insights:{name:"Insights",icon:"insights"},settings:{name:"Settings",icon:"settings"},docs:{name:"Documentation",icon:"help"},deployments:{name:"Deployments",icon:"rocket_launch"},activity:{name:"Activity",icon:"history"}};function q(e,t){const n=B[e];return{name:t?.name||n?.name||e,icon:t?.icon||n?.icon||"box"}}function z(e){return JSON.parse(JSON.stringify(e))}function X(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Y(e,t){if("string"!=typeof e)return String(e??"");if(!e.startsWith("$t:"))return e;const n=e.slice(3).trim();if(!n)return e;try{const e=t(n);if(e&&e!==n)return e}catch{}return n}const W=i(!0),G=i(!1),K=i(!1),J=i([]),Q=i(z(I)),Z=i([]),ee=i(z(I)),te=i([]),ne=i([]),oe=i(null),ie=i(null),re=i(null),ae=i(null),le=i(null),se=i(null),ce=i([]),de=i(null),ue=i(null),fe=i(null),pe=i(null),me=i(null),ve=i(null),he=i(null),ge=i(null),be=i(null),ye=i(null),we=i(null),_e=i(null);let xe=null;function Se(e){const t=Q.value.users||D;return{version:1,rules:e.rules??Q.value.rules??[],homes:e.homes??Q.value.homes??[],collections:e.collections??Q.value.collections??[],sidebar_panels:e.sidebar_panels??Q.value.sidebar_panels??[],sidebar_modes:e.sidebar_modes??Q.value.sidebar_modes??[],users:e.users?{own_role_only:e.users.own_role_only??t.own_role_only??[],roles:e.users.roles??t.roles??[],hide_navigation:e.users.hide_navigation??t.hide_navigation??[]}:{own_role_only:t.own_role_only??[],roles:t.roles??[],hide_navigation:t.hide_navigation??[]}}}function ke(){const n=e(),{t:o}=C(),{useSettingsStore:i,useUserStore:a}=t(),l=i(),s=a(),c=r({get:()=>Q.value.homes||[],set(e){Q.value=Se({homes:e})}}),d=r({get:()=>J.value.map(e=>{if("link"===e.type)return{...e,to:e.url,name:e.name,icon:e.icon||"link"};const t=q(e.id);return{...e,to:`/${e.id}`,name:t.name,icon:t.icon}}),set(e){J.value=$(e)}}),u=r(()=>!X($(J.value),$(Z.value))||!X(F(Q.value),F(ee.value))),f=r(()=>{const e=ie.value;return!e||(!e.name?.trim()||!e.icon?.trim()||!e.url?.trim())}),p=r(()=>{const e=se.value;return!e||!T(e.path)});function m(){oe.value=null,ie.value=null}function v(){le.value=null,se.value=null}function h(){re.value=null,ae.value=null}const g=r(()=>(Q.value.collections||[]).map(e=>function(e){const t=ce.value.find(t=>t.collection===e);return{collection:e,name:t?.name||e,icon:t?.icon||"box"}}(e.id))),b=r(()=>{const e=new Set((Q.value.collections||[]).map(e=>e.id)),t="+"===de.value?null:de.value;return ce.value.filter(n=>!e.has(n.collection)||n.collection===t).map(e=>({text:e.name===e.collection?e.collection:`${e.name} (${e.collection})`,value:e.collection}))}),y=r(()=>{const e=ue.value;return!e||(!e.id?.trim()||0===(e.roles?.length??0)&&0===(e.policies?.length??0))});function w(){de.value=null,ue.value=null}const _=O,x=r({get:()=>Q.value.sidebar_modes||[],set(e){Q.value=Se({sidebar_modes:e})}});function S(){fe.value=null,pe.value=null}function k(){me.value=null,ve.value=null}const E=r({get:()=>Q.value.users?.own_role_only||[],set(e){Q.value=Se({users:{...Q.value.users||D,own_role_only:e}})}});function P(){he.value=null,ge.value=null}const V=r(()=>(Q.value.users?.roles||[]).map(e=>{const t=te.value.find(t=>t.value===e.id);return{id:e.id,name:t?.text||e.id}})),U=r(()=>{const e=new Set((Q.value.users?.roles||[]).map(e=>e.id)),t="+"===be.value?null:be.value;return te.value.filter(n=>!e.has(n.value)||n.value===t)}),j=r(()=>{const e=ye.value;return!e||(!e.id?.trim()||0===(e.roles?.length??0)&&0===(e.policies?.length??0))});function N(){be.value=null,ye.value=null}const L=r({get:()=>Q.value.users?.hide_navigation||[],set(e){Q.value=Se({users:{...Q.value.users||D,hide_navigation:e}})}}),B=r(()=>{const e=J.value.filter(e=>"module"===e.type).map(e=>({text:q(e.id).name||e.id,value:e.id})),t=new Set(e.map(e=>e.value));for(const n of["content","users","files","insights","settings","module-permissions"]){if(t.has(n))continue;const o=q(n);e.push({text:o.name||n,value:n})}return e.sort((e,t)=>e.text.localeCompare(t.text))}),ke=r(()=>{const e=_e.value;return!e||0===(e.modules?.length??0)});function Ee(){we.value=null,_e.value=null}async function Ce(){W.value=!0;try{await(l.hydrate?.())}catch{}try{const e=await n.get("/settings",{params:{fields:["module_bar",A]}}),t=e.data?.data,i=Array.isArray(t)?t[0]:t,r=function(e){const t=new Set(e.filter(e=>"module"===e.type).map(e=>e.id)),n=[];t.has("module-permissions")||n.push({type:"module",id:"module-permissions",enabled:!0});for(const e of["content","users","files","insights","settings"])t.has(e)||n.push({type:"module",id:e,enabled:!1,locked:"settings"===e||void 0});return[...e,...n]}(Array.isArray(i?.module_bar)?z(i.module_bar):[]),a=M(i?.[A]);J.value=r,Q.value=a,Z.value=z(r),ee.value=z(a),await async function(){const e=await n.get("/roles",{params:{limit:-1,fields:["id","name"],sort:"name"}});te.value=(e.data?.data||[]).map(e=>({text:Y(e.name,o),value:e.id}));try{const e=await n.get("/policies",{params:{limit:-1,fields:["id","name"],sort:"name"}});ne.value=(e.data?.data||[]).map(e=>({text:Y(e.name,o),value:e.id}))}catch{ne.value=[]}}(),await async function(){try{const e=await n.get("/collections",{params:{limit:-1}}),t=e.data?.data||[];ce.value=t.filter(e=>{const t=e?.collection;return!(!t||"string"!=typeof t)&&!t.startsWith("directus_")&&(null!==e?.meta?.accountability||null!==e?.schema)&&(null!==e?.schema||!0===e?.meta?.singleton||e?.meta)}).map(e=>({collection:e.collection,name:e.meta?.translations?.[0]?.translation||e.meta?.collection||e.collection,icon:e.meta?.icon||(null===e.schema?"folder":"box")})).sort((e,t)=>e.name.localeCompare(t.name))}catch{ce.value=[]}}()}finally{W.value=!1}}return{loading:W,saving:G,cleaning:K,hasEdits:u,previewItems:d,homeItems:c,roleOptions:te,policyOptions:ne,linkEditing:oe,linkValues:ie,linkSaveDisabled:f,ruleEditingId:re,ruleDraft:ae,homeEditing:le,homeDraft:se,homeSaveDisabled:p,collectionCatalog:ce,configuredCollections:g,availableCollectionOptions:b,collectionEditingId:de,collectionDraft:ue,collectionSaveDisabled:y,sidebarPanelCatalog:_,sidebarPanelEditingId:fe,sidebarPanelDraft:pe,sidebarModeItems:x,sidebarModeEditing:me,sidebarModeDraft:ve,usersOwnRoleItems:E,usersOwnRoleEditing:he,usersOwnRoleDraft:ge,configuredUsersRoles:V,availableUsersRoleOptions:U,usersRoleEditingId:be,usersRoleDraft:ye,usersRoleSaveDisabled:j,hideNavItems:L,hideNavEditing:we,hideNavDraft:_e,hideNavSaveDisabled:ke,moduleSelectOptions:B,hasRule:function(e){const t=Q.value.rules.find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},ruleSummary:function(e){const t=Q.value.rules.find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},homeSummary:function(e){const t=e.roles?.length??0,n=e.policies?.length??0,o=e.force?"Force · ":"";return 0===t&&0===n?`${o}Catch-all default`:`${o}${t} role(s) · ${n} polic(ies)`},hasCollectionRule:function(e){const t=(Q.value.collections||[]).find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},collectionRuleSummary:function(e){const t=(Q.value.collections||[]).find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},hasSidebarPanelRule:function(e){const t=(Q.value.sidebar_panels||[]).find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},sidebarPanelRuleSummary:function(e){const t=(Q.value.sidebar_panels||[]).find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},sidebarModeSummary:function(e){const t=e.roles?.length??0,n=e.policies?.length??0,o="hidden"===e.mode?"Force hidden":"Force collapsed";return 0===t&&0===n?`${o} · Catch-all`:`${o} · ${t} role(s) · ${n} polic(ies)`},usersOwnRoleSummary:function(e){const t=e.roles?.length??0,n=e.policies?.length??0;return 0===t&&0===n?"Catch-all":`${t} role(s) · ${n} polic(ies)`},hasUsersRoleRule:function(e){const t=(Q.value.users?.roles||[]).find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},usersRoleRuleSummary:function(e){const t=(Q.value.users?.roles||[]).find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},hideNavSummary:function(e){const t=(e.modules||[]).join(", ")||"—",n=e.roles?.length??0,o=e.policies?.length??0;return`${t} · ${0===n&&0===o?"Catch-all":`${n} role(s) · ${o} polic(ies)`}`},toggleEnabled:function(e,t){J.value=J.value.map(n=>n.id===e.id?{...n,enabled:Boolean(t)}:n)},editLink:function(e){if(oe.value=e,"+"===e)return void(ie.value={id:crypto.randomUUID(),type:"link",enabled:!0,url:"",name:"",icon:"link"});const t=J.value.find(t=>t.id===e&&"link"===t.type);ie.value=t?z(t):null},closeLinkEditor:m,onLinkDrawerToggle:function(e){e||m()},saveLink:function(){ie.value&&!f.value&&oe.value&&("+"===oe.value?J.value=[...J.value,{...ie.value}]:J.value=J.value.map(e=>e.id===oe.value?{...ie.value}:e),m())},removeLink:function(e){J.value=J.value.filter(t=>t.id!==e),Q.value=Se({rules:Q.value.rules.filter(t=>t.id!==e)})},editHome:function(e){if(le.value=e,"+"===e)return void(se.value={id:crypto.randomUUID(),path:"/content",roles:[],policies:[],force:!1});const t=(Q.value.homes||[]).find(t=>t.id===e);se.value=t?z(t):null},closeHomeEditor:v,onHomeDrawerToggle:function(e){e||v()},saveHome:function(){if(!se.value||p.value||!le.value)return;const e=R(se.value.path);if(!e)return;const t={id:"+"===le.value?se.value.id:le.value,path:e,roles:[...se.value.roles||[]],policies:[...se.value.policies||[]],force:!0===se.value.force},n=[...Q.value.homes||[]];if("+"===le.value)n.push(t);else{const e=n.findIndex(e=>e.id===le.value);-1===e?n.push(t):n[e]=t}Q.value=Se({homes:n}),v()},removeHome:function(e){Q.value=Se({homes:(Q.value.homes||[]).filter(t=>t.id!==e)})},openRuleEditor:function(e){re.value=e.id;const t=Q.value.rules.find(t=>t.id===e.id);ae.value=t?z(t):{id:e.id,visibility:"hide",roles:[],policies:[],block_routes:!0}},closeRuleEditor:h,onRuleDrawerToggle:function(e){e||h()},saveRule:function(){if(!ae.value||!re.value)return;const e={...ae.value,id:re.value,roles:[...ae.value.roles||[]],policies:[...ae.value.policies||[]],block_routes:!1!==ae.value.block_routes},t=Q.value.rules.filter(e=>e.id!==re.value);0===e.roles.length&&0===e.policies.length?Q.value=Se({rules:t}):Q.value=Se({rules:[...t,e]}),h()},clearRule:function(){re.value&&(Q.value=Se({rules:Q.value.rules.filter(e=>e.id!==re.value)}),h())},openCollectionEditor:function(e){if(de.value=e,"+"===e)return void(ue.value={id:"",visibility:"hide",roles:[],policies:[],block_routes:!0});const t=(Q.value.collections||[]).find(t=>t.id===e);ue.value=t?z(t):{id:e,visibility:"hide",roles:[],policies:[],block_routes:!0}},closeCollectionEditor:w,onCollectionDrawerToggle:function(e){e||w()},saveCollectionRule:function(){if(!ue.value||!de.value||y.value)return;const e=String(ue.value.id).trim();if(!e)return;const t={...ue.value,id:e,roles:[...ue.value.roles||[]],policies:[...ue.value.policies||[]],block_routes:!1!==ue.value.block_routes},n="+"===de.value?e:de.value,o=(Q.value.collections||[]).filter(t=>t.id!==n&&t.id!==e);Q.value=Se({collections:[...o,t]}),w()},clearCollectionRule:function(){de.value&&"+"!==de.value&&(Q.value=Se({collections:(Q.value.collections||[]).filter(e=>e.id!==de.value)}),w())},removeCollectionRule:function(e){Q.value=Se({collections:(Q.value.collections||[]).filter(t=>t.id!==e)})},openSidebarPanelEditor:function(e){fe.value=e;const t=(Q.value.sidebar_panels||[]).find(t=>t.id===e);pe.value=t?z(t):{id:e,visibility:"hide",roles:[],policies:[]}},closeSidebarPanelEditor:S,onSidebarPanelDrawerToggle:function(e){e||S()},saveSidebarPanelRule:function(){if(!pe.value||!fe.value)return;const e={...pe.value,id:fe.value,roles:[...pe.value.roles||[]],policies:[...pe.value.policies||[]]},t=(Q.value.sidebar_panels||[]).filter(e=>e.id!==fe.value);0===e.roles.length&&0===e.policies.length?Q.value=Se({sidebar_panels:t}):Q.value=Se({sidebar_panels:[...t,e]}),S()},clearSidebarPanelRule:function(){fe.value&&(Q.value=Se({sidebar_panels:(Q.value.sidebar_panels||[]).filter(e=>e.id!==fe.value)}),S())},editSidebarMode:function(e){if(me.value=e,"+"===e)return void(ve.value={id:crypto.randomUUID(),mode:"collapsed",roles:[],policies:[]});const t=(Q.value.sidebar_modes||[]).find(t=>t.id===e);ve.value=t?z(t):null},closeSidebarModeEditor:k,onSidebarModeDrawerToggle:function(e){e||k()},saveSidebarMode:function(){if(!ve.value||!me.value)return;const e={id:"+"===me.value?ve.value.id:me.value,mode:"hidden"===ve.value.mode?"hidden":"collapsed",roles:[...ve.value.roles||[]],policies:[...ve.value.policies||[]]},t=[...Q.value.sidebar_modes||[]];if("+"===me.value)t.push(e);else{const n=t.findIndex(e=>e.id===me.value);-1===n?t.push(e):t[n]=e}Q.value=Se({sidebar_modes:t}),k()},removeSidebarMode:function(e){Q.value=Se({sidebar_modes:(Q.value.sidebar_modes||[]).filter(t=>t.id!==e)})},editUsersOwnRole:function(e){if(he.value=e,"+"===e)return void(ge.value={id:crypto.randomUUID(),roles:[],policies:[]});const t=(Q.value.users?.own_role_only||[]).find(t=>t.id===e);ge.value=t?z(t):null},closeUsersOwnRoleEditor:P,onUsersOwnRoleDrawerToggle:function(e){e||P()},saveUsersOwnRole:function(){if(!ge.value||!he.value)return;const e={id:"+"===he.value?ge.value.id:he.value,roles:[...ge.value.roles||[]],policies:[...ge.value.policies||[]]},t=[...Q.value.users?.own_role_only||[]];if("+"===he.value)t.push(e);else{const n=t.findIndex(e=>e.id===he.value);-1===n?t.push(e):t[n]=e}Q.value=Se({users:{...Q.value.users||D,own_role_only:t}}),P()},removeUsersOwnRole:function(e){Q.value=Se({users:{...Q.value.users||D,own_role_only:(Q.value.users?.own_role_only||[]).filter(t=>t.id!==e)}})},openUsersRoleEditor:function(e){if(be.value=e,"+"===e)return void(ye.value={id:"",visibility:"hide",roles:[],policies:[],block_routes:!0});const t=(Q.value.users?.roles||[]).find(t=>t.id===e);ye.value=t?z(t):{id:e,visibility:"hide",roles:[],policies:[],block_routes:!0}},closeUsersRoleEditor:N,onUsersRoleDrawerToggle:function(e){e||N()},saveUsersRoleRule:function(){if(!ye.value||!be.value||j.value)return;const e=String(ye.value.id).trim();if(!e)return;const t={...ye.value,id:e,roles:[...ye.value.roles||[]],policies:[...ye.value.policies||[]],block_routes:!1!==ye.value.block_routes},n="+"===be.value?e:be.value,o=(Q.value.users?.roles||[]).filter(t=>t.id!==n&&t.id!==e);Q.value=Se({users:{...Q.value.users||D,roles:[...o,t]}}),N()},clearUsersRoleRule:function(){be.value&&"+"!==be.value&&(Q.value=Se({users:{...Q.value.users||D,roles:(Q.value.users?.roles||[]).filter(e=>e.id!==be.value)}}),N())},removeUsersRoleRule:function(e){Q.value=Se({users:{...Q.value.users||D,roles:(Q.value.users?.roles||[]).filter(t=>t.id!==e)}})},editHideNav:function(e){if(we.value=e,"+"===e)return void(_e.value={id:crypto.randomUUID(),modules:["users"],roles:[],policies:[]});const t=(Q.value.users?.hide_navigation||[]).find(t=>t.id===e);_e.value=t?z(t):null},closeHideNavEditor:Ee,onHideNavDrawerToggle:function(e){e||Ee()},saveHideNav:function(){if(!_e.value||!we.value||ke.value)return;const e={id:"+"===we.value?_e.value.id:we.value,modules:[..._e.value.modules||[]].map(String).filter(Boolean),roles:[..._e.value.roles||[]],policies:[..._e.value.policies||[]]},t=[...Q.value.users?.hide_navigation||[]];if("+"===we.value)t.push(e);else{const n=t.findIndex(e=>e.id===we.value);-1===n?t.push(e):t[n]=e}Q.value=Se({users:{...Q.value.users||D,hide_navigation:t}}),Ee()},removeHideNav:function(e){Q.value=Se({users:{...Q.value.users||D,hide_navigation:(Q.value.users?.hide_navigation||[]).filter(t=>t.id!==e)}})},ensureLoaded:function(){return xe||(xe=Ce().finally(()=>{})),xe},save:async function(){if(u.value&&H(s.currentUser)){G.value=!0;try{const e={module_bar:$(J.value),[A]:F(Q.value)};await n.patch("/settings",e);try{await(l.hydrate?.())}catch{}Z.value=z(J.value),ee.value=z(Q.value)}finally{G.value=!1}}},cleanupExtensionData:async function(){if(!H(s.currentUser))throw new Error("Admin access required");K.value=!0;let e=!1,t=!1;try{try{await n.patch("/settings",{[A]:null}),e=!0}catch(e){const t=e?.response?.status,n=String(e?.response?.data?.errors?.[0]?.message||e?.message||"");if(400!==t&&403!==t&&!/unknown|does not exist|forbidden/i.test(n))throw e}try{await n.delete(`/fields/directus_settings/${A}`),t=!0}catch(e){const n=e?.response?.status;if(404!==n)throw e;t=!0}Q.value=z(I),ee.value=z(I),oe.value=null,ie.value=null,re.value=null,ae.value=null,le.value=null,se.value=null,de.value=null,ue.value=null,fe.value=null,pe.value=null,me.value=null,ve.value=null,he.value=null,ge.value=null,be.value=null,ye.value=null,we.value=null,_e.value=null,xe=null;try{await(l.hydrate?.())}catch{}return{clearedValue:e,deletedField:t}}finally{K.value=!1}},exportPermissionsConfig:function(){const e={...F(Q.value),exported_at:(new Date).toISOString(),extension:"directus-extension-module-permissions"},t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(t),o=document.createElement("a"),i=(new Date).toISOString().slice(0,19).replace(/[:T]/g,"-");o.href=n,o.download=`module-permissions-${i}.json`,o.click(),URL.revokeObjectURL(n)},importPermissionsConfig:async function(e){if(!H(s.currentUser))throw new Error("Admin access required");if(!e||"object"!=typeof e)throw new Error("Invalid JSON: expected an object");const t=e,o=F(t.module_permissions&&"object"==typeof t.module_permissions?t.module_permissions:t);if(!(Array.isArray(o.rules)&&Array.isArray(o.homes)&&Array.isArray(o.collections)&&Array.isArray(o.sidebar_panels)&&Array.isArray(o.sidebar_modes)&&o.users&&Array.isArray(o.users.own_role_only)&&Array.isArray(o.users.roles)&&Array.isArray(o.users.hide_navigation)))throw new Error("Invalid config: missing rules/homes/collections/sidebar/users arrays");Q.value=o,await n.patch("/settings",{[A]:o}),ee.value=z(o);try{await(l.hydrate?.())}catch{}xe=null},MODULE_PERMISSIONS_FIELD:A}}function Ee(e){const t=function(e){if("string"!=typeof e||!e)return null;const t=Number.parseInt(e.split(".")[0]||"",10);return Number.isFinite(t)?t:null}(e);return null!=t?t>=12:"undefined"!=typeof document&&Boolean(document.querySelector("#navigation.module-bar")||document.querySelector("aside.module-nav:not(#navigation)"))}function Ce(){const{useServerStore:e}=t(),n=e();return r(()=>{const e=["page"];return Ee(n?.info?.version)&&e.push("page--padded-top"),e})}var Ae=a({__name:"navigation",setup:e=>(e,t)=>{const n=l("v-icon"),o=l("v-list-item-icon"),i=l("v-text-overflow"),r=l("v-list-item-content"),a=l("v-list-item"),f=l("v-divider"),p=l("v-list");return s(),c(p,{nav:""},{default:d(()=>[u(a,{to:"/module-permissions/modules"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"view_sidebar",class:"icon-flip-x"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Modules"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/sidebar"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"view_sidebar"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Sidebar"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/content"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"box"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Content"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/users"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"people_alt"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Users"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/start-page"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"home"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Start Page"})]),_:1})]),_:1}),u(f),u(a,{to:"/module-permissions/settings"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"settings"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Settings"})]),_:1})]),_:1})]),_:1})}}),Oe=[],De=[];function Ie(e,t){if(e&&"undefined"!=typeof document){var n,o=!0===t.prepend?"prepend":"append",i=!0===t.singleTag,r="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var a=Oe.indexOf(r);-1===a&&(a=Oe.push(r)-1,De[a]={}),n=De[a]&&De[a][o]?De[a][o]:De[a][o]=l()}else n=l();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function l(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),i=0;i<n.length;i++)e.setAttribute(n[i],t.attributes[n[i]]);var a="prepend"===o?"afterbegin":"beforeend";return r.insertAdjacentElement(a,e),e}}Ie("\n.icon-flip-x[data-v-67936547] {\n\ttransform: scaleX(-1);\n}\n",{});var Re=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n},Te=Re(Ae,[["__scopeId","data-v-67936547"]]);const Pe={key:0,class:"loading"},Me={key:0,class:"empty"},Ve={key:1,class:"list"},Ue={class:"info"},je={class:"name"},Ne={class:"to"},Le={key:0,class:"drawer-content"},$e={class:"field"},Fe={class:"field"},He={class:"field"},Be={class:"field"},qe={class:"field checkbox-field"};var ze=a({__name:"collections-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,configuredCollections:r,availableCollectionOptions:a,roleOptions:E,policyOptions:C,collectionEditingId:A,collectionDraft:O,collectionSaveDisabled:D,hasCollectionRule:I,collectionRuleSummary:R,openCollectionEditor:T,closeCollectionEditor:P,onCollectionDrawerToggle:M,saveCollectionRule:V,clearCollectionRule:U,removeCollectionRule:j,ensureLoaded:N,save:L}=ke();return f(()=>{N()}),(e,f)=>{const N=l("v-breadcrumb"),$=l("v-icon"),F=l("v-button"),H=l("sidebar-detail"),B=l("v-progress-circular"),q=l("v-chip"),z=l("v-list-item"),X=l("v-select"),Y=l("v-checkbox"),W=l("v-drawer"),G=l("private-view"),K=p("tooltip");return s(),c(G,{title:"Content",icon:"box"},{headline:d(()=>[u(N,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(F,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(L)},{default:d(()=>[u($,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[K,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(H,{icon:"info",title:"About",close:""},{default:d(()=>[...f[7]||(f[7]=[m("p",{class:"sidebar-text"},[w(" Hide specific collections from the Content module navigation while keeping read permissions for relations and API access. Optional deep-link blocking covers "),m("code",null,"/content/<collection>"),w(". Admins are never affected. This is UI visibility only — not a security boundary. ")],-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",Pe,[u(B,{indeterminate:""})])):(s(),g(b,{key:1},[f[9]||(f[9]=m("p",{class:"page-intro"}," Add only the collections that need visibility rules. Unlisted collections keep normal Content behavior. Assign roles or policies to hide or show a collection in the nav, and optionally block deep links. ",-1)),0===h(r).length?(s(),g("div",Me,"No collection rules yet.")):(s(),g("div",Ve,[(s(!0),g(b,null,y(h(r),e=>(s(),c(z,{key:e.collection,block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(T)(e.collection)},{default:d(()=>[u($,{class:"icon",name:e.icon},null,8,["name"]),m("div",Ue,[m("div",je,[w(_(e.name)+" ",1),h(I)(e.collection)?(s(),c(q,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(R)(e.collection)),1)]),_:2},1024)):x("v-if",!0)]),m("div",Ne,"/content/"+_(e.collection),1)]),m("div",{class:"row-actions",onClick:f[0]||(f[0]=S(()=>{},["stop"]))},[k((s(),c(F,{icon:"","x-small":"",secondary:"",onClick:t=>h(T)(e.collection)},{default:d(()=>[u($,{name:"policy"})]),_:1},8,["onClick"])),[[K,"Visibility rules"]]),k((s(),c(F,{icon:"","x-small":"",secondary:"",onClick:t=>h(j)(e.collection)},{default:d(()=>[u($,{name:"close"})]),_:1},8,["onClick"])),[[K,"Remove"]])])]),_:2},1032,["onClick"]))),128))])),u(F,{class:"add-link",onClick:f[1]||(f[1]=e=>h(T)("+"))},{default:d(()=>[...f[8]||(f[8]=[w("Add Collection",-1)])]),_:1})],64))],2),u(W,{"model-value":null!==h(A),title:"+"===h(A)?"Add Collection":"Collection Visibility",icon:"policy","onUpdate:modelValue":h(M),onCancel:h(P)},{actions:d(()=>[k((s(),c(F,{disabled:h(D),icon:"",rounded:"",onClick:h(V)},{default:d(()=>[u($,{name:"check"})]),_:1},8,["disabled","onClick"])),[[K,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(O)?(s(),g("div",Le,[f[15]||(f[15]=m("p",{class:"hint"}," Pick a collection and at least one role or policy. Read permissions are never changed here. ",-1)),m("div",$e,[f[10]||(f[10]=m("label",null,"Collection",-1)),u(X,{modelValue:h(O).id,"onUpdate:modelValue":f[2]||(f[2]=e=>h(O).id=e),items:h(a),"item-text":"text","item-value":"value",disabled:"+"!==h(A),placeholder:"Select collection"},null,8,["modelValue","items","disabled"])]),m("div",Fe,[f[11]||(f[11]=m("label",null,"Visibility",-1)),u(X,{modelValue:h(O).visibility,"onUpdate:modelValue":f[3]||(f[3]=e=>h(O).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",He,[f[12]||(f[12]=m("label",null,"Roles",-1)),u(X,{modelValue:h(O).roles,"onUpdate:modelValue":f[4]||(f[4]=e=>h(O).roles=e),multiple:"",items:h(E),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",Be,[f[13]||(f[13]=m("label",null,"Policies",-1)),u(X,{modelValue:h(O).policies,"onUpdate:modelValue":f[5]||(f[5]=e=>h(O).policies=e),multiple:"",items:h(C),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),m("div",qe,[u(Y,{modelValue:h(O).block_routes,"onUpdate:modelValue":f[6]||(f[6]=e=>h(O).block_routes=e),label:"Block deep links to /content/<collection> when this rule hides it"},null,8,["modelValue"])]),h(A)&&"+"!==h(A)&&h(I)(h(A))?(s(),c(F,{key:0,secondary:"",onClick:h(U)},{default:d(()=>[...f[14]||(f[14]=[w(" Remove rule ",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","title","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-fd096c41] {\n\tpadding-inline: var(--content-padding);\n\tpadding-block-start: 0;\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--padded-top[data-v-fd096c41] {\n\tpadding-block-start: var(--content-padding);\n}\n.loading[data-v-fd096c41] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-fd096c41] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.list[data-v-fd096c41] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-fd096c41] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.icon[data-v-fd096c41] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-fd096c41] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-fd096c41] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-weight: 600;\n}\n.to[data-v-fd096c41] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-fd096c41] {\n\tmargin-inline-start: 4px;\n}\n.row-actions[data-v-fd096c41] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-fd096c41] {\n\tmargin-top: 4px;\n}\n.empty[data-v-fd096c41] {\n\tmargin-bottom: 12px;\n\tcolor: var(--theme--foreground);\n}\n.drawer-content[data-v-fd096c41] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-fd096c41] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.hint[data-v-fd096c41],\n.sidebar-text[data-v-fd096c41] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.sidebar-text code[data-v-fd096c41],\n.hint code[data-v-fd096c41] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.checkbox-field[data-v-fd096c41] {\n\tpadding-top: 4px;\n}\n",{});var Xe=Re(ze,[["__scopeId","data-v-fd096c41"]]);function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function We(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n}var Ge={exports:{}},Ke=We(o);
|
|
1
|
+
import{useApi as e,useStores as t,defineModule as n}from"@directus/extensions-sdk";import*as o from"vue";import{ref as i,computed as r,defineComponent as a,resolveComponent as l,openBlock as s,createBlock as c,withCtx as d,createVNode as u,onMounted as f,resolveDirective as p,createElementVNode as m,normalizeClass as v,unref as h,createElementBlock as g,Fragment as b,renderList as y,createTextVNode as w,toDisplayString as _,createCommentVNode as x,withModifiers as S,withDirectives as k,isRef as E}from"vue";import{useI18n as C}from"vue-i18n";const A="module_permissions",O=[{id:"layout",name:"Layout Options",icon:"layers",context:"collection"},{id:"archive",name:"Archive",icon:"archive",context:"collection"},{id:"refresh",name:"Auto Refresh",icon:"sync",context:"collection"},{id:"export",name:"Import / Export",icon:"import_export",context:"collection"},{id:"import",name:"Import",icon:"publish",context:"insights"},{id:"revisions",name:"Revisions",icon:"change_history",context:"item"},{id:"comments",name:"Comments",icon:"chat_bubble_outline",context:"item"},{id:"shares",name:"Shares",icon:"share",context:"item"},{id:"flows",name:"Flows",icon:"bolt",context:"both"},{id:"activity",name:"Activity Log",icon:"pending_actions",context:"both"}],D={own_role_only:[],roles:[],hide_navigation:[]},I={version:1,rules:[],homes:[],collections:[],sidebar_panels:[],sidebar_modes:[],users:{...D,own_role_only:[],roles:[],hide_navigation:[]}};function R(e){if("string"!=typeof e)return null;let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//")?null:(t=t.split("#")[0]??t,t?(t.startsWith("/")||(t=`/${t}`),"/admin"===t?t="/":t.startsWith("/admin/")&&(t=t.slice(6)||"/"),t.includes("..")||t.length>512?null:(t=t.replace(/\/{2,}/g,"/"),t)):null):null}function T(e){return null!==R(e)}function P(e){return{id:String(e.id),visibility:"show"===e.visibility?"show":"hide",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[],block_routes:!1!==e.block_routes}}function M(e){if(!e||"object"!=typeof e)return{...I,rules:[],homes:[],collections:[],sidebar_panels:[],sidebar_modes:[],users:{...D,own_role_only:[],roles:[],hide_navigation:[]}};const t=e,n=Array.isArray(t.rules)?t.rules.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>P(e)):[],o=Array.isArray(t.homes)?t.homes.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),path:"string"==typeof e.path?e.path:"",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[],force:!0===e.force})).filter(e=>T(e.path)):[],i=Array.isArray(t.collections)?t.collections.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>P(e)):[],r=Array.isArray(t.sidebar_panels)?t.sidebar_panels.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),visibility:"show"===e.visibility?"show":"hide",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})):[],a=Array.isArray(t.sidebar_modes)?t.sidebar_modes.filter(e=>Boolean(e&&"object"==typeof e&&e.id&&e.mode)).map(e=>({id:String(e.id),mode:"hidden"===e.mode?"hidden":"collapsed",roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})):[],l=function(e){if(!e||"object"!=typeof e)return{own_role_only:[],roles:[],hide_navigation:[]};const t=e;return{own_role_only:Array.isArray(t.own_role_only)?t.own_role_only.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})):[],roles:Array.isArray(t.roles)?t.roles.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>P(e)):[],hide_navigation:Array.isArray(t.hide_navigation)?t.hide_navigation.filter(e=>Boolean(e&&"object"==typeof e&&e.id)).map(e=>({id:String(e.id),modules:Array.isArray(e.modules)?e.modules.map(String).filter(Boolean):[],roles:Array.isArray(e.roles)?e.roles.map(String):[],policies:Array.isArray(e.policies)?e.policies.map(String):[]})).filter(e=>e.modules.length>0):[]}}(t.users),s=Array.isArray(t.blocked_ids)?t.blocked_ids.map(String):void 0,c=Array.isArray(t.blocked_collection_ids)?t.blocked_collection_ids.map(String):void 0,d=null===t.home_path?null:"string"==typeof t.home_path?R(t.home_path):void 0,u="boolean"==typeof t.home_force?t.home_force:void 0,f=Array.isArray(t.sidebar_hidden_panels)?t.sidebar_hidden_panels.map(String):void 0,p="collapsed"===t.sidebar_mode||"hidden"===t.sidebar_mode||"default"===t.sidebar_mode?t.sidebar_mode:void 0,m="boolean"==typeof t.users_own_role_only?t.users_own_role_only:void 0,v=Array.isArray(t.users_allowed_role_ids)?t.users_allowed_role_ids.map(String):void 0,h=Array.isArray(t.users_hidden_role_ids)?t.users_hidden_role_ids.map(String):void 0,g=Array.isArray(t.users_blocked_role_ids)?t.users_blocked_role_ids.map(String):void 0,b=Array.isArray(t.navigation_hidden_modules)?t.navigation_hidden_modules.map(String):void 0;return{version:1,rules:n,homes:o,collections:i,sidebar_panels:r,sidebar_modes:a,users:l,...s?{blocked_ids:s}:{},...c?{blocked_collection_ids:c}:{},...void 0!==d?{home_path:d}:{},...void 0!==u?{home_force:u}:{},...f?{sidebar_hidden_panels:f}:{},...p?{sidebar_mode:p}:{},...void 0!==m?{users_own_role_only:m}:{},...v?{users_allowed_role_ids:v}:{},...h?{users_hidden_role_ids:h}:{},...g?{users_blocked_role_ids:g}:{},...b?{navigation_hidden_modules:b}:{}}}function V(e){return(e.roles?.length??0)>0||(e.policies?.length??0)>0}function j(e,t){if(!e||!V(e))return!1;const n=function(e,t){if(!V(e))return!1;const n=new Set(t.roleIds),o=new Set(t.policyIds);return!!(e.roles||[]).some(e=>n.has(e))||!!(e.policies||[]).some(e=>o.has(e))}(e,t);return!("hide"!==e.visibility||!n)||"show"===e.visibility&&!n}function U(e,t){const n=R(e);if(!n||"/"===n)return!1;const o=t instanceof Set?t:new Set(t),i=N(n);return!!i&&o.has(i)}function N(e){const t=R(e);if(!t||"/"===t)return null;return t.split("/").filter(Boolean)[0]||null}function L(e){const t=R(e);if(!t)return null;const n=t.split("/").filter(Boolean);return"content"!==n[0]?null:n[1]&&"+"!==n[1]?n[1]:null}function $(e){return e.map(e=>{if("link"===e.type){const{type:t,id:n,name:o,url:i,icon:r,enabled:a,locked:l}=e;return{type:t,id:n,name:o,url:i,icon:r,enabled:a,locked:l}}const{type:t,id:n,enabled:o,locked:i}=e;return{type:t,id:n,enabled:o,locked:i}})}function F(e){const t=M(e);return{version:1,rules:t.rules,homes:t.homes.map(e=>({id:e.id,path:R(e.path)||e.path,roles:e.roles,policies:e.policies,force:!0===e.force})),collections:t.collections,sidebar_panels:t.sidebar_panels,sidebar_modes:t.sidebar_modes,users:{own_role_only:t.users.own_role_only,roles:t.users.roles,hide_navigation:t.users.hide_navigation}}}function H(e){if(!e||"object"!=typeof e)return!1;const t=e;if(!0===t.admin_access)return!0;const n=t.role;return!(!n||"object"!=typeof n||!0!==n.admin_access)}const B={content:{name:"Content",icon:"box"},visual:{name:"Visual Editor",icon:"design_services"},users:{name:"User Directory",icon:"people_alt"},files:{name:"File Library",icon:"folder"},insights:{name:"Insights",icon:"insights"},settings:{name:"Settings",icon:"settings"},docs:{name:"Documentation",icon:"help"},deployments:{name:"Deployments",icon:"rocket_launch"},activity:{name:"Activity",icon:"history"}};function q(e,t){const n=B[e];return{name:t?.name||n?.name||e,icon:t?.icon||n?.icon||"box"}}function z(e){return JSON.parse(JSON.stringify(e))}function X(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Y(e,t){if("string"!=typeof e)return String(e??"");if(!e.startsWith("$t:"))return e;const n=e.slice(3).trim();if(!n)return e;try{const e=t(n);if(e&&e!==n)return e}catch{}return n}const W=i(!0),G=i(!1),K=i(!1),J=i([]),Q=i(z(I)),Z=i([]),ee=i(z(I)),te=i([]),ne=i([]),oe=i(null),ie=i(null),re=i(null),ae=i(null),le=i(null),se=i(null),ce=i([]),de=i(null),ue=i(null),fe=i(null),pe=i(null),me=i(null),ve=i(null),he=i(null),ge=i(null),be=i(null),ye=i(null),we=i(null),_e=i(null);let xe=null;function Se(e){const t=Q.value.users||D;return{version:1,rules:e.rules??Q.value.rules??[],homes:e.homes??Q.value.homes??[],collections:e.collections??Q.value.collections??[],sidebar_panels:e.sidebar_panels??Q.value.sidebar_panels??[],sidebar_modes:e.sidebar_modes??Q.value.sidebar_modes??[],users:e.users?{own_role_only:e.users.own_role_only??t.own_role_only??[],roles:e.users.roles??t.roles??[],hide_navigation:e.users.hide_navigation??t.hide_navigation??[]}:{own_role_only:t.own_role_only??[],roles:t.roles??[],hide_navigation:t.hide_navigation??[]}}}function ke(){const n=e(),{t:o}=C(),{useSettingsStore:i,useUserStore:a}=t(),l=i(),s=a(),c=r({get:()=>Q.value.homes||[],set(e){Q.value=Se({homes:e})}}),d=r({get:()=>J.value.map(e=>{if("link"===e.type)return{...e,to:e.url,name:e.name,icon:e.icon||"link"};const t=q(e.id);return{...e,to:`/${e.id}`,name:t.name,icon:t.icon}}),set(e){J.value=$(e)}}),u=r(()=>!X($(J.value),$(Z.value))||!X(F(Q.value),F(ee.value))),f=r(()=>{const e=ie.value;return!e||(!e.name?.trim()||!e.icon?.trim()||!e.url?.trim())}),p=r(()=>{const e=se.value;return!e||!T(e.path)});function m(){oe.value=null,ie.value=null}function v(){le.value=null,se.value=null}function h(){re.value=null,ae.value=null}const g=r(()=>(Q.value.collections||[]).map(e=>function(e){const t=ce.value.find(t=>t.collection===e);return{collection:e,name:t?.name||e,icon:t?.icon||"box"}}(e.id))),b=r(()=>{const e=new Set((Q.value.collections||[]).map(e=>e.id)),t="+"===de.value?null:de.value;return ce.value.filter(n=>!e.has(n.collection)||n.collection===t).map(e=>({text:e.name===e.collection?e.collection:`${e.name} (${e.collection})`,value:e.collection}))}),y=r(()=>{const e=ue.value;return!e||(!e.id?.trim()||0===(e.roles?.length??0)&&0===(e.policies?.length??0))});function w(){de.value=null,ue.value=null}const _=O,x=r({get:()=>Q.value.sidebar_modes||[],set(e){Q.value=Se({sidebar_modes:e})}});function S(){fe.value=null,pe.value=null}function k(){me.value=null,ve.value=null}const E=r({get:()=>Q.value.users?.own_role_only||[],set(e){Q.value=Se({users:{...Q.value.users||D,own_role_only:e}})}});function P(){he.value=null,ge.value=null}const V=r(()=>(Q.value.users?.roles||[]).map(e=>{const t=te.value.find(t=>t.value===e.id);return{id:e.id,name:t?.text||e.id}})),j=r(()=>{const e=new Set((Q.value.users?.roles||[]).map(e=>e.id)),t="+"===be.value?null:be.value;return te.value.filter(n=>!e.has(n.value)||n.value===t)}),U=r(()=>{const e=ye.value;return!e||(!e.id?.trim()||0===(e.roles?.length??0)&&0===(e.policies?.length??0))});function N(){be.value=null,ye.value=null}const L=r({get:()=>Q.value.users?.hide_navigation||[],set(e){Q.value=Se({users:{...Q.value.users||D,hide_navigation:e}})}}),B=r(()=>{const e=J.value.filter(e=>"module"===e.type).map(e=>({text:q(e.id).name||e.id,value:e.id})),t=new Set(e.map(e=>e.value));for(const n of["content","users","files","insights","settings","module-permissions"]){if(t.has(n))continue;const o=q(n);e.push({text:o.name||n,value:n})}return e.sort((e,t)=>e.text.localeCompare(t.text))}),ke=r(()=>{const e=_e.value;return!e||0===(e.modules?.length??0)});function Ee(){we.value=null,_e.value=null}async function Ce(){W.value=!0;try{await(l.hydrate?.())}catch{}try{const e=await n.get("/settings",{params:{fields:["module_bar",A]}}),t=e.data?.data,i=Array.isArray(t)?t[0]:t,r=function(e){const t=new Set(e.filter(e=>"module"===e.type).map(e=>e.id)),n=[];t.has("module-permissions")||n.push({type:"module",id:"module-permissions",enabled:!0});for(const e of["content","users","files","insights","settings"])t.has(e)||n.push({type:"module",id:e,enabled:!1,locked:"settings"===e||void 0});return[...e,...n]}(Array.isArray(i?.module_bar)?z(i.module_bar):[]),a=M(i?.[A]);J.value=r,Q.value=a,Z.value=z(r),ee.value=z(a),await async function(){const e=await n.get("/roles",{params:{limit:-1,fields:["id","name"],sort:"name"}});te.value=(e.data?.data||[]).map(e=>({text:Y(e.name,o),value:e.id}));try{const e=await n.get("/policies",{params:{limit:-1,fields:["id","name"],sort:"name"}});ne.value=(e.data?.data||[]).map(e=>({text:Y(e.name,o),value:e.id}))}catch{ne.value=[]}}(),await async function(){try{const e=await n.get("/collections",{params:{limit:-1}}),t=e.data?.data||[];ce.value=t.filter(e=>{const t=e?.collection;return!(!t||"string"!=typeof t)&&!t.startsWith("directus_")&&(null!==e?.meta?.accountability||null!==e?.schema)&&(null!==e?.schema||!0===e?.meta?.singleton||e?.meta)}).map(e=>({collection:e.collection,name:e.meta?.translations?.[0]?.translation||e.meta?.collection||e.collection,icon:e.meta?.icon||(null===e.schema?"folder":"box")})).sort((e,t)=>e.name.localeCompare(t.name))}catch{ce.value=[]}}()}finally{W.value=!1}}return{loading:W,saving:G,cleaning:K,hasEdits:u,previewItems:d,homeItems:c,roleOptions:te,policyOptions:ne,linkEditing:oe,linkValues:ie,linkSaveDisabled:f,ruleEditingId:re,ruleDraft:ae,homeEditing:le,homeDraft:se,homeSaveDisabled:p,collectionCatalog:ce,configuredCollections:g,availableCollectionOptions:b,collectionEditingId:de,collectionDraft:ue,collectionSaveDisabled:y,sidebarPanelCatalog:_,sidebarPanelEditingId:fe,sidebarPanelDraft:pe,sidebarModeItems:x,sidebarModeEditing:me,sidebarModeDraft:ve,usersOwnRoleItems:E,usersOwnRoleEditing:he,usersOwnRoleDraft:ge,configuredUsersRoles:V,availableUsersRoleOptions:j,usersRoleEditingId:be,usersRoleDraft:ye,usersRoleSaveDisabled:U,hideNavItems:L,hideNavEditing:we,hideNavDraft:_e,hideNavSaveDisabled:ke,moduleSelectOptions:B,hasRule:function(e){const t=Q.value.rules.find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},ruleSummary:function(e){const t=Q.value.rules.find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},homeSummary:function(e){const t=e.roles?.length??0,n=e.policies?.length??0,o=e.force?"Force · ":"";return 0===t&&0===n?`${o}Catch-all default`:`${o}${t} role(s) · ${n} polic(ies)`},hasCollectionRule:function(e){const t=(Q.value.collections||[]).find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},collectionRuleSummary:function(e){const t=(Q.value.collections||[]).find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},hasSidebarPanelRule:function(e){const t=(Q.value.sidebar_panels||[]).find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},sidebarPanelRuleSummary:function(e){const t=(Q.value.sidebar_panels||[]).find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},sidebarModeSummary:function(e){const t=e.roles?.length??0,n=e.policies?.length??0,o="hidden"===e.mode?"Force hidden":"Force collapsed";return 0===t&&0===n?`${o} · Catch-all`:`${o} · ${t} role(s) · ${n} polic(ies)`},usersOwnRoleSummary:function(e){const t=e.roles?.length??0,n=e.policies?.length??0;return 0===t&&0===n?"Catch-all":`${t} role(s) · ${n} polic(ies)`},hasUsersRoleRule:function(e){const t=(Q.value.users?.roles||[]).find(t=>t.id===e);return!!t&&((t.roles?.length??0)>0||(t.policies?.length??0)>0)},usersRoleRuleSummary:function(e){const t=(Q.value.users?.roles||[]).find(t=>t.id===e);if(!t)return"";const n=(t.roles?.length??0)+(t.policies?.length??0);return`${"show"===t.visibility?"Show":"Hide"} · ${n}`},hideNavSummary:function(e){const t=(e.modules||[]).join(", ")||"—",n=e.roles?.length??0,o=e.policies?.length??0;return`${t} · ${0===n&&0===o?"Catch-all":`${n} role(s) · ${o} polic(ies)`}`},toggleEnabled:function(e,t){J.value=J.value.map(n=>n.id===e.id?{...n,enabled:Boolean(t)}:n)},editLink:function(e){if(oe.value=e,"+"===e)return void(ie.value={id:crypto.randomUUID(),type:"link",enabled:!0,url:"",name:"",icon:"link"});const t=J.value.find(t=>t.id===e&&"link"===t.type);ie.value=t?z(t):null},closeLinkEditor:m,onLinkDrawerToggle:function(e){e||m()},saveLink:function(){ie.value&&!f.value&&oe.value&&("+"===oe.value?J.value=[...J.value,{...ie.value}]:J.value=J.value.map(e=>e.id===oe.value?{...ie.value}:e),m())},removeLink:function(e){J.value=J.value.filter(t=>t.id!==e),Q.value=Se({rules:Q.value.rules.filter(t=>t.id!==e)})},editHome:function(e){if(le.value=e,"+"===e)return void(se.value={id:crypto.randomUUID(),path:"/content",roles:[],policies:[],force:!1});const t=(Q.value.homes||[]).find(t=>t.id===e);se.value=t?z(t):null},closeHomeEditor:v,onHomeDrawerToggle:function(e){e||v()},saveHome:function(){if(!se.value||p.value||!le.value)return;const e=R(se.value.path);if(!e)return;const t={id:"+"===le.value?se.value.id:le.value,path:e,roles:[...se.value.roles||[]],policies:[...se.value.policies||[]],force:!0===se.value.force},n=[...Q.value.homes||[]];if("+"===le.value)n.push(t);else{const e=n.findIndex(e=>e.id===le.value);-1===e?n.push(t):n[e]=t}Q.value=Se({homes:n}),v()},removeHome:function(e){Q.value=Se({homes:(Q.value.homes||[]).filter(t=>t.id!==e)})},openRuleEditor:function(e){re.value=e.id;const t=Q.value.rules.find(t=>t.id===e.id);ae.value=t?z(t):{id:e.id,visibility:"hide",roles:[],policies:[],block_routes:!0}},closeRuleEditor:h,onRuleDrawerToggle:function(e){e||h()},saveRule:function(){if(!ae.value||!re.value)return;const e={...ae.value,id:re.value,roles:[...ae.value.roles||[]],policies:[...ae.value.policies||[]],block_routes:!1!==ae.value.block_routes},t=Q.value.rules.filter(e=>e.id!==re.value);0===e.roles.length&&0===e.policies.length?Q.value=Se({rules:t}):Q.value=Se({rules:[...t,e]}),h()},clearRule:function(){re.value&&(Q.value=Se({rules:Q.value.rules.filter(e=>e.id!==re.value)}),h())},openCollectionEditor:function(e){if(de.value=e,"+"===e)return void(ue.value={id:"",visibility:"hide",roles:[],policies:[],block_routes:!0});const t=(Q.value.collections||[]).find(t=>t.id===e);ue.value=t?z(t):{id:e,visibility:"hide",roles:[],policies:[],block_routes:!0}},closeCollectionEditor:w,onCollectionDrawerToggle:function(e){e||w()},saveCollectionRule:function(){if(!ue.value||!de.value||y.value)return;const e=String(ue.value.id).trim();if(!e)return;const t={...ue.value,id:e,roles:[...ue.value.roles||[]],policies:[...ue.value.policies||[]],block_routes:!1!==ue.value.block_routes},n="+"===de.value?e:de.value,o=(Q.value.collections||[]).filter(t=>t.id!==n&&t.id!==e);Q.value=Se({collections:[...o,t]}),w()},clearCollectionRule:function(){de.value&&"+"!==de.value&&(Q.value=Se({collections:(Q.value.collections||[]).filter(e=>e.id!==de.value)}),w())},removeCollectionRule:function(e){Q.value=Se({collections:(Q.value.collections||[]).filter(t=>t.id!==e)})},openSidebarPanelEditor:function(e){fe.value=e;const t=(Q.value.sidebar_panels||[]).find(t=>t.id===e);pe.value=t?z(t):{id:e,visibility:"hide",roles:[],policies:[]}},closeSidebarPanelEditor:S,onSidebarPanelDrawerToggle:function(e){e||S()},saveSidebarPanelRule:function(){if(!pe.value||!fe.value)return;const e={...pe.value,id:fe.value,roles:[...pe.value.roles||[]],policies:[...pe.value.policies||[]]},t=(Q.value.sidebar_panels||[]).filter(e=>e.id!==fe.value);0===e.roles.length&&0===e.policies.length?Q.value=Se({sidebar_panels:t}):Q.value=Se({sidebar_panels:[...t,e]}),S()},clearSidebarPanelRule:function(){fe.value&&(Q.value=Se({sidebar_panels:(Q.value.sidebar_panels||[]).filter(e=>e.id!==fe.value)}),S())},editSidebarMode:function(e){if(me.value=e,"+"===e)return void(ve.value={id:crypto.randomUUID(),mode:"collapsed",roles:[],policies:[]});const t=(Q.value.sidebar_modes||[]).find(t=>t.id===e);ve.value=t?z(t):null},closeSidebarModeEditor:k,onSidebarModeDrawerToggle:function(e){e||k()},saveSidebarMode:function(){if(!ve.value||!me.value)return;const e={id:"+"===me.value?ve.value.id:me.value,mode:"hidden"===ve.value.mode?"hidden":"collapsed",roles:[...ve.value.roles||[]],policies:[...ve.value.policies||[]]},t=[...Q.value.sidebar_modes||[]];if("+"===me.value)t.push(e);else{const n=t.findIndex(e=>e.id===me.value);-1===n?t.push(e):t[n]=e}Q.value=Se({sidebar_modes:t}),k()},removeSidebarMode:function(e){Q.value=Se({sidebar_modes:(Q.value.sidebar_modes||[]).filter(t=>t.id!==e)})},editUsersOwnRole:function(e){if(he.value=e,"+"===e)return void(ge.value={id:crypto.randomUUID(),roles:[],policies:[]});const t=(Q.value.users?.own_role_only||[]).find(t=>t.id===e);ge.value=t?z(t):null},closeUsersOwnRoleEditor:P,onUsersOwnRoleDrawerToggle:function(e){e||P()},saveUsersOwnRole:function(){if(!ge.value||!he.value)return;const e={id:"+"===he.value?ge.value.id:he.value,roles:[...ge.value.roles||[]],policies:[...ge.value.policies||[]]},t=[...Q.value.users?.own_role_only||[]];if("+"===he.value)t.push(e);else{const n=t.findIndex(e=>e.id===he.value);-1===n?t.push(e):t[n]=e}Q.value=Se({users:{...Q.value.users||D,own_role_only:t}}),P()},removeUsersOwnRole:function(e){Q.value=Se({users:{...Q.value.users||D,own_role_only:(Q.value.users?.own_role_only||[]).filter(t=>t.id!==e)}})},openUsersRoleEditor:function(e){if(be.value=e,"+"===e)return void(ye.value={id:"",visibility:"hide",roles:[],policies:[],block_routes:!0});const t=(Q.value.users?.roles||[]).find(t=>t.id===e);ye.value=t?z(t):{id:e,visibility:"hide",roles:[],policies:[],block_routes:!0}},closeUsersRoleEditor:N,onUsersRoleDrawerToggle:function(e){e||N()},saveUsersRoleRule:function(){if(!ye.value||!be.value||U.value)return;const e=String(ye.value.id).trim();if(!e)return;const t={...ye.value,id:e,roles:[...ye.value.roles||[]],policies:[...ye.value.policies||[]],block_routes:!1!==ye.value.block_routes},n="+"===be.value?e:be.value,o=(Q.value.users?.roles||[]).filter(t=>t.id!==n&&t.id!==e);Q.value=Se({users:{...Q.value.users||D,roles:[...o,t]}}),N()},clearUsersRoleRule:function(){be.value&&"+"!==be.value&&(Q.value=Se({users:{...Q.value.users||D,roles:(Q.value.users?.roles||[]).filter(e=>e.id!==be.value)}}),N())},removeUsersRoleRule:function(e){Q.value=Se({users:{...Q.value.users||D,roles:(Q.value.users?.roles||[]).filter(t=>t.id!==e)}})},editHideNav:function(e){if(we.value=e,"+"===e)return void(_e.value={id:crypto.randomUUID(),modules:["users"],roles:[],policies:[]});const t=(Q.value.users?.hide_navigation||[]).find(t=>t.id===e);_e.value=t?z(t):null},closeHideNavEditor:Ee,onHideNavDrawerToggle:function(e){e||Ee()},saveHideNav:function(){if(!_e.value||!we.value||ke.value)return;const e={id:"+"===we.value?_e.value.id:we.value,modules:[..._e.value.modules||[]].map(String).filter(Boolean),roles:[..._e.value.roles||[]],policies:[..._e.value.policies||[]]},t=[...Q.value.users?.hide_navigation||[]];if("+"===we.value)t.push(e);else{const n=t.findIndex(e=>e.id===we.value);-1===n?t.push(e):t[n]=e}Q.value=Se({users:{...Q.value.users||D,hide_navigation:t}}),Ee()},removeHideNav:function(e){Q.value=Se({users:{...Q.value.users||D,hide_navigation:(Q.value.users?.hide_navigation||[]).filter(t=>t.id!==e)}})},ensureLoaded:function(){return xe||(xe=Ce().finally(()=>{})),xe},save:async function(){if(u.value&&H(s.currentUser)){G.value=!0;try{const e={module_bar:$(J.value),[A]:F(Q.value)};await n.patch("/settings",e);try{await(l.hydrate?.())}catch{}Z.value=z(J.value),ee.value=z(Q.value)}finally{G.value=!1}}},cleanupExtensionData:async function(){if(!H(s.currentUser))throw new Error("Admin access required");K.value=!0;let e=!1,t=!1;try{try{await n.patch("/settings",{[A]:null}),e=!0}catch(e){const t=e?.response?.status,n=String(e?.response?.data?.errors?.[0]?.message||e?.message||"");if(400!==t&&403!==t&&!/unknown|does not exist|forbidden/i.test(n))throw e}try{await n.delete(`/fields/directus_settings/${A}`),t=!0}catch(e){const n=e?.response?.status;if(404!==n)throw e;t=!0}Q.value=z(I),ee.value=z(I),oe.value=null,ie.value=null,re.value=null,ae.value=null,le.value=null,se.value=null,de.value=null,ue.value=null,fe.value=null,pe.value=null,me.value=null,ve.value=null,he.value=null,ge.value=null,be.value=null,ye.value=null,we.value=null,_e.value=null,xe=null;try{await(l.hydrate?.())}catch{}return{clearedValue:e,deletedField:t}}finally{K.value=!1}},exportPermissionsConfig:function(){const e={...F(Q.value),exported_at:(new Date).toISOString(),extension:"directus-extension-module-permissions"},t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(t),o=document.createElement("a"),i=(new Date).toISOString().slice(0,19).replace(/[:T]/g,"-");o.href=n,o.download=`module-permissions-${i}.json`,o.click(),URL.revokeObjectURL(n)},importPermissionsConfig:async function(e){if(!H(s.currentUser))throw new Error("Admin access required");if(!e||"object"!=typeof e)throw new Error("Invalid JSON: expected an object");const t=e,o=F(t.module_permissions&&"object"==typeof t.module_permissions?t.module_permissions:t);if(!(Array.isArray(o.rules)&&Array.isArray(o.homes)&&Array.isArray(o.collections)&&Array.isArray(o.sidebar_panels)&&Array.isArray(o.sidebar_modes)&&o.users&&Array.isArray(o.users.own_role_only)&&Array.isArray(o.users.roles)&&Array.isArray(o.users.hide_navigation)))throw new Error("Invalid config: missing rules/homes/collections/sidebar/users arrays");Q.value=o,await n.patch("/settings",{[A]:o}),ee.value=z(o);try{await(l.hydrate?.())}catch{}xe=null},MODULE_PERMISSIONS_FIELD:A}}function Ee(e){if("undefined"!=typeof document&&(document.querySelector(".root-split, .main-split")||document.querySelector("#navigation.module-bar")||document.querySelector("aside.module-nav:not(#navigation)")))return!1;const t=function(e){if("string"!=typeof e||!e)return null;const t=e.trim().replace(/^v/i,""),[n,o]=t.split("."),i=Number.parseInt(n||"",10),r=Number.parseInt(o||"",10);return Number.isFinite(i)?{major:i,minor:Number.isFinite(r)?r:0}:null}(e);return t?11===t.major&&t.minor<14:"undefined"!=typeof document&&Boolean(document.querySelector("#navigation:not(.module-bar)"))}function Ce(){const{useServerStore:e}=t(),n=e();return r(()=>{const e=["page"],t=n?.info?.version;return Ee(t)&&e.push("page--flush-top"),e})}var Ae=a({__name:"navigation",setup:e=>(e,t)=>{const n=l("v-icon"),o=l("v-list-item-icon"),i=l("v-text-overflow"),r=l("v-list-item-content"),a=l("v-list-item"),f=l("v-divider"),p=l("v-list");return s(),c(p,{nav:""},{default:d(()=>[u(a,{to:"/module-permissions/modules"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"view_sidebar",class:"icon-flip-x"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Modules"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/sidebar"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"view_sidebar"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Sidebar"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/content"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"box"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Content"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/users"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"people_alt"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Users"})]),_:1})]),_:1}),u(a,{to:"/module-permissions/start-page"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"home"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Start Page"})]),_:1})]),_:1}),u(f),u(a,{to:"/module-permissions/settings"},{default:d(()=>[u(o,null,{default:d(()=>[u(n,{name:"settings"})]),_:1}),u(r,null,{default:d(()=>[u(i,{text:"Settings"})]),_:1})]),_:1})]),_:1})}}),Oe=[],De=[];function Ie(e,t){if(e&&"undefined"!=typeof document){var n,o=!0===t.prepend?"prepend":"append",i=!0===t.singleTag,r="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var a=Oe.indexOf(r);-1===a&&(a=Oe.push(r)-1,De[a]={}),n=De[a]&&De[a][o]?De[a][o]:De[a][o]=l()}else n=l();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function l(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),i=0;i<n.length;i++)e.setAttribute(n[i],t.attributes[n[i]]);var a="prepend"===o?"afterbegin":"beforeend";return r.insertAdjacentElement(a,e),e}}Ie("\n.icon-flip-x[data-v-67936547] {\n\ttransform: scaleX(-1);\n}\n",{});var Re=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n},Te=Re(Ae,[["__scopeId","data-v-67936547"]]);const Pe={key:0,class:"loading"},Me={key:0,class:"empty"},Ve={key:1,class:"list"},je={class:"info"},Ue={class:"name"},Ne={class:"to"},Le={key:0,class:"drawer-content"},$e={class:"field"},Fe={class:"field"},He={class:"field"},Be={class:"field"},qe={class:"field checkbox-field"};var ze=a({__name:"collections-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,configuredCollections:r,availableCollectionOptions:a,roleOptions:E,policyOptions:C,collectionEditingId:A,collectionDraft:O,collectionSaveDisabled:D,hasCollectionRule:I,collectionRuleSummary:R,openCollectionEditor:T,closeCollectionEditor:P,onCollectionDrawerToggle:M,saveCollectionRule:V,clearCollectionRule:j,removeCollectionRule:U,ensureLoaded:N,save:L}=ke();return f(()=>{N()}),(e,f)=>{const N=l("v-breadcrumb"),$=l("v-icon"),F=l("v-button"),H=l("sidebar-detail"),B=l("v-progress-circular"),q=l("v-chip"),z=l("v-list-item"),X=l("v-select"),Y=l("v-checkbox"),W=l("v-drawer"),G=l("private-view"),K=p("tooltip");return s(),c(G,{title:"Content",icon:"box"},{headline:d(()=>[u(N,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(F,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(L)},{default:d(()=>[u($,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[K,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(H,{icon:"info",title:"About",close:""},{default:d(()=>[...f[7]||(f[7]=[m("p",{class:"sidebar-text"},[w(" Hide specific collections from the Content module navigation while keeping read permissions for relations and API access. Optional deep-link blocking covers "),m("code",null,"/content/<collection>"),w(". Admins are never affected. This is UI visibility only — not a security boundary. ")],-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",Pe,[u(B,{indeterminate:""})])):(s(),g(b,{key:1},[f[9]||(f[9]=m("p",{class:"page-intro"}," Add only the collections that need visibility rules. Unlisted collections keep normal Content behavior. Assign roles or policies to hide or show a collection in the nav, and optionally block deep links. ",-1)),0===h(r).length?(s(),g("div",Me,"No collection rules yet.")):(s(),g("div",Ve,[(s(!0),g(b,null,y(h(r),e=>(s(),c(z,{key:e.collection,block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(T)(e.collection)},{default:d(()=>[u($,{class:"icon",name:e.icon},null,8,["name"]),m("div",je,[m("div",Ue,[w(_(e.name)+" ",1),h(I)(e.collection)?(s(),c(q,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(R)(e.collection)),1)]),_:2},1024)):x("v-if",!0)]),m("div",Ne,"/content/"+_(e.collection),1)]),m("div",{class:"row-actions",onClick:f[0]||(f[0]=S(()=>{},["stop"]))},[k((s(),c(F,{icon:"","x-small":"",secondary:"",onClick:t=>h(T)(e.collection)},{default:d(()=>[u($,{name:"policy"})]),_:1},8,["onClick"])),[[K,"Visibility rules"]]),k((s(),c(F,{icon:"","x-small":"",secondary:"",onClick:t=>h(U)(e.collection)},{default:d(()=>[u($,{name:"close"})]),_:1},8,["onClick"])),[[K,"Remove"]])])]),_:2},1032,["onClick"]))),128))])),u(F,{class:"add-link",onClick:f[1]||(f[1]=e=>h(T)("+"))},{default:d(()=>[...f[8]||(f[8]=[w("Add Collection",-1)])]),_:1})],64))],2),u(W,{"model-value":null!==h(A),title:"+"===h(A)?"Add Collection":"Collection Visibility",icon:"policy","onUpdate:modelValue":h(M),onCancel:h(P)},{actions:d(()=>[k((s(),c(F,{disabled:h(D),icon:"",rounded:"",onClick:h(V)},{default:d(()=>[u($,{name:"check"})]),_:1},8,["disabled","onClick"])),[[K,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(O)?(s(),g("div",Le,[f[15]||(f[15]=m("p",{class:"hint"}," Pick a collection and at least one role or policy. Read permissions are never changed here. ",-1)),m("div",$e,[f[10]||(f[10]=m("label",null,"Collection",-1)),u(X,{modelValue:h(O).id,"onUpdate:modelValue":f[2]||(f[2]=e=>h(O).id=e),items:h(a),"item-text":"text","item-value":"value",disabled:"+"!==h(A),placeholder:"Select collection"},null,8,["modelValue","items","disabled"])]),m("div",Fe,[f[11]||(f[11]=m("label",null,"Visibility",-1)),u(X,{modelValue:h(O).visibility,"onUpdate:modelValue":f[3]||(f[3]=e=>h(O).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",He,[f[12]||(f[12]=m("label",null,"Roles",-1)),u(X,{modelValue:h(O).roles,"onUpdate:modelValue":f[4]||(f[4]=e=>h(O).roles=e),multiple:"",items:h(E),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",Be,[f[13]||(f[13]=m("label",null,"Policies",-1)),u(X,{modelValue:h(O).policies,"onUpdate:modelValue":f[5]||(f[5]=e=>h(O).policies=e),multiple:"",items:h(C),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),m("div",qe,[u(Y,{modelValue:h(O).block_routes,"onUpdate:modelValue":f[6]||(f[6]=e=>h(O).block_routes=e),label:"Block deep links to /content/<collection> when this rule hides it"},null,8,["modelValue"])]),h(A)&&"+"!==h(A)&&h(I)(h(A))?(s(),c(F,{key:0,secondary:"",onClick:h(j)},{default:d(()=>[...f[14]||(f[14]=[w(" Remove rule ",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","title","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-560c7d85] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--flush-top[data-v-560c7d85] {\n\tpadding-block-start: 0;\n}\n.loading[data-v-560c7d85] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-560c7d85] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.list[data-v-560c7d85] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-560c7d85] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.icon[data-v-560c7d85] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-560c7d85] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-560c7d85] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-weight: 600;\n}\n.to[data-v-560c7d85] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-560c7d85] {\n\tmargin-inline-start: 4px;\n}\n.row-actions[data-v-560c7d85] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-560c7d85] {\n\tmargin-top: 4px;\n}\n.empty[data-v-560c7d85] {\n\tmargin-bottom: 12px;\n\tcolor: var(--theme--foreground);\n}\n.drawer-content[data-v-560c7d85] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-560c7d85] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.hint[data-v-560c7d85],\n.sidebar-text[data-v-560c7d85] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.sidebar-text code[data-v-560c7d85],\n.hint code[data-v-560c7d85] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.checkbox-field[data-v-560c7d85] {\n\tpadding-top: 4px;\n}\n",{});var Xe=Re(ze,[["__scopeId","data-v-560c7d85"]]);function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function We(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n}var Ge={exports:{}},Ke=We(o);
|
|
2
2
|
/**!
|
|
3
3
|
* Sortable 1.14.0
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach(function(t){et(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(){return tt=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},tt.apply(this,arguments)}function nt(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ot(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function rt(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var at=rt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),lt=rt(/Edge/i),st=rt(/firefox/i),ct=rt(/safari/i)&&!rt(/chrome/i)&&!rt(/android/i),dt=rt(/iP(ad|od|hone)/i),ut=rt(/chrome/i)&&rt(/android/i),ft={capture:!1,passive:!1};function pt(e,t,n){e.addEventListener(t,n,!at&&ft)}function mt(e,t,n){e.removeEventListener(t,n,!at&&ft)}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(e){return!1}return!1}}function ht(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function gt(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&vt(e,t):vt(e,t))||o&&e===n)return e;if(e===n)break}while(e=ht(e))}return null}var bt,yt=/\s+/g;function wt(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(yt," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(yt," ")}}function _t(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function xt(e,t){var n="";if("string"==typeof e)n=e;else do{var o=_t(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function St(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function kt(){var e=document.scrollingElement;return e||document.documentElement}function Et(e,t,n,o,i){if(e.getBoundingClientRect||e===window){var r,a,l,s,c,d,u;if(e!==window&&e.parentNode&&e!==kt()?(a=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,d=r.height,u=r.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!at))do{if(i&&i.getBoundingClientRect&&("none"!==_t(i,"transform")||n&&"static"!==_t(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_t(i,"border-top-width")),l-=f.left+parseInt(_t(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);if(o&&e!==window){var p=xt(i||e),m=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(d/=v),c=(l/=m)+(u/=m))}return{top:a,left:l,bottom:s,right:c,width:u,height:d}}}function Ct(e,t,n){for(var o=Rt(e,!0),i=Et(e)[t];o;){if(!(i>=Et(o)[n]))return o;if(o===kt())break;o=Rt(o,!1)}return!1}function At(e,t,n,o){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Nn.ghost&&(o||a[r]!==Nn.dragged)&>(a[r],n.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function Ot(e,t){for(var n=e.lastElementChild;n&&(n===Nn.ghost||"none"===_t(n,"display")||t&&!vt(n,t));)n=n.previousElementSibling;return n||null}function Dt(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Nn.clone||t&&!vt(e,t)||n++;return n}function It(e){var t=0,n=0,o=kt();if(e)do{var i=xt(e),r=i.a,a=i.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function Rt(e,t){if(!e||!e.getBoundingClientRect)return kt();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_t(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return kt();if(o||t)return n;o=!0}}}while(n=n.parentNode);return kt()}function Tt(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)}function Pt(e,t){return function(){if(!bt){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),bt=setTimeout(function(){bt=void 0},t)}}}function Mt(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Vt(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)}function Ut(e,t){_t(e,"position","absolute"),_t(e,"top",t.top),_t(e,"left",t.left),_t(e,"width",t.width),_t(e,"height",t.height)}function jt(e){_t(e,"position",""),_t(e,"top",""),_t(e,"left",""),_t(e,"width",""),_t(e,"height","")}var Nt="Sortable"+(new Date).getTime();function Lt(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(e){if("none"!==_t(e,"display")&&e!==Nn.ghost){t.push({target:e,rect:Et(e)});var n=Qe({},t[t.length-1].rect);if(e.thisAnimationDuration){var o=xt(e,!0);o&&(n.top-=o.f,n.left-=o.e)}e.fromRect=n}})},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(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}(t,{target:e}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var i=!1,r=0;t.forEach(function(e){var t=0,n=e.target,a=n.fromRect,l=Et(n),s=n.prevFromRect,c=n.prevToRect,d=e.rect,u=xt(n,!0);u&&(l.top-=u.f,l.left-=u.e),n.toRect=l,n.thisAnimationDuration&&Tt(s,l)&&!Tt(a,l)&&(d.top-l.top)/(d.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(t=function(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}(d,s,c,o.options)),Tt(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=o.options.animation),o.animate(n,d,l,t)),t&&(i=!0,r=Math.max(r,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(e),i?e=setTimeout(function(){"function"==typeof n&&n()},r):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,o){if(o){_t(e,"transition",""),_t(e,"transform","");var i=xt(this.el),r=i&&i.a,a=i&&i.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,_t(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),_t(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_t(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){_t(e,"transition",""),_t(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}}var $t=[],Ft={initializeByDefault:!0},Ht={mount:function(e){for(var t in Ft)Ft.hasOwnProperty(t)&&!(t in e)&&(e[t]=Ft[t]);$t.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$t.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=e+"Global";$t.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][i]&&t[o.pluginName][i](Qe({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](Qe({sortable:t},n)))})},initializePlugins:function(e,t,n,o){for(var i in $t.forEach(function(o){var i=o.pluginName;if(e.options[i]||o.initializeByDefault){var r=new o(e,t,e.options);r.sortable=e,r.options=e.options,e[i]=r,tt(n,r.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var r=this.modifyOption(e,i,e.options[i]);void 0!==r&&(e.options[i]=r)}},getEventProperties:function(e,t){var n={};return $t.forEach(function(o){"function"==typeof o.eventProperties&&tt(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return $t.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(o=i.optionListeners[t].call(e[i.pluginName],n))}),o}};function Bt(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[Nt]){var v,h=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||at||lt?(v=document.createEvent("Event")).initEvent(o,!0,!0):v=new CustomEvent(o,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=l||n,v.item=i||n,v.clone=r,v.oldIndex=s,v.newIndex=c,v.oldDraggableIndex=d,v.newDraggableIndex=u,v.originalEvent=f,v.pullMode=p?p.lastPutMode:void 0;var b=Qe(Qe({},m),Ht.getEventProperties(o,t));for(var y in b)v[y]=b[y];n&&n.dispatchEvent(v),h[g]&&h[g].call(t,v)}}var qt=["evt"],zt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=nt(n,qt);Ht.pluginEvent.bind(Nn)(e,t,Qe({dragEl:Yt,parentEl:Wt,ghostEl:Gt,rootEl:Kt,nextEl:Jt,lastDownEl:Qt,cloneEl:Zt,cloneHidden:en,dragStarted:mn,putSortable:ln,activeSortable:Nn.active,originalEvent:o,oldIndex:tn,oldDraggableIndex:on,newIndex:nn,newDraggableIndex:rn,hideGhostForTarget:Mn,unhideGhostForTarget:Vn,cloneNowHidden:function(){en=!0},cloneNowShown:function(){en=!1},dispatchSortableEvent:function(e){Xt({sortable:t,name:e,originalEvent:o})}},i))};function Xt(e){Bt(Qe({putSortable:ln,cloneEl:Zt,targetEl:Yt,rootEl:Kt,oldIndex:tn,oldDraggableIndex:on,newIndex:nn,newDraggableIndex:rn},e))}var Yt,Wt,Gt,Kt,Jt,Qt,Zt,en,tn,nn,on,rn,an,ln,sn,cn,dn,un,fn,pn,mn,vn,hn,gn,bn,yn=!1,wn=!1,_n=[],xn=!1,Sn=!1,kn=[],En=!1,Cn=[],An="undefined"!=typeof document,On=dt,Dn=lt||at?"cssFloat":"float",In=An&&!ut&&!dt&&"draggable"in document.createElement("div"),Rn=function(){if(An){if(at)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Tn=function(e,t){var n=_t(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=At(e,0,t),r=At(e,1,t),a=i&&_t(i),l=r&&_t(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Et(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.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(i&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Dn]||r&&"none"===n[Dn]&&s+c>o)?"vertical":"horizontal"},Pn=function(e){function t(e,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==Ze(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Mn=function(){!Rn&&Gt&&_t(Gt,"display","none")},Vn=function(){!Rn&&Gt&&_t(Gt,"display","")};An&&document.addEventListener("click",function(e){if(wn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),wn=!1,!1},!0);var Un=function(e){if(Yt){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,_n.some(function(e){var t=e[Nt].options.emptyInsertThreshold;if(t&&!Ot(e)){var n=Et(e),o=i>=n.left-t&&i<=n.right+t,l=r>=n.top-t&&r<=n.bottom+t;return o&&l?a=e:void 0}}),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Nt]._onDragOver(n)}}var i,r,a},jn=function(e){Yt&&Yt.parentNode[Nt]._isOutsideThisEl(e.target)};function Nn(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=tt({},t),e[Nt]=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 Tn(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(e,t){e.setData("Text",t.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!==Nn.supportPointer&&"PointerEvent"in window&&!ct,emptyInsertThreshold:5};for(var o in Ht.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var i in Pn(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&In,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pt(e,"pointerdown",this._onTapStart):(pt(e,"mousedown",this._onTapStart),pt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pt(e,"dragover",this),pt(e,"dragenter",this)),_n.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),tt(this,Lt())}function Ln(e,t,n,o,i,r,a,l){var s,c,d=e[Nt],u=d.options.onMove;return!window.CustomEvent||at||lt?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=i||t,s.relatedRect=r||Et(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),u&&(c=u.call(d,s,a)),c}function $n(e){e.draggable=!1}function Fn(){En=!1}function Hn(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 Bn(e){return setTimeout(e,0)}function qn(e){return clearTimeout(e)}Nn.prototype={constructor:Nn,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(vn=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Yt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,i=o.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Cn.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var o=t[n];o.checked&&Cn.push(o)}}(n),!Yt&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!ct||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=gt(l,o.draggable,n,!1))&&l.animated||Qt===l)){if(tn=Dt(l),on=Dt(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Xt({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),zt("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(o){if(o=gt(s,o.trim(),n,!1))return Xt({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),zt("filter",t,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());o.handle&&!gt(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!Yt&&n.parentNode===r){var s=Et(n);if(Kt=r,Wt=(Yt=n).parentNode,Jt=Yt.nextSibling,Qt=n,an=a.group,Nn.dragged=Yt,sn={target:Yt,clientX:(t||e).clientX,clientY:(t||e).clientY},fn=sn.clientX-s.left,pn=sn.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Yt.style["will-change"]="all",o=function(){zt("delayEnded",i,{evt:e}),Nn.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!st&&i.nativeDraggable&&(Yt.draggable=!0),i._triggerDragStart(e,t),Xt({sortable:i,name:"choose",originalEvent:e}),wt(Yt,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){St(Yt,e.trim(),$n)}),pt(l,"dragover",Un),pt(l,"mousemove",Un),pt(l,"touchmove",Un),pt(l,"mouseup",i._onDrop),pt(l,"touchend",i._onDrop),pt(l,"touchcancel",i._onDrop),st&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Yt.draggable=!0),zt("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(lt||at))o();else{if(Nn.eventCanceled)return void this._onDrop();pt(l,"mouseup",i._disableDelayedDrag),pt(l,"touchend",i._disableDelayedDrag),pt(l,"touchcancel",i._disableDelayedDrag),pt(l,"mousemove",i._delayedDragTouchMoveHandler),pt(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&pt(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Yt&&$n(Yt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;mt(e,"mouseup",this._disableDelayedDrag),mt(e,"touchend",this._disableDelayedDrag),mt(e,"touchcancel",this._disableDelayedDrag),mt(e,"mousemove",this._delayedDragTouchMoveHandler),mt(e,"touchmove",this._delayedDragTouchMoveHandler),mt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?pt(document,"pointermove",this._onTouchMove):pt(document,t?"touchmove":"mousemove",this._onTouchMove):(pt(Yt,"dragend",this),pt(Kt,"dragstart",this._onDragStart));try{document.selection?Bn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(yn=!1,Kt&&Yt){zt("dragStarted",this,{evt:t}),this.nativeDraggable&&pt(document,"dragover",jn);var n=this.options;!e&&wt(Yt,n.dragClass,!1),wt(Yt,n.ghostClass,!0),Nn.active=this,e&&this._appendGhost(),Xt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(cn){this._lastX=cn.clientX,this._lastY=cn.clientY,Mn();for(var e=document.elementFromPoint(cn.clientX,cn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(cn.clientX,cn.clientY))!==t;)t=e;if(Yt.parentNode[Nt]._isOutsideThisEl(e),t)do{if(t[Nt]){if(t[Nt]._onDragOver({clientX:cn.clientX,clientY:cn.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Vn()}},_onTouchMove:function(e){if(sn){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=Gt&&xt(Gt,!0),a=Gt&&r&&r.a,l=Gt&&r&&r.d,s=On&&bn&&It(bn),c=(i.clientX-sn.clientX+o.x)/(a||1)+(s?s[0]-kn[0]:0)/(a||1),d=(i.clientY-sn.clientY+o.y)/(l||1)+(s?s[1]-kn[1]:0)/(l||1);if(!Nn.active&&!yn){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Gt){r?(r.e+=c-(dn||0),r.f+=d-(un||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_t(Gt,"webkitTransform",u),_t(Gt,"mozTransform",u),_t(Gt,"msTransform",u),_t(Gt,"transform",u),dn=c,un=d,cn=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Gt){var e=this.options.fallbackOnBody?document.body:Kt,t=Et(Yt,!0,On,!0,e),n=this.options;if(On){for(bn=e;"static"===_t(bn,"position")&&"none"===_t(bn,"transform")&&bn!==document;)bn=bn.parentNode;bn!==document.body&&bn!==document.documentElement?(bn===document&&(bn=kt()),t.top+=bn.scrollTop,t.left+=bn.scrollLeft):bn=kt(),kn=It(bn)}wt(Gt=Yt.cloneNode(!0),n.ghostClass,!1),wt(Gt,n.fallbackClass,!0),wt(Gt,n.dragClass,!0),_t(Gt,"transition",""),_t(Gt,"transform",""),_t(Gt,"box-sizing","border-box"),_t(Gt,"margin",0),_t(Gt,"top",t.top),_t(Gt,"left",t.left),_t(Gt,"width",t.width),_t(Gt,"height",t.height),_t(Gt,"opacity","0.8"),_t(Gt,"position",On?"absolute":"fixed"),_t(Gt,"zIndex","100000"),_t(Gt,"pointerEvents","none"),Nn.ghost=Gt,e.appendChild(Gt),_t(Gt,"transform-origin",fn/parseInt(Gt.style.width)*100+"% "+pn/parseInt(Gt.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,i=n.options;zt("dragStart",this,{evt:e}),Nn.eventCanceled?this._onDrop():(zt("setupClone",this),Nn.eventCanceled||((Zt=Vt(Yt)).draggable=!1,Zt.style["will-change"]="",this._hideClone(),wt(Zt,this.options.chosenClass,!1),Nn.clone=Zt),n.cloneId=Bn(function(){zt("clone",n),Nn.eventCanceled||(n.options.removeCloneOnHide||Kt.insertBefore(Zt,Yt),n._hideClone(),Xt({sortable:n,name:"clone"}))}),!t&&wt(Yt,i.dragClass,!0),t?(wn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(mt(document,"mouseup",n._onDrop),mt(document,"touchend",n._onDrop),mt(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,Yt)),pt(document,"drop",n),_t(Yt,"transform","translateZ(0)")),yn=!0,n._dragStartId=Bn(n._dragStarted.bind(n,t,e)),pt(document,"selectstart",n),mn=!0,ct&&_t(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,i,r=this.el,a=e.target,l=this.options,s=l.group,c=Nn.active,d=an===s,u=l.sort,f=ln||c,p=this,m=!1;if(!En){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=gt(a,l.draggable,r,!0),D("dragOver"),Nn.eventCanceled)return m;if(Yt.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return R(!1);if(wn=!1,c&&!l.disabled&&(d?u||(o=Wt!==Kt):ln===this||(this.lastPutMode=an.checkPull(this,c,Yt,e))&&s.checkPut(this,c,Yt,e))){if(i="vertical"===this._getDirection(e,a),t=Et(Yt),D("dragOverValid"),Nn.eventCanceled)return m;if(o)return Wt=Kt,I(),this._hideClone(),D("revert"),Nn.eventCanceled||(Jt?Kt.insertBefore(Yt,Jt):Kt.appendChild(Yt)),R(!0);var v=Ot(r,l.draggable);if(!v||function(e,t,n){var o=Et(Ot(n.el,n.options.draggable)),i=10;return t?e.clientX>o.right+i||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+i}(e,i,this)&&!v.animated){if(v===Yt)return R(!1);if(v&&r===e.target&&(a=v),a&&(n=Et(a)),!1!==Ln(Kt,r,Yt,t,a,n,e,!!a))return I(),r.appendChild(Yt),Wt=r,T(),R(!0)}else if(v&&function(e,t,n){var o=Et(At(n.el,0,n.options,!0)),i=10;return t?e.clientX<o.left-i||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-i||e.clientY<o.bottom&&e.clientX<o.left}(e,i,this)){var h=At(r,0,l,!0);if(h===Yt)return R(!1);if(n=Et(a=h),!1!==Ln(Kt,r,Yt,t,a,n,e,!1))return I(),r.insertBefore(Yt,h),Wt=r,T(),R(!0)}else if(a.parentNode===r){n=Et(a);var g,b,y,w=Yt.parentNode!==r,_=!function(e,t,n){var o=n?e.left:e.top,i=n?e.right:e.bottom,r=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===a||i===l||o+r/2===a+s/2}(Yt.animated&&Yt.toRect||t,a.animated&&a.toRect||n,i),x=i?"top":"left",S=Ct(a,"top","top")||Ct(Yt,"top","top"),k=S?S.scrollTop:void 0;if(vn!==a&&(b=n[x],xn=!1,Sn=!_&&l.invertSwap||w),g=function(e,t,n,o,i,r,a,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,f=!1;if(!a)if(l&&gn<c*i){if(!xn&&(1===hn?s>d+c*r/2:s<u-c*r/2)&&(xn=!0),xn)f=!0;else if(1===hn?s<d+gn:s>u-gn)return-hn}else if(s>d+c*(1-i)/2&&s<u-c*(1-i)/2)return function(e){return Dt(Yt)<Dt(e)?1:-1}(t);if((f=f||a)&&(s<d+c*r/2||s>u-c*r/2))return s>d+c/2?1:-1;return 0}(e,a,n,i,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Sn,vn===a),0!==g){var E=Dt(Yt);do{E-=g,y=Wt.children[E]}while(y&&("none"===_t(y,"display")||y===Gt))}if(0===g||y===a)return R(!1);vn=a,hn=g;var C=a.nextElementSibling,A=!1,O=Ln(Kt,r,Yt,t,a,n,e,A=1===g);if(!1!==O)return 1!==O&&-1!==O||(A=1===O),En=!0,setTimeout(Fn,30),I(),A&&!C?r.appendChild(Yt):a.parentNode.insertBefore(Yt,A?C:a),S&&Mt(S,0,k-S.scrollTop),Wt=Yt.parentNode,void 0===b||Sn||(gn=Math.abs(b-Et(a)[x])),T(),R(!0)}if(r.contains(Yt))return R(!1)}return!1}function D(l,s){zt(l,p,Qe({evt:e,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:u,fromSortable:f,target:a,completed:R,onMove:function(n,o){return Ln(Kt,r,Yt,t,n,Et(n),e,o)},changed:T},s))}function I(){D("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function R(t){return D("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(p),p!==f&&(wt(Yt,ln?ln.options.ghostClass:c.options.ghostClass,!1),wt(Yt,l.ghostClass,!0)),ln!==p&&p!==Nn.active?ln=p:p===Nn.active&&ln&&(ln=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){D("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Yt&&!Yt.animated||a===r&&!a.animated)&&(vn=null),l.dragoverBubble||e.rootEl||a===document||(Yt.parentNode[Nt]._isOutsideThisEl(e.target),!t&&Un(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function T(){nn=Dt(Yt),rn=Dt(Yt,l.draggable),Xt({sortable:p,name:"change",toEl:r,newIndex:nn,newDraggableIndex:rn,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){mt(document,"mousemove",this._onTouchMove),mt(document,"touchmove",this._onTouchMove),mt(document,"pointermove",this._onTouchMove),mt(document,"dragover",Un),mt(document,"mousemove",Un),mt(document,"touchmove",Un)},_offUpEvents:function(){var e=this.el.ownerDocument;mt(e,"mouseup",this._onDrop),mt(e,"touchend",this._onDrop),mt(e,"pointerup",this._onDrop),mt(e,"touchcancel",this._onDrop),mt(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;nn=Dt(Yt),rn=Dt(Yt,n.draggable),zt("drop",this,{evt:e}),Wt=Yt&&Yt.parentNode,nn=Dt(Yt),rn=Dt(Yt,n.draggable),Nn.eventCanceled||(yn=!1,Sn=!1,xn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qn(this.cloneId),qn(this._dragStartId),this.nativeDraggable&&(mt(document,"drop",this),mt(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ct&&_t(document.body,"user-select",""),_t(Yt,"transform",""),e&&(mn&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Gt&&Gt.parentNode&&Gt.parentNode.removeChild(Gt),(Kt===Wt||ln&&"clone"!==ln.lastPutMode)&&Zt&&Zt.parentNode&&Zt.parentNode.removeChild(Zt),Yt&&(this.nativeDraggable&&mt(Yt,"dragend",this),$n(Yt),Yt.style["will-change"]="",mn&&!yn&&wt(Yt,ln?ln.options.ghostClass:this.options.ghostClass,!1),wt(Yt,this.options.chosenClass,!1),Xt({sortable:this,name:"unchoose",toEl:Wt,newIndex:null,newDraggableIndex:null,originalEvent:e}),Kt!==Wt?(nn>=0&&(Xt({rootEl:Wt,name:"add",toEl:Wt,fromEl:Kt,originalEvent:e}),Xt({sortable:this,name:"remove",toEl:Wt,originalEvent:e}),Xt({rootEl:Wt,name:"sort",toEl:Wt,fromEl:Kt,originalEvent:e}),Xt({sortable:this,name:"sort",toEl:Wt,originalEvent:e})),ln&&ln.save()):nn!==tn&&nn>=0&&(Xt({sortable:this,name:"update",toEl:Wt,originalEvent:e}),Xt({sortable:this,name:"sort",toEl:Wt,originalEvent:e})),Nn.active&&(null!=nn&&-1!==nn||(nn=tn,rn=on),Xt({sortable:this,name:"end",toEl:Wt,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){zt("nulling",this),Kt=Yt=Wt=Gt=Jt=Zt=Qt=en=sn=cn=mn=nn=rn=tn=on=vn=hn=ln=an=Nn.dragged=Nn.ghost=Nn.clone=Nn.active=null,Cn.forEach(function(e){e.checked=!0}),Cn.length=dn=un=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Yt&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)gt(e=n[o],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Hn(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(e,t){var i=o.children[t];gt(i,this.options.draggable,o,!1)&&(n[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return gt(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Ht.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Pn(n)},destroy:function(){zt("destroy",this);var e=this.el;e[Nt]=null,mt(e,"mousedown",this._onTapStart),mt(e,"touchstart",this._onTapStart),mt(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(mt(e,"dragover",this),mt(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),_n.splice(_n.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!en){if(zt("hideClone",this),Nn.eventCanceled)return;_t(Zt,"display","none"),this.options.removeCloneOnHide&&Zt.parentNode&&Zt.parentNode.removeChild(Zt),en=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(en){if(zt("showClone",this),Nn.eventCanceled)return;Yt.parentNode!=Kt||this.options.group.revertClone?Jt?Kt.insertBefore(Zt,Jt):Kt.appendChild(Zt):Kt.insertBefore(Zt,Yt),this.options.group.revertClone&&this.animate(Yt,Zt),_t(Zt,"display",""),en=!1}}else this._hideClone()}},An&&pt(document,"touchmove",function(e){(Nn.active||yn)&&e.cancelable&&e.preventDefault()}),Nn.utils={on:pt,off:mt,css:_t,find:St,is:function(e,t){return!!gt(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:Pt,closest:gt,toggleClass:wt,clone:Vt,index:Dt,nextTick:Bn,cancelNextTick:qn,detectDirection:Tn,getChild:At},Nn.get=function(e){return e[Nt]},Nn.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(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Nn.utils=Qe(Qe({},Nn.utils),e.utils)),Ht.mount(e)})},Nn.create=function(e,t){return new Nn(e,t)},Nn.version="1.14.0";var zn,Xn,Yn,Wn,Gn,Kn,Jn=[],Qn=!1;function Zn(){Jn.forEach(function(e){clearInterval(e.pid)}),Jn=[]}function eo(){clearInterval(Kn)}var to,no=Pt(function(e,t,n,o){if(t.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=kt(),d=!1;Xn!==n&&(Xn=n,Zn(),zn=t.scroll,i=t.scrollFn,!0===zn&&(zn=Rt(n,!0)));var u=0,f=zn;do{var p=f,m=Et(p),v=m.top,h=m.bottom,g=m.left,b=m.right,y=m.width,w=m.height,_=void 0,x=void 0,S=p.scrollWidth,k=p.scrollHeight,E=_t(p),C=p.scrollLeft,A=p.scrollTop;p===c?(_=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),x=w<k&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(_=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX),x=w<k&&("auto"===E.overflowY||"scroll"===E.overflowY));var O=_&&(Math.abs(b-r)<=l&&C+y<S)-(Math.abs(g-r)<=l&&!!C),D=x&&(Math.abs(h-a)<=l&&A+w<k)-(Math.abs(v-a)<=l&&!!A);if(!Jn[u])for(var I=0;I<=u;I++)Jn[I]||(Jn[I]={});Jn[u].vx==O&&Jn[u].vy==D&&Jn[u].el===p||(Jn[u].el=p,Jn[u].vx=O,Jn[u].vy=D,clearInterval(Jn[u].pid),0==O&&0==D||(d=!0,Jn[u].pid=setInterval(function(){o&&0===this.layer&&Nn.active._onTouchMove(Gn);var t=Jn[this.layer].vy?Jn[this.layer].vy*s:0,n=Jn[this.layer].vx?Jn[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Nn.dragged.parentNode[Nt],n,t,e,Gn,Jn[this.layer].el)||Mt(Jn[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&f!==c&&(f=Rt(f,!1)));Qn=d}},30),oo=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||i;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function io(){}function ro(){}io.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=At(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:oo},tt(io,{pluginName:"revertOnSpill"}),ro.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:oo},tt(ro,{pluginName:"removeOnSpill"});var ao,lo,so,co,uo,fo=[],po=[],mo=!1,vo=!1,ho=!1;function go(e,t){po.forEach(function(n,o){var i=t.children[n.sortableIndex+(e?Number(o):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function bo(){fo.forEach(function(e){e!==so&&e.parentNode&&e.parentNode.removeChild(e)})}Nn.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?pt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?pt(document,"pointermove",this._handleFallbackAutoScroll):t.touches?pt(document,"touchmove",this._handleFallbackAutoScroll):pt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?mt(document,"dragover",this._handleAutoScroll):(mt(document,"pointermove",this._handleFallbackAutoScroll),mt(document,"touchmove",this._handleFallbackAutoScroll),mt(document,"mousemove",this._handleFallbackAutoScroll)),eo(),Zn(),clearTimeout(bt),bt=void 0},nulling:function(){Gn=Xn=zn=Qn=Kn=Yn=Wn=null,Jn.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,i);if(Gn=e,t||this.options.forceAutoScrollFallback||lt||at||ct){no(e,this.options,r,t);var a=Rt(r,!0);!Qn||Kn&&o===Yn&&i===Wn||(Kn&&eo(),Kn=setInterval(function(){var r=Rt(document.elementFromPoint(o,i),!0);r!==a&&(a=r,Zn()),no(e,n.options,r,t)},10),Yn=o,Wn=i)}else{if(!this.options.bubbleScroll||Rt(r,!0)===kt())return void Zn();no(e,this.options,Rt(r,!1),!1)}}},tt(e,{pluginName:"scroll",initializeByDefault:!0})}),Nn.mount(ro,io);var yo,wo=Object.freeze({__proto__:null,MultiDrag:function(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?pt(document,"pointerup",this._deselectMultiDrag):(pt(document,"mouseup",this._deselectMultiDrag),pt(document,"touchend",this._deselectMultiDrag)),pt(document,"keydown",this._checkKeyDown),pt(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var o="";fo.length&&lo===e?fo.forEach(function(e,t){o+=(t?", ":"")+e.textContent}):o=n.textContent,t.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;so=t},delayEnded:function(){this.isMultiDrag=~fo.indexOf(so)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<fo.length;o++)po.push(Vt(fo[o])),po[o].sortableIndex=fo[o].sortableIndex,po[o].draggable=!1,po[o].style["will-change"]="",wt(po[o],this.options.selectedClass,!1),fo[o]===so&&wt(po[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,o=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||fo.length&&lo===t&&(go(!0,n),o("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,o=e.cancel;this.isMultiDrag&&(go(!1,n),po.forEach(function(e){_t(e,"display","")}),t(),uo=!1,o())},hideClone:function(e){var t=this;e.sortable;var n=e.cloneNowHidden,o=e.cancel;this.isMultiDrag&&(po.forEach(function(e){_t(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),n(),uo=!0,o())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&lo&&lo.multiDrag._deselectMultiDrag(),fo.forEach(function(e){e.sortableIndex=Dt(e)}),fo=fo.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),ho=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){fo.forEach(function(e){e!==so&&_t(e,"position","absolute")});var o=Et(so,!1,!0,!0);fo.forEach(function(e){e!==so&&Ut(e,o)}),vo=!0,mo=!0}n.animateAll(function(){vo=!1,mo=!1,t.options.animation&&fo.forEach(function(e){jt(e)}),t.options.sort&&bo()})}},dragOver:function(e){var t=e.target,n=e.completed,o=e.cancel;vo&&~fo.indexOf(t)&&(n(!1),o())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,i=e.dragRect;fo.length>1&&(fo.forEach(function(e){o.addAnimationState({target:e,rect:vo?Et(e):i}),jt(e),e.fromRect=i,t.removeAnimationState(e)}),vo=!1,function(e,t){fo.forEach(function(n,o){var i=t.children[n.sortableIndex+(e?Number(o):0)];i?t.insertBefore(n,i):t.appendChild(n)})}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.insertion,i=e.activeSortable,r=e.parentEl,a=e.putSortable,l=this.options;if(o){if(n&&i._hideClone(),mo=!1,l.animation&&fo.length>1&&(vo||!n&&!i.options.sort&&!a)){var s=Et(so,!1,!0,!0);fo.forEach(function(e){e!==so&&(Ut(e,s),r.appendChild(e))}),vo=!0}if(!n)if(vo||bo(),fo.length>1){var c=uo;i._showClone(t),i.options.animation&&!uo&&c&&po.forEach(function(e){i.addAnimationState({target:e,rect:co}),e.fromRect=co,e.thisAnimationDuration=null})}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(fo.forEach(function(e){e.thisAnimationDuration=null}),o.options.animation&&!n&&o.multiDrag.isMultiDrag){co=tt({},t);var i=xt(so,!0);co.top-=i.f,co.left-=i.e}},dragOverAnimationComplete:function(){vo&&(vo=!1,bo())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,i=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,d=o.children;if(!ho)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),wt(so,c.selectedClass,!~fo.indexOf(so)),~fo.indexOf(so))fo.splice(fo.indexOf(so),1),ao=null,Bt({sortable:i,rootEl:n,name:"deselect",targetEl:so});else{if(fo.push(so),Bt({sortable:i,rootEl:n,name:"select",targetEl:so}),t.shiftKey&&ao&&i.el.contains(ao)){var u,f,p=Dt(ao),m=Dt(so);if(~p&&~m&&p!==m)for(m>p?(f=p,u=m):(f=m,u=p+1);f<u;f++)~fo.indexOf(d[f])||(wt(d[f],c.selectedClass,!0),fo.push(d[f]),Bt({sortable:i,rootEl:n,name:"select",targetEl:d[f]}))}else ao=so;lo=s}if(ho&&this.isMultiDrag){if(vo=!1,(o[Nt].options.sort||o!==n)&&fo.length>1){var v=Et(so),h=Dt(so,":not(."+this.options.selectedClass+")");if(!mo&&c.animation&&(so.thisAnimationDuration=null),s.captureAnimationState(),!mo&&(c.animation&&(so.fromRect=v,fo.forEach(function(e){if(e.thisAnimationDuration=null,e!==so){var t=vo?Et(e):v;e.fromRect=t,s.addAnimationState({target:e,rect:t})}})),bo(),fo.forEach(function(e){d[h]?o.insertBefore(e,d[h]):o.appendChild(e),h++}),a===Dt(so))){var g=!1;fo.forEach(function(e){e.sortableIndex===Dt(e)||(g=!0)}),g&&r("update")}fo.forEach(function(e){jt(e)}),s.animateAll()}lo=s}(n===o||l&&"clone"!==l.lastPutMode)&&po.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=ho=!1,po.length=0},destroyGlobal:function(){this._deselectMultiDrag(),mt(document,"pointerup",this._deselectMultiDrag),mt(document,"mouseup",this._deselectMultiDrag),mt(document,"touchend",this._deselectMultiDrag),mt(document,"keydown",this._checkKeyDown),mt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==ho&&ho||lo!==this.sortable||e&>(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;fo.length;){var t=fo[0];wt(t,this.options.selectedClass,!1),fo.shift(),Bt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},tt(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[Nt];t&&t.options.multiDrag&&!~fo.indexOf(e)&&(lo&&lo!==t&&(lo.multiDrag._deselectMultiDrag(),lo=t),wt(e,t.options.selectedClass,!0),fo.push(e))},deselect:function(e){var t=e.parentNode[Nt],n=fo.indexOf(e);t&&t.options.multiDrag&&~n&&(wt(e,t.options.selectedClass,!1),fo.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return fo.forEach(function(o){var i;t.push({multiDragElement:o,index:o.sortableIndex}),i=vo&&o!==so?-1:vo?Dt(o,":not(."+e.options.selectedClass+")"):Dt(o),n.push({multiDragElement:o,index:i})}),{items:ot(fo),clones:[].concat(po),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})},Sortable:Nn,Swap:function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;to=t},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.onMove,i=e.activeSortable,r=e.changed,a=e.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=to;!1!==o(n)?(wt(n,s.swapClass,!0),to=n):to=null,c&&c!==to&&wt(c,s.swapClass,!1)}r(),t(!0),a()}},drop:function(e){var t=e.activeSortable,n=e.putSortable,o=e.dragEl,i=n||this.sortable,r=this.options;to&&wt(to,r.swapClass,!1),to&&(r.swap||n&&n.options.swap)&&o!==to&&(i.captureAnimationState(),i!==t&&t.captureAnimationState(),function(e,t){var n,o,i=e.parentNode,r=t.parentNode;if(!i||!r||i.isEqualNode(t)||r.isEqualNode(e))return;n=Dt(e),o=Dt(t),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(t,i.children[n]),r.insertBefore(e,r.children[o])}(o,to),i.animateAll(),i!==t&&t.animateAll())},nulling:function(){to=null}},tt(e,{pluginName:"swap",eventProperties:function(){return{swapItem:to}}})},default:Nn});var _o,xo=yo?Ge.exports:(yo=1,"undefined"!=typeof self&&self,_o=function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"00ee":function(e,t,n){var o={};o[n("b622")("toStringTag")]="z",e.exports="[object z]"===String(o)},"0366":function(e,t,n){var o=n("1c0b");e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,i){return e.call(t,n,o,i)}}return function(){return e.apply(t,arguments)}}},"057f":function(e,t,n){var o=n("fc6a"),i=n("241c").f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==r.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(o(e))}},"06cf":function(e,t,n){var o=n("83ab"),i=n("d1e7"),r=n("5c6c"),a=n("fc6a"),l=n("c04e"),s=n("5135"),c=n("0cfb"),d=Object.getOwnPropertyDescriptor;t.f=o?d:function(e,t){if(e=a(e),t=l(t,!0),c)try{return d(e,t)}catch(e){}if(s(e,t))return r(!i.f.call(e,t),e[t])}},"0cfb":function(e,t,n){var o=n("83ab"),i=n("d039"),r=n("cc12");e.exports=!o&&!i(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})},"13d5":function(e,t,n){var o=n("23e7"),i=n("d58f").left,r=n("a640"),a=n("ae40"),l=r("reduce"),s=a("reduce",{1:0});o({target:"Array",proto:!0,forced:!l||!s},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(e,t,n){var o=n("c6b6"),i=n("9263");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"159b":function(e,t,n){var o=n("da84"),i=n("fdbc"),r=n("17c2"),a=n("9112");for(var l in i){var s=o[l],c=s&&s.prototype;if(c&&c.forEach!==r)try{a(c,"forEach",r)}catch(e){c.forEach=r}}},"17c2":function(e,t,n){var o=n("b727").forEach,i=n("a640"),r=n("ae40"),a=i("forEach"),l=r("forEach");e.exports=a&&l?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}},"1be4":function(e,t,n){var o=n("d066");e.exports=o("document","documentElement")},"1c0b":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"1c7e":function(e,t,n){var o=n("b622")("iterator"),i=!1;try{var r=0,a={next:function(){return{done:!!r++}},return:function(){i=!0}};a[o]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}},"1d80":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"1dde":function(e,t,n){var o=n("d039"),i=n("b622"),r=n("2d00"),a=i("species");e.exports=function(e){return r>=51||!o(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},"23cb":function(e,t,n){var o=n("a691"),i=Math.max,r=Math.min;e.exports=function(e,t){var n=o(e);return n<0?i(n+t,0):r(n,t)}},"23e7":function(e,t,n){var o=n("da84"),i=n("06cf").f,r=n("9112"),a=n("6eeb"),l=n("ce4e"),s=n("e893"),c=n("94ca");e.exports=function(e,t){var n,d,u,f,p,m=e.target,v=e.global,h=e.stat;if(n=v?o:h?o[m]||l(m,{}):(o[m]||{}).prototype)for(d in t){if(f=t[d],u=e.noTargetGet?(p=i(n,d))&&p.value:n[d],!c(v?d:m+(h?".":"#")+d,e.forced)&&void 0!==u){if(typeof f==typeof u)continue;s(f,u)}(e.sham||u&&u.sham)&&r(f,"sham",!0),a(n,d,f,e)}}},"241c":function(e,t,n){var o=n("ca84"),i=n("7839").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,i)}},"25f0":function(e,t,n){var o=n("6eeb"),i=n("825a"),r=n("d039"),a=n("ad6d"),l="toString",s=RegExp.prototype,c=s[l],d=r(function(){return"/a/b"!=c.call({source:"a",flags:"b"})}),u=c.name!=l;(d||u)&&o(RegExp.prototype,l,function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)},{unsafe:!0})},"2ca0":function(e,t,n){var o,i=n("23e7"),r=n("06cf").f,a=n("50c4"),l=n("5a34"),s=n("1d80"),c=n("ab13"),d=n("c430"),u="".startsWith,f=Math.min,p=c("startsWith");i({target:"String",proto:!0,forced:!(!d&&!p&&(o=r(String.prototype,"startsWith"),o&&!o.writable)||p)},{startsWith:function(e){var t=String(s(this));l(e);var n=a(f(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return u?u.call(t,o,n):t.slice(n,n+o.length)===o}})},"2d00":function(e,t,n){var o,i,r=n("da84"),a=n("342f"),l=r.process,s=l&&l.versions,c=s&&s.v8;c?i=(o=c.split("."))[0]+o[1]:a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(i=o[1]),e.exports=i&&+i},"342f":function(e,t,n){var o=n("d066");e.exports=o("navigator","userAgent")||""},"35a1":function(e,t,n){var o=n("f5df"),i=n("3f8c"),r=n("b622")("iterator");e.exports=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},"37e8":function(e,t,n){var o=n("83ab"),i=n("9bf2"),r=n("825a"),a=n("df75");e.exports=o?Object.defineProperties:function(e,t){r(e);for(var n,o=a(t),l=o.length,s=0;l>s;)i.f(e,n=o[s++],t[n]);return e}},"3bbe":function(e,t,n){var o=n("861d");e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"3ca3":function(e,t,n){var o=n("6547").charAt,i=n("69f3"),r=n("7dd0"),a="String Iterator",l=i.set,s=i.getterFor(a);r(String,"String",function(e){l(this,{type:a,string:String(e),index:0})},function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=o(n,i),t.index+=e.length,{value:e,done:!1})})},"3f8c":function(e,t){e.exports={}},4160:function(e,t,n){var o=n("23e7"),i=n("17c2");o({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(e,t,n){var o=n("da84");e.exports=o},"44ad":function(e,t,n){var o=n("d039"),i=n("c6b6"),r="".split;e.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?r.call(e,""):Object(e)}:Object},"44d2":function(e,t,n){var o=n("b622"),i=n("7c73"),r=n("9bf2"),a=o("unscopables"),l=Array.prototype;null==l[a]&&r.f(l,a,{configurable:!0,value:i(null)}),e.exports=function(e){l[a][e]=!0}},"44e7":function(e,t,n){var o=n("861d"),i=n("c6b6"),r=n("b622")("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[r])?!!t:"RegExp"==i(e))}},4930:function(e,t,n){var o=n("d039");e.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"4d64":function(e,t,n){var o=n("fc6a"),i=n("50c4"),r=n("23cb"),a=function(e){return function(t,n,a){var l,s=o(t),c=i(s.length),d=r(a,c);if(e&&n!=n){for(;c>d;)if((l=s[d++])!=l)return!0}else for(;c>d;d++)if((e||d in s)&&s[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(e,t,n){var o=n("23e7"),i=n("b727").filter,r=n("1dde"),a=n("ae40"),l=r("filter"),s=a("filter");o({target:"Array",proto:!0,forced:!l||!s},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(e,t,n){var o=n("0366"),i=n("7b0b"),r=n("9bdd"),a=n("e95a"),l=n("50c4"),s=n("8418"),c=n("35a1");e.exports=function(e){var t,n,d,u,f,p,m=i(e),v="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,b=void 0!==g,y=c(m),w=0;if(b&&(g=o(g,h>2?arguments[2]:void 0,2)),null==y||v==Array&&a(y))for(n=new v(t=l(m.length));t>w;w++)p=b?g(m[w],w):m[w],s(n,w,p);else for(f=(u=y.call(m)).next,n=new v;!(d=f.call(u)).done;w++)p=b?r(u,g,[d.value,w],!0):d.value,s(n,w,p);return n.length=w,n}},"4fad":function(e,t,n){var o=n("23e7"),i=n("6f53").entries;o({target:"Object",stat:!0},{entries:function(e){return i(e)}})},"50c4":function(e,t,n){var o=n("a691"),i=Math.min;e.exports=function(e){return e>0?i(o(e),9007199254740991):0}},5135:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},5319:function(e,t,n){var o=n("d784"),i=n("825a"),r=n("7b0b"),a=n("50c4"),l=n("a691"),s=n("1d80"),c=n("8aa5"),d=n("14c3"),u=Math.max,f=Math.min,p=Math.floor,m=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g,h=function(e){return void 0===e?e:String(e)};o("replace",2,function(e,t,n,o){var g=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=o.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,o){var i=s(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i,o):t.call(String(i),n,o)},function(e,o){if(!g&&b||"string"==typeof o&&-1===o.indexOf(y)){var r=n(t,e,this,o);if(r.done)return r.value}var s=i(e),p=String(this),m="function"==typeof o;m||(o=String(o));var v=s.global;if(v){var _=s.unicode;s.lastIndex=0}for(var x=[];;){var S=d(s,p);if(null===S)break;if(x.push(S),!v)break;""===String(S[0])&&(s.lastIndex=c(p,a(s.lastIndex),_))}for(var k="",E=0,C=0;C<x.length;C++){S=x[C];for(var A=String(S[0]),O=u(f(l(S.index),p.length),0),D=[],I=1;I<S.length;I++)D.push(h(S[I]));var R=S.groups;if(m){var T=[A].concat(D,O,p);void 0!==R&&T.push(R);var P=String(o.apply(void 0,T))}else P=w(A,p,O,D,R,o);O>=E&&(k+=p.slice(E,O)+P,E=O+A.length)}return k+p.slice(E)}];function w(e,n,o,i,a,l){var s=o+e.length,c=i.length,d=v;return void 0!==a&&(a=r(a),d=m),t.call(l,d,function(t,r){var l;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,o);case"'":return n.slice(s);case"<":l=a[r.slice(1,-1)];break;default:var d=+r;if(0===d)return t;if(d>c){var u=p(d/10);return 0===u?t:u<=c?void 0===i[u-1]?r.charAt(1):i[u-1]+r.charAt(1):t}l=i[d-1]}return void 0===l?"":l})}})},5692:function(e,t,n){var o=n("c430"),i=n("c6cd");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,t,n){var o=n("d066"),i=n("241c"),r=n("7418"),a=n("825a");e.exports=o("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=r.f;return n?t.concat(n(e)):t}},"5a34":function(e,t,n){var o=n("44e7");e.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5db7":function(e,t,n){var o=n("23e7"),i=n("a2bf"),r=n("7b0b"),a=n("50c4"),l=n("1c0b"),s=n("65f0");o({target:"Array",proto:!0},{flatMap:function(e){var t,n=r(this),o=a(n.length);return l(e),(t=s(n,0)).length=i(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},6547:function(e,t,n){var o=n("a691"),i=n("1d80"),r=function(e){return function(t,n){var r,a,l=String(i(t)),s=o(n),c=l.length;return s<0||s>=c?e?"":void 0:(r=l.charCodeAt(s))<55296||r>56319||s+1===c||(a=l.charCodeAt(s+1))<56320||a>57343?e?l.charAt(s):r:e?l.slice(s,s+2):a-56320+(r-55296<<10)+65536}};e.exports={codeAt:r(!1),charAt:r(!0)}},"65f0":function(e,t,n){var o=n("861d"),i=n("e8b5"),r=n("b622")("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[r])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},"69f3":function(e,t,n){var o,i,r,a=n("7f9a"),l=n("da84"),s=n("861d"),c=n("9112"),d=n("5135"),u=n("f772"),f=n("d012"),p=l.WeakMap;if(a){var m=new p,v=m.get,h=m.has,g=m.set;o=function(e,t){return g.call(m,e,t),t},i=function(e){return v.call(m,e)||{}},r=function(e){return h.call(m,e)}}else{var b=u("state");f[b]=!0,o=function(e,t){return c(e,b,t),t},i=function(e){return d(e,b)?e[b]:{}},r=function(e){return d(e,b)}}e.exports={set:o,get:i,has:r,enforce:function(e){return r(e)?i(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"6eeb":function(e,t,n){var o=n("da84"),i=n("9112"),r=n("5135"),a=n("ce4e"),l=n("8925"),s=n("69f3"),c=s.get,d=s.enforce,u=String(String).split("String");(e.exports=function(e,t,n,l){var s=!!l&&!!l.unsafe,c=!!l&&!!l.enumerable,f=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof t||r(n,"name")||i(n,"name",t),d(n).source=u.join("string"==typeof t?t:"")),e!==o?(s?!f&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:a(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&c(this).source||l(this)})},"6f53":function(e,t,n){var o=n("83ab"),i=n("df75"),r=n("fc6a"),a=n("d1e7").f,l=function(e){return function(t){for(var n,l=r(t),s=i(l),c=s.length,d=0,u=[];c>d;)n=s[d++],o&&!a.call(l,n)||u.push(e?[n,l[n]]:l[n]);return u}};e.exports={entries:l(!0),values:l(!1)}},"73d9":function(e,t,n){n("44d2")("flatMap")},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,n){var o=n("428f"),i=n("5135"),r=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});i(t,e)||a(t,e,{value:r.f(e)})}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(e,t,n){var o=n("1d80");e.exports=function(e){return Object(o(e))}},"7c73":function(e,t,n){var o,i=n("825a"),r=n("37e8"),a=n("7839"),l=n("d012"),s=n("1be4"),c=n("cc12"),d=n("f772"),u="prototype",f="script",p=d("IE_PROTO"),m=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},h=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;h=o?function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):(t=c("iframe"),n="java"+f+":",t.style.display="none",s.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F);for(var i=a.length;i--;)delete h[u][a[i]];return h()};l[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[u]=i(e),n=new m,m[u]=null,n[p]=e):n=h(),void 0===t?n:r(n,t)}},"7dd0":function(e,t,n){var o=n("23e7"),i=n("9ed3"),r=n("e163"),a=n("d2bb"),l=n("d44e"),s=n("9112"),c=n("6eeb"),d=n("b622"),u=n("c430"),f=n("3f8c"),p=n("ae93"),m=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,h=d("iterator"),g="keys",b="values",y="entries",w=function(){return this};e.exports=function(e,t,n,d,p,_,x){i(n,t,d);var S,k,E,C=function(e){if(e===p&&R)return R;if(!v&&e in D)return D[e];switch(e){case g:case b:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+" Iterator",O=!1,D=e.prototype,I=D[h]||D["@@iterator"]||p&&D[p],R=!v&&I||C(p),T="Array"==t&&D.entries||I;if(T&&(S=r(T.call(new e)),m!==Object.prototype&&S.next&&(u||r(S)===m||(a?a(S,m):"function"!=typeof S[h]&&s(S,h,w)),l(S,A,!0,!0),u&&(f[A]=w))),p==b&&I&&I.name!==b&&(O=!0,R=function(){return I.call(this)}),u&&!x||D[h]===R||s(D,h,R),f[t]=R,p)if(k={values:C(b),keys:_?R:C(g),entries:C(y)},x)for(E in k)(v||O||!(E in D))&&c(D,E,k[E]);else o({target:t,proto:!0,forced:v||O},k);return k}},"7f9a":function(e,t,n){var o=n("da84"),i=n("8925"),r=o.WeakMap;e.exports="function"==typeof r&&/native code/.test(i(r))},"825a":function(e,t,n){var o=n("861d");e.exports=function(e){if(!o(e))throw TypeError(String(e)+" is not an object");return e}},"83ab":function(e,t,n){var o=n("d039");e.exports=!o(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},8418:function(e,t,n){var o=n("c04e"),i=n("9bf2"),r=n("5c6c");e.exports=function(e,t,n){var a=o(t);a in e?i.f(e,a,r(0,n)):e[a]=n}},"861d":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},8875:function(e,t,n){var o,i,r;"undefined"!=typeof self&&self,i=[],void 0===(r="function"==typeof(o=function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(e){var n,o,i,r=/@([^@]*):(\d+):(\d+)\s*$/gi,a=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e.stack)||r.exec(e.stack),l=a&&a[1]||!1,s=a&&a[2]||!1,c=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");l===c&&(n=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(o,"$1").trim());for(var u=0;u<d.length;u++){if("interactive"===d[u].readyState)return d[u];if(d[u].src===l)return d[u];if(l===c&&d[u].innerHTML&&d[u].innerHTML.trim()===i)return d[u]}return null}}return e})?o.apply(t,i):o)||(e.exports=r)},8925:function(e,t,n){var o=n("c6cd"),i=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return i.call(e)}),e.exports=o.inspectSource},"8aa5":function(e,t,n){var o=n("6547").charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},"8bbf":function(t,n){t.exports=e},"90e3":function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+o).toString(36)}},9112:function(e,t,n){var o=n("83ab"),i=n("9bf2"),r=n("5c6c");e.exports=o?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},9263:function(e,t,n){var o,i,r=n("ad6d"),a=n("9f7f"),l=RegExp.prototype.exec,s=String.prototype.replace,c=l,d=(o=/a/,i=/b*/g,l.call(o,"a"),l.call(i,"a"),0!==o.lastIndex||0!==i.lastIndex),u=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(d||f||u)&&(c=function(e){var t,n,o,i,a=this,c=u&&a.sticky,p=r.call(a),m=a.source,v=0,h=e;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),h=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(m="(?: "+m+")",h=" "+h,v++),n=new RegExp("^(?:"+m+")",p)),f&&(n=new RegExp("^"+m+"$(?!\\s)",p)),d&&(t=a.lastIndex),o=l.call(c?n:a,h),c?o?(o.input=o.input.slice(v),o[0]=o[0].slice(v),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:d&&o&&(a.lastIndex=a.global?o.index+o[0].length:t),f&&o&&o.length>1&&s.call(o[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o}),e.exports=c},"94ca":function(e,t,n){var o=n("d039"),i=/#|\.prototype\./,r=function(e,t){var n=l[a(e)];return n==c||n!=s&&("function"==typeof t?o(t):!!t)},a=r.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=r.data={},s=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},"99af":function(e,t,n){var o=n("23e7"),i=n("d039"),r=n("e8b5"),a=n("861d"),l=n("7b0b"),s=n("50c4"),c=n("8418"),d=n("65f0"),u=n("1dde"),f=n("b622"),p=n("2d00"),m=f("isConcatSpreadable"),v=9007199254740991,h="Maximum allowed index exceeded",g=p>=51||!i(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),b=u("concat"),y=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:r(e)};o({target:"Array",proto:!0,forced:!g||!b},{concat:function(e){var t,n,o,i,r,a=l(this),u=d(a,0),f=0;for(t=-1,o=arguments.length;t<o;t++)if(y(r=-1===t?a:arguments[t])){if(f+(i=s(r.length))>v)throw TypeError(h);for(n=0;n<i;n++,f++)n in r&&c(u,f,r[n])}else{if(f>=v)throw TypeError(h);c(u,f++,r)}return u.length=f,u}})},"9bdd":function(e,t,n){var o=n("825a");e.exports=function(e,t,n,i){try{return i?t(o(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&o(r.call(e)),t}}},"9bf2":function(e,t,n){var o=n("83ab"),i=n("0cfb"),r=n("825a"),a=n("c04e"),l=Object.defineProperty;t.f=o?l:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"9ed3":function(e,t,n){var o=n("ae93").IteratorPrototype,i=n("7c73"),r=n("5c6c"),a=n("d44e"),l=n("3f8c"),s=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(o,{next:r(1,n)}),a(e,c,!1,!0),l[c]=s,e}},"9f7f":function(e,t,n){var o=n("d039");function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=o(function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),t.BROKEN_CARET=o(function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},a2bf:function(e,t,n){var o=n("e8b5"),i=n("50c4"),r=n("0366"),a=function(e,t,n,l,s,c,d,u){for(var f,p=s,m=0,v=!!d&&r(d,u,3);m<l;){if(m in n){if(f=v?v(n[m],m,t):n[m],c>0&&o(f))p=a(e,t,f,i(f.length),p,c-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=f}p++}m++}return p};e.exports=a},a352:function(e,n){e.exports=t},a434:function(e,t,n){var o=n("23e7"),i=n("23cb"),r=n("a691"),a=n("50c4"),l=n("7b0b"),s=n("65f0"),c=n("8418"),d=n("1dde"),u=n("ae40"),f=d("splice"),p=u("splice",{ACCESSORS:!0,0:0,1:2}),m=Math.max,v=Math.min;o({target:"Array",proto:!0,forced:!f||!p},{splice:function(e,t){var n,o,d,u,f,p,h=l(this),g=a(h.length),b=i(e,g),y=arguments.length;if(0===y?n=o=0:1===y?(n=0,o=g-b):(n=y-2,o=v(m(r(t),0),g-b)),g+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(d=s(h,o),u=0;u<o;u++)(f=b+u)in h&&c(d,u,h[f]);if(d.length=o,n<o){for(u=b;u<g-o;u++)p=u+n,(f=u+o)in h?h[p]=h[f]:delete h[p];for(u=g;u>g-o+n;u--)delete h[u-1]}else if(n>o)for(u=g-o;u>b;u--)p=u+n-1,(f=u+o-1)in h?h[p]=h[f]:delete h[p];for(u=0;u<n;u++)h[u+b]=arguments[u+2];return h.length=g-o+n,d}})},a4d3:function(e,t,n){var o=n("23e7"),i=n("da84"),r=n("d066"),a=n("c430"),l=n("83ab"),s=n("4930"),c=n("fdbf"),d=n("d039"),u=n("5135"),f=n("e8b5"),p=n("861d"),m=n("825a"),v=n("7b0b"),h=n("fc6a"),g=n("c04e"),b=n("5c6c"),y=n("7c73"),w=n("df75"),_=n("241c"),x=n("057f"),S=n("7418"),k=n("06cf"),E=n("9bf2"),C=n("d1e7"),A=n("9112"),O=n("6eeb"),D=n("5692"),I=n("f772"),R=n("d012"),T=n("90e3"),P=n("b622"),M=n("e538"),V=n("746f"),U=n("d44e"),j=n("69f3"),N=n("b727").forEach,L=I("hidden"),$="Symbol",F="prototype",H=P("toPrimitive"),B=j.set,q=j.getterFor($),z=Object[F],X=i.Symbol,Y=r("JSON","stringify"),W=k.f,G=E.f,K=x.f,J=C.f,Q=D("symbols"),Z=D("op-symbols"),ee=D("string-to-symbol-registry"),te=D("symbol-to-string-registry"),ne=D("wks"),oe=i.QObject,ie=!oe||!oe[F]||!oe[F].findChild,re=l&&d(function(){return 7!=y(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a})?function(e,t,n){var o=W(z,t);o&&delete z[t],G(e,t,n),o&&e!==z&&G(z,t,o)}:G,ae=function(e,t){var n=Q[e]=y(X[F]);return B(n,{type:$,tag:e,description:t}),l||(n.description=t),n},le=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof X},se=function(e,t,n){e===z&&se(Z,t,n),m(e);var o=g(t,!0);return m(n),u(Q,o)?(n.enumerable?(u(e,L)&&e[L][o]&&(e[L][o]=!1),n=y(n,{enumerable:b(0,!1)})):(u(e,L)||G(e,L,b(1,{})),e[L][o]=!0),re(e,o,n)):G(e,o,n)},ce=function(e,t){m(e);var n=h(t),o=w(n).concat(pe(n));return N(o,function(t){l&&!de.call(n,t)||se(e,t,n[t])}),e},de=function(e){var t=g(e,!0),n=J.call(this,t);return!(this===z&&u(Q,t)&&!u(Z,t))&&(!(n||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||n)},ue=function(e,t){var n=h(e),o=g(t,!0);if(n!==z||!u(Q,o)||u(Z,o)){var i=W(n,o);return!i||!u(Q,o)||u(n,L)&&n[L][o]||(i.enumerable=!0),i}},fe=function(e){var t=K(h(e)),n=[];return N(t,function(e){u(Q,e)||u(R,e)||n.push(e)}),n},pe=function(e){var t=e===z,n=K(t?Z:h(e)),o=[];return N(n,function(e){!u(Q,e)||t&&!u(z,e)||o.push(Q[e])}),o};s||(X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=T(e),n=function(e){this===z&&n.call(Z,e),u(this,L)&&u(this[L],t)&&(this[L][t]=!1),re(this,t,b(1,e))};return l&&ie&&re(z,t,{configurable:!0,set:n}),ae(t,e)},O(X[F],"toString",function(){return q(this).tag}),O(X,"withoutSetter",function(e){return ae(T(e),e)}),C.f=de,E.f=se,k.f=ue,_.f=x.f=fe,S.f=pe,M.f=function(e){return ae(P(e),e)},l&&(G(X[F],"description",{configurable:!0,get:function(){return q(this).description}}),a||O(z,"propertyIsEnumerable",de,{unsafe:!0}))),o({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:X}),N(w(ne),function(e){V(e)}),o({target:$,stat:!0,forced:!s},{for:function(e){var t=String(e);if(u(ee,t))return ee[t];var n=X(t);return ee[t]=n,te[n]=t,n},keyFor:function(e){if(!le(e))throw TypeError(e+" is not a symbol");if(u(te,e))return te[e]},useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),o({target:"Object",stat:!0,forced:!s,sham:!l},{create:function(e,t){return void 0===t?y(e):ce(y(e),t)},defineProperty:se,defineProperties:ce,getOwnPropertyDescriptor:ue}),o({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:fe,getOwnPropertySymbols:pe}),o({target:"Object",stat:!0,forced:d(function(){S.f(1)})},{getOwnPropertySymbols:function(e){return S.f(v(e))}}),Y&&o({target:"JSON",stat:!0,forced:!s||d(function(){var e=X();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))})},{stringify:function(e,t,n){for(var o,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(o=t,(p(t)||void 0!==e)&&!le(e))return f(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!le(t))return t}),i[1]=t,Y.apply(null,i)}}),X[F][H]||A(X[F],H,X[F].valueOf),U(X,$),R[L]=!0},a630:function(e,t,n){var o=n("23e7"),i=n("4df4");o({target:"Array",stat:!0,forced:!n("1c7e")(function(e){Array.from(e)})},{from:i})},a640:function(e,t,n){var o=n("d039");e.exports=function(e,t){var n=[][e];return!!n&&o(function(){n.call(null,t||function(){throw 1},1)})}},a691:function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},ab13:function(e,t,n){var o=n("b622")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(e){}}return!1}},ac1f:function(e,t,n){var o=n("23e7"),i=n("9263");o({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(e,t,n){var o=n("825a");e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ae40:function(e,t,n){var o=n("83ab"),i=n("d039"),r=n("5135"),a=Object.defineProperty,l={},s=function(e){throw e};e.exports=function(e,t){if(r(l,e))return l[e];t||(t={});var n=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,d=r(t,0)?t[0]:s,u=r(t,1)?t[1]:void 0;return l[e]=!!n&&!i(function(){if(c&&!o)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,d,u)})}},ae93:function(e,t,n){var o,i,r,a=n("e163"),l=n("9112"),s=n("5135"),c=n("b622"),d=n("c430"),u=c("iterator"),f=!1;[].keys&&("next"in(r=[].keys())?(i=a(a(r)))!==Object.prototype&&(o=i):f=!0),null==o&&(o={}),d||s(o,u)||l(o,u,function(){return this}),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:f}},b041:function(e,t,n){var o=n("00ee"),i=n("f5df");e.exports=o?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(e,t,n){var o=n("83ab"),i=n("9bf2").f,r=Function.prototype,a=r.toString,l=/^\s*function ([^ (]*)/,s="name";o&&!(s in r)&&i(r,s,{configurable:!0,get:function(){try{return a.call(this).match(l)[1]}catch(e){return""}}})},b622:function(e,t,n){var o=n("da84"),i=n("5692"),r=n("5135"),a=n("90e3"),l=n("4930"),s=n("fdbf"),c=i("wks"),d=o.Symbol,u=s?d:d&&d.withoutSetter||a;e.exports=function(e){return r(c,e)||(l&&r(d,e)?c[e]=d[e]:c[e]=u("Symbol."+e)),c[e]}},b64b:function(e,t,n){var o=n("23e7"),i=n("7b0b"),r=n("df75");o({target:"Object",stat:!0,forced:n("d039")(function(){r(1)})},{keys:function(e){return r(i(e))}})},b727:function(e,t,n){var o=n("0366"),i=n("44ad"),r=n("7b0b"),a=n("50c4"),l=n("65f0"),s=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,d=4==e,u=6==e,f=5==e||u;return function(p,m,v,h){for(var g,b,y=r(p),w=i(y),_=o(m,v,3),x=a(w.length),S=0,k=h||l,E=t?k(p,x):n?k(p,0):void 0;x>S;S++)if((f||S in w)&&(b=_(g=w[S],S,y),e))if(t)E[S]=b;else if(b)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:s.call(E,g)}else if(d)return!1;return u?-1:c||d?d:E}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},c04e:function(e,t,n){var o=n("861d");e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},c430:function(e,t){e.exports=!1},c6b6:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},c6cd:function(e,t,n){var o=n("da84"),i=n("ce4e"),r="__core-js_shared__",a=o[r]||i(r,{});e.exports=a},c740:function(e,t,n){var o=n("23e7"),i=n("b727").findIndex,r=n("44d2"),a=n("ae40"),l="findIndex",s=!0,c=a(l);l in[]&&Array(1)[l](function(){s=!1}),o({target:"Array",proto:!0,forced:s||!c},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(l)},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},c975:function(e,t,n){var o=n("23e7"),i=n("4d64").indexOf,r=n("a640"),a=n("ae40"),l=[].indexOf,s=!!l&&1/[1].indexOf(1,-0)<0,c=r("indexOf"),d=a("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:s||!c||!d},{indexOf:function(e){return s?l.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},ca84:function(e,t,n){var o=n("5135"),i=n("fc6a"),r=n("4d64").indexOf,a=n("d012");e.exports=function(e,t){var n,l=i(e),s=0,c=[];for(n in l)!o(a,n)&&o(l,n)&&c.push(n);for(;t.length>s;)o(l,n=t[s++])&&(~r(c,n)||c.push(n));return c}},caad:function(e,t,n){var o=n("23e7"),i=n("4d64").includes,r=n("44d2");o({target:"Array",proto:!0,forced:!n("ae40")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")},cc12:function(e,t,n){var o=n("da84"),i=n("861d"),r=o.document,a=i(r)&&i(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},ce4e:function(e,t,n){var o=n("da84"),i=n("9112");e.exports=function(e,t){try{i(o,e,t)}catch(n){o[e]=t}return t}},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},d066:function(e,t,n){var o=n("428f"),i=n("da84"),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(o[e])||r(i[e]):o[e]&&o[e][t]||i[e]&&i[e][t]}},d1e7:function(e,t,n){var o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!o.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:o},d28b:function(e,t,n){n("746f")("iterator")},d2bb:function(e,t,n){var o=n("825a"),i=n("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e.call(n,r):n.__proto__=r,n}}():void 0)},d3b7:function(e,t,n){var o=n("00ee"),i=n("6eeb"),r=n("b041");o||i(Object.prototype,"toString",r,{unsafe:!0})},d44e:function(e,t,n){var o=n("9bf2").f,i=n("5135"),r=n("b622")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,r)&&o(e,r,{configurable:!0,value:t})}},d58f:function(e,t,n){var o=n("1c0b"),i=n("7b0b"),r=n("44ad"),a=n("50c4"),l=function(e){return function(t,n,l,s){o(n);var c=i(t),d=r(c),u=a(c.length),f=e?u-1:0,p=e?-1:1;if(l<2)for(;;){if(f in d){s=d[f],f+=p;break}if(f+=p,e?f<0:u<=f)throw TypeError("Reduce of empty array with no initial value")}for(;e?f>=0:u>f;f+=p)f in d&&(s=n(s,d[f],f,c));return s}};e.exports={left:l(!1),right:l(!0)}},d784:function(e,t,n){n("ac1f");var o=n("6eeb"),i=n("d039"),r=n("b622"),a=n("9263"),l=n("9112"),s=r("species"),c=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),d="$0"==="a".replace(/./,"$0"),u=r("replace"),f=!!/./[u]&&""===/./[u]("a","$0"),p=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});e.exports=function(e,t,n,u){var m=r(e),v=!i(function(){var t={};return t[m]=function(){return 7},7!=""[e](t)}),h=v&&!i(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t});if(!v||!h||"replace"===e&&(!c||!d||f)||"split"===e&&!p){var g=/./[m],b=n(m,""[e],function(e,t,n,o,i){return t.exec===a?v&&!i?{done:!0,value:g.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}},{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),y=b[0],w=b[1];o(String.prototype,e,y),o(RegExp.prototype,m,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}u&&l(RegExp.prototype[m],"sham",!0)}},d81d:function(e,t,n){var o=n("23e7"),i=n("b727").map,r=n("1dde"),a=n("ae40"),l=r("map"),s=a("map");o({target:"Array",proto:!0,forced:!l||!s},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},da84:function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(e,t,n){var o=n("23e7"),i=n("83ab"),r=n("56ef"),a=n("fc6a"),l=n("06cf"),s=n("8418");o({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,o=a(e),i=l.f,c=r(o),d={},u=0;c.length>u;)void 0!==(n=i(o,t=c[u++]))&&s(d,t,n);return d}})},dbf1:function(e,t,n){(function(e){n.d(t,"a",function(){return o});var o="undefined"!=typeof window?window.console:e.console}).call(this,n("c8ba"))},ddb0:function(e,t,n){var o=n("da84"),i=n("fdbc"),r=n("e260"),a=n("9112"),l=n("b622"),s=l("iterator"),c=l("toStringTag"),d=r.values;for(var u in i){var f=o[u],p=f&&f.prototype;if(p){if(p[s]!==d)try{a(p,s,d)}catch(e){p[s]=d}if(p[c]||a(p,c,u),i[u])for(var m in r)if(p[m]!==r[m])try{a(p,m,r[m])}catch(e){p[m]=r[m]}}}},df75:function(e,t,n){var o=n("ca84"),i=n("7839");e.exports=Object.keys||function(e){return o(e,i)}},e01a:function(e,t,n){var o=n("23e7"),i=n("83ab"),r=n("da84"),a=n("5135"),l=n("861d"),s=n("9bf2").f,c=n("e893"),d=r.Symbol;if(i&&"function"==typeof d&&(!("description"in d.prototype)||void 0!==d().description)){var u={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new d(e):void 0===e?d():d(e);return""===e&&(u[t]=!0),t};c(f,d);var p=f.prototype=d.prototype;p.constructor=f;var m=p.toString,v="Symbol(test)"==String(d("test")),h=/^Symbol\((.*)\)[^)]+$/;s(p,"description",{configurable:!0,get:function(){var e=l(this)?this.valueOf():this,t=m.call(e);if(a(u,e))return"";var n=v?t.slice(7,-1):t.replace(h,"$1");return""===n?void 0:n}}),o({global:!0,forced:!0},{Symbol:f})}},e163:function(e,t,n){var o=n("5135"),i=n("7b0b"),r=n("f772"),a=n("e177"),l=r("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),o(e,l)?e[l]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},e177:function(e,t,n){var o=n("d039");e.exports=!o(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},e260:function(e,t,n){var o=n("fc6a"),i=n("44d2"),r=n("3f8c"),a=n("69f3"),l=n("7dd0"),s="Array Iterator",c=a.set,d=a.getterFor(s);e.exports=l(Array,"Array",function(e,t){c(this,{type:s,target:o(e),index:0,kind:t})},function(){var e=d(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},e439:function(e,t,n){var o=n("23e7"),i=n("d039"),r=n("fc6a"),a=n("06cf").f,l=n("83ab"),s=i(function(){a(1)});o({target:"Object",stat:!0,forced:!l||s,sham:!l},{getOwnPropertyDescriptor:function(e,t){return a(r(e),t)}})},e538:function(e,t,n){var o=n("b622");t.f=o},e893:function(e,t,n){var o=n("5135"),i=n("56ef"),r=n("06cf"),a=n("9bf2");e.exports=function(e,t){for(var n=i(t),l=a.f,s=r.f,c=0;c<n.length;c++){var d=n[c];o(e,d)||l(e,d,s(t,d))}}},e8b5:function(e,t,n){var o=n("c6b6");e.exports=Array.isArray||function(e){return"Array"==o(e)}},e95a:function(e,t,n){var o=n("b622"),i=n("3f8c"),r=o("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},f5df:function(e,t,n){var o=n("00ee"),i=n("c6b6"),r=n("b622")("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:a?i(t):"Object"==(o=i(t))&&"function"==typeof t.callee?"Arguments":o}},f772:function(e,t,n){var o=n("5692"),i=n("90e3"),r=o("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},fb15:function(e,t,n){if(n.r(t),"undefined"!=typeof window){var o=window.document.currentScript,i=n("8875");o=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,i=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw r}}return n}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(e)||function(){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("99af"),n("4de4"),n("4160"),n("c975"),n("d81d"),n("a434"),n("159b"),n("a4d3"),n("e439"),n("dbb4"),n("b64b"),n("e01a"),n("d28b"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0"),n("a630"),n("fb6a"),n("b0c0"),n("25f0");var p=n("a352"),m=n.n(p);function v(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function h(e,t,n){var o=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}var g=n("dbf1");n("13d5"),n("4fad"),n("ac1f"),n("5319");var b,y,w=/-(\w)/g,_=(b=function(e){return e.replace(w,function(e,t){return t.toUpperCase()})},y=Object.create(null),function(e){return y[e]||(y[e]=b(e))});n("5db7"),n("73d9");var x=["Start","Add","Remove","Update","End"],S=["Choose","Unchoose","Sort","Filter","Clone"],k=["Move"],E=[k,x,S].flatMap(function(e){return e}).map(function(e){return"on".concat(e)}),C={manage:k,manageAndEmit:x,emit:S};n("caad"),n("2ca0");var A=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function O(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function D(e){return e.reduce(function(e,t){var n=u(t,2),o=n[0],i=n[1];return e[o]=i,e},{})}function I(e){return Object.entries(e).filter(function(e){var t=u(e,2),n=t[0];return t[1],!O(n)}).map(function(e){var t=u(e,2),n=t[0],o=t[1];return[_(n),o]}).filter(function(e){var t,n=u(e,2),o=n[0];return n[1],t=o,!(-1!==E.indexOf(t))})}function R(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}n("c740");var T=function(e){return e.el},P=function(e){return e.__draggable_context},M=function(){function e(t){var n=t.nodes,o=n.header,i=n.default,r=n.footer,a=t.root,l=t.realList;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultNodes=i,this.children=[].concat(f(o),f(i),f(r)),this.externalComponent=a.externalComponent,this.rootTransition=a.transition,this.tag=a.tag,this.realList=l}return R(e,[{key:"render",value:function(e,t){var n=this.tag,o=this.children;return e(n,t,this._isRootComponent?{default:function(){return o}}:o)}},{key:"updated",value:function(){var e=this.defaultNodes,t=this.realList;e.forEach(function(e,n){var o,i;o=T(e),i={element:t[n],index:n},o.__draggable_context=i})}},{key:"getUnderlyingVm",value:function(e){return P(e)}},{key:"getVmIndexFromDomIndex",value:function(e,t){var n=this.defaultNodes,o=n.length,i=t.children,r=i.item(e);if(null===r)return o;var a=P(r);if(a)return a.index;if(0===o)return 0;var l=T(n[0]),s=f(i).findIndex(function(e){return e===l});return e<s?0:o}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),e}(),V=n("8bbf");function U(e){var t=["transition-group","TransitionGroup"].includes(e),n=!function(e){return A.includes(e)}(e)&&!t;return{transition:t,externalComponent:n,tag:n?Object(V.resolveComponent)(e):t?V.TransitionGroup:e}}function j(e){var t=e.$slots,n=e.tag,o=e.realList,i=function(e){var t=e.$slots,n=e.realList,o=e.getKey,i=n||[],r=u(["header","footer"].map(function(e){return(n=t[e])?n():[];var n}),2),a=r[0],l=r[1],c=t.item;if(!c)throw new Error("draggable element must have an item slot");var d=i.flatMap(function(e,t){return c({element:e,index:t}).map(function(t){return t.key=o(e),t.props=s(s({},t.props||{}),{},{"data-draggable":!0}),t})});if(d.length!==i.length)throw new Error("Item slot must have only one child");return{header:a,footer:l,default:d}}({$slots:t,realList:o,getKey:e.getKey}),r=U(n);return new M({nodes:i,root:r,realList:o})}function N(e,t){var n=this;Object(V.nextTick)(function(){return n.$emit(e.toLowerCase(),t)})}function L(e){var t=this;return function(n,o){if(null!==t.realList)return t["onDrag".concat(e)](n,o)}}function $(e){var t=this,n=L.call(this,e);return function(o,i){n.call(t,o,i),N.call(t,e,o)}}var F=null,H={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(e){return e}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},B=["update:modelValue","change"].concat(f([].concat(f(C.manageAndEmit),f(C.emit)).map(function(e){return e.toLowerCase()}))),q=Object(V.defineComponent)({name:"draggable",inheritAttrs:!1,props:H,emits:B,data:function(){return{error:!1}},render:function(){try{this.error=!1;var e=this.$slots,t=this.$attrs,n=this.tag,o=this.componentData,i=j({$slots:e,tag:n,realList:this.realList,getKey:this.getKey});this.componentStructure=i;var r=function(e){var t=e.$attrs,n=e.componentData,o=void 0===n?{}:n;return s(s({},D(Object.entries(t).filter(function(e){var t=u(e,2),n=t[0];return t[1],O(n)}))),o)}({$attrs:t,componentData:o});return i.render(V.h,r)}catch(e){return this.error=!0,Object(V.h)("pre",{style:{color:"red"}},e.stack)}},created:function(){null!==this.list&&null!==this.modelValue&&g.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var e=this;if(!this.error){var t=this.$attrs,n=this.$el;this.componentStructure.updated();var o=function(e){var t=e.$attrs,n=e.callBackBuilder,o=D(I(t));Object.entries(n).forEach(function(e){var t=u(e,2),n=t[0],i=t[1];C[n].forEach(function(e){o["on".concat(e)]=i(e)})});var i="[data-draggable]".concat(o.draggable||"");return s(s({},o),{},{draggable:i})}({$attrs:t,callBackBuilder:{manageAndEmit:function(t){return $.call(e,t)},emit:function(t){return N.bind(e,t)},manage:function(t){return L.call(e,t)}}}),i=1===n.nodeType?n:n.parentElement;this._sortable=new m.a(i,o),this.targetDomElement=i,i.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList:function(){var e=this.list;return e||this.modelValue},getKey:function(){var e=this.itemKey;return"function"==typeof e?e:function(t){return t[e]}}},watch:{$attrs:{handler:function(e){var t=this._sortable;t&&I(e).forEach(function(e){var n=u(e,2),o=n[0],i=n[1];t.option(o,i)})},deep:!0}},methods:{getUnderlyingVm:function(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent:function(e){return e.__draggable_component__},emitChanges:function(e){var t=this;Object(V.nextTick)(function(){return t.$emit("change",e)})},alterList:function(e){if(this.list)e(this.list);else{var t=f(this.modelValue);e(t),this.$emit("update:modelValue",t)}},spliceList:function(){var e=arguments,t=function(t){return t.splice.apply(t,f(e))};this.alterList(t)},updatePosition:function(e,t){var n=function(n){return n.splice(t,0,n.splice(e,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,o=this.getUnderlyingPotencialDraggableComponent(t);if(!o)return{component:o};var i=o.realList,r={list:i,component:o};return t!==n&&i?s(s({},o.getUnderlyingVm(n)||{}),r):r},getVmIndexFromDomIndex:function(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),F=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){v(e.item);var n=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(n,0,t);var o={element:t,newIndex:n};this.emitChanges({added:o})}},onDragRemove:function(e){if(h(this.$el,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context,n=t.index,o=t.element;this.spliceList(n,1);var i={element:o,oldIndex:n};this.emitChanges({removed:i})}else v(e.clone)},onDragUpdate:function(e){v(e.item),h(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(t,n);var o={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:o})},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=f(t.to.children).filter(function(e){return"none"!==e.style.display}),o=n.indexOf(t.related),i=e.component.getVmIndexFromDomIndex(o);return-1===n.indexOf(F)&&t.willInsertAfter?i+1:i},onDragMove:function(e,t){var n=this.move,o=this.realList;if(!n||!o)return!0;var i=this.getRelatedContextFromMoveEvent(e),r=this.computeFutureIndex(i,e),a=s(s({},this.context),{},{futureIndex:r});return n(s(s({},e),{},{relatedContext:i,draggedContext:a}),t)},onDragEnd:function(){F=null}}}),z=q;t.default=z},fb6a:function(e,t,n){var o=n("23e7"),i=n("861d"),r=n("e8b5"),a=n("23cb"),l=n("50c4"),s=n("fc6a"),c=n("8418"),d=n("b622"),u=n("1dde"),f=n("ae40"),p=u("slice"),m=f("slice",{ACCESSORS:!0,0:0,1:2}),v=d("species"),h=[].slice,g=Math.max;o({target:"Array",proto:!0,forced:!p||!m},{slice:function(e,t){var n,o,d,u=s(this),f=l(u.length),p=a(e,f),m=a(void 0===t?f:t,f);if(r(u)&&("function"!=typeof(n=u.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(u,p,m);for(o=new(void 0===n?Array:n)(g(m-p,0)),d=0;p<m;p++,d++)p in u&&c(o,d,u[p]);return o.length=d,o}})},fc6a:function(e,t,n){var o=n("44ad"),i=n("1d80");e.exports=function(e){return o(i(e))}},fdbc:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(e,t,n){var o=n("4930");e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}}).default},Ge.exports=_o(Ke,We(wo))),So=Ye(xo);const ko={key:0,class:"loading"},Eo={class:"info"},Co={class:"name"},Ao={class:"to"},Oo={class:"info"},Do={class:"to"},Io={key:0,class:"drawer-content"},Ro={class:"field"},To={class:"field"},Po={class:"field"},Mo={key:0,class:"drawer-content"},Vo={class:"field"},Uo={class:"field"},jo={class:"field"},No={class:"field checkbox-field"},Lo={key:0,class:"drawer-content"},$o={class:"field"},Fo={class:"field"},Ho={class:"field"};var Bo=a({__name:"modules-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,previewItems:r,roleOptions:a,policyOptions:y,linkEditing:C,linkValues:A,linkSaveDisabled:O,ruleEditingId:D,ruleDraft:I,hasRule:R,ruleSummary:T,toggleEnabled:P,editLink:M,closeLinkEditor:V,onLinkDrawerToggle:U,saveLink:j,removeLink:N,openRuleEditor:L,closeRuleEditor:$,onRuleDrawerToggle:F,saveRule:H,clearRule:B,hideNavItems:q,hideNavEditing:z,hideNavDraft:X,hideNavSaveDisabled:Y,moduleSelectOptions:W,hideNavSummary:G,editHideNav:K,closeHideNavEditor:J,onHideNavDrawerToggle:Q,saveHideNav:Z,removeHideNav:ee,ensureLoaded:te,save:ne}=ke();return f(()=>{te()}),(e,f)=>{const te=l("v-breadcrumb"),oe=l("v-icon"),ie=l("v-button"),re=l("sidebar-detail"),ae=l("v-progress-circular"),le=l("v-divider"),se=l("v-chip"),ce=l("v-checkbox"),de=l("v-list-item"),ue=l("v-input"),fe=l("v-drawer"),pe=l("v-select"),me=l("private-view"),ve=p("tooltip");return s(),c(me,{title:"Modules",icon:"view_sidebar"},{headline:d(()=>[u(te,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(ie,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(ne)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[ve,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(re,{icon:"info",title:"About",close:""},{default:d(()=>[...f[18]||(f[18]=[m("p",{class:"sidebar-text"}," Configure the left module bar and optionally hide the middle Module Navigation panel for matched roles/policies. Admins are never affected. Deep links are blocked when a rule disables a module (unless “Block deep links” is turned off). ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",ko,[u(ae,{indeterminate:""})])):(s(),g(b,{key:1},[u(le,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(oe,{name:"view_sidebar",class:"icon-flip-x"})]),default:d(()=>[f[19]||(f[19]=w(" "+_("Module Bar"),-1))]),_:1}),f[24]||(f[24]=m("p",{class:"page-intro"}," Reorder the left module bar, enable or disable entries, and add custom links — the same controls as Project Settings → Modules. Open an item to assign roles or policies that hide or show it for non-admin users. ",-1)),u(h(So),{modelValue:h(r),"onUpdate:modelValue":f[2]||(f[2]=e=>E(r)?r.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(de,{block:"",dense:"",clickable:"",class:v(["module-row",{enabled:e.enabled}]),onClick:t=>h(L)(e)},{default:d(()=>[u(oe,{class:"drag-handle",name:"drag_handle",onClick:f[0]||(f[0]=S(()=>{},["stop"]))}),u(oe,{class:"icon",name:e.icon},null,8,["name"]),m("div",Eo,[m("div",Co,[w(_(e.name)+" ",1),h(R)(e.id)?(s(),c(se,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(T)(e.id)),1)]),_:2},1024)):x("v-if",!0)]),m("div",Ao,_(e.to),1)]),m("div",{class:"row-actions",onClick:f[1]||(f[1]=S(()=>{},["stop"]))},[k((s(),c(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(L)(e)},{default:d(()=>[u(oe,{name:"policy"})]),_:1},8,["onClick"])),[[ve,"Visibility rules"]]),"module"===e.type?(s(),g(b,{key:0},[e.locked?k((s(),c(oe,{key:0,name:"lock"},null,512)),[[ve,"Locked"]]):(s(),c(ce,{key:1,"model-value":e.enabled,"onUpdate:modelValue":t=>h(P)(e,t)},null,8,["model-value","onUpdate:modelValue"]))],64)):(s(),g(b,{key:1},[u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(M)(e.id)},{default:d(()=>[u(oe,{name:"edit"})]),_:1},8,["onClick"]),u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(N)(e.id)},{default:d(()=>[u(oe,{name:"close"})]),_:1},8,["onClick"])],64))])]),_:2},1032,["class","onClick"])]),_:1},8,["modelValue"]),u(ie,{class:"add-link",onClick:f[3]||(f[3]=e=>h(M)("+"))},{default:d(()=>[...f[20]||(f[20]=[w("Add Link",-1)])]),_:1}),u(le,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(oe,{name:"menu"})]),default:d(()=>[f[21]||(f[21]=w(" "+_("Hide Module Navigation"),-1))]),_:1}),f[25]||(f[25]=m("p",{class:"section-intro"}," Hide the middle Module Navigation column for selected modules when the user matches. First matching rule’s modules are merged for the user. Empty roles and policies = catch-all. ",-1)),u(h(So),{modelValue:h(q),"onUpdate:modelValue":f[6]||(f[6]=e=>E(q)?q.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(de,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(K)(e.id)},{default:d(()=>[u(oe,{class:"drag-handle",name:"drag_handle",onClick:f[4]||(f[4]=S(()=>{},["stop"]))}),u(oe,{class:"icon",name:"menu"}),m("div",Oo,[f[22]||(f[22]=m("div",{class:"name"},"Hide navigation",-1)),m("div",Do,_(h(G)(e)),1)]),m("div",{class:"row-actions",onClick:f[5]||(f[5]=S(()=>{},["stop"]))},[u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(K)(e.id)},{default:d(()=>[u(oe,{name:"edit"})]),_:1},8,["onClick"]),u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(ee)(e.id)},{default:d(()=>[u(oe,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(ie,{class:"add-link",onClick:f[7]||(f[7]=e=>h(K)("+"))},{default:d(()=>[...f[23]||(f[23]=[w("Add Hide-Navigation Rule",-1)])]),_:1})],64))],2),u(fe,{"model-value":null!==h(C),title:"Link",icon:"link","onUpdate:modelValue":h(U),onCancel:h(V)},{actions:d(()=>[k((s(),c(ie,{disabled:h(O),icon:"",rounded:"",onClick:h(j)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["disabled","onClick"])),[[ve,"Save",void 0,{bottom:!0}]])]),default:d(()=>[h(A)?(s(),g("div",Io,[m("div",Ro,[f[26]||(f[26]=m("label",null,"Name",-1)),u(ue,{modelValue:h(A).name,"onUpdate:modelValue":f[8]||(f[8]=e=>h(A).name=e),placeholder:"Enter a name"},null,8,["modelValue"])]),m("div",To,[f[27]||(f[27]=m("label",null,"Icon",-1)),u(ue,{modelValue:h(A).icon,"onUpdate:modelValue":f[9]||(f[9]=e=>h(A).icon=e),placeholder:"link"},null,8,["modelValue"])]),m("div",Po,[f[28]||(f[28]=m("label",null,"URL",-1)),u(ue,{modelValue:h(A).url,"onUpdate:modelValue":f[10]||(f[10]=e=>h(A).url=e),placeholder:"https://example.com"},null,8,["modelValue"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(fe,{"model-value":null!==h(D),title:"Module Visibility",icon:"policy","onUpdate:modelValue":h(F),onCancel:h($)},{actions:d(()=>[k((s(),c(ie,{icon:"",rounded:"",onClick:h(H)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["onClick"])),[[ve,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(I)?(s(),g("div",Mo,[f[33]||(f[33]=m("p",{class:"hint"}," Leave roles and policies empty to use only the global enable toggle (no ACL override). ",-1)),m("div",Vo,[f[29]||(f[29]=m("label",null,"Visibility",-1)),u(pe,{modelValue:h(I).visibility,"onUpdate:modelValue":f[11]||(f[11]=e=>h(I).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",Uo,[f[30]||(f[30]=m("label",null,"Roles",-1)),u(pe,{modelValue:h(I).roles,"onUpdate:modelValue":f[12]||(f[12]=e=>h(I).roles=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",jo,[f[31]||(f[31]=m("label",null,"Policies",-1)),u(pe,{modelValue:h(I).policies,"onUpdate:modelValue":f[13]||(f[13]=e=>h(I).policies=e),multiple:"",items:h(y),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),m("div",No,[u(ce,{modelValue:h(I).block_routes,"onUpdate:modelValue":f[14]||(f[14]=e=>h(I).block_routes=e),label:"Block deep links when this rule hides the module"},null,8,["modelValue"])]),h(R)(h(D))?(s(),c(ie,{key:0,secondary:"",onClick:h(B)},{default:d(()=>[...f[32]||(f[32]=[w("Clear rule",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(fe,{"model-value":null!==h(z),title:"Hide Module Navigation",icon:"menu","onUpdate:modelValue":h(Q),onCancel:h(J)},{actions:d(()=>[k((s(),c(ie,{disabled:h(Y),icon:"",rounded:"",onClick:h(Z)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["disabled","onClick"])),[[ve,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(X)?(s(),g("div",Lo,[f[37]||(f[37]=m("p",{class:"hint"}," Select modules whose middle navigation panel should be hidden. Empty roles and policies = catch-all. ",-1)),m("div",$o,[f[34]||(f[34]=m("label",null,"Modules",-1)),u(pe,{modelValue:h(X).modules,"onUpdate:modelValue":f[15]||(f[15]=e=>h(X).modules=e),multiple:"",items:h(W),"item-text":"text","item-value":"value",placeholder:"Select modules"},null,8,["modelValue","items"])]),m("div",Fo,[f[35]||(f[35]=m("label",null,"Roles",-1)),u(pe,{modelValue:h(X).roles,"onUpdate:modelValue":f[16]||(f[16]=e=>h(X).roles=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",Ho,[f[36]||(f[36]=m("label",null,"Policies",-1)),u(pe,{modelValue:h(X).policies,"onUpdate:modelValue":f[17]||(f[17]=e=>h(X).policies=e),multiple:"",items:h(y),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-85eae6a4] {\n\tpadding-inline: var(--content-padding);\n\tpadding-block-start: 0;\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--padded-top[data-v-85eae6a4] {\n\tpadding-block-start: var(--content-padding);\n}\n\n/* Mirror sidebar icon → left rail (module bar), matching the Modules nav item */\n[data-v-85eae6a4] i[data-icon='view_sidebar'] {\n\tdisplay: inline-block;\n\ttransform: scaleX(-1);\n}\n.loading[data-v-85eae6a4] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-85eae6a4] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.section-intro[data-v-85eae6a4] {\n\tmargin: 0 0 16px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.section-divider[data-v-85eae6a4] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-85eae6a4] {\n\tmargin-top: 40px;\n}\n.icon-flip-x[data-v-85eae6a4] {\n\ttransform: scaleX(-1);\n}\n.list[data-v-85eae6a4] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row[data-v-85eae6a4] {\n\t--v-list-item-color: var(--theme--foreground-subdued);\n}\n.module-row.enabled[data-v-85eae6a4] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-85eae6a4] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-85eae6a4] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-85eae6a4] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-85eae6a4] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-weight: 600;\n}\n.to[data-v-85eae6a4] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-85eae6a4] {\n\tmargin-inline-start: 4px;\n}\n.row-actions[data-v-85eae6a4] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-85eae6a4] {\n\tmargin-top: 4px;\n}\n.drawer-content[data-v-85eae6a4] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-85eae6a4] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.hint[data-v-85eae6a4],\n.sidebar-text[data-v-85eae6a4] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.checkbox-field[data-v-85eae6a4] {\n\tpadding-top: 4px;\n}\n",{});var qo=Re(Bo,[["__scopeId","data-v-85eae6a4"]]);const zo={class:"actions"},Xo={key:0,class:"result"},Yo={key:1,class:"result"},Wo={key:2,class:"result"};var Go=a({__name:"settings-view",setup(e){const t=Ce(),{loading:n,cleaning:o,ensureLoaded:r,cleanupExtensionData:a,exportPermissionsConfig:p,importPermissionsConfig:y}=ke(),S=i(!1),k=i(null),E=i(null),C=i(!1),A=i(null),O=i(null);function D(){A.value=null,p()}function I(){A.value=null,O.value?.click()}async function R(e){const t=e.target,n=t.files?.[0];if(t.value="",n){C.value=!0,A.value=null;try{const e=await n.text(),t=JSON.parse(e);await y(t),A.value={type:"success",text:"Config imported and saved to settings."}}catch(e){A.value={type:"danger",text:e?.response?.data?.errors?.[0]?.message||e?.message||"Import failed"}}finally{C.value=!1}}}async function T(){k.value=null,E.value=null,A.value=null;try{E.value=await a(),S.value=!1}catch(e){k.value=e?.response?.data?.errors?.[0]?.message||e?.message||"Cleanup failed"}}return f(()=>{r()}),(e,i)=>{const r=l("v-breadcrumb"),a=l("sidebar-detail"),f=l("v-icon"),p=l("v-divider"),y=l("v-button"),P=l("v-notice"),M=l("v-card-title"),V=l("v-card-text"),U=l("v-card-actions"),j=l("v-card"),N=l("v-dialog"),L=l("private-view");return s(),c(L,{title:"Settings",icon:"settings"},{headline:d(()=>[u(r,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),sidebar:d(()=>[u(a,{icon:"info",title:"About",close:""},{default:d(()=>[...i[4]||(i[4]=[m("p",{class:"sidebar-text"}," Export or import this extension’s JSON config, or remove the dedicated settings field before uninstalling. ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[i[12]||(i[12]=m("p",{class:"page-intro"},[w(" Back up or restore this extension’s visibility config (module rules, content, users, start pages, sidebar) as JSON, or remove the dedicated "),m("code",null,"module_permissions"),w(" settings field before uninstalling. Native "),m("code",null,"module_bar"),w(" order/enable and all other project settings are left untouched. ")],-1)),u(p,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(f,{name:"import_export"})]),default:d(()=>[i[5]||(i[5]=w(" Export / Import ",-1))]),_:1}),i[13]||(i[13]=m("p",{class:"explain"},[w(" Download or restore "),m("code",null,"directus_settings.module_permissions"),w(" only (module rules, content, users/nav, start pages, sidebar panels/modes). Does not include native "),m("code",null,"module_bar"),w(" — manage that in Modules or Project Settings → Modules. ")],-1)),m("div",zo,[u(y,{secondary:"",disabled:h(n)||h(o),onClick:D},{default:d(()=>[...i[6]||(i[6]=[w("Export JSON",-1)])]),_:1},8,["disabled"]),u(y,{secondary:"",disabled:h(n)||h(o)||C.value,loading:C.value,onClick:I},{default:d(()=>[...i[7]||(i[7]=[w(" Import JSON ",-1)])]),_:1},8,["disabled","loading"]),m("input",{ref_key:"fileInput",ref:O,type:"file",accept:"application/json,.json",class:"file-input",onChange:R},null,544)]),A.value?(s(),g("div",Xo,[u(P,{type:A.value.type},{default:d(()=>[w(_(A.value.text),1)]),_:1},8,["type"])])):x("v-if",!0),u(p,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(f,{name:"delete"})]),default:d(()=>[i[8]||(i[8]=w(" Remove extension data ",-1))]),_:1}),i[14]||(i[14]=m("p",{class:"explain"},[w(" Visibility rules and start pages live in a dedicated JSON field "),m("code",null,"directus_settings.module_permissions"),w(". It is not mixed into another settings JSON blob, so cleanup can safely remove only that field. Module bar order/enable ("),m("code",null,"module_bar"),w(") and all other project settings are kept. If the extension stays installed, the next Directus restart may recreate an empty "),m("code",null,"module_permissions"),w(" field. ")],-1)),u(P,{type:"warning",class:"notice"},{default:d(()=>[...i[9]||(i[9]=[w(" Deleting extension data cannot be undone. Export first if you might need the config again. ",-1)])]),_:1}),E.value?(s(),g("div",Yo,[u(P,{type:"success"},{default:d(()=>[i[10]||(i[10]=w(" Cleanup finished. ",-1)),E.value.clearedValue?(s(),g(b,{key:0},[w(" Value cleared.")],64)):x("v-if",!0),E.value.deletedField?(s(),g(b,{key:1},[w(" Field removed.")],64)):x("v-if",!0)]),_:1})])):x("v-if",!0),k.value?(s(),g("div",Wo,[u(P,{type:"danger"},{default:d(()=>[w(_(k.value),1)]),_:1})])):x("v-if",!0),u(y,{kind:"danger",loading:h(o),disabled:h(o),onClick:i[0]||(i[0]=e=>S.value=!0)},{default:d(()=>[...i[11]||(i[11]=[w(" Delete module_permissions data ",-1)])]),_:1},8,["loading","disabled"])],2),u(N,{modelValue:S.value,"onUpdate:modelValue":i[2]||(i[2]=e=>S.value=e),onEsc:i[3]||(i[3]=e=>S.value=!1)},{default:d(()=>[u(j,null,{default:d(()=>[u(M,null,{default:d(()=>[...i[15]||(i[15]=[w("Delete module_permissions?",-1)])]),_:1}),u(V,null,{default:d(()=>[...i[16]||(i[16]=[w(" This removes only ",-1),m("code",null,"directus_settings.module_permissions",-1),w(" (the extension’s own JSON field). Module bar order/enable and all other settings stay as they are. ",-1)])]),_:1}),u(U,null,{default:d(()=>[u(y,{secondary:"",onClick:i[1]||(i[1]=e=>S.value=!1)},{default:d(()=>[...i[17]||(i[17]=[w("Cancel",-1)])]),_:1}),u(y,{kind:"danger",loading:h(o),onClick:T},{default:d(()=>[...i[18]||(i[18]=[w("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}});Ie("\n.page[data-v-864793b0] {\n\tpadding-inline: var(--content-padding);\n\tpadding-block-start: 0;\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--padded-top[data-v-864793b0] {\n\tpadding-block-start: var(--content-padding);\n}\n.section-divider[data-v-864793b0] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-864793b0] {\n\tmargin-top: 40px;\n}\n.page-intro[data-v-864793b0] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.page-intro code[data-v-864793b0] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.explain[data-v-864793b0],\n.sidebar-text[data-v-864793b0] {\n\tmargin: 0 0 16px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.explain code[data-v-864793b0],\n.sidebar-text code[data-v-864793b0],\n.v-card-text code[data-v-864793b0] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.actions[data-v-864793b0] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin-bottom: 16px;\n}\n.file-input[data-v-864793b0] {\n\tdisplay: none;\n}\n.notice[data-v-864793b0],\n.result[data-v-864793b0] {\n\tmargin-bottom: 16px;\n}\n",{});var Ko=Re(Go,[["__scopeId","data-v-864793b0"]]);const Jo={key:0,class:"loading"},Qo={class:"list"},Zo={class:"info"},ei={class:"name"},ti={class:"to"},ni={class:"info"},oi={class:"name"},ii={class:"to"},ri={key:0,class:"drawer-content"},ai={class:"field"},li={class:"field"},si={class:"field"},ci={key:0,class:"drawer-content"},di={class:"field"},ui={class:"field"},fi={class:"field"};var pi=a({__name:"sidebar-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,roleOptions:r,policyOptions:a,sidebarPanelCatalog:C,sidebarPanelEditingId:A,sidebarPanelDraft:O,sidebarModeItems:D,sidebarModeEditing:I,sidebarModeDraft:R,hasSidebarPanelRule:T,sidebarPanelRuleSummary:P,sidebarModeSummary:M,openSidebarPanelEditor:V,closeSidebarPanelEditor:U,onSidebarPanelDrawerToggle:j,saveSidebarPanelRule:N,clearSidebarPanelRule:L,editSidebarMode:$,closeSidebarModeEditor:F,onSidebarModeDrawerToggle:H,saveSidebarMode:B,removeSidebarMode:q,ensureLoaded:z,save:X}=ke();return f(()=>{z()}),(e,f)=>{const z=l("v-breadcrumb"),Y=l("v-icon"),W=l("v-button"),G=l("sidebar-detail"),K=l("v-progress-circular"),J=l("v-divider"),Q=l("v-chip"),Z=l("v-list-item"),ee=l("v-select"),te=l("v-drawer"),ne=l("private-view"),oe=p("tooltip");return s(),c(ne,{title:"Sidebar",icon:"view_sidebar"},{headline:d(()=>[u(z,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(W,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(X)},{default:d(()=>[u(Y,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[oe,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(G,{icon:"info",title:"About",close:""},{default:d(()=>[...f[11]||(f[11]=[m("p",{class:"sidebar-text"}," Hide individual right-sidebar panels (Layout, Revisions, Comments, …) or force the whole sidebar collapsed/hidden for matched roles and policies. Admins are never affected. This is UI-only — not a security boundary. ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",Jo,[u(K,{indeterminate:""})])):(s(),g(b,{key:1},[u(J,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(Y,{name:"widgets"})]),default:d(()=>[f[12]||(f[12]=w(" Panels ",-1))]),_:1}),f[15]||(f[15]=m("p",{class:"page-intro"}," Hide or show known Data Studio sidebar panels for matched roles/policies. Collection browse panels (Layout, Archive, …) and item panels (Revisions, Comments, …) only appear on the relevant pages. Activity Log is the footer control at the bottom of the sidebar (Directus 11; replaced by AI Assistant on newer versions when AI is enabled). ",-1)),m("div",Qo,[(s(!0),g(b,null,y(h(C),e=>(s(),c(Z,{key:e.id,block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(V)(e.id)},{default:d(()=>{return[u(Y,{class:"icon",name:e.icon},null,8,["name"]),m("div",Zo,[m("div",ei,[w(_(e.name)+" ",1),h(T)(e.id)?(s(),c(Q,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(P)(e.id)),1)]),_:2},1024)):x("v-if",!0)]),m("div",ti,_(e.id)+" · "+_((t=e.context,"collection"===t?"collection browse":"item"===t?"item detail":"collection & item")),1)]),m("div",{class:"row-actions",onClick:f[0]||(f[0]=S(()=>{},["stop"]))},[k((s(),c(W,{icon:"","x-small":"",secondary:"",onClick:t=>h(V)(e.id)},{default:d(()=>[u(Y,{name:"policy"})]),_:1},8,["onClick"])),[[oe,"Visibility rules"]])])];var t}),_:2},1032,["onClick"]))),128))]),u(J,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(Y,{name:"keyboard_tab"})]),default:d(()=>[f[13]||(f[13]=w(" Sidebar mode ",-1))]),_:1}),f[16]||(f[16]=m("p",{class:"page-intro"}," Force the whole right sidebar collapsed or hidden. First match wins (drag to reorder); leave roles and policies empty for a catch-all. Default behavior applies when nothing matches. ",-1)),u(h(So),{modelValue:h(D),"onUpdate:modelValue":f[3]||(f[3]=e=>E(D)?D.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(Z,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h($)(e.id)},{default:d(()=>[u(Y,{class:"drag-handle",name:"drag_handle",onClick:f[1]||(f[1]=S(()=>{},["stop"]))}),u(Y,{class:"icon",name:"hidden"===e.mode?"visibility_off":"keyboard_tab"},null,8,["name"]),m("div",ni,[m("div",oi,_("hidden"===e.mode?"Force hidden":"Force collapsed"),1),m("div",ii,_(h(M)(e)),1)]),m("div",{class:"row-actions",onClick:f[2]||(f[2]=S(()=>{},["stop"]))},[u(W,{icon:"","x-small":"",secondary:"",onClick:t=>h($)(e.id)},{default:d(()=>[u(Y,{name:"edit"})]),_:1},8,["onClick"]),u(W,{icon:"","x-small":"",secondary:"",onClick:t=>h(q)(e.id)},{default:d(()=>[u(Y,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(W,{class:"add-link",onClick:f[4]||(f[4]=e=>h($)("+"))},{default:d(()=>[...f[14]||(f[14]=[w("Add Sidebar Mode",-1)])]),_:1})],64))],2),u(te,{"model-value":null!==h(A),title:"Sidebar Panel",icon:"policy","onUpdate:modelValue":h(j),onCancel:h(U)},{actions:d(()=>[k((s(),c(W,{icon:"",rounded:"",onClick:h(N)},{default:d(()=>[u(Y,{name:"check"})]),_:1},8,["onClick"])),[[oe,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(O)?(s(),g("div",ri,[f[21]||(f[21]=m("p",{class:"hint"}," Leave roles and policies empty to clear the rule. Hiding is client-side only — API access is unchanged. ",-1)),m("div",ai,[f[17]||(f[17]=m("label",null,"Visibility",-1)),u(ee,{modelValue:h(O).visibility,"onUpdate:modelValue":f[5]||(f[5]=e=>h(O).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",li,[f[18]||(f[18]=m("label",null,"Roles",-1)),u(ee,{modelValue:h(O).roles,"onUpdate:modelValue":f[6]||(f[6]=e=>h(O).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",si,[f[19]||(f[19]=m("label",null,"Policies",-1)),u(ee,{modelValue:h(O).policies,"onUpdate:modelValue":f[7]||(f[7]=e=>h(O).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),h(T)(h(A))?(s(),c(W,{key:0,secondary:"",onClick:h(L)},{default:d(()=>[...f[20]||(f[20]=[w(" Clear rule ",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(te,{"model-value":null!==h(I),title:"Sidebar Mode",icon:"view_sidebar","onUpdate:modelValue":h(H),onCancel:h(F)},{actions:d(()=>[k((s(),c(W,{icon:"",rounded:"",onClick:h(B)},{default:d(()=>[u(Y,{name:"check"})]),_:1},8,["onClick"])),[[oe,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(R)?(s(),g("div",ci,[f[25]||(f[25]=m("p",{class:"hint"}," Collapsed keeps the icon rail (Directus compact sidebar). Hidden removes the sidebar chrome entirely. Empty roles and policies = catch-all (place last). ",-1)),m("div",di,[f[22]||(f[22]=m("label",null,"Mode",-1)),u(ee,{modelValue:h(R).mode,"onUpdate:modelValue":f[8]||(f[8]=e=>h(R).mode=e),items:[{text:"Force collapsed",value:"collapsed"},{text:"Force hidden",value:"hidden"}]},null,8,["modelValue"])]),m("div",ui,[f[23]||(f[23]=m("label",null,"Roles",-1)),u(ee,{modelValue:h(R).roles,"onUpdate:modelValue":f[9]||(f[9]=e=>h(R).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",fi,[f[24]||(f[24]=m("label",null,"Policies",-1)),u(ee,{modelValue:h(R).policies,"onUpdate:modelValue":f[10]||(f[10]=e=>h(R).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-a2f48c10] {\n\tpadding-inline: var(--content-padding);\n\tpadding-block-start: 0;\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--padded-top[data-v-a2f48c10] {\n\tpadding-block-start: var(--content-padding);\n}\n.loading[data-v-a2f48c10] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.section-divider[data-v-a2f48c10] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-a2f48c10] {\n\tmargin-top: 40px;\n}\n.page-intro[data-v-a2f48c10] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.list[data-v-a2f48c10] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-a2f48c10] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-a2f48c10] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-a2f48c10] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-a2f48c10] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-a2f48c10] {\n\tfont-weight: 600;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tflex-wrap: wrap;\n}\n.to[data-v-a2f48c10] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-a2f48c10] {\n\tfont-weight: 500;\n}\n.row-actions[data-v-a2f48c10] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-a2f48c10] {\n\tmargin-top: 4px;\n}\n.drawer-content[data-v-a2f48c10] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-a2f48c10] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.hint[data-v-a2f48c10],\n.sidebar-text[data-v-a2f48c10] {\n\tmargin: 0;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.hint code[data-v-a2f48c10],\n.sidebar-text code[data-v-a2f48c10] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n",{});var mi=Re(pi,[["__scopeId","data-v-a2f48c10"]]);const vi={key:0,class:"loading"},hi={class:"info"},gi={class:"name"},bi={class:"to"},yi={key:0,class:"drawer-content"},wi={class:"field"},_i={class:"field checkbox-field"},xi={class:"field"},Si={class:"field"};var ki=a({__name:"start-page-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,homeItems:r,roleOptions:a,policyOptions:y,homeEditing:C,homeDraft:A,homeSaveDisabled:O,homeSummary:D,editHome:I,closeHomeEditor:R,onHomeDrawerToggle:T,saveHome:P,removeHome:M,ensureLoaded:V,save:U}=ke();return f(()=>{V()}),(e,f)=>{const V=l("v-breadcrumb"),j=l("v-icon"),N=l("v-button"),L=l("sidebar-detail"),$=l("v-progress-circular"),F=l("v-list-item"),H=l("v-input"),B=l("v-checkbox"),q=l("v-select"),z=l("v-drawer"),X=l("private-view"),Y=p("tooltip");return s(),c(X,{title:"Start Page",icon:"home"},{headline:d(()=>[u(V,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(N,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(U)},{default:d(()=>[u(j,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[Y,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(L,{icon:"info",title:"About",close:""},{default:d(()=>[...f[8]||(f[8]=[m("p",{class:"sidebar-text"},[w(" Start pages define where matched users land after login. By default they only apply when Directus has no last page. Enable "),m("strong",null,"Force Redirect"),w(" to ignore "),m("code",null,"last_page"),w(". Explicit "),m("code",null,"?redirect="),w(" links still win. ")],-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",vi,[u($,{indeterminate:""})])):(s(),g(b,{key:1},[f[10]||(f[10]=m("p",{class:"page-intro"},[w(" Define where users land after login, and prefer that path for safe redirects away from blocked modules. First match wins (drag to reorder); leave roles and policies empty for a catch-all default. Without force, this does not override a user’s "),m("code",null,"last_page"),w(". Enable force to redirect even when a last page exists. Explicit "),m("code",null,"?redirect="),w(" always wins. ")],-1)),u(h(So),{modelValue:h(r),"onUpdate:modelValue":f[2]||(f[2]=e=>E(r)?r.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(F,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(I)(e.id)},{default:d(()=>[u(j,{class:"drag-handle",name:"drag_handle",onClick:f[0]||(f[0]=S(()=>{},["stop"]))}),u(j,{class:"icon",name:"home"}),m("div",hi,[m("div",gi,_(e.path),1),m("div",bi,_(h(D)(e)),1)]),m("div",{class:"row-actions",onClick:f[1]||(f[1]=S(()=>{},["stop"]))},[u(N,{icon:"","x-small":"",secondary:"",onClick:t=>h(I)(e.id)},{default:d(()=>[u(j,{name:"edit"})]),_:1},8,["onClick"]),u(N,{icon:"","x-small":"",secondary:"",onClick:t=>h(M)(e.id)},{default:d(()=>[u(j,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(N,{class:"add-link",onClick:f[3]||(f[3]=e=>h(I)("+"))},{default:d(()=>[...f[9]||(f[9]=[w("Add Start Page",-1)])]),_:1})],64))],2),u(z,{"model-value":null!==h(C),title:"Start Page",icon:"home","onUpdate:modelValue":h(T),onCancel:h(R)},{actions:d(()=>[k((s(),c(N,{disabled:h(O),icon:"",rounded:"",onClick:h(P)},{default:d(()=>[u(j,{name:"check"})]),_:1},8,["disabled","onClick"])),[[Y,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(A)?(s(),g("div",yi,[f[14]||(f[14]=m("p",{class:"hint"},[w(" Use an in-app path such as "),m("code",null,"/files"),w(" or "),m("code",null,"/content"),w(". External URLs are rejected. ")],-1)),m("div",wi,[f[11]||(f[11]=m("label",null,"Path",-1)),u(H,{modelValue:h(A).path,"onUpdate:modelValue":f[4]||(f[4]=e=>h(A).path=e),placeholder:"/content"},null,8,["modelValue"])]),m("div",_i,[u(B,{modelValue:h(A).force,"onUpdate:modelValue":f[5]||(f[5]=e=>h(A).force=e),label:"Force Redirect (ignore users last page prop)"},null,8,["modelValue"])]),m("div",xi,[f[12]||(f[12]=m("label",null,"Roles",-1)),u(q,{modelValue:h(A).roles,"onUpdate:modelValue":f[6]||(f[6]=e=>h(A).roles=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",Si,[f[13]||(f[13]=m("label",null,"Policies",-1)),u(q,{modelValue:h(A).policies,"onUpdate:modelValue":f[7]||(f[7]=e=>h(A).policies=e),multiple:"",items:h(y),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-87af3354] {\n\tpadding-inline: var(--content-padding);\n\tpadding-block-start: 0;\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--padded-top[data-v-87af3354] {\n\tpadding-block-start: var(--content-padding);\n}\n.loading[data-v-87af3354] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-87af3354] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.page-intro code[data-v-87af3354] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.section-hint[data-v-87af3354] {\n\tmargin-bottom: 24px;\n}\n.section-hint code[data-v-87af3354],\n.hint code[data-v-87af3354] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.list[data-v-87af3354] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-87af3354] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-87af3354] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-87af3354] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-87af3354] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-87af3354] {\n\tfont-weight: 600;\n}\n.to[data-v-87af3354] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.row-actions[data-v-87af3354] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-87af3354] {\n\tmargin-top: 4px;\n}\n.drawer-content[data-v-87af3354] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-87af3354] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.checkbox-field[data-v-87af3354] {\n\tmargin-top: -4px;\n}\n.hint[data-v-87af3354],\n.sidebar-text[data-v-87af3354] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.sidebar-text code[data-v-87af3354] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n",{});var Ei=Re(ki,[["__scopeId","data-v-87af3354"]]);const Ci={key:0,class:"loading"},Ai={class:"info"},Oi={class:"to"},Di={key:0,class:"empty"},Ii={key:1,class:"list"},Ri={class:"info"},Ti={class:"name"},Pi={class:"to"},Mi={key:0,class:"drawer-content"},Vi={class:"field"},Ui={class:"field"},ji={key:0,class:"drawer-content"},Ni={class:"field"},Li={class:"field"},$i={class:"field"},Fi={class:"field"},Hi={class:"field checkbox-field"};var Bi=a({__name:"users-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,roleOptions:r,policyOptions:a,usersOwnRoleItems:C,usersOwnRoleEditing:A,usersOwnRoleDraft:O,configuredUsersRoles:D,availableUsersRoleOptions:I,usersRoleEditingId:R,usersRoleDraft:T,usersRoleSaveDisabled:P,usersOwnRoleSummary:M,hasUsersRoleRule:V,usersRoleRuleSummary:U,editUsersOwnRole:j,closeUsersOwnRoleEditor:N,onUsersOwnRoleDrawerToggle:L,saveUsersOwnRole:$,removeUsersOwnRole:F,openUsersRoleEditor:H,closeUsersRoleEditor:B,onUsersRoleDrawerToggle:q,saveUsersRoleRule:z,clearUsersRoleRule:X,removeUsersRoleRule:Y,ensureLoaded:W,save:G}=ke();return f(()=>{W()}),(e,f)=>{const W=l("v-breadcrumb"),K=l("v-icon"),J=l("v-button"),Q=l("sidebar-detail"),Z=l("v-progress-circular"),ee=l("v-divider"),te=l("v-list-item"),ne=l("v-chip"),oe=l("v-select"),ie=l("v-drawer"),re=l("v-checkbox"),ae=l("private-view"),le=p("tooltip");return s(),c(ae,{title:"Users",icon:"people_alt"},{headline:d(()=>[u(W,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(J,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(G)},{default:d(()=>[u(K,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[le,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(Q,{icon:"info",title:"About",close:""},{default:d(()=>[...f[13]||(f[13]=[m("p",{class:"sidebar-text"}," Control the Users module’s role tree in Module Navigation. Admins are never affected. UI-only — not a security boundary. ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",Ci,[u(Z,{indeterminate:""})])):(s(),g(b,{key:1},[f[19]||(f[19]=m("p",{class:"page-intro"}," Filter which roles appear in Users Module Navigation for matched roles/policies. ",-1)),u(ee,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(K,{name:"person"})]),default:d(()=>[f[14]||(f[14]=w(" "+_("Own Role Only"),-1))]),_:1}),f[20]||(f[20]=m("p",{class:"section-intro"}," Matched users only see their own role (and parent roles) in the Users nav tree. First match wins; empty roles and policies = catch-all. ",-1)),u(h(So),{modelValue:h(C),"onUpdate:modelValue":f[2]||(f[2]=e=>E(C)?C.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(te,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(j)(e.id)},{default:d(()=>[u(K,{class:"drag-handle",name:"drag_handle",onClick:f[0]||(f[0]=S(()=>{},["stop"]))}),u(K,{class:"icon",name:"person"}),m("div",Ai,[f[15]||(f[15]=m("div",{class:"name"},"Own role only",-1)),m("div",Oi,_(h(M)(e)),1)]),m("div",{class:"row-actions",onClick:f[1]||(f[1]=S(()=>{},["stop"]))},[u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(j)(e.id)},{default:d(()=>[u(K,{name:"edit"})]),_:1},8,["onClick"]),u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(F)(e.id)},{default:d(()=>[u(K,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(J,{class:"add-link",onClick:f[3]||(f[3]=e=>h(j)("+"))},{default:d(()=>[...f[16]||(f[16]=[w("Add Own-Role Rule",-1)])]),_:1}),u(ee,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(K,{name:"badge"})]),default:d(()=>[f[17]||(f[17]=w(" "+_("Role Visibility"),-1))]),_:1}),f[21]||(f[21]=m("p",{class:"section-intro"},[w(" Hide or show specific roles in the Users nav tree for matched roles/policies. Applied after own-role filtering. Optional deep-link blocking covers "),m("code",null,"/users/roles/<id>"),w(". ")],-1)),0===h(D).length?(s(),g("div",Di,"No role visibility rules yet.")):(s(),g("div",Ii,[(s(!0),g(b,null,y(h(D),e=>(s(),c(te,{key:e.id,block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(H)(e.id)},{default:d(()=>[u(K,{class:"icon",name:"badge"}),m("div",Ri,[m("div",Ti,[w(_(e.name)+" ",1),h(V)(e.id)?(s(),c(ne,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(U)(e.id)),1)]),_:2},1024)):x("v-if",!0)]),m("div",Pi,"/users/roles/"+_(e.id),1)]),m("div",{class:"row-actions",onClick:f[4]||(f[4]=S(()=>{},["stop"]))},[u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(H)(e.id)},{default:d(()=>[u(K,{name:"policy"})]),_:1},8,["onClick"]),u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(Y)(e.id)},{default:d(()=>[u(K,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"]))),128))])),u(J,{class:"add-link",onClick:f[5]||(f[5]=e=>h(H)("+"))},{default:d(()=>[...f[18]||(f[18]=[w("Add Role Rule",-1)])]),_:1})],64))],2),u(ie,{"model-value":null!==h(A),title:"Own Role Only",icon:"person","onUpdate:modelValue":h(L),onCancel:h(N)},{actions:d(()=>[k((s(),c(J,{icon:"",rounded:"",onClick:h($)},{default:d(()=>[u(K,{name:"check"})]),_:1},8,["onClick"])),[[le,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(O)?(s(),g("div",Mi,[f[24]||(f[24]=m("p",{class:"hint"},"Leave roles and policies empty for a catch-all (place last).",-1)),m("div",Vi,[f[22]||(f[22]=m("label",null,"Roles",-1)),u(oe,{modelValue:h(O).roles,"onUpdate:modelValue":f[6]||(f[6]=e=>h(O).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",Ui,[f[23]||(f[23]=m("label",null,"Policies",-1)),u(oe,{modelValue:h(O).policies,"onUpdate:modelValue":f[7]||(f[7]=e=>h(O).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(ie,{"model-value":null!==h(R),title:"+"===h(R)?"Add Role Rule":"Role Visibility",icon:"policy","onUpdate:modelValue":h(q),onCancel:h(B)},{actions:d(()=>[k((s(),c(J,{disabled:h(P),icon:"",rounded:"",onClick:h(z)},{default:d(()=>[u(K,{name:"check"})]),_:1},8,["disabled","onClick"])),[[le,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(T)?(s(),g("div",ji,[f[30]||(f[30]=m("p",{class:"hint"},"Pick a role and at least one matching role or policy.",-1)),m("div",Ni,[f[25]||(f[25]=m("label",null,"Role to control",-1)),u(oe,{modelValue:h(T).id,"onUpdate:modelValue":f[8]||(f[8]=e=>h(T).id=e),items:h(I),"item-text":"text","item-value":"value",disabled:"+"!==h(R),placeholder:"Select role"},null,8,["modelValue","items","disabled"])]),m("div",Li,[f[26]||(f[26]=m("label",null,"Visibility",-1)),u(oe,{modelValue:h(T).visibility,"onUpdate:modelValue":f[9]||(f[9]=e=>h(T).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",$i,[f[27]||(f[27]=m("label",null,"Roles",-1)),u(oe,{modelValue:h(T).roles,"onUpdate:modelValue":f[10]||(f[10]=e=>h(T).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",Fi,[f[28]||(f[28]=m("label",null,"Policies",-1)),u(oe,{modelValue:h(T).policies,"onUpdate:modelValue":f[11]||(f[11]=e=>h(T).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),m("div",Hi,[u(re,{modelValue:h(T).block_routes,"onUpdate:modelValue":f[12]||(f[12]=e=>h(T).block_routes=e),label:"Block deep links to /users/roles/<id> when this rule hides it"},null,8,["modelValue"])]),h(R)&&"+"!==h(R)&&h(V)(h(R))?(s(),c(J,{key:0,secondary:"",onClick:h(X)},{default:d(()=>[...f[29]||(f[29]=[w(" Remove rule ",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","title","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-12ad5f1c] {\n\tpadding-inline: var(--content-padding);\n\tpadding-block-start: 0;\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--padded-top[data-v-12ad5f1c] {\n\tpadding-block-start: var(--content-padding);\n}\n.loading[data-v-12ad5f1c] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-12ad5f1c],\n.section-intro[data-v-12ad5f1c] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.section-intro[data-v-12ad5f1c] {\n\tmargin-bottom: 16px;\n}\n.section-divider[data-v-12ad5f1c] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-12ad5f1c] {\n\tmargin-top: 40px;\n}\n.list[data-v-12ad5f1c] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-12ad5f1c] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-12ad5f1c] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-12ad5f1c] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-12ad5f1c] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-12ad5f1c] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-weight: 600;\n}\n.to[data-v-12ad5f1c] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-12ad5f1c] {\n\tmargin-inline-start: 4px;\n}\n.row-actions[data-v-12ad5f1c] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-12ad5f1c] {\n\tmargin-top: 4px;\n}\n.empty[data-v-12ad5f1c] {\n\tmargin-bottom: 12px;\n\tcolor: var(--theme--foreground);\n}\n.drawer-content[data-v-12ad5f1c] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-12ad5f1c] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.checkbox-field[data-v-12ad5f1c] {\n\tpadding-top: 4px;\n}\n.hint[data-v-12ad5f1c],\n.sidebar-text[data-v-12ad5f1c] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.hint code[data-v-12ad5f1c],\n.sidebar-text code[data-v-12ad5f1c],\n.section-intro code[data-v-12ad5f1c] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n",{});var qi=Re(Bi,[["__scopeId","data-v-12ad5f1c"]]);const zi="__modulePermissionsRouteGuardInstalled",Xi="mp_home_applied";function Yi(e,t){try{const n=e?._s?.get?.(t);return n||null}catch{return null}}function Wi(e){const t=Yi(e,"userStore");return H(t?.currentUser)}function Gi(e){const t=Yi(e,"settingsStore");return M(t?.settings?.[A])}function Ki(){try{"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(Xi)}catch{}}function Ji(){try{"undefined"!=typeof sessionStorage&&sessionStorage.setItem(Xi,"1")}catch{}}function Qi(e){const t=Yi(e,"settingsStore"),n=t?.settings;if(!n)return new Set;const o=M(n[A]);if(Array.isArray(o.blocked_ids)&&o.blocked_ids.length>0)return new Set(o.blocked_ids.map(String));const i=n.module_bar,r=Yi(e,"userStore"),a=r?.currentUser?.role,l="string"==typeof a?a:a?.id,s=l?[String(l)]:[];return new Set(function(e,t,n){if(!Array.isArray(e))return[];const o=M(t).rules,i=new Map(o.map(e=>[e.id,e])),r=[];for(const t of e){const e=i.get(t.id);U(e,n)&&(e&&!1===e.block_routes||r.push(t.id))}return r}(i,o,{roleIds:s,policyIds:[]}))}function Zi(e){const t=Gi(e);return"string"==typeof t.home_path?R(t.home_path):(t.home_path,null)}function er(e,t,n,o){const i=Yi(e,"settingsStore"),r=i?.settings?.module_bar,a=function(e){const t=e.blocked instanceof Set?e.blocked:new Set(e.blocked),n=e.blockedCollections instanceof Set?e.blockedCollections:new Set(e.blockedCollections||[]),o=R(e.fromPath),i=o?N(o):null,r=new Set,a=[],l=e=>{const l=R(e);if(!l)return;if(r.has(l))return;if(o&&l===o)return;if(j(l,t))return;const s=L(l);if(s&&n.has(s))return;const c=N(l);i&&c&&c===i&&t.has(i)||(r.add(l),a.push(l))};if(l(e.homePath),Array.isArray(e.moduleBar))for(const n of e.moduleBar)"module"===n.type&&n.enabled&&"module-permissions"!==n.id&&(t.has(n.id)||l(`/${n.id}`));return r.has("/")||a.push("/"),a}({homePath:Zi(e),moduleBar:r,blocked:t,blockedCollections:n,fromPath:o});return a[0]||"/"}function tr(e,t,n,o,i){if(function(){try{return"undefined"!=typeof sessionStorage&&"1"===sessionStorage.getItem(Xi)}catch{return!1}}())return!1;if(Wi(t))return!1;const r=Yi(t,"userStore"),a=r?.currentUser;if(!a)return!1;const l=Zi(t),s=function(e){return!0===Gi(e).home_force}(t),c=R(a.last_page),d=R(e.path);if(!l)return!1;if(function(e){const t=e?.query?.redirect;return!("string"!=typeof t||!t.trim())||!(!Array.isArray(t)||!t.some(e=>"string"==typeof e&&e.trim()))}(e))return Ji(),!1;if(!s){if(c)return Ji(),!1;if(!function(e){const t=R(e);return"/"===t||"/content"===t}(e.path))return!1}const u=l;if(!u||u===d)return Ji(),!1;if(j(u,n))return Ji(),!1;const f=L(u);return f&&o.has(f)?(Ji(),!1):(Ji(),i(u),!0)}function nr(e,t,n,o,i,r){if(i.value>=4)return i.value=0,void("/"===R(e)?r():r("/"));const a=er(t,n,o,e),l=R(e),s=R(a);return s&&s!==l?"/"===s&&"/"===l?(i.value=0,void r()):(i.value+=1,void r(s)):(i.value=0,void("/"===l?r():r("/")))}const or="__modulePermissionsSidebarEnforcerInstalled",ir="mp-sidebar-enforcer-styles",rr="mp-sidebar-hidden",ar="data-mp-sidebar-panel-hidden",lr="data-mp-sidebar-chrome-hidden",sr=new Map(O.map(e=>[e.id,e.icon]));function cr(e,t){try{const n=e?._s?.get?.(t);return n||null}catch{return null}}function dr(e){const t=cr(e,"userStore");return H(t?.currentUser)}function ur(e){const t=cr(e,"settingsStore");return M(t?.settings?.[A])}function fr(e){const t=ur(e);return"collapsed"===t.sidebar_mode||"hidden"===t.sidebar_mode?t.sidebar_mode:"default"}function pr(){let e=document.getElementById(ir);return e||(e=document.createElement("style"),e.id=ir,document.head.appendChild(e),e)}function mr(){document.querySelectorAll(`[${lr}]`).forEach(e=>{e.removeAttribute(lr)})}function vr(){mr();const e=document.querySelector("#sidebar")||document.querySelector("#sidebar-desktop-outlet")||document.querySelector(".sidebar-outlet:has(#sidebar)");if(!(e instanceof HTMLElement))return;const t=e.closest(".sp-end");if(!(t instanceof HTMLElement))return;t.setAttribute(lr,"");const n=t.previousElementSibling;n instanceof HTMLElement&&n.classList.contains("sp-divider")&&n.setAttribute(lr,"")}function hr(e){const t=cr(e,"sidebar-store");try{t?.collapse?.()}catch{}const n=cr(e,"appStore");try{n&&"sidebarOpen"in n&&(n.sidebarOpen=!1)}catch{}}function gr(e,t){e&&e instanceof HTMLElement&&(e.setAttribute(ar,t),e.style.display="none")}function br(e){const t=e.querySelector?.(".material-icons, .material-symbols-outlined, .material-symbols-rounded");if(t?.textContent){const e=t.textContent.trim();if(e)return e}const n=e.querySelector?.("[data-icon], [aria-label]"),o=n?.getAttribute("data-icon")||n?.getAttribute("aria-label");if(o)return o.trim();const i=e.classList?.contains("v-icon")?e:e.querySelector?.(".v-icon");if(i?.textContent){const e=i.textContent.trim();if(e&&e.length<64&&!e.includes("\n"))return e}return null}function yr(e,t){const n=document.querySelector("#sidebar");if(!n)return;n.querySelectorAll(".toggle, button.accordion-trigger, .sidebar-detail > button").forEach(n=>{if(br(n)!==t)return;gr(n,e);let o=n.nextElementSibling;for(;o&&!(o.classList.contains("toggle")||o.classList.contains("accordion-item")||o.classList.contains("accordion-trigger"));)(o.classList.contains("content")||o.classList.contains("scroll-container")||o.classList.contains("accordion-content")||o instanceof HTMLElement&&o.getAttribute("data-state"))&&gr(o,e),o=o.nextElementSibling;const i=n.closest(".sidebar-detail");i&&i!==n&&gr(i,e)})}function wr(e){"activity"===e&&(document.querySelectorAll("#sidebar .notifications-preview").forEach(t=>{gr(t,e)}),document.querySelectorAll("#sidebar .sidebar-button, #sidebar button.sidebar-button").forEach(t=>{if("pending_actions"!==br(t))return;gr(t.closest(".notifications-preview")||t,e)}))}function _r(e){if(dr(e))return pr().textContent="",document.documentElement.classList.remove(rr),mr(),void document.querySelectorAll(`[${ar}]`).forEach(e=>{e.removeAttribute(ar),e.style.removeProperty("display")});const t=function(e){const t=ur(e);return Array.isArray(t.sidebar_hidden_panels)?t.sidebar_hidden_panels.map(String):[]}(e),n=fr(e);pr().textContent=`${function(e){if(!e.length)return"";const t=[];for(const n of e){const e=CSS.escape(n);t.push(`.accordion-item:has(#${e}) { display: none !important; }`),t.push(`.accordion-item[data-value="${e}"] { display: none !important; }`),t.push(`.accordion-section:has(#${e}) { display: none !important; }`),t.push(`.v-list-group:has(#${e}) { display: none !important; }`),t.push(`[${ar}="${e}"] { display: none !important; }`),"activity"===n&&t.push("#sidebar .notifications-preview { display: none !important; }")}return t.join("\n")}(t)}\n${function(e){return"hidden"!==e?"":`\nhtml.${rr} #sidebar,\nhtml.${rr} #sidebar-desktop-outlet,\nhtml.${rr} .sidebar-outlet:has(#sidebar),\nhtml.${rr} .sp-end[${lr}],\nhtml.${rr} .sp-divider[${lr}] {\n\tdisplay: none !important;\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\tmax-width: 0 !important;\n\tinline-size: 0 !important;\n\tflex-basis: 0 !important;\n\tflex-grow: 0 !important;\n\tflex-shrink: 0 !important;\n\toverflow: hidden !important;\n\tpointer-events: none !important;\n\tborder: none !important;\n\ttransform: none !important;\n}\n\nhtml.${rr} .main-split:has(.sp-end[${lr}]),\nhtml.${rr} .main-split:has(#sidebar),\nhtml.${rr} .main-split:has(#sidebar-desktop-outlet) {\n\tgrid-template-columns: minmax(0, 1fr) 0px 0px !important;\n}\n\n/* Clear the collapsed-rail content offset (Directus ≤11.13 / 11.7.x). */\nhtml.${rr} .private-view #main-content,\nhtml.${rr} #main-content {\n\tmargin-right: 0 !important;\n}\n\nhtml.${rr} .sidebar-button,\nhtml.${rr} button.sidebar-toggle,\nhtml.${rr} .header-bar .sidebar-toggle,\nhtml.${rr} [data-sidebar-toggle] {\n\tdisplay: none !important;\n}\n`.trim()}(n)}`,function(e){const t=new Set(e);document.querySelectorAll(`[${ar}]`).forEach(e=>{const n=e.getAttribute(ar);n&&t.has(n)||(e.removeAttribute(ar),e.style.removeProperty("display"))});for(const t of e){const e=document.getElementById(t)||document.querySelector(`.accordion-item[data-value="${CSS.escape(t)}"]`);e&&gr(e.closest(".accordion-item")||e.closest(".accordion-section")||e.closest(".v-list-group")||(e.classList?.contains("accordion-item")?e:null)||e.parentElement,t);const n=sr.get(t)||null;n&&yr(t,n),wr(t)}}(t),function(e,t){const n=document.documentElement;if("hidden"===t)return n.classList.add(rr),vr(),void hr(e);n.classList.remove(rr),mr(),"collapsed"===t&&hr(e)}(e,n)}const xr="__modulePermissionsUsersNavEnforcerInstalled",Sr="mp-users-nav-enforcer-styles",kr="data-mp-module-nav-hidden",Er="data-mp-users-role-hidden",Cr=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ar(e,t){try{const n=e?._s?.get?.(t);return n||null}catch{return null}}function Or(e){const t=Ar(e,"userStore");return H(t?.currentUser)}function Dr(e){const t=Ar(e,"settingsStore");return M(t?.settings?.[A])}function Ir(){let e=document.getElementById(Sr);return e||(e=document.createElement("style"),e.id=Sr,document.head.appendChild(e),e)}function Rr(){document.documentElement.classList.remove("mp-module-nav-hidden"),document.querySelectorAll(`[${kr}]`).forEach(e=>{e.removeAttribute(kr)})}let Tr=!1;function Pr(e){if(Tr){Tr=!1;try{const t=Ar(e,"nav-bar-store");if(!t)return;"function"==typeof t.expand?t.expand():"collapsed"in t&&(t.collapsed=!1)}catch{}}}function Mr(e,t){const n=Dr(e),o=new Set((n.navigation_hidden_modules||[]).map(String)),i=N(t);Ir().textContent=`\naside[${kr}],\n#module-navigation[${kr}],\n.module-nav[${kr}],\n.mobile-nav[${kr}],\n.resize-wrapper[${kr}],\n.sp-start[${kr}],\n.sp-divider[${kr}] {\n\tdisplay: none !important;\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\tmax-width: 0 !important;\n\tinline-size: 0 !important;\n\tmin-inline-size: 0 !important;\n\tmax-inline-size: 0 !important;\n\tflex: 0 0 0 !important;\n\toverflow: hidden !important;\n\tpointer-events: none !important;\n\tborder: none !important;\n}\n\n/* Free the SplitPanel start track (11.17+ / 12). Scoped --*-gridTemplate alone\n still reserves space; override the resolved grid template. */\n.root-split:has(.sp-start[${kr}]),\n.root-split:has(.sp-start [${kr}]) {\n\tgrid-template-columns: 0px 0px minmax(0, 1fr) !important;\n}\n`.trim(),Rr();if(!Boolean(i&&o.has(i)))return void Pr(e);const r=function(){const e=[],t=t=>{t instanceof HTMLElement&&!e.includes(t)&&e.push(t)};document.querySelectorAll("aside.module-nav, #module-navigation, .mobile-nav.module-nav").forEach(e=>{"navigation"===e.id&&e.querySelector(":scope > .module-bar, :scope > .resize-wrapper")||t(e)});const n=document.querySelector("#navigation");if(n){const e=n.querySelector(":scope > .resize-wrapper")||n.querySelector(":scope > .v-resizeable");e instanceof HTMLElement&&e.querySelector(".module-nav")?t(e):n.querySelectorAll(".module-nav").forEach(e=>{if(!(e instanceof HTMLElement))return;if(e.closest(".module-bar"))return;const n=e.parentElement;n?.classList.contains("resize-wrapper")?t(n):t(e)})}return e}();for(const e of r)e.setAttribute(kr,"");!function(e){for(const t of e){const e=t.closest(".sp-start");if(!(e instanceof HTMLElement))continue;if(!e.querySelector("aside.module-nav, #module-navigation, .module-nav"))continue;e.setAttribute(kr,"");const n=e.nextElementSibling;n instanceof HTMLElement&&n.classList.contains("sp-divider")&&n.setAttribute(kr,"")}}(r),function(e){try{const t=Ar(e,"nav-bar-store");if(!t)return;if(!("boolean"==typeof t.collapsed?t.collapsed:Boolean(t.collapsed?.value)))return"function"==typeof t.collapse?t.collapse():"collapsed"in t&&(t.collapsed=!0),void(Tr=!0);"function"==typeof t.collapse&&t.collapse()}catch{}}(e),function(e){const t=new Set;for(const n of e){const e=n.closest(".sp-start");if(!(e instanceof HTMLElement))continue;if(!e.querySelector("aside.module-nav, #module-navigation, .module-nav"))continue;const o=e.closest(".sp-root.root-split, .root-split.sp-root, .root-split");o&&t.add(o)}for(const e of t){const t=[];for(let n=0;n<e.style.length;n++){const o=e.style.item(n);o&&(o.endsWith("gridTemplate")||o.endsWith("-gridTemplate"))&&t.push(o)}for(const n of t)e.style.setProperty(n,"0px 0px minmax(0, 1fr)")}}(r)}function Vr(e,t){const n=Dr(e),o=!0===n.users_own_role_only,i=new Set((n.users_allowed_role_ids||[]).map(String)),r=new Set((n.users_hidden_role_ids||[]).map(String));if(document.querySelectorAll(`[${Er}]`).forEach(e=>{e.removeAttribute(Er),e.style.removeProperty("display")}),!o&&0===r.size)return;const a=document.querySelector("#module-navigation")||document.querySelector("#navigation .module-nav-content")||document.querySelector("aside.module-nav .module-nav-content")||document.querySelector(".module-nav-content")||document.querySelector("aside.module-nav");if(!a)return;const l=new Set,s=(e,t)=>{e&&t&&!l.has(t)&&function(e,t,n,o){return!!o.has(e)||!(!t||n.has(e))}(e,o,i,r)&&(!function(e,t){e.setAttribute(Er,t),e.style.display="none"}(t,e),l.add(t))};a.querySelectorAll('a[href*="/users/roles/"]').forEach(e=>{const t=function(e){if(!e)return null;try{const t=(new URL(e,window.location.origin).pathname.replace(/^\/admin/,"")||"/").split("/").filter(Boolean);return"users"!==t[0]||"roles"!==t[1]?null:t[2]&&"+"!==t[2]?t[2]:null}catch{const t=e.match(/\/users\/roles\/([^/?#]+)/);return t?.[1]&&"+"!==t[1]?t[1]:null}}(e.getAttribute("href")),n=e.closest(".v-list-item")||e.closest(".v-list-group")||e;s(t,n)}),a.querySelectorAll("[data-value], [data-role], [data-role-id], [data-id]").forEach(e=>{const t=e,n=[t.getAttribute("data-value"),t.getAttribute("data-role"),t.getAttribute("data-role-id"),t.getAttribute("data-id")];for(const e of n){if(!e||!Cr.test(e))continue;const n=t.closest(".v-list-group")||t.closest(".v-list-item")||t;s(e,n);break}});const c=(String(t||"").replace(/^\/admin/,"")||"/").match(/^\/users\/roles\/([^/?#]+)/),d=c?.[1]&&"+"!==c[1]?c[1]:null;if(r.size>0||o&&i.size>0){a.querySelectorAll(".v-list-group > .v-list-item.clickable, .v-list-item.clickable, .v-list-group.clickable").forEach(e=>{const t=e;if(l.has(t)||t.hasAttribute(Er))return;const n=(t.textContent||"").trim().toLowerCase();if("active users"===n||"suspended users"===n||"invited users"===n||"all users"===n||n.startsWith("active users")||n.startsWith("suspended")||n.startsWith("invited")||n.startsWith("all users"))return;(t.classList.contains("active")||"page"===t.getAttribute("aria-current"))&&d&&s(d,t)})}}function Ur(e){if(window.__mpRolesClientFilterInstalled)return;window.__mpRolesClientFilterInstalled=!0;const t=XMLHttpRequest.prototype,n=t.open,o=t.send,i=Object.getOwnPropertyDescriptor(t,"responseText"),r=Object.getOwnPropertyDescriptor(t,"response"),a=i?.get,l=r?.get;a&&(t.open=function(e,t,...o){return this.__mpRolesUrl="string"==typeof t?t:String(t),this.__mpRolesMethod=e,n.call(this,e,t,...o)},t.send=function(...t){const n=String(this.__mpRolesUrl||"");if("GET"===String(this.__mpRolesMethod||"GET").toUpperCase()&&function(e){try{const t=new URL(e,window.location.origin).pathname.replace(/\/$/,"");return/\/roles$/.test(t)&&!/\/roles\//.test(t)}catch{return/\/roles(\?|$)/.test(e)&&!/\/roles\//.test(e)}}(n)){let t=null;Object.defineProperty(this,"responseText",{configurable:!0,enumerable:!0,get:()=>{const n=a.call(this);if(4!==this.readyState)return n;if(null!=t)return t;if(this.status<200||this.status>=300||!n)return t=n,n;try{const o=JSON.parse(n),i=function(e,t){if(Or(t))return e;if(!e||!Array.isArray(e.data))return e;const n=Dr(t),o=!0===n.users_own_role_only,i=new Set((n.users_allowed_role_ids||[]).map(String)),r=new Set((n.users_hidden_role_ids||[]).map(String));if(!o&&0===r.size)return e;const a=e.data.filter(e=>{const t=null!=e?.id?String(e.id):"";return!t||!r.has(t)&&!(o&&!i.has(t))}),l=new Set(a.map(e=>String(e.id)));return{...e,data:a.map(e=>{const t=e?.parent;return null==t||""===t||l.has(String(t))?e:{...e,parent:null}})}}(o,e);t=i===o?n:JSON.stringify(i)}catch{t=n}return t}}),l&&Object.defineProperty(this,"response",{configurable:!0,enumerable:!0,get:()=>{const e=this.responseType;return e&&"text"!==e&&""!==e?l.call(this):this.responseText}})}return o.apply(this,t)})}!function(){if("undefined"==typeof window)return;if(window[zi])return;const e=Date.now(),t={value:0},n=window.setInterval(()=>{const o=document.querySelector("#app"),i=o?.__vue_app__,r=i?.config?.globalProperties?.$router,a=function(e){return e?.config?.globalProperties?.$pinia||null}(i);i&&r&&a?(window.clearInterval(n),window[zi]=!0,r.beforeEach((e,n,o)=>{try{if(function(e){const t=R(e)||"";return"/login"===t||t.startsWith("/login/")}(e.path))return Ki(),t.value=0,void o();if(Wi(a))return t.value=0,void o();const n=Yi(a,"userStore");if(!n?.currentUser)return Ki(),t.value=0,void o();const i=Qi(a),r=function(e){const t=Gi(e);return Array.isArray(t.blocked_collection_ids)?new Set(t.blocked_collection_ids.map(String)):new Set}(a),l=function(e){const t=Gi(e),n=new Set;if(Array.isArray(t.users_blocked_role_ids))for(const e of t.users_blocked_role_ids)n.add(String(e));if(!0===t.users_own_role_only){const n=new Set((t.users_allowed_role_ids||[]).map(String));e.__mpUsersAllowedRoles=n}else e.__mpUsersAllowedRoles=null;return n}(a);if(tr(e,a,i,r,o))return void(t.value=0);const s=L(e.path);if(s&&r.has(s))return void nr(e.path,a,i,r,t,o);const c=function(e){const t=R(e);if(!t)return null;const n=t.split("/").filter(Boolean);return"users"!==n[0]||"roles"!==n[1]?null:n[2]&&"+"!==n[2]?n[2]:null}(e.path);if(c&&function(e,t,n){if(n.has(t))return!0;const o=e.__mpUsersAllowedRoles;return!(!o||o.has(t))}(a,c,l))return void nr(e.path,a,i,r,t,o);const d=N(e.path);if(!d)return t.value=0,void o();if("module-permissions"===d)return t.value=0,void o();if(!i.has(d))return t.value=0,void o();nr(e.path,a,i,r,t,o)}catch{t.value=0,o()}}),r.afterEach(()=>{t.value=0})):Date.now()-e>45e3&&window.clearInterval(n)},150)}(),function(){if("undefined"==typeof window)return;if(window[or])return;const e=Date.now(),t=window.setInterval(()=>{const n=document.querySelector("#app"),o=n?.__vue_app__,i=o?.config?.globalProperties?.$router,r=function(e){return e?.config?.globalProperties?.$pinia||null}(o);if(!o||!i||!r)return void(Date.now()-e>45e3&&window.clearInterval(t));window.clearInterval(t),window[or]=!0;let a=!1;const l=()=>{a||(a=!0,window.requestAnimationFrame(()=>{a=!1;try{_r(r)}catch{}}))};l(),i.afterEach(()=>{window.setTimeout(l,0),window.setTimeout(l,120),window.setTimeout(l,400)});const s=new MutationObserver(()=>{l()}),c=()=>{const e=document.querySelector("#sidebar")||document.body;s.observe(e,{childList:!0,subtree:!0})};c(),window.setInterval(c,5e3),window.setInterval(()=>{try{if(dr(r))return;const e=fr(r);"collapsed"!==e&&"hidden"!==e||hr(r),"hidden"===e&&vr()}catch{}},400)},150)}(),function(){if("undefined"==typeof window)return;if(window[xr])return;const e=Date.now(),t=window.setInterval(()=>{const n=document.querySelector("#app"),o=n?.__vue_app__,i=o?.config?.globalProperties?.$router,r=function(e){return e?.config?.globalProperties?.$pinia||null}(o);if(!o||!i||!r)return void(Date.now()-e>45e3&&window.clearInterval(t));window.clearInterval(t),window[xr]=!0,Ur(r);let a=!1;const l=e=>{a||(a=!0,window.requestAnimationFrame(()=>{a=!1;try{const t=e||i.currentRoute?.value?.path||i.currentRoute?.path||window.location.pathname;!function(e,t){if(Or(e))return Rr(),Pr(e),document.querySelectorAll(`[${Er}]`).forEach(e=>{e.removeAttribute(Er),e.style.removeProperty("display")}),void(Ir().textContent="");Mr(e,t),"users"===N(t)&&Vr(e,t)}(r,String(t||"/"))}catch{}}))};l(),i.afterEach(e=>{window.setTimeout(()=>l(e.path),0),window.setTimeout(()=>l(e.path),120),window.setTimeout(()=>l(e.path),400)});const s=new MutationObserver(()=>l()),c=()=>{const e=document.querySelector("#module-navigation")||document.querySelector("aside.module-nav")||document.querySelector("#navigation .module-nav")||document.querySelector("#navigation")||document.body;s.observe(e,{childList:!0,subtree:!0})};c(),window.setInterval(c,5e3)},150)}();const jr=[],Nr=[],Lr=[],$r=[n({id:"module-permissions",name:"Module Permissions",icon:"security",routes:[{path:"",redirect:"/module-permissions/modules"},{path:"modules",component:qo},{path:"navigation",redirect:"/module-permissions/modules"},{path:"sidebar",component:mi},{path:"content",component:Xe},{path:"collections",redirect:"/module-permissions/content"},{path:"users",component:qi},{path:"start-page",component:Ei},{path:"home-paths",redirect:"/module-permissions/start-page"},{path:"settings",component:Ko},{path:"cleanup",redirect:"/module-permissions/settings"}],preRegisterCheck:e=>H(e)})],Fr=[],Hr=[],Br=[];export{Nr as displays,jr as interfaces,Lr as layouts,$r as modules,Br as operations,Fr as panels,Hr as themes};
|
|
8
|
+
function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach(function(t){et(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(){return tt=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},tt.apply(this,arguments)}function nt(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ot(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function rt(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var at=rt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),lt=rt(/Edge/i),st=rt(/firefox/i),ct=rt(/safari/i)&&!rt(/chrome/i)&&!rt(/android/i),dt=rt(/iP(ad|od|hone)/i),ut=rt(/chrome/i)&&rt(/android/i),ft={capture:!1,passive:!1};function pt(e,t,n){e.addEventListener(t,n,!at&&ft)}function mt(e,t,n){e.removeEventListener(t,n,!at&&ft)}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(e){return!1}return!1}}function ht(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function gt(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&vt(e,t):vt(e,t))||o&&e===n)return e;if(e===n)break}while(e=ht(e))}return null}var bt,yt=/\s+/g;function wt(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(yt," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(yt," ")}}function _t(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function xt(e,t){var n="";if("string"==typeof e)n=e;else do{var o=_t(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function St(e,t,n){if(e){var o=e.getElementsByTagName(t),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function kt(){var e=document.scrollingElement;return e||document.documentElement}function Et(e,t,n,o,i){if(e.getBoundingClientRect||e===window){var r,a,l,s,c,d,u;if(e!==window&&e.parentNode&&e!==kt()?(a=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,d=r.height,u=r.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!at))do{if(i&&i.getBoundingClientRect&&("none"!==_t(i,"transform")||n&&"static"!==_t(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(_t(i,"border-top-width")),l-=f.left+parseInt(_t(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);if(o&&e!==window){var p=xt(i||e),m=p&&p.a,v=p&&p.d;p&&(s=(a/=v)+(d/=v),c=(l/=m)+(u/=m))}return{top:a,left:l,bottom:s,right:c,width:u,height:d}}}function Ct(e,t,n){for(var o=Rt(e,!0),i=Et(e)[t];o;){if(!(i>=Et(o)[n]))return o;if(o===kt())break;o=Rt(o,!1)}return!1}function At(e,t,n,o){for(var i=0,r=0,a=e.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Nn.ghost&&(o||a[r]!==Nn.dragged)&>(a[r],n.draggable,e,!1)){if(i===t)return a[r];i++}r++}return null}function Ot(e,t){for(var n=e.lastElementChild;n&&(n===Nn.ghost||"none"===_t(n,"display")||t&&!vt(n,t));)n=n.previousElementSibling;return n||null}function Dt(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Nn.clone||t&&!vt(e,t)||n++;return n}function It(e){var t=0,n=0,o=kt();if(e)do{var i=xt(e),r=i.a,a=i.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function Rt(e,t){if(!e||!e.getBoundingClientRect)return kt();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=_t(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return kt();if(o||t)return n;o=!0}}}while(n=n.parentNode);return kt()}function Tt(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)}function Pt(e,t){return function(){if(!bt){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),bt=setTimeout(function(){bt=void 0},t)}}}function Mt(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Vt(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)}function jt(e,t){_t(e,"position","absolute"),_t(e,"top",t.top),_t(e,"left",t.left),_t(e,"width",t.width),_t(e,"height",t.height)}function Ut(e){_t(e,"position",""),_t(e,"top",""),_t(e,"left",""),_t(e,"width",""),_t(e,"height","")}var Nt="Sortable"+(new Date).getTime();function Lt(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(e){if("none"!==_t(e,"display")&&e!==Nn.ghost){t.push({target:e,rect:Et(e)});var n=Qe({},t[t.length-1].rect);if(e.thisAnimationDuration){var o=xt(e,!0);o&&(n.top-=o.f,n.left-=o.e)}e.fromRect=n}})},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(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}(t,{target:e}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var i=!1,r=0;t.forEach(function(e){var t=0,n=e.target,a=n.fromRect,l=Et(n),s=n.prevFromRect,c=n.prevToRect,d=e.rect,u=xt(n,!0);u&&(l.top-=u.f,l.left-=u.e),n.toRect=l,n.thisAnimationDuration&&Tt(s,l)&&!Tt(a,l)&&(d.top-l.top)/(d.left-l.left)===(a.top-l.top)/(a.left-l.left)&&(t=function(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}(d,s,c,o.options)),Tt(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=o.options.animation),o.animate(n,d,l,t)),t&&(i=!0,r=Math.max(r,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(e),i?e=setTimeout(function(){"function"==typeof n&&n()},r):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,o){if(o){_t(e,"transition",""),_t(e,"transform","");var i=xt(this.el),r=i&&i.a,a=i&&i.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,_t(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),_t(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_t(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){_t(e,"transition",""),_t(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}}var $t=[],Ft={initializeByDefault:!0},Ht={mount:function(e){for(var t in Ft)Ft.hasOwnProperty(t)&&!(t in e)&&(e[t]=Ft[t]);$t.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$t.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=e+"Global";$t.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][i]&&t[o.pluginName][i](Qe({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](Qe({sortable:t},n)))})},initializePlugins:function(e,t,n,o){for(var i in $t.forEach(function(o){var i=o.pluginName;if(e.options[i]||o.initializeByDefault){var r=new o(e,t,e.options);r.sortable=e,r.options=e.options,e[i]=r,tt(n,r.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var r=this.modifyOption(e,i,e.options[i]);void 0!==r&&(e.options[i]=r)}},getEventProperties:function(e,t){var n={};return $t.forEach(function(o){"function"==typeof o.eventProperties&&tt(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return $t.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(o=i.optionListeners[t].call(e[i.pluginName],n))}),o}};function Bt(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,r=e.cloneEl,a=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[Nt]){var v,h=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||at||lt?(v=document.createEvent("Event")).initEvent(o,!0,!0):v=new CustomEvent(o,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=l||n,v.item=i||n,v.clone=r,v.oldIndex=s,v.newIndex=c,v.oldDraggableIndex=d,v.newDraggableIndex=u,v.originalEvent=f,v.pullMode=p?p.lastPutMode:void 0;var b=Qe(Qe({},m),Ht.getEventProperties(o,t));for(var y in b)v[y]=b[y];n&&n.dispatchEvent(v),h[g]&&h[g].call(t,v)}}var qt=["evt"],zt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=nt(n,qt);Ht.pluginEvent.bind(Nn)(e,t,Qe({dragEl:Yt,parentEl:Wt,ghostEl:Gt,rootEl:Kt,nextEl:Jt,lastDownEl:Qt,cloneEl:Zt,cloneHidden:en,dragStarted:mn,putSortable:ln,activeSortable:Nn.active,originalEvent:o,oldIndex:tn,oldDraggableIndex:on,newIndex:nn,newDraggableIndex:rn,hideGhostForTarget:Mn,unhideGhostForTarget:Vn,cloneNowHidden:function(){en=!0},cloneNowShown:function(){en=!1},dispatchSortableEvent:function(e){Xt({sortable:t,name:e,originalEvent:o})}},i))};function Xt(e){Bt(Qe({putSortable:ln,cloneEl:Zt,targetEl:Yt,rootEl:Kt,oldIndex:tn,oldDraggableIndex:on,newIndex:nn,newDraggableIndex:rn},e))}var Yt,Wt,Gt,Kt,Jt,Qt,Zt,en,tn,nn,on,rn,an,ln,sn,cn,dn,un,fn,pn,mn,vn,hn,gn,bn,yn=!1,wn=!1,_n=[],xn=!1,Sn=!1,kn=[],En=!1,Cn=[],An="undefined"!=typeof document,On=dt,Dn=lt||at?"cssFloat":"float",In=An&&!ut&&!dt&&"draggable"in document.createElement("div"),Rn=function(){if(An){if(at)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Tn=function(e,t){var n=_t(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=At(e,0,t),r=At(e,1,t),a=i&&_t(i),l=r&&_t(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Et(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.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(i&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Dn]||r&&"none"===n[Dn]&&s+c>o)?"vertical":"horizontal"},Pn=function(e){function t(e,n){return function(o,i,r,a){var l=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,i,r,a),n)(o,i,r,a);var s=(n?o:i).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==Ze(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Mn=function(){!Rn&&Gt&&_t(Gt,"display","none")},Vn=function(){!Rn&&Gt&&_t(Gt,"display","")};An&&document.addEventListener("click",function(e){if(wn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),wn=!1,!1},!0);var jn=function(e){if(Yt){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,_n.some(function(e){var t=e[Nt].options.emptyInsertThreshold;if(t&&!Ot(e)){var n=Et(e),o=i>=n.left-t&&i<=n.right+t,l=r>=n.top-t&&r<=n.bottom+t;return o&&l?a=e:void 0}}),a);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Nt]._onDragOver(n)}}var i,r,a},Un=function(e){Yt&&Yt.parentNode[Nt]._isOutsideThisEl(e.target)};function Nn(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=tt({},t),e[Nt]=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 Tn(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(e,t){e.setData("Text",t.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!==Nn.supportPointer&&"PointerEvent"in window&&!ct,emptyInsertThreshold:5};for(var o in Ht.initializePlugins(this,e,n),n)!(o in t)&&(t[o]=n[o]);for(var i in Pn(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&In,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pt(e,"pointerdown",this._onTapStart):(pt(e,"mousedown",this._onTapStart),pt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pt(e,"dragover",this),pt(e,"dragenter",this)),_n.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),tt(this,Lt())}function Ln(e,t,n,o,i,r,a,l){var s,c,d=e[Nt],u=d.options.onMove;return!window.CustomEvent||at||lt?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=i||t,s.relatedRect=r||Et(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),u&&(c=u.call(d,s,a)),c}function $n(e){e.draggable=!1}function Fn(){En=!1}function Hn(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 Bn(e){return setTimeout(e,0)}function qn(e){return clearTimeout(e)}Nn.prototype={constructor:Nn,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(vn=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Yt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,i=o.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Cn.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var o=t[n];o.checked&&Cn.push(o)}}(n),!Yt&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!ct||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=gt(l,o.draggable,n,!1))&&l.animated||Qt===l)){if(tn=Dt(l),on=Dt(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Xt({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),zt("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(o){if(o=gt(s,o.trim(),n,!1))return Xt({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),zt("filter",t,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());o.handle&&!gt(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!Yt&&n.parentNode===r){var s=Et(n);if(Kt=r,Wt=(Yt=n).parentNode,Jt=Yt.nextSibling,Qt=n,an=a.group,Nn.dragged=Yt,sn={target:Yt,clientX:(t||e).clientX,clientY:(t||e).clientY},fn=sn.clientX-s.left,pn=sn.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Yt.style["will-change"]="all",o=function(){zt("delayEnded",i,{evt:e}),Nn.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!st&&i.nativeDraggable&&(Yt.draggable=!0),i._triggerDragStart(e,t),Xt({sortable:i,name:"choose",originalEvent:e}),wt(Yt,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){St(Yt,e.trim(),$n)}),pt(l,"dragover",jn),pt(l,"mousemove",jn),pt(l,"touchmove",jn),pt(l,"mouseup",i._onDrop),pt(l,"touchend",i._onDrop),pt(l,"touchcancel",i._onDrop),st&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Yt.draggable=!0),zt("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(lt||at))o();else{if(Nn.eventCanceled)return void this._onDrop();pt(l,"mouseup",i._disableDelayedDrag),pt(l,"touchend",i._disableDelayedDrag),pt(l,"touchcancel",i._disableDelayedDrag),pt(l,"mousemove",i._delayedDragTouchMoveHandler),pt(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&pt(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Yt&&$n(Yt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;mt(e,"mouseup",this._disableDelayedDrag),mt(e,"touchend",this._disableDelayedDrag),mt(e,"touchcancel",this._disableDelayedDrag),mt(e,"mousemove",this._delayedDragTouchMoveHandler),mt(e,"touchmove",this._delayedDragTouchMoveHandler),mt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?pt(document,"pointermove",this._onTouchMove):pt(document,t?"touchmove":"mousemove",this._onTouchMove):(pt(Yt,"dragend",this),pt(Kt,"dragstart",this._onDragStart));try{document.selection?Bn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(yn=!1,Kt&&Yt){zt("dragStarted",this,{evt:t}),this.nativeDraggable&&pt(document,"dragover",Un);var n=this.options;!e&&wt(Yt,n.dragClass,!1),wt(Yt,n.ghostClass,!0),Nn.active=this,e&&this._appendGhost(),Xt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(cn){this._lastX=cn.clientX,this._lastY=cn.clientY,Mn();for(var e=document.elementFromPoint(cn.clientX,cn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(cn.clientX,cn.clientY))!==t;)t=e;if(Yt.parentNode[Nt]._isOutsideThisEl(e),t)do{if(t[Nt]){if(t[Nt]._onDragOver({clientX:cn.clientX,clientY:cn.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Vn()}},_onTouchMove:function(e){if(sn){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=Gt&&xt(Gt,!0),a=Gt&&r&&r.a,l=Gt&&r&&r.d,s=On&&bn&&It(bn),c=(i.clientX-sn.clientX+o.x)/(a||1)+(s?s[0]-kn[0]:0)/(a||1),d=(i.clientY-sn.clientY+o.y)/(l||1)+(s?s[1]-kn[1]:0)/(l||1);if(!Nn.active&&!yn){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Gt){r?(r.e+=c-(dn||0),r.f+=d-(un||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");_t(Gt,"webkitTransform",u),_t(Gt,"mozTransform",u),_t(Gt,"msTransform",u),_t(Gt,"transform",u),dn=c,un=d,cn=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Gt){var e=this.options.fallbackOnBody?document.body:Kt,t=Et(Yt,!0,On,!0,e),n=this.options;if(On){for(bn=e;"static"===_t(bn,"position")&&"none"===_t(bn,"transform")&&bn!==document;)bn=bn.parentNode;bn!==document.body&&bn!==document.documentElement?(bn===document&&(bn=kt()),t.top+=bn.scrollTop,t.left+=bn.scrollLeft):bn=kt(),kn=It(bn)}wt(Gt=Yt.cloneNode(!0),n.ghostClass,!1),wt(Gt,n.fallbackClass,!0),wt(Gt,n.dragClass,!0),_t(Gt,"transition",""),_t(Gt,"transform",""),_t(Gt,"box-sizing","border-box"),_t(Gt,"margin",0),_t(Gt,"top",t.top),_t(Gt,"left",t.left),_t(Gt,"width",t.width),_t(Gt,"height",t.height),_t(Gt,"opacity","0.8"),_t(Gt,"position",On?"absolute":"fixed"),_t(Gt,"zIndex","100000"),_t(Gt,"pointerEvents","none"),Nn.ghost=Gt,e.appendChild(Gt),_t(Gt,"transform-origin",fn/parseInt(Gt.style.width)*100+"% "+pn/parseInt(Gt.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,i=n.options;zt("dragStart",this,{evt:e}),Nn.eventCanceled?this._onDrop():(zt("setupClone",this),Nn.eventCanceled||((Zt=Vt(Yt)).draggable=!1,Zt.style["will-change"]="",this._hideClone(),wt(Zt,this.options.chosenClass,!1),Nn.clone=Zt),n.cloneId=Bn(function(){zt("clone",n),Nn.eventCanceled||(n.options.removeCloneOnHide||Kt.insertBefore(Zt,Yt),n._hideClone(),Xt({sortable:n,name:"clone"}))}),!t&&wt(Yt,i.dragClass,!0),t?(wn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(mt(document,"mouseup",n._onDrop),mt(document,"touchend",n._onDrop),mt(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,Yt)),pt(document,"drop",n),_t(Yt,"transform","translateZ(0)")),yn=!0,n._dragStartId=Bn(n._dragStarted.bind(n,t,e)),pt(document,"selectstart",n),mn=!0,ct&&_t(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,i,r=this.el,a=e.target,l=this.options,s=l.group,c=Nn.active,d=an===s,u=l.sort,f=ln||c,p=this,m=!1;if(!En){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=gt(a,l.draggable,r,!0),D("dragOver"),Nn.eventCanceled)return m;if(Yt.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return R(!1);if(wn=!1,c&&!l.disabled&&(d?u||(o=Wt!==Kt):ln===this||(this.lastPutMode=an.checkPull(this,c,Yt,e))&&s.checkPut(this,c,Yt,e))){if(i="vertical"===this._getDirection(e,a),t=Et(Yt),D("dragOverValid"),Nn.eventCanceled)return m;if(o)return Wt=Kt,I(),this._hideClone(),D("revert"),Nn.eventCanceled||(Jt?Kt.insertBefore(Yt,Jt):Kt.appendChild(Yt)),R(!0);var v=Ot(r,l.draggable);if(!v||function(e,t,n){var o=Et(Ot(n.el,n.options.draggable)),i=10;return t?e.clientX>o.right+i||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+i}(e,i,this)&&!v.animated){if(v===Yt)return R(!1);if(v&&r===e.target&&(a=v),a&&(n=Et(a)),!1!==Ln(Kt,r,Yt,t,a,n,e,!!a))return I(),r.appendChild(Yt),Wt=r,T(),R(!0)}else if(v&&function(e,t,n){var o=Et(At(n.el,0,n.options,!0)),i=10;return t?e.clientX<o.left-i||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-i||e.clientY<o.bottom&&e.clientX<o.left}(e,i,this)){var h=At(r,0,l,!0);if(h===Yt)return R(!1);if(n=Et(a=h),!1!==Ln(Kt,r,Yt,t,a,n,e,!1))return I(),r.insertBefore(Yt,h),Wt=r,T(),R(!0)}else if(a.parentNode===r){n=Et(a);var g,b,y,w=Yt.parentNode!==r,_=!function(e,t,n){var o=n?e.left:e.top,i=n?e.right:e.bottom,r=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===a||i===l||o+r/2===a+s/2}(Yt.animated&&Yt.toRect||t,a.animated&&a.toRect||n,i),x=i?"top":"left",S=Ct(a,"top","top")||Ct(Yt,"top","top"),k=S?S.scrollTop:void 0;if(vn!==a&&(b=n[x],xn=!1,Sn=!_&&l.invertSwap||w),g=function(e,t,n,o,i,r,a,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,f=!1;if(!a)if(l&&gn<c*i){if(!xn&&(1===hn?s>d+c*r/2:s<u-c*r/2)&&(xn=!0),xn)f=!0;else if(1===hn?s<d+gn:s>u-gn)return-hn}else if(s>d+c*(1-i)/2&&s<u-c*(1-i)/2)return function(e){return Dt(Yt)<Dt(e)?1:-1}(t);if((f=f||a)&&(s<d+c*r/2||s>u-c*r/2))return s>d+c/2?1:-1;return 0}(e,a,n,i,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Sn,vn===a),0!==g){var E=Dt(Yt);do{E-=g,y=Wt.children[E]}while(y&&("none"===_t(y,"display")||y===Gt))}if(0===g||y===a)return R(!1);vn=a,hn=g;var C=a.nextElementSibling,A=!1,O=Ln(Kt,r,Yt,t,a,n,e,A=1===g);if(!1!==O)return 1!==O&&-1!==O||(A=1===O),En=!0,setTimeout(Fn,30),I(),A&&!C?r.appendChild(Yt):a.parentNode.insertBefore(Yt,A?C:a),S&&Mt(S,0,k-S.scrollTop),Wt=Yt.parentNode,void 0===b||Sn||(gn=Math.abs(b-Et(a)[x])),T(),R(!0)}if(r.contains(Yt))return R(!1)}return!1}function D(l,s){zt(l,p,Qe({evt:e,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:u,fromSortable:f,target:a,completed:R,onMove:function(n,o){return Ln(Kt,r,Yt,t,n,Et(n),e,o)},changed:T},s))}function I(){D("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function R(t){return D("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(p),p!==f&&(wt(Yt,ln?ln.options.ghostClass:c.options.ghostClass,!1),wt(Yt,l.ghostClass,!0)),ln!==p&&p!==Nn.active?ln=p:p===Nn.active&&ln&&(ln=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll(function(){D("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Yt&&!Yt.animated||a===r&&!a.animated)&&(vn=null),l.dragoverBubble||e.rootEl||a===document||(Yt.parentNode[Nt]._isOutsideThisEl(e.target),!t&&jn(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function T(){nn=Dt(Yt),rn=Dt(Yt,l.draggable),Xt({sortable:p,name:"change",toEl:r,newIndex:nn,newDraggableIndex:rn,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){mt(document,"mousemove",this._onTouchMove),mt(document,"touchmove",this._onTouchMove),mt(document,"pointermove",this._onTouchMove),mt(document,"dragover",jn),mt(document,"mousemove",jn),mt(document,"touchmove",jn)},_offUpEvents:function(){var e=this.el.ownerDocument;mt(e,"mouseup",this._onDrop),mt(e,"touchend",this._onDrop),mt(e,"pointerup",this._onDrop),mt(e,"touchcancel",this._onDrop),mt(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;nn=Dt(Yt),rn=Dt(Yt,n.draggable),zt("drop",this,{evt:e}),Wt=Yt&&Yt.parentNode,nn=Dt(Yt),rn=Dt(Yt,n.draggable),Nn.eventCanceled||(yn=!1,Sn=!1,xn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qn(this.cloneId),qn(this._dragStartId),this.nativeDraggable&&(mt(document,"drop",this),mt(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ct&&_t(document.body,"user-select",""),_t(Yt,"transform",""),e&&(mn&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Gt&&Gt.parentNode&&Gt.parentNode.removeChild(Gt),(Kt===Wt||ln&&"clone"!==ln.lastPutMode)&&Zt&&Zt.parentNode&&Zt.parentNode.removeChild(Zt),Yt&&(this.nativeDraggable&&mt(Yt,"dragend",this),$n(Yt),Yt.style["will-change"]="",mn&&!yn&&wt(Yt,ln?ln.options.ghostClass:this.options.ghostClass,!1),wt(Yt,this.options.chosenClass,!1),Xt({sortable:this,name:"unchoose",toEl:Wt,newIndex:null,newDraggableIndex:null,originalEvent:e}),Kt!==Wt?(nn>=0&&(Xt({rootEl:Wt,name:"add",toEl:Wt,fromEl:Kt,originalEvent:e}),Xt({sortable:this,name:"remove",toEl:Wt,originalEvent:e}),Xt({rootEl:Wt,name:"sort",toEl:Wt,fromEl:Kt,originalEvent:e}),Xt({sortable:this,name:"sort",toEl:Wt,originalEvent:e})),ln&&ln.save()):nn!==tn&&nn>=0&&(Xt({sortable:this,name:"update",toEl:Wt,originalEvent:e}),Xt({sortable:this,name:"sort",toEl:Wt,originalEvent:e})),Nn.active&&(null!=nn&&-1!==nn||(nn=tn,rn=on),Xt({sortable:this,name:"end",toEl:Wt,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){zt("nulling",this),Kt=Yt=Wt=Gt=Jt=Zt=Qt=en=sn=cn=mn=nn=rn=tn=on=vn=hn=ln=an=Nn.dragged=Nn.ghost=Nn.clone=Nn.active=null,Cn.forEach(function(e){e.checked=!0}),Cn.length=dn=un=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Yt&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)gt(e=n[o],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Hn(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(e,t){var i=o.children[t];gt(i,this.options.draggable,o,!1)&&(n[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return gt(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Ht.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Pn(n)},destroy:function(){zt("destroy",this);var e=this.el;e[Nt]=null,mt(e,"mousedown",this._onTapStart),mt(e,"touchstart",this._onTapStart),mt(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(mt(e,"dragover",this),mt(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),_n.splice(_n.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!en){if(zt("hideClone",this),Nn.eventCanceled)return;_t(Zt,"display","none"),this.options.removeCloneOnHide&&Zt.parentNode&&Zt.parentNode.removeChild(Zt),en=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(en){if(zt("showClone",this),Nn.eventCanceled)return;Yt.parentNode!=Kt||this.options.group.revertClone?Jt?Kt.insertBefore(Zt,Jt):Kt.appendChild(Zt):Kt.insertBefore(Zt,Yt),this.options.group.revertClone&&this.animate(Yt,Zt),_t(Zt,"display",""),en=!1}}else this._hideClone()}},An&&pt(document,"touchmove",function(e){(Nn.active||yn)&&e.cancelable&&e.preventDefault()}),Nn.utils={on:pt,off:mt,css:_t,find:St,is:function(e,t){return!!gt(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:Pt,closest:gt,toggleClass:wt,clone:Vt,index:Dt,nextTick:Bn,cancelNextTick:qn,detectDirection:Tn,getChild:At},Nn.get=function(e){return e[Nt]},Nn.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(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Nn.utils=Qe(Qe({},Nn.utils),e.utils)),Ht.mount(e)})},Nn.create=function(e,t){return new Nn(e,t)},Nn.version="1.14.0";var zn,Xn,Yn,Wn,Gn,Kn,Jn=[],Qn=!1;function Zn(){Jn.forEach(function(e){clearInterval(e.pid)}),Jn=[]}function eo(){clearInterval(Kn)}var to,no=Pt(function(e,t,n,o){if(t.scroll){var i,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=kt(),d=!1;Xn!==n&&(Xn=n,Zn(),zn=t.scroll,i=t.scrollFn,!0===zn&&(zn=Rt(n,!0)));var u=0,f=zn;do{var p=f,m=Et(p),v=m.top,h=m.bottom,g=m.left,b=m.right,y=m.width,w=m.height,_=void 0,x=void 0,S=p.scrollWidth,k=p.scrollHeight,E=_t(p),C=p.scrollLeft,A=p.scrollTop;p===c?(_=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),x=w<k&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(_=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX),x=w<k&&("auto"===E.overflowY||"scroll"===E.overflowY));var O=_&&(Math.abs(b-r)<=l&&C+y<S)-(Math.abs(g-r)<=l&&!!C),D=x&&(Math.abs(h-a)<=l&&A+w<k)-(Math.abs(v-a)<=l&&!!A);if(!Jn[u])for(var I=0;I<=u;I++)Jn[I]||(Jn[I]={});Jn[u].vx==O&&Jn[u].vy==D&&Jn[u].el===p||(Jn[u].el=p,Jn[u].vx=O,Jn[u].vy=D,clearInterval(Jn[u].pid),0==O&&0==D||(d=!0,Jn[u].pid=setInterval(function(){o&&0===this.layer&&Nn.active._onTouchMove(Gn);var t=Jn[this.layer].vy?Jn[this.layer].vy*s:0,n=Jn[this.layer].vx?Jn[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Nn.dragged.parentNode[Nt],n,t,e,Gn,Jn[this.layer].el)||Mt(Jn[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&f!==c&&(f=Rt(f,!1)));Qn=d}},30),oo=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,i=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||i;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function io(){}function ro(){}io.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=At(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:oo},tt(io,{pluginName:"revertOnSpill"}),ro.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:oo},tt(ro,{pluginName:"removeOnSpill"});var ao,lo,so,co,uo,fo=[],po=[],mo=!1,vo=!1,ho=!1;function go(e,t){po.forEach(function(n,o){var i=t.children[n.sortableIndex+(e?Number(o):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function bo(){fo.forEach(function(e){e!==so&&e.parentNode&&e.parentNode.removeChild(e)})}Nn.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?pt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?pt(document,"pointermove",this._handleFallbackAutoScroll):t.touches?pt(document,"touchmove",this._handleFallbackAutoScroll):pt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?mt(document,"dragover",this._handleAutoScroll):(mt(document,"pointermove",this._handleFallbackAutoScroll),mt(document,"touchmove",this._handleFallbackAutoScroll),mt(document,"mousemove",this._handleFallbackAutoScroll)),eo(),Zn(),clearTimeout(bt),bt=void 0},nulling:function(){Gn=Xn=zn=Qn=Kn=Yn=Wn=null,Jn.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,i);if(Gn=e,t||this.options.forceAutoScrollFallback||lt||at||ct){no(e,this.options,r,t);var a=Rt(r,!0);!Qn||Kn&&o===Yn&&i===Wn||(Kn&&eo(),Kn=setInterval(function(){var r=Rt(document.elementFromPoint(o,i),!0);r!==a&&(a=r,Zn()),no(e,n.options,r,t)},10),Yn=o,Wn=i)}else{if(!this.options.bubbleScroll||Rt(r,!0)===kt())return void Zn();no(e,this.options,Rt(r,!1),!1)}}},tt(e,{pluginName:"scroll",initializeByDefault:!0})}),Nn.mount(ro,io);var yo,wo=Object.freeze({__proto__:null,MultiDrag:function(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?pt(document,"pointerup",this._deselectMultiDrag):(pt(document,"mouseup",this._deselectMultiDrag),pt(document,"touchend",this._deselectMultiDrag)),pt(document,"keydown",this._checkKeyDown),pt(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var o="";fo.length&&lo===e?fo.forEach(function(e,t){o+=(t?", ":"")+e.textContent}):o=n.textContent,t.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;so=t},delayEnded:function(){this.isMultiDrag=~fo.indexOf(so)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<fo.length;o++)po.push(Vt(fo[o])),po[o].sortableIndex=fo[o].sortableIndex,po[o].draggable=!1,po[o].style["will-change"]="",wt(po[o],this.options.selectedClass,!1),fo[o]===so&&wt(po[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,o=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||fo.length&&lo===t&&(go(!0,n),o("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,o=e.cancel;this.isMultiDrag&&(go(!1,n),po.forEach(function(e){_t(e,"display","")}),t(),uo=!1,o())},hideClone:function(e){var t=this;e.sortable;var n=e.cloneNowHidden,o=e.cancel;this.isMultiDrag&&(po.forEach(function(e){_t(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),n(),uo=!0,o())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&lo&&lo.multiDrag._deselectMultiDrag(),fo.forEach(function(e){e.sortableIndex=Dt(e)}),fo=fo.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),ho=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){fo.forEach(function(e){e!==so&&_t(e,"position","absolute")});var o=Et(so,!1,!0,!0);fo.forEach(function(e){e!==so&&jt(e,o)}),vo=!0,mo=!0}n.animateAll(function(){vo=!1,mo=!1,t.options.animation&&fo.forEach(function(e){Ut(e)}),t.options.sort&&bo()})}},dragOver:function(e){var t=e.target,n=e.completed,o=e.cancel;vo&&~fo.indexOf(t)&&(n(!1),o())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,i=e.dragRect;fo.length>1&&(fo.forEach(function(e){o.addAnimationState({target:e,rect:vo?Et(e):i}),Ut(e),e.fromRect=i,t.removeAnimationState(e)}),vo=!1,function(e,t){fo.forEach(function(n,o){var i=t.children[n.sortableIndex+(e?Number(o):0)];i?t.insertBefore(n,i):t.appendChild(n)})}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.insertion,i=e.activeSortable,r=e.parentEl,a=e.putSortable,l=this.options;if(o){if(n&&i._hideClone(),mo=!1,l.animation&&fo.length>1&&(vo||!n&&!i.options.sort&&!a)){var s=Et(so,!1,!0,!0);fo.forEach(function(e){e!==so&&(jt(e,s),r.appendChild(e))}),vo=!0}if(!n)if(vo||bo(),fo.length>1){var c=uo;i._showClone(t),i.options.animation&&!uo&&c&&po.forEach(function(e){i.addAnimationState({target:e,rect:co}),e.fromRect=co,e.thisAnimationDuration=null})}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(fo.forEach(function(e){e.thisAnimationDuration=null}),o.options.animation&&!n&&o.multiDrag.isMultiDrag){co=tt({},t);var i=xt(so,!0);co.top-=i.f,co.left-=i.e}},dragOverAnimationComplete:function(){vo&&(vo=!1,bo())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,i=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,d=o.children;if(!ho)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),wt(so,c.selectedClass,!~fo.indexOf(so)),~fo.indexOf(so))fo.splice(fo.indexOf(so),1),ao=null,Bt({sortable:i,rootEl:n,name:"deselect",targetEl:so});else{if(fo.push(so),Bt({sortable:i,rootEl:n,name:"select",targetEl:so}),t.shiftKey&&ao&&i.el.contains(ao)){var u,f,p=Dt(ao),m=Dt(so);if(~p&&~m&&p!==m)for(m>p?(f=p,u=m):(f=m,u=p+1);f<u;f++)~fo.indexOf(d[f])||(wt(d[f],c.selectedClass,!0),fo.push(d[f]),Bt({sortable:i,rootEl:n,name:"select",targetEl:d[f]}))}else ao=so;lo=s}if(ho&&this.isMultiDrag){if(vo=!1,(o[Nt].options.sort||o!==n)&&fo.length>1){var v=Et(so),h=Dt(so,":not(."+this.options.selectedClass+")");if(!mo&&c.animation&&(so.thisAnimationDuration=null),s.captureAnimationState(),!mo&&(c.animation&&(so.fromRect=v,fo.forEach(function(e){if(e.thisAnimationDuration=null,e!==so){var t=vo?Et(e):v;e.fromRect=t,s.addAnimationState({target:e,rect:t})}})),bo(),fo.forEach(function(e){d[h]?o.insertBefore(e,d[h]):o.appendChild(e),h++}),a===Dt(so))){var g=!1;fo.forEach(function(e){e.sortableIndex===Dt(e)||(g=!0)}),g&&r("update")}fo.forEach(function(e){Ut(e)}),s.animateAll()}lo=s}(n===o||l&&"clone"!==l.lastPutMode)&&po.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=ho=!1,po.length=0},destroyGlobal:function(){this._deselectMultiDrag(),mt(document,"pointerup",this._deselectMultiDrag),mt(document,"mouseup",this._deselectMultiDrag),mt(document,"touchend",this._deselectMultiDrag),mt(document,"keydown",this._checkKeyDown),mt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==ho&&ho||lo!==this.sortable||e&>(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;fo.length;){var t=fo[0];wt(t,this.options.selectedClass,!1),fo.shift(),Bt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},tt(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[Nt];t&&t.options.multiDrag&&!~fo.indexOf(e)&&(lo&&lo!==t&&(lo.multiDrag._deselectMultiDrag(),lo=t),wt(e,t.options.selectedClass,!0),fo.push(e))},deselect:function(e){var t=e.parentNode[Nt],n=fo.indexOf(e);t&&t.options.multiDrag&&~n&&(wt(e,t.options.selectedClass,!1),fo.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return fo.forEach(function(o){var i;t.push({multiDragElement:o,index:o.sortableIndex}),i=vo&&o!==so?-1:vo?Dt(o,":not(."+e.options.selectedClass+")"):Dt(o),n.push({multiDragElement:o,index:i})}),{items:ot(fo),clones:[].concat(po),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})},Sortable:Nn,Swap:function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;to=t},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.onMove,i=e.activeSortable,r=e.changed,a=e.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=to;!1!==o(n)?(wt(n,s.swapClass,!0),to=n):to=null,c&&c!==to&&wt(c,s.swapClass,!1)}r(),t(!0),a()}},drop:function(e){var t=e.activeSortable,n=e.putSortable,o=e.dragEl,i=n||this.sortable,r=this.options;to&&wt(to,r.swapClass,!1),to&&(r.swap||n&&n.options.swap)&&o!==to&&(i.captureAnimationState(),i!==t&&t.captureAnimationState(),function(e,t){var n,o,i=e.parentNode,r=t.parentNode;if(!i||!r||i.isEqualNode(t)||r.isEqualNode(e))return;n=Dt(e),o=Dt(t),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(t,i.children[n]),r.insertBefore(e,r.children[o])}(o,to),i.animateAll(),i!==t&&t.animateAll())},nulling:function(){to=null}},tt(e,{pluginName:"swap",eventProperties:function(){return{swapItem:to}}})},default:Nn});var _o,xo=yo?Ge.exports:(yo=1,"undefined"!=typeof self&&self,_o=function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"00ee":function(e,t,n){var o={};o[n("b622")("toStringTag")]="z",e.exports="[object z]"===String(o)},"0366":function(e,t,n){var o=n("1c0b");e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,i){return e.call(t,n,o,i)}}return function(){return e.apply(t,arguments)}}},"057f":function(e,t,n){var o=n("fc6a"),i=n("241c").f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==r.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(o(e))}},"06cf":function(e,t,n){var o=n("83ab"),i=n("d1e7"),r=n("5c6c"),a=n("fc6a"),l=n("c04e"),s=n("5135"),c=n("0cfb"),d=Object.getOwnPropertyDescriptor;t.f=o?d:function(e,t){if(e=a(e),t=l(t,!0),c)try{return d(e,t)}catch(e){}if(s(e,t))return r(!i.f.call(e,t),e[t])}},"0cfb":function(e,t,n){var o=n("83ab"),i=n("d039"),r=n("cc12");e.exports=!o&&!i(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})},"13d5":function(e,t,n){var o=n("23e7"),i=n("d58f").left,r=n("a640"),a=n("ae40"),l=r("reduce"),s=a("reduce",{1:0});o({target:"Array",proto:!0,forced:!l||!s},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(e,t,n){var o=n("c6b6"),i=n("9263");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"159b":function(e,t,n){var o=n("da84"),i=n("fdbc"),r=n("17c2"),a=n("9112");for(var l in i){var s=o[l],c=s&&s.prototype;if(c&&c.forEach!==r)try{a(c,"forEach",r)}catch(e){c.forEach=r}}},"17c2":function(e,t,n){var o=n("b727").forEach,i=n("a640"),r=n("ae40"),a=i("forEach"),l=r("forEach");e.exports=a&&l?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}},"1be4":function(e,t,n){var o=n("d066");e.exports=o("document","documentElement")},"1c0b":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"1c7e":function(e,t,n){var o=n("b622")("iterator"),i=!1;try{var r=0,a={next:function(){return{done:!!r++}},return:function(){i=!0}};a[o]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}},"1d80":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"1dde":function(e,t,n){var o=n("d039"),i=n("b622"),r=n("2d00"),a=i("species");e.exports=function(e){return r>=51||!o(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo})}},"23cb":function(e,t,n){var o=n("a691"),i=Math.max,r=Math.min;e.exports=function(e,t){var n=o(e);return n<0?i(n+t,0):r(n,t)}},"23e7":function(e,t,n){var o=n("da84"),i=n("06cf").f,r=n("9112"),a=n("6eeb"),l=n("ce4e"),s=n("e893"),c=n("94ca");e.exports=function(e,t){var n,d,u,f,p,m=e.target,v=e.global,h=e.stat;if(n=v?o:h?o[m]||l(m,{}):(o[m]||{}).prototype)for(d in t){if(f=t[d],u=e.noTargetGet?(p=i(n,d))&&p.value:n[d],!c(v?d:m+(h?".":"#")+d,e.forced)&&void 0!==u){if(typeof f==typeof u)continue;s(f,u)}(e.sham||u&&u.sham)&&r(f,"sham",!0),a(n,d,f,e)}}},"241c":function(e,t,n){var o=n("ca84"),i=n("7839").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,i)}},"25f0":function(e,t,n){var o=n("6eeb"),i=n("825a"),r=n("d039"),a=n("ad6d"),l="toString",s=RegExp.prototype,c=s[l],d=r(function(){return"/a/b"!=c.call({source:"a",flags:"b"})}),u=c.name!=l;(d||u)&&o(RegExp.prototype,l,function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)},{unsafe:!0})},"2ca0":function(e,t,n){var o,i=n("23e7"),r=n("06cf").f,a=n("50c4"),l=n("5a34"),s=n("1d80"),c=n("ab13"),d=n("c430"),u="".startsWith,f=Math.min,p=c("startsWith");i({target:"String",proto:!0,forced:!(!d&&!p&&(o=r(String.prototype,"startsWith"),o&&!o.writable)||p)},{startsWith:function(e){var t=String(s(this));l(e);var n=a(f(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return u?u.call(t,o,n):t.slice(n,n+o.length)===o}})},"2d00":function(e,t,n){var o,i,r=n("da84"),a=n("342f"),l=r.process,s=l&&l.versions,c=s&&s.v8;c?i=(o=c.split("."))[0]+o[1]:a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(i=o[1]),e.exports=i&&+i},"342f":function(e,t,n){var o=n("d066");e.exports=o("navigator","userAgent")||""},"35a1":function(e,t,n){var o=n("f5df"),i=n("3f8c"),r=n("b622")("iterator");e.exports=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},"37e8":function(e,t,n){var o=n("83ab"),i=n("9bf2"),r=n("825a"),a=n("df75");e.exports=o?Object.defineProperties:function(e,t){r(e);for(var n,o=a(t),l=o.length,s=0;l>s;)i.f(e,n=o[s++],t[n]);return e}},"3bbe":function(e,t,n){var o=n("861d");e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"3ca3":function(e,t,n){var o=n("6547").charAt,i=n("69f3"),r=n("7dd0"),a="String Iterator",l=i.set,s=i.getterFor(a);r(String,"String",function(e){l(this,{type:a,string:String(e),index:0})},function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=o(n,i),t.index+=e.length,{value:e,done:!1})})},"3f8c":function(e,t){e.exports={}},4160:function(e,t,n){var o=n("23e7"),i=n("17c2");o({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},"428f":function(e,t,n){var o=n("da84");e.exports=o},"44ad":function(e,t,n){var o=n("d039"),i=n("c6b6"),r="".split;e.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==i(e)?r.call(e,""):Object(e)}:Object},"44d2":function(e,t,n){var o=n("b622"),i=n("7c73"),r=n("9bf2"),a=o("unscopables"),l=Array.prototype;null==l[a]&&r.f(l,a,{configurable:!0,value:i(null)}),e.exports=function(e){l[a][e]=!0}},"44e7":function(e,t,n){var o=n("861d"),i=n("c6b6"),r=n("b622")("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[r])?!!t:"RegExp"==i(e))}},4930:function(e,t,n){var o=n("d039");e.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"4d64":function(e,t,n){var o=n("fc6a"),i=n("50c4"),r=n("23cb"),a=function(e){return function(t,n,a){var l,s=o(t),c=i(s.length),d=r(a,c);if(e&&n!=n){for(;c>d;)if((l=s[d++])!=l)return!0}else for(;c>d;d++)if((e||d in s)&&s[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(e,t,n){var o=n("23e7"),i=n("b727").filter,r=n("1dde"),a=n("ae40"),l=r("filter"),s=a("filter");o({target:"Array",proto:!0,forced:!l||!s},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(e,t,n){var o=n("0366"),i=n("7b0b"),r=n("9bdd"),a=n("e95a"),l=n("50c4"),s=n("8418"),c=n("35a1");e.exports=function(e){var t,n,d,u,f,p,m=i(e),v="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,b=void 0!==g,y=c(m),w=0;if(b&&(g=o(g,h>2?arguments[2]:void 0,2)),null==y||v==Array&&a(y))for(n=new v(t=l(m.length));t>w;w++)p=b?g(m[w],w):m[w],s(n,w,p);else for(f=(u=y.call(m)).next,n=new v;!(d=f.call(u)).done;w++)p=b?r(u,g,[d.value,w],!0):d.value,s(n,w,p);return n.length=w,n}},"4fad":function(e,t,n){var o=n("23e7"),i=n("6f53").entries;o({target:"Object",stat:!0},{entries:function(e){return i(e)}})},"50c4":function(e,t,n){var o=n("a691"),i=Math.min;e.exports=function(e){return e>0?i(o(e),9007199254740991):0}},5135:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},5319:function(e,t,n){var o=n("d784"),i=n("825a"),r=n("7b0b"),a=n("50c4"),l=n("a691"),s=n("1d80"),c=n("8aa5"),d=n("14c3"),u=Math.max,f=Math.min,p=Math.floor,m=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g,h=function(e){return void 0===e?e:String(e)};o("replace",2,function(e,t,n,o){var g=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=o.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,o){var i=s(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i,o):t.call(String(i),n,o)},function(e,o){if(!g&&b||"string"==typeof o&&-1===o.indexOf(y)){var r=n(t,e,this,o);if(r.done)return r.value}var s=i(e),p=String(this),m="function"==typeof o;m||(o=String(o));var v=s.global;if(v){var _=s.unicode;s.lastIndex=0}for(var x=[];;){var S=d(s,p);if(null===S)break;if(x.push(S),!v)break;""===String(S[0])&&(s.lastIndex=c(p,a(s.lastIndex),_))}for(var k="",E=0,C=0;C<x.length;C++){S=x[C];for(var A=String(S[0]),O=u(f(l(S.index),p.length),0),D=[],I=1;I<S.length;I++)D.push(h(S[I]));var R=S.groups;if(m){var T=[A].concat(D,O,p);void 0!==R&&T.push(R);var P=String(o.apply(void 0,T))}else P=w(A,p,O,D,R,o);O>=E&&(k+=p.slice(E,O)+P,E=O+A.length)}return k+p.slice(E)}];function w(e,n,o,i,a,l){var s=o+e.length,c=i.length,d=v;return void 0!==a&&(a=r(a),d=m),t.call(l,d,function(t,r){var l;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,o);case"'":return n.slice(s);case"<":l=a[r.slice(1,-1)];break;default:var d=+r;if(0===d)return t;if(d>c){var u=p(d/10);return 0===u?t:u<=c?void 0===i[u-1]?r.charAt(1):i[u-1]+r.charAt(1):t}l=i[d-1]}return void 0===l?"":l})}})},5692:function(e,t,n){var o=n("c430"),i=n("c6cd");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,t,n){var o=n("d066"),i=n("241c"),r=n("7418"),a=n("825a");e.exports=o("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=r.f;return n?t.concat(n(e)):t}},"5a34":function(e,t,n){var o=n("44e7");e.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5db7":function(e,t,n){var o=n("23e7"),i=n("a2bf"),r=n("7b0b"),a=n("50c4"),l=n("1c0b"),s=n("65f0");o({target:"Array",proto:!0},{flatMap:function(e){var t,n=r(this),o=a(n.length);return l(e),(t=s(n,0)).length=i(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},6547:function(e,t,n){var o=n("a691"),i=n("1d80"),r=function(e){return function(t,n){var r,a,l=String(i(t)),s=o(n),c=l.length;return s<0||s>=c?e?"":void 0:(r=l.charCodeAt(s))<55296||r>56319||s+1===c||(a=l.charCodeAt(s+1))<56320||a>57343?e?l.charAt(s):r:e?l.slice(s,s+2):a-56320+(r-55296<<10)+65536}};e.exports={codeAt:r(!1),charAt:r(!0)}},"65f0":function(e,t,n){var o=n("861d"),i=n("e8b5"),r=n("b622")("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[r])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},"69f3":function(e,t,n){var o,i,r,a=n("7f9a"),l=n("da84"),s=n("861d"),c=n("9112"),d=n("5135"),u=n("f772"),f=n("d012"),p=l.WeakMap;if(a){var m=new p,v=m.get,h=m.has,g=m.set;o=function(e,t){return g.call(m,e,t),t},i=function(e){return v.call(m,e)||{}},r=function(e){return h.call(m,e)}}else{var b=u("state");f[b]=!0,o=function(e,t){return c(e,b,t),t},i=function(e){return d(e,b)?e[b]:{}},r=function(e){return d(e,b)}}e.exports={set:o,get:i,has:r,enforce:function(e){return r(e)?i(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"6eeb":function(e,t,n){var o=n("da84"),i=n("9112"),r=n("5135"),a=n("ce4e"),l=n("8925"),s=n("69f3"),c=s.get,d=s.enforce,u=String(String).split("String");(e.exports=function(e,t,n,l){var s=!!l&&!!l.unsafe,c=!!l&&!!l.enumerable,f=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof t||r(n,"name")||i(n,"name",t),d(n).source=u.join("string"==typeof t?t:"")),e!==o?(s?!f&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:a(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&c(this).source||l(this)})},"6f53":function(e,t,n){var o=n("83ab"),i=n("df75"),r=n("fc6a"),a=n("d1e7").f,l=function(e){return function(t){for(var n,l=r(t),s=i(l),c=s.length,d=0,u=[];c>d;)n=s[d++],o&&!a.call(l,n)||u.push(e?[n,l[n]]:l[n]);return u}};e.exports={entries:l(!0),values:l(!1)}},"73d9":function(e,t,n){n("44d2")("flatMap")},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,n){var o=n("428f"),i=n("5135"),r=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});i(t,e)||a(t,e,{value:r.f(e)})}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(e,t,n){var o=n("1d80");e.exports=function(e){return Object(o(e))}},"7c73":function(e,t,n){var o,i=n("825a"),r=n("37e8"),a=n("7839"),l=n("d012"),s=n("1be4"),c=n("cc12"),d=n("f772"),u="prototype",f="script",p=d("IE_PROTO"),m=function(){},v=function(e){return"<"+f+">"+e+"</"+f+">"},h=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;h=o?function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):(t=c("iframe"),n="java"+f+":",t.style.display="none",s.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F);for(var i=a.length;i--;)delete h[u][a[i]];return h()};l[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[u]=i(e),n=new m,m[u]=null,n[p]=e):n=h(),void 0===t?n:r(n,t)}},"7dd0":function(e,t,n){var o=n("23e7"),i=n("9ed3"),r=n("e163"),a=n("d2bb"),l=n("d44e"),s=n("9112"),c=n("6eeb"),d=n("b622"),u=n("c430"),f=n("3f8c"),p=n("ae93"),m=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,h=d("iterator"),g="keys",b="values",y="entries",w=function(){return this};e.exports=function(e,t,n,d,p,_,x){i(n,t,d);var S,k,E,C=function(e){if(e===p&&R)return R;if(!v&&e in D)return D[e];switch(e){case g:case b:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+" Iterator",O=!1,D=e.prototype,I=D[h]||D["@@iterator"]||p&&D[p],R=!v&&I||C(p),T="Array"==t&&D.entries||I;if(T&&(S=r(T.call(new e)),m!==Object.prototype&&S.next&&(u||r(S)===m||(a?a(S,m):"function"!=typeof S[h]&&s(S,h,w)),l(S,A,!0,!0),u&&(f[A]=w))),p==b&&I&&I.name!==b&&(O=!0,R=function(){return I.call(this)}),u&&!x||D[h]===R||s(D,h,R),f[t]=R,p)if(k={values:C(b),keys:_?R:C(g),entries:C(y)},x)for(E in k)(v||O||!(E in D))&&c(D,E,k[E]);else o({target:t,proto:!0,forced:v||O},k);return k}},"7f9a":function(e,t,n){var o=n("da84"),i=n("8925"),r=o.WeakMap;e.exports="function"==typeof r&&/native code/.test(i(r))},"825a":function(e,t,n){var o=n("861d");e.exports=function(e){if(!o(e))throw TypeError(String(e)+" is not an object");return e}},"83ab":function(e,t,n){var o=n("d039");e.exports=!o(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},8418:function(e,t,n){var o=n("c04e"),i=n("9bf2"),r=n("5c6c");e.exports=function(e,t,n){var a=o(t);a in e?i.f(e,a,r(0,n)):e[a]=n}},"861d":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},8875:function(e,t,n){var o,i,r;"undefined"!=typeof self&&self,i=[],void 0===(r="function"==typeof(o=function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(e){var n,o,i,r=/@([^@]*):(\d+):(\d+)\s*$/gi,a=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e.stack)||r.exec(e.stack),l=a&&a[1]||!1,s=a&&a[2]||!1,c=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");l===c&&(n=document.documentElement.outerHTML,o=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(o,"$1").trim());for(var u=0;u<d.length;u++){if("interactive"===d[u].readyState)return d[u];if(d[u].src===l)return d[u];if(l===c&&d[u].innerHTML&&d[u].innerHTML.trim()===i)return d[u]}return null}}return e})?o.apply(t,i):o)||(e.exports=r)},8925:function(e,t,n){var o=n("c6cd"),i=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return i.call(e)}),e.exports=o.inspectSource},"8aa5":function(e,t,n){var o=n("6547").charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},"8bbf":function(t,n){t.exports=e},"90e3":function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+o).toString(36)}},9112:function(e,t,n){var o=n("83ab"),i=n("9bf2"),r=n("5c6c");e.exports=o?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},9263:function(e,t,n){var o,i,r=n("ad6d"),a=n("9f7f"),l=RegExp.prototype.exec,s=String.prototype.replace,c=l,d=(o=/a/,i=/b*/g,l.call(o,"a"),l.call(i,"a"),0!==o.lastIndex||0!==i.lastIndex),u=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(d||f||u)&&(c=function(e){var t,n,o,i,a=this,c=u&&a.sticky,p=r.call(a),m=a.source,v=0,h=e;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),h=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(m="(?: "+m+")",h=" "+h,v++),n=new RegExp("^(?:"+m+")",p)),f&&(n=new RegExp("^"+m+"$(?!\\s)",p)),d&&(t=a.lastIndex),o=l.call(c?n:a,h),c?o?(o.input=o.input.slice(v),o[0]=o[0].slice(v),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:d&&o&&(a.lastIndex=a.global?o.index+o[0].length:t),f&&o&&o.length>1&&s.call(o[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o}),e.exports=c},"94ca":function(e,t,n){var o=n("d039"),i=/#|\.prototype\./,r=function(e,t){var n=l[a(e)];return n==c||n!=s&&("function"==typeof t?o(t):!!t)},a=r.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=r.data={},s=r.NATIVE="N",c=r.POLYFILL="P";e.exports=r},"99af":function(e,t,n){var o=n("23e7"),i=n("d039"),r=n("e8b5"),a=n("861d"),l=n("7b0b"),s=n("50c4"),c=n("8418"),d=n("65f0"),u=n("1dde"),f=n("b622"),p=n("2d00"),m=f("isConcatSpreadable"),v=9007199254740991,h="Maximum allowed index exceeded",g=p>=51||!i(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),b=u("concat"),y=function(e){if(!a(e))return!1;var t=e[m];return void 0!==t?!!t:r(e)};o({target:"Array",proto:!0,forced:!g||!b},{concat:function(e){var t,n,o,i,r,a=l(this),u=d(a,0),f=0;for(t=-1,o=arguments.length;t<o;t++)if(y(r=-1===t?a:arguments[t])){if(f+(i=s(r.length))>v)throw TypeError(h);for(n=0;n<i;n++,f++)n in r&&c(u,f,r[n])}else{if(f>=v)throw TypeError(h);c(u,f++,r)}return u.length=f,u}})},"9bdd":function(e,t,n){var o=n("825a");e.exports=function(e,t,n,i){try{return i?t(o(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&o(r.call(e)),t}}},"9bf2":function(e,t,n){var o=n("83ab"),i=n("0cfb"),r=n("825a"),a=n("c04e"),l=Object.defineProperty;t.f=o?l:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},"9ed3":function(e,t,n){var o=n("ae93").IteratorPrototype,i=n("7c73"),r=n("5c6c"),a=n("d44e"),l=n("3f8c"),s=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(o,{next:r(1,n)}),a(e,c,!1,!0),l[c]=s,e}},"9f7f":function(e,t,n){var o=n("d039");function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=o(function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),t.BROKEN_CARET=o(function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},a2bf:function(e,t,n){var o=n("e8b5"),i=n("50c4"),r=n("0366"),a=function(e,t,n,l,s,c,d,u){for(var f,p=s,m=0,v=!!d&&r(d,u,3);m<l;){if(m in n){if(f=v?v(n[m],m,t):n[m],c>0&&o(f))p=a(e,t,f,i(f.length),p,c-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=f}p++}m++}return p};e.exports=a},a352:function(e,n){e.exports=t},a434:function(e,t,n){var o=n("23e7"),i=n("23cb"),r=n("a691"),a=n("50c4"),l=n("7b0b"),s=n("65f0"),c=n("8418"),d=n("1dde"),u=n("ae40"),f=d("splice"),p=u("splice",{ACCESSORS:!0,0:0,1:2}),m=Math.max,v=Math.min;o({target:"Array",proto:!0,forced:!f||!p},{splice:function(e,t){var n,o,d,u,f,p,h=l(this),g=a(h.length),b=i(e,g),y=arguments.length;if(0===y?n=o=0:1===y?(n=0,o=g-b):(n=y-2,o=v(m(r(t),0),g-b)),g+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(d=s(h,o),u=0;u<o;u++)(f=b+u)in h&&c(d,u,h[f]);if(d.length=o,n<o){for(u=b;u<g-o;u++)p=u+n,(f=u+o)in h?h[p]=h[f]:delete h[p];for(u=g;u>g-o+n;u--)delete h[u-1]}else if(n>o)for(u=g-o;u>b;u--)p=u+n-1,(f=u+o-1)in h?h[p]=h[f]:delete h[p];for(u=0;u<n;u++)h[u+b]=arguments[u+2];return h.length=g-o+n,d}})},a4d3:function(e,t,n){var o=n("23e7"),i=n("da84"),r=n("d066"),a=n("c430"),l=n("83ab"),s=n("4930"),c=n("fdbf"),d=n("d039"),u=n("5135"),f=n("e8b5"),p=n("861d"),m=n("825a"),v=n("7b0b"),h=n("fc6a"),g=n("c04e"),b=n("5c6c"),y=n("7c73"),w=n("df75"),_=n("241c"),x=n("057f"),S=n("7418"),k=n("06cf"),E=n("9bf2"),C=n("d1e7"),A=n("9112"),O=n("6eeb"),D=n("5692"),I=n("f772"),R=n("d012"),T=n("90e3"),P=n("b622"),M=n("e538"),V=n("746f"),j=n("d44e"),U=n("69f3"),N=n("b727").forEach,L=I("hidden"),$="Symbol",F="prototype",H=P("toPrimitive"),B=U.set,q=U.getterFor($),z=Object[F],X=i.Symbol,Y=r("JSON","stringify"),W=k.f,G=E.f,K=x.f,J=C.f,Q=D("symbols"),Z=D("op-symbols"),ee=D("string-to-symbol-registry"),te=D("symbol-to-string-registry"),ne=D("wks"),oe=i.QObject,ie=!oe||!oe[F]||!oe[F].findChild,re=l&&d(function(){return 7!=y(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a})?function(e,t,n){var o=W(z,t);o&&delete z[t],G(e,t,n),o&&e!==z&&G(z,t,o)}:G,ae=function(e,t){var n=Q[e]=y(X[F]);return B(n,{type:$,tag:e,description:t}),l||(n.description=t),n},le=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof X},se=function(e,t,n){e===z&&se(Z,t,n),m(e);var o=g(t,!0);return m(n),u(Q,o)?(n.enumerable?(u(e,L)&&e[L][o]&&(e[L][o]=!1),n=y(n,{enumerable:b(0,!1)})):(u(e,L)||G(e,L,b(1,{})),e[L][o]=!0),re(e,o,n)):G(e,o,n)},ce=function(e,t){m(e);var n=h(t),o=w(n).concat(pe(n));return N(o,function(t){l&&!de.call(n,t)||se(e,t,n[t])}),e},de=function(e){var t=g(e,!0),n=J.call(this,t);return!(this===z&&u(Q,t)&&!u(Z,t))&&(!(n||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||n)},ue=function(e,t){var n=h(e),o=g(t,!0);if(n!==z||!u(Q,o)||u(Z,o)){var i=W(n,o);return!i||!u(Q,o)||u(n,L)&&n[L][o]||(i.enumerable=!0),i}},fe=function(e){var t=K(h(e)),n=[];return N(t,function(e){u(Q,e)||u(R,e)||n.push(e)}),n},pe=function(e){var t=e===z,n=K(t?Z:h(e)),o=[];return N(n,function(e){!u(Q,e)||t&&!u(z,e)||o.push(Q[e])}),o};s||(X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=T(e),n=function(e){this===z&&n.call(Z,e),u(this,L)&&u(this[L],t)&&(this[L][t]=!1),re(this,t,b(1,e))};return l&&ie&&re(z,t,{configurable:!0,set:n}),ae(t,e)},O(X[F],"toString",function(){return q(this).tag}),O(X,"withoutSetter",function(e){return ae(T(e),e)}),C.f=de,E.f=se,k.f=ue,_.f=x.f=fe,S.f=pe,M.f=function(e){return ae(P(e),e)},l&&(G(X[F],"description",{configurable:!0,get:function(){return q(this).description}}),a||O(z,"propertyIsEnumerable",de,{unsafe:!0}))),o({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:X}),N(w(ne),function(e){V(e)}),o({target:$,stat:!0,forced:!s},{for:function(e){var t=String(e);if(u(ee,t))return ee[t];var n=X(t);return ee[t]=n,te[n]=t,n},keyFor:function(e){if(!le(e))throw TypeError(e+" is not a symbol");if(u(te,e))return te[e]},useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),o({target:"Object",stat:!0,forced:!s,sham:!l},{create:function(e,t){return void 0===t?y(e):ce(y(e),t)},defineProperty:se,defineProperties:ce,getOwnPropertyDescriptor:ue}),o({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:fe,getOwnPropertySymbols:pe}),o({target:"Object",stat:!0,forced:d(function(){S.f(1)})},{getOwnPropertySymbols:function(e){return S.f(v(e))}}),Y&&o({target:"JSON",stat:!0,forced:!s||d(function(){var e=X();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))})},{stringify:function(e,t,n){for(var o,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(o=t,(p(t)||void 0!==e)&&!le(e))return f(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!le(t))return t}),i[1]=t,Y.apply(null,i)}}),X[F][H]||A(X[F],H,X[F].valueOf),j(X,$),R[L]=!0},a630:function(e,t,n){var o=n("23e7"),i=n("4df4");o({target:"Array",stat:!0,forced:!n("1c7e")(function(e){Array.from(e)})},{from:i})},a640:function(e,t,n){var o=n("d039");e.exports=function(e,t){var n=[][e];return!!n&&o(function(){n.call(null,t||function(){throw 1},1)})}},a691:function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},ab13:function(e,t,n){var o=n("b622")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(e){}}return!1}},ac1f:function(e,t,n){var o=n("23e7"),i=n("9263");o({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},ad6d:function(e,t,n){var o=n("825a");e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ae40:function(e,t,n){var o=n("83ab"),i=n("d039"),r=n("5135"),a=Object.defineProperty,l={},s=function(e){throw e};e.exports=function(e,t){if(r(l,e))return l[e];t||(t={});var n=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,d=r(t,0)?t[0]:s,u=r(t,1)?t[1]:void 0;return l[e]=!!n&&!i(function(){if(c&&!o)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,d,u)})}},ae93:function(e,t,n){var o,i,r,a=n("e163"),l=n("9112"),s=n("5135"),c=n("b622"),d=n("c430"),u=c("iterator"),f=!1;[].keys&&("next"in(r=[].keys())?(i=a(a(r)))!==Object.prototype&&(o=i):f=!0),null==o&&(o={}),d||s(o,u)||l(o,u,function(){return this}),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:f}},b041:function(e,t,n){var o=n("00ee"),i=n("f5df");e.exports=o?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(e,t,n){var o=n("83ab"),i=n("9bf2").f,r=Function.prototype,a=r.toString,l=/^\s*function ([^ (]*)/,s="name";o&&!(s in r)&&i(r,s,{configurable:!0,get:function(){try{return a.call(this).match(l)[1]}catch(e){return""}}})},b622:function(e,t,n){var o=n("da84"),i=n("5692"),r=n("5135"),a=n("90e3"),l=n("4930"),s=n("fdbf"),c=i("wks"),d=o.Symbol,u=s?d:d&&d.withoutSetter||a;e.exports=function(e){return r(c,e)||(l&&r(d,e)?c[e]=d[e]:c[e]=u("Symbol."+e)),c[e]}},b64b:function(e,t,n){var o=n("23e7"),i=n("7b0b"),r=n("df75");o({target:"Object",stat:!0,forced:n("d039")(function(){r(1)})},{keys:function(e){return r(i(e))}})},b727:function(e,t,n){var o=n("0366"),i=n("44ad"),r=n("7b0b"),a=n("50c4"),l=n("65f0"),s=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,d=4==e,u=6==e,f=5==e||u;return function(p,m,v,h){for(var g,b,y=r(p),w=i(y),_=o(m,v,3),x=a(w.length),S=0,k=h||l,E=t?k(p,x):n?k(p,0):void 0;x>S;S++)if((f||S in w)&&(b=_(g=w[S],S,y),e))if(t)E[S]=b;else if(b)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:s.call(E,g)}else if(d)return!1;return u?-1:c||d?d:E}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},c04e:function(e,t,n){var o=n("861d");e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},c430:function(e,t){e.exports=!1},c6b6:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},c6cd:function(e,t,n){var o=n("da84"),i=n("ce4e"),r="__core-js_shared__",a=o[r]||i(r,{});e.exports=a},c740:function(e,t,n){var o=n("23e7"),i=n("b727").findIndex,r=n("44d2"),a=n("ae40"),l="findIndex",s=!0,c=a(l);l in[]&&Array(1)[l](function(){s=!1}),o({target:"Array",proto:!0,forced:s||!c},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(l)},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},c975:function(e,t,n){var o=n("23e7"),i=n("4d64").indexOf,r=n("a640"),a=n("ae40"),l=[].indexOf,s=!!l&&1/[1].indexOf(1,-0)<0,c=r("indexOf"),d=a("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:s||!c||!d},{indexOf:function(e){return s?l.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},ca84:function(e,t,n){var o=n("5135"),i=n("fc6a"),r=n("4d64").indexOf,a=n("d012");e.exports=function(e,t){var n,l=i(e),s=0,c=[];for(n in l)!o(a,n)&&o(l,n)&&c.push(n);for(;t.length>s;)o(l,n=t[s++])&&(~r(c,n)||c.push(n));return c}},caad:function(e,t,n){var o=n("23e7"),i=n("4d64").includes,r=n("44d2");o({target:"Array",proto:!0,forced:!n("ae40")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")},cc12:function(e,t,n){var o=n("da84"),i=n("861d"),r=o.document,a=i(r)&&i(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},ce4e:function(e,t,n){var o=n("da84"),i=n("9112");e.exports=function(e,t){try{i(o,e,t)}catch(n){o[e]=t}return t}},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},d066:function(e,t,n){var o=n("428f"),i=n("da84"),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(o[e])||r(i[e]):o[e]&&o[e][t]||i[e]&&i[e][t]}},d1e7:function(e,t,n){var o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!o.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:o},d28b:function(e,t,n){n("746f")("iterator")},d2bb:function(e,t,n){var o=n("825a"),i=n("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e.call(n,r):n.__proto__=r,n}}():void 0)},d3b7:function(e,t,n){var o=n("00ee"),i=n("6eeb"),r=n("b041");o||i(Object.prototype,"toString",r,{unsafe:!0})},d44e:function(e,t,n){var o=n("9bf2").f,i=n("5135"),r=n("b622")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,r)&&o(e,r,{configurable:!0,value:t})}},d58f:function(e,t,n){var o=n("1c0b"),i=n("7b0b"),r=n("44ad"),a=n("50c4"),l=function(e){return function(t,n,l,s){o(n);var c=i(t),d=r(c),u=a(c.length),f=e?u-1:0,p=e?-1:1;if(l<2)for(;;){if(f in d){s=d[f],f+=p;break}if(f+=p,e?f<0:u<=f)throw TypeError("Reduce of empty array with no initial value")}for(;e?f>=0:u>f;f+=p)f in d&&(s=n(s,d[f],f,c));return s}};e.exports={left:l(!1),right:l(!0)}},d784:function(e,t,n){n("ac1f");var o=n("6eeb"),i=n("d039"),r=n("b622"),a=n("9263"),l=n("9112"),s=r("species"),c=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),d="$0"==="a".replace(/./,"$0"),u=r("replace"),f=!!/./[u]&&""===/./[u]("a","$0"),p=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});e.exports=function(e,t,n,u){var m=r(e),v=!i(function(){var t={};return t[m]=function(){return 7},7!=""[e](t)}),h=v&&!i(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t});if(!v||!h||"replace"===e&&(!c||!d||f)||"split"===e&&!p){var g=/./[m],b=n(m,""[e],function(e,t,n,o,i){return t.exec===a?v&&!i?{done:!0,value:g.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}},{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),y=b[0],w=b[1];o(String.prototype,e,y),o(RegExp.prototype,m,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}u&&l(RegExp.prototype[m],"sham",!0)}},d81d:function(e,t,n){var o=n("23e7"),i=n("b727").map,r=n("1dde"),a=n("ae40"),l=r("map"),s=a("map");o({target:"Array",proto:!0,forced:!l||!s},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},da84:function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(e,t,n){var o=n("23e7"),i=n("83ab"),r=n("56ef"),a=n("fc6a"),l=n("06cf"),s=n("8418");o({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,o=a(e),i=l.f,c=r(o),d={},u=0;c.length>u;)void 0!==(n=i(o,t=c[u++]))&&s(d,t,n);return d}})},dbf1:function(e,t,n){(function(e){n.d(t,"a",function(){return o});var o="undefined"!=typeof window?window.console:e.console}).call(this,n("c8ba"))},ddb0:function(e,t,n){var o=n("da84"),i=n("fdbc"),r=n("e260"),a=n("9112"),l=n("b622"),s=l("iterator"),c=l("toStringTag"),d=r.values;for(var u in i){var f=o[u],p=f&&f.prototype;if(p){if(p[s]!==d)try{a(p,s,d)}catch(e){p[s]=d}if(p[c]||a(p,c,u),i[u])for(var m in r)if(p[m]!==r[m])try{a(p,m,r[m])}catch(e){p[m]=r[m]}}}},df75:function(e,t,n){var o=n("ca84"),i=n("7839");e.exports=Object.keys||function(e){return o(e,i)}},e01a:function(e,t,n){var o=n("23e7"),i=n("83ab"),r=n("da84"),a=n("5135"),l=n("861d"),s=n("9bf2").f,c=n("e893"),d=r.Symbol;if(i&&"function"==typeof d&&(!("description"in d.prototype)||void 0!==d().description)){var u={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new d(e):void 0===e?d():d(e);return""===e&&(u[t]=!0),t};c(f,d);var p=f.prototype=d.prototype;p.constructor=f;var m=p.toString,v="Symbol(test)"==String(d("test")),h=/^Symbol\((.*)\)[^)]+$/;s(p,"description",{configurable:!0,get:function(){var e=l(this)?this.valueOf():this,t=m.call(e);if(a(u,e))return"";var n=v?t.slice(7,-1):t.replace(h,"$1");return""===n?void 0:n}}),o({global:!0,forced:!0},{Symbol:f})}},e163:function(e,t,n){var o=n("5135"),i=n("7b0b"),r=n("f772"),a=n("e177"),l=r("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),o(e,l)?e[l]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},e177:function(e,t,n){var o=n("d039");e.exports=!o(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},e260:function(e,t,n){var o=n("fc6a"),i=n("44d2"),r=n("3f8c"),a=n("69f3"),l=n("7dd0"),s="Array Iterator",c=a.set,d=a.getterFor(s);e.exports=l(Array,"Array",function(e,t){c(this,{type:s,target:o(e),index:0,kind:t})},function(){var e=d(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},e439:function(e,t,n){var o=n("23e7"),i=n("d039"),r=n("fc6a"),a=n("06cf").f,l=n("83ab"),s=i(function(){a(1)});o({target:"Object",stat:!0,forced:!l||s,sham:!l},{getOwnPropertyDescriptor:function(e,t){return a(r(e),t)}})},e538:function(e,t,n){var o=n("b622");t.f=o},e893:function(e,t,n){var o=n("5135"),i=n("56ef"),r=n("06cf"),a=n("9bf2");e.exports=function(e,t){for(var n=i(t),l=a.f,s=r.f,c=0;c<n.length;c++){var d=n[c];o(e,d)||l(e,d,s(t,d))}}},e8b5:function(e,t,n){var o=n("c6b6");e.exports=Array.isArray||function(e){return"Array"==o(e)}},e95a:function(e,t,n){var o=n("b622"),i=n("3f8c"),r=o("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},f5df:function(e,t,n){var o=n("00ee"),i=n("c6b6"),r=n("b622")("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:a?i(t):"Object"==(o=i(t))&&"function"==typeof t.callee?"Arguments":o}},f772:function(e,t,n){var o=n("5692"),i=n("90e3"),r=o("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},fb15:function(e,t,n){if(n.r(t),"undefined"!=typeof window){var o=window.document.currentScript,i=n("8875");o=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,i=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(o=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);o=!0);}catch(e){i=!0,r=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw r}}return n}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(e)||function(){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("99af"),n("4de4"),n("4160"),n("c975"),n("d81d"),n("a434"),n("159b"),n("a4d3"),n("e439"),n("dbb4"),n("b64b"),n("e01a"),n("d28b"),n("e260"),n("d3b7"),n("3ca3"),n("ddb0"),n("a630"),n("fb6a"),n("b0c0"),n("25f0");var p=n("a352"),m=n.n(p);function v(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function h(e,t,n){var o=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,o)}var g=n("dbf1");n("13d5"),n("4fad"),n("ac1f"),n("5319");var b,y,w=/-(\w)/g,_=(b=function(e){return e.replace(w,function(e,t){return t.toUpperCase()})},y=Object.create(null),function(e){return y[e]||(y[e]=b(e))});n("5db7"),n("73d9");var x=["Start","Add","Remove","Update","End"],S=["Choose","Unchoose","Sort","Filter","Clone"],k=["Move"],E=[k,x,S].flatMap(function(e){return e}).map(function(e){return"on".concat(e)}),C={manage:k,manageAndEmit:x,emit:S};n("caad"),n("2ca0");var A=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function O(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function D(e){return e.reduce(function(e,t){var n=u(t,2),o=n[0],i=n[1];return e[o]=i,e},{})}function I(e){return Object.entries(e).filter(function(e){var t=u(e,2),n=t[0];return t[1],!O(n)}).map(function(e){var t=u(e,2),n=t[0],o=t[1];return[_(n),o]}).filter(function(e){var t,n=u(e,2),o=n[0];return n[1],t=o,!(-1!==E.indexOf(t))})}function R(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}n("c740");var T=function(e){return e.el},P=function(e){return e.__draggable_context},M=function(){function e(t){var n=t.nodes,o=n.header,i=n.default,r=n.footer,a=t.root,l=t.realList;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultNodes=i,this.children=[].concat(f(o),f(i),f(r)),this.externalComponent=a.externalComponent,this.rootTransition=a.transition,this.tag=a.tag,this.realList=l}return R(e,[{key:"render",value:function(e,t){var n=this.tag,o=this.children;return e(n,t,this._isRootComponent?{default:function(){return o}}:o)}},{key:"updated",value:function(){var e=this.defaultNodes,t=this.realList;e.forEach(function(e,n){var o,i;o=T(e),i={element:t[n],index:n},o.__draggable_context=i})}},{key:"getUnderlyingVm",value:function(e){return P(e)}},{key:"getVmIndexFromDomIndex",value:function(e,t){var n=this.defaultNodes,o=n.length,i=t.children,r=i.item(e);if(null===r)return o;var a=P(r);if(a)return a.index;if(0===o)return 0;var l=T(n[0]),s=f(i).findIndex(function(e){return e===l});return e<s?0:o}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),e}(),V=n("8bbf");function j(e){var t=["transition-group","TransitionGroup"].includes(e),n=!function(e){return A.includes(e)}(e)&&!t;return{transition:t,externalComponent:n,tag:n?Object(V.resolveComponent)(e):t?V.TransitionGroup:e}}function U(e){var t=e.$slots,n=e.tag,o=e.realList,i=function(e){var t=e.$slots,n=e.realList,o=e.getKey,i=n||[],r=u(["header","footer"].map(function(e){return(n=t[e])?n():[];var n}),2),a=r[0],l=r[1],c=t.item;if(!c)throw new Error("draggable element must have an item slot");var d=i.flatMap(function(e,t){return c({element:e,index:t}).map(function(t){return t.key=o(e),t.props=s(s({},t.props||{}),{},{"data-draggable":!0}),t})});if(d.length!==i.length)throw new Error("Item slot must have only one child");return{header:a,footer:l,default:d}}({$slots:t,realList:o,getKey:e.getKey}),r=j(n);return new M({nodes:i,root:r,realList:o})}function N(e,t){var n=this;Object(V.nextTick)(function(){return n.$emit(e.toLowerCase(),t)})}function L(e){var t=this;return function(n,o){if(null!==t.realList)return t["onDrag".concat(e)](n,o)}}function $(e){var t=this,n=L.call(this,e);return function(o,i){n.call(t,o,i),N.call(t,e,o)}}var F=null,H={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(e){return e}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},B=["update:modelValue","change"].concat(f([].concat(f(C.manageAndEmit),f(C.emit)).map(function(e){return e.toLowerCase()}))),q=Object(V.defineComponent)({name:"draggable",inheritAttrs:!1,props:H,emits:B,data:function(){return{error:!1}},render:function(){try{this.error=!1;var e=this.$slots,t=this.$attrs,n=this.tag,o=this.componentData,i=U({$slots:e,tag:n,realList:this.realList,getKey:this.getKey});this.componentStructure=i;var r=function(e){var t=e.$attrs,n=e.componentData,o=void 0===n?{}:n;return s(s({},D(Object.entries(t).filter(function(e){var t=u(e,2),n=t[0];return t[1],O(n)}))),o)}({$attrs:t,componentData:o});return i.render(V.h,r)}catch(e){return this.error=!0,Object(V.h)("pre",{style:{color:"red"}},e.stack)}},created:function(){null!==this.list&&null!==this.modelValue&&g.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var e=this;if(!this.error){var t=this.$attrs,n=this.$el;this.componentStructure.updated();var o=function(e){var t=e.$attrs,n=e.callBackBuilder,o=D(I(t));Object.entries(n).forEach(function(e){var t=u(e,2),n=t[0],i=t[1];C[n].forEach(function(e){o["on".concat(e)]=i(e)})});var i="[data-draggable]".concat(o.draggable||"");return s(s({},o),{},{draggable:i})}({$attrs:t,callBackBuilder:{manageAndEmit:function(t){return $.call(e,t)},emit:function(t){return N.bind(e,t)},manage:function(t){return L.call(e,t)}}}),i=1===n.nodeType?n:n.parentElement;this._sortable=new m.a(i,o),this.targetDomElement=i,i.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList:function(){var e=this.list;return e||this.modelValue},getKey:function(){var e=this.itemKey;return"function"==typeof e?e:function(t){return t[e]}}},watch:{$attrs:{handler:function(e){var t=this._sortable;t&&I(e).forEach(function(e){var n=u(e,2),o=n[0],i=n[1];t.option(o,i)})},deep:!0}},methods:{getUnderlyingVm:function(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent:function(e){return e.__draggable_component__},emitChanges:function(e){var t=this;Object(V.nextTick)(function(){return t.$emit("change",e)})},alterList:function(e){if(this.list)e(this.list);else{var t=f(this.modelValue);e(t),this.$emit("update:modelValue",t)}},spliceList:function(){var e=arguments,t=function(t){return t.splice.apply(t,f(e))};this.alterList(t)},updatePosition:function(e,t){var n=function(n){return n.splice(t,0,n.splice(e,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,o=this.getUnderlyingPotencialDraggableComponent(t);if(!o)return{component:o};var i=o.realList,r={list:i,component:o};return t!==n&&i?s(s({},o.getUnderlyingVm(n)||{}),r):r},getVmIndexFromDomIndex:function(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),F=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){v(e.item);var n=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(n,0,t);var o={element:t,newIndex:n};this.emitChanges({added:o})}},onDragRemove:function(e){if(h(this.$el,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context,n=t.index,o=t.element;this.spliceList(n,1);var i={element:o,oldIndex:n};this.emitChanges({removed:i})}else v(e.clone)},onDragUpdate:function(e){v(e.item),h(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(t,n);var o={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:o})},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=f(t.to.children).filter(function(e){return"none"!==e.style.display}),o=n.indexOf(t.related),i=e.component.getVmIndexFromDomIndex(o);return-1===n.indexOf(F)&&t.willInsertAfter?i+1:i},onDragMove:function(e,t){var n=this.move,o=this.realList;if(!n||!o)return!0;var i=this.getRelatedContextFromMoveEvent(e),r=this.computeFutureIndex(i,e),a=s(s({},this.context),{},{futureIndex:r});return n(s(s({},e),{},{relatedContext:i,draggedContext:a}),t)},onDragEnd:function(){F=null}}}),z=q;t.default=z},fb6a:function(e,t,n){var o=n("23e7"),i=n("861d"),r=n("e8b5"),a=n("23cb"),l=n("50c4"),s=n("fc6a"),c=n("8418"),d=n("b622"),u=n("1dde"),f=n("ae40"),p=u("slice"),m=f("slice",{ACCESSORS:!0,0:0,1:2}),v=d("species"),h=[].slice,g=Math.max;o({target:"Array",proto:!0,forced:!p||!m},{slice:function(e,t){var n,o,d,u=s(this),f=l(u.length),p=a(e,f),m=a(void 0===t?f:t,f);if(r(u)&&("function"!=typeof(n=u.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(u,p,m);for(o=new(void 0===n?Array:n)(g(m-p,0)),d=0;p<m;p++,d++)p in u&&c(o,d,u[p]);return o.length=d,o}})},fc6a:function(e,t,n){var o=n("44ad"),i=n("1d80");e.exports=function(e){return o(i(e))}},fdbc:function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(e,t,n){var o=n("4930");e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}}).default},Ge.exports=_o(Ke,We(wo))),So=Ye(xo);const ko={key:0,class:"loading"},Eo={class:"info"},Co={class:"name"},Ao={class:"to"},Oo={class:"info"},Do={class:"to"},Io={key:0,class:"drawer-content"},Ro={class:"field"},To={class:"field"},Po={class:"field"},Mo={key:0,class:"drawer-content"},Vo={class:"field"},jo={class:"field"},Uo={class:"field"},No={class:"field checkbox-field"},Lo={key:0,class:"drawer-content"},$o={class:"field"},Fo={class:"field"},Ho={class:"field"};var Bo=a({__name:"modules-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,previewItems:r,roleOptions:a,policyOptions:y,linkEditing:C,linkValues:A,linkSaveDisabled:O,ruleEditingId:D,ruleDraft:I,hasRule:R,ruleSummary:T,toggleEnabled:P,editLink:M,closeLinkEditor:V,onLinkDrawerToggle:j,saveLink:U,removeLink:N,openRuleEditor:L,closeRuleEditor:$,onRuleDrawerToggle:F,saveRule:H,clearRule:B,hideNavItems:q,hideNavEditing:z,hideNavDraft:X,hideNavSaveDisabled:Y,moduleSelectOptions:W,hideNavSummary:G,editHideNav:K,closeHideNavEditor:J,onHideNavDrawerToggle:Q,saveHideNav:Z,removeHideNav:ee,ensureLoaded:te,save:ne}=ke();return f(()=>{te()}),(e,f)=>{const te=l("v-breadcrumb"),oe=l("v-icon"),ie=l("v-button"),re=l("sidebar-detail"),ae=l("v-progress-circular"),le=l("v-divider"),se=l("v-chip"),ce=l("v-checkbox"),de=l("v-list-item"),ue=l("v-input"),fe=l("v-drawer"),pe=l("v-select"),me=l("private-view"),ve=p("tooltip");return s(),c(me,{title:"Modules",icon:"view_sidebar"},{headline:d(()=>[u(te,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(ie,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(ne)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[ve,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(re,{icon:"info",title:"About",close:""},{default:d(()=>[...f[18]||(f[18]=[m("p",{class:"sidebar-text"}," Configure the left module bar and optionally hide the middle Module Navigation panel for matched roles/policies. Admins are never affected. Deep links are blocked when a rule disables a module (unless “Block deep links” is turned off). ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",ko,[u(ae,{indeterminate:""})])):(s(),g(b,{key:1},[u(le,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(oe,{name:"view_sidebar",class:"icon-flip-x"})]),default:d(()=>[f[19]||(f[19]=w(" "+_("Module Bar"),-1))]),_:1}),f[24]||(f[24]=m("p",{class:"page-intro"}," Reorder the left module bar, enable or disable entries, and add custom links — the same controls as Project Settings → Modules. Open an item to assign roles or policies that hide or show it for non-admin users. ",-1)),u(h(So),{modelValue:h(r),"onUpdate:modelValue":f[2]||(f[2]=e=>E(r)?r.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(de,{block:"",dense:"",clickable:"",class:v(["module-row",{enabled:e.enabled}]),onClick:t=>h(L)(e)},{default:d(()=>[u(oe,{class:"drag-handle",name:"drag_handle",onClick:f[0]||(f[0]=S(()=>{},["stop"]))}),u(oe,{class:"icon",name:e.icon},null,8,["name"]),m("div",Eo,[m("div",Co,[w(_(e.name)+" ",1),h(R)(e.id)?(s(),c(se,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(T)(e.id)),1)]),_:2},1024)):x("v-if",!0)]),m("div",Ao,_(e.to),1)]),m("div",{class:"row-actions",onClick:f[1]||(f[1]=S(()=>{},["stop"]))},[k((s(),c(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(L)(e)},{default:d(()=>[u(oe,{name:"policy"})]),_:1},8,["onClick"])),[[ve,"Visibility rules"]]),"module"===e.type?(s(),g(b,{key:0},[e.locked?k((s(),c(oe,{key:0,name:"lock"},null,512)),[[ve,"Locked"]]):(s(),c(ce,{key:1,"model-value":e.enabled,"onUpdate:modelValue":t=>h(P)(e,t)},null,8,["model-value","onUpdate:modelValue"]))],64)):(s(),g(b,{key:1},[u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(M)(e.id)},{default:d(()=>[u(oe,{name:"edit"})]),_:1},8,["onClick"]),u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(N)(e.id)},{default:d(()=>[u(oe,{name:"close"})]),_:1},8,["onClick"])],64))])]),_:2},1032,["class","onClick"])]),_:1},8,["modelValue"]),u(ie,{class:"add-link",onClick:f[3]||(f[3]=e=>h(M)("+"))},{default:d(()=>[...f[20]||(f[20]=[w("Add Link",-1)])]),_:1}),u(le,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(oe,{name:"menu"})]),default:d(()=>[f[21]||(f[21]=w(" "+_("Hide Module Navigation"),-1))]),_:1}),f[25]||(f[25]=m("p",{class:"section-intro"}," Hide the middle Module Navigation column for selected modules when the user matches. First matching rule’s modules are merged for the user. Empty roles and policies = catch-all. ",-1)),u(h(So),{modelValue:h(q),"onUpdate:modelValue":f[6]||(f[6]=e=>E(q)?q.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(de,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(K)(e.id)},{default:d(()=>[u(oe,{class:"drag-handle",name:"drag_handle",onClick:f[4]||(f[4]=S(()=>{},["stop"]))}),u(oe,{class:"icon",name:"menu"}),m("div",Oo,[f[22]||(f[22]=m("div",{class:"name"},"Hide navigation",-1)),m("div",Do,_(h(G)(e)),1)]),m("div",{class:"row-actions",onClick:f[5]||(f[5]=S(()=>{},["stop"]))},[u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(K)(e.id)},{default:d(()=>[u(oe,{name:"edit"})]),_:1},8,["onClick"]),u(ie,{icon:"","x-small":"",secondary:"",onClick:t=>h(ee)(e.id)},{default:d(()=>[u(oe,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(ie,{class:"add-link",onClick:f[7]||(f[7]=e=>h(K)("+"))},{default:d(()=>[...f[23]||(f[23]=[w("Add Hide-Navigation Rule",-1)])]),_:1})],64))],2),u(fe,{"model-value":null!==h(C),title:"Link",icon:"link","onUpdate:modelValue":h(j),onCancel:h(V)},{actions:d(()=>[k((s(),c(ie,{disabled:h(O),icon:"",rounded:"",onClick:h(U)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["disabled","onClick"])),[[ve,"Save",void 0,{bottom:!0}]])]),default:d(()=>[h(A)?(s(),g("div",Io,[m("div",Ro,[f[26]||(f[26]=m("label",null,"Name",-1)),u(ue,{modelValue:h(A).name,"onUpdate:modelValue":f[8]||(f[8]=e=>h(A).name=e),placeholder:"Enter a name"},null,8,["modelValue"])]),m("div",To,[f[27]||(f[27]=m("label",null,"Icon",-1)),u(ue,{modelValue:h(A).icon,"onUpdate:modelValue":f[9]||(f[9]=e=>h(A).icon=e),placeholder:"link"},null,8,["modelValue"])]),m("div",Po,[f[28]||(f[28]=m("label",null,"URL",-1)),u(ue,{modelValue:h(A).url,"onUpdate:modelValue":f[10]||(f[10]=e=>h(A).url=e),placeholder:"https://example.com"},null,8,["modelValue"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(fe,{"model-value":null!==h(D),title:"Module Visibility",icon:"policy","onUpdate:modelValue":h(F),onCancel:h($)},{actions:d(()=>[k((s(),c(ie,{icon:"",rounded:"",onClick:h(H)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["onClick"])),[[ve,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(I)?(s(),g("div",Mo,[f[33]||(f[33]=m("p",{class:"hint"}," Leave roles and policies empty to use only the global enable toggle (no ACL override). ",-1)),m("div",Vo,[f[29]||(f[29]=m("label",null,"Visibility",-1)),u(pe,{modelValue:h(I).visibility,"onUpdate:modelValue":f[11]||(f[11]=e=>h(I).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",jo,[f[30]||(f[30]=m("label",null,"Roles",-1)),u(pe,{modelValue:h(I).roles,"onUpdate:modelValue":f[12]||(f[12]=e=>h(I).roles=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",Uo,[f[31]||(f[31]=m("label",null,"Policies",-1)),u(pe,{modelValue:h(I).policies,"onUpdate:modelValue":f[13]||(f[13]=e=>h(I).policies=e),multiple:"",items:h(y),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),m("div",No,[u(ce,{modelValue:h(I).block_routes,"onUpdate:modelValue":f[14]||(f[14]=e=>h(I).block_routes=e),label:"Block deep links when this rule hides the module"},null,8,["modelValue"])]),h(R)(h(D))?(s(),c(ie,{key:0,secondary:"",onClick:h(B)},{default:d(()=>[...f[32]||(f[32]=[w("Clear rule",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(fe,{"model-value":null!==h(z),title:"Hide Module Navigation",icon:"menu","onUpdate:modelValue":h(Q),onCancel:h(J)},{actions:d(()=>[k((s(),c(ie,{disabled:h(Y),icon:"",rounded:"",onClick:h(Z)},{default:d(()=>[u(oe,{name:"check"})]),_:1},8,["disabled","onClick"])),[[ve,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(X)?(s(),g("div",Lo,[f[37]||(f[37]=m("p",{class:"hint"}," Select modules whose middle navigation panel should be hidden. Empty roles and policies = catch-all. ",-1)),m("div",$o,[f[34]||(f[34]=m("label",null,"Modules",-1)),u(pe,{modelValue:h(X).modules,"onUpdate:modelValue":f[15]||(f[15]=e=>h(X).modules=e),multiple:"",items:h(W),"item-text":"text","item-value":"value",placeholder:"Select modules"},null,8,["modelValue","items"])]),m("div",Fo,[f[35]||(f[35]=m("label",null,"Roles",-1)),u(pe,{modelValue:h(X).roles,"onUpdate:modelValue":f[16]||(f[16]=e=>h(X).roles=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",Ho,[f[36]||(f[36]=m("label",null,"Policies",-1)),u(pe,{modelValue:h(X).policies,"onUpdate:modelValue":f[17]||(f[17]=e=>h(X).policies=e),multiple:"",items:h(y),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-d0861e76] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--flush-top[data-v-d0861e76] {\n\tpadding-block-start: 0;\n}\n\n/* Mirror sidebar icon → left rail (module bar), matching the Modules nav item */\n[data-v-d0861e76] i[data-icon='view_sidebar'] {\n\tdisplay: inline-block;\n\ttransform: scaleX(-1);\n}\n.loading[data-v-d0861e76] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-d0861e76] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.section-intro[data-v-d0861e76] {\n\tmargin: 0 0 16px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.section-divider[data-v-d0861e76] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-d0861e76] {\n\tmargin-top: 40px;\n}\n.icon-flip-x[data-v-d0861e76] {\n\ttransform: scaleX(-1);\n}\n.list[data-v-d0861e76] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row[data-v-d0861e76] {\n\t--v-list-item-color: var(--theme--foreground-subdued);\n}\n.module-row.enabled[data-v-d0861e76] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-d0861e76] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-d0861e76] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-d0861e76] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-d0861e76] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-weight: 600;\n}\n.to[data-v-d0861e76] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-d0861e76] {\n\tmargin-inline-start: 4px;\n}\n.row-actions[data-v-d0861e76] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-d0861e76] {\n\tmargin-top: 4px;\n}\n.drawer-content[data-v-d0861e76] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-d0861e76] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.hint[data-v-d0861e76],\n.sidebar-text[data-v-d0861e76] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.checkbox-field[data-v-d0861e76] {\n\tpadding-top: 4px;\n}\n",{});var qo=Re(Bo,[["__scopeId","data-v-d0861e76"]]);const zo={class:"actions"},Xo={key:0,class:"result"},Yo={key:1,class:"result"},Wo={key:2,class:"result"};var Go=a({__name:"settings-view",setup(e){const t=Ce(),{loading:n,cleaning:o,ensureLoaded:r,cleanupExtensionData:a,exportPermissionsConfig:p,importPermissionsConfig:y}=ke(),S=i(!1),k=i(null),E=i(null),C=i(!1),A=i(null),O=i(null);function D(){A.value=null,p()}function I(){A.value=null,O.value?.click()}async function R(e){const t=e.target,n=t.files?.[0];if(t.value="",n){C.value=!0,A.value=null;try{const e=await n.text(),t=JSON.parse(e);await y(t),A.value={type:"success",text:"Config imported and saved to settings."}}catch(e){A.value={type:"danger",text:e?.response?.data?.errors?.[0]?.message||e?.message||"Import failed"}}finally{C.value=!1}}}async function T(){k.value=null,E.value=null,A.value=null;try{E.value=await a(),S.value=!1}catch(e){k.value=e?.response?.data?.errors?.[0]?.message||e?.message||"Cleanup failed"}}return f(()=>{r()}),(e,i)=>{const r=l("v-breadcrumb"),a=l("sidebar-detail"),f=l("v-icon"),p=l("v-divider"),y=l("v-button"),P=l("v-notice"),M=l("v-card-title"),V=l("v-card-text"),j=l("v-card-actions"),U=l("v-card"),N=l("v-dialog"),L=l("private-view");return s(),c(L,{title:"Settings",icon:"settings"},{headline:d(()=>[u(r,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),sidebar:d(()=>[u(a,{icon:"info",title:"About",close:""},{default:d(()=>[...i[4]||(i[4]=[m("p",{class:"sidebar-text"}," Export or import this extension’s JSON config, or remove the dedicated settings field before uninstalling. ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[i[12]||(i[12]=m("p",{class:"page-intro"},[w(" Back up or restore this extension’s visibility config (module rules, content, users, start pages, sidebar) as JSON, or remove the dedicated "),m("code",null,"module_permissions"),w(" settings field before uninstalling. Native "),m("code",null,"module_bar"),w(" order/enable and all other project settings are left untouched. ")],-1)),u(p,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(f,{name:"import_export"})]),default:d(()=>[i[5]||(i[5]=w(" Export / Import ",-1))]),_:1}),i[13]||(i[13]=m("p",{class:"explain"},[w(" Download or restore "),m("code",null,"directus_settings.module_permissions"),w(" only (module rules, content, users/nav, start pages, sidebar panels/modes). Does not include native "),m("code",null,"module_bar"),w(" — manage that in Modules or Project Settings → Modules. ")],-1)),m("div",zo,[u(y,{secondary:"",disabled:h(n)||h(o),onClick:D},{default:d(()=>[...i[6]||(i[6]=[w("Export JSON",-1)])]),_:1},8,["disabled"]),u(y,{secondary:"",disabled:h(n)||h(o)||C.value,loading:C.value,onClick:I},{default:d(()=>[...i[7]||(i[7]=[w(" Import JSON ",-1)])]),_:1},8,["disabled","loading"]),m("input",{ref_key:"fileInput",ref:O,type:"file",accept:"application/json,.json",class:"file-input",onChange:R},null,544)]),A.value?(s(),g("div",Xo,[u(P,{type:A.value.type},{default:d(()=>[w(_(A.value.text),1)]),_:1},8,["type"])])):x("v-if",!0),u(p,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(f,{name:"delete"})]),default:d(()=>[i[8]||(i[8]=w(" Remove extension data ",-1))]),_:1}),i[14]||(i[14]=m("p",{class:"explain"},[w(" Visibility rules and start pages live in a dedicated JSON field "),m("code",null,"directus_settings.module_permissions"),w(". It is not mixed into another settings JSON blob, so cleanup can safely remove only that field. Module bar order/enable ("),m("code",null,"module_bar"),w(") and all other project settings are kept. If the extension stays installed, the next Directus restart may recreate an empty "),m("code",null,"module_permissions"),w(" field. ")],-1)),u(P,{type:"warning",class:"notice"},{default:d(()=>[...i[9]||(i[9]=[w(" Deleting extension data cannot be undone. Export first if you might need the config again. ",-1)])]),_:1}),E.value?(s(),g("div",Yo,[u(P,{type:"success"},{default:d(()=>[i[10]||(i[10]=w(" Cleanup finished. ",-1)),E.value.clearedValue?(s(),g(b,{key:0},[w(" Value cleared.")],64)):x("v-if",!0),E.value.deletedField?(s(),g(b,{key:1},[w(" Field removed.")],64)):x("v-if",!0)]),_:1})])):x("v-if",!0),k.value?(s(),g("div",Wo,[u(P,{type:"danger"},{default:d(()=>[w(_(k.value),1)]),_:1})])):x("v-if",!0),u(y,{kind:"danger",loading:h(o),disabled:h(o),onClick:i[0]||(i[0]=e=>S.value=!0)},{default:d(()=>[...i[11]||(i[11]=[w(" Delete module_permissions data ",-1)])]),_:1},8,["loading","disabled"])],2),u(N,{modelValue:S.value,"onUpdate:modelValue":i[2]||(i[2]=e=>S.value=e),onEsc:i[3]||(i[3]=e=>S.value=!1)},{default:d(()=>[u(U,null,{default:d(()=>[u(M,null,{default:d(()=>[...i[15]||(i[15]=[w("Delete module_permissions?",-1)])]),_:1}),u(V,null,{default:d(()=>[...i[16]||(i[16]=[w(" This removes only ",-1),m("code",null,"directus_settings.module_permissions",-1),w(" (the extension’s own JSON field). Module bar order/enable and all other settings stay as they are. ",-1)])]),_:1}),u(j,null,{default:d(()=>[u(y,{secondary:"",onClick:i[1]||(i[1]=e=>S.value=!1)},{default:d(()=>[...i[17]||(i[17]=[w("Cancel",-1)])]),_:1}),u(y,{kind:"danger",loading:h(o),onClick:T},{default:d(()=>[...i[18]||(i[18]=[w("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}});Ie("\n.page[data-v-5818e9fd] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--flush-top[data-v-5818e9fd] {\n\tpadding-block-start: 0;\n}\n.section-divider[data-v-5818e9fd] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-5818e9fd] {\n\tmargin-top: 40px;\n}\n.page-intro[data-v-5818e9fd] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.page-intro code[data-v-5818e9fd] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.explain[data-v-5818e9fd],\n.sidebar-text[data-v-5818e9fd] {\n\tmargin: 0 0 16px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.explain code[data-v-5818e9fd],\n.sidebar-text code[data-v-5818e9fd],\n.v-card-text code[data-v-5818e9fd] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.actions[data-v-5818e9fd] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tmargin-bottom: 16px;\n}\n.file-input[data-v-5818e9fd] {\n\tdisplay: none;\n}\n.notice[data-v-5818e9fd],\n.result[data-v-5818e9fd] {\n\tmargin-bottom: 16px;\n}\n",{});var Ko=Re(Go,[["__scopeId","data-v-5818e9fd"]]);const Jo={key:0,class:"loading"},Qo={class:"list"},Zo={class:"info"},ei={class:"name"},ti={class:"to"},ni={class:"info"},oi={class:"name"},ii={class:"to"},ri={key:0,class:"drawer-content"},ai={class:"field"},li={class:"field"},si={class:"field"},ci={key:0,class:"drawer-content"},di={class:"field"},ui={class:"field"},fi={class:"field"};var pi=a({__name:"sidebar-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,roleOptions:r,policyOptions:a,sidebarPanelCatalog:C,sidebarPanelEditingId:A,sidebarPanelDraft:O,sidebarModeItems:D,sidebarModeEditing:I,sidebarModeDraft:R,hasSidebarPanelRule:T,sidebarPanelRuleSummary:P,sidebarModeSummary:M,openSidebarPanelEditor:V,closeSidebarPanelEditor:j,onSidebarPanelDrawerToggle:U,saveSidebarPanelRule:N,clearSidebarPanelRule:L,editSidebarMode:$,closeSidebarModeEditor:F,onSidebarModeDrawerToggle:H,saveSidebarMode:B,removeSidebarMode:q,ensureLoaded:z,save:X}=ke();return f(()=>{z()}),(e,f)=>{const z=l("v-breadcrumb"),Y=l("v-icon"),W=l("v-button"),G=l("sidebar-detail"),K=l("v-progress-circular"),J=l("v-divider"),Q=l("v-chip"),Z=l("v-list-item"),ee=l("v-select"),te=l("v-drawer"),ne=l("private-view"),oe=p("tooltip");return s(),c(ne,{title:"Sidebar",icon:"view_sidebar"},{headline:d(()=>[u(z,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(W,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(X)},{default:d(()=>[u(Y,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[oe,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(G,{icon:"info",title:"About",close:""},{default:d(()=>[...f[11]||(f[11]=[m("p",{class:"sidebar-text"}," Hide individual right-sidebar panels (Layout, Revisions, Comments, …) or force the whole sidebar collapsed/hidden for matched roles and policies. Admins are never affected. This is UI-only — not a security boundary. ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",Jo,[u(K,{indeterminate:""})])):(s(),g(b,{key:1},[u(J,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(Y,{name:"widgets"})]),default:d(()=>[f[12]||(f[12]=w(" Panels ",-1))]),_:1}),f[15]||(f[15]=m("p",{class:"page-intro"}," Hide or show known Data Studio sidebar panels for matched roles/policies. Collection browse panels (Layout, Archive, …) and item panels (Revisions, Comments, …) only appear on the relevant pages. Import appears on Insights. Activity Log is the footer control at the bottom of the sidebar (Directus 11; replaced by AI Assistant on newer versions when AI is enabled). ",-1)),m("div",Qo,[(s(!0),g(b,null,y(h(C),e=>(s(),c(Z,{key:e.id,block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(V)(e.id)},{default:d(()=>{return[u(Y,{class:"icon",name:e.icon},null,8,["name"]),m("div",Zo,[m("div",ei,[w(_(e.name)+" ",1),h(T)(e.id)?(s(),c(Q,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(P)(e.id)),1)]),_:2},1024)):x("v-if",!0)]),m("div",ti,_(e.id)+" · "+_((t=e.context,"collection"===t?"collection browse":"item"===t?"item detail":"insights"===t?"Insights":"collection & item")),1)]),m("div",{class:"row-actions",onClick:f[0]||(f[0]=S(()=>{},["stop"]))},[k((s(),c(W,{icon:"","x-small":"",secondary:"",onClick:t=>h(V)(e.id)},{default:d(()=>[u(Y,{name:"policy"})]),_:1},8,["onClick"])),[[oe,"Visibility rules"]])])];var t}),_:2},1032,["onClick"]))),128))]),u(J,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(Y,{name:"keyboard_tab"})]),default:d(()=>[f[13]||(f[13]=w(" Sidebar Mode ",-1))]),_:1}),f[16]||(f[16]=m("p",{class:"page-intro"}," Force the whole right sidebar collapsed or hidden. First match wins (drag to reorder); leave roles and policies empty for a catch-all. Default behavior applies when nothing matches. ",-1)),u(h(So),{modelValue:h(D),"onUpdate:modelValue":f[3]||(f[3]=e=>E(D)?D.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(Z,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h($)(e.id)},{default:d(()=>[u(Y,{class:"drag-handle",name:"drag_handle",onClick:f[1]||(f[1]=S(()=>{},["stop"]))}),u(Y,{class:"icon",name:"hidden"===e.mode?"visibility_off":"keyboard_tab"},null,8,["name"]),m("div",ni,[m("div",oi,_("hidden"===e.mode?"Force hidden":"Force collapsed"),1),m("div",ii,_(h(M)(e)),1)]),m("div",{class:"row-actions",onClick:f[2]||(f[2]=S(()=>{},["stop"]))},[u(W,{icon:"","x-small":"",secondary:"",onClick:t=>h($)(e.id)},{default:d(()=>[u(Y,{name:"edit"})]),_:1},8,["onClick"]),u(W,{icon:"","x-small":"",secondary:"",onClick:t=>h(q)(e.id)},{default:d(()=>[u(Y,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(W,{class:"add-link",onClick:f[4]||(f[4]=e=>h($)("+"))},{default:d(()=>[...f[14]||(f[14]=[w("Add Sidebar Mode",-1)])]),_:1})],64))],2),u(te,{"model-value":null!==h(A),title:"Sidebar Panel",icon:"policy","onUpdate:modelValue":h(U),onCancel:h(j)},{actions:d(()=>[k((s(),c(W,{icon:"",rounded:"",onClick:h(N)},{default:d(()=>[u(Y,{name:"check"})]),_:1},8,["onClick"])),[[oe,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(O)?(s(),g("div",ri,[f[21]||(f[21]=m("p",{class:"hint"}," Leave roles and policies empty to clear the rule. Hiding is client-side only — API access is unchanged. ",-1)),m("div",ai,[f[17]||(f[17]=m("label",null,"Visibility",-1)),u(ee,{modelValue:h(O).visibility,"onUpdate:modelValue":f[5]||(f[5]=e=>h(O).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",li,[f[18]||(f[18]=m("label",null,"Roles",-1)),u(ee,{modelValue:h(O).roles,"onUpdate:modelValue":f[6]||(f[6]=e=>h(O).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",si,[f[19]||(f[19]=m("label",null,"Policies",-1)),u(ee,{modelValue:h(O).policies,"onUpdate:modelValue":f[7]||(f[7]=e=>h(O).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),h(T)(h(A))?(s(),c(W,{key:0,secondary:"",onClick:h(L)},{default:d(()=>[...f[20]||(f[20]=[w(" Clear rule ",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(te,{"model-value":null!==h(I),title:"Sidebar Mode",icon:"view_sidebar","onUpdate:modelValue":h(H),onCancel:h(F)},{actions:d(()=>[k((s(),c(W,{icon:"",rounded:"",onClick:h(B)},{default:d(()=>[u(Y,{name:"check"})]),_:1},8,["onClick"])),[[oe,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(R)?(s(),g("div",ci,[f[25]||(f[25]=m("p",{class:"hint"}," Collapsed keeps the icon rail (Directus compact sidebar). Hidden removes the sidebar chrome entirely. Empty roles and policies = catch-all (place last). ",-1)),m("div",di,[f[22]||(f[22]=m("label",null,"Mode",-1)),u(ee,{modelValue:h(R).mode,"onUpdate:modelValue":f[8]||(f[8]=e=>h(R).mode=e),items:[{text:"Force collapsed",value:"collapsed"},{text:"Force hidden",value:"hidden"}]},null,8,["modelValue"])]),m("div",ui,[f[23]||(f[23]=m("label",null,"Roles",-1)),u(ee,{modelValue:h(R).roles,"onUpdate:modelValue":f[9]||(f[9]=e=>h(R).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",fi,[f[24]||(f[24]=m("label",null,"Policies",-1)),u(ee,{modelValue:h(R).policies,"onUpdate:modelValue":f[10]||(f[10]=e=>h(R).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-b11650c3] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--flush-top[data-v-b11650c3] {\n\tpadding-block-start: 0;\n}\n.loading[data-v-b11650c3] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.section-divider[data-v-b11650c3] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-b11650c3] {\n\tmargin-top: 40px;\n}\n.page-intro[data-v-b11650c3] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.list[data-v-b11650c3] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-b11650c3] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-b11650c3] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-b11650c3] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-b11650c3] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-b11650c3] {\n\tfont-weight: 600;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tflex-wrap: wrap;\n}\n.to[data-v-b11650c3] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-b11650c3] {\n\tfont-weight: 500;\n}\n.row-actions[data-v-b11650c3] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-b11650c3] {\n\tmargin-top: 4px;\n}\n.drawer-content[data-v-b11650c3] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-b11650c3] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.hint[data-v-b11650c3],\n.sidebar-text[data-v-b11650c3] {\n\tmargin: 0;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.hint code[data-v-b11650c3],\n.sidebar-text code[data-v-b11650c3] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n",{});var mi=Re(pi,[["__scopeId","data-v-b11650c3"]]);const vi={key:0,class:"loading"},hi={class:"info"},gi={class:"name"},bi={class:"to"},yi={key:0,class:"drawer-content"},wi={class:"field"},_i={class:"field checkbox-field"},xi={class:"field"},Si={class:"field"};var ki=a({__name:"start-page-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,homeItems:r,roleOptions:a,policyOptions:y,homeEditing:C,homeDraft:A,homeSaveDisabled:O,homeSummary:D,editHome:I,closeHomeEditor:R,onHomeDrawerToggle:T,saveHome:P,removeHome:M,ensureLoaded:V,save:j}=ke();return f(()=>{V()}),(e,f)=>{const V=l("v-breadcrumb"),U=l("v-icon"),N=l("v-button"),L=l("sidebar-detail"),$=l("v-progress-circular"),F=l("v-list-item"),H=l("v-input"),B=l("v-checkbox"),q=l("v-select"),z=l("v-drawer"),X=l("private-view"),Y=p("tooltip");return s(),c(X,{title:"Start Page",icon:"home"},{headline:d(()=>[u(V,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(N,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(j)},{default:d(()=>[u(U,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[Y,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(L,{icon:"info",title:"About",close:""},{default:d(()=>[...f[8]||(f[8]=[m("p",{class:"sidebar-text"},[w(" Start pages define where matched users land after login. By default they only apply when Directus has no last page. Enable "),m("strong",null,"Force Redirect"),w(" to ignore "),m("code",null,"last_page"),w(". Explicit "),m("code",null,"?redirect="),w(" links still win. ")],-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",vi,[u($,{indeterminate:""})])):(s(),g(b,{key:1},[f[10]||(f[10]=m("p",{class:"page-intro"},[w(" Define where users land after login, and prefer that path for safe redirects away from blocked modules. First match wins (drag to reorder); leave roles and policies empty for a catch-all default. Without force, this does not override a user’s "),m("code",null,"last_page"),w(". Enable force to redirect even when a last page exists. Explicit "),m("code",null,"?redirect="),w(" always wins. ")],-1)),u(h(So),{modelValue:h(r),"onUpdate:modelValue":f[2]||(f[2]=e=>E(r)?r.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(F,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(I)(e.id)},{default:d(()=>[u(U,{class:"drag-handle",name:"drag_handle",onClick:f[0]||(f[0]=S(()=>{},["stop"]))}),u(U,{class:"icon",name:"home"}),m("div",hi,[m("div",gi,_(e.path),1),m("div",bi,_(h(D)(e)),1)]),m("div",{class:"row-actions",onClick:f[1]||(f[1]=S(()=>{},["stop"]))},[u(N,{icon:"","x-small":"",secondary:"",onClick:t=>h(I)(e.id)},{default:d(()=>[u(U,{name:"edit"})]),_:1},8,["onClick"]),u(N,{icon:"","x-small":"",secondary:"",onClick:t=>h(M)(e.id)},{default:d(()=>[u(U,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(N,{class:"add-link",onClick:f[3]||(f[3]=e=>h(I)("+"))},{default:d(()=>[...f[9]||(f[9]=[w("Add Start Page",-1)])]),_:1})],64))],2),u(z,{"model-value":null!==h(C),title:"Start Page",icon:"home","onUpdate:modelValue":h(T),onCancel:h(R)},{actions:d(()=>[k((s(),c(N,{disabled:h(O),icon:"",rounded:"",onClick:h(P)},{default:d(()=>[u(U,{name:"check"})]),_:1},8,["disabled","onClick"])),[[Y,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(A)?(s(),g("div",yi,[f[14]||(f[14]=m("p",{class:"hint"},[w(" Use an in-app path such as "),m("code",null,"/files"),w(" or "),m("code",null,"/content"),w(". External URLs are rejected. ")],-1)),m("div",wi,[f[11]||(f[11]=m("label",null,"Path",-1)),u(H,{modelValue:h(A).path,"onUpdate:modelValue":f[4]||(f[4]=e=>h(A).path=e),placeholder:"/content"},null,8,["modelValue"])]),m("div",_i,[u(B,{modelValue:h(A).force,"onUpdate:modelValue":f[5]||(f[5]=e=>h(A).force=e),label:"Force Redirect (ignore users last page prop)"},null,8,["modelValue"])]),m("div",xi,[f[12]||(f[12]=m("label",null,"Roles",-1)),u(q,{modelValue:h(A).roles,"onUpdate:modelValue":f[6]||(f[6]=e=>h(A).roles=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",Si,[f[13]||(f[13]=m("label",null,"Policies",-1)),u(q,{modelValue:h(A).policies,"onUpdate:modelValue":f[7]||(f[7]=e=>h(A).policies=e),multiple:"",items:h(y),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-e3a923cc] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--flush-top[data-v-e3a923cc] {\n\tpadding-block-start: 0;\n}\n.loading[data-v-e3a923cc] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-e3a923cc] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.page-intro code[data-v-e3a923cc] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.section-hint[data-v-e3a923cc] {\n\tmargin-bottom: 24px;\n}\n.section-hint code[data-v-e3a923cc],\n.hint code[data-v-e3a923cc] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n.list[data-v-e3a923cc] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-e3a923cc] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-e3a923cc] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-e3a923cc] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-e3a923cc] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-e3a923cc] {\n\tfont-weight: 600;\n}\n.to[data-v-e3a923cc] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.row-actions[data-v-e3a923cc] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-e3a923cc] {\n\tmargin-top: 4px;\n}\n.drawer-content[data-v-e3a923cc] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-e3a923cc] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.checkbox-field[data-v-e3a923cc] {\n\tmargin-top: -4px;\n}\n.hint[data-v-e3a923cc],\n.sidebar-text[data-v-e3a923cc] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.sidebar-text code[data-v-e3a923cc] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n",{});var Ei=Re(ki,[["__scopeId","data-v-e3a923cc"]]);const Ci={key:0,class:"loading"},Ai={class:"info"},Oi={class:"to"},Di={key:0,class:"empty"},Ii={key:1,class:"list"},Ri={class:"info"},Ti={class:"name"},Pi={class:"to"},Mi={key:0,class:"drawer-content"},Vi={class:"field"},ji={class:"field"},Ui={key:0,class:"drawer-content"},Ni={class:"field"},Li={class:"field"},$i={class:"field"},Fi={class:"field"},Hi={class:"field checkbox-field"};var Bi=a({__name:"users-view",setup(e){const t=Ce(),{loading:n,saving:o,hasEdits:i,roleOptions:r,policyOptions:a,usersOwnRoleItems:C,usersOwnRoleEditing:A,usersOwnRoleDraft:O,configuredUsersRoles:D,availableUsersRoleOptions:I,usersRoleEditingId:R,usersRoleDraft:T,usersRoleSaveDisabled:P,usersOwnRoleSummary:M,hasUsersRoleRule:V,usersRoleRuleSummary:j,editUsersOwnRole:U,closeUsersOwnRoleEditor:N,onUsersOwnRoleDrawerToggle:L,saveUsersOwnRole:$,removeUsersOwnRole:F,openUsersRoleEditor:H,closeUsersRoleEditor:B,onUsersRoleDrawerToggle:q,saveUsersRoleRule:z,clearUsersRoleRule:X,removeUsersRoleRule:Y,ensureLoaded:W,save:G}=ke();return f(()=>{W()}),(e,f)=>{const W=l("v-breadcrumb"),K=l("v-icon"),J=l("v-button"),Q=l("sidebar-detail"),Z=l("v-progress-circular"),ee=l("v-divider"),te=l("v-list-item"),ne=l("v-chip"),oe=l("v-select"),ie=l("v-drawer"),re=l("v-checkbox"),ae=l("private-view"),le=p("tooltip");return s(),c(ae,{title:"Users",icon:"people_alt"},{headline:d(()=>[u(W,{items:[{name:"Module Permissions",to:"/module-permissions/modules"}]})]),navigation:d(()=>[u(Te)]),actions:d(()=>[k((s(),c(J,{disabled:!h(i),loading:h(o),icon:"",rounded:"",onClick:h(G)},{default:d(()=>[u(K,{name:"check"})]),_:1},8,["disabled","loading","onClick"])),[[le,"Save",void 0,{bottom:!0}]])]),sidebar:d(()=>[u(Q,{icon:"info",title:"About",close:""},{default:d(()=>[...f[13]||(f[13]=[m("p",{class:"sidebar-text"}," Control the Users module’s role tree in Module Navigation. Admins are never affected. UI-only — not a security boundary. ",-1)])]),_:1})]),default:d(()=>[m("div",{class:v(h(t))},[h(n)?(s(),g("div",Ci,[u(Z,{indeterminate:""})])):(s(),g(b,{key:1},[f[19]||(f[19]=m("p",{class:"page-intro"}," Filter which roles appear in Users Module Navigation for matched roles/policies. ",-1)),u(ee,{class:"section-divider",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(K,{name:"person"})]),default:d(()=>[f[14]||(f[14]=w(" "+_("Own Role Only"),-1))]),_:1}),f[20]||(f[20]=m("p",{class:"section-intro"}," Matched users only see their own role (and parent roles) in the Users nav tree. First match wins; empty roles and policies = catch-all. ",-1)),u(h(So),{modelValue:h(C),"onUpdate:modelValue":f[2]||(f[2]=e=>E(C)?C.value=e:null),"item-key":"id",handle:".drag-handle",animation:150,class:"list"},{item:d(({element:e})=>[u(te,{block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(U)(e.id)},{default:d(()=>[u(K,{class:"drag-handle",name:"drag_handle",onClick:f[0]||(f[0]=S(()=>{},["stop"]))}),u(K,{class:"icon",name:"person"}),m("div",Ai,[f[15]||(f[15]=m("div",{class:"name"},"Own role only",-1)),m("div",Oi,_(h(M)(e)),1)]),m("div",{class:"row-actions",onClick:f[1]||(f[1]=S(()=>{},["stop"]))},[u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(U)(e.id)},{default:d(()=>[u(K,{name:"edit"})]),_:1},8,["onClick"]),u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(F)(e.id)},{default:d(()=>[u(K,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"])]),_:1},8,["modelValue"]),u(J,{class:"add-link",onClick:f[3]||(f[3]=e=>h(U)("+"))},{default:d(()=>[...f[16]||(f[16]=[w("Add Own-Role Rule",-1)])]),_:1}),u(ee,{class:"section-divider add-margin-top",large:"",style:{"--v-divider-color":"var(--theme--border-color-subdued)"}},{icon:d(()=>[u(K,{name:"badge"})]),default:d(()=>[f[17]||(f[17]=w(" "+_("Role Visibility"),-1))]),_:1}),f[21]||(f[21]=m("p",{class:"section-intro"},[w(" Hide or show specific roles in the Users nav tree for matched roles/policies. Applied after own-role filtering. Optional deep-link blocking covers "),m("code",null,"/users/roles/<id>"),w(". ")],-1)),0===h(D).length?(s(),g("div",Di,"No role visibility rules yet.")):(s(),g("div",Ii,[(s(!0),g(b,null,y(h(D),e=>(s(),c(te,{key:e.id,block:"",dense:"",clickable:"",class:"module-row enabled",onClick:t=>h(H)(e.id)},{default:d(()=>[u(K,{class:"icon",name:"badge"}),m("div",Ri,[m("div",Ti,[w(_(e.name)+" ",1),h(V)(e.id)?(s(),c(ne,{key:0,"x-small":"",class:"rule-chip"},{default:d(()=>[w(_(h(j)(e.id)),1)]),_:2},1024)):x("v-if",!0)]),m("div",Pi,"/users/roles/"+_(e.id),1)]),m("div",{class:"row-actions",onClick:f[4]||(f[4]=S(()=>{},["stop"]))},[u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(H)(e.id)},{default:d(()=>[u(K,{name:"policy"})]),_:1},8,["onClick"]),u(J,{icon:"","x-small":"",secondary:"",onClick:t=>h(Y)(e.id)},{default:d(()=>[u(K,{name:"close"})]),_:1},8,["onClick"])])]),_:2},1032,["onClick"]))),128))])),u(J,{class:"add-link",onClick:f[5]||(f[5]=e=>h(H)("+"))},{default:d(()=>[...f[18]||(f[18]=[w("Add Role Rule",-1)])]),_:1})],64))],2),u(ie,{"model-value":null!==h(A),title:"Own Role Only",icon:"person","onUpdate:modelValue":h(L),onCancel:h(N)},{actions:d(()=>[k((s(),c(J,{icon:"",rounded:"",onClick:h($)},{default:d(()=>[u(K,{name:"check"})]),_:1},8,["onClick"])),[[le,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(O)?(s(),g("div",Mi,[f[24]||(f[24]=m("p",{class:"hint"},"Leave roles and policies empty for a catch-all (place last).",-1)),m("div",Vi,[f[22]||(f[22]=m("label",null,"Roles",-1)),u(oe,{modelValue:h(O).roles,"onUpdate:modelValue":f[6]||(f[6]=e=>h(O).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles (optional)"},null,8,["modelValue","items"])]),m("div",ji,[f[23]||(f[23]=m("label",null,"Policies",-1)),u(oe,{modelValue:h(O).policies,"onUpdate:modelValue":f[7]||(f[7]=e=>h(O).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies (optional)"},null,8,["modelValue","items"])])])):x("v-if",!0)]),_:1},8,["model-value","onUpdate:modelValue","onCancel"]),u(ie,{"model-value":null!==h(R),title:"+"===h(R)?"Add Role Rule":"Role Visibility",icon:"policy","onUpdate:modelValue":h(q),onCancel:h(B)},{actions:d(()=>[k((s(),c(J,{disabled:h(P),icon:"",rounded:"",onClick:h(z)},{default:d(()=>[u(K,{name:"check"})]),_:1},8,["disabled","onClick"])),[[le,"Apply",void 0,{bottom:!0}]])]),default:d(()=>[h(T)?(s(),g("div",Ui,[f[30]||(f[30]=m("p",{class:"hint"},"Pick a role and at least one matching role or policy.",-1)),m("div",Ni,[f[25]||(f[25]=m("label",null,"Role to control",-1)),u(oe,{modelValue:h(T).id,"onUpdate:modelValue":f[8]||(f[8]=e=>h(T).id=e),items:h(I),"item-text":"text","item-value":"value",disabled:"+"!==h(R),placeholder:"Select role"},null,8,["modelValue","items","disabled"])]),m("div",Li,[f[26]||(f[26]=m("label",null,"Visibility",-1)),u(oe,{modelValue:h(T).visibility,"onUpdate:modelValue":f[9]||(f[9]=e=>h(T).visibility=e),items:[{text:"Hide for matched roles/policies",value:"hide"},{text:"Show only for matched roles/policies",value:"show"}]},null,8,["modelValue"])]),m("div",$i,[f[27]||(f[27]=m("label",null,"Roles",-1)),u(oe,{modelValue:h(T).roles,"onUpdate:modelValue":f[10]||(f[10]=e=>h(T).roles=e),multiple:"",items:h(r),"item-text":"text","item-value":"value",placeholder:"Select roles"},null,8,["modelValue","items"])]),m("div",Fi,[f[28]||(f[28]=m("label",null,"Policies",-1)),u(oe,{modelValue:h(T).policies,"onUpdate:modelValue":f[11]||(f[11]=e=>h(T).policies=e),multiple:"",items:h(a),"item-text":"text","item-value":"value",placeholder:"Select policies"},null,8,["modelValue","items"])]),m("div",Hi,[u(re,{modelValue:h(T).block_routes,"onUpdate:modelValue":f[12]||(f[12]=e=>h(T).block_routes=e),label:"Block deep links to /users/roles/<id> when this rule hides it"},null,8,["modelValue"])]),h(R)&&"+"!==h(R)&&h(V)(h(R))?(s(),c(J,{key:0,secondary:"",onClick:h(X)},{default:d(()=>[...f[29]||(f[29]=[w(" Remove rule ",-1)])]),_:1},8,["onClick"])):x("v-if",!0)])):x("v-if",!0)]),_:1},8,["model-value","title","onUpdate:modelValue","onCancel"])]),_:1})}}});Ie("\n.page[data-v-d30b3b46] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tmax-width: 720px;\n}\n.page--flush-top[data-v-d30b3b46] {\n\tpadding-block-start: 0;\n}\n.loading[data-v-d30b3b46] {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 4rem;\n}\n.page-intro[data-v-d30b3b46],\n.section-intro[data-v-d30b3b46] {\n\tmargin: 0 0 24px;\n\tline-height: 1.55;\n\tcolor: var(--theme--foreground);\n}\n.section-intro[data-v-d30b3b46] {\n\tmargin-bottom: 16px;\n}\n.section-divider[data-v-d30b3b46] {\n\tmargin-bottom: 12px;\n}\n.section-divider.add-margin-top[data-v-d30b3b46] {\n\tmargin-top: 40px;\n}\n.list[data-v-d30b3b46] {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 12px;\n\tpadding: 0;\n}\n.module-row.enabled[data-v-d30b3b46] {\n\t--v-list-item-color: var(--theme--foreground);\n}\n.drag-handle[data-v-d30b3b46] {\n\tcursor: grab;\n\tmargin-inline-end: 4px;\n\tcolor: var(--theme--foreground-subdued);\n}\n.icon[data-v-d30b3b46] {\n\tmargin: 0 0.6875rem;\n}\n.info[data-v-d30b3b46] {\n\tflex: 1;\n\tmin-width: 0;\n}\n.name[data-v-d30b3b46] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-weight: 600;\n}\n.to[data-v-d30b3b46] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 12px;\n\topacity: 0.75;\n}\n.rule-chip[data-v-d30b3b46] {\n\tmargin-inline-start: 4px;\n}\n.row-actions[data-v-d30b3b46] {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n}\n.add-link[data-v-d30b3b46] {\n\tmargin-top: 4px;\n}\n.empty[data-v-d30b3b46] {\n\tmargin-bottom: 12px;\n\tcolor: var(--theme--foreground);\n}\n.drawer-content[data-v-d30b3b46] {\n\tpadding: var(--content-padding);\n\tpadding-block-end: var(--content-padding-bottom);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n.field label[data-v-d30b3b46] {\n\tdisplay: block;\n\tmargin-bottom: 8px;\n\tfont-weight: 600;\n}\n.checkbox-field[data-v-d30b3b46] {\n\tpadding-top: 4px;\n}\n.hint[data-v-d30b3b46],\n.sidebar-text[data-v-d30b3b46] {\n\tmargin: 0;\n\tline-height: 1.5;\n\tcolor: var(--theme--foreground);\n}\n.hint code[data-v-d30b3b46],\n.sidebar-text code[data-v-d30b3b46],\n.section-intro code[data-v-d30b3b46] {\n\tfont-family: var(--theme--fonts--monospace--font-family, monospace);\n\tfont-size: 0.9em;\n}\n",{});var qi=Re(Bi,[["__scopeId","data-v-d30b3b46"]]);const zi="__modulePermissionsRouteGuardInstalled",Xi="mp_home_applied";function Yi(e,t){try{const n=e?._s?.get?.(t);return n||null}catch{return null}}function Wi(e){const t=Yi(e,"userStore");return H(t?.currentUser)}function Gi(e){const t=Yi(e,"settingsStore");return M(t?.settings?.[A])}function Ki(){try{"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(Xi)}catch{}}function Ji(){try{"undefined"!=typeof sessionStorage&&sessionStorage.setItem(Xi,"1")}catch{}}function Qi(e){const t=Yi(e,"settingsStore"),n=t?.settings;if(!n)return new Set;const o=M(n[A]);if(Array.isArray(o.blocked_ids)&&o.blocked_ids.length>0)return new Set(o.blocked_ids.map(String));const i=n.module_bar,r=Yi(e,"userStore"),a=r?.currentUser?.role,l="string"==typeof a?a:a?.id,s=l?[String(l)]:[];return new Set(function(e,t,n){if(!Array.isArray(e))return[];const o=M(t).rules,i=new Map(o.map(e=>[e.id,e])),r=[];for(const t of e){const e=i.get(t.id);j(e,n)&&(e&&!1===e.block_routes||r.push(t.id))}return r}(i,o,{roleIds:s,policyIds:[]}))}function Zi(e){const t=Gi(e);return"string"==typeof t.home_path?R(t.home_path):(t.home_path,null)}function er(e,t,n,o){const i=Yi(e,"settingsStore"),r=i?.settings?.module_bar,a=function(e){const t=e.blocked instanceof Set?e.blocked:new Set(e.blocked),n=e.blockedCollections instanceof Set?e.blockedCollections:new Set(e.blockedCollections||[]),o=R(e.fromPath),i=o?N(o):null,r=new Set,a=[],l=e=>{const l=R(e);if(!l)return;if(r.has(l))return;if(o&&l===o)return;if(U(l,t))return;const s=L(l);if(s&&n.has(s))return;const c=N(l);i&&c&&c===i&&t.has(i)||(r.add(l),a.push(l))};if(l(e.homePath),Array.isArray(e.moduleBar))for(const n of e.moduleBar)"module"===n.type&&n.enabled&&"module-permissions"!==n.id&&(t.has(n.id)||l(`/${n.id}`));return r.has("/")||a.push("/"),a}({homePath:Zi(e),moduleBar:r,blocked:t,blockedCollections:n,fromPath:o});return a[0]||"/"}function tr(e,t,n,o,i){if(function(){try{return"undefined"!=typeof sessionStorage&&"1"===sessionStorage.getItem(Xi)}catch{return!1}}())return!1;if(Wi(t))return!1;const r=Yi(t,"userStore"),a=r?.currentUser;if(!a)return!1;const l=Zi(t),s=function(e){return!0===Gi(e).home_force}(t),c=R(a.last_page),d=R(e.path);if(!l)return!1;if(function(e){const t=e?.query?.redirect;return!("string"!=typeof t||!t.trim())||!(!Array.isArray(t)||!t.some(e=>"string"==typeof e&&e.trim()))}(e))return Ji(),!1;if(!s){if(c)return Ji(),!1;if(!function(e){const t=R(e);return"/"===t||"/content"===t}(e.path))return!1}const u=l;if(!u||u===d)return Ji(),!1;if(U(u,n))return Ji(),!1;const f=L(u);return f&&o.has(f)?(Ji(),!1):(Ji(),i(u),!0)}function nr(e,t,n,o,i,r){if(i.value>=4)return i.value=0,void("/"===R(e)?r():r("/"));const a=er(t,n,o,e),l=R(e),s=R(a);return s&&s!==l?"/"===s&&"/"===l?(i.value=0,void r()):(i.value+=1,void r(s)):(i.value=0,void("/"===l?r():r("/")))}const or="__modulePermissionsSidebarEnforcerInstalled",ir="mp-sidebar-enforcer-styles",rr="mp-sidebar-hidden",ar="data-mp-sidebar-panel-hidden",lr="data-mp-sidebar-chrome-hidden",sr=new Map(O.map(e=>[e.id,e.icon]));function cr(e,t){try{const n=e?._s?.get?.(t);return n||null}catch{return null}}function dr(e){const t=cr(e,"userStore");return H(t?.currentUser)}function ur(e){const t=cr(e,"settingsStore");return M(t?.settings?.[A])}function fr(e){const t=ur(e);return"collapsed"===t.sidebar_mode||"hidden"===t.sidebar_mode?t.sidebar_mode:"default"}function pr(){let e=document.getElementById(ir);return e||(e=document.createElement("style"),e.id=ir,document.head.appendChild(e),e)}function mr(){document.querySelectorAll(`[${lr}]`).forEach(e=>{e.removeAttribute(lr)})}function vr(){mr();const e=document.querySelector("#sidebar")||document.querySelector("#sidebar-desktop-outlet")||document.querySelector(".sidebar-outlet:has(#sidebar)");if(!(e instanceof HTMLElement))return;const t=e.closest(".sp-end");if(!(t instanceof HTMLElement))return;t.setAttribute(lr,"");const n=t.previousElementSibling;n instanceof HTMLElement&&n.classList.contains("sp-divider")&&n.setAttribute(lr,"")}function hr(e){const t=cr(e,"sidebar-store");try{t?.collapse?.()}catch{}const n=cr(e,"appStore");try{n&&"sidebarOpen"in n&&(n.sidebarOpen=!1)}catch{}}function gr(e,t){e&&e instanceof HTMLElement&&(e.setAttribute(ar,t),e.style.display="none")}function br(e){const t=e.querySelector?.(".material-icons, .material-symbols-outlined, .material-symbols-rounded");if(t?.textContent){const e=t.textContent.trim();if(e)return e}const n=e.querySelector?.("[data-icon], [aria-label]"),o=n?.getAttribute("data-icon")||n?.getAttribute("aria-label");if(o)return o.trim();const i=e.classList?.contains("v-icon")?e:e.querySelector?.(".v-icon");if(i?.textContent){const e=i.textContent.trim();if(e&&e.length<64&&!e.includes("\n"))return e}return null}function yr(e,t){const n=document.querySelector("#sidebar");if(!n)return;n.querySelectorAll(".toggle, button.accordion-trigger, .sidebar-detail > button").forEach(n=>{if(br(n)!==t)return;gr(n,e);let o=n.nextElementSibling;for(;o&&!(o.classList.contains("toggle")||o.classList.contains("accordion-item")||o.classList.contains("accordion-trigger"));)(o.classList.contains("content")||o.classList.contains("scroll-container")||o.classList.contains("accordion-content")||o instanceof HTMLElement&&o.getAttribute("data-state"))&&gr(o,e),o=o.nextElementSibling;const i=n.closest(".sidebar-detail");i&&i!==n&&gr(i,e)})}function wr(e){"activity"===e&&(document.querySelectorAll("#sidebar .notifications-preview").forEach(t=>{gr(t,e)}),document.querySelectorAll("#sidebar .sidebar-button, #sidebar button.sidebar-button").forEach(t=>{if("pending_actions"!==br(t))return;gr(t.closest(".notifications-preview")||t,e)}))}function _r(e){if(dr(e))return pr().textContent="",document.documentElement.classList.remove(rr),mr(),void document.querySelectorAll(`[${ar}]`).forEach(e=>{e.removeAttribute(ar),e.style.removeProperty("display")});const t=function(e){const t=ur(e);return Array.isArray(t.sidebar_hidden_panels)?t.sidebar_hidden_panels.map(String):[]}(e),n=fr(e);pr().textContent=`${function(e){if(!e.length)return"";const t=[];for(const n of e){const e=CSS.escape(n);t.push(`.accordion-item:has(#${e}) { display: none !important; }`),t.push(`.accordion-item[data-value="${e}"] { display: none !important; }`),t.push(`.accordion-section:has(#${e}) { display: none !important; }`),t.push(`.v-list-group:has(#${e}) { display: none !important; }`),t.push(`[${ar}="${e}"] { display: none !important; }`),"activity"===n&&t.push("#sidebar .notifications-preview { display: none !important; }")}return t.join("\n")}(t)}\n${function(e){return"hidden"!==e?"":`\nhtml.${rr} #sidebar,\nhtml.${rr} #sidebar-desktop-outlet,\nhtml.${rr} .sidebar-outlet:has(#sidebar),\nhtml.${rr} .sp-end[${lr}],\nhtml.${rr} .sp-divider[${lr}] {\n\tdisplay: none !important;\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\tmax-width: 0 !important;\n\tinline-size: 0 !important;\n\tflex-basis: 0 !important;\n\tflex-grow: 0 !important;\n\tflex-shrink: 0 !important;\n\toverflow: hidden !important;\n\tpointer-events: none !important;\n\tborder: none !important;\n\ttransform: none !important;\n}\n\nhtml.${rr} .main-split:has(.sp-end[${lr}]),\nhtml.${rr} .main-split:has(#sidebar),\nhtml.${rr} .main-split:has(#sidebar-desktop-outlet) {\n\tgrid-template-columns: minmax(0, 1fr) 0px 0px !important;\n}\n\n/* Clear the collapsed-rail content offset (Directus ≤11.13 / 11.7.x). */\nhtml.${rr} .private-view #main-content,\nhtml.${rr} #main-content {\n\tmargin-right: 0 !important;\n}\n\nhtml.${rr} .sidebar-button,\nhtml.${rr} button.sidebar-toggle,\nhtml.${rr} .header-bar .sidebar-toggle,\nhtml.${rr} [data-sidebar-toggle] {\n\tdisplay: none !important;\n}\n`.trim()}(n)}`,function(e){const t=new Set(e);document.querySelectorAll(`[${ar}]`).forEach(e=>{const n=e.getAttribute(ar);n&&t.has(n)||(e.removeAttribute(ar),e.style.removeProperty("display"))});for(const t of e){const e=document.getElementById(t)||document.querySelector(`.accordion-item[data-value="${CSS.escape(t)}"]`);e&&gr(e.closest(".accordion-item")||e.closest(".accordion-section")||e.closest(".v-list-group")||(e.classList?.contains("accordion-item")?e:null)||e.parentElement,t);const n=sr.get(t)||null;n&&yr(t,n),wr(t)}}(t),function(e,t){const n=document.documentElement;if("hidden"===t)return n.classList.add(rr),vr(),void hr(e);n.classList.remove(rr),mr(),"collapsed"===t&&hr(e)}(e,n)}const xr="__modulePermissionsUsersNavEnforcerInstalled",Sr="mp-users-nav-enforcer-styles",kr="data-mp-module-nav-hidden",Er="data-mp-users-role-hidden",Cr=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ar(e,t){try{const n=e?._s?.get?.(t);return n||null}catch{return null}}function Or(e){const t=Ar(e,"userStore");return H(t?.currentUser)}function Dr(e){const t=Ar(e,"settingsStore");return M(t?.settings?.[A])}function Ir(){let e=document.getElementById(Sr);return e||(e=document.createElement("style"),e.id=Sr,document.head.appendChild(e),e)}function Rr(){document.documentElement.classList.remove("mp-module-nav-hidden"),document.querySelectorAll(`[${kr}]`).forEach(e=>{e.removeAttribute(kr)})}let Tr=!1;function Pr(e){if(Tr){Tr=!1;try{const t=Ar(e,"nav-bar-store");if(!t)return;"function"==typeof t.expand?t.expand():"collapsed"in t&&(t.collapsed=!1)}catch{}}}function Mr(e,t){const n=Dr(e),o=new Set((n.navigation_hidden_modules||[]).map(String)),i=N(t);Ir().textContent=`\naside[${kr}],\n#module-navigation[${kr}],\n.module-nav[${kr}],\n.mobile-nav[${kr}],\n.resize-wrapper[${kr}],\n.sp-start[${kr}],\n.sp-divider[${kr}] {\n\tdisplay: none !important;\n\twidth: 0 !important;\n\tmin-width: 0 !important;\n\tmax-width: 0 !important;\n\tinline-size: 0 !important;\n\tmin-inline-size: 0 !important;\n\tmax-inline-size: 0 !important;\n\tflex: 0 0 0 !important;\n\toverflow: hidden !important;\n\tpointer-events: none !important;\n\tborder: none !important;\n}\n\n/* Free the SplitPanel start track (11.17+ / 12). Scoped --*-gridTemplate alone\n still reserves space; override the resolved grid template. */\n.root-split:has(.sp-start[${kr}]),\n.root-split:has(.sp-start [${kr}]) {\n\tgrid-template-columns: 0px 0px minmax(0, 1fr) !important;\n}\n`.trim(),Rr();if(!Boolean(i&&o.has(i)))return void Pr(e);const r=function(){const e=[],t=t=>{t instanceof HTMLElement&&!e.includes(t)&&e.push(t)};document.querySelectorAll("aside.module-nav, #module-navigation, .mobile-nav.module-nav").forEach(e=>{"navigation"===e.id&&e.querySelector(":scope > .module-bar, :scope > .resize-wrapper")||t(e)});const n=document.querySelector("#navigation");if(n){const e=n.querySelector(":scope > .resize-wrapper")||n.querySelector(":scope > .v-resizeable");e instanceof HTMLElement&&e.querySelector(".module-nav")?t(e):n.querySelectorAll(".module-nav").forEach(e=>{if(!(e instanceof HTMLElement))return;if(e.closest(".module-bar"))return;const n=e.parentElement;n?.classList.contains("resize-wrapper")?t(n):t(e)})}return e}();for(const e of r)e.setAttribute(kr,"");!function(e){for(const t of e){const e=t.closest(".sp-start");if(!(e instanceof HTMLElement))continue;if(!e.querySelector("aside.module-nav, #module-navigation, .module-nav"))continue;e.setAttribute(kr,"");const n=e.nextElementSibling;n instanceof HTMLElement&&n.classList.contains("sp-divider")&&n.setAttribute(kr,"")}}(r),function(e){try{const t=Ar(e,"nav-bar-store");if(!t)return;if(!("boolean"==typeof t.collapsed?t.collapsed:Boolean(t.collapsed?.value)))return"function"==typeof t.collapse?t.collapse():"collapsed"in t&&(t.collapsed=!0),void(Tr=!0);"function"==typeof t.collapse&&t.collapse()}catch{}}(e),function(e){const t=new Set;for(const n of e){const e=n.closest(".sp-start");if(!(e instanceof HTMLElement))continue;if(!e.querySelector("aside.module-nav, #module-navigation, .module-nav"))continue;const o=e.closest(".sp-root.root-split, .root-split.sp-root, .root-split");o&&t.add(o)}for(const e of t){const t=[];for(let n=0;n<e.style.length;n++){const o=e.style.item(n);o&&(o.endsWith("gridTemplate")||o.endsWith("-gridTemplate"))&&t.push(o)}for(const n of t)e.style.setProperty(n,"0px 0px minmax(0, 1fr)")}}(r)}function Vr(e,t){const n=Dr(e),o=!0===n.users_own_role_only,i=new Set((n.users_allowed_role_ids||[]).map(String)),r=new Set((n.users_hidden_role_ids||[]).map(String));if(document.querySelectorAll(`[${Er}]`).forEach(e=>{e.removeAttribute(Er),e.style.removeProperty("display")}),!o&&0===r.size)return;const a=document.querySelector("#module-navigation")||document.querySelector("#navigation .module-nav-content")||document.querySelector("aside.module-nav .module-nav-content")||document.querySelector(".module-nav-content")||document.querySelector("aside.module-nav");if(!a)return;const l=new Set,s=(e,t)=>{e&&t&&!l.has(t)&&function(e,t,n,o){return!!o.has(e)||!(!t||n.has(e))}(e,o,i,r)&&(!function(e,t){e.setAttribute(Er,t),e.style.display="none"}(t,e),l.add(t))};a.querySelectorAll('a[href*="/users/roles/"]').forEach(e=>{const t=function(e){if(!e)return null;try{const t=(new URL(e,window.location.origin).pathname.replace(/^\/admin/,"")||"/").split("/").filter(Boolean);return"users"!==t[0]||"roles"!==t[1]?null:t[2]&&"+"!==t[2]?t[2]:null}catch{const t=e.match(/\/users\/roles\/([^/?#]+)/);return t?.[1]&&"+"!==t[1]?t[1]:null}}(e.getAttribute("href")),n=e.closest(".v-list-item")||e.closest(".v-list-group")||e;s(t,n)}),a.querySelectorAll("[data-value], [data-role], [data-role-id], [data-id]").forEach(e=>{const t=e,n=[t.getAttribute("data-value"),t.getAttribute("data-role"),t.getAttribute("data-role-id"),t.getAttribute("data-id")];for(const e of n){if(!e||!Cr.test(e))continue;const n=t.closest(".v-list-group")||t.closest(".v-list-item")||t;s(e,n);break}});const c=(String(t||"").replace(/^\/admin/,"")||"/").match(/^\/users\/roles\/([^/?#]+)/),d=c?.[1]&&"+"!==c[1]?c[1]:null;if(r.size>0||o&&i.size>0){a.querySelectorAll(".v-list-group > .v-list-item.clickable, .v-list-item.clickable, .v-list-group.clickable").forEach(e=>{const t=e;if(l.has(t)||t.hasAttribute(Er))return;const n=(t.textContent||"").trim().toLowerCase();if("active users"===n||"suspended users"===n||"invited users"===n||"all users"===n||n.startsWith("active users")||n.startsWith("suspended")||n.startsWith("invited")||n.startsWith("all users"))return;(t.classList.contains("active")||"page"===t.getAttribute("aria-current"))&&d&&s(d,t)})}}function jr(e){if(window.__mpRolesClientFilterInstalled)return;window.__mpRolesClientFilterInstalled=!0;const t=XMLHttpRequest.prototype,n=t.open,o=t.send,i=Object.getOwnPropertyDescriptor(t,"responseText"),r=Object.getOwnPropertyDescriptor(t,"response"),a=i?.get,l=r?.get;a&&(t.open=function(e,t,...o){return this.__mpRolesUrl="string"==typeof t?t:String(t),this.__mpRolesMethod=e,n.call(this,e,t,...o)},t.send=function(...t){const n=String(this.__mpRolesUrl||"");if("GET"===String(this.__mpRolesMethod||"GET").toUpperCase()&&function(e){try{const t=new URL(e,window.location.origin).pathname.replace(/\/$/,"");return/\/roles$/.test(t)&&!/\/roles\//.test(t)}catch{return/\/roles(\?|$)/.test(e)&&!/\/roles\//.test(e)}}(n)){let t=null;Object.defineProperty(this,"responseText",{configurable:!0,enumerable:!0,get:()=>{const n=a.call(this);if(4!==this.readyState)return n;if(null!=t)return t;if(this.status<200||this.status>=300||!n)return t=n,n;try{const o=JSON.parse(n),i=function(e,t){if(Or(t))return e;if(!e||!Array.isArray(e.data))return e;const n=Dr(t),o=!0===n.users_own_role_only,i=new Set((n.users_allowed_role_ids||[]).map(String)),r=new Set((n.users_hidden_role_ids||[]).map(String));if(!o&&0===r.size)return e;const a=e.data.filter(e=>{const t=null!=e?.id?String(e.id):"";return!t||!r.has(t)&&!(o&&!i.has(t))}),l=new Set(a.map(e=>String(e.id)));return{...e,data:a.map(e=>{const t=e?.parent;return null==t||""===t||l.has(String(t))?e:{...e,parent:null}})}}(o,e);t=i===o?n:JSON.stringify(i)}catch{t=n}return t}}),l&&Object.defineProperty(this,"response",{configurable:!0,enumerable:!0,get:()=>{const e=this.responseType;return e&&"text"!==e&&""!==e?l.call(this):this.responseText}})}return o.apply(this,t)})}!function(){if("undefined"==typeof window)return;if(window[zi])return;const e=Date.now(),t={value:0},n=window.setInterval(()=>{const o=document.querySelector("#app"),i=o?.__vue_app__,r=i?.config?.globalProperties?.$router,a=function(e){return e?.config?.globalProperties?.$pinia||null}(i);i&&r&&a?(window.clearInterval(n),window[zi]=!0,r.beforeEach((e,n,o)=>{try{if(function(e){const t=R(e)||"";return"/login"===t||t.startsWith("/login/")}(e.path))return Ki(),t.value=0,void o();if(Wi(a))return t.value=0,void o();const n=Yi(a,"userStore");if(!n?.currentUser)return Ki(),t.value=0,void o();const i=Qi(a),r=function(e){const t=Gi(e);return Array.isArray(t.blocked_collection_ids)?new Set(t.blocked_collection_ids.map(String)):new Set}(a),l=function(e){const t=Gi(e),n=new Set;if(Array.isArray(t.users_blocked_role_ids))for(const e of t.users_blocked_role_ids)n.add(String(e));if(!0===t.users_own_role_only){const n=new Set((t.users_allowed_role_ids||[]).map(String));e.__mpUsersAllowedRoles=n}else e.__mpUsersAllowedRoles=null;return n}(a);if(tr(e,a,i,r,o))return void(t.value=0);const s=L(e.path);if(s&&r.has(s))return void nr(e.path,a,i,r,t,o);const c=function(e){const t=R(e);if(!t)return null;const n=t.split("/").filter(Boolean);return"users"!==n[0]||"roles"!==n[1]?null:n[2]&&"+"!==n[2]?n[2]:null}(e.path);if(c&&function(e,t,n){if(n.has(t))return!0;const o=e.__mpUsersAllowedRoles;return!(!o||o.has(t))}(a,c,l))return void nr(e.path,a,i,r,t,o);const d=N(e.path);if(!d)return t.value=0,void o();if("module-permissions"===d)return t.value=0,void o();if(!i.has(d))return t.value=0,void o();nr(e.path,a,i,r,t,o)}catch{t.value=0,o()}}),r.afterEach(()=>{t.value=0})):Date.now()-e>45e3&&window.clearInterval(n)},150)}(),function(){if("undefined"==typeof window)return;if(window[or])return;const e=Date.now(),t=window.setInterval(()=>{const n=document.querySelector("#app"),o=n?.__vue_app__,i=o?.config?.globalProperties?.$router,r=function(e){return e?.config?.globalProperties?.$pinia||null}(o);if(!o||!i||!r)return void(Date.now()-e>45e3&&window.clearInterval(t));window.clearInterval(t),window[or]=!0;let a=!1;const l=()=>{a||(a=!0,window.requestAnimationFrame(()=>{a=!1;try{_r(r)}catch{}}))};l(),i.afterEach(()=>{window.setTimeout(l,0),window.setTimeout(l,120),window.setTimeout(l,400)});const s=new MutationObserver(()=>{l()}),c=()=>{const e=document.querySelector("#sidebar")||document.body;s.observe(e,{childList:!0,subtree:!0})};c(),window.setInterval(c,5e3),window.setInterval(()=>{try{if(dr(r))return;const e=fr(r);"collapsed"!==e&&"hidden"!==e||hr(r),"hidden"===e&&vr()}catch{}},400)},150)}(),function(){if("undefined"==typeof window)return;if(window[xr])return;const e=Date.now(),t=window.setInterval(()=>{const n=document.querySelector("#app"),o=n?.__vue_app__,i=o?.config?.globalProperties?.$router,r=function(e){return e?.config?.globalProperties?.$pinia||null}(o);if(!o||!i||!r)return void(Date.now()-e>45e3&&window.clearInterval(t));window.clearInterval(t),window[xr]=!0,jr(r);let a=!1;const l=e=>{a||(a=!0,window.requestAnimationFrame(()=>{a=!1;try{const t=e||i.currentRoute?.value?.path||i.currentRoute?.path||window.location.pathname;!function(e,t){if(Or(e))return Rr(),Pr(e),document.querySelectorAll(`[${Er}]`).forEach(e=>{e.removeAttribute(Er),e.style.removeProperty("display")}),void(Ir().textContent="");Mr(e,t),"users"===N(t)&&Vr(e,t)}(r,String(t||"/"))}catch{}}))};l(),i.afterEach(e=>{window.setTimeout(()=>l(e.path),0),window.setTimeout(()=>l(e.path),120),window.setTimeout(()=>l(e.path),400)});const s=new MutationObserver(()=>l()),c=()=>{const e=document.querySelector("#module-navigation")||document.querySelector("aside.module-nav")||document.querySelector("#navigation .module-nav")||document.querySelector("#navigation")||document.body;s.observe(e,{childList:!0,subtree:!0})};c(),window.setInterval(c,5e3)},150)}();const Ur=[],Nr=[],Lr=[],$r=[n({id:"module-permissions",name:"Module Permissions",icon:"security",routes:[{path:"",redirect:"/module-permissions/modules"},{path:"modules",component:qo},{path:"navigation",redirect:"/module-permissions/modules"},{path:"sidebar",component:mi},{path:"content",component:Xe},{path:"collections",redirect:"/module-permissions/content"},{path:"users",component:qi},{path:"start-page",component:Ei},{path:"home-paths",redirect:"/module-permissions/start-page"},{path:"settings",component:Ko},{path:"cleanup",redirect:"/module-permissions/settings"}],preRegisterCheck:e=>H(e)})],Fr=[],Hr=[],Br=[];export{Nr as displays,Ur as interfaces,Lr as layouts,$r as modules,Br as operations,Fr as panels,Hr as themes};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "directus-extension-module-permissions",
|
|
3
3
|
"description": "Control Studio UI visibility for the module bar, Module Navigation, Content nav, Users role tree, Sidebar, and Start Page by role and policy",
|
|
4
4
|
"icon": "security",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"directus",
|