(()=>{var e,n,r,o={70789(e,n,r){"use strict";var o={};r.r(o),r.d(o,{clearIconCache:()=>Jt,getIconUrl:()=>Kt});var s={};r.r(s),r.d(s,{VERSION:()=>oe,after:()=>Lr,all:()=>Xr,allKeys:()=>mn,any:()=>to,assign:()=>Ln,before:()=>Br,bind:()=>Ar,bindAll:()=>jr,chain:()=>vr,chunk:()=>Uo,clone:()=>Un,collect:()=>Kr,compact:()=>ko,compose:()=>Nr,constant:()=>Ze,contains:()=>eo,countBy:()=>go,create:()=>Rn,debounce:()=>Pr,default:()=>Fo,defaults:()=>Bn,defer:()=>Sr,delay:()=>kr,detect:()=>$r,difference:()=>To,drop:()=>jo,each:()=>Vr,escape:()=>sr,every:()=>Xr,extend:()=>Nn,extendOwn:()=>Ln,filter:()=>Gr,find:()=>$r,findIndex:()=>Mr,findKey:()=>Rr,findLastIndex:()=>Dr,findWhere:()=>Yr,first:()=>Co,flatten:()=>So,foldl:()=>Jr,foldr:()=>Qr,forEach:()=>Vr,functions:()=>En,get:()=>qn,groupBy:()=>ho,has:()=>Hn,head:()=>Co,identity:()=>$n,include:()=>eo,includes:()=>eo,indexBy:()=>mo,indexOf:()=>qr,initial:()=>_o,inject:()=>Jr,intersection:()=>No,invert:()=>Pn,invoke:()=>no,isArguments:()=>Je,isArray:()=>Ve,isArrayBuffer:()=>Ue,isBoolean:()=>Te,isDataView:()=>Ye,isDate:()=>Le,isElement:()=>Pe,isEmpty:()=>cn,isEqual:()=>hn,isError:()=>Ie,isFinite:()=>Qe,isFunction:()=>Fe,isMap:()=>Cn,isMatch:()=>un,isNaN:()=>Ge,isNull:()=>ke,isNumber:()=>Ne,isObject:()=>xe,isRegExp:()=>Be,isSet:()=>xn,isString:()=>Oe,isSymbol:()=>Re,isTypedArray:()=>on,isUndefined:()=>Se,isWeakMap:()=>jn,isWeakSet:()=>kn,iteratee:()=>Jn,keys:()=>ln,last:()=>xo,lastIndexOf:()=>Hr,map:()=>Kr,mapObject:()=>Gn,matcher:()=>Yn,matches:()=>Yn,max:()=>so,memoize:()=>xr,methods:()=>En,min:()=>ao,mixin:()=>Do,negate:()=>Or,noop:()=>Zn,now:()=>nr,object:()=>Io,omit:()=>Ao,once:()=>Ir,pairs:()=>Tn,partial:()=>br,partition:()=>vo,pick:()=>bo,pluck:()=>ro,property:()=>Vn,propertyOf:()=>Xn,random:()=>er,range:()=>Ro,reduce:()=>Jr,reduceRight:()=>Qr,reject:()=>Zr,rest:()=>jo,restArguments:()=>je,result:()=>hr,sample:()=>co,select:()=>Gr,shuffle:()=>uo,size:()=>yo,some:()=>to,sortBy:()=>fo,sortedIndex:()=>Fr,tail:()=>jo,take:()=>Co,tap:()=>Mn,template:()=>pr,templateSettings:()=>ir,throttle:()=>Tr,times:()=>tr,toArray:()=>lo,toPath:()=>Dn,transpose:()=>Lo,unescape:()=>ar,union:()=>Oo,uniq:()=>Eo,unique:()=>Eo,uniqueId:()=>gr,unzip:()=>Lo,values:()=>Sn,where:()=>oo,without:()=>Po,wrap:()=>Er,zip:()=>Bo});var a=r(85471),i=r(81222),l=r(63814),c=r(82490),u=r(74095),d=r(371),f=r(53334),p=r(46855),h=r(32073),m=r(16044),g=r(82182);const v={name:"LoginButton",components:{ArrowRight:r(71164).A,NcButton:u.A},props:{value:{type:String,default:(0,f.Tl)("core","Log in")},valueLoading:{type:String,default:(0,f.Tl)("core","Logging in …")},loading:{type:Boolean,required:!0},invertedColors:{type:Boolean,default:!1}}};var y=r(85072),w=r.n(y),b=r(97825),A=r.n(b),_=r(77659),C=r.n(_),j=r(55056),x=r.n(j),k=r(10540),S=r.n(k),T=r(41113),P=r.n(T),E=r(14430),O={};O.styleTagTransform=P(),O.setAttributes=x(),O.insert=C().bind(null,"head"),O.domAPI=A(),O.insertStyleElement=S(),w()(E.A,O),E.A&&E.A.locals&&E.A.locals;var N=r(14486);const L=(0,N.A)(v,function(){var t=this,e=t._self._c;return e("NcButton",{attrs:{variant:"primary",type:"submit",wide:!0,disabled:t.loading},on:{click:function(e){return t.$emit("click")}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("div",{staticClass:"submit-wrapper__icon icon-loading-small-dark"}):e("ArrowRight",{staticClass:"submit-wrapper__icon"})]},proxy:!0}])},[t._v("\n\t"+t._s(t.loading?t.valueLoading:t.value)+"\n\t")])},[],!1,null,"bbf83d00",null).exports,B={computed:{userNameInputLengthIs255(){return this.user.length>=255},userInputHelperText(){if(this.userNameInputLengthIs255)return t("core","Email length is at max (255)")}}},I={name:"LoginForm",components:{LoginButton:L,NcCheckboxRadioSwitch:h.A,NcPasswordField:m.A,NcTextField:g.A,NcNoteCard:d.A},mixins:[B],props:{username:{type:String,default:""},redirectUrl:{type:[Boolean,String],default:!1},errors:{type:Array,default:()=>[]},messages:{type:Array,default:()=>[]},throttleDelay:{type:Number,default:0},autoCompleteAllowed:{type:Boolean,default:!0},remembermeAllowed:{type:Boolean,default:!0},directLogin:{type:Boolean,default:!1},emailStates:{type:Array,default:()=>[]}},setup:()=>({t:f.Tl,headlineText:(0,f.Tl)("core","Log in to {productName}",{productName:OC.theme.name},void 0,{sanitize:!1,escape:!1}),loginTimeout:(0,i.C)("core","loginTimeout",300),requestToken:window.OC.requestToken,timezone:(new Intl.DateTimeFormat)?.resolvedOptions()?.timeZone,timezoneOffset:-(new Date).getTimezoneOffset()/60}),data:t=>({loading:!1,user:t.username,password:"",rememberme:["1"],visible:!1}),computed:{resetFormTimeout(){return this.loginTimeout<=0?()=>{}:(0,p.A)(this.handleResetForm,1e3*this.loginTimeout)},isError(){return this.invalidPassword||this.userDisabled||this.throttleDelay>5e3},errorLabel(){return this.invalidPassword?(0,f.Tl)("core","Wrong login or password."):this.userDisabled?(0,f.Tl)("core","This account is disabled"):this.throttleDelay>5e3?(0,f.Tl)("core","Too many incorrect login attempts. Please try again in 30 seconds."):void 0},apacheAuthFailed(){return-1!==this.errors.indexOf("apacheAuthFailed")},csrfCheckFailed(){return-1!==this.errors.indexOf("csrfCheckFailed")},internalException(){return-1!==this.errors.indexOf("internalexception")},invalidPassword(){return-1!==this.errors.indexOf("invalidpassword")},userDisabled(){return-1!==this.errors.indexOf("userdisabled")},loadingIcon:()=>(0,l.d0)("core","loading-dark.gif"),loginActionUrl:()=>(0,l.Jv)("login"),emailEnabled(){return this.emailStates.every(t=>"1"===t)},loginText(){return this.emailEnabled?(0,f.Tl)("core","Account name or email"):(0,f.Tl)("core","Account name")}},watch:{password(){this.resetFormTimeout()}},mounted(){""===this.username?this.$refs.user.$refs.inputField.$refs.input.focus():this.$refs.password.$refs.inputField.$refs.input.focus()},methods:{handleResetForm(){this.password=""},updateUsername(){this.$emit("update:username",this.user)},submit(t){this.visible=!1,this.loading?t.preventDefault():(this.loading=!0,this.$emit("submit"))}}};var R=r(44098),U={};U.styleTagTransform=P(),U.setAttributes=x(),U.insert=C().bind(null,"head"),U.domAPI=A(),U.insertStyleElement=S(),w()(R.A,U),R.A&&R.A.locals&&R.A.locals;const M=(0,N.A)(I,function(){var t=this,e=t._self._c;return e("form",{ref:"loginForm",staticClass:"login-form",attrs:{method:"post",name:"login",action:t.loginActionUrl},on:{submit:t.submit}},[e("fieldset",{staticClass:"login-form__fieldset",attrs:{"data-login-form":""}},[t.apacheAuthFailed?e("NcNoteCard",{attrs:{title:t.t("core","Server side authentication failed!"),type:"warning"}},[t._v("\n\t\t\t"+t._s(t.t("core","Please contact your administrator."))+"\n\t\t")]):t._e(),t._v(" "),t.csrfCheckFailed?e("NcNoteCard",{attrs:{heading:t.t("core","Session error"),type:"error"}},[t._v("\n\t\t\t"+t._s(t.t("core","It appears your session token has expired, please refresh the page and try again."))+"\n\t\t")]):t._e(),t._v(" "),t.messages.length>0?e("NcNoteCard",t._l(t.messages,function(n,r){return e("div",{key:r},[t._v("\n\t\t\t\t"+t._s(n)),e("br")])}),0):t._e(),t._v(" "),t.internalException?e("NcNoteCard",{class:t.t("core","An internal error occurred."),attrs:{type:"warning"}},[t._v("\n\t\t\t"+t._s(t.t("core","Please try again or contact your administrator."))+"\n\t\t")]):t._e(),t._v(" "),e("div",{staticClass:"hidden",attrs:{id:"message"}},[e("img",{staticClass:"float-spinner",attrs:{alt:"",src:t.loadingIcon}}),t._v(" "),e("span",{attrs:{id:"messageText"}}),t._v(" "),e("div",{staticStyle:{clear:"both"}})]),t._v(" "),e("h2",{staticClass:"login-form__headline",attrs:{"data-login-form-headline":""}},[t._v("\n\t\t\t"+t._s(t.headlineText)+"\n\t\t")]),t._v(" "),e("NcTextField",{ref:"user",class:{shake:t.invalidPassword},attrs:{id:"user",label:t.loginText,name:"user",maxlength:255,autocapitalize:"none",spellchecking:!1,autocomplete:t.autoCompleteAllowed?"username":"off",required:"",error:t.userNameInputLengthIs255,"helper-text":t.userInputHelperText,"data-login-form-input-user":""},on:{change:t.updateUsername},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),t._v(" "),e("NcPasswordField",{ref:"password",class:{shake:t.invalidPassword},attrs:{id:"password",name:"password",spellchecking:!1,autocapitalize:"none",autocomplete:t.autoCompleteAllowed?"current-password":"off",label:t.t("core","Password"),"helper-text":t.errorLabel,error:t.isError,visible:t.visible,"data-login-form-input-password":"",required:""},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}}),t._v(" "),t.remembermeAllowed?e("NcCheckboxRadioSwitch",{ref:"rememberme",attrs:{id:"rememberme",name:"rememberme",value:"1","data-login-form-input-rememberme":""},model:{value:t.rememberme,callback:function(e){t.rememberme=e},expression:"rememberme"}},[t._v("\n\t\t\t"+t._s(t.t("core","Remember me"))+"\n\t\t")]):t._e(),t._v(" "),e("LoginButton",{attrs:{"data-login-form-submit":"",loading:t.loading}}),t._v(" "),t.redirectUrl?e("input",{attrs:{type:"hidden",name:"redirect_url"},domProps:{value:t.redirectUrl}}):t._e(),t._v(" "),e("input",{attrs:{type:"hidden",name:"timezone"},domProps:{value:t.timezone}}),t._v(" "),e("input",{attrs:{type:"hidden",name:"timezone_offset"},domProps:{value:t.timezoneOffset}}),t._v(" "),e("input",{attrs:{type:"hidden",name:"requesttoken"},domProps:{value:t.requestToken}}),t._v(" "),t.directLogin?e("input",{attrs:{type:"hidden",name:"direct",value:"1"}}):t._e()],1)])},[],!1,null,"f91ba7fe",null).exports;class D extends Error{constructor({message:t,code:e,cause:n,name:r}){super(t,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=e}}const F=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const t=new Error("Cancelling existing WebAuthn API call for new one");t.name="AbortError",this.controller.abort(t)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}};function z(t){const e=new Uint8Array(t);let n="";for(const t of e)n+=String.fromCharCode(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function q(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=(4-e.length%4)%4,r=e.padEnd(e.length+n,"="),o=atob(r),s=new ArrayBuffer(o.length),a=new Uint8Array(s);for(let t=0;tt},Y=t=>t;function V(t){const{id:e}=t;return{...t,id:q(e),transports:t.transports}}const K=["cross-platform","platform"];function W(t){if(t&&!(K.indexOf(t)<0))return t}var J=r(42507),Q=r(36076);const G={name:"LockOpenIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Z=(0,N.A)(G,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon lock-open-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports;var X=r(21777),tt=r(35947);const et=null===(nt=(0,X.HW)())?(0,tt.YK)().setApp("core").build():(0,tt.YK)().setApp("core").setUid(nt.uid).build();var nt;(0,tt.YK)().setApp("unified-search").detectUser().build();var rt=r(44368);class ot extends Error{}const st=(0,a.pM)({name:"PasswordLessLoginForm",components:{LoginButton:L,InformationIcon:Q.A,LockOpenIcon:Z,NcEmptyContent:J.A,NcTextField:g.A},props:{username:{type:String,default:""},redirectUrl:{type:[Boolean,String],default:!1},autoCompleteAllowed:{type:Boolean,default:!0},isHttps:{type:Boolean,default:!1},isLocalhost:{type:Boolean,default:!1}},setup:()=>({supportsWebauthn:H()}),data(){return{user:this.username,loading:!1,validCredentials:!0}},methods:{async authenticate(){if(this.$refs.loginForm.checkValidity()){et.debug("passwordless login initiated");try{const t=await async function(t){const e=(0,l.Jv)("/login/webauthn/start"),{data:n}=await rt.Ay.post(e,{loginName:t});if(!n.allowCredentials||0===n.allowCredentials.length)throw et.error("No valid credentials returned for webauthn"),new ot;return await async function(t){!t.optionsJSON&&t.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),t={optionsJSON:t});const{optionsJSON:e,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=t;if(!H())throw new Error("WebAuthn is not supported in this browser");let o;0!==e.allowCredentials?.length&&(o=e.allowCredentials?.map(V));const s={...e,challenge:q(e.challenge),allowCredentials:o},a={};if(n){if(!await function(){if(!H())return Y(new Promise(t=>t(!1)));const t=globalThis.PublicKeyCredential;return Y(void 0===t?.isConditionalMediationAvailable?new Promise(t=>t(!1)):t.isConditionalMediationAvailable())}())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&r)throw Error('No with "webauthn" as the only or last value in its `autocomplete` attribute was detected');a.mediation="conditional",s.allowCredentials=[]}let i;a.publicKey=s,a.signal=F.createNewAbortSignal();try{i=await navigator.credentials.get(a)}catch(t){throw function({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if("AbortError"===t.name){if(e.signal instanceof AbortSignal)return new D({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if("NotAllowedError"===t.name)return new D({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if("SecurityError"===t.name){const e=globalThis.location.hostname;if("localhost"!==(r=e)&&!/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(r))return new D({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t});if(n.rpId!==e)return new D({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else if("UnknownError"===t.name)return new D({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}var r;return t}({error:t,options:a})}if(!i)throw new Error("Authentication was not completed");const{id:l,rawId:c,response:u,type:d}=i;let f;return u.userHandle&&(f=z(u.userHandle)),{id:l,rawId:z(c),response:{authenticatorData:z(u.authenticatorData),clientDataJSON:z(u.clientDataJSON),signature:z(u.signature),userHandle:f},type:d,clientExtensionResults:i.getClientExtensionResults(),authenticatorAttachment:W(i.authenticatorAttachment)}}({optionsJSON:n})}(this.user);await this.completeAuthentication(t)}catch(t){if(t instanceof ot)return void(this.validCredentials=!1);et.debug(t)}}},changeUsername(t){this.user=t,this.$emit("update:username",this.user)},completeAuthentication(t){let e=this.redirectUrl;return async function(t){const e=(0,l.Jv)("/login/webauthn/finish"),{data:n}=await rt.Ay.post(e,{data:JSON.stringify(t)});return n}(t).then(({defaultRedirectUrl:t})=>{et.debug("Logged in redirecting"),e?("/"!==e.charAt(0)&&(e="/"+e),window.location.href=(0,l.$_)()+e):window.location.href=t}).catch(t=>{et.debug("GOT AN ERROR WHILE SUBMITTING CHALLENGE!",{error:t})})},submit(){}}});var at=r(86524),it={};it.styleTagTransform=P(),it.setAttributes=x(),it.insert=C().bind(null,"head"),it.domAPI=A(),it.insertStyleElement=S(),w()(at.A,it),at.A&&at.A.locals&&at.A.locals;var lt=(0,N.A)(st,function(){var t=this,e=t._self._c;return t._self._setupProxy,(t.isHttps||t.isLocalhost)&&t.supportsWebauthn?e("form",{ref:"loginForm",staticClass:"password-less-login-form",attrs:{"aria-labelledby":"password-less-login-form-title",method:"post",name:"login"},on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}}},[e("h2",{attrs:{id:"password-less-login-form-title"}},[t._v("\n\t\t"+t._s(t.t("core","Log in with a device"))+"\n\t")]),t._v(" "),e("NcTextField",{attrs:{required:"","model-value":t.user,autocomplete:t.autoCompleteAllowed?"on":"off",error:!t.validCredentials,label:t.t("core","Login or email"),placeholder:t.t("core","Login or email"),"helper-text":t.validCredentials?"":t.t("core","Your account is not setup for passwordless login.")},on:{"update:value":t.changeUsername}}),t._v(" "),t.validCredentials?e("LoginButton",{attrs:{loading:t.loading},on:{click:t.authenticate}}):t._e()],1):t.isHttps||t.isLocalhost?e("NcEmptyContent",{attrs:{name:t.t("core","Browser not supported"),description:t.t("core","Passwordless authentication is not supported in your browser.")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("InformationIcon")]},proxy:!0}])}):e("NcEmptyContent",{attrs:{name:t.t("core","Your connection is not secure"),description:t.t("core","Passwordless authentication is only available over a secure connection.")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("LockOpenIcon")]},proxy:!0}])})},[],!1,null,"25758ef3",null);const ct=lt.exports,ut=(0,a.pM)({name:"ResetPassword",components:{LoginButton:L,NcButton:u.A,NcNoteCard:d.A,NcTextField:g.A},mixins:[B],props:{username:{type:String,required:!0},resetPasswordLink:{type:String,required:!0}},data(){return{error:!1,loading:!1,message:"",user:this.username}},watch:{username(t){this.user=t}},methods:{updateUsername(){this.$emit("update:username",this.user)},async submit(){this.loading=!0,this.error=!1,this.message="";const t=(0,l.Jv)("/lostpassword/email");try{const{data:e}=await rt.Ay.post(t,{user:this.user});if("success"!==e.status)throw new Error(`got status ${e.status}`);this.message="send-success"}catch(t){et.error("could not send reset email request",{error:t}),this.error=!0,this.message="send-error"}finally{this.loading=!1}}}});var dt=r(99322),ft={};ft.styleTagTransform=P(),ft.setAttributes=x(),ft.insert=C().bind(null,"head"),ft.domAPI=A(),ft.insertStyleElement=S(),w()(dt.A,ft),dt.A&&dt.A.locals&&dt.A.locals;var pt=(0,N.A)(ut,function(){var t=this,e=t._self._c;return t._self._setupProxy,e("form",{staticClass:"reset-password-form",on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}}},[e("h2",[t._v(t._s(t.t("core","Reset password")))]),t._v(" "),e("NcTextField",{attrs:{id:"user",name:"user",maxlength:255,autocapitalize:"off",label:t.t("core","Login or email"),error:t.userNameInputLengthIs255,"helper-text":t.userInputHelperText,required:""},on:{change:t.updateUsername},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}}),t._v(" "),e("LoginButton",{attrs:{loading:t.loading,value:t.t("core","Reset password")}}),t._v(" "),e("NcButton",{attrs:{variant:"tertiary",wide:""},on:{click:function(e){return t.$emit("abort")}}},[t._v("\n\t\t"+t._s(t.t("core","Back to login"))+"\n\t")]),t._v(" "),"send-success"===t.message?e("NcNoteCard",{attrs:{type:"success"}},[t._v("\n\t\t"+t._s(t.t("core","If this account exists, a password reset message has been sent to its email address. If you do not receive it, verify your email address and/or Login, check your spam/junk folders or ask your local administration for help."))+"\n\t")]):"send-error"===t.message?e("NcNoteCard",{attrs:{type:"error"}},[t._v("\n\t\t"+t._s(t.t("core","Couldn't send reset email. Please contact your administrator."))+"\n\t")]):"reset-error"===t.message?e("NcNoteCard",{attrs:{type:"error"}},[t._v("\n\t\t"+t._s(t.t("core","Password cannot be changed. Please contact your administrator."))+"\n\t")]):t._e()],1)},[],!1,null,"759a0fdd",null);const ht=pt.exports,mt={name:"UpdatePassword",components:{LoginButton:L},props:{username:{type:String,required:!0},resetPasswordTarget:{type:String,required:!0}},data(){return{error:!1,loading:!1,message:void 0,user:this.username,password:"",encrypted:!1,proceed:!1}},watch:{username(t){this.user=t}},methods:{async submit(){this.loading=!0,this.error=!1,this.message="";try{const{data:t}=await rt.Ay.post(this.resetPasswordTarget,{password:this.password,proceed:this.proceed});if(t&&"success"===t.status)this.message="send-success",this.$emit("update:username",this.user),this.$emit("done");else{if(!t||!t.encryption)throw t&&t.msg?new Error(t.msg):new Error;this.encrypted=!0}}catch(e){this.error=!0,this.message=e.message?e.message:t("core","Password cannot be changed. Please contact your administrator.")}finally{this.loading=!1}}}};var gt=r(81604),vt={};vt.styleTagTransform=P(),vt.setAttributes=x(),vt.insert=C().bind(null,"head"),vt.domAPI=A(),vt.insertStyleElement=S(),w()(gt.A,vt),gt.A&>.A.locals&>.A.locals;var yt=(0,N.A)(mt,function(){var t=this,e=t._self._c;return e("form",{on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}}},[e("fieldset",[e("p",[e("label",{staticClass:"infield",attrs:{for:"password"}},[t._v(t._s(t.t("core","New password")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{id:"password",type:"password",name:"password",autocomplete:"new-password",autocapitalize:"none",spellcheck:"false",required:"",placeholder:t.t("core","New password")},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),t._v(" "),t.encrypted?e("div",{staticClass:"update"},[e("p",[t._v("\n\t\t\t\t"+t._s(t.t("core","Your files are encrypted. There will be no way to get your data back after your password is reset. If you are not sure what to do, please contact your administrator before you continue. Do you really want to continue?"))+"\n\t\t\t")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.proceed,expression:"proceed"}],staticClass:"checkbox",attrs:{id:"encrypted-continue",type:"checkbox"},domProps:{checked:Array.isArray(t.proceed)?t._i(t.proceed,null)>-1:t.proceed},on:{change:function(e){var n=t.proceed,r=e.target,o=!!r.checked;if(Array.isArray(n)){var s=t._i(n,null);r.checked?s<0&&(t.proceed=n.concat([null])):s>-1&&(t.proceed=n.slice(0,s).concat(n.slice(s+1)))}else t.proceed=o}}}),t._v(" "),e("label",{attrs:{for:"encrypted-continue"}},[t._v("\n\t\t\t\t"+t._s(t.t("core","I know what I'm doing"))+"\n\t\t\t")])]):t._e(),t._v(" "),e("LoginButton",{attrs:{loading:t.loading,value:t.t("core","Reset password"),"value-loading":t.t("core","Resetting password")}}),t._v(" "),t.error&&t.message?e("p",{class:{warning:t.error}},[t._v("\n\t\t\t"+t._s(t.message)+"\n\t\t")]):t._e()],1)])},[],!1,null,"2c0ecaf9",null);const wt=yt.exports;const bt=c.A.parse(location.search);"1"===bt.clear&&async function(){try{window.localStorage.clear(),window.sessionStorage.clear();const t=await window.indexedDB.databases();for(const e of t)await window.indexedDB.deleteDatabase(e.name);et.debug("Browser storages cleared")}catch(t){et.error("Could not clear browser storages",{error:t})}}();const At={name:"Login",components:{LoginForm:M,PasswordLessLoginForm:ct,ResetPassword:ht,UpdatePassword:wt,NcButton:u.A,NcNoteCard:d.A},data:()=>({loading:!1,user:(0,i.C)("core","loginUsername",""),passwordlessLogin:!1,resetPassword:!1,errors:(0,i.C)("core","loginErrors",[]),messages:(0,i.C)("core","loginMessages",[]),redirectUrl:(0,i.C)("core","loginRedirectUrl",!1),throttleDelay:(0,i.C)("core","loginThrottleDelay",0),canResetPassword:(0,i.C)("core","loginCanResetPassword",!1),resetPasswordLink:(0,i.C)("core","loginResetPasswordLink",""),autoCompleteAllowed:(0,i.C)("core","loginAutocomplete",!0),remembermeAllowed:(0,i.C)("core","loginCanRememberme",!0),resetPasswordTarget:(0,i.C)("core","resetPasswordTarget",""),resetPasswordUser:(0,i.C)("core","resetPasswordUser",""),directLogin:"1"===bt.direct,hasPasswordless:(0,i.C)("core","webauthn-available",!1),countAlternativeLogins:(0,i.C)("core","countAlternativeLogins",!1),alternativeLogins:(0,i.C)("core","alternativeLogins",[]),isHttps:"https:"===window.location.protocol,isLocalhost:"localhost"===window.location.hostname,hideLoginForm:(0,i.C)("core","hideLoginForm",!1),emailStates:(0,i.C)("core","emailStates",[])}),methods:{passwordResetFinished(){window.location.href=(0,l.Jv)("login")+"?direct=1"}}};var _t=r(11999),Ct={};Ct.styleTagTransform=P(),Ct.setAttributes=x(),Ct.insert=C().bind(null,"head"),Ct.domAPI=A(),Ct.insertStyleElement=S(),w()(_t.A,Ct),_t.A&&_t.A.locals&&_t.A.locals;const jt=(0,N.A)(At,function(){var t=this,e=t._self._c;return e("div",{staticClass:"guest-box login-box"},[!t.hideLoginForm||t.directLogin?[e("transition",{attrs:{name:"fade",mode:"out-in"}},[t.passwordlessLogin||t.resetPassword||""!==t.resetPasswordTarget?!t.loading&&t.passwordlessLogin?e("div",{key:"reset-pw-less",staticClass:"login-additional login-box__wrapper"},[e("PasswordLessLoginForm",{attrs:{username:t.user,"redirect-url":t.redirectUrl,"auto-complete-allowed":t.autoCompleteAllowed,"is-https":t.isHttps,"is-localhost":t.isLocalhost},on:{"update:username":function(e){t.user=e},submit:function(e){t.loading=!0}}}),t._v(" "),e("NcButton",{attrs:{variant:"tertiary","aria-label":t.t("core","Back to login form"),wide:!0},on:{click:function(e){t.passwordlessLogin=!1}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Back"))+"\n\t\t\t\t")])],1):!t.loading&&t.canResetPassword?e("div",{key:"reset-can-reset",staticClass:"login-additional"},[e("div",{staticClass:"lost-password-container"},[t.resetPassword?e("ResetPassword",{attrs:{username:t.user,"reset-password-link":t.resetPasswordLink},on:{"update:username":function(e){t.user=e},abort:function(e){t.resetPassword=!1}}}):t._e()],1)]):""!==t.resetPasswordTarget?e("div",[e("UpdatePassword",{attrs:{username:t.user,"reset-password-target":t.resetPasswordTarget},on:{"update:username":function(e){t.user=e},done:t.passwordResetFinished}})],1):t._e():e("div",{staticClass:"login-box__wrapper"},[e("LoginForm",{attrs:{username:t.user,"redirect-url":t.redirectUrl,"direct-login":t.directLogin,messages:t.messages,errors:t.errors,"throttle-delay":t.throttleDelay,"auto-complete-allowed":t.autoCompleteAllowed,"rememberme-allowed":t.remembermeAllowed,"email-states":t.emailStates},on:{"update:username":function(e){t.user=e},submit:function(e){t.loading=!0}}}),t._v(" "),t.hasPasswordless?e("NcButton",{attrs:{variant:"tertiary",wide:""},on:{click:function(e){e.preventDefault(),t.passwordlessLogin=!0}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Log in with a device"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.canResetPassword&&""!==t.resetPasswordLink?e("NcButton",{attrs:{id:"lost-password",href:t.resetPasswordLink,variant:"tertiary-no-background",wide:""}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Forgot password?"))+"\n\t\t\t\t")]):t.canResetPassword&&!t.resetPassword?e("NcButton",{attrs:{id:"lost-password",variant:"tertiary",wide:""},on:{click:function(e){e.preventDefault(),t.resetPassword=!0}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Forgot password?"))+"\n\t\t\t\t")]):t._e()],1)])]:[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("NcNoteCard",{attrs:{type:"info",title:t.t("core","Login form is disabled.")}},[t._v("\n\t\t\t\t"+t._s(t.t("core","The Nextcloud login form is disabled. Use another login option if available or contact your administration."))+"\n\t\t\t")])],1)],t._v(" "),e("div",{staticClass:"login-box__alternative-logins",attrs:{id:"alternative-logins"}},t._l(t.alternativeLogins,function(n,r){return e("NcButton",{key:r,class:[n.class],attrs:{variant:"secondary",wide:!0,role:"link",href:n.href}},[t._v("\n\t\t\t"+t._s(n.name)+"\n\t\t")])}),1)],2)},[],!1,null,"518c0816",null).exports;var xt=r(61338),kt=r(71225);const St=!!window._oc_isadmin,Tt=window.oc_appconfig||{},Pt=void 0!==window._oc_appswebroots&&window._oc_appswebroots;var Et=r(87485);const Ot=window._oc_config||{},Nt=document.getElementsByTagName("head")[0].getAttribute("data-user"),Lt=document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),Bt=void 0!==Nt&&Nt,It=window._oc_debug;var Rt=r(21363),Ut=r(85168),Mt=r(98469),Dt=r(43627);const Ft={YES_NO_BUTTONS:70,OK_BUTTONS:71,FILEPICKER_TYPE_CHOOSE:1,FILEPICKER_TYPE_MOVE:2,FILEPICKER_TYPE_COPY:3,FILEPICKER_TYPE_COPY_MOVE:4,FILEPICKER_TYPE_CUSTOM:5,alert:function(t,e,n,r){this.message(t,e,"alert",Ft.OK_BUTTON,n,r)},info:function(t,e,n,r){this.message(t,e,"info",Ft.OK_BUTTON,n,r)},confirm:function(t,e,n,r){return this.message(t,e,"notice",Ft.YES_NO_BUTTONS,n,r)},confirmDestructive:function(t,e,n=Ft.OK_BUTTONS,r=()=>{}){return(new Ut.ik).setName(e).setText(t).setButtons(n===Ft.OK_BUTTONS?[{label:(0,f.t)("core","Yes"),variant:"error",callback:()=>{r.clicked=!0,r(!0)}}]:Ft._getLegacyButtons(n,r)).build().show().then(()=>{r.clicked||r(!1)})},confirmHtml:function(t,e,n){return(new Ut.ik).setName(e).setText("").setButtons([{label:(0,f.t)("core","No"),callback:()=>{}},{label:(0,f.t)("core","Yes"),variant:"primary",callback:()=>{n.clicked=!0,n(!0)}}]).build().setHTML(t).show().then(()=>{n.clicked||n(!1)})},prompt:function(t,e,n,o,s,i){return new Promise(o=>{(0,Mt.S)((0,a.$V)(()=>Promise.all([r.e(4208),r.e(9553)]).then(r.bind(r,99553))),{text:t,name:e,callback:n,inputName:s,isPassword:!!i},(...t)=>{n(...t),o()})})},filepicker(t,e,n=!1,r=void 0,o=void 0,s=Ut.bh.Choose,a=void 0,i=void 0){const l=(t,e)=>{const r=t=>{const e=t?.root||"";let n=t?.path||"";return n.startsWith(e)&&(n=n.slice(e.length)||"/"),n};return n?n=>t(n.map(r),e):n=>t(r(n[0]),e)},c=(0,Ut.a1)(t);s===this.FILEPICKER_TYPE_CUSTOM?(i.buttons||[]).forEach(t=>{c.addButton({callback:l(e,t.type),label:t.text,variant:t.defaultButton?"primary":"secondary"})}):c.setButtonFactory((t,n)=>{const r=[],[o]=t,a=o?.displayname||o?.basename||(0,Dt.basename)(n);return s===Ut.bh.Choose&&r.push({callback:l(e,Ut.bh.Choose),label:o&&!this.multiSelect?(0,f.t)("core","Choose {file}",{file:a}):(0,f.t)("core","Choose"),variant:"primary"}),s!==Ut.bh.CopyMove&&s!==Ut.bh.Copy||r.push({callback:l(e,Ut.bh.Copy),label:a?(0,f.t)("core","Copy to {target}",{target:a}):(0,f.t)("core","Copy"),variant:"primary",icon:Rt}),s!==Ut.bh.Move&&s!==Ut.bh.CopyMove||r.push({callback:l(e,Ut.bh.Move),label:a?(0,f.t)("core","Move to {target}",{target:a}):(0,f.t)("core","Move"),variant:s===Ut.bh.Move?"primary":"secondary",icon:''}),r}),r&&c.setMimeTypeFilter("string"==typeof r?[r]:r||[]),"function"==typeof i?.filter&&c.setFilter(t=>i.filter((t=>({id:t.fileid||null,path:t.path,mimetype:t.mime||null,mtime:t.mtime?.getTime()||null,permissions:t.permissions,name:t.attributes?.displayName||t.basename,etag:t.attributes?.etag||null,hasPreview:t.attributes?.hasPreview||null,mountType:t.attributes?.mountType||null,quotaAvailableBytes:t.attributes?.quotaAvailableBytes||null,icon:null,sharePermissions:null}))(t))),c.allowDirectories(!0===i?.allowDirectoryChooser||r?.includes("httpd/unix-directory")||!1).setMultiSelect(n).startAt(a).build().pick()},message:function(t,e,n,r,o=()=>{},s,a){const i=(new Ut.ik).setName(e).setText(a?"":t).setButtons(Ft._getLegacyButtons(r,o));switch(n){case"alert":i.setSeverity("warning");break;case"notice":i.setSeverity("info")}const l=i.build();return a&&l.setHTML(t),l.show().then(()=>{o._clicked||o(!1)})},_getLegacyButtons(t,e){const n=[];switch("object"==typeof t?t.type:t){case Ft.YES_NO_BUTTONS:n.push({label:t?.cancel??(0,f.t)("core","No"),callback:()=>{e._clicked=!0,e(!1)}}),n.push({label:t?.confirm??(0,f.t)("core","Yes"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;case Ft.OK_BUTTONS:n.push({label:t?.confirm??(0,f.t)("core","OK"),variant:"primary",callback:()=>{e._clicked=!0,e(!0)}});break;default:et.error("Invalid call to OC.dialogs")}return n}},zt=Ft;function qt(){return document.head.dataset.requesttoken}function Ht(t,e){let n,r,o="";if(this.typelessListeners=[],this.closed=!1,e)for(n in e)o+=n+"="+encodeURIComponent(e[n])+"&";o+="requesttoken="+encodeURIComponent(qt()),r="&",-1===t.indexOf("?")&&(r="?"),this.source=new EventSource(t+r+o),this.source.onmessage=function(t){for(let e=0;et.cancel()),n.style.display="block")},finishedSaving(t,e){this.finishedAction(t,e)},finishedAction(t,e){"success"===e.status?this.finishedSuccess(t,e.data.message):this.finishedError(t,e.data.message)},finishedSuccess(t,e){const n=document.querySelector(t);n&&n instanceof HTMLElement&&(n.textContent=e,n.classList.remove("error"),n.classList.add("success"),n.getAnimations?.().forEach(t=>t.cancel()),window.setTimeout(function(){if(!(n&&n instanceof HTMLElement))return;const t=n.animate?.([{opacity:1},{opacity:0}],{duration:900,fill:"forwards"});t?t.addEventListener("finish",()=>{n.style.display="none"}):window.setTimeout(()=>{n.style.display="none"},900)},3e3),n.style.display="block")},finishedError(t,e){const n=document.querySelector(t);n&&n instanceof HTMLElement&&(n.textContent=e,n.classList.remove("success"),n.classList.add("error"),n.style.display="block")}};var Gt=r(34300);const Zt={requiresPasswordConfirmation:()=>(0,Gt.oB)(),requirePasswordConfirmation(t,e,n){(0,Gt.C5)().then(t,n)}},Xt={_plugins:{},register(t,e){let n=this._plugins[t];n||(n=this._plugins[t]=[]),n.push(e)},getPlugins(t){return this._plugins[t]||[]},attach(t,e,n){const r=this.getPlugins(t);for(let t=0;t=0&&n<=Ce}}function tn(t){return function(e){return null==e?void 0:e[t]}}const en=tn("byteLength"),nn=Xe(en);var rn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const on=pe?function(t){return ye?ye(t)&&!Ye(t):nn(t)&&rn.test(de.call(t))}:Ze(!1),sn=tn("length");function an(t,e){e=function(t){for(var e={},n=t.length,r=0;r=0))if(r.push(t),o.push(e),n.push(!0),l){if((d=t.length)!==e.length)return!1;for(;d--;)n.push({a:t[d],b:e[d]})}else{var f,p=ln(t);if(d=p.length,ln(e).length!==d)return!1;for(;d--;){if(!Ke(e,f=p[d]))return!1;n.push({a:t[f],b:e[f]})}}}else r.pop(),o.pop()}return!0}function mn(t){if(!xe(t))return[];var e=[];for(var n in t)e.push(n);return Ae&&an(t,e),e}function gn(t){var e=sn(t);return function(n){if(null==n)return!1;var r=mn(n);if(sn(r))return!1;for(var o=0;o":">",'"':""","'":"'","`":"`"},sr=rr(or),ar=rr(Pn(or)),ir=dn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var lr=/(.)^/,cr={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ur=/\\|'|\r|\n|\u2028|\u2029/g;function dr(t){return"\\"+cr[t]}var fr=/^\s*(\w|\$)+\s*$/;function pr(t,e,n){!e&&n&&(e=n),e=Bn({},e,dn.templateSettings);var r=RegExp([(e.escape||lr).source,(e.interpolate||lr).source,(e.evaluate||lr).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(r,function(e,n,r,a,i){return s+=t.slice(o,i).replace(ur,dr),o=i+e.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(s+="';\n"+a+"\n__p+='"),e}),s+="';\n";var a,i=e.variable;if(i){if(!fr.test(i))throw new Error("variable is not a bare identifier: "+i)}else s="with(obj||{}){\n"+s+"}\n",i="obj";s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{a=new Function(i,"_",s)}catch(t){throw t.source=s,t}var l=function(t){return a.call(this,t,dn)};return l.source="function("+i+"){\n"+s+"}",l}function hr(t,e,n){var r=(e=Fn(e)).length;if(!r)return Fe(n)?n.call(t):n;for(var o=0;o=a){if(!i.length)break;var l=i.pop();s=l.i,t=l.v,a=sn(t)}else{var c=t[s++];i.length>=e?r[o++]=c:_r(c)&&(Ve(c)||Je(c))?(i.push({i:s,v:t}),s=0,a=sn(t=c)):n||(r[o++]=c)}return r}const jr=je(function(t,e){var n=(e=Cr(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=Ar(t[r],t)}return t});function xr(t,e){var n=function(r){var o=n.cache,s=""+(e?e.apply(this,arguments):r);return Ke(o,s)||(o[s]=t.apply(this,arguments)),o[s]};return n.cache={},n}const kr=je(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),Sr=br(kr,dn,1);function Tr(t,e,n){var r,o,s,a,i=0;n||(n={});var l=function(){i=!1===n.leading?0:nr(),r=null,a=t.apply(o,s),r||(o=s=null)},c=function(){var c=nr();i||!1!==n.leading||(i=c);var u=e-(c-i);return o=this,s=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),i=c,a=t.apply(o,s),r||(o=s=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),i=0,r=o=s=null},c}function Pr(t,e,n){var r,o,s,a,i,l=function(){var c=nr()-o;e>c?r=setTimeout(l,e-c):(r=null,n||(a=t.apply(i,s)),r||(s=i=null))},c=je(function(c){return i=this,s=c,o=nr(),r||(r=setTimeout(l,e),n&&(a=t.apply(i,s))),a});return c.cancel=function(){clearTimeout(r),r=s=i=null},c}function Er(t,e){return br(e,t)}function Or(t){return function(){return!t.apply(this,arguments)}}function Nr(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function Lr(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Br(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const Ir=br(Br,2);function Rr(t,e,n){e=Qn(e,n);for(var r,o=ln(t),s=0,a=o.length;s0?0:o-1;s>=0&&s0?a=s>=0?s:Math.max(s+i,a):i=s>=0?Math.min(s+1,i):s+i+1;else if(n&&s&&i)return r[s=n(r,o)]===o?s:-1;if(o!=o)return(s=e(ue.call(r,a,i),Ge))>=0?s+a:-1;for(s=t>0?a:i-1;s>=0&&s=3;return function(e,n,r,o){var s=!_r(e)&&ln(e),a=(s||e).length,i=t>0?0:a-1;for(o||(r=e[s?s[i]:i],i+=t);i>=0&&i=0}const no=je(function(t,e,n){var r,o;return Fe(e)?o=e:(e=Fn(e),r=e.slice(0,-1),e=e[e.length-1]),Kr(t,function(t){var s=o;if(!s){if(r&&r.length&&(t=zn(t,r)),null==t)return;s=t[e]}return null==s?s:s.apply(t,n)})});function ro(t,e){return Kr(t,Vn(e))}function oo(t,e){return Gr(t,Yn(e))}function so(t,e,n){var r,o,s=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var i=0,l=(t=_r(t)?t:Sn(t)).length;is&&(s=r);else e=Qn(e,n),Vr(t,function(t,n,r){((o=e(t,n,r))>a||o===-1/0&&s===-1/0)&&(s=t,a=o)});return s}function ao(t,e,n){var r,o,s=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var i=0,l=(t=_r(t)?t:Sn(t)).length;ir||void 0===n)return 1;if(n1&&(r=Kn(r,e[1])),e=mn(t)):(r=wo,e=Cr(e,!1,!1),t=Object(t));for(var o=0,s=e.length;o1&&(n=e[1])):(e=Kr(Cr(e,!1,!1),String),r=function(t,n){return!eo(e,n)}),bo(t,r,n)});function _o(t,e,n){return ue.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function Co(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:_o(t,t.length-e)}function jo(t,e,n){return ue.call(t,null==e||n?1:e)}function xo(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:jo(t,Math.max(0,t.length-e))}function ko(t){return Gr(t,Boolean)}function So(t,e){return Cr(t,e,!1)}const To=je(function(t,e){return e=Cr(e,!0,!0),Gr(t,function(t){return!eo(e,t)})}),Po=je(function(t,e){return To(t,e)});function Eo(t,e,n,r){Te(e)||(r=n,n=e,e=!1),null!=n&&(n=Qn(n,r));for(var o=[],s=[],a=0,i=sn(t);a-1&&parseInt(navigator.userAgent.split("/").pop())<51){const t=document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]');for(let e,n=0,r=t.length;n=0?t.substr(e+1):t.length?t.substr(1):""},_decodeQuery:t=>t.replace(/\+/g," "),parseUrlQuery(){const t=this._parseHashQuery();let e;return t&&(e=Wo.parseQueryString(this._decodeQuery(t))),e=qo.extend(e||{},Wo.parseQueryString(this._decodeQuery(location.search))),e||{}},_onPopState(t){if(this._cancelPop)return void(this._cancelPop=!1);let e;if(this._handlers.length){e=t&&t.state,qo.isString(e)?e=Wo.parseQueryString(e):e||(e=this.parseUrlQuery()||{});for(let t=0;t="0"&&n<="9";a!==s&&(o++,e[o]="",s=a),e[o]+=n,r++}return e}const Yo={History:Ho,humanFileSize:ee.v7,computerFileSize(t){if("string"!=typeof t)return null;const e=t.toLowerCase().trim();let n;const r=e.match(/^[\s+]?([0-9]*)(\.([0-9]+))?( +)?([kmgtp]?b?)$/i);return null===r?null:(n=parseFloat(e),isFinite(n)?(r[5]&&(n*={b:1,k:1024,kb:1024,mb:1048576,m:1048576,gb:1073741824,g:1073741824,tb:1099511627776,t:1099511627776,pb:0x4000000000000,p:0x4000000000000}[r[5]]),n=Math.round(n),n):null)},formatDate:(t,e)=>(void 0===window.TESTING&&Wo.debug&&et.warn("OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment"),e=e||"LLL",re()(t).format(e)),relativeModifiedDate(e){void 0===window.TESTING&&Wo.debug&&et.warn("OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment");const n=re()().diff(re()(e));return n>=0&&n<45e3?t("core","seconds ago"):re()(e).fromNow()},getScrollBarWidth(){if(this._scrollBarWidth)return this._scrollBarWidth;const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);const n=t.offsetWidth;e.style.overflow="scroll";let r=t.offsetWidth;return n===r&&(r=e.clientWidth),document.body.removeChild(e),this._scrollBarWidth=n-r,this._scrollBarWidth},stripTime:t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),naturalSortCompare(t,e){let n;const r=$o(t),o=$o(e);for(n=0;r[n]&&o[n];n++)if(r[n]!==o[n]){const t=Number(r[n]),e=Number(o[n]);return t==r[n]&&e==o[n]?t-e:r[n].localeCompare(o[n],Wo.getLanguage())}return r.length-o.length},waitFor(t,e){const n=function(){!0!==t()&&setTimeout(n,e)};n()},isCookieSetToValue(t,e){const n=document.cookie.split(";");for(let r=0;r!$_",appConfig:Tt,appswebroots:Pt,config:Ot,currentUser:Bt,dialogs:zt,EventSource:$t,MimeType:o,getCurrentUser:function(){return{uid:Bt,displayName:Lt}},isUserAdmin:()=>St,L10N:Yt,registerXHRForErrorProcessing:()=>{},getCapabilities:function(){return OC.debug&&et.warn("OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities"),(0,Et.F)()},basename:kt.P8,encodePath:kt.O0,dirname:kt.pD,isSamePath:kt.ys,joinPaths:kt.fj,getCanonicalLocale:f.lO,getLocale:f.JK,getLanguage:f.Z0,buildQueryString:function(t){return t?new URLSearchParams(t).toString():""},parseQueryString:function(t){const e=new URLSearchParams(t);return Object.fromEntries(e.entries())},msg:Qt,PasswordConfirmation:Zt,Plugins:Xt,theme:te,Util:Yo,debug:It,filePath:l.fg,generateUrl:l.Jv,getRootPath:l.aU,imagePath:l.d0,requestToken:qt(),linkTo:l.uM,linkToOCS:(t,e)=>(0,l.KT)(t,{},{ocsVersion:e||1})+"/",linkToRemote:l.dC,linkToRemoteBase:function(t){return(0,l.aU)()+"/remote.php/"+t},webroot:Ko};(0,xt.B1)("csrf-token-update",t=>{OC.requestToken=t.token,et.info("OC.requestToken changed",{token:t.token})});const Jo={data:()=>({OC:Wo}),methods:{t:Yt.translate.bind(Yt),n:Yt.translatePlural.bind(Yt)}};a.Ay.mixin(Jo),(new(a.Ay.extend(jt))).$mount("#login")},14430(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(71354),o=n.n(r),s=n(76314),a=n.n(s)()(o());a.push([t.id,".button-vue[data-v-bbf83d00]{margin-top:.5rem}","",{version:3,sources:["webpack://./core/src/components/login/LoginButton.vue"],names:[],mappings:"AACA,6BACC,gBAAA",sourcesContent:["\n.button-vue {\n\tmargin-top: .5rem;\n}\n"],sourceRoot:""}]);const i=a},44098(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(71354),o=n.n(r),s=n(76314),a=n.n(s)()(o());a.push([t.id,".login-form[data-v-f91ba7fe]{text-align:start;font-size:1rem;margin:0}.login-form__fieldset[data-v-f91ba7fe]{width:100%;display:flex;flex-direction:column;gap:.5rem}.login-form__headline[data-v-f91ba7fe]{text-align:center;overflow-wrap:anywhere}.login-form[data-v-f91ba7fe] input:invalid:not(:user-invalid){border-color:var(--color-border-maxcontrast) !important}","",{version:3,sources:["webpack://./core/src/components/login/LoginForm.vue"],names:[],mappings:"AACA,6BACC,gBAAA,CACA,cAAA,CACA,QAAA,CAEA,uCACC,UAAA,CACA,YAAA,CACA,qBAAA,CACA,SAAA,CAGD,uCACC,iBAAA,CACA,sBAAA,CAID,8DACC,uDAAA",sourcesContent:["\n.login-form {\n\ttext-align: start;\n\tfont-size: 1rem;\n\tmargin: 0;\n\n\t&__fieldset {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: .5rem;\n\t}\n\n\t&__headline {\n\t\ttext-align: center;\n\t\toverflow-wrap: anywhere;\n\t}\n\n\t// Only show the error state if the user interacted with the login box\n\t:deep(input:invalid:not(:user-invalid)) {\n\t\tborder-color: var(--color-border-maxcontrast) !important;\n\t}\n}\n"],sourceRoot:""}]);const i=a},86524(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(71354),o=n.n(r),s=n(76314),a=n.n(s)()(o());a.push([t.id,".password-less-login-form[data-v-25758ef3]{display:flex;flex-direction:column;gap:.5rem;margin:0}","",{version:3,sources:["webpack://./core/src/components/login/PasswordLessLoginForm.vue"],names:[],mappings:"AACA,2CACC,YAAA,CACA,qBAAA,CACA,SAAA,CACA,QAAA",sourcesContent:["\n.password-less-login-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 0.5rem;\n\tmargin: 0;\n}\n"],sourceRoot:""}]);const i=a},99322(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(71354),o=n.n(r),s=n(76314),a=n.n(s)()(o());a.push([t.id,".reset-password-form[data-v-759a0fdd]{display:flex;flex-direction:column;gap:.5rem;width:100%}","",{version:3,sources:["webpack://./core/src/components/login/ResetPassword.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,qBAAA,CACA,SAAA,CACA,UAAA",sourcesContent:["\n.reset-password-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: .5rem;\n\twidth: 100%;\n}\n"],sourceRoot:""}]);const i=a},11999(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(71354),o=n.n(r),s=n(76314),a=n.n(s)()(o());a.push([t.id,".login-box[data-v-518c0816]{width:320px;box-sizing:border-box}.login-box__wrapper[data-v-518c0816]{display:flex;flex-direction:column;gap:calc(2*var(--default-grid-baseline))}.login-box__alternative-logins[data-v-518c0816]{display:flex;flex-direction:column;gap:.75rem}.fade-enter-active[data-v-518c0816],.fade-leave-active[data-v-518c0816]{transition:opacity .3s}.fade-enter[data-v-518c0816],.fade-leave-to[data-v-518c0816]{opacity:0}","",{version:3,sources:["webpack://./core/src/views/Login.vue"],names:[],mappings:"AACA,4BAEC,WAAA,CACA,qBAAA,CAEA,qCACC,YAAA,CACA,qBAAA,CACA,wCAAA,CAGD,gDACC,YAAA,CACA,qBAAA,CACA,UAAA,CAIF,wEACC,sBAAA,CAGD,6DACC,SAAA",sourcesContent:["\n.login-box {\n\t// Same size as dashboard panels\n\twidth: 320px;\n\tbox-sizing: border-box;\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t&__alternative-logins {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 0.75rem;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s;\n}\n\n.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {\n\topacity: 0;\n}\n"],sourceRoot:""}]);const i=a},81604(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(71354),o=n.n(r),s=n(76314),a=n.n(s)()(o());a.push([t.id,"\nfieldset[data-v-2c0ecaf9] {\n\ttext-align: center;\n}\ninput[type=submit][data-v-2c0ecaf9] {\n\tmargin-top: 20px;\n}\n","",{version:3,sources:["webpack://./core/src/components/login/UpdatePassword.vue"],names:[],mappings:";AAmIA;CACA,kBAAA;AACA;AAEA;CACA,gBAAA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n\n\n