(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{"0ezt":function(e,t,a){var r=a("x7z+");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(r,o);r.locals&&(e.exports=r.locals)},"1q1M":function(e,t,a){"use strict";a("mXqa")},"4TWA":function(e,t,a){"use strict";var r=a("CjXH"),o=a("LvDl"),i={name:"SelectInput",props:["placeholder","options","isError","default"],components:{Edit2Icon:r.y,UserIcon:r.wb,ChevronDownIcon:r.i},watch:{query:Object(o.debounce)((function(e){this.searchedResults=Object(o.omitBy)(this.options,(function(t){return!t.label.toLowerCase().includes(e.toLowerCase())}))}),200)},computed:{isSearching:function(){return this.searchedResults&&""!==this.query},optionList:function(){return this.isSearching?this.searchedResults:this.options}},data:function(){return{searchedResults:void 0,selected:void 0,isOpen:!1,query:""}},methods:{selectOption:function(e){this.$emit("input",e.value),this.$emit("change",e.value),this.selected=e,this.isOpen=!1},openMenu:function(){var e=this;this.isOpen=!this.isOpen,this.isOpen&&this.$nextTick((function(){return e.$refs.search.focus()}))}},created:function(){var e=this;this.default&&(this.selected=this.options.find((function(t){return t.value===e.default})))}},n=(a("VBJ4"),a("KHd+")),s=Object(n.a)(i,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select"},[a("div",{staticClass:"input-area bg-light-background rounded-lg",class:{"is-active":e.isOpen,"is-error":e.isError},on:{click:e.openMenu}},[e.selected?a("div",{staticClass:"selected"},[e.selected.icon?a("div",{staticClass:"option-icon"},["user"===e.selected.icon?a("user-icon",{staticClass:"text-theme dark-text-theme",attrs:{size:"14"}}):e._e(),e._v(" "),"user-edit"===e.selected.icon?a("edit2-icon",{staticClass:"text-theme dark-text-theme",attrs:{size:"14"}}):e._e()],1):e._e(),e._v(" "),a("span",{staticClass:"option-value"},[e._v(e._s(e.selected.label))])]):e._e(),e._v(" "),e.selected?e._e():a("div",{staticClass:"not-selected"},[a("span",{staticClass:"option-value placehoder"},[e._v(e._s(e.placeholder))])]),e._v(" "),a("chevron-down-icon",{staticClass:"chevron",attrs:{size:"19"}})],1),e._v(" "),a("transition",{attrs:{name:"slide-in"}},[e.isOpen?a("div",{staticClass:"input-options rounded-lg"},[e.options.length>5?a("div",{staticClass:"select-search"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search",staticClass:"search-input focus-border-theme rounded-lg",attrs:{type:"text",placeholder:e.$t("select_search_placeholder")},domProps:{value:e.query},on:{input:function(t){t.target.composing||(e.query=t.target.value)}}})]):e._e(),e._v(" "),a("ul",{staticClass:"option-list"},e._l(e.optionList,(function(t,r){return a("li",{key:r,staticClass:"option-item",on:{click:function(a){return e.selectOption(t)}}},[t.icon?a("div",{staticClass:"option-icon"},["user"===t.icon?a("user-icon",{attrs:{size:"14"}}):e._e(),e._v(" "),"user-edit"===t.icon?a("edit2-icon",{attrs:{size:"14"}}):e._e()],1):e._e(),e._v(" "),a("span",{staticClass:"option-value"},[e._v(e._s(t.label))])])})),0)]):e._e()])],1)}),[],!1,null,"779355e6",null);t.a=s.exports},"9aPE":function(e,t,a){var r=a("E+jl");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(r,o);r.locals&&(e.exports=r.locals)},"9xkz":function(e,t,a){"use strict";a.r(t);var r=a("o0o1"),o=a.n(r),i=a("A5+z"),n=a("bDRN"),s=a("4TWA"),d=a("eZ9V"),l=a("KnjL"),p=a("j8qy"),c=a("ASoH"),u=a("CjXH"),b=a("TJPC"),m=a("aSdZ"),v=a("vDqi"),f=a.n(v);function h(e,t,a,r,o,i,n){try{var s=e[i](n),d=s.value}catch(e){return void a(e)}s.done?t(d):Promise.resolve(d).then(r,o)}var x={name:"Database",components:{AuthContentWrapper:n.a,ValidationProvider:i.ValidationProvider,ValidationObserver:i.ValidationObserver,SettingsIcon:u.jb,SelectInput:s.a,AuthContent:p.a,AuthButton:c.a,FormLabel:d.a,required:b.a,InfoBox:l.a,Headline:m.a},computed:{submitButtonText:function(){return this.isLoading?"Testing and Installing Database":"Test Connection and Install Database"}},data:function(){return{isLoading:!1,isError:!1,errorMessage:"",connectionList:[{label:"MySQL",value:"mysql"}],databaseCredentials:{connection:"mysql",host:"",port:"",name:"",username:"",password:""}}},methods:{databaseCredentialsSubmit:function(){var e,t=this;return(e=o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.verifyPurchaseCode.validate();case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:t.isLoading=!0,t.isError=!1,f.a.post("/api/setup/database",t.databaseCredentials).then((function(e){t.isLoading=!1,t.$router.push({name:"InstallationDisclaimer"})})).catch((function(e){(e.response.status=500)&&(t.isError=!0,t.errorMessage=e.response.data.message),t.isLoading=!1}));case 8:case"end":return e.stop()}}),e)})),function(){var t=this,a=arguments;return new Promise((function(r,o){var i=e.apply(t,a);function n(e){h(i,r,o,n,s,"next",e)}function s(e){h(i,r,o,n,s,"throw",e)}n(void 0)}))})()}},created:function(){this.$scrollTop()}},g=(a("dXOq"),a("KHd+")),k=Object(g.a)(x,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("AuthContentWrapper",{ref:"auth"},[a("AuthContent",{attrs:{name:"database-credentials",visible:!0}},[a("Headline",{staticClass:"container mx-auto max-w-screen-sm",attrs:{title:"Setup Wizard",description:"Set up your database connection to install application database."}},[a("settings-icon",{staticClass:"title-icon text-theme mx-auto",attrs:{size:"40"}})],1),e._v(" "),a("ValidationObserver",{ref:"verifyPurchaseCode",staticClass:"form block-form",attrs:{tag:"form"},on:{submit:function(t){return t.preventDefault(),e.databaseCredentialsSubmit.apply(null,arguments)}},scopedSlots:e._u([{key:"default",fn:function(t){t.invalid;return[a("FormLabel",[e._v("Database Credentials")]),e._v(" "),a("InfoBox",[a("p",[e._v("We strongly recommend use MySQL or MariaDB database. Create new database, set all privileges and get credentials. For those who use cPanel or Plesk, here is useful resources:")]),e._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://www.inmotionhosting.com/support/edu/cpanel/create-database-2/",target:"_blank"}},[e._v("1. cPanel - MySQL Database Wizard")]),e._v(" "),a("a",{attrs:{href:"https://docs.plesk.com/en-US/obsidian/customer-guide/65157/",target:"_blank"}},[e._v("2. Plesk - Website databases")])])])]),e._v(" "),a("div",{staticClass:"block-wrapper"},[a("label",[e._v("Connection:")]),e._v(" "),a("ValidationProvider",{staticClass:"input-wrapper",attrs:{tag:"div",mode:"passive",name:"Connection",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.errors;return[a("SelectInput",{attrs:{options:e.connectionList,default:"mysql",placeholder:"Select your database connection",isError:r[0]},model:{value:e.databaseCredentials.connection,callback:function(t){e.$set(e.databaseCredentials,"connection",t)},expression:"databaseCredentials.connection"}}),e._v(" "),r[0]?a("span",{staticClass:"error-message"},[e._v(e._s(r[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),a("div",{staticClass:"block-wrapper"},[a("label",[e._v("Host:")]),e._v(" "),a("ValidationProvider",{staticClass:"input-wrapper",attrs:{tag:"div",mode:"passive",name:"Host",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.errors;return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.databaseCredentials.host,expression:"databaseCredentials.host"}],class:{"border-red":r[0]},attrs:{placeholder:"Type your database host",type:"text"},domProps:{value:e.databaseCredentials.host},on:{input:function(t){t.target.composing||e.$set(e.databaseCredentials,"host",t.target.value)}}}),e._v(" "),r[0]?a("span",{staticClass:"error-message"},[e._v(e._s(r[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),a("div",{staticClass:"block-wrapper"},[a("label",[e._v("Port:")]),e._v(" "),a("ValidationProvider",{staticClass:"input-wrapper",attrs:{tag:"div",mode:"passive",name:"Port",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.errors;return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.databaseCredentials.port,expression:"databaseCredentials.port"}],class:{"border-red":r[0]},attrs:{placeholder:"Type your database port",type:"text"},domProps:{value:e.databaseCredentials.port},on:{input:function(t){t.target.composing||e.$set(e.databaseCredentials,"port",t.target.value)}}}),e._v(" "),r[0]?a("span",{staticClass:"error-message"},[e._v(e._s(r[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),a("div",{staticClass:"block-wrapper"},[a("label",[e._v("Database Name:")]),e._v(" "),a("ValidationProvider",{staticClass:"input-wrapper",attrs:{tag:"div",mode:"passive",name:"Database Name",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.errors;return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.databaseCredentials.name,expression:"databaseCredentials.name"}],class:{"border-red":r[0]},attrs:{placeholder:"Select your database name",type:"text"},domProps:{value:e.databaseCredentials.name},on:{input:function(t){t.target.composing||e.$set(e.databaseCredentials,"name",t.target.value)}}}),e._v(" "),r[0]?a("span",{staticClass:"error-message"},[e._v(e._s(r[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),a("div",{staticClass:"block-wrapper"},[a("label",[e._v("Database Username:")]),e._v(" "),a("ValidationProvider",{staticClass:"input-wrapper",attrs:{tag:"div",mode:"passive",name:"Database Username",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.errors;return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.databaseCredentials.username,expression:"databaseCredentials.username"}],class:{"border-red":r[0]},attrs:{placeholder:"Select your database name",type:"text"},domProps:{value:e.databaseCredentials.username},on:{input:function(t){t.target.composing||e.$set(e.databaseCredentials,"username",t.target.value)}}}),e._v(" "),r[0]?a("span",{staticClass:"error-message"},[e._v(e._s(r[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),a("div",{staticClass:"block-wrapper"},[a("label",[e._v("Database Password:")]),e._v(" "),a("ValidationProvider",{staticClass:"input-wrapper",attrs:{tag:"div",mode:"passive",name:"Database Password",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.errors;return[a("input",{directives:[{name:"model",rawName:"v-model",value:e.databaseCredentials.password,expression:"databaseCredentials.password"}],class:{"border-red":r[0]},attrs:{placeholder:"Select your database password",type:"text"},domProps:{value:e.databaseCredentials.password},on:{input:function(t){t.target.composing||e.$set(e.databaseCredentials,"password",t.target.value)}}}),e._v(" "),r[0]?a("span",{staticClass:"error-message"},[e._v(e._s(r[0]))]):e._e()]}}],null,!0)})],1),e._v(" "),e.isError?a("InfoBox",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"error"}},[a("p",[e._v("We couldn't establish database connection. Please double check your database credentials.")]),e._v(" "),a("br"),e._v(" "),a("p",[e._v("Detailed error: "+e._s(e.errorMessage))])]):e._e(),e._v(" "),a("div",{staticClass:"submit-wrapper"},[a("AuthButton",{attrs:{icon:"chevron-right",text:e.submitButtonText,loading:e.isLoading,disabled:e.isLoading}})],1)]}}])})],1)],1)}),[],!1,null,"23eb1194",null);t.default=k.exports},ASoH:function(e,t,a){"use strict";var r=a("CjXH"),o={name:"AuthContent",props:["loading","icon","text"],components:{ChevronRightIcon:r.k,RefreshCwIcon:r.gb},data:function(){return{isVisible:!1}},created:function(){this.isVisible=this.visible}},i=(a("1q1M"),a("KHd+")),n=Object(i.a)(o,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("button",{staticClass:"group flex items-center border-2 border-black rounded-lg inline-block mx-auto px-7 py-2.5 whitespace-nowrap"},[a("span",{staticClass:"font-extrabold text-lg pr-1"},[e._v("\n\t\t\t"+e._s(e.text)+"\n\t\t")]),e._v(" "),e.loading?a("refresh-cw-icon",{staticClass:"vue-feather text-theme -mr-1 sync-alt",attrs:{size:"20"}}):e._e(),e._v(" "),!e.loading&&e.icon?a("chevron-right-icon",{staticClass:"vue-feather text-theme -mr-1",attrs:{size:"20"}}):e._e()],1)}),[],!1,null,"0be2c737",null);t.a=n.exports},DAAx:function(e,t,a){var r=a("az74");"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(r,o);r.locals&&(e.exports=r.locals)},"E+jl":function(e,t,a){(e.exports=a("I1BE")(!1)).push([e.i,".logo{width:120px;margin-bottom:20px}h1{font-size:2.125em;font-weight:800;line-height:1.2;margin-bottom:2px}h1,h2{color:#1b2539}h2{font-size:1.4375em;font-weight:500;margin-bottom:50px}@media only screen and (max-width:690px){h1{font-size:1.875em}h2{font-size:1.3125em}}@media only screen and (max-width:490px){h1{font-size:1.375em}h2{font-size:1.125em}}",""])},KnjL:function(e,t,a){"use strict";var r={name:"InfoBox",props:["type"]},o=(a("LQoL"),a("KHd+")),i=Object(o.a)(r,(function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"info-box",class:this.type},[this._t("default")],2)}),[],!1,null,"27ea1904",null);t.a=i.exports},LQoL:function(e,t,a){"use strict";a("0ezt")},SjQP:function(e,t,a){"use strict";a("9aPE")},TJPC:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));function r(e){return null==e}function o(e){return Array.isArray(e)&&0===e.length}var i={validate:function(e,t){var a=(void 0===t?{allowFalse:!0}:t).allowFalse,i={valid:!1,required:!0};return r(e)||o(e)?i:!1!==e||a?(i.valid=!!String(e).trim().length,i):i},params:[{name:"allowFalse",default:!0}],computesRequired:!0}},VBJ4:function(e,t,a){"use strict";a("xmEC")},aSdZ:function(e,t,a){"use strict";var r=a("L2JU");function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var n={name:"Headline",props:["description","title"],computed:function(e){for(var t=1;t