(()=>{"use strict";var e,t={84927:(e,t,o)=>{var a=o(85471),r=o(32981),n=o(53334),s=o(99418),i=o(32051),c=o(32073),l=o(59892),d=o(40083),u=o(16044),f=o(82182),p=o(33691);const g=(0,r.C)("core","config"),m=(0,r.C)("core","links");var b;!function(e){e[e.VeryWeak=0]="VeryWeak",e[e.Weak=1]="Weak",e[e.Moderate=2]="Moderate",e[e.Strong=3]="Strong",e[e.VeryStrong=4]="VeryStrong",e[e.ExtremelyStrong=5]="ExtremelyStrong"}(b||(b={}));const A=(0,a.pM)({name:"Setup",components:{IconArrowRight:p.A,NcButton:i.A,NcCheckboxRadioSwitch:c.A,NcLoadingIcon:l.A,NcNoteCard:d.A,NcPasswordField:u.A,NcTextField:f.A},setup:()=>({links:m,t:n.t}),data:()=>({config:g,isValidAutoconfig:!1,loading:!1}),computed:{passwordHelperText(){if(""===this.config.adminpass)return"";switch(this.checkPasswordEntropy(this.config.adminpass)){case b.VeryWeak:return(0,n.t)("core","Password is too weak");case b.Weak:return(0,n.t)("core","Password is weak");case b.Moderate:return(0,n.t)("core","Password is average");case b.Strong:return(0,n.t)("core","Password is strong");case b.VeryStrong:return(0,n.t)("core","Password is very strong");case b.ExtremelyStrong:return(0,n.t)("core","Password is extremely strong")}return(0,n.t)("core","Unknown password strength")},passwordHelperType(){return this.checkPasswordEntropy(this.config.adminpass).htaccess file does not work."),(0,n.t)("core","For information how to properly configure your server, please {linkStart}see the documentation{linkEnd}",{linkStart:'',linkEnd:""},{escape:!1})].join("
");return s.A.sanitize(e)},errors(){return this.config.errors.map((e=>"string"==typeof e?{heading:"",message:e}:""===e.hint?{heading:"",message:e.error}:{heading:e.error,message:e.hint}))}},mounted(){if(""===this.config.dbtype&&(this.config.dbtype=Object.keys(this.config.databases).at(0)),this.config.hasAutoconfig){const e=this.$refs.form;e.querySelectorAll('input[name="adminlogin"], input[name="adminpass"]').forEach((e=>{e.removeAttribute("required")})),e.checkValidity()&&0===this.config.errors.length?this.isValidAutoconfig=!0:this.isValidAutoconfig=!1,e.querySelectorAll('input[name="adminlogin"], input[name="adminpass"]').forEach((e=>{e.setAttribute("required","true")}))}},methods:{async onSubmit(){this.loading=!0},checkPasswordEntropy(e){const t=new Set(e),o=parseInt(Math.log2(Math.pow(parseInt(t.size.toString()),e.length)).toFixed(2));return o<16?b.VeryWeak:o<31?b.Weak:o<46?b.Moderate:o<61?b.Strong:o<76?b.VeryStrong:b.ExtremelyStrong}}});var h=o(85072),v=o.n(h),_=o(97825),y=o.n(_),C=o(77659),k=o.n(C),w=o(55056),x=o.n(w),S=o(10540),N=o.n(S),P=o(41113),T=o.n(P),F=o(96383),E={};E.styleTagTransform=T(),E.setAttributes=x(),E.insert=k().bind(null,"head"),E.domAPI=y(),E.insertStyleElement=N(),v()(F.A,E),F.A&&F.A.locals&&F.A.locals;const O=(0,o(14486).A)(A,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("form",{ref:"form",staticClass:"setup-form",class:{"setup-form--loading":e.loading},attrs:{action:"",method:"POST"},on:{submit:e.onSubmit}},[e.config.hasAutoconfig?t("NcNoteCard",{attrs:{heading:e.t("core","Autoconfig file detected"),type:"success"}},[e._v("\n\t\t"+e._s(e.t("core","The setup form below is pre-filled with the values from the config file."))+"\n\t")]):e._e(),e._v(" "),!1===e.config.htaccessWorking?t("NcNoteCard",{attrs:{heading:e.t("core","Security warning"),type:"warning"}},[t("p",{domProps:{innerHTML:e._s(e.htaccessWarning)}})]):e._e(),e._v(" "),e._l(e.errors,(function(o,a){return t("NcNoteCard",{key:a,attrs:{heading:o.heading,type:"error"}},[e._v("\n\t\t"+e._s(o.message)+"\n\t")])})),e._v(" "),t("fieldset",{staticClass:"setup-form__administration"},[t("legend",[e._v(e._s(e.t("core","Create administration account")))]),e._v(" "),t("NcTextField",{attrs:{label:e.t("core","Administration account name"),name:"adminlogin",required:""},model:{value:e.config.adminlogin,callback:function(t){e.$set(e.config,"adminlogin",t)},expression:"config.adminlogin"}}),e._v(" "),t("NcPasswordField",{attrs:{label:e.t("core","Administration account password"),name:"adminpass",required:""},model:{value:e.config.adminpass,callback:function(t){e.$set(e.config,"adminpass",t)},expression:"config.adminpass"}}),e._v(" "),t("NcNoteCard",{directives:[{name:"show",rawName:"v-show",value:""!==e.config.adminpass,expression:"config.adminpass !== ''"}],attrs:{type:e.passwordHelperType}},[e._v("\n\t\t\t"+e._s(e.passwordHelperText)+"\n\t\t")])],1),e._v(" "),t("details",{attrs:{open:!e.isValidAutoconfig}},[t("summary",[e._v(e._s(e.t("core","Advanced settings")))]),e._v(" "),t("fieldset",{staticClass:"setup-form__data-folder"},[t("legend",[e._v(e._s(e.t("core","Data folder")))]),e._v(" "),t("NcTextField",{attrs:{label:e.t("core","Data folder"),placeholder:e.config.serverRoot+"/data",required:"",autocomplete:"off",autocapitalize:"none",name:"directory",spellcheck:"false"},model:{value:e.config.directory,callback:function(t){e.$set(e.config,"directory",t)},expression:"config.directory"}})],1),e._v(" "),t("fieldset",{staticClass:"setup-form__database"},[t("legend",[e._v(e._s(e.t("core","Database configuration")))]),e._v(" "),t("fieldset",{staticClass:"setup-form__database-type"},[t("legend",[e._v(e._s(e.t("core","Database type")))]),e._v(" "),Object.keys(e.config.databases).length>1?t("p",{staticClass:"setup-form__database-type-select"},e._l(e.config.databases,(function(o,a){return t("NcCheckboxRadioSwitch",{key:a,attrs:{"button-variant":!0,value:a,name:"dbtype","button-variant-grouped":"horizontal",type:"radio"},model:{value:e.config.dbtype,callback:function(t){e.$set(e.config,"dbtype",t)},expression:"config.dbtype"}},[e._v("\n\t\t\t\t\t\t"+e._s(o)+"\n\t\t\t\t\t")])})),1):t("NcNoteCard",{attrs:{type:"warning"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Only {db} is available.",{db:Object.values(e.config.databases).at(0)}))),t("br"),e._v("\n\t\t\t\t\t"+e._s(e.t("core","Install and activate additional PHP modules to choose other database types."))),t("br"),e._v(" "),t("a",{attrs:{href:e.links.adminSourceInstall,target:"_blank",rel:"noreferrer noopener"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("core","For more details check out the documentation."))+" ↗\n\t\t\t\t\t")])]),e._v(" "),"sqlite"===e.config.dbtype?t("NcNoteCard",{attrs:{heading:e.t("core","Performance warning"),type:"warning"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","You chose SQLite as database."))),t("br"),e._v("\n\t\t\t\t\t"+e._s(e.t("core","SQLite should only be used for minimal and development instances. For production we recommend a different database backend."))),t("br"),e._v("\n\t\t\t\t\t"+e._s(e.t("core","If you use clients for file syncing, the use of SQLite is highly discouraged."))+"\n\t\t\t\t")]):e._e()],1),e._v(" "),"sqlite"!==e.config.dbtype?t("fieldset",[t("NcTextField",{attrs:{label:e.t("core","Database user"),autocapitalize:"none",autocomplete:"off",name:"dbuser",spellcheck:"false",required:""},model:{value:e.config.dbuser,callback:function(t){e.$set(e.config,"dbuser",t)},expression:"config.dbuser"}}),e._v(" "),t("NcPasswordField",{attrs:{label:e.t("core","Database password"),autocapitalize:"none",autocomplete:"off",name:"dbpass",spellcheck:"false",required:""},model:{value:e.config.dbpass,callback:function(t){e.$set(e.config,"dbpass",t)},expression:"config.dbpass"}}),e._v(" "),t("NcTextField",{attrs:{label:e.t("core","Database name"),autocapitalize:"none",autocomplete:"off",name:"dbname",pattern:"[0-9a-zA-Z\\$_\\-]+",spellcheck:"false",required:""},model:{value:e.config.dbname,callback:function(t){e.$set(e.config,"dbname",t)},expression:"config.dbname"}}),e._v(" "),"oci"===e.config.dbtype?t("NcTextField",{attrs:{label:e.t("core","Database tablespace"),autocapitalize:"none",autocomplete:"off",name:"dbtablespace",spellcheck:"false"},model:{value:e.config.dbtablespace,callback:function(t){e.$set(e.config,"dbtablespace",t)},expression:"config.dbtablespace"}}):e._e(),e._v(" "),t("NcTextField",{attrs:{"helper-text":e.t("core","Please specify the port number along with the host name (e.g., localhost:5432)."),label:e.t("core","Database host"),placeholder:e.t("core","localhost"),autocapitalize:"none",autocomplete:"off",name:"dbhost",spellcheck:"false"},model:{value:e.config.dbhost,callback:function(t){e.$set(e.config,"dbhost",t)},expression:"config.dbhost"}})],1):e._e()])]),e._v(" "),t("NcButton",{staticClass:"setup-form__button",class:{"setup-form__button--loading":e.loading},attrs:{disabled:e.loading,loading:e.loading,wide:!0,alignment:"center-reverse","native-type":"submit",type:"primary"},scopedSlots:e._u([{key:"icon",fn:function(){return[e.loading?t("NcLoadingIcon"):t("IconArrowRight")]},proxy:!0}])},[e._v("\n\t\t"+e._s(e.loading?e.t("core","Installing …"):e.t("core","Install"))+"\n\t")]),e._v(" "),t("NcNoteCard",{attrs:{type:"info"}},[e._v("\n\t\t"+e._s(e.t("core","Need help?"))+"\n\t\t"),t("a",{attrs:{target:"_blank",rel:"noreferrer noopener",href:e.links.adminInstall}},[e._v(e._s(e.t("core","See the documentation"))+" ↗")])])],2)}),[],!1,null,null,null).exports;(new(a.Ay.extend(O))).$mount("#content")},96383:(e,t,o)=>{o.d(t,{A:()=>i});var a=o(71354),r=o.n(a),n=o(76314),s=o.n(n)()(r());s.push([e.id,"form{padding:calc(3*var(--default-grid-baseline));color:var(--color-main-text);border-radius:var(--border-radius-container);background-color:var(--color-main-background-blur);box-shadow:0 0 10px var(--color-box-shadow);-webkit-backdrop-filter:var(--filter-background-blur);backdrop-filter:var(--filter-background-blur);max-width:300px;margin-bottom:30px}form>fieldset:first-child,form>.notecard:first-child{margin-top:0}form>.notecard:last-child{margin-bottom:0}form>fieldset,form>details{margin-block:1rem}form .setup-form__button:not(.setup-form__button--loading) .material-design-icon{transition:all linear var(--animation-quick)}form .setup-form__button:not(.setup-form__button--loading):hover .material-design-icon{transform:translateX(0.2em)}form .setup-form__database-type-select{display:flex}code{background-color:var(--color-background-dark);margin-top:1rem;padding:0 .3em;border-radius:var(--border-radius)}.input-field{margin-block-start:1rem !important}.notecard__heading{font-size:inherit !important}","",{version:3,sources:["webpack://./core/src/views/Setup.vue"],names:[],mappings:"AACA,KACC,4CAAA,CACA,4BAAA,CACA,4CAAA,CACA,kDAAA,CACA,2CAAA,CACA,qDAAA,CACA,6CAAA,CAEA,eAAA,CACA,kBAAA,CAEA,qDAEC,YAAA,CAGD,0BACC,eAAA,CAGD,2BAEC,iBAAA,CAIA,iFACC,4CAAA,CAGD,uFACC,2BAAA,CAKF,uCACC,YAAA,CAKF,KACC,6CAAA,CACA,eAAA,CACA,cAAA,CACA,kCAAA,CAID,aACC,kCAAA,CAGD,mBACC,4BAAA",sourceRoot:""}]);const i=s}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=t,e=[],a.O=(t,o,r,n)=>{if(!o){var s=1/0;for(d=0;d=n)&&Object.keys(a.O).every((e=>a.O[e](o[c])))?o.splice(c--,1):(i=!1,n0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[o,r,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.e=()=>Promise.resolve(),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=820,(()=>{a.b=document.baseURI||self.location.href;var e={820:0};a.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,s=o[0],i=o[1],c=o[2],l=0;if(s.some((t=>0!==e[t]))){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);if(c)var d=c(a)}for(t&&t(o);la(84927)));r=a.O(r)})(); //# sourceMappingURL=core-install.js.map?v=62da84a4e19ba307b70c