"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[4529],{846:(t,e,n)=>{n.d(e,{T:()=>u});var a=n(85168),i=n(32981),s=n(53334),o=n(63814),p=n(65899),r=n(65043),l=n(36620),c=n(86438);const d=()=>(0,a.Qg)((0,s.Tl)("settings","An error occurred during the request. Unable to proceed.")),u=(0,p.nY)("settings-apps",{state:()=>({apps:[],categories:[],updateCount:(0,i.C)("settings","appstoreUpdateCount",0),loading:{apps:!1,categories:!1},loadingList:!1,gettingCategoriesPromise:null}),actions:{async loadCategories(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!(this.categories.length>0)||t)try{this.loading.categories=!0;const{data:t}=await r.Ay.get((0,o.Jv)("settings/apps/categories"));for(const e of t)e.icon=c.A[e.id]??"";this.$patch({categories:t})}catch(t){l.A.error(t),d()}finally{this.loading.categories=!1}},async loadApps(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!(this.apps.length>0)||t)try{this.loading.apps=!0;const{data:t}=await r.Ay.get((0,o.Jv)("settings/apps/list"));this.$patch({apps:t.apps})}catch(t){l.A.error(t),d()}finally{this.loading.apps=!1}},getCategoryById(t){return this.categories.find((e=>{let{id:n}=e;return n===t}))??null},getAppById(t){return this.apps.find((e=>{let{id:n}=e;return n===t}))??null}}})},5472:(t,e,n)=>{n.d(e,{A:()=>p});var a=n(71354),i=n.n(a),s=n(76314),o=n.n(s)()(i());o.push([t.id,".app-discover[data-v-114ea95a]{max-width:1008px;margin-inline:auto;padding-inline:54px;padding-block-end:var(--default-clickable-area, 44px);display:flex;flex-direction:column;gap:var(--default-clickable-area, 44px)}","",{version:3,sources:["webpack://./apps/settings/src/components/AppStoreDiscover/AppStoreDiscoverSection.vue"],names:[],mappings:"AACA,+BACC,gBAAA,CACA,kBAAA,CACA,mBAAA,CAEA,qDAAA,CAEA,YAAA,CACA,qBAAA,CACA,uCAAA",sourcesContent:["\n.app-discover {\n\tmax-width: 1008px; /* 900px + 2x 54px padding for the carousel controls */\n\tmargin-inline: auto;\n\tpadding-inline: 54px;\n\t/* Padding required to make last element not bound to the bottom */\n\tpadding-block-end: var(--default-clickable-area, 44px);\n\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--default-clickable-area, 44px);\n}\n"],sourceRoot:""}]);const p=o},17426:(e,n,a)=>{a.r(n),a.d(n,{default:()=>yt});var i=a(85471),s=a(53334),o=a(24387),p=a(846),r=a(99907),l=a(6695),c=a(99148),d=a(9165),u=a(18608),A=a(60023),g=a(99418);const h={name:"Markdown",props:{text:{type:String,default:""},minHeading:{type:Number,default:1}},computed:{renderMarkdown(){const t=new A.xI.Renderer;return t.link=function(t){let e,{href:n,title:a,text:i}=t;try{e=decodeURIComponent(unescape(n)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0!==e.indexOf("http:")&&0!==e.indexOf("https:"))return"";let s='",s},t.heading=t=>{let{text:e,depth:n}=t;return n=Math.min(6,n+(this.minHeading-1)),`${e}`},t.image=t=>{let{title:e,text:n}=t;return n||e},t.blockquote=t=>{let{text:e}=t;return`
${e}
`},g.A.sanitize((0,A.xI)(this.text.trim(),{renderer:t,gfm:!1,highlight:!1,tables:!1,breaks:!1,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1}),{SAFE_FOR_JQUERY:!0,ALLOWED_TAGS:["h1","h2","h3","h4","h5","h6","strong","p","a","ul","ol","li","em","del","blockquote"]})}}};var m=a(85072),v=a.n(m),C=a(97825),b=a.n(C),f=a(77659),y=a.n(f),_=a(55056),x=a.n(_),w=a(10540),S=a.n(w),N=a(41113),k=a.n(N),D=a(39698),I={};I.styleTagTransform=k(),I.setAttributes=x(),I.insert=y().bind(null,"head"),I.domAPI=b(),I.insertStyleElement=S(),v()(D.A,I),D.A&&D.A.locals&&D.A.locals;var T=a(14486);const E=(0,T.A)(h,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"settings-markdown",domProps:{innerHTML:t._s(t.renderMarkdown)}})}),[],!1,null,"35d8331c",null).exports,B=(0,i.pM)({__name:"AppDescriptionTab",props:{app:null},setup:t=>({__sfc:!0,mdiTextShort:d.azb,t:s.Tl,NcAppSidebarTab:u.A,NcIconSvgWrapper:l.A,Markdown:E})});var P=a(73855),O={};O.styleTagTransform=k(),O.setAttributes=x(),O.insert=y().bind(null,"head"),O.domAPI=b(),O.insertStyleElement=S(),v()(P.A,O),P.A&&P.A.locals&&P.A.locals;const $=(0,T.A)(B,(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e(n.NcAppSidebarTab,{attrs:{id:"desc",name:n.t("settings","Description"),order:0},scopedSlots:t._u([{key:"icon",fn:function(){return[e(n.NcIconSvgWrapper,{attrs:{path:n.mdiTextShort}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"app-description"},[e(n.Markdown,{attrs:{text:t.app.description,"min-heading":4}})],1)])}),[],!1,null,"10fcea52",null).exports;var L=a(97012),M=a(4604),R=a(67607),U=a(32073),W=a(65043),G=a(63814),F=a(32981),z=a(94219),V=a(82182),q=a(40083),j=a(62938),Y=a(23453);const H={name:"AppDeployOptionsModal",components:{NcDialog:z.A,NcTextField:V.A,NcButton:L.A,NcNoteCard:q.A,NcCheckboxRadioSwitch:U.A,NcIconSvgWrapper:l.A},mixins:[Y.A],props:{app:{type:Object,required:!0},show:{type:Boolean,required:!0}},setup(t){const e=(0,p.T)(),n=(0,j.a)(),a=(0,i.EW)((()=>1===t.app?.releases?.length&&t.app?.releases[0]?.environmentVariables||[])),s=(0,i.KR)({environment_variables:a.value.reduce(((t,e)=>(t[e.envName]=e.default||"",t)),{}),mounts:[]});return{environmentVariables:a,deployOptions:s,store:e,appApiStore:n,mdiPlus:d.biz,mdiCheck:d.Tfj,mdiClose:d.hyP,mdiDeleteOutline:d.Chp}},data:()=>({addingMount:!1,newMountPoint:{hostPath:"",containerPath:"",readonly:!1},addingPortBinding:!1,configuredDeployOptions:null,deployOptionsDocsUrl:(0,F.C)("settings","deployOptionsDocsUrl",null)}),watch:{show(t){t?this.fetchExAppDeployOptions():this.configuredDeployOptions=null}},methods:{startAddingMount(){this.addingMount=!0,this.$nextTick((()=>{this.$refs.newMountHostPath.focus()}))},addMountPoint(){this.deployOptions.mounts.push(this.newMountPoint),this.newMountPoint={hostPath:"",containerPath:"",readonly:!1},this.addingMount=!1},cancelAddMountPoint(){this.newMountPoint={hostPath:"",containerPath:"",readonly:!1},this.addingMount=!1},removeMount(t){this.deployOptions.mounts=this.deployOptions.mounts.filter((e=>e!==t))},async fetchExAppDeployOptions(){return W.Ay.get((0,G.Jv)(`/apps/app_api/apps/deploy-options/${this.app.id}`)).then((t=>{this.configuredDeployOptions=t.data})).catch((()=>{this.configuredDeployOptions=null}))},submitDeployOptions(){this.enable(this.app.id,this.deployOptions),this.$emit("update:show",!1)}}};var Q=a(85907),K={};K.styleTagTransform=k(),K.setAttributes=x(),K.insert=y().bind(null,"head"),K.domAPI=b(),K.insertStyleElement=S(),v()(Q.A,K),Q.A&&Q.A.locals&&Q.A.locals;const J=(0,T.A)(H,(function(){var t=this,e=t._self._c;return e("NcDialog",{attrs:{open:t.show,size:"normal",name:t.t("settings","Advanced deploy options")},on:{"update:open":function(e){return t.$emit("update:show",e)}},scopedSlots:t._u([t.app.active||!t.app.canInstall&&!t.app.isCompatible||null!==t.configuredDeployOptions?null:{key:"actions",fn:function(){return[e("NcButton",{attrs:{title:t.enableButtonTooltip,"aria-label":t.enableButtonTooltip,type:"primary",disabled:!t.app.canInstall||t.installing||t.isLoading||!t.defaultDeployDaemonAccessible||t.isInitializing||t.isDeploying},on:{click:function(e){return e.stopPropagation(),t.submitDeployOptions.apply(null,arguments)}}},[t._v("\n\t\t\t"+t._s(t.enableButtonText)+"\n\t\t")])]},proxy:!0}],null,!0)},[e("div",{staticClass:"modal__content"},[e("p",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t"+t._s(null===t.configuredDeployOptions?t.t("settings","Edit ExApp deploy options before installation"):t.t("settings","Configured ExApp deploy options. Can be set only during installation"))+".\n\t\t\t"),t.deployOptionsDocsUrl?e("a",{attrs:{href:t.deployOptionsDocsUrl}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Learn more"))+"\n\t\t\t")]):t._e()]),t._v(" "),t.environmentVariables.length>0||null!==t.configuredDeployOptions&&t.configuredDeployOptions.environment_variables.length>0?e("h3",[t._v("\n\t\t\t"+t._s(t.t("settings","Environment variables"))+"\n\t\t")]):t._e(),t._v(" "),null===t.configuredDeployOptions?t._l(t.environmentVariables,(function(n){return e("div",{key:n.envName,staticClass:"deploy-option"},[e("NcTextField",{attrs:{label:n.displayName,value:t.deployOptions.environment_variables[n.envName]},on:{"update:value":function(e){return t.$set(t.deployOptions.environment_variables,n.envName,e)}}}),t._v(" "),e("p",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t\t\t"+t._s(n.description)+"\n\t\t\t\t")])],1)})):Object.keys(t.configuredDeployOptions).length>0?e("fieldset",{staticClass:"envs"},[e("legend",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","ExApp container environment variables"))+"\n\t\t\t")]),t._v(" "),t._l(t.configuredDeployOptions.environment_variables,(function(t,n){return e("NcTextField",{key:n,attrs:{label:t.displayName??n,"helper-text":t.description,value:t.value,readonly:""}})}))],2):[e("p",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","No environment variables defined"))+"\n\t\t\t")])],t._v(" "),e("h3",[t._v(t._s(t.t("settings","Mounts")))]),t._v(" "),null===t.configuredDeployOptions?[e("p",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Define host folder mounts to bind to the ExApp container"))+"\n\t\t\t")]),t._v(" "),e("NcNoteCard",{attrs:{type:"info",text:t.t("settings","Must exist on the Deploy daemon host prior to installing the ExApp")}}),t._v(" "),t._l(t.deployOptions.mounts,(function(n){return e("div",{key:n.hostPath,staticClass:"deploy-option",staticStyle:{display:"flex","align-items":"center","justify-content":"space-between","flex-direction":"row"}},[e("NcTextField",{attrs:{label:t.t("settings","Host path"),value:n.hostPath},on:{"update:value":function(e){return t.$set(n,"hostPath",e)}}}),t._v(" "),e("NcTextField",{attrs:{label:t.t("settings","Container path"),value:n.containerPath},on:{"update:value":function(e){return t.$set(n,"containerPath",e)}}}),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:n.readonly},on:{"update:checked":function(e){return t.$set(n,"readonly",e)}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Read-only"))+"\n\t\t\t\t")]),t._v(" "),e("NcButton",{staticStyle:{"margin-top":"6px"},attrs:{"aria-label":t.t("settings","Remove mount")},on:{click:function(e){return t.removeMount(n)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiDeleteOutline}})]},proxy:!0}],null,!0)})],1)})),t._v(" "),t.addingMount?e("div",{staticClass:"deploy-option"},[e("h4",[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","New mount"))+"\n\t\t\t\t")]),t._v(" "),e("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"space-between","flex-direction":"row"}},[e("NcTextField",{ref:"newMountHostPath",attrs:{label:t.t("settings","Host path"),"aria-label":t.t("settings","Enter path to host folder"),value:t.newMountPoint.hostPath},on:{"update:value":function(e){return t.$set(t.newMountPoint,"hostPath",e)}}}),t._v(" "),e("NcTextField",{attrs:{label:t.t("settings","Container path"),"aria-label":t.t("settings","Enter path to container folder"),value:t.newMountPoint.containerPath},on:{"update:value":function(e){return t.$set(t.newMountPoint,"containerPath",e)}}}),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:t.newMountPoint.readonly,"aria-label":t.t("settings","Toggle read-only mode")},on:{"update:checked":function(e){return t.$set(t.newMountPoint,"readonly",e)}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Read-only"))+"\n\t\t\t\t\t")])],1),t._v(" "),e("div",{staticStyle:{display:"flex","align-items":"center","margin-top":"4px"}},[e("NcButton",{attrs:{"aria-label":t.t("settings","Confirm adding new mount")},on:{click:t.addMountPoint},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiCheck}})]},proxy:!0}],null,!1,1018299955)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Confirm"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcButton",{staticStyle:{"margin-left":"4px"},attrs:{"aria-label":t.t("settings","Cancel adding mount")},on:{click:t.cancelAddMountPoint},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiClose}})]},proxy:!0}],null,!1,2764082467)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("settings","Cancel"))+"\n\t\t\t\t\t")])],1)]):t._e(),t._v(" "),t.addingMount?t._e():e("NcButton",{staticStyle:{"margin-top":"5px"},attrs:{"aria-label":t.t("settings","Add mount")},on:{click:t.startAddingMount},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiPlus}})]},proxy:!0}],null,!1,103601839)},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Add mount"))+"\n\t\t\t")])]:t.configuredDeployOptions.mounts.length>0?[e("p",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","ExApp container mounts"))+"\n\t\t\t")]),t._v(" "),t._l(t.configuredDeployOptions.mounts,(function(n){return e("div",{key:n.hostPath,staticClass:"deploy-option",staticStyle:{display:"flex","align-items":"center","justify-content":"space-between","flex-direction":"row"}},[e("NcTextField",{attrs:{label:t.t("settings","Host path"),value:n.hostPath,readonly:""},on:{"update:value":function(e){return t.$set(n,"hostPath",e)}}}),t._v(" "),e("NcTextField",{attrs:{label:t.t("settings","Container path"),value:n.containerPath,readonly:""},on:{"update:value":function(e){return t.$set(n,"containerPath",e)}}}),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{checked:n.readonly,disabled:""},on:{"update:checked":function(e){return t.$set(n,"readonly",e)}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Read-only"))+"\n\t\t\t\t")])],1)}))]:e("p",{staticClass:"deploy-option__hint"},[t._v("\n\t\t\t"+t._s(t.t("settings","No mounts defined"))+"\n\t\t")])],2)])}),[],!1,null,"4cb64c43",null).exports,X={name:"AppDetailsTab",components:{NcAppSidebarTab:u.A,NcButton:L.A,NcDateTime:M.A,NcIconSvgWrapper:l.A,NcSelect:R.A,NcCheckboxRadioSwitch:U.A,AppDeployOptionsModal:J},mixins:[Y.A],props:{app:{type:Object,required:!0}},setup:()=>({store:(0,p.T)(),appApiStore:(0,j.a)(),mdiBugOutline:d.Le7,mdiFeatureSearchOutline:d.Jtd,mdiStar:d.ZL5,mdiTextBoxOutline:d.fXo,mdiTooltipQuestionOutline:d.knh,mdiToyBrickPlusOutline:d.eqc}),data:()=>({groupCheckedAppsData:!1,removeData:!1,showDeployOptionsModal:!1}),computed:{lastModified(){return(this.app.appstoreData?.releases??[]).map((t=>{let{lastModified:e}=t;return Date.parse(e)})).sort().at(0)??null},appAuthors(){if(console.warn(this.app),!this.app)return"";const t=t=>t["@value"]?t["@value"]:t;return(Array.isArray(this.app.author)?this.app.author.map(t):[t(this.app.author)]).sort(((t,e)=>t.split(" ").at(-1).localeCompare(e.split(" ").at(-1)))).join(", ")},appstoreUrl(){return`https://apps.nextcloud.com/apps/${this.app.id}`},externalResources(){const e=[];return this.app.internal||e.push({id:"appstore",href:this.appstoreUrl,label:t("settings","View in store")}),this.app.website&&e.push({id:"website",href:this.app.website,label:t("settings","Visit website")}),this.app.documentation&&(this.app.documentation.user&&e.push({id:"doc-user",href:this.app.documentation.user,label:t("settings","Usage documentation")}),this.app.documentation.admin&&e.push({id:"doc-admin",href:this.app.documentation.admin,label:t("settings","Admin documentation")}),this.app.documentation.developer&&e.push({id:"doc-developer",href:this.app.documentation.developer,label:t("settings","Developer documentation")})),e},appCategories(){return[this.app.category].flat().map((t=>this.store.getCategoryById(t)?.displayName??t)).join(", ")},rateAppUrl(){return`${this.appstoreUrl}#comments`},appGroups(){return this.app.groups.map((t=>({id:t,name:t})))},groups(){return this.$store.getters.getGroups.filter((t=>"disabled"!==t.id)).sort(((t,e)=>t.name.localeCompare(e.name)))}},watch:{"app.id"(){this.removeData=!1}},mounted(){this.app.groups.length>0&&(this.groupCheckedAppsData=!0)},methods:{toggleRemoveData(){this.removeData=!this.removeData}}};var Z=a(41737),tt={};tt.styleTagTransform=k(),tt.setAttributes=x(),tt.insert=y().bind(null,"head"),tt.domAPI=b(),tt.insertStyleElement=S(),v()(Z.A,tt),Z.A&&Z.A.locals&&Z.A.locals;const et=(0,T.A)(X,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{attrs:{id:"details",name:t.t("settings","Details"),order:1},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiTextBoxOutline}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"app-details"},[e("div",{staticClass:"app-details__actions"},[t.app.active&&t.canLimitToGroups(t.app)?e("div",{staticClass:"app-details__actions-groups"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.groupCheckedAppsData,expression:"groupCheckedAppsData"}],staticClass:"groups-enable__checkbox checkbox",attrs:{id:`groups_enable_${t.app.id}`,type:"checkbox"},domProps:{value:t.app.id,checked:Array.isArray(t.groupCheckedAppsData)?t._i(t.groupCheckedAppsData,t.app.id)>-1:t.groupCheckedAppsData},on:{change:[function(e){var n=t.groupCheckedAppsData,a=e.target,i=!!a.checked;if(Array.isArray(n)){var s=t.app.id,o=t._i(n,s);a.checked?o<0&&(t.groupCheckedAppsData=n.concat([s])):o>-1&&(t.groupCheckedAppsData=n.slice(0,o).concat(n.slice(o+1)))}else t.groupCheckedAppsData=i},t.setGroupLimit]}}),t._v(" "),e("label",{attrs:{for:`groups_enable_${t.app.id}`}},[t._v(t._s(t.t("settings","Limit to groups")))]),t._v(" "),e("input",{staticClass:"group_select",attrs:{type:"hidden",title:t.t("settings","All"),value:""}}),t._v(" "),e("br"),t._v(" "),e("label",{attrs:{for:"limitToGroups"}},[e("span",[t._v(t._s(t.t("settings","Limit app usage to groups")))])]),t._v(" "),t.isLimitedToGroups(t.app)?e("NcSelect",{attrs:{"input-id":"limitToGroups",options:t.groups,value:t.appGroups,limit:5,label:"name",multiple:!0,"close-on-select":!1},on:{"option:selected":t.addGroupLimitation,"option:deselected":t.removeGroupLimitation,search:t.asyncFindGroup}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])]):t._e()],1):t._e(),t._v(" "),e("div",{staticClass:"app-details__actions-manage"},[t.app.update?e("input",{staticClass:"update primary",attrs:{type:"button",value:t.t("settings","Update to {version}",{version:t.app.update}),disabled:t.installing||t.isLoading||t.isManualInstall},on:{click:function(e){return t.update(t.app.id)}}}):t._e(),t._v(" "),t.app.canUnInstall?e("input",{staticClass:"uninstall",attrs:{type:"button",value:t.t("settings","Remove"),disabled:t.installing||t.isLoading},on:{click:function(e){return t.remove(t.app.id,t.removeData)}}}):t._e(),t._v(" "),t.app.active?e("input",{staticClass:"enable",attrs:{type:"button",value:t.disableButtonText,disabled:t.installing||t.isLoading||t.isInitializing||t.isDeploying},on:{click:function(e){return t.disable(t.app.id)}}}):t._e(),t._v(" "),t.app.active||!t.app.canInstall&&!t.app.isCompatible?t.app.active||t.app.canInstall?t._e():e("input",{staticClass:"enable force",attrs:{title:t.forceEnableButtonTooltip,"aria-label":t.forceEnableButtonTooltip,type:"button",value:t.forceEnableButtonText,disabled:t.installing||t.isLoading},on:{click:function(e){return t.forceEnable(t.app.id)}}}):e("input",{staticClass:"enable primary",attrs:{title:t.enableButtonTooltip,"aria-label":t.enableButtonTooltip,type:"button",value:t.enableButtonText,disabled:!t.app.canInstall||t.installing||t.isLoading||!t.defaultDeployDaemonAccessible||t.isInitializing||t.isDeploying},on:{click:function(e){return t.enable(t.app.id)}}}),t._v(" "),t.app?.app_api&&(t.app.canInstall||t.app.isCompatible)?e("NcButton",{attrs:{"aria-label":t.t("settings","Advanced deploy options"),type:"secondary"},on:{click:()=>t.showDeployOptionsModal=!0},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiToyBrickPlusOutline}})]},proxy:!0}],null,!1,973660380)},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Deploy options"))+"\n\t\t\t\t")]):t._e()],1),t._v(" "),t.defaultDeployDaemonAccessible?t._e():e("p",{staticClass:"warning"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Default Deploy daemon is not accessible"))+"\n\t\t\t")]),t._v(" "),t.app.canUnInstall?e("NcCheckboxRadioSwitch",{attrs:{checked:t.removeData,disabled:t.installing||t.isLoading||!t.defaultDeployDaemonAccessible},on:{"update:checked":t.toggleRemoveData}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Delete data on remove"))+"\n\t\t\t")]):t._e()],1),t._v(" "),e("ul",{staticClass:"app-details__dependencies"},[t.app.missingMinOwnCloudVersion?e("li",[t._v("\n\t\t\t\t"+t._s(t.t("settings","This app has no minimum Nextcloud version assigned. This will be an error in the future."))+"\n\t\t\t")]):t._e(),t._v(" "),t.app.missingMaxOwnCloudVersion?e("li",[t._v("\n\t\t\t\t"+t._s(t.t("settings","This app has no maximum Nextcloud version assigned. This will be an error in the future."))+"\n\t\t\t")]):t._e(),t._v(" "),t.app.canInstall?t._e():e("li",[t._v("\n\t\t\t\t"+t._s(t.t("settings","This app cannot be installed because the following dependencies are not fulfilled:"))+"\n\t\t\t\t"),e("ul",{staticClass:"missing-dependencies"},t._l(t.app.missingDependencies,(function(n,a){return e("li",{key:a},[t._v("\n\t\t\t\t\t\t"+t._s(n)+"\n\t\t\t\t\t")])})),0)])]),t._v(" "),t.lastModified&&!t.app.shipped?e("div",{staticClass:"app-details__section"},[e("h4",[t._v("\n\t\t\t\t"+t._s(t.t("settings","Latest updated"))+"\n\t\t\t")]),t._v(" "),e("NcDateTime",{attrs:{timestamp:t.lastModified}})],1):t._e(),t._v(" "),e("div",{staticClass:"app-details__section"},[e("h4",[t._v("\n\t\t\t\t"+t._s(t.t("settings","Author"))+"\n\t\t\t")]),t._v(" "),e("p",{staticClass:"app-details__authors"},[t._v("\n\t\t\t\t"+t._s(t.appAuthors)+"\n\t\t\t")])]),t._v(" "),e("div",{staticClass:"app-details__section"},[e("h4",[t._v("\n\t\t\t\t"+t._s(t.t("settings","Categories"))+"\n\t\t\t")]),t._v(" "),e("p",[t._v("\n\t\t\t\t"+t._s(t.appCategories)+"\n\t\t\t")])]),t._v(" "),t.externalResources.length>0?e("div",{staticClass:"app-details__section"},[e("h4",[t._v(t._s(t.t("settings","Resources")))]),t._v(" "),e("ul",{staticClass:"app-details__documentation",attrs:{"aria-label":t.t("settings","Documentation")}},t._l(t.externalResources,(function(n){return e("li",{key:n.id},[e("a",{staticClass:"appslink",attrs:{href:n.href,target:"_blank",rel:"noreferrer noopener"}},[t._v("\n\t\t\t\t\t\t"+t._s(n.label)+" ↗\n\t\t\t\t\t")])])})),0)]):t._e(),t._v(" "),e("div",{staticClass:"app-details__section"},[e("h4",[t._v(t._s(t.t("settings","Interact")))]),t._v(" "),e("div",{staticClass:"app-details__interact"},[e("NcButton",{attrs:{disabled:!t.app.bugs,href:t.app.bugs??"#","aria-label":t.t("settings","Report a bug"),title:t.t("settings","Report a bug")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiBugOutline}})]},proxy:!0}])}),t._v(" "),e("NcButton",{attrs:{disabled:!t.app.bugs,href:t.app.bugs??"#","aria-label":t.t("settings","Request feature"),title:t.t("settings","Request feature")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiFeatureSearchOutline}})]},proxy:!0}])}),t._v(" "),t.app.appstoreData?.discussion?e("NcButton",{attrs:{href:t.app.appstoreData.discussion,"aria-label":t.t("settings","Ask questions or discuss"),title:t.t("settings","Ask questions or discuss")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiTooltipQuestionOutline}})]},proxy:!0}],null,!1,88743630)}):t._e(),t._v(" "),t.app.internal?t._e():e("NcButton",{attrs:{href:t.rateAppUrl,"aria-label":t.t("settings","Rate the app"),title:t.t("settings","Rate")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiStar}})]},proxy:!0}],null,!1,422450625)})],1)]),t._v(" "),t.app?.app_api?e("AppDeployOptionsModal",{attrs:{show:t.showDeployOptionsModal,app:t.app},on:{"update:show":function(e){t.showDeployOptionsModal=e}}}):t._e()],1)])}),[],!1,null,"37114c97",null).exports,nt=(0,i.pM)({__name:"AppReleasesTab",props:{app:null},setup(t){const e=t,n=(0,i.EW)((()=>Object.values(e.app.releases?.[0]?.translations??{}).some((t=>{let{changelog:e}=t;return!!e}))));return{__sfc:!0,props:e,hasChangelog:n,createChangelogFromRelease:t=>t.translations?.[(0,s.Z0)()]?.changelog??t.translations?.en?.changelog??"",mdiClockFast:d.NWU,t:s.Tl,NcAppSidebarTab:u.A,NcIconSvgWrapper:l.A,Markdown:E}}});var at=a(54891),it={};it.styleTagTransform=k(),it.setAttributes=x(),it.insert=y().bind(null,"head"),it.domAPI=b(),it.insertStyleElement=S(),v()(at.A,it),at.A&&at.A.locals&&at.A.locals;const st=(0,T.A)(nt,(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return n.hasChangelog?e(n.NcAppSidebarTab,{attrs:{id:"changelog",name:n.t("settings","Changelog"),order:2},scopedSlots:t._u([{key:"icon",fn:function(){return[e(n.NcIconSvgWrapper,{attrs:{path:n.mdiClockFast,size:24}})]},proxy:!0}],null,!1,1849836872)},[t._v(" "),t._l(t.app.releases,(function(a){return e("div",{key:a.version,staticClass:"app-sidebar-tabs__release"},[e("h2",[t._v(t._s(a.version))]),t._v(" "),e(n.Markdown,{staticClass:"app-sidebar-tabs__release-text",attrs:{text:n.createChangelogFromRelease(a)}})],1)}))],2):t._e()}),[],!1,null,"1114c30b",null).exports,ot=(0,i.pM)({__name:"AppDeployDaemonTab",props:{app:null},setup(t){const e=t;return{__sfc:!0,props:e,gpuSupport:(0,i.KR)("cpu"!==e.app?.daemon?.deploy_config?.computeDevice?.id||!1),NcAppSidebarTab:u.A,NcIconSvgWrapper:l.A,mdiFileChart:d.pTY}}});var pt=a(98656),rt={};rt.styleTagTransform=k(),rt.setAttributes=x(),rt.insert=y().bind(null,"head"),rt.domAPI=b(),rt.insertStyleElement=S(),v()(pt.A,rt),pt.A&&pt.A.locals&&pt.A.locals;const lt=(0,T.A)(ot,(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return t.app?.daemon?e(n.NcAppSidebarTab,{attrs:{id:"daemon",name:t.t("settings","Daemon"),order:3},scopedSlots:t._u([{key:"icon",fn:function(){return[e(n.NcIconSvgWrapper,{attrs:{path:n.mdiFileChart,size:24}})]},proxy:!0}],null,!1,1746493066)},[t._v(" "),e("div",{staticClass:"daemon"},[e("h4",[t._v(t._s(t.t("settings","Deploy Daemon")))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Type")))]),t._v(": "+t._s(t.app?.daemon.accepts_deploy_id))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Name")))]),t._v(": "+t._s(t.app?.daemon.name))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Display Name")))]),t._v(": "+t._s(t.app?.daemon.display_name))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","GPUs support")))]),t._v(": "+t._s(n.gpuSupport))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Compute device")))]),t._v(": "+t._s(t.app?.daemon?.deploy_config?.computeDevice?.label))])])]):t._e()}),[],!1,null,"e726cadc",null).exports;var ct=a(85151);const dt=(0,i.pM)({__name:"AppDaemonBadge",props:{daemon:null},setup:t=>({__sfc:!0,mdiFileChart:d.pTY,NcIconSvgWrapper:l.A})});var ut=a(57487),At={};At.styleTagTransform=k(),At.setAttributes=x(),At.insert=y().bind(null,"head"),At.domAPI=b(),At.insertStyleElement=S(),v()(ut.A,At),ut.A&&ut.A.locals&&ut.A.locals;const gt=(0,T.A)(dt,(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return t.daemon?e("span",{staticClass:"app-daemon-badge",attrs:{title:t.daemon.name}},[e(n.NcIconSvgWrapper,{attrs:{path:n.mdiFileChart,size:20,inline:""}}),t._v("\n\t"+t._s(t.daemon.display_name)+"\n")],1):t._e()}),[],!1,null,"0698b3b8",null).exports;var ht=a(86438),mt=a(36620),vt=a(14744);const Ct=(0,i.pM)({__name:"AppStoreSidebar",setup(t){const e=(0,o.lq)(),n=(0,o.rd)(),a=(0,p.T)(),u=(0,j.a)(),A=(0,vt.P)(),g=(0,i.EW)((()=>e.params.id??"")),h=(0,i.EW)((()=>{if(A.getters.isAppApiEnabled){const t=u.getAllApps.find((t=>t.id===g.value))??null;if(t)return t}return a.getAppById(g.value)})),m=(0,i.EW)((()=>h.value.appstoreData?.ratingNumOverall>5)),v=(0,i.EW)((()=>h.value.appstoreData?.ratingNumRecent>5?h.value.appstoreData.ratingRecent:h.value.appstoreData?.ratingOverall??.5)),C=(0,i.EW)((()=>null!==h.value)),{appIcon:b}=function(t){const e=(0,i.KR)(null),n=(0,i.EW)((()=>{let e;return e=t.value?.app_api?d.ED:[t.value?.category??[]].flat().map((t=>ht.A[t])).filter((t=>!!t)).at(0)??(t.value?.app_api?d.ED:d.CZ3),e?``:null}));return(0,i.nT)((async()=>{if(t.value?.preview){e.value=null;try{const n=await window.fetch(t.value.preview),a=await n.blob(),i=await a.text();e.value=i.replaceAll(/fill="#(fff|ffffff)([a-z0-9]{1,2})?"/gi,'fill="currentColor"')}catch(t){e.value=n.value,mt.A.error("Could not load app icon",{error:t})}}else e.value=n.value})),{appIcon:e}}(h),f=(0,i.EW)((()=>h.value?""!==h.value.license?(0,s.Tl)("settings","Version {version}, {license}-licensed",{version:h.value.version,license:h.value.licence.toString().toUpperCase()}):(0,s.Tl)("settings","Version {version}",{version:h.value.version}):"")),y=(0,i.KR)("details");(0,i.wB)([h],(()=>{y.value="details"}));const _=(0,i.KR)(!1),x=(0,i.EW)((()=>h.value?.screenshot&&_.value)),w=()=>{if(h.value?.releases&&h.value?.screenshot){const t=new Image;t.onload=()=>{_.value=!0},t.src=h.value.screenshot}};return(0,i.wB)([h],w),(0,i.sV)(w),{__sfc:!0,route:e,router:n,store:a,appApiStore:u,legacyStore:A,appId:g,app:h,hasRating:m,rating:v,showSidebar:C,appIcon:b,licenseText:f,activeTab:y,hideAppDetails:()=>{n.push({name:"apps-category",params:{category:e.params.category}})},screenshotLoaded:_,hasScreenshot:x,loadScreenshot:w,NcAppSidebar:r.N,NcIconSvgWrapper:l.A,AppScore:c.A,AppDescriptionTab:$,AppDetailsTab:et,AppReleasesTab:st,AppDeployDaemonTab:lt,AppLevelBadge:ct.A,AppDaemonBadge:gt}}});var bt=a(69423),ft={};ft.styleTagTransform=k(),ft.setAttributes=x(),ft.insert=y().bind(null,"head"),ft.domAPI=b(),ft.insertStyleElement=S(),v()(bt.A,ft),bt.A&&bt.A.locals&&bt.A.locals;const yt=(0,T.A)(Ct,(function(){var t=this,e=t._self._c,n=t._self._setupProxy;return n.showSidebar?e(n.NcAppSidebar,{staticClass:"app-sidebar",class:{"app-sidebar--with-screenshot":n.hasScreenshot},attrs:{active:n.activeTab,background:n.hasScreenshot?n.app.screenshot:void 0,compact:!n.hasScreenshot,name:n.app.name,title:n.app.name,subname:n.licenseText,subtitle:n.licenseText},on:{"update:active":function(t){n.activeTab=t},close:n.hideAppDetails},scopedSlots:t._u([n.hasScreenshot?null:{key:"header",fn:function(){return[e(n.NcIconSvgWrapper,{staticClass:"app-sidebar__fallback-icon",attrs:{svg:n.appIcon??"",size:64}})]},proxy:!0},{key:"description",fn:function(){return[e("div",{staticClass:"app-sidebar__badges"},[e(n.AppLevelBadge,{attrs:{level:n.app.level}}),t._v(" "),n.app.app_api&&n.app.daemon?e(n.AppDaemonBadge,{attrs:{daemon:n.app.daemon}}):t._e(),t._v(" "),n.hasRating?e(n.AppScore,{attrs:{score:n.rating}}):t._e()],1)]},proxy:!0}],null,!0)},[t._v(" "),t._v(" "),e(n.AppDescriptionTab,{attrs:{app:n.app}}),t._v(" "),e(n.AppDetailsTab,{attrs:{app:n.app}}),t._v(" "),e(n.AppReleasesTab,{attrs:{app:n.app}}),t._v(" "),e(n.AppDeployDaemonTab,{attrs:{app:n.app}})],1):t._e()}),[],!1,null,"ffae2952",null).exports},18460:(t,e,n)=>{n.d(e,{A:()=>p});var a=n(71354),i=n.n(a),s=n(76314),o=n.n(s)()(i());o.push([t.id,"\n/* The categories-loading indicator */\n.categories--loading[data-v-419cd0cf] {\n\tflex: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/views/AppStoreNavigation.vue"],names:[],mappings:";AA0IA,qCAAA;AACA;CACA,OAAA;CACA,aAAA;CACA,mBAAA;CACA,uBAAA;AACA",sourcesContent:['\x3c!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n\n