"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[6127],{36127:(e,t,a)=>{a.r(t),a.d(t,{default:()=>k});var n=a(85471),i=a(32981),s=a(53334),l=a(94219),r=a(3226),o=a(82182),u=a(35810);const c=(0,n.pM)({name:"PublicAuthPrompt",components:{NcDialog:l.A,NcNoteCard:r.A,NcTextField:o.A},props:{nickname:{type:String,default:""}},setup:()=>({t:s.t,owner:(0,i.C)("files_sharing","owner",""),ownerDisplayName:(0,i.C)("files_sharing","ownerDisplayName",""),label:(0,i.C)("files_sharing","label",""),note:(0,i.C)("files_sharing","note",""),filename:(0,i.C)("files_sharing","filename","")}),data:()=>({name:""}),computed:{dialogName(){return this.t("files_sharing","Upload files to {folder}",{folder:this.label||this.filename})},dialogButtons:()=>[{label:(0,s.t)("files_sharing","Submit name"),type:"primary",nativeType:"submit"}]},watch:{nickname:{handler(){this.name=this.nickname},immediate:!0},name(){const e=this.name.trim?.()||"",t=this.$refs.input?.$el.querySelector("input");if(!t)return;const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(""===e.trim())return(0,s.t)("files","Filename must not be empty.");if(e.startsWith("."))return(0,s.t)("files","Names must not start with a dot.");try{return(0,u.KT)(e),""}catch(e){if(!(e instanceof u.di))throw e;switch(e.reason){case u.nF.Character:return(0,s.t)("files",'"{char}" is not allowed inside a name.',{char:e.segment},void 0,{escape:t});case u.nF.ReservedName:return(0,s.t)("files",'"{segment}" is a reserved name and not allowed.',{segment:e.segment},void 0,{escape:!1});case u.nF.Extension:return e.segment.match(/\.[a-z]/i)?(0,s.t)("files",'"{extension}" is not an allowed name.',{extension:e.segment},void 0,{escape:!1}):(0,s.t)("files",'Names must not end with "{extension}".',{extension:e.segment},void 0,{escape:!1});default:return(0,s.t)("files","Invalid name.")}}}(e);t.setCustomValidity(a),t.reportValidity()}}});var m=a(85072),d=a.n(m),p=a(97825),f=a.n(p),h=a(77659),b=a.n(h),g=a(55056),_=a.n(g),A=a(10540),v=a.n(A),C=a(41113),y=a.n(C),w=a(95556),N={};N.styleTagTransform=y(),N.setAttributes=_(),N.insert=b().bind(null,"head"),N.domAPI=f(),N.insertStyleElement=v(),d()(w.A,N),w.A&&w.A.locals&&w.A.locals;const k=(0,a(14486).A)(c,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcDialog",{staticClass:"public-auth-prompt",attrs:{buttons:e.dialogButtons,"data-cy-public-auth-prompt-dialog":"","is-form":"","can-close":!1,name:e.dialogName},on:{submit:function(t){return e.$emit("close",e.name)}}},[e.owner?t("p",{staticClass:"public-auth-prompt__subtitle"},[e._v("\n\t\t"+e._s(e.t("files_sharing","{ownerDisplayName} shared a folder with you.",{ownerDisplayName:e.ownerDisplayName}))+"\n\t")]):e._e(),e._v(" "),t("NcNoteCard",{staticClass:"public-auth-prompt__header",attrs:{text:e.t("files_sharing","To upload files, you need to provide your name first."),type:"info"}}),e._v(" "),t("NcTextField",{ref:"input",staticClass:"public-auth-prompt__input",attrs:{"data-cy-public-auth-prompt-dialog-name":"",label:e.t("files_sharing","Name"),placeholder:e.t("files_sharing","Enter your name"),minlength:"2",name:"name",required:"",value:e.name},on:{"update:value":function(t){e.name=t}}})],1)}),[],!1,null,"47b67b1d",null).exports},95556:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(71354),i=a.n(n),s=a(76314),l=a.n(s)()(i());l.push([e.id,".public-auth-prompt__subtitle[data-v-47b67b1d]{font-size:1.25em;margin-block:0 calc(3*var(--default-grid-baseline))}.public-auth-prompt__header[data-v-47b67b1d]{margin-block:0 calc(3*var(--default-grid-baseline))}.public-auth-prompt__input[data-v-47b67b1d]{margin-block:calc(4*var(--default-grid-baseline)) calc(2*var(--default-grid-baseline))}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/PublicAuthPrompt.vue"],names:[],mappings:"AAEC,+CAEC,gBAAA,CACA,mDAAA,CAGD,6CACC,mDAAA,CAGD,4CACC,sFAAA",sourcesContent:["\n.public-auth-prompt {\n\t&__subtitle {\n\t\t// Smaller than dialog title\n\t\tfont-size: 1.25em;\n\t\tmargin-block: 0 calc(3 * var(--default-grid-baseline));\n\t}\n\n\t&__header {\n\t\tmargin-block: 0 calc(3 * var(--default-grid-baseline));\n\t}\n\n\t&__input {\n\t\tmargin-block: calc(4 * var(--default-grid-baseline)) calc(2 * var(--default-grid-baseline));\n\t}\n}\n"],sourceRoot:""}]);const r=l}}]);
//# sourceMappingURL=6127-6127.js.map?v=9e0322ddf38ec7ebf27b