mirror of
https://github.com/nextcloud/server.git
synced 2026-05-25 18:52:53 -04:00
2 lines
No EOL
125 KiB
JavaScript
2 lines
No EOL
125 KiB
JavaScript
(globalThis.webpackChunknextcloud=globalThis.webpackChunknextcloud||[]).push([[3239,7471],{46984(t,e,s){"use strict";s.d(e,{FF:()=>d,Iu:()=>l,N_:()=>o});var i=s(19051),n=s(63814),a=s(36117);const r=t=>({id:t.id,name:t.displayname,usercount:t.usercount,disabled:t.disabled,canAdd:t.canAdd,canRemove:t.canRemove}),o=({search:t,offset:e,limit:s})=>{const o=new AbortController;return new a.CancelablePromise((async(a,l,d)=>{d((()=>o.abort()));try{const{data:l}=await i.Ay.get((0,n.KT)("/cloud/groups/details?search={search}&offset={offset}&limit={limit}",{search:t,offset:e,limit:s}),{signal:o.signal});a((l.ocs?.data?.groups??[]).map(r))}catch(t){l(t)}}))},l=async({userId:t})=>{const e=(0,n.KT)("/cloud/users/{userId}/groups/details",{userId:t}),{data:s}=await i.Ay.get(e);return(s.ocs?.data?.groups??[]).map(r)},d=async({userId:t})=>{const e=(0,n.KT)("/cloud/users/{userId}/subadmins/details",{userId:t}),{data:s}=await i.Ay.get(e);return(s.ocs?.data?.groups??[]).map(r)}},95668(t,e,s){"use strict";s.d(e,{HK:()=>r,MY:()=>a,SA:()=>n});var i=s(53334);const n={id:"none",label:(0,i.Tl)("settings","Unlimited")},a={id:"default",label:(0,i.Tl)("settings","Default quota")},r=t=>{const e=Object.keys(t);return 1===e.length&&"id"===e.at(0)}},38775(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".modal__header[data-v-0540d351]{margin:0}.modal__content[data-v-0540d351]{display:flex;flex-direction:column;align-items:center;padding:20px;gap:4px 0}.modal__button-row[data-v-0540d351]{display:flex;width:100%;justify-content:space-between}","",{version:3,sources:["webpack://./apps/settings/src/components/GroupListItem.vue"],names:[],mappings:"AAEC,gCACC,QAAA,CAGD,iCACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,YAAA,CACA,SAAA,CAGD,oCACC,YAAA,CACA,UAAA,CACA,6BAAA",sourcesContent:["\n.modal {\n\t&__header {\n\t\tmargin: 0;\n\t}\n\n\t&__content {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tpadding: 20px;\n\t\tgap: 4px 0;\n\t}\n\n\t&__button-row {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\tjustify-content: space-between;\n\t}\n}\n"],sourceRoot:""}]);const o=r},91544(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".empty[data-v-73fd953a] .icon-vue{width:64px;height:64px}.empty[data-v-73fd953a] .icon-vue svg{max-width:64px;max-height:64px}","",{version:3,sources:["webpack://./apps/settings/src/components/UserList.vue"],names:[],mappings:"AAKE,kCACC,UAAA,CACA,WAAA,CAEA,sCACC,cAAA,CACA,eAAA",sourcesContent:["\n@use './Users/shared/styles' as *;\n\n.empty {\n\t:deep {\n\t\t.icon-vue {\n\t\t\twidth: 64px;\n\t\t\theight: 64px;\n\n\t\t\tsvg {\n\t\t\t\tmax-width: 64px;\n\t\t\t\tmax-height: 64px;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=r},41992(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".dialog__form[data-v-0cf68bf0]{display:flex;flex-direction:column;align-items:center;padding:0 8px;gap:4px 0}.dialog__item[data-v-0cf68bf0]{width:100%}.dialog__item[data-v-0cf68bf0]:not(:focus):not(:active){border-color:var(--color-border-dark)}.dialog__hint[data-v-0cf68bf0]{color:var(--color-text-maxcontrast);margin-top:8px;align-self:flex-start}.dialog__label[data-v-0cf68bf0]{display:block;padding:4px 0}.dialog__select[data-v-0cf68bf0]{width:100%}.dialog__managers[data-v-0cf68bf0]{margin-bottom:12px}.dialog__submit[data-v-0cf68bf0]{margin-top:4px;margin-bottom:8px}.dialog[data-v-0cf68bf0] .dialog__actions{margin:auto}","",{version:3,sources:["webpack://./apps/settings/src/components/Users/NewUserDialog.vue"],names:[],mappings:"AAEC,+BACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,aAAA,CACA,SAAA,CAGD,+BACC,UAAA,CAEA,wDACC,qCAAA,CAIF,+BACC,mCAAA,CACA,cAAA,CACA,qBAAA,CAGD,gCACC,aAAA,CACA,aAAA,CAGD,iCACC,UAAA,CAGD,mCACC,kBAAA,CAGD,iCACC,cAAA,CACA,iBAAA,CAIA,0CACC,WAAA",sourcesContent:["\n.dialog {\n\t&__form {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tpadding: 0 8px;\n\t\tgap: 4px 0;\n\t}\n\n\t&__item {\n\t\twidth: 100%;\n\n\t\t&:not(:focus):not(:active) {\n\t\t\tborder-color: var(--color-border-dark);\n\t\t}\n\t}\n\n\t&__hint {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tmargin-top: 8px;\n\t\talign-self: flex-start;\n\t}\n\n\t&__label {\n\t\tdisplay: block;\n\t\tpadding: 4px 0;\n\t}\n\n\t&__select {\n\t\twidth: 100%;\n\t}\n\n\t&__managers {\n\t\tmargin-bottom: 12px;\n\t}\n\n\t&__submit {\n\t\tmargin-top: 4px;\n\t\tmargin-bottom: 8px;\n\t}\n\n\t:deep {\n\t\t.dialog__actions {\n\t\t\tmargin: auto;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=r},18033(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".footer[data-v-20636959]{position:relative;display:flex;min-width:100%;width:fit-content;height:var(--row-height);background-color:var(--color-main-background)}.footer__cell[data-v-20636959]{display:flex;flex-direction:column;justify-content:center;padding:0 var(--cell-padding);min-width:var(--cell-width);width:var(--cell-width);color:var(--color-main-text)}.footer__cell strong[data-v-20636959],.footer__cell span[data-v-20636959],.footer__cell label[data-v-20636959]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:anywhere}@media(min-width: 670px){.footer__cell--avatar[data-v-20636959],.footer__cell--displayname[data-v-20636959]{position:sticky;z-index:var(--sticky-column-z-index);background-color:var(--color-main-background)}.footer__cell--avatar[data-v-20636959]{inset-inline-start:0}.footer__cell--displayname[data-v-20636959]{inset-inline-start:var(--avatar-cell-width);border-inline-end:1px solid var(--color-border)}}.footer__cell--username[data-v-20636959]{padding-inline-start:calc(var(--default-grid-baseline)*3)}.footer__cell--avatar[data-v-20636959]{min-width:var(--avatar-cell-width);width:var(--avatar-cell-width);align-items:center;padding:0;user-select:none}.footer__cell--multiline span[data-v-20636959]{line-height:1.3em;white-space:unset}@supports(-webkit-line-clamp: 2){.footer__cell--multiline span[data-v-20636959]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.footer__cell--large[data-v-20636959]{min-width:var(--cell-width-large);width:var(--cell-width-large)}.footer__cell--obfuscated[data-v-20636959]{min-width:400px;width:400px}.footer__cell--fill[data-v-20636959]{min-width:var(--cell-width-large);width:100%}.footer__cell--actions[data-v-20636959]{position:sticky;inset-inline-end:0;z-index:var(--sticky-column-z-index);display:flex;flex-direction:row;align-items:center;min-width:110px;width:110px;background-color:var(--color-main-background);border-inline-start:1px solid var(--color-border)}.footer__subtitle[data-v-20636959]{color:var(--color-text-maxcontrast)}.footer__cell[data-v-20636959]{position:sticky;color:var(--color-text-maxcontrast)}.footer__cell--loading[data-v-20636959]{inset-inline-start:0;min-width:var(--avatar-cell-width);width:var(--avatar-cell-width);align-items:center;padding:0}.footer__cell--count[data-v-20636959]{inset-inline-start:var(--avatar-cell-width);min-width:var(--cell-width);width:var(--cell-width)}","",{version:3,sources:["webpack://./apps/settings/src/components/Users/UserListFooter.vue","webpack://./apps/settings/src/components/Users/shared/styles.scss"],names:[],mappings:"AAGA,yBCGC,iBAAA,CACA,YAAA,CACA,cAAA,CACA,iBAAA,CACA,wBAAA,CACA,6CAAA,CAIA,+BACC,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,6BAAA,CACA,2BAAA,CACA,uBAAA,CACA,4BAAA,CAEA,+GAGC,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,sBAAA,CAGD,yBACC,mFAEC,eAAA,CACA,oCAAA,CACA,6CAAA,CAGD,uCACC,oBAAA,CAGD,4CACC,2CAAA,CACA,+CAAA,CAAA,CAIF,yCACC,yDAAA,CAGD,uCACC,kCAAA,CACA,8BAAA,CACA,kBAAA,CACA,SAAA,CACA,gBAAA,CAIA,+CACC,iBAAA,CACA,iBAAA,CAEA,iCAJD,+CAKE,mBAAA,CACA,oBAAA,CACA,2BAAA,CAAA,CAKH,sCACC,iCAAA,CACA,6BAAA,CAGD,2CACC,eAAA,CACA,WAAA,CAID,qCACC,iCAAA,CACA,UAAA,CAGD,wCACC,eAAA,CACA,kBAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,eAAA,CACA,WAAA,CACA,6CAAA,CACA,iDAAA,CAIF,mCACC,mCAAA,CDpGD,+BACC,eAAA,CACA,mCAAA,CAEA,wCACC,oBAAA,CACA,kCAAA,CACA,8BAAA,CACA,kBAAA,CACA,SAAA,CAGD,sCACC,2CAAA,CACA,2BAAA,CACA,uBAAA",sourcesContent:["\n@use './shared/styles';\n\n.footer {\n\t@include styles.row;\n\t@include styles.cell;\n\n\t&__cell {\n\t\tposition: sticky;\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t&--loading {\n\t\t\tinset-inline-start: 0;\n\t\t\tmin-width: var(--avatar-cell-width);\n\t\t\twidth: var(--avatar-cell-width);\n\t\t\talign-items: center;\n\t\t\tpadding: 0;\n\t\t}\n\n\t\t&--count {\n\t\t\tinset-inline-start: var(--avatar-cell-width);\n\t\t\tmin-width: var(--cell-width);\n\t\t\twidth: var(--cell-width);\n\t\t}\n\t}\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n@mixin row {\n\tposition: relative;\n\tdisplay: flex;\n\tmin-width: 100%;\n\twidth: fit-content;\n\theight: var(--row-height);\n\tbackground-color: var(--color-main-background);\n}\n\n@mixin cell {\n\t&__cell {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tpadding: 0 var(--cell-padding);\n\t\tmin-width: var(--cell-width);\n\t\twidth: var(--cell-width);\n\t\tcolor: var(--color-main-text);\n\n\t\tstrong,\n\t\tspan,\n\t\tlabel {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow-wrap: anywhere;\n\t\t}\n\n\t\t@media (min-width: 670px) { /* Show one &--large column between stickied columns */\n\t\t\t&--avatar,\n\t\t\t&--displayname {\n\t\t\t\tposition: sticky;\n\t\t\t\tz-index: var(--sticky-column-z-index);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t}\n\n\t\t\t&--avatar {\n\t\t\t\tinset-inline-start: 0;\n\t\t\t}\n\n\t\t\t&--displayname {\n\t\t\t\tinset-inline-start: var(--avatar-cell-width);\n\t\t\t\tborder-inline-end: 1px solid var(--color-border);\n\t\t\t}\n\t\t}\n\n\t\t&--username {\n\t\t\tpadding-inline-start: calc(var(--default-grid-baseline) * 3);\n\t\t}\n\n\t\t&--avatar {\n\t\t\tmin-width: var(--avatar-cell-width);\n\t\t\twidth: var(--avatar-cell-width);\n\t\t\talign-items: center;\n\t\t\tpadding: 0;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&--multiline {\n\t\t\tspan {\n\t\t\t\tline-height: 1.3em;\n\t\t\t\twhite-space: unset;\n\n\t\t\t\t@supports (-webkit-line-clamp: 2) {\n\t\t\t\t\tdisplay: -webkit-box;\n\t\t\t\t\t-webkit-line-clamp: 2;\n\t\t\t\t\t-webkit-box-orient: vertical;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&--large {\n\t\t\tmin-width: var(--cell-width-large);\n\t\t\twidth: var(--cell-width-large);\n\t\t}\n\n\t\t&--obfuscated {\n\t\t\tmin-width: 400px;\n\t\t\twidth: 400px;\n\t\t}\n\n\t\t// Fill remaining row space with cell\n\t\t&--fill {\n\t\t\tmin-width: var(--cell-width-large);\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&--actions {\n\t\t\tposition: sticky;\n\t\t\tinset-inline-end: 0;\n\t\t\tz-index: var(--sticky-column-z-index);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tmin-width: 110px;\n\t\t\twidth: 110px;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-inline-start: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t&__subtitle {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n}\n"],sourceRoot:""}]);const o=r},24882(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".header[data-v-5c0f8828]{border-bottom:1px solid var(--color-border);position:relative;display:flex;min-width:100%;width:fit-content;height:var(--row-height);background-color:var(--color-main-background)}.header__cell[data-v-5c0f8828]{display:flex;flex-direction:column;justify-content:center;padding:0 var(--cell-padding);min-width:var(--cell-width);width:var(--cell-width);color:var(--color-main-text)}.header__cell strong[data-v-5c0f8828],.header__cell span[data-v-5c0f8828],.header__cell label[data-v-5c0f8828]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:anywhere}@media(min-width: 670px){.header__cell--avatar[data-v-5c0f8828],.header__cell--displayname[data-v-5c0f8828]{position:sticky;z-index:var(--sticky-column-z-index);background-color:var(--color-main-background)}.header__cell--avatar[data-v-5c0f8828]{inset-inline-start:0}.header__cell--displayname[data-v-5c0f8828]{inset-inline-start:var(--avatar-cell-width);border-inline-end:1px solid var(--color-border)}}.header__cell--username[data-v-5c0f8828]{padding-inline-start:calc(var(--default-grid-baseline)*3)}.header__cell--avatar[data-v-5c0f8828]{min-width:var(--avatar-cell-width);width:var(--avatar-cell-width);align-items:center;padding:0;user-select:none}.header__cell--multiline span[data-v-5c0f8828]{line-height:1.3em;white-space:unset}@supports(-webkit-line-clamp: 2){.header__cell--multiline span[data-v-5c0f8828]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.header__cell--large[data-v-5c0f8828]{min-width:var(--cell-width-large);width:var(--cell-width-large)}.header__cell--obfuscated[data-v-5c0f8828]{min-width:400px;width:400px}.header__cell--fill[data-v-5c0f8828]{min-width:var(--cell-width-large);width:100%}.header__cell--actions[data-v-5c0f8828]{position:sticky;inset-inline-end:0;z-index:var(--sticky-column-z-index);display:flex;flex-direction:row;align-items:center;min-width:110px;width:110px;background-color:var(--color-main-background);border-inline-start:1px solid var(--color-border)}.header__subtitle[data-v-5c0f8828]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/settings/src/components/Users/UserListHeader.vue","webpack://./apps/settings/src/components/Users/shared/styles.scss"],names:[],mappings:"AAGA,yBACC,2CAAA,CCEA,iBAAA,CACA,YAAA,CACA,cAAA,CACA,iBAAA,CACA,wBAAA,CACA,6CAAA,CAIA,+BACC,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,6BAAA,CACA,2BAAA,CACA,uBAAA,CACA,4BAAA,CAEA,+GAGC,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,sBAAA,CAGD,yBACC,mFAEC,eAAA,CACA,oCAAA,CACA,6CAAA,CAGD,uCACC,oBAAA,CAGD,4CACC,2CAAA,CACA,+CAAA,CAAA,CAIF,yCACC,yDAAA,CAGD,uCACC,kCAAA,CACA,8BAAA,CACA,kBAAA,CACA,SAAA,CACA,gBAAA,CAIA,+CACC,iBAAA,CACA,iBAAA,CAEA,iCAJD,+CAKE,mBAAA,CACA,oBAAA,CACA,2BAAA,CAAA,CAKH,sCACC,iCAAA,CACA,6BAAA,CAGD,2CACC,eAAA,CACA,WAAA,CAID,qCACC,iCAAA,CACA,UAAA,CAGD,wCACC,eAAA,CACA,kBAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,eAAA,CACA,WAAA,CACA,6CAAA,CACA,iDAAA,CAIF,mCACC,mCAAA",sourcesContent:["\n@use './shared/styles';\n\n.header {\n\tborder-bottom: 1px solid var(--color-border);\n\n\t@include styles.row;\n\t@include styles.cell;\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n@mixin row {\n\tposition: relative;\n\tdisplay: flex;\n\tmin-width: 100%;\n\twidth: fit-content;\n\theight: var(--row-height);\n\tbackground-color: var(--color-main-background);\n}\n\n@mixin cell {\n\t&__cell {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tpadding: 0 var(--cell-padding);\n\t\tmin-width: var(--cell-width);\n\t\twidth: var(--cell-width);\n\t\tcolor: var(--color-main-text);\n\n\t\tstrong,\n\t\tspan,\n\t\tlabel {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow-wrap: anywhere;\n\t\t}\n\n\t\t@media (min-width: 670px) { /* Show one &--large column between stickied columns */\n\t\t\t&--avatar,\n\t\t\t&--displayname {\n\t\t\t\tposition: sticky;\n\t\t\t\tz-index: var(--sticky-column-z-index);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t}\n\n\t\t\t&--avatar {\n\t\t\t\tinset-inline-start: 0;\n\t\t\t}\n\n\t\t\t&--displayname {\n\t\t\t\tinset-inline-start: var(--avatar-cell-width);\n\t\t\t\tborder-inline-end: 1px solid var(--color-border);\n\t\t\t}\n\t\t}\n\n\t\t&--username {\n\t\t\tpadding-inline-start: calc(var(--default-grid-baseline) * 3);\n\t\t}\n\n\t\t&--avatar {\n\t\t\tmin-width: var(--avatar-cell-width);\n\t\t\twidth: var(--avatar-cell-width);\n\t\t\talign-items: center;\n\t\t\tpadding: 0;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&--multiline {\n\t\t\tspan {\n\t\t\t\tline-height: 1.3em;\n\t\t\t\twhite-space: unset;\n\n\t\t\t\t@supports (-webkit-line-clamp: 2) {\n\t\t\t\t\tdisplay: -webkit-box;\n\t\t\t\t\t-webkit-line-clamp: 2;\n\t\t\t\t\t-webkit-box-orient: vertical;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&--large {\n\t\t\tmin-width: var(--cell-width-large);\n\t\t\twidth: var(--cell-width-large);\n\t\t}\n\n\t\t&--obfuscated {\n\t\t\tmin-width: 400px;\n\t\t\twidth: 400px;\n\t\t}\n\n\t\t// Fill remaining row space with cell\n\t\t&--fill {\n\t\t\tmin-width: var(--cell-width-large);\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&--actions {\n\t\t\tposition: sticky;\n\t\t\tinset-inline-end: 0;\n\t\t\tz-index: var(--sticky-column-z-index);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tmin-width: 110px;\n\t\t\twidth: 110px;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-inline-start: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t&__subtitle {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n}\n"],sourceRoot:""}]);const o=r},78897(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".user-list__row[data-v-549fcd14]{position:relative;display:flex;min-width:100%;width:fit-content;height:var(--row-height);background-color:var(--color-main-background)}.user-list__row[data-v-549fcd14]:hover{background-color:var(--color-background-hover)}.user-list__row:hover .row__cell[data-v-549fcd14]:not(.row__cell--actions){background-color:var(--color-background-hover)}.user-list__row .select--fill[data-v-549fcd14]{max-width:calc(var(--cell-width-large) - 2*var(--cell-padding))}.row__cell[data-v-549fcd14]{display:flex;flex-direction:column;justify-content:center;padding:0 var(--cell-padding);min-width:var(--cell-width);width:var(--cell-width);color:var(--color-main-text)}.row__cell strong[data-v-549fcd14],.row__cell span[data-v-549fcd14],.row__cell label[data-v-549fcd14]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:anywhere}@media(min-width: 670px){.row__cell--avatar[data-v-549fcd14],.row__cell--displayname[data-v-549fcd14]{position:sticky;z-index:var(--sticky-column-z-index);background-color:var(--color-main-background)}.row__cell--avatar[data-v-549fcd14]{inset-inline-start:0}.row__cell--displayname[data-v-549fcd14]{inset-inline-start:var(--avatar-cell-width);border-inline-end:1px solid var(--color-border)}}.row__cell--username[data-v-549fcd14]{padding-inline-start:calc(var(--default-grid-baseline)*3)}.row__cell--avatar[data-v-549fcd14]{min-width:var(--avatar-cell-width);width:var(--avatar-cell-width);align-items:center;padding:0;user-select:none}.row__cell--multiline span[data-v-549fcd14]{line-height:1.3em;white-space:unset}@supports(-webkit-line-clamp: 2){.row__cell--multiline span[data-v-549fcd14]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.row__cell--large[data-v-549fcd14]{min-width:var(--cell-width-large);width:var(--cell-width-large)}.row__cell--obfuscated[data-v-549fcd14]{min-width:400px;width:400px}.row__cell--fill[data-v-549fcd14]{min-width:var(--cell-width-large);width:100%}.row__cell--actions[data-v-549fcd14]{position:sticky;inset-inline-end:0;z-index:var(--sticky-column-z-index);display:flex;flex-direction:row;align-items:center;min-width:110px;width:110px;background-color:var(--color-main-background);border-inline-start:1px solid var(--color-border)}.row__subtitle[data-v-549fcd14]{color:var(--color-text-maxcontrast)}.row__cell[data-v-549fcd14]{border-bottom:1px solid var(--color-border)}.row__cell[data-v-549fcd14] .v-select.select{min-width:var(--cell-min-width)}.row__progress[data-v-549fcd14]{margin-top:4px}.row__progress--warn[data-v-549fcd14]::-moz-progress-bar{background:var(--color-warning) !important}.row__progress--warn[data-v-549fcd14]::-webkit-progress-value{background:var(--color-warning) !important}","",{version:3,sources:["webpack://./apps/settings/src/components/Users/UserRow.vue","webpack://./apps/settings/src/components/Users/shared/styles.scss"],names:[],mappings:"AAGA,iCCGC,iBAAA,CACA,YAAA,CACA,cAAA,CACA,iBAAA,CACA,wBAAA,CACA,6CAAA,CDLA,uCACC,8CAAA,CAEA,2EACC,8CAAA,CAKF,+CACC,+DAAA,CCDD,4BACC,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,6BAAA,CACA,2BAAA,CACA,uBAAA,CACA,4BAAA,CAEA,sGAGC,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,sBAAA,CAGD,yBACC,6EAEC,eAAA,CACA,oCAAA,CACA,6CAAA,CAGD,oCACC,oBAAA,CAGD,yCACC,2CAAA,CACA,+CAAA,CAAA,CAIF,sCACC,yDAAA,CAGD,oCACC,kCAAA,CACA,8BAAA,CACA,kBAAA,CACA,SAAA,CACA,gBAAA,CAIA,4CACC,iBAAA,CACA,iBAAA,CAEA,iCAJD,4CAKE,mBAAA,CACA,oBAAA,CACA,2BAAA,CAAA,CAKH,mCACC,iCAAA,CACA,6BAAA,CAGD,wCACC,eAAA,CACA,WAAA,CAID,kCACC,iCAAA,CACA,UAAA,CAGD,qCACC,eAAA,CACA,kBAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,eAAA,CACA,WAAA,CACA,6CAAA,CACA,iDAAA,CAIF,gCACC,mCAAA,CDpFD,4BACC,2CAAA,CAGC,6CACC,+BAAA,CAKH,gCACC,cAAA,CAGC,yDACC,0CAAA,CAED,8DACC,0CAAA",sourcesContent:["\n@use './shared/styles';\n\n.user-list__row {\n\t@include styles.row;\n\n\t&:hover {\n\t\tbackground-color: var(--color-background-hover);\n\n\t\t.row__cell:not(.row__cell--actions) {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\t}\n\n\t// Limit width of select in fill cell\n\t.select--fill {\n\t\tmax-width: calc(var(--cell-width-large) - (2 * var(--cell-padding)));\n\t}\n}\n\n.row {\n\t@include styles.cell;\n\n\t&__cell {\n\t\tborder-bottom: 1px solid var(--color-border);\n\n\t\t:deep {\n\t\t\t.v-select.select {\n\t\t\t\tmin-width: var(--cell-min-width);\n\t\t\t}\n\t\t}\n\t}\n\n\t&__progress {\n\t\tmargin-top: 4px;\n\n\t\t&--warn {\n\t\t\t&::-moz-progress-bar {\n\t\t\t\tbackground: var(--color-warning) !important;\n\t\t\t}\n\t\t\t&::-webkit-progress-value {\n\t\t\t\tbackground: var(--color-warning) !important;\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n@mixin row {\n\tposition: relative;\n\tdisplay: flex;\n\tmin-width: 100%;\n\twidth: fit-content;\n\theight: var(--row-height);\n\tbackground-color: var(--color-main-background);\n}\n\n@mixin cell {\n\t&__cell {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tpadding: 0 var(--cell-padding);\n\t\tmin-width: var(--cell-width);\n\t\twidth: var(--cell-width);\n\t\tcolor: var(--color-main-text);\n\n\t\tstrong,\n\t\tspan,\n\t\tlabel {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow-wrap: anywhere;\n\t\t}\n\n\t\t@media (min-width: 670px) { /* Show one &--large column between stickied columns */\n\t\t\t&--avatar,\n\t\t\t&--displayname {\n\t\t\t\tposition: sticky;\n\t\t\t\tz-index: var(--sticky-column-z-index);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t}\n\n\t\t\t&--avatar {\n\t\t\t\tinset-inline-start: 0;\n\t\t\t}\n\n\t\t\t&--displayname {\n\t\t\t\tinset-inline-start: var(--avatar-cell-width);\n\t\t\t\tborder-inline-end: 1px solid var(--color-border);\n\t\t\t}\n\t\t}\n\n\t\t&--username {\n\t\t\tpadding-inline-start: calc(var(--default-grid-baseline) * 3);\n\t\t}\n\n\t\t&--avatar {\n\t\t\tmin-width: var(--avatar-cell-width);\n\t\t\twidth: var(--avatar-cell-width);\n\t\t\talign-items: center;\n\t\t\tpadding: 0;\n\t\t\tuser-select: none;\n\t\t}\n\n\t\t&--multiline {\n\t\t\tspan {\n\t\t\t\tline-height: 1.3em;\n\t\t\t\twhite-space: unset;\n\n\t\t\t\t@supports (-webkit-line-clamp: 2) {\n\t\t\t\t\tdisplay: -webkit-box;\n\t\t\t\t\t-webkit-line-clamp: 2;\n\t\t\t\t\t-webkit-box-orient: vertical;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&--large {\n\t\t\tmin-width: var(--cell-width-large);\n\t\t\twidth: var(--cell-width-large);\n\t\t}\n\n\t\t&--obfuscated {\n\t\t\tmin-width: 400px;\n\t\t\twidth: 400px;\n\t\t}\n\n\t\t// Fill remaining row space with cell\n\t\t&--fill {\n\t\t\tmin-width: var(--cell-width-large);\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&--actions {\n\t\t\tposition: sticky;\n\t\t\tinset-inline-end: 0;\n\t\t\tz-index: var(--sticky-column-z-index);\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tmin-width: 110px;\n\t\t\twidth: 110px;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-inline-start: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t&__subtitle {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n}\n"],sourceRoot:""}]);const o=r},7515(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".dialog__note[data-v-29922c80]{font-weight:normal}fieldset[data-v-29922c80]{font-weight:bold}","",{version:3,sources:["webpack://./apps/settings/src/components/Users/UserSettingsDialog.vue"],names:[],mappings:"AAEC,+BACC,kBAAA,CAIF,0BACC,gBAAA",sourcesContent:["\n.dialog {\n\t&__note {\n\t\tfont-weight: normal;\n\t}\n}\n\nfieldset {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const o=r},35176(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".user-list[data-v-21942da5]{--avatar-cell-width: 48px;--cell-padding: 7px;--cell-width: 200px;--cell-width-large: 300px;--cell-min-width: calc(var(--cell-width) - (2 * var(--cell-padding)));--sticky-column-z-index: calc(var(--vs-dropdown-z-index) + 1);display:block;overflow:auto;height:100%;will-change:scroll-position}.user-list__header[data-v-21942da5],.user-list__footer[data-v-21942da5]{position:sticky;display:block}.user-list__header[data-v-21942da5]{top:0;z-index:calc(var(--sticky-column-z-index) + 1)}.user-list__footer[data-v-21942da5]{inset-inline-start:0}.user-list__body[data-v-21942da5]{display:flex;flex-direction:column;width:100%}","",{version:3,sources:["webpack://./apps/settings/src/components/Users/VirtualList.vue"],names:[],mappings:"AACA,4BACC,yBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,qEAAA,CACA,6DAAA,CAGA,aAAA,CACA,aAAA,CACA,WAAA,CACA,2BAAA,CAEA,wEAEC,eAAA,CAEA,aAAA,CAGD,oCACC,KAAA,CACA,8CAAA,CAGD,oCACC,oBAAA,CAGD,kCACC,YAAA,CACA,qBAAA,CACA,UAAA",sourcesContent:["\n.user-list {\n\t--avatar-cell-width: 48px;\n\t--cell-padding: 7px;\n\t--cell-width: 200px;\n\t--cell-width-large: 300px;\n\t--cell-min-width: calc(var(--cell-width) - (2 * var(--cell-padding)));\n\t--sticky-column-z-index: calc(var(--vs-dropdown-z-index) + 1); // Keep the sticky column on top of the select dropdown\n\n\t// Necessary for virtual scroll optimized rendering\n\tdisplay: block;\n\toverflow: auto;\n\theight: 100%;\n\twill-change: scroll-position;\n\n\t&__header,\n\t&__footer {\n\t\tposition: sticky;\n\t\t// Fix sticky positioning in Firefox\n\t\tdisplay: block;\n\t}\n\n\t&__header {\n\t\ttop: 0;\n\t\tz-index: calc(var(--sticky-column-z-index) + 1);\n\t}\n\n\t&__footer {\n\t\tinset-inline-start: 0;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t}\n}\n"],sourceRoot:""}]);const o=r},11196(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".app-content[data-v-4684ed00]{display:flex;overflow:hidden;flex-direction:column;max-height:100%}","",{version:3,sources:["webpack://./apps/settings/src/views/UserManagement.vue"],names:[],mappings:"AACA,8BAEC,YAAA,CACA,eAAA,CACA,qBAAA,CACA,eAAA",sourcesContent:["\n.app-content {\n\t// Virtual list needs to be full height and is scrollable\n\tdisplay: flex;\n\toverflow: hidden;\n\tflex-direction: column;\n\tmax-height: 100%;\n}\n"],sourceRoot:""}]);const o=r},58688(t,e,s){"use strict";s.d(e,{A:()=>o});var i=s(71354),n=s.n(i),a=s(76314),r=s.n(a)()(n());r.push([t.id,".account-management__navigation[data-v-539a4ad0] .app-navigation__body{will-change:scroll-position}.account-management__system-list[data-v-539a4ad0]{height:auto !important;overflow:visible !important}.account-management__group-list[data-v-539a4ad0]{height:100% !important}.account-management__settings-toggle[data-v-539a4ad0]{margin-bottom:12px}","",{version:3,sources:["webpack://./apps/settings/src/views/UserManagementNavigation.vue"],names:[],mappings:"AAGE,uEACC,2BAAA,CAGF,kDACC,sBAAA,CACA,2BAAA,CAGD,iDACC,sBAAA,CAGD,sDACC,kBAAA",sourcesContent:["\n.account-management {\n\t&__navigation {\n\t\t:deep(.app-navigation__body) {\n\t\t\twill-change: scroll-position;\n\t\t}\n\t}\n\t&__system-list {\n\t\theight: auto !important;\n\t\toverflow: visible !important;\n\t}\n\n\t&__group-list {\n\t\theight: 100% !important;\n\t}\n\n\t&__settings-toggle {\n\t\tmargin-bottom: 12px;\n\t}\n}\n"],sourceRoot:""}]);const o=r},86454(t,e,s){"use strict";const i=s(43918),n=s(32923),a=s(8904);t.exports={XMLParser:n,XMLValidator:i,XMLBuilder:a}},33085(t){t.exports=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const s of t){if("string"==typeof s&&e===s)return!0;if(s instanceof RegExp&&s.test(e))return!0}}:()=>!1}},35334(t,e){"use strict";const s=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+s+"]["+s+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,s){if(e){const i=Object.keys(e),n=i.length;for(let a=0;a<n;a++)t[i[a]]="strict"===s?[e[i[a]]]:e[i[a]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){return!(null==n.exec(t))},e.getAllMatches=function(t,e){const s=[];let i=e.exec(t);for(;i;){const n=[];n.startIndex=e.lastIndex-i[0].length;const a=i.length;for(let t=0;t<a;t++)n.push(i[t]);s.push(n),i=e.exec(t)}return s},e.nameRegexp=i},43918(t,e,s){"use strict";const i=s(35334),n={allowBooleanAttributes:!1,unpairedTags:[]};function a(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function r(t,e){const s=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(s,e-s);if(e>5&&"xml"===i)return g("InvalidXml","XML declaration allowed only at the start of the document.",h(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function o(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let s=1;for(e+=8;e<t.length;e++)if("<"===t[e])s++;else if(">"===t[e]&&(s--,0===s))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}function l(t,e){let s="",i="",n=!1;for(;e<t.length;e++){if('"'===t[e]||"'"===t[e])""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){n=!0;break}s+=t[e]}return""===i&&{value:s,index:e,tagClosed:n}}e.validate=function(t,e){e=Object.assign({},n,e);const s=[];let d=!1,p=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let n=0;n<t.length;n++)if("<"===t[n]&&"?"===t[n+1]){if(n+=2,n=r(t,n),n.err)return n}else{if("<"!==t[n]){if(a(t[n]))continue;return g("InvalidChar","char '"+t[n]+"' is not expected.",h(t,n))}{let m=n;if(n++,"!"===t[n]){n=o(t,n);continue}{let f=!1;"/"===t[n]&&(f=!0,n++);let v="";for(;n<t.length&&">"!==t[n]&&" "!==t[n]&&"\t"!==t[n]&&"\n"!==t[n]&&"\r"!==t[n];n++)v+=t[n];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),n--),A=v,!i.isName(A)){let e;return e=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",g("InvalidTag",e,h(t,n))}const C=l(t,n);if(!1===C)return g("InvalidAttr","Attributes for '"+v+"' have open quote.",h(t,n));let w=C.value;if(n=C.index,"/"===w[w.length-1]){const s=n-w.length;w=w.substring(0,w.length-1);const i=c(w,e);if(!0!==i)return g(i.err.code,i.err.msg,h(t,s+i.err.line));d=!0}else if(f){if(!C.tagClosed)return g("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",h(t,n));if(w.trim().length>0)return g("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",h(t,m));if(0===s.length)return g("InvalidTag","Closing tag '"+v+"' has not been opened.",h(t,m));{const e=s.pop();if(v!==e.tagName){let s=h(t,e.tagStartPos);return g("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+s.line+", col "+s.col+") instead of closing tag '"+v+"'.",h(t,m))}0==s.length&&(p=!0)}}else{const i=c(w,e);if(!0!==i)return g(i.err.code,i.err.msg,h(t,n-w.length+i.err.line));if(!0===p)return g("InvalidXml","Multiple possible root nodes found.",h(t,n));-1!==e.unpairedTags.indexOf(v)||s.push({tagName:v,tagStartPos:m}),d=!0}for(n++;n<t.length;n++)if("<"===t[n]){if("!"===t[n+1]){n++,n=o(t,n);continue}if("?"!==t[n+1])break;if(n=r(t,++n),n.err)return n}else if("&"===t[n]){const e=u(t,n);if(-1==e)return g("InvalidChar","char '&' is not expected.",h(t,n));n=e}else if(!0===p&&!a(t[n]))return g("InvalidXml","Extra text at the end",h(t,n));"<"===t[n]&&n--}}}var A;return d?1==s.length?g("InvalidTag","Unclosed tag '"+s[0].tagName+"'.",h(t,s[0].tagStartPos)):!(s.length>0)||g("InvalidXml","Invalid '"+JSON.stringify(s.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):g("InvalidXml","Start tag expected.",1)};const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(t,e){const s=i.getAllMatches(t,d),n={};for(let t=0;t<s.length;t++){if(0===s[t][1].length)return g("InvalidAttr","Attribute '"+s[t][2]+"' has no space in starting.",A(s[t]));if(void 0!==s[t][3]&&void 0===s[t][4])return g("InvalidAttr","Attribute '"+s[t][2]+"' is without value.",A(s[t]));if(void 0===s[t][3]&&!e.allowBooleanAttributes)return g("InvalidAttr","boolean attribute '"+s[t][2]+"' is not allowed.",A(s[t]));const i=s[t][2];if(!p(i))return g("InvalidAttr","Attribute '"+i+"' is an invalid name.",A(s[t]));if(n.hasOwnProperty(i))return g("InvalidAttr","Attribute '"+i+"' is repeated.",A(s[t]));n[i]=1}return!0}function u(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let s=/\d/;for("x"===t[e]&&(e++,s=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(s))break}return-1}(t,++e);let s=0;for(;e<t.length;e++,s++)if(!(t[e].match(/\w/)&&s<20)){if(";"===t[e])break;return-1}return e}function g(t,e,s){return{err:{code:t,msg:e,line:s.line||s,col:s.col}}}function p(t){return i.isName(t)}function h(t,e){const s=t.substring(0,e).split(/\r?\n/);return{line:s.length,col:s[s.length-1].length+1}}function A(t){return t.startIndex+t[1].length}},8904(t,e,s){"use strict";const i=s(12788),n=s(33085),a={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function r(t){this.options=Object.assign({},a,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=n(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=d),this.processTextOrObjNode=o,this.options.format?(this.indentate=l,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function o(t,e,s,i){const n=this.j2x(t,s+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,s):this.buildObjectNode(n.val,e,n.attrStr,s)}function l(t){return this.options.indentBy.repeat(t)}function d(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}r.prototype.build=function(t){return this.options.preserveOrder?i(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},r.prototype.j2x=function(t,e,s){let i="",n="";const a=s.join(".");for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(void 0===t[r])this.isAttribute(r)&&(n+="");else if(null===t[r])this.isAttribute(r)||r===this.options.cdataPropName?n+="":"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if(t[r]instanceof Date)n+=this.buildTextValNode(t[r],r,"",e);else if("object"!=typeof t[r]){const s=this.isAttribute(r);if(s&&!this.ignoreAttributesFn(s,a))i+=this.buildAttrPairStr(s,""+t[r]);else if(!s)if(r===this.options.textNodeName){let e=this.options.tagValueProcessor(r,""+t[r]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[r],r,"",e)}else if(Array.isArray(t[r])){const i=t[r].length;let a="",o="";for(let l=0;l<i;l++){const i=t[r][l];if(void 0===i);else if(null===i)"?"===r[0]?n+=this.indentate(e)+"<"+r+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+r+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const t=this.j2x(i,e+1,s.concat(r));a+=t.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(o+=t.attrStr)}else a+=this.processTextOrObjNode(i,r,e,s);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(r,i);t=this.replaceEntitiesValue(t),a+=t}else a+=this.buildTextValNode(i,r,"",e)}this.options.oneListGroup&&(a=this.buildObjectNode(a,r,o,e)),n+=a}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const e=Object.keys(t[r]),s=e.length;for(let n=0;n<s;n++)i+=this.buildAttrPairStr(e[n],""+t[r][e[n]])}else n+=this.processTextOrObjNode(t[r],r,e,s);return{attrStr:i,val:n}},r.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},r.prototype.buildObjectNode=function(t,e,s,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+s+"?"+this.tagEndChar:this.indentate(i)+"<"+e+s+this.closeTag(e)+this.tagEndChar;{let n="</"+e+this.tagEndChar,a="";return"?"===e[0]&&(a="?",n=""),!s&&""!==s||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===a.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+s+a+this.tagEndChar+t+this.indentate(i)+n:this.indentate(i)+"<"+e+s+a+">"+t+n}},r.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},r.prototype.buildTextValNode=function(t,e,s,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+s+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(e,t);return n=this.replaceEntitiesValue(n),""===n?this.indentate(i)+"<"+e+s+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+s+">"+n+"</"+e+this.tagEndChar}},r.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const s=this.options.entities[e];t=t.replace(s.regex,s.val)}return t},t.exports=r},12788(t){function e(t,r,o,l){let d="",c=!1;for(let u=0;u<t.length;u++){const g=t[u],p=s(g);if(void 0===p)continue;let h="";if(h=0===o.length?p:`${o}.${p}`,p===r.textNodeName){let t=g[p];n(h,r)||(t=r.tagValueProcessor(p,t),t=a(t,r)),c&&(d+=l),d+=t,c=!1;continue}if(p===r.cdataPropName){c&&(d+=l),d+=`<![CDATA[${g[p][0][r.textNodeName]}]]>`,c=!1;continue}if(p===r.commentPropName){d+=l+`\x3c!--${g[p][0][r.textNodeName]}--\x3e`,c=!0;continue}if("?"===p[0]){const t=i(g[":@"],r),e="?xml"===p?"":l;let s=g[p][0][r.textNodeName];s=0!==s.length?" "+s:"",d+=e+`<${p}${s}${t}?>`,c=!0;continue}let A=l;""!==A&&(A+=r.indentBy);const m=l+`<${p}${i(g[":@"],r)}`,f=e(g[p],r,h,A);-1!==r.unpairedTags.indexOf(p)?r.suppressUnpairedNode?d+=m+">":d+=m+"/>":f&&0!==f.length||!r.suppressEmptyNode?f&&f.endsWith(">")?d+=m+`>${f}${l}</${p}>`:(d+=m+">",f&&""!==l&&(f.includes("/>")||f.includes("</"))?d+=l+r.indentBy+f+l:d+=f,d+=`</${p}>`):d+=m+"/>",c=!0}return d}function s(t){const e=Object.keys(t);for(let s=0;s<e.length;s++){const i=e[s];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function i(t,e){let s="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let n=e.attributeValueProcessor(i,t[i]);n=a(n,e),!0===n&&e.suppressBooleanAttributes?s+=` ${i.substr(e.attributeNamePrefix.length)}`:s+=` ${i.substr(e.attributeNamePrefix.length)}="${n}"`}return s}function n(t,e){let s=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+s)return!0;return!1}function a(t,e){if(t&&t.length>0&&e.processEntities)for(let s=0;s<e.entities.length;s++){const i=e.entities[s];t=t.replace(i.regex,i.val)}return t}t.exports=function(t,s){let i="";return s.format&&s.indentBy.length>0&&(i="\n"),e(t,s,"",i)}},9400(t,e,s){const i=s(35334);function n(t,e){let s="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)s+=t[e];if(s=s.trim(),-1!==s.indexOf(" "))throw new Error("External entites are not supported");const i=t[e++];let n="";for(;e<t.length&&t[e]!==i;e++)n+=t[e];return[s,n,e]}function a(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function r(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function o(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function l(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function d(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function c(t){if(i.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const s={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,u=!1,g=!1,p="";for(;e<t.length;e++)if("<"!==t[e]||g)if(">"===t[e]){if(g?"-"===t[e-1]&&"-"===t[e-2]&&(g=!1,i--):i--,0===i)break}else"["===t[e]?u=!0:p+=t[e];else{if(u&&r(t,e)){let i,a;e+=7,[i,a,e]=n(t,e+1),-1===a.indexOf("&")&&(s[c(i)]={regx:RegExp(`&${i};`,"g"),val:a})}else if(u&&o(t,e))e+=8;else if(u&&l(t,e))e+=8;else if(u&&d(t,e))e+=9;else{if(!a)throw new Error("Invalid DOCTYPE");g=!0}i++,p=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:s,i:e}}},50460(t,e){const s={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,s){return t}};e.buildOptions=function(t){return Object.assign({},s,t)},e.defaultOptions=s},17680(t,e,s){"use strict";const i=s(35334),n=s(23832),a=s(9400),r=s(17983),o=s(33085);function l(t){const e=Object.keys(t);for(let s=0;s<e.length;s++){const i=e[s];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function d(t,e,s,i,n,a,r){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){r||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,s,n,a);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?b(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function c(t){if(this.options.removeNSPrefix){const e=t.split(":"),s="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=s+e[1])}return t}const u=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function g(t,e,s){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const s=i.getAllMatches(t,u),n=s.length,a={};for(let t=0;t<n;t++){const i=this.resolveNameSpace(s[t][1]);if(this.ignoreAttributesFn(i,e))continue;let n=s[t][4],r=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(r=this.options.transformAttributeName(r)),"__proto__"===r&&(r="#__proto__"),void 0!==n){this.options.trimValues&&(n=n.trim()),n=this.replaceEntitiesValue(n);const t=this.options.attributeValueProcessor(i,n,e);a[r]=null==t?n:typeof t!=typeof n||t!==n?t:b(n,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(a[r]=!0)}if(!Object.keys(a).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=a,t}return a}}const p=function(t){t=t.replace(/\r\n?/g,"\n");const e=new n("!xml");let s=e,i="",r="";for(let o=0;o<t.length;o++)if("<"===t[o])if("/"===t[o+1]){const e=v(t,">",o,"Closing Tag is not closed.");let n=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=n.indexOf(":");-1!==t&&(n=n.substr(t+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),s&&(i=this.saveTextToParentTag(i,s,r));const a=r.substring(r.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=r.lastIndexOf(".",r.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=r.lastIndexOf("."),r=r.substring(0,l),s=this.tagsNodeStack.pop(),i="",o=e}else if("?"===t[o+1]){let e=C(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,s,r),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new n(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,r,e.tagName)),this.addChild(s,t,r)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=v(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const n=t.substring(o+4,e-2);i=this.saveTextToParentTag(i,s,r),s.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}o=e}else if("!D"===t.substr(o+1,2)){const e=a(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=v(t,"]]>",o,"CDATA is not closed.")-2,n=t.substring(o+9,e);i=this.saveTextToParentTag(i,s,r);let a=this.parseTextData(n,s.tagname,r,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?s.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):s.add(this.options.textNodeName,a),o=e+2}else{let a=C(t,o,this.options.removeNSPrefix),l=a.tagName;const d=a.rawTagName;let c=a.tagExp,u=a.attrExpPresent,g=a.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),s&&i&&"!xml"!==s.tagname&&(i=this.saveTextToParentTag(i,s,r,!1));const p=s;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(s=this.tagsNodeStack.pop(),r=r.substring(0,r.lastIndexOf("."))),l!==e.tagname&&(r+=r?"."+l:l),this.isItStopNode(this.options.stopNodes,r,l)){let e="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),r=r.substr(0,r.length-1),c=l):c=c.substr(0,c.length-1),o=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))o=a.closeIndex;else{const s=this.readStopNodeData(t,d,g+1);if(!s)throw new Error(`Unexpected end of ${d}`);o=s.i,e=s.tagContent}const i=new n(l);l!==c&&u&&(i[":@"]=this.buildAttributesMap(c,r,l)),e&&(e=this.parseTextData(e,l,r,!0,u,!0,!0)),r=r.substr(0,r.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(s,i,r)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),r=r.substr(0,r.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const t=new n(l);l!==c&&u&&(t[":@"]=this.buildAttributesMap(c,r,l)),this.addChild(s,t,r),r=r.substr(0,r.lastIndexOf("."))}else{const t=new n(l);this.tagsNodeStack.push(s),l!==c&&u&&(t[":@"]=this.buildAttributesMap(c,r,l)),this.addChild(s,t,r),s=t}i="",o=g}}else i+=t[o];return e.child};function h(t,e,s){const i=this.options.updateTag(e.tagname,s,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const A=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const s=this.docTypeEntities[e];t=t.replace(s.regx,s.val)}for(let e in this.lastEntities){const s=this.lastEntities[e];t=t.replace(s.regex,s.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const s=this.htmlEntities[e];t=t.replace(s.regex,s.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function m(t,e,s,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,s,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function f(t,e,s){const i="*."+s;for(const s in t){const n=t[s];if(i===n||e===n)return!0}return!1}function v(t,e,s,i){const n=t.indexOf(e,s);if(-1===n)throw new Error(i);return n+e.length-1}function C(t,e,s,i=">"){const n=function(t,e,s=">"){let i,n="";for(let a=e;a<t.length;a++){let e=t[a];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===s[0]){if(!s[1])return{data:n,index:a};if(t[a+1]===s[1])return{data:n,index:a}}else"\t"===e&&(e=" ");n+=e}}(t,e+1,i);if(!n)return;let a=n.data;const r=n.index,o=a.search(/\s/);let l=a,d=!0;-1!==o&&(l=a.substring(0,o),a=a.substring(o+1).trimStart());const c=l;if(s){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),d=l!==n.data.substr(t+1))}return{tagName:l,tagExp:a,closeIndex:r,attrExpPresent:d,rawTagName:c}}function w(t,e,s){const i=s;let n=1;for(;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const a=v(t,">",s,`${e} is not closed`);if(t.substring(s+2,a).trim()===e&&(n--,0===n))return{tagContent:t.substring(i,s),i:a};s=a}else if("?"===t[s+1])s=v(t,"?>",s+1,"StopNode is not closed.");else if("!--"===t.substr(s+1,3))s=v(t,"--\x3e",s+3,"StopNode is not closed.");else if("!["===t.substr(s+1,2))s=v(t,"]]>",s,"StopNode is not closed.")-2;else{const i=C(t,s,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&n++,s=i.closeIndex)}}function b(t,e,s){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&r(t,s)}return i.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=l,this.parseXml=p,this.parseTextData=d,this.resolveNameSpace=c,this.buildAttributesMap=g,this.isItStopNode=f,this.replaceEntitiesValue=A,this.readStopNodeData=w,this.saveTextToParentTag=m,this.addChild=h,this.ignoreAttributesFn=o(this.options.ignoreAttributes)}}},32923(t,e,s){const{buildOptions:i}=s(50460),n=s(17680),{prettify:a}=s(75629),r=s(43918);t.exports=class{constructor(t){this.externalEntities={},this.options=i(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const s=r.validate(t,e);if(!0!==s)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const s=new n(this.options);s.addExternalEntities(this.externalEntities);const i=s.parseXml(t);return this.options.preserveOrder||void 0===i?i:a(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},75629(t,e){"use strict";function s(t,e,r){let o;const l={};for(let d=0;d<t.length;d++){const c=t[d],u=i(c);let g="";if(g=void 0===r?u:r+"."+u,u===e.textNodeName)void 0===o?o=c[u]:o+=""+c[u];else{if(void 0===u)continue;if(c[u]){let t=s(c[u],e,g);const i=a(t,e);c[":@"]?n(t,c[":@"],g,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==l[u]&&l.hasOwnProperty(u)?(Array.isArray(l[u])||(l[u]=[l[u]]),l[u].push(t)):e.isArray(u,g,i)?l[u]=[t]:l[u]=t}}}return"string"==typeof o?o.length>0&&(l[e.textNodeName]=o):void 0!==o&&(l[e.textNodeName]=o),l}function i(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const s=e[t];if(":@"!==s)return s}}function n(t,e,s,i){if(e){const n=Object.keys(e),a=n.length;for(let r=0;r<a;r++){const a=n[r];i.isArray(a,s+"."+a,!0,!0)?t[a]=[e[a]]:t[a]=e[a]}}}function a(t,e){const{textNodeName:s}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[s]&&"boolean"!=typeof t[s]&&0!==t[s])}e.prettify=function(t,e){return s(t,e)}},23832(t){"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},17983(t){const e=/^[-+]?0x[a-fA-F0-9]+$/,s=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,n={}){if(n=Object.assign({},i,n),!t||"string"!=typeof t)return t;let a=t.trim();if(void 0!==n.skipLike&&n.skipLike.test(a))return t;if("0"===t)return 0;if(n.hex&&e.test(a))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(a);if(-1!==a.search(/[eE]/)){const e=a.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(n.leadingZeros)a=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return t;return n.eNotation?Number(a):t}return t}{const e=s.exec(a);if(e){const s=e[1],i=e[2];let o=(r=e[3])&&-1!==r.indexOf(".")?("."===(r=r.replace(/0+$/,""))?r="0":"."===r[0]?r="0"+r:"."===r[r.length-1]&&(r=r.substr(0,r.length-1)),r):r;if(!n.leadingZeros&&i.length>0&&s&&"."!==a[2])return t;if(!n.leadingZeros&&i.length>0&&!s&&"."!==a[1])return t;if(n.leadingZeros&&i===t)return 0;{const e=Number(a),r=""+e;return-1!==r.search(/[eE]/)?n.eNotation?e:t:-1!==a.indexOf(".")?"0"===r&&""===o||r===o||s&&r==="-"+o?e:t:i?o===r||s+o===r?e:t:a===r||a===s+r?e:t}}return t}var r}},15272(e,s,i){"use strict";i.r(s),i.d(s,{default:()=>ms});var n=i(53334),a=i(61338),r=i(85471),o=i(18195),l=i(9165),d=i(85168),c=i(54914),u=i(42507),g=i(6695),p=i(88289),h=i(55042),A=i(17334),m=i.n(A),f=i(36620);r.Ay.directive("elementVisibility",h.Zx);const v=r.Ay.extend({name:"VirtualList",props:{dataComponent:{type:[Object,Function],required:!0},dataKey:{type:String,required:!0},dataSources:{type:Array,required:!0},itemHeight:{type:Number,required:!0},extraProps:{type:Object,default:()=>({})}},data:()=>({bufferItems:3,index:0,headerHeight:0,tableHeight:0,resizeObserver:null}),computed:{startIndex(){return Math.max(0,this.index-3)},shownItems(){return Math.ceil((this.tableHeight-this.headerHeight)/this.itemHeight)+6},renderedItems(){return this.dataSources.slice(this.startIndex,this.startIndex+this.shownItems)},tbodyStyle(){const t=this.startIndex+this.shownItems>this.dataSources.length,e=this.dataSources.length-this.startIndex-this.shownItems,s=Math.min(this.dataSources.length-this.startIndex,e);return{paddingTop:this.startIndex*this.itemHeight+"px",paddingBottom:t?0:s*this.itemHeight+"px"}}},mounted(){const t=this.$el,e=this.$refs?.tfoot,s=this.$refs?.thead;this.resizeObserver=new ResizeObserver(m()((()=>{this.headerHeight=s?.clientHeight??0,this.tableHeight=t?.clientHeight??0,f.A.debug("VirtualList resizeObserver updated"),this.onScroll()}),100,!1)),this.resizeObserver.observe(t),this.resizeObserver.observe(e),this.resizeObserver.observe(s),this.$el.addEventListener("scroll",this.onScroll)},beforeDestroy(){this.resizeObserver&&this.resizeObserver.disconnect()},methods:{handleFooterVisibility(t){t&&this.$emit("scroll-end")},onScroll(){this.index=Math.max(0,Math.round(this.$el.scrollTop/this.itemHeight))}}});var C=i(85072),w=i.n(C),b=i(97825),_=i.n(b),y=i(77659),x=i.n(y),N=i(55056),S=i.n(N),k=i(10540),G=i.n(k),U=i(41113),D=i.n(U),L=i(35176),I={};I.styleTagTransform=D(),I.setAttributes=S(),I.insert=x().bind(null,"head"),I.domAPI=_(),I.insertStyleElement=G(),w()(L.A,I),L.A&&L.A.locals&&L.A.locals;var E=i(14486);const O=(0,E.A)(v,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("table",{staticClass:"user-list"},[t._t("before"),t._v(" "),e("thead",{ref:"thead",staticClass:"user-list__header",attrs:{role:"rowgroup"}},[t._t("header")],2),t._v(" "),e("tbody",{staticClass:"user-list__body",style:t.tbodyStyle},t._l(t.renderedItems,(function(s,i){return e(t.dataComponent,t._b({key:s[t.dataKey],tag:"component",attrs:{user:s,visible:(i>=t.bufferItems||t.index<=t.bufferItems)&&i<t.shownItems-t.bufferItems}},"component",t.extraProps,!1))})),1),t._v(" "),e("tfoot",{directives:[{name:"element-visibility",rawName:"v-element-visibility",value:t.handleFooterVisibility,expression:"handleFooterVisibility"}],ref:"tfoot",staticClass:"user-list__footer",attrs:{role:"rowgroup"}},[t._t("footer")],2)],2)}),[],!1,null,"21942da5",null).exports;var T=i(35810),B=i(74095),P=i(94219),q=i(16044),$=i(67607),F=i(82182),M=i(46984);const R={name:"NewUserDialog",components:{NcButton:B.A,NcDialog:P.A,NcPasswordField:q.A,NcSelect:$.default,NcTextField:F.A},props:{loading:{type:Object,required:!0},newUser:{type:Object,required:!0},quotaOptions:{type:Array,required:!0}},data:()=>({possibleManagers:[],managerInputLabel:t("settings","Manager"),managerLabel:t("settings","Set line manager"),promise:null}),computed:{showConfig(){return this.$store.getters.getShowConfig},settings(){return this.$store.getters.getServerData},usernameLabel(){return this.settings.newUserGenerateUserID?t("settings","Account name will be autogenerated"):t("settings","Account name (required)")},minPasswordLength(){return this.$store.getters.getPasswordPolicyMinLength},availableGroups(){return(this.settings.isAdmin||this.settings.isDelegatedAdmin?this.$store.getters.getSortedGroups:this.$store.getters.getSubAdminGroups).filter((t=>"__nc_internal_recent"!==t.id&&"disabled"!==t.id))},availableSubAdminGroups(){return this.availableGroups.filter((t=>"admin"!==t.id))},languages(){return[{name:t("settings","Common languages"),languages:this.settings.languages.commonLanguages},...this.settings.languages.commonLanguages,{name:t("settings","Other languages"),languages:this.settings.languages.otherLanguages},...this.settings.languages.otherLanguages]}},async beforeMount(){await this.searchUserManager()},mounted(){this.$refs.username?.focus?.()},methods:{async createUser(){this.loading.all=!0;try{await this.$store.dispatch("addUser",{userid:this.newUser.id,password:this.newUser.password,displayName:this.newUser.displayName,email:this.newUser.mailAddress,groups:this.newUser.groups.map((t=>t.id)),subadmin:this.newUser.subAdminsGroups.map((t=>t.id)),quota:this.newUser.quota.id,language:this.newUser.language.code,manager:this.newUser.manager.id}),this.$emit("reset"),this.$refs.username?.focus?.(),this.$emit("closing")}catch(t){if(this.loading.all=!1,t.response&&t.response.data&&t.response.data.ocs&&t.response.data.ocs.meta){const e=t.response.data.ocs.meta.statuscode;102===e?this.$refs.username?.focus?.():107===e&&this.$refs.password?.focus?.()}}},async searchGroups(e,s){if(this.settings.isAdmin||this.settings.isDelegatedAdmin){this.promise&&this.promise.cancel(),s(!0);try{this.promise=(0,M.N_)({search:e,offset:0,limit:25});const t=await this.promise;for(const e of t)this.$store.commit("addGroup",e)}catch(e){f.A.error(t("settings","Failed to search groups"),{error:e})}this.promise=null,s(!1)}},async createGroup({name:e}){this.loading.groups=!0;try{await this.$store.dispatch("addGroup",e),this.newUser.groups.push({id:e,name:e})}catch(e){f.A.error(t("settings","Failed to create group"),{error:e})}this.loading.groups=!1},async addGroup(t){t.isCreating||!1!==t.canAdd&&this.newUser.groups.push(t)},removeGroup(t){!1!==t.canRemove&&(this.newUser.groups=this.newUser.groups.filter((e=>e.id!==t.id)))},validateQuota(t){const e=OC.Util.computerFileSize(t);return null!==e&&e>=0?(t=(0,T.v7)((0,T.lT)(t,!0)),this.newUser.quota={id:t,label:t},this.newUser.quota):(this.newUser.quota=this.quotaOptions[0],this.quotaOptions[0])},languageFilterBy:(t,e,s)=>t.languages?t.languages.some((({name:t})=>t.toLocaleLowerCase().includes(s.toLocaleLowerCase()))):(e||"").toLocaleLowerCase().includes(s.toLocaleLowerCase()),async searchUserManager(t){await this.$store.dispatch("searchUsers",{offset:0,limit:10,search:t}).then((t=>{const e=t?.data?Object.values(t?.data.ocs.data.users):[];e.length>0&&(this.possibleManagers=e)}))}}};var z=i(41992),Q={};Q.styleTagTransform=D(),Q.setAttributes=S(),Q.insert=x().bind(null,"head"),Q.domAPI=_(),Q.insertStyleElement=G(),w()(z.A,Q),z.A&&z.A.locals&&z.A.locals;var j=(0,E.A)(R,(function(){var t=this,e=t._self._c;return e("NcDialog",t._g({staticClass:"dialog",attrs:{size:"small",name:t.t("settings","New account"),"out-transition":""},scopedSlots:t._u([{key:"actions",fn:function(){return[e("NcButton",{staticClass:"dialog__submit",attrs:{"data-test":"submit",form:"new-user-form",type:"primary","native-type":"submit"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Add new account"))+"\n\t\t")])]},proxy:!0}])},t.$listeners),[e("form",{staticClass:"dialog__form",attrs:{id:"new-user-form","data-test":"form",disabled:t.loading.all},on:{submit:function(e){return e.preventDefault(),t.createUser.apply(null,arguments)}}},[e("NcTextField",{ref:"username",staticClass:"dialog__item",attrs:{"data-test":"username",value:t.newUser.id,disabled:t.settings.newUserGenerateUserID,label:t.usernameLabel,autocapitalize:"none",autocomplete:"off",spellcheck:"false",pattern:"[a-zA-Z0-9 _\\.@\\-']+",required:""},on:{"update:value":function(e){return t.$set(t.newUser,"id",e)}}}),t._v(" "),e("NcTextField",{staticClass:"dialog__item",attrs:{"data-test":"displayName",value:t.newUser.displayName,label:t.t("settings","Display name"),autocapitalize:"none",autocomplete:"off",spellcheck:"false"},on:{"update:value":function(e){return t.$set(t.newUser,"displayName",e)}}}),t._v(" "),t.settings.newUserRequireEmail?t._e():e("span",{staticClass:"dialog__hint",attrs:{id:"password-email-hint"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Either password or email is required"))+"\n\t\t")]),t._v(" "),e("NcPasswordField",{ref:"password",staticClass:"dialog__item",attrs:{"data-test":"password",value:t.newUser.password,minlength:t.minPasswordLength,maxlength:469,"aria-describedby":"password-email-hint",label:""===t.newUser.mailAddress?t.t("settings","Password (required)"):t.t("settings","Password"),autocapitalize:"none",autocomplete:"new-password",spellcheck:"false",required:""===t.newUser.mailAddress},on:{"update:value":function(e){return t.$set(t.newUser,"password",e)}}}),t._v(" "),e("NcTextField",{staticClass:"dialog__item",attrs:{"data-test":"email",type:"email",value:t.newUser.mailAddress,"aria-describedby":"password-email-hint",label:""===t.newUser.password||t.settings.newUserRequireEmail?t.t("settings","Email (required)"):t.t("settings","Email"),autocapitalize:"none",autocomplete:"off",spellcheck:"false",required:""===t.newUser.password||t.settings.newUserRequireEmail},on:{"update:value":function(e){return t.$set(t.newUser,"mailAddress",e)}}}),t._v(" "),e("div",{staticClass:"dialog__item"},[e("NcSelect",{staticClass:"dialog__select",attrs:{"data-test":"groups","input-label":t.settings.isAdmin||t.settings.isDelegatedAdmin?t.t("settings","Member of the following groups"):t.t("settings","Member of the following groups (required)"),placeholder:t.t("settings","Set account groups"),disabled:t.loading.groups||t.loading.all,options:t.availableGroups,value:t.newUser.groups,label:"name","close-on-select":!1,multiple:!0,taggable:t.settings.isAdmin||t.settings.isDelegatedAdmin,required:!t.settings.isAdmin&&!t.settings.isDelegatedAdmin,"create-option":t=>({id:t,name:t,isCreating:!0})},on:{search:t.searchGroups,"option:created":t.createGroup,"option:deselected":t.removeGroup,"option:selected":e=>t.addGroup(e.at(-1))}})],1),t._v(" "),e("div",{staticClass:"dialog__item"},[e("NcSelect",{staticClass:"dialog__select",attrs:{"input-label":t.t("settings","Admin of the following groups"),placeholder:t.t("settings","Set account as admin for …"),disabled:t.loading.groups||t.loading.all,options:t.availableSubAdminGroups,"close-on-select":!1,multiple:!0,label:"name"},on:{search:t.searchGroups},model:{value:t.newUser.subAdminsGroups,callback:function(e){t.$set(t.newUser,"subAdminsGroups",e)},expression:"newUser.subAdminsGroups"}})],1),t._v(" "),e("div",{staticClass:"dialog__item"},[e("NcSelect",{staticClass:"dialog__select",attrs:{"input-label":t.t("settings","Quota"),placeholder:t.t("settings","Set account quota"),options:t.quotaOptions,clearable:!1,taggable:!0,"create-option":t.validateQuota},model:{value:t.newUser.quota,callback:function(e){t.$set(t.newUser,"quota",e)},expression:"newUser.quota"}})],1),t._v(" "),t.showConfig.showLanguages?e("div",{staticClass:"dialog__item"},[e("NcSelect",{staticClass:"dialog__select",attrs:{"input-label":t.t("settings","Language"),placeholder:t.t("settings","Set default language"),clearable:!1,selectable:t=>!t.languages,"filter-by":t.languageFilterBy,options:t.languages,label:"name"},model:{value:t.newUser.language,callback:function(e){t.$set(t.newUser,"language",e)},expression:"newUser.language"}})],1):t._e(),t._v(" "),e("div",{class:["dialog__item dialog__managers",{"icon-loading-small":t.loading.manager}]},[e("NcSelect",{staticClass:"dialog__select",attrs:{"input-label":t.managerInputLabel,placeholder:t.managerLabel,options:t.possibleManagers,"user-select":!0,label:"displayname"},on:{search:t.searchUserManager},model:{value:t.newUser.manager,callback:function(e){t.$set(t.newUser,"manager",e)},expression:"newUser.manager"}})],1)],1)])}),[],!1,null,"0cf68bf0",null);const W=j.exports,V=r.Ay.extend({name:"UserListFooter",components:{NcLoadingIcon:p.A},props:{loading:{type:Boolean,required:!0},filteredUsers:{type:Array,required:!0}},computed:{userCount(){return this.loading?this.n("settings","{userCount} account …","{userCount} accounts …",this.filteredUsers.length,{userCount:this.filteredUsers.length}):this.n("settings","{userCount} account","{userCount} accounts",this.filteredUsers.length,{userCount:this.filteredUsers.length})}},methods:{t:n.Tl,n:n.zw}});var H=i(18033),K={};K.styleTagTransform=D(),K.setAttributes=S(),K.insert=x().bind(null,"head"),K.domAPI=_(),K.insertStyleElement=G(),w()(H.A,K),H.A&&H.A.locals&&H.A.locals;const X=(0,E.A)(V,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",{staticClass:"footer"},[e("th",{attrs:{scope:"row"}},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Total rows summary")))])]),t._v(" "),e("td",{staticClass:"footer__cell footer__cell--loading"},[t.loading?e("NcLoadingIcon",{attrs:{title:t.t("settings","Loading accounts …"),size:32}}):t._e()],1),t._v(" "),e("td",{staticClass:"footer__cell footer__cell--count footer__cell--multiline"},[e("span",{attrs:{"aria-describedby":"user-count-desc"}},[t._v(t._s(t.userCount))]),t._v(" "),e("span",{staticClass:"hidden-visually",attrs:{id:"user-count-desc"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Scroll to load more rows"))+"\n\t\t")])])])}),[],!1,null,"20636959",null).exports,Y=r.Ay.extend({name:"UserListHeader",props:{hasObfuscated:{type:Boolean,required:!0}},computed:{showConfig(){return this.$store.getters.getShowConfig},settings(){return this.$store.getters.getServerData},passwordLabel(){return this.hasObfuscated?(0,n.Tl)("settings","Password or insufficient permissions message"):(0,n.Tl)("settings","Password")}},methods:{t:n.Tl}});var Z=i(24882),J={};J.styleTagTransform=D(),J.setAttributes=S(),J.insert=x().bind(null,"head"),J.domAPI=_(),J.insertStyleElement=G(),w()(Z.A,J),Z.A&&Z.A.locals&&Z.A.locals;const tt=(0,E.A)(Y,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("tr",{staticClass:"header"},[e("th",{staticClass:"header__cell header__cell--avatar",attrs:{"data-cy-user-list-header-avatar":"",scope:"col"}},[e("span",{staticClass:"hidden-visually"},[t._v("\n\t\t\t"+t._s(t.t("settings","Avatar"))+"\n\t\t")])]),t._v(" "),e("th",{staticClass:"header__cell header__cell--displayname",attrs:{"data-cy-user-list-header-displayname":"",scope:"col"}},[e("strong",[t._v("\n\t\t\t"+t._s(t.t("settings","Display name"))+"\n\t\t")])]),t._v(" "),e("th",{staticClass:"header__cell header__cell--username",attrs:{"data-cy-user-list-header-username":"",scope:"col"}},[e("span",[t._v("\n\t\t\t"+t._s(t.t("settings","Account name"))+"\n\t\t")])]),t._v(" "),e("th",{staticClass:"header__cell",class:{"header__cell--obfuscated":t.hasObfuscated},attrs:{"data-cy-user-list-header-password":"",scope:"col"}},[e("span",[t._v(t._s(t.passwordLabel))])]),t._v(" "),e("th",{staticClass:"header__cell",attrs:{"data-cy-user-list-header-email":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Email")))])]),t._v(" "),e("th",{staticClass:"header__cell header__cell--large",attrs:{"data-cy-user-list-header-groups":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Groups")))])]),t._v(" "),t.settings.isAdmin||t.settings.isDelegatedAdmin?e("th",{staticClass:"header__cell header__cell--large",attrs:{"data-cy-user-list-header-subadmins":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Group admin for")))])]):t._e(),t._v(" "),e("th",{staticClass:"header__cell",attrs:{"data-cy-user-list-header-quota":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Quota")))])]),t._v(" "),t.showConfig.showLanguages?e("th",{staticClass:"header__cell header__cell--large",attrs:{"data-cy-user-list-header-languages":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Language")))])]):t._e(),t._v(" "),t.showConfig.showUserBackend||t.showConfig.showStoragePath?e("th",{staticClass:"header__cell header__cell--large",attrs:{"data-cy-user-list-header-storage-location":"",scope:"col"}},[t.showConfig.showUserBackend?e("span",[t._v("\n\t\t\t"+t._s(t.t("settings","Account backend"))+"\n\t\t")]):t._e(),t._v(" "),t.showConfig.showStoragePath?e("span",{staticClass:"header__subtitle"},[t._v("\n\t\t\t"+t._s(t.t("settings","Storage location"))+"\n\t\t")]):t._e()]):t._e(),t._v(" "),t.showConfig.showFirstLogin?e("th",{staticClass:"header__cell",attrs:{"data-cy-user-list-header-first-login":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","First login")))])]):t._e(),t._v(" "),t.showConfig.showLastLogin?e("th",{staticClass:"header__cell",attrs:{"data-cy-user-list-header-last-login":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Last login")))])]):t._e(),t._v(" "),e("th",{staticClass:"header__cell header__cell--large header__cell--fill",attrs:{"data-cy-user-list-header-manager":"",scope:"col"}},[e("span",[t._v(t._s(t.t("settings","Manager")))])]),t._v(" "),e("th",{staticClass:"header__cell header__cell--actions",attrs:{"data-cy-user-list-header-actions":"",scope:"col"}},[e("span",{staticClass:"hidden-visually"},[t._v("\n\t\t\t"+t._s(t.t("settings","Account actions"))+"\n\t\t")])])])}),[],!1,null,"5c0f8828",null).exports;var et=i(21777),st=i(56760),it=i(41944),nt=i(95101),at=i(86454),rt=i(57505),ot=i(24764),lt=i(65659),dt=i(19664);const ct=(0,r.pM)({components:{NcActionButton:rt.A,NcActions:ot.A,NcIconSvgWrapper:g.A},props:{actions:{type:Array,required:!0},disabled:{type:Boolean,required:!0},edit:{type:Boolean,required:!0},user:{type:Object,required:!0}},computed:{editSvg(){return this.edit?lt:dt},enabledActions(){return this.actions.filter((t=>"function"!=typeof t.enabled||t.enabled(this.user)))}},methods:{isSvg:function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;if(!0!==at.XMLValidator.validate(t))return!1;let e;const s=new at.XMLParser;try{e=s.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))},toggleEdit(){this.$emit("update:edit",!this.edit)}}}),ut=(0,E.A)(ct,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcActions",{attrs:{"aria-label":t.t("settings","Toggle account actions menu"),disabled:t.disabled,inline:1}},[e("NcActionButton",{attrs:{"data-cy-user-list-action-toggle-edit":`${t.edit}`,disabled:t.disabled},on:{click:t.toggleEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{key:t.editSvg,attrs:{svg:t.editSvg,"aria-hidden":"true"}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.edit?t.t("settings","Done"):t.t("settings","Edit"))+"\n\t\t")]),t._v(" "),t._l(t.enabledActions,(function({action:s,icon:i,text:n},a){return e("NcActionButton",{key:a,attrs:{disabled:t.disabled,"aria-label":n,icon:i,"close-after-click":""},on:{click:e=>s(e,{...t.user})},scopedSlots:t._u([t.isSvg(i)?{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{svg:i,"aria-hidden":"true"}})]},proxy:!0}:null],null,!0)},[t._v("\n\t\t"+t._s(n)+"\n\t\t")])}))],2)}),[],!1,null,null,null).exports;var gt=i(950),pt=i(43988),ht=i(61744),At=i(78928),mt=i(42610),ft=i(57908),vt=i(64426),Ct=i(59915),wt=i(68166),bt=i(15502),_t=i(71711),yt=i(25878),xt=i(85407),Nt=i(47611),St=i(10363),kt=i(282),Gt=i(78009),Ut=i(54048),Dt=i(88486),Lt=i(27345),It=i(49595),Et=i(31866),Ot=i(70036),Tt=i(44031),Bt=i(542),Pt=i(94012),qt=i(93651),$t=i(77834),Ft=i(91019),Mt=i(50017),Rt=i(60258),zt=i(22258),Qt=i(66865),jt=i(17067),Wt=i(10211),Vt=i(52631),Ht=i(73148),Kt=i(81621),Xt=i(94294),Yt=i(93314),Zt=i(8054),Jt=i(99016),te=i(83358),ee=i(90429),se=i(12318),ie=i(46173),ne=i(44025),ae=i(92257),re=i(48198),oe=i(59668),le=i(18343),de=i(83194),ce=i(50481),ue=i(85646),ge=i(71565),pe=i(49975),he=i(17848),Ae=i(99925),me=i(66768),fe=i(8633),ve=i(97398),Ce=i(51550),we=i(63195),be=i(77082),_e=i(48191),ye=i(77462),xe=i(34962),Ne=i(38159),Se=i(99759),ke=i(371),Ge=i(22983),Ue=i(71912),De=i(35290),Le=i(1938),Ie=i(1357),Ee=i(81974),Oe=i(36079),Te=i(55041),Be=(i(19051),i(65139),i(52781),i(3168),i(63121)),Pe=i(90841),qe=i(40959),$e=i(71639),Fe=i(4258),Me=i(29586),Re=i(684),ze=i(61618),Qe=i(62179),je=i(25771),We=i(8256),Ve=i(19234),He=i(5843),Ke=i(48748),Xe=i(23610),Ye=i(55581),Ze=(i(94205),i(95462),i(23020),i(53429),i(23739),i(16343),i(29928),i(64660),i(18547),i(42892)),Je=i(69885),ts=(i(59656),i(75105),i(92471),i(16406),i(2508));gt.N,pt.N,ht.A,At.N,mt.N,ft.A,vt.N,Ct.A,bt.A,_t.A,yt.N,wt.N,xt.N,Nt.A,St.A,kt.N,Gt.N,Ut.A,Dt.N,Lt.A,It.N,Et.N,Ot.N,Tt.N,Bt.A,Pt.N,qt.N,$t.N,$t.N,Ft.N,Mt.N,Rt.A,zt.N,Qt.A,jt.N,Te.N,Wt.N,Vt.N,Ht.N,Kt.N,Xt.N,Yt.N,Zt.N,Jt.N,te.N,ee.N,se.N,ie.N,ne.N,ae.default,re.A,oe.N,le.N,de.A,ce.N,u.A,ue.N,ge.N,pe.N,he.N,Ae.N,me.A,fe.N,ve.N,Ce.N,we.N,be.N,_e.N,ye.N,xe.N,Ne.N,p.A,Oe.N,Se.A,ke.A,Ge.N,Ue.N,De.N,Le.N,Ie.N,Ee.N,Te.a,Be.N,$e.N,Pe.N,Fe.N,Me.N,Re.N,ze.N,Qe.N,je.N,qe.N,We.N,Ve.N,He.N,Ke.N,Xe.A,Symbol.toStringTag,Ze.A,Je.A,ts.yw,Symbol.toStringTag;const es={props:{user:{type:Object,required:!0},settings:{type:Object,default:()=>({})},quotaOptions:{type:Array,default:()=>[]},languages:{type:Array,required:!0},externalActions:{type:Array,default:()=>[]}},setup(t){const{formattedFullTime:e}=(0,Ye.m7)(1e3*t.user.firstLoginTimestamp,{relativeTime:!1,format:{timeStyle:"short",dateStyle:"short"}});return{formattedFullTime:e}},data(){return{selectedGroups:this.user.groups.map((t=>({id:t,name:t}))),selectedSubAdminGroups:this.user.subadmin.map((t=>({id:t,name:t}))),userGroups:this.user.groups.map((t=>({id:t,name:t}))),userSubAdminGroups:this.user.subadmin.map((t=>({id:t,name:t})))}},computed:{showConfig(){return this.$store.getters.getShowConfig},usedSpace(){const e=this.user.quota.used>0?this.user.quota.used:0;return t("settings","{size} used",{size:(0,T.v7)(e,!0)})},usedQuota(){let t=this.user.quota.quota;return t=t>0?Math.min(100,Math.round(this.user.quota.used/t*100)):95*(1-1/(this.user.quota.used/(10*Math.pow(2,30))+1)),isNaN(t)?0:t},userQuota(){if(this.user.quota.quota>=0){const t=(0,T.v7)(this.user.quota.quota);return this.quotaOptions.find((e=>e.id===t))||{id:t,label:t}}return"default"===this.user.quota.quota?this.quotaOptions[0]:this.quotaOptions[1]},minPasswordLength(){return this.$store.getters.getPasswordPolicyMinLength},userLanguage(){const t=this.languages[0].languages.concat(this.languages[1].languages).find((t=>t.code===this.user.language));return"object"!=typeof t&&""!==this.user.language?{code:this.user.language,name:this.user.language}:""!==this.user.language&&t},userFirstLogin(){return this.user.firstLoginTimestamp>0?this.formattedFullTime:this.user.firstLoginTimestamp<0?t("settings","Unknown"):t("settings","Never")},userLastLoginTooltip(){return this.user.lastLoginTimestamp>0?OC.Util.formatDate(1e3*this.user.lastLoginTimestamp):""},userLastLogin(){return this.user.lastLoginTimestamp>0?OC.Util.relativeModifiedDate(1e3*this.user.lastLoginTimestamp):t("settings","Never")}}};var ss=i(95668);const is={name:"UserRow",components:{NcAvatar:it.A,NcLoadingIcon:p.A,NcProgressBar:nt.A,NcSelect:$.default,NcTextField:F.A,UserRowActions:ut},mixins:[es],props:{user:{type:Object,required:!0},visible:{type:Boolean,required:!0},users:{type:Array,required:!0},hasObfuscated:{type:Boolean,required:!0},quotaOptions:{type:Array,required:!0},languages:{type:Array,required:!0},settings:{type:Object,required:!0},externalActions:{type:Array,default:()=>[]}},data(){return{selectedQuota:!1,rand:Math.random().toString(36).substring(2),loadingPossibleManagers:!1,possibleManagers:[],currentManager:"",editing:!1,loading:{all:!1,displayName:!1,password:!1,mailAddress:!1,groups:!1,groupsDetails:!1,subAdminGroupsDetails:!1,subadmins:!1,quota:!1,delete:!1,disable:!1,languages:!1,wipe:!1,manager:!1},editedDisplayName:this.user.displayname,editedPassword:"",editedMail:this.user.email??"",promise:null}},computed:{managerLabel:()=>t("settings","Set line manager"),isObfuscated(){return(0,ss.HK)(this.user)},showConfig(){return this.$store.getters.getShowConfig},isLoadingUser(){return this.loading.delete||this.loading.disable||this.loading.wipe},isLoadingField(){return this.loading.delete||this.loading.disable||this.loading.all},uniqueId(){return encodeURIComponent(this.user.id+this.rand)},availableGroups(){return(this.settings.isAdmin||this.settings.isDelegatedAdmin?this.$store.getters.getSortedGroups:this.$store.getters.getSubAdminGroups).filter((t=>"__nc_internal_recent"!==t.id&&"disabled"!==t.id))},availableSubAdminGroups(){return this.availableGroups.filter((t=>"admin"!==t.id))},userGroupsLabels(){return this.userGroups.map((t=>{const e=this.availableGroups.find((e=>e.id===t.id));return e?.name??t.name??t.id})).join(", ")},userSubAdminGroupsLabels(){return this.userSubAdminGroups.map((t=>{const e=this.availableSubAdminGroups.find((e=>e.id===t.id));return e?.name??t.name??t.id})).join(", ")},usedSpace(){return this.user.quota?.used?t("settings","{size} used",{size:(0,T.v7)(this.user.quota?.used)}):t("settings","{size} used",{size:(0,T.v7)(0)})},canEdit(){return(0,et.HW)().uid!==this.user.id||this.settings.isAdmin||this.settings.isDelegatedAdmin},userQuota(){let e=this.user.quota?.quota;return"default"===e&&(e=this.settings.defaultQuota,"none"!==e&&(e=(0,T.lT)(e,!0))),"none"===e||-3===e?t("settings","Unlimited"):e>=0?(0,T.v7)(e):(0,T.v7)(0)},userActions(){const e=[{icon:"icon-delete",text:t("settings","Delete account"),action:this.deleteUser},{icon:"icon-delete",text:t("settings","Disconnect all devices and delete local data"),action:this.wipeUserDevices},{icon:this.user.enabled?"icon-close":"icon-add",text:this.user.enabled?t("settings","Disable account"):t("settings","Enable account"),action:this.enableDisableUser}];return null!==this.user.email&&""!==this.user.email&&e.push({icon:"icon-mail",text:t("settings","Resend welcome email"),action:this.sendWelcomeMail}),e.concat(this.externalActions)},editedUserQuota:{get(){return!1!==this.selectedQuota?this.selectedQuota:this.settings.defaultQuota!==ss.SA.id&&(0,T.lT)(this.settings.defaultQuota,!0)>=0?{id:this.settings.defaultQuota,label:this.settings.defaultQuota}:ss.SA},set(t){this.selectedQuota=t}},availableLanguages(){return this.languages[0].languages.concat(this.languages[1].languages)}},async beforeMount(){this.user.manager&&await this.initManager(this.user.manager)},methods:{async wipeUserDevices(){const e=this.user.id;await(0,st.C5)(),OC.dialogs.confirmDestructive(t("settings","In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet.",{userid:e}),t("settings","Remote wipe of devices"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("settings","Wipe {userid}'s devices",{userid:e}),confirmClasses:"error",cancel:t("settings","Cancel")},(s=>{s&&(this.loading.wipe=!0,this.loading.all=!0,this.$store.dispatch("wipeUserDevices",e).then((()=>(0,d.Te)(t("settings","Wiped {userid}'s devices",{userid:e}))),{timeout:2e3}).finally((()=>{this.loading.wipe=!1,this.loading.all=!1})))}),!0)},filterManagers(t){return t.filter((t=>t.id!==this.user.id))},async initManager(t){await this.$store.dispatch("getUser",t).then((t=>{this.currentManager=t?.data.ocs.data}))},async searchInitialUserManager(){this.loadingPossibleManagers=!0,await this.searchUserManager(),this.loadingPossibleManagers=!1},async loadGroupsDetails(){this.loading.groups=!0,this.loading.groupsDetails=!0;try{const t=await(0,M.Iu)({userId:this.user.id});for(const e of t)this.$store.commit("addGroup",e);this.selectedGroups=this.selectedGroups.map((e=>t.find((t=>t.id===e.id))??e))}catch(e){f.A.error(t("settings","Failed to load groups with details"),{error:e})}this.loading.groups=!1,this.loading.groupsDetails=!1},async loadSubAdminGroupsDetails(){this.loading.subadmins=!0,this.loading.subAdminGroupsDetails=!0;try{const t=await(0,M.FF)({userId:this.user.id});for(const e of t)this.$store.commit("addGroup",e);this.selectedSubAdminGroups=this.selectedSubAdminGroups.map((e=>t.find((t=>t.id===e.id))??e))}catch(e){f.A.error(t("settings","Failed to load subadmin groups with details"),{error:e})}this.loading.subadmins=!1,this.loading.subAdminGroupsDetails=!1},async searchGroups(e,s){if(""!==e){this.promise&&this.promise.cancel(),s(!0);try{this.promise=await(0,M.N_)({search:e,offset:0,limit:25});const t=await this.promise;for(const e of t)this.$store.commit("addGroup",e)}catch(e){f.A.error(t("settings","Failed to search groups"),{error:e})}this.promise=null,s(!1)}},async searchUserManager(t){await this.$store.dispatch("searchUsers",{offset:0,limit:10,search:t}).then((t=>{const e=t?.data?this.filterManagers(Object.values(t?.data.ocs.data.users)):[];e.length>0&&(this.possibleManagers=e)}))},async updateUserManager(){this.loading.manager=!0;const e=this.user.manager;try{await this.$store.dispatch("setUserData",{userid:this.user.id,key:"manager",value:this.currentManager?this.currentManager.id:""})}catch(s){(0,d.Qg)(t("settings","Failed to update line manager")),f.A.error("Failed to update manager:",{error:s}),this.currentManager=e}finally{this.loading.manager=!1}},async deleteUser(){const e=this.user.id;await(0,st.C5)(),OC.dialogs.confirmDestructive(t("settings","Fully delete {userid}'s account including all their personal files, app data, etc.",{userid:e}),t("settings","Account deletion"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("settings","Delete {userid}'s account",{userid:e}),confirmClasses:"error",cancel:t("settings","Cancel")},(t=>{if(t)return this.loading.delete=!0,this.loading.all=!0,this.$store.dispatch("deleteUser",e).then((()=>{this.loading.delete=!1,this.loading.all=!1}))}),!0)},enableDisableUser(){this.loading.delete=!0,this.loading.all=!0;const t=this.user.id,e=!this.user.enabled;return this.$store.dispatch("enableDisableUser",{userid:t,enabled:e}).then((()=>{this.loading.delete=!1,this.loading.all=!1}))},async updateDisplayName(){this.loading.displayName=!0;try{await this.$store.dispatch("setUserData",{userid:this.user.id,key:"displayname",value:this.editedDisplayName}),this.editedDisplayName===this.user.displayname&&(0,d.Te)(t("settings","Display name was successfully changed"))}finally{this.loading.displayName=!1}},async updatePassword(){if(this.loading.password=!0,0===this.editedPassword.length)(0,d.Qg)(t("settings","Password can't be empty")),this.loading.password=!1;else try{await this.$store.dispatch("setUserData",{userid:this.user.id,key:"password",value:this.editedPassword}),this.editedPassword="",(0,d.Te)(t("settings","Password was successfully changed"))}finally{this.loading.password=!1}},async updateEmail(){if(this.loading.mailAddress=!0,""===this.editedMail)(0,d.Qg)(t("settings","Email can't be empty")),this.loading.mailAddress=!1,this.editedMail=this.user.email;else try{await this.$store.dispatch("setUserData",{userid:this.user.id,key:"email",value:this.editedMail}),this.editedMail===this.user.email&&(0,d.Te)(t("settings","Email was successfully changed"))}finally{this.loading.mailAddress=!1}},async createGroup({name:e}){this.loading.groups=!0;try{await this.$store.dispatch("addGroup",e);const t=this.user.id;await this.$store.dispatch("addUserGroup",{userid:t,gid:e}),this.userGroups.push({id:e,name:e})}catch(e){f.A.error(t("settings","Failed to create group"),{error:e})}this.loading.groups=!1},async addUserGroup(t){if(t.isCreating)return;const e=this.user.id,s=t.id;if(!1!==t.canAdd){this.loading.groups=!0;try{await this.$store.dispatch("addUserGroup",{userid:e,gid:s}),this.userGroups.push(t)}catch(t){console.error(t)}this.loading.groups=!1}},async removeUserGroup(t){if(!1===t.canRemove)return!1;this.loading.groups=!0;const e=this.user.id,s=t.id;try{await this.$store.dispatch("removeUserGroup",{userid:e,gid:s}),this.userGroups=this.userGroups.filter((t=>t.id!==s)),this.loading.groups=!1,this.$route.params.selectedGroup===s&&this.$store.commit("deleteUser",e)}catch{this.loading.groups=!1}},async addUserSubAdmin(t){this.loading.subadmins=!0;const e=this.user.id,s=t.id;try{await this.$store.dispatch("addUserSubAdmin",{userid:e,gid:s}),this.userSubAdminGroups.push(t)}catch(t){console.error(t)}this.loading.subadmins=!1},async removeUserSubAdmin(t){this.loading.subadmins=!0;const e=this.user.id,s=t.id;try{await this.$store.dispatch("removeUserSubAdmin",{userid:e,gid:s}),this.userSubAdminGroups=this.userSubAdminGroups.filter((t=>t.id!==s))}catch(t){console.error(t)}finally{this.loading.subadmins=!1}},async setUserQuota(t="none"){"none"===t&&(t=ss.SA),this.loading.quota=!0,t=t.id?t.id:t;try{const e=((0,T.lT)(t,!0)||t).toString();await this.$store.dispatch("setUserData",{userid:this.user.id,key:"quota",value:e})}catch(t){console.error(t)}finally{this.loading.quota=!1}return t},validateQuota:t=>("object"==typeof t&&(t=t?.id||t.label),null===(0,T.lT)(t,!0)?ss.SA:{id:t=(0,T.v7)((0,T.lT)(t,!0)),label:t}),async setUserLanguage(t){this.loading.languages=!0;try{await this.$store.dispatch("setUserData",{userid:this.user.id,key:"language",value:t.code}),this.loading.languages=!1}catch(t){console.error(t)}return t},sendWelcomeMail(){this.loading.all=!0,this.$store.dispatch("sendWelcomeMail",this.user.id).then((()=>(0,d.Te)(t("settings","Welcome mail sent!"),{timeout:2e3}))).finally((()=>{this.loading.all=!1}))},async toggleEdit(){this.editing=!this.editing,this.editing&&(await this.$nextTick(),this.$refs.displayNameField?.$refs?.inputField?.$refs?.input?.focus(),this.loadGroupsDetails(),this.loadSubAdminGroupsDetails()),this.editedDisplayName!==this.user.displayname?this.editedDisplayName=this.user.displayname:this.editedMail!==this.user.email&&(this.editedMail=this.user.email??"")}}};var ns=i(78897),as={};as.styleTagTransform=D(),as.setAttributes=S(),as.insert=x().bind(null,"head"),as.domAPI=_(),as.insertStyleElement=G(),w()(ns.A,as),ns.A&&ns.A.locals&&ns.A.locals;var rs=(0,E.A)(is,(function(){var t=this,e=t._self._c;return e("tr",{staticClass:"user-list__row",attrs:{"data-cy-user-row":t.user.id}},[e("td",{staticClass:"row__cell row__cell--avatar",attrs:{"data-cy-user-list-cell-avatar":""}},[t.isLoadingUser?e("NcLoadingIcon",{attrs:{name:t.t("settings","Loading account …"),size:32}}):t.visible?e("NcAvatar",{attrs:{"disable-menu":"","show-user-status":!1,user:t.user.id}}):t._e()],1),t._v(" "),e("td",{staticClass:"row__cell row__cell--displayname",attrs:{"data-cy-user-list-cell-displayname":""}},[t.editing&&t.user.backendCapabilities.setDisplayName?[e("NcTextField",{ref:"displayNameField",staticClass:"user-row-text-field",class:{"icon-loading-small":t.loading.displayName},attrs:{"data-cy-user-list-input-displayname":"","data-loading":t.loading.displayName||void 0,"trailing-button-label":t.t("settings","Submit"),"show-trailing-button":!0,disabled:t.loading.displayName||t.isLoadingField,label:t.t("settings","Change display name"),"trailing-button-icon":"arrowRight",value:t.editedDisplayName,autocapitalize:"off",autocomplete:"off",spellcheck:"false"},on:{"update:value":function(e){t.editedDisplayName=e},"trailing-button-click":t.updateDisplayName}})]:t.isObfuscated?t._e():e("strong",{attrs:{title:t.user.displayname?.length>20?t.user.displayname:null}},[t._v("\n\t\t\t"+t._s(t.user.displayname)+"\n\t\t")])],2),t._v(" "),e("td",{staticClass:"row__cell row__cell--username",attrs:{"data-cy-user-list-cell-username":""}},[e("span",{staticClass:"row__subtitle"},[t._v(t._s(t.user.id))])]),t._v(" "),e("td",{staticClass:"row__cell",class:{"row__cell--obfuscated":t.hasObfuscated},attrs:{"data-cy-user-list-cell-password":""}},[t.editing&&t.settings.canChangePassword&&t.user.backendCapabilities.setPassword?[e("NcTextField",{staticClass:"user-row-text-field",class:{"icon-loading-small":t.loading.password},attrs:{"data-cy-user-list-input-password":"","data-loading":t.loading.password||void 0,"trailing-button-label":t.t("settings","Submit"),"show-trailing-button":!0,disabled:t.loading.password||t.isLoadingField,minlength:t.minPasswordLength,maxlength:"469",label:t.t("settings","Set new password"),"trailing-button-icon":"arrowRight",value:t.editedPassword,autocapitalize:"off",autocomplete:"new-password",required:"",spellcheck:"false",type:"password"},on:{"update:value":function(e){t.editedPassword=e},"trailing-button-click":t.updatePassword}})]:t.isObfuscated?e("span",[t._v("\n\t\t\t"+t._s(t.t("settings","You do not have permissions to see the details of this account"))+"\n\t\t")]):t._e()],2),t._v(" "),e("td",{staticClass:"row__cell",attrs:{"data-cy-user-list-cell-email":""}},[t.editing?[e("NcTextField",{staticClass:"user-row-text-field",class:{"icon-loading-small":t.loading.mailAddress},attrs:{"data-cy-user-list-input-email":"","data-loading":t.loading.mailAddress||void 0,"show-trailing-button":!0,"trailing-button-label":t.t("settings","Submit"),label:t.t("settings","Set new email address"),disabled:t.loading.mailAddress||t.isLoadingField,"trailing-button-icon":"arrowRight",value:t.editedMail,autocapitalize:"off",autocomplete:"email",spellcheck:"false",type:"email"},on:{"update:value":function(e){t.editedMail=e},"trailing-button-click":t.updateEmail}})]:t.isObfuscated?t._e():e("span",{attrs:{title:t.user.email?.length>20?t.user.email:null}},[t._v("\n\t\t\t"+t._s(t.user.email)+"\n\t\t")])],2),t._v(" "),e("td",{staticClass:"row__cell row__cell--large row__cell--multiline",attrs:{"data-cy-user-list-cell-groups":""}},[t.editing?[e("label",{staticClass:"hidden-visually",attrs:{for:"groups"+t.uniqueId}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Add account to group"))+"\n\t\t\t")]),t._v(" "),e("NcSelect",{attrs:{"data-cy-user-list-input-groups":"","data-loading":t.loading.groups||void 0,"input-id":"groups"+t.uniqueId,"close-on-select":!1,disabled:t.isLoadingField||t.loading.groupsDetails,loading:t.loading.groups,multiple:!0,"append-to-body":!1,options:t.availableGroups,placeholder:t.t("settings","Add account to group"),taggable:t.settings.isAdmin||t.settings.isDelegatedAdmin,value:t.userGroups,label:"name","no-wrap":!0,"create-option":t=>({id:t,name:t,isCreating:!0})},on:{search:t.searchGroups,"option:created":t.createGroup,"option:selected":e=>t.addUserGroup(e.at(-1)),"option:deselected":t.removeUserGroup}})]:t.isObfuscated?t._e():e("span",{attrs:{title:t.userGroupsLabels?.length>40?t.userGroupsLabels:null}},[t._v("\n\t\t\t"+t._s(t.userGroupsLabels)+"\n\t\t")])],2),t._v(" "),t.settings.isAdmin||t.settings.isDelegatedAdmin?e("td",{staticClass:"row__cell row__cell--large row__cell--multiline",attrs:{"data-cy-user-list-cell-subadmins":""}},[t.editing&&(t.settings.isAdmin||t.settings.isDelegatedAdmin)?[e("label",{staticClass:"hidden-visually",attrs:{for:"subadmins"+t.uniqueId}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Set account as admin for"))+"\n\t\t\t")]),t._v(" "),e("NcSelect",{attrs:{"data-cy-user-list-input-subadmins":"","data-loading":t.loading.subadmins||void 0,"input-id":"subadmins"+t.uniqueId,"close-on-select":!1,disabled:t.isLoadingField||t.loading.subAdminGroupsDetails,loading:t.loading.subadmins,label:"name","append-to-body":!1,multiple:!0,"no-wrap":!0,options:t.availableSubAdminGroups,placeholder:t.t("settings","Set account as admin for"),value:t.userSubAdminGroups},on:{search:t.searchGroups,"option:deselected":t.removeUserSubAdmin,"option:selected":e=>t.addUserSubAdmin(e.at(-1))}})]:t.isObfuscated?t._e():e("span",{attrs:{title:t.userSubAdminGroupsLabels?.length>40?t.userSubAdminGroupsLabels:null}},[t._v("\n\t\t\t"+t._s(t.userSubAdminGroupsLabels)+"\n\t\t")])],2):t._e(),t._v(" "),e("td",{staticClass:"row__cell",attrs:{"data-cy-user-list-cell-quota":""}},[t.editing?[e("label",{staticClass:"hidden-visually",attrs:{for:"quota"+t.uniqueId}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Select account quota"))+"\n\t\t\t")]),t._v(" "),e("NcSelect",{attrs:{"close-on-select":!0,"create-option":t.validateQuota,"data-cy-user-list-input-quota":"","data-loading":t.loading.quota||void 0,disabled:t.isLoadingField,loading:t.loading.quota,"append-to-body":!1,clearable:!1,"input-id":"quota"+t.uniqueId,options:t.quotaOptions,placeholder:t.t("settings","Select account quota"),taggable:!0},on:{"option:selected":t.setUserQuota},model:{value:t.editedUserQuota,callback:function(e){t.editedUserQuota=e},expression:"editedUserQuota"}})]:t.isObfuscated?t._e():[e("span",{attrs:{id:"quota-progress"+t.uniqueId}},[t._v(t._s(t.userQuota)+" ("+t._s(t.usedSpace)+")")]),t._v(" "),e("NcProgressBar",{staticClass:"row__progress",class:{"row__progress--warn":t.usedQuota>80},attrs:{"aria-labelledby":"quota-progress"+t.uniqueId,value:t.usedQuota}})]],2),t._v(" "),t.showConfig.showLanguages?e("td",{staticClass:"row__cell row__cell--large",attrs:{"data-cy-user-list-cell-language":""}},[t.editing?[e("label",{staticClass:"hidden-visually",attrs:{for:"language"+t.uniqueId}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Set the language"))+"\n\t\t\t")]),t._v(" "),e("NcSelect",{attrs:{id:"language"+t.uniqueId,"data-cy-user-list-input-language":"","data-loading":t.loading.languages||void 0,"allow-empty":!1,disabled:t.isLoadingField,loading:t.loading.languages,clearable:!1,"append-to-body":!1,options:t.availableLanguages,placeholder:t.t("settings","No language set"),value:t.userLanguage,label:"name"},on:{input:t.setUserLanguage}})]:t.isObfuscated?t._e():e("span",[t._v("\n\t\t\t"+t._s(t.userLanguage.name)+"\n\t\t")])],2):t._e(),t._v(" "),t.showConfig.showUserBackend||t.showConfig.showStoragePath?e("td",{staticClass:"row__cell row__cell--large",attrs:{"data-cy-user-list-cell-storage-location":""}},[t.isObfuscated?t._e():[t.showConfig.showUserBackend?e("span",[t._v(t._s(t.user.backend))]):t._e(),t._v(" "),t.showConfig.showStoragePath?e("span",{staticClass:"row__subtitle",attrs:{title:t.user.storageLocation}},[t._v("\n\t\t\t\t"+t._s(t.user.storageLocation)+"\n\t\t\t")]):t._e()]],2):t._e(),t._v(" "),t.showConfig.showFirstLogin?e("td",{staticClass:"row__cell",attrs:{"data-cy-user-list-cell-first-login":""}},[t.isObfuscated?t._e():e("span",[t._v(t._s(t.userFirstLogin))])]):t._e(),t._v(" "),t.showConfig.showLastLogin?e("td",{staticClass:"row__cell",attrs:{title:t.userLastLoginTooltip,"data-cy-user-list-cell-last-login":""}},[t.isObfuscated?t._e():e("span",[t._v(t._s(t.userLastLogin))])]):t._e(),t._v(" "),e("td",{staticClass:"row__cell row__cell--large row__cell--fill",attrs:{"data-cy-user-list-cell-manager":""}},[t.editing?[e("label",{staticClass:"hidden-visually",attrs:{for:"manager"+t.uniqueId}},[t._v("\n\t\t\t\t"+t._s(t.managerLabel)+"\n\t\t\t")]),t._v(" "),e("NcSelect",{staticClass:"select--fill",attrs:{"data-cy-user-list-input-manager":"","data-loading":t.loading.manager||void 0,"input-id":"manager"+t.uniqueId,disabled:t.isLoadingField,loading:t.loadingPossibleManagers||t.loading.manager,options:t.possibleManagers,placeholder:t.managerLabel,label:"displayname",filterable:!1,"internal-search":!1,clearable:!0},on:{open:t.searchInitialUserManager,search:t.searchUserManager,"update:model-value":t.updateUserManager},model:{value:t.currentManager,callback:function(e){t.currentManager=e},expression:"currentManager"}})]:t.isObfuscated?t._e():e("span",[t._v("\n\t\t\t"+t._s(t.user.manager)+"\n\t\t")])],2),t._v(" "),e("td",{staticClass:"row__cell row__cell--actions",attrs:{"data-cy-user-list-cell-actions":""}},[t.visible&&!t.isObfuscated&&t.canEdit&&!t.loading.all?e("UserRowActions",{attrs:{actions:t.userActions,disabled:t.isLoadingField,edit:t.editing,user:t.user},on:{"update:edit":t.toggleEdit}}):t._e()],1)])}),[],!1,null,"549fcd14",null);const os=rs.exports,ls=Object.freeze({id:"",displayName:"",password:"",mailAddress:"",groups:[],manager:"",subAdminsGroups:[],quota:ss.MY,language:{code:"en",name:t("settings","Default language")}}),ds={name:"UserList",components:{Fragment:c.F,NcEmptyContent:u.A,NcIconSvgWrapper:g.A,NcLoadingIcon:p.A,NewUserDialog:W,UserListFooter:X,UserListHeader:tt,VirtualList:O},props:{selectedGroup:{type:String,default:null},externalActions:{type:Array,default:()=>[]}},setup:()=>({mdiAccountGroup:l.n7C,rowHeight:55,UserRow:os}),data:()=>({loading:{all:!1,groups:!1,users:!1},newUser:{...ls},isInitialLoad:!0,searchQuery:""}),computed:{showConfig(){return this.$store.getters.getShowConfig},settings(){return this.$store.getters.getServerData},style(){return{"--row-height":`${this.rowHeight}px`}},hasObfuscated(){return this.filteredUsers.some((t=>(0,ss.HK)(t)))},users(){return this.$store.getters.getUsers},filteredUsers(){return"disabled"===this.selectedGroup?this.users.filter((t=>!1===t.enabled)):this.users.filter((t=>!1!==t.enabled))},groups(){return this.$store.getters.getSortedGroups.filter((t=>"__nc_internal_recent"!==t.id&&"disabled"!==t.id))},quotaOptions(){const t=this.settings.quotaPreset.reduce(((t,e)=>t.concat({id:e,label:e})),[]);return this.settings.allowUnlimitedQuota&&t.unshift(ss.SA),t.unshift(ss.MY),t},usersOffset(){return this.$store.getters.getUsersOffset},usersLimit(){return this.$store.getters.getUsersLimit},disabledUsersOffset(){return this.$store.getters.getDisabledUsersOffset},disabledUsersLimit(){return this.$store.getters.getDisabledUsersLimit},usersCount(){return this.users.length},languages(){return[{label:t("settings","Common languages"),languages:this.settings.languages.commonLanguages},{label:t("settings","Other languages"),languages:this.settings.languages.otherLanguages}]}},watch:{async selectedGroup(t){this.isInitialLoad=!0,await this.redirectIfDisabled(),this.$store.commit("resetUsers"),await this.loadUsers(),this.setNewUserDefaultGroup(t)},filteredUsers(t){f.A.debug(`${t.length} filtered user(s)`)}},async created(){await this.loadUsers()},async mounted(){this.settings.canChangePassword||OC.Notification.showTemporary(t("settings","Password change is disabled because the master key is disabled")),this.resetForm(),(0,a.B1)("nextcloud:unified-search.search",this.search),(0,a.B1)("nextcloud:unified-search.reset",this.resetSearch),await this.redirectIfDisabled()},beforeDestroy(){(0,a.al)("nextcloud:unified-search.search",this.search),(0,a.al)("nextcloud:unified-search.reset",this.resetSearch)},methods:{async handleScrollEnd(){await this.loadUsers()},async loadUsers(){this.loading.users=!0;try{"disabled"===this.selectedGroup?await this.$store.dispatch("getDisabledUsers",{offset:this.disabledUsersOffset,limit:this.disabledUsersLimit,search:this.searchQuery}):"__nc_internal_recent"===this.selectedGroup?await this.$store.dispatch("getRecentUsers",{offset:this.usersOffset,limit:this.usersLimit,search:this.searchQuery}):await this.$store.dispatch("getUsers",{offset:this.usersOffset,limit:this.usersLimit,group:this.selectedGroup,search:this.searchQuery}),f.A.debug(`${this.users.length} total user(s) loaded`)}catch(t){f.A.error("Failed to load accounts",{error:t}),(0,d.Qg)("Failed to load accounts")}this.loading.users=!1,this.isInitialLoad=!1},closeDialog(){this.$store.commit("setShowConfig",{key:"showNewUserForm",value:!1})},async search({query:t}){this.searchQuery=t,this.$store.commit("resetUsers"),await this.loadUsers()},resetSearch(){this.search({query:""})},resetForm(){this.newUser=Object.assign({},ls),this.settings.defaultLanguage&&r.Ay.set(this.newUser.language,"code",this.settings.defaultLanguage),this.setNewUserDefaultGroup(this.selectedGroup),this.loading.all=!1},setNewUserDefaultGroup(t){if(t||this.settings.isAdmin||this.settings.isDelegatedAdmin){if(t){const e=this.groups.find((e=>e.id===t));if(e)return void(this.newUser.groups=[e])}this.newUser.groups=[]}else{const t=this.$store.getters.getSubAdminGroups;1===t.length&&(this.newUser.groups=[...t])}},async redirectIfDisabled(){const t=this.$store.getters.getGroups;"disabled"===this.selectedGroup&&t.findIndex((t=>"disabled"===t.id&&0===t.usercount))>-1&&(this.$router.push({name:"users"}),await this.loadUsers())}}};var cs=i(91544),us={};us.styleTagTransform=D(),us.setAttributes=S(),us.insert=x().bind(null,"head"),us.domAPI=_(),us.insertStyleElement=G(),w()(cs.A,us),cs.A&&cs.A.locals&&cs.A.locals;const gs=(0,E.A)(ds,(function(){var t=this,e=t._self._c;return e("Fragment",[t.showConfig.showNewUserForm?e("NewUserDialog",{attrs:{loading:t.loading,"new-user":t.newUser,"quota-options":t.quotaOptions},on:{reset:t.resetForm,closing:t.closeDialog}}):t._e(),t._v(" "),0===t.filteredUsers.length?e("NcEmptyContent",{staticClass:"empty",attrs:{name:t.isInitialLoad&&t.loading.users?null:t.t("settings","No accounts")},scopedSlots:t._u([{key:"icon",fn:function(){return[t.isInitialLoad&&t.loading.users?e("NcLoadingIcon",{attrs:{name:t.t("settings","Loading accounts …"),size:64}}):e("NcIconSvgWrapper",{attrs:{path:t.mdiAccountGroup,size:64}})]},proxy:!0}],null,!1,226056511)}):e("VirtualList",{style:t.style,attrs:{"data-component":t.UserRow,"data-sources":t.filteredUsers,"data-key":"id","data-cy-user-list":"","item-height":t.rowHeight,"extra-props":{users:t.users,settings:t.settings,hasObfuscated:t.hasObfuscated,quotaOptions:t.quotaOptions,languages:t.languages,externalActions:t.externalActions}},on:{"scroll-end":t.handleScrollEnd},scopedSlots:t._u([{key:"before",fn:function(){return[e("caption",{staticClass:"hidden-visually"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","List of accounts. This list is not fully rendered for performance reasons. The accounts will be rendered as you navigate through the list."))+"\n\t\t\t")])]},proxy:!0},{key:"header",fn:function(){return[e("UserListHeader",{attrs:{"has-obfuscated":t.hasObfuscated}})]},proxy:!0},{key:"footer",fn:function(){return[e("UserListFooter",{attrs:{loading:t.loading.users,"filtered-users":t.filteredUsers}})]},proxy:!0}])})],1)}),[],!1,null,"73fd953a",null).exports,ps=(0,r.pM)({name:"UserManagement",components:{NcAppContent:o.A,UserList:gs},data:()=>({externalActions:[]}),computed:{pageHeading(){return null===this.selectedGroupDecoded?(0,n.Tl)("settings","All accounts"):{admin:(0,n.Tl)("settings","Admins"),disabled:(0,n.Tl)("settings","Disabled accounts")}[this.selectedGroupDecoded]??(0,n.Tl)("settings","Account group: {group}",{group:this.selectedGroupDecoded})},selectedGroup(){return this.$route.params.selectedGroup},selectedGroupDecoded(){return this.selectedGroup?decodeURIComponent(this.selectedGroup):null}},beforeMount(){this.$store.dispatch("getPasswordPolicyMinLength")},created(){window.OCA=window.OCA??{},window.OCA.Settings=window.OCA.Settings??{},window.OCA.Settings.UserList=window.OCA.Settings.UserList??{},window.OCA.Settings.UserList.registerAction=this.registerAction,(0,a.Ic)("settings:user-management:loaded")},methods:{t:n.Tl,registerAction(t,e,s,i){return this.externalActions.push({icon:t,text:e,action:s,enabled:i}),this.externalActions}}});var hs=i(11196),As={};As.styleTagTransform=D(),As.setAttributes=S(),As.insert=x().bind(null,"head"),As.domAPI=_(),As.insertStyleElement=G(),w()(hs.A,As),hs.A&&hs.A.locals&&hs.A.locals;const ms=(0,E.A)(ps,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcAppContent",{attrs:{"page-heading":t.pageHeading}},[e("UserList",{attrs:{"selected-group":t.selectedGroupDecoded,"external-actions":t.externalActions}})],1)}),[],!1,null,"4684ed00",null).exports},65821(e,s,i){"use strict";i.r(s),i.d(s,{default:()=>mt});var n=i(85471),a=i(9165),r=i(53334),o=i(42530),l=i(52439),d=i(27345),c=i(49595),u=i(74095),g=i(85947),p=i(6695),h=i(35810),A=i(63814),m=i(19051),f=i(94012),v=i(93651),C=i(32073),w=i(371),b=i(67607),_=i(15916),y=i(95668),x=i(36620);const N={name:"UserSettingsDialog",components:{NcAppSettingsDialog:f.N,NcAppSettingsSection:v.N,NcCheckboxRadioSwitch:C.A,NcNoteCard:w.A,NcSelect:b.default},props:{open:{type:Boolean,required:!0}},data:()=>({selectedQuota:!1,loadingSendMail:!1}),computed:{groupSorting:{get(){return this.$store.getters.getGroupSorting===_.q.GroupName?"name":"member-count"},set(t){this.$store.commit("setGroupSorting","name"===t?_.q.GroupName:_.q.UserCount)}},isGroupSortingEnforced(){return this.$store.getters.getServerData.forceSortGroupByName},isModalOpen:{get(){return this.open},set(t){this.$emit("update:open",t)}},showConfig(){return this.$store.getters.getShowConfig},settings(){return this.$store.getters.getServerData},showLanguages:{get(){return this.showConfig.showLanguages},set(t){this.setShowConfig("showLanguages",t)}},showFirstLogin:{get(){return this.showConfig.showFirstLogin},set(t){this.setShowConfig("showFirstLogin",t)}},showLastLogin:{get(){return this.showConfig.showLastLogin},set(t){this.setShowConfig("showLastLogin",t)}},showUserBackend:{get(){return this.showConfig.showUserBackend},set(t){this.setShowConfig("showUserBackend",t)}},showStoragePath:{get(){return this.showConfig.showStoragePath},set(t){this.setShowConfig("showStoragePath",t)}},quotaOptions(){const t=this.settings.quotaPreset.reduce(((t,e)=>t.concat({id:e,label:e})),[]);return this.settings.allowUnlimitedQuota&&t.unshift(y.SA),t},defaultQuota:{get(){return!1!==this.selectedQuota?this.selectedQuota:this.settings.defaultQuota!==y.SA.id&&OC.Util.computerFileSize(this.settings.defaultQuota)>=0?{id:this.settings.defaultQuota,label:this.settings.defaultQuota}:y.SA},set(t){this.selectedQuota=t}},sendWelcomeMail:{get(){return this.settings.newUserSendEmail},async set(t){try{this.loadingSendMail=!0,this.$store.commit("setServerData",{...this.settings,newUserSendEmail:t}),await m.Ay.post((0,A.Jv)("/settings/users/preferences/newUser.sendEmail"),{value:t?"yes":"no"})}catch(t){x.A.error("Could not update newUser.sendEmail preference",{error:t})}finally{this.loadingSendMail=!1}}}},methods:{filterQuotas(t,e,s){const i=s.toLocaleLowerCase().replaceAll(/\s/g,"");return(e||"").toLocaleLowerCase().replaceAll(/\s/g,"").indexOf(i)>-1},setShowConfig(t,e){this.$store.commit("setShowConfig",{key:t,value:e})},validateQuota(t){"object"==typeof t&&(t=t?.id||t.label);const e=(0,h.lT)(t,!0);return null===e?y.SA:{id:t=(0,h.v7)(e),label:t}},setDefaultQuota(t="none"){"none"===t&&(t=y.SA),this.$store.dispatch("setAppConfig",{app:"files",key:"default_quota",value:t.id?t.id:t}).then((()=>{"object"!=typeof t&&(t={id:t,label:t}),this.defaultQuota=t}))}}};var S=i(85072),k=i.n(S),G=i(97825),U=i.n(G),D=i(77659),L=i.n(D),I=i(55056),E=i.n(I),O=i(10540),T=i.n(O),B=i(41113),P=i.n(B),q=i(7515),$={};$.styleTagTransform=P(),$.setAttributes=E(),$.insert=L().bind(null,"head"),$.domAPI=U(),$.insertStyleElement=T(),k()(q.A,$),q.A&&q.A.locals&&q.A.locals;var F=i(14486);const M=(0,F.A)(N,(function(){var t=this,e=t._self._c;return e("NcAppSettingsDialog",{attrs:{open:t.isModalOpen,"show-navigation":!0,name:t.t("settings","Account management settings")},on:{"update:open":function(e){t.isModalOpen=e}}},[e("NcAppSettingsSection",{attrs:{id:"visibility-settings",name:t.t("settings","Visibility")}},[e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showLanguages",checked:t.showLanguages},on:{"update:checked":function(e){t.showLanguages=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show language"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showUserBackend",checked:t.showUserBackend},on:{"update:checked":function(e){t.showUserBackend=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show account backend"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showStoragePath",checked:t.showStoragePath},on:{"update:checked":function(e){t.showStoragePath=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show storage path"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showFirstLogin",checked:t.showFirstLogin},on:{"update:checked":function(e){t.showFirstLogin=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show first login"))+"\n\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"showLastLogin",checked:t.showLastLogin},on:{"update:checked":function(e){t.showLastLogin=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show last login"))+"\n\t\t")])],1),t._v(" "),e("NcAppSettingsSection",{attrs:{id:"groups-sorting",name:t.t("settings","Sorting")}},[t.isGroupSortingEnforced?e("NcNoteCard",{attrs:{type:"warning"}},[t._v("\n\t\t\t"+t._s(t.t("settings","The system config enforces sorting the groups by name. This also disables showing the member count."))+"\n\t\t")]):t._e(),t._v(" "),e("fieldset",[e("legend",[t._v(t._s(t.t("settings","Group list sorting")))]),t._v(" "),e("NcNoteCard",{staticClass:"dialog__note",attrs:{type:"info",text:t.t("settings","Sorting only applies to the currently loaded groups for performance reasons. Groups will be loaded as you navigate or search through the list.")}}),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"radio",checked:t.groupSorting,"data-test":"sortGroupsByMemberCount",disabled:t.isGroupSortingEnforced,name:"group-sorting-mode",value:"member-count"},on:{"update:checked":function(e){t.groupSorting=e}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","By member count"))+"\n\t\t\t")]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"radio",checked:t.groupSorting,"data-test":"sortGroupsByName",disabled:t.isGroupSortingEnforced,name:"group-sorting-mode",value:"name"},on:{"update:checked":function(e){t.groupSorting=e}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","By name"))+"\n\t\t\t")])],1)],1),t._v(" "),e("NcAppSettingsSection",{attrs:{id:"email-settings",name:t.t("settings","Send email")}},[e("NcCheckboxRadioSwitch",{attrs:{type:"switch","data-test":"sendWelcomeMail",checked:t.sendWelcomeMail,disabled:t.loadingSendMail},on:{"update:checked":function(e){t.sendWelcomeMail=e}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Send welcome email to new accounts"))+"\n\t\t")])],1),t._v(" "),e("NcAppSettingsSection",{attrs:{id:"default-settings",name:t.t("settings","Defaults")}},[e("NcSelect",{attrs:{clearable:!1,"create-option":t.validateQuota,"filter-by":t.filterQuotas,"input-label":t.t("settings","Default quota"),options:t.quotaOptions,placement:"top",placeholder:t.t("settings","Select default quota"),taggable:""},on:{"option:selected":t.setDefaultQuota},model:{value:t.defaultQuota,callback:function(e){t.defaultQuota=e},expression:"defaultQuota"}})],1)],1)}),[],!1,null,"29922c80",null).exports;var R=i(85168),z=i(13073),Q=i(54914),j=i(24387),W=i(44131),V=i(71711),H=i(78009),K=i(70036),X=i(88289),Y=i(57505),Z=i(99759),J=i(43261),tt=i(79759),et=i(2413);const st={name:"GroupListItem",components:{AccountGroup:J.A,Delete:tt.A,Fragment:Q.F,NcActionButton:Y.A,NcActionInput:W.A,NcAppNavigationItem:l.A,NcButton:u.A,NcCounterBubble:g.A,NcModal:Z.A,NcNoteCard:w.A,Pencil:et.A},props:{active:{type:Boolean,required:!0},count:{type:Number,default:null},id:{type:String,required:!0},name:{type:String,required:!0}},data:()=>({loadingRenameGroup:!1,openGroupMenu:!1,showRemoveGroupModal:!1}),computed:{settings(){return this.$store.getters.getServerData}},methods:{handleGroupMenuOpen(){this.openGroupMenu=!0},async renameGroup(t){if(""===t.trim())return;const e=this.$refs.displayNameInput.$el.querySelector('input[type="text"]').value;if(""!==e.trim())try{this.openGroupMenu=!1,this.loadingRenameGroup=!0,await this.$store.dispatch("renameGroup",{groupid:t.trim(),displayName:e.trim()}),this.loadingRenameGroup=!1}catch{this.openGroupMenu=!0,this.loadingRenameGroup=!1}},async removeGroup(){try{await this.$store.dispatch("removeGroup",this.id),this.showRemoveGroupModal=!1}catch(e){(0,R.Qg)(t("settings",'Failed to delete group "{group}"',{group:this.name}))}}}};var it=i(38775),nt={};nt.styleTagTransform=P(),nt.setAttributes=E(),nt.insert=L().bind(null,"head"),nt.domAPI=U(),nt.insertStyleElement=T(),k()(it.A,nt),it.A&&it.A.locals&&it.A.locals;const at=(0,F.A)(st,(function(){var t=this,e=t._self._c;return e("Fragment",[t.showRemoveGroupModal?e("NcModal",{on:{close:function(e){t.showRemoveGroupModal=!1}}},[e("div",{staticClass:"modal__content"},[e("h2",{staticClass:"modal__header"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Please confirm the group removal"))+"\n\t\t\t")]),t._v(" "),e("NcNoteCard",{attrs:{type:"warning","show-alert":""}},[t._v("\n\t\t\t\t"+t._s(t.t("settings",'You are about to delete the group "{group}". The accounts will NOT be deleted.',{group:t.name}))+"\n\t\t\t")]),t._v(" "),e("div",{staticClass:"modal__button-row"},[e("NcButton",{attrs:{type:"secondary"},on:{click:function(e){t.showRemoveGroupModal=!1}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Cancel"))+"\n\t\t\t\t")]),t._v(" "),e("NcButton",{attrs:{type:"primary"},on:{click:t.removeGroup}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Confirm"))+"\n\t\t\t\t")])],1)],1)]):t._e(),t._v(" "),e("NcAppNavigationItem",{key:t.id,ref:"listItem",attrs:{exact:!0,name:t.name,to:{name:"group",params:{selectedGroup:encodeURIComponent(t.id)}},loading:t.loadingRenameGroup,"menu-open":t.openGroupMenu},on:{"update:menuOpen":t.handleGroupMenuOpen},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AccountGroup",{attrs:{size:20}})]},proxy:!0},{key:"counter",fn:function(){return[t.count?e("NcCounterBubble",{attrs:{type:t.active?"highlighted":void 0}},[t._v("\n\t\t\t\t"+t._s(t.count)+"\n\t\t\t")]):t._e()]},proxy:!0},{key:"actions",fn:function(){return["admin"!==t.id&&"disabled"!==t.id&&(t.settings.isAdmin||t.settings.isDelegatedAdmin)?e("NcActionInput",{ref:"displayNameInput",attrs:{"trailing-button-label":t.t("settings","Submit"),type:"text",value:t.name,label:t.t("settings","Rename group")},on:{submit:function(e){return t.renameGroup(t.id)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Pencil",{attrs:{size:20}})]},proxy:!0}],null,!1,580569589)}):t._e(),t._v(" "),"admin"!==t.id&&"disabled"!==t.id&&(t.settings.isAdmin||t.settings.isDelegatedAdmin)?e("NcActionButton",{on:{click:function(e){t.showRemoveGroupModal=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Delete",{attrs:{size:20}})]},proxy:!0}],null,!1,2705356561)},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Delete group"))+"\n\t\t\t")]):t._e()]},proxy:!0}])})],1)}),[],!1,null,"0540d351",null).exports;function rt(t){return void 0===t?null:{id:t.id,title:t.name,usercount:t.usercount??0,count:Math.max(0,(t.usercount??0)-(t.disabled??0))}}const ot=t=>{const e=(0,n.EW)((()=>t.value.filter((t=>"disabled"!==t.id&&"__nc_internal_recent"!==t.id&&"admin"!==t.id)).map((t=>rt(t))).filter((t=>null!==t)))),s=(0,n.EW)((()=>rt(t.value.find((t=>"admin"===t.id))))),i=(0,n.EW)((()=>rt(t.value.find((t=>"disabled"===t.id)))));return{adminGroup:s,recentGroup:(0,n.EW)((()=>rt(t.value.find((t=>"__nc_internal_recent"===t.id))))),disabledGroup:i,userGroups:e}};var lt=i(14744),dt=i(46984);const ct=(0,n.pM)({__name:"AppNavigationGroupList",setup(t){const e=(0,lt.P)(),s=(0,j.lq)(),i=(0,j.rd)();(0,n.KC)((async()=>{await G()}));const o=(0,n.EW)((()=>s.params?.selectedGroup)),l=(0,n.EW)((()=>o.value?decodeURIComponent(o.value):null)),c=(0,n.EW)((()=>h.value?e.getters.getSortedGroups:e.getters.getSubAdminGroups)),{userGroups:u}=ot(c),g=(0,n.EW)((()=>e.getters.getServerData)),h=(0,n.EW)((()=>g.value.isAdmin||g.value.isDelegatedAdmin)),A=(0,n.KR)(!1),m=(0,n.KR)(!1),f=(0,n.KR)(!1),v=(0,n.KR)(""),C=(0,n.KR)(!1),w=(0,n.KR)(0),b=(0,n.KR)(""),_=(0,n.EW)((()=>{if(h.value)return u.value;const t=b.value.toLowerCase();return u.value.filter((e=>-1!==e.id.toLowerCase().search(t)||-1!==e.title.toLowerCase().search(t)))})),y=(0,n.KR)([]),N=(0,n.EW)((()=>y.value.findLast((t=>t?.$vnode?.key===u.value?.at(-1)?.id))?.$refs?.listItem?.$el)),S=(0,z.ITo)(N);(0,n.wB)(S,(async()=>{S.value&&await G()})),(0,n.wB)(b,(async()=>{e.commit("resetGroups"),w.value=0,await G()}));const k=(0,n.KR)();async function G(){if(h.value){k.value&&k.value.cancel(),C.value=!0;try{k.value=(0,dt.N_)({search:b.value,offset:w.value,limit:25});const t=await k.value;t.length>0&&(w.value+=25);for(const s of t)e.commit("addGroup",s)}catch(t){x.A.error((0,r.t)("settings","Failed to load groups"),{error:t})}k.value=void 0,C.value=!1}}return{__sfc:!0,store:e,route:s,router:i,selectedGroup:o,selectedGroupDecoded:l,groups:c,userGroups:u,settings:g,isAdminOrDelegatedAdmin:h,isAddGroupOpen:A,loadingAddGroup:m,hasAddGroupError:f,newGroupName:v,loadingGroups:C,offset:w,groupsSearchQuery:b,filteredGroups:_,groupListItems:y,lastGroupListItem:N,isLastGroupVisible:S,promise:k,loadGroups:G,createGroup:async function(){f.value=!1;const t=v.value.trim();if(""!==t){A.value=!1,m.value=!0;try{await e.dispatch("addGroup",t),await i.push({name:"group",params:{selectedGroup:encodeURIComponent(t)}});const s=y.value.findLast((e=>e?.$vnode?.key===t));s?.$refs?.listItem?.$el?.scrollIntoView({behavior:"smooth",block:"nearest"}),v.value=""}catch{(0,R.Qg)((0,r.t)("settings","Failed to create group"))}m.value=!1}else f.value=!0},mdiAccountGroup:a.n7C,mdiPlus:a.biz,t:r.t,Fragment:Q.F,NcActionInput:W.A,NcActionText:V.A,NcAppNavigationCaption:H.N,NcAppNavigationList:d.A,NcAppNavigationSearch:K.N,NcIconSvgWrapper:p.A,NcLoadingIcon:X.A,GroupListItem:at}}}),ut=(0,F.A)(ct,(function(){var t=this,e=t._self._c,s=t._self._setupProxy;return e(s.Fragment,[e(s.NcAppNavigationCaption,{attrs:{name:s.t("settings","Groups"),disabled:s.loadingAddGroup,"aria-label":s.loadingAddGroup?s.t("settings","Creating group…"):s.t("settings","Create group"),"force-menu":"","is-heading":"",open:s.isAddGroupOpen},on:{"update:open":function(t){s.isAddGroupOpen=t}},scopedSlots:t._u([s.isAdminOrDelegatedAdmin?{key:"actionsTriggerIcon",fn:function(){return[s.loadingAddGroup?e(s.NcLoadingIcon):e(s.NcIconSvgWrapper,{attrs:{path:s.mdiPlus}})]},proxy:!0}:null,s.isAdminOrDelegatedAdmin?{key:"actions",fn:function(){return[e(s.NcActionText,{scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiAccountGroup}})]},proxy:!0}],null,!1,3607647275)},[t._v("\n\t\t\t\t"+t._s(s.t("settings","Create group"))+"\n\t\t\t")]),t._v(" "),e(s.NcActionInput,{attrs:{label:s.t("settings","Group name"),"data-cy-users-settings-new-group-name":"","label-outside":!1,disabled:s.loadingAddGroup,value:s.newGroupName,error:s.hasAddGroupError,"helper-text":s.hasAddGroupError?s.t("settings","Please enter a valid group name"):""},on:{"update:value":function(t){s.newGroupName=t},submit:s.createGroup}})]},proxy:!0}:null],null,!0)}),t._v(" "),e(s.NcAppNavigationSearch,{attrs:{label:s.t("settings","Search groups…")},model:{value:s.groupsSearchQuery,callback:function(t){s.groupsSearchQuery=t},expression:"groupsSearchQuery"}}),t._v(" "),e("p",{staticClass:"hidden-visually",attrs:{id:"group-list-desc"}},[t._v("\n\t\t"+t._s(s.t("settings","List of groups. This list is not fully populated for performance reasons. The groups will be loaded as you navigate or search through the list."))+"\n\t")]),t._v(" "),e(s.NcAppNavigationList,{staticClass:"account-management__group-list",attrs:{"aria-describedby":"group-list-desc","data-cy-users-settings-navigation-groups":"custom"}},[t._l(s.filteredGroups,(function(t){return e(s.GroupListItem,{key:t.id,ref:"groupListItems",refInFor:!0,attrs:{id:t.id,active:s.selectedGroupDecoded===t.id,name:t.title,count:t.count}})})),t._v(" "),s.loadingGroups?e("div",{attrs:{role:"note"}},[e(s.NcLoadingIcon,{attrs:{name:s.t("settings","Loading groups…")}})],1):t._e()],2)],1)}),[],!1,null,null,null).exports,gt=(0,n.pM)({__name:"UserManagementNavigation",setup(t){const e=(0,j.lq)(),s=(0,lt.P)(),i=(0,n.KR)(!1),h=(0,n.EW)((()=>e.params?.selectedGroup)),A=(0,n.EW)((()=>h.value?decodeURIComponent(h.value):null)),m=(0,n.EW)((()=>s.getters.getUserCount)),f=(0,n.EW)((()=>s.getters.getSortedGroups)),{adminGroup:v,recentGroup:C,disabledGroup:w}=ot(f),b=(0,n.EW)((()=>s.getters.getServerData)),_=(0,n.EW)((()=>b.value.isAdmin||b.value.isDelegatedAdmin));return{__sfc:!0,route:e,store:s,isDialogOpen:i,selectedGroup:h,selectedGroupDecoded:A,userCount:m,groups:f,adminGroup:v,recentGroup:C,disabledGroup:w,settings:b,isAdminOrDelegatedAdmin:_,showNewUserMenu:function(){s.commit("setShowConfig",{key:"showNewUserForm",value:!0})},mdiAccount:a.Gbn,mdiAccountOff:a.lBC,mdiCog:a.CZ3,mdiPlus:a.biz,mdiShieldAccount:a.Jey,mdiHistory:a.LP2,t:r.Tl,NcAppNavigation:o.A,NcAppNavigationItem:l.A,NcAppNavigationList:d.A,NcAppNavigationNew:c.N,NcButton:u.A,NcCounterBubble:g.A,NcIconSvgWrapper:p.A,UserSettingsDialog:M,AppNavigationGroupList:ut}}});var pt=i(58688),ht={};ht.styleTagTransform=P(),ht.setAttributes=E(),ht.insert=L().bind(null,"head"),ht.domAPI=U(),ht.insertStyleElement=T(),k()(pt.A,ht),pt.A&&pt.A.locals&&pt.A.locals;var At=(0,F.A)(gt,(function(){var t=this,e=t._self._c,s=t._self._setupProxy;return e(s.NcAppNavigation,{staticClass:"account-management__navigation",attrs:{"aria-label":s.t("settings","Account management")},scopedSlots:t._u([{key:"footer",fn:function(){return[e(s.NcButton,{staticClass:"account-management__settings-toggle",attrs:{type:"tertiary"},on:{click:function(t){s.isDialogOpen=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiCog}})]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(s.t("settings","Account management settings"))+"\n\t\t")]),t._v(" "),e(s.UserSettingsDialog,{attrs:{open:s.isDialogOpen},on:{"update:open":function(t){s.isDialogOpen=t}}})]},proxy:!0}])},[e(s.NcAppNavigationNew,{attrs:{"button-id":"new-user-button",text:s.t("settings","New account")},on:{click:s.showNewUserMenu,keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:s.showNewUserMenu.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:s.showNewUserMenu.apply(null,arguments)}]},scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiPlus}})]},proxy:!0}])}),t._v(" "),e(s.NcAppNavigationList,{staticClass:"account-management__system-list",attrs:{"data-cy-users-settings-navigation-groups":"system"}},[e(s.NcAppNavigationItem,{attrs:{id:"everyone",exact:!0,name:s.t("settings","All accounts"),to:{name:"users"}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiAccount}})]},proxy:!0},{key:"counter",fn:function(){return[s.userCount?e(s.NcCounterBubble,{attrs:{type:s.selectedGroupDecoded?void 0:"highlighted"}},[t._v("\n\t\t\t\t\t"+t._s(s.userCount)+"\n\t\t\t\t")]):t._e()]},proxy:!0}])}),t._v(" "),s.settings.isAdmin?e(s.NcAppNavigationItem,{attrs:{id:"admin",exact:!0,name:s.t("settings","Admins"),to:{name:"group",params:{selectedGroup:"admin"}}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiShieldAccount}})]},proxy:!0},{key:"counter",fn:function(){return[s.adminGroup&&s.adminGroup.count>0?e(s.NcCounterBubble,{attrs:{type:"admin"===s.selectedGroupDecoded?"highlighted":void 0}},[t._v("\n\t\t\t\t\t"+t._s(s.adminGroup.count)+"\n\t\t\t\t")]):t._e()]},proxy:!0}],null,!1,2218088905)}):t._e(),t._v(" "),s.isAdminOrDelegatedAdmin?e(s.NcAppNavigationItem,{attrs:{id:"recent",exact:!0,name:s.t("settings","Recently active"),to:{name:"group",params:{selectedGroup:"__nc_internal_recent"}}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiHistory}})]},proxy:!0},{key:"counter",fn:function(){return[s.recentGroup?.usercount?e(s.NcCounterBubble,{attrs:{type:"__nc_internal_recent"===s.selectedGroupDecoded?"highlighted":void 0}},[t._v("\n\t\t\t\t\t"+t._s(s.recentGroup.usercount)+"\n\t\t\t\t")]):t._e()]},proxy:!0}],null,!1,2299424282)}):t._e(),t._v(" "),s.disabledGroup&&(s.disabledGroup.usercount>0||-1===s.disabledGroup.usercount)?e(s.NcAppNavigationItem,{attrs:{id:"disabled",exact:!0,name:s.t("settings","Disabled accounts"),to:{name:"group",params:{selectedGroup:"disabled"}}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(s.NcIconSvgWrapper,{attrs:{path:s.mdiAccountOff}})]},proxy:!0},s.disabledGroup.usercount>0?{key:"counter",fn:function(){return[e(s.NcCounterBubble,{attrs:{type:"disabled"===s.selectedGroupDecoded?"highlighted":void 0}},[t._v("\n\t\t\t\t\t"+t._s(s.disabledGroup.usercount)+"\n\t\t\t\t")])]},proxy:!0}:null],null,!0)}):t._e()],1),t._v(" "),e(s.AppNavigationGroupList)],1)}),[],!1,null,"539a4ad0",null);const mt=At.exports},27518(t){"use strict";t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},27514(t){"use strict";t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},79722(t){"use strict";t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},86886(t){"use strict";t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"}}]);
|
|
//# sourceMappingURL=settings-users-3239.js.map?v=2d28c9b1f1d679236b2d
|