From b270eabe9031ee1fb73214b9c7c986f7f21bbe2a Mon Sep 17 00:00:00 2001 From: Marco Ambrosini Date: Tue, 22 Sep 2026 14:28:53 +0200 Subject: [PATCH 1/3] fix(teams): hide circles the user is not a member of The /circles endpoint returns visible/public circles (initiator: null) alongside the user's own circles. Filter them out so only member circles appear on the Teams home page. Assisted-by: ClaudeCode:claude-sonnet-4-6 Signed-off-by: Marco Ambrosini --- src/teams/api.spec.ts | 20 +++++++++++++++++++- src/teams/api.ts | 4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/teams/api.spec.ts b/src/teams/api.spec.ts index 6111f37c1..e5ce28792 100644 --- a/src/teams/api.spec.ts +++ b/src/teams/api.spec.ts @@ -32,7 +32,25 @@ vi.mock('./team-page/services/collaborationAutocompletion.js', () => ({ getSuggestions: vi.fn(), })) -const { createTeam } = await import('./api.ts') +const { createTeam, fetchTeams } = await import('./api.ts') + +describe('fetchTeams', () => { + it('drops circles the current user is not a member of', async () => { + const circles = [ + { id: 'team1', name: 'team1', displayName: 'Team One', population: 3, initiator: { level: 9 } }, + { id: 'visible1', name: 'visible1', displayName: 'Visible circle', population: 10, initiator: null }, + ] + vi.mocked(axios.get) + .mockResolvedValueOnce({ data: { ocs: { data: circles } } }) + .mockResolvedValueOnce({ data: { ocs: { data: [] } } }) + + const teams = await fetchTeams() + + expect(teams).toHaveLength(1) + expect(teams[0].id).toBe('team1') + expect(teams[0].myRole).toBe('owner') + }) +}) describe('createTeam', () => { beforeEach(() => { diff --git a/src/teams/api.ts b/src/teams/api.ts index 49deb596f..90bf1915f 100644 --- a/src/teams/api.ts +++ b/src/teams/api.ts @@ -48,7 +48,7 @@ interface RawCircle { displayName: string description?: string population?: number - initiator?: { level?: number } + initiator?: { level?: number } | null } /** Raw team as returned by the dashboard widget endpoint. */ @@ -148,7 +148,7 @@ export async function fetchTeams(): Promise { if (circlesRes.status === 'rejected') { throw circlesRes.reason } - const circles = circlesRes.value.data.ocs.data ?? [] + const circles = (circlesRes.value.data.ocs.data ?? []).filter((circle) => circle.initiator) // The dashboard only enriches each team with member/resource previews, so // treat a failure there as "no previews" rather than failing the whole page. From 997676c5532a83670f6fdba6774bfd11e8c91bf4 Mon Sep 17 00:00:00 2001 From: Peter Ringelmann Date: Tue, 22 Sep 2026 15:31:58 +0200 Subject: [PATCH 2/3] test(teams): cover the empty circles response in fetchTeams Signed-off-by: Peter Ringelmann --- src/teams/api.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/teams/api.spec.ts b/src/teams/api.spec.ts index e5ce28792..44e0609f2 100644 --- a/src/teams/api.spec.ts +++ b/src/teams/api.spec.ts @@ -50,6 +50,14 @@ describe('fetchTeams', () => { expect(teams[0].id).toBe('team1') expect(teams[0].myRole).toBe('owner') }) + + it('returns an empty list when the circles response carries no data', async () => { + vi.mocked(axios.get) + .mockResolvedValueOnce({ data: { ocs: {} } }) + .mockResolvedValueOnce({ data: { ocs: { data: [] } } }) + + await expect(fetchTeams()).resolves.toEqual([]) + }) }) describe('createTeam', () => { From 6410e26350e63b346e90f3bf282a11acd42fb703 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Thu, 1 Oct 2026 08:51:26 +0000 Subject: [PATCH 3/3] chore(assets): Recompile assets Signed-off-by: nextcloud-command --- js/{api-XzRA2j3B.chunk.mjs => api-BcnqSuh8.chunk.mjs} | 4 ++-- ...A2j3B.chunk.mjs.license => api-BcnqSuh8.chunk.mjs.license} | 0 js/{api-XzRA2j3B.chunk.mjs.map => api-BcnqSuh8.chunk.mjs.map} | 2 +- ...unk.mjs.map.license => api-BcnqSuh8.chunk.mjs.map.license} | 0 js/teams-main.mjs | 2 +- js/teams-settings-team-folders.mjs | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename js/{api-XzRA2j3B.chunk.mjs => api-BcnqSuh8.chunk.mjs} (83%) rename js/{api-XzRA2j3B.chunk.mjs.license => api-BcnqSuh8.chunk.mjs.license} (100%) rename js/{api-XzRA2j3B.chunk.mjs.map => api-BcnqSuh8.chunk.mjs.map} (53%) rename js/{api-XzRA2j3B.chunk.mjs.map.license => api-BcnqSuh8.chunk.mjs.map.license} (100%) diff --git a/js/api-XzRA2j3B.chunk.mjs b/js/api-BcnqSuh8.chunk.mjs similarity index 83% rename from js/api-XzRA2j3B.chunk.mjs rename to js/api-BcnqSuh8.chunk.mjs index 079474a4c..79f823768 100644 --- a/js/api-XzRA2j3B.chunk.mjs +++ b/js/api-BcnqSuh8.chunk.mjs @@ -1,3 +1,3 @@ import{u as ae,l as w,c as l,a as ie,e as Be,a6 as xe,a7 as Ne,m as se,r as Te,a8 as $e,a9 as Ae,b as Le}from"./logger-DOVfV50r.chunk.mjs";import{S as f,g as F,d as M,e as Re,r as Oe,F as Me}from"./NcSelect--kERLlBK-BrVdbhZm.chunk.mjs";import{_ as z,d as S,am as Se,an as Fe,ao as Ve,e as p,p as g,v as C,R as O,ap as De,aq as Pe,h as A,f as T,w as h,j as b,q as N,i as v,x as V,Z as He,s as D,a0 as Ue,M as je,K as ze,O as J,A as qe,ar as Ge,k as $,P as ee,C as d,b as re,F as ne,G as We,z as c,L as H,c as k,as as Ye,X as Je,at as Ze,r as Ke,au as Qe,a as te,I as Xe,D as q,ah as et,l as tt,V as L}from"./_plugin-vue_export-helper-CVDwI8el.chunk.mjs";import{b as at}from"./NcPasswordField-BFyzHTOO-CO4pt8cn.chunk.mjs";const it=S({__name:"NcFormBox",props:{row:{type:Boolean}},setup(e){const a=Se();return Fe(Ve,{isInFormBox:!0,formBoxItemClass:a.ncFormBox__item}),(i,r)=>(p(),g("div",{class:O([i.$style.ncFormBox,e.row?i.$style.ncFormBox_row:i.$style.ncFormBox_col])},[C(i.$slots,"default",{itemClass:i.$style.ncFormBox__item})],2))}}),st="_ncFormBox_s7kf-",rt="_ncFormBox_row_GzYuE",nt="_ncFormBox__item_691pI",ct="_ncFormBox_col_Lt4lg",ot={"material-design-icon":"_material-design-icon_JPsV1",ncFormBox:st,ncFormBox_row:rt,ncFormBox__item:nt,ncFormBox_col:ct},lt={$style:ot},ce=z(it,[["__cssModules",lt]]),dt=["id"],ut=S({inheritAttrs:!1,__name:"NcFormBoxItem",props:{tag:{},label:{default:()=>{}},description:{default:()=>{}},invertedAccent:{type:Boolean,default:!1},class:{default:()=>{}},itemClasses:{default:()=>{}}},emits:["click"],setup(e){const a=De(),{formBoxItemClass:i}=Pe(),r=ae(),u=()=>!!e.description||!!a.description;return(s,n)=>(p(),g("div",{class:O([e.class,s.$style.formBoxItem,b(i),{[s.$style.formBoxItem_inverted]:e.invertedAccent&&u(),[s.$style.formBoxItem_legacy]:b(Ue)}])},[A("span",{class:O(s.$style.formBoxItem__content)},[(p(),T(He(e.tag),V({class:[s.$style.formBoxItem__element,e.itemClasses]},s.$attrs,{onClick:n[0]||(n[0]=m=>s.$emit("click",m))}),{default:h(()=>[C(s.$slots,"default",{descriptionId:b(r)},()=>[N(v(e.label||"⚠️ Label is missing"),1)])]),_:3},16,["class"])),u()?(p(),g("span",{key:0,id:b(r),class:O(s.$style.formBoxItem__description)},[C(s.$slots,"description",{},()=>[N(v(e.description),1)])],10,dt)):D("",!0)],2),A("span",{class:O(s.$style.formBoxItem__icon)},[C(s.$slots,"icon",{descriptionId:b(r)},()=>[n[1]||(n[1]=N(" ⚠️ Icon is missing ",-1))])],2)],2))}}),mt="_formBoxItem_Gp-TA",pt="_formBoxItem__description_UqZJ1",ft="_formBoxItem_legacy_dP9aJ",ht="_formBoxItem_inverted_BU-i-",yt="_formBoxItem__element_jHCux",bt="_formBoxItem__content_UKovC",gt="_formBoxItem__icon_AvkP3",_t={"material-design-icon":"_material-design-icon_8BFGk",formBoxItem:mt,formBoxItem__description:pt,formBoxItem_legacy:ft,formBoxItem_inverted:ht,formBoxItem__element:yt,formBoxItem__content:bt,formBoxItem__icon:gt},vt={$style:_t},oe=z(ut,[["__cssModules",vt]]),It=["id","aria-describedby","disabled"],wt=S({__name:"NcFormBoxSwitch",props:ee({label:{default:()=>{}},description:{default:()=>{}},disabled:{type:Boolean,default:!1}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:ee(["enable","disable"],["update:modelValue"]),setup(e,{emit:a}){const i=je(e,"modelValue"),r=a,u=ae();return ze(i,()=>{i.value?r("enable"):r("disable")},{flush:"sync"}),(s,n)=>(p(),T(oe,{tag:"label",for:b(u)},J({icon:h(({descriptionId:m})=>[qe(A("input",{id:b(u),"onUpdate:modelValue":n[0]||(n[0]=y=>i.value=y),class:O(s.$style.formBoxSwitch__input),type:"checkbox",role:"switch","aria-describedby":m,disabled:e.disabled},null,10,It),[[Ge,i.value]]),$(at,{checked:i.value,inline:""},null,8,["checked"])]),_:2},[s.$slots.default||e.label?{name:"default",fn:h(()=>[C(s.$slots,"default",{},()=>[N(v(e.label),1)])]),key:"0"}:void 0,s.$slots.description||e.description?{name:"description",fn:h(()=>[C(s.$slots,"description",{},()=>[N(v(e.description),1)])]),key:"1"}:void 0]),1032,["for"]))}}),Ct="_formBoxSwitch__input_n8432",Et={"material-design-icon":"_material-design-icon_v0XYD",formBoxSwitch__input:Ct},kt={$style:Et},Bt=z(wt,[["__cssModules",kt]]);class R{_data={};_circle;constructor(a,i){if(typeof a!="object")throw new Error("Invalid member");if(a.id&&typeof a.id!="string")throw w.error("This member do not have a proper uid",a),new Error("This member do not have a proper uid");this._circle=i,this._data=a}get circle(){return this._circle}set circle(a){if(a.constructor.name!==G.name)throw new Error("circle must be a Circle type");this._circle=a}get id(){return this._data.id}get singleId(){return this._data.singleId}get displayName(){return this._data.displayName}get userId(){return this._data.userId}get userType(){return this._data.userType!==Ce.CIRCLE?this._data.userType:this.basedOn.source}get basedOn(){return this._data.basedOn}get level(){return this._data.level}set level(a){if(!(a in x))throw new Error("Invalid level");this._data.level=a}get status(){return this._data.status}get isUser(){return this._data.userType===x.MEMBER}get isOrphan(){return this._circle?.constructor?.name!==G.name}delete(){if(this.isOrphan)throw new Error("Cannot delete this member as it doesn't belong to any circle");this.circle.deleteMember(this),this._data=void 0}}class G{_data={};_members={};_owner;_initiator;constructor(a){this.updateData(a)}updateData(a){if(typeof a!="object")throw new Error("Invalid circle");if(!a.id)throw new Error("This circle do not have a proper uid");this._data=a,this._owner=new R(a.owner,this),a.initiator&&(this._initiator=new R(a.initiator,this))}get id(){return this._data.id}get displayName(){return this._data.displayName}set displayName(a){this._data.displayName=a}get creation(){return this._data.creation}get description(){return this._data.description}set description(a){this._data.description=a}get population(){return this._data.population}get populationInherited(){return this._data.populationInherited}get initiator(){return this._initiator}set initiator(a){if(a&&a.constructor.name!==R.name)throw new Error("Initiator must be a Member type");this._initiator=a}get owner(){return this._owner}set owner(a){if(a.constructor.name!==R.name)throw new Error("Owner must be a Member type");this._owner=a}get members(){return this._members}set members(a){this._members=a}addMember(a){if(a.constructor.name!==R.name)throw new Error("Member must be a Member type");const i=a.singleId;this._members[i]&&w.warn("Replacing existing member data",{member:a}),this._members[i]=a}deleteMember(a){if(a.constructor.name!==R.name)throw new Error("Member must be a Member type");const i=a.singleId;this._members[i]||w.warn("The member was not in this circle. Nothing was done.",{member:a}),delete this._members[i]}get settings(){return this._data.settings}get config(){return this._data.config}set config(a){this._data.config=a}get isPersonal(){return(this._data.config&B.PERSONAL)!==0}get requireJoinAccept(){return(this._data.config&B.VISIBLE)!==0}get canJoin(){return(this._data.config&B.OPEN)!==0}get isVisible(){return(this._data.config&B.VISIBLE)!==0}get requireInviteAccept(){return(this._data.config&B.INVITE)!==0}get isOwner(){return this.initiator?.level===x.OWNER}get isAdmin(){return this.initiator?.level===x.ADMIN}get isMember(){return this.initiator?.level&&this.initiator?.level>x.NONE}get isPendingMember(){return this.initiator?.level===x.NONE}get canDelete(){return this.isOwner}get canLeave(){return this.isMember&&!this.isOwner}get canManageMembers(){return this.initiator?.level&&this.initiator?.level>=x.MODERATOR||(this.config&B.FRIEND)!==0}get router(){return{name:"team",params:{teamId:this.id}}}get invitationCode(){return this._data.invitationCode}set invitationCode(a){this._data.invitationCode=a}toString(){return this.displayName}}var le=(e=>(e.Name="name",e.Description="description",e.Settings="settings",e.Config="config",e))(le||{});async function $a(){return(await l.get(d("apps/circles/circles"))).data.ocs.data}async function Aa(e){return(await l.get(d("apps/circles/circles/{circleId}",{circleId:e}))).data.ocs.data}async function La(e,a,i){return(await l.post(d("apps/circles/circles"),{name:e,personal:a,local:i})).data.ocs.data}async function Ra(e){return(await l.delete(d("apps/circles/circles/{circleId}",{circleId:e}))).data.ocs.data}async function xt(e,a,i){return(await l.put(d("apps/circles/circles/{circleId}/{type}",{circleId:e,type:a}),{value:i})).data.ocs.data}async function Oa(e){return(await l.put(d("apps/circles/circles/{circleId}/join",{circleId:e}))).data.ocs.data}async function Ma(e){return(await l.put(d("apps/circles/circles/{circleId}/leave",{circleId:e}))).data.ocs.data}async function Sa(e,a,i,r){return(await l.get(d("apps/circles/circles/{circleId}/members",{circleId:e}),{params:{search:a,role:i,...r?{limit:r}:{}}})).data.ocs.data}async function Fa(e,a){return(await l.post(d("apps/circles/circles/{circleId}/members/multi",{circleId:e}),{members:a})).data.ocs.data}async function Va(e,a){const i=await l.delete(d("apps/circles/circles/{circleId}/members/{memberId}",{circleId:e,memberId:a}));return Object.values(i.data.ocs.data)}async function Da(e,a,i){if(!(i in x))throw new Error("Invalid level.");const r=await l.put(d("apps/circles/circles/{circleId}/members/{memberId}/level",{circleId:e,memberId:a}),{level:i});return Object.values(r.data.ocs.data)}async function Pa(e,a){return(await l.put(d("apps/circles/circles/{circleId}/members/{memberId}",{circleId:e,memberId:a}))).data.ocs.data}async function Ha(e,a){return(await l.put(d("apps/circles/circles/{circleId}/setting",{circleId:e}),a)).data.ocs.data}async function Ua(e){return(await l.get(d("apps/circles/invitations/{invitationCode}",{invitationCode:e}))).data.ocs.data}async function ja(e){return(await l.post(d("apps/circles/invitations/{invitationCode}",{invitationCode:e}))).data.ocs.data}async function za(e){return(await l.put(d("apps/circles/circles/{circleId}/invitation",{circleId:e}))).data.ocs.data}async function qa(e){return(await l.delete(d("apps/circles/circles/{circleId}/invitation",{circleId:e}))).data.ocs.data}const U=S({__name:"CircleConfigCheckboxesList",props:{circle:{},configs:{}},setup(e){const a=e,i=re(!1);function r(n){return(a.circle.config&n)!==0}async function u(n,m){if(w.debug(`Circle config ${n} is set to ${m}`),m&&n===B.FEDERATED&&!await s())return;i.value=n;const y=a.circle.config,I=m?y|n:y&~n;try{const E=await xt(a.circle.id,le.Config,I);a.circle.config=E.config}catch(E){w.error("Unable to edit circle config",{prevConfig:y,config:I,error:E}),ie(c("circles","An error happened during the config change"))}finally{i.value=!1}}async function s(){return await Be({name:c("circles","Confirm enabling federation"),text:c("circles",`Enabling this will prevent {circle} from being a member of other teams. -Are you sure?`,{circle:a.circle.displayName}),labelConfirm:c("circles","Enable federation"),labelReject:c("circles","Cancel"),severity:"warning"})?!0:(w.debug("Enable federation cancelled"),!1)}return(n,m)=>(p(),T(b(ce),null,{default:h(()=>[(p(!0),g(ne,null,We(e.configs,(y,I)=>(p(),T(b(Bt),{key:"circle-config"+I,"model-value":r(Number(I)),label:y,disabled:i.value!==!1,"onUpdate:modelValue":E=>u(Number(I),E)},null,8,["model-value","label","disabled","onUpdate:modelValue"]))),128))]),_:1}))}});function Nt(e){const a=Ye(e),i=Je(Ze,null)!==null,r=k(()=>i&&a.to?"RouterLink":a.href?"a":"button"),u=k(()=>r.value==="RouterLink"||r.value==="a"),s=k(()=>r.value==="a"),n=k(()=>r.value==="RouterLink"),m=k(()=>r.value==="button"),y=k(()=>{if(r.value==="RouterLink")return{to:a.to,activeClass:"active",...a.additionalAttrs?.("RouterLink")??{}};if(r.value==="a")return{href:a.href,target:a.target,download:a.download||void 0,rel:"nofollow noreferrer noopener",...a.additionalAttrs?.("a")??{}};if(r.value==="button")return{type:a.type||"button",disabled:a.disabled,...a.additionalAttrs?.("button")??{}}});return{tag:r,isLink:u,isHyperLink:s,isRouterLink:n,isButton:m,attrs:y}}const Tt=S({__name:"NcFormBoxButton",props:{label:{default:()=>{}},description:{default:()=>{}},invertedAccent:{type:Boolean,default:!1},to:{default:()=>{}},href:{default:()=>{}},target:{default:()=>{}},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){const{tag:a,attrs:i,isLink:r}=Nt({to:H(()=>e.to),href:H(()=>e.href),target:H(()=>e.target),disabled:H(()=>e.disabled)}),u=k(()=>{if(r.value)return e.target==="_blank"?xe:Ne});return(s,n)=>(p(),T(oe,V({tag:b(a),itemClasses:["button-vue",s.$style.formBoxButton],invertedAccent:e.invertedAccent},b(i),{tabindex:"0",onClick:n[0]||(n[0]=m=>s.$emit("click",m))}),J({_:2},[s.$slots.default||e.label?{name:"default",fn:h(()=>[C(s.$slots,"default",{},()=>[N(v(e.label),1)])]),key:"0"}:void 0,s.$slots.description||e.description?{name:"description",fn:h(()=>[C(s.$slots,"description",{},()=>[N(v(e.description),1)])]),key:"1"}:void 0,s.$slots.icon||u.value?{name:"icon",fn:h(()=>[C(s.$slots,"icon",{},()=>[u.value?(p(),T(se,{key:0,path:u.value,inline:""},null,8,["path"])):D("",!0)])]),key:"2"}:void 0]),1040,["tag","itemClasses","invertedAccent"]))}}),$t="_formBoxButton_E8Xfr",At={"material-design-icon":"_material-design-icon_MaIxG",formBoxButton:$t},Lt={$style:At},de=z(Tt,[["__cssModules",Lt]]);Ke(Qe);const Rt=2e3;function Ot(e){const a=re(!1),i=k(()=>a.value?Te:$e),r=k(()=>a.value?te("Copied"):te("Copy to clipboard"));async function u(){if(a.value)return;const s=Xe(e);try{await navigator.clipboard.writeText(s)}catch{prompt("",s)}a.value=!0,setTimeout(()=>{a.value=!1},Rt)}return{isCopied:a,copy:u,icon:i,altText:r}}const Mt={class:"hidden-visually"},St=S({__name:"NcFormBoxCopyButton",props:{label:{default:()=>{}},value:{},disabled:{type:Boolean,default:!1}},emits:["copy"],setup(e,{emit:a}){const i=a,{isCopied:r,copy:u,icon:s,altText:n}=Ot(()=>e.value);return Ae(r,()=>i("copy")),(m,y)=>(p(),T(de,{disabled:e.disabled,invertedAccent:"",onClick:b(u)},J({description:h(()=>[N(v(e.value),1)]),icon:h(()=>[$(se,{path:b(s),inline:""},null,8,["path"])]),_:2},[m.$slots.default||e.label?{name:"default",fn:h(()=>[A("span",Mt,v(b(n)),1),C(m.$slots,"default",{},()=>[N(v(e.label),1)])]),key:"0"}:void 0]),1032,["disabled","onClick"]))}}),Ft={name:"AutorenewIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vt=["aria-hidden","aria-label"],Dt=["fill","width","height"],Pt={d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"},Ht={key:0};function Ut(e,a,i,r,u,s){return p(),g("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon autorenew-icon",role:"img",onClick:a[0]||(a[0]=n=>e.$emit("click",n))}),[(p(),g("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[A("path",Pt,[i.title?(p(),g("title",Ht,v(i.title),1)):D("",!0)])],8,Dt))],16,Vt)}const jt=q(Ft,[["render",Ut]]),zt={name:"LinkOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},qt=["aria-hidden","aria-label"],Gt=["fill","width","height"],Wt={d:"M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.43 19.12,14.63 17.79,15L19.25,16.44C20.88,15.61 22,13.95 22,12A5,5 0 0,0 17,7M16,11H13.81L15.81,13H16V11M2,4.27L5.11,7.38C3.29,8.12 2,9.91 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12C3.9,10.41 5.11,9.1 6.66,8.93L8.73,11H8V13H10.73L13,15.27V17H14.73L18.74,21L20,19.74L3.27,3L2,4.27Z"},Yt={key:0};function Jt(e,a,i,r,u,s){return p(),g("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon link-off-icon",role:"img",onClick:a[0]||(a[0]=n=>e.$emit("click",n))}),[(p(),g("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[A("path",Wt,[i.title?(p(),g("title",Yt,v(i.title),1)):D("",!0)])],8,Gt))],16,qt)}const Zt=q(zt,[["render",Jt]]),Kt={name:"LinkPlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Qt=["aria-hidden","aria-label"],Xt=["fill","width","height"],ea={d:"M7,7H11V9H7A3,3 0 0,0 4,12A3,3 0 0,0 7,15H11V17H7A5,5 0 0,1 2,12A5,5 0 0,1 7,7M17,7A5,5 0 0,1 22,12H20A3,3 0 0,0 17,9H13V7H17M8,11H16V13H8V11M17,12H19V15H22V17H19V20H17V17H14V15H17V12Z"},ta={key:0};function aa(e,a,i,r,u,s){return p(),g("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon link-plus-icon",role:"img",onClick:a[0]||(a[0]=n=>e.$emit("click",n))}),[(p(),g("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[A("path",ea,[i.title?(p(),g("title",ta,v(i.title),1)):D("",!0)])],8,Xt))],16,Qt)}const ia=q(Kt,[["render",aa]]),sa={data(){return{copied:!1,copyLoading:!1,copySuccess:!1}},computed:{copyLinkIcon(){return this.copySuccess?"icon-checkmark":this.copyLoading?"icon-loading-small":"icon-public"}},methods:{async copyToClipboard(e){this.copyLoading=!0;try{await navigator.clipboard.writeText(e),this.copySuccess=!0,this.copied=!0,Le(t("circles","Link copied to the clipboard"))}catch{this.copySuccess=!1,this.copied=!0,ie(t("circles","Could not copy link to the clipboard."))}finally{this.copyLoading=!1,setTimeout(()=>{this.copied=!1,this.copySuccess=!1},2e3)}}}},ra={name:"CircleConfigInvitationLink",components:{Autorenew:jt,LinkOff:Zt,LinkPlus:ia,NcFormBox:ce,NcFormBoxButton:de,NcFormBoxCopyButton:St},mixins:[sa],props:{circle:{type:G,required:!0}},computed:{invitationUrl(){return this.circle.invitationCode?et()+tt("apps/circles/teams/join/{invitationCode}",{invitationCode:this.circle.invitationCode.match(/.{1,4}/g).join("-")}):null}},methods:{async createInvitationLink(){await this.$store.dispatch("createInvitationLink",{circleId:this.circle.id}),await this.copyToClipboard(this.invitationUrl)},async revokeInvitationLink(){await this.$store.dispatch("revokeInvitationLink",{circleId:this.circle.id})},confirm(e,a){window.confirm(e)&&a()}}};function na(e,a,i,r,u,s){const n=L("LinkPlus"),m=L("NcFormBoxButton"),y=L("NcFormBoxCopyButton"),I=L("Autorenew"),E=L("LinkOff"),P=L("NcFormBox");return p(),T(P,null,{default:h(()=>[s.invitationUrl?(p(),g(ne,{key:1},[$(y,{label:e.t("circles","Copy link"),value:s.invitationUrl},null,8,["label","value"]),$(m,{label:e.t("circles","Reset link"),onClick:a[1]||(a[1]=o=>s.confirm(e.t("circles","This action will make it impossible to join the team using the current link. Do we really want to change the link?"),()=>s.createInvitationLink()))},{icon:h(()=>[$(I,{size:20})]),_:1},8,["label"]),$(m,{label:e.t("circles","Reject link"),onClick:a[2]||(a[2]=o=>s.confirm(e.t("circles","This action will make it impossible to join the team using the current link. Do we really want to delete the link?"),()=>s.revokeInvitationLink()))},{icon:h(()=>[$(E,{size:20})]),_:1},8,["label"])],64)):(p(),T(m,{key:0,label:e.t("circles","Create link"),onClick:a[0]||(a[0]=o=>s.createInvitationLink())},{icon:h(()=>[$(n,{size:20})]),_:1},8,["label"]))]),_:1})}const ca=q(ra,[["render",na]]);c("circles","All contacts"),c("circles","Not grouped"),c("circles","Recently contacted"),c("circles","Organization chart"),c("circles","Contacts settings");const oa=0,ue=1,me=4,pe=8,fe=9,j=1,Z=2,K=4,Q=8,X=16;c("circles","Create your own teams for sharing. Add Nextcloud users, contacts, or anyone via email.");const la=2,da=4,he=8,ye=16,be=32,ge=64,_e=128,ua=256,ma=512,pa=1024,fa=2048,ha=4096,ve=8192,ya=16384,Ie=32768;X+"",c("circles","Team"),j+"",c("circles","User"),Z+"",c("circles","Group"),K+"",c("circles","Email"),Q+"",c("circles","Contact");const Ga={[ue]:c("circles","Member"),[me]:c("circles","Moderator"),[pe]:c("circles","Admin"),[fe]:c("circles","Owner")},Wa={[c("circles","Invites")]:{component:U,props:{configs:{[ye]:c("circles","Anyone can request membership"),[be]:c("circles","Members need to accept invitation"),[ge]:c("circles",'Memberships must be confirmed/accepted by a Moderator (requires "Anyone can request membership")'),[_e]:c("circles","Members can also invite")}}},[c("circles","Invitation links")]:{component:ca,props:{}},[c("circles","Membership")]:{component:U,props:{configs:{[ve]:c("circles","Prevent teams from being a member of another team")}}},[c("circles","Federation")]:{component:U,props:{configs:{[Ie]:c("circles","Allow federated members")}}},[c("circles","Privacy")]:{component:U,props:{configs:{[he]:c("circles","Visible to everyone")}}}},ba=[{id:`picker-${f.User}`,label:c("circles","users"),labelStandalone:c("circles","Users"),share:f.User,type:j},{id:`picker-${f.Group}`,label:c("circles","groups"),labelStandalone:c("circles","Groups"),share:f.Group,type:Z},{id:`picker-${f.Remote}`,label:c("circles","federated users"),labelStandalone:c("circles","Federated users"),share:f.Remote,type:j},{id:`picker-${f.Team}`,label:c("circles","teams"),labelStandalone:c("circles","Teams"),share:f.Team,type:X},{id:`picker-${f.Email}`,label:c("circles","email addresses"),labelStandalone:c("circles","Email addresses"),share:f.Email,type:K},{id:"picker-contact",label:c("circles","contacts"),labelStandalone:c("circles","Contacts"),share:f.Email,type:Q}],we=ba.reduce((e,a)=>(e[a.share]||(e[a.share]=a.type),e),{});var x=(e=>(e[e.NONE=oa]="NONE",e[e.MEMBER=ue]="MEMBER",e[e.MODERATOR=me]="MODERATOR",e[e.ADMIN=pe]="ADMIN",e[e.OWNER=fe]="OWNER",e))(x||{}),Ce=(e=>(e[e.CIRCLE=X]="CIRCLE",e[e.USER=j]="USER",e[e.GROUP=Z]="GROUP",e[e.MAIL=K]="MAIL",e[e.CONTACT=Q]="CONTACT",e))(Ce||{}),B=(e=>(e[e.PERSONAL=la]="PERSONAL",e[e.SYSTEM=da]="SYSTEM",e[e.VISIBLE=he]="VISIBLE",e[e.OPEN=ye]="OPEN",e[e.INVITE=be]="INVITE",e[e.REQUEST=ge]="REQUEST",e[e.FRIEND=_e]="FRIEND",e[e.PROTECTED=ua]="PROTECTED",e[e.NO_OWNER=ma]="NO_OWNER",e[e.HIDDEN=pa]="HIDDEN",e[e.BACKEND=fa]="BACKEND",e[e.LOCAL=ha]="LOCAL",e[e.ROOT=ve]="ROOT",e[e.CIRCLE_INVITE=ya]="CIRCLE_INVITE",e[e.FEDERATED=Ie]="FEDERATED",e))(B||{}),ga=(e=>(e.INVITED="Invited",e.MEMBER="Member",e.REQUESTING="Requesting",e))(ga||{});const Ee=Object.keys(we),_a=parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25;async function va(e,a=null){const i=await l.get(d("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"teams",search:e,perPage:_a,shareType:Ee,lookup:!1}}),r=i.data.ocs.data,u=i.data.ocs.data.exact;r.exact=[];let s=Object.values(u).reduce((o,_)=>o.concat(_),[]),n=Object.values(r).reduce((o,_)=>o.concat(_),[]);a&&(a.config&B.FEDERATED)!==0?(s=s.filter(o=>!(o.value?.shareType===f.Remote&&o.value?.isTrustedServer===!1)),n=n.filter(o=>!(o.value?.shareType===f.Remote&&o.value?.isTrustedServer===!1))):(s=s.filter(o=>o.value?.shareType!==f.Remote),n=n.filter(o=>o.value?.shareType!==f.Remote));const m=s.filter(o=>typeof o=="object").map(o=>W(o)).sort((o,_)=>o.shareType-_.shareType),y=n.filter(o=>typeof o=="object").map(o=>W(o)).sort((o,_)=>o.shareType-_.shareType),I=m.concat(y),E=I.reduce((o,_)=>(_.displayName&&(o[_.displayName]||(o[_.displayName]=0),o[_.displayName]++),o),{}),P=I.map(o=>E[o.displayName]>1&&!o.desc?{...o,desc:o.shareWithDisplayNameUnique}:o);return w.info("suggestions",{finalResults:P}),P}async function Ia(){const e=(await l.get(d("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:"contacts",shareType:Ee}})).data.ocs.data.exact,a=Object.values(e).reduce((i,r)=>i.concat(r),[]).map(i=>W(i));return w.info("recommendations",a),a}function W(e){const a=`picker-${e.value.shareType}`;return{label:e.label,id:`${a}-${e.value.shareWith}`,user:[window.OC.Share.SHARE_TYPE_USER,window.OC.Share.SHARE_TYPE_REMOTE].indexOf(e.value.shareType)>-1?e.value.shareWith:null,type:a,...e.value}}const wa=we;function ke(e){return e===void 0?"member":e>=9?"owner":e>=8?"admin":e>=4?"moderator":"member"}function Ca(e){return{id:String(e.id),name:e.name,type:e.type==="folder"?"folder":"file",iconUrl:e.iconUrl,fallbackIcon:e.fallbackIcon,url:e.url}}function Ea(e){return{id:e.singleId,userId:e.userId??null,displayName:e.displayName,isUser:e.type===1,role:"member"}}function ka(e){return{id:e.singleId,userId:e.userId??null,displayName:e.displayName,isUser:e.userType===1,role:ke(e.level)}}async function Ya(){const[e,a]=await Promise.allSettled([l.get(d("apps/circles/circles")+"?limit=-1"),l.get(d("apps/circles/teams/dashboard/widget")+"?limit=200&offset=0")]);if(e.status==="rejected")throw e.reason;const i=e.value.data.ocs.data??[];let r=[];a.status==="fulfilled"?r=a.value.data.ocs.data??[]:w.warn("Failed to load team dashboard previews",{error:a.reason});const u=new Map(r.map(s=>[s.singleId,s]));return i.map(s=>{const n=u.get(s.id);return{id:s.id,displayName:s.displayName||s.name,description:s.description??"",memberCount:s.population??n?.members.length??0,myRole:ke(s.initiator?.level),members:(n?.members??[]).map(Ea),resources:(n?.resources??[]).map(Ca)}})}async function Ja(e){return((await l.get(d("apps/circles/circles/{circleId}/members",{circleId:e}))).data.ocs.data??[]).map(ka)}async function Za(e,a=!0){return(await l.post(d("apps/circles/circles"),{name:e,createTeamFolder:a})).data.ocs.data.id}async function Ka(e,a){await l.put(d("apps/circles/circles/{circleId}/description",{circleId:e}),{value:a})}async function Qa(e){await l.put(d("apps/circles/circles/{circleId}/leave",{circleId:e}),{})}async function Xa(e){await l.delete(d("apps/circles/circles/{circleId}",{circleId:e}))}async function ei(){const{data:e}=await l.get(d("/apps/circles/admin/teamfolders"));return e.ocs.data}async function ti(e){try{const{data:a}=await l.get(d("apps/circles/teams/{circleId}/folder",{circleId:e}));return a.ocs.data}catch(a){if(a&&typeof a=="object"&&"response"in a&&a.response?.status===404)return null;throw a}}async function ai(e,a){const{data:i}=await l.post(d("apps/circles/teams/{circleId}/folder",{circleId:e}),{name:a});return i.ocs.data.folder}async function ii(e){const{data:a}=await l.get(d("apps/circles/teams/{circleId}/folder/linkable",{circleId:e}));return a.ocs.data}async function si(e,a){const{data:i}=await l.post(d("apps/circles/teams/{circleId}/folder/link",{circleId:e}),{folderId:a});return i.ocs.data.folder}async function ri(e,a){const{data:i}=await l.put(d("apps/circles/teams/{circleId}/folder/quota",{circleId:e}),{quota:a});return i.ocs.data.folder}const Y=".system/teams/pages";async function ni(e){let a;try{a=await F().getDirectoryContents(`${M}/${e}/${Y}`,{details:!0,data:Re()})}catch(i){if(i?.status===404)return[];throw i}return(Array.isArray(a)?a:a.data).map(i=>Oe(i,M)).filter(i=>i.type===Me.File&&i.extension?.toLowerCase()===".md"&&i.fileid!==void 0).map(i=>({fileId:i.fileid,title:i.basename.slice(0,-i.extension.length),filePath:`/${e}/${Y}/${i.basename}`})).sort((i,r)=>i.title.localeCompare(r.title))}async function ci(e,a){const i=`${M}/${e}/${Y}`;try{await F().createDirectory(i,{recursive:!0})}catch(r){if(r?.status!==405)throw r}if(await F().putFileContents(`${i}/${a}.md`,"",{overwrite:!1})===!1)throw Object.assign(new Error("A page with this name already exists"),{status:412})}async function oi(e){await F().deleteFile(`${M}${e.filePath}`)}async function li(e,a){const i=e.filePath.slice(0,e.filePath.lastIndexOf("/"));await F().moveFile(`${M}${e.filePath}`,`${M}${i}/${a}.md`,{overwrite:!1})}async function di(e){const{data:a}=await l.get(d("apps/circles/teams/{circleId}/tab-order",{circleId:e}));return a.ocs.data.order??[]}async function ui(e,a){await l.put(d("apps/circles/teams/{circleId}/tab-order",{circleId:e}),{order:a})}async function mi(e){return(await l.get(d("teams/{teamId}/resources",{teamId:e}))).data.ocs.data.resources??[]}async function pi(e){await l.post(d("apps/collectives/api/v1.0/collectives"),{name:e})}async function fi(e,a){if(!(await l.post(d("apps/deck/api/v1.0/boards/team"),{title:a,teamId:e})).data.ocs.data.id)throw new Error("The board creation response contains no board id")}async function hi(e,a){const i=await Promise.allSettled(a.map(u=>l.get(d("apps/deck/api/v1.0/board/{boardId}",{boardId:u.id})))),r=[];return i.forEach((u,s)=>{const n=a[s];if(u.status==="rejected"){w.warn("Could not read a deck board, not showing it as a tab",{resource:n,reason:u.reason});return}const m=u.value.data.ocs.data;m.teamId===e&&!m.archived&&(m.deletedAt??0)===0&&r.push({id:m.id,title:m.title,url:n.url})}),r.sort((u,s)=>u.title.localeCompare(s.title))}async function yi(e){return(e.trim()?await va(e):await Ia()).map(a=>({key:a.id,shareWith:a.shareWith,shareType:a.shareType,displayName:a.label,isUser:a.user!==null&&a.user!==void 0}))}async function bi(e,a){const i=a.map(u=>({id:u.shareWith,type:wa[u.shareType]})),r=await l.post(d("apps/circles/circles/{circleId}/members/multi",{circleId:e}),{members:i});return Object.keys(r.data.ocs.data??{}).length}export{Sa as $,oi as A,Ua as B,le as C,ja as D,Da as E,Ga as F,ga as G,va as H,Ia as I,ba as J,Oa as K,qa as L,x as M,ce as N,za as O,Wa as P,Ha as Q,Pa as R,we as S,R as T,Ma as U,Va as V,Fa as W,$a as X,Ra as Y,La as Z,G as _,ii as a,Aa as a0,ri as b,Qa as c,Xa as d,bi as e,Za as f,ei as g,Ka as h,Ja as i,Ya as j,Bt as k,si as l,de as m,xt as n,ui as o,di as p,ni as q,hi as r,yi as s,mi as t,ai as u,ti as v,pi as w,fi as x,ci as y,li as z}; -//# sourceMappingURL=api-XzRA2j3B.chunk.mjs.map +Are you sure?`,{circle:a.circle.displayName}),labelConfirm:c("circles","Enable federation"),labelReject:c("circles","Cancel"),severity:"warning"})?!0:(w.debug("Enable federation cancelled"),!1)}return(n,m)=>(p(),T(b(ce),null,{default:h(()=>[(p(!0),g(ne,null,We(e.configs,(y,I)=>(p(),T(b(Bt),{key:"circle-config"+I,"model-value":r(Number(I)),label:y,disabled:i.value!==!1,"onUpdate:modelValue":E=>u(Number(I),E)},null,8,["model-value","label","disabled","onUpdate:modelValue"]))),128))]),_:1}))}});function Nt(e){const a=Ye(e),i=Je(Ze,null)!==null,r=k(()=>i&&a.to?"RouterLink":a.href?"a":"button"),u=k(()=>r.value==="RouterLink"||r.value==="a"),s=k(()=>r.value==="a"),n=k(()=>r.value==="RouterLink"),m=k(()=>r.value==="button"),y=k(()=>{if(r.value==="RouterLink")return{to:a.to,activeClass:"active",...a.additionalAttrs?.("RouterLink")??{}};if(r.value==="a")return{href:a.href,target:a.target,download:a.download||void 0,rel:"nofollow noreferrer noopener",...a.additionalAttrs?.("a")??{}};if(r.value==="button")return{type:a.type||"button",disabled:a.disabled,...a.additionalAttrs?.("button")??{}}});return{tag:r,isLink:u,isHyperLink:s,isRouterLink:n,isButton:m,attrs:y}}const Tt=S({__name:"NcFormBoxButton",props:{label:{default:()=>{}},description:{default:()=>{}},invertedAccent:{type:Boolean,default:!1},to:{default:()=>{}},href:{default:()=>{}},target:{default:()=>{}},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){const{tag:a,attrs:i,isLink:r}=Nt({to:H(()=>e.to),href:H(()=>e.href),target:H(()=>e.target),disabled:H(()=>e.disabled)}),u=k(()=>{if(r.value)return e.target==="_blank"?xe:Ne});return(s,n)=>(p(),T(oe,V({tag:b(a),itemClasses:["button-vue",s.$style.formBoxButton],invertedAccent:e.invertedAccent},b(i),{tabindex:"0",onClick:n[0]||(n[0]=m=>s.$emit("click",m))}),J({_:2},[s.$slots.default||e.label?{name:"default",fn:h(()=>[C(s.$slots,"default",{},()=>[N(v(e.label),1)])]),key:"0"}:void 0,s.$slots.description||e.description?{name:"description",fn:h(()=>[C(s.$slots,"description",{},()=>[N(v(e.description),1)])]),key:"1"}:void 0,s.$slots.icon||u.value?{name:"icon",fn:h(()=>[C(s.$slots,"icon",{},()=>[u.value?(p(),T(se,{key:0,path:u.value,inline:""},null,8,["path"])):D("",!0)])]),key:"2"}:void 0]),1040,["tag","itemClasses","invertedAccent"]))}}),$t="_formBoxButton_E8Xfr",At={"material-design-icon":"_material-design-icon_MaIxG",formBoxButton:$t},Lt={$style:At},de=z(Tt,[["__cssModules",Lt]]);Ke(Qe);const Rt=2e3;function Ot(e){const a=re(!1),i=k(()=>a.value?Te:$e),r=k(()=>a.value?te("Copied"):te("Copy to clipboard"));async function u(){if(a.value)return;const s=Xe(e);try{await navigator.clipboard.writeText(s)}catch{prompt("",s)}a.value=!0,setTimeout(()=>{a.value=!1},Rt)}return{isCopied:a,copy:u,icon:i,altText:r}}const Mt={class:"hidden-visually"},St=S({__name:"NcFormBoxCopyButton",props:{label:{default:()=>{}},value:{},disabled:{type:Boolean,default:!1}},emits:["copy"],setup(e,{emit:a}){const i=a,{isCopied:r,copy:u,icon:s,altText:n}=Ot(()=>e.value);return Ae(r,()=>i("copy")),(m,y)=>(p(),T(de,{disabled:e.disabled,invertedAccent:"",onClick:b(u)},J({description:h(()=>[N(v(e.value),1)]),icon:h(()=>[$(se,{path:b(s),inline:""},null,8,["path"])]),_:2},[m.$slots.default||e.label?{name:"default",fn:h(()=>[A("span",Mt,v(b(n)),1),C(m.$slots,"default",{},()=>[N(v(e.label),1)])]),key:"0"}:void 0]),1032,["disabled","onClick"]))}}),Ft={name:"AutorenewIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vt=["aria-hidden","aria-label"],Dt=["fill","width","height"],Pt={d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"},Ht={key:0};function Ut(e,a,i,r,u,s){return p(),g("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon autorenew-icon",role:"img",onClick:a[0]||(a[0]=n=>e.$emit("click",n))}),[(p(),g("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[A("path",Pt,[i.title?(p(),g("title",Ht,v(i.title),1)):D("",!0)])],8,Dt))],16,Vt)}const jt=q(Ft,[["render",Ut]]),zt={name:"LinkOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},qt=["aria-hidden","aria-label"],Gt=["fill","width","height"],Wt={d:"M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.43 19.12,14.63 17.79,15L19.25,16.44C20.88,15.61 22,13.95 22,12A5,5 0 0,0 17,7M16,11H13.81L15.81,13H16V11M2,4.27L5.11,7.38C3.29,8.12 2,9.91 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12C3.9,10.41 5.11,9.1 6.66,8.93L8.73,11H8V13H10.73L13,15.27V17H14.73L18.74,21L20,19.74L3.27,3L2,4.27Z"},Yt={key:0};function Jt(e,a,i,r,u,s){return p(),g("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon link-off-icon",role:"img",onClick:a[0]||(a[0]=n=>e.$emit("click",n))}),[(p(),g("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[A("path",Wt,[i.title?(p(),g("title",Yt,v(i.title),1)):D("",!0)])],8,Gt))],16,qt)}const Zt=q(zt,[["render",Jt]]),Kt={name:"LinkPlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Qt=["aria-hidden","aria-label"],Xt=["fill","width","height"],ea={d:"M7,7H11V9H7A3,3 0 0,0 4,12A3,3 0 0,0 7,15H11V17H7A5,5 0 0,1 2,12A5,5 0 0,1 7,7M17,7A5,5 0 0,1 22,12H20A3,3 0 0,0 17,9H13V7H17M8,11H16V13H8V11M17,12H19V15H22V17H19V20H17V17H14V15H17V12Z"},ta={key:0};function aa(e,a,i,r,u,s){return p(),g("span",V(e.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon link-plus-icon",role:"img",onClick:a[0]||(a[0]=n=>e.$emit("click",n))}),[(p(),g("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[A("path",ea,[i.title?(p(),g("title",ta,v(i.title),1)):D("",!0)])],8,Xt))],16,Qt)}const ia=q(Kt,[["render",aa]]),sa={data(){return{copied:!1,copyLoading:!1,copySuccess:!1}},computed:{copyLinkIcon(){return this.copySuccess?"icon-checkmark":this.copyLoading?"icon-loading-small":"icon-public"}},methods:{async copyToClipboard(e){this.copyLoading=!0;try{await navigator.clipboard.writeText(e),this.copySuccess=!0,this.copied=!0,Le(t("circles","Link copied to the clipboard"))}catch{this.copySuccess=!1,this.copied=!0,ie(t("circles","Could not copy link to the clipboard."))}finally{this.copyLoading=!1,setTimeout(()=>{this.copied=!1,this.copySuccess=!1},2e3)}}}},ra={name:"CircleConfigInvitationLink",components:{Autorenew:jt,LinkOff:Zt,LinkPlus:ia,NcFormBox:ce,NcFormBoxButton:de,NcFormBoxCopyButton:St},mixins:[sa],props:{circle:{type:G,required:!0}},computed:{invitationUrl(){return this.circle.invitationCode?et()+tt("apps/circles/teams/join/{invitationCode}",{invitationCode:this.circle.invitationCode.match(/.{1,4}/g).join("-")}):null}},methods:{async createInvitationLink(){await this.$store.dispatch("createInvitationLink",{circleId:this.circle.id}),await this.copyToClipboard(this.invitationUrl)},async revokeInvitationLink(){await this.$store.dispatch("revokeInvitationLink",{circleId:this.circle.id})},confirm(e,a){window.confirm(e)&&a()}}};function na(e,a,i,r,u,s){const n=L("LinkPlus"),m=L("NcFormBoxButton"),y=L("NcFormBoxCopyButton"),I=L("Autorenew"),E=L("LinkOff"),P=L("NcFormBox");return p(),T(P,null,{default:h(()=>[s.invitationUrl?(p(),g(ne,{key:1},[$(y,{label:e.t("circles","Copy link"),value:s.invitationUrl},null,8,["label","value"]),$(m,{label:e.t("circles","Reset link"),onClick:a[1]||(a[1]=o=>s.confirm(e.t("circles","This action will make it impossible to join the team using the current link. Do we really want to change the link?"),()=>s.createInvitationLink()))},{icon:h(()=>[$(I,{size:20})]),_:1},8,["label"]),$(m,{label:e.t("circles","Reject link"),onClick:a[2]||(a[2]=o=>s.confirm(e.t("circles","This action will make it impossible to join the team using the current link. Do we really want to delete the link?"),()=>s.revokeInvitationLink()))},{icon:h(()=>[$(E,{size:20})]),_:1},8,["label"])],64)):(p(),T(m,{key:0,label:e.t("circles","Create link"),onClick:a[0]||(a[0]=o=>s.createInvitationLink())},{icon:h(()=>[$(n,{size:20})]),_:1},8,["label"]))]),_:1})}const ca=q(ra,[["render",na]]);c("circles","All contacts"),c("circles","Not grouped"),c("circles","Recently contacted"),c("circles","Organization chart"),c("circles","Contacts settings");const oa=0,ue=1,me=4,pe=8,fe=9,j=1,Z=2,K=4,Q=8,X=16;c("circles","Create your own teams for sharing. Add Nextcloud users, contacts, or anyone via email.");const la=2,da=4,he=8,ye=16,be=32,ge=64,_e=128,ua=256,ma=512,pa=1024,fa=2048,ha=4096,ve=8192,ya=16384,Ie=32768;X+"",c("circles","Team"),j+"",c("circles","User"),Z+"",c("circles","Group"),K+"",c("circles","Email"),Q+"",c("circles","Contact");const Ga={[ue]:c("circles","Member"),[me]:c("circles","Moderator"),[pe]:c("circles","Admin"),[fe]:c("circles","Owner")},Wa={[c("circles","Invites")]:{component:U,props:{configs:{[ye]:c("circles","Anyone can request membership"),[be]:c("circles","Members need to accept invitation"),[ge]:c("circles",'Memberships must be confirmed/accepted by a Moderator (requires "Anyone can request membership")'),[_e]:c("circles","Members can also invite")}}},[c("circles","Invitation links")]:{component:ca,props:{}},[c("circles","Membership")]:{component:U,props:{configs:{[ve]:c("circles","Prevent teams from being a member of another team")}}},[c("circles","Federation")]:{component:U,props:{configs:{[Ie]:c("circles","Allow federated members")}}},[c("circles","Privacy")]:{component:U,props:{configs:{[he]:c("circles","Visible to everyone")}}}},ba=[{id:`picker-${f.User}`,label:c("circles","users"),labelStandalone:c("circles","Users"),share:f.User,type:j},{id:`picker-${f.Group}`,label:c("circles","groups"),labelStandalone:c("circles","Groups"),share:f.Group,type:Z},{id:`picker-${f.Remote}`,label:c("circles","federated users"),labelStandalone:c("circles","Federated users"),share:f.Remote,type:j},{id:`picker-${f.Team}`,label:c("circles","teams"),labelStandalone:c("circles","Teams"),share:f.Team,type:X},{id:`picker-${f.Email}`,label:c("circles","email addresses"),labelStandalone:c("circles","Email addresses"),share:f.Email,type:K},{id:"picker-contact",label:c("circles","contacts"),labelStandalone:c("circles","Contacts"),share:f.Email,type:Q}],we=ba.reduce((e,a)=>(e[a.share]||(e[a.share]=a.type),e),{});var x=(e=>(e[e.NONE=oa]="NONE",e[e.MEMBER=ue]="MEMBER",e[e.MODERATOR=me]="MODERATOR",e[e.ADMIN=pe]="ADMIN",e[e.OWNER=fe]="OWNER",e))(x||{}),Ce=(e=>(e[e.CIRCLE=X]="CIRCLE",e[e.USER=j]="USER",e[e.GROUP=Z]="GROUP",e[e.MAIL=K]="MAIL",e[e.CONTACT=Q]="CONTACT",e))(Ce||{}),B=(e=>(e[e.PERSONAL=la]="PERSONAL",e[e.SYSTEM=da]="SYSTEM",e[e.VISIBLE=he]="VISIBLE",e[e.OPEN=ye]="OPEN",e[e.INVITE=be]="INVITE",e[e.REQUEST=ge]="REQUEST",e[e.FRIEND=_e]="FRIEND",e[e.PROTECTED=ua]="PROTECTED",e[e.NO_OWNER=ma]="NO_OWNER",e[e.HIDDEN=pa]="HIDDEN",e[e.BACKEND=fa]="BACKEND",e[e.LOCAL=ha]="LOCAL",e[e.ROOT=ve]="ROOT",e[e.CIRCLE_INVITE=ya]="CIRCLE_INVITE",e[e.FEDERATED=Ie]="FEDERATED",e))(B||{}),ga=(e=>(e.INVITED="Invited",e.MEMBER="Member",e.REQUESTING="Requesting",e))(ga||{});const Ee=Object.keys(we),_a=parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25;async function va(e,a=null){const i=await l.get(d("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"teams",search:e,perPage:_a,shareType:Ee,lookup:!1}}),r=i.data.ocs.data,u=i.data.ocs.data.exact;r.exact=[];let s=Object.values(u).reduce((o,_)=>o.concat(_),[]),n=Object.values(r).reduce((o,_)=>o.concat(_),[]);a&&(a.config&B.FEDERATED)!==0?(s=s.filter(o=>!(o.value?.shareType===f.Remote&&o.value?.isTrustedServer===!1)),n=n.filter(o=>!(o.value?.shareType===f.Remote&&o.value?.isTrustedServer===!1))):(s=s.filter(o=>o.value?.shareType!==f.Remote),n=n.filter(o=>o.value?.shareType!==f.Remote));const m=s.filter(o=>typeof o=="object").map(o=>W(o)).sort((o,_)=>o.shareType-_.shareType),y=n.filter(o=>typeof o=="object").map(o=>W(o)).sort((o,_)=>o.shareType-_.shareType),I=m.concat(y),E=I.reduce((o,_)=>(_.displayName&&(o[_.displayName]||(o[_.displayName]=0),o[_.displayName]++),o),{}),P=I.map(o=>E[o.displayName]>1&&!o.desc?{...o,desc:o.shareWithDisplayNameUnique}:o);return w.info("suggestions",{finalResults:P}),P}async function Ia(){const e=(await l.get(d("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:"contacts",shareType:Ee}})).data.ocs.data.exact,a=Object.values(e).reduce((i,r)=>i.concat(r),[]).map(i=>W(i));return w.info("recommendations",a),a}function W(e){const a=`picker-${e.value.shareType}`;return{label:e.label,id:`${a}-${e.value.shareWith}`,user:[window.OC.Share.SHARE_TYPE_USER,window.OC.Share.SHARE_TYPE_REMOTE].indexOf(e.value.shareType)>-1?e.value.shareWith:null,type:a,...e.value}}const wa=we;function ke(e){return e===void 0?"member":e>=9?"owner":e>=8?"admin":e>=4?"moderator":"member"}function Ca(e){return{id:String(e.id),name:e.name,type:e.type==="folder"?"folder":"file",iconUrl:e.iconUrl,fallbackIcon:e.fallbackIcon,url:e.url}}function Ea(e){return{id:e.singleId,userId:e.userId??null,displayName:e.displayName,isUser:e.type===1,role:"member"}}function ka(e){return{id:e.singleId,userId:e.userId??null,displayName:e.displayName,isUser:e.userType===1,role:ke(e.level)}}async function Ya(){const[e,a]=await Promise.allSettled([l.get(d("apps/circles/circles")+"?limit=-1"),l.get(d("apps/circles/teams/dashboard/widget")+"?limit=200&offset=0")]);if(e.status==="rejected")throw e.reason;const i=(e.value.data.ocs.data??[]).filter(s=>s.initiator);let r=[];a.status==="fulfilled"?r=a.value.data.ocs.data??[]:w.warn("Failed to load team dashboard previews",{error:a.reason});const u=new Map(r.map(s=>[s.singleId,s]));return i.map(s=>{const n=u.get(s.id);return{id:s.id,displayName:s.displayName||s.name,description:s.description??"",memberCount:s.population??n?.members.length??0,myRole:ke(s.initiator?.level),members:(n?.members??[]).map(Ea),resources:(n?.resources??[]).map(Ca)}})}async function Ja(e){return((await l.get(d("apps/circles/circles/{circleId}/members",{circleId:e}))).data.ocs.data??[]).map(ka)}async function Za(e,a=!0){return(await l.post(d("apps/circles/circles"),{name:e,createTeamFolder:a})).data.ocs.data.id}async function Ka(e,a){await l.put(d("apps/circles/circles/{circleId}/description",{circleId:e}),{value:a})}async function Qa(e){await l.put(d("apps/circles/circles/{circleId}/leave",{circleId:e}),{})}async function Xa(e){await l.delete(d("apps/circles/circles/{circleId}",{circleId:e}))}async function ei(){const{data:e}=await l.get(d("/apps/circles/admin/teamfolders"));return e.ocs.data}async function ti(e){try{const{data:a}=await l.get(d("apps/circles/teams/{circleId}/folder",{circleId:e}));return a.ocs.data}catch(a){if(a&&typeof a=="object"&&"response"in a&&a.response?.status===404)return null;throw a}}async function ai(e,a){const{data:i}=await l.post(d("apps/circles/teams/{circleId}/folder",{circleId:e}),{name:a});return i.ocs.data.folder}async function ii(e){const{data:a}=await l.get(d("apps/circles/teams/{circleId}/folder/linkable",{circleId:e}));return a.ocs.data}async function si(e,a){const{data:i}=await l.post(d("apps/circles/teams/{circleId}/folder/link",{circleId:e}),{folderId:a});return i.ocs.data.folder}async function ri(e,a){const{data:i}=await l.put(d("apps/circles/teams/{circleId}/folder/quota",{circleId:e}),{quota:a});return i.ocs.data.folder}const Y=".system/teams/pages";async function ni(e){let a;try{a=await F().getDirectoryContents(`${M}/${e}/${Y}`,{details:!0,data:Re()})}catch(i){if(i?.status===404)return[];throw i}return(Array.isArray(a)?a:a.data).map(i=>Oe(i,M)).filter(i=>i.type===Me.File&&i.extension?.toLowerCase()===".md"&&i.fileid!==void 0).map(i=>({fileId:i.fileid,title:i.basename.slice(0,-i.extension.length),filePath:`/${e}/${Y}/${i.basename}`})).sort((i,r)=>i.title.localeCompare(r.title))}async function ci(e,a){const i=`${M}/${e}/${Y}`;try{await F().createDirectory(i,{recursive:!0})}catch(r){if(r?.status!==405)throw r}if(await F().putFileContents(`${i}/${a}.md`,"",{overwrite:!1})===!1)throw Object.assign(new Error("A page with this name already exists"),{status:412})}async function oi(e){await F().deleteFile(`${M}${e.filePath}`)}async function li(e,a){const i=e.filePath.slice(0,e.filePath.lastIndexOf("/"));await F().moveFile(`${M}${e.filePath}`,`${M}${i}/${a}.md`,{overwrite:!1})}async function di(e){const{data:a}=await l.get(d("apps/circles/teams/{circleId}/tab-order",{circleId:e}));return a.ocs.data.order??[]}async function ui(e,a){await l.put(d("apps/circles/teams/{circleId}/tab-order",{circleId:e}),{order:a})}async function mi(e){return(await l.get(d("teams/{teamId}/resources",{teamId:e}))).data.ocs.data.resources??[]}async function pi(e){await l.post(d("apps/collectives/api/v1.0/collectives"),{name:e})}async function fi(e,a){if(!(await l.post(d("apps/deck/api/v1.0/boards/team"),{title:a,teamId:e})).data.ocs.data.id)throw new Error("The board creation response contains no board id")}async function hi(e,a){const i=await Promise.allSettled(a.map(u=>l.get(d("apps/deck/api/v1.0/board/{boardId}",{boardId:u.id})))),r=[];return i.forEach((u,s)=>{const n=a[s];if(u.status==="rejected"){w.warn("Could not read a deck board, not showing it as a tab",{resource:n,reason:u.reason});return}const m=u.value.data.ocs.data;m.teamId===e&&!m.archived&&(m.deletedAt??0)===0&&r.push({id:m.id,title:m.title,url:n.url})}),r.sort((u,s)=>u.title.localeCompare(s.title))}async function yi(e){return(e.trim()?await va(e):await Ia()).map(a=>({key:a.id,shareWith:a.shareWith,shareType:a.shareType,displayName:a.label,isUser:a.user!==null&&a.user!==void 0}))}async function bi(e,a){const i=a.map(u=>({id:u.shareWith,type:wa[u.shareType]})),r=await l.post(d("apps/circles/circles/{circleId}/members/multi",{circleId:e}),{members:i});return Object.keys(r.data.ocs.data??{}).length}export{Sa as $,oi as A,Ua as B,le as C,ja as D,Da as E,Ga as F,ga as G,va as H,Ia as I,ba as J,Oa as K,qa as L,x as M,ce as N,za as O,Wa as P,Ha as Q,Pa as R,we as S,R as T,Ma as U,Va as V,Fa as W,$a as X,Ra as Y,La as Z,G as _,ii as a,Aa as a0,ri as b,Qa as c,Xa as d,bi as e,Za as f,ei as g,Ka as h,Ja as i,Ya as j,Bt as k,si as l,de as m,xt as n,ui as o,di as p,ni as q,hi as r,yi as s,mi as t,ai as u,ti as v,pi as w,fi as x,ci as y,li as z}; +//# sourceMappingURL=api-BcnqSuh8.chunk.mjs.map diff --git a/js/api-XzRA2j3B.chunk.mjs.license b/js/api-BcnqSuh8.chunk.mjs.license similarity index 100% rename from js/api-XzRA2j3B.chunk.mjs.license rename to js/api-BcnqSuh8.chunk.mjs.license diff --git a/js/api-XzRA2j3B.chunk.mjs.map b/js/api-BcnqSuh8.chunk.mjs.map similarity index 53% rename from js/api-XzRA2j3B.chunk.mjs.map rename to js/api-BcnqSuh8.chunk.mjs.map index bb41c51af..1c9d4897d 100644 --- a/js/api-XzRA2j3B.chunk.mjs.map +++ b/js/api-BcnqSuh8.chunk.mjs.map @@ -1 +1 @@ -{"version":3,"file":"api-XzRA2j3B.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcFormBox-Bmqar8nn.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxItem-Cm8aZaVJ.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxSwitch-DSXiQcnq.mjs","../src/teams/team-page/models/member.ts","../src/teams/team-page/models/circle.ts","../src/teams/team-page/services/circles.ts","../src/teams/team-page/components/CircleDetails/CircleConfigs/CircleConfigCheckboxesList.vue","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxButton-G_PkUiQy.mjs","../node_modules/@nextcloud/vue/dist/chunks/useCopy-6F-qWHq0.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-BA_gWnmz.mjs","../node_modules/vue-material-design-icons/Autorenew.vue","../node_modules/vue-material-design-icons/LinkOff.vue","../node_modules/vue-material-design-icons/LinkPlus.vue","../src/teams/team-page/mixins/CopyToClipboardMixin.js","../src/teams/team-page/components/CircleDetails/CircleConfigs/CircleConfigInvitationLink.vue","../src/teams/team-page/models/constants.ts","../src/teams/team-page/services/collaborationAutocompletion.js","../src/teams/api.ts"],"sourcesContent":["import '../assets/NcFormBox-TRgICDO3.css';\nimport { defineComponent, useCssModule, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from \"vue\";\nimport { N as NC_FORM_BOX_CONTEXT_KEY } from \"./useNcFormBox-Djlh582y.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBox\",\n props: {\n row: { type: Boolean }\n },\n setup(__props) {\n const style = useCssModule();\n provide(NC_FORM_BOX_CONTEXT_KEY, {\n isInFormBox: true,\n formBoxItemClass: style.ncFormBox__item\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([_ctx.$style.ncFormBox, __props.row ? _ctx.$style.ncFormBox_row : _ctx.$style.ncFormBox_col])\n }, [\n renderSlot(_ctx.$slots, \"default\", {\n itemClass: _ctx.$style.ncFormBox__item\n })\n ], 2);\n };\n }\n});\nconst ncFormBox = \"_ncFormBox_s7kf-\";\nconst ncFormBox_row = \"_ncFormBox_row_GzYuE\";\nconst ncFormBox__item = \"_ncFormBox__item_691pI\";\nconst ncFormBox_col = \"_ncFormBox_col_Lt4lg\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_JPsV1\",\n ncFormBox,\n ncFormBox_row,\n ncFormBox__item,\n ncFormBox_col\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBox = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBox as N\n};\n//# sourceMappingURL=NcFormBox-Bmqar8nn.mjs.map\n","import '../assets/NcFormBoxItem-CABDVZLe.css';\nimport { defineComponent, useSlots, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from \"vue\";\nimport { u as useNcFormBox } from \"./useNcFormBox-Djlh582y.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { a as isLegacy } from \"./legacy-BoqDmOCa.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _hoisted_1 = [\"id\"];\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{ inheritAttrs: false },\n __name: \"NcFormBoxItem\",\n props: {\n tag: {},\n label: { default: () => void 0 },\n description: { default: () => void 0 },\n invertedAccent: { type: Boolean, default: false },\n class: { default: () => void 0 },\n itemClasses: { default: () => void 0 }\n },\n emits: [\"click\"],\n setup(__props) {\n const slots = useSlots();\n const { formBoxItemClass } = useNcFormBox();\n const descriptionId = createElementId();\n const hasDescription = () => !!__props.description || !!slots.description;\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([\n __props.class,\n _ctx.$style.formBoxItem,\n unref(formBoxItemClass),\n {\n [_ctx.$style.formBoxItem_inverted]: __props.invertedAccent && hasDescription(),\n [_ctx.$style.formBoxItem_legacy]: unref(isLegacy)\n }\n ])\n }, [\n createElementVNode(\"span\", {\n class: normalizeClass(_ctx.$style.formBoxItem__content)\n }, [\n (openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({\n class: [_ctx.$style.formBoxItem__element, __props.itemClasses]\n }, _ctx.$attrs, {\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { descriptionId: unref(descriptionId) }, () => [\n createTextVNode(toDisplayString(__props.label || \"⚠️ Label is missing\"), 1)\n ])\n ]),\n _: 3\n }, 16, [\"class\"])),\n hasDescription() ? (openBlock(), createElementBlock(\"span\", {\n key: 0,\n id: unref(descriptionId),\n class: normalizeClass(_ctx.$style.formBoxItem__description)\n }, [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(__props.description), 1)\n ])\n ], 10, _hoisted_1)) : createCommentVNode(\"\", true)\n ], 2),\n createElementVNode(\"span\", {\n class: normalizeClass(_ctx.$style.formBoxItem__icon)\n }, [\n renderSlot(_ctx.$slots, \"icon\", { descriptionId: unref(descriptionId) }, () => [\n _cache[1] || (_cache[1] = createTextVNode(\" ⚠️ Icon is missing \", -1))\n ])\n ], 2)\n ], 2);\n };\n }\n});\nconst formBoxItem = \"_formBoxItem_Gp-TA\";\nconst formBoxItem__description = \"_formBoxItem__description_UqZJ1\";\nconst formBoxItem_legacy = \"_formBoxItem_legacy_dP9aJ\";\nconst formBoxItem_inverted = \"_formBoxItem_inverted_BU-i-\";\nconst formBoxItem__element = \"_formBoxItem__element_jHCux\";\nconst formBoxItem__content = \"_formBoxItem__content_UKovC\";\nconst formBoxItem__icon = \"_formBoxItem__icon_AvkP3\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_8BFGk\",\n formBoxItem,\n formBoxItem__description,\n formBoxItem_legacy,\n formBoxItem_inverted,\n formBoxItem__element,\n formBoxItem__content,\n formBoxItem__icon\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBoxItem = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBoxItem as N\n};\n//# sourceMappingURL=NcFormBoxItem-Cm8aZaVJ.mjs.map\n","import '../assets/NcFormBoxSwitch-NCjook_Z.css';\nimport { defineComponent, useModel, watch, openBlock, createBlock, unref, createSlots, withCtx, withDirectives, createElementVNode, normalizeClass, vModelCheckbox, createVNode, renderSlot, createTextVNode, toDisplayString, mergeModels } from \"vue\";\nimport { N as NcFormBoxItem } from \"./NcFormBoxItem-Cm8aZaVJ.mjs\";\nimport { N as NcIconToggleSwitch } from \"./NcIconToggleSwitch-CRvGt4su.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _hoisted_1 = [\"id\", \"aria-describedby\", \"disabled\"];\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBoxSwitch\",\n props: /* @__PURE__ */ mergeModels({\n label: { default: () => void 0 },\n description: { default: () => void 0 },\n disabled: { type: Boolean, default: false }\n }, {\n \"modelValue\": { type: Boolean, ...{ required: true } },\n \"modelModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"enable\", \"disable\"], [\"update:modelValue\"]),\n setup(__props, { emit: __emit }) {\n const modelValue = useModel(__props, \"modelValue\");\n const emit = __emit;\n const inputId = createElementId();\n watch(modelValue, () => {\n if (modelValue.value) {\n emit(\"enable\");\n } else {\n emit(\"disable\");\n }\n }, {\n // defineModel emits update:modelValue synchronously\n // Watching it synchronously to emit the enable/disable events together with the update:modelValue event\n flush: \"sync\"\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(NcFormBoxItem, {\n tag: \"label\",\n for: unref(inputId)\n }, createSlots({\n icon: withCtx(({ descriptionId }) => [\n withDirectives(createElementVNode(\"input\", {\n id: unref(inputId),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),\n class: normalizeClass(_ctx.$style.formBoxSwitch__input),\n type: \"checkbox\",\n role: \"switch\",\n \"aria-describedby\": descriptionId,\n disabled: __props.disabled\n }, null, 10, _hoisted_1), [\n [vModelCheckbox, modelValue.value]\n ]),\n createVNode(NcIconToggleSwitch, {\n checked: modelValue.value,\n inline: \"\"\n }, null, 8, [\"checked\"])\n ]),\n _: 2\n }, [\n _ctx.$slots.default || __props.label ? {\n name: \"default\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(__props.label), 1)\n ])\n ]),\n key: \"0\"\n } : void 0,\n _ctx.$slots.description || __props.description ? {\n name: \"description\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(__props.description), 1)\n ])\n ]),\n key: \"1\"\n } : void 0\n ]), 1032, [\"for\"]);\n };\n }\n});\nconst formBoxSwitch__input = \"_formBoxSwitch__input_n8432\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_v0XYD\",\n formBoxSwitch__input\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBoxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBoxSwitch as N\n};\n//# sourceMappingURL=NcFormBoxSwitch-DSXiQcnq.mjs.map\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MemberLevel, MemberType } from './constants.ts'\n\nimport { logger } from '../../../logger.ts'\nimport Circle from './circle.ts'\nimport { MemberLevels, MemberTypes } from './constants.ts'\n\nexport default class Member {\n\t_data: any = {}\n\t_circle: Circle\n\n\t/**\n\t * Creates an instance of Member\n\t *\n\t * @param data\n\t * @param circle\n\t */\n\tconstructor(data: any, circle: Circle) {\n\t\tif (typeof data !== 'object') {\n\t\t\tthrow new Error('Invalid member')\n\t\t}\n\n\t\t// if no uid set, fail\n\t\tif (data.id && typeof data.id !== 'string') {\n\t\t\tlogger.error('This member do not have a proper uid', data)\n\t\t\tthrow new Error('This member do not have a proper uid')\n\t\t}\n\n\t\tthis._circle = circle\n\t\tthis._data = data\n\t}\n\n\t/**\n\t * Get the circle of this member\n\t */\n\tget circle(): Circle {\n\t\treturn this._circle\n\t}\n\n\t/**\n\t * Set the circle of this member\n\t */\n\tset circle(circle: Circle) {\n\t\tif (circle.constructor.name !== Circle.name) {\n\t\t\tthrow new Error('circle must be a Circle type')\n\t\t}\n\t\tthis._circle = circle\n\t}\n\n\t/**\n\t * Member id\n\t */\n\tget id(): string {\n\t\treturn this._data.id\n\t}\n\n\t/**\n\t * Single uid\n\t */\n\tget singleId(): string {\n\t\treturn this._data.singleId\n\t}\n\n\t/**\n\t * Formatted display name\n\t */\n\tget displayName(): string {\n\t\treturn this._data.displayName\n\t}\n\n\t/**\n\t * Member userId\n\t */\n\tget userId(): string {\n\t\treturn this._data.userId\n\t}\n\n\t/**\n\t * Member type\n\t */\n\tget userType(): MemberType {\n\t\t// If the user type is a circle, this could originate from multiple sources\n\t\treturn this._data.userType !== MemberTypes.CIRCLE\n\t\t\t? this._data.userType\n\t\t\t: this.basedOn.source\n\t}\n\n\t/**\n\t * Member based on source\n\t */\n\tget basedOn(): any {\n\t\treturn this._data.basedOn\n\t}\n\n\t/**\n\t * Member level\n\t *\n\t */\n\tget level(): MemberLevel {\n\t\treturn this._data.level\n\t}\n\n\t/**\n\t * Set member level\n\t */\n\tset level(level: MemberLevel) {\n\t\tif (!(level in MemberLevels)) {\n\t\t\tthrow new Error('Invalid level')\n\t\t}\n\t\tthis._data.level = level\n\t}\n\n\t/**\n\t * Member request status\n\t *\n\t */\n\tget status(): string {\n\t\treturn this._data.status\n\t}\n\n\t/**\n\t * Is the current member a user?\n\t */\n\tget isUser() {\n\t\treturn this._data.userType === MemberLevels.MEMBER\n\t}\n\n\t/**\n\t * Is the current member without a circle?\n\t */\n\tget isOrphan() {\n\t\treturn this._circle?.constructor?.name !== Circle.name\n\t}\n\n\t/**\n\t * Delete this member and any reference from its circle\n\t */\n\tdelete() {\n\t\tif (this.isOrphan) {\n\t\t\tthrow new Error('Cannot delete this member as it doesn\\'t belong to any circle')\n\t\t}\n\t\tthis.circle.deleteMember(this)\n\t\tthis._data = undefined\n\t}\n}\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { CircleConfigs, MemberLevels, ROUTE_CIRCLE } from './constants.ts'\nimport Member from './member.ts'\nimport { logger } from '../../../logger.ts'\n\ntype MemberList = Record\n\nexport default class Circle {\n\t_data: any = {}\n\t_members: MemberList = {}\n\t_owner: Member\n\t_initiator: Member\n\n\t/**\n\t * Creates an instance of Circle\n\t *\n\t * @param data\n\t */\n\tconstructor(data: object) {\n\t\tthis.updateData(data)\n\t}\n\n\t/**\n\t * Update inner circle data, owner and initiator\n\t *\n\t * @param data\n\t */\n\tupdateData(data: any) {\n\t\tif (typeof data !== 'object') {\n\t\t\tthrow new Error('Invalid circle')\n\t\t}\n\n\t\t// if no uid set, fail\n\t\tif (!data.id) {\n\t\t\tthrow new Error('This circle do not have a proper uid')\n\t\t}\n\n\t\tthis._data = data\n\t\tthis._owner = new Member(data.owner, this)\n\n\t\tif (data.initiator) {\n\t\t\tthis._initiator = new Member(data.initiator, this)\n\t\t}\n\t}\n\n\t// METADATA -----------------------------------------\n\t/**\n\t * Circle id\n\t */\n\tget id(): string {\n\t\treturn this._data.id\n\t}\n\n\t/**\n\t * Formatted display name\n\t */\n\tget displayName(): string {\n\t\treturn this._data.displayName\n\t}\n\n\t/**\n\t * Set the display name\n\t */\n\tset displayName(text: string) {\n\t\tthis._data.displayName = text\n\t}\n\n\t/**\n\t * Circle creation date\n\t */\n\tget creation(): number {\n\t\treturn this._data.creation\n\t}\n\n\t/**\n\t * Circle description\n\t */\n\tget description(): string {\n\t\treturn this._data.description\n\t}\n\n\t/**\n\t * Circle description\n\t */\n\tset description(text: string) {\n\t\tthis._data.description = text\n\t}\n\n\t/**\n\t * Circle direct member count (excluding nested circles)\n\t */\n\tget population() {\n\t\treturn this._data.population\n\t}\n\n\t/**\n\t * Circle total member count (direct + inherited from nested circles)\n\t */\n\tget populationInherited() {\n\t\treturn this._data.populationInherited\n\t}\n\n\t// MEMBERSHIP -----------------------------------------\n\t/**\n\t * Circle ini_initiator the current\n\t * user info for this circle\n\t * null if not a member\n\t */\n\tget initiator(): Member | null {\n\t\treturn this._initiator\n\t}\n\n\t/**\n\t * Set new circle initiator\n\t * null if not a member\n\t */\n\tset initiator(initiator: Member) {\n\t\tif (initiator && initiator.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Initiator must be a Member type')\n\t\t}\n\t\tthis._initiator = initiator\n\t}\n\n\t/**\n\t * Circle ownership\n\t */\n\tget owner(): Member {\n\t\treturn this._owner\n\t}\n\n\t/**\n\t * Set new circle owner\n\t */\n\tset owner(owner: Member) {\n\t\tif (owner.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Owner must be a Member type')\n\t\t}\n\t\tthis._owner = owner\n\t}\n\n\t/**\n\t * Circle members\n\t */\n\tget members(): MemberList {\n\t\treturn this._members\n\t}\n\n\t/**\n\t * Define members circle\n\t */\n\tset members(members: MemberList) {\n\t\tthis._members = members\n\t}\n\n\t/**\n\t * Add a member to this circle\n\t *\n\t * @param member\n\t */\n\taddMember(member: Member) {\n\t\tif (member.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Member must be a Member type')\n\t\t}\n\n\t\tconst singleId = member.singleId\n\t\tif (this._members[singleId]) {\n\t\t\tlogger.warn('Replacing existing member data', { member })\n\t\t}\n\t\tthis._members[singleId] = member\n\t}\n\n\t/**\n\t * Remove a member from this circle\n\t *\n\t * @param member\n\t */\n\tdeleteMember(member: Member) {\n\t\tif (member.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Member must be a Member type')\n\t\t}\n\n\t\tconst singleId = member.singleId\n\t\tif (!this._members[singleId]) {\n\t\t\tlogger.warn('The member was not in this circle. Nothing was done.', { member })\n\t\t}\n\n\t\t// Delete and clear memory\n\t\tdelete this._members[singleId]\n\t}\n\n\t// CONFIGS --------------------------------------------\n\tget settings() {\n\t\treturn this._data.settings\n\t}\n\n\t/**\n\t * Circle config\n\t */\n\tget config(): number {\n\t\treturn this._data.config\n\t}\n\n\t/**\n\t * Define circle config\n\t */\n\tset config(config: number) {\n\t\tthis._data.config = config\n\t}\n\n\t/**\n\t * Circle is personal\n\t */\n\tget isPersonal() {\n\t\treturn (this._data.config & CircleConfigs.PERSONAL) !== 0\n\t}\n\n\t/**\n\t * Circle requires invite to be confirmed by moderator or above\n\t */\n\tget requireJoinAccept() {\n\t\treturn (this._data.config & CircleConfigs.VISIBLE) !== 0\n\t}\n\n\t/**\n\t * Circle can be requested to join\n\t */\n\tget canJoin() {\n\t\treturn (this._data.config & CircleConfigs.OPEN) !== 0\n\t}\n\n\t/**\n\t * Circle is visible to others\n\t */\n\tget isVisible() {\n\t\treturn (this._data.config & CircleConfigs.VISIBLE) !== 0\n\t}\n\n\t/**\n\t * Circle requires invite to be accepted by the member\n\t */\n\tget requireInviteAccept() {\n\t\treturn (this._data.config & CircleConfigs.INVITE) !== 0\n\t}\n\n\t// PERMISSIONS SHORTCUTS ------------------------------\n\t/**\n\t * Can the initiator add members to this circle?\n\t */\n\tget isOwner() {\n\t\treturn this.initiator?.level === MemberLevels.OWNER\n\t}\n\n\t// PERMISSIONS SHORTCUTS ------------------------------\n\t/**\n\t * Is the initiator an admin of this circle?\n\t */\n\tget isAdmin() {\n\t\treturn this.initiator?.level === MemberLevels.ADMIN\n\t}\n\n\t/**\n\t * Is the initiator a member of this circle?\n\t */\n\tget isMember() {\n\t\treturn this.initiator?.level\n\t\t\t&& this.initiator?.level > MemberLevels.NONE\n\t}\n\n\t/**\n\t * Is the initiator a pending member of this circle?\n\t */\n\tget isPendingMember() {\n\t\treturn this.initiator?.level === MemberLevels.NONE\n\t}\n\n\t/**\n\t * Can the initiator delete this circle?\n\t */\n\tget canDelete() {\n\t\treturn this.isOwner\n\t}\n\n\t/**\n\t * Can the initiator leave this circle?\n\t */\n\tget canLeave() {\n\t\treturn this.isMember && !this.isOwner\n\t}\n\n\t/**\n\t * Can the initiator add/remove members to this circle?\n\t */\n\tget canManageMembers() {\n\t\treturn (this.initiator?.level\n\t\t\t&& this.initiator?.level >= MemberLevels.MODERATOR)\n\t\t|| (this.config & CircleConfigs.FRIEND) !== 0\n\t}\n\n\t// PARAMS ---------------------------------------------\n\t/**\n\t * Vue router param\n\t */\n\tget router() {\n\t\treturn {\n\t\t\tname: 'team',\n\t\t\tparams: { teamId: this.id },\n\t\t}\n\t}\n\n\tget invitationCode() {\n\t\treturn this._data.invitationCode\n\t}\n\n\tset invitationCode(invitationCode: string) {\n\t\tthis._data.invitationCode = invitationCode\n\t}\n\n\t/**\n\t * Default javascript fallback\n\t * Used for sorting as well\n\t */\n\ttoString() {\n\t\treturn this.displayName\n\t}\n}\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MemberLevel, MemberType } from '../models/constants.ts'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { MemberLevels } from '../models/constants.ts'\ninterface MemberPairs {\n\tid: string\n\ttype: MemberType\n}\n\ntype CircleEditType = 'name' | 'description' | 'settings' | 'config'\nexport enum CircleEdit {\n\tName = 'name',\n\tDescription = 'description',\n\tSettings = 'settings',\n\tConfig = 'config',\n}\n\ninterface CircleSetting {\n\tsetting: string\n\tvalue: string\n}\n\n/**\n * Get the circles list without the members\n *\n * @return\n */\nexport async function getCircles() {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/circles'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Get a specific circle\n *\n * @param circleId\n * @return\n */\nexport async function getCircle(circleId: string) {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/circles/{circleId}', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new circle\n *\n * @param name the circle name\n * @param personal\n * @param local\n * @return\n */\nexport async function createCircle(name: string, personal: boolean, local: boolean) {\n\tconst response = await axios.post(generateOcsUrl('apps/circles/circles'), {\n\t\tname,\n\t\tpersonal,\n\t\tlocal,\n\t})\n\treturn response.data.ocs.data\n}\n\n/**\n * Delete an existing circle\n *\n * @param circleId the circle id\n * @return\n */\nexport async function deleteCircle(circleId: string) {\n\tconst response = await axios.delete(generateOcsUrl('apps/circles/circles/{circleId}', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Edit an existing circle\n *\n * @param circleId the circle id\n * @param type the edit type\n * @param data the data\n * @param value\n * @return\n */\nexport async function editCircle(circleId: string, type: CircleEditType, value: any) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/{type}', { circleId, type }), { value })\n\treturn response.data.ocs.data\n}\n\n/**\n * Join a circle\n *\n * @param circleId the circle id\n * @return\n */\nexport async function joinCircle(circleId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/join', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Leave a circle\n *\n * @param circleId the circle id\n * @return\n */\nexport async function leaveCircle(circleId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/leave', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Get the circle members without the members\n *\n * @param circleId the circle id\n * @param search the search query\n * @param role the role\n * @param limit the limit\n * @return\n */\nexport async function getCircleMembers(circleId: string, search?: string, role?: string, limit?: number) {\n\tconst response = await axios.get(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/members', { circleId }),\n\t\t{\n\t\t\tparams: {\n\t\t\t\tsearch,\n\t\t\t\trole,\n\t\t\t\t...(limit ? { limit } : {}),\n\t\t\t},\n\t\t},\n\t)\n\treturn response.data.ocs.data\n}\n\n/**\n * Search a potential circle member\n *\n * @param term the search query\n * @return\n */\nexport async function searchMember(term: string) {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/search?term={term}', { term }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Add a circle member\n *\n * @param circleId the circle id\n * @param members the member id\n * @return\n */\nexport async function addMembers(circleId: string, members: Array) {\n\tconst response = await axios.post(generateOcsUrl('apps/circles/circles/{circleId}/members/multi', { circleId }), { members })\n\treturn response.data.ocs.data\n}\n\n/**\n * Delete a circle member\n *\n * @param circleId the circle id\n * @param memberId the member id\n * @return\n */\nexport async function deleteMember(circleId: string, memberId: string) {\n\tconst response = await axios.delete(generateOcsUrl('apps/circles/circles/{circleId}/members/{memberId}', { circleId, memberId }))\n\treturn Object.values(response.data.ocs.data)\n}\n\n/**\n * change a member level\n *\n * @see levels file src/models/constants.js\n *\n * @param circleId the circle id\n * @param memberId the member id\n * @param level the new member level\n * @return\n */\nexport async function changeMemberLevel(circleId: string, memberId: string, level: MemberLevel) {\n\tif (!(level in MemberLevels)) {\n\t\tthrow new Error('Invalid level.')\n\t}\n\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/members/{memberId}/level', { circleId, memberId }), {\n\t\tlevel,\n\t})\n\treturn Object.values(response.data.ocs.data)\n}\n\n/**\n * Accept a circle member request\n *\n * @param circleId the circle id\n * @param memberId the member id\n * @return\n */\nexport async function acceptMember(circleId: string, memberId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/members/{memberId}', { circleId, memberId }))\n\treturn response.data.ocs.data\n}\n\nexport async function editCircleSetting(circleId: string, setting: CircleSetting) {\n\tconst response = await axios.put(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/setting', { circleId }),\n\t\tsetting,\n\t)\n\treturn response.data.ocs.data\n}\n\n/**\n * Get a specific invitation\n *\n * @param invitationCode\n * @return\n */\nexport async function getInvitation(invitationCode: string) {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/invitations/{invitationCode}', { invitationCode }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Join a circle using an invitation\n *\n * @param invitationCode\n * @return\n */\nexport async function joinInvitation(invitationCode: string) {\n\tconst response = await axios.post(generateOcsUrl('apps/circles/invitations/{invitationCode}', { invitationCode }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create an invitation link for a circle\n *\n * @param circleId\n * @return\n */\nexport async function createInvitationLink(circleId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/invitation', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Revoke the invitation link of a circle\n *\n * @param circleId\n * @return\n */\nexport async function revokeInvitationLink(circleId: string) {\n\tconst response = await axios.delete(generateOcsUrl('apps/circles/circles/{circleId}/invitation', { circleId }))\n\treturn response.data.ocs.data\n}\n","\n\n\n\n\n","import '../assets/NcFormBoxButton-ClkxmO-H.css';\nimport { reactive, inject, computed, defineComponent, toRef, openBlock, createBlock, mergeProps, unref, createSlots, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from \"vue\";\nimport { s as mdiOpenInNew, t as mdiArrowTopRight } from \"./mdi-CpchYUUV.mjs\";\nimport { N as NcFormBoxItem } from \"./NcFormBoxItem-Cm8aZaVJ.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-g8ubWhoz.mjs\";\nimport { routerKey } from \"vue-router\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction useButtonLink(options) {\n const props = reactive(options);\n const hasVueRouterContext = inject(routerKey, null) !== null;\n const tag = computed(() => {\n if (hasVueRouterContext && props.to) {\n return \"RouterLink\";\n } else if (props.href) {\n return \"a\";\n } else {\n return \"button\";\n }\n });\n const isLink = computed(() => tag.value === \"RouterLink\" || tag.value === \"a\");\n const isHyperLink = computed(() => tag.value === \"a\");\n const isRouterLink = computed(() => tag.value === \"RouterLink\");\n const isButton = computed(() => tag.value === \"button\");\n const attrs = computed(() => {\n if (tag.value === \"RouterLink\") {\n return {\n to: props.to,\n activeClass: \"active\",\n ...props.additionalAttrs?.(\"RouterLink\") ?? {}\n };\n } else if (tag.value === \"a\") {\n return {\n href: props.href,\n target: props.target,\n download: props.download || void 0,\n rel: \"nofollow noreferrer noopener\",\n ...props.additionalAttrs?.(\"a\") ?? {}\n };\n } else if (tag.value === \"button\") {\n return {\n type: props.type || \"button\",\n disabled: props.disabled,\n ...props.additionalAttrs?.(\"button\") ?? {}\n };\n }\n });\n return {\n tag,\n isLink,\n isHyperLink,\n isRouterLink,\n isButton,\n attrs\n };\n}\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBoxButton\",\n props: {\n label: { default: () => void 0 },\n description: { default: () => void 0 },\n invertedAccent: { type: Boolean, default: false },\n to: { default: () => void 0 },\n href: { default: () => void 0 },\n target: { default: () => void 0 },\n disabled: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props) {\n const { tag, attrs, isLink } = useButtonLink({\n to: toRef(() => __props.to),\n href: toRef(() => __props.href),\n target: toRef(() => __props.target),\n disabled: toRef(() => __props.disabled)\n });\n const icon = computed(() => {\n if (isLink.value) {\n return __props.target === \"_blank\" ? mdiOpenInNew : mdiArrowTopRight;\n }\n return void 0;\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(NcFormBoxItem, mergeProps({\n tag: unref(tag),\n itemClasses: [\n \"button-vue\",\n /* Reset server's global HTML button styles */\n _ctx.$style.formBoxButton\n ],\n invertedAccent: __props.invertedAccent\n }, unref(attrs), {\n tabindex: \"0\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), createSlots({ _: 2 }, [\n _ctx.$slots.default || __props.label ? {\n name: \"default\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(__props.label), 1)\n ])\n ]),\n key: \"0\"\n } : void 0,\n _ctx.$slots.description || __props.description ? {\n name: \"description\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(__props.description), 1)\n ])\n ]),\n key: \"1\"\n } : void 0,\n _ctx.$slots.icon || icon.value ? {\n name: \"icon\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n icon.value ? (openBlock(), createBlock(NcIconSvgWrapper, {\n key: 0,\n path: icon.value,\n inline: \"\"\n }, null, 8, [\"path\"])) : createCommentVNode(\"\", true)\n ])\n ]),\n key: \"2\"\n } : void 0\n ]), 1040, [\"tag\", \"itemClasses\", \"invertedAccent\"]);\n };\n }\n});\nconst formBoxButton = \"_formBoxButton_E8Xfr\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_MaIxG\",\n formBoxButton\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBoxButton = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBoxButton as N\n};\n//# sourceMappingURL=NcFormBoxButton-G_PkUiQy.mjs.map\n","import { d as mdiCheck, e as mdiContentCopy } from \"./mdi-CpchYUUV.mjs\";\nimport { ref, computed, toValue } from \"vue\";\nimport { r as register, e as t22, a as t } from \"./_l10n-wdIzZwir.mjs\";\nregister(t22);\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst DELAY = 2e3;\nfunction useCopy(content) {\n const isCopied = ref(false);\n const icon = computed(() => isCopied.value ? mdiCheck : mdiContentCopy);\n const altText = computed(() => isCopied.value ? t(\"Copied\") : t(\"Copy to clipboard\"));\n async function copy() {\n if (isCopied.value) {\n return;\n }\n const value = toValue(content);\n try {\n await navigator.clipboard.writeText(value);\n } catch {\n prompt(\"\", value);\n }\n isCopied.value = true;\n setTimeout(() => {\n isCopied.value = false;\n }, DELAY);\n }\n return {\n isCopied,\n copy,\n icon,\n altText\n };\n}\nexport {\n useCopy as u\n};\n//# sourceMappingURL=useCopy-6F-qWHq0.mjs.map\n","import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode, renderSlot } from \"vue\";\nimport { whenever } from \"@vueuse/core\";\nimport { N as NcFormBoxButton } from \"./NcFormBoxButton-G_PkUiQy.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-g8ubWhoz.mjs\";\nimport { u as useCopy } from \"./useCopy-6F-qWHq0.mjs\";\nconst _hoisted_1 = { class: \"hidden-visually\" };\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBoxCopyButton\",\n props: {\n label: { default: () => void 0 },\n value: {},\n disabled: { type: Boolean, default: false }\n },\n emits: [\"copy\"],\n setup(__props, { emit: __emit }) {\n const emit = __emit;\n const { isCopied, copy, icon, altText } = useCopy(() => __props.value);\n whenever(isCopied, () => emit(\"copy\"));\n return (_ctx, _cache) => {\n return openBlock(), createBlock(NcFormBoxButton, {\n disabled: __props.disabled,\n invertedAccent: \"\",\n onClick: unref(copy)\n }, createSlots({\n description: withCtx(() => [\n createTextVNode(toDisplayString(__props.value), 1)\n ]),\n icon: withCtx(() => [\n createVNode(NcIconSvgWrapper, {\n path: unref(icon),\n inline: \"\"\n }, null, 8, [\"path\"])\n ]),\n _: 2\n }, [\n _ctx.$slots.default || __props.label ? {\n name: \"default\",\n fn: withCtx(() => [\n createElementVNode(\"span\", _hoisted_1, toDisplayString(unref(altText)), 1),\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(__props.label), 1)\n ])\n ]),\n key: \"0\"\n } : void 0\n ]), 1032, [\"disabled\", \"onClick\"]);\n };\n }\n});\nexport {\n _sfc_main as _\n};\n//# sourceMappingURL=NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-BA_gWnmz.mjs.map\n","\n\n","\n\n","\n\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showSuccess } from '@nextcloud/dialogs'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcopied: false,\n\t\t\tcopyLoading: false,\n\t\t\tcopySuccess: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tcopyLinkIcon() {\n\t\t\tif (this.copySuccess) {\n\t\t\t\treturn 'icon-checkmark'\n\t\t\t}\n\t\t\tif (this.copyLoading) {\n\t\t\t\treturn 'icon-loading-small'\n\t\t\t}\n\t\t\treturn 'icon-public'\n\t\t},\n\t},\n\n\tmethods: {\n\t\tasync copyToClipboard(url) {\n\t\t\t// change to loading status\n\t\t\tthis.copyLoading = true\n\n\t\t\t// copy link to clipboard\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(url)\n\t\t\t\tthis.copySuccess = true\n\t\t\t\tthis.copied = true\n\n\t\t\t\t// Notify success\n\t\t\t\tshowSuccess(t('circles', 'Link copied to the clipboard'))\n\t\t\t} catch (error) {\n\t\t\t\tthis.copySuccess = false\n\t\t\t\tthis.copied = true\n\t\t\t\tshowError(t('circles', 'Could not copy link to the clipboard.'))\n\t\t\t} finally {\n\t\t\t\tthis.copyLoading = false\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// stop loading status regardless of outcome\n\t\t\t\t\tthis.copied = false\n\t\t\t\t\tthis.copySuccess = false\n\t\t\t\t}, 2000)\n\t\t\t}\n\t\t},\n\t},\n}\n","\n\n\n\n\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n/// \n\nimport { translate as t } from '@nextcloud/l10n'\nimport { ShareType } from '@nextcloud/sharing'\nimport CircleConfigCheckboxesList from '../components/CircleDetails/CircleConfigs/CircleConfigCheckboxesList.vue'\nimport CircleConfigInvitationLink from '../components/CircleDetails/CircleConfigs/CircleConfigInvitationLink.vue'\n\nexport type DefaultGroup = string\nexport type DefaultChart = string\nexport type CircleConfig = number\nexport type MemberLevel = number\nexport type MemberType = number\n\n// Global sizes\nexport const LIST_SIZE = 60\n\n// Dynamic default groups\nexport const GROUP_ALL_CONTACTS: DefaultGroup = t('circles', 'All contacts')\nexport const GROUP_NO_GROUP_CONTACTS: DefaultGroup = t('circles', 'Not grouped')\nexport const GROUP_RECENTLY_CONTACTED: DefaultGroup = t('circles', 'Recently contacted')\n\n// Organization default chart for all contacts\nexport const CHART_ALL_CONTACTS: DefaultChart = t('circles', 'Organization chart')\n\n// Circle route, see vue-router conf\nexport const ROUTE_CIRCLE = 'circle'\nexport const ROUTE_CHART = 'chart'\nexport const ROUTE_USER_GROUP = 'user_group'\n\n// Contact settings\nexport const CONTACTS_SETTINGS: DefaultGroup = t('circles', 'Contacts settings')\n\n// Default max number of items to show in the navigation\nexport const ELLIPSIS_COUNT = 5\n\n// Circles member levels\nconst MEMBER_LEVEL_NONE: MemberLevel = 0\nconst MEMBER_LEVEL_MEMBER: MemberLevel = 1\nconst MEMBER_LEVEL_MODERATOR: MemberLevel = 4\nconst MEMBER_LEVEL_ADMIN: MemberLevel = 8\nconst MEMBER_LEVEL_OWNER: MemberLevel = 9\n\n// Circles member types\n\nconst MEMBER_TYPE_SINGLEID: MemberType = 0\nconst MEMBER_TYPE_USER: MemberType = 1\nconst MEMBER_TYPE_GROUP: MemberType = 2\nconst MEMBER_TYPE_MAIL: MemberType = 4\nconst MEMBER_TYPE_CONTACT: MemberType = 8\nconst MEMBER_TYPE_CIRCLE: MemberType = 16\n\nexport const CIRCLE_DESC = t('circles', 'Create your own teams for sharing. Add Nextcloud users, contacts, or anyone via email.')\n\n// Circles config flags\n\nconst CIRCLE_CONFIG_PERSONAL: CircleConfig = 2 // Personal circle, only the owner can see it.\nconst CIRCLE_CONFIG_SYSTEM: CircleConfig = 4 // System Circle (not managed by the official front-end). Meaning some config are limited\nconst CIRCLE_CONFIG_VISIBLE: CircleConfig = 8 // Visible to everyone, if not visible, people have to know its name to be able to find it\nconst CIRCLE_CONFIG_OPEN: CircleConfig = 16 // Circle is open, people can join\nconst CIRCLE_CONFIG_INVITE: CircleConfig = 32 // Adding a member generate an invitation that needs to be accepted\nconst CIRCLE_CONFIG_REQUEST: CircleConfig = 64 // Request to join Circles needs to be confirmed by a moderator\nconst CIRCLE_CONFIG_FRIEND: CircleConfig = 128 // Members of the circle can invite their friends\nconst CIRCLE_CONFIG_PROTECTED: CircleConfig = 256 // Password protected to join/request\nconst CIRCLE_CONFIG_NO_OWNER: CircleConfig = 512 // no owner, only members\nconst CIRCLE_CONFIG_HIDDEN: CircleConfig = 1024 // hidden from listing, but available as a share entity\nconst CIRCLE_CONFIG_BACKEND: CircleConfig = 2048 // Fully hidden, only backend Circles\nconst CIRCLE_CONFIG_LOCAL: CircleConfig = 4096 // Circle is not shared to other instance in globalscale\nconst CIRCLE_CONFIG_ROOT: CircleConfig = 8192 // Circle cannot be a member of another Circle\nconst CIRCLE_CONFIG_CIRCLE_INVITE: CircleConfig = 16384 // Circle must confirm when invited in another circle\nconst CIRCLE_CONFIG_FEDERATED: CircleConfig = 32768 // Federated\n\n// Existing members types\nexport const CIRCLES_MEMBER_TYPES = {\n\t[MEMBER_TYPE_CIRCLE]: t('circles', 'Team'),\n\t[MEMBER_TYPE_USER]: t('circles', 'User'),\n\t[MEMBER_TYPE_GROUP]: t('circles', 'Group'),\n\t[MEMBER_TYPE_MAIL]: t('circles', 'Email'),\n\t[MEMBER_TYPE_CONTACT]: t('circles', 'Contact'),\n}\n\n// Available circles promote/demote levels\nexport const CIRCLES_MEMBER_LEVELS = {\n\t// [MEMBER_LEVEL_NONE]: t('circles', 'Pending'),\n\t[MEMBER_LEVEL_MEMBER]: t('circles', 'Member'),\n\t[MEMBER_LEVEL_MODERATOR]: t('circles', 'Moderator'),\n\t[MEMBER_LEVEL_ADMIN]: t('circles', 'Admin'),\n\t[MEMBER_LEVEL_OWNER]: t('circles', 'Owner'),\n}\n\n// Available circle configs in the circle details view\nexport const PUBLIC_CIRCLE_CONFIG = {\n\t[t('circles', 'Invites')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t[CIRCLE_CONFIG_OPEN]: t('circles', 'Anyone can request membership'),\n\t\t\t\t[CIRCLE_CONFIG_INVITE]: t('circles', 'Members need to accept invitation'),\n\t\t\t\t[CIRCLE_CONFIG_REQUEST]: t('circles', 'Memberships must be confirmed/accepted by a Moderator (requires \"Anyone can request membership\")'),\n\t\t\t\t[CIRCLE_CONFIG_FRIEND]: t('circles', 'Members can also invite'),\n\t\t\t},\n\t\t},\n\t},\n\n\t[t('circles', 'Invitation links')]: {\n\t\tcomponent: CircleConfigInvitationLink,\n\t\tprops: {},\n\t},\n\n\t[t('circles', 'Membership')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t// TODO: implement backend\n\t\t\t\t// [CIRCLE_CONFIG_CIRCLE_INVITE]: t('circles', 'Team must confirm when invited in another circle'),\n\t\t\t\t[CIRCLE_CONFIG_ROOT]: t('circles', 'Prevent teams from being a member of another team'),\n\t\t\t},\n\t\t},\n\t},\n\n\t[t('circles', 'Federation')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t[CIRCLE_CONFIG_FEDERATED]: t('circles', 'Allow federated members'),\n\t\t\t},\n\t\t},\n\t},\n\n\t[t('circles', 'Privacy')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t[CIRCLE_CONFIG_VISIBLE]: t('circles', 'Visible to everyone'),\n\t\t\t},\n\t\t},\n\t},\n}\n\n// Represents the picker options (label is used lower case in a list of options: Search users, groups, teams, ...)\n// labelStandalone is used as heading for the member list where we need it starting captialized\nexport const CIRCLES_MEMBER_GROUPING = [\n\t{\n\t\tid: `picker-${ShareType.User}`,\n\t\tlabel: t('circles', 'users'),\n\t\tlabelStandalone: t('circles', 'Users'),\n\t\tshare: ShareType.User,\n\t\ttype: MEMBER_TYPE_USER,\n\t},\n\t{\n\t\tid: `picker-${ShareType.Group}`,\n\t\tlabel: t('circles', 'groups'),\n\t\tlabelStandalone: t('circles', 'Groups'),\n\t\tshare: ShareType.Group,\n\t\ttype: MEMBER_TYPE_GROUP,\n\t},\n\t{\n\t\tid: `picker-${ShareType.Remote}`,\n\t\tlabel: t('circles', 'federated users'),\n\t\tlabelStandalone: t('circles', 'Federated users'),\n\t\tshare: ShareType.Remote,\n\t\ttype: MEMBER_TYPE_USER,\n\t},\n\t// {\n\t// id: `picker-${ShareType.RemoteGroup}`,\n\t// label: t('circles', 'federated groups'),\n\t// share: ShareType.RemoteGroup,\n\t// type: MEMBER_TYPE_GROUP\n\t// },\n\t{\n\t\tid: `picker-${ShareType.Team}`,\n\t\tlabel: t('circles', 'teams'),\n\t\tlabelStandalone: t('circles', 'Teams'),\n\t\tshare: ShareType.Team,\n\t\ttype: MEMBER_TYPE_CIRCLE,\n\t},\n\t{\n\t\tid: `picker-${ShareType.Email}`,\n\t\tlabel: t('circles', 'email addresses'),\n\t\tlabelStandalone: t('circles', 'Email addresses'),\n\t\tshare: ShareType.Email,\n\t\ttype: MEMBER_TYPE_MAIL,\n\t},\n\t// TODO: implement SHARE_TYPE_CONTACT\n\t{\n\t\tid: 'picker-contact',\n\t\tlabel: t('circles', 'contacts'),\n\t\tlabelStandalone: t('circles', 'Contacts'),\n\t\tshare: ShareType.Email,\n\t\ttype: MEMBER_TYPE_CONTACT,\n\t},\n]\n\n// Generating a map between share types and circle member types\nexport const SHARES_TYPES_MEMBER_MAP = CIRCLES_MEMBER_GROUPING.reduce((list, entry) => {\n\t// ! Ignore duplicate share types\n\tif (!list[entry.share]) {\n\t\tlist[entry.share] = entry.type\n\t}\n\treturn list\n}, {})\n\nexport enum MemberLevels {\n\tNONE = MEMBER_LEVEL_NONE,\n\tMEMBER = MEMBER_LEVEL_MEMBER,\n\tMODERATOR = MEMBER_LEVEL_MODERATOR,\n\tADMIN = MEMBER_LEVEL_ADMIN,\n\tOWNER = MEMBER_LEVEL_OWNER,\n}\n\nexport enum MemberTypes {\n\tCIRCLE = MEMBER_TYPE_CIRCLE,\n\tUSER = MEMBER_TYPE_USER,\n\tGROUP = MEMBER_TYPE_GROUP,\n\tMAIL = MEMBER_TYPE_MAIL,\n\tCONTACT = MEMBER_TYPE_CONTACT,\n}\n\nexport enum CircleConfigs {\n\tPERSONAL = CIRCLE_CONFIG_PERSONAL,\n\tSYSTEM = CIRCLE_CONFIG_SYSTEM,\n\tVISIBLE = CIRCLE_CONFIG_VISIBLE,\n\tOPEN = CIRCLE_CONFIG_OPEN,\n\tINVITE = CIRCLE_CONFIG_INVITE,\n\tREQUEST = CIRCLE_CONFIG_REQUEST,\n\tFRIEND = CIRCLE_CONFIG_FRIEND,\n\tPROTECTED = CIRCLE_CONFIG_PROTECTED,\n\tNO_OWNER = CIRCLE_CONFIG_NO_OWNER,\n\tHIDDEN = CIRCLE_CONFIG_HIDDEN,\n\tBACKEND = CIRCLE_CONFIG_BACKEND,\n\tLOCAL = CIRCLE_CONFIG_LOCAL,\n\tROOT = CIRCLE_CONFIG_ROOT,\n\tCIRCLE_INVITE = CIRCLE_CONFIG_CIRCLE_INVITE,\n\tFEDERATED = CIRCLE_CONFIG_FEDERATED,\n}\n\nexport enum MemberStatus {\n\tINVITED = 'Invited',\n\tMEMBER = 'Member',\n\tREQUESTING = 'Requesting',\n}\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { ShareType } from '@nextcloud/sharing'\nimport { CircleConfigs, SHARES_TYPES_MEMBER_MAP } from '../models/constants.ts'\nimport { logger } from '../../../logger.ts'\n\n// generate allowed shareType from SHARES_TYPES_MEMBER_MAP\nconst shareType = Object.keys(SHARES_TYPES_MEMBER_MAP)\nconst maxAutocompleteResults = parseInt(window.OC.config['sharing.maxAutocompleteResults'], 10) || 25\n\n/**\n * Get suggestions\n *\n * @param {string} search the search query\n * @param {object|null} circle - the circle object\n */\nexport async function getSuggestions(search, circle = null) {\n\tconst request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees'), {\n\t\tparams: {\n\t\t\tformat: 'json',\n\t\t\titemType: 'teams',\n\t\t\tsearch,\n\t\t\tperPage: maxAutocompleteResults,\n\t\t\tshareType,\n\t\t\tlookup: false,\n\t\t},\n\t})\n\n\tconst data = request.data.ocs.data\n\tconst exact = request.data.ocs.data.exact\n\tdata.exact = [] // removing exact from general results\n\n\t// flatten array of arrays\n\tlet rawExactSuggestions = Object.values(exact).reduce((arr, elem) => arr.concat(elem), [])\n\tlet rawSuggestions = Object.values(data).reduce((arr, elem) => arr.concat(elem), [])\n\n\t// check if federation flag is enabled using bitwise AND on circle config\n\tconst isCircleFederated = circle ? (circle.config & CircleConfigs.FEDERATED) !== 0 : false\n\tif (isCircleFederated) {\n\t\t// remove results from untrusted remote servers\n\t\trawExactSuggestions = rawExactSuggestions\n\t\t\t.filter((result) => !(result.value?.shareType === ShareType.Remote && result.value?.isTrustedServer === false))\n\t\trawSuggestions = rawSuggestions\n\t\t\t.filter((result) => !(result.value?.shareType === ShareType.Remote && result.value?.isTrustedServer === false))\n\t} else {\n\t\t// remove all results from remote servers\n\t\trawExactSuggestions = rawExactSuggestions\n\t\t\t.filter((result) => result.value?.shareType !== ShareType.Remote)\n\t\trawSuggestions = rawSuggestions\n\t\t\t.filter((result) => result.value?.shareType !== ShareType.Remote)\n\t}\n\n\t// remove invalid data and format to user-select layout\n\tconst exactSuggestions = rawExactSuggestions\n\t\t.filter((result) => typeof result === 'object')\n\t\t.map((share) => formatResults(share))\n\t\t// sort by type so we can get user&groups first...\n\t\t.sort((a, b) => a.shareType - b.shareType)\n\tconst suggestions = rawSuggestions\n\t\t.filter((result) => typeof result === 'object')\n\t\t.map((share) => formatResults(share))\n\t\t// sort by type so we can get user&groups first...\n\t\t.sort((a, b) => a.shareType - b.shareType)\n\n\tconst allSuggestions = exactSuggestions.concat(suggestions)\n\n\t// Count occurances of display names in order to provide a distinguishable description if needed\n\tconst nameCounts = allSuggestions.reduce((nameCounts, result) => {\n\t\tif (!result.displayName) {\n\t\t\treturn nameCounts\n\t\t}\n\t\tif (!nameCounts[result.displayName]) {\n\t\t\tnameCounts[result.displayName] = 0\n\t\t}\n\t\tnameCounts[result.displayName]++\n\t\treturn nameCounts\n\t}, {})\n\n\tconst finalResults = allSuggestions.map((item) => {\n\t\t// Make sure that items with duplicate displayName get the shareWith applied as a description\n\t\tif (nameCounts[item.displayName] > 1 && !item.desc) {\n\t\t\treturn { ...item, desc: item.shareWithDisplayNameUnique }\n\t\t}\n\t\treturn item\n\t})\n\n\tlogger.info('suggestions', { finalResults })\n\n\treturn finalResults\n}\n\n/**\n * Get the sharing recommendations\n */\nexport async function getRecommendations() {\n\tconst request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees_recommended'), {\n\t\tparams: {\n\t\t\tformat: 'json',\n\t\t\titemType: 'contacts',\n\t\t\tshareType,\n\t\t},\n\t})\n\n\t// flatten array of arrays\n\tconst exact = request.data.ocs.data.exact\n\tconst recommendations = Object.values(exact).reduce((arr, elem) => arr.concat(elem), [])\n\n\t// remove invalid data and format to user-select layout\n\tconst finalResults = recommendations\n\t\t.map((share) => formatResults(share))\n\n\tlogger.info('recommendations', finalResults)\n\n\treturn finalResults\n}\n\nfunction formatResults(result) {\n\tconst type = `picker-${result.value.shareType}`\n\treturn {\n\t\tlabel: result.label,\n\t\tid: `${type}-${result.value.shareWith}`,\n\t\t// If this is a user, set as user for avatar display by UserBubble\n\t\tuser: [window.OC.Share.SHARE_TYPE_USER, window.OC.Share.SHARE_TYPE_REMOTE].indexOf(result.value.shareType) > -1\n\t\t\t? result.value.shareWith\n\t\t\t: null,\n\t\ttype,\n\t\t...result.value,\n\t}\n}\n","/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Member, MemberCandidate, Resource, SharedResource, Team, TeamRole } from './types.ts'\n\nimport axios from '@nextcloud/axios'\nimport { FileType } from '@nextcloud/files'\nimport { defaultRootPath, getClient, getDefaultPropfind, resultToNode } from '@nextcloud/files/dav'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { logger } from '../logger.ts'\nimport { SHARES_TYPES_MEMBER_MAP } from './team-page/models/constants.ts'\nimport { getRecommendations, getSuggestions } from './team-page/services/collaborationAutocompletion.js'\n\n/** `SHARES_TYPES_MEMBER_MAP` is built dynamically, so type its shape explicitly. */\nconst shareTypeToMemberType = SHARES_TYPES_MEMBER_MAP as Record\n\n/** Minimal shape of an OCS response envelope. */\ninterface OcsResponse {\n\tocs: { data: T }\n}\n\n/** Raw member as returned by the circles API. */\ninterface RawMember {\n\tsingleId: string\n\tuserId: string | null\n\tdisplayName: string\n\tuserType?: number\n\ttype?: number\n\tlevel?: number\n}\n\n/** Raw resource as returned by the dashboard endpoint. */\ninterface RawResource {\n\tid: string | number\n\tname: string\n\ttype: string\n\ticonUrl: string\n\tfallbackIcon: string\n\turl: string\n}\n\n/** Raw circle as returned by the `/circles` endpoint. */\ninterface RawCircle {\n\tid: string\n\tname: string\n\tdisplayName: string\n\tdescription?: string\n\tpopulation?: number\n\tinitiator?: { level?: number }\n}\n\n/** Raw team as returned by the dashboard widget endpoint. */\ninterface RawDashboardTeam {\n\tsingleId: string\n\tmembers: RawMember[]\n\tresources: RawResource[]\n}\n\n/** Raw sharee suggestion, as returned by the files_sharing autocompletion helper. */\ninterface RawSuggestion {\n\tid: string\n\tlabel: string\n\tshareWith: string\n\tshareType: number\n\tuser?: string | null\n}\n\n/**\n * Map a circles member level to a role.\n *\n * @param level - The circles member level (9 owner, 8 admin, 4 moderator, …)\n */\nfunction levelToRole(level: number | undefined): TeamRole {\n\tif (level === undefined) {\n\t\treturn 'member'\n\t}\n\tif (level >= 9) {\n\t\treturn 'owner'\n\t}\n\tif (level >= 8) {\n\t\treturn 'admin'\n\t}\n\tif (level >= 4) {\n\t\treturn 'moderator'\n\t}\n\treturn 'member'\n}\n\n/**\n * Map a resource from the dashboard endpoint to our type.\n *\n * @param raw - The raw resource\n */\nfunction mapResource(raw: RawResource): Resource {\n\treturn {\n\t\tid: String(raw.id),\n\t\tname: raw.name,\n\t\ttype: raw.type === 'folder' ? 'folder' : 'file',\n\t\ticonUrl: raw.iconUrl,\n\t\tfallbackIcon: raw.fallbackIcon,\n\t\turl: raw.url,\n\t}\n}\n\n/**\n * Map a preview member (from the dashboard endpoint, no level) to our type.\n *\n * @param raw - The raw member\n */\nfunction mapPreviewMember(raw: RawMember): Member {\n\treturn {\n\t\tid: raw.singleId,\n\t\tuserId: raw.userId ?? null,\n\t\tdisplayName: raw.displayName,\n\t\tisUser: raw.type === 1,\n\t\trole: 'member',\n\t}\n}\n\n/**\n * Map a full member (from the members endpoint, includes level) to our type.\n *\n * @param raw - The raw member\n */\nfunction mapFullMember(raw: RawMember): Member {\n\treturn {\n\t\tid: raw.singleId,\n\t\tuserId: raw.userId ?? null,\n\t\tdisplayName: raw.displayName,\n\t\tisUser: raw.userType === 1,\n\t\trole: levelToRole(raw.level),\n\t}\n}\n\n/**\n * Fetch all of the current user's teams, merging team metadata (name,\n * description, member count, our role) with the members preview and resources.\n */\nexport async function fetchTeams(): Promise {\n\tconst [circlesRes, dashRes] = await Promise.allSettled([\n\t\taxios.get>(generateOcsUrl('apps/circles/circles') + '?limit=-1'),\n\t\taxios.get>(generateOcsUrl('apps/circles/teams/dashboard/widget') + '?limit=200&offset=0'),\n\t])\n\n\t// The team list is required; without it we have nothing to show.\n\tif (circlesRes.status === 'rejected') {\n\t\tthrow circlesRes.reason\n\t}\n\tconst circles = circlesRes.value.data.ocs.data ?? []\n\n\t// The dashboard only enriches each team with member/resource previews, so\n\t// treat a failure there as \"no previews\" rather than failing the whole page.\n\tlet dashboard: RawDashboardTeam[] = []\n\tif (dashRes.status === 'fulfilled') {\n\t\tdashboard = dashRes.value.data.ocs.data ?? []\n\t} else {\n\t\tlogger.warn('Failed to load team dashboard previews', { error: dashRes.reason })\n\t}\n\tconst dashboardById = new Map(dashboard.map((team) => [team.singleId, team]))\n\n\treturn circles.map((circle) => {\n\t\tconst extra = dashboardById.get(circle.id)\n\t\treturn {\n\t\t\tid: circle.id,\n\t\t\tdisplayName: circle.displayName || circle.name,\n\t\t\tdescription: circle.description ?? '',\n\t\t\tmemberCount: circle.population ?? extra?.members.length ?? 0,\n\t\t\tmyRole: levelToRole(circle.initiator?.level),\n\t\t\tmembers: (extra?.members ?? []).map(mapPreviewMember),\n\t\t\tresources: (extra?.resources ?? []).map(mapResource),\n\t\t}\n\t})\n}\n\n/**\n * Fetch the full member list for a team (includes roles).\n *\n * @param teamId - The team single id\n */\nexport async function fetchTeamMembers(teamId: string): Promise {\n\tconst res = await axios.get>(generateOcsUrl('apps/circles/circles/{circleId}/members', { circleId: teamId }))\n\treturn (res.data.ocs.data ?? []).map(mapFullMember)\n}\n\n/**\n * Create a team and return its single id.\n *\n * @param name - The team name\n * @param createTeamFolder - Whether to auto-create a team folder. Defaults to\n * true so existing API callers keep the previous behaviour.\n */\nexport async function createTeam(name: string, createTeamFolder = true): Promise {\n\tconst res = await axios.post>(\n\t\tgenerateOcsUrl('apps/circles/circles'),\n\t\t{ name, createTeamFolder },\n\t)\n\treturn res.data.ocs.data.id\n}\n\n/**\n * Set a team's description.\n *\n * @param teamId - The team single id\n * @param description - The new description\n */\nexport async function setTeamDescription(teamId: string, description: string): Promise {\n\tawait axios.put(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/description', { circleId: teamId }),\n\t\t{ value: description },\n\t)\n}\n\n/**\n * Leave a team.\n *\n * @param teamId - The team single id\n */\nexport async function leaveTeam(teamId: string): Promise {\n\tawait axios.put(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/leave', { circleId: teamId }),\n\t\t{},\n\t)\n}\n\n/**\n * Delete a team.\n *\n * @param teamId - The team single id\n */\nexport async function deleteTeam(teamId: string): Promise {\n\tawait axios.delete(generateOcsUrl('apps/circles/circles/{circleId}', { circleId: teamId }))\n}\n\n/**\n * The team folder linked to a team.\n */\nexport interface TeamFolder {\n\tid: number\n\tmountPoint: string\n\tquota: number | null\n}\n\n/** Team and its linked folder as exposed to administrators. */\nexport interface AdminTeamFolder {\n\tteamId: string\n\tteamName: string\n\tfolder: TeamFolder | null\n}\n\n/**\n * Fetch all teams and their optionally linked team folders for the admin settings view.\n */\nexport async function getAdminTeamFolders(): Promise {\n\tconst { data } = await axios.get>(generateOcsUrl('/apps/circles/admin/teamfolders'))\n\treturn data.ocs.data\n}\n\n/**\n * Fetch the team folder linked to a team.\n *\n * The Circles app exposes the team-folder lifecycle through the core Teams\n * contract. The active provider is discovered server-side.\n *\n * @param teamId - The team single id\n * @return The linked team folder, or null if none exists.\n */\nexport async function getTeamFolder(teamId: string): Promise {\n\ttry {\n\t\tconst { data } = await axios.get>(generateOcsUrl('apps/circles/teams/{circleId}/folder', { circleId: teamId }))\n\t\treturn data.ocs.data\n\t} catch (error) {\n\t\tif (error && typeof error === 'object'\n\t\t\t&& 'response' in error\n\t\t\t&& (error.response as { status?: number })?.status === 404) {\n\t\t\treturn null\n\t\t}\n\t\tthrow error\n\t}\n}\n\n/**\n * Create a team folder for a team that predates the auto-create feature.\n *\n * Idempotent: if the team already owns a folder, the existing folder is\n * returned. Requires team owner privileges.\n *\n * @param teamId - The team single id\n * @param name - Optional team folder name\n * @return The created (or existing) team folder.\n */\nexport async function upgradeTeamFolder(teamId: string, name?: string): Promise {\n\tconst { data } = await axios.post>(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/folder', { circleId: teamId }),\n\t\t{ name },\n\t)\n\treturn data.ocs.data.folder\n}\n\n/**\n * Fetch team folders that are not yet linked to a team.\n *\n * @param teamId - The team single id\n */\nexport async function getLinkableTeamFolders(teamId: string): Promise {\n\tconst { data } = await axios.get>(generateOcsUrl('apps/circles/teams/{circleId}/folder/linkable', { circleId: teamId }))\n\treturn data.ocs.data\n}\n\n/**\n * Link a team to a team folder.\n *\n * @param teamId - The team single id\n * @param folderId - The id of the existing team folder\n */\nexport async function linkTeamFolder(teamId: string, folderId: number): Promise {\n\tconst { data } = await axios.post>(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/folder/link', { circleId: teamId }),\n\t\t{ folderId },\n\t)\n\treturn data.ocs.data.folder\n}\n\n/**\n * Update the storage quota of the team folder linked to a team.\n *\n * @param teamId - The team single id\n * @param quota - Quota in bytes, or zero for unlimited\n */\nexport async function updateTeamFolderQuota(teamId: string, quota: number): Promise {\n\tconst { data } = await axios.put>(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/folder/quota', { circleId: teamId }),\n\t\t{ quota },\n\t)\n\treturn data.ocs.data.folder\n}\n\n/**\n * Subfolder of the team folder holding the page files, inside the app's\n * own namespace of the hidden `.system` folder: the pages neither clutter\n * the files the team actually shares nor the `.system` root itself.\n */\nconst PAGES_FOLDER = '.system/teams/pages'\n\n/**\n * A team page: a markdown file stored in the team folder's hidden pages\n * subfolder, surfaced as a tab on the team.\n */\nexport interface TeamPage {\n\tfileId: number\n\t/** Page title: the file name without the .md extension. */\n\ttitle: string\n\t/** Path relative to the user's files root, as the Text editor expects. */\n\tfilePath: string\n}\n\n/**\n * List the team pages: the markdown files in the team folder's hidden\n * pages subfolder.\n *\n * @param mountPoint - The team folder mount point of the current user\n */\nexport async function fetchTeamPages(mountPoint: string): Promise {\n\tlet response\n\ttry {\n\t\tresponse = await getClient().getDirectoryContents(`${defaultRootPath}/${mountPoint}/${PAGES_FOLDER}`, {\n\t\t\tdetails: true,\n\t\t\tdata: getDefaultPropfind(),\n\t\t})\n\t} catch (error) {\n\t\t// 404 means the pages subfolder was not created yet (it appears with\n\t\t// the first page), or the team folder itself has not been physically\n\t\t// created — either way \"no pages\".\n\t\tif ((error as { status?: number })?.status === 404) {\n\t\t\treturn []\n\t\t}\n\t\tthrow error\n\t}\n\tconst data = Array.isArray(response) ? response : response.data\n\n\treturn data\n\t\t.map((entry) => resultToNode(entry, defaultRootPath))\n\t\t.filter((node) => node.type === FileType.File\n\t\t\t&& node.extension?.toLowerCase() === '.md'\n\t\t\t&& node.fileid !== undefined)\n\t\t.map((node) => ({\n\t\t\tfileId: node.fileid!,\n\t\t\ttitle: node.basename.slice(0, -node.extension!.length),\n\t\t\tfilePath: `/${mountPoint}/${PAGES_FOLDER}/${node.basename}`,\n\t\t}))\n\t\t.sort((a, b) => a.title.localeCompare(b.title))\n}\n\n/**\n * Create a team page: an empty markdown file in the team folder's hidden\n * pages subfolder, which appears with the first page.\n *\n * @param mountPoint - The team folder mount point of the current user\n * @param name - The page name (without extension)\n */\nexport async function createTeamPage(mountPoint: string, name: string): Promise {\n\tconst pagesFolder = `${defaultRootPath}/${mountPoint}/${PAGES_FOLDER}`\n\ttry {\n\t\t// Recursive: `.system` and the pages folder inside it appear with\n\t\t// the first page.\n\t\tawait getClient().createDirectory(pagesFolder, { recursive: true })\n\t} catch (error) {\n\t\t// 405: the folder appeared between the existence probe and the MKCOL.\n\t\tif ((error as { status?: number })?.status !== 405) {\n\t\t\tthrow error\n\t\t}\n\t}\n\tconst written = await getClient().putFileContents(`${pagesFolder}/${name}.md`, '', {\n\t\t// Refuse to overwrite an existing page of the same name\n\t\toverwrite: false,\n\t})\n\t// The webdav client returns false instead of throwing on the 412 an\n\t// existing page produces with overwrite disabled.\n\tif (written === false) {\n\t\tthrow Object.assign(new Error('A page with this name already exists'), { status: 412 })\n\t}\n}\n\n/**\n * Delete a team page: remove its markdown file from the team folder.\n *\n * @param page - The team page to delete\n */\nexport async function deleteTeamPage(page: TeamPage): Promise {\n\tawait getClient().deleteFile(`${defaultRootPath}${page.filePath}`)\n}\n\n/**\n * Rename a team page: move its markdown file to the new name within the\n * team folder. Refuses to overwrite an existing page of the same name.\n *\n * @param page - The team page to rename\n * @param name - The new page name (without extension)\n */\nexport async function renameTeamPage(page: TeamPage, name: string): Promise {\n\tconst directory = page.filePath.slice(0, page.filePath.lastIndexOf('/'))\n\tawait getClient().moveFile(\n\t\t`${defaultRootPath}${page.filePath}`,\n\t\t`${defaultRootPath}${directory}/${name}.md`,\n\t\t{ overwrite: false },\n\t)\n}\n\n/**\n * Fetch the team-level tab order (readable by every member).\n *\n * @param teamId - The team single id\n * @return Tab ids, first to last. Empty when no order has been saved.\n */\nexport async function fetchTabOrder(teamId: string): Promise {\n\tconst { data } = await axios.get>(generateOcsUrl('apps/circles/teams/{circleId}/tab-order', { circleId: teamId }))\n\treturn data.ocs.data.order ?? []\n}\n\n/**\n * Save the team-level tab order. Requires team admin or above.\n *\n * @param teamId - The team single id\n * @param order - Tab ids, first to last\n */\nexport async function saveTabOrder(teamId: string, order: string[]): Promise {\n\tawait axios.put(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/tab-order', { circleId: teamId }),\n\t\t{ order },\n\t)\n}\n\n/**\n * Fetch the resources shared to a team from the core teams resource\n * providers (Talk rooms, calendars, collectives, …).\n *\n * @param teamId - The team single id\n */\nexport async function fetchTeamResources(teamId: string): Promise {\n\tconst res = await axios.get>(generateOcsUrl('teams/{teamId}/resources', { teamId }))\n\treturn res.data.ocs.data.resources ?? []\n}\n\n/**\n * Create a collective named after a team. The collectives app links the\n * collective to the team by name, so no separate share step is needed.\n *\n * TODO: calls the collectives API directly; should eventually go through\n * a teams extension point instead of hardcoding another app's route.\n *\n * @param name - The collective name (the team's name)\n */\nexport async function createCollective(name: string): Promise {\n\tawait axios.post(\n\t\tgenerateOcsUrl('apps/collectives/api/v1.0/collectives'),\n\t\t{ name },\n\t)\n}\n\n/**\n * Create a Deck board linked to a team. The deck endpoint links the board\n * to the team itself, so no separate share step is needed.\n *\n * TODO: calls the deck API directly; should eventually go through a teams\n * extension point instead of hardcoding another app's route.\n *\n * @param teamId - The team single id\n * @param title - The board title\n */\nexport async function createDeckBoard(teamId: string, title: string): Promise {\n\tconst res = await axios.post>(\n\t\tgenerateOcsUrl('apps/deck/api/v1.0/boards/team'),\n\t\t{ title, teamId },\n\t)\n\tif (!res.data.ocs.data.id) {\n\t\tthrow new Error('The board creation response contains no board id')\n\t}\n}\n\n/** A deck board attached to the team itself, shown as a navigation entry. */\nexport interface TeamBoard {\n\tid: number\n\ttitle: string\n\t/** Absolute deep link to the board in the deck app. */\n\turl: string\n}\n\n/** The subset of deck's serialized board relevant here. */\ninterface RawDeckBoard {\n\tid: number\n\ttitle: string\n\tteamId?: string | null\n\tarchived?: boolean\n\tdeletedAt?: number\n}\n\n/**\n * Pick the deck boards attached to the team itself out of the shared deck\n * resources. The generic resource list cannot tell a team board from a\n * personally-shared one (and deck's board list omits teamId), so each\n * candidate is read individually from deck.\n *\n * TODO: calls the deck API directly; should eventually go through a teams\n * extension point instead of hardcoding another app's route.\n *\n * @param teamId - The team single id\n * @param candidates - The team's shared resources from the deck provider\n */\nexport async function fetchTeamDeckBoards(teamId: string, candidates: SharedResource[]): Promise {\n\tconst responses = await Promise.allSettled(candidates.map((resource) => axios.get>(generateOcsUrl('apps/deck/api/v1.0/board/{boardId}', { boardId: resource.id }))))\n\n\tconst boards: TeamBoard[] = []\n\tresponses.forEach((response, index) => {\n\t\tconst resource = candidates[index]\n\t\tif (response.status === 'rejected') {\n\t\t\t// The board stays reachable through the shared resources.\n\t\t\tlogger.warn('Could not read a deck board, not showing it as a tab', { resource, reason: response.reason })\n\t\t\treturn\n\t\t}\n\t\tconst board = response.value.data.ocs.data\n\t\tif (board.teamId === teamId && !board.archived && (board.deletedAt ?? 0) === 0) {\n\t\t\tboards.push({ id: board.id, title: board.title, url: resource.url })\n\t\t}\n\t})\n\n\treturn boards.sort((a, b) => a.title.localeCompare(b.title))\n}\n\n/**\n * Search for potential new members (users, groups, emails, contacts, other\n * teams…) using the same sharee autocompletion endpoint as file sharing.\n * This restores the legacy \"add members while creating a team\" feature for\n * the team creation wizard.\n *\n * @param term - The search query. An empty term returns curated recommendations.\n */\nexport async function searchMemberCandidates(term: string): Promise {\n\tconst suggestions: RawSuggestion[] = term.trim()\n\t\t? await getSuggestions(term)\n\t\t: await getRecommendations()\n\n\treturn suggestions.map((suggestion) => ({\n\t\tkey: suggestion.id,\n\t\tshareWith: suggestion.shareWith,\n\t\tshareType: suggestion.shareType,\n\t\tdisplayName: suggestion.label,\n\t\tisUser: suggestion.user !== null && suggestion.user !== undefined,\n\t}))\n}\n\n/**\n * Add a batch of picked candidates as members of a team, typically right\n * after creating it from the wizard.\n *\n * @param teamId - The team single id\n * @param candidates - The candidates picked in the wizard's member step\n * @return The number of candidates that were actually added.\n */\nexport async function addTeamMembers(teamId: string, candidates: MemberCandidate[]): Promise {\n\tconst members = candidates.map((candidate) => ({\n\t\tid: candidate.shareWith,\n\t\ttype: shareTypeToMemberType[candidate.shareType],\n\t}))\n\tconst res = await axios.post>>(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/members/multi', { circleId: teamId }),\n\t\t{ members },\n\t)\n\treturn Object.keys(res.data.ocs.data ?? {}).length\n}\n"],"names":["_sfc_main","defineComponent","__props","style","useCssModule","provide","NC_FORM_BOX_CONTEXT_KEY","_ctx","_cache","openBlock","createElementBlock","normalizeClass","renderSlot","ncFormBox","ncFormBox_row","ncFormBox__item","ncFormBox_col","style0","cssModules","NcFormBox","_export_sfc","_hoisted_1","slots","useSlots","formBoxItemClass","useNcFormBox","descriptionId","createElementId","hasDescription","unref","isLegacy","createElementVNode","createBlock","resolveDynamicComponent","mergeProps","$event","withCtx","createTextVNode","toDisplayString","createCommentVNode","formBoxItem","formBoxItem__description","formBoxItem_legacy","formBoxItem_inverted","formBoxItem__element","formBoxItem__content","formBoxItem__icon","NcFormBoxItem","mergeModels","__emit","modelValue","useModel","emit","inputId","watch","createSlots","withDirectives","vModelCheckbox","createVNode","NcIconToggleSwitch","formBoxSwitch__input","NcFormBoxSwitch","Member","data","circle","logger","Circle","MemberTypes","level","MemberLevels","text","initiator","owner","members","member","singleId","config","CircleConfigs","invitationCode","CircleEdit","getCircles","axios","generateOcsUrl","getCircle","circleId","createCircle","name","personal","local","deleteCircle","editCircle","type","value","joinCircle","leaveCircle","getCircleMembers","search","role","limit","addMembers","deleteMember","memberId","response","changeMemberLevel","acceptMember","editCircleSetting","setting","getInvitation","joinInvitation","createInvitationLink","revokeInvitationLink","props","loading","ref","isChecked","onChange","checked","confirmEnableFederationForCircle","prevConfig","nextConfig","circleData","error","showError","t","showConfirmation","_createBlock","_unref","_openBlock","_createElementBlock","_Fragment","_renderList","label","useButtonLink","options","reactive","hasVueRouterContext","inject","routerKey","tag","computed","isLink","isHyperLink","isRouterLink","isButton","attrs","toRef","icon","mdiOpenInNew","mdiArrowTopRight","NcIconSvgWrapper","formBoxButton","NcFormBoxButton","register","t22","DELAY","useCopy","content","isCopied","mdiCheck","mdiContentCopy","altText","copy","toValue","whenever","_hoisted_3","_mergeProps","$props","_createElementVNode","CopyToClipboardMixin","url","showSuccess","Autorenew","LinkOff","LinkPlus","NcFormBoxCopyButton","getBaseUrl","generateUrl","message","action","_component_NcFormBox","$options","_createVNode","_component_NcFormBoxCopyButton","_component_NcFormBoxButton","_component_Autorenew","_component_LinkOff","_component_LinkPlus","MEMBER_LEVEL_NONE","MEMBER_LEVEL_MEMBER","MEMBER_LEVEL_MODERATOR","MEMBER_LEVEL_ADMIN","MEMBER_LEVEL_OWNER","MEMBER_TYPE_USER","MEMBER_TYPE_GROUP","MEMBER_TYPE_MAIL","MEMBER_TYPE_CONTACT","MEMBER_TYPE_CIRCLE","CIRCLE_CONFIG_PERSONAL","CIRCLE_CONFIG_SYSTEM","CIRCLE_CONFIG_VISIBLE","CIRCLE_CONFIG_OPEN","CIRCLE_CONFIG_INVITE","CIRCLE_CONFIG_REQUEST","CIRCLE_CONFIG_FRIEND","CIRCLE_CONFIG_PROTECTED","CIRCLE_CONFIG_NO_OWNER","CIRCLE_CONFIG_HIDDEN","CIRCLE_CONFIG_BACKEND","CIRCLE_CONFIG_LOCAL","CIRCLE_CONFIG_ROOT","CIRCLE_CONFIG_CIRCLE_INVITE","CIRCLE_CONFIG_FEDERATED","CIRCLES_MEMBER_LEVELS","PUBLIC_CIRCLE_CONFIG","CircleConfigCheckboxesList","CircleConfigInvitationLink","CIRCLES_MEMBER_GROUPING","ShareType","SHARES_TYPES_MEMBER_MAP","list","entry","MemberStatus","shareType","maxAutocompleteResults","getSuggestions","request","exact","rawExactSuggestions","arr","elem","rawSuggestions","result","exactSuggestions","share","formatResults","a","b","suggestions","allSuggestions","nameCounts","finalResults","item","getRecommendations","shareTypeToMemberType","levelToRole","mapResource","raw","mapPreviewMember","mapFullMember","fetchTeams","circlesRes","dashRes","circles","dashboard","dashboardById","team","extra","fetchTeamMembers","teamId","createTeam","createTeamFolder","setTeamDescription","description","leaveTeam","deleteTeam","getAdminTeamFolders","getTeamFolder","upgradeTeamFolder","getLinkableTeamFolders","linkTeamFolder","folderId","updateTeamFolderQuota","quota","PAGES_FOLDER","fetchTeamPages","mountPoint","getClient","defaultRootPath","getDefaultPropfind","resultToNode","node","FileType","createTeamPage","pagesFolder","deleteTeamPage","page","renameTeamPage","directory","fetchTabOrder","saveTabOrder","order","fetchTeamResources","createCollective","createDeckBoard","title","fetchTeamDeckBoards","candidates","responses","resource","boards","index","board","searchMemberCandidates","term","suggestion","addTeamMembers","candidate","res"],"mappings":"gtBAIA,MAAMA,GAA4BC,EAAgB,CAChD,OAAQ,YACR,MAAO,CACL,IAAK,CAAE,KAAM,OAAO,CACxB,EACE,MAAMC,EAAS,CACb,MAAMC,EAAQC,GAAY,EAC1B,OAAAC,GAAQC,GAAyB,CAC/B,YAAa,GACb,iBAAkBH,EAAM,eAC9B,CAAK,EACM,CAACI,EAAMC,KACLC,EAAS,EAAIC,EAAmB,MAAO,CAC5C,MAAOC,EAAe,CAACJ,EAAK,OAAO,UAAWL,EAAQ,IAAMK,EAAK,OAAO,cAAgBA,EAAK,OAAO,aAAa,CAAC,CAC1H,EAAS,CACDK,EAAWL,EAAK,OAAQ,UAAW,CACjC,UAAWA,EAAK,OAAO,eACjC,CAAS,CACT,EAAS,CAAC,EAER,CACF,CAAC,EACKM,GAAY,mBACZC,GAAgB,uBAChBC,GAAkB,yBAClBC,GAAgB,uBAChBC,GAAS,CACb,uBAAwB,8BACxB,UAAAJ,GACA,cAAAC,GACA,gBAAAC,GACA,cAAAC,EACF,EACME,GAAa,CACjB,OAAUD,EACZ,EACME,GAA4BC,EAAYpB,GAAW,CAAC,CAAC,eAAgBkB,EAAU,CAAC,CAAC,EClCjFG,GAAa,CAAC,IAAI,EAClBrB,GAA4BC,EAAgB,CAC3C,aAAc,GACnB,OAAQ,gBACR,MAAO,CACL,IAAK,CAAA,EACL,MAAO,CAAE,QAAS,IAAA,CAAA,CAAY,EAC9B,YAAa,CAAE,QAAS,IAAA,CAAA,CAAY,EACpC,eAAgB,CAAE,KAAM,QAAS,QAAS,EAAK,EAC/C,MAAO,CAAE,QAAS,IAAA,CAAA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AAe/C,EAAgBsC,EAAgD,CACpG,MAAM/N,EAAU+N,EAAW,IAAKU,IAAe,CAC9C,GAAIA,EAAU,UACd,KAAM/D,GAAsB+D,EAAU,SAAS,CAAA,EAC9C,EACIC,EAAM,MAAMlO,EAAM,KACvBC,EAAe,gDAAiD,CAAE,SAAUgL,EAAQ,EACpF,CAAE,QAAAzL,CAAA,CAAQ,EAEX,OAAO,OAAO,KAAK0O,EAAI,KAAK,IAAI,MAAQ,CAAA,CAAE,EAAE,MAC7C","x_google_ignoreList":[0,1,2,7,8,9,10,11,12]} \ No newline at end of file +{"version":3,"file":"api-BcnqSuh8.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcFormBox-Bmqar8nn.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxItem-Cm8aZaVJ.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxSwitch-DSXiQcnq.mjs","../src/teams/team-page/models/member.ts","../src/teams/team-page/models/circle.ts","../src/teams/team-page/services/circles.ts","../src/teams/team-page/components/CircleDetails/CircleConfigs/CircleConfigCheckboxesList.vue","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxButton-G_PkUiQy.mjs","../node_modules/@nextcloud/vue/dist/chunks/useCopy-6F-qWHq0.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-BA_gWnmz.mjs","../node_modules/vue-material-design-icons/Autorenew.vue","../node_modules/vue-material-design-icons/LinkOff.vue","../node_modules/vue-material-design-icons/LinkPlus.vue","../src/teams/team-page/mixins/CopyToClipboardMixin.js","../src/teams/team-page/components/CircleDetails/CircleConfigs/CircleConfigInvitationLink.vue","../src/teams/team-page/models/constants.ts","../src/teams/team-page/services/collaborationAutocompletion.js","../src/teams/api.ts"],"sourcesContent":["import '../assets/NcFormBox-TRgICDO3.css';\nimport { defineComponent, useCssModule, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from \"vue\";\nimport { N as NC_FORM_BOX_CONTEXT_KEY } from \"./useNcFormBox-Djlh582y.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBox\",\n props: {\n row: { type: Boolean }\n },\n setup(__props) {\n const style = useCssModule();\n provide(NC_FORM_BOX_CONTEXT_KEY, {\n isInFormBox: true,\n formBoxItemClass: style.ncFormBox__item\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([_ctx.$style.ncFormBox, __props.row ? _ctx.$style.ncFormBox_row : _ctx.$style.ncFormBox_col])\n }, [\n renderSlot(_ctx.$slots, \"default\", {\n itemClass: _ctx.$style.ncFormBox__item\n })\n ], 2);\n };\n }\n});\nconst ncFormBox = \"_ncFormBox_s7kf-\";\nconst ncFormBox_row = \"_ncFormBox_row_GzYuE\";\nconst ncFormBox__item = \"_ncFormBox__item_691pI\";\nconst ncFormBox_col = \"_ncFormBox_col_Lt4lg\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_JPsV1\",\n ncFormBox,\n ncFormBox_row,\n ncFormBox__item,\n ncFormBox_col\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBox = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBox as N\n};\n//# sourceMappingURL=NcFormBox-Bmqar8nn.mjs.map\n","import '../assets/NcFormBoxItem-CABDVZLe.css';\nimport { defineComponent, useSlots, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from \"vue\";\nimport { u as useNcFormBox } from \"./useNcFormBox-Djlh582y.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { a as isLegacy } from \"./legacy-BoqDmOCa.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _hoisted_1 = [\"id\"];\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{ inheritAttrs: false },\n __name: \"NcFormBoxItem\",\n props: {\n tag: {},\n label: { default: () => void 0 },\n description: { default: () => void 0 },\n invertedAccent: { type: Boolean, default: false },\n class: { default: () => void 0 },\n itemClasses: { default: () => void 0 }\n },\n emits: [\"click\"],\n setup(__props) {\n const slots = useSlots();\n const { formBoxItemClass } = useNcFormBox();\n const descriptionId = createElementId();\n const hasDescription = () => !!__props.description || !!slots.description;\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([\n __props.class,\n _ctx.$style.formBoxItem,\n unref(formBoxItemClass),\n {\n [_ctx.$style.formBoxItem_inverted]: __props.invertedAccent && hasDescription(),\n [_ctx.$style.formBoxItem_legacy]: unref(isLegacy)\n }\n ])\n }, [\n createElementVNode(\"span\", {\n class: normalizeClass(_ctx.$style.formBoxItem__content)\n }, [\n (openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({\n class: [_ctx.$style.formBoxItem__element, __props.itemClasses]\n }, _ctx.$attrs, {\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { descriptionId: unref(descriptionId) }, () => [\n createTextVNode(toDisplayString(__props.label || \"⚠️ Label is missing\"), 1)\n ])\n ]),\n _: 3\n }, 16, [\"class\"])),\n hasDescription() ? (openBlock(), createElementBlock(\"span\", {\n key: 0,\n id: unref(descriptionId),\n class: normalizeClass(_ctx.$style.formBoxItem__description)\n }, [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(__props.description), 1)\n ])\n ], 10, _hoisted_1)) : createCommentVNode(\"\", true)\n ], 2),\n createElementVNode(\"span\", {\n class: normalizeClass(_ctx.$style.formBoxItem__icon)\n }, [\n renderSlot(_ctx.$slots, \"icon\", { descriptionId: unref(descriptionId) }, () => [\n _cache[1] || (_cache[1] = createTextVNode(\" ⚠️ Icon is missing \", -1))\n ])\n ], 2)\n ], 2);\n };\n }\n});\nconst formBoxItem = \"_formBoxItem_Gp-TA\";\nconst formBoxItem__description = \"_formBoxItem__description_UqZJ1\";\nconst formBoxItem_legacy = \"_formBoxItem_legacy_dP9aJ\";\nconst formBoxItem_inverted = \"_formBoxItem_inverted_BU-i-\";\nconst formBoxItem__element = \"_formBoxItem__element_jHCux\";\nconst formBoxItem__content = \"_formBoxItem__content_UKovC\";\nconst formBoxItem__icon = \"_formBoxItem__icon_AvkP3\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_8BFGk\",\n formBoxItem,\n formBoxItem__description,\n formBoxItem_legacy,\n formBoxItem_inverted,\n formBoxItem__element,\n formBoxItem__content,\n formBoxItem__icon\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBoxItem = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBoxItem as N\n};\n//# sourceMappingURL=NcFormBoxItem-Cm8aZaVJ.mjs.map\n","import '../assets/NcFormBoxSwitch-NCjook_Z.css';\nimport { defineComponent, useModel, watch, openBlock, createBlock, unref, createSlots, withCtx, withDirectives, createElementVNode, normalizeClass, vModelCheckbox, createVNode, renderSlot, createTextVNode, toDisplayString, mergeModels } from \"vue\";\nimport { N as NcFormBoxItem } from \"./NcFormBoxItem-Cm8aZaVJ.mjs\";\nimport { N as NcIconToggleSwitch } from \"./NcIconToggleSwitch-CRvGt4su.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _hoisted_1 = [\"id\", \"aria-describedby\", \"disabled\"];\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBoxSwitch\",\n props: /* @__PURE__ */ mergeModels({\n label: { default: () => void 0 },\n description: { default: () => void 0 },\n disabled: { type: Boolean, default: false }\n }, {\n \"modelValue\": { type: Boolean, ...{ required: true } },\n \"modelModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"enable\", \"disable\"], [\"update:modelValue\"]),\n setup(__props, { emit: __emit }) {\n const modelValue = useModel(__props, \"modelValue\");\n const emit = __emit;\n const inputId = createElementId();\n watch(modelValue, () => {\n if (modelValue.value) {\n emit(\"enable\");\n } else {\n emit(\"disable\");\n }\n }, {\n // defineModel emits update:modelValue synchronously\n // Watching it synchronously to emit the enable/disable events together with the update:modelValue event\n flush: \"sync\"\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(NcFormBoxItem, {\n tag: \"label\",\n for: unref(inputId)\n }, createSlots({\n icon: withCtx(({ descriptionId }) => [\n withDirectives(createElementVNode(\"input\", {\n id: unref(inputId),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),\n class: normalizeClass(_ctx.$style.formBoxSwitch__input),\n type: \"checkbox\",\n role: \"switch\",\n \"aria-describedby\": descriptionId,\n disabled: __props.disabled\n }, null, 10, _hoisted_1), [\n [vModelCheckbox, modelValue.value]\n ]),\n createVNode(NcIconToggleSwitch, {\n checked: modelValue.value,\n inline: \"\"\n }, null, 8, [\"checked\"])\n ]),\n _: 2\n }, [\n _ctx.$slots.default || __props.label ? {\n name: \"default\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(__props.label), 1)\n ])\n ]),\n key: \"0\"\n } : void 0,\n _ctx.$slots.description || __props.description ? {\n name: \"description\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(__props.description), 1)\n ])\n ]),\n key: \"1\"\n } : void 0\n ]), 1032, [\"for\"]);\n };\n }\n});\nconst formBoxSwitch__input = \"_formBoxSwitch__input_n8432\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_v0XYD\",\n formBoxSwitch__input\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBoxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBoxSwitch as N\n};\n//# sourceMappingURL=NcFormBoxSwitch-DSXiQcnq.mjs.map\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MemberLevel, MemberType } from './constants.ts'\n\nimport { logger } from '../../../logger.ts'\nimport Circle from './circle.ts'\nimport { MemberLevels, MemberTypes } from './constants.ts'\n\nexport default class Member {\n\t_data: any = {}\n\t_circle: Circle\n\n\t/**\n\t * Creates an instance of Member\n\t *\n\t * @param data\n\t * @param circle\n\t */\n\tconstructor(data: any, circle: Circle) {\n\t\tif (typeof data !== 'object') {\n\t\t\tthrow new Error('Invalid member')\n\t\t}\n\n\t\t// if no uid set, fail\n\t\tif (data.id && typeof data.id !== 'string') {\n\t\t\tlogger.error('This member do not have a proper uid', data)\n\t\t\tthrow new Error('This member do not have a proper uid')\n\t\t}\n\n\t\tthis._circle = circle\n\t\tthis._data = data\n\t}\n\n\t/**\n\t * Get the circle of this member\n\t */\n\tget circle(): Circle {\n\t\treturn this._circle\n\t}\n\n\t/**\n\t * Set the circle of this member\n\t */\n\tset circle(circle: Circle) {\n\t\tif (circle.constructor.name !== Circle.name) {\n\t\t\tthrow new Error('circle must be a Circle type')\n\t\t}\n\t\tthis._circle = circle\n\t}\n\n\t/**\n\t * Member id\n\t */\n\tget id(): string {\n\t\treturn this._data.id\n\t}\n\n\t/**\n\t * Single uid\n\t */\n\tget singleId(): string {\n\t\treturn this._data.singleId\n\t}\n\n\t/**\n\t * Formatted display name\n\t */\n\tget displayName(): string {\n\t\treturn this._data.displayName\n\t}\n\n\t/**\n\t * Member userId\n\t */\n\tget userId(): string {\n\t\treturn this._data.userId\n\t}\n\n\t/**\n\t * Member type\n\t */\n\tget userType(): MemberType {\n\t\t// If the user type is a circle, this could originate from multiple sources\n\t\treturn this._data.userType !== MemberTypes.CIRCLE\n\t\t\t? this._data.userType\n\t\t\t: this.basedOn.source\n\t}\n\n\t/**\n\t * Member based on source\n\t */\n\tget basedOn(): any {\n\t\treturn this._data.basedOn\n\t}\n\n\t/**\n\t * Member level\n\t *\n\t */\n\tget level(): MemberLevel {\n\t\treturn this._data.level\n\t}\n\n\t/**\n\t * Set member level\n\t */\n\tset level(level: MemberLevel) {\n\t\tif (!(level in MemberLevels)) {\n\t\t\tthrow new Error('Invalid level')\n\t\t}\n\t\tthis._data.level = level\n\t}\n\n\t/**\n\t * Member request status\n\t *\n\t */\n\tget status(): string {\n\t\treturn this._data.status\n\t}\n\n\t/**\n\t * Is the current member a user?\n\t */\n\tget isUser() {\n\t\treturn this._data.userType === MemberLevels.MEMBER\n\t}\n\n\t/**\n\t * Is the current member without a circle?\n\t */\n\tget isOrphan() {\n\t\treturn this._circle?.constructor?.name !== Circle.name\n\t}\n\n\t/**\n\t * Delete this member and any reference from its circle\n\t */\n\tdelete() {\n\t\tif (this.isOrphan) {\n\t\t\tthrow new Error('Cannot delete this member as it doesn\\'t belong to any circle')\n\t\t}\n\t\tthis.circle.deleteMember(this)\n\t\tthis._data = undefined\n\t}\n}\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { CircleConfigs, MemberLevels, ROUTE_CIRCLE } from './constants.ts'\nimport Member from './member.ts'\nimport { logger } from '../../../logger.ts'\n\ntype MemberList = Record\n\nexport default class Circle {\n\t_data: any = {}\n\t_members: MemberList = {}\n\t_owner: Member\n\t_initiator: Member\n\n\t/**\n\t * Creates an instance of Circle\n\t *\n\t * @param data\n\t */\n\tconstructor(data: object) {\n\t\tthis.updateData(data)\n\t}\n\n\t/**\n\t * Update inner circle data, owner and initiator\n\t *\n\t * @param data\n\t */\n\tupdateData(data: any) {\n\t\tif (typeof data !== 'object') {\n\t\t\tthrow new Error('Invalid circle')\n\t\t}\n\n\t\t// if no uid set, fail\n\t\tif (!data.id) {\n\t\t\tthrow new Error('This circle do not have a proper uid')\n\t\t}\n\n\t\tthis._data = data\n\t\tthis._owner = new Member(data.owner, this)\n\n\t\tif (data.initiator) {\n\t\t\tthis._initiator = new Member(data.initiator, this)\n\t\t}\n\t}\n\n\t// METADATA -----------------------------------------\n\t/**\n\t * Circle id\n\t */\n\tget id(): string {\n\t\treturn this._data.id\n\t}\n\n\t/**\n\t * Formatted display name\n\t */\n\tget displayName(): string {\n\t\treturn this._data.displayName\n\t}\n\n\t/**\n\t * Set the display name\n\t */\n\tset displayName(text: string) {\n\t\tthis._data.displayName = text\n\t}\n\n\t/**\n\t * Circle creation date\n\t */\n\tget creation(): number {\n\t\treturn this._data.creation\n\t}\n\n\t/**\n\t * Circle description\n\t */\n\tget description(): string {\n\t\treturn this._data.description\n\t}\n\n\t/**\n\t * Circle description\n\t */\n\tset description(text: string) {\n\t\tthis._data.description = text\n\t}\n\n\t/**\n\t * Circle direct member count (excluding nested circles)\n\t */\n\tget population() {\n\t\treturn this._data.population\n\t}\n\n\t/**\n\t * Circle total member count (direct + inherited from nested circles)\n\t */\n\tget populationInherited() {\n\t\treturn this._data.populationInherited\n\t}\n\n\t// MEMBERSHIP -----------------------------------------\n\t/**\n\t * Circle ini_initiator the current\n\t * user info for this circle\n\t * null if not a member\n\t */\n\tget initiator(): Member | null {\n\t\treturn this._initiator\n\t}\n\n\t/**\n\t * Set new circle initiator\n\t * null if not a member\n\t */\n\tset initiator(initiator: Member) {\n\t\tif (initiator && initiator.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Initiator must be a Member type')\n\t\t}\n\t\tthis._initiator = initiator\n\t}\n\n\t/**\n\t * Circle ownership\n\t */\n\tget owner(): Member {\n\t\treturn this._owner\n\t}\n\n\t/**\n\t * Set new circle owner\n\t */\n\tset owner(owner: Member) {\n\t\tif (owner.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Owner must be a Member type')\n\t\t}\n\t\tthis._owner = owner\n\t}\n\n\t/**\n\t * Circle members\n\t */\n\tget members(): MemberList {\n\t\treturn this._members\n\t}\n\n\t/**\n\t * Define members circle\n\t */\n\tset members(members: MemberList) {\n\t\tthis._members = members\n\t}\n\n\t/**\n\t * Add a member to this circle\n\t *\n\t * @param member\n\t */\n\taddMember(member: Member) {\n\t\tif (member.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Member must be a Member type')\n\t\t}\n\n\t\tconst singleId = member.singleId\n\t\tif (this._members[singleId]) {\n\t\t\tlogger.warn('Replacing existing member data', { member })\n\t\t}\n\t\tthis._members[singleId] = member\n\t}\n\n\t/**\n\t * Remove a member from this circle\n\t *\n\t * @param member\n\t */\n\tdeleteMember(member: Member) {\n\t\tif (member.constructor.name !== Member.name) {\n\t\t\tthrow new Error('Member must be a Member type')\n\t\t}\n\n\t\tconst singleId = member.singleId\n\t\tif (!this._members[singleId]) {\n\t\t\tlogger.warn('The member was not in this circle. Nothing was done.', { member })\n\t\t}\n\n\t\t// Delete and clear memory\n\t\tdelete this._members[singleId]\n\t}\n\n\t// CONFIGS --------------------------------------------\n\tget settings() {\n\t\treturn this._data.settings\n\t}\n\n\t/**\n\t * Circle config\n\t */\n\tget config(): number {\n\t\treturn this._data.config\n\t}\n\n\t/**\n\t * Define circle config\n\t */\n\tset config(config: number) {\n\t\tthis._data.config = config\n\t}\n\n\t/**\n\t * Circle is personal\n\t */\n\tget isPersonal() {\n\t\treturn (this._data.config & CircleConfigs.PERSONAL) !== 0\n\t}\n\n\t/**\n\t * Circle requires invite to be confirmed by moderator or above\n\t */\n\tget requireJoinAccept() {\n\t\treturn (this._data.config & CircleConfigs.VISIBLE) !== 0\n\t}\n\n\t/**\n\t * Circle can be requested to join\n\t */\n\tget canJoin() {\n\t\treturn (this._data.config & CircleConfigs.OPEN) !== 0\n\t}\n\n\t/**\n\t * Circle is visible to others\n\t */\n\tget isVisible() {\n\t\treturn (this._data.config & CircleConfigs.VISIBLE) !== 0\n\t}\n\n\t/**\n\t * Circle requires invite to be accepted by the member\n\t */\n\tget requireInviteAccept() {\n\t\treturn (this._data.config & CircleConfigs.INVITE) !== 0\n\t}\n\n\t// PERMISSIONS SHORTCUTS ------------------------------\n\t/**\n\t * Can the initiator add members to this circle?\n\t */\n\tget isOwner() {\n\t\treturn this.initiator?.level === MemberLevels.OWNER\n\t}\n\n\t// PERMISSIONS SHORTCUTS ------------------------------\n\t/**\n\t * Is the initiator an admin of this circle?\n\t */\n\tget isAdmin() {\n\t\treturn this.initiator?.level === MemberLevels.ADMIN\n\t}\n\n\t/**\n\t * Is the initiator a member of this circle?\n\t */\n\tget isMember() {\n\t\treturn this.initiator?.level\n\t\t\t&& this.initiator?.level > MemberLevels.NONE\n\t}\n\n\t/**\n\t * Is the initiator a pending member of this circle?\n\t */\n\tget isPendingMember() {\n\t\treturn this.initiator?.level === MemberLevels.NONE\n\t}\n\n\t/**\n\t * Can the initiator delete this circle?\n\t */\n\tget canDelete() {\n\t\treturn this.isOwner\n\t}\n\n\t/**\n\t * Can the initiator leave this circle?\n\t */\n\tget canLeave() {\n\t\treturn this.isMember && !this.isOwner\n\t}\n\n\t/**\n\t * Can the initiator add/remove members to this circle?\n\t */\n\tget canManageMembers() {\n\t\treturn (this.initiator?.level\n\t\t\t&& this.initiator?.level >= MemberLevels.MODERATOR)\n\t\t|| (this.config & CircleConfigs.FRIEND) !== 0\n\t}\n\n\t// PARAMS ---------------------------------------------\n\t/**\n\t * Vue router param\n\t */\n\tget router() {\n\t\treturn {\n\t\t\tname: 'team',\n\t\t\tparams: { teamId: this.id },\n\t\t}\n\t}\n\n\tget invitationCode() {\n\t\treturn this._data.invitationCode\n\t}\n\n\tset invitationCode(invitationCode: string) {\n\t\tthis._data.invitationCode = invitationCode\n\t}\n\n\t/**\n\t * Default javascript fallback\n\t * Used for sorting as well\n\t */\n\ttoString() {\n\t\treturn this.displayName\n\t}\n}\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { MemberLevel, MemberType } from '../models/constants.ts'\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { MemberLevels } from '../models/constants.ts'\ninterface MemberPairs {\n\tid: string\n\ttype: MemberType\n}\n\ntype CircleEditType = 'name' | 'description' | 'settings' | 'config'\nexport enum CircleEdit {\n\tName = 'name',\n\tDescription = 'description',\n\tSettings = 'settings',\n\tConfig = 'config',\n}\n\ninterface CircleSetting {\n\tsetting: string\n\tvalue: string\n}\n\n/**\n * Get the circles list without the members\n *\n * @return\n */\nexport async function getCircles() {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/circles'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Get a specific circle\n *\n * @param circleId\n * @return\n */\nexport async function getCircle(circleId: string) {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/circles/{circleId}', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new circle\n *\n * @param name the circle name\n * @param personal\n * @param local\n * @return\n */\nexport async function createCircle(name: string, personal: boolean, local: boolean) {\n\tconst response = await axios.post(generateOcsUrl('apps/circles/circles'), {\n\t\tname,\n\t\tpersonal,\n\t\tlocal,\n\t})\n\treturn response.data.ocs.data\n}\n\n/**\n * Delete an existing circle\n *\n * @param circleId the circle id\n * @return\n */\nexport async function deleteCircle(circleId: string) {\n\tconst response = await axios.delete(generateOcsUrl('apps/circles/circles/{circleId}', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Edit an existing circle\n *\n * @param circleId the circle id\n * @param type the edit type\n * @param data the data\n * @param value\n * @return\n */\nexport async function editCircle(circleId: string, type: CircleEditType, value: any) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/{type}', { circleId, type }), { value })\n\treturn response.data.ocs.data\n}\n\n/**\n * Join a circle\n *\n * @param circleId the circle id\n * @return\n */\nexport async function joinCircle(circleId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/join', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Leave a circle\n *\n * @param circleId the circle id\n * @return\n */\nexport async function leaveCircle(circleId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/leave', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Get the circle members without the members\n *\n * @param circleId the circle id\n * @param search the search query\n * @param role the role\n * @param limit the limit\n * @return\n */\nexport async function getCircleMembers(circleId: string, search?: string, role?: string, limit?: number) {\n\tconst response = await axios.get(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/members', { circleId }),\n\t\t{\n\t\t\tparams: {\n\t\t\t\tsearch,\n\t\t\t\trole,\n\t\t\t\t...(limit ? { limit } : {}),\n\t\t\t},\n\t\t},\n\t)\n\treturn response.data.ocs.data\n}\n\n/**\n * Search a potential circle member\n *\n * @param term the search query\n * @return\n */\nexport async function searchMember(term: string) {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/search?term={term}', { term }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Add a circle member\n *\n * @param circleId the circle id\n * @param members the member id\n * @return\n */\nexport async function addMembers(circleId: string, members: Array) {\n\tconst response = await axios.post(generateOcsUrl('apps/circles/circles/{circleId}/members/multi', { circleId }), { members })\n\treturn response.data.ocs.data\n}\n\n/**\n * Delete a circle member\n *\n * @param circleId the circle id\n * @param memberId the member id\n * @return\n */\nexport async function deleteMember(circleId: string, memberId: string) {\n\tconst response = await axios.delete(generateOcsUrl('apps/circles/circles/{circleId}/members/{memberId}', { circleId, memberId }))\n\treturn Object.values(response.data.ocs.data)\n}\n\n/**\n * change a member level\n *\n * @see levels file src/models/constants.js\n *\n * @param circleId the circle id\n * @param memberId the member id\n * @param level the new member level\n * @return\n */\nexport async function changeMemberLevel(circleId: string, memberId: string, level: MemberLevel) {\n\tif (!(level in MemberLevels)) {\n\t\tthrow new Error('Invalid level.')\n\t}\n\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/members/{memberId}/level', { circleId, memberId }), {\n\t\tlevel,\n\t})\n\treturn Object.values(response.data.ocs.data)\n}\n\n/**\n * Accept a circle member request\n *\n * @param circleId the circle id\n * @param memberId the member id\n * @return\n */\nexport async function acceptMember(circleId: string, memberId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/members/{memberId}', { circleId, memberId }))\n\treturn response.data.ocs.data\n}\n\nexport async function editCircleSetting(circleId: string, setting: CircleSetting) {\n\tconst response = await axios.put(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/setting', { circleId }),\n\t\tsetting,\n\t)\n\treturn response.data.ocs.data\n}\n\n/**\n * Get a specific invitation\n *\n * @param invitationCode\n * @return\n */\nexport async function getInvitation(invitationCode: string) {\n\tconst response = await axios.get(generateOcsUrl('apps/circles/invitations/{invitationCode}', { invitationCode }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Join a circle using an invitation\n *\n * @param invitationCode\n * @return\n */\nexport async function joinInvitation(invitationCode: string) {\n\tconst response = await axios.post(generateOcsUrl('apps/circles/invitations/{invitationCode}', { invitationCode }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create an invitation link for a circle\n *\n * @param circleId\n * @return\n */\nexport async function createInvitationLink(circleId: string) {\n\tconst response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/invitation', { circleId }))\n\treturn response.data.ocs.data\n}\n\n/**\n * Revoke the invitation link of a circle\n *\n * @param circleId\n * @return\n */\nexport async function revokeInvitationLink(circleId: string) {\n\tconst response = await axios.delete(generateOcsUrl('apps/circles/circles/{circleId}/invitation', { circleId }))\n\treturn response.data.ocs.data\n}\n","\n\n\n\n\n","import '../assets/NcFormBoxButton-ClkxmO-H.css';\nimport { reactive, inject, computed, defineComponent, toRef, openBlock, createBlock, mergeProps, unref, createSlots, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from \"vue\";\nimport { s as mdiOpenInNew, t as mdiArrowTopRight } from \"./mdi-CpchYUUV.mjs\";\nimport { N as NcFormBoxItem } from \"./NcFormBoxItem-Cm8aZaVJ.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-g8ubWhoz.mjs\";\nimport { routerKey } from \"vue-router\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction useButtonLink(options) {\n const props = reactive(options);\n const hasVueRouterContext = inject(routerKey, null) !== null;\n const tag = computed(() => {\n if (hasVueRouterContext && props.to) {\n return \"RouterLink\";\n } else if (props.href) {\n return \"a\";\n } else {\n return \"button\";\n }\n });\n const isLink = computed(() => tag.value === \"RouterLink\" || tag.value === \"a\");\n const isHyperLink = computed(() => tag.value === \"a\");\n const isRouterLink = computed(() => tag.value === \"RouterLink\");\n const isButton = computed(() => tag.value === \"button\");\n const attrs = computed(() => {\n if (tag.value === \"RouterLink\") {\n return {\n to: props.to,\n activeClass: \"active\",\n ...props.additionalAttrs?.(\"RouterLink\") ?? {}\n };\n } else if (tag.value === \"a\") {\n return {\n href: props.href,\n target: props.target,\n download: props.download || void 0,\n rel: \"nofollow noreferrer noopener\",\n ...props.additionalAttrs?.(\"a\") ?? {}\n };\n } else if (tag.value === \"button\") {\n return {\n type: props.type || \"button\",\n disabled: props.disabled,\n ...props.additionalAttrs?.(\"button\") ?? {}\n };\n }\n });\n return {\n tag,\n isLink,\n isHyperLink,\n isRouterLink,\n isButton,\n attrs\n };\n}\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBoxButton\",\n props: {\n label: { default: () => void 0 },\n description: { default: () => void 0 },\n invertedAccent: { type: Boolean, default: false },\n to: { default: () => void 0 },\n href: { default: () => void 0 },\n target: { default: () => void 0 },\n disabled: { type: Boolean, default: false }\n },\n emits: [\"click\"],\n setup(__props) {\n const { tag, attrs, isLink } = useButtonLink({\n to: toRef(() => __props.to),\n href: toRef(() => __props.href),\n target: toRef(() => __props.target),\n disabled: toRef(() => __props.disabled)\n });\n const icon = computed(() => {\n if (isLink.value) {\n return __props.target === \"_blank\" ? mdiOpenInNew : mdiArrowTopRight;\n }\n return void 0;\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(NcFormBoxItem, mergeProps({\n tag: unref(tag),\n itemClasses: [\n \"button-vue\",\n /* Reset server's global HTML button styles */\n _ctx.$style.formBoxButton\n ],\n invertedAccent: __props.invertedAccent\n }, unref(attrs), {\n tabindex: \"0\",\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n }), createSlots({ _: 2 }, [\n _ctx.$slots.default || __props.label ? {\n name: \"default\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(__props.label), 1)\n ])\n ]),\n key: \"0\"\n } : void 0,\n _ctx.$slots.description || __props.description ? {\n name: \"description\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"description\", {}, () => [\n createTextVNode(toDisplayString(__props.description), 1)\n ])\n ]),\n key: \"1\"\n } : void 0,\n _ctx.$slots.icon || icon.value ? {\n name: \"icon\",\n fn: withCtx(() => [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n icon.value ? (openBlock(), createBlock(NcIconSvgWrapper, {\n key: 0,\n path: icon.value,\n inline: \"\"\n }, null, 8, [\"path\"])) : createCommentVNode(\"\", true)\n ])\n ]),\n key: \"2\"\n } : void 0\n ]), 1040, [\"tag\", \"itemClasses\", \"invertedAccent\"]);\n };\n }\n});\nconst formBoxButton = \"_formBoxButton_E8Xfr\";\nconst style0 = {\n \"material-design-icon\": \"_material-design-icon_MaIxG\",\n formBoxButton\n};\nconst cssModules = {\n \"$style\": style0\n};\nconst NcFormBoxButton = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__cssModules\", cssModules]]);\nexport {\n NcFormBoxButton as N\n};\n//# sourceMappingURL=NcFormBoxButton-G_PkUiQy.mjs.map\n","import { d as mdiCheck, e as mdiContentCopy } from \"./mdi-CpchYUUV.mjs\";\nimport { ref, computed, toValue } from \"vue\";\nimport { r as register, e as t22, a as t } from \"./_l10n-wdIzZwir.mjs\";\nregister(t22);\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst DELAY = 2e3;\nfunction useCopy(content) {\n const isCopied = ref(false);\n const icon = computed(() => isCopied.value ? mdiCheck : mdiContentCopy);\n const altText = computed(() => isCopied.value ? t(\"Copied\") : t(\"Copy to clipboard\"));\n async function copy() {\n if (isCopied.value) {\n return;\n }\n const value = toValue(content);\n try {\n await navigator.clipboard.writeText(value);\n } catch {\n prompt(\"\", value);\n }\n isCopied.value = true;\n setTimeout(() => {\n isCopied.value = false;\n }, DELAY);\n }\n return {\n isCopied,\n copy,\n icon,\n altText\n };\n}\nexport {\n useCopy as u\n};\n//# sourceMappingURL=useCopy-6F-qWHq0.mjs.map\n","import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode, renderSlot } from \"vue\";\nimport { whenever } from \"@vueuse/core\";\nimport { N as NcFormBoxButton } from \"./NcFormBoxButton-G_PkUiQy.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-g8ubWhoz.mjs\";\nimport { u as useCopy } from \"./useCopy-6F-qWHq0.mjs\";\nconst _hoisted_1 = { class: \"hidden-visually\" };\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcFormBoxCopyButton\",\n props: {\n label: { default: () => void 0 },\n value: {},\n disabled: { type: Boolean, default: false }\n },\n emits: [\"copy\"],\n setup(__props, { emit: __emit }) {\n const emit = __emit;\n const { isCopied, copy, icon, altText } = useCopy(() => __props.value);\n whenever(isCopied, () => emit(\"copy\"));\n return (_ctx, _cache) => {\n return openBlock(), createBlock(NcFormBoxButton, {\n disabled: __props.disabled,\n invertedAccent: \"\",\n onClick: unref(copy)\n }, createSlots({\n description: withCtx(() => [\n createTextVNode(toDisplayString(__props.value), 1)\n ]),\n icon: withCtx(() => [\n createVNode(NcIconSvgWrapper, {\n path: unref(icon),\n inline: \"\"\n }, null, 8, [\"path\"])\n ]),\n _: 2\n }, [\n _ctx.$slots.default || __props.label ? {\n name: \"default\",\n fn: withCtx(() => [\n createElementVNode(\"span\", _hoisted_1, toDisplayString(unref(altText)), 1),\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(__props.label), 1)\n ])\n ]),\n key: \"0\"\n } : void 0\n ]), 1032, [\"disabled\", \"onClick\"]);\n };\n }\n});\nexport {\n _sfc_main as _\n};\n//# sourceMappingURL=NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-BA_gWnmz.mjs.map\n","\n\n","\n\n","\n\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showSuccess } from '@nextcloud/dialogs'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcopied: false,\n\t\t\tcopyLoading: false,\n\t\t\tcopySuccess: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\tcopyLinkIcon() {\n\t\t\tif (this.copySuccess) {\n\t\t\t\treturn 'icon-checkmark'\n\t\t\t}\n\t\t\tif (this.copyLoading) {\n\t\t\t\treturn 'icon-loading-small'\n\t\t\t}\n\t\t\treturn 'icon-public'\n\t\t},\n\t},\n\n\tmethods: {\n\t\tasync copyToClipboard(url) {\n\t\t\t// change to loading status\n\t\t\tthis.copyLoading = true\n\n\t\t\t// copy link to clipboard\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(url)\n\t\t\t\tthis.copySuccess = true\n\t\t\t\tthis.copied = true\n\n\t\t\t\t// Notify success\n\t\t\t\tshowSuccess(t('circles', 'Link copied to the clipboard'))\n\t\t\t} catch (error) {\n\t\t\t\tthis.copySuccess = false\n\t\t\t\tthis.copied = true\n\t\t\t\tshowError(t('circles', 'Could not copy link to the clipboard.'))\n\t\t\t} finally {\n\t\t\t\tthis.copyLoading = false\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t// stop loading status regardless of outcome\n\t\t\t\t\tthis.copied = false\n\t\t\t\t\tthis.copySuccess = false\n\t\t\t\t}, 2000)\n\t\t\t}\n\t\t},\n\t},\n}\n","\n\n\n\n\n","// @ts-nocheck\n/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n/// \n\nimport { translate as t } from '@nextcloud/l10n'\nimport { ShareType } from '@nextcloud/sharing'\nimport CircleConfigCheckboxesList from '../components/CircleDetails/CircleConfigs/CircleConfigCheckboxesList.vue'\nimport CircleConfigInvitationLink from '../components/CircleDetails/CircleConfigs/CircleConfigInvitationLink.vue'\n\nexport type DefaultGroup = string\nexport type DefaultChart = string\nexport type CircleConfig = number\nexport type MemberLevel = number\nexport type MemberType = number\n\n// Global sizes\nexport const LIST_SIZE = 60\n\n// Dynamic default groups\nexport const GROUP_ALL_CONTACTS: DefaultGroup = t('circles', 'All contacts')\nexport const GROUP_NO_GROUP_CONTACTS: DefaultGroup = t('circles', 'Not grouped')\nexport const GROUP_RECENTLY_CONTACTED: DefaultGroup = t('circles', 'Recently contacted')\n\n// Organization default chart for all contacts\nexport const CHART_ALL_CONTACTS: DefaultChart = t('circles', 'Organization chart')\n\n// Circle route, see vue-router conf\nexport const ROUTE_CIRCLE = 'circle'\nexport const ROUTE_CHART = 'chart'\nexport const ROUTE_USER_GROUP = 'user_group'\n\n// Contact settings\nexport const CONTACTS_SETTINGS: DefaultGroup = t('circles', 'Contacts settings')\n\n// Default max number of items to show in the navigation\nexport const ELLIPSIS_COUNT = 5\n\n// Circles member levels\nconst MEMBER_LEVEL_NONE: MemberLevel = 0\nconst MEMBER_LEVEL_MEMBER: MemberLevel = 1\nconst MEMBER_LEVEL_MODERATOR: MemberLevel = 4\nconst MEMBER_LEVEL_ADMIN: MemberLevel = 8\nconst MEMBER_LEVEL_OWNER: MemberLevel = 9\n\n// Circles member types\n\nconst MEMBER_TYPE_SINGLEID: MemberType = 0\nconst MEMBER_TYPE_USER: MemberType = 1\nconst MEMBER_TYPE_GROUP: MemberType = 2\nconst MEMBER_TYPE_MAIL: MemberType = 4\nconst MEMBER_TYPE_CONTACT: MemberType = 8\nconst MEMBER_TYPE_CIRCLE: MemberType = 16\n\nexport const CIRCLE_DESC = t('circles', 'Create your own teams for sharing. Add Nextcloud users, contacts, or anyone via email.')\n\n// Circles config flags\n\nconst CIRCLE_CONFIG_PERSONAL: CircleConfig = 2 // Personal circle, only the owner can see it.\nconst CIRCLE_CONFIG_SYSTEM: CircleConfig = 4 // System Circle (not managed by the official front-end). Meaning some config are limited\nconst CIRCLE_CONFIG_VISIBLE: CircleConfig = 8 // Visible to everyone, if not visible, people have to know its name to be able to find it\nconst CIRCLE_CONFIG_OPEN: CircleConfig = 16 // Circle is open, people can join\nconst CIRCLE_CONFIG_INVITE: CircleConfig = 32 // Adding a member generate an invitation that needs to be accepted\nconst CIRCLE_CONFIG_REQUEST: CircleConfig = 64 // Request to join Circles needs to be confirmed by a moderator\nconst CIRCLE_CONFIG_FRIEND: CircleConfig = 128 // Members of the circle can invite their friends\nconst CIRCLE_CONFIG_PROTECTED: CircleConfig = 256 // Password protected to join/request\nconst CIRCLE_CONFIG_NO_OWNER: CircleConfig = 512 // no owner, only members\nconst CIRCLE_CONFIG_HIDDEN: CircleConfig = 1024 // hidden from listing, but available as a share entity\nconst CIRCLE_CONFIG_BACKEND: CircleConfig = 2048 // Fully hidden, only backend Circles\nconst CIRCLE_CONFIG_LOCAL: CircleConfig = 4096 // Circle is not shared to other instance in globalscale\nconst CIRCLE_CONFIG_ROOT: CircleConfig = 8192 // Circle cannot be a member of another Circle\nconst CIRCLE_CONFIG_CIRCLE_INVITE: CircleConfig = 16384 // Circle must confirm when invited in another circle\nconst CIRCLE_CONFIG_FEDERATED: CircleConfig = 32768 // Federated\n\n// Existing members types\nexport const CIRCLES_MEMBER_TYPES = {\n\t[MEMBER_TYPE_CIRCLE]: t('circles', 'Team'),\n\t[MEMBER_TYPE_USER]: t('circles', 'User'),\n\t[MEMBER_TYPE_GROUP]: t('circles', 'Group'),\n\t[MEMBER_TYPE_MAIL]: t('circles', 'Email'),\n\t[MEMBER_TYPE_CONTACT]: t('circles', 'Contact'),\n}\n\n// Available circles promote/demote levels\nexport const CIRCLES_MEMBER_LEVELS = {\n\t// [MEMBER_LEVEL_NONE]: t('circles', 'Pending'),\n\t[MEMBER_LEVEL_MEMBER]: t('circles', 'Member'),\n\t[MEMBER_LEVEL_MODERATOR]: t('circles', 'Moderator'),\n\t[MEMBER_LEVEL_ADMIN]: t('circles', 'Admin'),\n\t[MEMBER_LEVEL_OWNER]: t('circles', 'Owner'),\n}\n\n// Available circle configs in the circle details view\nexport const PUBLIC_CIRCLE_CONFIG = {\n\t[t('circles', 'Invites')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t[CIRCLE_CONFIG_OPEN]: t('circles', 'Anyone can request membership'),\n\t\t\t\t[CIRCLE_CONFIG_INVITE]: t('circles', 'Members need to accept invitation'),\n\t\t\t\t[CIRCLE_CONFIG_REQUEST]: t('circles', 'Memberships must be confirmed/accepted by a Moderator (requires \"Anyone can request membership\")'),\n\t\t\t\t[CIRCLE_CONFIG_FRIEND]: t('circles', 'Members can also invite'),\n\t\t\t},\n\t\t},\n\t},\n\n\t[t('circles', 'Invitation links')]: {\n\t\tcomponent: CircleConfigInvitationLink,\n\t\tprops: {},\n\t},\n\n\t[t('circles', 'Membership')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t// TODO: implement backend\n\t\t\t\t// [CIRCLE_CONFIG_CIRCLE_INVITE]: t('circles', 'Team must confirm when invited in another circle'),\n\t\t\t\t[CIRCLE_CONFIG_ROOT]: t('circles', 'Prevent teams from being a member of another team'),\n\t\t\t},\n\t\t},\n\t},\n\n\t[t('circles', 'Federation')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t[CIRCLE_CONFIG_FEDERATED]: t('circles', 'Allow federated members'),\n\t\t\t},\n\t\t},\n\t},\n\n\t[t('circles', 'Privacy')]: {\n\t\tcomponent: CircleConfigCheckboxesList,\n\t\tprops: {\n\t\t\tconfigs: {\n\t\t\t\t[CIRCLE_CONFIG_VISIBLE]: t('circles', 'Visible to everyone'),\n\t\t\t},\n\t\t},\n\t},\n}\n\n// Represents the picker options (label is used lower case in a list of options: Search users, groups, teams, ...)\n// labelStandalone is used as heading for the member list where we need it starting captialized\nexport const CIRCLES_MEMBER_GROUPING = [\n\t{\n\t\tid: `picker-${ShareType.User}`,\n\t\tlabel: t('circles', 'users'),\n\t\tlabelStandalone: t('circles', 'Users'),\n\t\tshare: ShareType.User,\n\t\ttype: MEMBER_TYPE_USER,\n\t},\n\t{\n\t\tid: `picker-${ShareType.Group}`,\n\t\tlabel: t('circles', 'groups'),\n\t\tlabelStandalone: t('circles', 'Groups'),\n\t\tshare: ShareType.Group,\n\t\ttype: MEMBER_TYPE_GROUP,\n\t},\n\t{\n\t\tid: `picker-${ShareType.Remote}`,\n\t\tlabel: t('circles', 'federated users'),\n\t\tlabelStandalone: t('circles', 'Federated users'),\n\t\tshare: ShareType.Remote,\n\t\ttype: MEMBER_TYPE_USER,\n\t},\n\t// {\n\t// id: `picker-${ShareType.RemoteGroup}`,\n\t// label: t('circles', 'federated groups'),\n\t// share: ShareType.RemoteGroup,\n\t// type: MEMBER_TYPE_GROUP\n\t// },\n\t{\n\t\tid: `picker-${ShareType.Team}`,\n\t\tlabel: t('circles', 'teams'),\n\t\tlabelStandalone: t('circles', 'Teams'),\n\t\tshare: ShareType.Team,\n\t\ttype: MEMBER_TYPE_CIRCLE,\n\t},\n\t{\n\t\tid: `picker-${ShareType.Email}`,\n\t\tlabel: t('circles', 'email addresses'),\n\t\tlabelStandalone: t('circles', 'Email addresses'),\n\t\tshare: ShareType.Email,\n\t\ttype: MEMBER_TYPE_MAIL,\n\t},\n\t// TODO: implement SHARE_TYPE_CONTACT\n\t{\n\t\tid: 'picker-contact',\n\t\tlabel: t('circles', 'contacts'),\n\t\tlabelStandalone: t('circles', 'Contacts'),\n\t\tshare: ShareType.Email,\n\t\ttype: MEMBER_TYPE_CONTACT,\n\t},\n]\n\n// Generating a map between share types and circle member types\nexport const SHARES_TYPES_MEMBER_MAP = CIRCLES_MEMBER_GROUPING.reduce((list, entry) => {\n\t// ! Ignore duplicate share types\n\tif (!list[entry.share]) {\n\t\tlist[entry.share] = entry.type\n\t}\n\treturn list\n}, {})\n\nexport enum MemberLevels {\n\tNONE = MEMBER_LEVEL_NONE,\n\tMEMBER = MEMBER_LEVEL_MEMBER,\n\tMODERATOR = MEMBER_LEVEL_MODERATOR,\n\tADMIN = MEMBER_LEVEL_ADMIN,\n\tOWNER = MEMBER_LEVEL_OWNER,\n}\n\nexport enum MemberTypes {\n\tCIRCLE = MEMBER_TYPE_CIRCLE,\n\tUSER = MEMBER_TYPE_USER,\n\tGROUP = MEMBER_TYPE_GROUP,\n\tMAIL = MEMBER_TYPE_MAIL,\n\tCONTACT = MEMBER_TYPE_CONTACT,\n}\n\nexport enum CircleConfigs {\n\tPERSONAL = CIRCLE_CONFIG_PERSONAL,\n\tSYSTEM = CIRCLE_CONFIG_SYSTEM,\n\tVISIBLE = CIRCLE_CONFIG_VISIBLE,\n\tOPEN = CIRCLE_CONFIG_OPEN,\n\tINVITE = CIRCLE_CONFIG_INVITE,\n\tREQUEST = CIRCLE_CONFIG_REQUEST,\n\tFRIEND = CIRCLE_CONFIG_FRIEND,\n\tPROTECTED = CIRCLE_CONFIG_PROTECTED,\n\tNO_OWNER = CIRCLE_CONFIG_NO_OWNER,\n\tHIDDEN = CIRCLE_CONFIG_HIDDEN,\n\tBACKEND = CIRCLE_CONFIG_BACKEND,\n\tLOCAL = CIRCLE_CONFIG_LOCAL,\n\tROOT = CIRCLE_CONFIG_ROOT,\n\tCIRCLE_INVITE = CIRCLE_CONFIG_CIRCLE_INVITE,\n\tFEDERATED = CIRCLE_CONFIG_FEDERATED,\n}\n\nexport enum MemberStatus {\n\tINVITED = 'Invited',\n\tMEMBER = 'Member',\n\tREQUESTING = 'Requesting',\n}\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { ShareType } from '@nextcloud/sharing'\nimport { CircleConfigs, SHARES_TYPES_MEMBER_MAP } from '../models/constants.ts'\nimport { logger } from '../../../logger.ts'\n\n// generate allowed shareType from SHARES_TYPES_MEMBER_MAP\nconst shareType = Object.keys(SHARES_TYPES_MEMBER_MAP)\nconst maxAutocompleteResults = parseInt(window.OC.config['sharing.maxAutocompleteResults'], 10) || 25\n\n/**\n * Get suggestions\n *\n * @param {string} search the search query\n * @param {object|null} circle - the circle object\n */\nexport async function getSuggestions(search, circle = null) {\n\tconst request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees'), {\n\t\tparams: {\n\t\t\tformat: 'json',\n\t\t\titemType: 'teams',\n\t\t\tsearch,\n\t\t\tperPage: maxAutocompleteResults,\n\t\t\tshareType,\n\t\t\tlookup: false,\n\t\t},\n\t})\n\n\tconst data = request.data.ocs.data\n\tconst exact = request.data.ocs.data.exact\n\tdata.exact = [] // removing exact from general results\n\n\t// flatten array of arrays\n\tlet rawExactSuggestions = Object.values(exact).reduce((arr, elem) => arr.concat(elem), [])\n\tlet rawSuggestions = Object.values(data).reduce((arr, elem) => arr.concat(elem), [])\n\n\t// check if federation flag is enabled using bitwise AND on circle config\n\tconst isCircleFederated = circle ? (circle.config & CircleConfigs.FEDERATED) !== 0 : false\n\tif (isCircleFederated) {\n\t\t// remove results from untrusted remote servers\n\t\trawExactSuggestions = rawExactSuggestions\n\t\t\t.filter((result) => !(result.value?.shareType === ShareType.Remote && result.value?.isTrustedServer === false))\n\t\trawSuggestions = rawSuggestions\n\t\t\t.filter((result) => !(result.value?.shareType === ShareType.Remote && result.value?.isTrustedServer === false))\n\t} else {\n\t\t// remove all results from remote servers\n\t\trawExactSuggestions = rawExactSuggestions\n\t\t\t.filter((result) => result.value?.shareType !== ShareType.Remote)\n\t\trawSuggestions = rawSuggestions\n\t\t\t.filter((result) => result.value?.shareType !== ShareType.Remote)\n\t}\n\n\t// remove invalid data and format to user-select layout\n\tconst exactSuggestions = rawExactSuggestions\n\t\t.filter((result) => typeof result === 'object')\n\t\t.map((share) => formatResults(share))\n\t\t// sort by type so we can get user&groups first...\n\t\t.sort((a, b) => a.shareType - b.shareType)\n\tconst suggestions = rawSuggestions\n\t\t.filter((result) => typeof result === 'object')\n\t\t.map((share) => formatResults(share))\n\t\t// sort by type so we can get user&groups first...\n\t\t.sort((a, b) => a.shareType - b.shareType)\n\n\tconst allSuggestions = exactSuggestions.concat(suggestions)\n\n\t// Count occurances of display names in order to provide a distinguishable description if needed\n\tconst nameCounts = allSuggestions.reduce((nameCounts, result) => {\n\t\tif (!result.displayName) {\n\t\t\treturn nameCounts\n\t\t}\n\t\tif (!nameCounts[result.displayName]) {\n\t\t\tnameCounts[result.displayName] = 0\n\t\t}\n\t\tnameCounts[result.displayName]++\n\t\treturn nameCounts\n\t}, {})\n\n\tconst finalResults = allSuggestions.map((item) => {\n\t\t// Make sure that items with duplicate displayName get the shareWith applied as a description\n\t\tif (nameCounts[item.displayName] > 1 && !item.desc) {\n\t\t\treturn { ...item, desc: item.shareWithDisplayNameUnique }\n\t\t}\n\t\treturn item\n\t})\n\n\tlogger.info('suggestions', { finalResults })\n\n\treturn finalResults\n}\n\n/**\n * Get the sharing recommendations\n */\nexport async function getRecommendations() {\n\tconst request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1/sharees_recommended'), {\n\t\tparams: {\n\t\t\tformat: 'json',\n\t\t\titemType: 'contacts',\n\t\t\tshareType,\n\t\t},\n\t})\n\n\t// flatten array of arrays\n\tconst exact = request.data.ocs.data.exact\n\tconst recommendations = Object.values(exact).reduce((arr, elem) => arr.concat(elem), [])\n\n\t// remove invalid data and format to user-select layout\n\tconst finalResults = recommendations\n\t\t.map((share) => formatResults(share))\n\n\tlogger.info('recommendations', finalResults)\n\n\treturn finalResults\n}\n\nfunction formatResults(result) {\n\tconst type = `picker-${result.value.shareType}`\n\treturn {\n\t\tlabel: result.label,\n\t\tid: `${type}-${result.value.shareWith}`,\n\t\t// If this is a user, set as user for avatar display by UserBubble\n\t\tuser: [window.OC.Share.SHARE_TYPE_USER, window.OC.Share.SHARE_TYPE_REMOTE].indexOf(result.value.shareType) > -1\n\t\t\t? result.value.shareWith\n\t\t\t: null,\n\t\ttype,\n\t\t...result.value,\n\t}\n}\n","/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { Member, MemberCandidate, Resource, SharedResource, Team, TeamRole } from './types.ts'\n\nimport axios from '@nextcloud/axios'\nimport { FileType } from '@nextcloud/files'\nimport { defaultRootPath, getClient, getDefaultPropfind, resultToNode } from '@nextcloud/files/dav'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { logger } from '../logger.ts'\nimport { SHARES_TYPES_MEMBER_MAP } from './team-page/models/constants.ts'\nimport { getRecommendations, getSuggestions } from './team-page/services/collaborationAutocompletion.js'\n\n/** `SHARES_TYPES_MEMBER_MAP` is built dynamically, so type its shape explicitly. */\nconst shareTypeToMemberType = SHARES_TYPES_MEMBER_MAP as Record\n\n/** Minimal shape of an OCS response envelope. */\ninterface OcsResponse {\n\tocs: { data: T }\n}\n\n/** Raw member as returned by the circles API. */\ninterface RawMember {\n\tsingleId: string\n\tuserId: string | null\n\tdisplayName: string\n\tuserType?: number\n\ttype?: number\n\tlevel?: number\n}\n\n/** Raw resource as returned by the dashboard endpoint. */\ninterface RawResource {\n\tid: string | number\n\tname: string\n\ttype: string\n\ticonUrl: string\n\tfallbackIcon: string\n\turl: string\n}\n\n/** Raw circle as returned by the `/circles` endpoint. */\ninterface RawCircle {\n\tid: string\n\tname: string\n\tdisplayName: string\n\tdescription?: string\n\tpopulation?: number\n\tinitiator?: { level?: number } | null\n}\n\n/** Raw team as returned by the dashboard widget endpoint. */\ninterface RawDashboardTeam {\n\tsingleId: string\n\tmembers: RawMember[]\n\tresources: RawResource[]\n}\n\n/** Raw sharee suggestion, as returned by the files_sharing autocompletion helper. */\ninterface RawSuggestion {\n\tid: string\n\tlabel: string\n\tshareWith: string\n\tshareType: number\n\tuser?: string | null\n}\n\n/**\n * Map a circles member level to a role.\n *\n * @param level - The circles member level (9 owner, 8 admin, 4 moderator, …)\n */\nfunction levelToRole(level: number | undefined): TeamRole {\n\tif (level === undefined) {\n\t\treturn 'member'\n\t}\n\tif (level >= 9) {\n\t\treturn 'owner'\n\t}\n\tif (level >= 8) {\n\t\treturn 'admin'\n\t}\n\tif (level >= 4) {\n\t\treturn 'moderator'\n\t}\n\treturn 'member'\n}\n\n/**\n * Map a resource from the dashboard endpoint to our type.\n *\n * @param raw - The raw resource\n */\nfunction mapResource(raw: RawResource): Resource {\n\treturn {\n\t\tid: String(raw.id),\n\t\tname: raw.name,\n\t\ttype: raw.type === 'folder' ? 'folder' : 'file',\n\t\ticonUrl: raw.iconUrl,\n\t\tfallbackIcon: raw.fallbackIcon,\n\t\turl: raw.url,\n\t}\n}\n\n/**\n * Map a preview member (from the dashboard endpoint, no level) to our type.\n *\n * @param raw - The raw member\n */\nfunction mapPreviewMember(raw: RawMember): Member {\n\treturn {\n\t\tid: raw.singleId,\n\t\tuserId: raw.userId ?? null,\n\t\tdisplayName: raw.displayName,\n\t\tisUser: raw.type === 1,\n\t\trole: 'member',\n\t}\n}\n\n/**\n * Map a full member (from the members endpoint, includes level) to our type.\n *\n * @param raw - The raw member\n */\nfunction mapFullMember(raw: RawMember): Member {\n\treturn {\n\t\tid: raw.singleId,\n\t\tuserId: raw.userId ?? null,\n\t\tdisplayName: raw.displayName,\n\t\tisUser: raw.userType === 1,\n\t\trole: levelToRole(raw.level),\n\t}\n}\n\n/**\n * Fetch all of the current user's teams, merging team metadata (name,\n * description, member count, our role) with the members preview and resources.\n */\nexport async function fetchTeams(): Promise {\n\tconst [circlesRes, dashRes] = await Promise.allSettled([\n\t\taxios.get>(generateOcsUrl('apps/circles/circles') + '?limit=-1'),\n\t\taxios.get>(generateOcsUrl('apps/circles/teams/dashboard/widget') + '?limit=200&offset=0'),\n\t])\n\n\t// The team list is required; without it we have nothing to show.\n\tif (circlesRes.status === 'rejected') {\n\t\tthrow circlesRes.reason\n\t}\n\tconst circles = (circlesRes.value.data.ocs.data ?? []).filter((circle) => circle.initiator)\n\n\t// The dashboard only enriches each team with member/resource previews, so\n\t// treat a failure there as \"no previews\" rather than failing the whole page.\n\tlet dashboard: RawDashboardTeam[] = []\n\tif (dashRes.status === 'fulfilled') {\n\t\tdashboard = dashRes.value.data.ocs.data ?? []\n\t} else {\n\t\tlogger.warn('Failed to load team dashboard previews', { error: dashRes.reason })\n\t}\n\tconst dashboardById = new Map(dashboard.map((team) => [team.singleId, team]))\n\n\treturn circles.map((circle) => {\n\t\tconst extra = dashboardById.get(circle.id)\n\t\treturn {\n\t\t\tid: circle.id,\n\t\t\tdisplayName: circle.displayName || circle.name,\n\t\t\tdescription: circle.description ?? '',\n\t\t\tmemberCount: circle.population ?? extra?.members.length ?? 0,\n\t\t\tmyRole: levelToRole(circle.initiator?.level),\n\t\t\tmembers: (extra?.members ?? []).map(mapPreviewMember),\n\t\t\tresources: (extra?.resources ?? []).map(mapResource),\n\t\t}\n\t})\n}\n\n/**\n * Fetch the full member list for a team (includes roles).\n *\n * @param teamId - The team single id\n */\nexport async function fetchTeamMembers(teamId: string): Promise {\n\tconst res = await axios.get>(generateOcsUrl('apps/circles/circles/{circleId}/members', { circleId: teamId }))\n\treturn (res.data.ocs.data ?? []).map(mapFullMember)\n}\n\n/**\n * Create a team and return its single id.\n *\n * @param name - The team name\n * @param createTeamFolder - Whether to auto-create a team folder. Defaults to\n * true so existing API callers keep the previous behaviour.\n */\nexport async function createTeam(name: string, createTeamFolder = true): Promise {\n\tconst res = await axios.post>(\n\t\tgenerateOcsUrl('apps/circles/circles'),\n\t\t{ name, createTeamFolder },\n\t)\n\treturn res.data.ocs.data.id\n}\n\n/**\n * Set a team's description.\n *\n * @param teamId - The team single id\n * @param description - The new description\n */\nexport async function setTeamDescription(teamId: string, description: string): Promise {\n\tawait axios.put(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/description', { circleId: teamId }),\n\t\t{ value: description },\n\t)\n}\n\n/**\n * Leave a team.\n *\n * @param teamId - The team single id\n */\nexport async function leaveTeam(teamId: string): Promise {\n\tawait axios.put(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/leave', { circleId: teamId }),\n\t\t{},\n\t)\n}\n\n/**\n * Delete a team.\n *\n * @param teamId - The team single id\n */\nexport async function deleteTeam(teamId: string): Promise {\n\tawait axios.delete(generateOcsUrl('apps/circles/circles/{circleId}', { circleId: teamId }))\n}\n\n/**\n * The team folder linked to a team.\n */\nexport interface TeamFolder {\n\tid: number\n\tmountPoint: string\n\tquota: number | null\n}\n\n/** Team and its linked folder as exposed to administrators. */\nexport interface AdminTeamFolder {\n\tteamId: string\n\tteamName: string\n\tfolder: TeamFolder | null\n}\n\n/**\n * Fetch all teams and their optionally linked team folders for the admin settings view.\n */\nexport async function getAdminTeamFolders(): Promise {\n\tconst { data } = await axios.get>(generateOcsUrl('/apps/circles/admin/teamfolders'))\n\treturn data.ocs.data\n}\n\n/**\n * Fetch the team folder linked to a team.\n *\n * The Circles app exposes the team-folder lifecycle through the core Teams\n * contract. The active provider is discovered server-side.\n *\n * @param teamId - The team single id\n * @return The linked team folder, or null if none exists.\n */\nexport async function getTeamFolder(teamId: string): Promise {\n\ttry {\n\t\tconst { data } = await axios.get>(generateOcsUrl('apps/circles/teams/{circleId}/folder', { circleId: teamId }))\n\t\treturn data.ocs.data\n\t} catch (error) {\n\t\tif (error && typeof error === 'object'\n\t\t\t&& 'response' in error\n\t\t\t&& (error.response as { status?: number })?.status === 404) {\n\t\t\treturn null\n\t\t}\n\t\tthrow error\n\t}\n}\n\n/**\n * Create a team folder for a team that predates the auto-create feature.\n *\n * Idempotent: if the team already owns a folder, the existing folder is\n * returned. Requires team owner privileges.\n *\n * @param teamId - The team single id\n * @param name - Optional team folder name\n * @return The created (or existing) team folder.\n */\nexport async function upgradeTeamFolder(teamId: string, name?: string): Promise {\n\tconst { data } = await axios.post>(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/folder', { circleId: teamId }),\n\t\t{ name },\n\t)\n\treturn data.ocs.data.folder\n}\n\n/**\n * Fetch team folders that are not yet linked to a team.\n *\n * @param teamId - The team single id\n */\nexport async function getLinkableTeamFolders(teamId: string): Promise {\n\tconst { data } = await axios.get>(generateOcsUrl('apps/circles/teams/{circleId}/folder/linkable', { circleId: teamId }))\n\treturn data.ocs.data\n}\n\n/**\n * Link a team to a team folder.\n *\n * @param teamId - The team single id\n * @param folderId - The id of the existing team folder\n */\nexport async function linkTeamFolder(teamId: string, folderId: number): Promise {\n\tconst { data } = await axios.post>(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/folder/link', { circleId: teamId }),\n\t\t{ folderId },\n\t)\n\treturn data.ocs.data.folder\n}\n\n/**\n * Update the storage quota of the team folder linked to a team.\n *\n * @param teamId - The team single id\n * @param quota - Quota in bytes, or zero for unlimited\n */\nexport async function updateTeamFolderQuota(teamId: string, quota: number): Promise {\n\tconst { data } = await axios.put>(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/folder/quota', { circleId: teamId }),\n\t\t{ quota },\n\t)\n\treturn data.ocs.data.folder\n}\n\n/**\n * Subfolder of the team folder holding the page files, inside the app's\n * own namespace of the hidden `.system` folder: the pages neither clutter\n * the files the team actually shares nor the `.system` root itself.\n */\nconst PAGES_FOLDER = '.system/teams/pages'\n\n/**\n * A team page: a markdown file stored in the team folder's hidden pages\n * subfolder, surfaced as a tab on the team.\n */\nexport interface TeamPage {\n\tfileId: number\n\t/** Page title: the file name without the .md extension. */\n\ttitle: string\n\t/** Path relative to the user's files root, as the Text editor expects. */\n\tfilePath: string\n}\n\n/**\n * List the team pages: the markdown files in the team folder's hidden\n * pages subfolder.\n *\n * @param mountPoint - The team folder mount point of the current user\n */\nexport async function fetchTeamPages(mountPoint: string): Promise {\n\tlet response\n\ttry {\n\t\tresponse = await getClient().getDirectoryContents(`${defaultRootPath}/${mountPoint}/${PAGES_FOLDER}`, {\n\t\t\tdetails: true,\n\t\t\tdata: getDefaultPropfind(),\n\t\t})\n\t} catch (error) {\n\t\t// 404 means the pages subfolder was not created yet (it appears with\n\t\t// the first page), or the team folder itself has not been physically\n\t\t// created — either way \"no pages\".\n\t\tif ((error as { status?: number })?.status === 404) {\n\t\t\treturn []\n\t\t}\n\t\tthrow error\n\t}\n\tconst data = Array.isArray(response) ? response : response.data\n\n\treturn data\n\t\t.map((entry) => resultToNode(entry, defaultRootPath))\n\t\t.filter((node) => node.type === FileType.File\n\t\t\t&& node.extension?.toLowerCase() === '.md'\n\t\t\t&& node.fileid !== undefined)\n\t\t.map((node) => ({\n\t\t\tfileId: node.fileid!,\n\t\t\ttitle: node.basename.slice(0, -node.extension!.length),\n\t\t\tfilePath: `/${mountPoint}/${PAGES_FOLDER}/${node.basename}`,\n\t\t}))\n\t\t.sort((a, b) => a.title.localeCompare(b.title))\n}\n\n/**\n * Create a team page: an empty markdown file in the team folder's hidden\n * pages subfolder, which appears with the first page.\n *\n * @param mountPoint - The team folder mount point of the current user\n * @param name - The page name (without extension)\n */\nexport async function createTeamPage(mountPoint: string, name: string): Promise {\n\tconst pagesFolder = `${defaultRootPath}/${mountPoint}/${PAGES_FOLDER}`\n\ttry {\n\t\t// Recursive: `.system` and the pages folder inside it appear with\n\t\t// the first page.\n\t\tawait getClient().createDirectory(pagesFolder, { recursive: true })\n\t} catch (error) {\n\t\t// 405: the folder appeared between the existence probe and the MKCOL.\n\t\tif ((error as { status?: number })?.status !== 405) {\n\t\t\tthrow error\n\t\t}\n\t}\n\tconst written = await getClient().putFileContents(`${pagesFolder}/${name}.md`, '', {\n\t\t// Refuse to overwrite an existing page of the same name\n\t\toverwrite: false,\n\t})\n\t// The webdav client returns false instead of throwing on the 412 an\n\t// existing page produces with overwrite disabled.\n\tif (written === false) {\n\t\tthrow Object.assign(new Error('A page with this name already exists'), { status: 412 })\n\t}\n}\n\n/**\n * Delete a team page: remove its markdown file from the team folder.\n *\n * @param page - The team page to delete\n */\nexport async function deleteTeamPage(page: TeamPage): Promise {\n\tawait getClient().deleteFile(`${defaultRootPath}${page.filePath}`)\n}\n\n/**\n * Rename a team page: move its markdown file to the new name within the\n * team folder. Refuses to overwrite an existing page of the same name.\n *\n * @param page - The team page to rename\n * @param name - The new page name (without extension)\n */\nexport async function renameTeamPage(page: TeamPage, name: string): Promise {\n\tconst directory = page.filePath.slice(0, page.filePath.lastIndexOf('/'))\n\tawait getClient().moveFile(\n\t\t`${defaultRootPath}${page.filePath}`,\n\t\t`${defaultRootPath}${directory}/${name}.md`,\n\t\t{ overwrite: false },\n\t)\n}\n\n/**\n * Fetch the team-level tab order (readable by every member).\n *\n * @param teamId - The team single id\n * @return Tab ids, first to last. Empty when no order has been saved.\n */\nexport async function fetchTabOrder(teamId: string): Promise {\n\tconst { data } = await axios.get>(generateOcsUrl('apps/circles/teams/{circleId}/tab-order', { circleId: teamId }))\n\treturn data.ocs.data.order ?? []\n}\n\n/**\n * Save the team-level tab order. Requires team admin or above.\n *\n * @param teamId - The team single id\n * @param order - Tab ids, first to last\n */\nexport async function saveTabOrder(teamId: string, order: string[]): Promise {\n\tawait axios.put(\n\t\tgenerateOcsUrl('apps/circles/teams/{circleId}/tab-order', { circleId: teamId }),\n\t\t{ order },\n\t)\n}\n\n/**\n * Fetch the resources shared to a team from the core teams resource\n * providers (Talk rooms, calendars, collectives, …).\n *\n * @param teamId - The team single id\n */\nexport async function fetchTeamResources(teamId: string): Promise {\n\tconst res = await axios.get>(generateOcsUrl('teams/{teamId}/resources', { teamId }))\n\treturn res.data.ocs.data.resources ?? []\n}\n\n/**\n * Create a collective named after a team. The collectives app links the\n * collective to the team by name, so no separate share step is needed.\n *\n * TODO: calls the collectives API directly; should eventually go through\n * a teams extension point instead of hardcoding another app's route.\n *\n * @param name - The collective name (the team's name)\n */\nexport async function createCollective(name: string): Promise {\n\tawait axios.post(\n\t\tgenerateOcsUrl('apps/collectives/api/v1.0/collectives'),\n\t\t{ name },\n\t)\n}\n\n/**\n * Create a Deck board linked to a team. The deck endpoint links the board\n * to the team itself, so no separate share step is needed.\n *\n * TODO: calls the deck API directly; should eventually go through a teams\n * extension point instead of hardcoding another app's route.\n *\n * @param teamId - The team single id\n * @param title - The board title\n */\nexport async function createDeckBoard(teamId: string, title: string): Promise {\n\tconst res = await axios.post>(\n\t\tgenerateOcsUrl('apps/deck/api/v1.0/boards/team'),\n\t\t{ title, teamId },\n\t)\n\tif (!res.data.ocs.data.id) {\n\t\tthrow new Error('The board creation response contains no board id')\n\t}\n}\n\n/** A deck board attached to the team itself, shown as a navigation entry. */\nexport interface TeamBoard {\n\tid: number\n\ttitle: string\n\t/** Absolute deep link to the board in the deck app. */\n\turl: string\n}\n\n/** The subset of deck's serialized board relevant here. */\ninterface RawDeckBoard {\n\tid: number\n\ttitle: string\n\tteamId?: string | null\n\tarchived?: boolean\n\tdeletedAt?: number\n}\n\n/**\n * Pick the deck boards attached to the team itself out of the shared deck\n * resources. The generic resource list cannot tell a team board from a\n * personally-shared one (and deck's board list omits teamId), so each\n * candidate is read individually from deck.\n *\n * TODO: calls the deck API directly; should eventually go through a teams\n * extension point instead of hardcoding another app's route.\n *\n * @param teamId - The team single id\n * @param candidates - The team's shared resources from the deck provider\n */\nexport async function fetchTeamDeckBoards(teamId: string, candidates: SharedResource[]): Promise {\n\tconst responses = await Promise.allSettled(candidates.map((resource) => axios.get>(generateOcsUrl('apps/deck/api/v1.0/board/{boardId}', { boardId: resource.id }))))\n\n\tconst boards: TeamBoard[] = []\n\tresponses.forEach((response, index) => {\n\t\tconst resource = candidates[index]\n\t\tif (response.status === 'rejected') {\n\t\t\t// The board stays reachable through the shared resources.\n\t\t\tlogger.warn('Could not read a deck board, not showing it as a tab', { resource, reason: response.reason })\n\t\t\treturn\n\t\t}\n\t\tconst board = response.value.data.ocs.data\n\t\tif (board.teamId === teamId && !board.archived && (board.deletedAt ?? 0) === 0) {\n\t\t\tboards.push({ id: board.id, title: board.title, url: resource.url })\n\t\t}\n\t})\n\n\treturn boards.sort((a, b) => a.title.localeCompare(b.title))\n}\n\n/**\n * Search for potential new members (users, groups, emails, contacts, other\n * teams…) using the same sharee autocompletion endpoint as file sharing.\n * This restores the legacy \"add members while creating a team\" feature for\n * the team creation wizard.\n *\n * @param term - The search query. An empty term returns curated recommendations.\n */\nexport async function searchMemberCandidates(term: string): Promise {\n\tconst suggestions: RawSuggestion[] = term.trim()\n\t\t? await getSuggestions(term)\n\t\t: await getRecommendations()\n\n\treturn suggestions.map((suggestion) => ({\n\t\tkey: suggestion.id,\n\t\tshareWith: suggestion.shareWith,\n\t\tshareType: suggestion.shareType,\n\t\tdisplayName: suggestion.label,\n\t\tisUser: suggestion.user !== null && suggestion.user !== undefined,\n\t}))\n}\n\n/**\n * Add a batch of picked candidates as members of a team, typically right\n * after creating it from the wizard.\n *\n * @param teamId - The team single id\n * @param candidates - The candidates picked in the wizard's member step\n * @return The number of candidates that were actually added.\n */\nexport async function addTeamMembers(teamId: string, candidates: MemberCandidate[]): Promise {\n\tconst members = candidates.map((candidate) => ({\n\t\tid: candidate.shareWith,\n\t\ttype: shareTypeToMemberType[candidate.shareType],\n\t}))\n\tconst res = await axios.post>>(\n\t\tgenerateOcsUrl('apps/circles/circles/{circleId}/members/multi', { circleId: teamId }),\n\t\t{ members },\n\t)\n\treturn Object.keys(res.data.ocs.data ?? {}).length\n}\n"],"names":["_sfc_main","defineComponent","__props","style","useCssModule","provide","NC_FORM_BOX_CONTEXT_KEY","_ctx","_cache","openBlock","createElementBlock","normalizeClass","renderSlot","ncFormBox","ncFormBox_row","ncFormBox__item","ncFormBox_col","style0","cssModules","NcFormBox","_export_sfc","_hoisted_1","slots","useSlots","formBoxItemClass","useNcFormBox","descriptionId","createElementId","hasDescription","unref","isLegacy","createElementVNode","createBlock","resolveDynamicComponent","mergeProps","$event","withCtx","createTextVNode","toDisplayString","createCommentVNode","formBoxItem","formBoxItem__description","formBoxItem_legacy","formBoxItem_inverted","formBoxItem__element","formBoxItem__content","formBoxItem__icon","NcFormBoxItem","mergeModels","__emit","modelValue","useModel","emit","inputId","watch","createSlots","withDirectives","vModelCheckbox","createVNode","NcIconToggleSwitch","formBoxSwitch__input","NcFormBoxSwitch","Member","data","circle","logger","Circle","MemberTypes","level","MemberLevels","text","initiator","owner","members","member","singleId","config","CircleConfigs","invitationCode","CircleEdit","getCircles","axios","generateOcsUrl","getCircle","circleId","createCircle","name","personal","local","deleteCircle","editCircle","type","value","joinCircle","leaveCircle","getCircleMembers","search","role","limit","addMembers","deleteMember","memberId","response","changeMemberLevel","acceptMember","editCircleSetting","setting","getInvitation","joinInvitation","createInvitationLink","revokeInvitationLink","props","loading","ref","isChecked","onChange","checked","confirmEnableFederationForCircle","prevConfig","nextConfig","circleData","error","showError","t","showConfirmation","_createBlock","_unref","_openBlock","_createElementBlock","_Fragment","_renderList","label","useButtonLink","options","reactive","hasVueRouterContext","inject","routerKey","tag","computed","isLink","isHyperLink","isRouterLink","isButton","attrs","toRef","icon","mdiOpenInNew","mdiArrowTopRight","NcIconSvgWrapper","formBoxButton","NcFormBoxButton","register","t22","DELAY","useCopy","content","isCopied","mdiCheck","mdiContentCopy","altText","copy","toValue","whenever","_hoisted_3","_mergeProps","$props","_createElementVNode","CopyToClipboardMixin","url","showSuccess","Autorenew","LinkOff","LinkPlus","NcFormBoxCopyButton","getBaseUrl","generateUrl","message","action","_component_NcFormBox","$options","_createVNode","_component_NcFormBoxCopyButton","_component_NcFormBoxButton","_component_Autorenew","_component_LinkOff","_component_LinkPlus","MEMBER_LEVEL_NONE","MEMBER_LEVEL_MEMBER","MEMBER_LEVEL_MODERATOR","MEMBER_LEVEL_ADMIN","MEMBER_LEVEL_OWNER","MEMBER_TYPE_USER","MEMBER_TYPE_GROUP","MEMBER_TYPE_MAIL","MEMBER_TYPE_CONTACT","MEMBER_TYPE_CIRCLE","CIRCLE_CONFIG_PERSONAL","CIRCLE_CONFIG_SYSTEM","CIRCLE_CONFIG_VISIBLE","CIRCLE_CONFIG_OPEN","CIRCLE_CONFIG_INVITE","CIRCLE_CONFIG_REQUEST","CIRCLE_CONFIG_FRIEND","CIRCLE_CONFIG_PROTECTED","CIRCLE_CONFIG_NO_OWNER","CIRCLE_CONFIG_HIDDEN","CIRCLE_CONFIG_BACKEND","CIRCLE_CONFIG_LOCAL","CIRCLE_CONFIG_ROOT","CIRCLE_CONFIG_CIRCLE_INVITE","CIRCLE_CONFIG_FEDERATED","CIRCLES_MEMBER_LEVELS","PUBLIC_CIRCLE_CONFIG","CircleConfigCheckboxesList","CircleConfigInvitationLink","CIRCLES_MEMBER_GROUPING","ShareType","SHARES_TYPES_MEMBER_MAP","list","entry","MemberStatus","shareType","maxAutocompleteResults","getSuggestions","request","exact","rawExactSuggestions","arr","elem","rawSuggestions","result","exactSuggestions","share","formatResults","a","b","suggestions","allSuggestions","nameCounts","finalResults","item","getRecommendations","shareTypeToMemberType","levelToRole","mapResource","raw","mapPreviewMember","mapFullMember","fetchTeams","circlesRes","dashRes","circles","dashboard","dashboardById","team","extra","fetchTeamMembers","teamId","createTeam","createTeamFolder","setTeamDescription","description","leaveTeam","deleteTeam","getAdminTeamFolders","getTeamFolder","upgradeTeamFolder","getLinkableTeamFolders","linkTeamFolder","folderId","updateTeamFolderQuota","quota","PAGES_FOLDER","fetchTeamPages","mountPoint","getClient","defaultRootPath","getDefaultPropfind","resultToNode","node","FileType","createTeamPage","pagesFolder","deleteTeamPage","page","renameTeamPage","directory","fetchTabOrder","saveTabOrder","order","fetchTeamResources","createCollective","createDeckBoard","title","fetchTeamDeckBoards","candidates","responses","resource","boards","index","board","searchMemberCandidates","term","suggestion","addTeamMembers","candidate","res"],"mappings":"gtBAIA,MAAMA,GAA4BC,EAAgB,CAChD,OAAQ,YACR,MAAO,CACL,IAAK,CAAE,KAAM,OAAO,CACxB,EACE,MAAMC,EAAS,CACb,MAAMC,EAAQC,GAAY,EAC1B,OAAAC,GAAQC,GAAyB,CAC/B,YAAa,GACb,iBAAkBH,EAAM,eAC9B,CAAK,EACM,CAACI,EAAMC,KACLC,EAAS,EAAIC,EAAmB,MAAO,CAC5C,MAAOC,EAAe,CAACJ,EAAK,OAAO,UAAWL,EAAQ,IAAMK,EAAK,OAAO,cAAgBA,EAAK,OAAO,aAAa,CAAC,CAC1H,EAAS,CACDK,EAAWL,EAAK,OAAQ,UAAW,CACjC,UAAWA,EAAK,OAAO,eACjC,CAAS,CACT,EAAS,CAAC,EAER,CACF,CAAC,EACKM,GAAY,mBACZC,GAAgB,uBAChBC,GAAkB,yBAClBC,GAAgB,uBAChBC,GAAS,CACb,uBAAwB,8BACxB,UAAAJ,GACA,cAAAC,GACA,gBAAAC,GACA,cAAAC,EACF,EACME,GAAa,CACjB,OAAUD,EACZ,EACME,GAA4BC,EAAYpB,GAAW,CAAC,CAAC,eAAgBkB,EAAU,CAAC,CAAC,EClCjFG,GAAa,CAAC,IAAI,EAClBrB,GAA4BC,EAAgB,CAC3C,aAAc,GACnB,OAAQ,gBACR,MAAO,CACL,IAAK,CAAA,EACL,MAAO,CAAE,QAAS,IAAA,CAAA,CAAY,EAC9B,YAAa,CA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A,EAAW,GAChB,UAAWA,EAAW,UACtB,UAAWA,EAAW,UACtB,YAAaA,EAAW,MACxB,OAAQA,EAAW,OAAS,MAAQA,EAAW,OAAS,MAAA,EACvD,CACH,CAUA,eAAsBC,GAAe/C,EAAgBsC,EAAgD,CACpG,MAAM/N,EAAU+N,EAAW,IAAKU,IAAe,CAC9C,GAAIA,EAAU,UACd,KAAM/D,GAAsB+D,EAAU,SAAS,CAAA,EAC9C,EACIC,EAAM,MAAMlO,EAAM,KACvBC,EAAe,gDAAiD,CAAE,SAAUgL,EAAQ,EACpF,CAAE,QAAAzL,CAAA,CAAQ,EAEX,OAAO,OAAO,KAAK0O,EAAI,KAAK,IAAI,MAAQ,CAAA,CAAE,EAAE,MAC7C","x_google_ignoreList":[0,1,2,7,8,9,10,11,12]} \ No newline at end of file diff --git a/js/api-XzRA2j3B.chunk.mjs.map.license b/js/api-BcnqSuh8.chunk.mjs.map.license similarity index 100% rename from js/api-XzRA2j3B.chunk.mjs.map.license rename to js/api-BcnqSuh8.chunk.mjs.map.license diff --git a/js/teams-main.mjs b/js/teams-main.mjs index d8d88a8d3..a06a10daf 100644 --- a/js/teams-main.mjs +++ b/js/teams-main.mjs @@ -1,4 +1,4 @@ -import{aR as Ga,d as He,as as va,X as ht,at as rc,c as W,ae as rr,aS as th,j as v,aT as nh,aU as oc,aB as Qi,aV as So,L as sc,aA as ko,b as ve,aW as xo,aC as ih,aw as ah,ax as rh,K as Ze,n as pn,aX as oh,ap as Io,o as On,aY as mi,an as $t,e as _,f as Y,Z as Xn,az as sh,p as O,v as Be,U as Ii,y as ea,r as Je,aZ as lh,_ as st,V as Ae,i as Q,s as re,F as at,R as xe,S as zt,A as li,B as ta,h as F,k as L,w as A,a as ze,N as Fe,a_ as ch,a$ as uh,q as Ne,aQ as dh,b0 as qn,J as hh,b1 as ph,aP as lc,a4 as mh,x as ut,ab as mn,O as na,a9 as To,aa as No,z as I,G as xt,D as Xe,b2 as fh,ad as cc,u as Oo,H as vh,Q as Qr,M as ga,b3 as gh,b4 as uc,b5 as yh,a1 as _h,b6 as bh,C as eo,b7 as Wi,b8 as En,b9 as It,ba as Ta,bb as Ao,bc as Ch,bd as dc,be as Un,bf as wh,bg as hc,bh as Eh,bi as $n,bj as pc,bk as Rs,bl as Sh,bm as kh,bn as xh,bo as Ih,bp as Th,bq as or,br as Nh,bs as Mo,bt as Oh,bu as Ah,av as Mh,bv as Lh,P as ia,$ as Dh,a0 as Br,a7 as Ph,bw as mc,l as ii,bx as Rh,by as fc,bz as jh,bA as vc,bB as zh,bC as Vh,bD as Bh,bE as $h,bF as gc,bG as yc,bH as Hh,g as Uh,bI as Fh,bJ as Xh,bK as qh,bL as Gh,bM as Wh,bN as Yh,bO as js,bP as Kh,bQ as Jh,bR as Zh,bS as Qh,bT as ep,bU as tp,bV as np,bW as Lo,bX as ip,ag as ap,bY as rp,E as op}from"./_plugin-vue_export-helper-CVDwI8el.chunk.mjs";import{C as Sn,a2 as _c,B as bc,f as kn,aa as sp,ab as lp,ac as fi,m as Re,y as cp,A as up,d as xn,l as Ie,N as sr,v as tn,ad as to,b as Qt,a as qe,p as dp,a5 as aa,ae as hp,af as pp,a4 as mp,ag as fp,ah as vp,u as Cc,k as wc,e as no,ai as zs,aj as gp,ak as Ec,r as yp,x as _p,al as bp,am as Cp,an as wp,c as Na,F as Ep,ao as Sp,aq as kp,ar as xp,as as Ip}from"./logger-DOVfV50r.chunk.mjs";import{n as Sc,o as Tp,p as Np,q as Wa,N as Et,r as kc,s as Op,t as Ap,u as xc,v as Mp,w as Ya,m as Ic,x as Lp,y as Dp,z as Pp,A as Rp,B as jp,C as zp,D as Vp,E as Bp,F as $p,G as Hp,H as Up,I as Fp,J as Xp,j as Do,g as Po,K as qp,L as Gp,i as Wp,M as Yp,O as Kp,P as Jp}from"./NcActionRouter-vYFtIOzD-ChrAWV3C.chunk.mjs";import{N as ci,u as Zp,a as Qp}from"./NcAvatar-1KxMUN7V-DccAxBkh.chunk.mjs";import{_ as Gn,a as em,d as Ro,N as tm}from"./NcPasswordField-BFyzHTOO-CO4pt8cn.chunk.mjs";import{N as In}from"./NcActionButton-BO5T5ePT-BZAaL1--.chunk.mjs";import{d as nm,c as im,e as am,s as rm,f as om,h as sm,i as lm,j as cm,N as um,k as Vs,m as dm,P as hm,n as Bs,C as $s,o as pm,u as mm,p as fm,q as vm,r as gm,t as ym,v as _m,w as bm,x as Cm,y as wm,z as Em,A as Sm,B as km,D as xm,E as Im,M as Lt,F as Si,G as Tm,H as Hs,S as Us,I as Nm,J as Om,K as Am,L as Mm,O as Lm,Q as Dm,R as Pm,T as $r,U as Rm,V as jm,W as zm,X as Fs,Y as Vm,Z as Bm,_ as Va,$ as $m,a0 as Hm}from"./api-XzRA2j3B.chunk.mjs";import{h as Um,C as Fm,g as Xm,F as Pn,f as qm,d as Gm,e as Wm,r as Xs,N as Tc,S as Nc}from"./NcSelect--kERLlBK-BrVdbhZm.chunk.mjs";import{a as Ym,b as Km,_ as qs,P as Jm}from"./index-D58FbAmC.chunk.mjs";import"./index-CFN7fitj.chunk.mjs";import"./index-DhB5PaGa.chunk.mjs";import{C as _i}from"./colors-Cv9F-jWS-CJ-899e8.chunk.mjs";import"./NcSettingsSection-Caz1fuWt-Bz8fDYE9.chunk.mjs";const ic="circles",ac="35.0.0";function Gs(e,n){return(e.aliasOf||e)===(n.aliasOf||n)}function Zm(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(var i in e)if(!Qm(e[i],n[i]))return!1;return!0}function Qm(e,n){return Ga(e)?Ws(e,n):Ga(n)?Ws(n,e):(e&&e.valueOf())===(n&&n.valueOf())}function Ws(e,n){return Ga(n)?e.length===n.length&&e.every((i,a)=>i===n[a]):e.length===1&&e[0]===n}function Ys(e){const n=ht(rc),i=ht(th),a=W(()=>{const c=v(e.to);return n.resolve(c)}),r=W(()=>{const{matched:c}=a.value,{length:f}=c,g=c[f-1],d=i.matched;if(!g||!d.length)return-1;const y=d.findIndex(Gs.bind(null,g));if(y>-1)return y;const b=Ks(c[f-2]);return f>1&&Ks(g)===b&&d[d.length-1].path!==b?d.findIndex(Gs.bind(null,c[f-2])):y}),o=W(()=>r.value>-1&&af(i.params,a.value.params)),s=W(()=>r.value>-1&&r.value===i.matched.length-1&&Zm(i.params,a.value.params));function l(c={}){if(nf(c)){const f=n[v(e.replace)?"replace":"push"](v(e.to)).catch(nh);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:a,href:W(()=>a.value.href),isActive:o,isExactActive:s,navigate:l}}function ef(e){return e.length===1?e[0]:e}const tf=He({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Ys,setup(e,{slots:n}){const i=va(Ys(e)),{options:a}=ht(rc),r=W(()=>({[Js(e.activeClass,a.linkActiveClass,"router-link-active")]:i.isActive,[Js(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const o=n.default&&ef(n.default(i));return e.custom?o:rr("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:r.value},o)}}});function nf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const n=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(n))return}return e.preventDefault&&e.preventDefault(),!0}}function af(e,n){for(const i in n){const a=n[i],r=e[i];if(typeof a=="string"){if(a!==r)return!1}else if(!Ga(r)||r.length!==a.length||a.some((o,s)=>o.valueOf()!==r[s].valueOf()))return!1}return!0}function Ks(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Js=(e,n,i)=>e??n??i;let Oc;const lr=e=>Oc=e,Ac=Symbol();function io(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yi;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yi||(Yi={}));function rf(){const e=ko(!0),n=e.run(()=>ve({}));let i=[],a=[];const r=xo({install(o){lr(r),r._a=o,o.provide(Ac,r),o.config.globalProperties.$pinia=r,a.forEach(s=>i.push(s)),a=[]},use(o){return this._a?i.push(o):a.push(o),this},_p:i,_a:null,_e:e,_s:new Map,state:n});return r}const Mc=()=>{};function Zs(e,n,i,a=Mc){e.add(n);const r=()=>{e.delete(n)&&a()};return!i&&ah()&&rh(r),r}function bi(e,...n){e.forEach(i=>{i(...n)})}const of=e=>e(),Qs=Symbol(),Hr=Symbol();function ao(e,n){e instanceof Map&&n instanceof Map?n.forEach((i,a)=>e.set(a,i)):e instanceof Set&&n instanceof Set&&n.forEach(e.add,e);for(const i in n){if(!n.hasOwnProperty(i))continue;const a=n[i],r=e[i];io(r)&&io(a)&&e.hasOwnProperty(i)&&!Qi(a)&&!So(a)?e[i]=ao(r,a):e[i]=a}return e}const sf=Symbol();function lf(e){return!io(e)||!Object.prototype.hasOwnProperty.call(e,sf)}const{assign:zn}=Object;function cf(e){return!!(Qi(e)&&e.effect)}function uf(e,n,i,a){const{state:r,actions:o,getters:s}=n,l=i.state.value[e];let c;function f(){l||(i.state.value[e]=r?r():{});const g=oh(i.state.value[e]);return zn(g,o,Object.keys(s||{}).reduce((d,y)=>(d[y]=xo(W(()=>{lr(i);const b=i._s.get(e);return s[y].call(b,b)})),d),{}))}return c=Lc(e,f,n,i,a,!0),c}function Lc(e,n,i={},a,r,o){let s;const l=zn({actions:{}},i),c={deep:!0};let f,g,d=new Set,y=new Set,b;const x=a.state.value[e];!o&&!x&&(a.state.value[e]={}),ve({});let T;function P(le){let ee;f=g=!1,typeof le=="function"?(le(a.state.value[e]),ee={type:Yi.patchFunction,storeId:e,events:b}):(ao(a.state.value[e],le),ee={type:Yi.patchObject,payload:le,storeId:e,events:b});const te=T=Symbol();pn().then(()=>{T===te&&(f=!0)}),g=!0,bi(d,ee,a.state.value[e])}const z=o?function(){const{state:le}=i,ee=le?le():{};this.$patch(te=>{zn(te,ee)})}:Mc;function R(){s.stop(),d.clear(),y.clear(),a._s.delete(e)}const K=(le,ee="")=>{if(Qs in le)return le[Hr]=ee,le;const te=function(){lr(a);const ce=Array.from(arguments),we=new Set,fe=new Set;function ae(M){we.add(M)}function H(M){fe.add(M)}bi(y,{args:ce,name:te[Hr],store:X,after:ae,onError:H});let U;try{U=le.apply(this&&this.$id===e?this:X,ce)}catch(M){throw bi(fe,M),M}return U instanceof Promise?U.then(M=>(bi(we,M),M)).catch(M=>(bi(fe,M),Promise.reject(M))):(bi(we,U),U)};return te[Qs]=!0,te[Hr]=ee,te},de={_p:a,$id:e,$onAction:Zs.bind(null,y),$patch:P,$reset:z,$subscribe(le,ee={}){const te=Zs(d,le,ee.detached,()=>ce()),ce=s.run(()=>Ze(()=>a.state.value[e],we=>{(ee.flush==="sync"?g:f)&&le({storeId:e,type:Yi.direct,events:b},we)},zn({},c,ee)));return te},$dispose:R},X=va(de);a._s.set(e,X);const he=(a._a&&a._a.runWithContext||of)(()=>a._e.run(()=>(s=ko()).run(()=>n({action:K}))));for(const le in he){const ee=he[le];if(Qi(ee)&&!cf(ee)||So(ee))o||(x&&lf(ee)&&(Qi(ee)?ee.value=x[le]:ao(ee,x[le])),a.state.value[e][le]=ee);else if(typeof ee=="function"){const te=K(ee,le);he[le]=te,l.actions[le]=ee}}return zn(X,he),zn(oc(X),he),Object.defineProperty(X,"$state",{get:()=>a.state.value[e],set:le=>{P(ee=>{zn(ee,le)})}}),a._p.forEach(le=>{zn(X,s.run(()=>le({store:X,app:a._a,pinia:a,options:l})))}),x&&o&&i.hydrate&&i.hydrate(X.$state,x),f=!0,g=!0,X}function Dc(e,n,i){let a;const r=typeof n=="function";a=r?i:n;function o(s,l){const c=ih();return s=s||(c?ht(Ac,null):null),s&&lr(s),s=Oc,s._s.has(e)||(r?Lc(e,n,a,s):uf(e,a,s)),s._s.get(e)}return o.$id=e,o}function Pc(e){const n=oc(e),i={};for(const a in n){const r=n[a];r.effect?i[a]=W({get:()=>e[a],set(o){e[a]=o}}):(Qi(r)||So(r))&&(i[a]=sc(e,a))}return i}const df={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(e,{emit:n}){const i=n,a=e,r=Io(),o=ve([]),s=W(()=>o.value.reduce((S,D)=>(S[~~D.id]=D)&&S,{})),l=W(()=>o.value.length),c=ve(null),f=ve(!1),g=ve({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),d=ve({splitter:null,timeoutId:null}),y=W(()=>({[`splitpanes splitpanes--${a.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":g.value.dragging})),b=()=>{document.addEventListener("mousemove",P,{passive:!1}),document.addEventListener("mouseup",z),"ontouchstart"in window&&(document.addEventListener("touchmove",P,{passive:!1}),document.addEventListener("touchend",z))},x=()=>{document.removeEventListener("mousemove",P,{passive:!1}),document.removeEventListener("mouseup",z),"ontouchstart"in window&&(document.removeEventListener("touchmove",P,{passive:!1}),document.removeEventListener("touchend",z))},T=(S,D)=>{const j=S.target.closest(".splitpanes__splitter");if(j){const{left:V,top:J}=j.getBoundingClientRect(),{clientX:be,clientY:ye}="ontouchstart"in window&&S.touches?S.touches[0]:S;g.value.cursorOffset=a.horizontal?ye-J:be-V}b(),g.value.mouseDown=!0,g.value.activeSplitter=D},P=S=>{g.value.mouseDown&&(S.preventDefault(),g.value.dragging=!0,requestAnimationFrame(()=>{le(X(S)),Te("resize",{event:S},!0)}))},z=S=>{g.value.dragging&&(window.getSelection().removeAllRanges(),Te("resized",{event:S},!0)),g.value.mouseDown=!1,g.value.activeSplitter=null,setTimeout(()=>{g.value.dragging=!1,x()},100)},R=(S,D)=>{"ontouchstart"in window&&(S.preventDefault(),d.value.splitter===D?(clearTimeout(d.value.timeoutId),d.value.timeoutId=null,K(S,D),d.value.splitter=null):(d.value.splitter=D,d.value.timeoutId=setTimeout(()=>d.value.splitter=null,500))),g.value.dragging||Te("splitter-click",{event:S,index:D},!0)},K=(S,D)=>{if(Te("splitter-dblclick",{event:S,index:D},!0),a.maximizePanes){let j=0;o.value=o.value.map((V,J)=>(V.size=J===D?V.max:V.min,J!==D&&(j+=V.min),V)),o.value[D].size-=j,Te("pane-maximize",{event:S,index:D,pane:o.value[D]}),Te("resized",{event:S,index:D},!0)}},de=(S,D)=>{Te("pane-click",{event:S,index:s.value[D].index,pane:s.value[D]})},X=S=>{const D=c.value.getBoundingClientRect(),{clientX:j,clientY:V}="ontouchstart"in window&&S.touches?S.touches[0]:S;return{x:j-(a.horizontal?0:g.value.cursorOffset)-D.left,y:V-(a.horizontal?g.value.cursorOffset:0)-D.top}},he=S=>{S=S[a.horizontal?"y":"x"];const D=c.value[a.horizontal?"clientHeight":"clientWidth"];return a.rtl&&!a.horizontal&&(S=D-S),S*100/D},le=S=>{const D=g.value.activeSplitter;let j={prevPanesSize:te(D),nextPanesSize:ce(D),prevReachedMinPanes:0,nextReachedMinPanes:0};const V=0+(a.pushOtherPanes?0:j.prevPanesSize),J=100-(a.pushOtherPanes?0:j.nextPanesSize),be=Math.max(Math.min(he(S),J),V);let ye=[D,D+1],Se=o.value[ye[0]]||null,Ve=o.value[ye[1]]||null;const _e=Se.max<100&&be>=Se.max+j.prevPanesSize,ue=Ve.max<100&&be<=100-(Ve.max+ce(D+1));if(_e||ue){_e?(Se.size=Se.max,Ve.size=Math.max(100-Se.max-j.prevPanesSize-j.nextPanesSize,0)):(Se.size=Math.max(100-Ve.max-j.prevPanesSize-ce(D+1),0),Ve.size=Ve.max);return}if(a.pushOtherPanes){const ke=ee(j,be);if(!ke)return;({sums:j,panesToResize:ye}=ke),Se=o.value[ye[0]]||null,Ve=o.value[ye[1]]||null}Se!==null&&(Se.size=Math.min(Math.max(be-j.prevPanesSize-j.prevReachedMinPanes,Se.min),Se.max)),Ve!==null&&(Ve.size=Math.min(Math.max(100-be-j.nextPanesSize-j.nextReachedMinPanes,Ve.min),Ve.max))},ee=(S,D)=>{const j=g.value.activeSplitter,V=[j,j+1];return D{be>V[0]&&be<=j&&(J.size=J.min,S.prevReachedMinPanes+=J.min)}),S.prevPanesSize=te(V[0]),V[0]===void 0)?(S.prevReachedMinPanes=0,o.value[0].size=o.value[0].min,o.value.forEach((J,be)=>{be>0&&be<=j&&(J.size=J.min,S.prevReachedMinPanes+=J.min)}),o.value[V[1]].size=100-S.prevReachedMinPanes-o.value[0].min-S.prevPanesSize-S.nextPanesSize,null):D>100-S.nextPanesSize-o.value[V[1]].min&&(V[1]=fe(j).index,S.nextReachedMinPanes=0,V[1]>j+1&&o.value.forEach((J,be)=>{be>j&&be{be=j+1&&(J.size=J.min,S.nextReachedMinPanes+=J.min)}),o.value[V[0]].size=100-S.prevPanesSize-ce(V[0]-1),null):{sums:S,panesToResize:V}},te=S=>o.value.reduce((D,j,V)=>D+(Vo.value.reduce((D,j,V)=>D+(V>S+1?j.size:0),0),we=S=>[...o.value].reverse().find(D=>D.indexD.min)||{},fe=S=>o.value.find(D=>D.index>S+1&&D.size>D.min)||{},ae=()=>{var S;const D=Array.from(((S=c.value)==null?void 0:S.children)||[]);for(const j of D){const V=j.classList.contains("splitpanes__pane"),J=j.classList.contains("splitpanes__splitter");!V&&!J&&(j.remove(),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))}},H=(S,D,j=!1)=>{const V=S-1,J=document.createElement("div");J.classList.add("splitpanes__splitter"),j||(J.onmousedown=be=>T(be,V),typeof window<"u"&&"ontouchstart"in window&&(J.ontouchstart=be=>T(be,V)),J.onclick=be=>R(be,V+1)),J.ondblclick=be=>K(be,V+1),D.parentNode.insertBefore(J,D)},U=S=>{S.onmousedown=void 0,S.onclick=void 0,S.ondblclick=void 0,S.remove()},M=()=>{var S;const D=Array.from(((S=c.value)==null?void 0:S.children)||[]);for(const V of D)V.className.includes("splitpanes__splitter")&&U(V);let j=0;for(const V of D)V.className.includes("splitpanes__pane")&&(!j&&a.firstSplitter?H(j,V,!0):j&&H(j,V),j++)},ne=({uid:S,...D})=>{const j=s.value[S];for(const[V,J]of Object.entries(D))j[V]=J},Ce=S=>{var D;let j=-1;Array.from(((D=c.value)==null?void 0:D.children)||[]).some(V=>(V.className.includes("splitpanes__pane")&&j++,V.isSameNode(S.el))),o.value.splice(j,0,{...S,index:j}),o.value.forEach((V,J)=>V.index=J),f.value&&pn(()=>{M(),Oe({addedPane:o.value[j]}),Te("pane-add",{pane:o.value[j]})})},Ee=S=>{const D=o.value.findIndex(V=>V.id===S);o.value[D].el=null;const j=o.value.splice(D,1)[0];o.value.forEach((V,J)=>V.index=J),pn(()=>{M(),Te("pane-remove",{pane:j}),Oe({removedPane:{...j}})})},Oe=(S={})=>{!S.addedPane&&!S.removedPane?lt():o.value.some(D=>D.givenSize!==null||D.min||D.max<100)?Me(S):nt(),f.value&&Te("resized")},nt=()=>{const S=100/l.value;let D=0;const j=[],V=[];for(const J of o.value)J.size=Math.max(Math.min(S,J.max),J.min),D-=J.size,J.size>=J.max&&j.push(J.id),J.size<=J.min&&V.push(J.id);D>.1&&De(D,j,V)},lt=()=>{let S=100;const D=[],j=[];let V=0;for(const be of o.value)S-=be.size,be.givenSize!==null&&V++,be.size>=be.max&&D.push(be.id),be.size<=be.min&&j.push(be.id);let J=100;if(S>.1){for(const be of o.value)be.givenSize===null&&(be.size=Math.max(Math.min(S/(l.value-V),be.max),be.min)),J-=be.size;J>.1&&De(J,D,j)}},Me=({addedPane:S,removedPane:D}={})=>{let j=100/l.value,V=0;const J=[],be=[];(S?.givenSize??null)!==null&&(j=(100-S.givenSize)/(l.value-1));for(const ye of o.value)V-=ye.size,ye.size>=ye.max&&J.push(ye.id),ye.size<=ye.min&&be.push(ye.id);if(!(Math.abs(V)<.1)){for(const ye of o.value)S?.givenSize!==null&&S?.id===ye.id||(ye.size=Math.max(Math.min(j,ye.max),ye.min)),V-=ye.size,ye.size>=ye.max&&J.push(ye.id),ye.size<=ye.min&&be.push(ye.id);V>.1&&De(V,J,be)}},De=(S,D,j)=>{let V;S>0?V=S/(l.value-D.length):V=S/(l.value-j.length),o.value.forEach((J,be)=>{if(S>0&&!D.includes(J.id)){const ye=Math.max(Math.min(J.size+V,J.max),J.min),Se=ye-J.size;S-=Se,J.size=ye}else if(!j.includes(J.id)){const ye=Math.max(Math.min(J.size+V,J.max),J.min),Se=ye-J.size;S-=Se,J.size=ye}}),Math.abs(S)>.1&&pn(()=>{f.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},Te=(S,D=void 0,j=!1)=>{const V=D?.index??g.value.activeSplitter??null;i(S,{...D,...V!==null&&{index:V},...j&&V!==null&&{prevPane:o.value[V-(a.firstSplitter?1:0)],nextPane:o.value[V+(a.firstSplitter?0:1)]},panes:o.value.map(J=>({min:J.min,max:J.max,size:J.size}))})};Ze(()=>a.firstSplitter,()=>M()),On(()=>{ae(),M(),Oe(),Te("ready"),f.value=!0}),mi(()=>f.value=!1);const dt=()=>{var S;return rr("div",{ref:c,class:y.value},(S=r.default)==null?void 0:S.call(r))};return $t("panes",o),$t("indexedPanes",s),$t("horizontal",W(()=>a.horizontal)),$t("requestUpdate",ne),$t("onPaneAdd",Ce),$t("onPaneRemove",Ee),$t("onPaneClick",de),(S,D)=>(_(),Y(Xn(dt)))}},hf={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){var n;const i=e,a=ht("requestUpdate"),r=ht("onPaneAdd"),o=ht("horizontal"),s=ht("onPaneRemove"),l=ht("onPaneClick"),c=(n=sh())==null?void 0:n.uid,f=ht("indexedPanes"),g=W(()=>f.value[c]),d=ve(null),y=W(()=>{const P=isNaN(i.size)||i.size===void 0?0:parseFloat(i.size);return Math.max(Math.min(P,x.value),b.value)}),b=W(()=>{const P=parseFloat(i.minSize);return isNaN(P)?0:P}),x=W(()=>{const P=parseFloat(i.maxSize);return isNaN(P)?100:P}),T=W(()=>{var P;return`${o.value?"height":"width"}: ${(P=g.value)==null?void 0:P.size}%`});return Ze(()=>y.value,P=>a({uid:c,size:P})),Ze(()=>b.value,P=>a({uid:c,min:P})),Ze(()=>x.value,P=>a({uid:c,max:P})),On(()=>{r({id:c,el:d.value,min:b.value,max:x.value,givenSize:i.size===void 0?null:y.value,size:y.value})}),mi(()=>s(c)),(P,z)=>(_(),O("div",{ref_key:"paneEl",ref:d,class:"splitpanes__pane",onClick:z[0]||(z[0]=R=>v(l)(R,P._.uid)),style:Ii(T.value)},[Be(P.$slots,"default")],4))}};function pf(e){let n=!1,i;return(...a)=>(n||(n=!0,i=e(...a)),i)}let Rc="missing-app-name";try{Rc=ic}catch{Sn.error("The `@nextcloud/vue` library was used without setting / replacing the `appName`.")}const mf=Rc;let jc="";try{jc=ac}catch{Sn.error("The `@nextcloud/vue` library was used without setting / replacing the `appVersion`.")}const ff=jc;function zc(){return ht("appName",mf)}const Vc=pf(()=>{const e=ea("core","apps",[]),n=zc();return e.find(({id:i})=>i===n)?.name??n});Je(lh);const vf=He({__name:"NcAppContentDetailsToggle",setup(e){const n=fi();Ze(n,i),On(()=>{i(n.value)}),mi(()=>{n.value&&i(!1)});function i(a=!0){const r=document.querySelector(".app-navigation .app-navigation-toggle");r&&(r.style.display=a?"none":"",a===!0&&kn("toggle-navigation",{open:!1}))}return(a,r)=>(_(),Y(v(Fe),{"aria-label":v(ze)("Go back to the list"),class:xe(["app-details-toggle",{"app-details-toggle--mobile":v(n)}]),title:v(ze)("Go back to the list"),variant:"tertiary"},{icon:A(()=>[L(v(Re),{directional:"",path:v(cp)},null,8,["path"])]),_:1},8,["aria-label","class","title"]))}}),gf=st(vf,[["__scopeId","data-v-a28923a1"]]),el=_c("nextcloud").persist().build(),yf=bc().theming?.name??"Nextcloud",_f={name:"NcAppContent",components:{NcAppContentDetailsToggle:gf,Pane:hf,Splitpanes:df},props:{disableSwipe:{type:Boolean,default:!1},listSize:{type:Number,default:20},listMinWidth:{type:Number,default:15},listMaxWidth:{type:Number,default:40},paneConfigKey:{type:String,default:""},showDetails:{type:Boolean,default:!0},layout:{type:String,default:"vertical-split",validator(e){return["no-split","vertical-split","horizontal-split"].includes(e)}},pageHeading:{type:String,default:null},pageTitle:{type:String,default:null}},emits:["update:showDetails","resizeList"],setup(){return{appName:zc(),localizedAppName:Vc(),isMobile:fi(),isRtl:lp}},data(){return{contentHeight:0,swiping:{},listPaneSize:this.restorePaneConfig()}},computed:{paneConfigID(){if(this.paneConfigKey!=="")return`pane-list-size-${this.paneConfigKey}`;try{return`pane-list-size-${this.appName}`}catch{return Sn.info("[NcAppContent]: falling back to global nextcloud pane config"),"pane-list-size-nextcloud"}},detailsPaneSize(){return this.listPaneSize?100-this.listPaneSize:this.paneDefaults.details.size},paneDefaults(){return{list:{size:this.listSize,min:this.listMinWidth,max:this.listMaxWidth},details:{size:100-this.listSize,min:100-this.listMaxWidth,max:100-this.listMinWidth}}},realPageTitle(){const e=new Set;if(this.pageTitle)for(const n of this.pageTitle.split(" - "))e.add(n);else if(this.pageHeading){for(const n of this.pageHeading.split(" - "))e.add(n);e.size>0&&e.add(this.localizedAppName)}else return null;return e.add(yf),[...e.values()].join(" - ")}},watch:{realPageTitle:{immediate:!0,handler(){this.realPageTitle!==null&&(document.title=this.realPageTitle)}},paneConfigKey:{immediate:!0,handler(){this.restorePaneConfig()}}},mounted(){this.disableSwipe||(this.swiping=sp(this.$el,{onSwipeEnd:this.handleSwipe})),this.restorePaneConfig()},methods:{handleSwipe(e,n){Math.abs(this.swiping.lengthX)>70&&(this.swiping.coordsStart.x<300/2&&n==="right"?kn("toggle-navigation",{open:!0}):this.swiping.coordsStart.x<300*1.5&&n==="left"&&kn("toggle-navigation",{open:!1}))},handlePaneResize(e){const n=parseInt(e.panes[0].size,10);el.setItem(this.paneConfigID,JSON.stringify(n)),this.listPaneSize=n,this.$emit("resizeList",{size:n}),Sn.debug("[NcAppContent] pane config",{listPaneSize:n})},restorePaneConfig(){const e=parseInt(el.getItem(this.paneConfigID),10);if(!isNaN(e)&&e!==this.listPaneSize)return Sn.debug("[NcAppContent] pane config",{listPaneSize:e}),this.listPaneSize=e,e},hideDetails(){this.$emit("update:showDetails",!1)}}},bf={key:0,class:"hidden-visually"},Cf={class:"app-content-wrapper__list"},wf={key:1,class:"app-content-wrapper"};function Ef(e,n,i,a,r,o){const s=Ae("NcAppContentDetailsToggle"),l=Ae("Pane"),c=Ae("Splitpanes");return _(),O("main",{id:"app-content-vue",class:xe(["app-content no-snapper",{"app-content--has-list":!!e.$slots.list}])},[i.pageHeading?(_(),O("h1",bf,Q(i.pageHeading),1)):re("",!0),e.$slots.list?(_(),O(at,{key:1},[a.isMobile||i.layout==="no-split"?(_(),O("div",{key:0,class:xe(["app-content-wrapper app-content-wrapper--no-split",{"app-content-wrapper--show-details":i.showDetails,"app-content-wrapper--show-list":!i.showDetails,"app-content-wrapper--mobile":a.isMobile}])},[i.showDetails?(_(),Y(s,{key:0,onClick:zt(o.hideDetails,["stop","prevent"])},null,8,["onClick"])):re("",!0),li(F("div",Cf,[Be(e.$slots,"list",{},void 0,!0)],512),[[ta,!i.showDetails]]),i.showDetails?Be(e.$slots,"default",{key:1},void 0,!0):re("",!0)],2)):i.layout==="vertical-split"||i.layout==="horizontal-split"?(_(),O("div",wf,[L(c,{horizontal:i.layout==="horizontal-split",class:xe(["default-theme",{"splitpanes--horizontal":i.layout==="horizontal-split","splitpanes--vertical":i.layout==="vertical-split"}]),rtl:a.isRtl,onResized:o.handlePaneResize},{default:A(()=>[L(l,{class:"splitpanes__pane-list",size:r.listPaneSize||o.paneDefaults.list.size,minSize:o.paneDefaults.list.min,maxSize:o.paneDefaults.list.max},{default:A(()=>[Be(e.$slots,"list",{},void 0,!0)]),_:3},8,["size","minSize","maxSize"]),L(l,{class:"splitpanes__pane-details",size:o.detailsPaneSize,minSize:o.paneDefaults.details.min,maxSize:o.paneDefaults.details.max},{default:A(()=>[Be(e.$slots,"default",{},void 0,!0)]),_:3},8,["size","minSize","maxSize"])]),_:3},8,["horizontal","class","rtl","onResized"])])):re("",!0)],64)):re("",!0),e.$slots.list?re("",!0):Be(e.$slots,"default",{key:2},void 0,!0)],2)}const Sf=st(_f,[["render",Ef],["__scopeId","data-v-51427d61"]]),Bc=Symbol.for("NcContent:setHasAppNavigation"),kf=Symbol.for("NcContent:selector");Je(ch);const xf=` diff --git a/js/teams-settings-team-folders.mjs b/js/teams-settings-team-folders.mjs index 791435f69..c44a78c19 100644 --- a/js/teams-settings-team-folders.mjs +++ b/js/teams-settings-team-folders.mjs @@ -1,2 +1,2 @@ -import{d as ne,z as t,y as ie,c as K,b as u,o as ce,e as n,p,k as m,w as c,h as s,j as o,N as j,q as b,i as d,s as _,F as W,G as me,f as G,C as fe,D as ve,E as be}from"./_plugin-vue_export-helper-CVDwI8el.chunk.mjs";import{d as pe,N as _e,a as f,l as y,b as P,e as ye,c as he}from"./logger-DOVfV50r.chunk.mjs";import{f as T,N as L,p as O}from"./NcSelect--kERLlBK-BrVdbhZm.chunk.mjs";import{c as ge}from"./modulepreload-polyfill-CU2lGtXP.chunk.mjs";import{N as X}from"./NcActionButton-BO5T5ePT-BZAaL1--.chunk.mjs";import{a as Y,_ as Ie}from"./NcPasswordField-BFyzHTOO-CO4pt8cn.chunk.mjs";import{N as we}from"./NcSettingsSection-Caz1fuWt-Bz8fDYE9.chunk.mjs";import{g as ke,a as Ue,u as qe,l as Ce,d as Ve,b as Z}from"./api-XzRA2j3B.chunk.mjs";const Ne={class:"team-folders__input-row"},Te={class:"team-folders__hint"},Be={class:"team-folders__list"},Se={class:"team-folders__list-title"},Ae={key:0,class:"team-folders__hint"},De={key:1,class:"team-folders__scroll"},Ge={class:"team-folders__table"},Pe={key:0},xe={class:"team-folders__mountpoint"},Ee={key:0},Fe={class:"team-folders__quota"},Me={class:"hidden-visually"},je={key:0,class:"team-folders__empty"},Le={colspan:"4"},Oe={class:"team-folders__mountpoint"},Qe={class:"team-folders__quota"},Re={class:"team-folders__remove"},ze={class:"team-folders__warning"},$e={class:"team-folders__dialog-options"},He=ne({__name:"AdminTeamFolders",setup(We){const h={id:"0",label:t("circles","Unlimited")},ee=[{id:"1 GB",label:"1 GB"},{id:"5 GB",label:"5 GB"},{id:"10 GB",label:"10 GB"}],w=Number(ie("circles","teamFolderDefaultQuota",0)),Q=K(()=>{const e=[...ee];if(w<=0)return e.unshift(h),e;const l=T(w),a={id:l,label:l};return e.some(r=>r.id===l)?e.unshift(h):e.unshift(a),e}),B=u(w<=0?h:{id:T(w),label:T(w)}),S=u([]),g=u({}),x=u(new Set),N=u(new Set),A=u(!0),k=u("teamName"),U=u(!0),I=u(null),q=u(""),v=u(!1),i=u("create"),E=u([]),C=u(null),D=u(!1),R=K(()=>{const e=U.value?1:-1;return[...S.value].sort((l,a)=>{const r=z(l,k.value),V=z(a,k.value);return rV?e:0})});function z(e,l){switch(l){case"teamName":return e.teamName;case"mountPoint":return e.folder?.mountPoint??""}}function ae(e){return e.folder?.mountPoint??""}function $(e){k.value===e?U.value=!U.value:(k.value=e,U.value=!0)}async function F(){A.value=!0;try{S.value=await ke(),g.value=Object.fromEntries(S.value.map(e=>[e.teamId,M(e.folder?.quota??w)])),x.value=new Set}catch(e){f(t("circles","Unable to load team folders")),y.error("Unable to load team folders",{error:e})}finally{A.value=!1}}async function le(e){I.value=e,q.value=e.teamName,i.value="create",C.value=null,D.value=!0;try{E.value=await Ue(e.teamId)}catch(l){E.value=[],f(t("circles","Unable to load available team folders")),y.error("Unable to load available team folders",{error:l,teamId:e.teamId})}finally{D.value=!1}}function H(){v.value||(I.value=null)}async function te(){if(I.value===null||i.value==="create"&&q.value.trim()===""||i.value==="existing"&&C.value===null)return;const e=I.value.teamId,l=C.value?.id;v.value=!0;try{i.value==="create"?await qe(e,q.value.trim()):l!==void 0&&await Ce(e,l),P(t("circles","Team folder added")),I.value=null,await F()}catch(a){f(t("circles","Unable to add team folder")),y.error("Unable to add team folder",{error:a,teamId:e})}finally{v.value=!1}}async function oe(e){if(await ye({name:t("circles","Delete team"),text:t("circles","Are you sure you want to delete {team}? This cannot be undone.",{team:e.teamName}),labelConfirm:t("circles","Delete team"),labelReject:t("circles","Cancel"),severity:"error"}))try{await Ve(e.teamId),P(t("circles","Team deleted")),await F()}catch(l){f(t("circles","Unable to delete the team")),y.error("Unable to delete team",{error:l,teamId:e.teamId})}}function J(e){const l=O(e,!0);if(l!==null&&l>=0){const a=T(l);return{id:a,label:a}}return h}function M(e){if(e<=0)return h;const l=T(e);return{id:l,label:l}}async function re(e,l){const a=g.value[e.teamId],r=l.id===h.id?0:O(l.id,!0);if(r===null||r<0){f(t("circles","Quota must be a non-negative number."));return}x.value.add(e.teamId),g.value[e.teamId]=l,N.value.add(e.teamId);try{const V=await Z(e.teamId,Math.round(r));g.value[e.teamId]=M(V.quota??r),P(t("circles","Changed team folder quota"))}catch(V){g.value[e.teamId]=a,f(t("circles","Unable to update team folder quota")),y.error("Unable to update team folder quota",{error:V,teamId:e.teamId})}finally{N.value.delete(e.teamId)}}async function se(e){const l=S.value.filter(a=>a.folder!==null&&!x.value.has(a.teamId));await Promise.all(l.map(async a=>{N.value.add(a.teamId);try{const r=await Z(a.teamId,Math.round(e));g.value[a.teamId]=M(r.quota??e)}catch(r){f(t("circles","Unable to update team folder quota for {team}",{team:a.teamName})),y.error("Unable to update team folder quota",{error:r,teamId:a.teamId})}finally{N.value.delete(a.teamId)}}))}async function de(e,l){try{await ge();const a=fe("/apps/circles/settings/{key}",{appId:"circles",key:e}),{data:r}=await he.post(a,{value:l});if(r.ocs.meta.status!=="ok"){if(r.ocs.meta.message)return f(t("circles","Unable to update team folder config")),y.error("Error while updating team folder config",{error:r.ocs}),!1;throw new Error(`${r.ocs.meta.statuscode}`)}return!0}catch(a){return f(t("circles","Unable to update team folder config")),y.error("Error while updating team folder config",{error:a}),!1}}async function ue(){const e=B.value.id===h.id?0:O(B.value.id,!0);if(e===null||e<0){f(t("circles","Quota must be a non-negative number."));return}await de("team_folder_default_quota",String(Math.round(e)))&&(P(t("circles","Changed default team folder quota")),await se(e))}return ce(F),(e,l)=>(n(),p(W,null,[m(o(we),{name:o(t)("circles","Teams"),description:o(t)("circles","Configure the default storage quota for team folders. Requires the Team Folders app to be installed and enabled.")},{default:c(()=>[s("div",Ne,[m(o(L),{modelValue:B.value,"onUpdate:modelValue":l[0]||(l[0]=a=>B.value=a),clearable:!1,createOption:J,inputLabel:o(t)("circles","Default quota"),options:Q.value,placeholder:o(t)("circles","Select default quota"),taggable:"",class:"team-folders__input"},null,8,["modelValue","inputLabel","options","placeholder"]),m(o(j),{variant:"primary",onClick:ue},{default:c(()=>[b(d(o(t)("circles","Save")),1)]),_:1})]),s("p",Te,d(o(t)("circles","Default storage quota applied to each auto-created team folder. Use 0 for unlimited storage.")),1)]),_:1},8,["name","description"]),s("div",Be,[s("h3",Se,d(o(t)("circles","Teams")),1),A.value?(n(),p("p",Ae,d(o(t)("circles","Loading team folders…")),1)):_("",!0),A.value?_("",!0):(n(),p("div",De,[s("table",Ge,[s("thead",null,[s("tr",null,[s("th",null,[s("button",{type:"button",class:"team-folders__sort-header",onClick:l[1]||(l[1]=a=>$("teamName"))},[b(d(o(t)("circles","Team"))+" ",1),k.value==="teamName"?(n(),p("span",Pe,d(U.value?"▲":"▼"),1)):_("",!0)])]),s("th",xe,[s("button",{type:"button",class:"team-folders__sort-header",onClick:l[2]||(l[2]=a=>$("mountPoint"))},[b(d(o(t)("circles","Team folder"))+" ",1),k.value==="mountPoint"?(n(),p("span",Ee,d(U.value?"▲":"▼"),1)):_("",!0)])]),s("th",Fe,d(o(t)("circles","Storage quota")),1),s("th",null,[s("span",Me,d(o(t)("circles","Actions")),1)])])]),s("tbody",null,[R.value.length===0?(n(),p("tr",je,[s("td",Le,d(o(t)("circles","No team folders found.")),1)])):(n(!0),p(W,{key:1},me(R.value,a=>(n(),p("tr",{key:a.teamId},[s("td",null,d(a.teamName),1),s("td",Oe,d(ae(a)),1),s("td",Qe,[m(o(L),{modelValue:g.value[a.teamId],options:Q.value,createOption:J,disabled:a.folder===null||N.value.has(a.teamId),"aria-label":o(t)("circles","Storage quota"),clearable:!1,taggable:"",class:"team-folders__quota-select","onUpdate:modelValue":r=>re(a,r)},null,8,["modelValue","options","disabled","aria-label","onUpdate:modelValue"])]),s("td",Re,[m(o(pe),{forceMenu:"","aria-label":o(t)("circles","Team actions")},{default:c(()=>[a.folder===null?(n(),G(o(X),{key:0,closeAfterClick:"",onClick:r=>le(a)},{default:c(()=>[b(d(o(t)("circles","Add")),1)]),_:1},8,["onClick"])):_("",!0),m(o(X),{closeAfterClick:"",onClick:r=>oe(a)},{default:c(()=>[b(d(o(t)("circles","Delete team")),1)]),_:1},8,["onClick"])]),_:2},1032,["aria-label"])])]))),128))])])])),I.value?(n(),G(o(_e),{key:2,name:o(t)("circles","Add a team folder"),open:I.value!==null,onClosing:H},{actions:c(()=>[m(o(j),{disabled:v.value,onClick:H},{default:c(()=>[b(d(o(t)("circles","Cancel")),1)]),_:1},8,["disabled"]),m(o(j),{variant:"primary",disabled:v.value||(i.value==="create"?q.value.trim()==="":C.value===null),onClick:te},{default:c(()=>[b(d(o(t)("circles","Add")),1)]),_:1},8,["disabled"])]),default:c(()=>[s("p",ze,d(o(t)("circles","This team folder can only be assigned to this team. It cannot be assigned to another team, and this action cannot be undone.")),1),s("div",$e,[m(o(Y),{modelValue:i.value,"onUpdate:modelValue":l[3]||(l[3]=a=>i.value=a),value:"create",type:"radio",disabled:v.value},{default:c(()=>[b(d(o(t)("circles","Create a new team folder")),1)]),_:1},8,["modelValue","disabled"]),i.value==="create"?(n(),G(o(Ie),{key:0,modelValue:q.value,"onUpdate:modelValue":l[4]||(l[4]=a=>q.value=a),label:o(t)("circles","Team folder name"),disabled:v.value,required:""},null,8,["modelValue","label","disabled"])):_("",!0),m(o(Y),{modelValue:i.value,"onUpdate:modelValue":l[5]||(l[5]=a=>i.value=a),value:"existing",type:"radio",disabled:v.value},{default:c(()=>[b(d(o(t)("circles","Use an existing team folder")),1)]),_:1},8,["modelValue","disabled"]),i.value==="existing"?(n(),G(o(L),{key:1,modelValue:C.value,"onUpdate:modelValue":l[6]||(l[6]=a=>C.value=a),options:E.value,loading:D.value,disabled:v.value||D.value,placeholder:o(t)("circles","Select a team folder"),label:"mountPoint",clearable:!1},null,8,["modelValue","options","loading","disabled","placeholder"])):_("",!0)])]),_:1},8,["name","open"])):_("",!0)])],64))}}),Je=ve(He,[["__scopeId","data-v-f8bbddb7"]]),Ke=be(Je);Ke.mount("#vue-admin-team-folders"); +import{d as ne,z as t,y as ie,c as K,b as u,o as ce,e as n,p,k as m,w as c,h as s,j as o,N as j,q as b,i as d,s as _,F as W,G as me,f as G,C as fe,D as ve,E as be}from"./_plugin-vue_export-helper-CVDwI8el.chunk.mjs";import{d as pe,N as _e,a as f,l as y,b as P,e as ye,c as he}from"./logger-DOVfV50r.chunk.mjs";import{f as T,N as L,p as O}from"./NcSelect--kERLlBK-BrVdbhZm.chunk.mjs";import{c as ge}from"./modulepreload-polyfill-CU2lGtXP.chunk.mjs";import{N as X}from"./NcActionButton-BO5T5ePT-BZAaL1--.chunk.mjs";import{a as Y,_ as Ie}from"./NcPasswordField-BFyzHTOO-CO4pt8cn.chunk.mjs";import{N as we}from"./NcSettingsSection-Caz1fuWt-Bz8fDYE9.chunk.mjs";import{g as ke,a as Ue,u as qe,l as Ce,d as Ve,b as Z}from"./api-BcnqSuh8.chunk.mjs";const Ne={class:"team-folders__input-row"},Te={class:"team-folders__hint"},Be={class:"team-folders__list"},Se={class:"team-folders__list-title"},Ae={key:0,class:"team-folders__hint"},De={key:1,class:"team-folders__scroll"},Ge={class:"team-folders__table"},Pe={key:0},xe={class:"team-folders__mountpoint"},Ee={key:0},Fe={class:"team-folders__quota"},Me={class:"hidden-visually"},je={key:0,class:"team-folders__empty"},Le={colspan:"4"},Oe={class:"team-folders__mountpoint"},Qe={class:"team-folders__quota"},Re={class:"team-folders__remove"},ze={class:"team-folders__warning"},$e={class:"team-folders__dialog-options"},He=ne({__name:"AdminTeamFolders",setup(We){const h={id:"0",label:t("circles","Unlimited")},ee=[{id:"1 GB",label:"1 GB"},{id:"5 GB",label:"5 GB"},{id:"10 GB",label:"10 GB"}],w=Number(ie("circles","teamFolderDefaultQuota",0)),Q=K(()=>{const e=[...ee];if(w<=0)return e.unshift(h),e;const l=T(w),a={id:l,label:l};return e.some(r=>r.id===l)?e.unshift(h):e.unshift(a),e}),B=u(w<=0?h:{id:T(w),label:T(w)}),S=u([]),g=u({}),x=u(new Set),N=u(new Set),A=u(!0),k=u("teamName"),U=u(!0),I=u(null),q=u(""),v=u(!1),i=u("create"),E=u([]),C=u(null),D=u(!1),R=K(()=>{const e=U.value?1:-1;return[...S.value].sort((l,a)=>{const r=z(l,k.value),V=z(a,k.value);return rV?e:0})});function z(e,l){switch(l){case"teamName":return e.teamName;case"mountPoint":return e.folder?.mountPoint??""}}function ae(e){return e.folder?.mountPoint??""}function $(e){k.value===e?U.value=!U.value:(k.value=e,U.value=!0)}async function F(){A.value=!0;try{S.value=await ke(),g.value=Object.fromEntries(S.value.map(e=>[e.teamId,M(e.folder?.quota??w)])),x.value=new Set}catch(e){f(t("circles","Unable to load team folders")),y.error("Unable to load team folders",{error:e})}finally{A.value=!1}}async function le(e){I.value=e,q.value=e.teamName,i.value="create",C.value=null,D.value=!0;try{E.value=await Ue(e.teamId)}catch(l){E.value=[],f(t("circles","Unable to load available team folders")),y.error("Unable to load available team folders",{error:l,teamId:e.teamId})}finally{D.value=!1}}function H(){v.value||(I.value=null)}async function te(){if(I.value===null||i.value==="create"&&q.value.trim()===""||i.value==="existing"&&C.value===null)return;const e=I.value.teamId,l=C.value?.id;v.value=!0;try{i.value==="create"?await qe(e,q.value.trim()):l!==void 0&&await Ce(e,l),P(t("circles","Team folder added")),I.value=null,await F()}catch(a){f(t("circles","Unable to add team folder")),y.error("Unable to add team folder",{error:a,teamId:e})}finally{v.value=!1}}async function oe(e){if(await ye({name:t("circles","Delete team"),text:t("circles","Are you sure you want to delete {team}? This cannot be undone.",{team:e.teamName}),labelConfirm:t("circles","Delete team"),labelReject:t("circles","Cancel"),severity:"error"}))try{await Ve(e.teamId),P(t("circles","Team deleted")),await F()}catch(l){f(t("circles","Unable to delete the team")),y.error("Unable to delete team",{error:l,teamId:e.teamId})}}function J(e){const l=O(e,!0);if(l!==null&&l>=0){const a=T(l);return{id:a,label:a}}return h}function M(e){if(e<=0)return h;const l=T(e);return{id:l,label:l}}async function re(e,l){const a=g.value[e.teamId],r=l.id===h.id?0:O(l.id,!0);if(r===null||r<0){f(t("circles","Quota must be a non-negative number."));return}x.value.add(e.teamId),g.value[e.teamId]=l,N.value.add(e.teamId);try{const V=await Z(e.teamId,Math.round(r));g.value[e.teamId]=M(V.quota??r),P(t("circles","Changed team folder quota"))}catch(V){g.value[e.teamId]=a,f(t("circles","Unable to update team folder quota")),y.error("Unable to update team folder quota",{error:V,teamId:e.teamId})}finally{N.value.delete(e.teamId)}}async function se(e){const l=S.value.filter(a=>a.folder!==null&&!x.value.has(a.teamId));await Promise.all(l.map(async a=>{N.value.add(a.teamId);try{const r=await Z(a.teamId,Math.round(e));g.value[a.teamId]=M(r.quota??e)}catch(r){f(t("circles","Unable to update team folder quota for {team}",{team:a.teamName})),y.error("Unable to update team folder quota",{error:r,teamId:a.teamId})}finally{N.value.delete(a.teamId)}}))}async function de(e,l){try{await ge();const a=fe("/apps/circles/settings/{key}",{appId:"circles",key:e}),{data:r}=await he.post(a,{value:l});if(r.ocs.meta.status!=="ok"){if(r.ocs.meta.message)return f(t("circles","Unable to update team folder config")),y.error("Error while updating team folder config",{error:r.ocs}),!1;throw new Error(`${r.ocs.meta.statuscode}`)}return!0}catch(a){return f(t("circles","Unable to update team folder config")),y.error("Error while updating team folder config",{error:a}),!1}}async function ue(){const e=B.value.id===h.id?0:O(B.value.id,!0);if(e===null||e<0){f(t("circles","Quota must be a non-negative number."));return}await de("team_folder_default_quota",String(Math.round(e)))&&(P(t("circles","Changed default team folder quota")),await se(e))}return ce(F),(e,l)=>(n(),p(W,null,[m(o(we),{name:o(t)("circles","Teams"),description:o(t)("circles","Configure the default storage quota for team folders. Requires the Team Folders app to be installed and enabled.")},{default:c(()=>[s("div",Ne,[m(o(L),{modelValue:B.value,"onUpdate:modelValue":l[0]||(l[0]=a=>B.value=a),clearable:!1,createOption:J,inputLabel:o(t)("circles","Default quota"),options:Q.value,placeholder:o(t)("circles","Select default quota"),taggable:"",class:"team-folders__input"},null,8,["modelValue","inputLabel","options","placeholder"]),m(o(j),{variant:"primary",onClick:ue},{default:c(()=>[b(d(o(t)("circles","Save")),1)]),_:1})]),s("p",Te,d(o(t)("circles","Default storage quota applied to each auto-created team folder. Use 0 for unlimited storage.")),1)]),_:1},8,["name","description"]),s("div",Be,[s("h3",Se,d(o(t)("circles","Teams")),1),A.value?(n(),p("p",Ae,d(o(t)("circles","Loading team folders…")),1)):_("",!0),A.value?_("",!0):(n(),p("div",De,[s("table",Ge,[s("thead",null,[s("tr",null,[s("th",null,[s("button",{type:"button",class:"team-folders__sort-header",onClick:l[1]||(l[1]=a=>$("teamName"))},[b(d(o(t)("circles","Team"))+" ",1),k.value==="teamName"?(n(),p("span",Pe,d(U.value?"▲":"▼"),1)):_("",!0)])]),s("th",xe,[s("button",{type:"button",class:"team-folders__sort-header",onClick:l[2]||(l[2]=a=>$("mountPoint"))},[b(d(o(t)("circles","Team folder"))+" ",1),k.value==="mountPoint"?(n(),p("span",Ee,d(U.value?"▲":"▼"),1)):_("",!0)])]),s("th",Fe,d(o(t)("circles","Storage quota")),1),s("th",null,[s("span",Me,d(o(t)("circles","Actions")),1)])])]),s("tbody",null,[R.value.length===0?(n(),p("tr",je,[s("td",Le,d(o(t)("circles","No team folders found.")),1)])):(n(!0),p(W,{key:1},me(R.value,a=>(n(),p("tr",{key:a.teamId},[s("td",null,d(a.teamName),1),s("td",Oe,d(ae(a)),1),s("td",Qe,[m(o(L),{modelValue:g.value[a.teamId],options:Q.value,createOption:J,disabled:a.folder===null||N.value.has(a.teamId),"aria-label":o(t)("circles","Storage quota"),clearable:!1,taggable:"",class:"team-folders__quota-select","onUpdate:modelValue":r=>re(a,r)},null,8,["modelValue","options","disabled","aria-label","onUpdate:modelValue"])]),s("td",Re,[m(o(pe),{forceMenu:"","aria-label":o(t)("circles","Team actions")},{default:c(()=>[a.folder===null?(n(),G(o(X),{key:0,closeAfterClick:"",onClick:r=>le(a)},{default:c(()=>[b(d(o(t)("circles","Add")),1)]),_:1},8,["onClick"])):_("",!0),m(o(X),{closeAfterClick:"",onClick:r=>oe(a)},{default:c(()=>[b(d(o(t)("circles","Delete team")),1)]),_:1},8,["onClick"])]),_:2},1032,["aria-label"])])]))),128))])])])),I.value?(n(),G(o(_e),{key:2,name:o(t)("circles","Add a team folder"),open:I.value!==null,onClosing:H},{actions:c(()=>[m(o(j),{disabled:v.value,onClick:H},{default:c(()=>[b(d(o(t)("circles","Cancel")),1)]),_:1},8,["disabled"]),m(o(j),{variant:"primary",disabled:v.value||(i.value==="create"?q.value.trim()==="":C.value===null),onClick:te},{default:c(()=>[b(d(o(t)("circles","Add")),1)]),_:1},8,["disabled"])]),default:c(()=>[s("p",ze,d(o(t)("circles","This team folder can only be assigned to this team. It cannot be assigned to another team, and this action cannot be undone.")),1),s("div",$e,[m(o(Y),{modelValue:i.value,"onUpdate:modelValue":l[3]||(l[3]=a=>i.value=a),value:"create",type:"radio",disabled:v.value},{default:c(()=>[b(d(o(t)("circles","Create a new team folder")),1)]),_:1},8,["modelValue","disabled"]),i.value==="create"?(n(),G(o(Ie),{key:0,modelValue:q.value,"onUpdate:modelValue":l[4]||(l[4]=a=>q.value=a),label:o(t)("circles","Team folder name"),disabled:v.value,required:""},null,8,["modelValue","label","disabled"])):_("",!0),m(o(Y),{modelValue:i.value,"onUpdate:modelValue":l[5]||(l[5]=a=>i.value=a),value:"existing",type:"radio",disabled:v.value},{default:c(()=>[b(d(o(t)("circles","Use an existing team folder")),1)]),_:1},8,["modelValue","disabled"]),i.value==="existing"?(n(),G(o(L),{key:1,modelValue:C.value,"onUpdate:modelValue":l[6]||(l[6]=a=>C.value=a),options:E.value,loading:D.value,disabled:v.value||D.value,placeholder:o(t)("circles","Select a team folder"),label:"mountPoint",clearable:!1},null,8,["modelValue","options","loading","disabled","placeholder"])):_("",!0)])]),_:1},8,["name","open"])):_("",!0)])],64))}}),Je=ve(He,[["__scopeId","data-v-f8bbddb7"]]),Ke=be(Je);Ke.mount("#vue-admin-team-folders"); //# sourceMappingURL=teams-settings-team-folders.mjs.map