/*! For license information please see accessibility-accessibility.js.LICENSE.txt */ !function(){"use strict";var e,n={26795:function(e,n,i){var r=i(20144),s=i(79753),c=i(16453),o=i(4820),a={name:"ItemPreview",props:{preview:{type:Object,required:!0},selected:{type:String,default:null}},computed:{checked:{get:function(){return this.selected===this.preview.id},set:function(e){this.$emit("select",e?this.preview.id:"")}}}},l=i(51900),u=(0,l.Z)(a,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:{preview:!0}},[n("div",{staticClass:"preview-image",style:{backgroundImage:"url("+e.preview.img+")"}}),e._v(" "),n("div",{staticClass:"preview-description"},[n("h3",[e._v(e._s(e.preview.title))]),e._v(" "),n("p",[e._v(e._s(e.preview.text))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.checked,expression:"checked"}],staticClass:"checkbox",attrs:{id:"accessibility-"+e.preview.id,type:"checkbox"},domProps:{checked:Array.isArray(e.checked)?e._i(e.checked,null)>-1:e.checked},on:{change:function(t){var n=e.checked,i=t.target,r=!!i.checked;if(Array.isArray(n)){var s=e._i(n,null);i.checked?s<0&&(e.checked=n.concat([null])):s>-1&&(e.checked=n.slice(0,s).concat(n.slice(s+1)))}else e.checked=r}}}),e._v(" "),n("label",{attrs:{for:"accessibility-"+e.preview.id}},[e._v(e._s(e.preview.enableLabel))])])])}),[],!1,null,null,null).exports;function d(e,t,n,i,r,s,c){try{var o=e[s](c),a=o.value}catch(e){return void n(e)}o.done?t(a):Promise.resolve(a).then(i,r)}var h=(0,c.loadState)("accessibility","available-config"),f=(0,c.loadState)("accessibility","user-config"),v={name:"Accessibility",components:{ItemPreview:u},data:function(){return{availableConfig:h,userConfig:f}},computed:{themes:function(){return this.availableConfig.themes},highcontrast:function(){return this.availableConfig.highcontrast},fonts:function(){return this.availableConfig.fonts},selected:function(){return{theme:this.userConfig.theme,highcontrast:this.userConfig.highcontrast,font:this.userConfig.font}},description:function(){return t("accessibility","Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink).replace("{linkend}","")},guidelinesLink:function(){return''},descriptionDetail:function(){return t("accessibility","If you find any issues, don’t hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink).replace(/\{linkend\}/g,"")},issuetrackerLink:function(){return''},designteamLink:function(){return''}},methods:{selectHighContrast:function(e){this.selectItem("highcontrast",e),document.body.classList.toggle("theme--highcontrast")},selectTheme:function(e){var t=this.selected.theme;t&&document.body.classList.remove("theme--".concat(t)),e?(document.body.classList.remove("theme--light"),document.body.classList.add("theme--".concat(e))):document.body.classList.add("theme--light"),this.selectItem("theme",e)},selectFont:function(e){this.selectItem("font",e)},selectItem:function(e,n){var i,r=this;return(i=regeneratorRuntime.mark((function i(){var c,a,l;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,c=""===n,i.next=4,(0,o.default)({url:(0,s.generateOcsUrl)("apps/accessibility/api/v1/config/{type}",{type:e}),method:c?"DELETE":"PUT",data:{value:n}});case 4:r.userConfig[e]=n,(a=document.querySelector("link[rel=stylesheet][href*=accessibility][href*=user-]"))?JSON.stringify(Object.values(r.selected))===JSON.stringify([!1,!1])?a.remove():a.href=a.href.split("?")[0]+"?v="+(new Date).getTime():((l=document.createElement("link")).rel="stylesheet",l.href=(0,s.generateUrl)("/apps/accessibility/css/user-style.css")+"?v="+(new Date).getTime(),document.head.appendChild(l)),i.next=13;break;case 9:i.prev=9,i.t0=i.catch(0),console.error(i.t0,i.t0.response),OC.Notification.showTemporary(t("accessibility",i.t0.response.data.ocs.meta.message+". Unable to apply the setting."));case 13:case"end":return i.stop()}}),i,null,[[0,9]])})),function(){var e=this,t=arguments;return new Promise((function(n,r){var s=i.apply(e,t);function c(e){d(s,n,r,c,o,"next",e)}function o(e){d(s,n,r,c,o,"throw",e)}c(void 0)}))})()}}},p=v,m=(0,l.Z)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"section",attrs:{id:"accessibility"}},[n("h2",[e._v(e._s(e.t("accessibility","Accessibility")))]),e._v(" "),n("p",{domProps:{innerHTML:e._s(e.description)}}),e._v(" "),n("p",{domProps:{innerHTML:e._s(e.descriptionDetail)}}),e._v(" "),n("div",{staticClass:"preview-list"},[n("ItemPreview",{key:e.highcontrast.id,attrs:{preview:e.highcontrast,selected:e.selected.highcontrast},on:{select:e.selectHighContrast}}),e._v(" "),e._l(e.themes,(function(t){return n("ItemPreview",{key:t.id,attrs:{preview:t,selected:e.selected.theme},on:{select:e.selectTheme}})})),e._v(" "),e._l(e.fonts,(function(t){return n("ItemPreview",{key:t.id,attrs:{preview:t,selected:e.selected.font},on:{select:e.selectFont}})}))],2)])}),[],!1,null,null,null).exports;r.default.prototype.OC=OC,r.default.prototype.t=t,(new(r.default.extend(m))).$mount("#accessibility")}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.m=n,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(t,n,i,s){if(!n){var c=1/0;for(u=0;u=s)&&Object.keys(r.O).every((function(e){return r.O[e](n[a])}))?n.splice(a--,1):(o=!1,s0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,i,s]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=189,function(){var e={189:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,s,c=n[0],o=n[1],a=n[2],l=0;if(c.some((function(t){return 0!==e[t]}))){for(i in o)r.o(o,i)&&(r.m[i]=o[i]);if(a)var u=a(r)}for(t&&t(n);l